|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],[function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})}));var o=n(29);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=n(30);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var a=n(6);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=n(31);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var c=n(32);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=n(33);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}));var u=n(34);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var d=n(11);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})}));var h=n(35);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})}));var p=n(36);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})}));var m=n(37);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}})}));var g=n(7);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}})}));var f=n(4);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})}));var _=n(5);Object.keys(_).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return _[e]}})}));var b=n(13);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}})}));var v=n(38);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}})}));var y=n(39);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}})}));var E=n(40);Object.keys(E).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return E[e]}})}));var S=n(41);Object.keys(S).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return S[e]}})}));var w=n(42);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}})}));var C=n(43);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}})}));var T=n(44);Object.keys(T).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return T[e]}})}));var x=n(8);Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return x[e]}})}));var k=n(45);Object.keys(k).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return k[e]}})}));var F=n(46);Object.keys(F).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return F[e]}})}));var O=n(47);Object.keys(O).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return O[e]}})}));var R=n(12);Object.keys(R).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return R[e]}})}));var D=n(48);Object.keys(D).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return D[e]}})}));var I=n(49);Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}})}));var A=n(50);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var N=n(51);Object.keys(N).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return N[e]}})}));var M=n(52);Object.keys(M).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return M[e]}})}));var P=n(53);Object.keys(P).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return P[e]}})}));var L=n(9);Object.keys(L).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return L[e]}})}));var j=n(15);Object.keys(j).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return j[e]}})}));var U=n(16);Object.keys(U).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return U[e]}})}));var B=n(17);Object.keys(B).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return B[e]}})}));var G=n(54);Object.keys(G).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return G[e]}})}));var V=n(55);Object.keys(V).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return V[e]}})}));var q=n(14);Object.keys(q).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return q[e]}})}));var H=n(56);Object.keys(H).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return H[e]}})}))},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.ClientReady="im.vector.ready",e.HangupCall="im.vector.hangup",e.StartLiveStream="im.vector.start_live_stream",e.OpenIntegrationManager="integration_manager_open",e.ViewRoom="io.element.view_room"}(r||(r={}))},,function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}_(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&_(e,"error",t,n)}(e,o,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var o,i,a,s;if(l(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=u(e))>0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=h.bind(r);return o.listener=n,r.wrapFn=o,o}function m(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):f(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var l=c.length,u=f(c,l);for(n=0;n<l;++n)i(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,a;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.invertedDirection=function(e){if(e===r.ToWidget)return r.FromWidget;if(e===r.FromWidget)return r.ToWidget;throw new Error("Invalid direction")},t.WidgetApiDirection=void 0,t.WidgetApiDirection=r,function(e){e.ToWidget="toWidget",e.FromWidget="fromWidget"}(r||(t.WidgetApiDirection=r={}))},function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.CurrentApiVersions=t.UnstableApiVersion=t.MatrixApiVersion=void 0,t.MatrixApiVersion=r,function(e){e.Prerelease1="0.0.1",e.Prerelease2="0.0.2"}(r||(t.MatrixApiVersion=r={})),t.UnstableApiVersion=o,function(e){e.MSC2762="org.matrix.msc2762",e.MSC2871="org.matrix.msc2871",e.MSC2931="org.matrix.msc2931",e.MSC2974="org.matrix.msc2974",e.MSC2876="org.matrix.msc2876"}(o||(t.UnstableApiVersion=o={}));var i=[r.Prerelease1,r.Prerelease2,o.MSC2762,o.MSC2871,o.MSC2931,o.MSC2974,o.MSC2876];t.CurrentApiVersions=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PostmessageTransport=void 0;var r=n(3),o=n(0);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(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}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(n,e);var t=d(n);function n(e,r,o,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(a=t.call(this)).sendDirection=e,a.initialWidgetId=r,a.transportWindow=o,a.inboundWindow=i,g(p(a),"strictOriginCheck",void 0),g(p(a),"targetOrigin",void 0),g(p(a),"timeoutSeconds",10),g(p(a),"_ready",!1),g(p(a),"_widgetId",null),g(p(a),"outboundRequests",new Map),g(p(a),"isStopped",!1),a._widgetId=r,a}return l(n,[{key:"ready",get:function(){return this._ready}},{key:"widgetId",get:function(){return this._widgetId||null}}]),l(n,[{key:"sendInternal",value:function(e){var t=this.targetOrigin||"*";console.log("[PostmessageTransport] Sending object to ".concat(t,": "),e),this.transportWindow.postMessage(e,t)}},{key:"reply",value:function(e,t){return this.sendInternal(s(s({},e),{},{response:t}))}},{key:"send",value:function(e,t){return this.sendComplete(e,t).then((function(e){return e.response}))}},{key:"sendComplete",value:function(e,t){var n=this;if(!this.ready||!this.widgetId)return Promise.reject(new Error("Not ready or unknown widget ID"));var r={api:this.sendDirection,widgetId:this.widgetId,requestId:this.nextRequestId,action:e,data:t};return e===o.WidgetApiToWidgetAction.UpdateVisibility&&(r.visible=t.visible),new Promise((function(e,t){var o=setTimeout((function(){var e=n.outboundRequests.get(r.requestId);e&&(n.outboundRequests.delete(r.requestId),e.reject(new Error("Request timed out")))}),1e3*(n.timeoutSeconds||1));n.outboundRequests.set(r.requestId,{request:r,resolve:function(t){return e(t)},reject:t,timerId:o}),n.sendInternal(r)}))}},{key:"start",value:function(){var e=this;this.inboundWindow.addEventListener("message",(function(t){e.handleMessage(t)})),this._ready=!0}},{key:"stop",value:function(){this._ready=!1,this.isStopped=!0}},{key:"handleMessage",value:function(e){if(!this.isStopped&&e.data&&(!this.strictOriginCheck||e.origin===window.origin)){var t=e.data;if(t.action&&t.requestId&&t.widgetId)if(t.response){if(t.api!==this.sendDirection)return;this.handleResponse(t)}else{var n=t;if(n.api!==(0,o.invertedDirection)(this.sendDirection))return;this.handleRequest(n)}}}},{key:"handleRequest",value:function(e){if(this.widgetId){if(this.widgetId!==e.widgetId)return}else this._widgetId=e.widgetId;this.emit("message",new CustomEvent("message",{detail:e}))}},{key:"handleResponse",value:function(e){if(e.widgetId===this.widgetId){var t=this.outboundRequests.get(e.requestId);if(t)if(this.outboundRequests.delete(e.requestId),clearTimeout(t.timerId),(0,o.isErrorResponse)(e.response)){var n=e.response;t.reject(new Error(n.error.message))}else t.resolve(e)}}},{key:"nextRequestId",get:function(){for(var e="widgetapi-".concat(Date.now()),t=0,n=e;this.outboundRequests.has(n);)n="".concat(e,"-").concat(t++);return this.outboundRequests.set(n,null),n}}]),n}(r.EventEmitter);t.PostmessageTransport=f},function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetApiFromWidgetAction=t.WidgetApiToWidgetAction=void 0,t.WidgetApiToWidgetAction=r,function(e){e.SupportedApiVersions="supported_api_versions",e.Capabilities="capabilities",e.NotifyCapabilities="notify_capabilities",e.TakeScreenshot="screenshot",e.UpdateVisibility="visibility",e.OpenIDCredentials="openid_credentials",e.WidgetConfig="widget_config",e.CloseModalWidget="close_modal",e.ButtonClicked="button_clicked",e.SendEvent="send_event"}(r||(t.WidgetApiToWidgetAction=r={})),t.WidgetApiFromWidgetAction=o,function(e){e.SupportedApiVersions="supported_api_versions",e.ContentLoaded="content_loaded",e.SendSticker="m.sticker",e.UpdateAlwaysOnScreen="set_always_on_screen",e.GetOpenIDCredentials="get_openid",e.CloseModalWidget="close_modal",e.OpenModalWidget="open_modal",e.SetModalButtonEnabled="set_button_enabled",e.SendEvent="send_event",e.MSC2876ReadEvents="org.matrix.msc2876.read_events",e.MSC2931Navigate="org.matrix.msc2931.navigate",e.MSC2974RenegotiateCapabilities="org.matrix.msc2974.request_capabilities"}(o||(t.WidgetApiFromWidgetAction=o={}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.OpenIDRequestState=void 0,t.OpenIDRequestState=r,function(e){e.Allowed="allowed",e.Blocked="blocked",e.PendingUserConfirmation="request"}(r||(t.OpenIDRequestState=r={}))},function(e,t,n){"use strict";function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(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 o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}function o(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 i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a;Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetEventCapability=t.EventDirection=void 0,t.EventDirection=a,function(e){e.Send="send",e.Receive="receive"}(a||(t.EventDirection=a={}));var s=function(){function e(t,n,r,o,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.direction=t,this.eventType=n,this.isState=r,this.keyStr=o,this.raw=i}var t,n,o;return t=e,o=[{key:"forStateEvent",value:function(t,n,r){n=n.replace(/#/g,"\\#"),r=null!=r?"#".concat(r):"";var o="org.matrix.msc2762.".concat(t,".state_event:").concat(n).concat(r);return e.findEventCapabilities([o])[0]}},{key:"forRoomEvent",value:function(t,n){var r="org.matrix.msc2762.".concat(t,".event:").concat(n);return e.findEventCapabilities([r])[0]}},{key:"forRoomMessageEvent",value:function(t,n){n=null==n?"":n;var r="org.matrix.msc2762.".concat(t,".event:m.room.message#").concat(n);return e.findEventCapabilities([r])[0]}},{key:"findEventCapabilities",value:function(t){var n,o=[],i=r(t);try{for(i.s();!(n=i.n()).done;){var s=n.value,c=null,l=void 0,u=!1;if(s.startsWith("org.matrix.msc2762.send.")?s.startsWith("org.matrix.msc2762.send.event:")?(c=a.Send,l=s.substring("org.matrix.msc2762.send.event:".length)):s.startsWith("org.matrix.msc2762.send.state_event:")&&(c=a.Send,u=!0,l=s.substring("org.matrix.msc2762.send.state_event:".length)):s.startsWith("org.matrix.msc2762.receive.")&&(s.startsWith("org.matrix.msc2762.receive.event:")?(c=a.Receive,l=s.substring("org.matrix.msc2762.receive.event:".length)):s.startsWith("org.matrix.msc2762.receive.state_event:")&&(c=a.Receive,u=!0,l=s.substring("org.matrix.msc2762.receive.state_event:".length))),null!==c){var d=l.startsWith("m.room.message#")||u,h=null;if(l.includes("#")&&d){var p=l.split("#"),m=p.findIndex((function(e){return!e.endsWith("\\")}));l=p.slice(0,m+1).map((function(e){return e.endsWith("\\")?e.substring(0,e.length-1):e})).join("#"),h=p.slice(m+1).join("#")}o.push(new e(c,l,u,h,s))}}}catch(e){i.e(e)}finally{i.f()}return o}}],(n=[{key:"matchesAsStateEvent",value:function(e,t){return!!this.isState&&this.eventType===e&&(null===this.keyStr||this.keyStr===t)}},{key:"matchesAsRoomEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return!this.isState&&this.eventType===e&&("m.room.message"!==this.eventType||null===this.keyStr||this.keyStr===t)}}])&&i(t.prototype,n),o&&i(t,o),e}();t.WidgetEventCapability=s},function(e,t,n){var r,o,i;o=[],void 0===(i="function"==typeof(r=function(){var e=XMLHttpRequest;if(!e)throw new Error("missing XMLHttpRequest");function t(i,a){if("function"!=typeof a)throw new Error("Bad callback given: "+a);if(!i)throw new Error("No options given");var s=i.onResponse;if((i="string"==typeof i?{uri:i}:JSON.parse(JSON.stringify(i))).onResponse=s,i.verbose&&(t.log=function(){var e,t,n={},i=["trace","debug","info","warn","error"];for(t=0;t<i.length;t++)n[e=i[t]]=r,"undefined"!=typeof console&&console&&console[e]&&(n[e]=o(console,e));return n}()),i.url&&(i.uri=i.url,delete i.url),!i.uri&&""!==i.uri)throw new Error("options.uri is a required argument");if("string"!=typeof i.uri)throw new Error("options.uri must be a string");for(var c=["proxy","_redirectsFollowed","maxRedirects","followRedirect"],l=0;l<c.length;l++)if(i[c[l]])throw new Error("options."+c[l]+" is not supported");if(i.callback=a,i.method=i.method||"GET",i.headers=i.headers||{},i.body=i.body||null,i.timeout=i.timeout||t.DEFAULT_TIMEOUT,i.headers.host)throw new Error("Options.headers.host is not supported");i.json&&(i.headers.accept=i.headers.accept||"application/json","GET"!==i.method&&(i.headers["content-type"]="application/json"),"boolean"!=typeof i.json?i.body=JSON.stringify(i.json):"string"!=typeof i.body&&(i.body=JSON.stringify(i.body)));var u=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")};if(i.qs){var d="string"==typeof i.qs?i.qs:u(i.qs);-1!==i.uri.indexOf("?")?i.uri=i.uri+"&"+d:i.uri=i.uri+"?"+d}if(i.form){if("string"==typeof i.form)throw"form name unsupported";if("POST"===i.method){var h=(i.encoding||"application/x-www-form-urlencoded").toLowerCase();switch(i.headers["content-type"]=h,h){case"application/x-www-form-urlencoded":i.body=u(i.form).replace(/%20/g,"+");break;case"multipart/form-data":var p=function(e){var t={};t.boundry="-------------------------------"+Math.floor(1e9*Math.random());var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push("--"+t.boundry+'\nContent-Disposition: form-data; name="'+r+'"\n\n'+e[r]+"\n");return n.push("--"+t.boundry+"--"),t.body=n.join(""),t.length=t.body.length,t.type="multipart/form-data; boundary="+t.boundry,t}(i.form);i.body=p.body,i.headers["content-type"]=p.type;break;default:throw new Error("unsupported encoding:"+h)}}}return i.onResponse=i.onResponse||r,!0===i.onResponse&&(i.onResponse=a,i.callback=r),!i.headers.authorization&&i.auth&&(i.headers.authorization="Basic "+function(e){var t,n,r,o,i,a,s,c,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=0,d=0,h="",p=[];if(!e)return e;do{t=e.charCodeAt(u++),n=e.charCodeAt(u++),r=e.charCodeAt(u++),o=(c=t<<16|n<<8|r)>>18&63,i=c>>12&63,a=c>>6&63,s=63&c,p[d++]=l.charAt(o)+l.charAt(i)+l.charAt(a)+l.charAt(s)}while(u<e.length);switch(h=p.join(""),e.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"="}return h}(i.auth.username+":"+i.auth.password)),function(r){var o=new e,i=!1,a=function(e){var t,n=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/;try{t=location.href}catch(e){(t=document.createElement("a")).href="",t=t.href}var r=n.exec(t.toLowerCase())||[],o=n.exec(e.toLowerCase());return!(!o||o[1]==r[1]&&o[2]==r[2]&&(o[3]||("http:"===o[1]?80:443))==(r[3]||("http:"===r[1]?80:443)))}(r.uri),s="withCredentials"in o;if(n+=1,o.seq_id=n,o.id=n+": "+r.method+" "+r.uri,o._id=o.id,a&&!s){var c=new Error("Browser does not support cross-origin request: "+r.uri);return c.cors="unsupported",r.callback(c,o)}o.timeoutTimer=setTimeout((function(){i=!0;var e=new Error("ETIMEDOUT");return e.code="ETIMEDOUT",e.duration=r.timeout,t.log.error("Timeout",{id:o._id,milliseconds:r.timeout}),r.callback(e,o)}),r.timeout);var l={response:!1,loading:!1,end:!1};return o.onreadystatechange=function(n){if(i)return t.log.debug("Ignoring timed out state change",{state:o.readyState,id:o.id});if(t.log.debug("State change",{state:o.readyState,id:o.id,timed_out:i}),o.readyState===e.OPENED)for(var a in t.log.debug("Request started",{id:o.id}),r.headers)o.setRequestHeader(a,r.headers[a]);else o.readyState===e.HEADERS_RECEIVED?u():o.readyState===e.LOADING?(u(),d()):o.readyState===e.DONE&&(u(),d(),function(){if(l.end)return;if(l.end=!0,t.log.debug("Request done",{id:o.id}),o.body=o.responseText,r.json)try{o.body=JSON.parse(o.responseText)}catch(e){return r.callback(e,o)}r.callback(null,o,o.body)}())},o.open(r.method,r.uri,!0),a&&(o.withCredentials=!!r.withCredentials),o.send(r.body),o;function u(){if(!l.response){if(l.response=!0,t.log.debug("Got response",{id:o.id,status:o.status}),clearTimeout(o.timeoutTimer),o.statusCode=o.status,a&&0==o.statusCode){var e=new Error("CORS request rejected: "+r.uri);return e.cors="rejected",l.loading=!0,l.end=!0,r.callback(e,o)}r.onResponse(null,o)}}function d(){l.loading||(l.loading=!0,t.log.debug("Response body loading",{id:o.id}))}}(i)}t.log={trace:r,debug:r,info:r,warn:r,error:r};var n=0;function r(){}function o(e,t){return function(n,r){return"object"==typeof r&&(n+=" "+JSON.stringify(r)),e[t].call(e,n)}}return t.withCredentials=!1,t.DEFAULT_TIMEOUT=18e4,t.defaults=function(e,n){var r=function(t){return function(n,r){for(var o in n="string"==typeof n?{uri:n}:JSON.parse(JSON.stringify(n)),e)void 0===n[o]&&(n[o]=e[o]);return t(n,r)}},o=r(t);return o.get=r(t.get),o.post=r(t.post),o.put=r(t.put),o.head=r(t.head),o},["get","put","post","head"].forEach((function(e){var n=e.toUpperCase();t[e.toLowerCase()]=function(e){"string"==typeof e?e={method:n,uri:e}:(e=JSON.parse(JSON.stringify(e))).method=n;var r=[e].concat(Array.prototype.slice.apply(arguments,[1]));return t.apply(this,r)}})),t.couch=function(e,n){return"string"==typeof e&&(e={uri:e}),e.json=!0,e.body&&(e.json=e.body),delete e.body,n=n||r,t(e,(function(e,t,r){if(e)return n(e,t,r);if((t.statusCode<200||t.statusCode>299)&&r.error){for(var o in e=new Error("CouchDB error: "+(r.error.reason||r.error.error)),r)e[o]=r[o];return n(e,t,r)}return n(e,t,r)}))},t})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MatrixWidgetType=void 0,t.MatrixWidgetType=r,function(e){e.Custom="m.custom",e.JitsiMeet="m.jitsi",e.Stickerpicker="m.stickerpicker"}(r||(t.MatrixWidgetType=r={}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.BuiltInModalButtonID=void 0,t.BuiltInModalButtonID=r,function(e){e.Close="m.close"}(r||(t.BuiltInModalButtonID=r={}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.VideoConferenceCapabilities=t.StickerpickerCapabilities=t.MatrixCapabilities=void 0,t.MatrixCapabilities=r,function(e){e.Screenshots="m.capability.screenshot",e.StickerSending="m.sticker",e.AlwaysOnScreen="m.always_on_screen",e.MSC2931Navigate="org.matrix.msc2931.navigate"}(r||(t.MatrixCapabilities=r={}));var o=[r.StickerSending];t.StickerpickerCapabilities=o;var i=[r.AlwaysOnScreen];t.VideoConferenceCapabilities=i},function(e,t,n){"use strict";function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(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 o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}function o(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 i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleObservable=void 0;var a=function(){function e(t){var n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o=[],(r="listeners")in(n=this)?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t&&this.listeners.push(t)}var t,n,o;return t=e,(n=[{key:"onUpdate",value:function(e){this.listeners.push(e)}},{key:"update",value:function(e){var t,n=r(this.listeners);try{for(n.s();!(t=n.n()).done;)(0,t.value)(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"close",value:function(){this.listeners=[]}}])&&i(t.prototype,n),o&&i(t,o),e}();t.SimpleObservable=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidUrl=function(e){if(!e)return!1;try{var t=new URL(e);return"http"===t.protocol||"https"===t.protocol}catch(e){if(e instanceof TypeError)return!1;throw e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertPresent=function(e,t){if(!e[t])throw new Error("".concat(t," is required"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=void 0;var r=n(16),o=n(0);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definition=t,!this.definition)throw new Error("Definition is required");(0,r.assertPresent)(t,"id"),(0,r.assertPresent)(t,"creatorUserId"),(0,r.assertPresent)(t,"type"),(0,r.assertPresent)(t,"url")}var t,n,a;return t=e,(n=[{key:"getCompleteUrl",value:function(e){return(0,o.runTemplate)(this.templateUrl,this.definition,e)}},{key:"creatorUserId",get:function(){return this.definition.creatorUserId}},{key:"type",get:function(){return this.definition.type}},{key:"id",get:function(){return this.definition.id}},{key:"name",get:function(){return this.definition.name||null}},{key:"title",get:function(){return this.rawData.title||null}},{key:"templateUrl",get:function(){return this.definition.url}},{key:"origin",get:function(){return new URL(this.templateUrl).origin}},{key:"waitForIframeLoad",get:function(){return!1!==this.definition.waitForIframeLoad&&(this.definition.waitForIframeLoad,!0)}},{key:"rawData",get:function(){return this.definition.data||{}}}])&&i(t.prototype,n),a&&i(t,a),e}();t.Widget=a},,,,,,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){"use strict";(function(e){var r=n(25),o=n(26),i=n(27);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<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 d(this,e)}return l(this,e,t,n)}function l(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=h(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|m(t,n),o=(e=s(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=s(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?s(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(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 d(e,t){if(u(t),e=s(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function m(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 O(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return F(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function f(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _(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:b(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):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){var i,a=1,s=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;a=2,s/=2,c/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;i<s;i++)if(l(e,i)===l(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===c)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var d=!0,h=0;h<c;h++)if(l(e,i+h)!==l(t,h)){d=!1;break}if(d)return i}return-1}function v(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 a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function y(e,t,n,r){return V(B(t,e.length-n),e,n,r)}function E(e,t,n,r){return V(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(e,t,n,r)}function w(e,t,n,r){return V(G(t),e,n,r)}function C(e,t,n,r){return V(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function T(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,a,s,c,l=e[o],u=null,d=l>239?4:l>223?3:l>191?2:1;if(o+d<=n)switch(d){case 1:l<128&&(u=l);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&l)<<6|63&i)>127&&(u=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&l)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=d}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=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return l(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 u(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(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 a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=m,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)f(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)f(this,t,t+3),f(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)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(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),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),l=this.slice(r,o),u=e.slice(t,n),d=0;d<s;++d)if(l[d]!==u[d]){i=l[d],a=u[d];break}return i<a?-1:a<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 _(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return _(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 v(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(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 k(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 F(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 O(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+=U(e[i]);return o}function R(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 D(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 A(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 N(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 P(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||D(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||D(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||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(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||D(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||D(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||D(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||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(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||D(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||D(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||D(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||D(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(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):A(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):A(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):N(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):N(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,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&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,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&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):A(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):A(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):N(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):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return P(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 a=c.isBuffer(e)?e:B(new c(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function U(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=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+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(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(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(23))},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),a=r[0],s=r[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,d=s>0?a-4:a;for(n=0;n<d;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[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,c[u++]=255&t);1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(u(e,a,a+16383>s?s:a+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,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s<c;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function l(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 u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?o-1:0,h=n?-1:1,p=e[t+d];for(d+=h,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=h,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===i)i=1-l;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=l}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,l=8*i-o-1,u=(1<<l)-1,d=u>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,m=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*c-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=m,s/=256,o-=8);for(a=a<<o|s,l+=o;l>0;e[n+p]=255&a,p+=m,a/=256,l-=8);e[n+p-m]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetApi=void 0;var r=n(3),o=n(4),i=n(5),a=n(6),s=n(7),c=n(8),l=n(11),u=n(12),d=n(9);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(_,e);var t,n,r,h=f(_);function _(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(p(this,_),(e=h.call(this)).clientOrigin=n,y(b(e),"transport",void 0),y(b(e),"capabilitiesFinished",!1),y(b(e),"supportsMSC2974Renegotiate",!1),y(b(e),"requestedCapabilities",[]),y(b(e),"approvedCapabilities",void 0),y(b(e),"cachedClientVersions",void 0),!window.parent)throw new Error("No parent window. This widget doesn't appear to be embedded properly.");return e.transport=new a.PostmessageTransport(o.WidgetApiDirection.FromWidget,t,window.parent,window),e.transport.targetOrigin=n,e.transport.on("message",e.handleMessage.bind(b(e))),e}return t=_,(n=[{key:"hasCapability",value:function(e){return Array.isArray(this.approvedCapabilities)?this.approvedCapabilities.includes(e):this.requestedCapabilities.includes(e)}},{key:"requestCapability",value:function(e){if(this.capabilitiesFinished&&!this.supportsMSC2974Renegotiate)throw new Error("Capabilities have already been negotiated");this.requestedCapabilities.push(e)}},{key:"requestCapabilities",value:function(e){var t=this;e.forEach((function(e){return t.requestCapability(e)}))}},{key:"requestCapabilityToSendState",value:function(e,t){this.requestCapability(d.WidgetEventCapability.forStateEvent(d.EventDirection.Send,e,t).raw)}},{key:"requestCapabilityToReceiveState",value:function(e,t){this.requestCapability(d.WidgetEventCapability.forStateEvent(d.EventDirection.Receive,e,t).raw)}},{key:"requestCapabilityToSendEvent",value:function(e){this.requestCapability(d.WidgetEventCapability.forRoomEvent(d.EventDirection.Send,e).raw)}},{key:"requestCapabilityToReceiveEvent",value:function(e){this.requestCapability(d.WidgetEventCapability.forRoomEvent(d.EventDirection.Receive,e).raw)}},{key:"requestCapabilityToSendMessage",value:function(e){this.requestCapability(d.WidgetEventCapability.forRoomMessageEvent(d.EventDirection.Send,e).raw)}},{key:"requestCapabilityToReceiveMessage",value:function(e){this.requestCapability(d.WidgetEventCapability.forRoomMessageEvent(d.EventDirection.Receive,e).raw)}},{key:"requestOpenIDConnectToken",value:function(){var e=this;return new Promise((function(t,n){e.transport.sendComplete(s.WidgetApiFromWidgetAction.GetOpenIDCredentials,{}).then((function(r){var o=r.response;o.state===c.OpenIDRequestState.Allowed?t(o):o.state===c.OpenIDRequestState.Blocked?n(new Error("User declined to verify their identity")):o.state===c.OpenIDRequestState.PendingUserConfirmation?e.on("action:".concat(s.WidgetApiToWidgetAction.OpenIDCredentials),(function i(a){a.preventDefault();var l=a.detail;l.data.original_request_id===r.requestId&&(l.data.state===c.OpenIDRequestState.Allowed?(t(l.data),e.transport.reply(l,{})):l.data.state===c.OpenIDRequestState.Blocked?(n(new Error("User declined to verify their identity")),e.transport.reply(l,{})):(n(new Error("Invalid state on reply: "+o.state)),e.transport.reply(l,{error:{message:"Invalid state"}})),e.off("action:".concat(s.WidgetApiToWidgetAction.OpenIDCredentials),i))})):n(new Error("Invalid state: "+o.state))})).catch(n)}))}},{key:"updateRequestedCapabilities",value:function(){return this.transport.send(s.WidgetApiFromWidgetAction.MSC2974RenegotiateCapabilities,{capabilities:this.requestedCapabilities}).then()}},{key:"sendContentLoaded",value:function(){return this.transport.send(s.WidgetApiFromWidgetAction.ContentLoaded,{}).then()}},{key:"sendSticker",value:function(e){return this.transport.send(s.WidgetApiFromWidgetAction.SendSticker,e).then()}},{key:"setAlwaysOnScreen",value:function(e){return this.transport.send(s.WidgetApiFromWidgetAction.UpdateAlwaysOnScreen,{value:e}).then((function(e){return e.success}))}},{key:"openModalWidget",value:function(e,t){var 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]:l.MatrixWidgetType.Custom;return this.transport.send(s.WidgetApiFromWidgetAction.OpenModalWidget,{type:o,url:e,name:t,buttons:n,data:r}).then()}},{key:"closeModalWidget",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.send(s.WidgetApiFromWidgetAction.CloseModalWidget,e).then()}},{key:"sendRoomEvent",value:function(e,t){return this.transport.send(s.WidgetApiFromWidgetAction.SendEvent,{type:e,content:t})}},{key:"sendStateEvent",value:function(e,t,n){return this.transport.send(s.WidgetApiFromWidgetAction.SendEvent,{type:e,content:n,state_key:t})}},{key:"readRoomEvents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:25,n=arguments.length>2?arguments[2]:void 0;return this.transport.send(s.WidgetApiFromWidgetAction.MSC2876ReadEvents,{type:e,msgtype:n,limit:t}).then((function(e){return e.events}))}},{key:"readStateEvents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:25,n=arguments.length>2?arguments[2]:void 0;return this.transport.send(s.WidgetApiFromWidgetAction.MSC2876ReadEvents,{type:e,state_key:void 0===n||n,limit:t}).then((function(e){return e.events}))}},{key:"setModalButtonEnabled",value:function(e,t){if(e===u.BuiltInModalButtonID.Close)throw new Error("The close button cannot be disabled");return this.transport.send(s.WidgetApiFromWidgetAction.SetModalButtonEnabled,{button:e,enabled:t}).then()}},{key:"navigateTo",value:function(e){if(!e||!e.startsWith("https://matrix.to/#"))throw new Error("Invalid matrix.to URI");return this.transport.send(s.WidgetApiFromWidgetAction.MSC2931Navigate,{uri:e}).then()}},{key:"start",value:function(){var e=this;this.transport.start(),this.getClientVersions().then((function(t){t.includes(i.UnstableApiVersion.MSC2974)&&(e.supportsMSC2974Renegotiate=!0)}))}},{key:"handleMessage",value:function(e){var t=new CustomEvent("action:".concat(e.detail.action),{detail:e.detail,cancelable:!0});if(this.emit("action:".concat(e.detail.action),t),!t.defaultPrevented)switch(e.detail.action){case s.WidgetApiToWidgetAction.SupportedApiVersions:return this.replyVersions(e.detail);case s.WidgetApiToWidgetAction.Capabilities:return this.handleCapabilities(e.detail);case s.WidgetApiToWidgetAction.UpdateVisibility:case s.WidgetApiToWidgetAction.NotifyCapabilities:return this.transport.reply(e.detail,{});default:return this.transport.reply(e.detail,{error:{message:"Unknown or unsupported action: "+e.detail.action}})}}},{key:"replyVersions",value:function(e){this.transport.reply(e,{supported_versions:i.CurrentApiVersions})}},{key:"getClientVersions",value:function(){var e=this;return Array.isArray(this.cachedClientVersions)?Promise.resolve(this.cachedClientVersions):this.transport.send(s.WidgetApiFromWidgetAction.SupportedApiVersions,{}).then((function(t){return e.cachedClientVersions=t.supported_versions,t.supported_versions})).catch((function(e){return console.warn("non-fatal error getting supported client versions: ",e),[]}))}},{key:"handleCapabilities",value:function(e){var t=this;return this.capabilitiesFinished?this.transport.reply(e,{error:{message:"Capability negotiation already completed"}}):this.getClientVersions().then((function(n){return n.includes(i.UnstableApiVersion.MSC2871)?t.once("action:".concat(s.WidgetApiToWidgetAction.NotifyCapabilities),(function(e){t.approvedCapabilities=e.detail.data.approved,t.emit("ready")})):t.emit("ready"),t.capabilitiesFinished=!0,t.transport.reply(e,{capabilities:t.requestedCapabilities})}))}}])&&m(t.prototype,n),r&&m(t,r),_}(r.EventEmitter);t.WidgetApi=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientWidgetApi=void 0;var r=n(3),o=n(6),i=n(4),a=n(7),s=n(13),c=n(5),l=n(9),u=n(8),d=n(14);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(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}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(p,e);var t,n,r,h=_(p);function p(e,t,n){var r,a;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(a=h.call(this)).widget=e,a.iframe=t,a.driver=n,E(v(a),"transport",void 0),E(v(a),"capabilitiesFinished",!1),E(v(a),"allowedCapabilities",new Set),E(v(a),"allowedEvents",[]),E(v(a),"isStopped",!1),!(null===(r=t)||void 0===r?void 0:r.contentWindow))throw new Error("No iframe supplied");if(!e)throw new Error("Invalid widget");if(!n)throw new Error("Invalid driver");return a.transport=new o.PostmessageTransport(i.WidgetApiDirection.ToWidget,e.id,t.contentWindow,window),a.transport.targetOrigin=e.origin,a.transport.on("message",a.handleMessage.bind(v(a))),e.waitForIframeLoad&&t.addEventListener("load",a.onIframeLoad.bind(v(a))),a.transport.start(),a}return t=p,(n=[{key:"hasCapability",value:function(e){return this.allowedCapabilities.has(e)}},{key:"canSendRoomEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.allowedEvents.some((function(n){return n.matchesAsRoomEvent(e,t)&&n.direction===l.EventDirection.Send}))}},{key:"canSendStateEvent",value:function(e,t){return this.allowedEvents.some((function(n){return n.matchesAsStateEvent(e,t)&&n.direction===l.EventDirection.Send}))}},{key:"canReceiveRoomEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.allowedEvents.some((function(n){return n.matchesAsRoomEvent(e,t)&&n.direction===l.EventDirection.Receive}))}},{key:"canReceiveStateEvent",value:function(e,t){return this.allowedEvents.some((function(n){return n.matchesAsStateEvent(e,t)&&n.direction===l.EventDirection.Receive}))}},{key:"stop",value:function(){this.isStopped=!0,this.transport.stop()}},{key:"onIframeLoad",value:function(e){this.beginCapabilities(),this.iframe.removeEventListener("onload",this.onIframeLoad.bind(this))}},{key:"beginCapabilities",value:function(){var e,t=this;if(this.capabilitiesFinished)throw new Error("Capabilities exchange already completed");this.emit("preparing"),this.transport.send(a.WidgetApiToWidgetAction.Capabilities,{}).then((function(n){return e=n.capabilities,t.driver.validateCapabilities(new Set(n.capabilities))})).then((function(n){console.log("Widget ".concat(t.widget.id," is allowed capabilities:"),Array.from(n)),t.allowedCapabilities=n,t.allowedEvents=l.WidgetEventCapability.findEventCapabilities(n),t.capabilitiesFinished=!0,t.notifyCapabilities(e),t.emit("ready")}))}},{key:"notifyCapabilities",value:function(e){this.transport.send(a.WidgetApiToWidgetAction.NotifyCapabilities,{requested:e,approved:Array.from(this.allowedCapabilities)}).catch((function(e){console.warn("non-fatal error notifying widget of approved capabilities:",e)}))}},{key:"handleContentLoadedAction",value:function(e){this.widget.waitForIframeLoad?this.transport.reply(e,{error:{message:"Improper sequence: not expecting load event"}}):(this.transport.reply(e,{}),this.beginCapabilities())}},{key:"replyVersions",value:function(e){this.transport.reply(e,{supported_versions:c.CurrentApiVersions})}},{key:"handleCapabilitiesRenegotiate",value:function(e){var t,n=this;this.transport.reply(e,{});var r=(null===(t=e.data)||void 0===t?void 0:t.capabilities)||[],o=new Set(r.filter((function(e){return!n.hasCapability(e)})));if(0===o.size)return this.notifyCapabilities([]);this.driver.validateCapabilities(o).then((function(e){return e.forEach((function(e){return n.allowedCapabilities.add(e)})),l.WidgetEventCapability.findEventCapabilities(e).forEach((function(e){return n.allowedEvents.push(e)})),n.notifyCapabilities(Array.from(o))}))}},{key:"handleNavigate",value:function(e){var t,n,r=this;if(!this.hasCapability(s.MatrixCapabilities.MSC2931Navigate))return this.transport.reply(e,{error:{message:"Missing capability"}});if(!(null===(t=e.data)||void 0===t?void 0:t.uri)||!(null===(n=e.data)||void 0===n?void 0:n.uri.toString().startsWith("https://matrix.to/#")))return this.transport.reply(e,{error:{message:"Invalid matrix.to URI"}});var o=function(t){return console.error("[ClientWidgetApi] Failed to handle navigation: ",t),r.transport.reply(e,{error:{message:"Error handling navigation"}})};try{this.driver.navigate(e.data.uri.toString()).catch((function(e){return o(e)})).then((function(){return r.transport.reply(e,{})}))}catch(e){return o(e)}}},{key:"handleOIDC",value:function(e){var t=this,n=1,r=function(r,o){return o=o||{},n>1?t.transport.send(a.WidgetApiToWidgetAction.OpenIDCredentials,m({state:r,original_request_id:e.requestId},o)):t.transport.reply(e,m({state:r},o))},o=function(o){return console.error("[ClientWidgetApi] Failed to handle OIDC: ",o),n>1?r(u.OpenIDRequestState.Blocked):t.transport.reply(e,{error:{message:o}})},i=new d.SimpleObservable((function(e){return e.state===u.OpenIDRequestState.PendingUserConfirmation&&n>1?(i.close(),o("client provided out-of-phase response to OIDC flow")):e.state===u.OpenIDRequestState.PendingUserConfirmation?(r(e.state),void n++):e.state!==u.OpenIDRequestState.Allowed||e.token?(e.state===u.OpenIDRequestState.Blocked&&(e.token=null),i.close(),r(e.state,e.token)):o("client provided invalid OIDC token for an allowed request")}));this.driver.askOpenID(i)}},{key:"handleReadEvents",value:function(e){var t=this;if(!e.data.type)return this.transport.reply(e,{error:{message:"Invalid request - missing event type"}});if(void 0!==e.data.limit&&(!e.data.limit||e.data.limit<0))return this.transport.reply(e,{error:{message:"Invalid request - limit out of range"}});var n=e.data.limit||0,r=Promise.resolve([]);if(void 0!==e.data.state_key){var o=!0===e.data.state_key?void 0:e.data.state_key.toString();if(!this.canReceiveStateEvent(e.data.type,o))return this.transport.reply(e,{error:{message:"Cannot read state events of this type"}});r=this.driver.readStateEvents(e.data.type,o,n)}else{if(!this.canReceiveRoomEvent(e.data.type,e.data.msgtype))return this.transport.reply(e,{error:{message:"Cannot read room events of this type"}});r=this.driver.readRoomEvents(e.data.type,e.data.msgtype,n)}return r.then((function(n){return t.transport.reply(e,{events:n})}))}},{key:"handleSendEvent",value:function(e){var t,n=this;if(!e.data.type)return this.transport.reply(e,{error:{message:"Invalid request - missing event type"}});if(null!==e.data.state_key&&void 0!==e.data.state_key){if(!this.canSendStateEvent(e.data.type,e.data.state_key))return this.transport.reply(e,{error:{message:"Cannot send state events of this type"}});t=this.driver.sendEvent(e.data.type,e.data.content||{},e.data.state_key)}else{var r=e.data.content||{},o=r.msgtype;if(!this.canSendRoomEvent(e.data.type,o))return this.transport.reply(e,{error:{message:"Cannot send room events of this type"}});t=this.driver.sendEvent(e.data.type,r,null)}t.then((function(t){return n.transport.reply(e,{room_id:t.roomId,event_id:t.eventId})})).catch((function(t){return console.error("error sending event: ",t),n.transport.reply(e,{error:{message:"Error sending event"}})}))}},{key:"handleMessage",value:function(e){if(!this.isStopped){var t=new CustomEvent("action:".concat(e.detail.action),{detail:e.detail,cancelable:!0});if(this.emit("action:".concat(e.detail.action),t),!t.defaultPrevented)switch(e.detail.action){case a.WidgetApiFromWidgetAction.ContentLoaded:return this.handleContentLoadedAction(e.detail);case a.WidgetApiFromWidgetAction.SupportedApiVersions:return this.replyVersions(e.detail);case a.WidgetApiFromWidgetAction.SendEvent:return this.handleSendEvent(e.detail);case a.WidgetApiFromWidgetAction.GetOpenIDCredentials:return this.handleOIDC(e.detail);case a.WidgetApiFromWidgetAction.MSC2931Navigate:return this.handleNavigate(e.detail);case a.WidgetApiFromWidgetAction.MSC2974RenegotiateCapabilities:return this.handleCapabilitiesRenegotiate(e.detail);case a.WidgetApiFromWidgetAction.MSC2876ReadEvents:return this.handleReadEvents(e.detail);default:return this.transport.reply(e.detail,{error:{message:"Unknown or unsupported action: "+e.detail.action}})}}}},{key:"takeScreenshot",value:function(){return this.transport.send(a.WidgetApiToWidgetAction.TakeScreenshot,{})}},{key:"updateVisibility",value:function(e){return this.transport.send(a.WidgetApiToWidgetAction.UpdateVisibility,{visible:e})}},{key:"sendWidgetConfig",value:function(e){return this.transport.send(a.WidgetApiToWidgetAction.WidgetConfig,e).then()}},{key:"notifyModalWidgetButtonClicked",value:function(e){return this.transport.send(a.WidgetApiToWidgetAction.ButtonClicked,{id:e}).then()}},{key:"notifyModalWidgetClose",value:function(e){return this.transport.send(a.WidgetApiToWidgetAction.CloseModalWidget,e).then()}},{key:"feedEvent",value:function(e){if(void 0!==e.state_key&&null!==e.state_key){if(!this.canReceiveStateEvent(e.type,e.state_key))return Promise.resolve()}else if(!this.canReceiveRoomEvent(e.type,(e.content||{}).msgtype))return Promise.resolve();return this.transport.send(a.WidgetApiToWidgetAction.SendEvent,e).then()}}])&&g(t.prototype,n),r&&g(t,r),p}(r.EventEmitter);t.ClientWidgetApi=S},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErrorResponse=function(e){if("error"in e){return!!e.error.message}return!1}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetKind=void 0,t.WidgetKind=r,function(e){e.Room="room",e.Account="account",e.Modal="modal"}(r||(t.WidgetKind=r={}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModalButtonKind=void 0,t.ModalButtonKind=r,function(e){e.Primary="m.primary",e.Secondary="m.secondary",e.Warning="m.warning",e.Danger="m.danger",e.Link="m.link"}(r||(t.ModalButtonKind=r={}))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetParser=void 0;var r=n(17),o=n(15);function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return a(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 a(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,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw i}}}}function a(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 s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,a;return t=e,a=[{key:"parseAccountData",value:function(t){if(!t)return[];for(var n=[],r=0,o=Object.keys(t);r<o.length;r++){var i=o[r],a=t[i];if(a&&("m.widget"===a.type||"im.vector.modular.widgets"===a.type)&&a.sender&&(a.state_key||a.id)===i){var s={content:a.content,sender:a.sender,type:"m.widget",state_key:i,event_id:"$example",room_id:"!example",origin_server_ts:1},c=e.parseRoomWidget(s);c&&n.push(c)}}return n}},{key:"parseWidgetsFromRoomState",value:function(t){if(!t)return[];var n,r=[],o=i(t);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=e.parseRoomWidget(a);s&&r.push(s)}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"parseRoomWidget",value:function(t){if(!t)return null;if("m.widget"!==t.type&&"im.vector.modular.widgets"!==t.type)return null;var n=t.content||{},r={id:t.state_key,creatorUserId:n.creatorUserId||t.sender,name:n.name,type:n.type,url:n.url,waitForIframeLoad:n.waitForIframeLoad,data:n.data};return e.processEstimatedWidget(r)}},{key:"processEstimatedWidget",value:function(e){return e.id&&e.creatorUserId&&e.type&&(0,o.isValidUrl)(e.url)?new r.Widget(e):null}}],(n=null)&&s(t.prototype,n),a&&s(t,a),e}();t.WidgetParser=c},function(e,t,n){"use strict";function r(e){return null==e?"".concat(e):e.toString()}Object.defineProperty(t,"__esModule",{value:!0}),t.runTemplate=function(e,t,n){for(var o=Object.assign({},t.data,{matrix_room_id:n.widgetRoomId||"",matrix_user_id:n.currentUserId,matrix_display_name:n.userDisplayName||n.currentUserId,matrix_avatar_url:n.userHttpAvatarUrl||"",matrix_widget_id:t.id,"org.matrix.msc2873.client_id":n.clientId||"","org.matrix.msc2873.client_theme":n.clientTheme||"","org.matrix.msc2873.client_language":n.clientLanguage||""}),i=e,a=0,s=Object.keys(o);a<s.length;a++){var c=s[a],l="$".concat(c).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=new RegExp(l,"g");i=i.replace(u,encodeURIComponent(r(o[c])))}return i},t.toString=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetDriver=void 0;var r=n(0);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"validateCapabilities",value:function(e){return Promise.resolve(new Set)}},{key:"sendEvent",value:function(e,t){return Promise.reject(new Error("Failed to override function"))}},{key:"readRoomEvents",value:function(e,t,n){return Promise.resolve([])}},{key:"readStateEvents",value:function(e,t,n){return Promise.resolve([])}},{key:"askOpenID",value:function(e){e.update({state:r.OpenIDRequestState.Blocked})}},{key:"navigate",value:function(e){throw new Error("Navigation is not implemented")}}])&&o(t.prototype,n),i&&o(t,i),e}();t.WidgetDriver=i},,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";e.exports=n(899)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"h",(function(){return m})),n.d(t,"g",(function(){return g})),n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return _})),n.d(t,"j",(function(){return b})),n.d(t,"k",(function(){return y})),n.d(t,"c",(function(){return E})),n.d(t,"e",(function(){return S})),n.d(t,"f",(function(){return w})),n.d(t,"d",(function(){return T})),n.d(t,"i",(function(){return x}));var r=n(10),o=n.n(r),i=n(904),a=n.n(i),s=n(78),c=n.n(s),l=n(84),u=n(111),d=n(1411),h=n(98),p=n(314);function m(e){const t=new Error(e);return t.translatedMessage=_(e),t}function g(){const e=l.b.getValue("language",null,!0);return e||C(S()[0])}function f(e){return e}function _(e,t,n){const r=function(e,t,n){let r=e;if(void 0!==t){const e={};for(const n in t)e[`%\\(${n}\\)s`]=t[n];r=v(r,e)}if(void 0!==n){const e={};for(const t in n)e[`(<${t}>(.*?)<\\/${t}>|<${t}>|<${t}\\s*\\/>)`]=n[t];r=v(r,e)}return r}(function(e,t){let n;t&&"object"==typeof t&&(n=t.count,Object.keys(t).forEach(e=>{void 0===t[e]&&(console.warn("safeCounterpartTranslate called with undefined interpolation name: "+e),t[e]="undefined"),null===t[e]&&(console.warn("safeCounterpartTranslate called with null interpolation name: "+e),t[e]="null")}));let r=a.a.translate(e,t);return void 0===r&&void 0!==n&&(r=a.a.translate(e,Object.assign({},t,{locale:"en"}))),r}(e,Object.assign({interpolate:!1},t)),t,n);return r}function b(e){return e.replace(/%\(([^)]*)\)/g,"% ($1)")}function v(e,t){const n=[e];let r=!1;for(const o in t){const i=new RegExp(o,"g");let a=!1;for(let e=0;e<n.length;e++){const s=n[e];if("string"!=typeof s)continue;let c=i.exec(s);if(!c)continue;a=!0;const l=s.substr(0,c.index),u=[];let d;for(;c;){d=c;const e=c.slice(2);let n,a;if(n=t[o]instanceof Function?t[o](...e):t[o],"object"==typeof n&&(r=!0),"string"==typeof n&&""===n||u.push(n),c=i.exec(s),c){const e=d.index+d[0].length;a=s.substr(e,c.index-e)}else a=s.substr(d.index+d[0].length);a&&u.push(a)}n.splice(e,1,...u),""!==l&&n.splice(e,0,l)}a||"%\\(count\\)s"!==o&&console.log(`Could not find ${i} in ${e}`)}return r?c.a.createElement("span",null,...n):n.join("")}function y(e){Array.isArray(e)||(e=[e]);const t=u.a.get();let n,r;return t&&t.setLanguage(e),k().then(t=>{r=t;for(let t=0;t<e.length;++t)if(r.hasOwnProperty(e[t])){n=e[t];break}return n||(n="en",console.error("Unable to find an appropriate language")),F("i18n/"+r[n].fileName)}).then(e=>{if(a.a.registerTranslations(n,e),a.a.setLocale(n),l.b.setValue("language",null,h.a.DEVICE,n),console.log("set language to "+n),"en"!==n)return F("i18n/"+r.en.fileName)}).then(e=>{e&&a.a.registerTranslations("en",e)})}function E(){return k().then(e=>{const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push({value:n,label:e[n].label});return t})}function S(){return navigator.languages&&navigator.languages.length?navigator.languages:navigator.language?[navigator.language]:[navigator.userLanguage||"en"]}function w(e){const t=[],n=C(e),r=n.split("-");return 2===r.length&&r[0]===r[1]?t.push(r[0]):(t.push(n),2===r.length&&t.push(r[0])),t}function C(e){return e.toLowerCase().replace("_","-")}function T(){return a.a.getLocale()}function x(e){const t=T(),n=e.map(C);{const r=n.indexOf(t);if(r>-1)return e[r]}{const r=n.findIndex(e=>e.substr(0,2)===t.substr(0,2));if(r>-1)return e[r]}{const t=n.findIndex(e=>e.startsWith("en"));if(t>-1)return e[t]}return e[0]}function k(){return new Promise((e,t)=>{let n;n="string"==typeof d.a?d.a:"i18n/languages.json",o()({method:"GET",url:n},(r,o,i)=>{r?t(r):o.status<200||o.status>=300?t(new Error(`Failed to load ${n}, got ${o.status}`)):e(JSON.parse(i))})})}async function F(e,t=3){return Object(p.a)(()=>function(e){return new Promise((t,n)=>{o()({method:"GET",url:e},(r,o,i)=>{r?n(r):o.status<200||o.status>=300?n(new Error(`Failed to load ${e}, got ${o.status}`)):t(function(e){const t={};for(const n of Object.keys(e)){const r=n.split("|",2);if(2===r.length){let o=t[r[0]];void 0===o&&(o={},t[r[0]]=o),o[r[1]]=e[n]}else t[n]=e[n]}return t}(JSON.parse(i)))})})}(e),t,t=>(console.log("Failed to load i18n",e),console.error(t),!0))}a.a.setSeparator("|"),a.a.setFallbackLocale("en")},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(89);function o(e,t){return()=>r.getComponent(e)||t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));var r=n(79),o=n.n(r),i=n(134),a=n(257),s=n(2),c=n(152),l=n(366),u=n(89),d=n(549),h=n(84),p=n(83);function m(e,t,n){return{action:"MatrixActions.sync",state:t,prevState:n,matrixClient:e}}function g(e,t){return{action:"MatrixActions.accountData",event:t,event_type:t.getType(),event_content:t.getContent()}}function f(e,t,n){return{action:"MatrixActions.Room.accountData",event:t,event_type:t.getType(),event_content:t.getContent(),room:n}}function _(e,t){return{action:"MatrixActions.Room",room:t}}function b(e,t,n){return{action:"MatrixActions.Room.tags",room:n}}function v(e,t,n){return{action:"MatrixActions.Room.receipt",event:t,room:n,matrixClient:e}}function y(e,t,n,r,o,i){return{action:"MatrixActions.Room.timeline",event:t,isLiveEvent:i.liveEvent,isLiveUnfilteredRoomTimelineEvent:n&&i.timeline.getTimelineSet()===n.getUnfilteredTimelineSet()}}function E(e,t,n,r){return{action:"MatrixActions.Room.myMembership",room:t,membership:n,oldMembership:r}}function S(e,t){return{action:"MatrixActions.Event.decrypted",event:t}}let w=[];function C(e,t,n){const r=(...t)=>{const r=n(e,...t);r&&p.a.dispatch(r,!0)};e.on(t,r),w.push(()=>{e.removeListener(t,r)})}var T={start(e){C(e,"sync",m),C(e,"accountData",g),C(e,"Room.accountData",f),C(e,"Room",_),C(e,"Room.tags",b),C(e,"Room.receipt",v),C(e,"Room.timeline",y),C(e,"Room.myMembership",E),C(e,"Event.decrypted",S)},stop(){w.forEach(e=>e()),w=[]}},x=n(87),k=n(296),F=n(358),O=n(339),R=n(195),D=n(177),I=n(300),A=n(210);class N{constructor(){o()(this,"opts",{initialSyncLimit:20}),o()(this,"matrixClient",null),o()(this,"justRegisteredUserId",void 0),o()(this,"currentClientCreds",void 0)}get(){return this.matrixClient}unset(){this.matrixClient=null,T.stop()}setJustRegisteredUserId(e){this.justRegisteredUserId=e,e&&window.localStorage.setItem("mx_registration_time",String((new Date).getTime()))}currentUserIsJustRegistered(){return this.matrixClient&&this.matrixClient.credentials.userId===this.justRegisteredUserId}userRegisteredWithinLastHours(e){try{const t=new Date(window.localStorage.getItem("mx_registration_time"));return((new Date).getTime()-t.getTime())/36e5<=e}catch(e){return!1}}replaceUsingCreds(e){this.currentClientCreds=e,this.createClient(e)}async assign(){for(const e of["indexeddb","memory"])try{const e=this.matrixClient.store.startup();console.log("MatrixClientPeg: waiting for MatrixClient store to initialise"),await e;break}catch(t){if("indexeddb"!==e)throw console.error("Failed to start memory store!",t),t;console.error("Error starting matrixclient store - falling back to memory store",t),this.matrixClient.store=new a.a({localStorage:localStorage})}O.f(this.matrixClient);try{!h.b.getValue("lowBandwidth")&&this.matrixClient.initCrypto&&(await this.matrixClient.initCrypto(),this.matrixClient.setCryptoTrustCrossSignedDevices(!h.b.getValue("e2ee.manuallyVerifyAllSessions")),await Object(D.f)(this.matrixClient),O.e(!0))}catch(e){if(e&&"InvalidCryptoStoreError"===e.name){const e=u.getComponent("views.dialogs.CryptoStoreTooNewDialog");x.a.createDialog(e)}console.warn("Unable to initialise e2e",e)}const e=s.j(this.opts);return e.pendingEventOrdering=i.PendingEventOrdering.Detached,e.lazyLoadMembers=!0,e.clientWellKnownPollPeriod=7200,T.start(this.matrixClient),F.a.matrixClient=this.matrixClient,e}async start(){const e=await this.assign();console.log("MatrixClientPeg: really starting MatrixClient"),await this.get().startClient(e),console.log("MatrixClientPeg: MatrixClient started")}getCredentials(){return{homeserverUrl:this.matrixClient.baseUrl,identityServerUrl:this.matrixClient.idBaseUrl,userId:this.matrixClient.credentials.userId,deviceId:this.matrixClient.getDeviceId(),accessToken:this.matrixClient.getAccessToken(),guest:this.matrixClient.isGuest()}}getHomeserverName(){const e=/^@[^:]+:(.+)$/.exec(this.matrixClient.credentials.userId);if(null===e||e.length<1)throw new Error("Failed to derive homeserver name from user ID!");return e[1]}createClient(e){const t={baseUrl:e.homeserverUrl,idBaseUrl:e.identityServerUrl,accessToken:e.accessToken,userId:e.userId,deviceId:e.deviceId,pickleKey:e.pickleKey,timelineSupport:!0,forceTURN:!h.b.getValue("webRtcAllowPeerToPeer"),fallbackICEServerAllowed:!!h.b.getValue("fallbackICEServerAllowed"),iceCandidatePoolSize:20,verificationMethods:[k.d.SAS,I.d,k.d.RECIPROCATE_QR_CODE],unstableClientRelationAggregation:!0,identityServer:new R.a,cryptoCallbacks:{}};Object.assign(t.cryptoCallbacks,D.c),A.a.getDehydrationKey&&(t.cryptoCallbacks.getDehydrationKey=A.a.getDehydrationKey),this.matrixClient=Object(d.a)(t),this.matrixClient.setMaxListeners(500),this.matrixClient.setGuest(Boolean(e.guest));const n=new l.a(null,{timelineSupport:!0});n.getLiveTimeline().setPaginationToken("",c.b.BACKWARDS),this.matrixClient.setNotifTimelineSet(n)}}window.mxMatrixClientPeg||(window.mxMatrixClientPeg=new N);const M=window.mxMatrixClientPeg},function(e,t,n){"use strict";(function(e){var r=n(944),o=n(381);class i extends r.Dispatcher{dispatch(e,t=!1){e instanceof o.a?e.fn(e=>{this.dispatch(e,t)}):t?super.dispatch(e):setTimeout(super.dispatch.bind(this,e),0)}fire(e,t=!1){this.dispatch({action:e},t)}}const a=new i,s=e;s.mxDispatcher||(s.mxDispatcher=a),t.a=a}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return I})),n.d(t,"b",(function(){return A}));var r=n(79),o=n.n(r),i=n(228),a=n(82),s=n(98),c=n(140);class l extends i.a{constructor(e,t){super(),this.featureNames=e,this.watchers=t}getValue(e,t){if(this.featureNames.includes(e))return this.readFeature(e);if("notificationsEnabled"===e){const e=localStorage.getItem("notifications_enabled");return"string"==typeof e?"true"===e:null}if("notificationBodyEnabled"===e){const e=localStorage.getItem("notifications_body_enabled");return"string"==typeof e?"true"===e:null}if("audioNotificationsEnabled"===e){const e=localStorage.getItem("audio_notifications_enabled");return"string"==typeof e?"true"===e:null}if(["showRightPanelInRoom","showRightPanelInGroup","lastRightPanelPhaseForRoom","lastRightPanelPhaseForGroup"].includes(e)){return JSON.parse(localStorage.getItem("mx_"+e)||"{}").value}if("layout"===e){const t=this.getSettings()||{};return t.useIRCLayout?c.a.IRC:t[e]}return(this.getSettings()||{})[e]}setValue(e,t,n){if(this.featureNames.includes(e))return this.writeFeature(e,n),Promise.resolve();if("notificationsEnabled"===e)return localStorage.setItem("notifications_enabled",n),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve();if("notificationBodyEnabled"===e)return localStorage.setItem("notifications_body_enabled",n),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve();if("audioNotificationsEnabled"===e)return localStorage.setItem("audio_notifications_enabled",n),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve();if(["showRightPanelInRoom","showRightPanelInGroup","lastRightPanelPhaseForRoom","lastRightPanelPhaseForGroup"].includes(e))return localStorage.setItem("mx_"+e,JSON.stringify({value:n})),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve();if("layout"===e){const t=this.getSettings()||{};return delete t.useIRCLayout,t.layout=n,localStorage.setItem("mx_local_settings",JSON.stringify(t)),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve()}const r=this.getSettings()||{};return r[e]=n,localStorage.setItem("mx_local_settings",JSON.stringify(r)),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve()}canSetValue(e,t){return!0}isSupported(){return void 0!==localStorage&&null!==localStorage}watchSetting(e,t,n){this.watchers.watchSetting(e,t,n)}unwatchSetting(e){this.watchers.unwatchSetting(e)}getSettings(){const e=localStorage.getItem("mx_local_settings");return e?JSON.parse(e):null}readFeature(e){if(a.a.get()&&a.a.get().isGuest())return!1;const t=localStorage.getItem("mx_labs_feature_"+e);return"true"===t||"false"!==t&&null}writeFeature(e,t){localStorage.setItem("mx_labs_feature_"+e,""+t),this.watchers.notifyUpdate(e,null,s.a.DEVICE,t)}}class u extends i.a{constructor(e){super(),this.watchers=e}getValue(e,t){if("blacklistUnverifiedDevices"===e){const e=this.read("mx_local_settings");if(e&&e.blacklistUnverifiedDevicesPerRoom)return e.blacklistUnverifiedDevicesPerRoom[t]}const n=this.read(this.getKey(e,t));return n?n.value:null}setValue(e,t,n){if("blacklistUnverifiedDevices"===e){let r=this.read("mx_local_settings");return r||(r={}),r.blacklistUnverifiedDevicesPerRoom||(r.blacklistUnverifiedDevicesPerRoom={}),r.blacklistUnverifiedDevicesPerRoom[t]=n,localStorage.setItem("mx_local_settings",JSON.stringify(r)),this.watchers.notifyUpdate(e,t,s.a.ROOM_DEVICE,n),Promise.resolve()}return null===n?localStorage.removeItem(this.getKey(e,t)):(n=JSON.stringify({value:n}),localStorage.setItem(this.getKey(e,t),n)),this.watchers.notifyUpdate(e,t,s.a.ROOM_DEVICE,n),Promise.resolve()}canSetValue(e,t){return!0}isSupported(){return void 0!==localStorage&&null!==localStorage}read(e){const t=localStorage.getItem(e);return t?JSON.parse(t):null}getKey(e,t){return"mx_setting_"+e+"_"+t}}class d extends i.a{constructor(e,t){super(),this.defaults=e,this.invertedDefaults=t}getValue(e,t){let n=this.defaults[e];return void 0===n&&(n=this.invertedDefaults[e]),n}async setValue(e,t,n){throw new Error("Cannot set values on the default level handler")}canSetValue(e,t){return!1}isSupported(){return!0}}var h=n(358),p=n(129);class m extends h.a{constructor(e){super(),this.watchers=e,o()(this,"onAccountData",(e,t,n)=>{const r=t.roomId;if("org.matrix.room.preview_urls"===e.getType()){let t=e.getContent().disable;t="boolean"!=typeof t?null:!t,this.watchers.notifyUpdate("urlPreviewsEnabled",r,s.a.ROOM_ACCOUNT,t)}else if("im.vector.web.settings"===e.getType()){const t=n?n.getContent():{},o=Object(p.e)(t,e.getContent());for(const t of o){const n=e.getContent()[t];this.watchers.notifyUpdate(t,r,s.a.ROOM_ACCOUNT,n)}}else"im.vector.setting.allowed_widgets"===e.getType()&&this.watchers.notifyUpdate("allowedWidgets",r,s.a.ROOM_ACCOUNT,e.getContent())})}initMatrixClient(e,t){e&&e.removeListener("Room.accountData",this.onAccountData),t.on("Room.accountData",this.onAccountData)}getValue(e,t){if("urlPreviewsEnabled"===e){const e=this.getSettings(t,"org.matrix.room.preview_urls")||{};return"boolean"!=typeof e.disable?null:!e.disable}if("allowedWidgets"===e)return this.getSettings(t,"im.vector.setting.allowed_widgets");return(this.getSettings(t)||{})[e]}async setValue(e,t,n){if("urlPreviewsEnabled"===e){const e=this.getSettings(t,"org.matrix.room.preview_urls")||{};return e.disable=!n,void await a.a.get().setRoomAccountData(t,"org.matrix.room.preview_urls",e)}if("allowedWidgets"===e)return void await a.a.get().setRoomAccountData(t,"im.vector.setting.allowed_widgets",n);const r=this.getSettings(t)||{};r[e]=n,await a.a.get().setRoomAccountData(t,"im.vector.web.settings",r)}canSetValue(e,t){const n=a.a.get().getRoom(t);return null!=n}isSupported(){const e=a.a.get();return null!=e&&!e.isGuest()}getSettings(e,t="im.vector.web.settings"){const n=a.a.get().getRoom(e);if(!n)return null;const r=n.getAccountData(t);return r&&r.getContent()?Object(p.a)(r.getContent()):null}}const g=["im.vector.riot.breadcrumb_rooms","im.vector.setting.breadcrumbs"];class f extends h.a{constructor(e){super(),this.watchers=e,o()(this,"onAccountData",(e,t)=>{if("org.matrix.preview_urls"===e.getType()){let t=e.getContent().disable;t="boolean"!=typeof t?null:!t,this.watchers.notifyUpdate("urlPreviewsEnabled",null,s.a.ACCOUNT,t)}else if("im.vector.web.settings"===e.getType()){const n=t?t.getContent():{},r=Object(p.e)(n,e.getContent());for(const t of r){const n=e.getContent()[t];this.watchers.notifyUpdate(t,null,s.a.ACCOUNT,n)}}else if(g.includes(e.getType()))this.notifyBreadcrumbsUpdate(e);else if("im.vector.setting.integration_provisioning"===e.getType()){const t=e.getContent().enabled;this.watchers.notifyUpdate("integrationProvisioning",null,s.a.ACCOUNT,t)}else if("io.element.recent_emoji"===e.getType()){const t=e.getContent().enabled;this.watchers.notifyUpdate("recent_emoji",null,s.a.ACCOUNT,t)}})}initMatrixClient(e,t){e&&e.removeListener("accountData",this.onAccountData),t.on("accountData",this.onAccountData)}getValue(e,t){if("urlPreviewsEnabled"===e){const e=this.getSettings("org.matrix.preview_urls")||{};return"boolean"!=typeof e.disable?null:!e.disable}if("breadcrumb_rooms"===e){let e=this.getSettings("im.vector.setting.breadcrumbs");return e&&e.recent_rooms||(e=this.getSettings("im.vector.riot.breadcrumb_rooms"),e&&(e.recent_rooms=e.rooms)),e&&e.recent_rooms?e.recent_rooms:[]}if("recent_emoji"===e){const e=this.getSettings("io.element.recent_emoji");return e?e.recent_emoji:null}if("integrationProvisioning"===e){const e=this.getSettings("im.vector.setting.integration_provisioning");return e?e.enabled:null}const n=this.getSettings()||{};let r=n[e];return null==r&&("hideAvatarChanges"!==e&&"hideDisplaynameChanges"!==e||(r=n.hideAvatarDisplaynameChanges)),r}async setValue(e,t,n){if("urlPreviewsEnabled"===e){const e=this.getSettings("org.matrix.preview_urls")||{};return e.disable=!n,void await a.a.get().setAccountData("org.matrix.preview_urls",e)}if("breadcrumb_rooms"===e){let e=this.getSettings("im.vector.setting.breadcrumbs");return e&&e.recent_rooms||(e=this.getSettings("im.vector.riot.breadcrumb_rooms")),e||(e={}),e.recent_rooms=n,void await a.a.get().setAccountData("im.vector.setting.breadcrumbs",e)}if("recent_emoji"===e){const e=this.getSettings("io.element.recent_emoji")||{};return e.recent_emoji=n,void await a.a.get().setAccountData("io.element.recent_emoji",e)}if("integrationProvisioning"===e){const e=this.getSettings("im.vector.setting.integration_provisioning")||{};return e.enabled=n,void await a.a.get().setAccountData("im.vector.setting.integration_provisioning",e)}const r=this.getSettings()||{};r[e]=n,await a.a.get().setAccountData("im.vector.web.settings",r)}canSetValue(e,t){return!0}isSupported(){const e=a.a.get();return null!=e&&!e.isGuest()}getSettings(e="im.vector.web.settings"){const t=a.a.get();if(!t)return null;const n=t.getAccountData(e);return n&&n.getContent()?Object(p.a)(n.getContent()):null}notifyBreadcrumbsUpdate(e){let t=[];if("im.vector.riot.breadcrumb_rooms"===e.getType()){const n=this.getSettings("im.vector.setting.breadcrumbs");t=n?n.recent_rooms:e.getContent().rooms}else{if("im.vector.setting.breadcrumbs"!==e.getType())return;t=e.getContent().recent_rooms}this.watchers.notifyUpdate("breadcrumb_rooms",null,s.a.ACCOUNT,t||[])}}class _ extends h.a{constructor(e){super(),this.watchers=e,o()(this,"onEvent",(e,t,n)=>{const r=e.getRoomId(),o=this.client.getRoom(r);if(o&&(!o||t===o.currentState))if("org.matrix.room.preview_urls"===e.getType()){let t=e.getContent().disable;t="boolean"!=typeof t?null:!t,this.watchers.notifyUpdate("urlPreviewsEnabled",r,s.a.ROOM,t)}else if("im.vector.web.settings"===e.getType()){const t=n?n.getContent():{},o=Object(p.e)(t,e.getContent());for(const t of o)this.watchers.notifyUpdate(t,r,s.a.ROOM,e.getContent()[t])}})}initMatrixClient(e,t){e&&e.removeListener("RoomState.events",this.onEvent),t.on("RoomState.events",this.onEvent)}getValue(e,t){if("urlPreviewsEnabled"===e){const e=this.getSettings(t,"org.matrix.room.preview_urls")||{};return"boolean"!=typeof e.disable?null:!e.disable}return(this.getSettings(t)||{})[e]}async setValue(e,t,n){if("urlPreviewsEnabled"===e){const e=this.getSettings(t,"org.matrix.room.preview_urls")||{};return e.disable=!n,void await a.a.get().sendStateEvent(t,"org.matrix.room.preview_urls",e)}const r=this.getSettings(t)||{};r[e]=n,await a.a.get().sendStateEvent(t,"im.vector.web.settings",r,"")}canSetValue(e,t){const n=a.a.get(),r=n.getRoom(t);let o="im.vector.web.settings";return"urlPreviewsEnabled"===e&&(o="org.matrix.room.preview_urls"),!!r&&r.currentState.maySendStateEvent(o,n.getUserId())}isSupported(){const e=a.a.get();return null!=e}getSettings(e,t="im.vector.web.settings"){const n=a.a.get().getRoom(e);if(!n)return null;const r=n.currentState.getStateEvents(t,"");return r&&r.getContent()?Object(p.a)(r.getContent()):null}}var b=n(90),v=n(2);class y extends i.a{constructor(e){super(),this.featureNames=e}getValue(e,t){const n=b.a.get()||{};if(this.featureNames.includes(e)){const t=(n.features||{})[e];return Object(v.v)(t)?null:!0===t||!1===t?t:"enable"===t||"disable"!==t&&null}if("theme"===e)return n.default_theme;const r=n.settingDefaults;return!r||Object(v.v)(r[e])?null:r[e]}async setValue(e,t,n){throw new Error("Cannot change settings at the config level")}canSetValue(e,t){return!1}isSupported(){return!0}}var E=n(80),S=n(83),w=n(870);class C extends i.a{constructor(e){super(),this.handler=e,o()(this,"cache",{})}getValue(e,t){const n=t||"UNDEFINED",r=this.cache[e];return r&&r.hasOwnProperty(n)?r[n]:this.handler.getValue(e,t)}setValue(e,t,n){this.cache[e]||(this.cache[e]={});const r=this.cache[e],o=t||"UNDEFINED";r[o]=n;const i=this.handler.setValue(e,t,n);return Promise.resolve(i).finally(()=>{delete r[o]})}canSetValue(e,t){return this.handler.canSetValue(e,t)}isSupported(){return this.handler.isSupported()}}const T=Symbol("irrelevant-room");var x=n(91);const k=new class{constructor(){o()(this,"watchers",new Map)}watchSetting(e,t,n){this.watchers.has(e)||this.watchers.set(e,new Map),this.watchers.get(e).has(t)||this.watchers.get(e).set(t,[]),this.watchers.get(e).get(t).push(n)}unwatchSetting(e){this.watchers.forEach(t=>{t.forEach(t=>{let n;for(;-1!==(n=t.indexOf(e));)t.splice(n,1)})})}notifyUpdate(e,t,n,r){if(!this.watchers.has(e))return;const o=this.watchers.get(e),i=[];null!==t&&o.has(t)&&i.push(...o.get(t)),t?o.has(T)&&i.push(...o.get(T)):i.push(...Array.from(o.values()).flat(1));for(const e of i)e(t,n,r)}},F={},O={},R=[];for(const e of Object.keys(w.a))F[e]=w.a[e].default,w.a[e].isFeature&&R.push(e),w.a[e].invertedSettingName&&(O[w.a[e].invertedSettingName]=!w.a[e].default);const D={[s.a.DEVICE]:new l(R,k),[s.a.ROOM_DEVICE]:new u(k),[s.a.ROOM_ACCOUNT]:new m(k),[s.a.ACCOUNT]:new f(k),[s.a.ROOM]:new _(k),[s.a.CONFIG]:new y(R),[s.a.DEFAULT]:new d(F,O)};for(const e of Object.keys(D))D[e]=new C(D[e]);const I=[s.a.DEVICE,s.a.ROOM_DEVICE,s.a.ROOM_ACCOUNT,s.a.ACCOUNT,s.a.ROOM,s.a.CONFIG,s.a.DEFAULT];class A{static getFeatureSettingNames(){return Object.keys(w.a).filter(e=>A.isFeature(e))}static watchSetting(e,t,n){const r=w.a[e],o=e;if(!r)throw new Error(e+" is not a setting");r.invertedSettingName&&(e=r.invertedSettingName);const i=`${(new Date).getTime()}_${A.watcherCount++}_${e}_${t}`,a=(e,t,r)=>{const i=A.getValue(o);n(o,e,t,r,i)};return A.watchers.set(i,a),k.watchSetting(e,t,a),i}static unwatchSetting(e){A.watchers.has(e)?(k.unwatchSetting(A.watchers.get(e)),A.watchers.delete(e)):console.warn("Ending non-existent watcher ID "+e)}static monitorSetting(e,t){t=t||null,this.monitors.has(e)||this.monitors.set(e,new Map);const n=()=>{this.monitors.get(e).set(t,A.watchSetting(e,t,(e,t,n,r,o)=>{S.a.dispatch({action:x.a.SettingUpdated,settingName:e,roomId:t,level:n,newValueAtLevel:r,newValue:o})}))},r=Array.from(this.monitors.get(e).keys());r.find(e=>e===t||null===e)?null===t&&(r.forEach(t=>{A.unwatchSetting(this.monitors.get(e).get(t))}),this.monitors.get(e).clear(),n()):n()}static getDisplayName(e,t=s.a.DEFAULT){if(!w.a[e]||!w.a[e].displayName)return null;let n=w.a[e].displayName;return n instanceof Object&&(n=n[t]?n[t]:n.default),Object(E.a)(n)}static getDescription(e){var t;return null!==(t=w.a[e])&&void 0!==t&&t.description?Object(E.a)(w.a[e].description):null}static isFeature(e){return!!w.a[e]&&w.a[e].isFeature}static getBetaInfo(e){var t;if(A.isFeature(e)&&!1!==A.getValueAt(s.a.CONFIG,e,null,!0,!0))return null===(t=w.a[e])||void 0===t?void 0:t.betaInfo}static isEnabled(e){return!!w.a[e]&&(!w.a[e].controller||!w.a[e].controller.settingDisabled)}static getValue(e,t=null,n=!1){if(!w.a[e])throw new Error("Setting '"+e+"' does not appear to be a setting.");const r=w.a[e],o=r.supportedLevelsAreOrdered?r.supportedLevels:I;return A.getValueAt(o[0],e,t,!1,n)}static getValueAt(e,t,n=null,r=!1,o=!1){const i=w.a[t];if(!i)throw new Error("Setting '"+t+"' does not appear to be a setting.");const a=i.supportedLevelsAreOrdered?i.supportedLevels:I;a.includes(s.a.DEFAULT)||a.push(s.a.DEFAULT);const c=a.indexOf(e);if(-1===c)throw new Error("Level "+e+" is not prioritized");const l=A.getHandlers(t);if(i.invertedSettingName&&(t=i.invertedSettingName),r){const r=l[e];if(!r)return A.getFinalValue(i,e,n,null,null);const o=r.getValue(t,n);return A.getFinalValue(i,e,n,o,e)}for(let r=c;r<a.length;r++){const s=l[a[r]];if(!s)continue;if(o&&"default"===a[r])continue;const c=s.getValue(t,n);if(null!=c)return A.getFinalValue(i,e,n,c,a[r])}return A.getFinalValue(i,e,n,null,null)}static getDefaultValue(e){if(!w.a[e])throw new Error("Setting '"+e+"' does not appear to be a setting.");return w.a[e].default}static getFinalValue(e,t,n,r,o){let i=r;if(e.controller){const a=e.controller.getValueOverride(t,n,r,o);null!=a&&(i=a)}return e.invertedSettingName&&(i=!i),i}static async setValue(e,t,n,r){const o=w.a[e];if(!o)throw new Error("Setting '"+e+"' does not appear to be a setting.");const i=A.getHandler(e,n);if(!i)throw new Error("Setting "+e+" does not have a handler for "+n);if(o.invertedSettingName&&(e=o.invertedSettingName,r=!r),!i.canSetValue(e,t))throw new Error("User cannot set "+e+" at "+n+" in "+t);await i.setValue(e,t,r);const a=o.controller;a&&a.onChange(n,t,r)}static canSetValue(e,t,n){var r;if(!w.a[e])throw new Error("Setting '"+e+"' does not appear to be a setting.");if(A.isFeature(e)&&(null===(r=w.a[e])||void 0===r||!r.betaInfo)){const n=A.getValueAt(s.a.CONFIG,e,t,!0,!0);if(!0===n||!1===n)return!1}const o=A.getHandler(e,n);return!!o&&o.canSetValue(e,t)}static isLevelSupported(e){return!!D[e]&&D[e].isSupported()}static firstSupportedLevel(e){const t=w.a[e];if(!t)throw new Error("Setting '"+e+"' does not appear to be a setting.");const n=t.supportedLevelsAreOrdered?t.supportedLevels:I;n.includes(s.a.DEFAULT)||n.push(s.a.DEFAULT);const r=A.getHandlers(e);for(const e of n){if(r[e])return e}return null}static debugSetting(e,t){console.log("--- DEBUG "+e);const n=w.a[e];console.log("--- definition: "+(n?JSON.stringify(n):"<NOT_FOUND>")),console.log("--- default level order: "+JSON.stringify(I)),console.log("--- registered handlers: "+JSON.stringify(Object.keys(D)));const r=e=>{for(const n of Object.keys(D)){const r=D[n];try{const o=r.getValue(e,t);console.log(`--- ${n}@${t||"<no_room>"} = ${JSON.stringify(o)}`)}catch(e){console.log(`--- ${r}@${t||"<no_room>"} THREW ERROR: ${e.message}`),console.error(e)}if(t)try{const t=r.getValue(e,null);console.log(`--- ${n}@<no_room> = ${JSON.stringify(t)}`)}catch(e){console.log(`--- ${r}@<no_room> THREW ERROR: ${e.message}`),console.error(e)}}console.log("--- calculating as returned by SettingsStore"),console.log("--- these might not match if the setting uses a controller - be warned!");try{const n=A.getValue(e,t);console.log(`--- SettingsStore#generic@${t||"<no_room>"} = ${JSON.stringify(n)}`)}catch(e){console.log(`--- SettingsStore#generic@${t||"<no_room>"} THREW ERROR: ${e.message}`),console.error(e)}if(t)try{const t=A.getValue(e,null);console.log("--- SettingsStore#generic@<no_room> = "+JSON.stringify(t))}catch(e){console.log("--- SettingsStore#generic@$<no_room> THREW ERROR: "+e.message),console.error(e)}for(const n of I){try{const r=A.getValueAt(n,e,t);console.log(`--- SettingsStore#${n}@${t||"<no_room>"} = ${JSON.stringify(r)}`)}catch(e){console.log(`--- SettingsStore#${n}@${t||"<no_room>"} THREW ERROR: ${e.message}`),console.error(e)}if(t)try{const t=A.getValueAt(n,e,null);console.log(`--- SettingsStore#${n}@<no_room> = ${JSON.stringify(t)}`)}catch(e){console.log(`--- SettingsStore#${n}@$<no_room> THREW ERROR: ${e.message}`),console.error(e)}}};r(e),n.invertedSettingName&&(console.log("--- TESTING INVERTED SETTING NAME"),console.log("--- inverted: "+n.invertedSettingName),r(n.invertedSettingName)),console.log("--- END DEBUG")}static getHandler(e,t){const n=A.getHandlers(e);return n[t]?n[t]:null}static getHandlers(e){if(!w.a[e])return{};const t={};for(const n of w.a[e].supportedLevels){if(!D[n])throw new Error("Unexpected level "+n);A.isLevelSupported(n)&&(t[n]=D[n])}return t.default||(t.default=D.default),t}}o()(A,"watchers",new Map),o()(A,"monitors",new Map),o()(A,"watcherCount",1),window.mxSettingsStore=A},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(99),o=n.n(r),i=n(78),a=n.n(i),s=n(104),c=n(86),l=n.n(c);const u=["element","onClick","children","kind","disabled","inputRef","className","onKeyDown","onKeyUp"];function d(e){let{element:t,onClick:n,children:r,kind:i,disabled:c,inputRef:d,className:h,onKeyDown:p,onKeyUp:m}=e,g=o()(e,u);const f=g;return c||(f.onClick=n,f.onKeyDown=e=>{if(e.key===s.a.ENTER)return e.stopPropagation(),e.preventDefault(),n(e);e.key===s.a.SPACE?(e.stopPropagation(),e.preventDefault()):null==p||p(e)},f.onKeyUp=e=>{if(e.key===s.a.SPACE)return e.stopPropagation(),e.preventDefault(),n(e);e.key===s.a.ENTER?(e.stopPropagation(),e.preventDefault()):null==m||m(e)}),f.ref=d,f.className=l()("mx_AccessibleButton",h,{mx_AccessibleButton_hasKind:i,["mx_AccessibleButton_kind_"+i]:i,mx_AccessibleButton_disabled:c}),a.a.createElement(t,g,r)}d.defaultProps={element:"div",role:"button",tabIndex:0},d.displayName="AccessibleButton"},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";(function(e){var r=n(92),o=n.n(r),i=n(79),a=n.n(i),s=n(78),c=n.n(s),l=n(142),u=n.n(l),d=n(86),h=n.n(d),p=n(2),m=n(124),g=n(83),f=n(948);class _{constructor(){a()(this,"counter",0),a()(this,"priorityModal",null),a()(this,"staticModal",null),a()(this,"modals",[]),a()(this,"onBackgroundClick",()=>{const e=this.getCurrentModal();e&&(e.closeReason="backgroundClick",e.close(),e.closeReason=null)})}static getOrCreateContainer(){let e=document.getElementById("mx_Dialog_Container");return e||(e=document.createElement("div"),e.id="mx_Dialog_Container",document.body.appendChild(e)),e}static getOrCreateStaticContainer(){let e=document.getElementById("mx_Dialog_StaticContainer");return e||(e=document.createElement("div"),e.id="mx_Dialog_StaticContainer",document.body.appendChild(e)),e}toggleCurrentDialogVisibility(){const e=this.getCurrentModal();e&&(e.hidden=!e.hidden)}hasDialogs(){return this.priorityModal||this.staticModal||this.modals.length>0}createTrackedDialog(e,t,...n){return m.a.trackEvent("Modal",e,t),this.createDialog(...n)}appendTrackedDialog(e,t,...n){return m.a.trackEvent("Modal",e,t),this.appendDialog(...n)}createDialog(e,...t){return this.createDialogAsync(Promise.resolve(e),...t)}appendDialog(e,...t){return this.appendDialogAsync(Promise.resolve(e),...t)}createTrackedDialogAsync(e,t,...n){return m.a.trackEvent("Modal",e,t),this.createDialogAsync(...n)}appendTrackedDialogAsync(e,t,...n){return m.a.trackEvent("Modal",e,t),this.appendDialogAsync(...n)}closeCurrentModal(e){const t=this.getCurrentModal();t&&(t.closeReason=e,t.close())}buildModal(e,t,n,r){const i={onFinished:t?t.onFinished:null,onBeforeClose:r.onBeforeClose,beforeClosePromise:null,closeReason:null,className:n,elem:null,close:null},[a,s]=this.getCloseFn(i,t),l=this.counter++;return i.elem=c.a.createElement(f.a,o()({key:l,prom:e},t,{onFinished:a})),i.close=a,{modal:i,closeDialog:a,onFinishedProm:s}}getCloseFn(e,t){const n=Object(p.l)();return[async(...r)=>{if(e.beforeClosePromise)await e.beforeClosePromise;else if(e.onBeforeClose){e.beforeClosePromise=e.onBeforeClose(e.closeReason);const t=await e.beforeClosePromise;if(e.beforeClosePromise=null,!t)return}n.resolve(r),t&&t.onFinished&&t.onFinished.apply(null,r);const o=this.modals.indexOf(e);o>=0&&this.modals.splice(o,1),this.priorityModal===e&&(this.priorityModal=null,this.modals=[]),this.staticModal===e&&(this.staticModal=null,this.modals=[]),this.reRender()},n.promise]}createDialogAsync(e,t,n,r=!1,o=!1,i={}){const{modal:a,closeDialog:s,onFinishedProm:c}=this.buildModal(e,t,n,i);return r?this.priorityModal=a:o?this.staticModal=a:this.modals.unshift(a),this.reRender(),{close:s,finished:c}}appendDialogAsync(e,t,n){const{modal:r,closeDialog:o,onFinishedProm:i}=this.buildModal(e,t,n,{});return this.modals.push(r),this.reRender(),{close:o,finished:i}}getCurrentModal(){return this.priorityModal?this.priorityModal:this.modals[0]||this.staticModal}reRender(){if(0===this.modals.length&&!this.priorityModal&&!this.staticModal)return g.a.dispatch({action:"aria_unhide_main_app"}),u.a.unmountComponentAtNode(_.getOrCreateContainer()),void u.a.unmountComponentAtNode(_.getOrCreateStaticContainer());if(g.a.dispatch({action:"aria_hide_main_app"}),this.staticModal){const e=h()("mx_Dialog_wrapper mx_Dialog_staticWrapper",this.staticModal.className),t=c.a.createElement("div",{className:e},c.a.createElement("div",{className:"mx_Dialog"},this.staticModal.elem),c.a.createElement("div",{className:"mx_Dialog_background mx_Dialog_staticBackground",onClick:this.onBackgroundClick}));u.a.render(t,_.getOrCreateStaticContainer())}else u.a.unmountComponentAtNode(_.getOrCreateStaticContainer());const t=this.getCurrentModal();if(t===this.staticModal||t.hidden)u.a.unmountComponentAtNode(_.getOrCreateContainer());else{const n=h()("mx_Dialog_wrapper",t.className,{mx_Dialog_wrapperWithStaticUnder:this.staticModal}),r=c.a.createElement("div",{className:n},c.a.createElement("div",{className:"mx_Dialog"},t.elem),c.a.createElement("div",{className:"mx_Dialog_background",onClick:this.onBackgroundClick}));e(()=>u.a.render(r,_.getOrCreateContainer()))}}}window.singletonModalManager||(window.singletonModalManager=new _),t.a=window.singletonModalManager}).call(this,n(161).setImmediate)},function(e,t,n){var r=n(305);e.exports=n(950)(r.isElement,!0)},function(e,t,n){"use strict";n.r(t),n.d(t,"loadSkin",(function(){return o})),n.d(t,"resetSkin",(function(){return i})),n.d(t,"getComponent",(function(){return a}));var r=n(941);n(1398);function o(e){r.a.load(e)}function i(){r.a.reset()}function a(e){return r.a.getComponent(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),o=n.n(r);const i={brand:"Element",integrations_ui_url:"https://scalar.vector.im/",integrations_rest_url:"https://scalar.vector.im/api",bug_report_endpoint_url:null,jitsi:{preferredDomain:"jitsi.riot.im"},desktopBuilds:{available:!0,logo:n(946),url:"https://element.io/get-started"}};class a{static setInstance(e){a.instance=e,window.mxReactSdkConfig=e}static get(){return a.instance||{}}static put(e){const t=Object.keys(i);for(let n=0;n<t.length;++n)void 0===e[t[n]]&&(e[t[n]]=i[t[n]]);a.setInstance(e)}static unset(){a.setInstance({})}static add(e){const t=a.get(),n=Object.assign({},t,e);a.put(n)}}o()(a,"instance",void 0)},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.ViewUser="view_user",e.ViewUserSettings="view_user_settings",e.ViewRoomDirectory="view_room_directory",e.RecheckTheme="recheck_theme",e.CheckUpdates="check_updates",e.FocusSendMessageComposer="focus_send_message_composer",e.FocusEditMessageComposer="focus_edit_message_composer",e.FocusAComposer="focus_a_composer",e.ToggleUserMenu="toggle_user_menu",e.UpdateFontSize="update_font_size",e.UpdateSystemFont="update_system_font",e.ViewRoomDelta="view_room_delta",e.SetRightPanelPhase="set_right_panel_phase",e.ToggleRightPanel="toggle_right_panel",e.AfterRightPanelPhaseChange="after_right_panel_phase_change",e.OpenDialPad="open_dial_pad",e.DialNumber="dial_number",e.TransferCallToMatrixID="transfer_call_to_matrix_id",e.TransferCallToPhoneNumber="transfer_call_to_phone_number",e.PstnSupportUpdated="pstn_support_updated",e.VirtualRoomSupportUpdated="virtual_room_support_updated",e.UploadStarted="upload_started",e.UploadProgress="upload_progress",e.UploadFinished="upload_finished",e.UploadFailed="upload_failed",e.UploadCanceled="upload_canceled",e.JoinRoom="join_room",e.JoinRoomReady="join_room_ready",e.JoinRoomError="join_room_error",e.ComposerInsert="composer_insert",e.SwitchSpace="switch_space",e.UpdateSpaceHierarchy="update_space_hierarchy",e.SettingUpdated="setting_updated"}(r||(r={}))},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"k",(function(){return d})),n.d(t,"j",(function(){return h})),n.d(t,"i",(function(){return p})),n.d(t,"f",(function(){return m}));var r=n(510);let o,i,a;!function(e){e.RoomCanonicalAlias="m.room.canonical_alias",e.RoomCreate="m.room.create",e.RoomJoinRules="m.room.join_rules",e.RoomMember="m.room.member",e.RoomThirdPartyInvite="m.room.third_party_invite",e.RoomPowerLevels="m.room.power_levels",e.RoomName="m.room.name",e.RoomTopic="m.room.topic",e.RoomAvatar="m.room.avatar",e.RoomPinnedEvents="m.room.pinned_events",e.RoomEncryption="m.room.encryption",e.RoomHistoryVisibility="m.room.history_visibility",e.RoomGuestAccess="m.room.guest_access",e.RoomServerAcl="m.room.server_acl",e.RoomTombstone="m.room.tombstone",e.RoomAliases="m.room.aliases",e.SpaceChild="m.space.child",e.SpaceParent="m.space.parent",e.RoomRedaction="m.room.redaction",e.RoomMessage="m.room.message",e.RoomMessageEncrypted="m.room.encrypted",e.Sticker="m.sticker",e.CallInvite="m.call.invite",e.CallCandidates="m.call.candidates",e.CallAnswer="m.call.answer",e.CallHangup="m.call.hangup",e.CallReject="m.call.reject",e.CallSelectAnswer="m.call.select_answer",e.CallNegotiate="m.call.negotiate",e.CallSDPStreamMetadataChanged="m.call.sdp_stream_metadata_changed",e.CallSDPStreamMetadataChangedPrefix="org.matrix.call.sdp_stream_metadata_changed",e.CallReplaces="m.call.replaces",e.CallAssertedIdentity="m.call.asserted_identity",e.CallAssertedIdentityPrefix="org.matrix.call.asserted_identity",e.KeyVerificationRequest="m.key.verification.request",e.KeyVerificationStart="m.key.verification.start",e.KeyVerificationCancel="m.key.verification.cancel",e.KeyVerificationMac="m.key.verification.mac",e.KeyVerificationDone="m.key.verification.done",e.RoomMessageFeedback="m.room.message.feedback",e.Reaction="m.reaction",e.Typing="m.typing",e.Receipt="m.receipt",e.Presence="m.presence",e.FullyRead="m.fully_read",e.Tag="m.tag",e.SpaceOrder="org.matrix.msc3230.space_order",e.PushRules="m.push_rules",e.Direct="m.direct",e.IgnoredUserList="m.ignored_user_list",e.RoomKey="m.room_key",e.RoomKeyRequest="m.room_key_request",e.ForwardedRoomKey="m.forwarded_room_key",e.Dummy="m.dummy"}(o||(o={})),function(e){e.Annotation="m.annotation",e.Replace="m.replace"}(i||(i={})),function(e){e.Text="m.text",e.Emote="m.emote",e.Notice="m.notice",e.Image="m.image",e.File="m.file",e.Audio="m.audio",e.Location="m.location",e.Video="m.video"}(a||(a={}));const s="type";let c;!function(e){e.Space="m.space"}(c||(c={}));const l=new r.a("m.room.purpose","org.matrix.msc3088.purpose"),u=new r.a("m.enabled","org.matrix.msc3088.enabled"),d=new r.a("m.data_tree","org.matrix.msc3089.data_tree"),h=new r.a("m.leaf","org.matrix.msc3089.leaf"),p=new r.a("m.branch","org.matrix.msc3089.branch"),m=new r.a("io.element.functional_members","io.element.functional_members")},function(e,t,n){"use strict";var r=n(78);const o=Object(r.createContext)(void 0);o.displayName="MatrixClientContext",t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(383),d=n.n(u),h=n(88),p=n.n(h),m=n(86),g=n.n(m),f=n(104),_=n(85),b=n(82),v=n(80),y=n(94),E=n(81);let S=Object(E.a)("views.dialogs.BaseDialog")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"_onKeyDown",e=>{this.props.onKeyDown&&this.props.onKeyDown(e),this.props.hasCancel&&e.key===f.a.ESCAPE&&(e.stopPropagation(),e.preventDefault(),this.props.onFinished(!1))}),s()(this,"_onCancelClick",e=>{this.props.onFinished(!1)}),this._matrixClient=b.a.get()}render(){let e,t;return this.props.hasCancel&&(e=l.a.createElement(_.a,{onClick:this._onCancelClick,className:"mx_Dialog_cancelButton","aria-label":Object(v.a)("Close dialog")})),this.props.headerImage&&(t=l.a.createElement("img",{className:"mx_Dialog_titleImage",src:this.props.headerImage,alt:""})),l.a.createElement(y.a.Provider,{value:this._matrixClient},l.a.createElement(d.a,{returnFocus:!0,lockProps:{onKeyDown:this._onKeyDown,role:"dialog","aria-labelledby":"mx_BaseDialog_title","aria-describedby":this.props.contentId},className:g()({[this.props.className]:!0,mx_Dialog_fixedWidth:this.props.fixedWidth})},l.a.createElement("div",{className:g()("mx_Dialog_header",{mx_Dialog_headerWithButton:!!this.props.headerButton,mx_Dialog_headerWithCancel:!!e})},l.a.createElement("div",{className:g()("mx_Dialog_title",this.props.titleClass),id:"mx_BaseDialog_title"},t,this.props.title),this.props.headerButton,e),this.props.children))}},s()(o,"propTypes",{onFinished:p.a.func.isRequired,hasCancel:p.a.bool,onKeyDown:p.a.func,className:p.a.string,fixedWidth:p.a.bool,title:p.a.node.isRequired,headerImage:p.a.string,children:p.a.node,contentId:p.a.string,titleClass:p.a.oneOfType([p.a.string,p.a.object,p.a.arrayOf(p.a.string)])}),s()(o,"defaultProps",{hasCancel:!0,fixedWidth:!0}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(915),o=n.n(r);o.a.methodFactory=function(e,t,n){return function(...t){this.prefix&&t.unshift(this.prefix);return"error"===e||"warn"===e||"trace"===e||"info"===e?console[e](...t):console.log(...t)}};const i=o.a.getLogger("matrix");function a(e){e.withPrefix=function(e){return function(e){const t=o.a.getLogger("matrix-"+e);t.prefix!==e&&(a(t),t.prefix=e,t.setLevel(o.a.levels.DEBUG));return t}((this.prefix||"")+e)}}i.setLevel(o.a.levels.DEBUG),a(i)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(80);class c extends a.a.PureComponent{render(){const{w:e,h:t,message:n}=this.props;return a.a.createElement("div",{className:"mx_Spinner"},n&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"mx_Spinner_Msg"},n)," "),a.a.createElement("div",{className:"mx_Spinner_icon",style:{width:e,height:t},"aria-label":Object(s.a)("Loading...")}))}}o()(c,"defaultProps",{w:32,h:32})},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.DEVICE="device",e.ROOM_DEVICE="room-device",e.ROOM_ACCOUNT="room-account",e.ACCOUNT="account",e.ROOM="room",e.CONFIG="config",e.DEFAULT="default"}(r||(r={}))},function(e,t,n){var r=n(304);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(79),o=n.n(r),i=n(82);class a{constructor(e,t){if(this.prepared=e,o()(this,"client",void 0),this.client=null!=t?t:i.a.get(),!this.client)throw new Error("No possible MatrixClient for media resolution. Please provide one or log in.")}get isEncrypted(){return!!this.prepared.file}get srcMxc(){return this.prepared.mxc}get thumbnailMxc(){var e;return null===(e=this.prepared.thumbnail)||void 0===e?void 0:e.mxc}get hasThumbnail(){return!!this.thumbnailMxc}get srcHttp(){return this.client.mxcUrlToHttp(this.srcMxc)}get thumbnailHttp(){return this.hasThumbnail?this.client.mxcUrlToHttp(this.thumbnailMxc):null}getThumbnailHttp(e,t,n="scale"){return this.hasThumbnail?(e=Math.floor(e*window.devicePixelRatio),t=Math.floor(t*window.devicePixelRatio),this.client.mxcUrlToHttp(this.thumbnailMxc,e,t,n)):null}getThumbnailOfSourceHttp(e,t,n="scale"){return e=Math.floor(e*window.devicePixelRatio),t=Math.floor(t*window.devicePixelRatio),this.client.mxcUrlToHttp(this.srcMxc,e,t,n)}getSquareThumbnailHttp(e){return e=Math.floor(e*window.devicePixelRatio),this.hasThumbnail?this.getThumbnailHttp(e,e,"crop"):this.getThumbnailOfSourceHttp(e,e,"crop")}downloadSource(){return fetch(this.srcHttp)}}function s(e,t){return new a(function(e){var t,n,r,o;let i=null;if(null!=e&&null!==(t=e.info)&&void 0!==t&&t.thumbnail_url?i={mxc:e.info.thumbnail_url,file:e.info.thumbnail_file}:null!=e&&null!==(n=e.info)&&void 0!==n&&null!==(r=n.thumbnail_file)&&void 0!==r&&r.url&&(i={mxc:e.info.thumbnail_file.url,file:e.info.thumbnail_file}),null!=e&&e.url)return{thumbnail:i,mxc:e.url,file:e.file};if(null!=e&&null!==(o=e.file)&&void 0!==o&&o.url)return{thumbnail:i,mxc:e.file.url,file:e.file};throw new Error("Invalid file provided: cannot determine MXC URI. Has it been redacted?")}(e),t)}function c(e,t){return s({url:e},t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(99),o=n.n(r),i=n(79),a=n.n(i),s=n(78),c=n.n(s),l=n(86),u=n.n(l),d=n(89),h=n(107);const p=["element","prefixComponent","postfixComponent","className","onValidate","children","tooltipContent","forceValidity","tooltipClassName","list","validateOnBlur","validateOnChange","validateOnFocus"];function m(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}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let f=1;class _ extends c.a.PureComponent{constructor(e){super(e),a()(this,"id",void 0),a()(this,"input",void 0),a()(this,"validateOnChange",Object(h.debounce)(()=>{this.validate({focused:!0})},200)),a()(this,"onFocus",e=>{this.setState({focused:!0}),this.props.validateOnFocus&&this.validate({focused:!0}),this.props.onFocus&&this.props.onFocus(e)}),a()(this,"onChange",e=>{this.props.validateOnChange&&this.validateOnChange(),this.props.onChange&&this.props.onChange(e)}),a()(this,"onBlur",e=>{this.setState({focused:!1}),this.props.validateOnBlur&&this.validate({focused:!1}),this.props.onBlur&&this.props.onBlur(e)}),this.state={valid:void 0,feedback:void 0,feedbackVisible:!1,focused:!1},this.id=this.props.id||"mx_Field_"+f++}focus(){this.input.focus()}async validate({focused:e,allowEmpty:t=!0}){if(!this.props.onValidate)return;const n=this.input?this.input.value:null,{valid:r,feedback:o}=await this.props.onValidate({value:n,focused:e,allowEmpty:t});return this.state.focused&&o?this.setState({valid:r,feedback:o,feedbackVisible:!0}):this.setState({valid:r,feedbackVisible:!1}),r}render(){const e=this.props,{element:t,prefixComponent:n,postfixComponent:r,className:i,onValidate:a,children:s,tooltipContent:l,forceValidity:h,tooltipClassName:m,list:f,validateOnBlur:_,validateOnChange:b,validateOnFocus:v}=e,y=o()(e,p);y.placeholder=y.placeholder||y.label,y.id=this.id,y.onFocus=this.onFocus,y.onChange=this.onChange,y.onBlur=this.onBlur;const E=g(g({},y),{},{ref:e=>this.input=e,list:f}),S=c.a.createElement(this.props.element,E,s);let w=null;n&&(w=c.a.createElement("span",{className:"mx_Field_prefix"},n));let C=null;r&&(C=c.a.createElement("span",{className:"mx_Field_postfix"},r));const T=null!=h,x=u()("mx_Field","mx_Field_"+this.props.element,i,{mx_Field_labelAlwaysTopLeft:n,mx_Field_valid:T?h:a&&!0===this.state.valid,mx_Field_invalid:T?!h:a&&!1===this.state.valid}),k=d.getComponent("elements.Tooltip");let F;return(l||this.state.feedback)&&(F=c.a.createElement(k,{tooltipClassName:u()("mx_Field_tooltip",m),visible:this.state.focused&&this.props.forceTooltipVisible||this.state.feedbackVisible,label:l||this.state.feedback,alignment:k.Alignment.Right})),c.a.createElement("div",{className:x},w,S,c.a.createElement("label",{htmlFor:this.id},this.props.label),C,F)}}a()(_,"defaultProps",{element:"input",type:"text",validateOnFocus:!0,validateOnBlur:!0,validateOnChange:!0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return L})),n.d(t,"b",(function(){return j})),n.d(t,"f",(function(){return U})),n.d(t,"d",(function(){return B})),n.d(t,"e",(function(){return G})),n.d(t,"c",(function(){return V})),n.d(t,"h",(function(){return K})),n.d(t,"g",(function(){return Q}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(107),c=n(93),l=n(136),u=n(150),d=n(83),h=n(156),p=n(84),m=n(122),g=n(183),f=n(109),_=n(217);class b extends _.b{constructor(e,t){super(),this.spaceId=e,this.getRoomFn=t,o()(this,"rooms",[]),o()(this,"states",{}),o()(this,"onRoomNotificationStateUpdate",()=>{this.calculateTotalState()})}get symbol(){return null}setRooms(e){const t=this.rooms,n=Object(f.a)(t,e);this.rooms=e;for(const e of n.removed){const t=this.states[e.roomId];t&&(delete this.states[e.roomId],t.off(_.a,this.onRoomNotificationStateUpdate))}for(const e of n.added){const t=this.getRoomFn(e);t.on(_.a,this.onRoomNotificationStateUpdate),this.states[e.roomId]=t}this.calculateTotalState()}getFirstRoomWithNotifications(){return this.rooms.find(e=>e.getUnreadNotificationCount()>0).roomId}destroy(){super.destroy();for(const e of Object.values(this.states))e.off(_.a,this.onRoomNotificationStateUpdate);this.states={}}calculateTotalState(){const e=this.snapshot();this._count=0,this._color=g.a.None;for(const e of Object.values(this.states))this._count+=e.count,this._color=Math.max(this.color,e.color);this.emitIfUpdated(e)}}var v=n(167),y=n(141),E=n(315),S=n(392),w=n(126),C=n(91),T=n(129),x=n(2);const k=(e,t,n,r=50)=>{var o,i,a,s,c,l;if(t<0||n<0||t>e.length||n>e.length||t===n)return[];const u=e.map((e,t)=>({index:t,order:e})),d=Object(f.l)(u,t,n),h=void 0===(null===(o=d[n-1])||void 0===o?void 0:o.order);let p=n,m=n,g=!0;const _=void 0!==(null===(i=d[n+1])||void 0===i?void 0:i.order)?Object(x.I)(d[n+1].order):BigInt(Number.MAX_VALUE);for(let e=n-1,t=1;e>=0;e--,t++){var b;if(void 0!==(null===(b=d[e])||void 0===b?void 0:b.order)&&_-Object(x.I)(d[e].order)>t)break;p=e}const v=void 0===d[0].order?void 0:Object(x.I)(d[0].order),y=BigInt(n);0===p&&void 0!==v&&_-v<=y&&v<=y&&(g=!1);const E=!h;let S=E;if(E){var w,C;const e=void 0!==(null===(w=d[n-1])||void 0===w?void 0:w.order)?Object(x.I)(null===(C=d[n-1])||void 0===C?void 0:C.order):BigInt(Number.MIN_VALUE);for(let t=n+1,r=1;t<d.length;t++,r++){var T;if(void 0===(null===(T=d[t])||void 0===T?void 0:T.order)||Object(x.I)(d[t].order)-e>r)break;m=t}m===d.length-1&&(d[m]?Object(x.I)(d[m].order):BigInt(Number.MAX_VALUE))-e<=m-n&&(S=!1)}const k=g?n-p:Number.MAX_SAFE_INTEGER,F=S?m-n:Number.MAX_SAFE_INTEGER;h||k<F?m=n:p=n;const O=null!==(a=null===(s=d[p-1])||void 0===s?void 0:s.order)&&void 0!==a?a:"";return function e(t,n,r,o,i=x.a){const a=Math.min(Math.max(t.length,n.length),o),s=Object(x.b)(t,a,i),c=Object(x.b)(n,a,i),l=Object(x.I)(s,i),u=Object(x.I)(c,i);if(u-l-BigInt(1)<r)return a<o?e(Object(x.b)(s,a+1,i),Object(x.b)(c,a+1,i),r,a+1,i):[];const d=(u-l)/BigInt(r+1),h=BigInt(l+d);return Array(r).fill(void 0).map((e,t)=>Object(x.d)(h+BigInt(t)*d,i))}(O,null!==(c=null===(l=d[m+1])||void 0===l?void 0:l.order)&&void 0!==c?c:x.a.charAt(x.a.length-1).repeat(O.length||1),1+m-p,r).map((e,t)=>({index:d[p+t].index,order:e}))};var F=n(437),O=n(221),R=n(133),D=n(80),I=n(158),A=n(87),N=n(166);function M(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}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const L=Symbol("home-space"),j=Symbol("suggested-rooms"),U=Symbol("top-level-spaces"),B=Symbol("invited-spaces"),G=Symbol("selected-space"),V=Symbol("home-behaviour"),q=p.b.getValue("feature_spaces"),H=e=>"mx_space_context_"+((null==e?void 0:e.roomId)||"HOME_SPACE"),z=e=>e.reduce((e,t)=>(e[t.isSpaceRoom()?0:1].push(t),e),[[],[]]),W=e=>{if("string"==typeof e&&e.length<=50&&Array.from(e).every(e=>{const t=e.charCodeAt(0);return t>=32&&t<=126}))return e},K=(e,t,n)=>[W(e),t,n],Y=e=>v.a.instance.getRoomState(e);class $ extends u.a{constructor(){super(d.a,{}),o()(this,"rootSpaces",[]),o()(this,"orphanedRooms",new Set),o()(this,"parentMap",new E.a),o()(this,"notificationStateMap",new Map),o()(this,"spaceFilteredRooms",new Map),o()(this,"_activeSpace",null),o()(this,"_suggestedRooms",[]),o()(this,"_invitedSpaces",new Set),o()(this,"spaceOrderLocalEchoMap",new Map),o()(this,"_restrictedJoinRuleSupport",void 0),o()(this,"_allRoomsInHome",p.b.getValue("Spaces.allRoomsInHome")),o()(this,"fetchSuggestedRooms",async(e,t=20)=>{try{const n=await this.matrixClient.getSpaceSummary(e.roomId,0,!0,!1,t),r=new E.a;return n.events.forEach(e=>{var t;e.type===c.a.SpaceChild&&null!==(t=e.content.via)&&void 0!==t&&t.length&&e.content.via.forEach(t=>{r.getOrCreate(e.state_key,new Set).add(t)})}),n.rooms.filter(e=>{var t;return e.room_type!==c.e.Space&&"join"!==(null===(t=this.matrixClient.getRoom(e.room_id))||void 0===t?void 0:t.getMyMembership())}).map(e=>P(P({},e),{},{viaServers:Array.from(r.get(e.room_id)||[])}))}catch(e){console.error(e)}return[]}),o()(this,"getSpaceFilteredRoomIds",e=>!e&&this.allRoomsInHome?new Set(this.matrixClient.getVisibleRooms().map(e=>e.roomId)):this.spaceFilteredRooms.get((null==e?void 0:e.roomId)||L)||new Set),o()(this,"rebuild",Object(s.throttle)(()=>{const[e,t]=z(this.matrixClient.getVisibleRooms()),[n,r]=e.reduce((e,t)=>("join"===t.getMyMembership()?e[0].push(t):"invite"===t.getMyMembership()&&e[1].push(t),e),[[],[]]),o=new Set([...t,...n]),i=new E.a,a=Object(s.sortBy)(n,e=>e.roomId);a.forEach(e=>{this.getChildren(e.roomId).forEach(t=>{o.delete(t),i.getOrCreate(t.roomId,new Set).add(e.roomId)})});const[c,l]=z(Array.from(o)),u=new Set(a),d=(e,t)=>{const n=[e];for(;n.length;){const e=n.pop();t.delete(e),this.getChildSpaces(e.roomId).forEach(e=>{t.has(e)&&n.push(e)})}};c.forEach(e=>{d(e,u)}),Array.from(u).forEach(e=>{u.has(e)&&(u.delete(e),c.push(e),d(e,u))}),this.orphanedRooms=new Set(l.map(e=>e.roomId)),this.rootSpaces=this.sortRootSpaces(c),this.parentMap=i,this._activeSpace&&u.has(this._activeSpace)&&this.setActiveSpace(null,!1),this.onRoomsUpdate(),this.emit(U,this.spacePanelSpaces),this._invitedSpaces=new Set(this.sortRootSpaces(r)),this.emit(B,this.invitedSpaces)},100,{trailing:!0,leading:!0})),o()(this,"onSpaceUpdate",()=>{this.rebuild()}),o()(this,"showInHomeSpace",e=>{var t;return!!this.allRoomsInHome||!e.isSpaceRoom()&&(!(null!==(t=this.parentMap.get(e.roomId))&&void 0!==t&&t.size)||m.a.shared().getUserIdForRoomId(e.roomId)||h.b.instance.getTagsForRoom(e).includes(y.a.Favourite))}),o()(this,"onRoomUpdate",e=>{var t;if(this.showInHomeSpace(e))null===(t=this.spaceFilteredRooms.get(L))||void 0===t||t.add(e.roomId),this.emit(L);else if(!this.orphanedRooms.has(e.roomId)){var n;null===(n=this.spaceFilteredRooms.get(L))||void 0===n||n.delete(e.roomId),this.emit(L)}}),o()(this,"onSpaceMembersChange",e=>{m.a.shared().getDMRoomsForUserId(e.getStateKey()).length<1||this.onRoomsUpdate()}),o()(this,"onRoomsUpdate",Object(s.throttle)(()=>{const e=this.matrixClient.getVisibleRooms(),t=this.spaceFilteredRooms;if(this.spaceFilteredRooms=new Map,!this.allRoomsInHome){const t=e.filter(e=>!e.isSpaceRoom()&&"invite"===e.getMyMembership());this.spaceFilteredRooms.set(L,new Set(t.map(e=>e.roomId))),e.forEach(e=>{this.showInHomeSpace(e)&&this.spaceFilteredRooms.get(L).add(e.roomId)})}this.rootSpaces.forEach(e=>{const t=(e,n)=>{var r;if(n.has(e))return;if(this.spaceFilteredRooms.has(e))return this.spaceFilteredRooms.get(e);const[o,i]=z(this.getChildren(e)),a=new Set(i.map(e=>e.roomId)),s=null===(r=this.matrixClient)||void 0===r?void 0:r.getRoom(e);null==s||s.getMembers().forEach(e=>{"join"!==e.membership&&"invite"!==e.membership||m.a.shared().getDMRoomsForUserId(e.userId).forEach(e=>{a.add(e)})});const c=new Set(n).add(e);return o.forEach(e=>{var n;null===(n=t(e.roomId,c))||void 0===n||n.forEach(e=>{a.add(e)})}),this.spaceFilteredRooms.set(e,a),a};t(e.roomId,new Set)});const n=Object(E.b)(t,this.spaceFilteredRooms),r=n.changed.filter(e=>Object(S.a)(t.get(e),this.spaceFilteredRooms.get(e)));[...n.added,...n.removed,...r].forEach(e=>{this.emit(e)}),this.spaceFilteredRooms.forEach((t,n)=>{this.allRoomsInHome&&n===L||this.getNotificationState(n).setRooms(e.filter(e=>!!t.has(e.roomId)&&(!m.a.shared().getUserIdForRoomId(e.roomId)||n===L)))})},100,{trailing:!0,leading:!0})),o()(this,"switchToRelatedSpace",e=>{if(this.suggestedRooms.find(t=>t.room_id===e))return;let t=this.getCanonicalParent(e);if(t||(t=this.rootSpaces.find(t=>{var n;return null===(n=this.spaceFilteredRooms.get(t.roomId))||void 0===n?void 0:n.has(e)})),!t){const n=Array.from(this.parentMap.get(e)||[]);for(const e of n){const n=this.matrixClient.getRoom(e);if(n){t=n;break}}}this.setActiveSpace(t||null,!1)}),o()(this,"onRoom",(e,t,n)=>{const r=t||e.getMyMembership();if(e.isSpaceRoom())"invite"===r?(this._invitedSpaces.add(e),this.emit(B,this.invitedSpaces)):"invite"===n&&"join"!==r?(this._invitedSpaces.delete(e),this.emit(B,this.invitedSpaces)):(this.onSpaceUpdate(),this.emit(e.roomId)),"join"===r&&e.roomId===w.a.getRoomId()&&this.setActiveSpace(e,!1);else if(this.onRoomsUpdate(),"join"===r){const n=this._suggestedRooms.length;this._suggestedRooms=this._suggestedRooms.filter(t=>t.room_id!==e.roomId),n!==this._suggestedRooms.length&&this.emit(j,this._suggestedRooms),"join"===t&&e.roomId===w.a.getRoomId()&&this.switchToRelatedSpace(e.roomId)}}),o()(this,"onRoomState",e=>{const t=this.matrixClient.getRoom(e.getRoomId());if(t)switch(e.getType()){case c.a.SpaceChild:t.isSpaceRoom()&&(this.onSpaceUpdate(),this.emit(t.roomId));break;case c.a.SpaceParent:t.isSpaceRoom()?this.onSpaceUpdate():this.allRoomsInHome||this.onRoomUpdate(t),this.emit(t.roomId);break;case c.a.RoomMember:t.isSpaceRoom()&&this.onSpaceMembersChange(e)}}),o()(this,"onRoomAccountData",(e,t,n)=>{if(t.isSpaceRoom())if(e.getType()===c.a.SpaceOrder){var r,o;this.spaceOrderLocalEchoMap.delete(t.roomId);(null===(r=e.getContent())||void 0===r?void 0:r.order)!==(null==n||null===(o=n.getContent())||void 0===o?void 0:o.order)&&this.notifyIfOrderChanged()}else if(e.getType()===c.a.Tag&&!this.allRoomsInHome){var i,a;const r=(null==n||null===(i=n.getContent())||void 0===i?void 0:i.tags)||{},o=(null===(a=e.getContent())||void 0===a?void 0:a.tags)||{};!!r[y.a.Favourite]!=!!o[y.a.Favourite]&&this.onRoomUpdate(t)}}),o()(this,"onAccountData",(e,t)=>{if(!this.allRoomsInHome&&e.getType()===c.a.Direct){const n=t.getContent(),r=e.getContent(),o=Object(T.b)(n,r),i=o.changed.filter(e=>Object(f.d)(n[e],r[e]));new Set([...o.added,...o.removed,...i]).forEach(e=>{var t;const n=null===(t=this.matrixClient)||void 0===t?void 0:t.getRoom(e);n&&this.onRoomUpdate(n)})}}),o()(this,"getSpaceTagOrdering",e=>{var t,n;return this.spaceOrderLocalEchoMap.has(e.roomId)?this.spaceOrderLocalEchoMap.get(e.roomId):W(null===(t=e.getAccountData(c.a.SpaceOrder))||void 0===t||null===(n=t.getContent())||void 0===n?void 0:n.order)}),p.b.monitorSetting("Spaces.allRoomsInHome",null)}get invitedSpaces(){return Array.from(this._invitedSpaces)}get spacePanelSpaces(){return this.rootSpaces}get activeSpace(){return this._activeSpace||null}get suggestedRooms(){return this._suggestedRooms}get allRoomsInHome(){return this._allRoomsInHome}async setActiveRoomInSpace(e){if(!e||e.isSpaceRoom())if(e!==this.activeSpace&&await this.setActiveSpace(e),e){const t=this.getNotificationState(e.roomId).getFirstRoomWithNotifications();d.a.dispatch({action:"view_room",room_id:t,context_switch:!0})}else{const e=h.b.instance.unfilteredLists;for(let t=0;t<F.a.length;t++){const n=e[F.a[t]].find(e=>{if(this.showInHomeSpace(e)){return v.a.instance.getRoomState(e).isUnread}});if(n){d.a.dispatch({action:"view_room",room_id:n.roomId,context_switch:!0});break}}}}get restrictedJoinRuleSupport(){return this._restrictedJoinRuleSupport}async setActiveSpace(e,t=!0){var n;if(e===this.activeSpace||e&&!e.isSpaceRoom())return;if(this._activeSpace=e,this.emit(G,this.activeSpace),this.emit(j,this._suggestedRooms=[]),t){var r,o;const t=window.localStorage.getItem(H(this.activeSpace));"invite"!==(null==e?void 0:e.getMyMembership())&&"join"===(null===(r=this.matrixClient)||void 0===r||null===(o=r.getRoom(t))||void 0===o?void 0:o.getMyMembership())&&this.getSpaceFilteredRoomIds(e).has(t)?d.a.dispatch({action:"view_room",room_id:t,context_switch:!0}):e?d.a.dispatch({action:"view_room",room_id:e.roomId,context_switch:!0}):d.a.dispatch({action:"view_home_page"})}e?window.localStorage.setItem("mx_active_space",e.roomId):window.localStorage.removeItem("mx_active_space");const i="mx_SpaceBeta_restrictedJoinRuleToastSeen";if(t&&(null==e?void 0:e.getJoinRule())===l.c.Invite&&Object(O.c)(e)&&e.getJoinedMemberCount()>1&&!localStorage.getItem(i)&&null!==(n=this.restrictedJoinRuleSupport)&&void 0!==n&&n.preferred){const e="restrictedjoinrule";R.a.sharedInstance().addOrReplaceToast({key:e,title:Object(D.a)("New in the Spaces beta"),props:{description:Object(D.a)("Help people in spaces to find and join private rooms"),acceptLabel:Object(D.a)("Learn more"),onAccept:()=>{localStorage.setItem(i,"true"),R.a.sharedInstance().dismissToast(e),A.a.createTrackedDialog("New in the Spaces beta","restricted join rule",N.a,{title:Object(D.a)("Help space members find private rooms"),description:a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,Object(D.a)("To help space members find and join a private room, go to that room's Security & Privacy settings.")),a.a.createElement("div",{style:{width:"190px"}},a.a.createElement("div",{className:"mx_TabbedView_tabLabel"},a.a.createElement("span",{className:"mx_TabbedView_maskedIcon mx_RoomSettingsDialog_settingsIcon"}),a.a.createElement("span",{className:"mx_TabbedView_tabLabel_text"},Object(D.a)("General"))),a.a.createElement("div",{className:"mx_TabbedView_tabLabel mx_TabbedView_tabLabel_active"},a.a.createElement("span",{className:"mx_TabbedView_maskedIcon mx_RoomSettingsDialog_securityIcon"}),a.a.createElement("span",{className:"mx_TabbedView_tabLabel_text"},Object(D.a)("Security & Privacy"))),a.a.createElement("div",{className:"mx_TabbedView_tabLabel"},a.a.createElement("span",{className:"mx_TabbedView_maskedIcon mx_RoomSettingsDialog_rolesIcon"}),a.a.createElement("span",{className:"mx_TabbedView_tabLabel_text"},Object(D.a)("Roles & Permissions")))),a.a.createElement("p",null,Object(D.a)("This makes it easy for rooms to stay private to a space, while letting people in the space find and join them. All new rooms in a space will have this option available."))),button:Object(D.a)("OK"),hasCloseButton:!1,fixedWidth:!0})},rejectLabel:Object(D.a)("Skip"),onReject:()=>{localStorage.setItem(i,"true"),R.a.sharedInstance().dismissToast(e)}},component:I.a,priority:35})}if(e){const t=await this.fetchSuggestedRooms(e);this._activeSpace===e&&(this._suggestedRooms=t,this.emit(j,this._suggestedRooms))}}addRoomToSpace(e,t,n,r=!1,o=!1){return this.matrixClient.sendStateEvent(e.roomId,c.a.SpaceChild,{via:n,suggested:r,auto_join:o},t)}getChildren(e){var t;const n=null===(t=this.matrixClient)||void 0===t?void 0:t.getRoom(e),r=null==n?void 0:n.currentState.getStateEvents(c.a.SpaceChild).filter(e=>{var t;return null===(t=e.getContent())||void 0===t?void 0:t.via});return Object(s.sortBy)(r,e=>{var t,n;const r=e.getStateKey(),o=null===(t=this.matrixClient)||void 0===t?void 0:t.getRoom(r),i=null==o||null===(n=o.currentState.getStateEvents(c.a.RoomCreate,""))||void 0===n?void 0:n.getTs();return K(e.getContent().order,i,r)}).map(e=>this.matrixClient.getRoom(e.getStateKey())).filter(e=>"join"===(null==e?void 0:e.getMyMembership())||"invite"===(null==e?void 0:e.getMyMembership()))||[]}getChildRooms(e){return this.getChildren(e).filter(e=>!e.isSpaceRoom())}getChildSpaces(e){return this.getChildren(e).filter(e=>e.isSpaceRoom()&&"join"===e.getMyMembership())}getParents(e,t=!1){var n;const r=null===(n=this.matrixClient)||void 0===n?void 0:n.getRoom(e);return(null==r?void 0:r.currentState.getStateEvents(c.a.SpaceParent).filter(e=>{var n;const r=e.getContent();return!(null==r||null===(n=r.via)||void 0===n||!n.length)&&!(t&&(null==r||!r.canonical))}).map(e=>this.matrixClient.getRoom(e.getStateKey())).filter(Boolean))||[]}getCanonicalParent(e){var t;const n=this.getParents(e,!0);return(null===(t=Object(s.sortBy)(n,e=>e.roomId))||void 0===t?void 0:t[0])||null}getKnownParents(e){return this.parentMap.get(e)||new Set}notifyIfOrderChanged(){const e=this.sortRootSpaces(this.rootSpaces);Object(f.e)(this.rootSpaces,e)&&(this.rootSpaces=e,this.emit(U,this.spacePanelSpaces))}async reset(){this.rootSpaces=[],this.orphanedRooms=new Set,this.parentMap=new E.a,this.notificationStateMap=new Map,this.spaceFilteredRooms=new Map,this._activeSpace=null,this._suggestedRooms=[],this._invitedSpaces=new Set}async onNotReady(){Q.spacesEnabled&&(this.matrixClient&&(this.matrixClient.removeListener("Room",this.onRoom),this.matrixClient.removeListener("Room.myMembership",this.onRoom),this.matrixClient.removeListener("Room.accountData",this.onRoomAccountData),this.matrixClient.removeListener("RoomState.events",this.onRoomState),this.matrixClient.removeListener("accountData",this.onAccountData)),await this.reset())}async onReady(){if(!q)return;this.matrixClient.on("Room",this.onRoom),this.matrixClient.on("Room.myMembership",this.onRoom),this.matrixClient.on("Room.accountData",this.onRoomAccountData),this.matrixClient.on("RoomState.events",this.onRoomState),this.matrixClient.on("accountData",this.onAccountData),this.matrixClient.getCapabilities().then(e=>{var t,n;this._restrictedJoinRuleSupport=null==e||null===(t=e["m.room_versions"])||void 0===t||null===(n=t["org.matrix.msc3244.room_capabilities"])||void 0===n?void 0:n.restricted}),await this.onSpaceUpdate();const e=window.localStorage.getItem("mx_active_space");e&&this.setActiveSpace(this.matrixClient.getRoom(e))}async onAction(e){if(q)switch(e.action){case"view_room":{var t;if(e.context_switch)break;const n=e.room_id,r=null===(t=this.matrixClient)||void 0===t?void 0:t.getRoom(n);null!=r&&r.isSpaceRoom()?this.setActiveSpace(r,!1):this.allRoomsInHome&&!this.activeSpace||this.getSpaceFilteredRoomIds(this.activeSpace).has(n)||this.switchToRelatedSpace(n),window.localStorage.setItem(H(this.activeSpace),e.room_id);break}case"after_leave_room":this._activeSpace&&e.room_id===this._activeSpace.roomId&&this.setActiveSpace(null,!1);break;case C.a.SwitchSpace:0===e.num?this.setActiveSpace(null):this.spacePanelSpaces.length>=e.num&&this.setActiveSpace(this.spacePanelSpaces[e.num-1]);break;case C.a.SettingUpdated:if("Spaces.allRoomsInHome"===e.settingName){const e=p.b.getValue("Spaces.allRoomsInHome");this.allRoomsInHome!==e&&(this._allRoomsInHome=e,this.emit(V,this.allRoomsInHome),this.rebuild())}break}}getNotificationState(e){if(this.notificationStateMap.has(e))return this.notificationStateMap.get(e);const t=new b(e,Y);return this.notificationStateMap.set(e,t),t}traverseSpace(e,t,n=!1,r){if(r&&r.has(e))return;t(e);const o=new Set(r).add(e),[i,a]=z(this.getChildren(e));n&&a.forEach(e=>t(e.roomId)),i.forEach(e=>this.traverseSpace(e.roomId,t,n,o))}sortRootSpaces(e){return Object(s.sortBy)(e,[this.getSpaceTagOrdering,"roomId"])}async setRootSpaceOrder(e,t){this.spaceOrderLocalEchoMap.set(e.roomId,t);try{await this.matrixClient.setRoomAccountData(e.roomId,c.a.SpaceOrder,{order:t})}catch(n){console.warn("Failed to set root space order",n),this.spaceOrderLocalEchoMap.get(e.roomId)===t&&this.spaceOrderLocalEchoMap.delete(e.roomId)}}moveRootSpace(e,t){const n=this.rootSpaces.map(this.getSpaceTagOrdering);k(n,e,t).forEach(({index:e,order:t})=>{this.setRootSpaceOrder(this.rootSpaces[e],t)}),this.notifyIfOrderChanged()}}class Q{static get instance(){return Q.internalInstance}}o()(Q,"spacesEnabled",q),o()(Q,"internalInstance",new $),window.mxSpaceStore=Q.instance},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return I})),n.d(t,"b",(function(){return A})),n.d(t,"p",(function(){return N})),n.d(t,"k",(function(){return M})),n.d(t,"l",(function(){return P})),n.d(t,"m",(function(){return L})),n.d(t,"q",(function(){return j})),n.d(t,"o",(function(){return U})),n.d(t,"n",(function(){return B}));var r=n(92),o=n.n(r),i=n(79),a=n.n(i),s=n(78),c=n.n(s),l=n(142),u=n.n(l),d=n(86),h=n.n(d),p=n(104),m=n(81),g=n(143),f=n(521);n.d(t,"c",(function(){return f.a}));var _=n(261);n.d(t,"d",(function(){return _.a}));var b=n(522);n.d(t,"e",(function(){return b.a}));var v=n(523);n.d(t,"f",(function(){return v.a}));var y=n(524);n.d(t,"g",(function(){return y.a}));var E=n(525);n.d(t,"h",(function(){return E.a}));var S=n(526);n.d(t,"i",(function(){return S.a}));var w,C,T,x,k=n(527);function F(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}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"j",(function(){return k.a}));function R(){let e=document.getElementById("mx_ContextualMenu_Container");return e||(e=document.createElement("div"),e.id="mx_ContextualMenu_Container",document.body.appendChild(e)),e}const D=new Set(["menuitem","menuitemcheckbox","menuitemradio"]);let I;!function(e){e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e.None="none"}(I||(I={}));let A=Object(m.a)("structures.ContextMenu")((T=C=class extends c.a.PureComponent{constructor(t,n){super(t,n),a()(this,"initialFocus",void 0),a()(this,"collectContextMenuRect",e=>{if(!e)return;let t=e.querySelector('[role^="menuitem"]');t||(t=e.querySelector("[tab-index]")),t&&t.focus(),this.setState({contextMenuElem:e})}),a()(this,"onContextMenu",t=>{if(this.props.onFinished){this.props.onFinished(),t.preventDefault(),t.stopPropagation();const n=t.clientX,r=t.clientY;e(()=>{const e=document.createEvent("MouseEvents");e.initMouseEvent("contextmenu",!0,!0,window,0,0,0,n,r,!1,!1,!1,!1,0,null),document.elementFromPoint(n,r).dispatchEvent(e)})}}),a()(this,"onContextMenuPreventBubbling",e=>{e.stopPropagation()}),a()(this,"onFinished",e=>{e.stopPropagation(),e.preventDefault(),this.props.onFinished&&this.props.onFinished()}),a()(this,"onMoveFocus",(e,t)=>{let n=!1;do{const r=t?e.lastElementChild:e.firstElementChild,o=t?e.previousElementSibling:e.nextElementSibling;n?r?e=r:o?e=o:(n=!1,e=e.parentElement):o?(e=o,n=!0):e=e.parentElement,e&&e.classList.contains("mx_ContextualMenu")&&(e=t?e.lastElementChild:e.firstElementChild,n=!0)}while(e&&!D.has(e.getAttribute("role")));e&&e.focus()}),a()(this,"onMoveFocusHomeEnd",(e,t)=>{let n=e.querySelectorAll('[role^="menuitem"]');n||(n=e.querySelectorAll("[tab-index]")),n&&n.length&&(t?n[0].focus():n[n.length-1].focus())}),a()(this,"onKeyDown",e=>{if(e.stopPropagation(),!this.props.managed)return void(e.key===p.a.ESCAPE&&(this.props.onFinished(),e.preventDefault()));let t=!0;switch(e.key){case p.a.TAB:case p.a.ESCAPE:case p.a.ARROW_LEFT:case p.a.ARROW_RIGHT:this.props.onFinished();break;case p.a.ARROW_UP:this.onMoveFocus(e.target,!0);break;case p.a.ARROW_DOWN:this.onMoveFocus(e.target,!1);break;case p.a.HOME:this.onMoveFocusHomeEnd(this.state.contextMenuElem,!0);break;case p.a.END:this.onMoveFocusHomeEnd(this.state.contextMenuElem,!1);break;default:t=!1}t&&e.preventDefault()}),this.state={contextMenuElem:null},this.initialFocus=document.activeElement}componentWillUnmount(){this.initialFocus.focus()}renderMenu(e=this.props.hasBackground){const t={},n=this.props;let r;n.top?t.top=n.top:t.bottom=n.bottom,n.left?(t.left=n.left,r=I.Left):(t.right=n.right,r=I.Right);const o=this.state.contextMenuElem?this.state.contextMenuElem.getBoundingClientRect():null,i={};n.chevronFace&&(r=n.chevronFace);const a=r&&r!==I.None;if(r===I.Top||r===I.Bottom)i.left=n.chevronOffset;else if(void 0!==t.top){const e=t.top;let r=e;if(o){const e=10;r=Math.min(t.top,document.body.clientHeight-o.height-e)}t.top=r,i.top=Math.max(n.chevronOffset,n.chevronOffset+e-r)}let s;a&&(s=c.a.createElement("div",{style:i,className:"mx_ContextualMenu_chevron_"+r}));const l=h()({mx_ContextualMenu:!0,mx_ContextualMenu_left:!a&&t.left,mx_ContextualMenu_right:!a&&t.right,mx_ContextualMenu_top:!a&&t.top,mx_ContextualMenu_bottom:!a&&t.bottom,mx_ContextualMenu_withChevron_left:r===I.Left,mx_ContextualMenu_withChevron_right:r===I.Right,mx_ContextualMenu_withChevron_top:r===I.Top,mx_ContextualMenu_withChevron_bottom:r===I.Bottom}),u={};n.menuWidth&&(u.width=n.menuWidth),n.menuHeight&&(u.height=n.menuHeight),isNaN(Number(n.menuPaddingTop))||(u.paddingTop=n.menuPaddingTop),isNaN(Number(n.menuPaddingLeft))||(u.paddingLeft=n.menuPaddingLeft),isNaN(Number(n.menuPaddingBottom))||(u.paddingBottom=n.menuPaddingBottom),isNaN(Number(n.menuPaddingRight))||(u.paddingRight=n.menuPaddingRight);const d={};let p;return isNaN(Number(n.zIndex))||(u.zIndex=n.zIndex+1,d.zIndex=n.zIndex),e&&(p=c.a.createElement("div",{className:"mx_ContextualMenu_background",style:d,onClick:this.onFinished,onContextMenu:this.onContextMenu})),c.a.createElement("div",{className:h()("mx_ContextualMenu_wrapper",this.props.wrapperClassName),style:O(O({},t),d),onKeyDown:this.onKeyDown,onContextMenu:this.onContextMenuPreventBubbling},c.a.createElement("div",{className:l,style:u,ref:this.collectContextMenuRect,role:this.props.managed?"menu":void 0},s,n.children),p)}render(){return this.props.mountAsChild?this.renderMenu():u.a.createPortal(this.renderMenu(),R())}},a()(C,"defaultProps",{hasBackground:!0,managed:!0}),w=T))||w;const N=(e,t=12)=>{const n=e.right+window.pageXOffset+3;let r=e.top+e.height/2+window.pageYOffset;return r-=t+8,{left:n,top:r,chevronOffset:t}},M=(e,t=I.None,n=0)=>{const r={chevronFace:t},o=e.right+window.pageXOffset,i=e.bottom+window.pageYOffset,a=e.top+window.pageYOffset;return r.right=g.b.instance.windowWidth-o,i<g.b.instance.windowHeight/2?r.top=i+n:r.bottom=g.b.instance.windowHeight-a+n,r},P=(e,t=I.None,n=0)=>{const r={chevronFace:t},o=e.right+window.pageXOffset,i=e.bottom+window.pageYOffset,a=e.top+window.pageYOffset;return r.right=g.b.instance.windowWidth-o,i<g.b.instance.windowHeight/2?r.top=i+n:r.bottom=g.b.instance.windowHeight-a+n,r},L=(e,t=I.None,n=0)=>{const r={chevronFace:t},o=e.left+window.pageXOffset,i=e.top+window.pageYOffset;return r.left=o,r.bottom=g.b.instance.windowHeight-i+n,r},j=()=>{const e=Object(s.useRef)(null),[t,n]=Object(s.useState)(!1);return[t,e,e=>{null==e||e.preventDefault(),null==e||e.stopPropagation(),n(!0)},e=>{null==e||e.preventDefault(),null==e||e.stopPropagation(),n(!1)},n]};let U=Object(m.a)("structures.LegacyContextMenu")(x=class extends A{render(){return this.renderMenu(!1)}})||x;function B(e,t){const n=function(...e){u.a.unmountComponentAtNode(R()),t&&t.onFinished&&t.onFinished.apply(null,e)},r=c.a.createElement(U,o()({},t,{onFinished:n,windowResize:n}),c.a.createElement(e,o()({},t,{onFinished:n})));return u.a.render(r,R()),{close:n}}}).call(this,n(161).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return a}));const r={HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",DELETE:"Delete",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",TAB:"Tab",ESCAPE:"Escape",ENTER:"Enter",ALT:"Alt",CONTROL:"Control",META:"Meta",SHIFT:"Shift",CONTEXT_MENU:"ContextMenu",COMMA:",",PERIOD:".",LESS_THAN:"<",GREATER_THAN:">",BACKTICK:"`",SPACE:" ",SLASH:"/",SQUARE_BRACKET_LEFT:"[",SQUARE_BRACKET_RIGHT:"]",A:"a",B:"b",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",J:"j",K:"k",L:"l",M:"m",N:"n",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",U:"u",V:"v",W:"w",X:"x",Y:"y",Z:"z"},o=navigator.platform.toUpperCase().indexOf("MAC")>=0;function i(e){return o?e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey:e.ctrlKey&&!e.altKey&&!e.metaKey&&!e.shiftKey}function a(e){return o?e.metaKey&&!e.altKey&&!e.ctrlKey:e.ctrlKey&&!e.altKey&&!e.metaKey}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(81),h=n(95);let p=Object(d.a)("views.dialogs.ErrorDialog")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"onClick",()=>{this.props.onFinished(!0)})}render(){return l.a.createElement(h.a,{className:"mx_ErrorDialog",onFinished:this.props.onFinished,title:this.props.title||Object(u.a)("Error"),headerImage:this.props.headerImage,contentId:"mx_Dialog_content"},l.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},this.props.description||Object(u.a)("An error has occurred.")),l.a.createElement("div",{className:"mx_Dialog_buttons"},l.a.createElement("button",{className:"mx_Dialog_primary",onClick:this.onClick,autoFocus:this.props.focus},this.props.button||Object(u.a)("OK"))))}},s()(o,"defaultProps",{focus:!0,title:null,description:null,button:null}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(86),h=n.n(d),p=n(85),m=n(154),g=n(81);const f=["title","tooltip","children","tooltipClassName","forceHide","yOffset","alignment"];var _;let b=Object(g.a)("views.elements.AccessibleTooltipButton")(_=class extends u.a.PureComponent{constructor(e){super(e),c()(this,"onMouseOver",()=>{this.props.forceHide||this.setState({hover:!0})}),c()(this,"onMouseLeave",()=>{this.setState({hover:!1})}),this.state={hover:!1}}componentDidUpdate(e){!e.forceHide&&this.props.forceHide&&this.state.hover&&this.setState({hover:!1})}render(){const e=this.props,{title:t,tooltip:n,children:r,tooltipClassName:i,forceHide:s,yOffset:c,alignment:l}=e,d=a()(e,f),g=this.state.hover?u.a.createElement(m.b,{className:"mx_AccessibleTooltipButton_container",tooltipClassName:h()("mx_AccessibleTooltipButton_tooltip",i),label:n||t,yOffset:c,alignment:l}):null;return u.a.createElement(p.a,o()({},d,{onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,"aria-label":t}),r,g)}})||_},function(e,t,n){(function(e,r){var o;(function(){var i="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",u="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",f="[object Number]",_="[object Object]",b="[object RegExp]",v="[object Set]",y="[object String]",E="[object Symbol]",S="[object WeakMap]",w="[object ArrayBuffer]",C="[object DataView]",T="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",F="[object Int16Array]",O="[object Int32Array]",R="[object Uint8Array]",D="[object Uint16Array]",I="[object Uint32Array]",A=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,P=/&(?:amp|lt|gt|quot|#39);/g,L=/[&<>"']/g,j=RegExp(P.source),U=RegExp(L.source),B=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,V=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/[\\^$.*+?()[\]{}|]/g,K=RegExp(W.source),Y=/^\s+/,$=/\s/,Q=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,Z=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,de=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",me="[\\ud800-\\udfff]",ge="["+pe+"]",fe="["+he+"]",_e="\\d+",be="[\\u2700-\\u27bf]",ve="[a-z\\xdf-\\xf6\\xf8-\\xff]",ye="[^\\ud800-\\udfff"+pe+_e+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ee="\\ud83c[\\udffb-\\udfff]",Se="[^\\ud800-\\udfff]",we="(?:\\ud83c[\\udde6-\\uddff]){2}",Ce="[\\ud800-\\udbff][\\udc00-\\udfff]",Te="[A-Z\\xc0-\\xd6\\xd8-\\xde]",xe="(?:"+ve+"|"+ye+")",ke="(?:"+Te+"|"+ye+")",Fe="(?:"+fe+"|"+Ee+")"+"?",Oe="[\\ufe0e\\ufe0f]?"+Fe+("(?:\\u200d(?:"+[Se,we,Ce].join("|")+")[\\ufe0e\\ufe0f]?"+Fe+")*"),Re="(?:"+[be,we,Ce].join("|")+")"+Oe,De="(?:"+[Se+fe+"?",fe,we,Ce,me].join("|")+")",Ie=RegExp("['’]","g"),Ae=RegExp(fe,"g"),Ne=RegExp(Ee+"(?="+Ee+")|"+De+Oe,"g"),Me=RegExp([Te+"?"+ve+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ge,Te,"$"].join("|")+")",ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ge,Te+xe,"$"].join("|")+")",Te+"?"+xe+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Te+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_e,Re].join("|"),"g"),Pe=RegExp("[\\u200d\\ud800-\\udfff"+he+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,je=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ue=-1,Be={};Be[T]=Be[x]=Be[k]=Be[F]=Be[O]=Be[R]=Be["[object Uint8ClampedArray]"]=Be[D]=Be[I]=!0,Be[c]=Be[l]=Be[w]=Be[u]=Be[C]=Be[d]=Be[h]=Be[p]=Be[g]=Be[f]=Be[_]=Be[b]=Be[v]=Be[y]=Be[S]=!1;var Ge={};Ge[c]=Ge[l]=Ge[w]=Ge[C]=Ge[u]=Ge[d]=Ge[T]=Ge[x]=Ge[k]=Ge[F]=Ge[O]=Ge[g]=Ge[f]=Ge[_]=Ge[b]=Ge[v]=Ge[y]=Ge[E]=Ge[R]=Ge["[object Uint8ClampedArray]"]=Ge[D]=Ge[I]=!0,Ge[h]=Ge[p]=Ge[S]=!1;var Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qe=parseFloat,He=parseInt,ze="object"==typeof e&&e&&e.Object===Object&&e,We="object"==typeof self&&self&&self.Object===Object&&self,Ke=ze||We||Function("return this")(),Ye=t&&!t.nodeType&&t,$e=Ye&&"object"==typeof r&&r&&!r.nodeType&&r,Qe=$e&&$e.exports===Ye,Je=Qe&&ze.process,Xe=function(){try{var e=$e&&$e.require&&$e.require("util").types;return e||Je&&Je.binding&&Je.binding("util")}catch(e){}}(),Ze=Xe&&Xe.isArrayBuffer,et=Xe&&Xe.isDate,tt=Xe&&Xe.isMap,nt=Xe&&Xe.isRegExp,rt=Xe&&Xe.isSet,ot=Xe&&Xe.isTypedArray;function it(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function st(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ct(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ut(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function dt(e,t){return!!(null==e?0:e.length)&&Et(e,t,0)>-1}function ht(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function pt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function mt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function gt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function ft(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bt=Tt("length");function vt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function yt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Et(e,t,n){return t==t?function(e,t,n){var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):yt(e,wt,n)}function St(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function wt(e){return e!=e}function Ct(e,t){var n=null==e?0:e.length;return n?Ft(e,t)/n:NaN}function Tt(e){return function(t){return null==t?void 0:t[e]}}function xt(e){return function(t){return null==e?void 0:e[t]}}function kt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Ft(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}function Ot(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Rt(e){return e?e.slice(0,Yt(e)+1).replace(Y,""):e}function Dt(e){return function(t){return e(t)}}function It(e,t){return pt(t,(function(t){return e[t]}))}function At(e,t){return e.has(t)}function Nt(e,t){for(var n=-1,r=e.length;++n<r&&Et(t,e[n],0)>-1;);return n}function Mt(e,t){for(var n=e.length;n--&&Et(t,e[n],0)>-1;);return n}function Pt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Lt=xt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),jt=xt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ut(e){return"\\"+Ve[e]}function Bt(e){return Pe.test(e)}function Gt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Vt(e,t){return function(n){return e(t(n))}}function qt(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,i[o++]=n)}return i}function Ht(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Wt(e){return Bt(e)?function(e){var t=Ne.lastIndex=0;for(;Ne.test(e);)++t;return t}(e):bt(e)}function Kt(e){return Bt(e)?function(e){return e.match(Ne)||[]}(e):function(e){return e.split("")}(e)}function Yt(e){for(var t=e.length;t--&&$.test(e.charAt(t)););return t}var $t=xt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Qt=function e(t){var n,r=(t=null==t?Ke:Qt.defaults(Ke.Object(),t,Qt.pick(Ke,je))).Array,o=t.Date,$=t.Error,he=t.Function,pe=t.Math,me=t.Object,ge=t.RegExp,fe=t.String,_e=t.TypeError,be=r.prototype,ve=he.prototype,ye=me.prototype,Ee=t["__core-js_shared__"],Se=ve.toString,we=ye.hasOwnProperty,Ce=0,Te=(n=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",xe=ye.toString,ke=Se.call(me),Fe=Ke._,Oe=ge("^"+Se.call(we).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=Qe?t.Buffer:void 0,De=t.Symbol,Ne=t.Uint8Array,Pe=Re?Re.allocUnsafe:void 0,Ve=Vt(me.getPrototypeOf,me),ze=me.create,We=ye.propertyIsEnumerable,Ye=be.splice,$e=De?De.isConcatSpreadable:void 0,Je=De?De.iterator:void 0,Xe=De?De.toStringTag:void 0,bt=function(){try{var e=ti(me,"defineProperty");return e({},"",{}),e}catch(e){}}(),xt=t.clearTimeout!==Ke.clearTimeout&&t.clearTimeout,Jt=o&&o.now!==Ke.Date.now&&o.now,Xt=t.setTimeout!==Ke.setTimeout&&t.setTimeout,Zt=pe.ceil,en=pe.floor,tn=me.getOwnPropertySymbols,nn=Re?Re.isBuffer:void 0,rn=t.isFinite,on=be.join,an=Vt(me.keys,me),sn=pe.max,cn=pe.min,ln=o.now,un=t.parseInt,dn=pe.random,hn=be.reverse,pn=ti(t,"DataView"),mn=ti(t,"Map"),gn=ti(t,"Promise"),fn=ti(t,"Set"),_n=ti(t,"WeakMap"),bn=ti(me,"create"),vn=_n&&new _n,yn={},En=Fi(pn),Sn=Fi(mn),wn=Fi(gn),Cn=Fi(fn),Tn=Fi(_n),xn=De?De.prototype:void 0,kn=xn?xn.valueOf:void 0,Fn=xn?xn.toString:void 0;function On(e){if(za(e)&&!Na(e)&&!(e instanceof An)){if(e instanceof In)return e;if(we.call(e,"__wrapped__"))return Oi(e)}return new In(e)}var Rn=function(){function e(){}return function(t){if(!Ha(t))return{};if(ze)return ze(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Dn(){}function In(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function An(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pn;++t<n;)this.add(e[t])}function jn(e){var t=this.__data__=new Mn(e);this.size=t.size}function Un(e,t){var n=Na(e),r=!n&&Aa(e),o=!n&&!r&&ja(e),i=!n&&!r&&!o&&Za(e),a=n||r||o||i,s=a?Ot(e.length,fe):[],c=s.length;for(var l in e)!t&&!we.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ci(l,c))||s.push(l);return s}function Bn(e){var t=e.length;return t?e[Lr(0,t-1)]:void 0}function Gn(e,t){return Ti(vo(e),Qn(t,0,e.length))}function Vn(e){return Ti(vo(e))}function qn(e,t,n){(void 0!==n&&!Ra(e[t],n)||void 0===n&&!(t in e))&&Yn(e,t,n)}function Hn(e,t,n){var r=e[t];we.call(e,t)&&Ra(r,n)&&(void 0!==n||t in e)||Yn(e,t,n)}function zn(e,t){for(var n=e.length;n--;)if(Ra(e[n][0],t))return n;return-1}function Wn(e,t,n,r){return tr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function Kn(e,t){return e&&yo(t,Es(t),e)}function Yn(e,t,n){"__proto__"==t&&bt?bt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function $n(e,t){for(var n=-1,o=t.length,i=r(o),a=null==e;++n<o;)i[n]=a?void 0:fs(e,t[n]);return i}function Qn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Jn(e,t,n,r,o,i){var a,s=1&t,l=2&t,h=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!Ha(e))return e;var S=Na(e);if(S){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&we.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return vo(e,a)}else{var A=oi(e),N=A==p||A==m;if(ja(e))return po(e,s);if(A==_||A==c||N&&!o){if(a=l||N?{}:ai(e),!s)return l?function(e,t){return yo(e,ri(e),t)}(e,function(e,t){return e&&yo(t,Ss(t),e)}(a,e)):function(e,t){return yo(e,ni(e),t)}(e,Kn(a,e))}else{if(!Ge[A])return o?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case w:return mo(e);case u:case d:return new r(+e);case C:return function(e,t){var n=t?mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case T:case x:case k:case F:case O:case R:case"[object Uint8ClampedArray]":case D:case I:return go(e,n);case g:return new r;case f:case y:return new r(e);case b:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return new r;case E:return o=e,kn?me(kn.call(o)):{}}var o}(e,A,s)}}i||(i=new jn);var M=i.get(e);if(M)return M;i.set(e,a),Qa(e)?e.forEach((function(r){a.add(Jn(r,t,n,r,e,i))})):Wa(e)&&e.forEach((function(r,o){a.set(o,Jn(r,t,n,o,e,i))}));var P=S?void 0:(h?l?Yo:Ko:l?Ss:Es)(e);return st(P||e,(function(r,o){P&&(r=e[o=r]),Hn(a,o,Jn(r,t,n,o,e,i))})),a}function Xn(e,t,n){var r=n.length;if(null==e)return!r;for(e=me(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function Zn(e,t,n){if("function"!=typeof e)throw new _e(i);return Ei((function(){e.apply(void 0,n)}),t)}function er(e,t,n,r){var o=-1,i=dt,a=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=pt(t,Dt(n))),r?(i=ht,a=!1):t.length>=200&&(i=At,a=!1,t=new Ln(t));e:for(;++o<s;){var u=e[o],d=null==n?u:n(u);if(u=r||0!==u?u:0,a&&d==d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else i(t,d,r)||c.push(u)}return c}On.templateSettings={escape:B,evaluate:G,interpolate:V,variable:"",imports:{_:On}},On.prototype=Dn.prototype,On.prototype.constructor=On,In.prototype=Rn(Dn.prototype),In.prototype.constructor=In,An.prototype=Rn(Dn.prototype),An.prototype.constructor=An,Nn.prototype.clear=function(){this.__data__=bn?bn(null):{},this.size=0},Nn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Nn.prototype.get=function(e){var t=this.__data__;if(bn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return we.call(t,e)?t[e]:void 0},Nn.prototype.has=function(e){var t=this.__data__;return bn?void 0!==t[e]:we.call(t,e)},Nn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bn&&void 0===t?"__lodash_hash_undefined__":t,this},Mn.prototype.clear=function(){this.__data__=[],this.size=0},Mn.prototype.delete=function(e){var t=this.__data__,n=zn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ye.call(t,n,1),--this.size,!0)},Mn.prototype.get=function(e){var t=this.__data__,n=zn(t,e);return n<0?void 0:t[n][1]},Mn.prototype.has=function(e){return zn(this.__data__,e)>-1},Mn.prototype.set=function(e,t){var n=this.__data__,r=zn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(mn||Mn),string:new Nn}},Pn.prototype.delete=function(e){var t=Zo(this,e).delete(e);return this.size-=t?1:0,t},Pn.prototype.get=function(e){return Zo(this,e).get(e)},Pn.prototype.has=function(e){return Zo(this,e).has(e)},Pn.prototype.set=function(e,t){var n=Zo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(e){return this.__data__.has(e)},jn.prototype.clear=function(){this.__data__=new Mn,this.size=0},jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},jn.prototype.get=function(e){return this.__data__.get(e)},jn.prototype.has=function(e){return this.__data__.has(e)},jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!mn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pn(r)}return n.set(e,t),this.size=n.size,this};var tr=wo(lr),nr=wo(ur,!0);function rr(e,t){var n=!0;return tr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function or(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!Xa(a):n(a,s)))var s=a,c=i}return c}function ir(e,t){var n=[];return tr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function ar(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=si),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?ar(s,t-1,n,r,o):mt(o,s):r||(o[o.length]=s)}return o}var sr=Co(),cr=Co(!0);function lr(e,t){return e&&sr(e,t,Es)}function ur(e,t){return e&&cr(e,t,Es)}function dr(e,t){return ut(t,(function(t){return Ga(e[t])}))}function hr(e,t){for(var n=0,r=(t=co(t,e)).length;null!=e&&n<r;)e=e[ki(t[n++])];return n&&n==r?e:void 0}function pr(e,t,n){var r=t(e);return Na(e)?r:mt(r,n(e))}function mr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Xe&&Xe in me(e)?function(e){var t=we.call(e,Xe),n=e[Xe];try{e[Xe]=void 0;var r=!0}catch(e){}var o=xe.call(e);r&&(t?e[Xe]=n:delete e[Xe]);return o}(e):function(e){return xe.call(e)}(e)}function gr(e,t){return e>t}function fr(e,t){return null!=e&&we.call(e,t)}function _r(e,t){return null!=e&&t in me(e)}function br(e,t,n){for(var o=n?ht:dt,i=e[0].length,a=e.length,s=a,c=r(a),l=1/0,u=[];s--;){var d=e[s];s&&t&&(d=pt(d,Dt(t))),l=cn(d.length,l),c[s]=!n&&(t||i>=120&&d.length>=120)?new Ln(s&&d):void 0}d=e[0];var h=-1,p=c[0];e:for(;++h<i&&u.length<l;){var m=d[h],g=t?t(m):m;if(m=n||0!==m?m:0,!(p?At(p,g):o(u,g,n))){for(s=a;--s;){var f=c[s];if(!(f?At(f,g):o(e[s],g,n)))continue e}p&&p.push(g),u.push(m)}}return u}function vr(e,t,n){var r=null==(e=_i(e,t=co(t,e)))?e:e[ki(Bi(t))];return null==r?void 0:it(r,e,n)}function yr(e){return za(e)&&mr(e)==c}function Er(e,t,n,r,o){return e===t||(null==e||null==t||!za(e)&&!za(t)?e!=e&&t!=t:function(e,t,n,r,o,i){var a=Na(e),s=Na(t),p=a?l:oi(e),m=s?l:oi(t),S=(p=p==c?_:p)==_,T=(m=m==c?_:m)==_,x=p==m;if(x&&ja(e)){if(!ja(t))return!1;a=!0,S=!1}if(x&&!S)return i||(i=new jn),a||Za(e)?zo(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!i(new Ne(e),new Ne(t)));case u:case d:case f:return Ra(+e,+t);case h:return e.name==t.name&&e.message==t.message;case b:case y:return e==t+"";case g:var s=Gt;case v:var c=1&r;if(s||(s=Ht),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var p=zo(s(e),s(t),r,o,i,a);return a.delete(e),p;case E:if(kn)return kn.call(e)==kn.call(t)}return!1}(e,t,p,n,r,o,i);if(!(1&n)){var k=S&&we.call(e,"__wrapped__"),F=T&&we.call(t,"__wrapped__");if(k||F){var O=k?e.value():e,R=F?t.value():t;return i||(i=new jn),o(O,R,n,r,i)}}if(!x)return!1;return i||(i=new jn),function(e,t,n,r,o,i){var a=1&n,s=Ko(e),c=s.length,l=Ko(t).length;if(c!=l&&!a)return!1;var u=c;for(;u--;){var d=s[u];if(!(a?d in t:we.call(t,d)))return!1}var h=i.get(e),p=i.get(t);if(h&&p)return h==t&&p==e;var m=!0;i.set(e,t),i.set(t,e);var g=a;for(;++u<c;){d=s[u];var f=e[d],_=t[d];if(r)var b=a?r(_,f,d,t,e,i):r(f,_,d,e,t,i);if(!(void 0===b?f===_||o(f,_,n,r,i):b)){m=!1;break}g||(g="constructor"==d)}if(m&&!g){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(m=!1)}return i.delete(e),i.delete(t),m}(e,t,n,r,o,i)}(e,t,n,r,Er,o))}function Sr(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=me(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var c=(s=n[o])[0],l=e[c],u=s[1];if(a&&s[2]){if(void 0===l&&!(c in e))return!1}else{var d=new jn;if(r)var h=r(l,u,c,e,t,d);if(!(void 0===h?Er(u,l,3,r,d):h))return!1}}return!0}function wr(e){return!(!Ha(e)||(t=e,Te&&Te in t))&&(Ga(e)?Oe:ae).test(Fi(e));var t}function Cr(e){return"function"==typeof e?e:null==e?Ks:"object"==typeof e?Na(e)?Rr(e[0],e[1]):Or(e):nc(e)}function Tr(e){if(!pi(e))return an(e);var t=[];for(var n in me(e))we.call(e,n)&&"constructor"!=n&&t.push(n);return t}function xr(e){if(!Ha(e))return function(e){var t=[];if(null!=e)for(var n in me(e))t.push(n);return t}(e);var t=pi(e),n=[];for(var r in e)("constructor"!=r||!t&&we.call(e,r))&&n.push(r);return n}function kr(e,t){return e<t}function Fr(e,t){var n=-1,o=Pa(e)?r(e.length):[];return tr(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Or(e){var t=ei(e);return 1==t.length&&t[0][2]?gi(t[0][0],t[0][1]):function(n){return n===e||Sr(n,e,t)}}function Rr(e,t){return ui(e)&&mi(t)?gi(ki(e),t):function(n){var r=fs(n,e);return void 0===r&&r===t?_s(n,e):Er(t,r,3)}}function Dr(e,t,n,r,o){e!==t&&sr(t,(function(i,a){if(o||(o=new jn),Ha(i))!function(e,t,n,r,o,i,a){var s=vi(e,n),c=vi(t,n),l=a.get(c);if(l)return void qn(e,n,l);var u=i?i(s,c,n+"",e,t,a):void 0,d=void 0===u;if(d){var h=Na(c),p=!h&&ja(c),m=!h&&!p&&Za(c);u=c,h||p||m?Na(s)?u=s:La(s)?u=vo(s):p?(d=!1,u=po(c,!0)):m?(d=!1,u=go(c,!0)):u=[]:Ya(c)||Aa(c)?(u=s,Aa(s)?u=ss(s):Ha(s)&&!Ga(s)||(u=ai(c))):d=!1}d&&(a.set(c,u),o(u,c,r,i,a),a.delete(c));qn(e,n,u)}(e,t,a,n,Dr,r,o);else{var s=r?r(vi(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),qn(e,a,s)}}),Ss)}function Ir(e,t){var n=e.length;if(n)return ci(t+=t<0?n:0,n)?e[t]:void 0}function Ar(e,t,n){t=t.length?pt(t,(function(e){return Na(e)?function(t){return hr(t,1===e.length?e[0]:e)}:e})):[Ks];var r=-1;return t=pt(t,Dt(Xo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Fr(e,(function(e,n,o){return{criteria:pt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;for(;++r<a;){var c=fo(o[r],i[r]);if(c){if(r>=s)return c;var l=n[r];return c*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)}))}function Nr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=hr(e,a);n(s,a)&&Vr(i,co(a,e),s)}return i}function Mr(e,t,n,r){var o=r?St:Et,i=-1,a=t.length,s=e;for(e===t&&(t=vo(t)),n&&(s=pt(e,Dt(n)));++i<a;)for(var c=0,l=t[i],u=n?n(l):l;(c=o(s,u,c,r))>-1;)s!==e&&Ye.call(s,c,1),Ye.call(e,c,1);return e}function Pr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;ci(o)?Ye.call(e,o,1):eo(e,o)}}return e}function Lr(e,t){return e+en(dn()*(t-e+1))}function jr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function Ur(e,t){return Si(fi(e,t,Ks),e+"")}function Br(e){return Bn(Rs(e))}function Gr(e,t){var n=Rs(e);return Ti(n,Qn(t,0,n.length))}function Vr(e,t,n,r){if(!Ha(e))return e;for(var o=-1,i=(t=co(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var c=ki(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var u=s[c];void 0===(l=r?r(u,c,s):void 0)&&(l=Ha(u)?u:ci(t[o+1])?[]:{})}Hn(s,c,l),s=s[c]}return e}var qr=vn?function(e,t){return vn.set(e,t),e}:Ks,Hr=bt?function(e,t){return bt(e,"toString",{configurable:!0,enumerable:!1,value:Hs(t),writable:!0})}:Ks;function zr(e){return Ti(Rs(e))}function Wr(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function Kr(e,t){var n;return tr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function Yr(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Xa(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return $r(e,t,Ks,n)}function $r(e,t,n,r){var o=0,i=null==e?0:e.length;if(0===i)return 0;for(var a=(t=n(t))!=t,s=null===t,c=Xa(t),l=void 0===t;o<i;){var u=en((o+i)/2),d=n(e[u]),h=void 0!==d,p=null===d,m=d==d,g=Xa(d);if(a)var f=r||m;else f=l?m&&(r||h):s?m&&h&&(r||!p):c?m&&h&&!p&&(r||!g):!p&&!g&&(r?d<=t:d<t);f?o=u+1:i=u}return cn(i,4294967294)}function Qr(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ra(s,c)){var c=s;i[o++]=0===a?0:a}}return i}function Jr(e){return"number"==typeof e?e:Xa(e)?NaN:+e}function Xr(e){if("string"==typeof e)return e;if(Na(e))return pt(e,Xr)+"";if(Xa(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zr(e,t,n){var r=-1,o=dt,i=e.length,a=!0,s=[],c=s;if(n)a=!1,o=ht;else if(i>=200){var l=t?null:Uo(e);if(l)return Ht(l);a=!1,o=At,c=new Ln}else c=t?[]:s;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),s.push(u)}else o(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function eo(e,t){return null==(e=_i(e,t=co(t,e)))||delete e[ki(Bi(t))]}function to(e,t,n,r){return Vr(e,t,n(hr(e,t)),r)}function no(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?Wr(e,r?0:i,r?i+1:o):Wr(e,r?i+1:0,r?o:i)}function ro(e,t){var n=e;return n instanceof An&&(n=n.value()),gt(t,(function(e,t){return t.func.apply(t.thisArg,mt([e],t.args))}),n)}function oo(e,t,n){var o=e.length;if(o<2)return o?Zr(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var s=e[i],c=-1;++c<o;)c!=i&&(a[i]=er(a[i]||s,e[c],t,n));return Zr(ar(a,1),t,n)}function io(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}function ao(e){return La(e)?e:[]}function so(e){return"function"==typeof e?e:Ks}function co(e,t){return Na(e)?e:ui(e,t)?[e]:xi(cs(e))}var lo=Ur;function uo(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Wr(e,t,n)}var ho=xt||function(e){return Ke.clearTimeout(e)};function po(e,t){if(t)return e.slice();var n=e.length,r=Pe?Pe(n):new e.constructor(n);return e.copy(r),r}function mo(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function go(e,t){var n=t?mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function fo(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Xa(e),a=void 0!==t,s=null===t,c=t==t,l=Xa(t);if(!s&&!l&&!i&&e>t||i&&a&&c&&!s&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!i&&!l&&e<t||l&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!c)return-1}return 0}function _o(e,t,n,o){for(var i=-1,a=e.length,s=n.length,c=-1,l=t.length,u=sn(a-s,0),d=r(l+u),h=!o;++c<l;)d[c]=t[c];for(;++i<s;)(h||i<a)&&(d[n[i]]=e[i]);for(;u--;)d[c++]=e[i++];return d}function bo(e,t,n,o){for(var i=-1,a=e.length,s=-1,c=n.length,l=-1,u=t.length,d=sn(a-c,0),h=r(d+u),p=!o;++i<d;)h[i]=e[i];for(var m=i;++l<u;)h[m+l]=t[l];for(;++s<c;)(p||i<a)&&(h[m+n[s]]=e[i++]);return h}function vo(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function yo(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),o?Yn(n,s,c):Hn(n,s,c)}return n}function Eo(e,t){return function(n,r){var o=Na(n)?at:Wn,i=t?t():{};return o(n,e,Xo(r,2),i)}}function So(e){return Ur((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&li(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=me(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t}))}function wo(e,t){return function(n,r){if(null==n)return n;if(!Pa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=me(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Co(e){return function(t,n,r){for(var o=-1,i=me(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}function To(e){return function(t){var n=Bt(t=cs(t))?Kt(t):void 0,r=n?n[0]:t.charAt(0),o=n?uo(n,1).join(""):t.slice(1);return r[e]()+o}}function xo(e){return function(t){return gt(Gs(As(t).replace(Ie,"")),e,"")}}function ko(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Rn(e.prototype),r=e.apply(n,t);return Ha(r)?r:n}}function Fo(e){return function(t,n,r){var o=me(t);if(!Pa(t)){var i=Xo(n,3);t=Es(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:void 0}}function Oo(e){return Wo((function(t){var n=t.length,r=n,o=In.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new _e(i);if(o&&!s&&"wrapper"==Qo(a))var s=new In([],!0)}for(r=s?r:n;++r<n;){var c=Qo(a=t[r]),l="wrapper"==c?$o(a):void 0;s=l&&di(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?s[Qo(l[0])].apply(s,l[3]):1==a.length&&di(a)?s[c]():s.thru(a)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Na(r))return s.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Ro(e,t,n,o,i,a,s,c,l,u){var d=128&t,h=1&t,p=2&t,m=24&t,g=512&t,f=p?void 0:ko(e);return function _(){for(var b=arguments.length,v=r(b),y=b;y--;)v[y]=arguments[y];if(m)var E=Jo(_),S=Pt(v,E);if(o&&(v=_o(v,o,i,m)),a&&(v=bo(v,a,s,m)),b-=S,m&&b<u){var w=qt(v,E);return Lo(e,t,Ro,_.placeholder,n,v,w,c,l,u-b)}var C=h?n:this,T=p?C[e]:e;return b=v.length,c?v=bi(v,c):g&&b>1&&v.reverse(),d&&l<b&&(v.length=l),this&&this!==Ke&&this instanceof _&&(T=f||ko(T)),T.apply(C,v)}}function Do(e,t){return function(n,r){return function(e,t,n,r){return lr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Io(e,t){return function(n,r){var o;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(o=n),void 0!==r){if(void 0===o)return r;"string"==typeof n||"string"==typeof r?(n=Xr(n),r=Xr(r)):(n=Jr(n),r=Jr(r)),o=e(n,r)}return o}}function Ao(e){return Wo((function(t){return t=pt(t,Dt(Xo())),Ur((function(n){var r=this;return e(t,(function(e){return it(e,r,n)}))}))}))}function No(e,t){var n=(t=void 0===t?" ":Xr(t)).length;if(n<2)return n?jr(t,e):t;var r=jr(t,Zt(e/Wt(t)));return Bt(t)?uo(Kt(r),0,e).join(""):r.slice(0,e)}function Mo(e){return function(t,n,o){return o&&"number"!=typeof o&&li(t,n,o)&&(n=o=void 0),t=rs(t),void 0===n?(n=t,t=0):n=rs(n),function(e,t,n,o){for(var i=-1,a=sn(Zt((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,o=void 0===o?t<n?1:-1:rs(o),e)}}function Po(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=as(t),n=as(n)),e(t,n)}}function Lo(e,t,n,r,o,i,a,s,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,o,u?i:void 0,u?a:void 0,u?void 0:i,u?void 0:a,s,c,l],h=n.apply(void 0,d);return di(e)&&yi(h,d),h.placeholder=r,wi(h,e,t)}function jo(e){var t=pe[e];return function(e,n){if(e=as(e),(n=null==n?0:cn(os(n),292))&&rn(e)){var r=(cs(e)+"e").split("e");return+((r=(cs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Uo=fn&&1/Ht(new fn([,-0]))[1]==1/0?function(e){return new fn(e)}:Xs;function Bo(e){return function(t){var n=oi(t);return n==g?Gt(t):n==v?zt(t):function(e,t){return pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Go(e,t,n,o,s,c,l,u){var d=2&t;if(!d&&"function"!=typeof e)throw new _e(i);var h=o?o.length:0;if(h||(t&=-97,o=s=void 0),l=void 0===l?l:sn(os(l),0),u=void 0===u?u:os(u),h-=s?s.length:0,64&t){var p=o,m=s;o=s=void 0}var g=d?void 0:$o(e),f=[e,t,n,o,s,p,m,c,l,u];if(g&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,s=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!s)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?_o(l,c,t[4]):c,e[4]=l?qt(e[3],a):t[4]}(c=t[5])&&(l=e[5],e[5]=l?bo(l,c,t[6]):c,e[6]=l?qt(e[5],a):t[6]);(c=t[7])&&(e[7]=c);128&r&&(e[8]=null==e[8]?t[8]:cn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(f,g),e=f[0],t=f[1],n=f[2],o=f[3],s=f[4],!(u=f[9]=void 0===f[9]?d?0:e.length:sn(f[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,n){var o=ko(e);return function i(){for(var a=arguments.length,s=r(a),c=a,l=Jo(i);c--;)s[c]=arguments[c];var u=a<3&&s[0]!==l&&s[a-1]!==l?[]:qt(s,l);if((a-=u.length)<n)return Lo(e,t,Ro,i.placeholder,void 0,s,u,void 0,void 0,n-a);var d=this&&this!==Ke&&this instanceof i?o:e;return it(d,this,s)}}(e,t,u):32!=t&&33!=t||s.length?Ro.apply(void 0,f):function(e,t,n,o){var i=1&t,a=ko(e);return function t(){for(var s=-1,c=arguments.length,l=-1,u=o.length,d=r(u+c),h=this&&this!==Ke&&this instanceof t?a:e;++l<u;)d[l]=o[l];for(;c--;)d[l++]=arguments[++s];return it(h,i?n:this,d)}}(e,t,n,o);else var _=function(e,t,n){var r=1&t,o=ko(e);return function t(){var i=this&&this!==Ke&&this instanceof t?o:e;return i.apply(r?n:this,arguments)}}(e,t,n);return wi((g?qr:yi)(_,f),e,t)}function Vo(e,t,n,r){return void 0===e||Ra(e,ye[n])&&!we.call(r,n)?t:e}function qo(e,t,n,r,o,i){return Ha(e)&&Ha(t)&&(i.set(t,e),Dr(e,t,void 0,qo,i),i.delete(t)),e}function Ho(e){return Ya(e)?void 0:e}function zo(e,t,n,r,o,i){var a=1&n,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var l=i.get(e),u=i.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,p=2&n?new Ln:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var m=e[d],g=t[d];if(r)var f=a?r(g,m,d,t,e,i):r(m,g,d,e,t,i);if(void 0!==f){if(f)continue;h=!1;break}if(p){if(!_t(t,(function(e,t){if(!At(p,t)&&(m===e||o(m,e,n,r,i)))return p.push(t)}))){h=!1;break}}else if(m!==g&&!o(m,g,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Wo(e){return Si(fi(e,void 0,Mi),e+"")}function Ko(e){return pr(e,Es,ni)}function Yo(e){return pr(e,Ss,ri)}var $o=vn?function(e){return vn.get(e)}:Xs;function Qo(e){for(var t=e.name+"",n=yn[t],r=we.call(yn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function Jo(e){return(we.call(On,"placeholder")?On:e).placeholder}function Xo(){var e=On.iteratee||Ys;return e=e===Ys?Cr:e,arguments.length?e(arguments[0],arguments[1]):e}function Zo(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ei(e){for(var t=Es(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,mi(o)]}return t}function ti(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return wr(n)?n:void 0}var ni=tn?function(e){return null==e?[]:(e=me(e),ut(tn(e),(function(t){return We.call(e,t)})))}:ic,ri=tn?function(e){for(var t=[];e;)mt(t,ni(e)),e=Ve(e);return t}:ic,oi=mr;function ii(e,t,n){for(var r=-1,o=(t=co(t,e)).length,i=!1;++r<o;){var a=ki(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&qa(o)&&ci(a,o)&&(Na(e)||Aa(e))}function ai(e){return"function"!=typeof e.constructor||pi(e)?{}:Rn(Ve(e))}function si(e){return Na(e)||Aa(e)||!!($e&&e&&e[$e])}function ci(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ce.test(e))&&e>-1&&e%1==0&&e<t}function li(e,t,n){if(!Ha(n))return!1;var r=typeof t;return!!("number"==r?Pa(n)&&ci(t,n.length):"string"==r&&t in n)&&Ra(n[t],e)}function ui(e,t){if(Na(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Xa(e))||(H.test(e)||!q.test(e)||null!=t&&e in me(t))}function di(e){var t=Qo(e),n=On[t];if("function"!=typeof n||!(t in An.prototype))return!1;if(e===n)return!0;var r=$o(n);return!!r&&e===r[0]}(pn&&oi(new pn(new ArrayBuffer(1)))!=C||mn&&oi(new mn)!=g||gn&&"[object Promise]"!=oi(gn.resolve())||fn&&oi(new fn)!=v||_n&&oi(new _n)!=S)&&(oi=function(e){var t=mr(e),n=t==_?e.constructor:void 0,r=n?Fi(n):"";if(r)switch(r){case En:return C;case Sn:return g;case wn:return"[object Promise]";case Cn:return v;case Tn:return S}return t});var hi=Ee?Ga:ac;function pi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ye)}function mi(e){return e==e&&!Ha(e)}function gi(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in me(n)))}}function fi(e,t,n){return t=sn(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=sn(o.length-t,0),s=r(a);++i<a;)s[i]=o[t+i];i=-1;for(var c=r(t+1);++i<t;)c[i]=o[i];return c[t]=n(s),it(e,this,c)}}function _i(e,t){return t.length<2?e:hr(e,Wr(t,0,-1))}function bi(e,t){for(var n=e.length,r=cn(t.length,n),o=vo(e);r--;){var i=t[r];e[r]=ci(i,n)?o[i]:void 0}return e}function vi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var yi=Ci(qr),Ei=Xt||function(e,t){return Ke.setTimeout(e,t)},Si=Ci(Hr);function wi(e,t,n){var r=t+"";return Si(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Q,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return st(s,(function(n){var r="_."+n[0];t&n[1]&&!dt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(J);return t?t[1].split(X):[]}(r),n)))}function Ci(e){var t=0,n=0;return function(){var r=ln(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ti(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Lr(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}var xi=function(e){var t=Ca(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(z,(function(e,n,r,o){t.push(r?o.replace(te,"$1"):n||e)})),t}));function ki(e){if("string"==typeof e||Xa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fi(e){if(null!=e){try{return Se.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Oi(e){if(e instanceof An)return e.clone();var t=new In(e.__wrapped__,e.__chain__);return t.__actions__=vo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ri=Ur((function(e,t){return La(e)?er(e,ar(t,1,La,!0)):[]})),Di=Ur((function(e,t){var n=Bi(t);return La(n)&&(n=void 0),La(e)?er(e,ar(t,1,La,!0),Xo(n,2)):[]})),Ii=Ur((function(e,t){var n=Bi(t);return La(n)&&(n=void 0),La(e)?er(e,ar(t,1,La,!0),void 0,n):[]}));function Ai(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:os(n);return o<0&&(o=sn(r+o,0)),yt(e,Xo(t,3),o)}function Ni(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=os(n),o=n<0?sn(r+o,0):cn(o,r-1)),yt(e,Xo(t,3),o,!0)}function Mi(e){return(null==e?0:e.length)?ar(e,1):[]}function Pi(e){return e&&e.length?e[0]:void 0}var Li=Ur((function(e){var t=pt(e,ao);return t.length&&t[0]===e[0]?br(t):[]})),ji=Ur((function(e){var t=Bi(e),n=pt(e,ao);return t===Bi(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?br(n,Xo(t,2)):[]})),Ui=Ur((function(e){var t=Bi(e),n=pt(e,ao);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?br(n,void 0,t):[]}));function Bi(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Gi=Ur(Vi);function Vi(e,t){return e&&e.length&&t&&t.length?Mr(e,t):e}var qi=Wo((function(e,t){var n=null==e?0:e.length,r=$n(e,t);return Pr(e,pt(t,(function(e){return ci(e,n)?+e:e})).sort(fo)),r}));function Hi(e){return null==e?e:hn.call(e)}var zi=Ur((function(e){return Zr(ar(e,1,La,!0))})),Wi=Ur((function(e){var t=Bi(e);return La(t)&&(t=void 0),Zr(ar(e,1,La,!0),Xo(t,2))})),Ki=Ur((function(e){var t=Bi(e);return t="function"==typeof t?t:void 0,Zr(ar(e,1,La,!0),void 0,t)}));function Yi(e){if(!e||!e.length)return[];var t=0;return e=ut(e,(function(e){if(La(e))return t=sn(e.length,t),!0})),Ot(t,(function(t){return pt(e,Tt(t))}))}function $i(e,t){if(!e||!e.length)return[];var n=Yi(e);return null==t?n:pt(n,(function(e){return it(t,void 0,e)}))}var Qi=Ur((function(e,t){return La(e)?er(e,t):[]})),Ji=Ur((function(e){return oo(ut(e,La))})),Xi=Ur((function(e){var t=Bi(e);return La(t)&&(t=void 0),oo(ut(e,La),Xo(t,2))})),Zi=Ur((function(e){var t=Bi(e);return t="function"==typeof t?t:void 0,oo(ut(e,La),void 0,t)})),ea=Ur(Yi);var ta=Ur((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,$i(e,n)}));function na(e){var t=On(e);return t.__chain__=!0,t}function ra(e,t){return t(e)}var oa=Wo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return $n(t,e)};return!(t>1||this.__actions__.length)&&r instanceof An&&ci(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ra,args:[o],thisArg:void 0}),new In(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)}));var ia=Eo((function(e,t,n){we.call(e,n)?++e[n]:Yn(e,n,1)}));var aa=Fo(Ai),sa=Fo(Ni);function ca(e,t){return(Na(e)?st:tr)(e,Xo(t,3))}function la(e,t){return(Na(e)?ct:nr)(e,Xo(t,3))}var ua=Eo((function(e,t,n){we.call(e,n)?e[n].push(t):Yn(e,n,[t])}));var da=Ur((function(e,t,n){var o=-1,i="function"==typeof t,a=Pa(e)?r(e.length):[];return tr(e,(function(e){a[++o]=i?it(t,e,n):vr(e,t,n)})),a})),ha=Eo((function(e,t,n){Yn(e,n,t)}));function pa(e,t){return(Na(e)?pt:Fr)(e,Xo(t,3))}var ma=Eo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ga=Ur((function(e,t){if(null==e)return[];var n=t.length;return n>1&&li(e,t[0],t[1])?t=[]:n>2&&li(t[0],t[1],t[2])&&(t=[t[0]]),Ar(e,ar(t,1),[])})),fa=Jt||function(){return Ke.Date.now()};function _a(e,t,n){return t=n?void 0:t,Go(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ba(e,t){var n;if("function"!=typeof t)throw new _e(i);return e=os(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var va=Ur((function(e,t,n){var r=1;if(n.length){var o=qt(n,Jo(va));r|=32}return Go(e,r,t,n,o)})),ya=Ur((function(e,t,n){var r=3;if(n.length){var o=qt(n,Jo(ya));r|=32}return Go(t,r,e,n,o)}));function Ea(e,t,n){var r,o,a,s,c,l,u=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new _e(i);function m(t){var n=r,i=o;return r=o=void 0,u=t,s=e.apply(i,n)}function g(e){return u=e,c=Ei(_,t),d?m(e):s}function f(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=a}function _(){var e=fa();if(f(e))return b(e);c=Ei(_,function(e){var n=t-(e-l);return h?cn(n,a-(e-u)):n}(e))}function b(e){return c=void 0,p&&r?m(e):(r=o=void 0,s)}function v(){var e=fa(),n=f(e);if(r=arguments,o=this,l=e,n){if(void 0===c)return g(l);if(h)return ho(c),c=Ei(_,t),m(l)}return void 0===c&&(c=Ei(_,t)),s}return t=as(t)||0,Ha(n)&&(d=!!n.leading,a=(h="maxWait"in n)?sn(as(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==c&&ho(c),u=0,r=l=o=c=void 0},v.flush=function(){return void 0===c?s:b(fa())},v}var Sa=Ur((function(e,t){return Zn(e,1,t)})),wa=Ur((function(e,t,n){return Zn(e,as(t)||0,n)}));function Ca(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ca.Cache||Pn),n}function Ta(e){if("function"!=typeof e)throw new _e(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ca.Cache=Pn;var xa=lo((function(e,t){var n=(t=1==t.length&&Na(t[0])?pt(t[0],Dt(Xo())):pt(ar(t,1),Dt(Xo()))).length;return Ur((function(r){for(var o=-1,i=cn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return it(e,this,r)}))})),ka=Ur((function(e,t){return Go(e,32,void 0,t,qt(t,Jo(ka)))})),Fa=Ur((function(e,t){return Go(e,64,void 0,t,qt(t,Jo(Fa)))})),Oa=Wo((function(e,t){return Go(e,256,void 0,void 0,void 0,t)}));function Ra(e,t){return e===t||e!=e&&t!=t}var Da=Po(gr),Ia=Po((function(e,t){return e>=t})),Aa=yr(function(){return arguments}())?yr:function(e){return za(e)&&we.call(e,"callee")&&!We.call(e,"callee")},Na=r.isArray,Ma=Ze?Dt(Ze):function(e){return za(e)&&mr(e)==w};function Pa(e){return null!=e&&qa(e.length)&&!Ga(e)}function La(e){return za(e)&&Pa(e)}var ja=nn||ac,Ua=et?Dt(et):function(e){return za(e)&&mr(e)==d};function Ba(e){if(!za(e))return!1;var t=mr(e);return t==h||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Ya(e)}function Ga(e){if(!Ha(e))return!1;var t=mr(e);return t==p||t==m||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Va(e){return"number"==typeof e&&e==os(e)}function qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ha(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function za(e){return null!=e&&"object"==typeof e}var Wa=tt?Dt(tt):function(e){return za(e)&&oi(e)==g};function Ka(e){return"number"==typeof e||za(e)&&mr(e)==f}function Ya(e){if(!za(e)||mr(e)!=_)return!1;var t=Ve(e);if(null===t)return!0;var n=we.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Se.call(n)==ke}var $a=nt?Dt(nt):function(e){return za(e)&&mr(e)==b};var Qa=rt?Dt(rt):function(e){return za(e)&&oi(e)==v};function Ja(e){return"string"==typeof e||!Na(e)&&za(e)&&mr(e)==y}function Xa(e){return"symbol"==typeof e||za(e)&&mr(e)==E}var Za=ot?Dt(ot):function(e){return za(e)&&qa(e.length)&&!!Be[mr(e)]};var es=Po(kr),ts=Po((function(e,t){return e<=t}));function ns(e){if(!e)return[];if(Pa(e))return Ja(e)?Kt(e):vo(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=oi(e);return(t==g?Gt:t==v?Ht:Rs)(e)}function rs(e){return e?(e=as(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function os(e){var t=rs(e),n=t%1;return t==t?n?t-n:t:0}function is(e){return e?Qn(os(e),0,4294967295):0}function as(e){if("number"==typeof e)return e;if(Xa(e))return NaN;if(Ha(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ha(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Rt(e);var n=ie.test(e);return n||se.test(e)?He(e.slice(2),n?2:8):oe.test(e)?NaN:+e}function ss(e){return yo(e,Ss(e))}function cs(e){return null==e?"":Xr(e)}var ls=So((function(e,t){if(pi(t)||Pa(t))yo(t,Es(t),e);else for(var n in t)we.call(t,n)&&Hn(e,n,t[n])})),us=So((function(e,t){yo(t,Ss(t),e)})),ds=So((function(e,t,n,r){yo(t,Ss(t),e,r)})),hs=So((function(e,t,n,r){yo(t,Es(t),e,r)})),ps=Wo($n);var ms=Ur((function(e,t){e=me(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&li(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=Ss(i),s=-1,c=a.length;++s<c;){var l=a[s],u=e[l];(void 0===u||Ra(u,ye[l])&&!we.call(e,l))&&(e[l]=i[l])}return e})),gs=Ur((function(e){return e.push(void 0,qo),it(Cs,void 0,e)}));function fs(e,t,n){var r=null==e?void 0:hr(e,t);return void 0===r?n:r}function _s(e,t){return null!=e&&ii(e,t,_r)}var bs=Do((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xe.call(t)),e[t]=n}),Hs(Ks)),vs=Do((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xe.call(t)),we.call(e,t)?e[t].push(n):e[t]=[n]}),Xo),ys=Ur(vr);function Es(e){return Pa(e)?Un(e):Tr(e)}function Ss(e){return Pa(e)?Un(e,!0):xr(e)}var ws=So((function(e,t,n){Dr(e,t,n)})),Cs=So((function(e,t,n,r){Dr(e,t,n,r)})),Ts=Wo((function(e,t){var n={};if(null==e)return n;var r=!1;t=pt(t,(function(t){return t=co(t,e),r||(r=t.length>1),t})),yo(e,Yo(e),n),r&&(n=Jn(n,7,Ho));for(var o=t.length;o--;)eo(n,t[o]);return n}));var xs=Wo((function(e,t){return null==e?{}:function(e,t){return Nr(e,t,(function(t,n){return _s(e,n)}))}(e,t)}));function ks(e,t){if(null==e)return{};var n=pt(Yo(e),(function(e){return[e]}));return t=Xo(t),Nr(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Bo(Es),Os=Bo(Ss);function Rs(e){return null==e?[]:It(e,Es(e))}var Ds=xo((function(e,t,n){return t=t.toLowerCase(),e+(n?Is(t):t)}));function Is(e){return Bs(cs(e).toLowerCase())}function As(e){return(e=cs(e))&&e.replace(le,Lt).replace(Ae,"")}var Ns=xo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ms=xo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ps=To("toLowerCase");var Ls=xo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var js=xo((function(e,t,n){return e+(n?" ":"")+Bs(t)}));var Us=xo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Bs=To("toUpperCase");function Gs(e,t,n){return e=cs(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(Me)||[]}(e):function(e){return e.match(Z)||[]}(e):e.match(t)||[]}var Vs=Ur((function(e,t){try{return it(e,void 0,t)}catch(e){return Ba(e)?e:new $(e)}})),qs=Wo((function(e,t){return st(t,(function(t){t=ki(t),Yn(e,t,va(e[t],e))})),e}));function Hs(e){return function(){return e}}var zs=Oo(),Ws=Oo(!0);function Ks(e){return e}function Ys(e){return Cr("function"==typeof e?e:Jn(e,1))}var $s=Ur((function(e,t){return function(n){return vr(n,e,t)}})),Qs=Ur((function(e,t){return function(n){return vr(e,n,t)}}));function Js(e,t,n){var r=Es(t),o=dr(t,r);null!=n||Ha(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=dr(t,Es(t)));var i=!(Ha(n)&&"chain"in n&&!n.chain),a=Ga(e);return st(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=vo(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,mt([this.value()],arguments))})})),e}function Xs(){}var Zs=Ao(pt),ec=Ao(lt),tc=Ao(_t);function nc(e){return ui(e)?Tt(ki(e)):function(e){return function(t){return hr(t,e)}}(e)}var rc=Mo(),oc=Mo(!0);function ic(){return[]}function ac(){return!1}var sc=Io((function(e,t){return e+t}),0),cc=jo("ceil"),lc=Io((function(e,t){return e/t}),1),uc=jo("floor");var dc,hc=Io((function(e,t){return e*t}),1),pc=jo("round"),mc=Io((function(e,t){return e-t}),0);return On.after=function(e,t){if("function"!=typeof t)throw new _e(i);return e=os(e),function(){if(--e<1)return t.apply(this,arguments)}},On.ary=_a,On.assign=ls,On.assignIn=us,On.assignInWith=ds,On.assignWith=hs,On.at=ps,On.before=ba,On.bind=va,On.bindAll=qs,On.bindKey=ya,On.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Na(e)?e:[e]},On.chain=na,On.chunk=function(e,t,n){t=(n?li(e,t,n):void 0===t)?1:sn(os(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=r(Zt(o/t));i<o;)s[a++]=Wr(e,i,i+=t);return s},On.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},On.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return mt(Na(n)?vo(n):[n],ar(t,1))},On.cond=function(e){var t=null==e?0:e.length,n=Xo();return e=t?pt(e,(function(e){if("function"!=typeof e[1])throw new _e(i);return[n(e[0]),e[1]]})):[],Ur((function(n){for(var r=-1;++r<t;){var o=e[r];if(it(o[0],this,n))return it(o[1],this,n)}}))},On.conforms=function(e){return function(e){var t=Es(e);return function(n){return Xn(n,e,t)}}(Jn(e,1))},On.constant=Hs,On.countBy=ia,On.create=function(e,t){var n=Rn(e);return null==t?n:Kn(n,t)},On.curry=function e(t,n,r){var o=Go(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},On.curryRight=function e(t,n,r){var o=Go(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},On.debounce=Ea,On.defaults=ms,On.defaultsDeep=gs,On.defer=Sa,On.delay=wa,On.difference=Ri,On.differenceBy=Di,On.differenceWith=Ii,On.drop=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,(t=n||void 0===t?1:os(t))<0?0:t,r):[]},On.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,0,(t=r-(t=n||void 0===t?1:os(t)))<0?0:t):[]},On.dropRightWhile=function(e,t){return e&&e.length?no(e,Xo(t,3),!0,!0):[]},On.dropWhile=function(e,t){return e&&e.length?no(e,Xo(t,3),!0):[]},On.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&li(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=os(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:os(r))<0&&(r+=o),r=n>r?0:is(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},On.filter=function(e,t){return(Na(e)?ut:ir)(e,Xo(t,3))},On.flatMap=function(e,t){return ar(pa(e,t),1)},On.flatMapDeep=function(e,t){return ar(pa(e,t),1/0)},On.flatMapDepth=function(e,t,n){return n=void 0===n?1:os(n),ar(pa(e,t),n)},On.flatten=Mi,On.flattenDeep=function(e){return(null==e?0:e.length)?ar(e,1/0):[]},On.flattenDepth=function(e,t){return(null==e?0:e.length)?ar(e,t=void 0===t?1:os(t)):[]},On.flip=function(e){return Go(e,512)},On.flow=zs,On.flowRight=Ws,On.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},On.functions=function(e){return null==e?[]:dr(e,Es(e))},On.functionsIn=function(e){return null==e?[]:dr(e,Ss(e))},On.groupBy=ua,On.initial=function(e){return(null==e?0:e.length)?Wr(e,0,-1):[]},On.intersection=Li,On.intersectionBy=ji,On.intersectionWith=Ui,On.invert=bs,On.invertBy=vs,On.invokeMap=da,On.iteratee=Ys,On.keyBy=ha,On.keys=Es,On.keysIn=Ss,On.map=pa,On.mapKeys=function(e,t){var n={};return t=Xo(t,3),lr(e,(function(e,r,o){Yn(n,t(e,r,o),e)})),n},On.mapValues=function(e,t){var n={};return t=Xo(t,3),lr(e,(function(e,r,o){Yn(n,r,t(e,r,o))})),n},On.matches=function(e){return Or(Jn(e,1))},On.matchesProperty=function(e,t){return Rr(e,Jn(t,1))},On.memoize=Ca,On.merge=ws,On.mergeWith=Cs,On.method=$s,On.methodOf=Qs,On.mixin=Js,On.negate=Ta,On.nthArg=function(e){return e=os(e),Ur((function(t){return Ir(t,e)}))},On.omit=Ts,On.omitBy=function(e,t){return ks(e,Ta(Xo(t)))},On.once=function(e){return ba(2,e)},On.orderBy=function(e,t,n,r){return null==e?[]:(Na(t)||(t=null==t?[]:[t]),Na(n=r?void 0:n)||(n=null==n?[]:[n]),Ar(e,t,n))},On.over=Zs,On.overArgs=xa,On.overEvery=ec,On.overSome=tc,On.partial=ka,On.partialRight=Fa,On.partition=ma,On.pick=xs,On.pickBy=ks,On.property=nc,On.propertyOf=function(e){return function(t){return null==e?void 0:hr(e,t)}},On.pull=Gi,On.pullAll=Vi,On.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Mr(e,t,Xo(n,2)):e},On.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Mr(e,t,void 0,n):e},On.pullAt=qi,On.range=rc,On.rangeRight=oc,On.rearg=Oa,On.reject=function(e,t){return(Na(e)?ut:ir)(e,Ta(Xo(t,3)))},On.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Xo(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Pr(e,o),n},On.rest=function(e,t){if("function"!=typeof e)throw new _e(i);return Ur(e,t=void 0===t?t:os(t))},On.reverse=Hi,On.sampleSize=function(e,t,n){return t=(n?li(e,t,n):void 0===t)?1:os(t),(Na(e)?Gn:Gr)(e,t)},On.set=function(e,t,n){return null==e?e:Vr(e,t,n)},On.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Vr(e,t,n,r)},On.shuffle=function(e){return(Na(e)?Vn:zr)(e)},On.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&li(e,t,n)?(t=0,n=r):(t=null==t?0:os(t),n=void 0===n?r:os(n)),Wr(e,t,n)):[]},On.sortBy=ga,On.sortedUniq=function(e){return e&&e.length?Qr(e):[]},On.sortedUniqBy=function(e,t){return e&&e.length?Qr(e,Xo(t,2)):[]},On.split=function(e,t,n){return n&&"number"!=typeof n&&li(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=cs(e))&&("string"==typeof t||null!=t&&!$a(t))&&!(t=Xr(t))&&Bt(e)?uo(Kt(e),0,n):e.split(t,n):[]},On.spread=function(e,t){if("function"!=typeof e)throw new _e(i);return t=null==t?0:sn(os(t),0),Ur((function(n){var r=n[t],o=uo(n,0,t);return r&&mt(o,r),it(e,this,o)}))},On.tail=function(e){var t=null==e?0:e.length;return t?Wr(e,1,t):[]},On.take=function(e,t,n){return e&&e.length?Wr(e,0,(t=n||void 0===t?1:os(t))<0?0:t):[]},On.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,(t=r-(t=n||void 0===t?1:os(t)))<0?0:t,r):[]},On.takeRightWhile=function(e,t){return e&&e.length?no(e,Xo(t,3),!1,!0):[]},On.takeWhile=function(e,t){return e&&e.length?no(e,Xo(t,3)):[]},On.tap=function(e,t){return t(e),e},On.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new _e(i);return Ha(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ea(e,t,{leading:r,maxWait:t,trailing:o})},On.thru=ra,On.toArray=ns,On.toPairs=Fs,On.toPairsIn=Os,On.toPath=function(e){return Na(e)?pt(e,ki):Xa(e)?[e]:vo(xi(cs(e)))},On.toPlainObject=ss,On.transform=function(e,t,n){var r=Na(e),o=r||ja(e)||Za(e);if(t=Xo(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ha(e)&&Ga(i)?Rn(Ve(e)):{}}return(o?st:lr)(e,(function(e,r,o){return t(n,e,r,o)})),n},On.unary=function(e){return _a(e,1)},On.union=zi,On.unionBy=Wi,On.unionWith=Ki,On.uniq=function(e){return e&&e.length?Zr(e):[]},On.uniqBy=function(e,t){return e&&e.length?Zr(e,Xo(t,2)):[]},On.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zr(e,void 0,t):[]},On.unset=function(e,t){return null==e||eo(e,t)},On.unzip=Yi,On.unzipWith=$i,On.update=function(e,t,n){return null==e?e:to(e,t,so(n))},On.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:to(e,t,so(n),r)},On.values=Rs,On.valuesIn=function(e){return null==e?[]:It(e,Ss(e))},On.without=Qi,On.words=Gs,On.wrap=function(e,t){return ka(so(t),e)},On.xor=Ji,On.xorBy=Xi,On.xorWith=Zi,On.zip=ea,On.zipObject=function(e,t){return io(e||[],t||[],Hn)},On.zipObjectDeep=function(e,t){return io(e||[],t||[],Vr)},On.zipWith=ta,On.entries=Fs,On.entriesIn=Os,On.extend=us,On.extendWith=ds,Js(On,On),On.add=sc,On.attempt=Vs,On.camelCase=Ds,On.capitalize=Is,On.ceil=cc,On.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=as(n))==n?n:0),void 0!==t&&(t=(t=as(t))==t?t:0),Qn(as(e),t,n)},On.clone=function(e){return Jn(e,4)},On.cloneDeep=function(e){return Jn(e,5)},On.cloneDeepWith=function(e,t){return Jn(e,5,t="function"==typeof t?t:void 0)},On.cloneWith=function(e,t){return Jn(e,4,t="function"==typeof t?t:void 0)},On.conformsTo=function(e,t){return null==t||Xn(e,t,Es(t))},On.deburr=As,On.defaultTo=function(e,t){return null==e||e!=e?t:e},On.divide=lc,On.endsWith=function(e,t,n){e=cs(e),t=Xr(t);var r=e.length,o=n=void 0===n?r:Qn(os(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},On.eq=Ra,On.escape=function(e){return(e=cs(e))&&U.test(e)?e.replace(L,jt):e},On.escapeRegExp=function(e){return(e=cs(e))&&K.test(e)?e.replace(W,"\\$&"):e},On.every=function(e,t,n){var r=Na(e)?lt:rr;return n&&li(e,t,n)&&(t=void 0),r(e,Xo(t,3))},On.find=aa,On.findIndex=Ai,On.findKey=function(e,t){return vt(e,Xo(t,3),lr)},On.findLast=sa,On.findLastIndex=Ni,On.findLastKey=function(e,t){return vt(e,Xo(t,3),ur)},On.floor=uc,On.forEach=ca,On.forEachRight=la,On.forIn=function(e,t){return null==e?e:sr(e,Xo(t,3),Ss)},On.forInRight=function(e,t){return null==e?e:cr(e,Xo(t,3),Ss)},On.forOwn=function(e,t){return e&&lr(e,Xo(t,3))},On.forOwnRight=function(e,t){return e&&ur(e,Xo(t,3))},On.get=fs,On.gt=Da,On.gte=Ia,On.has=function(e,t){return null!=e&&ii(e,t,fr)},On.hasIn=_s,On.head=Pi,On.identity=Ks,On.includes=function(e,t,n,r){e=Pa(e)?e:Rs(e),n=n&&!r?os(n):0;var o=e.length;return n<0&&(n=sn(o+n,0)),Ja(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Et(e,t,n)>-1},On.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:os(n);return o<0&&(o=sn(r+o,0)),Et(e,t,o)},On.inRange=function(e,t,n){return t=rs(t),void 0===n?(n=t,t=0):n=rs(n),function(e,t,n){return e>=cn(t,n)&&e<sn(t,n)}(e=as(e),t,n)},On.invoke=ys,On.isArguments=Aa,On.isArray=Na,On.isArrayBuffer=Ma,On.isArrayLike=Pa,On.isArrayLikeObject=La,On.isBoolean=function(e){return!0===e||!1===e||za(e)&&mr(e)==u},On.isBuffer=ja,On.isDate=Ua,On.isElement=function(e){return za(e)&&1===e.nodeType&&!Ya(e)},On.isEmpty=function(e){if(null==e)return!0;if(Pa(e)&&(Na(e)||"string"==typeof e||"function"==typeof e.splice||ja(e)||Za(e)||Aa(e)))return!e.length;var t=oi(e);if(t==g||t==v)return!e.size;if(pi(e))return!Tr(e).length;for(var n in e)if(we.call(e,n))return!1;return!0},On.isEqual=function(e,t){return Er(e,t)},On.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?Er(e,t,void 0,n):!!r},On.isError=Ba,On.isFinite=function(e){return"number"==typeof e&&rn(e)},On.isFunction=Ga,On.isInteger=Va,On.isLength=qa,On.isMap=Wa,On.isMatch=function(e,t){return e===t||Sr(e,t,ei(t))},On.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,Sr(e,t,ei(t),n)},On.isNaN=function(e){return Ka(e)&&e!=+e},On.isNative=function(e){if(hi(e))throw new $("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return wr(e)},On.isNil=function(e){return null==e},On.isNull=function(e){return null===e},On.isNumber=Ka,On.isObject=Ha,On.isObjectLike=za,On.isPlainObject=Ya,On.isRegExp=$a,On.isSafeInteger=function(e){return Va(e)&&e>=-9007199254740991&&e<=9007199254740991},On.isSet=Qa,On.isString=Ja,On.isSymbol=Xa,On.isTypedArray=Za,On.isUndefined=function(e){return void 0===e},On.isWeakMap=function(e){return za(e)&&oi(e)==S},On.isWeakSet=function(e){return za(e)&&"[object WeakSet]"==mr(e)},On.join=function(e,t){return null==e?"":on.call(e,t)},On.kebabCase=Ns,On.last=Bi,On.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=os(n))<0?sn(r+o,0):cn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):yt(e,wt,o,!0)},On.lowerCase=Ms,On.lowerFirst=Ps,On.lt=es,On.lte=ts,On.max=function(e){return e&&e.length?or(e,Ks,gr):void 0},On.maxBy=function(e,t){return e&&e.length?or(e,Xo(t,2),gr):void 0},On.mean=function(e){return Ct(e,Ks)},On.meanBy=function(e,t){return Ct(e,Xo(t,2))},On.min=function(e){return e&&e.length?or(e,Ks,kr):void 0},On.minBy=function(e,t){return e&&e.length?or(e,Xo(t,2),kr):void 0},On.stubArray=ic,On.stubFalse=ac,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return!0},On.multiply=hc,On.nth=function(e,t){return e&&e.length?Ir(e,os(t)):void 0},On.noConflict=function(){return Ke._===this&&(Ke._=Fe),this},On.noop=Xs,On.now=fa,On.pad=function(e,t,n){e=cs(e);var r=(t=os(t))?Wt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return No(en(o),n)+e+No(Zt(o),n)},On.padEnd=function(e,t,n){e=cs(e);var r=(t=os(t))?Wt(e):0;return t&&r<t?e+No(t-r,n):e},On.padStart=function(e,t,n){e=cs(e);var r=(t=os(t))?Wt(e):0;return t&&r<t?No(t-r,n)+e:e},On.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(cs(e).replace(Y,""),t||0)},On.random=function(e,t,n){if(n&&"boolean"!=typeof n&&li(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=rs(e),void 0===t?(t=e,e=0):t=rs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=dn();return cn(e+o*(t-e+qe("1e-"+((o+"").length-1))),t)}return Lr(e,t)},On.reduce=function(e,t,n){var r=Na(e)?gt:kt,o=arguments.length<3;return r(e,Xo(t,4),n,o,tr)},On.reduceRight=function(e,t,n){var r=Na(e)?ft:kt,o=arguments.length<3;return r(e,Xo(t,4),n,o,nr)},On.repeat=function(e,t,n){return t=(n?li(e,t,n):void 0===t)?1:os(t),jr(cs(e),t)},On.replace=function(){var e=arguments,t=cs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},On.result=function(e,t,n){var r=-1,o=(t=co(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[ki(t[r])];void 0===i&&(r=o,i=n),e=Ga(i)?i.call(e):i}return e},On.round=pc,On.runInContext=e,On.sample=function(e){return(Na(e)?Bn:Br)(e)},On.size=function(e){if(null==e)return 0;if(Pa(e))return Ja(e)?Wt(e):e.length;var t=oi(e);return t==g||t==v?e.size:Tr(e).length},On.snakeCase=Ls,On.some=function(e,t,n){var r=Na(e)?_t:Kr;return n&&li(e,t,n)&&(t=void 0),r(e,Xo(t,3))},On.sortedIndex=function(e,t){return Yr(e,t)},On.sortedIndexBy=function(e,t,n){return $r(e,t,Xo(n,2))},On.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Yr(e,t);if(r<n&&Ra(e[r],t))return r}return-1},On.sortedLastIndex=function(e,t){return Yr(e,t,!0)},On.sortedLastIndexBy=function(e,t,n){return $r(e,t,Xo(n,2),!0)},On.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Yr(e,t,!0)-1;if(Ra(e[n],t))return n}return-1},On.startCase=js,On.startsWith=function(e,t,n){return e=cs(e),n=null==n?0:Qn(os(n),0,e.length),t=Xr(t),e.slice(n,n+t.length)==t},On.subtract=mc,On.sum=function(e){return e&&e.length?Ft(e,Ks):0},On.sumBy=function(e,t){return e&&e.length?Ft(e,Xo(t,2)):0},On.template=function(e,t,n){var r=On.templateSettings;n&&li(e,t,n)&&(t=void 0),e=cs(e),t=ds({},t,r,Vo);var o,i,a=ds({},t.imports,r.imports,Vo),s=Es(a),c=It(a,s),l=0,u=t.interpolate||ue,d="__p += '",h=ge((t.escape||ue).source+"|"+u.source+"|"+(u===V?ne:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),p="//# sourceURL="+(we.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ue+"]")+"\n";e.replace(h,(function(t,n,r,a,s,c){return r||(r=a),d+=e.slice(l,c).replace(de,Ut),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(i=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),d+="';\n";var m=we.call(t,"variable")&&t.variable;if(m){if(ee.test(m))throw new $("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(A,""):d).replace(N,"$1").replace(M,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Vs((function(){return he(s,p+"return "+d).apply(void 0,c)}));if(g.source=d,Ba(g))throw g;return g},On.times=function(e,t){if((e=os(e))<1||e>9007199254740991)return[];var n=4294967295,r=cn(e,4294967295);e-=4294967295;for(var o=Ot(r,t=Xo(t));++n<e;)t(n);return o},On.toFinite=rs,On.toInteger=os,On.toLength=is,On.toLower=function(e){return cs(e).toLowerCase()},On.toNumber=as,On.toSafeInteger=function(e){return e?Qn(os(e),-9007199254740991,9007199254740991):0===e?e:0},On.toString=cs,On.toUpper=function(e){return cs(e).toUpperCase()},On.trim=function(e,t,n){if((e=cs(e))&&(n||void 0===t))return Rt(e);if(!e||!(t=Xr(t)))return e;var r=Kt(e),o=Kt(t);return uo(r,Nt(r,o),Mt(r,o)+1).join("")},On.trimEnd=function(e,t,n){if((e=cs(e))&&(n||void 0===t))return e.slice(0,Yt(e)+1);if(!e||!(t=Xr(t)))return e;var r=Kt(e);return uo(r,0,Mt(r,Kt(t))+1).join("")},On.trimStart=function(e,t,n){if((e=cs(e))&&(n||void 0===t))return e.replace(Y,"");if(!e||!(t=Xr(t)))return e;var r=Kt(e);return uo(r,Nt(r,Kt(t))).join("")},On.truncate=function(e,t){var n=30,r="...";if(Ha(t)){var o="separator"in t?t.separator:o;n="length"in t?os(t.length):n,r="omission"in t?Xr(t.omission):r}var i=(e=cs(e)).length;if(Bt(e)){var a=Kt(e);i=a.length}if(n>=i)return e;var s=n-Wt(r);if(s<1)return r;var c=a?uo(a,0,s).join(""):e.slice(0,s);if(void 0===o)return c+r;if(a&&(s+=c.length-s),$a(o)){if(e.slice(s).search(o)){var l,u=c;for(o.global||(o=ge(o.source,cs(re.exec(o))+"g")),o.lastIndex=0;l=o.exec(u);)var d=l.index;c=c.slice(0,void 0===d?s:d)}}else if(e.indexOf(Xr(o),s)!=s){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},On.unescape=function(e){return(e=cs(e))&&j.test(e)?e.replace(P,$t):e},On.uniqueId=function(e){var t=++Ce;return cs(e)+t},On.upperCase=Us,On.upperFirst=Bs,On.each=ca,On.eachRight=la,On.first=Pi,Js(On,(dc={},lr(On,(function(e,t){we.call(On.prototype,t)||(dc[t]=e)})),dc),{chain:!1}),On.VERSION="4.17.21",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){On[e].placeholder=On})),st(["drop","take"],(function(e,t){An.prototype[e]=function(n){n=void 0===n?1:sn(os(n),0);var r=this.__filtered__&&!t?new An(this):this.clone();return r.__filtered__?r.__takeCount__=cn(n,r.__takeCount__):r.__views__.push({size:cn(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},An.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;An.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Xo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");An.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");An.prototype[e]=function(){return this.__filtered__?new An(this):this[n](1)}})),An.prototype.compact=function(){return this.filter(Ks)},An.prototype.find=function(e){return this.filter(e).head()},An.prototype.findLast=function(e){return this.reverse().find(e)},An.prototype.invokeMap=Ur((function(e,t){return"function"==typeof e?new An(this):this.map((function(n){return vr(n,e,t)}))})),An.prototype.reject=function(e){return this.filter(Ta(Xo(e)))},An.prototype.slice=function(e,t){e=os(e);var n=this;return n.__filtered__&&(e>0||t<0)?new An(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=os(t))<0?n.dropRight(-t):n.take(t-e)),n)},An.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},An.prototype.toArray=function(){return this.take(4294967295)},lr(An.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=On[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(On.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof An,c=a[0],l=s||Na(t),u=function(e){var t=o.apply(On,mt([e],a));return r&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var d=this.__chain__,h=!!this.__actions__.length,p=i&&!d,m=s&&!h;if(!i&&l){t=m?t:new An(this);var g=e.apply(t,a);return g.__actions__.push({func:ra,args:[u],thisArg:void 0}),new In(g,d)}return p&&m?e.apply(this,a):(g=this.thru(u),p?r?g.value()[0]:g.value():g)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=be[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);On.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Na(o)?o:[],e)}return this[n]((function(n){return t.apply(Na(n)?n:[],e)}))}})),lr(An.prototype,(function(e,t){var n=On[t];if(n){var r=n.name+"";we.call(yn,r)||(yn[r]=[]),yn[r].push({name:t,func:n})}})),yn[Ro(void 0,2).name]=[{name:"wrapper",func:void 0}],An.prototype.clone=function(){var e=new An(this.__wrapped__);return e.__actions__=vo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=vo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=vo(this.__views__),e},An.prototype.reverse=function(){if(this.__filtered__){var e=new An(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},An.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Na(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=cn(t,e+a);break;case"takeRight":e=sn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,c=s-a,l=r?s:a-1,u=this.__iteratees__,d=u.length,h=0,p=cn(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return ro(e,this.__actions__);var m=[];e:for(;c--&&h<p;){for(var g=-1,f=e[l+=t];++g<d;){var _=u[g],b=_.iteratee,v=_.type,y=b(f);if(2==v)f=y;else if(!y){if(1==v)continue e;break e}}m[h++]=f}return m},On.prototype.at=oa,On.prototype.chain=function(){return na(this)},On.prototype.commit=function(){return new In(this.value(),this.__chain__)},On.prototype.next=function(){void 0===this.__values__&&(this.__values__=ns(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},On.prototype.plant=function(e){for(var t,n=this;n instanceof Dn;){var r=Oi(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},On.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof An){var t=e;return this.__actions__.length&&(t=new An(this)),(t=t.reverse()).__actions__.push({func:ra,args:[Hi],thisArg:void 0}),new In(t,this.__chain__)}return this.thru(Hi)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return ro(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Je&&(On.prototype[Je]=function(){return this}),On}();Ke._=Qt,void 0===(o=function(){return Qt}.call(t,n,t,r))||(r.exports=o)}).call(this)}).call(this,n(23),n(512)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return h}));var r=n(79),o=n.n(r),i=n(3),a=n(96),s=n(93),c=n(2);let l;!function(e){e.NOT_SENT="not_sent",e.ENCRYPTING="encrypting",e.SENDING="sending",e.QUEUED="queued",e.SENT="sent",e.CANCELLED="cancelled"}(l||(l={}));const u={};function d(e){return u[e]||(u[e]=e),u[e]}class h extends i.EventEmitter{constructor(e={}){super(),this.event=e,o()(this,"pushActions",null),o()(this,"_replacingEvent",null),o()(this,"_localRedactionEvent",null),o()(this,"_isCancelled",!1),o()(this,"clearEvent",void 0),o()(this,"senderCurve25519Key",null),o()(this,"claimedEd25519Key",null),o()(this,"forwardingCurve25519KeyChain",[]),o()(this,"untrusted",null),o()(this,"_decryptionPromise",null),o()(this,"retryDecryption",!1),o()(this,"txnId",null),o()(this,"localTimestamp",void 0),o()(this,"sender",null),o()(this,"target",null),o()(this,"status",null),o()(this,"error",null),o()(this,"forwardLooking",!0),o()(this,"verificationRequest",null),["state_key","type","sender","room_id","membership"].forEach(t=>{"string"==typeof e[t]&&(e[t]=d(e[t]))}),["membership","avatar_url","displayname"].forEach(t=>{var n;"string"==typeof(null===(n=e.content)||void 0===n?void 0:n[t])&&(e.content[t]=d(e.content[t]))}),["rel_type"].forEach(t=>{var n,r;"string"==typeof(null===(n=e.content)||void 0===n||null===(r=n["m.relates_to"])||void 0===r?void 0:r[t])&&(e.content["m.relates_to"][t]=d(e.content["m.relates_to"][t]))}),this.txnId=e.txn_id||null,this.localTimestamp=Date.now()-this.getAge()}getEffectiveEvent(){return Object.assign({},this.event,this.clearEvent)}getId(){return this.event.event_id}getSender(){return this.event.sender||this.event.user_id}getType(){return this.clearEvent?this.clearEvent.type:this.event.type}getWireType(){return this.event.type}getRoomId(){return this.event.room_id}getTs(){return this.event.origin_server_ts}getDate(){return this.event.origin_server_ts?new Date(this.event.origin_server_ts):null}getOriginalContent(){return this._localRedactionEvent?{}:this.clearEvent?this.clearEvent.content||{}:this.event.content||{}}getContent(){return this._localRedactionEvent?{}:this._replacingEvent?this._replacingEvent.getContent()["m.new_content"]||{}:this.getOriginalContent()}getWireContent(){return this.event.content||{}}getPrevContent(){return this.getUnsigned().prev_content||this.event.prev_content||{}}getDirectionalContent(){return this.forwardLooking?this.getContent():this.getPrevContent()}getAge(){return this.getUnsigned().age||this.event.age}getLocalAge(){return Date.now()-this.localTimestamp}getStateKey(){return this.event.state_key}isState(){return void 0!==this.event.state_key}makeEncrypted(e,t,n,r){this.clearEvent={type:this.event.type,content:this.event.content},this.event.type=e,this.event.content=t,this.senderCurve25519Key=n,this.claimedEd25519Key=r}isBeingDecrypted(){return null!=this._decryptionPromise}getDecryptionPromise(){return this._decryptionPromise}isDecryptionFailure(){var e,t;return"m.bad.encrypted"===(null===(e=this.clearEvent)||void 0===e||null===(t=e.content)||void 0===t?void 0:t.msgtype)}shouldAttemptDecryption(){return this.isEncrypted()&&!this.isBeingDecrypted()&&!this.clearEvent}async attemptDecryption(e,t={}){if("boolean"==typeof t&&(t={isRetry:t}),!this.isEncrypted())throw new Error("Attempt to decrypt event which isn't encrypted");if(this.clearEvent&&!this.isDecryptionFailure())throw new Error("Attempt to decrypt event which has already been decrypted");return this._decryptionPromise?(a.a.log(`Event ${this.getId()} already being decrypted; queueing a retry`),this.retryDecryption=!0,this._decryptionPromise):(this._decryptionPromise=this.decryptionLoop(e,t),this._decryptionPromise)}cancelAndResendKeyRequest(e,t){const n=this.getWireContent();return e.requestRoomKey({algorithm:n.algorithm,room_id:this.getRoomId(),session_id:n.session_id,sender_key:n.sender_key},this.getKeyRequestRecipients(t),!0)}getKeyRequestRecipients(e){const t=this.getWireContent(),n=[{userId:e,deviceId:"*"}],r=this.getSender();return r!==e&&n.push({userId:r,deviceId:t.device_id}),n}async decryptionLoop(e,t={}){for(await Promise.resolve();;){let n,r;this.retryDecryption=!1;try{e?(n=await e.decryptEvent(this),!0===t.isRetry&&a.a.info(`Decrypted event on retry (id=${this.getId()})`)):n=this.badEncryptedMessage("Encryption not enabled")}catch(e){if("DecryptionError"!==e.name){const n=t.isRetry?"re":"";return a.a.error(`Error ${n}decrypting event (id=${this.getId()}): ${e.stack||e}`),this._decryptionPromise=null,void(this.retryDecryption=!1)}if(r=e,this.retryDecryption){a.a.log(`Got error decrypting event (id=${this.getId()}: `+e+"), but retrying");continue}a.a.warn(`Error decrypting event (id=${this.getId()}): ${e.detailedString}`),n=this.badEncryptedMessage(e.message)}return this._decryptionPromise=null,this.retryDecryption=!1,this.setClearData(n),this.setPushActions(null),void(!1!==t.emit&&this.emit("Event.decrypted",this,r))}}badEncryptedMessage(e){return{clearEvent:{type:"m.room.message",content:{msgtype:"m.bad.encrypted",body:"** Unable to decrypt: "+e+" **"}}}}setClearData(e){this.clearEvent=e.clearEvent,this.senderCurve25519Key=e.senderCurve25519Key||null,this.claimedEd25519Key=e.claimedEd25519Key||null,this.forwardingCurve25519KeyChain=e.forwardingCurve25519KeyChain||[],this.untrusted=e.untrusted||!1}getClearContent(){return this.clearEvent?this.clearEvent.content:null}isEncrypted(){return!this.isState()&&"m.room.encrypted"===this.event.type}getSenderKey(){return this.senderCurve25519Key}getKeysClaimed(){return{ed25519:this.claimedEd25519Key}}getClaimedEd25519Key(){return this.claimedEd25519Key}getForwardingCurve25519KeyChain(){return this.forwardingCurve25519KeyChain}isKeySourceUntrusted(){return this.untrusted}getUnsigned(){return this.event.unsigned||{}}unmarkLocallyRedacted(){const e=this._localRedactionEvent;return this._localRedactionEvent=null,this.event.unsigned&&(this.event.unsigned.redacted_because=null),!!e}markLocallyRedacted(e){this._localRedactionEvent||(this.emit("Event.beforeRedaction",this,e),this._localRedactionEvent=e,this.event.unsigned||(this.event.unsigned={}),this.event.unsigned.redacted_because=e.event)}makeRedacted(e){if(!e.event)throw new Error("invalid redactionEvent in makeRedacted");let t;for(t in this._localRedactionEvent=null,this.emit("Event.beforeRedaction",this,e),this._replacingEvent=null,this.event.unsigned||(this.event.unsigned={}),this.event.unsigned.redacted_because=e.event,this.event)this.event.hasOwnProperty(t)&&(p.has(t)||delete this.event[t]);const n=m[this.getType()]||{},r=this.getContent();for(t in r)r.hasOwnProperty(t)&&(n[t]||delete r[t])}isRedacted(){return Boolean(this.getUnsigned().redacted_because)}isRedaction(){return"m.room.redaction"===this.getType()}getRedactionEvent(){var e,t;return this.isRedacted()?null!==(e=this.clearEvent)&&void 0!==e&&e.unsigned?null===(t=this.clearEvent)||void 0===t?void 0:t.unsigned.redacted_because:this.event.unsigned.redacted_because?this.event.unsigned.redacted_because:{}:null}getPushActions(){return this.pushActions}setPushActions(e){this.pushActions=e}handleRemoteEcho(e){const t=this.getUnsigned(),n=this.getId();this.event=e,t.redacted_because&&(this.event.unsigned||(this.event.unsigned={}),this.event.unsigned.redacted_because=t.redacted_because),this.setStatus(null),this.getId()!==n&&this.emit("Event.localEventIdReplaced",this)}isSending(){return!!this.status}setStatus(e){this.status=e,this.emit("Event.status",this,e)}replaceLocalEventId(e){this.event.event_id=e,this.emit("Event.localEventIdReplaced",this)}isRelation(e){const t=this.getWireContent(),n=t&&t["m.relates_to"];return n&&n.rel_type&&n.event_id&&(e&&n.rel_type===e||!e)}getRelation(){return this.isRelation()?this.getWireContent()["m.relates_to"]:null}makeReplaced(e){this.isRedacted()&&e||this._replacingEvent!==e&&(this._replacingEvent=e,this.emit("Event.replaced",this))}getAssociatedStatus(){return this._replacingEvent?this._replacingEvent.status:this._localRedactionEvent?this._localRedactionEvent.status:this.status}getServerAggregatedRelation(e){const t=this.getUnsigned()["m.relations"];if(t)return t[e]}replacingEventId(){const e=this.getServerAggregatedRelation(s.c.Replace);return e?e.event_id:this._replacingEvent?this._replacingEvent.getId():void 0}replacingEvent(){return this._replacingEvent}replacingEventDate(){const e=this.getServerAggregatedRelation(s.c.Replace);if(e){const t=e.origin_server_ts;if(Number.isFinite(t))return new Date(t)}else if(this._replacingEvent)return this._replacingEvent.getDate()}localRedactionEvent(){return this._localRedactionEvent}getAssociatedId(){const e=this.getRelation();return e?e.event_id:this.isRedaction()?this.event.redacts:void 0}hasAssocation(){return!!this.getAssociatedId()}updateAssociatedId(e){const t=this.getRelation();t?t.event_id=e:this.isRedaction()&&(this.event.redacts=e)}flagCancelled(e=!0){this._isCancelled=e}isCancelled(){return this._isCancelled}toSnapshot(){const e=new h(JSON.parse(JSON.stringify(this.event)));for(const[t,n]of Object.entries(this))"event"!==t&&(e[t]=n);return e}isEquivalentTo(e){if(!e)return!1;if(e===this)return!0;const t=Object(c.k)(this.event),n=Object(c.k)(e.event);return JSON.stringify(t)===JSON.stringify(n)}toJSON(){const e=this.getEffectiveEvent();return this.isEncrypted()?{decrypted:e,encrypted:this.event}:e}setVerificationRequest(e){this.verificationRequest=e}setTxnId(e){this.txnId=e}getTxnId(){return this.txnId}}const p=new Set(["event_id","type","room_id","user_id","sender","state_key","prev_state","content","unsigned","origin_server_ts"]),m={"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(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"i",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"j",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"k",(function(){return p})),n.d(t,"f",(function(){return m})),n.d(t,"l",(function(){return g}));var r=n(211);function o(e,t){if(e.length===t)return e;const n=[];if(e.length>t){const r=Math.round(e.length/t);for(let t=0;t<e.length;t+=r)n.push(e[t])}else{const r=Math.ceil(t/e.length);for(const t of e)n.push(...s(t,r))}return c(n,t,s(e[e.length-1],t))}function i(e,t){if(e.length===t)return e;let n=[];if(e.length>t){for(;n.length>2*t||0===n.length;){n=[];for(let t=1;t<e.length-1;t+=2){const r=(e[t-1]+e[t+1]+e[t])/3;n.push(r)}e=n}return o(n,t)}return o(e,t)}function a(e,t,n){const o=Math.min(...e),i=Math.max(...e);return e.map(e=>Object(r.d)(Object(r.c)(e,o,i),t,n))}function s(e,t){return new Array(t).fill(e)}function c(e,t,n){return e.length===t?e:e.length>t?e.slice(0,t):e.concat(n.slice(0,t-e.length))}function l(e){return e.slice(0,e.length)}function u(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}return!0}function d(e,t){return e.length!==t.length||(!!t.some(t=>!e.includes(t))||!!e.some(e=>!t.includes(e)))}function h(e,t){return{added:t.filter(t=>!e.includes(t)),removed:e.filter(e=>!t.includes(e))}}function p(e,t){return e.filter(e=>t.includes(e))}function m(...e){return Array.from(e.reduce((e,t)=>(t.forEach(t=>e.add(t)),e),new Set))}function g(e,t,n){const r=Array.from(e),[o]=r.splice(t,1);return r.splice(n,0,o),r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(88),c=n.n(s),l=n(86),u=n.n(l),d=n(89),h=n(80);class p extends a.a.Component{constructor(...e){super(...e),o()(this,"onOk",()=>{this.props.onFinished(!0)}),o()(this,"onCancel",()=>{this.props.onFinished(!1)})}render(){const e=d.getComponent("views.dialogs.BaseDialog"),t=d.getComponent("views.elements.DialogButtons");let n="";return this.props.danger&&(n="danger"),a.a.createElement(e,{className:u()("mx_QuestionDialog",this.props.className),onFinished:this.props.onFinished,title:this.props.title,contentId:"mx_Dialog_content",headerImage:this.props.headerImage,hasCancel:this.props.hasCancelButton,fixedWidth:this.props.fixedWidth},a.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},this.props.description),a.a.createElement(t,{primaryButton:this.props.button||Object(h.a)("OK"),primaryButtonClass:n,primaryDisabled:this.props.buttonDisabled,cancelButton:this.props.cancelButton,hasCancel:this.props.hasCancelButton&&!this.props.quitOnly,onPrimaryButtonClick:this.onOk,focus:this.props.focus,onCancel:this.onCancel},this.props.extraButtons))}}o()(p,"propTypes",{title:c.a.string,description:c.a.node,extraButtons:c.a.node,button:c.a.string,buttonDisabled:c.a.bool,danger:c.a.bool,focus:c.a.bool,onFinished:c.a.func.isRequired,headerImage:c.a.string,quitOnly:c.a.bool,fixedWidth:c.a.bool,className:c.a.string}),o()(p,"defaultProps",{title:"",description:"",extraButtons:null,focus:!0,hasCancelButton:!0,danger:!1,quitOnly:!1})},function(e,t,n){"use strict";var r=n(79),o=n.n(r);class i{constructor(){o()(this,"platform",null)}get(){return this.platform}set(e){this.platform=e}}window.mxPlatformPeg||(window.mxPlatformPeg=new i),t.a=window.mxPlatformPeg},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(99),o=n.n(r),i=n(79),a=n.n(i),s=n(180),c=n(2),l=n(80),u=n(111),d=n(90),h=n(82),p=n(126),m=n(91);const g=["count"];function f(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}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b;!function(e){e.Landscape="landscape",e.Portrait="portrait"}(b||(b={}));const v=async e=>{const t=(new TextEncoder).encode(e),n=await window.crypto.subtle.digest("sha-256",t);return[...new Uint8Array(n)].map(e=>e.toString(16).padStart(2,"0")).join("")},y=new Set(["register","login","forgot_password","soft_logout","new","settings","welcome","home","start","directory","start_sso","start_cas","groups","complete_security","post_registration","room","user","group"]);const E=e=>{var t,n;const r=h.a.get(),o=null==r?void 0:r.getRoom(e);return{num_users:null==o?void 0:o.getJoinedMemberCount(),is_encrypted:null==r?void 0:r.isRoomEncrypted(e),is_public:"public"===(null==o||null===(t=o.currentState.getStateEvents("m.room.join_rules",""))||void 0===t||null===(n=t.getContent())||void 0===n?void 0:n.join_rule)}};class S{constructor(){a()(this,"baseUrl",null),a()(this,"appKey",null),a()(this,"userKey",null),a()(this,"anonymous",void 0),a()(this,"appPlatform",void 0),a()(this,"appVersion","unknown"),a()(this,"initTime",S.getTimestamp()),a()(this,"firstPage",!0),a()(this,"heartbeatIntervalId",void 0),a()(this,"activityIntervalId",void 0),a()(this,"trackTime",!0),a()(this,"lastBeat",void 0),a()(this,"storedDuration",0),a()(this,"lastView",void 0),a()(this,"lastViewTime",0),a()(this,"lastViewStoredDuration",0),a()(this,"sessionStarted",!1),a()(this,"heartbeatEnabled",!1),a()(this,"inactivityCounter",0),a()(this,"pendingEvents",[]),a()(this,"lastMsTs",0),a()(this,"getOrientation",()=>window.matchMedia("(orientation: landscape)").matches?b.Landscape:b.Portrait),a()(this,"reportOrientation",()=>{this.track("[CLY]_orientation",{mode:this.getOrientation()})}),a()(this,"endSession",()=>{this.sessionStarted&&(window.removeEventListener("resize",this.reportOrientation),this.reportViewDuration(),this.request({end_session:1,session_duration:S.getTimestamp()-this.lastBeat})),this.sessionStarted=!1}),a()(this,"onVisibilityChange",()=>{document.hidden?this.stopTime():this.startTime()}),a()(this,"onUserActivity",()=>{this.inactivityCounter>=20&&this.startTime(),this.inactivityCounter=0})}static get instance(){return S.internalInstance}get disabled(){return!this.baseUrl}canEnable(){var e,t;const n=d.a.get();return Boolean("1"!==navigator.doNotTrack&&(null==n||null===(e=n.countly)||void 0===e?void 0:e.url)&&(null==n||null===(t=n.countly)||void 0===t?void 0:t.appKey))}async changeUserKey(e,t=!1){const n=this.userKey;this.userKey=e,n&&t&&await this.request({old_device_id:n})}async enable(e=!0){if(!this.disabled&&this.anonymous===e)return;if(!this.canEnable())return;this.disabled||this.request();const t=d.a.get();this.baseUrl=new URL("/i",t.countly.url),this.appKey=t.countly.appKey,this.anonymous=e,e?await this.changeUserKey(Object(s.b)(64)):await this.changeUserKey(await v(h.a.get().getUserId()),!0);const n=u.a.get();this.appPlatform=n.getHumanReadableName();try{this.appVersion=await n.getAppVersion()}catch(e){console.warn("Failed to get app version, using 'unknown'")}this.heartbeatIntervalId=setInterval(this.heartbeat.bind(this),5e3),this.trackSessions(),this.trackErrors()}async disable(){this.disabled||(await this.track("Opt-Out"),this.endSession(),window.clearInterval(this.heartbeatIntervalId),window.clearTimeout(this.activityIntervalId),this.baseUrl=null,window.removeEventListener("beforeunload",this.endSession),window.removeEventListener("unload",this.endSession),window.removeEventListener("visibilitychange",this.onVisibilityChange),window.removeEventListener("mousemove",this.onUserActivity),window.removeEventListener("click",this.onUserActivity),window.removeEventListener("keydown",this.onUserActivity),window.removeEventListener("scroll",this.onUserActivity))}reportFeedback(e,t){this.track("[CLY]_star_rating",{rating:e,comment:t},null,{},!0)}trackPageChange(e){this.disabled||this.trackPageView()}async trackPageView(){this.reportViewDuration(),await Object(c.H)(0);const e=await async function(e=!0){const t=Object(s.b)(8),{origin:n,hash:r}=window.location;let{pathname:o}=window.location;n.startsWith("file://")&&(o=`/<redacted_${t}>/`);let[i,a,...c]=r.split("/");y.has(a)||(a=`<redacted_${t}>`);for(let n=0;n<c.length;n++)c[n]=e?`<redacted_${t}>`:await v(c[n]);const l=n+o+`${i}/${a}/${c.join("/")}`,u={};let d="$/"+r;switch(a){case"room":{d="view_room";const e=p.a.getRoomId();d+=" "+c[0],u.room_id=c[0],Object.assign(u,E(e));break}}return{name:d,url:l,meta:u}}(this.anonymous),t=e.name;this.lastView=t,this.lastViewTime=S.getTimestamp();const n=_(_({},e.meta),{},{name:t,visit:1,domain:window.location.hostname,view:e.url,segment:this.appPlatform,start:this.firstPage});this.firstPage&&(this.firstPage=!1),this.track("[CLY]_view",n)}static getTimestamp(){return Math.floor((new Date).getTime()/1e3)}getMsTimestamp(){const e=(new Date).getTime();return this.lastMsTs>=e?this.lastMsTs++:this.lastMsTs=e,this.lastMsTs}async recordError(e,t=!1){if(this.disabled||this.anonymous)return;let n="";"object"==typeof e?void 0!==e.stack?n=e.stack:(void 0!==e.name&&(n+=e.name+":"),void 0!==e.message&&(n+=e.message+"\n"),void 0!==e.fileName&&(n+="in "+e.fileName+"\n"),void 0!==e.lineNumber&&(n+="on "+e.lineNumber),void 0!==e.columnNumber&&(n+=":"+e.columnNumber)):n=e+"",n=await(async(e,t,n)=>{const r=[];e.replace(t,(...e)=>(r.push(n(...e)),""));const o=await Promise.all(r);return e.replace(t,()=>o.shift())})(n,/([!@+#]).+?:[\w:.]+/g,async(e,t)=>t+await v(e.substring(1)));const r=this.getMetrics(),o={_resolution:null==r?void 0:r._resolution,_error:n,_app_version:this.appVersion,_run:S.getTimestamp()-this.initTime,_nonfatal:!t,_view:this.lastView};void 0!==navigator.onLine&&(o._online=navigator.onLine),o._background=document.hasFocus(),this.request({crash:JSON.stringify(o)})}trackErrors(){window.onerror=(e,t,n,r,o)=>{if(void 0!==o)this.recordError(o,!1);else{let o="";void 0!==e&&(o+=e+"\n"),void 0!==t&&(o+="at "+t),void 0!==n&&(o+=":"+n),void 0!==r&&(o+=":"+r),o+="\n";try{const e=[];let t=arguments.callee.caller;for(;t;)e.push(t.name),t=t.caller;o+=e.join("\n")}catch(e){}this.recordError(o,!1)}},window.addEventListener("unhandledrejection",e=>{var t;this.recordError(new Error(`Unhandled rejection (reason: ${(null===(t=e.reason)||void 0===t?void 0:t.stack)||e.reason}).`),!0)})}heartbeat(){const e={};if(this.sessionStarted&&this.trackTime){const t=S.getTimestamp();t-this.lastBeat>=60&&(e.session_duration=t-this.lastBeat,this.lastBeat=t)}(this.pendingEvents.length>0||e.session_duration)&&this.request(e)}async request(e={}){const t=_(_({app_key:this.appKey,device_id:this.userKey},this.getTimeParams()),e);if(this.pendingEvents.length>0){const e=10,n=this.pendingEvents.splice(0,e);t.events=JSON.stringify(n)}const n=new URLSearchParams(t);try{await window.fetch(this.baseUrl.toString(),{method:"POST",mode:"no-cors",cache:"no-cache",redirect:"follow",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n})}catch(e){console.error("Analytics error: ",e)}}getTimeParams(){const e=new Date;return{timestamp:this.getMsTimestamp(),hour:e.getHours(),dow:e.getDay()}}queue(e){const{count:t=1}=e,n=o()(e,g),r=_(_(_({},this.getTimeParams()),n),{},{count:t,platform:this.appPlatform,app_version:this.appVersion});this.pendingEvents.push(r),this.pendingEvents.length>1e3&&this.pendingEvents.shift()}startTime(){this.trackTime||(this.trackTime=!0,this.lastBeat=S.getTimestamp()-this.storedDuration,this.lastViewTime=S.getTimestamp()-this.lastViewStoredDuration,this.lastViewStoredDuration=0)}stopTime(){this.trackTime&&(this.trackTime=!1,this.storedDuration=S.getTimestamp()-this.lastBeat,this.lastViewStoredDuration=S.getTimestamp()-this.lastViewTime)}getMetrics(){if(this.anonymous)return;const e={};return e._app_version=this.appVersion,e._ua=navigator.userAgent,screen.width&&screen.height&&(e._resolution=`${screen.width}x${screen.height}`),window.devicePixelRatio&&(e._density=window.devicePixelRatio),e._locale=Object(l.d)(),e}async beginSession(e=!0){if(!this.sessionStarted){this.reportOrientation(),window.addEventListener("resize",this.reportOrientation),this.lastBeat=S.getTimestamp(),this.sessionStarted=!0,this.heartbeatEnabled=e;const t={custom:{home_server:h.a.get()&&h.a.getHomeserverName(),anonymous:this.anonymous}},n={begin_session:1,user_details:JSON.stringify(t)},r=this.getMetrics();r&&(n.metrics=JSON.stringify(r)),await this.request(n)}}reportViewDuration(){this.lastView&&(this.track("[CLY]_view",{name:this.lastView},null,{dur:this.trackTime?S.getTimestamp()-this.lastViewTime:this.lastViewStoredDuration}),this.lastView=null)}trackSessions(){this.beginSession(),this.startTime(),window.addEventListener("beforeunload",this.endSession),window.addEventListener("unload",this.endSession),window.addEventListener("visibilitychange",this.onVisibilityChange),window.addEventListener("mousemove",this.onUserActivity),window.addEventListener("click",this.onUserActivity),window.addEventListener("keydown",this.onUserActivity),window.addEventListener("scroll",this.onUserActivity,{passive:!0}),this.activityIntervalId=setInterval(()=>{this.inactivityCounter++,this.inactivityCounter>=20&&this.stopTime()},6e4)}trackBeginInvite(e){this.track("begin_invite",{},e)}trackSendInvite(e,t,n){this.track("send_invite",{},t,{dur:S.getTimestamp()-e,sum:n})}async trackRoomCreate(e,t){if(this.disabled)return;let n=S.getTimestamp();const r=h.a.get();r.getRoom(t)||(await new Promise(e=>{const n=o=>{o.roomId===t&&(r.off("Room",n),e())};r.on("Room",n)}),n=S.getTimestamp()),this.track("create_room",{},t,{dur:n-e})}trackRoomJoin(e,t,n){this.track(m.a.JoinRoom,{type:n},t,{dur:S.getTimestamp()-e})}async trackSendMessage(e,t,n,r,o,i){if(this.disabled)return;const a=h.a.get().getRoom(n),s=(await t).event_id;let c=S.getTimestamp();a.findEventById(s)||(await new Promise(e=>{const t=n=>{n.getId()===s&&(a.off("Room.localEchoUpdated",t),e())};a.on("Room.localEchoUpdated",t)}),c=S.getTimestamp()),this.track("send_message",{is_edit:r,is_reply:o,msgtype:i.msgtype,format:i.format},n,{dur:c-e})}trackStartCall(e,t=!1,n=!1){this.track("start_call",{is_video:t,is_jitsi:n},e)}trackJoinCall(e,t=!1,n=!1){this.track("join_call",{is_video:t,is_jitsi:n},e)}trackRoomDirectoryBegin(){this.track("room_directory")}trackRoomDirectory(e){this.track("room_directory_done",{},null,{dur:S.getTimestamp()-e})}trackRoomDirectorySearch(e,t){this.track("room_directory_search",{query_length:t.length,query_num_words:t.split(" ").length},null,{sum:e})}async track(e,t,n,r,o=!1){if(this.disabled&&!o)return;let i=t||{};n&&(i=_(_({room_id:await v(n)},E(n)),t)),this.queue(_({key:e,count:1,segmentation:i},r)),this.disabled&&o&&await this.request({device_id:Object(s.b)(64)})}}a()(S,"internalInstance",new S),window.mxCountlyAnalytics=S},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.AdvancedEncryption="UIFeature.advancedEncryption",e.URLPreviews="UIFeature.urlPreviews",e.Widgets="UIFeature.widgets",e.Voip="UIFeature.voip",e.Feedback="UIFeature.feedback",e.Registration="UIFeature.registration",e.PasswordReset="UIFeature.passwordReset",e.Deactivate="UIFeature.deactivate",e.ShareQRCode="UIFeature.shareQrCode",e.ShareSocial="UIFeature.shareSocial",e.IdentityServer="UIFeature.identityServer",e.ThirdPartyID="UIFeature.thirdPartyId",e.Flair="UIFeature.flair",e.Communities="UIFeature.communities",e.AdvancedSettings="UIFeature.advancedSettings",e.RoomHistorySettings="UIFeature.roomHistorySettings"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"e",(function(){return f})),n.d(t,"h",(function(){return _})),n.d(t,"g",(function(){return b})),n.d(t,"f",(function(){return v})),n.d(t,"d",(function(){return y})),n.d(t,"k",(function(){return E})),n.d(t,"l",(function(){return S})),n.d(t,"c",(function(){return w})),n.d(t,"j",(function(){return T})),n.d(t,"i",(function(){return x})),n.d(t,"b",(function(){return D}));var r=n(79),o=n.n(r),i=n(994),a=n.n(i),s=n(2),c=n(93),l=n(82),u=n(551),d=n(552);class h extends d.b{constructor(e){if(super(),o()(this,"elementUrl",void 0),this.elementUrl=e,!this.elementUrl.startsWith("http:")&&!this.elementUrl.startsWith("https:"))throw new Error("Element prefix URL does not appear to be an HTTP(S) URL")}forEvent(e,t,n){return`${this.elementUrl}/#/room/${e}/${t}${this.encodeServerCandidates(n)}`}forRoom(e,t){return`${this.elementUrl}/#/room/${e}${this.encodeServerCandidates(t)}`}forUser(e){return`${this.elementUrl}/#/user/${e}`}forGroup(e){return`${this.elementUrl}/#/group/${e}`}forEntity(e){if("!"===e[0]||"#"===e[0])return this.forRoom(e);if("@"===e[0])return this.forUser(e);if("+"===e[0])return this.forGroup(e);throw new Error("Unrecognized entity")}isPermalinkHost(e){const t=new URL(this.elementUrl);return e===(t.host||t.hostname)}encodeServerCandidates(e){return e&&0!==e.length?"?via="+e.map(e=>encodeURIComponent(e)).join("&via="):""}parsePermalink(e){if(!e||!e.startsWith(this.elementUrl))throw new Error("Does not appear to be a permalink");const t=e.substring((this.elementUrl+"/#/").length);return h.parseAppRoute(t)}static parseAppRoute(e){const t=e.split("/");if(t.length<2)throw new Error("URL is missing parts");const[n]=t.splice(-1,1),[r,o=""]=n.split("?");t.push(r);const i=t[0],a=t[1];if("user"===i)return d.a.forUser(a);if("group"===i)return d.a.forGroup(a);if("room"===i){const e=t.length>2?t.slice(2).join("/"):"",n=o.split(/&?via=/).filter(e=>!!e);return d.a.forEvent(a,e,n)}throw new Error("Unknown entity type in permalink")}}var p=n(390),m=n(90);class g{constructor(e,t=null){if(o()(this,"room",void 0),o()(this,"roomId",void 0),o()(this,"highestPlUserId",void 0),o()(this,"populationMap",void 0),o()(this,"bannedHostsRegexps",void 0),o()(this,"allowedHostsRegexps",void 0),o()(this,"_serverCandidates",void 0),o()(this,"started",void 0),o()(this,"onRoomState",e=>{switch(e.getType()){case c.a.RoomServerAcl:return this.updateAllowedServers(),this.updateHighestPlUser(),this.updatePopulationMap(),void this.updateServerCandidates();case c.a.RoomPowerLevels:return this.updateHighestPlUser(),void this.updateServerCandidates()}}),o()(this,"onMembership",(e,t,n)=>{const r=t.userId,o=t.membership,i=k(r),a="join"!==n&&"join"===o;"join"===n&&"join"!==o?this.populationMap[i]--:a&&this.populationMap[i]++,this.updateHighestPlUser(),this.updateServerCandidates()}),this.room=e,this.roomId=e?e.roomId:t,this.highestPlUserId=null,this.populationMap=null,this.bannedHostsRegexps=null,this.allowedHostsRegexps=null,this._serverCandidates=null,this.started=!1,!this.roomId)throw new Error("Failed to resolve a roomId for the permalink creator to use")}load(){this.room&&this.room.currentState?(this.updateAllowedServers(),this.updateHighestPlUser(),this.updatePopulationMap(),this.updateServerCandidates()):console.warn("Tried to load a permalink creator with no room state")}start(){this.load(),this.room.on("RoomMember.membership",this.onMembership),this.room.on("RoomState.events",this.onRoomState),this.started=!0}stop(){this.room.removeListener("RoomMember.membership",this.onMembership),this.room.removeListener("RoomState.events",this.onRoomState),this.started=!1}get serverCandidates(){return this._serverCandidates}isStarted(){return this.started}forEvent(e){return C().forEvent(this.roomId,e,this._serverCandidates)}forShareableRoom(){if(this.room){const e=this.room.getCanonicalAlias();if(e)return C().forRoom(e)}return C().forRoom(this.roomId,this._serverCandidates)}forRoom(){return C().forRoom(this.roomId,this._serverCandidates)}updateHighestPlUser(){const e=this.room.currentState.getStateEvents("m.room.power_levels","");if(e){const t=e.getContent();if(t){const e=t.users;if(e){const t=Object.entries(e).filter(([e])=>{const t=this.room.getMember(e);if(!t||"join"!==t.membership)return!1;const n=k(e);return!R(n)&&!O(n,this.bannedHostsRegexps)&&O(n,this.allowedHostsRegexps)}).reduce((e,t)=>t[1]>e[1]?t:e,[null,0]),[n,r]=t;if(null!==n&&r>=50)return void(this.highestPlUserId=n)}}}this.highestPlUserId=null}updateAllowedServers(){const e=[];let t=[new RegExp(".*")];if(this.room.currentState){const n=this.room.currentState.getStateEvents("m.room.server_acl","");if(n&&n.getContent()){const r=e=>new RegExp("^"+s.s(e,!1)+"$");(n.getContent().deny||[]).forEach(t=>e.push(r(t)));const o=n.getContent().allow||[];t=[],o.forEach(e=>t.push(r(e)))}}this.bannedHostsRegexps=e,this.allowedHostsRegexps=t}updatePopulationMap(){const e={};for(const t of this.room.getJoinedMembers()){const n=k(t.userId);e[n]||(e[n]=0),e[n]++}this.populationMap=e}updateServerCandidates(){let e=[];this.highestPlUserId&&e.push(k(this.highestPlUserId));const t=Object.keys(this.populationMap).sort((e,t)=>this.populationMap[t]-this.populationMap[e]).filter(t=>!e.includes(t)&&!R(t)&&!O(t,this.bannedHostsRegexps)&&O(t,this.allowedHostsRegexps)).slice(0,3-e.length);e=e.concat(t),this._serverCandidates=e}}function f(e){return C().forEntity(e)}function _(e){return C().forUser(e)}function b(e){if(!e)throw new Error("can't permalink a falsey roomId");if("!"!==e[0])return C().forRoom(e,[]);const t=l.a.get().getRoom(e);if(!t)return C().forRoom(e,[]);const n=new g(t);return n.load(),n.forShareableRoom()}function v(e){return C().forGroup(e)}function y(e){return!!(new u.b).isPermalinkHost(e)||C().isPermalinkHost(e)}function E(e){return e?"#"===e[0]||"!"===e[0]?b(e):"@"===e[0]?_(e):"+"===e[0]?v(e):S(e):null}function S(e){if(!e.startsWith("http:")&&!e.startsWith("https:"))return e;try{const t=decodeURIComponent(e).match(p.a.ELEMENT_URL_PATTERN);if(t)return t[1]}catch(t){return e}try{const t=T(e);if(t)if(t.roomIdOrAlias){const n=t.eventId?"/"+t.eventId:"";e=`#/room/${t.roomIdOrAlias}${n}`,t.viaServers.length>0&&(e+=(new u.b).encodeServerCandidates(t.viaServers))}else t.groupId?e="#/group/"+t.groupId:t.userId&&(e="#/user/"+t.userId)}catch(e){}return e}function w(e){try{let t=T(e);if(!t){const n=e.match(p.a.ELEMENT_URL_PATTERN);if(n){const e=new h("http://localhost"),r=n[1].split("#").slice(1).join("#");t=e.parsePermalink("http://localhost/#"+r)}}if(!t)return null;if(t.userId)return t.userId;if(t.groupId)return t.groupId;if(t.roomIdOrAlias)return t.roomIdOrAlias}catch(e){}return null}function C(){const e=m.a.get().permalinkPrefix;return e&&e!==u.a?new h(e):new u.b}function T(e){const t=m.a.get().permalinkPrefix;return decodeURIComponent(e).startsWith(u.a)?(new u.b).parsePermalink(decodeURIComponent(e)):t&&e.startsWith(t)?new h(t).parsePermalink(e):null}function x(e){try{const t=e.replace("#/","");return h.parseAppRoute(t)}catch(e){}return null}function k(e){return e.split(":").splice(1).join(":")}function F(e){return e?new URL("https://"+e).hostname:null}function O(e,t){if(!(e=F(e)))return!0;if(t.length>0&&!t[0].test)throw new Error(t[0].toString());return t.filter(t=>t.test(e)).length>0}function R(e){return!!(e=F(e))&&(e.startsWith("[")&&e.endsWith("]")&&(e=e.substring(1,e.length-1)),a()(e))}const D=e=>{const t=new g(e);return t.load(),t.serverCandidates}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(3),a=n(947),s=n.n(a);const c="update";class l extends i.EventEmitter{constructor(e,t={}){super(),this.dispatcher=e,o()(this,"storeState",void 0),o()(this,"lock",new s.a),o()(this,"dispatcherRef",void 0),this.dispatcherRef=e.register(this.onDispatch.bind(this)),this.storeState=t}get state(){return this.storeState}stop(){this.dispatcherRef&&this.dispatcher.unregister(this.dispatcherRef)}async updateState(e){await this.lock.acquireAsync();try{this.storeState=Object.freeze(Object.assign({},this.storeState,e)),this.emit(c,this)}finally{await this.lock.release()}}async reset(e=null,t=!1){await this.lock.acquireAsync();try{this.storeState=Object.freeze(e||{}),t||this.emit(c,this)}finally{await this.lock.release()}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(81);let m=Object(p.a)("views.elements.DialogButtons")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"_onCancelClick",()=>{this.props.onCancel()})}render(){let e,t="mx_Dialog_primary";this.props.primaryButtonClass&&(t+=" "+this.props.primaryButtonClass),(this.props.cancelButton||this.props.hasCancel)&&(e=l.a.createElement("button",{type:"button",onClick:this._onCancelClick,className:this.props.cancelButtonClass,disabled:this.props.disabled},this.props.cancelButton||Object(h.a)("Cancel")));let n=null;return this.props.additive&&(n=l.a.createElement("div",{className:"mx_Dialog_buttons_additive"},this.props.additive)),l.a.createElement("div",{className:"mx_Dialog_buttons"},n,e,this.props.children,l.a.createElement("button",{type:this.props.primaryIsSubmit?"submit":"button",className:t,onClick:this.props.onPrimaryButtonClick,autoFocus:this.props.focus,disabled:this.props.disabled||this.props.primaryDisabled},this.props.primaryButton))}},s()(o,"propTypes",{primaryButton:d.a.node.isRequired,cancelButton:d.a.node,primaryIsSubmit:d.a.bool,onPrimaryButtonClick:d.a.func,hasCancel:d.a.bool,cancelButtonClass:d.a.node,onCancel:d.a.func,focus:d.a.bool,disabled:d.a.bool,primaryDisabled:d.a.bool,additive:d.a.element}),s()(o,"defaultProps",{hasCancel:!0,disabled:!1}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l);const d=["className","onScroll","onWheel","style","tabIndex","wrappedRef","children"];class h extends u.a.Component{constructor(...e){super(...e),c()(this,"containerRef",u.a.createRef())}componentDidMount(){this.containerRef.current&&this.props.onScroll&&this.containerRef.current.addEventListener("scroll",this.props.onScroll,{passive:!0}),this.props.wrappedRef&&this.props.wrappedRef(this.containerRef.current)}componentWillUnmount(){this.containerRef.current&&this.props.onScroll&&this.containerRef.current.removeEventListener("scroll",this.props.onScroll)}getScrollTop(){return this.containerRef.current.scrollTop}render(){const e=this.props,{className:t,onScroll:n,onWheel:r,style:i,tabIndex:s,wrappedRef:c,children:l}=e,h=a()(e,d);return u.a.createElement("div",o()({},h,{ref:this.containerRef,style:i,className:["mx_AutoHideScrollbar",t].join(" "),onWheel:r,tabIndex:s}),l)}}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(86),h=n.n(d),p=n(120),m=n(292),g=n(82),f=n(87),_=n(196),b=n(122),v=n(81),y=n(100);const E=["room","oobData","viewAvatarOnClick","onClick","className"];var S,w,C;let T=Object(v.a)("views.avatars.RoomAvatar")((C=w=class e extends u.a.Component{constructor(t){super(t),c()(this,"onRoomStateEvents",t=>{this.props.room&&t.getRoomId()===this.props.room.roomId&&"m.room.avatar"===t.getType()&&this.setState({urls:e.getImageUrls(this.props)})}),c()(this,"onRoomAvatarClick",()=>{const e={src:_.b(this.props.room,null,null,null),name:this.props.room.name};f.a.createDialog(m.a,e,"mx_Dialog_lightbox",null,!0)}),this.state={urls:e.getImageUrls(this.props)}}componentDidMount(){g.a.get().on("RoomState.events",this.onRoomStateEvents)}componentWillUnmount(){const e=g.a.get();e&&e.removeListener("RoomState.events",this.onRoomStateEvents)}static getDerivedStateFromProps(t){return{urls:e.getImageUrls(t)}}static getImageUrls(t){let n=null;return t.oobData.avatarUrl&&(n=Object(y.b)(t.oobData.avatarUrl).getThumbnailOfSourceHttp(t.width,t.height,t.resizeMethod)),[n,e.getRoomAvatarUrl(t)].filter((function(e){return null!==e&&""!==e}))}static getRoomAvatarUrl(e){return e.room?_.b(e.room,e.width,e.height,e.resizeMethod):null}render(){var e;const t=this.props,{room:n,oobData:r,viewAvatarOnClick:i,onClick:s,className:c}=t,l=a()(t,E),d=n?n.name:r.name,m=n?null!==(e=b.a.shared().getUserIdForRoomId(n.roomId))&&void 0!==e?e:n.roomId:r.roomId;return u.a.createElement(p.a,o()({},l,{className:h()(c,{mx_RoomAvatar_isSpaceRoom:null==n?void 0:n.isSpaceRoom()}),name:d,idName:m,urls:this.state.urls,onClick:i&&this.state.urls[0]?this.onRoomAvatarClick:s}))}},c()(w,"defaultProps",{width:36,height:36,resizeMethod:"crop",oobData:{}}),S=C))||S},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(86),u=n.n(l),d=n(196),h=n(84),p=n(85),m=n(164),g=n(94),f=n(127),_=n(332),b=n(80);const v=["name","idName","title","url","urls","width","height","resizeMethod","defaultToInitialLetter","onClick","inputRef","className"],y=(e,t,n)=>{let r=[];return n||(r=t||[],e&&(r=[e,...r])),Array.from(new Set(r))};t.a=e=>{const{name:t,idName:n,title:r,url:i,urls:l,width:E=40,height:S=40,resizeMethod:w="crop",defaultToInitialLetter:C=!0,onClick:T,inputRef:x,className:k}=e,F=a()(e,v),[O,R]=(({url:e,urls:t})=>{const n=Object(s.useContext)(m.a),r=n?n.lowBandwidth:h.b.getValue("lowBandwidth"),[o,i]=Object(s.useState)(y(e,t,r)),[a,c]=Object(s.useState)(0),l=Object(s.useCallback)(()=>{c(e=>e+1)},[]);Object(s.useEffect)(()=>{i(y(e,t,r)),c(0)},[e,JSON.stringify(t)]);const u=Object(s.useContext)(g.a),d=Object(s.useCallback)((e,t)=>{"ERROR"!==e&&t!==e&&c(0)},[]);Object(f.a)(u,"sync",d);return[o[a],l]})({url:i,urls:l});if(!O&&C){const e=d.e(t),i=c.a.createElement("span",{className:"mx_BaseAvatar_initial","aria-hidden":"true",style:{fontSize:Object(_.a)(.65*E),width:Object(_.a)(E),lineHeight:Object(_.a)(S)}},e),a=c.a.createElement("img",{className:"mx_BaseAvatar_image",src:d.d(n||t),alt:"",title:r,onError:R,style:{width:Object(_.a)(E),height:Object(_.a)(S)},"aria-hidden":"true"});return T?c.a.createElement(p.a,o()({"aria-label":Object(b.a)("Avatar")},F,{element:"span",className:u()("mx_BaseAvatar",k),onClick:T,inputRef:x}),i,a):c.a.createElement("span",o()({className:u()("mx_BaseAvatar",k),ref:x},F,{role:"presentation"}),i,a)}return T?c.a.createElement(p.a,o()({className:u()("mx_BaseAvatar mx_BaseAvatar_image",k),element:"img",src:O,onClick:T,onError:R,style:{width:Object(_.a)(E),height:Object(_.a)(S)},title:r,alt:Object(b.a)("Avatar"),inputRef:x},F)):c.a.createElement("img",o()({className:u()("mx_BaseAvatar mx_BaseAvatar_image",k),src:O,onError:R,style:{width:Object(_.a)(E),height:Object(_.a)(S)},title:r,alt:"",ref:x},F))}},function(e,t,n){"use strict";let r;n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),function(e){e.RoomMemberList="RoomMemberList",e.FilePanel="FilePanel",e.NotificationPanel="NotificationPanel",e.RoomMemberInfo="RoomMemberInfo",e.EncryptionPanel="EncryptionPanel",e.RoomSummary="RoomSummary",e.Widget="Widget",e.PinnedMessages="PinnedMessages",e.Room3pidMemberInfo="Room3pidMemberInfo",e.GroupMemberList="GroupMemberList",e.GroupRoomList="GroupRoomList",e.GroupRoomInfo="GroupRoomInfo",e.GroupMemberInfo="GroupMemberInfo",e.SpaceMemberList="SpaceMemberList",e.SpaceMemberInfo="SpaceMemberInfo",e.Space3pidMemberInfo="Space3pidMemberInfo"}(r||(r={}));const o=[r.RoomSummary,r.NotificationPanel,r.PinnedMessages,r.FilePanel,r.RoomMemberList,r.GroupMemberList,r.GroupRoomList],i=[r.SpaceMemberList,r.Space3pidMemberInfo,r.SpaceMemberInfo]},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(107),a=n(82);class s{constructor(e){this.matrixClient=e,o()(this,"roomToUser",null),o()(this,"userToRooms",null),o()(this,"hasSentOutPatchDirectAccountDataPatch",void 0),o()(this,"mDirectEvent",void 0),o()(this,"onAccountData",e=>{"m.direct"==e.getType()&&(this.mDirectEvent=this.matrixClient.getAccountData("m.direct").getContent()||{},this.userToRooms=null,this.roomToUser=null)}),this.hasSentOutPatchDirectAccountDataPatch=!1;const t=e.getAccountData("m.direct");this.mDirectEvent=t?t.getContent():{}}static makeShared(){return s.sharedInstance=new s(a.a.get()),s.sharedInstance}static setShared(e){s.sharedInstance=e}static shared(){return s.sharedInstance}start(){this.populateRoomToUser(),this.matrixClient.on("accountData",this.onAccountData)}stop(){this.matrixClient.removeListener("accountData",this.onAccountData)}patchUpSelfDMs(e){const t=this.matrixClient.getUserId(),n=e[t];if(n){const r=n.map(e=>{const n=this.matrixClient.getRoom(e);if(n){const r=n.guessDMUserId();if(r&&r!==t)return{userId:r,roomId:e}}}).filter(e=>!!e);return!!r.length&&(e[t]=n.filter(e=>!r.some(t=>t.roomId===e)),r.forEach(({userId:t,roomId:n})=>{const r=e[t];r?(r.push(n),e[t]=Object(i.uniq)(r)):e[t]=[n]}),!0)}}getDMRoomsForUserId(e){return this.getUserToRooms()[e]||[]}getDMRoomForIdentifiers(e){let t=this.getDMRoomsForUserId(e[0]);for(let n=1;n<e.length;n++){const r=this.getDMRoomsForUserId(e[n]);t=t.filter(e=>r.includes(e))}return t.map(e=>a.a.get().getRoom(e)).filter(e=>e&&"join"===e.getMyMembership())[0]}getUserIdForRoomId(e){if(null==this.roomToUser&&this.populateRoomToUser(),void 0===this.roomToUser[e]){const t=this.matrixClient.getRoom(e);if(t)return t.getDMInviter()}return this.roomToUser[e]}getUniqueRoomsWithIndividuals(){return this.roomToUser?Object.keys(this.roomToUser).map(e=>({userId:this.getUserIdForRoomId(e),room:this.matrixClient.getRoom(e)})).filter(e=>e.userId&&e.room&&2===e.room.getInvitedAndJoinedMemberCount()).reduce((e,t)=>(e[t.userId]=t.room)&&e,{}):{}}getUserToRooms(){if(!this.userToRooms){const e=this.mDirectEvent,t=e[this.matrixClient.getUserId()];if(t&&t.length){const t=this.patchUpSelfDMs(e);console.warn("Invalid m.direct account data detected (self-chats that shouldn't be), patching it up."),t&&!this.hasSentOutPatchDirectAccountDataPatch&&(this.hasSentOutPatchDirectAccountDataPatch=!0,this.matrixClient.setAccountData("m.direct",e))}this.userToRooms=e}return this.userToRooms}populateRoomToUser(){this.roomToUser={};for(const e of Object.keys(this.getUserToRooms()))for(const t of this.userToRooms[e])this.roomToUser[t]=e}}o()(s,"sharedInstance",void 0)},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(3),a=n.n(i),s=n(389),c=n(162),l=n(82),u=n(83);function d(e){return e.chunk.map(e=>Object(s.c)(e))}function h(e){return e.chunk.map(e=>Object(s.d)(e))}let p=0;const m=[];async function g(e){p>=3&&await new Promise((e,t)=>{m.push(e)}),p++;try{return await e()}catch(e){throw e}finally{p--,function(){const e=m.shift();"function"==typeof e&&e()}()}}class f extends a.a{constructor(){super(),o()(this,"STATE_KEY",{GroupMembers:"GroupMembers",GroupInvitedMembers:"GroupInvitedMembers",Summary:"Summary",GroupRooms:"GroupRooms"}),this._state={},this._state[this.STATE_KEY.Summary]={},this._state[this.STATE_KEY.GroupRooms]={},this._state[this.STATE_KEY.GroupMembers]={},this._state[this.STATE_KEY.GroupInvitedMembers]={},this._ready={},this._ready[this.STATE_KEY.Summary]={},this._ready[this.STATE_KEY.GroupRooms]={},this._ready[this.STATE_KEY.GroupMembers]={},this._ready[this.STATE_KEY.GroupInvitedMembers]={},this._fetchResourcePromise={[this.STATE_KEY.Summary]:{},[this.STATE_KEY.GroupRooms]:{},[this.STATE_KEY.GroupMembers]:{},[this.STATE_KEY.GroupInvitedMembers]:{}},this._resourceFetcher={[this.STATE_KEY.Summary]:e=>g(()=>l.a.get().getGroupSummary(e)),[this.STATE_KEY.GroupRooms]:e=>g(()=>l.a.get().getGroupRooms(e).then(h)),[this.STATE_KEY.GroupMembers]:e=>g(()=>l.a.get().getGroupUsers(e).then(d)),[this.STATE_KEY.GroupInvitedMembers]:e=>g(()=>l.a.get().getGroupInvitedUsers(e).then(d))}}_fetchResource(e,t){if(this._fetchResourcePromise[e][t])return;const n=this._resourceFetcher[e](t);return this._fetchResourcePromise[e][t]=n,n.then(n=>{this._state[e][t]=n,this._ready[e][t]=!0,this._notifyListeners()}).catch(n=>{e===this.STATE_KEY.GroupInvitedMembers&&403===n.httpStatus||(console.error(`Failed to get resource ${e} for ${t}`,n),this.emit("error",n,t,e))}).finally(()=>{delete this._fetchResourcePromise[e][t]}),n}_notifyListeners(){this.emit("update")}registerListener(e,t){return this.on("update",t),this.emit("update"),e&&(this._fetchResource(this.STATE_KEY.Summary,e),this._fetchResource(this.STATE_KEY.GroupRooms,e),this._fetchResource(this.STATE_KEY.GroupMembers,e),this._fetchResource(this.STATE_KEY.GroupInvitedMembers,e)),{unregister:()=>{this.unregisterListener(t)}}}unregisterListener(e){this.removeListener("update",e)}isStateReady(e,t){return this._ready[t][e]}getGroupIdsForRoomId(e){return Object.keys(this._state[this.STATE_KEY.GroupRooms]).filter(t=>(this._state[this.STATE_KEY.GroupRooms][t]||[]).some(t=>t.roomId===e))}getSummary(e){return this._state[this.STATE_KEY.Summary][e]||{}}getGroupRooms(e){return this._state[this.STATE_KEY.GroupRooms][e]||[]}getGroupMembers(e){return this._state[this.STATE_KEY.GroupMembers][e]||[]}getGroupInvitedMembers(e){return this._state[this.STATE_KEY.GroupInvitedMembers][e]||[]}getGroupPublicity(e){return(this._state[this.STATE_KEY.Summary][e]||{}).user?(this._state[this.STATE_KEY.Summary][e]||{}).user.is_publicised:null}isUserPrivileged(e){return(this._state[this.STATE_KEY.Summary][e]||{}).user?(this._state[this.STATE_KEY.Summary][e]||{}).user.is_privileged:null}refreshGroupRooms(e){return this._fetchResource(this.STATE_KEY.GroupRooms,e)}refreshGroupMembers(e){return this._fetchResource(this.STATE_KEY.GroupMembers,e)}addRoomToGroup(e,t,n){return l.a.get().addRoomToGroup(e,t,n).then(this._fetchResource.bind(this,this.STATE_KEY.GroupRooms,e))}updateGroupRoomVisibility(e,t,n){return l.a.get().updateGroupRoomVisibility(e,t,n).then(this._fetchResource.bind(this,this.STATE_KEY.GroupRooms,e))}removeRoomFromGroup(e,t){return l.a.get().removeRoomFromGroup(e,t).then(this._fetchResource.bind(this,this.STATE_KEY.Summary,e)).then(this._fetchResource.bind(this,this.STATE_KEY.GroupRooms,e))}inviteUserToGroup(e,t){return l.a.get().inviteUserToGroup(e,t).then(this._fetchResource.bind(this,this.STATE_KEY.GroupInvitedMembers,e))}acceptGroupInvite(e){return l.a.get().acceptGroupInvite(e).then(this._fetchResource.bind(this,this.STATE_KEY.Summary,e)).then(this._fetchResource.bind(this,this.STATE_KEY.GroupRooms,e)).then(this._fetchResource.bind(this,this.STATE_KEY.GroupMembers,e)).then(this._fetchResource.bind(this,this.STATE_KEY.GroupInvitedMembers,e))}joinGroup(e){return l.a.get().joinGroup(e).then(this._fetchResource.bind(this,this.STATE_KEY.Summary,e)).then(this._fetchResource.bind(this,this.STATE_KEY.GroupRooms,e)).then(this._fetchResource.bind(this,this.STATE_KEY.GroupMembers,e)).then(this._fetchResource.bind(this,this.STATE_KEY.GroupInvitedMembers,e))}leaveGroup(e){return u.a.dispatch({action:"deselect_tags",tag:e}),l.a.get().leaveGroup(e).then(this._fetchResource.bind(this,this.STATE_KEY.Summary,e)).then(this._fetchResource.bind(this,this.STATE_KEY.GroupRooms,e)).then(this._fetchResource.bind(this,this.STATE_KEY.GroupMembers,e))}addRoomToGroupSummary(e,t,n){return l.a.get().addRoomToGroupSummary(e,t,n).then(this._fetchResource.bind(this,this.STATE_KEY.Summary,e))}addUserToGroupSummary(e,t,n){return l.a.get().addUserToGroupSummary(e,t,n).then(this._fetchResource.bind(this,this.STATE_KEY.Summary,e))}removeRoomFromGroupSummary(e,t){return l.a.get().removeRoomFromGroupSummary(e,t).then(this._fetchResource.bind(this,this.STATE_KEY.Summary,e))}removeUserFromGroupSummary(e,t){return l.a.get().removeUserFromGroupSummary(e,t).then(this._fetchResource.bind(this,this.STATE_KEY.Summary,e))}setGroupPublicity(e,t){return l.a.get().setGroupPublicity(e,t).then(()=>{c.a.invalidatePublicisedGroups(l.a.get().credentials.userId)}).then(this._fetchResource.bind(this,this.STATE_KEY.Summary,e))}}let _=null;_||(_=new f),t.a=_},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(80),c=n(111),l=n(90),u=n(87),d=n(89);function h(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}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const m=/#\/(groups?|room|user|settings|register|login|forgot_password|home|directory)/,g=/#\/(group|room|user)\/.*$/;function f(){const{origin:e,hash:t}=window.location;let{pathname:n}=window.location;return e.startsWith("file://")&&(n="/<redacted>/"),e+n+function(e){return m.exec(e)?g.test(e)?e.replace(g,"#/$1/<redacted>"):e.replace(m,"#/$1"):(console.warn(`Unexpected hash location "${e}"`),"#/<unexpected hash location>")}(t)}const _={"App Platform":{id:1,expl:Object(s.b)("The platform you're on"),example:"Electron Platform"},"App Version":{id:2,expl:Object(s.b)("The version of %(brand)s"),getTextVariables:()=>({brand:l.a.get().brand}),example:"15.0.0"},"User Type":{id:3,expl:Object(s.b)("Whether or not you're logged in (we don't record your username)"),example:"Logged In"},"Chosen Language":{id:4,expl:Object(s.b)("Your language of choice"),example:"en"},Instance:{id:5,expl:Object(s.b)("Which officially provided instance you are using, if any"),example:"app"},"RTE: Uses Richtext Mode":{id:6,expl:Object(s.b)("Whether or not you're using the Richtext mode of the Rich Text Editor"),example:"off"},"Homeserver URL":{id:7,expl:Object(s.b)("Your homeserver's URL"),example:"https://matrix.org"},"Touch Input":{id:8,expl:Object(s.b)("Whether you're using %(brand)s on a device where touch is the primary input mechanism"),getTextVariables:()=>({brand:l.a.get().brand}),example:"false"},Breadcrumbs:{id:9,expl:Object(s.b)("Whether or not you're using the 'breadcrumbs' feature (avatars above the room list)"),example:"disabled"},"Installed PWA":{id:10,expl:Object(s.b)("Whether you're using %(brand)s as an installed Progressive Web App"),getTextVariables:()=>({brand:l.a.get().brand}),example:"false"}};const b="mx_Riot_Analytics_uid";class v{constructor(){o()(this,"baseUrl",null),o()(this,"siteId",null),o()(this,"visitVariables",{}),o()(this,"firstPage",!0),o()(this,"heartbeatIntervalID",null),o()(this,"creationTs",void 0),o()(this,"lastVisitTs",void 0),o()(this,"visitCount",void 0),o()(this,"showDetailsModal",()=>{let e=[];e=this.disabled?Object.keys(_).map(e=>[e,Object(s.a)("e.g. %(exampleValue)s",{exampleValue:_[e].example})]):Object.values(this.visitVariables);const t=`${window.screen.width}x${window.screen.height}`,n=[{expl:Object(s.b)("Every page you use in the app"),value:Object(s.a)("e.g. <CurrentPageURL>",{},{CurrentPageURL:f})},{expl:Object(s.b)("Your user agent"),value:navigator.userAgent},{expl:Object(s.b)("Your device resolution"),value:t}],r=d.getComponent("dialogs.ErrorDialog");u.a.createTrackedDialog("Analytics Details","",r,{title:Object(s.a)("Analytics"),description:a.a.createElement("div",{className:"mx_AnalyticsModal"},a.a.createElement("div",null,Object(s.a)("The information being sent to us to help make %(brand)s better includes:",{brand:l.a.get().brand})),a.a.createElement("table",null,e.map(e=>a.a.createElement("tr",{key:e[0]},a.a.createElement("td",null,Object(s.a)(_[e[0]].expl,_[e[0]].getTextVariables?_[e[0]].getTextVariables():null)),void 0!==e[1]&&a.a.createElement("td",null,a.a.createElement("code",null,e[1])))),n.map((e,t)=>a.a.createElement("tr",{key:t},a.a.createElement("td",null,Object(s.a)(e.expl)),a.a.createElement("td",null,a.a.createElement("code",null,e.value))))),a.a.createElement("div",null,Object(s.a)("Where this page includes identifiable information, such as a room, user or group ID, that data is removed before being sent to the server.")))})}),this.creationTs=localStorage&&localStorage.getItem("mx_Riot_Analytics_cts"),!this.creationTs&&localStorage&&localStorage.setItem("mx_Riot_Analytics_cts",this.creationTs=String((new Date).getTime())),this.lastVisitTs=localStorage&&localStorage.getItem("mx_Riot_Analytics_lvts"),this.visitCount=localStorage&&localStorage.getItem("mx_Riot_Analytics_vc")||"0",this.visitCount=String(parseInt(this.visitCount,10)+1),localStorage&&localStorage.setItem("mx_Riot_Analytics_vc",this.visitCount)}get disabled(){return!this.baseUrl}canEnable(){const e=l.a.get();return"1"!==navigator.doNotTrack&&e&&e.piwik&&e.piwik.url&&e.piwik.siteId}async enable(){if(!this.disabled)return;if(!this.canEnable())return;const e=l.a.get();this.baseUrl=new URL("piwik.php",e.piwik.url),this.baseUrl.searchParams.set("rec","1"),this.baseUrl.searchParams.set("idsite",e.piwik.siteId),this.baseUrl.searchParams.set("apiv","1"),this.baseUrl.searchParams.set("send_image","0"),this.baseUrl.searchParams.set("_id",function(){try{let e=localStorage&&localStorage.getItem(b);return!e&&localStorage&&localStorage.setItem(b,e=[...Array(16)].map(()=>Math.random().toString(16)[2]).join("")),e}catch(e){return console.error("Analytics error: ",e),""}}()),this.baseUrl.searchParams.set("_idts",this.creationTs),this.baseUrl.searchParams.set("_idvc",this.visitCount),this.lastVisitTs&&this.baseUrl.searchParams.set("_viewts",this.lastVisitTs);const t=c.a.get();this.setVisitVariable("App Platform",t.getHumanReadableName());try{this.setVisitVariable("App Version",await t.getAppVersion())}catch(e){this.setVisitVariable("App Version","unknown")}this.setVisitVariable("Chosen Language",Object(s.d)());const n=window.location.hostname;"riot.im"===n?this.setVisitVariable("Instance",window.location.pathname):n.endsWith(".element.io")&&this.setVisitVariable("Instance",n.replace(".element.io",""));let r="unknown";try{r=String(window.matchMedia("(display-mode: standalone)").matches)}catch(e){}this.setVisitVariable("Installed PWA",r);let o="unknown";try{o=String(window.matchMedia("(pointer: coarse)").matches)}catch(e){}this.setVisitVariable("Touch Input",o),this.heartbeatIntervalID=window.setInterval(this.ping.bind(this),3e4)}disable(){this.disabled||(this.trackEvent("Analytics","opt-out"),window.clearInterval(this.heartbeatIntervalID),this.baseUrl=null,this.visitVariables={},localStorage.removeItem(b),localStorage.removeItem("mx_Riot_Analytics_cts"),localStorage.removeItem("mx_Riot_Analytics_vc"),localStorage.removeItem("mx_Riot_Analytics_lvts"))}async track(e){if(this.disabled)return;const t=new Date,n=p(p({},e),{},{url:f(),_cvar:JSON.stringify(this.visitVariables),res:`${window.screen.width}x${window.screen.height}`,rand:String(Math.random()).slice(2,8),h:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}),r=new URL(this.baseUrl.toString());for(const e in n)r.searchParams.set(e,n[e]);try{await window.fetch(r.toString(),{method:"GET",mode:"no-cors",cache:"no-cache",redirect:"follow"})}catch(e){console.error("Analytics error: ",e)}}ping(){this.track({ping:"1"}),localStorage.setItem("mx_Riot_Analytics_lvts",String((new Date).getTime()))}trackPageChange(e){this.disabled||(this.firstPage?this.firstPage=!1:("number"!=typeof e&&console.warn("Analytics.trackPageChange: expected generationTimeMs to be a number"),this.track({gt_ms:String(e)})))}trackEvent(e,t,n,r){this.disabled||this.track({e_c:e,e_a:t,e_n:n,e_v:r})}setVisitVariable(e,t){this.disabled||(this.visitVariables[_[e].id]=[e,t])}setLoggedIn(e,t){if(this.disabled)return;const n=l.a.get();if(!n.piwik)return;const r=n.piwik.whitelistedHSUrls||[];var o;this.setVisitVariable("User Type",e?"Guest":"Logged In"),this.setVisitVariable("Homeserver URL",(o=t,r.includes(o)?o:"<redacted>"))}setBreadcrumbs(e){this.disabled||this.setVisitVariable("Breadcrumbs",e?"enabled":"disabled")}}window.mxAnalytics||(window.mxAnalytics=new v),t.a=window.mxAnalytics},function(e,t,n){"use strict";n.d(t,"b",(function(){return x})),n.d(t,"e",(function(){return k})),n.d(t,"a",(function(){return F})),n.d(t,"d",(function(){return O})),n.d(t,"c",(function(){return R})),n.d(t,"f",(function(){return D}));var r=n(79),o=n.n(r),i=n(93),a=n(136),s=n(82),c=n(87),l=n(80),u=n(83),d=n(186),h=n(122),p=n(265),m=n(237),g=n(123),f=n(112),_=n(171),b=n(138),v=n(102),y=n(221),E=n(91),S=n(105),w=n(97);function C(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}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}async function x(e){void 0===(e=e||{}).spinner&&(e.spinner=!0),void 0===e.guestAccess&&(e.guestAccess=!0),void 0===e.encryption&&(e.encryption=!1);const t=f.a.getTimestamp(),n=s.a.get();if(n.isGuest())return u.a.dispatch({action:"require_registration"}),null;const r=e.dmUserId?a.d.TrustedPrivateChat:a.d.PrivateChat,o=e.createOpts||{};if(o.preset=o.preset||r,o.visibility=o.visibility||a.f.Private,e.dmUserId&&void 0===o.invite)switch(Object(p.c)(e.dmUserId)){case"mx-user-id":o.invite=[e.dmUserId];break;case"email":o.invite_3pid=[{id_server:s.a.get().getIdentityServerUrl(!0),medium:"email",address:e.dmUserId}]}var h;(e.dmUserId&&void 0===o.is_direct&&(o.is_direct=!0),e.roomType&&(o.creation_content=T(T({},o.creation_content),{},{[i.d]:e.roomType})),void 0===e.andView&&(e.andView=!0),o.initial_state=o.initial_state||[],e.guestAccess&&o.initial_state.push({type:"m.room.guest_access",state_key:"",content:{guest_access:"can_join"}}),e.encryption&&o.initial_state.push({type:"m.room.encryption",state_key:"",content:{algorithm:"m.megolm.v1.aes-sha2"}}),e.parentSpace)&&(o.initial_state.push(Object(y.b)(e.parentSpace,!0)),e.historyVisibility||(e.historyVisibility=o.preset===a.d.PublicChat?a.b.WorldReadable:a.b.Invited),e.joinRule===a.c.Restricted&&null!==(h=v.g.instance.restrictedJoinRuleSupport)&&void 0!==h&&h.preferred&&(o.room_version=v.g.instance.restrictedJoinRuleSupport.preferred,o.initial_state.push({type:i.a.RoomJoinRules,content:{join_rule:a.c.Restricted,allow:[{type:a.e.RoomMembership,room_id:e.parentSpace.roomId}]}})));if(e.joinRule&&e.joinRule!==a.c.Restricted&&o.initial_state.push({type:i.a.RoomJoinRules,content:{join_rule:e.joinRule}}),e.avatar){let t=e.avatar;e.avatar instanceof File&&(t=await n.uploadContent(e.avatar)),o.initial_state.push({type:i.a.RoomAvatar,content:{url:t}})}let m,_;return e.historyVisibility&&o.initial_state.push({type:i.a.RoomHistoryVisibility,content:{history_visibility:e.historyVisibility}}),e.spinner&&(m=c.a.createDialog(w.a,null,"mx_Dialog_spinner")),n.createRoom(o).finally((function(){m&&m.close()})).then((function(t){return _=t.room_id,e.dmUserId?d.d(_,e.dmUserId):Promise.resolve()})).then(()=>e.parentSpace?v.g.instance.addRoomToSpace(e.parentSpace,_,[n.getDomain()],!0):e.associatedWithCommunity?g.a.addRoomToGroup(e.associatedWithCommunity,_,!1):void 0).then((function(){return e.andView&&u.a.dispatch({action:"view_room",room_id:_,should_peek:!1,joining:!0,justCreatedOpts:e}),f.a.instance.trackRoomCreate(t,_),_}),(function(t){if(e.inlineErrors)throw t;u.a.dispatch({action:E.a.JoinRoomError,roomId:_}),console.error("Failed to create room "+_+" "+t);let n=Object(l.a)("Server may be unavailable, overloaded, or you hit a bug.");return"M_UNSUPPORTED_ROOM_VERSION"===t.errcode&&(n=Object(l.a)("The server does not support the room version specified.")),c.a.createTrackedDialog("Failure to create room","",S.a,{title:Object(l.a)("Failure to create room"),description:n}),null}))}function k(e,t){const n=h.a.shared().getDMRoomsForUserId(t).map(t=>e.getRoom(t)).filter(e=>{if(e&&"join"===e.getMyMembership()){const n=e.currentState.getMembers().filter(e=>Object(_.c)(e.membership));return n.find(e=>e.userId===t)&&2===n.length}return!1}).sort((e,t)=>t.getLastActiveTimestamp()-e.getLastActiveTimestamp());if(n.length)return n[0]}async function F(e,t){try{const n=await e.downloadKeys(t);return Object.values(n).every(e=>Object.keys(e).length>0)}catch(e){return console.error("Error determining if it's possible to encrypt to all users: ",e),!1}}async function O(e,t,n){const r=k(e,t);let o;return o=r?r.roomId:await x({dmUserId:t,spinner:!1,andView:!1,createOpts:{creation_content:{[b.c]:n}}}),o}async function R(e,t){const n=k(e,t);let r;if(n)r=n.roomId;else{let n=void 0;D()&&(n=await F(e,[t])),r=await x({encryption:n,dmUserId:t,spinner:!1,andView:!1}),await async function(e,t,n,r={timeout:1500}){const{timeout:o}=r;let i;return new Promise(r=>{i=function(e,o,i){i.userId===n&&i.roomId===t&&r(!0)},e.on("RoomState.newMember",i),setTimeout(r,o,!1)}).finally(()=>{e.removeListener("RoomState.newMember",i)})}(e,r,t)}return r}function D(){const e=Object(m.b)();if(e){return!(!1===e.default)}return!0}},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(313),c=n(83),l=n(82),u=n(89),d=n(87),h=n(80),p=n(558),m=n(91),g=n(314),f=n(112);function _(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}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const v={joining:!1,joinError:null,roomId:null,initialEventId:null,initialEventPixelOffset:null,isInitialEventHighlighted:!1,roomAlias:null,roomLoading:!1,roomLoadError:null,quotingEvent:null,replyingToEvent:null,shouldPeek:!1,viaServers:[],wasContextSwitch:!1};class y extends s.Store{constructor(){super(c.a),o()(this,"state",v)}setState(e){let t=!1;for(const n of Object.keys(e))if(this.state[n]!==e[n]){t=!0;break}t&&(this.state=Object.assign(this.state,e),this.__emitChange())}__onDispatch(e){switch(e.action){case"view_room":this.viewRoom(e);break;case"view_create_group":case"view_welcome_page":case"view_home_page":case"view_my_groups":case"view_group":this.setState({roomId:null,roomAlias:null,viaServers:[],wasContextSwitch:!1});break;case"view_room_error":this.viewRoomError(e);break;case"will_join":this.setState({joining:!0});break;case"cancel_join":this.setState({joining:!1});break;case m.a.JoinRoom:this.joinRoom(e);break;case m.a.JoinRoomError:this.joinRoomError(e);break;case m.a.JoinRoomReady:this.setState({shouldPeek:!1});break;case"on_client_not_viable":case"on_logged_out":this.reset();break;case"reply_to_event":e.event&&e.event.getRoomId()!==this.state.roomId?c.a.dispatch({action:"view_room",room_id:e.event.getRoomId(),replyingToEvent:e.event}):this.setState({replyingToEvent:e.event});break;case"open_room_settings":{const t=u.getComponent("dialogs.RoomSettingsDialog");d.a.createTrackedDialog("Room settings","",t,{roomId:e.room_id||this.state.roomId,initialTabId:e.initial_tab_id},null,!1,!0);break}}}async viewRoom(e){if(e.room_id){const t={roomId:e.room_id,roomAlias:e.room_alias,initialEventId:e.event_id,isInitialEventHighlighted:e.highlighted,roomLoading:!1,roomLoadError:null,shouldPeek:void 0===e.should_peek||e.should_peek,joining:e.joining||!1,replyingToEvent:null,isEditingSettings:!1,viaServers:e.via_servers,wasContextSwitch:e.context_switch};e.replyingToEvent&&e.replyingToEvent.getRoomId()===e.room_id&&(t.replyingToEvent=e.replyingToEvent),this.setState(t),e.auto_join&&c.a.dispatch(b(b({},e),{},{action:m.a.JoinRoom,roomId:e.room_id}))}else if(e.room_alias){let t=Object(p.a)(e.room_alias);if(!t){this.setState({roomId:null,initialEventId:null,initialEventPixelOffset:null,isInitialEventHighlighted:null,roomAlias:e.room_alias,roomLoading:!0,roomLoadError:null,viaServers:e.via_servers,wasContextSwitch:e.context_switch});try{const n=await l.a.get().getRoomIdForAlias(e.room_alias);Object(p.b)(e.room_alias,n.room_id),t=n.room_id}catch(t){return console.error("RVS failed to get room id for alias: ",t),void c.a.dispatch({action:"view_room_error",room_id:null,room_alias:e.room_alias,err:t})}}c.a.dispatch({action:"view_room",room_id:t,event_id:e.event_id,highlighted:e.highlighted,room_alias:e.room_alias,auto_join:e.auto_join,oob_data:e.oob_data,viaServers:e.via_servers,wasContextSwitch:e.context_switch})}}viewRoomError(e){this.setState({roomId:e.room_id,roomAlias:e.room_alias,roomLoading:!1,roomLoadError:e.err})}async joinRoom(e){const t=f.a.getTimestamp();this.setState({joining:!0});const n=l.a.get(),r=this.state.roomAlias||this.state.roomId,o=this.state.viaServers||[];try{await Object(g.a)(()=>n.joinRoom(r,b({viaServers:o},e.opts)),5,e=>504===e.httpStatus),f.a.instance.trackRoomJoin(t,this.state.roomId,e._type),c.a.dispatch({action:m.a.JoinRoomReady,roomId:this.state.roomId})}catch(e){c.a.dispatch({action:m.a.JoinRoomError,roomId:this.state.roomId,err:e})}}getInvitingUserId(e){const t=l.a.get(),n=t.getRoom(e);if(n&&"invite"===n.getMyMembership()){const e=n.getMember(t.getUserId()),r=e?e.events.member:null;return r&&r.getSender()}}joinRoomError(e){this.setState({joining:!1,joinError:e.err});const t=e.err;let n=t.message?t.message:JSON.stringify(t);if(console.log("Failed to join room:",n),"ConnectionError"===t.name)n=Object(h.a)("There was an error joining the room");else if("M_INCOMPATIBLE_ROOM_VERSION"===t.errcode)n=a.a.createElement("div",null,Object(h.a)("Sorry, your homeserver is too old to participate in this room."),a.a.createElement("br",null),Object(h.a)("Please contact your homeserver administrator."));else if(404===t.httpStatus){const e=this.getInvitingUserId(this.state.roomId);e&&(n=e.endsWith(":"+l.a.get().getDomain())?Object(h.a)("The person who invited you already left the room."):Object(h.a)("The person who invited you already left the room, or their server is offline."))}const r=u.getComponent("dialogs.ErrorDialog");d.a.createTrackedDialog("Failed to join room","",r,{title:Object(h.a)("Failed to join room"),description:n})}reset(){this.state=Object.assign({},v)}getRoomId(){return this.state.roomId}getInitialEventId(){return this.state.initialEventId}isInitialEventHighlighted(){return this.state.isInitialEventHighlighted}getRoomAlias(){return this.state.roomAlias}isRoomLoading(){return this.state.roomLoading}getRoomLoadError(){return this.state.roomLoadError}isJoining(){return this.state.joining}getJoinError(){return this.state.joinError}getQuotingEvent(){return this.state.replyingToEvent}shouldPeek(){return this.state.shouldPeek}getWasContextSwitch(){return this.state.wasContextSwitch}}let E=null;E||(E=new y),t.a=E},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(78);const o=(e,t,n)=>{const o=Object(r.useRef)(n);Object(r.useEffect)(()=>{o.current=n},[n]),Object(r.useEffect)(()=>{if(!e)return;const n=(...e)=>o.current(...e);return e.on(t,n),()=>{e.removeListener(t,n)}},[t,e])},i=(e,t,n)=>{const[i,a]=Object(r.useState)(n()),s=Object(r.useCallback)((...e)=>{a(n(...e))},[n]);return o(e,t,s),i}},function(e,t,n){"use strict";n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return p})),n.d(t,"a",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return _})),n.d(t,"h",(function(){return v})),n.d(t,"i",(function(){return F})),n.d(t,"j",(function(){return O})),n.d(t,"g",(function(){return R}));var r=n(79),o=n.n(r),i=n(96),a=n(3),s=n(2),c=n(93),l=n(180),u=n(375),d=n(376);let h,p,m,g,f,_;var b;!function(e){e.Fledgling="fledgling",e.InviteSent="invite_sent",e.WaitLocalMedia="wait_local_media",e.CreateOffer="create_offer",e.CreateAnswer="create_answer",e.Connecting="connecting",e.Connected="connected",e.Ringing="ringing",e.Ended="ended"}(h||(h={})),function(e){e.Voice="voice",e.Video="video"}(p||(p={})),function(e){e.Inbound="inbound",e.Outbound="outbound"}(m||(m={})),function(e){e.Local="local",e.Remote="remote"}(g||(g={})),function(e){e.Hangup="hangup",e.State="state",e.Error="error",e.Replaced="replaced",e.LocalHoldUnhold="local_hold_unhold",e.RemoteHoldUnhold="remote_hold_unhold",e.HoldUnhold="hold_unhold",e.FeedsChanged="feeds_changed",e.AssertedIdentityChanged="asserted_identity_changed"}(f||(f={})),function(e){e.UserHangup="user_hangup",e.LocalOfferFailed="local_offer_failed",e.NoUserMedia="no_user_media",e.UnknownDevices="unknown_devices",e.SendInvite="send_invite",e.CreateAnswer="create_answer",e.SendAnswer="send_answer",e.SetRemoteDescription="set_remote_description",e.SetLocalDescription="set_local_description",e.AnsweredElsewhere="answered_elsewhere",e.IceFailed="ice_failed",e.InviteTimeout="invite_timeout",e.Replaced="replaced",e.SignallingFailed="signalling_timeout",e.UserBusy="user_busy",e.Transfered="transferred"}(_||(_={})),function(e){e.Audio="audio",e.Video="video"}(b||(b={}));function v(){return window.electron.getDesktopCapturerSources({thumbnailSize:{height:176,width:312},types:["screen","window"]})}class y extends Error{constructor(e,t,n){super(t+": "+n),o()(this,"code",void 0),this.code=e}}function E(){return Date.now().toString()+Object(l.b)(16)}class S extends a.EventEmitter{constructor(e){super(),o()(this,"roomId",void 0),o()(this,"type",void 0),o()(this,"callId",void 0),o()(this,"state",void 0),o()(this,"hangupParty",void 0),o()(this,"hangupReason",void 0),o()(this,"direction",void 0),o()(this,"ourPartyId",void 0),o()(this,"client",void 0),o()(this,"forceTURN",void 0),o()(this,"turnServers",void 0),o()(this,"candidateSendQueue",void 0),o()(this,"candidateSendTries",void 0),o()(this,"sentEndOfCandidates",void 0),o()(this,"peerConn",void 0),o()(this,"feeds",void 0),o()(this,"usermediaSenders",void 0),o()(this,"screensharingSenders",void 0),o()(this,"inviteOrAnswerSent",void 0),o()(this,"waitForLocalAVStream",void 0),o()(this,"successor",void 0),o()(this,"opponentMember",void 0),o()(this,"opponentVersion",void 0),o()(this,"opponentPartyId",void 0),o()(this,"opponentCaps",void 0),o()(this,"inviteTimeout",void 0),o()(this,"remoteOnHold",void 0),o()(this,"callStatsAtEnd",void 0),o()(this,"makingOffer",void 0),o()(this,"ignoreOffer",void 0),o()(this,"remoteCandidateBuffer",new Map),o()(this,"remoteAssertedIdentity",void 0),o()(this,"remoteSDPStreamMetadata",void 0),o()(this,"gotUserMediaForInvite",async e=>{this.successor?this.successor.gotUserMediaForAnswer(e):this.callHasEnded()?this.stopAllMedia():(this.pushLocalFeed(e,u.b.Usermedia),this.setState(h.CreateOffer),i.a.debug("gotUserMediaForInvite -> "+this.type))}),o()(this,"gotUserMediaForAnswer",async e=>{if(this.callHasEnded())return;let t;this.pushLocalFeed(e,u.b.Usermedia),this.setState(h.CreateAnswer);try{this.getRidOfRTXCodecs(),t=await this.peerConn.createAnswer()}catch(e){return i.a.debug("Failed to create answer: ",e),void this.terminate(g.Local,_.CreateAnswer,!0)}try{await this.peerConn.setLocalDescription(t),this.setState(h.Connecting),await new Promise(e=>{setTimeout(e,200)}),this.sendAnswer()}catch(e){return i.a.debug("Error setting local description!",e),void this.terminate(g.Local,_.SetLocalDescription,!0)}}),o()(this,"gotLocalIceCandidate",e=>{if(e.candidate){if(i.a.debug("Call "+this.callId+" got local ICE "+e.candidate.sdpMid+" candidate: "+e.candidate.candidate),this.callHasEnded())return;""===e.candidate.candidate&&this.sentEndOfCandidates||(this.queueCandidate(e.candidate),""===e.candidate.candidate&&(this.sentEndOfCandidates=!0))}}),o()(this,"onIceGatheringStateChange",e=>{if(i.a.debug("ice gathering state changed to "+this.peerConn.iceGatheringState),"complete"===this.peerConn.iceGatheringState&&!this.sentEndOfCandidates){const e={candidate:""};this.queueCandidate(e),this.sentEndOfCandidates=!0}}),o()(this,"gotLocalOffer",async e=>{if(i.a.debug("Created offer: ",e),this.callHasEnded())return void i.a.debug("Ignoring newly created offer on call ID "+this.callId+" because the call has ended");try{await this.peerConn.setLocalDescription(e)}catch(e){return i.a.debug("Error setting local description!",e),void this.terminate(g.Local,_.SetLocalDescription,!0)}if("gathering"===this.peerConn.iceGatheringState&&await new Promise(e=>{setTimeout(e,200)}),this.callHasEnded())return;const t=this.state===h.CreateOffer?c.a.CallInvite:c.a.CallNegotiate,n={lifetime:6e4};this.state===h.CreateOffer?n.offer=this.peerConn.localDescription:n.description=this.peerConn.localDescription,n.capabilities={"m.call.transferee":this.client.supportsCallTransfer,"m.call.dtmf":!1},n[u.a]=this.getLocalSDPStreamMetadata(),i.a.info(`Discarding ${this.candidateSendQueue.length} candidates that will be sent in offer`),this.candidateSendQueue=[];try{await this.sendVoipEvent(t,n)}catch(e){i.a.error("Failed to send invite",e),e.event&&this.client.cancelPendingEvent(e.event);let t=_.SignallingFailed,n="Signalling failed";return this.state===h.CreateOffer&&(t=_.SendInvite,n="Failed to send invite"),"UnknownDeviceError"==e.name&&(t=_.UnknownDevices,n="Unknown devices present in the room"),this.emit(f.Error,new y(t,n,e)),void this.terminate(g.Local,t,!1)}this.sendCandidateQueue(),this.state===h.CreateOffer&&(this.inviteOrAnswerSent=!0,this.setState(h.InviteSent),this.inviteTimeout=setTimeout(()=>{this.inviteTimeout=null,this.state===h.InviteSent&&this.hangup(_.InviteTimeout,!1)},6e4))}),o()(this,"getLocalOfferFailed",e=>{i.a.error("Failed to get local offer",e),this.emit(f.Error,new y(_.LocalOfferFailed,"Failed to get local offer!",e)),this.terminate(g.Local,_.LocalOfferFailed,!1)}),o()(this,"getUserMediaFailed",e=>{this.successor?this.successor.getUserMediaFailed(e):(i.a.warn("Failed to get user media - ending call",e),this.emit(f.Error,new y(_.NoUserMedia,"Couldn't start capturing media! Is your microphone set up and does this app have permission?",e)),this.terminate(g.Local,_.NoUserMedia,!1))}),o()(this,"onIceConnectionStateChanged",()=>{this.callHasEnded()||(i.a.debug("Call ID "+this.callId+": ICE connection state changed to: "+this.peerConn.iceConnectionState),"connected"==this.peerConn.iceConnectionState?this.setState(h.Connected):"failed"==this.peerConn.iceConnectionState&&this.hangup(_.IceFailed,!1))}),o()(this,"onSignallingStateChanged",()=>{i.a.debug("call "+this.callId+": Signalling state changed to: "+this.peerConn.signalingState)}),o()(this,"onTrack",e=>{if(0===e.streams.length)return void i.a.warn(`Streamless ${e.track.kind} found: ignoring.`);const t=e.streams[0];this.pushRemoteFeed(t),t.addEventListener("removetrack",()=>this.deleteFeedByStream(t))}),o()(this,"onNegotiationNeeded",async()=>{if(i.a.info("Negotiation is needed!"),this.state===h.CreateOffer||0!==this.opponentVersion){this.makingOffer=!0;try{this.getRidOfRTXCodecs();const e=await this.peerConn.createOffer();await this.gotLocalOffer(e)}catch(e){return void this.getLocalOfferFailed(e)}finally{this.makingOffer=!1}}else i.a.info("Opponent does not support renegotiation: ignoring negotiationneeded event")}),o()(this,"onHangupReceived",e=>{i.a.debug("Hangup received for call ID "+this.callId),this.partyIdMatches(e)||this.state===h.Ringing?this.terminate(g.Remote,e.reason||_.UserHangup,!0):i.a.info(`Ignoring message from party ID ${e.party_id}: our partner is ${this.opponentPartyId}`)}),o()(this,"onRejectReceived",e=>{i.a.debug("Reject received for call ID "+this.callId);[h.InviteSent,h.Ringing].includes(this.state)||this.state===h.Fledgling&&this.direction===m.Inbound?this.terminate(g.Remote,e.reason||_.UserHangup,!0):i.a.debug(`Call is in state: ${this.state}: ignoring reject`)}),o()(this,"onAnsweredElsewhere",e=>{i.a.debug("Call ID "+this.callId+" answered elsewhere"),this.terminate(g.Remote,_.AnsweredElsewhere,!0)}),this.roomId=e.roomId,this.client=e.client,this.type=null,this.forceTURN=e.forceTURN,this.ourPartyId=this.client.deviceId,this.turnServers=e.turnServers||[],0===this.turnServers.length&&this.client.isFallbackICEServerAllowed()&&this.turnServers.push({urls:["stun:turn.matrix.org"]});for(const e of this.turnServers)s.e(e,["urls"]);this.callId=E(),this.state=h.Fledgling,this.candidateSendQueue=[],this.candidateSendTries=0,this.sentEndOfCandidates=!1,this.inviteOrAnswerSent=!1,this.makingOffer=!1,this.remoteOnHold=!1,this.feeds=[],this.usermediaSenders=[],this.screensharingSenders=[]}async placeVoiceCall(){i.a.debug("placeVoiceCall"),this.checkForErrorListener();const e=T(b.Audio);this.type=p.Voice,await this.placeCallWithConstraints(e)}async placeVideoCall(){i.a.debug("placeVideoCall"),this.checkForErrorListener();const e=T(b.Video);this.type=p.Video,await this.placeCallWithConstraints(e)}getOpponentMember(){return this.opponentMember}opponentCanBeTransferred(){return Boolean(this.opponentCaps&&this.opponentCaps["m.call.transferee"])}opponentSupportsDTMF(){return Boolean(this.opponentCaps&&this.opponentCaps["m.call.dtmf"])}getRemoteAssertedIdentity(){return this.remoteAssertedIdentity}get localUsermediaFeed(){return this.getLocalFeeds().find(e=>e.purpose===u.b.Usermedia)}get localScreensharingFeed(){return this.getLocalFeeds().find(e=>e.purpose===u.b.Screenshare)}get localUsermediaStream(){var e;return null===(e=this.localUsermediaFeed)||void 0===e?void 0:e.stream}get localScreensharingStream(){var e;return null===(e=this.localScreensharingFeed)||void 0===e?void 0:e.stream}getFeedByStreamId(e){return this.getFeeds().find(t=>t.stream.id===e)}getFeeds(){return this.feeds}getLocalFeeds(){return this.feeds.filter(e=>e.isLocal())}getRemoteFeeds(){return this.feeds.filter(e=>!e.isLocal())}getLocalSDPStreamMetadata(){const e={};for(const t of this.getLocalFeeds())e[t.stream.id]={purpose:t.purpose,audio_muted:t.isAudioMuted(),video_muted:t.isVideoMuted()};return i.a.debug("Got local SDPStreamMetadata",e),e}noIncomingFeeds(){return!this.feeds.some(e=>!e.isLocal())}pushRemoteFeed(e){if(!this.opponentSupportsSDPStreamMetadata())return void this.pushRemoteFeedWithoutMetadata(e);const t=this.getOpponentMember().userId,n=this.remoteSDPStreamMetadata[e.id].purpose,r=this.remoteSDPStreamMetadata[e.id].audio_muted,o=this.remoteSDPStreamMetadata[e.id].video_muted;if(!n)return void i.a.warn(`Ignoring stream with id ${e.id} because we didn't get any metadata about it`);const a=this.getRemoteFeeds().find(e=>e.purpose===n);a?a.setNewStream(e):(this.feeds.push(new d.a(e,t,n,this.client,this.roomId,r,o)),this.emit(f.FeedsChanged,this.feeds)),i.a.info(`Pushed remote stream (id="${e.id}", active="${e.active}", purpose=${n})`)}pushRemoteFeedWithoutMetadata(e){var t;const n=this.getOpponentMember().userId,r=u.b.Usermedia,o=null===(t=this.feeds.find(e=>!e.isLocal()))||void 0===t?void 0:t.stream;if(o&&e.id!==o.id)return void i.a.warn(`Ignoring new stream ID ${e.id}: we already have stream ID ${o.id}`);const a=this.getFeedByStreamId(e.id);a?a.setNewStream(e):(this.feeds.push(new d.a(e,n,r,this.client,this.roomId,!1,!1)),this.emit(f.FeedsChanged,this.feeds)),i.a.info(`Pushed remote stream (id="${e.id}", active="${e.active}")`)}pushLocalFeed(e,t,n=!0){const r=this.client.getUserId(),o=this.getLocalFeeds().find(e=>e.purpose===t);if(o?o.setNewStream(e):(this.feeds.push(new d.a(e,r,t,this.client,this.roomId,!1,!1)),this.emit(f.FeedsChanged,this.feeds)),C(e.getAudioTracks(),!0),n){const n=t===u.b.Usermedia?this.usermediaSenders:this.screensharingSenders;n.splice(0,n.length),this.emit(f.FeedsChanged,this.feeds);for(const r of e.getTracks())i.a.info(`Adding track (id="${r.id}", kind="${r.kind}", streamId="${e.id}", streamPurpose="${t}") to peer connection`),n.push(this.peerConn.addTrack(r,e))}i.a.info(`Pushed local stream (id="${e.id}", active="${e.active}", purpose="${t}")`)}deleteAllFeeds(){this.feeds=[],this.emit(f.FeedsChanged,this.feeds)}deleteFeedByStream(e){i.a.debug("Removing feed with stream id "+e.id);const t=this.getFeedByStreamId(e.id);t?(this.feeds.splice(this.feeds.indexOf(t),1),this.emit(f.FeedsChanged,this.feeds)):i.a.warn(`Didn't find the feed with stream id ${e.id} to delete`)}async getCurrentCallStats(){return this.callHasEnded()?this.callStatsAtEnd:this.collectCallStats()}async collectCallStats(){if(!this.peerConn)return;const e=await this.peerConn.getStats(),t=[];for(const n of e)t.push(n[1]);return t}async initWithInvite(e){var t;const n=e.getContent();this.direction=m.Inbound;await this.client.checkTurnServers()||i.a.warn("Failed to get TURN credentials! Proceeding with call anyway...");const r=n[u.a];r?this.updateRemoteSDPStreamMetadata(r):i.a.debug("Did not get any SDPStreamMetadata! Can not send/receive multiple streams"),this.peerConn=this.createPeerConnection(),this.chooseOpponent(e);try{await this.peerConn.setRemoteDescription(n.offer),await this.addBufferedIceCandidates()}catch(e){return i.a.debug("Failed to set remote description",e),void this.terminate(g.Local,_.SetRemoteDescription,!1)}const o=null===(t=this.feeds.find(e=>!e.isLocal()))||void 0===t?void 0:t.stream;if(!o||0===o.getTracks().length)return i.a.error("No remote stream or no tracks after setting remote description!"),void this.terminate(g.Local,_.SetRemoteDescription,!1);this.type=o.getTracks().some(e=>"video"===e.kind)?p.Video:p.Voice,this.setState(h.Ringing),e.getLocalAge()&&setTimeout(()=>{this.state==h.Ringing&&(i.a.debug("Call invite has expired. Hanging up."),this.hangupParty=g.Remote,this.setState(h.Ended),this.stopAllMedia(),"closed"!=this.peerConn.signalingState&&this.peerConn.close(),this.emit(f.Hangup))},n.lifetime-e.getLocalAge())}initWithHangup(e){this.setState(h.Ended)}async answer(){if(!this.inviteOrAnswerSent)if(i.a.debug(`Answering call ${this.callId} of type ${this.type}`),this.localUsermediaStream||this.waitForLocalAVStream)this.waitForLocalAVStream&&this.setState(h.WaitLocalMedia);else{const e=T(this.type==p.Video?b.Video:b.Audio);i.a.log("Getting user media with constraints",e),this.setState(h.WaitLocalMedia),this.waitForLocalAVStream=!0;try{const t=await navigator.mediaDevices.getUserMedia(e);this.waitForLocalAVStream=!1,this.gotUserMediaForAnswer(t)}catch(e){return void this.getUserMediaFailed(e)}}}replacedBy(e){this.state===h.WaitLocalMedia?(i.a.debug("Telling new call to wait for local media"),e.waitForLocalAVStream=!0):[h.CreateOffer,h.InviteSent].includes(this.state)&&(i.a.debug("Handing local stream to new call"),e.gotUserMediaForAnswer(this.localUsermediaStream)),this.successor=e,this.emit(f.Replaced,e),this.hangup(_.Replaced,!0)}hangup(e,t){if(this.callHasEnded())return;if(i.a.debug("Ending call "+this.callId),this.terminate(g.Local,e,!t),this.state===h.WaitLocalMedia)return;const n={};(this.opponentVersion&&this.opponentVersion>=1||e!==_.UserHangup)&&(n.reason=e),this.sendVoipEvent(c.a.CallHangup,n)}reject(){if(this.state!==h.Ringing)throw Error("Call must be in 'ringing' state to reject!");if(this.opponentVersion<1)return i.a.info(`Opponent version is less than 1 (${this.opponentVersion}): sending hangup instead of reject`),void this.hangup(_.UserHangup,!0);i.a.debug("Rejecting call: "+this.callId),this.terminate(g.Local,_.UserHangup,!0),this.sendVoipEvent(c.a.CallReject,{})}opponentSupportsSDPStreamMetadata(){return Boolean(this.remoteSDPStreamMetadata)}isScreensharing(){return Boolean(this.localScreensharingStream)}async setScreensharingEnabled(e,t){if(e&&this.isScreensharing())return i.a.warn("There is already a screensharing stream - there is nothing to do!"),!0;if(!e&&!this.isScreensharing())return i.a.warn("There already isn't a screensharing stream - there is nothing to do!"),!1;if(!this.opponentSupportsSDPStreamMetadata())return await this.setScreensharingEnabledWithoutMetadataSupport(e,t);if(i.a.debug("Set screensharing enabled? "+e),!e){for(const e of this.screensharingSenders)this.peerConn.removeTrack(e);for(const e of this.localScreensharingStream.getTracks())e.stop();return this.deleteFeedByStream(this.localScreensharingStream),!1}try{const e=await w(t);return!!e&&(this.pushLocalFeed(e,u.b.Screenshare),!0)}catch(e){return this.emit(f.Error,new y(_.NoUserMedia,"Failed to get screen-sharing stream: ",e)),!1}}async setScreensharingEnabledWithoutMetadataSupport(e,t){if(i.a.debug(`Set screensharing enabled? ${e} using replaceTrack()`),!e){const e=this.localUsermediaStream.getTracks().find(e=>"video"===e.kind);this.usermediaSenders.find(e=>{var t;return"video"===(null===(t=e.track)||void 0===t?void 0:t.kind)}).replaceTrack(e);for(const e of this.localScreensharingStream.getTracks())e.stop();return this.deleteFeedByStream(this.localScreensharingStream),!1}try{const e=await w(t);if(!e)return!1;const n=e.getTracks().find(e=>"video"===e.kind);return this.usermediaSenders.find(e=>{var t;return"video"===(null===(t=e.track)||void 0===t?void 0:t.kind)}).replaceTrack(n),this.pushLocalFeed(e,u.b.Screenshare,!1),!0}catch(e){return this.emit(f.Error,new y(_.NoUserMedia,"Failed to get screen-sharing stream: ",e)),!1}}setLocalVideoMuted(e){var t;null===(t=this.localUsermediaFeed)||void 0===t||t.setVideoMuted(e),this.updateMuteStatus()}isLocalVideoMuted(){var e;return null===(e=this.localUsermediaFeed)||void 0===e?void 0:e.isVideoMuted()}setMicrophoneMuted(e){var t;null===(t=this.localUsermediaFeed)||void 0===t||t.setAudioMuted(e),this.updateMuteStatus()}isMicrophoneMuted(){var e;return null===(e=this.localUsermediaFeed)||void 0===e?void 0:e.isAudioMuted()}isRemoteOnHold(){return this.remoteOnHold}setRemoteOnHold(e){if(this.isRemoteOnHold()!==e){this.remoteOnHold=e;for(const t of this.peerConn.getTransceivers())t.direction=e?"sendonly":"sendrecv";this.updateMuteStatus(),this.emit(f.RemoteHoldUnhold,this.remoteOnHold)}}isLocalOnHold(){if(this.state!==h.Connected)return!1;let e=!0;for(const t of this.peerConn.getTransceivers()){["inactive","recvonly"].includes(t.currentDirection)||(e=!1)}return e}sendDtmfDigit(e){for(const t of this.peerConn.getSenders())if("audio"===t.track.kind&&t.dtmf)return void t.dtmf.insertDTMF(e);throw new Error("Unable to find a track to send DTMF on")}updateMuteStatus(){var e,t;this.sendVoipEvent(c.a.CallSDPStreamMetadataChangedPrefix,{[u.a]:this.getLocalSDPStreamMetadata()});const n=(null===(e=this.localUsermediaFeed)||void 0===e?void 0:e.isAudioMuted())||this.remoteOnHold,r=(null===(t=this.localUsermediaFeed)||void 0===t?void 0:t.isVideoMuted())||this.remoteOnHold;C(this.localUsermediaStream.getAudioTracks(),!n),C(this.localUsermediaStream.getVideoTracks(),!r)}async sendAnswer(){const e={answer:{sdp:this.peerConn.localDescription.sdp,type:this.peerConn.localDescription.type},[u.a]:this.getLocalSDPStreamMetadata()};e.capabilities={"m.call.transferee":this.client.supportsCallTransfer,"m.call.dtmf":!1},i.a.info(`Discarding ${this.candidateSendQueue.length} candidates that will be sent in answer`),this.candidateSendQueue=[];try{await this.sendVoipEvent(c.a.CallAnswer,e),this.inviteOrAnswerSent=!0}catch(e){this.setState(h.Ringing),this.client.cancelPendingEvent(e.event);let t=_.SendAnswer,n="Failed to send answer";throw"UnknownDeviceError"==e.name&&(t=_.UnknownDevices,n="Unknown devices present in the room"),this.emit(f.Error,new y(t,n,e)),e}this.sendCandidateQueue()}async onRemoteIceCandidatesReceived(e){if(this.callHasEnded())return;const t=e.getContent().candidates;if(!t)return void i.a.info("Ignoring candidates event with no candidates!");const n=0===e.getContent().version?null:e.getContent().party_id||null;if(void 0===this.opponentPartyId){i.a.info(`Buffering ${t.length} candidates until we pick an opponent`);const e=this.remoteCandidateBuffer.get(n)||[];return e.push(...t),void this.remoteCandidateBuffer.set(n,e)}this.partyIdMatches(e.getContent())?await this.addIceCandidates(t):i.a.info(`Ignoring candidates from party ID ${e.getContent().party_id}: we have chosen party ID `+this.opponentPartyId)}async onAnswerReceived(e){if(i.a.debug(`Got answer for call ID ${this.callId} from party ID ${e.getContent().party_id}`),this.callHasEnded())return void i.a.debug(`Ignoring answer because call ID ${this.callId} has ended`);if(void 0!==this.opponentPartyId)return void i.a.info(`Ignoring answer from party ID ${e.getContent().party_id}: we already have an answer/reject from `+this.opponentPartyId);this.chooseOpponent(e),await this.addBufferedIceCandidates(),this.setState(h.Connecting);const t=e.getContent()[u.a];t?this.updateRemoteSDPStreamMetadata(t):i.a.warn("Did not get any SDPStreamMetadata! Can not send/receive multiple streams");try{await this.peerConn.setRemoteDescription(e.getContent().answer)}catch(e){return i.a.debug("Failed to set remote description",e),void this.terminate(g.Local,_.SetRemoteDescription,!1)}if(null!==this.opponentPartyId)try{await this.sendVoipEvent(c.a.CallSelectAnswer,{selected_party_id:this.opponentPartyId})}catch(e){i.a.warn("Failed to send select_answer event",e)}}async onSelectAnswerReceived(e){if(this.direction!==m.Inbound)return void i.a.warn("Got select_answer for an outbound call: ignoring");const t=e.getContent().selected_party_id;null!=t?t!==this.ourPartyId&&(i.a.info(`Got select_answer for party ID ${t}: we are party ID ${this.ourPartyId}.`),this.terminate(g.Remote,_.AnsweredElsewhere,!0)):i.a.warn("Got nonsensical select_answer with null/undefined selected_party_id: ignoring")}async onNegotiateReceived(e){const t=e.getContent().description;if(!t||!t.sdp||!t.type)return void i.a.info("Ignoring invalid m.call.negotiate event");const n=this.direction===m.Inbound,r="offer"===t.type&&(this.makingOffer||"stable"!=this.peerConn.signalingState);if(this.ignoreOffer=!n&&r,this.ignoreOffer)return void i.a.info("Ignoring colliding negotiate event because we're impolite");const o=this.isLocalOnHold(),a=e.getContent()[u.a];a?this.updateRemoteSDPStreamMetadata(a):i.a.warn("Received negotiation event without SDPStreamMetadata!");try{if(await this.peerConn.setRemoteDescription(t),"offer"===t.type){this.getRidOfRTXCodecs();const e=await this.peerConn.createAnswer();await this.peerConn.setLocalDescription(e),this.sendVoipEvent(c.a.CallNegotiate,{description:this.peerConn.localDescription,[u.a]:this.getLocalSDPStreamMetadata()})}}catch(e){i.a.warn("Failed to complete negotiation",e)}const s=this.isLocalOnHold();o!==s&&(this.emit(f.LocalHoldUnhold,s),this.emit(f.HoldUnhold,s))}updateRemoteSDPStreamMetadata(e){this.remoteSDPStreamMetadata=s.D(this.remoteSDPStreamMetadata||{},e,!0);for(const e of this.getRemoteFeeds()){var t,n,r;const o=e.stream.id;e.setAudioMuted(null===(t=this.remoteSDPStreamMetadata[o])||void 0===t?void 0:t.audio_muted),e.setVideoMuted(null===(n=this.remoteSDPStreamMetadata[o])||void 0===n?void 0:n.video_muted),e.purpose=null===(r=this.remoteSDPStreamMetadata[o])||void 0===r?void 0:r.purpose}}onSDPStreamMetadataChangedReceived(e){const t=e.getContent()[u.a];this.updateRemoteSDPStreamMetadata(t)}async onAssertedIdentityReceived(e){e.getContent().asserted_identity&&(this.remoteAssertedIdentity={id:e.getContent().asserted_identity.id,displayName:e.getContent().asserted_identity.display_name},this.emit(f.AssertedIdentityChanged))}callHasEnded(){return this.state===h.Ended}getRidOfRTXCodecs(){if(!RTCRtpReceiver.getCapabilities||!RTCRtpSender.getCapabilities)return;const e=RTCRtpReceiver.getCapabilities("video").codecs,t=[...RTCRtpSender.getCapabilities("video").codecs,...e];for(const e of t)if("video/rtx"===e.mimeType){const n=t.indexOf(e);t.splice(n,1)}for(const e of this.peerConn.getTransceivers()){var n,r;!this.screensharingSenders.includes(e.sender)||"video"!==(null===(n=e.sender.track)||void 0===n?void 0:n.kind)&&"video"!==(null===(r=e.receiver.track)||void 0===r?void 0:r.kind)||e.setCodecPreferences(t)}}setState(e){const t=this.state;this.state=e,this.emit(f.State,e,t)}sendVoipEvent(e,t){return this.client.sendEvent(this.roomId,e,Object.assign({},t,{version:1,call_id:this.callId,party_id:this.ourPartyId}))}queueCandidate(e){if(this.candidateSendQueue.push(e),this.state===h.Ringing||!this.inviteOrAnswerSent)return;const t=this.direction===m.Inbound?500:2e3;0===this.candidateSendTries&&setTimeout(()=>{this.sendCandidateQueue()},t)}async transfer(e){const t=await this.client.getProfileInfo(e),n=E(),r={replacement_id:E(),target_user:{id:e,display_name:t.display_name,avatar_url:t.avatar_url},create_call:n};await this.sendVoipEvent(c.a.CallReplaces,r),await this.terminate(g.Local,_.Transfered,!0)}async transferToCall(e){const t=await this.client.getProfileInfo(e.getOpponentMember().userId),n=await this.client.getProfileInfo(this.getOpponentMember().userId),r=E(),o={replacement_id:E(),target_user:{id:this.getOpponentMember().userId,display_name:n.display_name,avatar_url:n.avatar_url},await_call:r};await e.sendVoipEvent(c.a.CallReplaces,o);const i={replacement_id:E(),target_user:{id:e.getOpponentMember().userId,display_name:t.display_name,avatar_url:t.avatar_url},create_call:r};await this.sendVoipEvent(c.a.CallReplaces,i),await this.terminate(g.Local,_.Replaced,!0),await e.terminate(g.Local,_.Transfered,!0)}async terminate(e,t,n){this.callHasEnded()||(this.callStatsAtEnd=await this.collectCallStats(),this.inviteTimeout&&(clearTimeout(this.inviteTimeout),this.inviteTimeout=null),t!==_.Replaced&&this.stopAllMedia(),this.deleteAllFeeds(),this.hangupParty=e,this.hangupReason=t,this.setState(h.Ended),this.peerConn&&"closed"!==this.peerConn.signalingState&&this.peerConn.close(),n&&this.emit(f.Hangup,this))}stopAllMedia(){i.a.debug(`stopAllMedia (stream=${this.localUsermediaStream})`);for(const e of this.feeds)for(const t of e.stream.getTracks())t.stop()}checkForErrorListener(){if(0===this.listeners("error").length)throw new Error("You MUST attach an error listener using call.on('error', function() {})")}async sendCandidateQueue(){if(0===this.candidateSendQueue.length)return;const e=this.candidateSendQueue;this.candidateSendQueue=[],++this.candidateSendTries;const t={candidates:e};i.a.debug("Attempting to send "+e.length+" candidates");try{await this.sendVoipEvent(c.a.CallCandidates,t),this.candidateSendTries=0}catch(t){if(t.event&&this.client.cancelPendingEvent(t.event),this.candidateSendQueue.push(...e),this.candidateSendTries>5){i.a.debug("Failed to send candidates on attempt "+this.candidateSendTries+". Giving up on this call.",t);const e=_.SignallingFailed,n="Signalling failed";return this.emit(f.Error,new y(e,n,t)),void this.hangup(e,!1)}const n=500*Math.pow(2,this.candidateSendTries);++this.candidateSendTries,i.a.debug("Failed to send candidates. Retrying in "+n+"ms",t),setTimeout(()=>{this.sendCandidateQueue()},n)}}async placeCallWithConstraints(e){i.a.log("Getting user media with constraints",e),this.client.callEventHandler.calls.set(this.callId,this),this.setState(h.WaitLocalMedia),this.direction=m.Outbound;await this.client.checkTurnServers()||i.a.warn("Failed to get TURN credentials! Proceeding with call anyway..."),this.peerConn=this.createPeerConnection();try{const t=await navigator.mediaDevices.getUserMedia(e);this.gotUserMediaForInvite(t)}catch(e){return void this.getUserMediaFailed(e)}}createPeerConnection(){const e=new window.RTCPeerConnection({iceTransportPolicy:this.forceTURN?"relay":void 0,iceServers:this.turnServers,iceCandidatePoolSize:this.client.iceCandidatePoolSize});return e.addEventListener("iceconnectionstatechange",this.onIceConnectionStateChanged),e.addEventListener("signalingstatechange",this.onSignallingStateChanged),e.addEventListener("icecandidate",this.gotLocalIceCandidate),e.addEventListener("icegatheringstatechange",this.onIceGatheringStateChange),e.addEventListener("track",this.onTrack),e.addEventListener("negotiationneeded",this.onNegotiationNeeded),e}partyIdMatches(e){return(0===e.version?null:e.party_id||null)===this.opponentPartyId}chooseOpponent(e){const t=e.getContent();i.a.debug(`Choosing party ID ${t.party_id} for call ID ${this.callId}`),this.opponentVersion=t.version,0===this.opponentVersion?this.opponentPartyId=null:this.opponentPartyId=t.party_id||null,this.opponentCaps=t.capabilities||{},this.opponentMember=e.sender}async addBufferedIceCandidates(){const e=this.remoteCandidateBuffer.get(this.opponentPartyId);e&&(i.a.info(`Adding ${e.length} buffered candidates for opponent ${this.opponentPartyId}`),await this.addIceCandidates(e)),this.remoteCandidateBuffer=null}async addIceCandidates(e){for(const t of e)if(null!==t.sdpMid&&void 0!==t.sdpMid||null!==t.sdpMLineIndex&&void 0!==t.sdpMLineIndex){i.a.debug("Call "+this.callId+" got remote ICE "+t.sdpMid+" candidate: "+t.candidate);try{await this.peerConn.addIceCandidate(t)}catch(e){this.ignoreOffer||i.a.info("Failed to add remote ICE candidate",e)}}else i.a.debug("Ignoring remote ICE candidate with no sdpMid or sdpMLineIndex")}}async function w(e){var t;const n=await async function(e){var t;if(null!==(t=window.electron)&&void 0!==t&&t.getDesktopCapturerSources&&e){i.a.debug("Electron getDesktopCapturerSources() is available...");const t=await e();return t?{audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t.id}}}:null}return i.a.debug("Electron desktopCapturer is not available..."),{audio:!1,video:!0}}(e);return n?null!==(t=window.electron)&&void 0!==t&&t.getDesktopCapturerSources?(i.a.debug("Getting screen stream using getUserMedia()..."),await navigator.mediaDevices.getUserMedia(n)):(i.a.debug("Getting screen stream using getDisplayMedia()..."),await navigator.mediaDevices.getDisplayMedia(n)):null}function C(e,t){for(let n=0;n<e.length;n++)e[n].enabled=t}function T(e){const t=!!navigator.webkitGetUserMedia;switch(e){case b.Audio:return{audio:{deviceId:x?{ideal:x}:void 0},video:!1};case b.Video:return{audio:{deviceId:x?{ideal:x}:void 0},video:{deviceId:k?{ideal:k}:void 0,width:t?{exact:640}:{ideal:640},height:t?{exact:360}:{ideal:360}}}}}let x,k;function F(e){x=e}function O(e){k=e}function R(e,t,n){if("undefined"==typeof window||"undefined"==typeof document)return null;try{if(!Boolean(window.RTCPeerConnection||window.RTCSessionDescription||window.RTCIceCandidate||navigator.mediaDevices))return i.a.error("WebRTC is not supported in this browser / environment"),null}catch(e){return i.a.error("Exception thrown when trying to access WebRTC",e),null}const r=!!n&&n.forceTURN,o={client:e,roomId:t,turnServers:e.getTurnServers(),forceTURN:e.forceTURN||r},a=new S(o);return e.reEmitter.reEmit(a,Object.values(f)),a}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"g",(function(){return i})),n.d(t,"f",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"a",(function(){return u}));var r=n(109);function o(e,t){const n=new Map(Object.entries(e));for(const e of t)n.delete(e);return Array.from(n.entries()).reduce((e,[t,n])=>(e[t]=n,e),{})}function i(e,t){const n=Object.keys(e),i=Object(r.a)(n,t);return 0===i.removed.length?a(e):o(e,i.removed)}function a(e,t){const n={};for(const[r,o]of Object.entries(e))n[r]=o,t&&(n[r]=t(r,o));return n}function s(e,t){if(e===t)return!1;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!0;const i=Object(r.k)(n,o);return i.length!==n.length||i.some(n=>e[n]!==t[n])}function c(e,t){const n=Object.keys(e),o=Object.keys(t),i=Object(r.a)(n,o);return{changed:Object(r.k)(n,o).filter(n=>e[n]!==t[n]),added:i.added,removed:i.removed}}function l(e,t){const n=c(e,t);return Object(r.f)(n.removed,n.added,n.changed)}function u(e){return JSON.parse(JSON.stringify(e))}},function(e,t,n){"use strict";async function r(e){try{if(navigator&&navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(e),!0;{const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t);const n=document.getSelection(),r=document.createRange();r.selectNode(t),n.removeAllRanges(),n.addRange(r);const o=document.execCommand("copy");return n.removeAllRanges(),document.body.removeChild(t),o}}catch(e){console.error("copyPlaintext failed",e)}return!1}function o(e){const t=document.createRange();t.selectNodeContents(e);const n=window.getSelection();n.removeAllRanges(),n.addRange(t)}function i(e){return o(e),document.execCommand("copy")}n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}));const a=new Intl.Collator;function s(e,t){return a.compare(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return L})),n.d(t,"i",(function(){return U})),n.d(t,"h",(function(){return B})),n.d(t,"d",(function(){return G})),n.d(t,"e",(function(){return V})),n.d(t,"b",(function(){return K})),n.d(t,"g",(function(){return Y})),n.d(t,"f",(function(){return $})),n.d(t,"c",(function(){return Q}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(320),c=n.n(s),l=n(570),u=n.n(l),d=n(1049),h=n(1054),p=n.n(h),m=n(1056),g=n.n(m),f=n(86),_=n.n(f),b=n(596),v=n.n(b),y=n(1058),E=n.n(y),S=n(407),w=n(390),C=n(84),T=n(114),x=n(274),k=n(240),F=n(100);function O(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}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(w.a)(d);const D=/([\ud800-\udbff])([\udc00-\udfff])/,I=/([\u2100-\u2bff])/,A=new RegExp("| ","g"),N=new RegExp("\\s","g"),M=new RegExp(`^(${v.a.source})+$`,"i"),P=/^#[0-9a-fA-F]{6}$/,L=["bitcoin","ftp","geo","http","https","im","irc","ircs","magnet","mailto","matrix","mms","news","nntp","openpgp4fpr","sip","sftp","sms","smsto","ssh","tel","urn","webcal","wtai","xmpp"],j=/\/_matrix\/media\/r0\/(?:download|thumbnail)\/(.+?)\/(.+?)(?:[?/]|$)/;function U(e){var t;const n=null===(t=Object(x.d)(e))||void 0===t?void 0:t.shortcodes;return null!=n&&n.length?`:${n[0]}:`:""}function B(e){const t=c()(e,H);return a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t},dir:"auto"})}function G(e){return c()(e,{allowedTags:[],allowedAttributes:{},selfClosing:[],allowedSchemes:[],disallowedTagsMode:"discard"})}function V(e){try{return L.includes(new URL(e).protocol.slice(0,-1))}catch(e){return!1}}const q={a:function(e,t){if(t.href){t.target="_blank";const e=Object(T.l)(t.href);(e!==t.href||t.href.match(w.a.ELEMENT_URL_PATTERN))&&(t.href=e,delete t.target)}return t.rel="noreferrer noopener",{tagName:e,attribs:t}},img:function(e,t){let n=t.src;if(!n||!C.b.getValue("showImages"))return{tagName:e,attribs:{}};if(!n.startsWith("mxc://")){const e=j.exec(n);e&&(n=`mxc://${e[1]}/${e[2]}`)}if(!n.startsWith("mxc://"))return{tagName:e,attribs:{}};const r=Number(t.width)||800,o=Number(t.height)||600;return t.src=Object(F.b)(n).getThumbnailOfSourceHttp(r,o),{tagName:e,attribs:t}},code:function(e,t){if(void 0!==t.class){const e=t.class.split(/\s/).filter((function(e){return e.startsWith("language-")&&!e.startsWith("language-_")}));t.class=e.join(" ")}return{tagName:e,attribs:t}},"*":function(e,t){delete t.style;const n={"data-mx-color":"color","data-mx-bg-color":"background-color"};let r="";return Object.keys(n).forEach(e=>{const o=n[e],i=t[e];i&&"string"==typeof i&&P.test(i)&&(r+=o+":"+i+";",delete t[e])}),r&&(t.style=r),{tagName:e,attribs:t}}},H={allowedTags:["font","del","h1","h2","h3","h4","h5","h6","blockquote","p","a","ul","ol","sup","sub","nl","li","b","i","u","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre","span","img","details","summary"],allowedAttributes:{font:["color","data-mx-bg-color","data-mx-color","style"],span:["data-mx-maths","data-mx-bg-color","data-mx-color","data-mx-spoiler","style"],div:["data-mx-maths"],a:["href","name","target","rel"],img:["src","width","height","alt","title"],ol:["start"],code:["class"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:L,allowProtocolRelative:!1,transformTags:q,nestingLimit:50},z=R(R({},H),{},{transformTags:{code:q.code,"*":q["*"]}});class W extends class{constructor(e,t){this.highlightClass=e,this.highlightLink=t}applyHighlights(e,t){let n,r=0,o=[];const i=t[0];for(;(n=e.toLowerCase().indexOf(i.toLowerCase(),r))>=0;){if(n>r){const i=e.substring(r,n);o=o.concat(this.applySubHighlights(i,t))}const a=n+i.length;o.push(this.processSnippet(e.substring(n,a),!0)),r=a}if(r!==e.length){const n=e.substring(r,void 0);o=o.concat(this.applySubHighlights(n,t))}return o}applySubHighlights(e,t){return t[1]?this.applyHighlights(e,t.slice(1)):[this.processSnippet(e,!1)]}}{processSnippet(e,t){if(!t)return e;let n=`<span class="${this.highlightClass}">${e}</span>`;return this.highlightLink&&(n=`<a href="${encodeURI(this.highlightLink)}">${n}</a>`),n}}function K(e,t,n={}){const r="org.matrix.custom.html"===e.format&&e.formatted_body;let o,i,s,l=!1,d=H;n.forComposerQuote&&(d=z);try{if(t&&t.length>0){const e=new W("mx_EventTile_searchHighlight",n.highlightLink),r=t.filter(e=>!e.includes("<")).map(e=>c()(e,d));d.textFilter=function(t){return e.applyHighlights(t,r).join("")}}let a="string"==typeof e.formatted_body?e.formatted_body:null;const p="string"==typeof e.body?e.body:"";if(n.stripReplyFallback&&a&&(a=k.a.stripHTMLReply(a)),o=n.stripReplyFallback?k.a.stripPlainReply(p):p,h=r?a:p,l=D.test(h)||I.test(h),r&&(s=!0,i=c()(a,d),C.b.getValue("feature_latex_maths"))){const e=u.a.load(i,{_useHtmlParser2:!0,decodeEntities:!1});e('div, span[data-mx-maths!=""]').replaceWith((function(t,n){return E.a.renderToString(S.AllHtmlEntities.decode(e(n).attr("data-mx-maths")),{throwOnError:!1,displayMode:"div"==n.name,output:"htmlAndMathml"})})),i=e.html()}}finally{delete d.textFilter}var h;const p=s?i:o;if(n.returnString)return p;let m=!1;if(!n.disableBigEmoji&&l){let t=void 0!==p?p.trim():"";t=t.replace(N,""),t=t.replace(A,"");const n=M.exec(t);m=n&&n[0]&&n[0].length===t.length&&(o===i||void 0===e.formatted_body||!e.formatted_body.includes("http:")&&!e.formatted_body.includes("https:"))}const g=_()({mx_EventTile_body:!0,mx_EventTile_bigEmoji:m,"markdown-body":r&&!m});return s?a.a.createElement("span",{key:"body",ref:n.ref,className:g,dangerouslySetInnerHTML:{__html:i},dir:"auto"}):a.a.createElement("span",{key:"body",ref:n.ref,className:g,dir:"auto"},o)}function Y(e,t=w.a.options){return p()(e,t)}function $(e,t=w.a.options){return c()(function(e,t=w.a.options){return g()(e,t)}(e,t),H)}function Q(e){switch(e.nodeName){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"PRE":case"BLOCKQUOTE":case"P":case"UL":case"OL":case"LI":case"HR":case"TABLE":case"THEAD":case"TBODY":case"TR":case"TH":case"TD":return!0;case"DIV":return!e.hasAttribute("data-mx-maths");default:return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(83),h=n(91),p=n(120),m=n(81),g=n(100);const f=["member","fallbackUserId","onClick","viewUserOnClick"];var _,b,v;let y=Object(m.a)("views.avatars.MemberAvatar")((v=b=class e extends u.a.Component{constructor(t){super(t),this.state=e.getState(t)}static getDerivedStateFromProps(t){return e.getState(t)}static getState(e){var t;if(null!==(t=e.member)&&void 0!==t&&t.name){let t=null;return e.member.getMxcAvatarUrl()&&(t=Object(g.b)(e.member.getMxcAvatarUrl()).getThumbnailOfSourceHttp(e.width,e.height,e.resizeMethod)),{name:e.member.name,title:e.title||e.member.userId,imageUrl:t}}if(e.fallbackUserId)return{name:e.fallbackUserId,title:e.fallbackUserId};console.error("MemberAvatar called somehow with null member or fallbackUserId")}render(){let e=this.props,{member:t,fallbackUserId:n,onClick:r,viewUserOnClick:i}=e,s=a()(e,f);const c=t?t.userId:n;return i&&(r=()=>{d.a.dispatch({action:h.a.ViewUser,member:this.props.member})}),u.a.createElement(p.a,o()({},s,{name:this.state.name,title:this.state.title,idName:c,url:this.state.imageUrl,onClick:r}))}},c()(b,"defaultProps",{width:40,height:40,resizeMethod:"crop",viewUserOnClick:!1}),_=v))||_},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(3),a=n.n(i);class s extends a.a{constructor(...e){super(...e),o()(this,"toasts",[]),o()(this,"countSeen",0)}static sharedInstance(){return window.mxToastStore||(window.mxToastStore=new s),window.mxToastStore}reset(){this.toasts=[],this.countSeen=0}addOrReplaceToast(e){const t=this.toasts.findIndex(t=>t.key===e.key);if(-1===t){let t=this.toasts.length;for(;t>0&&this.toasts[t-1].priority<e.priority;)--t;this.toasts.splice(t,0,e)}else this.toasts[t]=e;this.emit("update")}dismissToast(e){this.toasts[0]&&this.toasts[0].key===e&&this.countSeen++;const t=this.toasts.length;this.toasts=this.toasts.filter(t=>t.key!==e),t!==this.toasts.length&&(0===this.toasts.length&&(this.countSeen=0),this.emit("update"))}getToasts(){return this.toasts}getCountSeen(){return this.countSeen}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"request",(function(){return R})),n.d(t,"getRequest",(function(){return D})),n.d(t,"wrapRequest",(function(){return I})),n.d(t,"setCryptoStoreFactory",(function(){return N})),n.d(t,"createClient",(function(){return M}));var r=n(256),o=n(257),i=n(372),a=n(168);n.d(t,"CRYPTO_ENABLED",(function(){return a.a})),n.d(t,"PendingEventOrdering",(function(){return a.c})),n.d(t,"RoomVersionStability",(function(){return a.d})),n.d(t,"MatrixClient",(function(){return a.b}));var s=n(259);n.d(t,"PREFIX_R0",(function(){return s.h})),n.d(t,"PREFIX_UNSTABLE",(function(){return s.i})),n.d(t,"PREFIX_IDENTITY_V1",(function(){return s.e})),n.d(t,"PREFIX_IDENTITY_V2",(function(){return s.f})),n.d(t,"PREFIX_MEDIA_R0",(function(){return s.g})),n.d(t,"MatrixHttpApi",(function(){return s.d})),n.d(t,"MatrixError",(function(){return s.c})),n.d(t,"ConnectionError",(function(){return s.b})),n.d(t,"AbortError",(function(){return s.a})),n.d(t,"retryNetworkOperation",(function(){return s.j}));var c=n(231);n.d(t,"AutoDiscovery",(function(){return c.a}));var l=n(294);n.d(t,"Category",(function(){return l.a})),n.d(t,"SyncAccumulator",(function(){return l.b}));var u=n(206);n.d(t,"InvalidStoreError",(function(){return u.b})),n.d(t,"InvalidCryptoStoreError",(function(){return u.a})),n.d(t,"KeySignatureUploadError",(function(){return u.c}));var d=n(108);n.d(t,"EventStatus",(function(){return d.a})),n.d(t,"MatrixEvent",(function(){return d.b}));var h=n(185);n.d(t,"NotificationCountType",(function(){return h.a})),n.d(t,"Room",(function(){return h.b}));var p=n(229);n.d(t,"Group",(function(){return p.a}));var m=n(152);n.d(t,"Direction",(function(){return m.a})),n.d(t,"EventTimeline",(function(){return m.b}));var g=n(366);n.d(t,"EventTimelineSet",(function(){return g.a}));var f=n(160);n.d(t,"RoomMember",(function(){return f.a}));var _=n(373);n.d(t,"RoomState",(function(){return _.a}));var b=n(205);n.d(t,"User",(function(){return b.a})),n.d(t,"MatrixScheduler",(function(){return i.a}));var v=n(291);n.d(t,"Filter",(function(){return v.a}));var y=n(378);n.d(t,"TimelineWindow",(function(){return y.b})),n.d(t,"TimelineIndex",(function(){return y.a}));var E=n(379);n.d(t,"InteractiveAuth",(function(){return E.a}));var S=n(188);n.d(t,"SERVICE_TYPES",(function(){return S.a})),n.d(t,"MemoryStore",(function(){return o.a}));var w=n(363);n.d(t,"IndexedDBStore",(function(){return w.a}));var C=n(380);n.d(t,"WebStorageSessionStore",(function(){return C.a})),n.d(t,"MemoryCryptoStore",(function(){return r.a}));var T=n(153);n.d(t,"IndexedDBCryptoStore",(function(){return T.a}));var x=n(258);n.d(t,"getHttpUriForMxc",(function(){return x.a}));var k=n(303);n.d(t,"ContentHelpers",(function(){return k}));var F=n(128);let O;function R(e){O=e}function D(){return O}function I(e){const t=O;O=function(n,r){return e(t,n,r)}}n.d(t,"createNewMatrixCall",(function(){return F.g})),n.d(t,"setMatrixCallAudioInput",(function(){return F.i})),n.d(t,"setMatrixCallVideoInput",(function(){return F.j}));let A=()=>new r.a;function N(e){A=e}function M(t){return"string"==typeof t&&(t={baseUrl:t}),t.request=t.request||O,t.store=t.store||new o.a({localStorage:e.localStorage}),t.scheduler=t.scheduler||new i.a,t.cryptoStore=t.cryptoStore||A(),new a.b(t)}}.call(this,n(23))},function(e,t,n){"use strict";n.r(t),function(e,r){n.d(t,"OLM_ALGORITHM",(function(){return l})),n.d(t,"MEGOLM_ALGORITHM",(function(){return u})),n.d(t,"MEGOLM_BACKUP_ALGORITHM",(function(){return d})),n.d(t,"encryptMessageForDevice",(function(){return h})),n.d(t,"getExistingOlmSessions",(function(){return p})),n.d(t,"ensureOlmSessionsForDevices",(function(){return m})),n.d(t,"verifySignature",(function(){return f})),n.d(t,"pkSign",(function(){return _})),n.d(t,"pkVerify",(function(){return b})),n.d(t,"encodeBase64",(function(){return v})),n.d(t,"encodeUnpaddedBase64",(function(){return y})),n.d(t,"decodeBase64",(function(){return E}));var o,i=n(295),a=n.n(i),s=n(96),c=n(2);!function(e){e.Olm="m.olm.v1.curve25519-aes-sha2",e.Megolm="m.megolm.v1.aes-sha2",e.MegolmBackup="m.megolm_backup.v1.curve25519-aes-sha2"}(o||(o={}));const l=o.Olm,u=o.Megolm,d=o.MegolmBackup;async function h(e,t,n,r,o,i,a){const l=i.getIdentityKey(),u=await r.getSessionIdForDevice(l);if(null===u)return;s.a.log("Using sessionid "+u+" for device "+o+":"+i.deviceId);const d={sender:t,sender_device:n,keys:{ed25519:r.deviceEd25519Key},recipient:o,recipient_keys:{ed25519:i.getFingerprint()}};c.q(d,a),e[l]=await r.encryptMessage(l,u,JSON.stringify(d))}async function p(e,t,n){const r={},o={},i=[];for(const[t,a]of Object.entries(n))for(const n of a){const a=n.deviceId,s=n.getIdentityKey();i.push((async()=>{const i=await e.getSessionIdForDevice(s,!0);null===i?(r[t]=r[t]||[],r[t].push(n)):(o[t]=o[t]||{},o[t][a]={device:n,sessionId:i})})())}return await Promise.all(i),[r,o]}async function m(e,t,n,r=!1,o,i,a=s.a){"number"==typeof r&&(a=i,i=o,o=r,r=!1);const c=[],l={},u={};for(const[,t]of Object.entries(n))for(const n of t){const t=n.getIdentityKey();t!==e.deviceCurve25519Key&&(e._sessionsInProgress[t]||(e._sessionsInProgress[t]=new Promise(n=>{u[t]=r=>{delete e._sessionsInProgress[t],n(r)}})))}for(const[t,o]of Object.entries(n)){l[t]={};for(const n of o){const o=n.deviceId,i=n.getIdentityKey();if(i===e.deviceCurve25519Key){a.info("Attempted to start session with ourself! Ignoring"),l[t][o]={device:n,sessionId:null};continue}const s=`for ${i} (${t}:${o})`,d=await e.getSessionIdForDevice(i,u[i],a);null!==d&&u[i]&&u[i](),(null===d||r)&&(r?a.info("Forcing new Olm session "+s):a.info("Making new Olm session "+s),c.push([t,o])),l[t][o]={device:n,sessionId:d}}}if(0===c.length)return l;let d,h=`one-time keys for ${c.length} devices`;try{a.debug("Claiming "+h),d=await t.claimOneTimeKeys(c,"signed_curve25519",o),a.debug("Claimed "+h)}catch(e){for(const e of Object.values(u))e();throw a.log("Failed to claim "+h,e,c),e}i&&"failures"in d&&i.push(...Object.keys(d.failures));const p=d.one_time_keys||{},m=[];for(const[t,o]of Object.entries(n)){const n=p[t]||{};for(let i=0;i<o.length;i++){const s=o[i],c=s.deviceId,d=s.getIdentityKey();if(d===e.deviceCurve25519Key)continue;if(l[t][c].sessionId&&!r)continue;const h=n[c]||{};let p=null;for(const e in h)0===e.indexOf("signed_curve25519:")&&(p=h[e]);p?m.push(g(e,p,t,s).then(e=>{u[d]&&u[d](e),l[t][c].sessionId=e},e=>{throw u[d]&&u[d](),e})):(a.warn(`No one-time keys (alg=signed_curve25519) for device ${t}:${c}`),u[d]&&u[d]())}}return h=`Olm sessions for ${m.length} devices`,a.debug("Starting "+h),await Promise.all(m),a.debug("Started "+h),l}async function g(e,t,n,r){const o=r.deviceId;try{await f(e,t,n,o,r.getFingerprint())}catch(e){return s.a.error("Unable to verify signature on one-time key for device "+n+":"+o+":",e),null}let i;try{i=await e.createOutboundSession(r.getIdentityKey(),t.key)}catch(e){return s.a.error("Error starting olm session with device "+n+":"+o+": "+e),null}return s.a.log("Started new olm sessionid "+i+" for device "+n+":"+o),i}async function f(e,t,n,r,o){const i="ed25519:"+r,s=((t.signatures||{})[n]||{})[i];if(!s)throw Error("No signature");const c=Object.assign({},t);"unsigned"in c&&delete c.unsigned,delete c.signatures;const l=a.a.stringify(c);e.verifySignature(o,l,s)}function _(t,n,r,o){let i=!1;if(n instanceof Uint8Array){const t=new e.Olm.PkSigning;o=t.init_with_seed(n),n=t,i=!0}const s=t.signatures||{};delete t.signatures;const c=t.unsigned;t.unsigned&&delete t.unsigned;try{const e=s[r]||{};return s[r]=e,e["ed25519:"+o]=n.sign(a.a.stringify(t))}finally{t.signatures=s,c&&(t.unsigned=c),i&&n.free()}}function b(t,n,r){const o="ed25519:"+n;if(!(t.signatures&&t.signatures[r]&&t.signatures[r][o]))throw new Error("No signature");const i=t.signatures[r][o],s=new e.Olm.Utility,c=t.signatures;delete t.signatures;const l=t.unsigned;t.unsigned&&delete t.unsigned;try{s.ed25519_verify(n,a.a.stringify(t),i)}finally{t.signatures=c,l&&(t.unsigned=l),s.free()}}function v(e){return r.from(e).toString("base64")}function y(e){return v(e).replace(/=+$/g,"")}function E(e){return r.from(e,"base64")}}.call(this,n(23),n(24).Buffer)},function(e,t,n){"use strict";let r,o,i,a,s,c;n.d(t,"f",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),function(e){e.Public="public",e.Private="private"}(r||(r={})),function(e){e.PrivateChat="private_chat",e.TrustedPrivateChat="trusted_private_chat",e.PublicChat="public_chat"}(o||(o={})),function(e){e.Public="public",e.Invite="invite",e.Private="private",e.Knock="knock",e.Restricted="restricted"}(i||(i={})),function(e){e.RoomMembership="m.room_membership"}(a||(a={})),function(e){e.CanJoin="can_join",e.Forbidden="forbidden"}(s||(s={})),function(e){e.Invited="invited",e.Joined="joined",e.Shared="shared",e.WorldReadable="world_readable"}(c||(c={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(180),h=n(81);const p=["children","className"];var m,g,f;let _=Object(h.a)("views.elements.StyledCheckbox")((f=g=class extends u.a.PureComponent{constructor(e){super(e),c()(this,"id",void 0),this.id="checkbox_"+Object(d.b)(10)}render(){const e=this.props,{children:t,className:r}=e,i=a()(e,p);return u.a.createElement("span",{className:"mx_Checkbox "+r},u.a.createElement("input",o()({id:this.id},i,{type:"checkbox"})),u.a.createElement("label",{htmlFor:this.id},u.a.createElement("div",{className:"mx_Checkbox_background"},u.a.createElement("img",{src:n(943)})),u.a.createElement("div",null,this.props.children)))}},c()(g,"defaultProps",{className:""}),m=f))||m},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return B})),n.d(t,"b",(function(){return V})),n.d(t,"a",(function(){return q})),n.d(t,"d",(function(){return H}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(82),c=n(87),l=n(80),u=n(83),d=n(139),h=n(84),p=n(391),m=n(155),g=n(98),f=n(564),_=n(110),b=n(105),v=n(212),y=n(238),E=n(1),S=n(128),w=n(124),C=n(112),T=n(113),x=n(96),k=n(91),F=n(565),O=n(1007),R=n(180),D=n(3),I=n.n(D),A=n(90),N=n(125),M=n(233),P=n(230),L=n(172),j=n(566),U=n(133);const B="im.vector.is_virtual_room";var G;let V,q;!function(e){e.Ring="ringAudio",e.Ringback="ringbackAudio",e.CallEnd="callendAudio",e.Busy="busyAudio"}(G||(G={})),function(e){e.Voice="voice",e.Video="video"}(V||(V={})),function(e){e.CallsChanged="calls_changed",e.CallChangeRoom="call_change_room",e.SilencedCallsChanged="silenced_calls_changed"}(q||(q={}));class H extends I.a{constructor(...e){super(...e),o()(this,"calls",new Map),o()(this,"transferees",new Map),o()(this,"audioPromises",new Map),o()(this,"dispatcherRef",null),o()(this,"supportsPstnProtocol",null),o()(this,"pstnSupportPrefixed",null),o()(this,"supportsSipNativeVirtual",null),o()(this,"pstnSupportCheckTimer",void 0),o()(this,"invitedRoomsAreVirtual",new Map),o()(this,"invitedRoomCheckInProgress",!1),o()(this,"assertedIdentityNativeUsers",new Map),o()(this,"silencedCalls",new Set),o()(this,"onCallIncoming",e=>{u.a.dispatch({action:"incoming_call",call:e},!0)}),o()(this,"onAction",e=>{switch(e.action){case"place_call":{if(Object(O.b)())return void Object(O.a)(e.room_id);if(!s.a.get().supportsVoip())return void c.a.createTrackedDialog("Call Handler","VoIP is unsupported",b.a,{title:Object(l.a)("VoIP is unsupported"),description:Object(l.a)("You cannot place VoIP calls in this browser.")});if(this.getAllActiveCalls().length>1)return void c.a.createTrackedDialog("Call Handler","Existing Call",b.a,{title:Object(l.a)("Too Many Calls"),description:Object(l.a)("You've reached the maximum number of simultaneous calls.")});const t=s.a.get().getRoom(e.room_id);if(!t)return void console.error(`Room ${e.room_id} does not exist.`);if(this.getCallForRoom(t.roomId))return void c.a.createTrackedDialog("Call Handler","Existing Call with user",b.a,{title:Object(l.a)("Already in call"),description:Object(l.a)("You're already in a call with this person.")});const n=t.getJoinedMembers();if(n.length<=1)return void c.a.createTrackedDialog("Call Handler","Cannot place call with self",b.a,{description:Object(l.a)("You cannot place a call with yourself.")});2===n.length?(console.info(`Place ${e.type} call in ${e.room_id}`),this.placeCall(e.room_id,e.type,e.transferee)):u.a.dispatch({action:"place_conference_call",room_id:e.room_id,type:e.type})}break;case"place_conference_call":console.info("Place conference call in "+e.room_id),w.a.trackEvent("voip","placeConferenceCall"),C.a.instance.trackStartCall(e.room_id,e.type===V.Video,!0),this.startCallApp(e.room_id,e.type);break;case"end_conference":console.info("Terminating conference call in "+e.room_id),this.terminateCallApp(e.room_id);break;case"hangup_conference":console.info("Leaving conference call in "+e.room_id),this.hangupCallApp(e.room_id);break;case"incoming_call":{if(!s.a.get().supportsVoip())return;const t=e.call,n=H.sharedInstance().roomIdForCall(t);if(this.getCallForRoom(n))return void console.log("Got incoming call for room "+n+" but there's already a call for this room: ignoring");w.a.trackEvent("voip","receiveCall","type",t.type),console.log("Adding call for room ",n),this.calls.set(n,t),this.emit(q.CallsChanged,this.calls),this.setCallListeners(t);const r=s.a.get();r.prepareToEncrypt(r.getRoom(t.roomId))}break;case"hangup":case"reject":if(!this.calls.get(e.room_id))return;"reject"===e.action?this.calls.get(e.room_id).reject():this.calls.get(e.room_id).hangup(S.b.UserHangup,!1);break;case"hangup_all":for(const e of this.calls.values())e.hangup(S.b.UserHangup,!1);break;case"answer":{if(!this.calls.has(e.room_id))return;if(this.getAllActiveCalls().length>1)return void c.a.createTrackedDialog("Call Handler","Existing Call",b.a,{title:Object(l.a)("Too Many Calls"),description:Object(l.a)("You've reached the maximum number of simultaneous calls.")});const t=this.calls.get(e.room_id);t.answer(),this.setActiveCallRoomId(e.room_id),C.a.instance.trackJoinCall(e.room_id,t.type===S.f.Video,!1),u.a.dispatch({action:"view_room",room_id:e.room_id});break}case k.a.DialNumber:this.dialNumber(e.number);break;case k.a.TransferCallToMatrixID:this.startTransferToMatrixID(e.call,e.destination,e.consultFirst);break;case k.a.TransferCallToPhoneNumber:this.startTransferToPhoneNumber(e.call,e.destination,e.consultFirst)}})}static sharedInstance(){return window.mxCallHandler||(window.mxCallHandler=new H),window.mxCallHandler}roomIdForCall(e){if(!e)return null;const t=A.a.get().voip;if(t&&t.obeyAssertedIdentity){const t=this.assertedIdentityNativeUsers[e.callId];if(t){const e=Object(N.e)(s.a.get(),t);if(e)return e.roomId}}return F.a.sharedInstance().nativeRoomForVirtualRoom(e.roomId)||e.roomId}start(){this.dispatcherRef=u.a.register(this.onAction),navigator.mediaSession&&(navigator.mediaSession.setActionHandler("play",(function(){})),navigator.mediaSession.setActionHandler("pause",(function(){})),navigator.mediaSession.setActionHandler("seekbackward",(function(){})),navigator.mediaSession.setActionHandler("seekforward",(function(){})),navigator.mediaSession.setActionHandler("previoustrack",(function(){})),navigator.mediaSession.setActionHandler("nexttrack",(function(){}))),h.b.getValue(T.a.Voip)&&s.a.get().on("Call.incoming",this.onCallIncoming),this.checkProtocols(3)}stop(){const e=s.a.get();e&&e.removeListener("Call.incoming",this.onCallIncoming),null!==this.dispatcherRef&&(u.a.unregister(this.dispatcherRef),this.dispatcherRef=null)}silenceCall(e){this.silencedCalls.add(e),this.emit(q.SilencedCallsChanged,this.silencedCalls),this.areAnyCallsUnsilenced()||this.pause(G.Ring)}unSilenceCall(e){this.silencedCalls.delete(e),this.emit(q.SilencedCallsChanged,this.silencedCalls),this.play(G.Ring)}isCallSilenced(e){return this.silencedCalls.has(e)}areAnyCallsUnsilenced(){return this.calls.size>this.silencedCalls.size}async checkProtocols(e){try{const e=await s.a.get().getThirdpartyProtocols();void 0!==e["m.protocol.pstn"]?(this.supportsPstnProtocol=Boolean(e["m.protocol.pstn"]),this.supportsPstnProtocol&&(this.pstnSupportPrefixed=!1)):void 0!==e["im.vector.protocol.pstn"]?(this.supportsPstnProtocol=Boolean(e["im.vector.protocol.pstn"]),this.supportsPstnProtocol&&(this.pstnSupportPrefixed=!0)):this.supportsPstnProtocol=null,u.a.dispatch({action:k.a.PstnSupportUpdated}),void 0!==e["im.vector.protocol.sip_native"]&&void 0!==e["im.vector.protocol.sip_virtual"]&&(this.supportsSipNativeVirtual=Boolean(e["im.vector.protocol.sip_native"]&&e["im.vector.protocol.sip_virtual"])),u.a.dispatch({action:k.a.VirtualRoomSupportUpdated})}catch(t){1===e?console.log("Failed to check for protocol support and no retries remain: assuming no support",t):(console.log("Failed to check for protocol support: will retry",t),this.pstnSupportCheckTimer=setTimeout(()=>{this.checkProtocols(e-1)},1e4))}}getSupportsPstnProtocol(){return this.supportsPstnProtocol}getSupportsVirtualRooms(){return this.supportsSipNativeVirtual}pstnLookup(e){return s.a.get().getThirdpartyUser(this.pstnSupportPrefixed?"im.vector.protocol.pstn":"m.protocol.pstn",{"m.id.phone":e})}sipVirtualLookup(e){return s.a.get().getThirdpartyUser("im.vector.protocol.sip_virtual",{native_mxid:e})}sipNativeLookup(e){return s.a.get().getThirdpartyUser("im.vector.protocol.sip_native",{virtual_mxid:e})}getCallById(e){for(const t of this.calls.values())if(t.callId===e)return t;return null}getCallForRoom(e){return this.calls.get(e)||null}getAnyActiveCall(){for(const e of this.calls.values())if(e.state!==S.e.Ended)return e;return null}getAllActiveCalls(){const e=[];for(const t of this.calls.values())t.state!==S.e.Ended&&t.state!==S.e.Ringing&&e.push(t);return e}getAllActiveCallsNotInRoom(e){const t=[];for(const[n,r]of this.calls.entries())n!==e&&r.state!==S.e.Ended&&t.push(r);return t}getTransfereeForCallId(e){return this.transferees[e]}play(e){const t=document.getElementById(e);if(t){const n=async()=>{try{await t.play()}catch(e){console.log("Unable to play audio clip",e)}};this.audioPromises.has(e)?this.audioPromises.set(e,this.audioPromises.get(e).then(()=>(t.load(),n()))):this.audioPromises.set(e,n())}}pause(e){const t=document.getElementById(e);t&&(this.audioPromises.has(e)?this.audioPromises.set(e,this.audioPromises.get(e).then(()=>t.pause())):t.pause())}matchesCallForThisRoom(e){const t=this.roomIdForCall(e),n=this.getCallForRoom(t);return n&&e.callId===n.callId}setCallListeners(e){let t=this.roomIdForCall(e);e.on(S.c.Error,t=>{this.matchesCallForThisRoom(e)&&(w.a.trackEvent("voip","callError","error",t.toString()),console.error("Call error:",t),t.code!==S.b.NoUserMedia?0!==s.a.get().getTurnServers().length||null!==h.b.getValue("fallbackICEServerAllowed")?c.a.createTrackedDialog("Call Failed","",b.a,{title:Object(l.a)("Call Failed"),description:t.message}):this.showICEFallbackPrompt():this.showMediaCaptureError(e))}),e.on(S.c.Hangup,()=>{this.matchesCallForThisRoom(e)&&(w.a.trackEvent("voip","callHangup"),this.removeCallForRoom(t))}),e.on(S.c.State,(n,r)=>{if(this.matchesCallForThisRoom(e)){switch(this.setCallState(e,n),r){case S.e.Ringing:this.pause(G.Ring);break;case S.e.InviteSent:this.pause(G.Ringback)}switch(n!==S.e.Ringing&&this.silencedCalls.delete(e.callId),n){case S.e.Ringing:{const t=new P.a(s.a.get()).getPushRuleById(M.c.IncomingCall),n=null==t?void 0:t.enabled,r=null==t?void 0:t.actions.some(e=>e.set_tweak===M.d.Sound&&"ring"===e.value);n&&r?this.play(G.Ring):this.silenceCall(e.callId);break}case S.e.InviteSent:this.play(G.Ringback);break;case S.e.Ended:{const n=e.hangupReason;if(w.a.trackEvent("voip","callEnded","hangupReason",n),this.removeCallForRoom(t),r===S.e.InviteSent&&e.hangupParty===S.d.Remote){if(this.play(G.Busy),!n||[S.b.UserHangup,"user hangup"].includes(n))break;let t,r;e.hangupReason===S.b.UserBusy?(t=Object(l.a)("User Busy"),r=Object(l.a)("The user you called is busy.")):(t=Object(l.a)("Call Failed"),r=Object(l.a)("The call could not be established")),c.a.createTrackedDialog("Call Handler","Call Failed",b.a,{title:t,description:r})}else n===S.b.AnsweredElsewhere&&r===S.e.Connecting?c.a.createTrackedDialog("Call Handler","Call Failed",b.a,{title:Object(l.a)("Answered Elsewhere"),description:Object(l.a)("The call was answered on another device.")}):r!==S.e.Fledgling&&r!==S.e.Ringing&&this.play(G.CallEnd);this.logCallStats(e,t);break}}}}),e.on(S.c.Replaced,n=>{this.matchesCallForThisRoom(e)&&(console.log(`Call ID ${e.callId} is being replaced by call ID ${n.callId}`),e.state===S.e.Ringing?this.pause(G.Ring):e.state===S.e.InviteSent&&this.pause(G.Ringback),this.calls.set(t,n),this.emit(q.CallsChanged,this.calls),this.setCallListeners(n),this.setCallState(n,n.state))}),e.on(S.c.AssertedIdentityChanged,async()=>{if(!this.matchesCallForThisRoom(e))return;console.log(`Call ID ${e.callId} got new asserted identity:`,e.getRemoteAssertedIdentity());const n=e.getRemoteAssertedIdentity().id;let r=n;if(n){const e=await this.sipNativeLookup(n);e.length&&e[0].fields.lookup_success&&(r=e[0].userid)}if(console.log(`Asserted identity ${n} mapped to ${r}`),r){this.assertedIdentityNativeUsers[e.callId]=r,await Object(N.c)(s.a.get(),r);const n=this.roomIdForCall(e);console.log(`Old room ID: ${t}, new room ID: ${n}`),n!==t&&(this.removeCallForRoom(t),t=n,console.log("Moving call to room "+t),this.calls.set(t,e),this.emit(q.CallChangeRoom,e))}})}async logCallStats(e,t){const n=await e.getCurrentCallStats();if(x.a.debug(`Call completed. Call ID: ${e.callId}, virtual room ID: ${e.roomId}, user-facing room ID: ${t}, direction: ${e.direction}, our Party ID: ${e.ourPartyId}, hangup party: ${e.hangupParty}, hangup reason: `+e.hangupReason),n){x.a.debug("Local candidates:");for(const e of n.filter(e=>"local-candidate"===e.type)){const t=e.address||e.ip;x.a.debug(`${e.id} - type: ${e.candidateType}, address: ${t}, port: ${e.port}, protocol: ${e.protocol}, relay protocol: ${e.relayProtocol}, network type: ${e.networkType}`)}x.a.debug("Remote candidates:");for(const e of n.filter(e=>"remote-candidate"===e.type)){const t=e.address||e.ip;x.a.debug(`${e.id} - type: ${e.candidateType}, address: ${t}, port: ${e.port}, protocol: `+e.protocol)}x.a.debug("Candidate pairs:");for(const e of n.filter(e=>"candidate-pair"===e.type))x.a.debug(`${e.localCandidateId} / ${e.remoteCandidateId} - state: ${e.state}, nominated: ${e.nominated}, requests sent ${e.requestsSent}, requests received ${e.requestsReceived}, responses received: ${e.responsesReceived}, responses sent: ${e.responsesSent}, bytes received: ${e.bytesReceived}, bytes sent: ${e.bytesSent}, `)}else x.a.debug("Call statistics are undefined. The call has probably failed before a peerConn was established")}setCallState(e,t){const n=H.sharedInstance().roomIdForCall(e);console.log(`Call state in ${n} changed to ${t}`);const r=Object(j.b)(e.callId);t===S.e.Ringing?U.a.sharedInstance().addOrReplaceToast({key:r,priority:100,component:j.a,bodyClassName:"mx_IncomingCallToast",props:{call:e}}):U.a.sharedInstance().dismissToast(r),u.a.dispatch({action:"call_state",room_id:n,state:t})}removeCallForRoom(e){console.log("Removing call for room ",e),this.calls.delete(e),this.emit(q.CallsChanged,this.calls)}showICEFallbackPrompt(){const e=s.a.get(),t=e=>a.a.createElement("code",null,e);c.a.createTrackedDialog("No TURN servers","",_.a,{title:Object(l.a)("Call failed due to misconfigured server"),description:a.a.createElement("div",null,a.a.createElement("p",null,Object(l.a)("Please ask the administrator of your homeserver (<code>%(homeserverDomain)s</code>) to configure a TURN server in order for calls to work reliably.",{homeserverDomain:e.getDomain()},{code:t})),a.a.createElement("p",null,Object(l.a)("Alternatively, you can try to use the public server at <code>turn.matrix.org</code>, but this will not be as reliable, and it will share your IP address with that server. You can also manage this in Settings.",null,{code:t}))),button:Object(l.a)("Try using turn.matrix.org"),cancelButton:Object(l.a)("OK"),onFinished:t=>{h.b.setValue("fallbackICEServerAllowed",null,g.a.DEVICE,t),e.setFallbackICEServerAllowed(t)}},null,!0)}showMediaCaptureError(e){let t,n;e.type===S.f.Voice?(t=Object(l.a)("Unable to access microphone"),n=a.a.createElement("div",null,Object(l.a)("Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly."))):e.type===S.f.Video&&(t=Object(l.a)("Unable to access webcam / microphone"),n=a.a.createElement("div",null,Object(l.a)("Call failed because webcam or microphone could not be accessed. Check that:"),a.a.createElement("ul",null,a.a.createElement("li",null,Object(l.a)("A microphone and webcam are plugged in and set up correctly")),a.a.createElement("li",null,Object(l.a)("Permission is granted to use the webcam")),a.a.createElement("li",null,Object(l.a)("No other application is using the webcam"))))),c.a.createTrackedDialog("Media capture failed","",b.a,{title:t,description:n},null,!0)}async placeCall(e,t,n){w.a.trackEvent("voip","placeCall","type",t),C.a.instance.trackStartCall(e,t===V.Video,!1);const r=await F.a.sharedInstance().getOrCreateVirtualRoomForRoom(e)||e;x.a.debug("Mapped real room "+e+" to room ID "+r);const o=s.a.get().getTurnServersExpiry()-Date.now();console.log("Current turn creds expire in "+o+" ms");const i=s.a.get().createCall(r);console.log("Adding call for room ",e),this.calls.set(e,i),this.emit(q.CallsChanged,this.calls),n&&(this.transferees[i.callId]=n),this.setCallListeners(i),this.setActiveCallRoomId(e),t===V.Voice?i.placeVoiceCall():"video"===t?i.placeVideoCall():console.error("Unknown conf call type: "+t)}async dialNumber(e){const t=await this.pstnLookup(e);if(!t||0===t.length||!t[0].userid)return void c.a.createTrackedDialog("","",b.a,{title:Object(l.a)("Unable to look up phone number"),description:Object(l.a)("There was an error looking up the phone number")});const n=t[0].userid;let r;if(this.getSupportsVirtualRooms()){const t=await this.sipNativeLookup(n);r=t.length>0&&t[0].fields.lookup_success?t[0].userid:n,console.log("Looked up "+e+" to "+n+" and mapped to native user "+r)}else r=n;const o=await Object(N.c)(s.a.get(),r);u.a.dispatch({action:"view_room",room_id:o}),await this.placeCall(o,V.Voice,null)}async startTransferToPhoneNumber(e,t,n){const r=await this.pstnLookup(t);r&&0!==r.length&&r[0].userid?await this.startTransferToMatrixID(e,r[0].userid,n):c.a.createTrackedDialog("","",b.a,{title:Object(l.a)("Unable to transfer call"),description:Object(l.a)("There was an error looking up the phone number")})}async startTransferToMatrixID(e,t,n){if(n){const n=await Object(N.c)(s.a.get(),t);u.a.dispatch({action:"place_call",type:e.type,room_id:n,transferee:e}),u.a.dispatch({action:"view_room",room_id:n,should_peek:!1,joining:!1})}else try{await e.transfer(t)}catch(e){console.log("Failed to transfer call",e),c.a.createTrackedDialog("Failed to transfer call","",b.a,{title:Object(l.a)("Transfer Failed"),description:Object(l.a)("Failed to transfer call")})}}setActiveCallRoomId(e){x.a.info("Setting call in room "+e+" active");for(const[t,n]of this.calls.entries())n.state!==S.e.Ended&&(t===e?n.setRemoteOnHold(!1):(x.a.info("Holding call in room "+t+" because another call is being set active"),n.setRemoteOnHold(!0)))}hasAnyUnheldCall(){for(const e of this.calls.values())if(e.state!==S.e.Ended&&!e.isRemoteOnHold())return!0;return!1}async startCallApp(t,n){u.a.dispatch({action:"appsDrawer",show:!0});const r=s.a.get().getRoom(t),o=v.a.instance.getApps(t).find(e=>m.a.JITSI.matches(e.type));if(o)return void L.d.instance.moveToContainer(r,o,L.a.Top);const i=p.a.getInstance().preferredDomain,a=await p.a.getInstance().getJitsiAuth();let h;if("openidtoken-jwt"===a)h=f.base32.stringify(e.from(t),{pad:!1});else{h="Jitsi"+(Object(R.c)(1)+Object(R.a)(23))}let g=d.a.getLocalJitsiWrapperUrl({auth:a});const _=new URL(g);_.search="",_.searchParams.set("confId",h),g=_.toString();const y={conferenceId:h,isAudioOnly:"voice"===n,domain:i,auth:a,roomName:r.name},E="jitsi_"+s.a.get().credentials.userId+"_"+Date.now();d.a.setRoomWidget(t,E,m.a.JITSI,g,"Jitsi",y).then(()=>{console.log("Jitsi widget added")}).catch(e=>{"M_FORBIDDEN"===e.errcode&&c.a.createTrackedDialog("Call Failed","",b.a,{title:Object(l.a)("Permission Required"),description:Object(l.a)("You do not have permission to start a conference call in this room")}),console.error(e)})}terminateCallApp(e){c.a.createTrackedDialog("Confirm Jitsi Terminate","",_.a,{hasCancelButton:!0,title:Object(l.a)("End conference"),description:Object(l.a)("This will end the conference for everyone. Continue?"),button:Object(l.a)("End conference"),onFinished:t=>{if(!t)return;v.a.instance.getRoom(e).widgets.filter(e=>m.a.JITSI.matches(e.type)).forEach(t=>{d.a.setRoomWidget(e,t.id)})}})}hangupCallApp(e){const t=v.a.instance.getRoom(e);if(!t)return;t.widgets.filter(e=>m.a.JITSI.matches(e.type)).forEach(e=>{const t=y.a.instance.getMessagingForId(e.id);t&&t.transport.send(E.a.HangupCall,{})})}}}).call(this,n(24).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(169),o=n(0),i=n(82),a=n(90),s=n(83),c=n(268),l=n(84),u=n(178),d=n(155),h=n(129),p=n(80);class m{static canUserModifyWidgets(e){if(!e)return console.warn("No room ID specified"),!1;const t=i.a.get();if(!t)return console.warn("User must be be logged in"),!1;const n=t.getRoom(e);if(!n)return console.warn(`Room ID ${e} is not recognised`),!1;const r=t.credentials.userId;return r?"join"!==n.getMyMembership()?(console.warn(`User ${r} is not in room ${e}`),!1):n.currentState.maySendStateEvent("im.vector.modular.widgets",r):(console.warn("Failed to get user ID"),!1)}static isScalarUrl(e){if(!e)return console.error("Scalar URL check failed. No URL specified"),!1;const t=r.parse(e);let n=a.a.get().integrations_widgets_urls;if(!n||0===n.length){const e=u.a.sharedInstance().getPrimaryManager();n=e?[e.apiUrl]:[]}for(let e=0;e<n.length;e++){const o=r.parse(n[e]);if(t&&o&&t.protocol===o.protocol&&t.host===o.host&&t.pathname.startsWith(o.pathname))return!0}return!1}static waitForUserWidget(e,t){return new Promise((n,r)=>{function o(n){return!(!n||!n.getContent())&&(t?void 0!==n.getContent()[e]:void 0===n.getContent()[e])}if(o(i.a.get().getAccountData("m.widgets")))return void n();function a(e){o(i.a.get().getAccountData("m.widgets"))&&(i.a.get().removeListener("accountData",a),clearTimeout(s),n())}const s=setTimeout(()=>{i.a.get().removeListener("accountData",a),r(new Error("Timed out waiting for widget ID "+e+" to appear"))},2e4);i.a.get().on("accountData",a)})}static waitForRoomWidget(e,t,n){return new Promise((r,o)=>{function a(t){const r=t.some(t=>t.getContent()&&t.getContent().id===e);return n?r:!r}const s=i.a.get().getRoom(t);if(a(s.currentState.getStateEvents("im.vector.modular.widgets")))return void r();function c(e){if(e.getRoomId()!==t)return;a(s.currentState.getStateEvents("im.vector.modular.widgets"))&&(i.a.get().removeListener("RoomState.events",c),clearTimeout(l),r())}const l=setTimeout(()=>{i.a.get().removeListener("RoomState.events",c),o(new Error("Timed out waiting for widget ID "+e+" to appear"))},2e4);i.a.get().on("RoomState.events",c)})}static setUserWidget(e,t,n,r,o){const a={type:t.preferred,url:n,name:r,data:o},c=i.a.get(),l=Object(h.a)(m.getUserWidgets());try{delete l[e]}catch(e){console.error("$widgetId is non-configurable")}const u=Boolean(n);return u&&(l[e]={content:a,sender:c.getUserId(),state_key:e,type:"m.widget",id:e}),c.setAccountData("m.widgets",l).then(()=>m.waitForUserWidget(e,u)).then(()=>{s.a.dispatch({action:"user_widget_updated"})})}static setRoomWidget(e,t,n,r,o,i){let a;return a=Boolean(r)?{type:n.legacy,url:r,name:o,data:i}:{},m.setRoomWidgetContent(e,t,a)}static setRoomWidgetContent(e,t,n){const r=!!n.url;c.a.setRoomWidgetEcho(e,t,n);return i.a.get().sendStateEvent(e,"im.vector.modular.widgets",n,t).then(()=>m.waitForRoomWidget(t,e,r)).finally(()=>{c.a.removeRoomWidgetEcho(e,t)})}static getRoomWidgets(e){const t=e.currentState.getStateEvents("im.vector.modular.widgets");return t?t.filter(e=>e.getContent().type&&e.getContent().url):[]}static getUserWidgets(){const e=i.a.get();if(!e)throw new Error("User not logged in");const t=e.getAccountData("m.widgets");return t&&t.getContent()?t.getContent():{}}static getUserWidgetsArray(){return Object.values(m.getUserWidgets())}static getStickerpickerWidgets(){return m.getUserWidgetsArray().filter(e=>e.content&&"m.stickerpicker"===e.content.type)}static getIntegrationManagerWidgets(){return m.getUserWidgetsArray().filter(e=>e.content&&"m.integration_manager"===e.content.type)}static getRoomWidgetsOfType(e,t){return(m.getRoomWidgets(e)||[]).filter(e=>{const n=e.getContent();return n.url&&t.matches(n.type)})}static async removeIntegrationManagerWidgets(){const e=i.a.get();if(!e)throw new Error("User not logged in");const t=e.getAccountData("m.widgets");if(!t)return;const n=t.getContent()||{};Object.entries(n).forEach(([e,t])=>{t.content&&"m.integration_manager"===t.content.type&&delete n[e]}),await e.setAccountData("m.widgets",n)}static addIntegrationManagerWidget(e,t,n){return m.setUserWidget("integration_manager_"+(new Date).getTime(),d.a.INTEGRATION_MANAGER,t,"Integration manager: "+e,{api_url:n})}static async removeStickerpickerWidgets(){const e=i.a.get();if(!e)throw new Error("User not logged in");const t=e.getAccountData("m.widgets");if(!t)return;const n=t.getContent()||{};Object.entries(n).forEach(([e,t])=>{t.content&&"m.stickerpicker"===t.content.type&&delete n[e]}),await e.setAccountData("m.widgets",n)}static makeAppConfig(e,t,n,r,o){if(!n)throw new Error("Widgets must be created by someone - provide a senderUserId");return t.creatorUserId=n,t.id=e,t.roomId=r,t.eventId=o,t.name=t.name||t.type,t}static getCapWhitelistForAppTypeInRoomId(e,t){const n=l.b.getValue("enableWidgetScreenshots",t)?[o.MatrixCapabilities.Screenshots]:[];return d.a.JITSI.matches(e)&&n.push(o.MatrixCapabilities.AlwaysOnScreen),n}static getLocalJitsiWrapperUrl(e={}){const t=["conferenceDomain=$domain","conferenceId=$conferenceId","isAudioOnly=$isAudioOnly","displayName=$matrix_display_name","avatarUrl=$matrix_avatar_url","userId=$matrix_user_id","roomId=$matrix_room_id","theme=$theme","roomName=$roomName"];e.auth&&t.push("auth="+e.auth);const n=t.join("&");let r=window.location.href;"https:"===window.location.protocol||e.forLocalRender||(r="https://app.element.io/");return new URL("jitsi.html#"+n,r).href}static getWidgetName(e){var t;return(null==e||null===(t=e.name)||void 0===t?void 0:t.trim())||Object(p.a)("Unknown App")}static getWidgetDataTitle(e){var t,n;return(null==e||null===(t=e.data)||void 0===t||null===(n=t.title)||void 0===n?void 0:n.trim())||""}static editWidget(e,t){l.b.getValue("feature_many_integration_managers")?u.a.sharedInstance().openAll(e,"type_"+t.type,t.id):u.a.sharedInstance().getPrimaryManager().open(e,"type_"+t.type,t.id)}static isManagedByManager(e){if(m.isScalarUrl(e.url)){const e=u.a.sharedInstance();if(e.hasManager()){const t=e.getPrimaryManager();return m.isScalarUrl(t.apiUrl)}}return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(88),o=n.n(r);let i;!function(e){e.IRC="irc",e.Group="group",e.Bubble="bubble"}(i||(i={}));o.a.oneOf(Object.values(i))},function(e,t,n){"use strict";function r(e,t){return function(e){const t=Object.keys(e),n=[];for(const r of t){const t=e[r];(Number.isFinite(t)||e[t.toString()]!==Number(r))&&n.push(t)}return n}(e).includes(t)}let o;n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return s})),function(e){e.Invite="im.vector.fake.invite",e.Untagged="im.vector.fake.recent",e.Archived="im.vector.fake.archived",e.LowPriority="m.lowpriority",e.Favourite="m.favourite",e.DM="im.vector.fake.direct",e.ServerNotice="m.server_notice",e.Suggested="im.vector.fake.suggested"}(o||(o={}));const i=[o.Invite,o.Favourite,o.DM,o.Untagged,o.LowPriority,o.ServerNotice,o.Suggested,o.Archived];function a(e){return!r(o,e)}let s;!function(e){e.Timeline="TIMELINE",e.PossibleTagChange="POSSIBLE_TAG_CHANGE",e.ReadReceipt="READ_RECEIPT",e.NewRoom="NEW_ROOM",e.RoomRemoved="ROOM_REMOVED"}(s||(s={}))},function(e,t,n){"use strict";e.exports=n(898)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(79),o=n.n(r),i=n(3),a=n.n(i);const s=n(520);let c;!function(e){e.Resize="resize"}(c||(c={}));class l extends a.a{constructor(){super(),o()(this,"resizeObserver",void 0),o()(this,"uiElementDimensions",new Map),o()(this,"trackedUiElements",new Map),o()(this,"windowWidth",void 0),o()(this,"windowHeight",void 0),o()(this,"resizeObserverCallback",e=>{const t=e.find(e=>e.target===document.body);t&&(this.windowWidth=t.contentRect.width,this.windowHeight=t.contentRect.height),e.forEach(e=>{const t=this.trackedUiElements.get(e.target);t&&(this.uiElementDimensions.set(t,e.contentRect),this.emit(t,c.Resize,e))}),this.emit(c.Resize,e)}),this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.resizeObserver=new s(this.resizeObserverCallback),this.resizeObserver.observe(document.body)}static get instance(){return l._instance||(l._instance=new l),l._instance}static destroy(){l._instance&&(l._instance.resizeObserver.disconnect(),l._instance.removeAllListeners(),l._instance=null)}getElementDimensions(e){return this.uiElementDimensions.get(e)}trackElementDimensions(e,t){this.trackedUiElements.set(t,e),this.resizeObserver.observe(t)}stopTrackingElementDimensions(e){let t;this.trackedUiElements.forEach((n,r)=>{n===e&&(t=r)}),t&&(this.resizeObserver.unobserve(t),this.uiElementDimensions.delete(e),this.trackedUiElements.delete(t))}isTrackingElementDimensions(e){return this.uiElementDimensions.has(e)}}o()(l,"_instance",null),window.mxUIStore=l.instance},function(e,t,n){"use strict";n.d(t,"c",(function(){return Y})),n.d(t,"a",(function(){return $})),n.d(t,"b",(function(){return Q})),n.d(t,"d",(function(){return Z}));var r,o,i,a=n(79),s=n.n(a),c=n(92),l=n.n(c),u=n(78),d=n.n(u),h=n(86),p=n.n(h),m=n(93),g=n(108),f=n(240),_=n(80),b=n(311),v=n(89),y=n(83),E=n(140),S=n(148),w=n(82),C=n(365),T=n(94),x=n(200),k=n(332),F=n(155),O=n(119),R=n(172),D=n(129),I=n(81),A=n(154),N=n(218),M=n(175),P=n(91),L=n(132),j=n(324),U=n(433),B=n(434),G=n(881),V=n(629),q=n(632),H=n(198);const z={[m.a.RoomMessage]:"messages.MessageEvent",[m.a.Sticker]:"messages.MessageEvent",[m.a.KeyVerificationCancel]:"messages.MKeyVerificationConclusion",[m.a.KeyVerificationDone]:"messages.MKeyVerificationConclusion",[m.a.CallInvite]:"messages.CallEvent"},W={[m.a.RoomEncryption]:"messages.EncryptionEvent",[m.a.RoomCanonicalAlias]:"messages.TextualEvent",[m.a.RoomCreate]:"messages.RoomCreate",[m.a.RoomMember]:"messages.TextualEvent",[m.a.RoomName]:"messages.TextualEvent",[m.a.RoomAvatar]:"messages.RoomAvatarEvent",[m.a.RoomThirdPartyInvite]:"messages.TextualEvent",[m.a.RoomHistoryVisibility]:"messages.TextualEvent",[m.a.RoomTopic]:"messages.TextualEvent",[m.a.RoomPowerLevels]:"messages.TextualEvent",[m.a.RoomPinnedEvents]:"messages.TextualEvent",[m.a.RoomServerAcl]:"messages.TextualEvent","im.vector.modular.widgets":"messages.TextualEvent",[R.c]:"messages.TextualEvent",[m.a.RoomTombstone]:"messages.TextualEvent",[m.a.RoomJoinRules]:"messages.TextualEvent",[m.a.RoomGuestAccess]:"messages.TextualEvent","m.room.related_groups":"messages.TextualEvent"},K=new Set([m.a.RoomEncryption,m.a.RoomCanonicalAlias,m.a.RoomCreate,m.a.RoomName,m.a.RoomAvatar,m.a.RoomHistoryVisibility,m.a.RoomTopic,m.a.RoomPowerLevels,m.a.RoomPinnedEvents,m.a.RoomServerAcl,R.c,m.a.RoomTombstone,m.a.RoomJoinRules,m.a.RoomGuestAccess,"m.room.related_groups"]);for(const e of C.a)W[e]="messages.TextualEvent";function Y(e){const t=e.getType();if("m.room.message"===t){const t=e.getContent();if(t&&"m.key.verification.request"===t.msgtype){const n=w.a.get(),r=n&&n.getUserId();return e.getSender()!==r&&t.to!==r?void 0:"messages.MKeyVerificationRequest"}}if("m.key.verification.done"===t){const t=w.a.get(),n=t&&t.getUserId();if(e.getSender()!==n)return}if("m.key.verification.cancel"===t||"m.key.verification.done"===t){if(!v.getComponent("messages.MKeyVerificationConclusion").prototype._shouldRender.call(null,e,e.request))return}if("im.vector.modular.widgets"===t){let t=e.getContent().type;if(t||(t=e.getPrevContent().type),F.a.JITSI.matches(t))return"messages.MJitsiWidgetEvent"}if(e.isState()){if(K.has(t)&&""!==e.getStateKey())return;return W[t]}return z[t]}let $;!function(e){e.Notif="notif",e.FileGrid="file_grid",e.Pinned="pinned"}($||($={}));let Q=Object(I.a)("views.rooms.EventTile")((i=o=class extends d.a.Component{constructor(e,t){super(e,t),s()(this,"suppressReadReceiptAnimation",void 0),s()(this,"isListeningForReceipts",void 0),s()(this,"tile",d.a.createRef()),s()(this,"replyThread",d.a.createRef()),s()(this,"ref",Object(u.createRef)()),s()(this,"onRoomReceipt",(e,t)=>{t===w.a.get().getRoom(this.props.mxEvent.getRoomId())&&(this.shouldShowSentReceipt||this.shouldShowSendingReceipt||this.isListeningForReceipts)&&this.forceUpdate(()=>{this.shouldShowSentReceipt||this.shouldShowSendingReceipt||(this.context.removeListener("Room.receipt",this.onRoomReceipt),this.isListeningForReceipts=!1)})}),s()(this,"onDecrypted",()=>{this.verifyEvent(this.props.mxEvent),this.forceUpdate()}),s()(this,"onDeviceVerificationChanged",(e,t)=>{e===this.props.mxEvent.getSender()&&this.verifyEvent(this.props.mxEvent)}),s()(this,"onUserVerificationChanged",(e,t)=>{e===this.props.mxEvent.getSender()&&this.verifyEvent(this.props.mxEvent)}),s()(this,"toggleAllReadAvatars",()=>{this.setState({allReadAvatars:!this.state.allReadAvatars})}),s()(this,"onSenderProfileClick",()=>{const e=this.props.mxEvent;y.a.dispatch({action:P.a.ComposerInsert,userId:e.getSender()})}),s()(this,"onRequestKeysClick",()=>{this.setState({previouslyRequestedKeys:!0}),this.context.cancelAndResendEventRoomKeyRequest(this.props.mxEvent)}),s()(this,"onPermalinkClicked",e=>{e.preventDefault(),y.a.dispatch({action:"view_room",event_id:this.props.mxEvent.getId(),highlighted:!0,room_id:this.props.mxEvent.getRoomId()})}),s()(this,"onActionBarFocusChange",e=>{this.setState({actionBarFocused:e})}),s()(this,"getTile",()=>this.tile.current),s()(this,"getReplyThread",()=>this.replyThread.current),s()(this,"getReactions",()=>{if(!this.props.showReactions||!this.props.getRelationsForEvent)return null;const e=this.props.mxEvent.getId();return this.props.getRelationsForEvent(e,"m.annotation","m.reaction")}),s()(this,"onReactionsCreated",(e,t)=>{"m.annotation"===e&&"m.reaction"===t&&(this.props.mxEvent.removeListener("Event.relationsCreated",this.onReactionsCreated),this.setState({reactions:this.getReactions()}))}),this.state={actionBarFocused:!1,allReadAvatars:!1,verified:null,previouslyRequestedKeys:!1,reactions:this.getReactions(),hover:!1},this.suppressReadReceiptAnimation=!0,this.isListeningForReceipts=!1}get isEligibleForSpecialReceipt(){if(this.props.readReceipts&&this.props.readReceipts.length>0)return!1;if(!this.props.mxEvent)return!1;if(!this.context.getRoom(this.props.mxEvent.getRoomId()))return!1;const e=w.a.get().getUserId();if(this.props.mxEvent.getSender()!==e)return!1;return!![m.a.Sticker,m.a.RoomMessage,m.a.RoomMessageEncrypted].includes(this.props.mxEvent.getType())}get shouldShowSentReceipt(){if(!this.isEligibleForSpecialReceipt)return!1;if(!this.props.lastSuccessful)return!1;if(this.props.eventSendStatus&&"sent"!==this.props.eventSendStatus)return!1;const e=this.props.readReceipts||[],t=w.a.get().getUserId();return!e.some(e=>e.userId!==t)}get shouldShowSendingReceipt(){return!!this.isEligibleForSpecialReceipt&&!(!this.props.eventSendStatus||"sent"===this.props.eventSendStatus)}UNSAFE_componentWillMount(){this.verifyEvent(this.props.mxEvent)}componentDidMount(){this.suppressReadReceiptAnimation=!1;const e=this.context;e.on("deviceVerificationChanged",this.onDeviceVerificationChanged),e.on("userTrustStatusChanged",this.onUserVerificationChanged),this.props.mxEvent.on("Event.decrypted",this.onDecrypted),this.props.showReactions&&this.props.mxEvent.on("Event.relationsCreated",this.onReactionsCreated),(this.shouldShowSentReceipt||this.shouldShowSendingReceipt)&&(e.on("Room.receipt",this.onRoomReceipt),this.isListeningForReceipts=!0)}UNSAFE_componentWillReceiveProps(e){e.eventSendStatus!==this.props.eventSendStatus&&this.verifyEvent(e.mxEvent)}shouldComponentUpdate(e,t){return!!Object(D.d)(this.state,t)||!this.propsEqual(this.props,e)}componentWillUnmount(){const e=this.context;e.removeListener("deviceVerificationChanged",this.onDeviceVerificationChanged),e.removeListener("userTrustStatusChanged",this.onUserVerificationChanged),e.removeListener("Room.receipt",this.onRoomReceipt),this.isListeningForReceipts=!1,this.props.mxEvent.removeListener("Event.decrypted",this.onDecrypted),this.props.showReactions&&this.props.mxEvent.removeListener("Event.relationsCreated",this.onReactionsCreated)}componentDidUpdate(e,t,n){this.isListeningForReceipts||!this.shouldShowSentReceipt&&!this.shouldShowSendingReceipt||(this.context.on("Room.receipt",this.onRoomReceipt),this.isListeningForReceipts=!0)}async verifyEvent(e){if(!e.isEncrypted())return;const t=this.context.getEventEncryptionInfo(e),n=e.getSender(),r=this.context.checkUserTrust(n);if(t.mismatchedSender)return void this.setState({verified:x.a.WARNING},this.props.onHeightChanged);if(!r.isCrossSigningVerified())return void this.setState({verified:x.a.NORMAL},this.props.onHeightChanged);const o=t.sender&&this.context.checkDeviceTrust(n,t.sender.deviceId);o?o.isVerified()?t.authenticated?this.setState({verified:x.a.VERIFIED},this.props.onHeightChanged):this.setState({verified:x.a.UNAUTHENTICATED},this.props.onHeightChanged):this.setState({verified:x.a.WARNING},this.props.onHeightChanged):this.setState({verified:x.a.UNKNOWN},this.props.onHeightChanged)}propsEqual(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const o=n[r];if(!t.hasOwnProperty(o))return!1;if("readReceipts"===o){const n=e[o],r=t[o];if(n===r)continue;if(!n||!r)return!1;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){if(n[e].userId!==r[e].userId)return!1;if(n[e].roomMember!==r[e].roomMember)return!1}}else if(e[o]!==t[o])return!1}return!0}shouldHighlight(){const e=this.context.getPushActionsForEvent(this.props.mxEvent.replacingEvent()||this.props.mxEvent);return!(!e||!e.tweaks)&&(this.props.mxEvent.getSender()!==this.context.credentials.userId&&e.tweaks.highlight)}getReadAvatars(){if(this.shouldShowSentReceipt||this.shouldShowSendingReceipt)return d.a.createElement(ae,{messageState:this.props.mxEvent.getAssociatedStatus()});const e=this.props.layout==E.a.Bubble?2:5;if(!this.props.readReceipts||0===this.props.readReceipts.length)return d.a.createElement("div",{className:"mx_EventTile_msgOption"},d.a.createElement("span",{className:"mx_EventTile_readAvatars"}));const t=[];let n=0;const r=this.props.readReceipts;for(let o=0;o<r.length;++o){const i=r[o];let a=!0;(o<e||this.state.allReadAvatars)&&(a=!1),n=-15*(a?e-1:o);const s=i.userId;let c;this.props.readReceiptMap&&(c=this.props.readReceiptMap[s],c||(c={},this.props.readReceiptMap[s]=c)),t.unshift(d.a.createElement(G.a,{key:s,member:i.roomMember,fallbackUserId:s,leftOffset:n,hidden:a,readReceiptInfo:c,checkUnmounting:this.props.checkUnmounting,suppressAnimation:this.suppressReadReceiptAnimation,onClick:this.toggleAllReadAvatars,timestamp:i.ts,showTwelveHour:this.props.isTwelveHour}))}let o;if(!this.state.allReadAvatars){const t=r.length-e;t>0&&(o=d.a.createElement("span",{className:"mx_EventTile_readAvatarRemainder",onClick:this.toggleAllReadAvatars,style:{right:"calc("+Object(k.b)(-n)+" + 15px)"}},t,"+"))}return d.a.createElement("div",{className:"mx_EventTile_msgOption"},d.a.createElement("span",{className:"mx_EventTile_readAvatars"},o,t))}renderE2EPadlock(){const e=this.props.mxEvent;if("m.bad.encrypted"===e.getContent().msgtype)return d.a.createElement(ee,null);if(e.isEncrypted())return this.state.verified===x.a.NORMAL||this.state.verified===x.a.VERIFIED?void 0:this.state.verified===x.a.UNAUTHENTICATED?d.a.createElement(oe,null):this.state.verified===x.a.UNKNOWN?d.a.createElement(re,null):d.a.createElement(te,null);if(this.context.isRoomEncrypted(e.getRoomId())){if(e.status===g.a.ENCRYPTING)return;if(e.status===g.a.NOT_SENT)return;if(e.isState())return;return d.a.createElement(ne,null)}return null}render(){const e=this.props.mxEvent.getContent().msgtype,{tileHandler:t,isBubbleMessage:n,isInfoMessage:r}=Object(H.c)(this.props.mxEvent);if(!t){const{mxEvent:e}=this.props;return console.warn(`Event type not supported: type:${e.getType()} isState:${e.isState()}`),d.a.createElement("div",{className:"mx_EventTile mx_EventTile_info mx_MNoticeBody"},d.a.createElement("div",{className:"mx_EventTile_line"},Object(_.a)("This event could not be displayed")))}const o=v.getComponent(t),i=-1!==["sending","queued","encrypting"].indexOf(this.props.eventSendStatus),a=X(this.props.mxEvent)&&this.props.isRedacted,s=this.props.mxEvent.isDecryptionFailure(),c=!!this.props.editState,l=p()({mx_EventTile_bubbleContainer:n,mx_EventTile:!0,mx_EventTile_isEditing:c,mx_EventTile_info:r,mx_EventTile_12hr:this.props.isTwelveHour,mx_EventTile_sending:!c&&i,mx_EventTile_highlight:this.props.tileShape!==$.Notif&&this.shouldHighlight(),mx_EventTile_selected:this.props.isSelectedEvent,mx_EventTile_continuation:this.props.tileShape?"":this.props.continuation,mx_EventTile_last:this.props.last,mx_EventTile_lastInSection:this.props.lastInSection,mx_EventTile_contextual:this.props.contextual,mx_EventTile_actionBarFocused:this.state.actionBarFocused,mx_EventTile_verified:!n&&this.state.verified===x.a.VERIFIED,mx_EventTile_unverified:!n&&this.state.verified===x.a.WARNING,mx_EventTile_unknown:!n&&this.state.verified===x.a.UNKNOWN,mx_EventTile_bad:s,mx_EventTile_emote:"m.emote"===e,mx_EventTile_noSender:this.props.hideSender}),u=null!==this.props.eventSendStatus?"off":void 0;let h="#";this.props.permalinkCreator&&(h=this.props.permalinkCreator.forEvent(this.props.mxEvent.getId()));const m=this.props.mxEvent.status?void 0:this.props.mxEvent.getId();let g,b,y,C;if(this.props.tileShape===$.Notif?(y=24,C=!0):"messages.RoomCreate"===t||n?(y=0,C=!1):r?(y=14,C=!1):this.props.layout==E.a.IRC?(y=14,C=!0):this.props.continuation&&this.props.tileShape!==$.FileGrid?(y=0,C=!1):(y=30,C=!0),this.props.mxEvent.sender&&y){let e;e=this.props.mxEvent.getContent().third_party_invite?this.props.mxEvent.target:this.props.mxEvent.sender,g=d.a.createElement("div",{className:"mx_EventTile_avatar"},d.a.createElement(L.a,{member:e,width:y,height:y,viewUserOnClick:!0}))}C&&!0!==this.props.hideSender&&(b=this.props.tileShape?d.a.createElement(j.a,{mxEvent:this.props.mxEvent,enableFlair:this.props.enableFlair}):d.a.createElement(j.a,{onClick:this.onSenderProfileClick,mxEvent:this.props.mxEvent,enableFlair:this.props.enableFlair}));const T=c?void 0:d.a.createElement(V.a,{mxEvent:this.props.mxEvent,reactions:this.state.reactions,permalinkCreator:this.props.permalinkCreator,getTile:this.getTile,getReplyThread:this.getReplyThread,onFocusChange:this.onActionBarFocusChange}),k=this.props.mxEvent.getTs()&&(this.props.alwaysShowTimestamps||this.props.last||this.state.hover||this.state.actionBarFocused)?d.a.createElement(U.a,{showTwelveHour:this.props.isTwelveHour,ts:this.props.mxEvent.getTs()}):null,F=d.a.createElement("div",{className:"mx_EventTile_keyRequestInfo_tooltip_contents"},d.a.createElement("p",null,this.state.previouslyRequestedKeys?Object(_.a)("Your key share request has been sent - please check your other sessions for key share requests."):Object(_.a)("Key share requests are sent to your other sessions automatically. If you rejected or dismissed the key share request on your other sessions, click here to request the keys for this session again.")),d.a.createElement("p",null,Object(_.a)("If your other sessions do not have the key for this message you will not be able to decrypt them."))),R=this.state.previouslyRequestedKeys?Object(_.a)("Key request sent."):Object(_.a)("<requestLink>Re-request encryption keys</requestLink> from your other sessions.",{},{requestLink:e=>d.a.createElement("a",{onClick:this.onRequestKeysClick},e)}),D=s&&!a?d.a.createElement("div",{className:"mx_EventTile_keyRequestInfo"},d.a.createElement("span",{className:"mx_EventTile_keyRequestInfo_text"},R),d.a.createElement(B.a,{helpText:F})):null;let I;a||(I=d.a.createElement(q.a,{mxEvent:this.props.mxEvent,reactions:this.state.reactions}));const A=d.a.createElement("a",{href:h,onClick:this.onPermalinkClicked,"aria-label":Object(S.f)(new Date(this.props.mxEvent.getTs()),this.props.isTwelveHour)},k),N=this.props.layout==E.a.IRC,M=N?null:A,P=N?A:null,G=!N&&!n&&this.renderE2EPadlock(),z=N&&!n&&this.renderE2EPadlock();let W;if(this.props.showReadReceipts){W=this.getReadAvatars()}switch(this.props.tileShape){case $.Notif:{const e=this.context.getRoom(this.props.mxEvent.getRoomId());return d.a.createElement(this.props.as||"li",{className:l,"aria-live":u,"aria-atomic":!0,"data-scroll-tokens":m},[d.a.createElement("div",{className:"mx_EventTile_roomName",key:"mx_EventTile_roomName"},d.a.createElement(O.a,{room:e,width:28,height:28}),d.a.createElement("a",{href:h,onClick:this.onPermalinkClicked},e?e.name:"")),d.a.createElement("div",{className:"mx_EventTile_senderDetails",key:"mx_EventTile_senderDetails"},g,d.a.createElement("a",{href:h,onClick:this.onPermalinkClicked},b,k)),d.a.createElement("div",{className:"mx_EventTile_line",key:"mx_EventTile_line"},d.a.createElement(o,{ref:this.tile,mxEvent:this.props.mxEvent,highlights:this.props.highlights,highlightLink:this.props.highlightLink,showUrlPreview:this.props.showUrlPreview,onHeightChanged:this.props.onHeightChanged,tileShape:this.props.tileShape}))])}case $.FileGrid:return d.a.createElement(this.props.as||"li",{className:l,"aria-live":u,"aria-atomic":!0,"data-scroll-tokens":m},[d.a.createElement("div",{className:"mx_EventTile_line",key:"mx_EventTile_line"},d.a.createElement(o,{ref:this.tile,mxEvent:this.props.mxEvent,highlights:this.props.highlights,highlightLink:this.props.highlightLink,showUrlPreview:this.props.showUrlPreview,tileShape:this.props.tileShape,onHeightChanged:this.props.onHeightChanged})),d.a.createElement("a",{className:"mx_EventTile_senderDetailsLink",key:"mx_EventTile_senderDetailsLink",href:h,onClick:this.onPermalinkClicked},d.a.createElement("div",{className:"mx_EventTile_senderDetails"},b,k))]);default:{var K,Y;const e=f.a.makeThread(this.props.mxEvent,this.props.onHeightChanged,this.props.permalinkCreator,this.replyThread,this.props.layout,this.props.alwaysShowTimestamps||this.state.hover),t=(null===(K=this.props.mxEvent)||void 0===K||null===(Y=K.sender)||void 0===Y?void 0:Y.userId)===w.a.get().getUserId();return d.a.createElement(this.props.as||"li",{ref:this.ref,className:l,tabIndex:-1,"aria-live":u,"aria-atomic":"true","data-scroll-tokens":m,"data-layout":this.props.layout,"data-self":t,"data-has-reply":!!e,onMouseEnter:()=>this.setState({hover:!0}),onMouseLeave:()=>this.setState({hover:!1})},d.a.createElement(d.a.Fragment,null,P,b,z,g,d.a.createElement("div",{className:"mx_EventTile_line",key:"mx_EventTile_line"},M,G,e,d.a.createElement(o,{ref:this.tile,mxEvent:this.props.mxEvent,replacingEventId:this.props.replacingEventId,editState:this.props.editState,highlights:this.props.highlights,highlightLink:this.props.highlightLink,showUrlPreview:this.props.showUrlPreview,permalinkCreator:this.props.permalinkCreator,onHeightChanged:this.props.onHeightChanged,callEventGrouper:this.props.callEventGrouper}),D,T,this.props.layout===E.a.IRC&&I),this.props.layout!==E.a.IRC&&I,W))}}}},s()(o,"defaultProps",{onHeightChanged:function(){},layout:E.a.Group}),s()(o,"contextType",T.a),r=i))||r;const J=["m.room.message","m.sticker"];function X(e){return J.includes(e.getType())}function Z(e,t){if(e.isRedacted()&&!X(e))return!1;if(e.isRelation("m.replace"))return!1;const n=Y(e);return void 0!==n&&("messages.TextualEvent"===n?Object(b.a)(e,t):"messages.RoomCreate"!==n||Boolean(e.getContent().predecessor))}function ee(e){return d.a.createElement(ie,l()({title:Object(_.a)("This message cannot be decrypted"),icon:"undecryptable"},e))}function te(e){return d.a.createElement(ie,l()({title:Object(_.a)("Encrypted by an unverified session"),icon:"unverified"},e))}function ne(e){return d.a.createElement(ie,l()({title:Object(_.a)("Unencrypted"),icon:"unencrypted"},e))}function re(e){return d.a.createElement(ie,l()({title:Object(_.a)("Encrypted by a deleted session"),icon:"unknown"},e))}function oe(e){return d.a.createElement(ie,l()({title:Object(_.a)("The authenticity of this encrypted message can't be guaranteed on this device."),icon:"unauthenticated"},e))}class ie extends d.a.Component{constructor(e){super(e),s()(this,"onHoverStart",()=>{this.setState({hover:!0})}),s()(this,"onHoverEnd",()=>{this.setState({hover:!1})}),this.state={hover:!1}}render(){let e=null;this.state.hover&&(e=d.a.createElement(A.b,{className:"mx_EventTile_e2eIcon_tooltip",label:this.props.title}));const t="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_"+this.props.icon;return d.a.createElement("div",{className:t,onMouseEnter:this.onHoverStart,onMouseLeave:this.onHoverEnd},e)}}class ae extends d.a.PureComponent{constructor(e){super(e),s()(this,"onHoverStart",()=>{this.setState({hover:!0})}),s()(this,"onHoverEnd",()=>{this.setState({hover:!1})}),this.state={hover:!1}}render(){const e=!this.props.messageState||"sent"===this.props.messageState,t="not_sent"===this.props.messageState,n=p()({mx_EventTile_receiptSent:e,mx_EventTile_receiptSending:!e&&!t});let r=null;t&&(r=d.a.createElement(M.a,{notification:N.a.RED_EXCLAMATION}));let o=null;if(this.state.hover){let n=Object(_.a)("Sending your message...");"encrypting"===this.props.messageState?n=Object(_.a)("Encrypting your message..."):e?n=Object(_.a)("Your message was sent"):t&&(n=Object(_.a)("Failed to send")),o=d.a.createElement(A.b,{className:"mx_EventTile_readAvatars_receiptTooltip",label:n,yOffset:20})}return d.a.createElement("div",{className:"mx_EventTile_msgOption"},d.a.createElement("span",{className:"mx_EventTile_readAvatars"},d.a.createElement("span",{className:n,onMouseEnter:this.onHoverStart,onMouseLeave:this.onHoverEnd},r,o)))}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(80),o=n(569);function i(e){return e<1e3?e.toString():e<1e4?(e/1e3).toFixed(1)+"K":e<1e5?(e/1e3).toFixed(0)+"K":e<1e7?(e/1e6).toFixed(1)+"M":e<1e8?(e/1e6).toFixed(0)+"M":(e/1e9).toFixed(1)+"B"}function a(e){return(new Intl.NumberFormat).format(e)}function s(e,t=2){if(0===e)return"0 Bytes";const n=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}function c(e){return e.match(/.{1,4}/g).join(" ")}function l(e){return"mx_Username_color"+(function(e){let t,n,r=0;if(0===e.length)return r;for(t=0;t<e.length;t++)n=e.charCodeAt(t),r=(r<<5)-r+n,r|=0;return Math.abs(r)}(e)%8+1)}function u(e,t){const n=void 0===t?0:Math.max(e.length-t,0);if(0===e.length)return"";if(1===e.length)return e[0];if(n>0)return e=e.slice(0,t),Object(r.a)("%(items)s and %(count)s others",{items:Object(o.a)(e,", "),count:n});{const t=e.pop();return Object(r.a)("%(items)s and %(lastItem)s",{items:Object(o.a)(e,", "),lastItem:t})}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(273),a=n(575);o(n(575),t);var s=/\s+/g,c={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=c),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:c,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){var e;this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null!==(e=this.parser)&&void 0!==e?e:null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===i.ElementType.Text)t?n.data=(n.data+e).replace(s," "):n.data+=e;else{t&&(e=e.replace(s," "));var r=new a.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.NodeWithChildren(i.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(81);let h=Object(d.a)("views.elements.InlineSpinner")((i=o=class extends l.a.PureComponent{render(){return l.a.createElement("div",{className:"mx_InlineSpinner"},l.a.createElement("div",{className:"mx_InlineSpinner_icon mx_Spinner_icon",style:{width:this.props.w,height:this.props.h},"aria-label":Object(u.a)("Loading...")},this.props.children))}},s()(o,"defaultProps",{w:16,h:16}),r=i))||r},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return h})),n.d(t,"a",(function(){return p})),n.d(t,"g",(function(){return m}));var r=n(80);function o(){return[Object(r.a)("Sun"),Object(r.a)("Mon"),Object(r.a)("Tue"),Object(r.a)("Wed"),Object(r.a)("Thu"),Object(r.a)("Fri"),Object(r.a)("Sat")]}function i(){return[Object(r.a)("Jan"),Object(r.a)("Feb"),Object(r.a)("Mar"),Object(r.a)("Apr"),Object(r.a)("May"),Object(r.a)("Jun"),Object(r.a)("Jul"),Object(r.a)("Aug"),Object(r.a)("Sep"),Object(r.a)("Oct"),Object(r.a)("Nov"),Object(r.a)("Dec")]}function a(e){return(e<10?"0":"")+e}function s(e,t=!1){let n=e.getHours()%12;const o=a(e.getMinutes()),i=e.getHours()>=12?Object(r.a)("PM"):Object(r.a)("AM");if(n=n||12,t){return`${n}:${o}:${a(e.getSeconds())}${i}`}return`${n}:${o}${i}`}function c(e,t=!1){const n=new Date,a=o(),s=i();return e.toDateString()===n.toDateString()?h(e,t):n.getTime()-e.getTime()<5184e5?Object(r.a)("%(weekDayName)s %(time)s",{weekDayName:a[e.getDay()],time:h(e,t)}):n.getFullYear()===e.getFullYear()?Object(r.a)("%(weekDayName)s, %(monthName)s %(day)s %(time)s",{weekDayName:a[e.getDay()],monthName:s[e.getMonth()],day:e.getDate(),time:h(e,t)}):u(e,t)}function l(e){const t=o(),n=i();return Object(r.a)("%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s",{weekDayName:t[e.getDay()],monthName:n[e.getMonth()],day:e.getDate(),fullYear:e.getFullYear()})}function u(e,t=!1,n=!0){const a=o(),s=i();return Object(r.a)("%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s",{weekDayName:a[e.getDay()],monthName:s[e.getMonth()],day:e.getDate(),fullYear:e.getFullYear(),time:n?d(e,t):h(e,t)})}function d(e,t=!1){return t?s(e,!0):a(e.getHours())+":"+a(e.getMinutes())+":"+a(e.getSeconds())}function h(e,t=!1){return t?s(e):a(e.getHours())+":"+a(e.getMinutes())}function p(e){const t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds();let o="";return t&&(o+=t+"h "),(n||o)&&(o+=n+"m "),(r||o)&&(o+=r+"s"),o}function m(e,t){return!(!t||!e)&&(Math.abs(e.getTime()-t.getTime())>864e5||e.getDay()!==t.getDay())}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{getValueOverride(e,t,n,r){return null}onChange(e,t,n){}get settingDisabled(){return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(115),a=n(532);class s extends i.a{constructor(e,t={}){super(e,t),o()(this,"readyStore",void 0);const n=this;this.readyStore=new class extends a.a{get mxClient(){return this.matrixClient}async onReady(){return n.onReady()}async onNotReady(){return n.onNotReady()}}(e)}get matrixClient(){return this.readyStore.mxClient}async onReady(){}async onNotReady(){}async onDispatch(e){await this.onAction(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"h",(function(){return f})),n.d(t,"g",(function(){return _})),n.d(t,"f",(function(){return b})),n.d(t,"e",(function(){return v})),n.d(t,"c",(function(){return y})),n.d(t,"b",(function(){return E})),n.d(t,"d",(function(){return S}));var r=n(78),o=n.n(r),i=n(82),a=n(312),s=n(87),c=n(80),l=n(367),u=n(676),d=n(176),h=n(120),p=n(100),m=n(105);function g(e,t){const n=new a.a(e);return n.invite(t).then(e=>Promise.resolve({states:e,inviter:n}))}function f(e=""){s.a.createTrackedDialog("Start DM","",l.d,{kind:l.b,initialText:e},null,!1,!0)}function _(e,t=""){s.a.createTrackedDialog("Invite Users","",l.d,{kind:l.c,initialText:t,roomId:e},null,!1,!0)}function b(e,t){s.a.createTrackedDialog("Invite Users to Community","",u.a,{communityName:t,roomId:e},null,!1,!0)}function v(e){const t=d.a.instance.getGeneralChat(e);if(!t)throw new Error("Failed to locate appropriate room to start an invite in");{const n=d.a.instance.getCommunityName(e);b(t.roomId,n)}}function y(e){if(!e||"m.room.third_party_invite"!==e.getType())return!1;const t=["key_validity_url","public_key","display_name"];for(let n=0;n<t.length;++n)if(!e.getContent()[t[n]])return!1;return!0}function E(e,t){return g(e,t).then(t=>{const n=i.a.get().getRoom(e);S(t.states,n,t.inviter)}).catch(e=>{console.error(e.stack),s.a.createTrackedDialog("Failed to invite","",m.a,{title:Object(c.a)("Failed to invite"),description:e&&e.message?e.message:Object(c.a)("Operation failed")})})}function S(e,t,n,r){const a=Object.keys(e).filter(t=>"error"===e[t]);if(1===a.length&&n.fatal)return s.a.createTrackedDialog("Failed to invite users to the room","",m.a,{title:Object(c.a)("Failed to invite users to the room:",{roomName:t.name}),description:n.getErrorText(a[0])}),!1;{const l=[];for(const t of a)if("error"===e[t]){const e=n.getErrorText(t);l.push(t+": "+e)}const u=i.a.get();if(l.length>0){const e=o.a.createElement("div",{className:"mx_InviteDialog_multiInviterError"},o.a.createElement("h4",null,Object(c.a)("We sent the others, but the below people couldn't be invited to <RoomName/>",{},{RoomName:()=>o.a.createElement("b",null,t.name)})),o.a.createElement("div",null,a.map(e=>{var t,i;const a=(null==r?void 0:r.get(e))||u.getUser(e),s=a.name||a.rawDisplayName,c=(null===(t=(i=a).getMxcAvatarUrl)||void 0===t?void 0:t.call(i))||a.avatarUrl;return o.a.createElement("div",{key:e,className:"mx_InviteDialog_multiInviterError_entry"},o.a.createElement("div",{className:"mx_InviteDialog_multiInviterError_entry_userProfile"},o.a.createElement(h.a,{url:c?Object(p.b)(c).getSquareThumbnailHttp(24):null,name:s,idName:a.userId,width:24,height:24}),o.a.createElement("span",{className:"mx_InviteDialog_multiInviterError_entry_name"},s),o.a.createElement("span",{className:"mx_InviteDialog_multiInviterError_entry_userId"},a.userId)),o.a.createElement("div",{className:"mx_InviteDialog_multiInviterError_entry_error"},n.getErrorText(e)))})));return s.a.createTrackedDialog("Some invites could not be sent","",m.a,{title:Object(c.a)("Some invites couldn't be sent"),description:e}),!1}}return!0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(79),o=n.n(r),i=n(373),a=n(93);let s;!function(e){e.Backward="b",e.Forward="f"}(s||(s={}));class c{static setEventMetadata(e,t,n){var r,o,i,s;null!==(r=e.sender)&&void 0!==r&&null!==(o=r.events)&&void 0!==o&&o.member||(e.sender=t.getSentinelMember(e.getSender())),null!==(i=e.target)&&void 0!==i&&null!==(s=i.events)&&void 0!==s&&s.member||e.getType()!==a.a.RoomMember||(e.target=t.getSentinelMember(e.getStateKey())),e.isState()&&n&&(e.forwardLooking=!1)}constructor(e){var t,n;this.eventTimelineSet=e,o()(this,"roomId",void 0),o()(this,"name",void 0),o()(this,"events",[]),o()(this,"baseIndex",0),o()(this,"startState",void 0),o()(this,"endState",void 0),o()(this,"prevTimeline",void 0),o()(this,"nextTimeline",void 0),o()(this,"paginationRequests",{[s.Backward]:null,[s.Forward]:null}),this.roomId=null!==(t=null===(n=e.room)||void 0===n?void 0:n.roomId)&&void 0!==t?t:null,this.startState=new i.a(this.roomId),this.startState.paginationToken=null,this.endState=new i.a(this.roomId),this.endState.paginationToken=null,this.prevTimeline=null,this.nextTimeline=null,this.paginationRequests={b:null,f:null},this.name=this.roomId+":"+(new Date).toISOString()}initialiseState(e){if(this.events.length>0)throw new Error("Cannot initialise state after events are added");for(const t of e)Object.freeze(t);this.startState.setStateEvents(e),this.endState.setStateEvents(e)}forkLive(e){const t=this.getState(e),n=new c(this.eventTimelineSet);return n.startState=t.clone(),n.endState=t,this.endState=t.clone(),n}fork(e){const t=this.getState(e),n=new c(this.eventTimelineSet);return n.startState=t.clone(),n.endState=t.clone(),n}getRoomId(){return this.roomId}getFilter(){return this.eventTimelineSet.getFilter()}getTimelineSet(){return this.eventTimelineSet}getBaseIndex(){return this.baseIndex}getEvents(){return this.events}getState(e){if(e==c.BACKWARDS)return this.startState;if(e==c.FORWARDS)return this.endState;throw new Error("Invalid direction '"+e+"'")}getPaginationToken(e){return this.getState(e).paginationToken}setPaginationToken(e,t){this.getState(t).paginationToken=e}getNeighbouringTimeline(e){if(e==c.BACKWARDS)return this.prevTimeline;if(e==c.FORWARDS)return this.nextTimeline;throw new Error("Invalid direction '"+e+"'")}setNeighbouringTimeline(e,t){if(this.getNeighbouringTimeline(t))throw new Error("timeline already has a neighbouring timeline - cannot reset neighbour (direction: "+t+")");if(t==c.BACKWARDS)this.prevTimeline=e;else{if(t!=c.FORWARDS)throw new Error("Invalid direction '"+t+"'");this.nextTimeline=e}this.setPaginationToken(null,t)}addEvent(e,t){const n=t?this.startState:this.endState,r=this.getTimelineSet();let o;r.room&&(c.setEventMetadata(e,n,t),e.isState()&&r.room.getUnfilteredTimelineSet()===r&&(n.setStateEvents([e]),e.sender&&("m.room.member"!==e.getType()||t)||c.setEventMetadata(e,n,t))),o=t?0:this.events.length,this.events.splice(o,0,e),t&&this.baseIndex++}removeEvent(e){for(let t=this.events.length-1;t>=0;t--){const n=this.events[t];if(n.getId()==e)return this.events.splice(t,1),t<this.baseIndex&&this.baseIndex--,n}return null}toString(){return this.name}}o()(c,"BACKWARDS",s.Backward),o()(c,"FORWARDS",s.Forward)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(79),o=n.n(r),i=n(96),a=n(513),s=n(256),c=n(925),l=n(206),u=n(514);class d{static exists(e,t){return u.a(e,t)}constructor(e,t){this.indexedDB=e,this.dbName=t,o()(this,"backendPromise",null),o()(this,"backend",null)}startup(){return this.backendPromise||(this.backendPromise=new Promise((e,t)=>{if(!this.indexedDB)return void t(new Error("no indexeddb support available"));i.a.log("connecting to indexeddb "+this.dbName);const n=this.indexedDB.open(this.dbName,c.b);n.onupgradeneeded=e=>{const t=n.result,r=e.oldVersion;c.c(t,r)},n.onblocked=()=>{i.a.log("can't yet open IndexedDBCryptoStore because it is open elsewhere")},n.onerror=e=>{i.a.log("Error connecting to indexeddb",e),t(n.error)},n.onsuccess=()=>{const t=n.result;i.a.log("connected to indexeddb "+this.dbName),e(new c.a(t))}}).then(e=>e.doTxn("readonly",[d.STORE_INBOUND_GROUP_SESSIONS,d.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],t=>{e.getEndToEndInboundGroupSession("","",t,()=>{})}).then(()=>e)).catch(t=>{if("VersionError"===t.name)throw i.a.warn("Crypto DB is too new for us to use!",t),new l.a(l.a.TOO_NEW);i.a.warn("unable to connect to indexeddb "+this.dbName+": falling back to localStorage store: "+t);try{return new a.a(e.localStorage)}catch(t){return i.a.warn("unable to open localStorage: falling back to in-memory store: "+t),new s.a}}).then(e=>(this.backend=e,e))),this.backendPromise}deleteAllData(){return new Promise((e,t)=>{if(!this.indexedDB)return void t(new Error("no indexeddb support available"));i.a.log("Removing indexeddb instance: "+this.dbName);const n=this.indexedDB.deleteDatabase(this.dbName);n.onblocked=()=>{i.a.log("can't yet delete IndexedDBCryptoStore because it is open elsewhere")},n.onerror=e=>{i.a.log("Error deleting data from indexeddb",e),t(n.error)},n.onsuccess=()=>{i.a.log("Removed indexeddb instance: "+this.dbName),e()}}).catch(e=>{i.a.warn("unable to delete IndexedDBCryptoStore: "+e)})}getOrAddOutgoingRoomKeyRequest(e){return this.backend.getOrAddOutgoingRoomKeyRequest(e)}getOutgoingRoomKeyRequest(e){return this.backend.getOutgoingRoomKeyRequest(e)}getOutgoingRoomKeyRequestByState(e){return this.backend.getOutgoingRoomKeyRequestByState(e)}getAllOutgoingRoomKeyRequestsByState(e){return this.backend.getAllOutgoingRoomKeyRequestsByState(e)}getOutgoingRoomKeyRequestsByTarget(e,t,n){return this.backend.getOutgoingRoomKeyRequestsByTarget(e,t,n)}updateOutgoingRoomKeyRequest(e,t,n){return this.backend.updateOutgoingRoomKeyRequest(e,t,n)}deleteOutgoingRoomKeyRequest(e,t){return this.backend.deleteOutgoingRoomKeyRequest(e,t)}getAccount(e,t){this.backend.getAccount(e,t)}storeAccount(e,t){this.backend.storeAccount(e,t)}getCrossSigningKeys(e,t){this.backend.getCrossSigningKeys(e,t)}getSecretStorePrivateKey(e,t,n){this.backend.getSecretStorePrivateKey(e,t,n)}storeCrossSigningKeys(e,t){this.backend.storeCrossSigningKeys(e,t)}storeSecretStorePrivateKey(e,t,n){this.backend.storeSecretStorePrivateKey(e,t,n)}countEndToEndSessions(e,t){this.backend.countEndToEndSessions(e,t)}getEndToEndSession(e,t,n,r){this.backend.getEndToEndSession(e,t,n,r)}getEndToEndSessions(e,t,n){this.backend.getEndToEndSessions(e,t,n)}getAllEndToEndSessions(e,t){this.backend.getAllEndToEndSessions(e,t)}storeEndToEndSession(e,t,n,r){this.backend.storeEndToEndSession(e,t,n,r)}storeEndToEndSessionProblem(e,t,n){return this.backend.storeEndToEndSessionProblem(e,t,n)}getEndToEndSessionProblem(e,t){return this.backend.getEndToEndSessionProblem(e,t)}filterOutNotifiedErrorDevices(e){return this.backend.filterOutNotifiedErrorDevices(e)}getEndToEndInboundGroupSession(e,t,n,r){this.backend.getEndToEndInboundGroupSession(e,t,n,r)}getAllEndToEndInboundGroupSessions(e,t){this.backend.getAllEndToEndInboundGroupSessions(e,t)}addEndToEndInboundGroupSession(e,t,n,r){this.backend.addEndToEndInboundGroupSession(e,t,n,r)}storeEndToEndInboundGroupSession(e,t,n,r){this.backend.storeEndToEndInboundGroupSession(e,t,n,r)}storeEndToEndInboundGroupSessionWithheld(e,t,n,r){this.backend.storeEndToEndInboundGroupSessionWithheld(e,t,n,r)}storeEndToEndDeviceData(e,t){this.backend.storeEndToEndDeviceData(e,t)}getEndToEndDeviceData(e,t){this.backend.getEndToEndDeviceData(e,t)}storeEndToEndRoom(e,t,n){this.backend.storeEndToEndRoom(e,t,n)}getEndToEndRooms(e,t){this.backend.getEndToEndRooms(e,t)}getSessionsNeedingBackup(e){return this.backend.getSessionsNeedingBackup(e)}countSessionsNeedingBackup(e){return this.backend.countSessionsNeedingBackup(e)}unmarkSessionsNeedingBackup(e,t){return this.backend.unmarkSessionsNeedingBackup(e,t)}markSessionsNeedingBackup(e,t){return this.backend.markSessionsNeedingBackup(e,t)}addSharedHistoryInboundGroupSession(e,t,n,r){this.backend.addSharedHistoryInboundGroupSession(e,t,n,r)}getSharedHistoryInboundGroupSessions(e,t){return this.backend.getSharedHistoryInboundGroupSessions(e,t)}doTxn(e,t,n,r){return this.backend.doTxn(e,t,n,r)}}o()(d,"STORE_ACCOUNT","account"),o()(d,"STORE_SESSIONS","sessions"),o()(d,"STORE_INBOUND_GROUP_SESSIONS","inbound_group_sessions"),o()(d,"STORE_INBOUND_GROUP_SESSIONS_WITHHELD","inbound_group_sessions_withheld"),o()(d,"STORE_SHARED_HISTORY_INBOUND_GROUP_SESSIONS","shared_history_inbound_group_sessions"),o()(d,"STORE_DEVICE_DATA","device_data"),o()(d,"STORE_ROOMS","rooms"),o()(d,"STORE_BACKUP","sessions_needing_backup")}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(142),d=n.n(u),h=n(86),p=n.n(h),m=n(81),g=n(143);let f;!function(e){e[e.Natural=0]="Natural",e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.Top=3]="Top",e[e.Bottom=4]="Bottom"}(f||(f={}));let _=Object(m.a)("views.elements.Tooltip")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"tooltipContainer",void 0),s()(this,"tooltip",void 0),s()(this,"parent",void 0),s()(this,"renderTooltip",()=>{const e=this.updatePosition({});e.display=this.props.visible?"block":"none";const t=p()("mx_Tooltip",this.props.tooltipClassName,{mx_Tooltip_visible:this.props.visible,mx_Tooltip_invisible:!this.props.visible}),n=l.a.createElement("div",{className:t,style:e},l.a.createElement("div",{className:"mx_Tooltip_chevron"}),this.props.label);this.tooltip=d.a.render(n,this.tooltipContainer)})}componentDidMount(){this.tooltipContainer=document.createElement("div"),this.tooltipContainer.className="mx_Tooltip_wrapper",document.body.appendChild(this.tooltipContainer),window.addEventListener("scroll",this.renderTooltip,{passive:!0,capture:!0}),this.parent=d.a.findDOMNode(this).parentNode,this.renderTooltip()}componentDidUpdate(){this.renderTooltip()}componentWillUnmount(){d.a.unmountComponentAtNode(this.tooltipContainer),document.body.removeChild(this.tooltipContainer),window.removeEventListener("scroll",this.renderTooltip,{capture:!0})}updatePosition(e){const t=this.parent.getBoundingClientRect();let n=0;n=t.height>25?Math.floor((t.height-25)/2):Math.floor(t.height-25);const r=g.b.instance.windowWidth,o=t.top-2+this.props.yOffset+window.pageYOffset,i=o+n,a=r-t.right-window.pageXOffset-16,s=t.right+window.pageXOffset+6,c=t.right-window.pageXOffset-t.width/2;switch(this.props.alignment){case f.Natural:if(t.right>r/2){e.right=a,e.top=i;break}case f.Right:e.left=s,e.top=i;break;case f.Left:e.right=a,e.top=i;break;case f.Top:e.top=o-16,e.left=c;break;case f.Bottom:e.top=o+t.height,e.left=c}return e}render(){return l.a.createElement("div",{className:this.props.className})}},s()(o,"Alignment",f),s()(o,"defaultProps",{visible:!0,yOffset:0,alignment:f.Natural}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79),o=n.n(r);class i{constructor(e,t){this.preferred=e,this.legacy=t}matches(e){return e===this.preferred||e===this.legacy}static fromString(e){const t=Object.values(i).filter(e=>e instanceof i).find(t=>t.matches(e));return t||new i(e,e)}}o()(i,"JITSI",new i("m.jitsi","jitsi")),o()(i,"STICKERPICKER",new i("m.stickerpicker","m.stickerpicker")),o()(i,"INTEGRATION_MANAGER",new i("m.integration_manager","m.integration_manager")),o()(i,"CUSTOM",new i("m.custom","m.custom"))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return k}));var r=n(79),o=n.n(r),i=n(84),a=n(141),s=n(239),c=n(83),l=n(567),u=n(270),d=n(1430),h=n(126),p=n(1426),m=n(171),g=n(2),f=n(894),_=n(281),b=n(150),v=n(642),y=n(167),E=n(507),S=n(1310),w=n(102),C=n(91);const T="lists_update";class x extends b.a{constructor(){super(c.a),o()(this,"initialListsGenerated",!1),o()(this,"algorithm",new p.a),o()(this,"filterConditions",[]),o()(this,"prefilterConditions",[]),o()(this,"tagWatcher",void 0),o()(this,"spaceWatcher",void 0),o()(this,"updateFn",new _.a(()=>{for(const e of Object.keys(this.orderedLists))y.a.instance.getListState(e).setRooms(this.orderedLists[e]);this.emit(T)})),o()(this,"watchedSettings",["feature_custom_tags","advancedRoomListLogging"]),o()(this,"onAlgorithmListUpdated",()=>{i.b.getValue("advancedRoomListLogging")&&console.log("Underlying algorithm has triggered a list update - marking"),this.updateFn.mark()}),o()(this,"onAlgorithmFilterUpdated",()=>{this.updateFn.trigger()}),o()(this,"onPrefilterUpdated",async()=>{await this.recalculatePrefiltering(),this.updateFn.trigger()}),this.setMaxListeners(20)}setupWatchers(){w.g.spacesEnabled?this.spaceWatcher=new S.a(this):this.tagWatcher=new d.a(this)}get unfilteredLists(){return this.algorithm?this.algorithm.getUnfilteredRooms():{}}get orderedLists(){return this.algorithm?this.algorithm.getOrderedRooms():{}}async resetStore(){await this.reset(),this.filterConditions=[],this.prefilterConditions=[],this.initialListsGenerated=!1,this.setupWatchers(),this.algorithm.off(p.b,this.onAlgorithmListUpdated),this.algorithm.off(u.a,this.onAlgorithmListUpdated),this.algorithm=new p.a,this.algorithm.on(p.b,this.onAlgorithmListUpdated),this.algorithm.on(u.a,this.onAlgorithmListUpdated),await this.reset(null,!0)}async makeReady(e){e&&this.readyStore.useUnitTestClient(e),this.checkLoggingEnabled();for(const e of this.watchedSettings)i.b.monitorSetting(e,null);h.a.addListener(()=>this.handleRVSUpdate({})),this.algorithm.on(p.b,this.onAlgorithmListUpdated),this.algorithm.on(u.a,this.onAlgorithmFilterUpdated),this.setupWatchers(),console.log("Regenerating room lists: Startup"),await this.readAndCacheSettingsFromStore(),this.regenerateAllLists({trigger:!1}),this.handleRVSUpdate({trigger:!1}),this.updateFn.mark(),this.updateFn.trigger()}checkLoggingEnabled(){i.b.getValue("advancedRoomListLogging")&&console.warn("Advanced room list logging is enabled")}async readAndCacheSettingsFromStore(){const e=i.b.getValue("feature_custom_tags");await this.updateState({tagsEnabled:e}),this.updateAlgorithmInstances()}handleRVSUpdate({trigger:e=!0}){if(!this.matrixClient)return;const t=h.a.getRoomId();if(!t&&this.algorithm.stickyRoom)this.algorithm.setStickyRoom(null);else if(t){const e=this.matrixClient.getRoom(t);e?e!==this.algorithm.stickyRoom&&(i.b.getValue("advancedRoomListLogging")&&console.log("Changing sticky room to "+t),this.algorithm.setStickyRoom(e)):(console.warn(t+" is current in RVS but missing from client - clearing sticky room"),this.algorithm.setStickyRoom(null))}e&&this.updateFn.trigger()}async onReady(){await this.makeReady()}async onNotReady(){await this.resetStore()}async onAction(t){this.matrixClient&&this.initialListsGenerated&&(x.TEST_MODE?await this.onDispatchAsync(t):e(()=>this.onDispatchAsync(t)))}async onDispatchAsync(e){if(this.matrixClient&&this.initialListsGenerated){if(e.action===C.a.SettingUpdated){const t=e;if(this.watchedSettings.includes(t.settingName)){if("advancedRoomListLogging"===t.settingName){const e=i.b.getValue("advancedRoomListLogging");return void console.warn("Advanced room list logging is enabled? "+e)}console.log("Regenerating room lists: Settings changed"),await this.readAndCacheSettingsFromStore(),this.regenerateAllLists({trigger:!1}),this.updateFn.trigger()}}if(!this.algorithm)throw new Error("Room list store has no algorithm to process dispatcher update with");if("MatrixActions.Room.receipt"===e.action){if(Object(l.a)(e.event,this.matrixClient)){const t=e.room;return t?(i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Got own read receipt in "+t.roomId),await this.handleRoomUpdate(t,a.c.ReadReceipt),void this.updateFn.trigger()):void console.warn("Own read receipt was in unknown room "+t.roomId)}}else if("MatrixActions.Room.tags"===e.action){const t=e;i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Got tag change in "+t.room.roomId),await this.handleRoomUpdate(t.room,a.c.PossibleTagChange),this.updateFn.trigger()}else if("MatrixActions.Room.timeline"===e.action){const t=e;if(!t.isLiveEvent||!e.isLiveUnfilteredRoomTimelineEvent)return;const n=t.event.getRoomId(),r=this.matrixClient.getRoom(n),o=async e=>{if(i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Live timeline event "+t.event.getId()+" in "+e.roomId),"m.room.tombstone"===t.event.getType()&&""===t.event.getStateKey()){i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Got tombstone event - trying to remove now-dead room");if(this.matrixClient.getRoom(t.event.getContent().replacement_room))return}await this.handleRoomUpdate(e,a.c.Timeline),this.updateFn.trigger()};if(!r)return console.warn(`Live timeline event ${t.event.getId()} received without associated room`),console.warn("Queuing failed room update for retry as a result."),void setTimeout(async()=>{const e=this.matrixClient.getRoom(n);await o(e)},100);await o(r)}else if("MatrixActions.Event.decrypted"===e.action){const t=e,n=t.event.getRoomId();if(!n)return;const r=this.matrixClient.getRoom(n);if(!r)return void console.warn(`Event ${t.event.getId()} was decrypted in an unknown room ${n}`);i.b.getValue("advancedRoomListLogging")&&console.log(`[RoomListDebug] Decrypted timeline event ${t.event.getId()} in ${n}`),await this.handleRoomUpdate(r,a.c.Timeline),this.updateFn.trigger()}else if("MatrixActions.accountData"===e.action&&"m.direct"===e.event_type){const t=e;i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Received updated DM map");const n=t.event.getContent();for(const e of Object.keys(n)){const t=n[e];for(const e of t){const t=this.matrixClient.getRoom(e);t?await this.handleRoomUpdate(t,a.c.PossibleTagChange):console.warn(e+" was found in DMs but the room is not in the store")}}this.updateFn.trigger()}else if("MatrixActions.Room.myMembership"===e.action){const t=e,n=Object(m.b)(t.oldMembership),r=Object(m.b)(t.membership);if(n!==m.a.Join&&r===m.a.Join){i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Handling new room "+t.room.roomId);const e=t.room.currentState.getStateEvents("m.room.create","");if(e&&e.getContent().predecessor){i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Room has a predecessor");const t=this.matrixClient.getRoom(e.getContent().predecessor.room_id);if(t){this.algorithm.stickyRoom===t&&(i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Clearing sticky room due to room upgrade"),this.algorithm.setStickyRoom(null)),i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Removing previous room from room list"),this.algorithm.handleRoomUpdate(t,a.c.RoomRemoved)}}return i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Adding new room to room list"),await this.handleRoomUpdate(t.room,a.c.NewRoom),void this.updateFn.trigger()}if(n!==m.a.Invite&&r===m.a.Invite)return i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Handling invite to "+t.room.roomId),await this.handleRoomUpdate(t.room,a.c.NewRoom),void this.updateFn.trigger();if(n!==r)return i.b.getValue("advancedRoomListLogging")&&console.log("[RoomListDebug] Handling membership change in "+t.room.roomId),await this.handleRoomUpdate(t.room,a.c.PossibleTagChange),void this.updateFn.trigger()}}}async handleRoomUpdate(e,t){if(t===a.c.NewRoom&&"invite"===e.getMyMembership()&&await E.a.instance.onNewInvitedRoom(e),!E.a.instance.isRoomVisible(e))return;if((t===a.c.NewRoom||t===a.c.PossibleTagChange)&&!this.prefilterConditions.every(t=>t.isVisible(e)))return;this.algorithm.handleRoomUpdate(e,t)&&(i.b.getValue("advancedRoomListLogging")&&console.log(`[DEBUG] Room "${e.name}" (${e.roomId}) triggered by ${t} requires list update`),this.updateFn.mark())}async recalculatePrefiltering(){if(!this.algorithm)return;if(!this.algorithm.hasTagSortingMap)return;i.b.getValue("advancedRoomListLogging")&&console.log("Calculating new prefiltered room list"),this.algorithm.updatesInhibited=!0;const e=this.getPlausibleRooms(),t=this.algorithm.stickyRoom,n=t&&e.includes(t);this.algorithm.setStickyRoom(null),this.algorithm.setKnownRooms(e),n&&this.algorithm.setStickyRoom(t),this.updateFn.mark(),this.algorithm.updatesInhibited=!1}async setTagSorting(e,t){this.setAndPersistTagSorting(e,t),this.updateFn.trigger()}setAndPersistTagSorting(e,t){this.algorithm.setTagSorting(e,t),localStorage.setItem("mx_tagSort_"+e,t)}getTagSorting(e){return this.algorithm.getTagSorting(e)}getStoredTagSorting(e){return localStorage.getItem("mx_tagSort_"+e)}calculateTagSorting(e){const t=e===a.a.Invite||e===a.a.DM?s.b.Recent:s.b.Alphabetic,n=i.b.getValue("RoomList.orderAlphabetically",null,!0),r=this.getTagSorting(e),o=this.getStoredTagSorting(e);let c=t;return o?c=o:Object(g.v)(n)?r&&(c=r):c=n?s.b.Alphabetic:s.b.Recent,c}setListOrder(e,t){this.setAndPersistListOrder(e,t),this.updateFn.trigger()}setAndPersistListOrder(e,t){this.algorithm.setListOrdering(e,t),localStorage.setItem("mx_listOrder_"+e,t)}getListOrder(e){return this.algorithm.getListOrdering(e)}getStoredListOrder(e){return localStorage.getItem("mx_listOrder_"+e)}calculateListOrder(e){const t=s.a.Natural,n=i.b.getValue("RoomList.orderByImportance",null,!0),r=this.getListOrder(e),o=this.getStoredListOrder(e);let a=t;return o?a=o:Object(g.v)(n)?r&&(a=r):a=n?s.a.Importance:s.a.Natural,a}updateAlgorithmInstances(){this.updateFn.mark();for(const e of Object.keys(this.orderedLists)){const t=this.getTagSorting(e),n=this.getListOrder(e),r=this.calculateTagSorting(e),o=this.calculateListOrder(e);r!==t&&this.setAndPersistTagSorting(e,r),o!==n&&this.setAndPersistListOrder(e,o)}}getPlausibleRooms(){if(!this.matrixClient)return[];let e=this.matrixClient.getVisibleRooms().filter(e=>E.a.instance.isRoomVisible(e));return!(this.prefilterConditions.length>0)||w.g.spacesEnabled&&this.filterConditions.length||(e=e.filter(e=>{for(const t of this.prefilterConditions)if(!t.isVisible(e))return!1;return!0})),e}regenerateAllLists({trigger:e=!0}){console.warn("Regenerating all room lists");const t=this.getPlausibleRooms(),n=new Set;if(this.state.tagsEnabled)for(const e of t){if(!e.tags)continue;Object.keys(e.tags).filter(e=>Object(a.d)(e)).forEach(e=>n.add(e))}const r={},o={},i=[...a.b,...Array.from(n)];for(const e of i)r[e]=this.calculateTagSorting(e),o[e]=this.calculateListOrder(e),f.a.instance.ensureLayoutExists(e);this.algorithm.populateTags(r,o),this.algorithm.setKnownRooms(t),this.initialListsGenerated=!0,e&&this.updateFn.trigger()}async addFilter(e){i.b.getValue("advancedRoomListLogging")&&console.log("Adding filter condition:",e);let t=Promise.resolve();e.kind===u.b.Prefilter?(e.on(u.a,this.onPrefilterUpdated),this.prefilterConditions.push(e),t=this.recalculatePrefiltering()):(this.filterConditions.push(e),w.g.spacesEnabled&&await this.recalculatePrefiltering(),this.algorithm&&this.algorithm.addFilterCondition(e)),t.then(()=>this.updateFn.trigger())}removeFilter(e){i.b.getValue("advancedRoomListLogging")&&console.log("Removing filter condition:",e);let t=Promise.resolve(),n=this.filterConditions.indexOf(e),r=!1;n>=0&&(this.filterConditions.splice(n,1),this.algorithm&&this.algorithm.removeFilterCondition(e),w.g.spacesEnabled&&(t=this.recalculatePrefiltering()),r=!0),n=this.prefilterConditions.indexOf(e),n>=0&&(e.off(u.a,this.onPrefilterUpdated),this.prefilterConditions.splice(n,1),t=this.recalculatePrefiltering(),r=!0),r&&t.then(()=>this.updateFn.trigger())}getFirstNameFilterCondition(){for(const e of this.filterConditions)if(e instanceof v.a)return e;return null}getTagsForRoom(e){const t=this.algorithm.getTagsForRoom(e);return t||[a.a.Untagged]}async manualRoomUpdate(e,t){await this.handleRoomUpdate(e,t),this.updateFn.trigger()}}o()(x,"TEST_MODE",!1);class k{static get instance(){return k.internalInstance||(k.internalInstance=new x),k.internalInstance}}o()(k,"internalInstance",void 0),window.mxRoomListStore=k.instance}).call(this,n(161).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(78),o=n.n(r),i=n(86),a=n.n(i);function s({description:e,hideDescriptionIfValid:t,deriveData:n,rules:r}){return async function({value:i,focused:s,allowEmpty:c=!0}){if(!i&&c)return{valid:null,feedback:null};const l={value:i,allowEmpty:c},u=n?await n(l):void 0,d=[];let h,p,m,g=!0;if(r&&r.length)for(const e of r){if(!e.key||!e.test)continue;if(!g&&e.final)continue;if(e.skip&&e.skip.call(this,l,u))continue;const t=await e.test.call(this,l,u);if(g=g&&t,t&&e.valid){const t=e.valid.call(this,u);if(!t)continue;d.push({key:e.key,valid:!0,text:t})}else if(!t&&e.invalid){const t=e.invalid.call(this,u);if(!t)continue;d.push({key:e.key,valid:!1,text:t})}}if(!s)return{valid:g,feedback:null};if(d&&d.length&&(h=o.a.createElement("ul",{className:"mx_Validation_details"},d.map(e=>{const t=a()({mx_Validation_detail:!0,mx_Validation_valid:e.valid,mx_Validation_invalid:!e.valid});return o.a.createElement("li",{key:e.key,className:t},e.text)}))),e&&(h||!t)){const t=e.call(this,u);p=o.a.createElement("div",{className:"mx_Validation_description"},t)}return(p||h)&&(m=o.a.createElement("div",{className:"mx_Validation"},p,h)),{valid:g,feedback:m}}}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(85);t.a=({description:e,detail:t,acceptLabel:n,rejectLabel:r,onAccept:a,onReject:s})=>{const c=t?o.a.createElement("div",{className:"mx_Toast_detail"},t):null;return o.a.createElement("div",null,o.a.createElement("div",{className:"mx_Toast_description"},e,c),o.a.createElement("div",{className:"mx_Toast_buttons","aria-live":"off"},s&&r&&o.a.createElement(i.a,{kind:"danger_outline",onClick:s},r),o.a.createElement(i.a,{onClick:a,kind:"primary"},n)))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return S})),n.d(t,"e",(function(){return w})),n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return f.a}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(104);const c=({children:e,inputRef:t})=>{const[n,r,o]=w(t);return e({onFocus:n,isActive:r,ref:o})};var l=n(92),u=n.n(l),d=n(99),h=n.n(d),p=n(85);const m=["inputRef"],g=e=>{let{inputRef:t}=e,n=h()(e,m);const[r,o,i]=w(t);return a.a.createElement(p.a,u()({},n,{onFocus:r,inputRef:i,tabIndex:o?0:-1}))};var f=n(435);function _(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}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const v=Object(i.createContext)({state:{activeRef:null,refs:[]},dispatch:()=>{}});var y;v.displayName="RovingTabIndexContext",function(e){e.Register="REGISTER",e.Unregister="UNREGISTER",e.SetFocus="SET_FOCUS"}(y||(y={}));const E=(e,t)=>{switch(t.type){case y.Register:{if(0===e.refs.length)return b(b({},e),{},{activeRef:t.payload.ref,refs:[t.payload.ref]});if(e.refs.includes(t.payload.ref))return e;let n=e.refs.findIndex(e=>2&e.current.compareDocumentPosition(t.payload.ref.current));return n<0&&(n=e.refs.length),b(b({},e),{},{refs:[...e.refs.slice(0,n),t.payload.ref,...e.refs.slice(n)]})}case y.Unregister:{const n=e.refs.filter(e=>e!==t.payload.ref);if(n.length===e.refs.length)return e;if(e.activeRef===t.payload.ref){const r=e.refs.findIndex(e=>e===t.payload.ref);return b(b({},e),{},{activeRef:r>=n.length?n[n.length-1]:n[r],refs:n})}return b(b({},e),{},{refs:n})}case y.SetFocus:return b(b({},e),{},{activeRef:t.payload.ref});default:return e}},S=({children:e,handleHomeEnd:t,onKeyDown:n})=>{const[r,o]=Object(i.useReducer)(E,{activeRef:null,refs:[]}),c=Object(i.useMemo)(()=>({state:r,dispatch:o}),[r]),l=Object(i.useCallback)(e=>{let r=!1;if(t&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName)switch(e.key){case s.a.HOME:r=!0,c.state.refs.length>0&&c.state.refs[0].current.focus();break;case s.a.END:r=!0,c.state.refs.length>0&&c.state.refs[c.state.refs.length-1].current.focus()}if(r)e.preventDefault(),e.stopPropagation();else if(n)return n(e,c.state)},[c.state,n,t]);return a.a.createElement(v.Provider,{value:c},e({onKeyDownHandler:l}))},w=e=>{const t=Object(i.useContext)(v);let n=Object(i.useRef)(null);e&&(n=e),Object(i.useLayoutEffect)(()=>(t.dispatch({type:y.Register,payload:{ref:n}}),()=>{t.dispatch({type:y.Unregister,payload:{ref:n}})}),[]);return[Object(i.useCallback)(()=>{t.dispatch({type:y.SetFocus,payload:{ref:n}})},[n,t]),t.state.activeRef===n,n]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r),i=n(3),a=n(258),s=n(2);class c extends i.EventEmitter{constructor(e,t){super(),this.roomId=e,this.userId=t,o()(this,"_isOutOfBand",!1),o()(this,"_modified",void 0),o()(this,"_requestedProfileInfo",void 0),o()(this,"typing",!1),o()(this,"name",void 0),o()(this,"rawDisplayName",void 0),o()(this,"powerLevel",0),o()(this,"powerLevelNorm",0),o()(this,"user",null),o()(this,"membership",null),o()(this,"disambiguate",!1),o()(this,"events",{member:null}),this.name=t,this.rawDisplayName=t,this.updateModifiedTime()}markOutOfBand(){this._isOutOfBand=!0}isOutOfBand(){return this._isOutOfBand}setMembershipEvent(e,t){const n=e.getDirectionalContent().displayname;if("m.room.member"!==e.getType())return;this._isOutOfBand=!1,this.events.member=e;const r=this.membership;this.membership=e.getDirectionalContent().membership,this.disambiguate=function(e,t,n){if(!t||t===e)return!1;if(!s.F(t))return!1;if(!n)return!1;if(l.test(t))return!0;if(u.test(t))return!0;return!!n.getUserIdsWithDisplayName(t).some(t=>t!==e)}(this.userId,n,t);const o=this.name;this.name=function(e,t,n,r){return r?t+" ("+e+")":t&&t!==e&&s.F(t)?t:e}(this.userId,n,0,this.disambiguate),this.rawDisplayName=e.getDirectionalContent().displayname,this.rawDisplayName&&s.F(this.rawDisplayName)||(this.rawDisplayName=this.userId),r!==this.membership&&(this.updateModifiedTime(),this.emit("RoomMember.membership",e,this,r)),o!==this.name&&(this.updateModifiedTime(),this.emit("RoomMember.name",e,this,o))}setPowerLevelEvent(e){if("m.room.power_levels"!==e.getType())return;const t=e.getDirectionalContent();let n=t.users_default||0;const r=t.users||{};Object.values(r).forEach((function(e){n=Math.max(n,e)}));const o=this.powerLevel,i=this.powerLevelNorm;void 0!==r[this.userId]&&Number.isInteger(r[this.userId])?this.powerLevel=r[this.userId]:void 0!==t.users_default?this.powerLevel=t.users_default:this.powerLevel=0,this.powerLevelNorm=0,n>0&&(this.powerLevelNorm=100*this.powerLevel/n),o===this.powerLevel&&i===this.powerLevelNorm||(this.updateModifiedTime(),this.emit("RoomMember.powerLevel",e,this))}setTypingEvent(e){if("m.typing"!==e.getType())return;const t=this.typing;this.typing=!1;const n=e.getContent().user_ids;Array.isArray(n)&&(-1!==n.indexOf(this.userId)&&(this.typing=!0),t!==this.typing&&(this.updateModifiedTime(),this.emit("RoomMember.typing",e,this)))}updateModifiedTime(){this._modified=Date.now()}getLastModifiedTime(){return this._modified}isKicked(){return"leave"===this.membership&&this.events.member.getSender()!==this.events.member.getStateKey()}getDMInviter(){if(this.events.member){const e=this.events.member;let t=e.getContent(),n=e.getSender();if("join"===t.membership&&(t=e.getPrevContent(),n=e.getUnsigned().prev_sender),"invite"===t.membership&&t.is_direct)return n}}getAvatarUrl(e,t,n,r,o=!0,i){const s=this.getMxcAvatarUrl();if(!s&&!o)return null;const c=Object(a.a)(e,s,t,n,r,i);return c||null}getMxcAvatarUrl(){return this.events.member?this.events.member.getDirectionalContent().avatar_url:this.user?this.user.avatarUrl:null}}const l=/@.+:.+/,u=/[\u200E\u200F\u202A-\u202F]/},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(942),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(23))},function(e,t,n){"use strict";(function(e){var r=n(3),o=n.n(r);let i=!0;class a extends o.a{constructor(e){super(),this._matrixClient=e,this._userGroups={},this._groupProfiles={},this._groupProfilesPromise={},this._usersPending={},this._usersInFlight={},this._debounceTimeoutID=null}groupSupport(){return i}invalidatePublicisedGroups(e){delete this._userGroups[e]}cachedPublicisedGroups(e){return this._userGroups[e]}getPublicisedGroupsCached(e,t){return this._userGroups[t]?Promise.resolve(this._userGroups[t]):this._usersPending[t]?this._usersPending[t].prom:this._usersInFlight[t]?this._usersInFlight[t].prom:(this._usersPending[t]={},this._usersPending[t].prom=new Promise((e,n)=>{this._usersPending[t].resolve=e,this._usersPending[t].reject=n}).then(e=>(this._userGroups[t]=e,setTimeout(()=>{delete this._userGroups[t]},18e5),this._userGroups[t])).catch(e=>{if("M_UNRECOGNIZED"===e.errcode)return console.warn("Cannot display flair, server does not support groups"),void(i=!1);throw console.error("Could not get groups for user",t,e),e}).finally(()=>{delete this._usersInFlight[t]}),this._debounceTimeoutID&&clearTimeout(this._debounceTimeoutID),this._debounceTimeoutID=setTimeout(()=>{this._batchedGetPublicGroups(e)},200),this._usersPending[t].prom)}async _batchedGetPublicGroups(e){this._usersInFlight=this._usersPending,this._usersPending={};let t={users:[]};try{t=await e.getPublicisedGroups(Object.keys(this._usersInFlight))}catch(e){return void Object.keys(this._usersInFlight).forEach(t=>{this._usersInFlight[t]&&this._usersInFlight[t].reject(e)})}const n=t.users;Object.keys(this._usersInFlight).forEach(e=>{this._usersInFlight[e]&&this._usersInFlight[e].resolve(n[e]||[])})}getGroupProfileCachedFast(e,t){return e&&t?this._groupProfiles[t]?this._groupProfiles[t]:(this.getGroupProfileCached(e,t),null):null}async getGroupProfileCached(e,t){if(this._groupProfiles[t])return this._groupProfiles[t];if(this._groupProfilesPromise[t]){try{await this._groupProfilesPromise[t]}catch(e){return null}return this._groupProfiles[t]}let n;console.log("FlairStore: Request group profile of "+t),this._groupProfilesPromise[t]=e.getGroupProfile(t);try{n=await this._groupProfilesPromise[t]}catch(e){return console.log("FlairStore: Failed to get group profile for "+t,e),delete this._groupProfilesPromise[t],null}return this._groupProfiles[t]={groupId:t,avatarUrl:n.avatar_url,name:n.name,shortDescription:n.short_description},delete this._groupProfilesPromise[t],console.log("FlairStore: Emit updateGroupProfile for "+t),this.emit("updateGroupProfile"),setTimeout(()=>{this.refreshGroupProfile(e,t)},18e5),this._groupProfiles[t]}refreshGroupProfile(e,t){return delete this._groupProfiles[t],this.getGroupProfileCached(e,t)}}void 0===e.singletonFlairStore&&(e.singletonFlairStore=new a),t.a=e.singletonFlairStore}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"d",(function(){return f})),n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return v}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(86),u=n.n(l),d=n(103);const h=["label","iconClassName","active","className"],p=["label","iconClassName","active","className"],m=["label","iconClassName","children"],g=["className","children","compact"],f=e=>{let{label:t,iconClassName:n,active:r,className:i}=e,s=a()(e,h);return c.a.createElement(d.h,o()({},s,{className:u()(i,{mx_IconizedContextMenu_active:r}),active:r,label:t}),c.a.createElement("span",{className:u()("mx_IconizedContextMenu_icon",n)}),c.a.createElement("span",{className:"mx_IconizedContextMenu_label"},t),r&&c.a.createElement("span",{className:"mx_IconizedContextMenu_icon mx_IconizedContextMenu_checked"}))},_=e=>{let{label:t,iconClassName:n,active:r,className:i}=e,s=a()(e,p);return c.a.createElement(d.g,o()({},s,{className:u()(i,{mx_IconizedContextMenu_active:r}),active:r,label:t}),c.a.createElement("span",{className:u()("mx_IconizedContextMenu_icon",n)}),c.a.createElement("span",{className:"mx_IconizedContextMenu_label"},t),c.a.createElement("span",{className:u()("mx_IconizedContextMenu_icon",{mx_IconizedContextMenu_checked:r,mx_IconizedContextMenu_unchecked:!r})}))},b=e=>{let{label:t,iconClassName:n,children:r}=e,i=a()(e,m);return c.a.createElement(d.f,o()({},i,{label:t}),n&&c.a.createElement("span",{className:u()("mx_IconizedContextMenu_icon",n)}),c.a.createElement("span",{className:"mx_IconizedContextMenu_label"},t),r)},v=({first:e,red:t,className:n,children:r})=>{const o=u()("mx_IconizedContextMenu_optionList",n,{mx_IconizedContextMenu_optionList_notFirst:!e,mx_IconizedContextMenu_optionList_red:t});return c.a.createElement("div",{className:o},r)};t.e=e=>{let{className:t,children:n,compact:r}=e,i=a()(e,g);const s=u()("mx_IconizedContextMenu",t,{mx_IconizedContextMenu_compact:r});return c.a.createElement(d.b,o()({chevronFace:d.a.None},i),c.a.createElement("div",{className:s},n))}},function(e,t,n){"use strict";var r=n(78),o=n(140);const i=Object(r.createContext)({roomLoading:!0,peekLoading:!1,shouldPeek:!0,membersLoaded:!1,numUnreadMessages:0,draggingFile:!1,searching:!1,guestsCanJoin:!1,canPeek:!1,showApps:!1,isPeeking:!1,showRightPanel:!0,joining:!1,atEndOfLiveTimeline:!0,atEndOfLiveTimelineInit:!1,showTopUnreadMessagesBar:!1,statusBarVisible:!1,canReact:!1,canReply:!1,layout:o.a.Group,lowBandwidth:!1,alwaysShowTimestamps:!1,showTwelveHourTimestamps:!1,readMarkerInViewThresholdMs:3e3,readMarkerOutOfViewThresholdMs:3e4,showHiddenEventsInTimeline:!1,showReadReceipts:!0,showRedactions:!0,showJoinLeaves:!0,showAvatarChanges:!0,showDisplaynameChanges:!0,matrixClientIsReady:!1,dragCounter:0});i.displayName="RoomContext",t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,o=n(78),i=n.n(o),a=n(334),s=n(81);let c=Object(s.a)("views.elements.LabelledToggleSwitch")(r=class extends i.a.PureComponent{render(){let e=i.a.createElement("span",{className:"mx_SettingsFlag_label"},this.props.label),t=i.a.createElement(a.a,{checked:this.props.value,disabled:this.props.disabled,onChange:this.props.onChange,"aria-label":this.props.label});if(this.props.toggleInFront){const n=e;e=t,t=n}const n="mx_SettingsFlag "+(this.props.className||"");return i.a.createElement("div",{className:n},e,t)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(86),c=n.n(s),l=n(80),u=n(89);class d extends a.a.Component{constructor(...e){super(...e),o()(this,"onFinished",()=>{this.props.onFinished()})}render(){const e=u.getComponent("views.dialogs.BaseDialog"),t=u.getComponent("views.elements.DialogButtons");return a.a.createElement(e,{className:"mx_InfoDialog",onFinished:this.props.onFinished,title:this.props.title,contentId:"mx_Dialog_content",hasCancel:this.props.hasCloseButton,onKeyDown:this.props.onKeyDown,fixedWidth:this.props.fixedWidth},a.a.createElement("div",{className:c()("mx_Dialog_content",this.props.className),id:"mx_Dialog_content"},this.props.description),!1!==this.props.button&&a.a.createElement(t,{primaryButton:this.props.button||Object(l.a)("OK"),onPrimaryButtonClick:this.onFinished,hasCancel:!1}))}}o()(d,"defaultProps",{title:"",description:"",hasCloseButton:!1})},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(79),o=n.n(r),i=n(150),a=n(83),s=n(141),c=n(183),l=n(109),u=n(217);class d extends u.b{constructor(e=!1,t,n){super(),this.byTileCount=e,this.tagId=t,this.getRoomFn=n,o()(this,"rooms",[]),o()(this,"states",{}),o()(this,"onRoomNotificationStateUpdate",()=>{this.calculateTotalState()})}get symbol(){return null}setRooms(e){if(this.byTileCount)return this.rooms=e,void this.calculateTotalState();const t=this.rooms,n=Object(l.a)(t,e);this.rooms=e;for(const e of n.removed){const t=this.states[e.roomId];t&&(delete this.states[e.roomId],t.off(u.a,this.onRoomNotificationStateUpdate))}for(const e of n.added){const t=this.getRoomFn(e);t.on(u.a,this.onRoomNotificationStateUpdate),this.states[e.roomId]=t}this.calculateTotalState()}getForRoom(e){const t=this.states[e.roomId];if(!t)throw new Error("Unknown room for notification state");return t}destroy(){super.destroy();for(const e of Object.values(this.states))e.off(u.a,this.onRoomNotificationStateUpdate);this.states={}}calculateTotalState(){const e=this.snapshot();if(this.byTileCount)this._color=c.a.Red,this._count=this.rooms.length;else{this._count=0,this._color=c.a.None;for(const e of Object.values(this.states))this._count+=e.count,this._color=Math.max(this.color,e.color)}this.emitIfUpdated(e)}}var h=n(82),p=n(171),m=n(567),g=n(316),f=n(568);class _ extends u.b{constructor(e){super(),this.room=e,o()(this,"handleReadReceipt",(e,t)=>{Object(m.a)(e,h.a.get())&&t.roomId===this.room.roomId&&this.updateNotificationState()}),o()(this,"handleMembershipUpdate",()=>{this.updateNotificationState()}),o()(this,"handleRoomEventUpdate",e=>{e.getRoomId()===this.room.roomId&&this.updateNotificationState()}),o()(this,"handleAccountDataUpdate",e=>{"m.push_rules"===e.getType()&&this.updateNotificationState()}),this.room.on("Room.receipt",this.handleReadReceipt),this.room.on("Room.timeline",this.handleRoomEventUpdate),this.room.on("Room.redaction",this.handleRoomEventUpdate),this.room.on("Room.myMembership",this.handleMembershipUpdate),h.a.get().on("Event.decrypted",this.handleRoomEventUpdate),h.a.get().on("accountData",this.handleAccountDataUpdate),this.updateNotificationState()}get roomIsInvite(){return Object(p.b)(this.room.getMyMembership())===p.a.Invite}destroy(){super.destroy(),this.room.removeListener("Room.receipt",this.handleReadReceipt),this.room.removeListener("Room.timeline",this.handleRoomEventUpdate),this.room.removeListener("Room.redaction",this.handleRoomEventUpdate),this.room.removeListener("Room.myMembership",this.handleMembershipUpdate),h.a.get()&&(h.a.get().removeListener("Event.decrypted",this.handleRoomEventUpdate),h.a.get().removeListener("accountData",this.handleAccountDataUpdate))}updateNotificationState(){const e=this.snapshot();if(g.f(this.room.roomId)===g.d)this._color=c.a.None,this._symbol=null,this._count=0;else if(this.roomIsInvite)this._color=c.a.Red,this._symbol="!",this._count=1;else{const e=g.g(this.room,"highlight"),t=g.g(this.room,"total"),n=t||(e||0);if(e>0)this._color=c.a.Red,this._count=n,this._symbol=null;else if(t>0)this._color=c.a.Grey,this._count=n,this._symbol=null;else{const e=f.a(this.room);this._color=e?c.a.Bold:c.a.None,this._count=0,this._symbol=null}}this.emitIfUpdated(e)}}class b extends u.b{constructor(){super(),o()(this,"totalStatesWithUnread",0),this._symbol=null,this._count=0,this._color=c.a.None}get numUnreadStates(){return this.totalStatesWithUnread}add(e,t=!1){e.symbol&&t&&(this._symbol=e.symbol),e.count&&(this._count+=e.count),e.color>this.color&&(this._color=e.color),e.hasUnreadCount&&this.totalStatesWithUnread++}}var v=n(507);class y extends i.a{constructor(){super(a.a,{}),o()(this,"roomMap",new Map),o()(this,"listMap",new Map)}get globalState(){if(!this.matrixClient)return new b;const e=new b;for(const t of this.matrixClient.getVisibleRooms())v.a.instance.isRoomVisible(t)&&e.add(this.getRoomState(t));return e}getListState(e){if(this.listMap.has(e))return this.listMap.get(e);const t=e===s.a.Invite,n=new d(t,e,e=>this.getRoomState(e));return this.listMap.set(e,n),n}getRoomState(e){return this.roomMap.has(e)||this.roomMap.set(e,new _(e)),this.roomMap.get(e)}static get instance(){return y.internalInstance}async onNotReady(){for(const e of this.roomMap.values())e.destroy()}async onAction(e){return Promise.resolve()}}o()(y,"internalInstance",new y)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return q})),n.d(t,"c",(function(){return H})),n.d(t,"d",(function(){return z})),n.d(t,"b",(function(){return K}));var r=n(79),o=n.n(r),i=n(3),a=n(916),s=n(108),c=n(917),l=n(128),u=n(291),d=n(918),h=n(2),p=n(152),m=n(230),g=n(231),f=n(135),_=n(374),b=n(924),v=n(96),y=n(188),E=n(259),S=n(296),w=n(302),C=n(301),T=n(205),x=n(258),k=n(1428),F=n(517),O=n(134),R=n(939),D=n(511),I=n(303),A=n(93),N=n(136),M=n(940),P=n(180),L=n(518),j=n(1429),U=n(519),B=n(233);function G(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}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const q=Object(S.c)();let H,z;var W;!function(e){e.Chronological="chronological",e.Detached="detached"}(H||(H={})),function(e){e.Stable="stable",e.Unstable="unstable"}(z||(z={})),function(e){e.MasterKey="master_key",e.SelfSigningKey="self_signing_key",e.UserSigningKey="user_signing_key"}(W||(W={}));class K extends i.EventEmitter{constructor(e){super(),o()(this,"reEmitter",new _.a(this)),o()(this,"olmVersion",null),o()(this,"usingExternalCrypto",!1),o()(this,"store",void 0),o()(this,"deviceId",void 0),o()(this,"credentials",void 0),o()(this,"pickleKey",void 0),o()(this,"scheduler",void 0),o()(this,"clientRunning",!1),o()(this,"timelineSupport",!1),o()(this,"urlPreviewCache",{}),o()(this,"unstableClientRelationAggregation",!1),o()(this,"identityServer",void 0),o()(this,"sessionStore",void 0),o()(this,"http",void 0),o()(this,"crypto",void 0),o()(this,"cryptoCallbacks",void 0),o()(this,"callEventHandler",void 0),o()(this,"supportsCallTransfer",!1),o()(this,"forceTURN",!1),o()(this,"iceCandidatePoolSize",0),o()(this,"idBaseUrl",void 0),o()(this,"baseUrl",void 0),o()(this,"canSupportVoip",!1),o()(this,"peekSync",null),o()(this,"isGuestAccount",!1),o()(this,"ongoingScrollbacks",{}),o()(this,"notifTimelineSet",null),o()(this,"cryptoStore",void 0),o()(this,"verificationMethods",void 0),o()(this,"fallbackICEServerAllowed",!1),o()(this,"roomList",void 0),o()(this,"syncApi",void 0),o()(this,"pushRules",void 0),o()(this,"syncLeftRoomsPromise",void 0),o()(this,"syncedLeftRooms",!1),o()(this,"clientOpts",void 0),o()(this,"clientWellKnownIntervalID",void 0),o()(this,"canResetTimelineCallback",void 0),o()(this,"pushProcessor",new m.a(this)),o()(this,"serverVersionsPromise",void 0),o()(this,"cachedCapabilities",void 0),o()(this,"clientWellKnown",void 0),o()(this,"clientWellKnownPromise",void 0),o()(this,"turnServers",[]),o()(this,"turnServersExpiry",0),o()(this,"checkTurnServersIntervalID",void 0),o()(this,"exportedOlmDeviceToImport",void 0),o()(this,"txnCtr",0),o()(this,"startCallEventHandler",()=>{this.isInitialSyncComplete()&&(this.callEventHandler.start(),this.off("sync",this.startCallEventHandler))}),e.baseUrl=h.o(e.baseUrl),e.idBaseUrl=h.o(e.idBaseUrl),this.baseUrl=e.baseUrl,this.idBaseUrl=e.idBaseUrl,this.usingExternalCrypto=e.usingExternalCrypto,this.store=e.store||new c.a,this.deviceId=e.deviceId||null;const t=e.userId||null;this.credentials={userId:t},this.http=new E.d(this,{baseUrl:e.baseUrl,idBaseUrl:e.idBaseUrl,accessToken:e.accessToken,request:e.request,prefix:E.h,onlyData:!0,extraParams:e.queryParams,localTimeoutMs:e.localTimeoutMs,useAuthorizationHeader:e.useAuthorizationHeader}),e.deviceToImport?this.deviceId?v.a.warn("not importing device because device ID is provided to constructor independently of exported data"):this.credentials.userId?v.a.warn("not importing device because user ID is provided to constructor independently of exported data"):e.deviceToImport.deviceId?(this.deviceId=e.deviceToImport.deviceId,this.credentials.userId=e.deviceToImport.userId,this.exportedOlmDeviceToImport=e.deviceToImport.olmDevice):v.a.warn("not importing device because no device ID in exported data"):e.pickleKey&&(this.pickleKey=e.pickleKey),this.scheduler=e.scheduler,this.scheduler&&this.scheduler.setProcessFunction(async e=>{const t=this.getRoom(e.getRoomId());e.status!==s.a.SENDING&&this.updatePendingEventStatus(t,e,s.a.SENDING);const n=await this.sendEventHttpRequest(e);return t&&t.updatePendingEvent(e,s.a.SENT,n.event_id),n});Object(l.g)(this,void 0,void 0)&&(this.callEventHandler=new d.a(this),this.canSupportVoip=!0,this.on("sync",this.startCallEventHandler)),this.timelineSupport=Boolean(e.timelineSupport),this.unstableClientRelationAggregation=!!e.unstableClientRelationAggregation,this.cryptoStore=e.cryptoStore,this.sessionStore=e.sessionStore,this.verificationMethods=e.verificationMethods,this.cryptoCallbacks=e.cryptoCallbacks||{},this.forceTURN=e.forceTURN||!1,this.iceCandidatePoolSize=void 0===e.iceCandidatePoolSize?0:e.iceCandidatePoolSize,this.supportsCallTransfer=e.supportsCallTransfer||!1,this.fallbackICEServerAllowed=e.fallbackICEServerAllowed||!1,this.roomList=new b.a(this.cryptoStore),this.on("Event.decrypted",e=>{const t=e.getPushActions(),n=this.pushProcessor.actionsForEvent(e);e.setPushActions(n);const r=this.getRoom(e.getRoomId());if(!r)return;const o=r.getUnreadNotificationCount(O.NotificationCountType.Highlight),i=!(!t||!t.tweaks)&&!!t.tweaks.highlight,a=!(!n||!n.tweaks)&&!!n.tweaks.highlight;if((i!==a||o>0)&&!r.hasUserReadEvent(this.getUserId(),e.getId())){let e=o;a&&!i&&e++,!a&&i&&e--,r.setUnreadNotificationCount(O.NotificationCountType.Highlight,e);r.getUnreadNotificationCount(O.NotificationCountType.Total)<e&&r.setUnreadNotificationCount(O.NotificationCountType.Total,e)}}),this.on("Room.receipt",(e,t)=>{if(t&&this.isRoomEncrypted(t.roomId)){const n=e.getContent();if(!(Object.keys(n).filter(e=>Object.keys(n[e]["m.read"]).includes(this.getUserId())).length>0))return;const r=20,o=t.getLiveTimeline().getEvents();let i=0;for(let e=o.length-1;e>=0;e--){if(e===o.length-r)return;const n=o[e];if(t.hasUserReadEvent(this.getUserId(),n.getId()))break;const a=this.getPushActionsForEvent(n);i+=a.tweaks&&a.tweaks.highlight?1:0}t.setUnreadNotificationCount("highlight",i)}})}async startClient(e){if(this.clientRunning)return;this.clientRunning=!0,"number"==typeof e&&(e={initialSyncLimit:e});const t=this.getUserId();t&&this.store.storeUser(new T.a(t)),this.crypto&&(this.crypto.uploadDeviceKeys(),this.crypto.start()),this.canSupportVoip&&(this.checkTurnServersIntervalID=setInterval(()=>{this.checkTurnServers()},6e5),this.checkTurnServers()),this.syncApi&&(v.a.error("Still have sync object whilst not running: stopping old one"),this.syncApi.stop()),this.clientOpts=Object.assign({},e),this.clientOpts.crypto=this.crypto,this.clientOpts.canResetEntireTimeline=e=>!!this.canResetTimelineCallback&&this.canResetTimelineCallback(e),this.syncApi=new a.a(this,this.clientOpts),this.syncApi.sync(),void 0!==this.clientOpts.clientWellKnownPollPeriod&&(this.clientWellKnownIntervalID=setInterval(()=>{this.fetchClientWellKnown()},1e3*this.clientOpts.clientWellKnownPollPeriod),this.fetchClientWellKnown())}stopClient(){var t,n,r,o;v.a.log("stopping MatrixClient"),this.clientRunning=!1,null===(t=this.syncApi)||void 0===t||t.stop(),this.syncApi=null,null===(n=this.crypto)||void 0===n||n.stop(),null===(r=this.peekSync)||void 0===r||r.stopPeeking(),null===(o=this.callEventHandler)||void 0===o||o.stop(),this.callEventHandler=null,e.clearInterval(this.checkTurnServersIntervalID),void 0!==this.clientWellKnownIntervalID&&e.clearInterval(this.clientWellKnownIntervalID)}async rehydrateDevice(){if(this.crypto)throw new Error("Cannot rehydrate device after crypto is initialized");if(!this.cryptoCallbacks.getDehydrationKey)return;const t=await this.getDehydratedDevice();if(!t)return;if(!t.device_data||!t.device_id)return void v.a.info("no dehydrated device found");const n=new e.Olm.Account;try{const e=t.device_data;if(e.algorithm!==F.a)return void v.a.warn("Wrong algorithm for dehydrated device");v.a.log("unpickling dehydrated device");const r=await this.cryptoCallbacks.getDehydrationKey(e,t=>{n.unpickle(new Uint8Array(t),e.account)});n.unpickle(r,e.account),v.a.log("unpickled device");if(!0===(await this.http.authedRequest(void 0,"POST","/dehydrated_device/claim",void 0,{device_id:t.device_id},{prefix:"/_matrix/client/unstable/org.matrix.msc2697.v2"})).success){this.deviceId=t.device_id,v.a.info("using dehydrated device");const e=this.pickleKey||"DEFAULT_KEY";return this.exportedOlmDeviceToImport={pickledAccount:n.pickle(e),sessions:[],pickleKey:e},n.free(),this.deviceId}return n.free(),void v.a.info("not using dehydrated device")}catch(e){n.free(),v.a.warn("could not unpickle",e)}}async getDehydratedDevice(){try{return await this.http.authedRequest(void 0,"GET","/dehydrated_device",void 0,void 0,{prefix:"/_matrix/client/unstable/org.matrix.msc2697.v2"})}catch(e){return void v.a.info("could not get dehydrated device",e.toString())}}async setDehydrationKey(e,t,n){if(this.crypto)return await this.crypto.dehydrationManager.setKeyAndQueueDehydration(e,t,n);v.a.warn("not dehydrating device if crypto is not enabled")}async createDehydratedDevice(e,t,n){if(this.crypto)return await this.crypto.dehydrationManager.setKey(e,t,n),await this.crypto.dehydrationManager.dehydrateDevice();v.a.warn("not dehydrating device if crypto is not enabled")}async exportDevice(){if(this.crypto)return{userId:this.credentials.userId,deviceId:this.deviceId,olmDevice:await this.crypto.olmDevice.export()};v.a.warn("not exporting device if crypto is not enabled")}clearStores(){if(this.clientRunning)throw new Error("Cannot clear stores while client is running");const e=[];return e.push(this.store.deleteAllData()),this.cryptoStore&&e.push(this.cryptoStore.deleteAllData()),Promise.all(e).then()}getUserId(){return this.credentials&&this.credentials.userId?this.credentials.userId:null}getDomain(){return this.credentials&&this.credentials.userId?this.credentials.userId.replace(/^.*?:/,""):null}getUserIdLocalpart(){return this.credentials&&this.credentials.userId?this.credentials.userId.split(":")[0].substring(1):null}getDeviceId(){return this.deviceId}supportsVoip(){return this.canSupportVoip}setForceTURN(e){this.forceTURN=e}setSupportsCallTransfer(e){this.supportsCallTransfer=e}createCall(e){return Object(l.g)(this,e)}getSyncState(){return this.syncApi?this.syncApi.getSyncState():null}getSyncStateData(){return this.syncApi?this.syncApi.getSyncStateData():null}isInitialSyncComplete(){const e=this.getSyncState();return!!e&&(e===D.a.Prepared||e===D.a.Syncing)}isGuest(){return this.isGuestAccount}setGuest(e){this.isGuestAccount=e}getScheduler(){return this.scheduler}retryImmediately(){return this.syncApi.retryImmediately()}getNotifTimelineSet(){return this.notifTimelineSet}setNotifTimelineSet(e){this.notifTimelineSet=e}getCapabilities(e=!1){const t=(new Date).getTime();return this.cachedCapabilities&&!e&&t<this.cachedCapabilities.expiration?(v.a.log("Returning cached capabilities"),Promise.resolve(this.cachedCapabilities.capabilities)):this.http.authedRequest(void 0,"GET","/capabilities").catch(e=>(v.a.error(e),null)).then(e=>{e||(e={});const n=e.capabilities||{},r=Object.keys(n).length?216e5:6e4+5e3*Math.random();return this.cachedCapabilities={capabilities:n,expiration:t+r},v.a.log("Caching capabilities: ",n),n})}async initCrypto(){if(!Object(S.c)())throw new Error("End-to-end encryption not supported in this js-sdk build: did you remember to load the olm library?");if(this.crypto)return void v.a.warn("Attempt to re-initialise e2e encryption on MatrixClient");if(!this.sessionStore)throw new Error("Cannot enable encryption: no sessionStore provided");if(!this.cryptoStore)throw new Error("Cannot enable encryption: no cryptoStore provided");v.a.log("Crypto: Starting up crypto store..."),await this.cryptoStore.startup(),v.a.log("Crypto: initialising roomlist..."),await this.roomList.init();const e=this.getUserId();if(null===e)throw new Error("Cannot enable encryption on MatrixClient with unknown userId: ensure userId is passed in createClient().");if(null===this.deviceId)throw new Error("Cannot enable encryption on MatrixClient with unknown deviceId: ensure deviceId is passed in createClient().");const t=new S.a(this,this.sessionStore,e,this.deviceId,this.store,this.cryptoStore,this.roomList,this.verificationMethods);this.reEmitter.reEmit(t,["crypto.keyBackupFailed","crypto.keyBackupSessionsRemaining","crypto.roomKeyRequest","crypto.roomKeyRequestCancellation","crypto.warning","crypto.devicesUpdated","crypto.willUpdateDevices","deviceVerificationChanged","userTrustStatusChanged","crossSigning.keysChanged"]),v.a.log("Crypto: initialising crypto object..."),await t.init({exportedOlmDevice:this.exportedOlmDeviceToImport,pickleKey:this.pickleKey}),delete this.exportedOlmDeviceToImport,this.olmVersion=S.a.getOlmVersion(),t.registerEventHandlers(this),this.crypto=t}isCryptoEnabled(){return!!this.crypto}getDeviceEd25519Key(){return this.crypto?this.crypto.getDeviceEd25519Key():null}getDeviceCurve25519Key(){return this.crypto?this.crypto.getDeviceCurve25519Key():null}async uploadKeys(){if(!this.crypto)throw new Error("End-to-end encryption disabled");await this.crypto.uploadDeviceKeys()}downloadKeys(e,t){return this.crypto?this.crypto.downloadKeys(e,t):Promise.reject(new Error("End-to-end encryption disabled"))}getStoredDevicesForUser(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getStoredDevicesForUser(e)||[]}getStoredDevice(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getStoredDevice(e,t)||null}setDeviceVerified(e,t,n=!0){const r=this.setDeviceVerification(e,t,n,null,null);return e==this.credentials.userId&&this.checkKeyBackup(),r}setDeviceBlocked(e,t,n=!0){return this.setDeviceVerification(e,t,null,n,null)}setDeviceKnown(e,t,n=!0){return this.setDeviceVerification(e,t,null,null,n)}async setDeviceVerification(e,t,n,r,o){if(!this.crypto)throw new Error("End-to-end encryption disabled");await this.crypto.setDeviceVerification(e,t,n,r,o)}requestVerificationDM(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.requestVerificationDM(e,t)}findVerificationRequestDMInProgress(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.findVerificationRequestDMInProgress(e)}getVerificationRequestsToDeviceInProgress(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getVerificationRequestsToDeviceInProgress(e)}requestVerification(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.requestVerification(e,t)}beginKeyVerification(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.beginKeyVerification(e,t,n)}checkSecretStorageKey(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkSecretStorageKey(e,t)}setGlobalBlacklistUnverifiedDevices(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.setGlobalBlacklistUnverifiedDevices(e)}getGlobalBlacklistUnverifiedDevices(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getGlobalBlacklistUnverifiedDevices()}setGlobalErrorOnUnknownDevices(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.setGlobalErrorOnUnknownDevices(e)}getGlobalErrorOnUnknownDevices(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getGlobalErrorOnUnknownDevices()}getCrossSigningId(e=R.a.Master){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getCrossSigningId(e)}getStoredCrossSigningForUser(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getStoredCrossSigningForUser(e)}checkUserTrust(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkUserTrust(e)}checkDeviceTrust(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkDeviceTrust(e,t)}checkOwnCrossSigningTrust(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkOwnCrossSigningTrust(e)}checkCrossSigningPrivateKey(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkCrossSigningPrivateKey(e,t)}legacyDeviceVerification(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.legacyDeviceVerification(e,t,n)}prepareToEncrypt(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.prepareToEncrypt(e)}isCrossSigningReady(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.isCrossSigningReady()}bootstrapCrossSigning(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.bootstrapCrossSigning(e)}getCryptoTrustCrossSignedDevices(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getCryptoTrustCrossSignedDevices()}setCryptoTrustCrossSignedDevices(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.setCryptoTrustCrossSignedDevices(e)}countSessionsNeedingBackup(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.countSessionsNeedingBackup()}getEventEncryptionInfo(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getEventEncryptionInfo(e)}createRecoveryKeyFromPassphrase(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.createRecoveryKeyFromPassphrase(e)}isSecretStorageReady(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.isSecretStorageReady()}bootstrapSecretStorage(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.bootstrapSecretStorage(e)}addSecretStorageKey(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.addSecretStorageKey(e,t,n)}hasSecretStorageKey(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.hasSecretStorageKey(e)}storeSecret(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.storeSecret(e,t,n)}getSecret(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getSecret(e)}isSecretStored(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.isSecretStored(e,t)}requestSecret(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.requestSecret(e,t)}getDefaultSecretStorageKeyId(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getDefaultSecretStorageKeyId()}setDefaultSecretStorageKeyId(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.setDefaultSecretStorageKeyId(e)}checkSecretStoragePrivateKey(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkSecretStoragePrivateKey(e,t)}async getEventSenderDeviceInfo(e){return this.crypto?this.crypto.getEventSenderDeviceInfo(e):null}async isEventSenderVerified(e){const t=await this.getEventSenderDeviceInfo(e);return!!t&&t.isVerified()}cancelAndResendEventRoomKeyRequest(e){return e.cancelAndResendKeyRequest(this.crypto,this.getUserId())}setRoomEncryption(e,t){if(!this.crypto)throw new Error("End-to-End encryption disabled");return this.crypto.setRoomEncryption(e,t)}isRoomEncrypted(e){const t=this.getRoom(e);if(!t)return!1;return!!t.currentState.getStateEvents(A.a.RoomEncryption,"")||this.roomList.isRoomEncrypted(e)}forceDiscardSession(e){if(!this.crypto)throw new Error("End-to-End encryption disabled");this.crypto.forceDiscardSession(e)}exportRoomKeys(){return this.crypto?this.crypto.exportRoomKeys():Promise.reject(new Error("End-to-end encryption disabled"))}importRoomKeys(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.importRoomKeys(e,t)}checkKeyBackup(){return this.crypto.backupManager.checkKeyBackup()}async getKeyBackupVersion(){let e;try{e=await this.http.authedRequest(void 0,"GET","/room_keys/version",void 0,void 0,{prefix:E.i})}catch(e){if("M_NOT_FOUND"===e.errcode)return null;throw e}try{L.a.checkBackupVersion(e)}catch(e){throw e}return e}isKeyBackupTrusted(e){return this.crypto.backupManager.isKeyBackupTrusted(e)}getKeyBackupEnabled(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.backupManager.getKeyBackupEnabled()}enableKeyBackup(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.backupManager.enableKeyBackup(e)}disableKeyBackup(){if(!this.crypto)throw new Error("End-to-end encryption disabled");this.crypto.backupManager.disableKeyBackup()}async prepareKeyBackupVersion(e,t={secureSecretStorage:!1}){if(!this.crypto)throw new Error("End-to-end encryption disabled");const{algorithm:n,auth_data:r,recovery_key:o,privateKey:i}=await this.crypto.backupManager.prepareKeyBackupVersion(e);return t.secureSecretStorage&&(await this.storeSecret("m.megolm_backup.v1",Object(f.encodeBase64)(i)),v.a.info("Key backup private key stored in secret storage")),{algorithm:n,auth_data:r,recovery_key:o}}isKeyBackupKeyStored(){return Promise.resolve(this.isSecretStored("m.megolm_backup.v1",!1))}async createKeyBackupVersion(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");await this.crypto.backupManager.createKeyBackupVersion(e);const t={algorithm:e.algorithm,auth_data:e.auth_data};await this.crypto.signObject(t.auth_data),this.cryptoCallbacks.getCrossSigningKey&&this.crypto.crossSigningInfo.getId()&&await this.crypto.crossSigningInfo.signObject(t.auth_data,"master");const n=await this.http.authedRequest(void 0,"POST","/room_keys/version",void 0,t,{prefix:E.i});return await this.checkKeyBackup(),this.getKeyBackupEnabled()||v.a.error("Key backup not usable even though we just created it"),n}deleteKeyBackupVersion(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");this.crypto.backupManager.version&&this.crypto.backupManager.disableKeyBackup();const t=h.n("/room_keys/version/$version",{$version:e});return this.http.authedRequest(void 0,"DELETE",t,void 0,void 0,{prefix:E.i})}makeKeyBackupPath(e,t,n){let r;r=void 0!==t?h.n("/room_keys/keys/$roomId/$sessionId",{$roomId:e,$sessionId:t}):void 0!==e?h.n("/room_keys/keys/$roomId",{$roomId:e}):"/room_keys/keys";return{path:r,queryData:void 0===n?void 0:{version:n}}}sendKeyBackup(e,t,n,r){if(!this.crypto)throw new Error("End-to-end encryption disabled");const o=this.makeKeyBackupPath(e,t,n);return this.http.authedRequest(void 0,"PUT",o.path,o.queryData,r,{prefix:E.i})}async scheduleAllGroupSessionsForBackup(){if(!this.crypto)throw new Error("End-to-end encryption disabled");await this.crypto.backupManager.scheduleAllGroupSessionsForBackup()}flagAllGroupSessionsForBackup(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.backupManager.flagAllGroupSessionsForBackup()}isValidRecoveryKey(e){try{return Object(w.a)(e),!0}catch(e){return!1}}keyBackupKeyFromPassword(e,t){return Object(C.b)(t.auth_data,e)}keyBackupKeyFromRecoveryKey(e){return Object(w.a)(e)}async restoreKeyBackupWithPassword(e,t,n,r,o){const i=await Object(C.b)(r.auth_data,e);return this.restoreKeyBackup(i,t,n,r,o)}async restoreKeyBackupWithSecretStorage(e,t,n,r){const o=await this.getSecret("m.megolm_backup.v1"),i=Object(S.b)(o);if(i){const[e]=await this.crypto.getSecretStorageKey();await this.storeSecret("m.megolm_backup.v1",i,[e])}const a=Object(f.decodeBase64)(i||o);return this.restoreKeyBackup(a,t,n,e,r)}restoreKeyBackupWithRecoveryKey(e,t,n,r,o){const i=Object(w.a)(e);return this.restoreKeyBackup(i,t,n,r,o)}async restoreKeyBackupWithCache(e,t,n,r){const o=await this.crypto.getSessionBackupPrivateKey();if(!o)throw new Error("Couldn't get key");return this.restoreKeyBackup(o,e,t,n,r)}async restoreKeyBackup(e,t,n,r,o){const i=null==o?void 0:o.cacheCompleteCallback,a=null==o?void 0:o.progressCallback;if(!this.crypto)throw new Error("End-to-end encryption disabled");let s=0,c=[];const l=this.makeKeyBackupPath(t,n,r.version),u=await L.a.makeAlgorithm(r,async()=>e),d=u.untrusted;try{if(!await u.keyMatches(e))return Promise.reject(new E.c({errcode:K.RESTORE_BACKUP_ERROR_BAD_KEY}));this.crypto.storeSessionBackupPrivateKey(e).catch(e=>{v.a.warn("Error caching session backup key:",e)}).then(i),a&&a({stage:"fetch"});const r=await this.http.authedRequest(void 0,"GET",l.path,l.queryData,void 0,{prefix:E.i});if(r.rooms)for(const[e,t]of Object.entries(r.rooms)){if(!t.sessions)continue;s+=Object.keys(t.sessions).length;const n=await u.decryptSessions(t.sessions);for(const t of n)t.room_id=e,c.push(t)}else if(r.sessions){s=Object.keys(r.sessions).length,c=await u.decryptSessions(r.sessions);for(const e of c)e.room_id=t}else{s=1;try{const[e]=await u.decryptSessions({[n]:r});e.room_id=t,e.session_id=n,c.push(e)}catch(e){v.a.log("Failed to decrypt megolm session from backup",e)}}}finally{u.free()}return await this.importRoomKeys(c,{progressCallback:a,untrusted:d,source:"backup"}),await this.checkKeyBackup(),{total:s,imported:c.length}}deleteKeysFromBackup(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");const r=this.makeKeyBackupPath(e,t,n);return this.http.authedRequest(void 0,"DELETE",r.path,r.queryData,void 0,{prefix:E.i})}async sendSharedHistoryKeys(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");const n=this.roomList.getRoomEncryption(e);if(!n)return void v.a.error("Unknown room. Not sharing decryption keys");const r=await this.crypto.downloadKeys(t),o={};for(const[e,t]of Object.entries(r))o[e]=Object.values(t);const i=this.crypto.getRoomDecryptor(e,n.algorithm);i.sendSharedHistoryInboundSessions?await i.sendSharedHistoryInboundSessions(o):v.a.warn("Algorithm does not support sharing previous keys",n.algorithm)}getGroup(e){return this.store.getGroup(e)}getGroups(){return this.store.getGroups()}getMediaConfig(e){return this.http.authedRequest(e,"GET","/config",void 0,void 0,{prefix:E.g})}getRoom(e){return this.store.getRoom(e)}getRooms(){return this.store.getRooms()}getVisibleRooms(){const e=this.store.getRooms(),t=new Set;for(const n of e){const e=n.currentState.getStateEvents(A.a.RoomCreate,"");if(e){const n=e.getContent().predecessor;n&&n.room_id&&t.add(n.room_id)}}return e.filter(e=>!e.currentState.getStateEvents(A.a.RoomTombstone,"")||!t.has(e.roomId))}getUser(e){return this.store.getUser(e)}getUsers(){return this.store.getUsers()}setAccountData(e,t,n){const r=h.n("/user/$userId/account_data/$type",{$userId:this.credentials.userId,$type:e}),o=Object(E.j)(5,()=>this.http.authedRequest(void 0,"PUT",r,void 0,t));return n&&o.then(e=>n(null,e),n),o}getAccountData(e){return this.store.getAccountData(e)}async getAccountDataFromServer(e){if(this.isInitialSyncComplete()){const t=this.store.getAccountData(e);return t?t.getContent():null}const t=h.n("/user/$userId/account_data/$type",{$userId:this.credentials.userId,$type:e});try{return await this.http.authedRequest(void 0,"GET",t,void 0)}catch(e){if(e.data&&"M_NOT_FOUND"===e.data.errcode)return null;throw e}}getIgnoredUsers(){const e=this.getAccountData("m.ignored_user_list");return e&&e.getContent()&&e.getContent().ignored_users?Object.keys(e.getContent().ignored_users):[]}setIgnoredUsers(e,t){const n={ignored_users:{}};return e.map(e=>n.ignored_users[e]={}),this.setAccountData("m.ignored_user_list",n,t)}isUserIgnored(e){return this.getIgnoredUsers().includes(e)}async joinRoom(e,t,n){if(h.u(t))throw new Error("Expected 'opts' object, got function.");void 0===(t=t||{}).syncRoom&&(t.syncRoom=!0);const r=this.getRoom(e);if(r&&r.hasMembershipState(this.credentials.userId,"join"))return Promise.resolve(r);let o=Promise.resolve();t.inviteSignUrl&&(o=this.http.requestOtherUrl(void 0,"POST",t.inviteSignUrl,{mxid:this.credentials.userId}));const i={};t.viaServers&&(i.server_name=t.viaServers);const s={qsStringifyOptions:{arrayFormat:"repeat"}};try{const r={},c=await o;c&&(r.third_party_signed=c);const l=h.n("/join/$roomid",{$roomid:e}),u=(await this.http.authedRequest(void 0,"POST",l,i,r,s)).room_id,d=new a.a(this,this.clientOpts).createRoom(u);return t.syncRoom,null==n||n(null,d),d}catch(e){throw null==n||n(e),e}}resendEvent(e,t){return this.updatePendingEventStatus(t,e,s.a.SENDING),this.encryptAndSendEvent(t,e)}cancelPendingEvent(e){if([s.a.QUEUED,s.a.NOT_SENT].indexOf(e.status)<0)throw new Error("cannot cancel an event with status "+e.status);this.scheduler&&this.scheduler.removeEventFromQueue(e);const t=this.getRoom(e.getRoomId());this.updatePendingEventStatus(t,e,s.a.CANCELLED)}setRoomName(e,t,n){return this.sendStateEvent(e,A.a.RoomName,{name:t},void 0,n)}setRoomTopic(e,t,n){return this.sendStateEvent(e,A.a.RoomTopic,{topic:t},void 0,n)}getRoomTags(e,t){const n=h.n("/user/$userId/rooms/$roomId/tags/",{$userId:this.credentials.userId,$roomId:e});return this.http.authedRequest(t,"GET",n,void 0)}setRoomTag(e,t,n,r){const o=h.n("/user/$userId/rooms/$roomId/tags/$tag",{$userId:this.credentials.userId,$roomId:e,$tag:t});return this.http.authedRequest(r,"PUT",o,void 0,n)}deleteRoomTag(e,t,n){const r=h.n("/user/$userId/rooms/$roomId/tags/$tag",{$userId:this.credentials.userId,$roomId:e,$tag:t});return this.http.authedRequest(n,"DELETE",r,void 0,void 0)}setRoomAccountData(e,t,n,r){const o=h.n("/user/$userId/rooms/$roomId/account_data/$type",{$userId:this.credentials.userId,$roomId:e,$type:t});return this.http.authedRequest(r,"PUT",o,void 0,n)}setPowerLevel(e,t,n,r,o){let i={users:{}};(null==r?void 0:r.getType())===A.a.RoomPowerLevels&&(i=h.j(r.getContent())),i.users[t]=n;const a=h.n("/rooms/$roomId/state/m.room.power_levels",{$roomId:e});return this.http.authedRequest(o,"PUT",a,void 0,i)}sendEvent(e,t,n,r,o){return this.sendCompleteEvent(e,{type:t,content:n},r,o)}sendCompleteEvent(e,t,n,r){h.u(n)&&(r=n,n=void 0),n||(n=this.makeTxnId());const o=new s.b(Object.assign(t,{event_id:"~"+e+":"+n,user_id:this.credentials.userId,sender:this.credentials.userId,room_id:e,origin_server_ts:(new Date).getTime()})),i=this.getRoom(e),a=o.getAssociatedId();if(a&&a.startsWith("~")){const e=i.getPendingEvents().find(e=>e.getId()===a);e.once("Event.localEventIdReplaced",()=>{o.updateAssociatedId(e.getId())})}const c=o.getType();return v.a.log(`sendEvent of type ${c} in ${e} with txnId ${n}`),o.setTxnId(n),o.setStatus(s.a.SENDING),i&&i.addPendingEvent(o,n),o.status===s.a.NOT_SENT?Promise.reject(new Error("Event blocked by other events not yet sent")):this.encryptAndSendEvent(i,o,r)}encryptAndSendEvent(e,t,n){return Promise.resolve().then(()=>{const n=this.encryptEventIfNeeded(t,e);return n?(this.updatePendingEventStatus(e,t,s.a.ENCRYPTING),n.then(()=>this.updatePendingEventStatus(e,t,s.a.SENDING))):null}).then(()=>{let n;return this.scheduler&&(n=this.scheduler.queueEvent(t),n&&this.scheduler.getQueueForEvent(t).length>1&&this.updatePendingEventStatus(e,t,s.a.QUEUED)),n||(n=this.sendEventHttpRequest(t),e&&(n=n.then(n=>(e.updatePendingEvent(t,s.a.SENT,n.event_id),n)))),n}).then(e=>(null==n||n(null,e),e)).catch(r=>{v.a.error("Error sending event",r.stack||r);try{t.error=r,this.updatePendingEventStatus(e,t,s.a.NOT_SENT),r.event=t,null==n||n(r)}catch(e){v.a.error("Exception in error handler!",e.stack||r)}throw r})}encryptEventIfNeeded(e,t){if(e.isEncrypted())return null;if(!this.isRoomEncrypted(e.getRoomId()))return null;if(!this.crypto&&this.usingExternalCrypto)return null;if(e.getType()===A.a.Reaction)return null;if(!this.crypto)throw new Error("This room is configured to use encryption, but your client does not support encryption.");return this.crypto.encryptEvent(e,t)}getEncryptedIfNeededEventType(e,t){return t===A.a.Reaction?t:this.isRoomEncrypted(e)?A.a.RoomMessageEncrypted:t}updatePendingEventStatus(e,t,n){e?e.updatePendingEvent(t,n):t.setStatus(n)}sendEventHttpRequest(e){let t=e.getTxnId();t||(t=this.makeTxnId(),e.setTxnId(t));const n={$roomId:e.getRoomId(),$eventType:e.getWireType(),$stateKey:e.getStateKey(),$txnId:t};let r;if(e.isState()){let t="/rooms/$roomId/state/$eventType";e.getStateKey()&&e.getStateKey().length>0&&(t="/rooms/$roomId/state/$eventType/$stateKey"),r=h.n(t,n)}else if(e.isRedaction()){const t="/rooms/$roomId/redact/$redactsEventId/$txnId";r=h.n(t,Object.assign({$redactsEventId:e.event.redacts},n))}else r=h.n("/rooms/$roomId/send/$eventType/$txnId",n);return this.http.authedRequest(void 0,"PUT",r,void 0,e.getWireContent()).then(t=>(v.a.log(`Event sent to ${e.getRoomId()} with event id ${t.event_id}`),t))}redactEvent(e,t,n,r){const o=("object"==typeof r?r:{}).reason,i="function"==typeof r?r:void 0;return this.sendCompleteEvent(e,{type:A.a.RoomRedaction,content:{reason:o},redacts:t},n,i)}sendMessage(e,t,n,r){return h.u(n)&&(r=n,n=void 0),this.sendEvent(e,A.a.RoomMessage,t,n,r)}sendTextMessage(e,t,n,r){const o=I.makeTextMessage(t);return this.sendMessage(e,o,n,r)}sendNotice(e,t,n,r){const o=I.makeNotice(t);return this.sendMessage(e,o,n,r)}sendEmoteMessage(e,t,n,r){const o=I.makeEmoteMessage(t);return this.sendMessage(e,o,n,r)}sendImageMessage(e,t,n,r="Image",o){h.u(r)&&(o=r,r=void 0);const i={msgtype:A.b.Image,url:t,info:n,body:r};return this.sendMessage(e,i,void 0,o)}sendStickerMessage(e,t,n,r="Sticker",o){h.u(r)&&(o=r,r=void 0);const i={url:t,info:n,body:r};return this.sendEvent(e,A.a.Sticker,i,void 0,o)}sendHtmlMessage(e,t,n,r){const o=I.makeHtmlMessage(t,n);return this.sendMessage(e,o,void 0,r)}sendHtmlNotice(e,t,n,r){const o=I.makeHtmlNotice(t,n);return this.sendMessage(e,o,void 0,r)}sendHtmlEmote(e,t,n,r){const o=I.makeHtmlEmote(t,n);return this.sendMessage(e,o,void 0,r)}sendReceipt(e,t,n,r){if("function"==typeof n&&(r=n,n={}),this.isGuest())return Promise.resolve({});const o=h.n("/rooms/$roomId/receipt/$receiptType/$eventId",{$roomId:e.getRoomId(),$receiptType:t,$eventId:e.getId()}),i=this.http.authedRequest(r,"POST",o,void 0,n||{}),a=this.getRoom(e.getRoomId());return a&&a.addLocalEchoReceipt(this.credentials.userId,e,t),i}async sendReadReceipt(e,t,n){"function"==typeof t&&(n=t,t={}),t||(t={});const r=e.getId(),o=this.getRoom(e.getRoomId());if(o&&o.hasPendingEvent(r))throw new Error(`Cannot set read receipt to a pending event (${r})`);const i={"org.matrix.msc2285.hidden":Boolean(t.hidden)};return this.sendReceipt(e,"m.read",i,n)}async setRoomReadMarkers(e,t,n,r){const o=this.getRoom(e);if(o&&o.hasPendingEvent(t))throw new Error(`Cannot set read marker to a pending event (${t})`);let i;if(n){if(i=n.getId(),o&&o.hasPendingEvent(i))throw new Error(`Cannot set read receipt to a pending event (${i})`);o&&o.addLocalEchoReceipt(this.credentials.userId,n,"m.read")}return this.setRoomReadMarkersHttpRequest(e,t,i,r)}getUrlPreview(e,t,n){t=6e4*Math.floor(t/6e4);const r=new URL(e);r.hash="";const o=t+"_"+(e=r.toString()),i=this.urlPreviewCache[o];if(i)return n&&i.then(n).catch(n),i;const a=this.http.authedRequest(n,"GET","/preview_url",{url:e,ts:t},void 0,{prefix:E.g});return this.urlPreviewCache[o]=a,a}sendTyping(e,t,n,r){if(this.isGuest())return Promise.resolve({});const o=h.n("/rooms/$roomId/typing/$userId",{$roomId:e,$userId:this.credentials.userId}),i={typing:t};return t&&(i.timeout=n||2e4),this.http.authedRequest(r,"PUT",o,void 0,i)}getRoomUpgradeHistory(e,t=!1){let n=this.getRoom(e);if(!n)return[];const r=[n];let o=n.currentState.getStateEvents(A.a.RoomCreate,"");for(;o;){v.a.log("Looking at "+o.getId());const e=o.getContent().predecessor;if(!e||!e.room_id)break;{v.a.log("Looking at predecessor "+e.room_id);const n=this.getRoom(e.room_id);if(!n)break;if(t){const e=n.currentState.getStateEvents(A.a.RoomTombstone,"");if(!e||e.getContent().replacement_room!==n.roomId)break}r.splice(0,0,n),o=n.currentState.getStateEvents(A.a.RoomCreate,"")}}let i=n.currentState.getStateEvents(A.a.RoomTombstone,"");for(;i;){const e=this.getRoom(i.getContent().replacement_room);if(!e)break;if(e.roomId===n.roomId)break;if(t){if(o=e.currentState.getStateEvents(A.a.RoomCreate,""),!o||!o.getContent().predecessor)break;if(o.getContent().predecessor.room_id!==n.roomId)break}r.push(e);if(new Set(r.map(e=>e.roomId)).size<r.length)return r.slice(0,r.length-1);n=e,i=n.currentState.getStateEvents(A.a.RoomTombstone,"")}return r}invite(e,t,n,r){return this.membershipChange(e,t,"invite",r,n)}inviteByEmail(e,t,n){return this.inviteByThreePid(e,"email",t,n)}async inviteByThreePid(e,t,n,r){const o=h.n("/rooms/$roomId/invite",{$roomId:e}),i=this.getIdentityServerUrl(!0);if(!i)return Promise.reject(new E.c({error:"No supplied identity server URL",errcode:"ORG.MATRIX.JSSDK_MISSING_PARAM"}));const a={id_server:i,medium:t,address:n};if(this.identityServer&&this.identityServer.getAccessToken&&await this.doesServerAcceptIdentityAccessToken()){const e=await this.identityServer.getAccessToken();e&&(a.id_access_token=e)}return this.http.authedRequest(r,"POST",o,void 0,a)}leave(e,t){return this.membershipChange(e,void 0,"leave",void 0,t)}leaveRoomChain(e,t=!0){const n=this.getRoomUpgradeHistory(e);let r=n;if(!t){r=[];for(const t of n)if(r.push(t),t.roomId===e)break}const o={},i=[],a=e=>this.leave(e).then(()=>{o[e]=null}).catch(t=>(o[e]=t,null));for(const e of r)i.push(a(e.roomId));return Promise.all(i).then(()=>o)}ban(e,t,n,r){return this.membershipChange(e,t,"ban",n,r)}forget(e,t,n){void 0===t&&(t=!0);const r=this.membershipChange(e,void 0,"forget",void 0,n);return t?r.then(t=>(this.store.removeRoom(e),this.emit("deleteRoom",e),t)):r}unban(e,t,n){const r=h.n("/rooms/$roomId/unban",{$roomId:e}),o={user_id:t};return this.http.authedRequest(n,"POST",r,void 0,o)}kick(e,t,n,r){return this.setMembershipState(e,t,"leave",n,r)}setMembershipState(e,t,n,r,o){h.u(r)&&(o=r,r=void 0);const i=h.n("/rooms/$roomId/state/m.room.member/$userId",{$roomId:e,$userId:t});return this.http.authedRequest(o,"PUT",i,void 0,{membership:n,reason:r})}membershipChange(e,t,n,r,o){h.u(r)&&(o=r,r=void 0);const i=h.n("/rooms/$room_id/$membership",{$room_id:e,$membership:n});return this.http.authedRequest(o,"POST",i,void 0,{user_id:t,reason:r})}getPushActionsForEvent(e){return e.getPushActions()||e.setPushActions(this.pushProcessor.actionsForEvent(e)),e.getPushActions()}setProfileInfo(e,t,n){const r=h.n("/profile/$userId/$info",{$userId:this.credentials.userId,$info:e});return this.http.authedRequest(n,"PUT",r,void 0,t)}async setDisplayName(e,t){const n=await this.setProfileInfo("displayname",{displayname:e},t),r=this.getUser(this.getUserId());return r&&(r.displayName=e,r.emit("User.displayName",r.events.presence,r)),n}async setAvatarUrl(e,t){const n=await this.setProfileInfo("avatar_url",{avatar_url:e},t),r=this.getUser(this.getUserId());return r&&(r.avatarUrl=e,r.emit("User.avatarUrl",r.events.presence,r)),n}mxcUrlToHttp(e,t,n,r,o){return Object(x.a)(this.baseUrl,e,t,n,r,o)}_unstable_setStatusMessage(e){const t="im.vector.user_status";return Promise.all(this.getRooms().map(async n=>{const r="join"===n.getMyMembership(),o=2===n.getInvitedAndJoinedMemberCount();if(!r||!o)return;n.currentState.mayClientSendStateEvent(t,this)&&await this.sendStateEvent(n.roomId,t,{status:e},this.getUserId())})).then()}setPresence(e,t){const n=h.n("/presence/$userId/status",{$userId:this.credentials.userId});"string"==typeof e&&(e={presence:e});if(-1===["offline","online","unavailable"].indexOf(e.presence))throw new Error("Bad presence value: "+e.presence);return this.http.authedRequest(t,"PUT",n,void 0,e)}getPresence(e,t){const n=h.n("/presence/$userId/status",{$userId:e});return this.http.authedRequest(t,"GET",n,void 0,void 0)}scrollback(e,t,n){h.u(t)&&(n=t,t=void 0),t=t||30;let r=0,o=this.ongoingScrollbacks[e.roomId]||{};if(o.promise)return o.promise;if(o.errorTs){const e=Date.now()-o.errorTs;r=Math.max(3e3-e,0)}if(null===e.oldState.paginationToken)return Promise.resolve(e);const i=this.store.scrollback(e,t).length;if(i===t)return Promise.resolve(e);t-=i;const a=new Promise((o,i)=>{Object(h.H)(r).then(()=>this.createMessagesRequest(e.roomId,e.oldState.paginationToken,t,p.a.Backward)).then(t=>{var r;const i=t.chunk.map(this.getEventMapper());if(t.state){const n=t.state.map(this.getEventMapper());e.currentState.setUnknownStateEvents(n)}e.addEventsToTimeline(i,!0,e.getLiveTimeline()),e.oldState.paginationToken=t.end,0===t.chunk.length&&(e.oldState.paginationToken=null),this.store.storeEvents(e,i,t.end,!0),this.ongoingScrollbacks[e.roomId]=null,null===(r=n)||void 0===r||r(null,e),o(e)}).catch(t=>{var r;this.ongoingScrollbacks[e.roomId]={errorTs:Date.now()},null===(r=n)||void 0===r||r(t),i(t)})});return o={promise:a,errorTs:null},this.ongoingScrollbacks[e.roomId]=o,a}getEventMapper(e){return Object(M.a)(this,e||{})}getEventTimeline(e,t){if(!this.timelineSupport)throw new Error("timeline support is disabled. Set the 'timelineSupport' parameter to true when creating MatrixClient to enable it.");if(e.getTimelineForEvent(t))return Promise.resolve(e.getTimelineForEvent(t));const n=h.n("/rooms/$roomId/context/$eventId",{$roomId:e.room.roomId,$eventId:t});let r=void 0;this.clientOpts.lazyLoadMembers&&(r={filter:JSON.stringify(u.a.LAZY_LOADING_MESSAGES_FILTER)});return this.http.authedRequest(void 0,"GET",n,r).then(n=>{if(!n.event)throw new Error("'event' not in '/context' result - homeserver too old?");if(e.getTimelineForEvent(t))return e.getTimelineForEvent(t);n.events_after.reverse();const r=n.events_after.concat([n.event]).concat(n.events_before).map(this.getEventMapper());let o=e.getTimelineForEvent(r[0].getId());if(o){const e=n.state.map(this.getEventMapper());o.getState(p.b.BACKWARDS).setUnknownStateEvents(e)}else o=e.addTimeline(),o.initialiseState(n.state.map(this.getEventMapper())),o.getState(p.b.FORWARDS).paginationToken=n.end;return e.addEventsToTimeline(r,!0,o,n.start),e.getTimelineForEvent(t)||o})}createMessagesRequest(e,t,n,r,o){const i=h.n("/rooms/$roomId/messages",{$roomId:e});void 0===n&&(n=30);const a={from:t,limit:n,dir:r};let s=null;var c;(this.clientOpts.lazyLoadMembers&&(s=Object.assign({},u.a.LAZY_LOADING_MESSAGES_FILTER)),o)&&(s=s||{},Object.assign(s,null===(c=o.getRoomTimelineFilterComponent())||void 0===c?void 0:c.toJSON()));return s&&(a.filter=JSON.stringify(s)),this.http.authedRequest(void 0,"GET",i,a)}paginateEventTimeline(e,t){const n=e.getTimelineSet()===this.notifTimelineSet,r=(t=t||{}).backwards||!1;if(n&&!r)throw new Error("paginateNotifTimeline can only paginate backwards");const o=r?p.b.BACKWARDS:p.b.FORWARDS,i=e.getPaginationToken(o);if(!i)return Promise.resolve(!1);const a=e.paginationRequests[o];if(a)return a;let s,c,l;if(n)s="/notifications",c={limit:"limit"in t?t.limit:30,only:"highlight"},i&&"end"!==i&&(c.from=i),l=this.http.authedRequest(void 0,"GET","/notifications",c,void 0).then(t=>{const n=t.next_token,i=[];for(let e=0;e<t.notifications.length;e++){const n=t.notifications[e],r=this.getEventMapper()(n.event);r.setPushActions(m.a.actionListToActionsObject(n.actions)),r.event.room_id=n.room_id,i[e]=r}return e.getTimelineSet().addEventsToTimeline(i,r,e,n),r&&!t.next_token&&e.setPaginationToken(null,o),!!t.next_token}).finally(()=>{e.paginationRequests[o]=null}),e.paginationRequests[o]=l;else{if(!this.getRoom(e.getRoomId()))throw new Error("Unknown room "+e.getRoomId());l=this.createMessagesRequest(e.getRoomId(),i,t.limit,o,e.getFilter()),l.then(t=>{if(t.state){const n=e.getState(o),r=t.state.map(this.getEventMapper());n.setUnknownStateEvents(r)}const n=t.end,i=t.chunk.map(this.getEventMapper());return e.getTimelineSet().addEventsToTimeline(i,r,e,n),r&&t.end==t.start&&e.setPaginationToken(null,o),t.end!=t.start}).finally(()=>{e.paginationRequests[o]=null}),e.paginationRequests[o]=l}return l}resetNotifTimelineSet(){this.notifTimelineSet&&this.notifTimelineSet.resetLiveTimeline("end",null)}peekInRoom(e){return this.peekSync&&this.peekSync.stopPeeking(),this.peekSync=new a.a(this,this.clientOpts),this.peekSync.peek(e)}stopPeeking(){this.peekSync&&(this.peekSync.stopPeeking(),this.peekSync=null)}setGuestAccess(e,t){const n=this.sendStateEvent(e,A.a.RoomGuestAccess,{guest_access:t.allowJoin?"can_join":"forbidden"},"");let r=Promise.resolve(void 0);return t.allowRead&&(r=this.sendStateEvent(e,A.a.RoomHistoryVisibility,{history_visibility:"world_readable"},"")),Promise.all([r,n]).then()}requestRegisterEmailToken(e,t,n,r){return this.requestTokenFromEndpoint("/register/email/requestToken",{email:e,client_secret:t,send_attempt:n,next_link:r})}requestRegisterMsisdnToken(e,t,n,r,o){return this.requestTokenFromEndpoint("/register/msisdn/requestToken",{country:e,phone_number:t,client_secret:n,send_attempt:r,next_link:o})}requestAdd3pidEmailToken(e,t,n,r){return this.requestTokenFromEndpoint("/account/3pid/email/requestToken",{email:e,client_secret:t,send_attempt:n,next_link:r})}requestAdd3pidMsisdnToken(e,t,n,r,o){return this.requestTokenFromEndpoint("/account/3pid/msisdn/requestToken",{country:e,phone_number:t,client_secret:n,send_attempt:r,next_link:o})}requestPasswordEmailToken(e,t,n,r){return this.requestTokenFromEndpoint("/account/password/email/requestToken",{email:e,client_secret:t,send_attempt:n,next_link:r})}requestPasswordMsisdnToken(e,t,n,r,o){return this.requestTokenFromEndpoint("/account/password/msisdn/requestToken",{country:e,phone_number:t,client_secret:n,send_attempt:r,next_link:o})}async requestTokenFromEndpoint(e,t){const n=Object.assign({},t);if(!await this.doesServerSupportSeparateAddAndBind()&&this.idBaseUrl){const e=new URL(this.idBaseUrl);if(n.id_server=e.host,this.identityServer&&this.identityServer.getAccessToken&&await this.doesServerAcceptIdentityAccessToken()){const e=await this.identityServer.getAccessToken();e&&(n.id_access_token=e)}}return this.http.request(void 0,"POST",e,void 0,n)}getRoomPushRule(e,t){if(!this.pushRules)throw new Error("SyncApi.sync() must be done before accessing to push rules.");for(let n=0;n<this.pushRules[e].room.length;n++){const r=this.pushRules[e].room[n];if(r.rule_id===t)return r}}setRoomMutePushRule(e,t,n){let r,o;const i=this.getRoomPushRule(e,t);if(i&&0<=i.actions.indexOf("dont_notify")&&(o=!0),n?i?o||(r=h.l(),this.deletePushRule(e,B.b.RoomSpecific,i.rule_id).then(()=>{this.addPushRule(e,B.b.RoomSpecific,t,{actions:["dont_notify"]}).then(()=>{r.resolve()}).catch(e=>{r.reject(e)})}).catch(e=>{r.reject(e)}),r=r.promise):r=this.addPushRule(e,B.b.RoomSpecific,t,{actions:["dont_notify"]}):o&&(r=this.deletePushRule(e,B.b.RoomSpecific,i.rule_id)),r)return new Promise((e,t)=>{r.then(()=>{this.getPushRules().then(t=>{this.pushRules=t,e()}).catch(e=>{t(e)})}).catch(e=>{this.getPushRules().then(n=>{this.pushRules=n,t(e)}).catch(n=>{t(e)})})})}searchMessageText(e,t){const n={search_term:e.query};return"keys"in e&&(n.keys=e.keys),this.search({body:{search_categories:{room_events:n}}},t)}searchRoomEvents(e){const t={search_categories:{room_events:{search_term:e.term,filter:e.filter,order_by:U.a.Recent,event_context:{before_limit:1,after_limit:1,include_profile:!0}}}},n={_query:t,results:[],highlights:[]};return this.search({body:t}).then(e=>this.processRoomEventsSearch(n,e))}backPaginateRoomEventsSearch(e){if(!e.next_batch)return Promise.reject(new Error("Cannot backpaginate event search any further"));if(e.pendingRequest)return e.pendingRequest;const t={body:e._query,next_batch:e.next_batch},n=this.search(t).then(t=>this.processRoomEventsSearch(e,t)).finally(()=>{e.pendingRequest=null});return e.pendingRequest=n,n}processRoomEventsSearch(e,t){const n=t.search_categories.room_events;e.count=n.count,e.next_batch=n.next_batch;const r={};n.highlights.forEach(e=>{r[e]=1}),e.highlights.forEach(e=>{r[e]=1}),e.highlights=Object.keys(r);const o=n.results?n.results.length:0;for(let t=0;t<o;t++){const r=k.a.fromJson(n.results[t],this.getEventMapper());e.results.push(r)}return e}syncLeftRooms(){if(this.syncedLeftRooms)return Promise.resolve([]);if(this.syncLeftRoomsPromise)return this.syncLeftRoomsPromise;const e=new a.a(this,this.clientOpts);return this.syncLeftRoomsPromise=e.syncLeftRooms(),this.syncLeftRoomsPromise.then(e=>{v.a.log("Marking success of sync left room request"),this.syncedLeftRooms=!0}).finally(()=>{this.syncLeftRoomsPromise=null}),this.syncLeftRoomsPromise}createFilter(e){const t=h.n("/user/$userId/filter",{$userId:this.credentials.userId});return this.http.authedRequest(void 0,"POST",t,void 0,e).then(t=>{const n=u.a.fromJson(this.credentials.userId,t.filter_id,e);return this.store.storeFilter(n),n})}getFilter(e,t,n){if(n){const n=this.store.getFilter(e,t);if(n)return Promise.resolve(n)}const r=h.n("/user/$userId/filter/$filterId",{$userId:e,$filterId:t});return this.http.authedRequest(void 0,"GET",r,void 0,void 0).then(n=>{const r=u.a.fromJson(e,t,n);return this.store.storeFilter(r),r})}async getOrCreateFilter(e,t){const n=this.store.getFilterIdByName(e);let r=void 0;if(n){try{const e=await this.getFilter(this.credentials.userId,n,!0);if(e){const o=e.getDefinition(),i=t.getDefinition();h.i(o,i)&&(r=n)}}catch(e){if("M_UNKNOWN"!==e.errcode&&"M_NOT_FOUND"!==e.errcode)throw e}r||this.store.setFilterIdByName(e,void 0)}if(r)return r;const o=await this.createFilter(t.getDefinition());return this.store.setFilterIdByName(e,o.filterId),o.filterId}getOpenIdToken(){const e=h.n("/user/$userId/openid/request_token",{$userId:this.credentials.userId});return this.http.authedRequest(void 0,"POST",e,void 0,{})}turnServer(e){return this.http.authedRequest(e,"GET","/voip/turnServer")}getTurnServers(){return this.turnServers||[]}getTurnServersExpiry(){return this.turnServersExpiry}async checkTurnServers(){if(!this.canSupportVoip)return;let t=!1;const n=this.turnServersExpiry-Date.now();if(n>6e5)v.a.debug("TURN creds are valid for another "+n+" ms: not fetching new ones."),t=!0;else{v.a.debug("Fetching new TURN credentials");try{const e=await this.turnServer();if(e.uris){v.a.log("Got TURN URIs: "+e.uris+" refresh in "+e.ttl+" secs");const n={urls:e.uris,username:e.username,credential:e.password};this.turnServers=[n],this.turnServersExpiry=Date.now()+1e3*e.ttl,t=!0}}catch(t){v.a.error("Failed to get TURN URIs",t),403===t.httpStatus&&(v.a.info("TURN access unavailable for this account: stopping credentials checks"),null!==this.checkTurnServersIntervalID&&e.clearInterval(this.checkTurnServersIntervalID),this.checkTurnServersIntervalID=null)}}return t}setFallbackICEServerAllowed(e){this.fallbackICEServerAllowed=e}isFallbackICEServerAllowed(){return this.fallbackICEServerAllowed}isSynapseAdministrator(){const e=h.n("/_synapse/admin/v1/users/$userId/admin",{$userId:this.getUserId()});return this.http.authedRequest(void 0,"GET",e,void 0,void 0,{prefix:""}).then(e=>e.admin)}whoisSynapseUser(e){const t=h.n("/_synapse/admin/v1/whois/$userId",{$userId:e});return this.http.authedRequest(void 0,"GET",t,void 0,void 0,{prefix:""})}deactivateSynapseUser(e){const t=h.n("/_synapse/admin/v1/deactivate/$userId",{$userId:e});return this.http.authedRequest(void 0,"POST",t,void 0,void 0,{prefix:""})}async fetchClientWellKnown(){this.clientWellKnownPromise=g.a.getRawClientConfig(this.getDomain()),this.clientWellKnown=await this.clientWellKnownPromise,this.emit("WellKnown.client",this.clientWellKnown)}getClientWellKnown(){return this.clientWellKnown}waitForClientWellKnown(){return this.clientWellKnownPromise}storeClientOptions(){const e=["boolean","string","number"],t=Object.entries(this.clientOpts).filter(([t,n])=>e.includes(typeof n)).reduce((e,[t,n])=>(e[t]=n,e),{});return this.store.storeClientOptions(t)}async _unstable_getSharedRooms(e){if(!await this.doesServerSupportUnstableFeature("uk.half-shot.msc2666"))throw Error("Server does not support shared_rooms API");const t=h.n("/uk.half-shot.msc2666/user/shared_rooms/$userId",{$userId:e});return(await this.http.authedRequest(void 0,"GET",t,void 0,void 0,{prefix:E.i})).joined}getVersions(){return this.serverVersionsPromise||(this.serverVersionsPromise=this.http.request(void 0,"GET","/_matrix/client/versions",void 0,void 0,{prefix:""}).catch(e=>{throw this.serverVersionsPromise=null,e})),this.serverVersionsPromise}async isVersionSupported(e){const{versions:t}=await this.getVersions();return t&&t.includes(e)}async doesServerSupportLazyLoading(){const e=await this.getVersions();if(!e)return!1;const t=e.versions,n=e.unstable_features;return t&&t.includes("r0.5.0")||n&&n["m.lazy_load_members"]}async doesServerRequireIdServerParam(){const e=await this.getVersions();if(!e)return!0;const t=e.versions;if(t&&t.includes("r0.6.0"))return!1;const n=e.unstable_features;return!n||(void 0===n["m.require_identity_server"]||n["m.require_identity_server"])}async doesServerAcceptIdentityAccessToken(){const e=await this.getVersions();if(!e)return!1;const t=e.versions,n=e.unstable_features;return t&&t.includes("r0.6.0")||n&&n["m.id_access_token"]}async doesServerSupportSeparateAddAndBind(){const e=await this.getVersions();if(!e)return!1;const t=e.versions,n=e.unstable_features;return t&&t.includes("r0.6.0")||n&&n["m.separate_add_and_bind"]}async doesServerSupportUnstableFeature(e){const t=await this.getVersions();if(!t)return!1;const n=t.unstable_features;return n&&!!n[e]}async doesServerForceEncryptionForPreset(e){const t=await this.getVersions();if(!t)return!1;const n=t.unstable_features,r=e.includes("_chat")?e.substring(0,e.indexOf("_chat")):e;return n&&!!n["io.element.e2ee_forced."+r]}hasLazyLoadMembersEnabled(){return!!this.clientOpts.lazyLoadMembers}setCanResetTimelineCallback(e){this.canResetTimelineCallback=e}getCanResetTimelineCallback(){return this.canResetTimelineCallback}async relations(e,t,n,r,o){const i=this.getEncryptedIfNeededEventType(e,r),a=await this.fetchRelations(e,t,n,i,o),s=this.getEventMapper();let c;a.original_event&&(c=s(a.original_event));let l=a.chunk.map(s);if(i===A.a.RoomMessageEncrypted){const e=c?l.concat(c):l;await Promise.all(e.map(e=>new Promise(t=>e.once("Event.decrypted",t)))),l=l.filter(e=>e.getType()===r)}return c&&n===A.c.Replace&&(l=l.filter(e=>e.getSender()===c.getSender())),{originalEvent:c,events:l,nextBatch:a.next_batch}}getCrossSigningCacheCallbacks(){var e;return null===(e=this.crypto)||void 0===e?void 0:e.crossSigningInfo.getCacheCallbacks()}generateClientSecret(){return Object(P.b)(32)}decryptEventIfNeeded(e,t){return e.shouldAttemptDecryption()&&e.attemptDecryption(this.crypto,t),e.isBeingDecrypted()?e.getDecryptionPromise():Promise.resolve()}termsUrlForService(e,t){switch(e){case y.a.IS:return t+E.f+"/terms";case y.a.IM:return t+"/_matrix/integrations/v1/terms";default:throw new Error("Unsupported service type")}}getHomeserverUrl(){return this.baseUrl}getIdentityServerUrl(e=!1){return e&&(this.idBaseUrl.startsWith("http://")||this.idBaseUrl.startsWith("https://"))?this.idBaseUrl.split("://")[1]:this.idBaseUrl}setIdentityServerUrl(e){this.idBaseUrl=h.o(e),this.http.setIdBaseUrl(this.idBaseUrl)}getAccessToken(){return this.http.opts.accessToken||null}isLoggedIn(){return void 0!==this.http.opts.accessToken}makeTxnId(){return"m"+(new Date).getTime()+"."+this.txnCtr++}isUsernameAvailable(e){return this.http.authedRequest(void 0,"GET","/register/available",{username:e}).then(e=>e.available)}register(e,t,n,r,o,i,a,s){!0===o?o={email:!0}:null==o&&(o={}),"function"==typeof a&&(s=a,a=void 0),n&&(r.session=n);const c={auth:r};return null!=e&&(c.username=e),null!=t&&(c.password=t),o.email&&(c.bind_email=!0),o.msisdn&&(c.bind_msisdn=!0),null!=i&&(c.guest_access_token=i),null!=a&&(c.inhibit_login=a),null!=t&&(c.x_show_msisdn=!0),this.registerRequest(c,void 0,s)}registerGuest(e,t){return(e=e||{}).body=e.body||{},this.registerRequest(e.body,"guest",t)}registerRequest(e,t,n){const r={};return t&&(r.kind=t),this.http.request(n,"POST","/register",r,e)}loginFlows(e){return this.http.request(e,"GET","/login")}login(e,t,n){const r={type:e};return h.q(r,t),this.http.authedRequest((e,t)=>{t&&t.access_token&&t.user_id&&(this.http.opts.accessToken=t.access_token,this.credentials={userId:t.user_id}),n&&n(e,t)},"POST","/login",void 0,r)}loginWithPassword(e,t,n){return this.login("m.login.password",{user:e,password:t},n)}loginWithSAML2(e,t){return this.login("m.login.saml2",{relay_state:e},t)}getCasLoginUrl(e){return this.getSsoLoginUrl(e,"cas")}getSsoLoginUrl(e,t="sso",n){let r="/login/"+t+"/redirect";return n&&(r+="/"+n),this.http.getUrl(r,{redirectUrl:e},E.h)}loginWithToken(e,t){return this.login("m.login.token",{token:e},t)}logout(e){return this.http.authedRequest(e,"POST","/logout")}deactivateAccount(e,t){if("function"==typeof t)throw new Error("deactivateAccount no longer accepts a callback parameter");const n={};return e&&(n.auth=e),void 0!==t&&(n.erase=t),this.http.authedRequest(void 0,"POST","/account/deactivate",void 0,n)}getFallbackAuthUrl(e,t){const n=h.n("/auth/$loginType/fallback/web",{$loginType:e});return this.http.getUrl(n,{session:t},E.h)}async createRoom(e,t){const n=(e.invite_3pid||[]).filter(e=>!e.id_access_token);if(n.length>0&&this.identityServer&&this.identityServer.getAccessToken&&await this.doesServerAcceptIdentityAccessToken()){const e=await this.identityServer.getAccessToken();if(e)for(const t of n)t.id_access_token=e}return this.http.authedRequest(t,"POST","/createRoom",void 0,e)}async fetchRelations(e,t,n,r,o){const i={};o.from&&(i.from=o.from);const a=h.m(i),s=h.n("/rooms/$roomId/relations/$eventId/$relationType/$eventType?"+a,{$roomId:e,$eventId:t,$relationType:n,$eventType:r});return await this.http.authedRequest(void 0,"GET",s,null,null,{prefix:E.i})}roomState(e,t){const n=h.n("/rooms/$roomId/state",{$roomId:e});return this.http.authedRequest(t,"GET",n)}fetchRoomEvent(e,t,n){const r=h.n("/rooms/$roomId/event/$eventId",{$roomId:e,$eventId:t});return this.http.authedRequest(n,"GET",r)}members(e,t,n,r,o){const i={};t&&(i.membership=t),n&&(i.not_membership=n),r&&(i.at=r);const a=h.m(i),s=h.n("/rooms/$roomId/members?"+a,{$roomId:e});return this.http.authedRequest(o,"GET",s)}upgradeRoom(e,t){const n=h.n("/rooms/$roomId/upgrade",{$roomId:e});return this.http.authedRequest(void 0,"POST",n,void 0,{new_version:t})}getStateEvent(e,t,n,r){const o={$roomId:e,$eventType:t,$stateKey:n};let i=h.n("/rooms/$roomId/state/$eventType",o);return void 0!==n&&(i=h.n(i+"/$stateKey",o)),this.http.authedRequest(r,"GET",i)}sendStateEvent(e,t,n,r="",o){const i={$roomId:e,$eventType:t,$stateKey:r};let a=h.n("/rooms/$roomId/state/$eventType",i);return void 0!==r&&(a=h.n(a+"/$stateKey",i)),this.http.authedRequest(o,"PUT",a,void 0,n)}roomInitialSync(e,t,n){h.u(t)&&(n=t,t=void 0);const r=h.n("/rooms/$roomId/initialSync",{$roomId:e});return t||(t=30),this.http.authedRequest(n,"GET",r,{limit:t})}setRoomReadMarkersHttpRequest(e,t,n,r){const o=h.n("/rooms/$roomId/read_markers",{$roomId:e}),i={"m.fully_read":t,"m.read":n,"org.matrix.msc2285.hidden":Boolean(!!r&&r.hidden)};return this.http.authedRequest(void 0,"POST",o,void 0,i)}getJoinedRooms(){const e=h.n("/joined_rooms",{});return this.http.authedRequest(void 0,"GET",e)}getJoinedRoomMembers(e){const t=h.n("/rooms/$roomId/joined_members",{$roomId:e});return this.http.authedRequest(void 0,"GET",t)}publicRooms(e,t){"function"==typeof e&&(t=e,e={}),void 0===e&&(e={});const n={};return e.server&&(n.server=e.server,delete e.server),0===Object.keys(e).length&&0===Object.keys(n).length?this.http.authedRequest(t,"GET","/publicRooms"):this.http.authedRequest(t,"POST","/publicRooms",n,e)}createAlias(e,t,n){const r=h.n("/directory/room/$alias",{$alias:e}),o={room_id:t};return this.http.authedRequest(n,"PUT",r,void 0,o)}deleteAlias(e,t){const n=h.n("/directory/room/$alias",{$alias:e});return this.http.authedRequest(t,"DELETE",n,void 0,void 0)}unstableGetLocalAliases(e,t){const n=h.n("/rooms/$roomId/aliases",{$roomId:e}),r=E.i+"/org.matrix.msc2432";return this.http.authedRequest(t,"GET",n,null,null,{prefix:r})}getRoomIdForAlias(e,t){const n=h.n("/directory/room/$alias",{$alias:e});return this.http.authedRequest(t,"GET",n)}resolveRoomAlias(e,t){const n=h.n("/directory/room/$alias",{$alias:e});return this.http.request(t,"GET",n)}getRoomDirectoryVisibility(e,t){const n=h.n("/directory/list/room/$roomId",{$roomId:e});return this.http.authedRequest(t,"GET",n)}setRoomDirectoryVisibility(e,t,n){const r=h.n("/directory/list/room/$roomId",{$roomId:e});return this.http.authedRequest(n,"PUT",r,void 0,{visibility:t})}setRoomDirectoryVisibilityAppService(e,t,n,r){const o=h.n("/directory/list/appservice/$networkId/$roomId",{$networkId:e,$roomId:t});return this.http.authedRequest(r,"PUT",o,void 0,{visibility:n})}searchUserDirectory(e){const t={search_term:e.term};return void 0!==e.limit&&(t.limit=e.limit),this.http.authedRequest(void 0,"POST","/user_directory/search",void 0,t)}uploadContent(e,t){return this.http.uploadContent(e,t)}cancelUpload(e){return this.http.cancelUpload(e)}getCurrentUploads(){return this.http.getCurrentUploads()}getProfileInfo(e,t,n){h.u(t)&&(n=t,t=void 0);const r=t?h.n("/profile/$userId/$info",{$userId:e,$info:t}):h.n("/profile/$userId",{$userId:e});return this.http.authedRequest(n,"GET",r)}getThreePids(e){return this.http.authedRequest(e,"GET","/account/3pid",void 0,void 0)}addThreePid(e,t,n){const r={threePidCreds:e,bind:t};return this.http.authedRequest(n,"POST","/account/3pid",null,r)}async addThreePidOnly(e){const t=await this.isVersionSupported("r0.6.0")?E.h:E.i;return this.http.authedRequest(void 0,"POST","/account/3pid/add",null,e,{prefix:t})}async bindThreePid(e){const t=await this.isVersionSupported("r0.6.0")?E.h:E.i;return this.http.authedRequest(void 0,"POST","/account/3pid/bind",null,e,{prefix:t})}async unbindThreePid(e,t){const n={medium:e,address:t,id_server:this.getIdentityServerUrl(!0)},r=await this.isVersionSupported("r0.6.0")?E.h:E.i;return this.http.authedRequest(void 0,"POST","/account/3pid/unbind",null,n,{prefix:r})}deleteThreePid(e,t){return this.http.authedRequest(void 0,"POST","/account/3pid/delete",null,{medium:e,address:t})}setPassword(e,t,n){const r={auth:e,new_password:t};return this.http.authedRequest(n,"POST","/account/password",null,r)}getDevices(){return this.http.authedRequest(void 0,"GET","/devices",void 0,void 0)}getDevice(e){const t=h.n("/devices/$device_id",{$device_id:e});return this.http.authedRequest(void 0,"GET",t,void 0,void 0)}setDeviceDetails(e,t){const n=h.n("/devices/$device_id",{$device_id:e});return this.http.authedRequest(void 0,"PUT",n,void 0,t)}deleteDevice(e,t){const n=h.n("/devices/$device_id",{$device_id:e}),r={};return t&&(r.auth=t),this.http.authedRequest(void 0,"DELETE",n,void 0,r)}deleteMultipleDevices(e,t){const n={devices:e};t&&(n.auth=t);return this.http.authedRequest(void 0,"POST","/delete_devices",void 0,n)}getPushers(e){return this.http.authedRequest(e,"GET","/pushers",void 0,void 0)}setPusher(e,t){return this.http.authedRequest(t,"POST","/pushers/set",null,e)}getPushRules(e){return this.http.authedRequest(e,"GET","/pushrules/").then(e=>m.a.rewriteDefaultRules(e))}addPushRule(e,t,n,r,o){const i=h.n("/pushrules/"+e+"/$kind/$ruleId",{$kind:t,$ruleId:n});return this.http.authedRequest(o,"PUT",i,void 0,r)}deletePushRule(e,t,n,r){const o=h.n("/pushrules/"+e+"/$kind/$ruleId",{$kind:t,$ruleId:n});return this.http.authedRequest(r,"DELETE",o)}setPushRuleEnabled(e,t,n,r,o){const i=h.n("/pushrules/"+e+"/$kind/$ruleId/enabled",{$kind:t,$ruleId:n});return this.http.authedRequest(o,"PUT",i,void 0,{enabled:r})}setPushRuleActions(e,t,n,r,o){const i=h.n("/pushrules/"+e+"/$kind/$ruleId/actions",{$kind:t,$ruleId:n});return this.http.authedRequest(o,"PUT",i,void 0,{actions:r})}search(e,t){const n={};return e.next_batch&&(n.next_batch=e.next_batch),this.http.authedRequest(t,"POST","/search",n,e.body)}uploadKeysRequest(e,t,n){return this.http.authedRequest(n,"POST","/keys/upload",void 0,e)}uploadKeySignatures(e){return this.http.authedRequest(void 0,"POST","/keys/signatures/upload",void 0,e,{prefix:E.i})}downloadKeysForUsers(e,t){if(h.u(t))throw new Error("downloadKeysForUsers no longer accepts a callback parameter");const n={device_keys:{}};return"token"in(t=t||{})&&(n.token=t.token),e.forEach(e=>{n.device_keys[e]=[]}),this.http.authedRequest(void 0,"POST","/keys/query",void 0,n)}claimOneTimeKeys(e,t="signed_curve25519",n){const r={};void 0===t&&(t="signed_curve25519");for(let n=0;n<e.length;++n){const o=e[n][0],i=e[n][1],a=r[o]||{};r[o]=a,a[i]=t}const o={one_time_keys:r};n&&(o.timeout=n);return this.http.authedRequest(void 0,"POST","/keys/claim",void 0,o)}getKeyChanges(e,t){const n={from:e,to:t};return this.http.authedRequest(void 0,"GET","/keys/changes",n,void 0)}uploadDeviceSigningKeys(e,t){const n=Object.assign({},t);return e&&Object.assign(n,{auth:e}),this.http.authedRequest(void 0,"POST","/keys/device_signing/upload",void 0,n,{prefix:E.i})}registerWithIdentityServer(e){if(!this.idBaseUrl)throw new Error("No identity server base URL set");const t=this.idBaseUrl+E.f+"/account/register";return this.http.requestOtherUrl(void 0,"POST",t,null,e)}async requestEmailToken(e,t,n,r,o,i){const a={client_secret:t,email:e,send_attempt:n,next_link:r};return await this.http.idServerRequest(o,"POST","/validate/email/requestToken",a,E.f,i)}async requestMsisdnToken(e,t,n,r,o,i,a){const s={client_secret:n,country:e,phone_number:t,send_attempt:r,next_link:o};return await this.http.idServerRequest(i,"POST","/validate/msisdn/requestToken",s,E.f,a)}async submitMsisdnToken(e,t,n,r){const o={sid:e,client_secret:t,token:n};return await this.http.idServerRequest(void 0,"POST","/validate/msisdn/submitToken",o,E.f,r)}submitMsisdnTokenOtherUrl(e,t,n,r){const o={sid:t,client_secret:n,token:r};return this.http.requestOtherUrl(void 0,"POST",e,void 0,o)}getIdentityHashDetails(e){return this.http.idServerRequest(void 0,"GET","/hash_details",null,E.f,e)}async identityHashedLookup(t,n){const r={},o=await this.getIdentityHashDetails(n);if(!o||!o.lookup_pepper||!o.algorithms)throw new Error("Unsupported identity server: bad response");r.pepper=o.lookup_pepper;const i={};if(o.algorithms.includes("sha256")){const n=new e.Olm.Utility;r.addresses=t.map(e=>{const t=e[0].toLowerCase(),o=e[1].toLowerCase(),a=n.sha256(`${t} ${o} ${r.pepper}`).replace(/\+/g,"-").replace(/\//g,"_");return i[a]=e[0],a}),r.algorithm="sha256"}else{if(!o.algorithms.includes("none"))throw new Error("Unsupported identity server: unknown hash algorithm");r.addresses=t.map(e=>{const t=`${e[0].toLowerCase()} ${e[1].toLowerCase()}`;return i[t]=e[0],t}),r.algorithm="none"}const a=await this.http.idServerRequest(void 0,"POST","/lookup",r,E.f,n);if(!a||!a.mappings)return[];const s=[];for(const e of Object.keys(a.mappings)){const t=a.mappings[e],n=i[e];if(!n)throw new Error("Identity server returned more results than expected");s.push({address:n,mxid:t})}return s}async lookupThreePid(e,t,n,r){const o=(await this.identityHashedLookup([[t,e]],r)).find(e=>e.address===t);if(!o)return n&&n(null,{}),{};const i={address:t,medium:e,mxid:o.mxid};return n&&n(null,i),i}async bulkLookupThreePids(e,t){const n=await this.identityHashedLookup(e.map(e=>[e[1],e[0]]),t),r=[];for(const t of n){const n=e.find(e=>e[1]===t.address);if(!n)throw new Error("Identity sever returned unexpected results");r.push([n[0],t.address,t.mxid])}return{threepids:r}}getIdentityAccount(e){return this.http.idServerRequest(void 0,"GET","/account",void 0,E.f,e)}sendToDevice(e,t,n){const r=h.n("/sendToDevice/$eventType/$txnId",{$eventType:e,$txnId:n||this.makeTxnId()}),o={messages:t},i=Object.keys(t).reduce((e,n)=>(e[n]=Object.keys(t[n]),e),{});return v.a.log("PUT "+r,i),this.http.authedRequest(void 0,"PUT",r,void 0,o)}getThirdpartyProtocols(){return this.http.authedRequest(void 0,"GET","/thirdparty/protocols",void 0,void 0).then(e=>{if(!e||"object"!=typeof e)throw new Error("/thirdparty/protocols did not return an object: "+e);return e})}getThirdpartyLocation(e,t){const n=h.n("/thirdparty/location/$protocol",{$protocol:e});return this.http.authedRequest(void 0,"GET",n,t,void 0)}getThirdpartyUser(e,t){const n=h.n("/thirdparty/user/$protocol",{$protocol:e});return this.http.authedRequest(void 0,"GET",n,t,void 0)}getTerms(e,t){const n=this.termsUrlForService(e,t);return this.http.requestOtherUrl(void 0,"GET",n)}agreeToTerms(e,t,n,r){const o=this.termsUrlForService(e,t),i={Authorization:"Bearer "+n};return this.http.requestOtherUrl(void 0,"POST",o,null,{user_accepts:r},{headers:i})}reportEvent(e,t,n,r){const o=h.n("/rooms/$roomId/report/$eventId",{$roomId:e,$eventId:t});return this.http.authedRequest(void 0,"POST",o,null,{score:n,reason:r})}getSpaceSummary(e,t,n,r,o,i){const a=h.n("/rooms/$roomId/spaces",{$roomId:e});return this.http.authedRequest(void 0,"POST",a,null,{max_rooms_per_space:t,suggested_only:n,auto_join_only:r,limit:o,batch:i},{prefix:"/_matrix/client/unstable/org.matrix.msc2946"})}async unstableCreateFileTree(e){const{room_id:t}=await this.createRoom({name:e,preset:N.d.PrivateChat,power_level_content_override:V(V({},j.a),{},{users:{[this.getUserId()]:100}}),creation_content:{[A.d]:A.e.Space},initial_state:[{type:A.h.name,state_key:A.k.name,content:{[A.g.name]:!0}},{type:A.a.RoomEncryption,state_key:"",content:{algorithm:f.MEGOLM_ALGORITHM}}]});return new j.b(this,t)}unstableGetFileTreeSpace(e){var t,n;const r=this.getRoom(e);if(!r)return null;const o=r.currentState.getStateEvents(A.a.RoomCreate,""),i=r.currentState.getStateEvents(A.h.name,A.k.name);if(!o)throw new Error("Expected single room create event");return null!=i&&null!==(t=i.getContent())&&void 0!==t&&t[A.g.name]?(null===(n=o.getContent())||void 0===n?void 0:n[A.d])!==A.e.Space?null:new j.b(this,e):null}getGroupSummary(e){const t=h.n("/groups/$groupId/summary",{$groupId:e});return this.http.authedRequest(void 0,"GET",t)}getGroupProfile(e){const t=h.n("/groups/$groupId/profile",{$groupId:e});return this.http.authedRequest(void 0,"GET",t)}setGroupProfile(e,t){const n=h.n("/groups/$groupId/profile",{$groupId:e});return this.http.authedRequest(void 0,"POST",n,void 0,t)}setGroupJoinPolicy(e,t){const n=h.n("/groups/$groupId/settings/m.join_policy",{$groupId:e});return this.http.authedRequest(void 0,"PUT",n,void 0,{"m.join_policy":t})}getGroupUsers(e){const t=h.n("/groups/$groupId/users",{$groupId:e});return this.http.authedRequest(void 0,"GET",t)}getGroupInvitedUsers(e){const t=h.n("/groups/$groupId/invited_users",{$groupId:e});return this.http.authedRequest(void 0,"GET",t)}getGroupRooms(e){const t=h.n("/groups/$groupId/rooms",{$groupId:e});return this.http.authedRequest(void 0,"GET",t)}inviteUserToGroup(e,t){const n=h.n("/groups/$groupId/admin/users/invite/$userId",{$groupId:e,$userId:t});return this.http.authedRequest(void 0,"PUT",n,void 0,{})}removeUserFromGroup(e,t){const n=h.n("/groups/$groupId/admin/users/remove/$userId",{$groupId:e,$userId:t});return this.http.authedRequest(void 0,"PUT",n,void 0,{})}addUserToGroupSummary(e,t,n){const r=h.n(n?"/groups/$groupId/summary/$roleId/users/$userId":"/groups/$groupId/summary/users/$userId",{$groupId:e,$roleId:n,$userId:t});return this.http.authedRequest(void 0,"PUT",r,void 0,{})}removeUserFromGroupSummary(e,t){const n=h.n("/groups/$groupId/summary/users/$userId",{$groupId:e,$userId:t});return this.http.authedRequest(void 0,"DELETE",n,void 0,{})}addRoomToGroupSummary(e,t,n){const r=h.n(n?"/groups/$groupId/summary/$categoryId/rooms/$roomId":"/groups/$groupId/summary/rooms/$roomId",{$groupId:e,$categoryId:n,$roomId:t});return this.http.authedRequest(void 0,"PUT",r,void 0,{})}removeRoomFromGroupSummary(e,t){const n=h.n("/groups/$groupId/summary/rooms/$roomId",{$groupId:e,$roomId:t});return this.http.authedRequest(void 0,"DELETE",n,void 0,{})}addRoomToGroup(e,t,n){void 0===n&&(n=!0);const r=h.n("/groups/$groupId/admin/rooms/$roomId",{$groupId:e,$roomId:t});return this.http.authedRequest(void 0,"PUT",r,void 0,{"m.visibility":{type:n?"public":"private"}})}updateGroupRoomVisibility(e,t,n){const r=h.n("/groups/$groupId/admin/rooms/$roomId/config/m.visibility",{$groupId:e,$roomId:t});return this.http.authedRequest(void 0,"PUT",r,void 0,{type:n?"public":"private"})}removeRoomFromGroup(e,t){const n=h.n("/groups/$groupId/admin/rooms/$roomId",{$groupId:e,$roomId:t});return this.http.authedRequest(void 0,"DELETE",n,void 0,{})}acceptGroupInvite(e,t=null){const n=h.n("/groups/$groupId/self/accept_invite",{$groupId:e});return this.http.authedRequest(void 0,"PUT",n,void 0,t||{})}joinGroup(e){const t=h.n("/groups/$groupId/self/join",{$groupId:e});return this.http.authedRequest(void 0,"PUT",t,void 0,{})}leaveGroup(e){const t=h.n("/groups/$groupId/self/leave",{$groupId:e});return this.http.authedRequest(void 0,"PUT",t,void 0,{})}getJoinedGroups(){const e=h.n("/joined_groups",{});return this.http.authedRequest(void 0,"GET",e)}createGroup(e){const t=h.n("/create_group",{});return this.http.authedRequest(void 0,"POST",t,void 0,e)}getPublicisedGroups(e){const t=h.n("/publicised_groups",{});return this.http.authedRequest(void 0,"POST",t,void 0,{user_ids:e})}setGroupPublicity(e,t){const n=h.n("/groups/$groupId/self/update_publicity",{$groupId:e});return this.http.authedRequest(void 0,"PUT",n,void 0,{publicise:t})}}o()(K,"RESTORE_BACKUP_ERROR_BAD_KEY","RESTORE_BACKUP_ERROR_BAD_KEY")}).call(this,n(23))},function(e,t,n){"use strict";var r=n(919),o=n(920);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=v(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(l),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(921);function v(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",l=e.split(s);l[0]=l[0].replace(/\\/g,"/");var v=e=l.join(s);if(v=v.trim(),!n&&1===e.split("#").length){var y=c.exec(v);if(y)return this.path=v,this.href=v,this.pathname=y[1],y[2]?(this.search=y[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var E=a.exec(v);if(E){var S=(E=E[0]).toLowerCase();this.protocol=S,v=v.substr(E.length)}if(n||E||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===v.substr(0,2);!w||E&&f[E]||(v=v.substr(2),this.slashes=!0)}if(!f[E]&&(w||E&&!_[E])){for(var C,T,x=-1,k=0;k<h.length;k++){-1!==(F=v.indexOf(h[k]))&&(-1===x||F<x)&&(x=F)}-1!==(T=-1===x?v.lastIndexOf("@"):v.lastIndexOf("@",x))&&(C=v.slice(0,T),v=v.slice(T+1),this.auth=decodeURIComponent(C)),x=-1;for(k=0;k<d.length;k++){var F;-1!==(F=v.indexOf(d[k]))&&(-1===x||F<x)&&(x=F)}-1===x&&(x=v.length),this.host=v.slice(0,x),v=v.slice(x),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var R=this.hostname.split(/\./),D=(k=0,R.length);k<D;k++){var I=R[k];if(I&&!I.match(p)){for(var A="",N=0,M=I.length;N<M;N++)I.charCodeAt(N)>127?A+="x":A+=I[N];if(!A.match(p)){var P=R.slice(0,k),L=R.slice(k+1),j=I.match(m);j&&(P.push(j[1]),L.unshift(j[2])),L.length&&(v="/"+L.join(".")+v),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+U,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!g[S])for(k=0,D=u.length;k<D;k++){var G=u[k];if(-1!==v.indexOf(G)){var V=encodeURIComponent(G);V===G&&(V=escape(G)),v=v.split(G).join(V)}}var q=v.indexOf("#");-1!==q&&(this.hash=v.substr(q),v=v.slice(0,q));var H=v.indexOf("?");if(-1!==H?(this.search=v.substr(H),this.query=v.substr(H+1),t&&(this.query=b.parse(this.query)),v=v.slice(0,H)):t&&(this.search="",this.query={}),v&&(this.pathname=v),_[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var z=this.search||"";this.path=U+z}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=b.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||_[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),l=0;l<c.length;l++){var u=c[l];"protocol"!==u&&(n[u]=e[u])}return _[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!_[e.protocol]){for(var d=Object.keys(e),h=0;h<d.length;h++){var p=d[h];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||f[e.protocol])n.pathname=e.pathname;else{for(var m=(e.pathname||"").split("/");m.length&&!(e.host=m.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==m[0]&&m.unshift(""),m.length<2&&m.unshift(""),n.pathname=m.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||"",b=n.search||"";n.path=g+b}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),E=y||v||n.host&&e.pathname,S=E,w=n.pathname&&n.pathname.split("/")||[],C=(m=e.pathname&&e.pathname.split("/")||[],n.protocol&&!_[n.protocol]);if(C&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===m[0]?m[0]=e.host:m.unshift(e.host)),e.host=null),E=E&&(""===m[0]||""===w[0])),y)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=m;else if(m.length)w||(w=[]),w.pop(),w=w.concat(m),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(C)n.hostname=n.host=w.shift(),(O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=w.slice(-1)[0],x=(n.host||e.host||w.length>1)&&("."===T||".."===T)||""===T,k=0,F=w.length;F>=0;F--)"."===(T=w[F])?w.splice(F,1):".."===T?(w.splice(F,1),k++):k&&(w.splice(F,1),k--);if(!E&&!S)for(;k--;k)w.unshift("..");!E||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),x&&"/"!==w.join("/").substr(-1)&&w.push("");var O,R=""===w[0]||w[0]&&"/"===w[0].charAt(0);C&&(n.hostname=n.host=R?"":w.length?w.shift():"",(O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift()));return(E=E||n.host&&w.length)&&!R&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r=n(534).default;function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var c=a?Object.getOwnPropertyDescriptor(e,s):null;c&&(c.get||c.set)?Object.defineProperty(i,s,c):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"e",(function(){return h})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return g}));var r=n(82),o=n(80),i=n(87),a=n(105),s=n(78),c=n.n(s),l=n(83),u=n(126);let d;function h(e){const t={[d.Invite]:[],[d.Join]:[],[d.Leave]:[]};for(const n of e)t[p(n.getMyMembership())].push(n);return t}function p(e){return"invite"===e?d.Invite:"join"===e?d.Join:d.Leave}function m(e){const t=p(e);return t===d.Join||t===d.Invite}async function g(e){let t=!0;const n=await r.a.get().getRoomUpgradeHistory(e);if(n&&n.length>0){n[n.length-1].roomId!==e&&(t=!1)}let s={};if(t)s=await r.a.get().leaveRoomChain(e);else try{await r.a.get().leave(e)}catch(t){if(t&&t.data&&t.data.errcode){const n=t.data.error||Object(o.a)("Unexpected server error trying to leave the room");s[e]=Object.assign(new Error(n),{errcode:t.data.errcode})}else s[e]=t||new Error("Failed to leave room for unknown causes")}const d=Object.entries(s).filter(e=>!!e[1]);if(d.length>0){const t=[];for(const n of d){const r=n[1];let l=Object(o.a)("Unexpected server error trying to leave the room");if(r.errcode&&r.message){if("M_CANNOT_LEAVE_SERVER_NOTICE_ROOM"===r.errcode)return void i.a.createTrackedDialog("Error Leaving Room","",a.a,{title:Object(o.a)("Can't leave Server Notices room"),description:Object(o.a)("This room is used for important messages from the Homeserver, so you cannot leave it.")});l=s[e].message}t.push(l,c.a.createElement("BR"))}i.a.createTrackedDialog("Error Leaving Room","",a.a,{title:Object(o.a)("Error leaving room"),description:t})}else u.a.getRoomId()===e&&l.a.dispatch({action:"view_home_page"})}!function(e){e.Join="JOIN",e.Invite="INVITE",e.Leave="LEAVE"}(d||(d={}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return _})),n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return v})),n.d(t,"d",(function(){return y}));var r=n(79),o=n.n(r),i=n(84),a=n(212),s=n(155),c=n(211),l=n(83),u=n(532),d=n(98),h=n(109),p=n(115),m=n(130);function g(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}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const _="io.element.widgets.layout";let b;!function(e){e.Top="top",e.Right="right"}(b||(b={}));const v=3;class y extends u.a{constructor(){super(l.a),o()(this,"byRoom",{}),o()(this,"pinnedRef",void 0),o()(this,"layoutRef",void 0),o()(this,"updateAllRooms",()=>{this.byRoom={};for(const e of this.matrixClient.getVisibleRooms())this.recalculateRoom(e)}),o()(this,"updateFromWidgetStore",e=>{if(e){const t=this.matrixClient.getRoom(e);t&&this.recalculateRoom(t)}else this.updateAllRooms()}),o()(this,"updateRoomFromState",e=>{if(e.getType()!==_)return;const t=this.matrixClient.getRoom(e.getRoomId());t&&this.recalculateRoom(t)}),o()(this,"updateFromSettings",(e,t)=>{if(t){const e=this.matrixClient.getRoom(t);e&&this.recalculateRoom(e)}else this.updateAllRooms()})}static get instance(){return y.internalInstance||(y.internalInstance=new y),y.internalInstance}static emissionForRoom(e){return"update_"+e.roomId}emitFor(e){this.emit(y.emissionForRoom(e))}async onReady(){this.updateAllRooms(),this.matrixClient.on("RoomState.events",this.updateRoomFromState),this.pinnedRef=i.b.watchSetting("Widgets.pinned",null,this.updateFromSettings),this.layoutRef=i.b.watchSetting("Widgets.layout",null,this.updateFromSettings),a.a.instance.on(p.b,this.updateFromWidgetStore)}async onNotReady(){this.byRoom={},i.b.unwatchSetting(this.pinnedRef),i.b.unwatchSetting(this.layoutRef),a.a.instance.off(p.b,this.updateFromWidgetStore)}recalculateRoom(e){const t=a.a.instance.getApps(e.roomId);if(null==t||!t.length)return this.byRoom[e.roomId]={},void this.emitFor(e);const n=JSON.stringify(this.byRoom[e.roomId]),r=e.currentState.getStateEvents(_,""),o=i.b.getValue("Widgets.pinned",e.roomId);let l=i.b.getValue("Widgets.layout",e.roomId);r&&l&&l.overrides!==r.getId()&&(l=null);const u=r?r.getContent():null,d=[],h=[];for(const e of t){var p,g,f,y,E;const t=null==u||null===(p=u.widgets)||void 0===p||null===(g=p[e.id])||void 0===g?void 0:g.container,n=null===(f=l)||void 0===f||null===(y=f.widgets)||void 0===y||null===(E=y[e.id])||void 0===E?void 0:E.container,r=!(null==o||!o[e.id]),i=s.a.JITSI.matches(e.type)?b.Top:b.Right;n===b.Right?h.push(e):n===b.Top||t===b.Top||r&&!t?d.push(e):(i===b.Top?d:h).push(e)}const S=d.slice(v);h.push(...S),d.sort((e,t)=>{var n,r,o,i,a,d;const h=null==u||null===(n=u.widgets)||void 0===n?void 0:n[e.id],p=null==u||null===(r=u.widgets)||void 0===r?void 0:r[t.id],g=null===(o=l)||void 0===o||null===(i=o.widgets)||void 0===i?void 0:i[e.id],f=null===(a=l)||void 0===a||null===(d=a.widgets)||void 0===d?void 0:d[t.id],_=s.a.JITSI.matches(e.type)?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,b=s.a.JITSI.matches(t.type)?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,v=Object(c.b)(null==g?void 0:g.index,Object(c.b)(null==h?void 0:h.index,_)),y=Object(c.b)(null==f?void 0:f.index,Object(c.b)(null==p?void 0:p.index,b));return v===y?Object(m.a)(e.id,t.id):v-y});const w=[];let C=null,T=!0;for(let e=0;e<d.length;e++){var x,k,F;const t=d[e],n=null==u||null===(x=u.widgets)||void 0===x?void 0:x[t.id],r=null===(k=l)||void 0===k||null===(F=k.widgets)||void 0===F?void 0:F[t.id];if(Number.isFinite(null==r?void 0:r.width)||Number.isFinite(null==n?void 0:n.width)){const e=(null==r?void 0:r.width)||(null==n?void 0:n.width),t=Object(c.a)(e,10,100);w.push(t),T=!1}else w.push(100);if(null!=n&&n.height||null!=r&&r.height){const e=Object(c.b)(null==n?void 0:n.height,2),t=Object(c.b)(null==r?void 0:r.height,e);C=Math.max(C,Object(c.a)(t,2,100))}}if(T)for(let e=0;e<w.length;e++)w[e]=100/w.length;else{const e=Object(c.e)(...w)-100;if(e<0)for(let t=0;t<w.length;t++)w[t]+=Math.abs(e)/w.length;else if(e>0){for(let t=0;t<w.length;t++)w[t]=Object(c.a)(w[t]-e/w.length,10,100);const t=Object(c.e)(...w)-100;if(t>0){const e=w.map((e,t)=>[t,e]).filter(e=>e[1]>10).map(e=>e[0]);for(const n of e)w[n]-=t/e.length}}}this.byRoom[e.roomId]={},d.length&&(this.byRoom[e.roomId][b.Top]={ordered:d,distributions:w,height:C}),h.length&&(this.byRoom[e.roomId][b.Right]={ordered:h});JSON.stringify(this.byRoom[e.roomId])!==n&&this.emitFor(e)}getContainerWidgets(e,t){var n,r;return(null===(n=this.byRoom[null==e?void 0:e.roomId])||void 0===n||null===(r=n[t])||void 0===r?void 0:r.ordered)||[]}isInContainer(e,t,n){return this.getContainerWidgets(e,n).some(e=>e.id===t.id)}canAddToContainer(e,t){return this.getContainerWidgets(e,t).length<v}getResizerDistributions(e,t){var n,r;let o=null===(n=this.byRoom[e.roomId])||void 0===n||null===(r=n[t])||void 0===r?void 0:r.distributions;return!o||o.length<2?[]:(2===o.length&&(o=[o[0]]),3===o.length&&(o=[o[0],o[2]]),o.map(e=>e.toFixed(1)+"%"))}setResizerDistributions(e,t,n){if(t!==b.Top)return;const r=n.map(e=>Number(Number(e.substring(0,e.length-1)).toFixed(1))),o=this.getContainerWidgets(e,t),i=100-Object(c.e)(...r);2===r.length&&r.splice(1,0,i),1===r.length&&r.push(i);const a={};o.forEach((n,o)=>{var i,s;a[n.id]={container:t,width:r[o],index:o,height:(null===(i=this.byRoom[e.roomId])||void 0===i||null===(s=i[t])||void 0===s?void 0:s.height)||2}}),this.updateUserLayout(e,a)}getContainerHeight(e,t){var n,r;return null===(n=this.byRoom[e.roomId])||void 0===n||null===(r=n[t])||void 0===r?void 0:r.height}setContainerHeight(e,t,n){var r,o;const i=this.getContainerWidgets(e,t),a=null===(r=this.byRoom[e.roomId])||void 0===r||null===(o=r[t])||void 0===o?void 0:o.distributions,s={};i.forEach((e,r)=>{s[e.id]={container:t,width:a[r],index:r,height:n}}),this.updateUserLayout(e,s)}moveWithinContainer(e,t,n,r){var o,i,a,s;const l=Object(h.b)(this.getContainerWidgets(e,t)),u=l.findIndex(e=>e.id===n.id);if(u<0)return;l.splice(u,1);const d=Object(c.a)(u+r,0,l.length);l.splice(d,0,n);const p=null===(o=this.byRoom[e.roomId])||void 0===o||null===(i=o[t])||void 0===i?void 0:i.distributions,m=null===(a=this.byRoom[e.roomId])||void 0===a||null===(s=a[t])||void 0===s?void 0:s.height,g={};l.forEach((e,n)=>{g[e.id]={container:t,width:p[n],index:n,height:m}}),this.updateUserLayout(e,g)}moveToContainer(e,t,n){this.getAllWidgets(e).some(([e])=>e.id===t.id)&&this.updateUserLayout(e,{[t.id]:{container:n}})}canCopyLayoutToRoom(e){return!!this.matrixClient&&e.currentState.maySendStateEvent(_,this.matrixClient.getUserId())}copyLayoutToRoom(e){const t=this.getAllWidgets(e),n={widgets:{}};for(const[s,c]of t)if(n.widgets[s.id]={container:c},c===b.Top){var r,o,i,a;const t=this.getContainerWidgets(e,c).findIndex(e=>e.id===s.id),l=null===(r=this.byRoom[e.roomId])||void 0===r||null===(o=r[c])||void 0===o?void 0:o.distributions,u=null===(i=this.byRoom[e.roomId])||void 0===i||null===(a=i[c])||void 0===a?void 0:a.height;n.widgets[s.id]=f(f({},n.widgets[s.id]),{},{height:u?Math.round(u):null,width:l[t]?Math.round(l[t]):null,index:t})}this.matrixClient.sendStateEvent(e.roomId,_,n,"")}getAllWidgets(e){const t=this.byRoom[e.roomId];if(!t)return[];const n=[];for(const e of Object.keys(t)){const r=t[e].ordered;for(const t of r)n.push([t,e])}return n}updateUserLayout(e,t){const n=this.getAllWidgets(e);for(const[i,c]of n){var r,o;const n=this.getContainerWidgets(e,c).findIndex(e=>e.id===i.id),l=null===(r=this.byRoom[e.roomId])||void 0===r||null===(o=r[c])||void 0===o?void 0:o.distributions;var a,s;if(!t[i.id])t[i.id]={container:c,index:n,height:null===(a=this.byRoom[e.roomId])||void 0===a||null===(s=a[c])||void 0===s?void 0:s.height,width:null==l?void 0:l[n]}}const c=e.currentState.getStateEvents(_,"");i.b.setValue("Widgets.layout",e.roomId,d.a.ROOM_ACCOUNT,{overrides:null==c?void 0:c.getId(),widgets:t}).catch(()=>this.recalculateRoom(e)),this.recalculateRoom(e)}}o()(y,"internalInstance",void 0),window.mxWidgetLayoutStore=y.instance},function(e,t,n){"use strict";(function(e){var r=n(313),o=n(83),i=n(123),a=n(124),s=n(316),c=n(82),l=n(84);const u={orderedTags:null,orderedTagsAccountData:null,hasSynced:!1,joinedGroupIds:null,selectedTags:[],anchorTag:null};class d extends r.Store{constructor(){super(o.a),this._state=Object.assign({},u),l.b.monitorSetting("TagPanel.enableTagPanel",null)}_setState(e){this._state=Object.assign(this._state,e),this.__emitChange()}__onDispatch(e){switch(e.action){case"view_room":{const t=i.a.getGroupIdsForRoomId(e.room_id);this._updateBadges(t);break}case"MatrixActions.sync":{if("SYNCING"!==e.state&&"PREPARED"!==e.state||this._updateBadges(),"PREPARED"===e.prevState||"PREPARED"!==e.state)break;const t=e.matrixClient.getAccountData("im.vector.web.tag_ordering"),n=t?t.getContent():{};this._setState({orderedTagsAccountData:n.tags||null,removedTagsAccountData:n.removedTags||null,hasSynced:!0}),this._updateOrderedTags();break}case"MatrixActions.accountData":if("im.vector.web.tag_ordering"!==e.event_type)break;if(e.event_content._storeId===this.getStoreId())break;this._setState({orderedTagsAccountData:e.event_content?e.event_content.tags:null,removedTagsAccountData:e.event_content?e.event_content.removedTags:null}),this._updateOrderedTags();break;case"GroupActions.fetchJoinedGroups.success":this._setState({joinedGroupIds:e.result.groups.sort(),hasFetchedJoinedGroups:!0}),this._updateOrderedTags();break;case"TagOrderActions.moveTag.pending":this._setState({orderedTags:e.request.tags,removedTagsAccountData:e.request.removedTags});break;case"TagOrderActions.removeTag.pending":this._setState({removedTagsAccountData:e.request.removedTags}),this._updateOrderedTags();break;case"select_tag":{const t=!l.b.getValue("feature_communities_v2_prototypes");let n=[];if(e.shiftKey&&t){let t=this._state.orderedTags.indexOf(this._state.anchorTag),r=this._state.orderedTags.indexOf(e.tag);if(-1===t&&(t=r),t>r){const e=t;t=r,r=e}n=e.ctrlOrCmdKey?this._state.selectedTags:[],n=[...new Set(this._state.orderedTags.slice(t,r+1).concat(n))]}else n=e.ctrlOrCmdKey&&t?this._state.selectedTags.includes(e.tag)?this._state.selectedTags.filter(t=>t!==e.tag):[...this._state.selectedTags,e.tag]:1===this._state.selectedTags.length&&this._state.selectedTags.includes(e.tag)?[]:[e.tag],this._state.selectedTags.includes(e.tag)||this._setState({anchorTag:e.tag});this._setState({selectedTags:n}),a.a.trackEvent("FilterStore","select_tag")}break;case"deselect_tags":e.tag?this._setState({selectedTags:this._state.selectedTags.filter(t=>t!==e.tag)}):this._setState({selectedTags:[]}),a.a.trackEvent("FilterStore","deselect_tags");break;case"on_client_not_viable":case"on_logged_out":this._state=Object.assign({},u);break;case"setting_updated":"TagPanel.enableTagPanel"!==e.settingName||e.newValue||(this._setState({selectedTags:[]}),a.a.trackEvent("FilterStore","disable_tags"))}}_updateBadges(e=this._state.joinedGroupIds){if(e&&e.length){const t=c.a.get(),n={};e.forEach(e=>{const r=i.a.getGroupRooms(e).map(e=>t.getRoom(e.roomId)).filter(e=>null!=e),o=r&&s.e(r);n[e]=o&&0!==o.count?o:void 0});const r=Object.assign({},this._state.badges,n);this._setState({badges:r})}}_updateOrderedTags(){this._setState({orderedTags:this._state.hasSynced&&this._state.hasFetchedJoinedGroups?this._mergeGroupsAndTags():null})}_mergeGroupsAndTags(){const e=this._state.joinedGroupIds||[],t=this._state.orderedTagsAccountData||[],n=new Set(this._state.removedTagsAccountData||[]),r=t.filter(t=>("+"!==t[0]||e.includes(t))&&!n.has(t)),o=e.filter(e=>!t.includes(e)&&!n.has(e));return r.concat(o)}getGroupBadge(e){const t=this._state.badges;return t&&t[e]}getOrderedTags(){return this._state.orderedTags}getRemovedTagsAccountData(){return this._state.removedTagsAccountData}getStoreId(){return this._id||(this._id=Math.random().toString(16).slice(2,10)),this._id}getSelectedTags(){return this._state.selectedTags}}void 0===e.singletonGroupFilterOrderStore&&(e.singletonGroupFilterOrderStore=new d),t.a=e.singletonGroupFilterOrderStore}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(88),h=n.n(d),p=n(89),m=n(81);const g=["class","children","tooltip","tooltipClass","tooltipProps"];var f,_,b;let v=Object(m.a)("views.elements.TextWithTooltip")((b=_=class extends u.a.Component{constructor(){super(),c()(this,"onMouseOver",()=>{this.setState({hover:!0})}),c()(this,"onMouseLeave",()=>{this.setState({hover:!1})}),this.state={hover:!1}}render(){const e=p.getComponent("elements.Tooltip"),t=this.props,{class:n,children:r,tooltip:i,tooltipClass:s,tooltipProps:c}=t,l=a()(t,g);return u.a.createElement("span",o()({},l,{onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,className:n}),r,this.state.hover&&u.a.createElement(e,o()({},c,{label:i,tooltipClassName:s,className:"mx_TextWithTooltip_tooltip"})))}},c()(_,"propTypes",{class:h.a.string,tooltipClass:h.a.string,tooltip:h.a.node.isRequired,tooltipProps:h.a.object}),f=b))||f},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(86),h=n.n(d),p=n(145),m=n(84),g=n(85),f=n(217),_=n(81);const b=["notification","forceCount","roomId","onClick"];var v;let y=Object(_.a)("views.rooms.NotificationBadge")(v=class extends u.a.PureComponent{constructor(e){super(e),c()(this,"countWatcherRef",void 0),c()(this,"countPreferenceChanged",()=>{this.setState({showCounts:m.b.getValue("Notifications.alwaysShowBadgeCounts",this.roomId)})}),c()(this,"onNotificationUpdate",()=>{this.forceUpdate()}),this.props.notification.on(f.a,this.onNotificationUpdate),this.state={showCounts:m.b.getValue("Notifications.alwaysShowBadgeCounts",this.roomId)},this.countWatcherRef=m.b.watchSetting("Notifications.alwaysShowBadgeCounts",this.roomId,this.countPreferenceChanged)}get roomId(){return this.props.roomId||null}componentWillUnmount(){m.b.unwatchSetting(this.countWatcherRef),this.props.notification.off(f.a,this.onNotificationUpdate)}componentDidUpdate(e){e.notification&&e.notification.off(f.a,this.onNotificationUpdate),this.props.notification.on(f.a,this.onNotificationUpdate)}render(){const e=this.props,{notification:t,forceCount:n,roomId:r,onClick:i}=e,s=a()(e,b);if(t.isIdle)return null;let c=!(t.symbol||t.count>0)||!t.hasUnreadCount;if(n&&(c=!1,!t.hasUnreadCount))return null;let l=t.symbol||Object(p.c)(t.count);c&&(l="");const d=h()({mx_NotificationBadge:!0,mx_NotificationBadge_visible:!!c||t.hasUnreadCount,mx_NotificationBadge_highlighted:t.hasMentions,mx_NotificationBadge_dot:c,mx_NotificationBadge_2char:l.length>0&&l.length<3,mx_NotificationBadge_3char:l.length>2});return i?u.a.createElement(g.a,o()({},s,{className:d,onClick:i}),u.a.createElement("span",{className:"mx_NotificationBadge_count"},l)):u.a.createElement("div",{className:d},u.a.createElement("span",{className:"mx_NotificationBadge_count"},l))}})||v},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(79),o=n.n(r),i=n(150),a=n(83),s=n(171),c=n(84),l=n(2),u=n(115),d=n(162),h=n(173),p=n(123);class m extends i.a{constructor(){super(a.a,{})}static get instance(){return m.internalInstance}static getUpdateEventName(e){return`${u.b}:${e}`}getSelectedCommunityId(){return c.b.getValue("feature_communities_v2_prototypes")?h.a.getSelectedTags()[0]:null}getSelectedCommunityName(){return m.instance.getCommunityName(this.getSelectedCommunityId())}getSelectedCommunityGeneralChat(){const e=this.getSelectedCommunityId();if(e)return this.getGeneralChat(e)}getCommunityName(e){const t=d.a.getGroupProfileCachedFast(this.matrixClient,e);return(null==t?void 0:t.name)||e}getCommunityProfile(e){return d.a.getGroupProfileCachedFast(this.matrixClient,e)}getGeneralChat(e){const t=p.a.getGroupRooms(e).map(e=>this.matrixClient.getRoom(e.roomId)).filter(e=>!!e);let n=t.find(t=>{const n=t.currentState.getStateEvents("im.vector.general_chat","");return!(!n||n.getContent().groupId!==e)});return n||(n=t[0]),n}isAdminOf(e){const t=p.a.getGroupMembers(e).find(e=>e.userId===this.matrixClient.getUserId());return null==t?void 0:t.isPrivileged}canInviteTo(e){const t=this.getGeneralChat(e);if(!t)return this.isAdminOf(e);const n=t.getMember(this.matrixClient.getUserId());if(!n)return this.isAdminOf(e);const r=t.currentState.getStateEvents("m.room.power_levels","");if(!r)return this.isAdminOf(e);const o=r.getContent();return(Object(l.v)(o.invite)?50:Number(o.invite))<=n.powerLevel}async onAction(e){if(this.matrixClient&&c.b.getValue("feature_communities_v2_prototypes"))if("MatrixActions.Room.myMembership"===e.action){const t=e.room,n=Object(s.b)(e.membership);if(n===Object(s.b)(e.oldMembership))return;if(n===s.a.Invite)try{const e=l.n("/rooms/$roomId/group_info",{$roomId:t.roomId}),n=await this.matrixClient.http.authedRequest(void 0,"GET",e,void 0,void 0,{prefix:"/_matrix/client/unstable/im.vector.custom"});await this.matrixClient.setAccountData("im.vector.group_info."+t.roomId,n)}catch(e){console.warn("Non-fatal error getting group information for invite:",e)}}else if("MatrixActions.accountData"===e.action){if(e.event_type.startsWith("im.vector.group_info.")){const t=e.event_type.substring("im.vector.group_info.".length);this.emit(m.getUpdateEventName(t),t)}}else if("select_tag"===e.action){const t=this.getGeneralChat(e.tag);t&&a.a.dispatch({action:"view_room",room_id:t.roomId})}}getInviteProfile(e){if(!this.matrixClient)return{displayName:null,avatarMxc:null};const t=this.matrixClient.getRoom(e);if(c.b.getValue("feature_communities_v2_prototypes")){const t=this.matrixClient.getAccountData("im.vector.group_info."+e);if(t&&t.getContent())return{displayName:t.getContent().name,avatarMxc:t.getContent().avatar_url}}return{displayName:t.name,avatarMxc:t.getMxcAvatarUrl()}}async onReady(){for(const e of this.matrixClient.getRooms()){const t=e.currentState.getMembers().find(e=>e.userId===this.matrixClient.getUserId());t&&(Object(s.b)(t.membership)===s.a.Invite&&this.emit(m.getUpdateEventName(e.roomId),e.roomId))}}}o()(m,"internalInstance",new m)},function(e,t,n){"use strict";n.d(t,"d",(function(){return E})),n.d(t,"a",(function(){return S})),n.d(t,"c",(function(){return x})),n.d(t,"e",(function(){return k})),n.d(t,"b",(function(){return F})),n.d(t,"f",(function(){return O}));var r=n(87),o=n(89),i=n(82),a=n(301),s=n(302),c=n(80),l=n(135),u=n(237),d=n(684),h=n(250),p=n(84),m=n(210);let g={},f={},_=!1,b=!1,v={};function y(){return _}function E(){return _}class S extends Error{constructor(){super("Secret storage access canceled")}}async function w(){const e=o.getComponent("dialogs.QuestionDialog"),[t]=await r.a.createDialog(e,{title:Object(c.a)("Cancel entering passphrase?"),description:Object(c.a)("Are you sure you want to cancel entering passphrase?"),danger:!1,button:Object(c.a)("Go Back"),cancelButton:Object(c.a)("Cancel")}).finished;return!t}function C(e){return async({passphrase:t,recoveryKey:n})=>t?Object(a.a)(t,e.passphrase.salt,e.passphrase.iterations):Object(s.a)(n)}function T(e,t,n){y()&&(g[e]=n,f[e]=t)}const x={getSecretStorageKey:async function({keys:e},t){var n;const o=i.a.get();let a,s=await o.getDefaultSecretStorageKeyId();if(s&&(a=e[s],a||(s=void 0)),!s){const t=Object.entries(e);if(t.length>1)throw new Error("Multiple storage key requests not implemented");[s,a]=t[0]}if(y()&&g[s])return[s,g[s]];if(v.key&&await i.a.get().checkSecretStorageKey(v.key,a))return T(s,a,v.key),[s,v.key];const c=null===(n=m.a.getSecretStorageKey)||void 0===n?void 0:n.call(m.a);if(c)return console.log("Using key from security customisations (secret storage)"),T(s,a,c),[s,c];if(b)throw new Error("Could not unlock non-interactively");const l=C(a),{finished:u}=r.a.createTrackedDialog("Access Secret Storage dialog","",d.a,{keyInfo:a,checkPrivateKey:async e=>{const t=await l(e);return await i.a.get().checkSecretStorageKey(t,a)}},null,!1,!1,{onBeforeClose:async e=>"backgroundClick"!==e||w()}),[h]=await u;if(!h)throw new S;const p=await l(h);return T(s,a,p),[s,p]},cacheSecretStorageKey:T,onSecretRequested:async function(e,t,n,r,o){console.log("onSecretRequested",e,t,n,r,o);const a=i.a.get();if(e===a.getUserId())if(o&&o.isVerified()){if("m.cross_signing.master"===r||"m.cross_signing.self_signing"===r||"m.cross_signing.user_signing"===r){const e=a.getCrossSigningCacheCallbacks();if(!e.getCrossSigningKeyCache)return;const n=r.replace("m.cross_signing.",""),o=await e.getCrossSigningKeyCache(n);return o||console.log(`${n} requested by ${t}, but not found in cache`),o&&Object(l.encodeBase64)(o)}if("m.megolm_backup.v1"===r){const e=await a.crypto.getSessionBackupPrivateKey();return e||console.log(`session backup key requested by ${t}, but not found in cache`),e&&Object(l.encodeBase64)(e)}console.warn("onSecretRequested didn't recognise the secret named ",r)}else console.log("Ignoring secret request from untrusted device "+t)},getDehydrationKey:async function(e,t){var n;const o=null===(n=m.a.getSecretStorageKey)||void 0===n?void 0:n.call(m.a);if(o)return console.log("Using key from security customisations (dehydration)"),o;const i=C(e),{finished:a}=r.a.createTrackedDialog("Access Secret Storage dialog","",d.a,{keyInfo:e,checkPrivateKey:async e=>{const n=await i(e);try{return t(n),!0}catch(e){return!1}}},null,!1,!1,{onBeforeClose:async e=>"backgroundClick"!==e||w()}),[s]=await a;if(!s)throw new S;const c=await i(s);return v={key:new Uint8Array(c),keyInfo:e},c}};async function k(){let e;const{finished:t}=r.a.createTrackedDialog("Restore Backup","",h.a,{showSummary:!1,keyCallback:t=>e=t},null,!1,!0);if(!await t)throw new Error("Key backup prompt cancelled");return e}async function F(e=(async()=>{}),t=!1){const a=i.a.get();_=!0;try{if(!await a.hasSecretStorageKey()||t){const{finished:e}=r.a.createTrackedDialogAsync("Create Secret Storage dialog","",n.e(25).then(n.bind(null,1415)),{forceReset:t},null,!1,!0,{onBeforeClose:async e=>"backgroundClick"!==e||!Object(u.d)()}),[o]=await e;if(!o)throw new Error("Secret storage creation canceled")}else{const e=o.getComponent("dialogs.InteractiveAuthDialog");await a.bootstrapCrossSigning({authUploadDeviceSigningKeys:async t=>{const{finished:n}=r.a.createTrackedDialog("Cross-signing keys dialog","",e,{title:Object(c.a)("Setting up keys"),matrixClient:a,makeRequest:t}),[o]=await n;if(!o)throw new Error("Cross-signing key upload auth canceled")}}),await a.bootstrapSecretStorage({getKeyBackupPassphrase:k});const t=Object.keys(g)[0];if(t&&p.b.getValue("feature_dehydration")){let e={};f[t]&&f[t].passphrase&&(e={passphrase:f[t].passphrase}),console.log("Setting dehydration key"),await a.setDehydrationKey(g[t],e,"Backup device")}else t?console.log("Not setting dehydration key: feature disabled"):console.warn("Not setting dehydration key: no SSSS key found")}return await e()}catch(e){var s;throw null===(s=m.a.catchAccessSecretStorageError)||void 0===s||s.call(m.a,e),console.error(e),e}finally{_=!1,y()||(g={},f={})}}async function O(e){const t=v.key;let n=!1;if(t&&await e.isSecretStorageReady()){console.log("Trying to set up cross-signing using dehydration key"),_=!0,b=!0;try{await e.checkOwnCrossSigningTrust();let r={};v.keyInfo&&v.keyInfo.passphrase&&(r={passphrase:v.keyInfo.passphrase}),await e.setDehydrationKey(t,r,"Backup device");const o=await e.getKeyBackupVersion();o&&(n=!0,e.restoreKeyBackupWithSecretStorage(o).finally(()=>{_=!1,b=!1,y()||(g={},f={})}))}finally{v={},n||(_=!1,b=!1,y()||(g={},f={}))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(79),o=n.n(r),i=n(90),a=n(87),s=n(169),c=n.n(s),l=n(84),u=n(267),d=n(82),h=n(10),p=n.n(h),m=n(188);class g{constructor(e,t){this.apiUrl=e,this.uiUrl=t,o()(this,"scalarToken",void 0),o()(this,"termsInteractionCallback",void 0),o()(this,"isDefaultManager",void 0),this.scalarToken=null,this.termsInteractionCallback=void 0;const n=i.a.get().integrations_rest_url,r=i.a.get().integrations_ui_url;this.isDefaultManager=e===n&&r===t}writeTokenToStore(){window.localStorage.setItem("mx_scalar_token_at_"+this.apiUrl,this.scalarToken),this.isDefaultManager&&window.localStorage.removeItem("mx_scalar_token")}readTokenFromStore(){let e=window.localStorage.getItem("mx_scalar_token_at_"+this.apiUrl);return!e&&this.isDefaultManager&&(e=window.localStorage.getItem("mx_scalar_token")),e}readToken(){return this.scalarToken?this.scalarToken:this.readTokenFromStore()}setTermsInteractionCallback(e){this.termsInteractionCallback=e}connect(){return this.getScalarToken().then(e=>{this.scalarToken=e})}hasCredentials(){return null!=this.scalarToken}getScalarToken(){const e=this.readToken();return e?this.checkToken(e).catch(e=>{if(e instanceof u.b)throw e;return this.registerForToken()}):this.registerForToken()}getAccountName(e){const t=this.apiUrl+"/account";return new Promise((function(n,r){p()({method:"GET",uri:t,qs:{scalar_token:e,v:"1.1"},json:!0},(e,t,o)=>{e?r(e):o&&"M_TERMS_NOT_SIGNED"===o.errcode?r(new u.b):t.statusCode/100!=2?r(o):o&&o.user_id?n(o.user_id):r(new Error("Missing user_id in response"))})}))}checkToken(e){return this.getAccountName(e).then(t=>{const n=d.a.get().getUserId();if(t!==n)throw new Error("Scalar token is owned by someone else: "+n);return e}).catch(t=>{if(t instanceof u.b){console.log("Integration manager requires new terms to be agreed to");const t=c.a.parse(this.apiUrl);return t.path="",t.pathname="",Object(u.d)([new u.a(m.a.IM,c.a.format(t),e)],this.termsInteractionCallback).then(()=>e)}throw t})}registerForToken(){return d.a.get().getOpenIdToken().then(e=>this.exchangeForScalarToken(e)).then(e=>this.checkToken(e)).then(e=>(this.scalarToken=e,this.writeTokenToStore(),e))}exchangeForScalarToken(e){const t=this.apiUrl;return new Promise((function(n,r){p()({method:"POST",uri:t+"/register",qs:{v:"1.1"},body:e,json:!0},(e,t,o)=>{e?r(e):t.statusCode/100!=2?r(new Error("Scalar request failed: "+t.statusCode)):o&&o.scalar_token?n(o.scalar_token):r(new Error("Missing scalar_token in response"))})}))}getScalarPageTitle(e){let t=this.apiUrl+"/widgets/title_lookup";return t=this.getStarterLink(t),t+="&curl="+encodeURIComponent(e),new Promise((function(e,n){p()({method:"GET",uri:t,json:!0},(t,r,o)=>{if(t)n(t);else if(r.statusCode/100!=2)n(new Error("Scalar request failed: "+r.statusCode));else if(o){let t="";o.page_title_cache_item&&o.page_title_cache_item.cached_title&&(t=o.page_title_cache_item.cached_title),e(t)}else n(new Error("Missing page title in response"))})}))}disableWidgetAssets(e,t){let n=this.apiUrl+"/widgets/set_assets_state";return n=this.getStarterLink(n),new Promise((r,o)=>{p()({method:"GET",uri:n,json:!0,qs:{widget_type:e.preferred,widget_id:t,state:"disable"}},(e,t,n)=>{e?o(e):t.statusCode/100!=2?o(new Error("Scalar request failed: "+t.statusCode)):n?r():o(new Error("Failed to set widget assets state"))})})}getScalarInterfaceUrlForRoom(e,t,n){const r=e.roomId,o=e.name;let i=this.uiUrl;return i+="?scalar_token="+encodeURIComponent(this.scalarToken),i+="&room_id="+encodeURIComponent(r),i+="&room_name="+encodeURIComponent(o),i+="&theme="+encodeURIComponent(l.b.getValue("theme")),n&&(i+="&integ_id="+encodeURIComponent(n)),t&&(i+="&screen="+encodeURIComponent(t)),i}getStarterLink(e){return e+"?scalar_token="+encodeURIComponent(this.scalarToken)}}var f=n(559);let _;!function(e){e.Account="account",e.Config="config",e.Homeserver="homeserver"}(_||(_={}));class b{constructor(e,t,n=t,r){o()(this,"apiUrl",void 0),o()(this,"uiUrl",void 0),o()(this,"kind",void 0),o()(this,"id",void 0),this.kind=e,this.apiUrl=t,this.uiUrl=n,this.id=r}get name(){return c.a.parse(this.uiUrl).host}get trimmedApiUrl(){const e=c.a.parse(this.apiUrl);return e.pathname="",e.path="",c.a.format(e)}getScalarClient(){return new g(this.apiUrl,this.uiUrl)}async open(e=null,t=null,n=null){if(!l.b.getValue("integrationProvisioning"))return T.sharedInstance().showDisabledDialog();const r=a.a.createTrackedDialog("Integration Manager","",f.a,{loading:!0},"mx_IntegrationManager"),o=this.getScalarClient();o.setTermsInteractionCallback((e,t)=>Object(u.c)(e,t,"mx_TermsDialog_forIntegrationManager"));const i={};try{await o.connect(),o.hasCredentials()?i.url=o.getScalarInterfaceUrlForRoom(e,t,n):i.connected=!1}catch(e){if(e instanceof u.b)return void r.close();console.error(e),i.connected=!1}r.close(),a.a.createTrackedDialog("Integration Manager","",f.a,i,"mx_IntegrationManager")}}var v=n(560),y=n(561),E=n(563),S=n(139),w=n(130);const C=[_.Account,_.Homeserver,_.Config];class T{static sharedInstance(){return T.instance||(T.instance=new T),T.instance}constructor(){o()(this,"managers",[]),o()(this,"client",void 0),o()(this,"primaryManager",void 0),o()(this,"setupHomeserverManagers",async e=>{if(console.log("Updating homeserver-configured integration managers..."),e&&e["m.integrations"]){let t=e["m.integrations"].managers;Array.isArray(t)||(t=[]),console.log(`Homeserver has ${t.length} integration managers`),this.managers=this.managers.filter(e=>e.kind!==_.Homeserver);for(const e of t)e.api_url&&this.managers.push(new b(_.Homeserver,e.api_url,e.ui_url));this.primaryManager=null}else console.log("Homeserver has no integration managers")}),o()(this,"onAccountData",e=>{"m.widgets"===e.getType()&&this.compileManagers()}),this.compileManagers()}startWatching(){this.stopWatching(),this.client=d.a.get(),this.client.on("accountData",this.onAccountData),this.client.on("WellKnown.client",this.setupHomeserverManagers),this.compileManagers()}stopWatching(){this.client&&(this.client.removeListener("accountData",this.onAccountData),this.client.removeListener("WellKnown.client",this.setupHomeserverManagers))}compileManagers(){this.managers=[],this.setupConfiguredManager(),this.setupAccountManagers()}setupConfiguredManager(){const e=i.a.get().integrations_rest_url,t=i.a.get().integrations_ui_url;e&&t&&(this.managers.push(new b(_.Config,e,t)),this.primaryManager=null)}setupAccountManagers(){if(!this.client||!this.client.getUserId())return;S.a.getIntegrationManagerWidgets().forEach(e=>{const t=e.content.data;if(!t)return;const n=e.content.url,r=t.api_url;if(!r||!n)return;const o=new b(_.Account,r,n,e.id||e.state_key||"");this.managers.push(o)}),this.primaryManager=null}hasManager(){return this.managers.length>0}getOrderedManagers(){const e=[];for(const t of C){const n=this.managers.filter(e=>e.kind===t);n&&n.length&&(t===_.Account&&n.sort((e,t)=>Object(w.a)(e.id,t.id)),e.push(...n))}return e}getPrimaryManager(){return this.hasManager()?(this.primaryManager||(this.primaryManager=this.getOrderedManagers()[0]),this.primaryManager):null}openNoManagerDialog(){a.a.createTrackedDialog("Integrations impossible","",v.a)}openAll(e=null,t=null,n=null){return l.b.getValue("integrationProvisioning")?0===this.managers.length?this.openNoManagerDialog():void a.a.createTrackedDialog("Tabbed Integration Manager","",y.a,{room:e,screen:t,integrationId:n},"mx_TabbedIntegrationManagerDialog"):this.showDisabledDialog()}showDisabledDialog(){a.a.createTrackedDialog("Integrations disabled","",E.a)}async overwriteManagerOnAccount(e){await S.a.removeIntegrationManagerWidgets(),await S.a.addIntegrationManagerWidget(e.name,e.uiUrl,e.apiUrl)}async tryDiscoverManager(e){let t;console.log("Looking up integration manager via .well-known"),(e.startsWith("http:")||e.startsWith("https:"))&&(e=c.a.parse(e).host);try{const n=await fetch(`https://${e}/.well-known/matrix/integrations`);t=await n.json()}catch(e){return console.error(e),console.warn("Failed to locate integration manager"),null}if(!t||!t["m.integrations_widget"])return console.warn("Missing integrations widget on .well-known response"),null;const n=t["m.integrations_widget"];if(!n.url||!n.data||!n.data.api_url)return console.warn("Malformed .well-known response for integrations widget"),null;const r=new b(_.Account,n.data.api_url,n.url);return console.log("Got an integration manager (untested)"),r}}o()(T,"instance",void 0),window.mxIntegrationManagers=T},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"f",(function(){return g}));var r=n(79),o=n.n(r),i=n(104),a=n(84);const s={getMessageComposerBindings:()=>{const e=[{action:c.SelectPrevSendHistory,keyCombo:{key:i.a.ARROW_UP,altKey:!0,ctrlKey:!0}},{action:c.SelectNextSendHistory,keyCombo:{key:i.a.ARROW_DOWN,altKey:!0,ctrlKey:!0}},{action:c.EditPrevMessage,keyCombo:{key:i.a.ARROW_UP}},{action:c.EditNextMessage,keyCombo:{key:i.a.ARROW_DOWN}},{action:c.CancelEditing,keyCombo:{key:i.a.ESCAPE}},{action:c.FormatBold,keyCombo:{key:i.a.B,ctrlOrCmd:!0}},{action:c.FormatItalics,keyCombo:{key:i.a.I,ctrlOrCmd:!0}},{action:c.FormatQuote,keyCombo:{key:i.a.GREATER_THAN,ctrlOrCmd:!0,shiftKey:!0}},{action:c.EditUndo,keyCombo:{key:i.a.Z,ctrlOrCmd:!0}},{action:c.MoveCursorToStart,keyCombo:{key:i.a.HOME,ctrlOrCmd:!0}},{action:c.MoveCursorToEnd,keyCombo:{key:i.a.END,ctrlOrCmd:!0}}];return i.b?e.push({action:c.EditRedo,keyCombo:{key:i.a.Z,ctrlOrCmd:!0,shiftKey:!0}}):e.push({action:c.EditRedo,keyCombo:{key:i.a.Y,ctrlOrCmd:!0}}),a.b.getValue("MessageComposerInput.ctrlEnterToSend")?(e.push({action:c.Send,keyCombo:{key:i.a.ENTER,ctrlOrCmd:!0}}),e.push({action:c.NewLine,keyCombo:{key:i.a.ENTER}})):(e.push({action:c.Send,keyCombo:{key:i.a.ENTER}}),e.push({action:c.NewLine,keyCombo:{key:i.a.ENTER,shiftKey:!0}}),i.b&&e.push({action:c.NewLine,keyCombo:{key:i.a.ENTER,altKey:!0}})),e},getAutocompleteBindings:()=>[{action:l.CompleteOrNextSelection,keyCombo:{key:i.a.TAB}},{action:l.CompleteOrNextSelection,keyCombo:{key:i.a.TAB,ctrlKey:!0}},{action:l.CompleteOrPrevSelection,keyCombo:{key:i.a.TAB,shiftKey:!0}},{action:l.CompleteOrPrevSelection,keyCombo:{key:i.a.TAB,ctrlKey:!0,shiftKey:!0}},{action:l.Cancel,keyCombo:{key:i.a.ESCAPE}},{action:l.PrevSelection,keyCombo:{key:i.a.ARROW_UP}},{action:l.NextSelection,keyCombo:{key:i.a.ARROW_DOWN}}],getRoomListBindings:()=>[{action:u.ClearSearch,keyCombo:{key:i.a.ESCAPE}},{action:u.PrevRoom,keyCombo:{key:i.a.ARROW_UP}},{action:u.NextRoom,keyCombo:{key:i.a.ARROW_DOWN}},{action:u.SelectRoom,keyCombo:{key:i.a.ENTER}},{action:u.CollapseSection,keyCombo:{key:i.a.ARROW_LEFT}},{action:u.ExpandSection,keyCombo:{key:i.a.ARROW_RIGHT}}],getRoomBindings:()=>{const e=[{action:d.ScrollUp,keyCombo:{key:i.a.PAGE_UP}},{action:d.RoomScrollDown,keyCombo:{key:i.a.PAGE_DOWN}},{action:d.DismissReadMarker,keyCombo:{key:i.a.ESCAPE}},{action:d.JumpToOldestUnread,keyCombo:{key:i.a.PAGE_UP,shiftKey:!0}},{action:d.UploadFile,keyCombo:{key:i.a.U,ctrlOrCmd:!0,shiftKey:!0}},{action:d.JumpToFirstMessage,keyCombo:{key:i.a.HOME,ctrlKey:!0}},{action:d.JumpToLatestMessage,keyCombo:{key:i.a.END,ctrlKey:!0}}];return a.b.getValue("ctrlFForSearch")&&e.push({action:d.FocusSearch,keyCombo:{key:i.a.F,ctrlOrCmd:!0}}),e},getNavigationBindings:()=>[{action:h.FocusRoomSearch,keyCombo:{key:i.a.K,ctrlOrCmd:!0}},{action:h.ToggleRoomSidePanel,keyCombo:{key:i.a.PERIOD,ctrlOrCmd:!0}},{action:h.ToggleUserMenu,keyCombo:{key:i.a.BACKTICK,ctrlOrCmd:!0}},{action:h.ToggleShortCutDialog,keyCombo:{key:i.a.SLASH,ctrlOrCmd:!0}},{action:h.ToggleShortCutDialog,keyCombo:{key:i.a.SLASH,ctrlOrCmd:!0,shiftKey:!0}},{action:h.GoToHome,keyCombo:{key:i.a.H,ctrlKey:!0,altKey:!i.b,shiftKey:i.b}},{action:h.SelectPrevRoom,keyCombo:{key:i.a.ARROW_UP,altKey:!0}},{action:h.SelectNextRoom,keyCombo:{key:i.a.ARROW_DOWN,altKey:!0}},{action:h.SelectPrevUnreadRoom,keyCombo:{key:i.a.ARROW_UP,altKey:!0,shiftKey:!0}},{action:h.SelectNextUnreadRoom,keyCombo:{key:i.a.ARROW_DOWN,altKey:!0,shiftKey:!0}}]};let c,l,u,d,h;function p(e,t,n){var r,o,i,a,s,c,l,u;if(void 0!==t.key)if(e.shiftKey){if(e.key.toLowerCase()!==t.key.toLowerCase())return!1}else if(e.key!==t.key)return!1;const d=null!==(r=t.ctrlKey)&&void 0!==r&&r,h=null!==(o=t.altKey)&&void 0!==o&&o,p=null!==(i=t.shiftKey)&&void 0!==i&&i,m=null!==(a=t.metaKey)&&void 0!==a&&a,g=null!==(s=e.ctrlKey)&&void 0!==s&&s,f=null!==(c=e.altKey)&&void 0!==c&&c,_=null!==(l=e.shiftKey)&&void 0!==l&&l,b=null!==(u=e.metaKey)&&void 0!==u&&u;if(t.ctrlOrCmd){if(n){if(!b||g!==d||f!==h||_!==p)return!1}else if(!g||b!==m||f!==h||_!==p)return!1;return!0}return b===m&&g===d&&f===h&&_===p}!function(e){e.Send="Send",e.SelectPrevSendHistory="SelectPrevSendHistory",e.SelectNextSendHistory="SelectNextSendHistory",e.EditPrevMessage="EditPrevMessage",e.EditNextMessage="EditNextMessage",e.CancelEditing="CancelEditing",e.FormatBold="FormatBold",e.FormatItalics="FormatItalics",e.FormatQuote="FormatQuote",e.EditUndo="EditUndo",e.EditRedo="EditRedo",e.NewLine="NewLine",e.MoveCursorToStart="MoveCursorToStart",e.MoveCursorToEnd="MoveCursorToEnd"}(c||(c={})),function(e){e.CompleteOrPrevSelection="ApplySelection",e.CompleteOrNextSelection="CompleteOrNextSelection",e.PrevSelection="PrevSelection",e.NextSelection="NextSelection",e.Cancel="Cancel"}(l||(l={})),function(e){e.ClearSearch="ClearSearch",e.PrevRoom="PrevRoom",e.NextRoom="NextRoom",e.SelectRoom="SelectRoom",e.CollapseSection="CollapseSection",e.ExpandSection="ExpandSection"}(u||(u={})),function(e){e.ScrollUp="ScrollUp",e.RoomScrollDown="RoomScrollDown",e.DismissReadMarker="DismissReadMarker",e.JumpToOldestUnread="JumpToOldestUnread",e.UploadFile="UploadFile",e.FocusSearch="FocusSearch",e.JumpToFirstMessage="JumpToFirstMessage",e.JumpToLatestMessage="JumpToLatestMessage"}(d||(d={})),function(e){e.FocusRoomSearch="FocusRoomSearch",e.ToggleRoomSidePanel="ToggleRoomSidePanel",e.ToggleUserMenu="ToggleUserMenu",e.ToggleShortCutDialog="ToggleShortCutDialog",e.GoToHome="GoToHome",e.SelectPrevRoom="SelectPrevRoom",e.SelectNextRoom="SelectNextRoom",e.SelectPrevUnreadRoom="SelectPrevUnreadRoom",e.SelectNextUnreadRoom="SelectNextUnreadRoom"}(h||(h={}));const m=new class{constructor(){o()(this,"bindingsProviders",[s])}getAction(e,t){for(const n of e){const e=n().find(e=>p(t,e.keyCombo,i.b));if(e)return e.action}}getMessageComposerAction(e){return this.getAction(this.bindingsProviders.map(e=>e.getMessageComposerBindings),e)}getAutocompleteAction(e){return this.getAction(this.bindingsProviders.map(e=>e.getAutocompleteBindings),e)}getRoomListAction(e){return this.getAction(this.bindingsProviders.map(e=>e.getRoomListBindings),e)}getRoomAction(e){return this.getAction(this.bindingsProviders.map(e=>e.getRoomBindings),e)}getNavigationAction(e){return this.getAction(this.bindingsProviders.map(e=>e.getNavigationBindings),e)}};function g(){return m}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return i}));function r(e){return a(e,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function o(e){return a(e,"abcdefghijklmnopqrstuvwxyz")}function i(e){return a(e,"ABCDEFGHIJKLMNOPQRSTUVWXYZ")}function a(e,t){let n="";for(let r=0;r<e;++r)n+=t.charAt(Math.floor(Math.random()*t.length));return n}},function(e,t,n){(function(n){var r,o,i,a,s,c,l,u,d,h,p,m,g,f,_,b,v,y,E,S,w,C,T,x,k;!function(F){var O="object"==typeof n?n:"object"==typeof self?self:"object"==typeof this?this:{};function R(e,t){return e!==O&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,r){return e[n]=t?t(n,r):r}}void 0===(r=function(e){!function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])};o=function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},s=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},c=function(e,t){return function(n,r){t(n,r,e)}},l=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},h=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||k(t,e,n)},k=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},p=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},g=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e},f=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},_=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||t)},b=function(e){return this instanceof b?(this.v=e,this):new b(e)},v=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}},y=function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}},E=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}},S=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var n=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};w=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&k(t,e,r);return n(t,e),t},C=function(e){return e&&e.__esModule?e:{default:e}},T=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},x=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},e("__extends",o),e("__assign",i),e("__rest",a),e("__decorate",s),e("__param",c),e("__metadata",l),e("__awaiter",u),e("__generator",d),e("__exportStar",h),e("__createBinding",k),e("__values",p),e("__read",m),e("__spread",g),e("__spreadArrays",f),e("__spreadArray",_),e("__await",b),e("__asyncGenerator",v),e("__asyncDelegator",y),e("__asyncValues",E),e("__makeTemplateObject",S),e("__importStar",w),e("__importDefault",C),e("__classPrivateFieldGet",T),e("__classPrivateFieldSet",x)}(R(O,R(e)))}.apply(t,[t]))||(e.exports=r)}()}).call(this,n(23))},function(e,t,n){"use strict";class r{constructor(e){const t={},n=this._getOverriddenMethods(this,t);for(const r of Object.keys(n))"function"==typeof n[r]&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}}r.install=function(e,t,n){e.__mixins||(e.__mixins=[]);for(let n=0;n<e.__mixins.length;n++)if(e.__mixins[n].constructor===t)return e.__mixins[n];const r=new t(e,n);return e.__mixins.push(r),r},e.exports=r},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e[e.None=0]="None",e[e.Bold=1]="Bold",e[e.Grey=2]="Grey",e[e.Red=3]="Red"}(r||(r={}))},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(127);t.a=({room:e,children:t})=>{const[n,a]=Object(r.useState)(null==e?void 0:e.name);return Object(i.a)(e,"Room.name",()=>{a(null==e?void 0:e.name)}),Object(r.useEffect)(()=>{a(null==e?void 0:e.name)},[e]),t?t(n):o.a.createElement(o.a.Fragment,null,n||"")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return S}));var r=n(79),o=n.n(r),i=n(3),a=n(366),s=n(152),c=n(258),l=n(2),u=n(108),d=n(160);class h{constructor(e,t){this.roomId=e}}var p=n(96),m=n(374),g=n(93),f=n(168);function _(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}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const v=["1","2","3","4","5","6"];function y(e,t,n){const r={content:{},type:"m.receipt",room_id:t.getRoomId()};return r.content[t.getId()]={},r.content[t.getId()][n]={},r.content[t.getId()][n][e]={ts:t.getTs()},new u.b(r)}let E;!function(e){e.Highlight="highlight",e.Total="total"}(E||(E={}));class S extends i.EventEmitter{constructor(e,t,n,r={}){if(super(),this.roomId=e,this.client=t,this.myUserId=n,this.opts=r,o()(this,"reEmitter",void 0),o()(this,"txnToEvent",{}),o()(this,"receipts",{}),o()(this,"receiptCacheByEventId",{}),o()(this,"realReceipts",{}),o()(this,"notificationCounts",{}),o()(this,"timelineSets",void 0),o()(this,"filteredTimelineSets",{}),o()(this,"pendingEventList",void 0),o()(this,"blacklistUnverifiedDevices",null),o()(this,"selfMembership",null),o()(this,"summaryHeroes",null),o()(this,"getTypeWarning",!1),o()(this,"getVersionWarning",!1),o()(this,"membersPromise",void 0),o()(this,"name",void 0),o()(this,"normalizedName",void 0),o()(this,"tags",{}),o()(this,"accountData",{}),o()(this,"summary",null),o()(this,"storageToken",void 0),o()(this,"timeline",void 0),o()(this,"oldState",void 0),o()(this,"currentState",void 0),this.setMaxListeners(100),this.reEmitter=new m.a(this),r.pendingEventOrdering=r.pendingEventOrdering||f.c.Chronological,-1===["chronological","detached"].indexOf(r.pendingEventOrdering))throw new Error("opts.pendingEventOrdering MUST be either 'chronological' or 'detached'. Got: '"+r.pendingEventOrdering+"'");if(this.name=e,this.timelineSets=[new a.a(this,r)],this.reEmitter.reEmit(this.getUnfilteredTimelineSet(),["Room.timeline","Room.timelineReset"]),this.fixUpLegacyTimelineFields(),"detached"==this.opts.pendingEventOrdering){this.pendingEventList=[];const e=t.sessionStore.store.getItem(w(this.roomId));e&&JSON.parse(e).forEach(async e=>{const t=new u.b(e);t.getType()===g.a.RoomMessageEncrypted&&await t.attemptDecryption(this.client.crypto),t.setStatus(u.a.NOT_SENT),this.addPendingEvent(t,t.getTxnId())})}this.opts.lazyLoadMembers?this.membersPromise=null:this.membersPromise=Promise.resolve(!1)}decryptCriticalEvents(){const e=this.getEventReadUpTo(this.client.getUserId(),!0),t=this.getLiveTimeline().getEvents(),n=t.findIndex(t=>t.event.event_id===e),r=t.slice(n).filter(e=>e.shouldAttemptDecryption()).reverse().map(e=>e.attemptDecryption(this.client.crypto,{isRetry:!0}));return Promise.allSettled(r)}decryptAllEvents(){const e=this.getUnfilteredTimelineSet().getLiveTimeline().getEvents().filter(e=>e.shouldAttemptDecryption()).reverse().map(e=>e.attemptDecryption(this.client.crypto,{isRetry:!0}));return Promise.allSettled(e)}getVersion(){const e=this.currentState.getStateEvents(g.a.RoomCreate,"");if(!e)return this.getVersionWarning||(p.a.warn("[getVersion] Room "+this.roomId+" does not have an m.room.create event"),this.getVersionWarning=!0),"1";const t=e.getContent().room_version;return void 0===t?"1":t}shouldUpgradeToVersion(){return v.includes(this.getVersion())?null:"6"}async getRecommendedVersion(){let e=(await this.client.getCapabilities())["m.room_versions"];if(!e){e={default:"6",available:{}};for(const t of v)e.available[t]=f.d.Stable}let t=this.checkVersionAgainstCapability(e);if(t.urgent&&t.needsUpgrade){p.a.warn("Refreshing room version capability because the server looks to be supporting a newer room version we don't know about.");if(e=(await this.client.getCapabilities(!0))["m.room_versions"],!e)return p.a.warn("No room version capability - assuming upgrade required."),t;t=this.checkVersionAgainstCapability(e)}return t}checkVersionAgainstCapability(e){const t=this.getVersion();p.a.log(`[${this.roomId}] Current version: ${t}`),p.a.log(`[${this.roomId}] Version capability: `,e);const n={version:t,needsUpgrade:!1,urgent:!1};if(t===e.default)return n;return Object.keys(e.available).filter(t=>"stable"===e.available[t]).includes(t)||(n.version=e.default,n.needsUpgrade=!0,n.urgent=!!this.getVersion().match(/^[0-9]+[0-9.]*$/g),n.urgent?p.a.warn("URGENT upgrade required on "+this.roomId):p.a.warn("Non-urgent upgrade required on "+this.roomId)),n}userMayUpgradeRoom(e){return this.currentState.maySendStateEvent(g.a.RoomTombstone,e)}getPendingEvents(){if("detached"!==this.opts.pendingEventOrdering)throw new Error("Cannot call getPendingEvents with pendingEventOrdering == "+this.opts.pendingEventOrdering);return this.pendingEventList}removePendingEvent(e){if("detached"!==this.opts.pendingEventOrdering)throw new Error("Cannot call removePendingEvent with pendingEventOrdering == "+this.opts.pendingEventOrdering);const t=l.E(this.pendingEventList,(function(t){return t.getId()==e}),!1);return this.savePendingEvents(),t}hasPendingEvent(e){return"detached"===this.opts.pendingEventOrdering&&this.pendingEventList.some(t=>t.getId()===e)}getPendingEvent(e){return"detached"!==this.opts.pendingEventOrdering?null:this.pendingEventList.find(t=>t.getId()===e)}getLiveTimeline(){return this.getUnfilteredTimelineSet().getLiveTimeline()}getLastActiveTimestamp(){const e=this.getLiveTimeline().getEvents();if(e.length){return e[e.length-1].getTs()}return Number.MIN_SAFE_INTEGER}getMyMembership(){return this.selfMembership}getDMInviter(){if(this.myUserId){const e=this.getMember(this.myUserId);if(e)return e.getDMInviter()}if("invite"===this.selfMembership){if(2==this.getInvitedAndJoinedMemberCount()&&this.summaryHeroes.length)return this.summaryHeroes[0]}}guessDMUserId(){const e=this.getMember(this.myUserId);if(e){const t=e.getDMInviter();if(t)return t}if(Array.isArray(this.summaryHeroes)&&this.summaryHeroes.length)return this.summaryHeroes[0];const t=this.currentState.getMembers().find(e=>e.userId!==this.myUserId);return t?t.userId:this.myUserId}getAvatarFallbackMember(){if(this.getInvitedAndJoinedMemberCount()>2)return;const e=Array.isArray(this.summaryHeroes)&&this.summaryHeroes.length;if(e){const e=this.summaryHeroes.map(e=>this.getMember(e)).find(e=>!!e);if(e)return e}const t=this.currentState.getMembers();if(t.length<=2){const e=t.find(e=>e.userId!==this.myUserId);if(e)return e}if(e){const e=this.summaryHeroes.map(e=>this.client.getUser(e)).find(e=>!!e);if(e){const t=new d.a(this.roomId,e.userId);return t.user=e,t}}}updateMyMembership(e){const t=this.selfMembership;this.selfMembership=e,t!==e&&("leave"===e&&this.cleanupAfterLeaving(),this.emit("Room.myMembership",this,e,t))}async loadMembersFromServer(){const e=this.client.store.getSyncToken(),t=l.m({not_membership:"leave",at:e}),n=l.n("/rooms/$roomId/members?"+t,{$roomId:this.roomId}),r=this.client.http;return(await r.authedRequest(void 0,"GET",n)).chunk}async loadMembers(){let e=!1,t=await this.client.store.getOutOfBandMembers(this.roomId);null===t&&(e=!0,t=await this.loadMembersFromServer(),p.a.log(`LL: got ${t.length} members from server for room `+this.roomId));return{memberEvents:t.map(this.client.getEventMapper()),fromServer:e}}loadMembersIfNeeded(){if(this.membersPromise)return this.membersPromise;this.currentState.markOutOfBandMembersStarted();const e=this.loadMembers().then(e=>(this.currentState.setOutOfBandMembers(e.memberEvents),this.client.isCryptoEnabled()&&this.client.isRoomEncrypted(this.roomId)&&this.client.crypto.trackRoomDevices(this.roomId),e.fromServer)).catch(e=>{throw this.membersPromise=null,this.currentState.markOutOfBandMembersFailed(),e});return e.then(e=>{if(e){const e=this.currentState.getMembers().filter(e=>e.isOutOfBand()).map(e=>e.events.member.event);p.a.log("LL: telling store to write "+e.length+" members for room "+this.roomId);return this.client.store.setOutOfBandMembers(this.roomId,e).catch(e=>{p.a.log("LL: storing OOB room members failed, oh well",e)})}}).catch(e=>{p.a.error(e)}),this.membersPromise=e,this.membersPromise}async clearLoadedMembersIfNeeded(){this.opts.lazyLoadMembers&&this.membersPromise&&(await this.loadMembersIfNeeded(),await this.client.store.clearOutOfBandMembers(this.roomId),this.currentState.clearOutOfBandMembers(),this.membersPromise=null)}cleanupAfterLeaving(){this.clearLoadedMembersIfNeeded().catch(e=>{p.a.error(`error after clearing loaded members from room ${this.roomId} after leaving`),p.a.log(e)})}resetLiveTimeline(e,t){for(let n=0;n<this.timelineSets.length;n++)this.timelineSets[n].resetLiveTimeline(e,t);this.fixUpLegacyTimelineFields()}fixUpLegacyTimelineFields(){this.timeline=this.getLiveTimeline().getEvents(),this.oldState=this.getLiveTimeline().getState(s.b.BACKWARDS),this.currentState=this.getLiveTimeline().getState(s.b.FORWARDS)}async hasUnverifiedDevices(){if(!this.client.isRoomEncrypted(this.roomId))return!1;const e=await this.getEncryptionTargetMembers();for(const t of e){if(this.client.getStoredDevicesForUser(t.userId).some(e=>e.isUnverified()))return!0}return!1}getTimelineSets(){return this.timelineSets}getUnfilteredTimelineSet(){return this.timelineSets[0]}getTimelineForEvent(e){return this.getUnfilteredTimelineSet().getTimelineForEvent(e)}addTimeline(){return this.getUnfilteredTimelineSet().addTimeline()}findEventById(e){return this.getUnfilteredTimelineSet().findEventById(e)}getUnreadNotificationCount(e=E.Total){return this.notificationCounts[e]}setUnreadNotificationCount(e,t){this.notificationCounts[e]=t}setSummary(e){const t=e["m.heroes"],n=e["m.joined_member_count"],r=e["m.invited_member_count"];Number.isInteger(n)&&this.currentState.setJoinedMemberCount(n),Number.isInteger(r)&&this.currentState.setInvitedMemberCount(r),Array.isArray(t)&&(this.summaryHeroes=t.filter(e=>e!==this.myUserId))}setBlacklistUnverifiedDevices(e){this.blacklistUnverifiedDevices=e}getBlacklistUnverifiedDevices(){return this.blacklistUnverifiedDevices}getAvatarUrl(e,t,n,r,o=!0){const i=this.currentState.getStateEvents(g.a.RoomAvatar,"");if(!i&&!o)return null;const a=i?i.getContent().url:null;return a?Object(c.a)(e,a,t,n,r):null}getMxcAvatarUrl(){var e,t;return(null===(e=this.currentState.getStateEvents(g.a.RoomAvatar,""))||void 0===e||null===(t=e.getContent())||void 0===t?void 0:t.url)||null}getAliases(){const e=[],t=this.currentState.getStateEvents(g.a.RoomAliases);if(t)for(let n=0;n<t.length;++n){const r=t[n];if(Array.isArray(r.getContent().aliases)){const t=r.getContent().aliases.filter(e=>"string"==typeof e&&("#"===e[0]&&!!e.endsWith(":"+r.getStateKey())));Array.prototype.push.apply(e,t)}}return e}getCanonicalAlias(){const e=this.currentState.getStateEvents(g.a.RoomCanonicalAlias,"");return e&&e.getContent().alias||null}getAltAliases(){const e=this.currentState.getStateEvents(g.a.RoomCanonicalAlias,"");return e&&e.getContent().alt_aliases||[]}addEventsToTimeline(e,t,n,r){n.getTimelineSet().addEventsToTimeline(e,t,n,r)}getMember(e){return this.currentState.getMember(e)}getMembers(){return this.currentState.getMembers()}getJoinedMembers(){return this.getMembersWithMembership("join")}getJoinedMemberCount(){return this.currentState.getJoinedMemberCount()}getInvitedMemberCount(){return this.currentState.getInvitedMemberCount()}getInvitedAndJoinedMemberCount(){return this.getInvitedMemberCount()+this.getJoinedMemberCount()}getMembersWithMembership(e){return this.currentState.getMembers().filter((function(t){return t.membership===e}))}async getEncryptionTargetMembers(){await this.loadMembersIfNeeded();let e=this.getMembersWithMembership("join");return this.shouldEncryptForInvitedMembers()&&(e=e.concat(this.getMembersWithMembership("invite"))),e}shouldEncryptForInvitedMembers(){var e;const t=this.currentState.getStateEvents(g.a.RoomHistoryVisibility,"");return"joined"!==(null==t||null===(e=t.getContent())||void 0===e?void 0:e.history_visibility)}getDefaultRoomName(e){return this.calculateRoomName(e,!0)}hasMembershipState(e,t){const n=this.getMember(e);return!!n&&n.membership===t}getOrCreateFilteredTimelineSet(e){if(this.filteredTimelineSets[e.filterId])return this.filteredTimelineSets[e.filterId];const t=Object.assign({filter:e},this.opts),n=new a.a(this,t);this.reEmitter.reEmit(n,["Room.timeline","Room.timelineReset"]),this.filteredTimelineSets[e.filterId]=n,this.timelineSets.push(n);const r=this.getLiveTimeline();r.getEvents().forEach((function(e){n.addLiveEvent(e)}));let o=r;for(;o.getNeighbouringTimeline(s.b.BACKWARDS);)o=o.getNeighbouringTimeline(s.b.BACKWARDS);return n.getLiveTimeline().setPaginationToken(o.getPaginationToken(s.b.BACKWARDS),s.b.BACKWARDS),n}removeFilteredTimelineSet(e){const t=this.filteredTimelineSets[e.filterId];delete this.filteredTimelineSets[e.filterId];const n=this.timelineSets.indexOf(t);n>-1&&this.timelineSets.splice(n,1)}addLiveEvent(e,t,n=!1){if(e.isRedaction()){const t=e.event.redacts,n=this.getUnfilteredTimelineSet().findEventById(t);if(n){if(n.makeRedacted(e),n.getStateKey()){this.currentState.getStateEvents(n.getType(),n.getStateKey()).getId()===n.getId()&&this.currentState.setStateEvents([n])}this.emit("Room.redaction",e,this)}}if(e.getUnsigned().transaction_id){const t=this.txnToEvent[e.getUnsigned().transaction_id];if(t)return void this.handleRemoteEcho(e,t)}for(let r=0;r<this.timelineSets.length;r++)this.timelineSets[r].addLiveEvent(e,t,n);e.sender&&e.getType()!==g.a.RoomRedaction&&this.addReceipt(y(e.sender.userId,e,"m.read"),!0)}addPendingEvent(e,t){if(e.status!==u.a.SENDING&&e.status!==u.a.NOT_SENT)throw new Error("addPendingEvent called on an event with status "+e.status);if(this.txnToEvent[t])throw new Error("addPendingEvent called on an event with known txnId "+t);if(s.b.setEventMetadata(e,this.getLiveTimeline().getState(s.b.FORWARDS),!1),this.txnToEvent[t]=e,"detached"==this.opts.pendingEventOrdering){if(this.pendingEventList.some(e=>e.status===u.a.NOT_SENT)&&(p.a.warn("Setting event as NOT_SENT due to messages in the same state"),e.setStatus(u.a.NOT_SENT)),this.pendingEventList.push(e),this.savePendingEvents(),e.isRelation()&&this.aggregateNonLiveRelation(e),e.isRedaction()){const t=e.event.redacts;let n=this.pendingEventList&&this.pendingEventList.find(e=>e.getId()===t);n||(n=this.getUnfilteredTimelineSet().findEventById(t)),n&&(n.markLocallyRedacted(e),this.emit("Room.redaction",e,this))}}else for(let t=0;t<this.timelineSets.length;t++){const n=this.timelineSets[t];n.getFilter()?n.getFilter().filterRoomTimeline([e]).length&&n.addEventToTimeline(e,n.getLiveTimeline(),!1):n.addEventToTimeline(e,n.getLiveTimeline(),!1)}this.emit("Room.localEchoUpdated",e,this,null,null)}savePendingEvents(){if(this.pendingEventList){const e=this.pendingEventList.map(e=>b(b({},e.event),{},{txn_id:e.getTxnId()})).filter(e=>{const t=e.type===g.a.RoomMessageEncrypted,n=this.client.isRoomEncrypted(this.roomId);return t||!n}),{store:t}=this.client.sessionStore;this.pendingEventList.length>0?t.setItem(w(this.roomId),JSON.stringify(e)):t.removeItem(w(this.roomId))}}aggregateNonLiveRelation(e){for(let t=0;t<this.timelineSets.length;t++){const n=this.timelineSets[t];n.getFilter()?n.getFilter().filterRoomTimeline([e]).length&&n.aggregateRelations(e):n.aggregateRelations(e)}}handleRemoteEcho(e,t){const n=t.getId(),r=e.getId(),o=t.status;p.a.debug(`Got remote echo for event ${n} -> ${r} old status `+o),delete this.txnToEvent[e.getUnsigned().transaction_id],this.pendingEventList&&this.removePendingEvent(n),t.handleRemoteEcho(e.event);for(let e=0;e<this.timelineSets.length;e++){this.timelineSets[e].handleRemoteEcho(t,n,r)}this.emit("Room.localEchoUpdated",t,this,n,o)}updatePendingEvent(e,t,n){if(p.a.log(`setting pendingEvent status to ${t} in ${e.getRoomId()} event ID ${e.getId()} -> ${n}`),t==u.a.SENT&&!n)throw new Error("updatePendingEvent called with status=SENT, but no new event id");if(t==u.a.SENT){if(this.getUnfilteredTimelineSet().eventIdToTimeline(n))return}const r=e.status,o=e.getId();if(!r)throw new Error("updatePendingEventStatus called on an event which is not a local echo.");const i=C[r];if(!i||i.indexOf(t)<0)throw new Error("Invalid EventStatus transition "+r+"->"+t);if(e.setStatus(t),t==u.a.SENT){e.replaceLocalEventId(n);for(let e=0;e<this.timelineSets.length;e++)this.timelineSets[e].replaceEventId(o,n)}else if(t==u.a.CANCELLED){if(this.pendingEventList){const e=this.pendingEventList.findIndex(e=>e.getId()===o);if(-1!==e){const[t]=this.pendingEventList.splice(e,1);t.isRedaction()&&this.revertRedactionLocalEcho(t)}}this.removeEvent(o)}this.savePendingEvents(),this.emit("Room.localEchoUpdated",e,this,o,r)}revertRedactionLocalEcho(e){const t=e.event.redacts;if(!t)return;const n=this.getUnfilteredTimelineSet().findEventById(t);n&&(n.unmarkLocallyRedacted(),this.emit("Room.redactionCancelled",e,this),n.isRelation()&&this.aggregateNonLiveRelation(n))}addLiveEvents(e,t,n=!1){let r;if(t&&-1===["replace","ignore"].indexOf(t))throw new Error("duplicateStrategy MUST be either 'replace' or 'ignore'");for(r=0;r<this.timelineSets.length;r++){const e=this.timelineSets[r].getLiveTimeline();if(e.getPaginationToken(s.b.FORWARDS))throw new Error("live timeline "+r+" is no longer live - it has a pagination token ("+e.getPaginationToken(s.b.FORWARDS)+")");if(e.getNeighbouringTimeline(s.b.FORWARDS))throw new Error("live timeline "+r+" is no longer live - it has a neighbouring timeline")}for(r=0;r<e.length;r++)this.addLiveEvent(e[r],t,n)}addEphemeralEvents(e){for(const t of e)"m.typing"===t.getType()?this.currentState.setTypingEvent(t):"m.receipt"===t.getType()&&this.addReceipt(t)}removeEvents(e){for(let t=0;t<e.length;++t)this.removeEvent(e[t])}removeEvent(e){let t=!1;for(let n=0;n<this.timelineSets.length;n++){const r=this.timelineSets[n].removeEvent(e);r&&(r.isRedaction()&&this.revertRedactionLocalEcho(r),t=!0)}return t}recalculate(){const e=this.currentState.getStateEvents(g.a.RoomMember,this.myUserId);if(e&&"invite"===e.getContent().membership){(e.getUnsigned().invite_room_state||[]).forEach(e=>{this.currentState.getStateEvents(e.type,e.state_key)||this.currentState.setStateEvents([new u.b({type:e.type,state_key:e.state_key,content:e.content,event_id:"$fake"+Date.now(),room_id:this.roomId,user_id:this.myUserId})])})}const t=this.name;this.name=this.calculateRoomName(this.myUserId),this.normalizedName=Object(l.z)(this.name),this.summary=new h(this.roomId,{title:this.name}),t!==this.name&&this.emit("Room.name",this)}getUsersReadUpTo(e){return this.getReceiptsForEvent(e).filter((function(e){return"m.read"===e.type})).map((function(e){return e.userId}))}getEventReadUpTo(e,t=!1){let n=this.receipts;return t&&(n=this.realReceipts),void 0===n["m.read"]||void 0===n["m.read"][e]?null:n["m.read"][e].eventId}hasUserReadEvent(e,t){const n=this.getEventReadUpTo(e,!1);if(n===t)return!0;if(this.timeline.length&&this.timeline[this.timeline.length-1].getSender()&&this.timeline[this.timeline.length-1].getSender()===e)return!0;for(let e=this.timeline.length-1;e>=0;--e){const r=this.timeline[e];if(r.getId()===t)return!1;if(r.getId()===n)return!0}return!1}getReceiptsForEvent(e){return this.receiptCacheByEventId[e.getId()]||[]}addReceipt(e,t=!1){t||this.addReceiptsToStructure(e,this.realReceipts),this.addReceiptsToStructure(e,this.receipts),this.receiptCacheByEventId=this.buildReceiptCache(this.receipts),this.emit("Room.receipt",e,this)}addReceiptsToStructure(e,t){const n=e.getContent();Object.keys(n).forEach(e=>{Object.keys(n[e]).forEach(r=>{Object.keys(n[e][r]).forEach(o=>{const i=n[e][r][o];t[r]||(t[r]={});const a=t[r][o];if(a){const t=this.getUnfilteredTimelineSet().compareEventOrdering(a.eventId,e);if(null!==t&&t>=0)return}else t[r][o]={};t[r][o]={eventId:e,data:i}})})})}buildReceiptCache(e){const t={};return Object.keys(e).forEach((function(n){Object.keys(e[n]).forEach((function(r){const o=e[n][r];t[o.eventId]||(t[o.eventId]=[]),t[o.eventId].push({userId:r,type:n,data:o.data})}))})),t}addLocalEchoReceipt(e,t,n){this.addReceipt(y(e,t,n),!0)}addTags(e){this.tags=e.getContent().tags||{},this.emit("Room.tags",e,this)}addAccountData(e){for(let t=0;t<e.length;t++){const n=e[t];"m.tag"===n.getType()&&this.addTags(n);const r=this.accountData[n.getType()];this.accountData[n.getType()]=n,this.emit("Room.accountData",n,this,r)}}getAccountData(e){return this.accountData[e]}maySendMessage(){return"join"===this.getMyMembership()&&this.currentState.maySendEvent(g.a.RoomMessage,this.myUserId)}canInvite(e){let t="join"===this.getMyMembership();const n=this.currentState.getStateEvents(g.a.RoomPowerLevels,""),r=n&&n.getContent(),o=this.getMember(e);return r&&o&&r.invite>o.powerLevel&&(t=!1),t}getJoinRule(){return this.currentState.getJoinRule()}getType(){const e=this.currentState.getStateEvents(g.a.RoomCreate,"");if(e)return e.getContent()[g.d];this.getTypeWarning||(p.a.warn("[getType] Room "+this.roomId+" does not have an m.room.create event"),this.getTypeWarning=!0)}isSpaceRoom(){return this.getType()===g.e.Space}calculateRoomName(e,t=!1){if(!t){const e=this.currentState.getStateEvents(g.a.RoomName,"");if(e&&e.getContent()&&e.getContent().name)return e.getContent().name}let n=this.getCanonicalAlias();if(!n){const e=this.getAltAliases();e.length&&(n=e[0])}if(n)return n;let r=this.currentState.getJoinedMemberCount()+this.currentState.getInvitedMemberCount()-1,o=[];const i=this.currentState.getStateEvents(g.f.name,"");Array.isArray(null==i?void 0:i.getContent().service_members)&&(o=i.getContent().service_members);let a=null;if(this.summaryHeroes)a=[],this.summaryHeroes.forEach(e=>{if(o.includes(e))return void r--;const t=this.getMember(e);a.push(t?t.name:e)});else{let t=this.currentState.getMembers().filter(t=>t.userId!==e&&("invite"===t.membership||"join"===t.membership));t=t.filter(({userId:e})=>!o.includes(e)||(r--,!1)),t.sort((e,t)=>l.g(e.userId,t.userId)),t=t.slice(0,5),a=t.map(e=>e.name)}if(r)return T(a,r);if("join"==this.getMyMembership()){const e=this.currentState.getStateEvents(g.a.RoomThirdPartyInvite);if(e&&e.length){return"Inviting "+T(e.map(e=>e.getContent().display_name))}}let s=a;return s.length||(s=this.currentState.getMembers().filter(t=>t.userId!==e&&"invite"!==t.membership&&"join"!==t.membership).map(e=>e.name)),s.length?`Empty room (was ${T(s)})`:"Empty room"}}function w(e){return"mx_pending_events_"+e}const C={};function T(e,t=e.length+1){const n=t-1;if(e.length){if(1===e.length&&n<=1)return e[0];if(2===e.length&&n<=2)return`${e[0]} and ${e[1]}`;return n>1?`${e[0]} and ${n} others`:e[0]+" and 1 other"}return"Empty room"}C[u.a.ENCRYPTING]=[u.a.SENDING,u.a.NOT_SENT],C[u.a.SENDING]=[u.a.ENCRYPTING,u.a.QUEUED,u.a.NOT_SENT,u.a.SENT],C[u.a.QUEUED]=[u.a.SENDING,u.a.CANCELLED],C[u.a.SENT]=[],C[u.a.NOT_SENT]=[u.a.SENDING,u.a.QUEUED,u.a.CANCELLED],C[u.a.CANCELLED]=[]},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return c}));var r=n(82);var o={};function i(e){return a(e.getCanonicalAlias(),e.getAltAliases())}function a(e,t){return o.getDisplayAliasForAliasSet?o.getDisplayAliasForAliasSet(e,t):e||(null==t?void 0:t[0])}function s(e,t){let n;if(t){n=function(e,t){let n,r;for(const o of e.getJoinedMembers())o.userId!=t&&(void 0===n||o.events.member&&o.events.member.getTs()<n)&&(r=o,n=o.events.member.getTs());if(r)return r.userId;for(const o of e.currentState.getMembers())o.userId!=t&&(void 0===n||o.events.member&&o.events.member.getTs()<n)&&(r=o,n=o.events.member.getTs());return void 0===r?t:r.userId}(e,r.a.get().getUserId())}else n=null;return c(e.roomId,n)}async function c(e,t){if(r.a.get().isGuest())return;const n=r.a.get().getAccountData("m.direct");let o={};void 0!==n&&(o=n.getContent());for(const n of Object.keys(o)){const r=o[n];if(n!=t){const t=r.indexOf(e);t>-1&&r.splice(t,1)}}if(t){const n=o[t]||[];-1==n.indexOf(e)&&n.push(e),o[t]=n}await r.a.get().setAccountData("m.direct",o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"c",(function(){return R})),n.d(t,"b",(function(){return D}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(83),c=n(89),l=n(80),u=n(87),d=n(126),h=n(614),p=n.n(h),m=n(1084),g=n.n(m),f=n(97),_=n(91),b=n(112),v=n(2),y=n(1086),E=n.n(y);class S{static get instance(){return S.internalInstance}constructor(){o()(this,"worker",void 0),o()(this,"seq",0),o()(this,"pendingDeferredMap",new Map),o()(this,"onMessage",e=>{const{seq:t,blurhash:n}=e.data,r=this.pendingDeferredMap.get(t);r&&(this.pendingDeferredMap.delete(t),r.resolve(n))}),this.worker=new E.a,this.worker.onmessage=this.onMessage}getBlurhash(e){const t=this.seq++,n=Object(v.l)();return this.pendingDeferredMap.set(t,n),this.worker.postMessage({seq:t,imageData:e}),n.promise}}o()(S,"internalInstance",new S);const w=[0,0,22,37,0,0,22,37,1],C="xyz.amorgan.blurhash";class T extends Error{}async function x(e,t,n,r){let o,i=t,a=n;a>600&&(i=Math.floor(i*(600/a)),a=600),i>800&&(a=Math.floor(a*(800/i)),i=800),window.OffscreenCanvas?o=new window.OffscreenCanvas(i,a):(o=document.createElement("canvas"),o.width=i,o.height=a);const s=o.getContext("2d");let c;s.drawImage(e,0,0,i,a),c=window.OffscreenCanvas?o.convertToBlob({type:r}):new Promise(e=>o.toBlob(e,r));const l=s.getImageData(0,0,i,a),u=await S.instance.getBlurhash(l),d=await c;return{info:{thumbnail_info:{w:i,h:a,mimetype:d.type,size:d.size},w:t,h:n,[C]:u},thumbnail:d}}async function k(e,t,n){let r="image/png";"image/jpeg"===n.type&&(r="image/jpeg");const o=await async function(e){const t=document.createElement("img"),n=URL.createObjectURL(e),r=new Promise((e,r)=>{t.onload=function(){URL.revokeObjectURL(n),e(t)},t.onerror=function(e){r(e)}});let o;if(t.src=n,"image/png"===e.type){o=O(e).then(e=>{const t=new Uint8Array(e),n=g()(t);for(const e of n)if("pHYs"===e.name){if(e.data.byteLength!==w.length)return;return e.data.every((e,t)=>e===w[t])}return!1})}const[i]=await Promise.all([o,r]);return{width:i?t.width>>1:t.width,height:i?t.height>>1:t.height,img:t}}(n),i=await x(o.img,o.width,o.height,r),a=i.info,s=n.size-a.thumbnail_info.size;if(n.size<=32768||s<=65536&&s<=.1*n.size)return delete a.thumbnail_info,a;const c=await R(e,t,i.thumbnail);return a.thumbnail_url=c.url,a.thumbnail_file=c.file,a}function F(e,t,n){let r;return function(e){return new Promise((t,n)=>{const r=document.createElement("video");r.preload="metadata",r.playsInline=!0,r.muted=!0;const o=new FileReader;o.onload=function(e){r.onloadeddata=async function(){t(r),r.pause()},r.onerror=function(e){n(e)},r.src=e.target.result,r.load(),r.play()},o.onerror=function(e){n(e)},o.readAsDataURL(e)})}(n).then(e=>x(e,e.videoWidth,e.videoHeight,"image/jpeg")).then(n=>(r=n.info,R(e,t,n.thumbnail))).then(e=>(r.thumbnail_url=e.url,r.thumbnail_file=e.file,r))}function O(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e)},r.readAsArrayBuffer(e)})}function R(e,t,n,r){let o=!1;if(e.isRoomEncrypted(t)){let t,i;const a=O(n).then((function(e){if(o)throw new T;return p.a.encryptAttachment(e)})).then((function(n){if(o)throw new T;i=n.info;const a=new Blob([n.data]);return t=e.uploadContent(a,{progressHandler:r,includeFilename:!1}),t})).then((function(e){if(o)throw new T;return i.url=e,n.type&&(i.mimetype=n.type),{file:i}}));return a.abort=()=>{o=!0,t&&e.cancelUpload(t)},a}{const t=e.uploadContent(n,{progressHandler:r}),i=t.then((function(e){if(o)throw new T;return{url:e}}));return i.abort=()=>{o=!0,e.cancelUpload(t)},i}}class D{constructor(){o()(this,"inprogress",[]),o()(this,"mediaConfig",null)}sendStickerContentToRoom(e,t,n,r,o){const i=b.a.getTimestamp(),a=o.sendStickerMessage(t,e,n,r).catch(n=>{throw console.warn(`Failed to send content with URL ${e} to room ${t}`,n),n});return b.a.instance.trackSendMessage(i,a,t,!1,!1,{msgtype:"m.sticker"}),a}getUploadLimit(){return null!==this.mediaConfig&&void 0!==this.mediaConfig["m.upload.size"]?this.mediaConfig["m.upload.size"]:null}async sendContentListToRoom(e,t,n){if(n.isGuest())return void s.a.dispatch({action:"require_registration"});if(Boolean(d.a.getQuotingEvent())){const e=c.getComponent("dialogs.QuestionDialog"),{finished:t}=u.a.createTrackedDialog("Upload Reply Warning","",e,{title:Object(l.a)("Replying With Files"),description:a.a.createElement("div",null,Object(l.a)("At this time it is not possible to reply with a file. Would you like to upload this file without replying?")),hasCancelButton:!0,button:Object(l.a)("Continue")}),[n]=await t;if(!n)return}if(!this.mediaConfig){const e=u.a.createDialog(f.a,null,"mx_Dialog_spinner");await this.ensureMediaConfigFetched(n),e.close()}const r=[],o=[];for(let t=0;t<e.length;++t)this.isFileSizeAcceptable(e[t])?o.push(e[t]):r.push(e[t]);if(r.length>0){const t=c.getComponent("dialogs.UploadFailureDialog"),{finished:n}=u.a.createTrackedDialog("Upload Failure","",t,{badFiles:r,totalFiles:e.length,contentMessages:this}),[o]=await n;if(!o)return}let i=!1,h=Promise.resolve();for(let e=0;e<o.length;++e){const r=o[e];if(!i){const t=c.getComponent("dialogs.UploadConfirmDialog"),{finished:n}=u.a.createTrackedDialog("Upload Files confirmation","",t,{file:r,currentIndex:e,totalFiles:o.length}),[a,s]=await n;if(!a)break;s&&(i=!0)}h=this.sendContentToRoom(r,t,n,h)}}getCurrentUploads(){return this.inprogress.filter(e=>!e.canceled)}cancelUpload(e,t){let n;for(let t=0;t<this.inprogress.length;++t)if(this.inprogress[t].promise===e){n=this.inprogress[t];break}n&&(n.canceled=!0,t.cancelUpload(n.promise),s.a.dispatch({action:_.a.UploadCanceled,upload:n}))}sendContentToRoom(e,t,n,r){const o=b.a.getTimestamp(),i={body:e.name||"Attachment",info:{size:e.size},msgtype:""};e.type&&(i.info.mimetype=e.type);const a=new Promise(r=>{0===e.type.indexOf("image/")?(i.msgtype="m.image",k(n,t,e).then(e=>{Object.assign(i.info,e),r()},e=>{console.error(e),i.msgtype="m.file",r()})):0===e.type.indexOf("audio/")?(i.msgtype="m.audio",r()):0===e.type.indexOf("video/")?(i.msgtype="m.video",F(n,t,e).then(e=>{Object.assign(i.info,e),r()},e=>{i.msgtype="m.file",r()})):(i.msgtype="m.file",r())});a.abort=()=>{d.canceled=!0};const d={fileName:e.name||"Attachment",roomId:t,total:e.size,loaded:0,promise:a};function h(e){d.total=e.total,d.loaded=e.loaded,s.a.dispatch({action:_.a.UploadProgress,upload:d})}let p;return this.inprogress.push(d),s.a.dispatch({action:_.a.UploadStarted,upload:d}),s.a.fire(_.a.FocusSendMessageComposer),a.then((function(){if(d.canceled)throw new T;return d.promise=R(n,t,e,h),d.promise.then((function(e){i.file=e.file,i.url=e.url}))})).then(()=>r).then((function(){if(d.canceled)throw new T;const e=n.sendMessage(t,i);return b.a.instance.trackSendMessage(o,e,t,!1,!1,i),e}),(function(e){if(p=e,!d.canceled){let t=Object(l.a)("The file '%(fileName)s' failed to upload.",{fileName:d.fileName});413===e.http_status&&(t=Object(l.a)("The file '%(fileName)s' exceeds this homeserver's size limit for uploads",{fileName:d.fileName}));const n=c.getComponent("dialogs.ErrorDialog");u.a.createTrackedDialog("Upload failed","",n,{title:Object(l.a)("Upload Failed"),description:t})}})).finally(()=>{for(let e=0;e<this.inprogress.length;++e)if(this.inprogress[e].promise===d.promise){this.inprogress.splice(e,1);break}p?(p&&413===p.http_status&&(this.mediaConfig=null),s.a.dispatch({action:_.a.UploadFailed,upload:d,error:p})):(s.a.dispatch({action:_.a.UploadFinished,upload:d}),s.a.dispatch({action:"message_sent"}))})}isFileSizeAcceptable(e){return!(null!==this.mediaConfig&&void 0!==this.mediaConfig["m.upload.size"]&&e.size>this.mediaConfig["m.upload.size"])}ensureMediaConfigFetched(e){if(null===this.mediaConfig)return console.log("[Media Config] Fetching"),e.getMediaConfig().then(e=>(console.log("[Media Config] Fetched config:",e),e)).catch(()=>(console.log("[Media Config] Could not fetch config, so not limiting uploads."),{})).then(e=>{this.mediaConfig=e})}static sharedInstance(){return void 0===window.mxContentMessages&&(window.mxContentMessages=new D),window.mxContentMessages}}},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.IS="SERVICE_TYPE_IS",e.IM="SERVICE_TYPE_IM"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(86),h=n.n(d),p=n(81);const m=["children","className","disabled","outlined","childrenInLabel"];var g,f,_;let b=Object(p.a)("views.elements.StyledRadioButton")((_=f=class extends u.a.PureComponent{render(){const e=this.props,{children:t,className:n,disabled:r,outlined:i,childrenInLabel:s}=e,c=a()(e,m),l=h()("mx_RadioButton",n,{mx_RadioButton_disabled:r,mx_RadioButton_enabled:!r,mx_RadioButton_checked:this.props.checked,mx_RadioButton_outlined:i}),d=u.a.createElement(u.a.Fragment,null,u.a.createElement("input",o()({type:"radio",disabled:r},c)),u.a.createElement("div",null,u.a.createElement("div",null)));return s?u.a.createElement("label",{className:l},d,u.a.createElement("div",{className:"mx_RadioButton_content"},t),u.a.createElement("div",{className:"mx_RadioButton_spacer"})):u.a.createElement("div",{className:l},u.a.createElement("label",{className:"mx_RadioButton_innerLabel"},d),u.a.createElement("div",{className:"mx_RadioButton_content"},t),u.a.createElement("div",{className:"mx_RadioButton_spacer"}))}},c()(f,"defaultProps",{className:"",childrenInLabel:!0}),g=_))||g},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(78),o=n.n(r),i=n(86),a=n.n(i),s=n(117),c=n(80),l=n(85),u=n(83),d=n(91);const h=({className:e,title:t,children:n})=>o.a.createElement("div",{className:a()("mx_BaseCard_Group",e)},o.a.createElement("h1",null,t),n);t.b=({closeLabel:e,onClose:t,className:n,header:r,footer:i,withoutScrollContainer:h,previousPhase:p,children:m,refireParams:g})=>{let f,_;if(p){const e=()=>{u.a.dispatch({action:d.a.SetRightPanelPhase,phase:p,refireParams:g})};f=o.a.createElement(l.a,{className:"mx_BaseCard_back",onClick:e,title:Object(c.a)("Back")})}return t&&(_=o.a.createElement(l.a,{className:"mx_BaseCard_close",onClick:t,title:e||Object(c.a)("Close")})),h||(m=o.a.createElement(s.a,null,m)),o.a.createElement("div",{className:a()("mx_BaseCard",n)},o.a.createElement("div",{className:"mx_BaseCard_header"},f,_,r),m,i&&o.a.createElement("div",{className:"mx_BaseCard_footer"},i))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,s){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],u=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,(function(){return l[u++]})))}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return x}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(234),l=n(80),u=n(529),d=n(84),h=n(842),p=n(843),m=n(846),g=n(849),f=n(851),_=n(852),b=n(853),v=n(855),y=n(90),E=n(857),S=n(113),w=n(81),C=n(95);let T;!function(e){e.General="USER_GENERAL_TAB",e.Appearance="USER_APPEARANCE_TAB",e.Flair="USER_FLAIR_TAB",e.Notifications="USER_NOTIFICATIONS_TAB",e.Preferences="USER_PREFERENCES_TAB",e.Voice="USER_VOICE_TAB",e.Security="USER_SECURITY_TAB",e.Labs="USER_LABS_TAB",e.Mjolnir="USER_MJOLNIR_TAB",e.Help="USER_HELP_TAB"}(T||(T={}));let x=Object(w.a)("views.dialogs.UserSettingsDialog")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"mjolnirWatcher",void 0),i()(this,"mjolnirChanged",(e,t,n,r)=>{this.setState({mjolnirEnabled:r})}),this.state={mjolnirEnabled:d.b.getValue("feature_mjolnir")}}componentDidMount(){this.mjolnirWatcher=d.b.watchSetting("feature_mjolnir",null,this.mjolnirChanged)}componentWillUnmount(){d.b.unwatchSetting(this.mjolnirWatcher)}getTabs(){const e=[];return e.push(new c.a(T.General,Object(l.b)("General"),"mx_UserSettingsDialog_settingsIcon",s.a.createElement(u.a,{closeSettingsFn:this.props.onFinished}))),e.push(new c.a(T.Appearance,Object(l.b)("Appearance"),"mx_UserSettingsDialog_appearanceIcon",s.a.createElement(p.a,null))),d.b.getValue(S.a.Flair)&&e.push(new c.a(T.Flair,Object(l.b)("Flair"),"mx_UserSettingsDialog_flairIcon",s.a.createElement(v.a,null))),e.push(new c.a(T.Notifications,Object(l.b)("Notifications"),"mx_UserSettingsDialog_bellIcon",s.a.createElement(g.a,null))),e.push(new c.a(T.Preferences,Object(l.b)("Preferences"),"mx_UserSettingsDialog_preferencesIcon",s.a.createElement(f.a,null))),d.b.getValue(S.a.Voip)&&e.push(new c.a(T.Voice,Object(l.b)("Voice & Video"),"mx_UserSettingsDialog_voiceIcon",s.a.createElement(_.a,null))),e.push(new c.a(T.Security,Object(l.b)("Security & Privacy"),"mx_UserSettingsDialog_securityIcon",s.a.createElement(m.a,{closeSettingsFn:this.props.onFinished}))),(y.a.get().showLabsSettings||d.b.getFeatureSettingNames().some(e=>d.b.getBetaInfo(e)))&&e.push(new c.a(T.Labs,Object(l.b)("Labs"),"mx_UserSettingsDialog_labsIcon",s.a.createElement(h.a,null))),this.state.mjolnirEnabled&&e.push(new c.a(T.Mjolnir,Object(l.b)("Ignored users"),"mx_UserSettingsDialog_mjolnirIcon",s.a.createElement(E.a,null))),e.push(new c.a(T.Help,Object(l.b)("Help & About"),"mx_UserSettingsDialog_helpIcon",s.a.createElement(b.a,{closeSettingsFn:()=>this.props.onFinished(!0)}))),e}render(){return s.a.createElement(C.a,{className:"mx_UserSettingsDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(l.a)("Settings")},s.a.createElement("div",{className:"mx_SettingsDialog_content"},s.a.createElement(c.c,{tabs:this.getTabs(),initialTabId:this.props.initialTabId})))}})||r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FOCUS_GROUP="data-focus-lock",t.FOCUS_DISABLED="data-focus-lock-disabled",t.FOCUS_ALLOW="data-no-focus-lock",t.FOCUS_AUTO="data-autofocus-inside"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r=new RegExp("^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$","i");function o(e){return r.test(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(188),o=n(134),i=n(82),a=n(87),s=n(89),c=n(80),l=n(267),u=n(266),d=n(236);class h extends Error{}class p{constructor(e=null){this.accessToken=null,this.authEnabled=!0,this.tempClient=e?Object(o.createClient)({baseUrl:"",idBaseUrl:e}):null}get _matrixClient(){return this.tempClient?this.tempClient:i.a.get()}_writeToken(){this.tempClient||window.localStorage.setItem("mx_is_access_token",this.accessToken)}_readToken(){return this.tempClient?null:window.localStorage.getItem("mx_is_access_token")}hasCredentials(){return null!=this.accessToken}async getAccessToken({check:e=!0}={}){if(!this.authEnabled)return null;let t=this.accessToken;if(t||(t=this._readToken()),!t)return t=await this.registerForToken(e),t&&(this.accessToken=t,this._writeToken()),t;if(e)try{await this._checkToken(t)}catch(e){if(e instanceof l.b||e instanceof h)throw e;t=await this.registerForToken(),t&&(this.accessToken=t,this._writeToken())}return t}async _checkToken(e){const t=this._matrixClient.getIdentityServerUrl();try{await this._matrixClient.getIdentityAccount(e)}catch(n){if("M_TERMS_NOT_SIGNED"===n.errcode)return console.log("Identity server requires new terms to be agreed to"),void await Object(l.d)([new l.a(r.a.IS,t,e)]);throw n}if(!this.tempClient&&!Object(u.a)()&&!await Object(u.b)(t)){const e=s.getComponent("dialogs.QuestionDialog"),{finished:n}=a.a.createTrackedDialog("Default identity server terms warning","",e,{title:Object(c.a)("Identity server has no terms of service"),description:React.createElement("div",null,React.createElement("p",null,Object(c.a)("This action requires accessing the default identity server <server /> to validate an email address or phone number, but the server does not have any terms of service.",{},{server:()=>React.createElement("b",null,Object(d.a)(t))})),React.createElement("p",null,Object(c.a)("Only continue if you trust the owner of the server."))),button:Object(c.a)("Trust")}),[r]=await n;if(!r)throw new h("User aborted identity server action without terms");Object(u.d)()}}async registerForToken(e=!0){const t=await i.a.get().getOpenIdToken(),{access_token:n,token:r}=await this._matrixClient.registerWithIdentityServer(t),o=r||n;return e&&await this._checkToken(o),o}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(107),o=n(122),i=n(100),a=n(102);function s(e,t,n,r){let o;return null!=e&&e.getMxcAvatarUrl()&&(o=Object(i.b)(e.getMxcAvatarUrl()).getThumbnailOfSourceHttp(t,n,r)),o||(o=u(e?e.userId:"")),o}function c(e,t,n,r){return e.avatarUrl?Object(i.b)(e.avatarUrl).getThumbnailOfSourceHttp(t,n,r):null}const l=new Map;function u(e){if(!e)return"";const t=["#0DBD8B","#368bd6","#ac3ba8"];let n=0;for(let t=0;t<e.length;++t)n+=e.charCodeAt(t);const r=n%t.length,o="--avatar-background-colors_"+r,i=document.body.style.getPropertyValue(o)||t[r];let a=l.get(i);return a||(!function(e){return"string"==typeof e&&(7===e.length||9===e.length)&&"#"===e.charAt(0)&&!e.substr(1).split("").some(e=>isNaN(parseInt(e,16)))}(i)?a="":(a=function(e){const t=document.createElement("canvas");t.width=40,t.height=40;const n=t.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,40,40),t.toDataURL()):""}(i),l.set(i,a))),a}function d(e){if(!e)return void console.trace("`name` argument to `getInitialLetter` not supplied");if(e.length<1)return;const t=e[0];return"@"!==t&&"#"!==t&&"+"!==t||!e[1]||(e=e.substring(1)),Object(r.split)(e,"",1)[0].toUpperCase()}function h(e,t,n,r){var s;if(!e)return null;if(e.getMxcAvatarUrl())return Object(i.b)(e.getMxcAvatarUrl()).getThumbnailOfSourceHttp(t,n,r);if(a.g.spacesEnabled&&e.isSpaceRoom())return null;let c=null;const l=o.a.shared().getUserIdForRoomId(e.roomId);return c=l?e.getMember(l):e.getAvatarFallbackMember(),null!==(s=c)&&void 0!==s&&s.getMxcAvatarUrl()?Object(i.b)(c.getMxcAvatarUrl()).getThumbnailOfSourceHttp(t,n,r):null}},function(e,t,n){"use strict";const r=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const o=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS={[r.HTML]:{[o.ADDRESS]:!0,[o.APPLET]:!0,[o.AREA]:!0,[o.ARTICLE]:!0,[o.ASIDE]:!0,[o.BASE]:!0,[o.BASEFONT]:!0,[o.BGSOUND]:!0,[o.BLOCKQUOTE]:!0,[o.BODY]:!0,[o.BR]:!0,[o.BUTTON]:!0,[o.CAPTION]:!0,[o.CENTER]:!0,[o.COL]:!0,[o.COLGROUP]:!0,[o.DD]:!0,[o.DETAILS]:!0,[o.DIR]:!0,[o.DIV]:!0,[o.DL]:!0,[o.DT]:!0,[o.EMBED]:!0,[o.FIELDSET]:!0,[o.FIGCAPTION]:!0,[o.FIGURE]:!0,[o.FOOTER]:!0,[o.FORM]:!0,[o.FRAME]:!0,[o.FRAMESET]:!0,[o.H1]:!0,[o.H2]:!0,[o.H3]:!0,[o.H4]:!0,[o.H5]:!0,[o.H6]:!0,[o.HEAD]:!0,[o.HEADER]:!0,[o.HGROUP]:!0,[o.HR]:!0,[o.HTML]:!0,[o.IFRAME]:!0,[o.IMG]:!0,[o.INPUT]:!0,[o.LI]:!0,[o.LINK]:!0,[o.LISTING]:!0,[o.MAIN]:!0,[o.MARQUEE]:!0,[o.MENU]:!0,[o.META]:!0,[o.NAV]:!0,[o.NOEMBED]:!0,[o.NOFRAMES]:!0,[o.NOSCRIPT]:!0,[o.OBJECT]:!0,[o.OL]:!0,[o.P]:!0,[o.PARAM]:!0,[o.PLAINTEXT]:!0,[o.PRE]:!0,[o.SCRIPT]:!0,[o.SECTION]:!0,[o.SELECT]:!0,[o.SOURCE]:!0,[o.STYLE]:!0,[o.SUMMARY]:!0,[o.TABLE]:!0,[o.TBODY]:!0,[o.TD]:!0,[o.TEMPLATE]:!0,[o.TEXTAREA]:!0,[o.TFOOT]:!0,[o.TH]:!0,[o.THEAD]:!0,[o.TITLE]:!0,[o.TR]:!0,[o.TRACK]:!0,[o.UL]:!0,[o.WBR]:!0,[o.XMP]:!0},[r.MATHML]:{[o.MI]:!0,[o.MO]:!0,[o.MN]:!0,[o.MS]:!0,[o.MTEXT]:!0,[o.ANNOTATION_XML]:!0},[r.SVG]:{[o.TITLE]:!0,[o.FOREIGN_OBJECT]:!0,[o.DESC]:!0}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return h}));var r=n(108),o=n(82),i=n(271),a=n(144),s=n(84),c=n(93);function l(e){const{status:t}=e;if((!t||t===r.a.SENT)&&!e.isRedacted())if("m.room.message"===e.getType()){const t=e.getContent();if(t.msgtype&&"m.bad.encrypted"!==t.msgtype&&t.hasOwnProperty("body"))return!0}else if("m.sticker"===e.getType())return!0;return!1}function u(e){if(e.status===r.a.CANCELLED||"m.room.message"!==e.getType()||e.isRedacted())return!1;const t=e.getOriginalContent(),{msgtype:n}=t;return("m.text"===n||"m.emote"===n)&&t.body&&"string"==typeof t.body&&e.getSender()===o.a.get().getUserId()}function d(e,t,n){const r=e.getLiveTimeline().getEvents().concat(e.getPendingEvents()),o=r.length-1,a=t?1:-1,s=t?0:o;let c=t?o:0;n||(c=Math.min(Math.max(0,s+100*a),o));let l=!n;for(let e=s;e!==c+a;e+=a){const t=r[e];if(l||t.getId()!==n){if(l&&!Object(i.a)(t)&&u(t))return t}else l=!0,c=Math.min(Math.max(0,e+100*a),o)}}function h(e){const t=e.getContent().msgtype,n=e.getType();let r=Object(a.c)(e),o=n.startsWith("m.key.verification")||n===c.a.RoomMessage&&t&&t.startsWith("m.key.verification")||n===c.a.RoomCreate||n===c.a.RoomEncryption||n===c.a.CallInvite||"messages.MJitsiWidgetEvent"===r,i=!o&&n!==c.a.RoomMessage&&n!==c.a.Sticker&&n!==c.a.RoomCreate;return s.b.getValue("showHiddenEventsInTimeline")&&!Object(a.d)(e)&&(r="messages.ViewSourceEvent",o=!1,i=!0),{tileHandler:r,isInfoMessage:i,isBubbleMessage:o}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(107),a=n(2);function s(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}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class l{constructor(e,t={keys:[]}){o()(this,"_options",void 0),o()(this,"_items",void 0),this._options=t,this.setObjects(e),void 0===this._options.shouldMatchWordsOnly&&(this._options.shouldMatchWordsOnly=!0)}setObjects(e){this._items=new Map;for(const t of e){const e=Object(i.at)(t,this._options.keys);if(this._options.funcs)for(const n of this._options.funcs){const r=n(t);Array.isArray(r)?e.push(...r):e.push(r)}for(const[n,r]of Object.entries(e)){if(!r)continue;const e=this.processQuery(r);this._items.has(e)||this._items.set(e,[]),this._items.get(e).push({keyWeight:Number(n),object:t})}}}match(e,t=-1){if(e=this.processQuery(e),this._options.shouldMatchWordsOnly&&(e=e.replace(/[^\w]/g,"")),0===e.length)return[];const n=[];for(const[t,r]of this._items.entries()){let o=t;this._options.shouldMatchWordsOnly&&(o=o.replace(/[^\w]/g,""));const i=o.indexOf(e);-1!==i&&n.push(...r.map(e=>c({index:i},e)))}n.sort((e,t)=>{if(e.index<t.index)return-1;if(e.index===t.index){if(e.keyWeight<t.keyWeight)return-1;if(e.keyWeight===t.keyWeight)return 0}return 1});const r=Object(i.uniq)(n.map(e=>e.object)),o=-1===t?r.length:t;return r.slice(0,o)}processQuery(e){return!1!==this._options.fuzzy?Object(a.F)(e.toLowerCase()).toLowerCase():e.toLowerCase()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(78),o=n.n(r),i=n(88),a=n.n(i),s=n(86),c=n.n(s),l=n(80),u=n(85),d=n(154);const h={VERIFIED:"verified",WARNING:"warning",UNKNOWN:"unknown",NORMAL:"normal",UNAUTHENTICATED:"unauthenticated"},p={[h.WARNING]:Object(l.b)("This user has not verified all of their sessions."),[h.NORMAL]:Object(l.b)("You have not verified this user."),[h.VERIFIED]:Object(l.b)("You have verified this user. This user has verified all of their sessions.")},m={[h.WARNING]:Object(l.b)("Someone is using an unknown session"),[h.NORMAL]:Object(l.b)("This room is end-to-end encrypted"),[h.VERIFIED]:Object(l.b)("Everyone in this room is verified")},g=({isUser:e,status:t,className:n,size:i,onClick:a,hideTooltip:s,bordered:g})=>{const[f,_]=Object(r.useState)(!1),b=c()({mx_E2EIcon:!0,mx_E2EIcon_bordered:g,mx_E2EIcon_warning:t===h.WARNING,mx_E2EIcon_normal:t===h.NORMAL,mx_E2EIcon_verified:t===h.VERIFIED},n);let v,y;v=e?p[t]:m[t],i&&(y={width:i+"px",height:i+"px"});const E=()=>_(!0),S=()=>_(!1);let w;return f&&!s&&(w=o.a.createElement(d.b,{label:v?Object(l.a)(v):""})),a?o.a.createElement(u.a,{onClick:a,onMouseOver:E,onMouseLeave:S,className:b,style:y},w):o.a.createElement("div",{onMouseOver:E,onMouseLeave:S,className:b,style:y},w)};g.propTypes={isUser:a.a.bool,status:a.a.oneOf(Object.values(h)),className:a.a.string,size:a.a.number,onClick:a.a.func},t.b=g},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(84),l=n(80),u=n(334),d=n(137),h=n(81);let p=Object(h.a)("views.elements.SettingsFlag")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onChange",async e=>{await this.save(e),this.setState({value:e}),this.props.onChange&&this.props.onChange(e)}),i()(this,"checkBoxOnChange",e=>{this.onChange(e.target.checked)}),i()(this,"save",async e=>{await c.b.setValue(this.props.name,this.props.roomId,this.props.level,void 0!==e?e:this.state.value)}),this.state={value:c.b.getValueAt(this.props.level,this.props.name,this.props.roomId,this.props.isExplicit)}}render(){const e=c.b.canSetValue(this.props.name,this.props.roomId,this.props.level),t=this.props.label?Object(l.a)(this.props.label):c.b.getDisplayName(this.props.name,this.props.level),n=c.b.getDescription(this.props.name);return this.props.useCheckbox?s.a.createElement(d.a,{checked:this.state.value,onChange:this.checkBoxOnChange,disabled:this.props.disabled||!e},t):s.a.createElement("div",{className:"mx_SettingsFlag"},s.a.createElement("span",{className:"mx_SettingsFlag_label"},t),s.a.createElement(u.a,{checked:this.state.value,onChange:this.onChange,disabled:this.props.disabled||!e,"aria-label":t}),n&&s.a.createElement("div",{className:"mx_SettingsFlag_microcopy"},n))}})||r},function(e,t,n){"use strict";n.r(t),n.d(t,"CHAT_EFFECTS",(function(){return o}));var r=n(80);const o=[{emojis:["🎊","🎉"],msgType:"nic.custom.confetti",command:"confetti",description:()=>Object(r.b)("Sends the given message with confetti"),fallbackMessage:()=>Object(r.a)("sends confetti")+" 🎉",options:{maxCount:150,speed:3,frameInterval:15,alpha:1,gradient:!1}},{emojis:["🎆"],msgType:"nic.custom.fireworks",command:"fireworks",description:()=>Object(r.b)("Sends the given message with fireworks"),fallbackMessage:()=>Object(r.a)("sends fireworks")+" 🎆",options:{maxCount:500,gravity:.05}},{emojis:["❄","🌨"],msgType:"io.element.effect.snowfall",command:"snowfall",description:()=>Object(r.b)("Sends the given message with snowfall"),fallbackMessage:()=>Object(r.a)("sends snowfall")+" ❄",options:{maxCount:200,gravity:.05,maxDrift:5}},{emojis:["👾","🌌"],msgType:"io.element.effects.space_invaders",command:"spaceinvaders",description:()=>Object(r.b)("Sends the given message with a space themed effect"),fallbackMessage:()=>Object(r.a)("sends space invaders")+" 👾",options:{maxCount:50,gravity:.01}}]},function(e,t,n){"use strict";n.d(t,"a",(function(){return L})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return q})),n.d(t,"d",(function(){return z}));var r,o,i,a,s,c,l,u,d,h,p,m,g,f,_,b,v,y,E,S,w=n(79),C=n.n(w),T=n(78),x=n.n(T),k=n(86),F=n.n(k),O=n(80),R=n(84),D=n(85),I=n(97),A=n(112),N=n(81),M=n(101),P=n(828);!function(e){e.Password="m.login.password",e.Recaptcha="m.login.recaptcha",e.Terms="m.login.terms",e.Email="m.login.email.identity",e.Msisdn="m.login.msisdn",e.Sso="m.login.sso",e.SsoUnstable="org.matrix.login.sso"}(S||(S={}));const L=0;let j=Object(N.a)("views.auth.PasswordAuthEntry")((i=o=class extends x.a.Component{constructor(e){super(e),C()(this,"onSubmit",e=>{e.preventDefault(),this.props.busy||this.props.submitAuthDict({type:S.Password,user:this.props.matrixClient.credentials.userId,identifier:{type:"m.id.user",user:this.props.matrixClient.credentials.userId},password:this.state.password})}),C()(this,"onPasswordFieldChange",e=>{this.setState({password:e.target.value})}),this.state={password:""}}componentDidMount(){this.props.onPhaseChange(L)}render(){const e=F()({error:this.props.errorText});let t,n;return t=this.props.busy?x.a.createElement(I.a,null):x.a.createElement("input",{type:"submit",className:"mx_Dialog_primary",disabled:!this.state.password,value:Object(O.a)("Continue")}),this.props.errorText&&(n=x.a.createElement("div",{className:"error",role:"alert"},this.props.errorText)),x.a.createElement("div",null,x.a.createElement("p",null,Object(O.a)("Confirm your identity by entering your account password below.")),x.a.createElement("form",{onSubmit:this.onSubmit,className:"mx_InteractiveAuthEntryComponents_passwordSection"},x.a.createElement(M.a,{className:e,type:"password",name:"passwordField",label:Object(O.a)("Password"),autoFocus:!0,value:this.state.password,onChange:this.onPasswordFieldChange}),x.a.createElement("div",{className:"mx_button_row"},t)),n)}},C()(o,"LOGIN_TYPE",S.Password),r=i))||r,U=Object(N.a)("views.auth.RecaptchaAuthEntry")((c=s=class extends x.a.Component{constructor(...e){super(...e),C()(this,"onCaptchaResponse",e=>{A.a.instance.track("onboarding_grecaptcha_submit"),this.props.submitAuthDict({type:S.Recaptcha,response:e})})}componentDidMount(){this.props.onPhaseChange(L)}render(){if(this.props.busy)return x.a.createElement(I.a,null);let e,t,n=this.props.errorText;return this.props.stageParams&&this.props.stageParams.public_key?e=this.props.stageParams.public_key:n=Object(O.a)("Missing captcha public key in homeserver configuration. Please report this to your homeserver administrator."),n&&(t=x.a.createElement("div",{className:"error",role:"alert"},n)),x.a.createElement("div",null,x.a.createElement(P.a,{sitePublicKey:e,onCaptchaResponse:this.onCaptchaResponse}),t)}},C()(s,"LOGIN_TYPE",S.Recaptcha),a=c))||a,B=Object(N.a)("views.auth.TermsAuthEntry")((d=u=class extends x.a.Component{constructor(e){super(e),C()(this,"tryContinue",()=>{this.trySubmit()}),C()(this,"trySubmit",()=>{let e=!0;for(const t of this.state.policies){const n=this.state.toggledPolicies[t.id];e=e&&n}e?(this.props.submitAuthDict({type:S.Terms}),A.a.instance.track("onboarding_terms_complete")):this.setState({errorText:Object(O.a)("Please review and accept all of the homeserver's policies")})});const t=this.props.stageParams.policies||{},n=R.b.getValue("language"),r={},o=[];for(const e of Object.keys(t)){const i=t[e];let a=i[n];if(a||(a=i.en),!a){a=i[Object.keys(i).find(e=>"version"!==e)]}if(!a)throw new Error("Failed to find a policy to show the user");r[e]=!1,o.push({id:e,name:a.name,url:a.url})}this.state={toggledPolicies:r,policies:o},A.a.instance.track("onboarding_terms_begin")}componentDidMount(){this.props.onPhaseChange(L)}togglePolicy(e){const t={};for(const n of this.state.policies){let r=this.state.toggledPolicies[n.id];n.id===e&&(r=!r),t[n.id]=r}this.setState({toggledPolicies:t})}render(){if(this.props.busy)return x.a.createElement(I.a,null);const e=[];let t,n,r=!0;for(const t of this.state.policies){const n=this.state.toggledPolicies[t.id];r=r&&n,e.push(x.a.createElement("label",{key:"policy_checkbox_"+t.id,className:"mx_InteractiveAuthEntryComponents_termsPolicy"},x.a.createElement("input",{type:"checkbox",onChange:()=>this.togglePolicy(t.id),checked:n}),x.a.createElement("a",{href:t.url,target:"_blank",rel:"noreferrer noopener"},t.name)))}return(this.props.errorText||this.state.errorText)&&(t=x.a.createElement("div",{className:"error",role:"alert"},this.props.errorText||this.state.errorText)),!1!==this.props.showContinue&&(n=x.a.createElement("button",{className:"mx_InteractiveAuthEntryComponents_termsSubmit mx_GeneralButton",onClick:this.trySubmit,disabled:!r},Object(O.a)("Accept"))),x.a.createElement("div",null,x.a.createElement("p",null,Object(O.a)("Please review and accept the policies of this homeserver:")),e,t,n)}},C()(u,"LOGIN_TYPE",S.Terms),l=d))||l,G=Object(N.a)("views.auth.EmailIdentityAuthEntry")((m=p=class extends x.a.Component{componentDidMount(){this.props.onPhaseChange(L)}render(){var e;return void 0===this.props.inputs.emailAddress||null!==(e=this.props.stageState)&&void 0!==e&&e.emailSid?x.a.createElement(I.a,null):x.a.createElement("div",{className:"mx_InteractiveAuthEntryComponents_emailWrapper"},x.a.createElement("p",null,Object(O.a)("A confirmation email has been sent to %(emailAddress)s",{emailAddress:x.a.createElement("b",null,this.props.inputs.emailAddress)})),x.a.createElement("p",null,Object(O.a)("Open the link in the email to continue registration.")))}},C()(p,"LOGIN_TYPE",S.Email),h=m))||h,V=Object(N.a)("views.auth.MsisdnAuthEntry")((_=f=class extends x.a.Component{constructor(e){super(e),C()(this,"submitUrl",void 0),C()(this,"sid",void 0),C()(this,"msisdn",void 0),C()(this,"onTokenChange",e=>{this.setState({token:e.target.value})}),C()(this,"onFormSubmit",async e=>{if(e.preventDefault(),""!=this.state.token){this.setState({errorText:null});try{let e;if(!this.submitUrl)throw new Error("The registration with MSISDN flow is misconfigured");if(e=await this.props.matrixClient.submitMsisdnTokenOtherUrl(this.submitUrl,this.sid,this.props.clientSecret,this.state.token),e.success){const e={sid:this.sid,client_secret:this.props.clientSecret};this.props.submitAuthDict({type:S.Msisdn,threepid_creds:e,threepidCreds:e})}else this.setState({errorText:Object(O.a)("Token incorrect")})}catch(e){this.props.fail(e),console.log("Failed to submit msisdn token")}}}),this.state={token:"",requestingToken:!1,errorText:""}}componentDidMount(){this.props.onPhaseChange(L),this.setState({requestingToken:!0}),this.requestMsisdnToken().catch(e=>{this.props.fail(e)}).finally(()=>{this.setState({requestingToken:!1})})}requestMsisdnToken(){return this.props.matrixClient.requestRegisterMsisdnToken(this.props.inputs.phoneCountry,this.props.inputs.phoneNumber,this.props.clientSecret,1).then(e=>{this.submitUrl=e.submit_url,this.sid=e.sid,this.msisdn=e.msisdn})}render(){if(this.state.requestingToken)return x.a.createElement(I.a,null);{const e=Boolean(this.state.token),t=F()({mx_InteractiveAuthEntryComponents_msisdnSubmit:!0,mx_GeneralButton:!0});let n;return this.state.errorText&&(n=x.a.createElement("div",{className:"error",role:"alert"},this.state.errorText)),x.a.createElement("div",null,x.a.createElement("p",null,Object(O.a)("A text message has been sent to %(msisdn)s",{msisdn:x.a.createElement("i",null,this.msisdn)})),x.a.createElement("p",null,Object(O.a)("Please enter the code it contains:")),x.a.createElement("div",{className:"mx_InteractiveAuthEntryComponents_msisdnWrapper"},x.a.createElement("form",{onSubmit:this.onFormSubmit},x.a.createElement("input",{type:"text",className:"mx_InteractiveAuthEntryComponents_msisdnEntry",value:this.state.token,onChange:this.onTokenChange,"aria-label":Object(O.a)("Code")}),x.a.createElement("br",null),x.a.createElement("input",{type:"submit",value:Object(O.a)("Submit"),className:t,disabled:!e})),n))}}},C()(f,"LOGIN_TYPE",S.Msisdn),g=_))||g,q=Object(N.a)("views.auth.SSOAuthEntry")((y=v=class e extends x.a.Component{constructor(t){super(t),C()(this,"ssoUrl",void 0),C()(this,"popupWindow",void 0),C()(this,"attemptFailed",()=>{this.setState({attemptFailed:!0})}),C()(this,"onReceiveMessage",e=>{"authDone"===e.data&&e.origin===this.props.matrixClient.getHomeserverUrl()&&this.popupWindow&&(this.popupWindow.close(),this.popupWindow=null)}),C()(this,"onStartAuthClick",()=>{this.popupWindow=window.open(this.ssoUrl,"_blank"),this.setState({phase:e.PHASE_POSTAUTH}),this.props.onPhaseChange(e.PHASE_POSTAUTH)}),C()(this,"onConfirmClick",()=>{this.props.submitAuthDict({})}),this.ssoUrl=t.matrixClient.getFallbackAuthUrl(this.props.loginType,this.props.authSessionId),this.popupWindow=null,window.addEventListener("message",this.onReceiveMessage),this.state={phase:e.PHASE_PREAUTH,attemptFailed:!1}}componentDidMount(){this.props.onPhaseChange(e.PHASE_PREAUTH)}componentWillUnmount(){window.removeEventListener("message",this.onReceiveMessage),this.popupWindow&&(this.popupWindow.close(),this.popupWindow=null)}render(){let t=null;const n=x.a.createElement(D.a,{onClick:this.props.onCancel,kind:this.props.continueKind?this.props.continueKind+"_outline":"primary_outline"},Object(O.a)("Cancel"));let r;return t=this.state.phase===e.PHASE_PREAUTH?x.a.createElement(D.a,{onClick:this.onStartAuthClick,kind:this.props.continueKind||"primary"},this.props.continueText||Object(O.a)("Single Sign On")):x.a.createElement(D.a,{onClick:this.onConfirmClick,kind:this.props.continueKind||"primary"},this.props.continueText||Object(O.a)("Confirm")),this.props.errorText?r=x.a.createElement("div",{className:"error",role:"alert"},this.props.errorText):this.state.attemptFailed&&(r=x.a.createElement("div",{className:"error",role:"alert"},Object(O.a)("Something went wrong in confirming your identity. Cancel and try again."))),x.a.createElement(x.a.Fragment,null,r,x.a.createElement("div",{className:"mx_InteractiveAuthEntryComponents_sso_buttons"},n,t))}},C()(v,"LOGIN_TYPE",S.Sso),C()(v,"UNSTABLE_LOGIN_TYPE",S.SsoUnstable),C()(v,"PHASE_PREAUTH",1),C()(v,"PHASE_POSTAUTH",2),b=y))||b,H=Object(N.a)("views.auth.FallbackAuthEntry")(E=class extends x.a.Component{constructor(e){super(e),C()(this,"popupWindow",void 0),C()(this,"fallbackButton",Object(T.createRef)()),C()(this,"focus",()=>{this.fallbackButton.current&&this.fallbackButton.current.focus()}),C()(this,"onShowFallbackClick",e=>{e.preventDefault(),e.stopPropagation();const t=this.props.matrixClient.getFallbackAuthUrl(this.props.loginType,this.props.authSessionId);this.popupWindow=window.open(t,"_blank")}),C()(this,"onReceiveMessage",e=>{"authDone"===e.data&&e.origin===this.props.matrixClient.getHomeserverUrl()&&this.props.submitAuthDict({})}),this.popupWindow=null,window.addEventListener("message",this.onReceiveMessage)}componentDidMount(){this.props.onPhaseChange(L)}componentWillUnmount(){window.removeEventListener("message",this.onReceiveMessage),this.popupWindow&&this.popupWindow.close()}render(){let e;return this.props.errorText&&(e=x.a.createElement("div",{className:"error",role:"alert"},this.props.errorText)),x.a.createElement("div",null,x.a.createElement("a",{href:"",ref:this.fallbackButton,onClick:this.onShowFallbackClick},Object(O.a)("Start authentication")),e)}})||E;function z(e){switch(e){case S.Password:return j;case S.Recaptcha:return U;case S.Email:return G;case S.Msisdn:return V;case S.Terms:return B;case S.Sso:case S.SsoUnstable:return q;default:return H}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"c",(function(){return f}));var r=n(79),o=n.n(r),i=n(3),a=n.n(i),s=n(115),c=n(109),l=n(0);class u{constructor(e){this.context=e,o()(this,"clipStart",0),o()(this,"stopped",!0),o()(this,"lastCheck",0),o()(this,"observable",new l.SimpleObservable),o()(this,"timerId",void 0),o()(this,"clipDuration",0),o()(this,"placeholderDuration",0),o()(this,"checkTime",()=>{const e=this.timeSeconds;this.lastCheck!==e&&(this.observable.update([e,this.durationSeconds]),this.lastCheck=e)})}get durationSeconds(){return this.clipDuration||this.placeholderDuration}set durationSeconds(e){this.clipDuration=e,this.observable.update([this.timeSeconds,this.clipDuration])}get timeSeconds(){return(this.context.currentTime-this.clipStart)%this.clipDuration}get liveData(){return this.observable}populatePlaceholdersFrom(e){var t;const n=Number(null===(t=e.getContent().info)||void 0===t?void 0:t.duration);Number.isFinite(n)&&(this.placeholderDuration=n/1e3)}flagLoadTime(){this.clipStart=this.context.currentTime}flagStart(){this.stopped&&(this.clipStart=this.context.currentTime,this.stopped=!1),this.timerId||(this.timerId=setInterval(this.checkTime,100))}flagStop(){this.stopped=!0,this.clipStart=this.context.currentTime}syncTo(e,t){this.clipStart=e-t,this.stopped=!1,this.checkTime()}destroy(){this.observable.close(),this.timerId&&clearInterval(this.timerId)}}var d=n(875),h=n(211);let p;!function(e){e.Decoding="decoding",e.Stopped="stopped",e.Paused="paused",e.Playing="playing"}(p||(p={}));const m=39,g=Object(c.h)(0,m);class f extends a.a{constructor(e,t=g){super(),this.buf=e,o()(this,"thumbnailWaveform",void 0),o()(this,"context",void 0),o()(this,"source",void 0),o()(this,"state",p.Decoding),o()(this,"audioBuf",void 0),o()(this,"element",void 0),o()(this,"resampledWaveform",void 0),o()(this,"waveformObservable",new l.SimpleObservable),o()(this,"clock",void 0),o()(this,"fileSize",void 0),o()(this,"onPlaybackEnd",async()=>{await this.context.suspend(),this.emit(p.Stopped)}),this.fileSize=this.buf.byteLength,this.context=Object(d.a)(),this.resampledWaveform=Object(c.c)(null!=t?t:g,m),this.thumbnailWaveform=Object(c.c)(null!=t?t:g,100),this.waveformObservable.update(this.resampledWaveform),this.clock=new u(this.context)}get sizeBytes(){return this.fileSize}get waveform(){return this.resampledWaveform}get waveformData(){return this.waveformObservable}get clockInfo(){return this.clock}get currentState(){return this.state}get isPlaying(){return this.currentState===p.Playing}emit(e,...t){return this.state=e,super.emit(e,...t),super.emit(s.b,e,...t),!0}destroy(){this.stop(),this.removeAllListeners(),this.clock.destroy(),this.waveformObservable.close(),this.element&&(URL.revokeObjectURL(this.element.src),this.element.remove())}async prepare(){if(this.buf.byteLength>5242880){console.log("Audio file too large: processing through <audio /> element"),this.element=document.createElement("AUDIO");const e=new Promise((e,t)=>{this.element.onloadeddata=()=>e(null),this.element.onerror=e=>t(e)});this.element.src=URL.createObjectURL(new Blob([this.buf])),await e}else{this.audioBuf=await new Promise((e,t)=>{this.context.decodeAudioData(this.buf,t=>e(t),async n=>{try{console.error("Error decoding recording: ",n),console.warn("Trying to re-encode to WAV instead...");const r=await Object(d.b)(this.buf);this.context.decodeAudioData(r,t=>e(t),e=>{console.error("Still failed to decode recording: ",e),t(e)})}catch(n){console.error("Caught decoding error:",n),t(n)}})});const e=Array.from(this.audioBuf.getChannelData(0));this.resampledWaveform=function(e){const t=e.map(e=>Math.abs(e));return Object(c.g)(Object(c.i)(t,m),0,1)}(e)}this.waveformObservable.update(this.resampledWaveform),this.emit(p.Stopped),this.clock.flagLoadTime(),this.clock.durationSeconds=this.element?this.element.duration:this.audioBuf.duration}async play(){this.state===p.Stopped&&(this.disconnectSource(),this.makeNewSourceBuffer(),this.element?await this.element.play():this.source.start()),await this.context.resume(),this.clock.flagStart(),this.emit(p.Playing)}disconnectSource(){var e,t;this.element||(null===(e=this.source)||void 0===e||e.disconnect(),null===(t=this.source)||void 0===t||t.removeEventListener("ended",this.onPlaybackEnd))}makeNewSourceBuffer(){this.element&&this.source||(this.element?this.source=this.context.createMediaElementSource(this.element):(this.source=this.context.createBufferSource(),this.source.buffer=this.audioBuf),this.source.addEventListener("ended",this.onPlaybackEnd),this.source.connect(this.context.destination))}async pause(){await this.context.suspend(),this.emit(p.Paused)}async stop(){await this.onPlaybackEnd(),this.clock.flagStop()}async toggle(){this.isPlaying?await this.pause():await this.play()}async skipTo(e){e=Object(h.a)(e,0,this.clock.durationSeconds);const t=this.isPlaying;t&&await this.context.suspend();const n=this.context.currentTime;this.disconnectSource(),this.makeNewSourceBuffer(),this.clock.syncTo(n,e),this.element?this.element.currentTime=e:this.source.start(n,e),t?await this.context.resume():await this.pause()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),o=n.n(r),i=n(3);class a extends i.EventEmitter{constructor(e){super(),this.userId=e,o()(this,"modified",void 0),o()(this,"displayName",void 0),o()(this,"rawDisplayName",void 0),o()(this,"avatarUrl",void 0),o()(this,"presenceStatusMsg",null),o()(this,"presence","offline"),o()(this,"lastActiveAgo",0),o()(this,"lastPresenceTs",0),o()(this,"currentlyActive",!1),o()(this,"events",{presence:null,profile:null}),o()(this,"unstable_statusMessage",""),this.displayName=e,this.rawDisplayName=e,this.avatarUrl=null,this.updateModifiedTime()}setPresenceEvent(e){if("m.presence"!==e.getType())return;const t=null===this.events.presence;this.events.presence=e;const n=[];(e.getContent().presence!==this.presence||t)&&n.push("User.presence"),e.getContent().avatar_url&&e.getContent().avatar_url!==this.avatarUrl&&n.push("User.avatarUrl"),e.getContent().displayname&&e.getContent().displayname!==this.displayName&&n.push("User.displayName"),void 0!==e.getContent().currently_active&&e.getContent().currently_active!==this.currentlyActive&&n.push("User.currentlyActive"),this.presence=e.getContent().presence,n.push("User.lastPresenceTs"),e.getContent().status_msg&&(this.presenceStatusMsg=e.getContent().status_msg),e.getContent().displayname&&(this.displayName=e.getContent().displayname),e.getContent().avatar_url&&(this.avatarUrl=e.getContent().avatar_url),this.lastActiveAgo=e.getContent().last_active_ago,this.lastPresenceTs=Date.now(),this.currentlyActive=e.getContent().currently_active,this.updateModifiedTime();for(let t=0;t<n.length;t++)this.emit(n[t],e,this)}setDisplayName(e){const t=this.displayName;this.displayName="string"==typeof e?e:void 0,e!==t&&this.updateModifiedTime()}setRawDisplayName(e){this.rawDisplayName="string"==typeof e?e:void 0}setAvatarUrl(e){const t=this.avatarUrl;this.avatarUrl=e,e!==t&&this.updateModifiedTime()}updateModifiedTime(){this.modified=Date.now()}getLastModifiedTime(){return this.modified}getLastActiveTs(){return this.lastPresenceTs-this.lastActiveAgo}unstable_updateStatusMessage(e){e.getContent()?this.unstable_statusMessage=e.getContent().status:this.unstable_statusMessage="",this.updateModifiedTime(),this.emit("User.unstable_statusMessage",this)}}},function(e,t,n){"use strict";function r(e,t){const n=`Store is invalid because ${e}, please stop the client, delete all data and start the client again`,r=Reflect.construct(Error,[n]);return Reflect.setPrototypeOf(r,Reflect.getPrototypeOf(this)),r.reason=e,r.value=t,r}function o(e){const t=`Crypto store is invalid because ${e}, please stop the client, delete all data and start the client again`,n=Reflect.construct(Error,[t]);return Reflect.setPrototypeOf(n,Reflect.getPrototypeOf(this)),n.reason=e,n.name="InvalidCryptoStoreError",n}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return i})),r.TOGGLED_LAZY_LOADING="TOGGLED_LAZY_LOADING",r.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Reflect.setPrototypeOf(r,Error),o.TOO_NEW="TOO_NEW",o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Reflect.setPrototypeOf(o,Error);class i extends Error{constructor(e,t){super(e),this.value=t}}},function(e,t,n){"use strict";n.d(t,"i",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"h",(function(){return p})),n.d(t,"g",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"d",(function(){return f})),n.d(t,"f",(function(){return _})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return v})),n.d(t,"k",(function(){return y}));var r=n(79),o=n.n(r),i=n(96),a=n(3),s=n(260),c=n(300);const l="m.key.verification.",u=l+"request",d=l+"start",h=l+"cancel",p=l+"ready",m=1,g=2,f=3,_=4,b=5,v=6;class y extends a.EventEmitter{constructor(e,t,n){super(),o()(this,"_cancelOnTimeout",()=>{try{this.initiatedByMe?this.cancel({reason:"Other party didn't accept in time",code:"m.timeout"}):this.cancel({reason:"User didn't accept in time",code:"m.timeout"})}catch(e){i.a.error("Error while cancelling verification request",e)}}),this.channel=e,this.channel._request=this,this._verificationMethods=t,this._client=n,this._commonMethods=[],this._setPhase(m,!1),this._eventsByUs=new Map,this._eventsByThem=new Map,this._observeOnly=!1,this._timeoutTimer=null,this._accepting=!1,this._declining=!1,this._verifierHasFinished=!1,this._cancelled=!1,this._chosenMethod=null,this._qrCodeData=null,this._requestReceivedAt=null}static validateEvent(e,t,n){const r=t.getContent();return!(!e||!e.startsWith(l))&&(r?e!==u&&e!==p||Array.isArray(r.methods)?e!==u&&e!==p&&e!==d||"string"==typeof r.from_device&&0!==r.from_device.length||(i.a.log("VerificationRequest: validateEvent: fail because from_device"),!1):(i.a.log("VerificationRequest: validateEvent: fail because methods"),!1):(i.a.log("VerificationRequest: validateEvent: no content"),!1))}get invalid(){return this.phase===m}get requested(){return this.phase===g}get cancelled(){return this.phase===b}get ready(){return this.phase===f}get started(){return this.phase===_}get done(){return this.phase===v}get methods(){return this._commonMethods}get chosenMethod(){return this._chosenMethod}calculateEventTimeout(e){let t=this.channel.getTimestamp(e)+6e5;if(this._requestReceivedAt&&!this.initiatedByMe&&this.phase<=g){const e=this._requestReceivedAt+12e4;t=Math.min(t,e)}return Math.max(0,t-Date.now())}get timeout(){const e=this._getEventByEither(u);return e?this.calculateEventTimeout(e):0}get requestEvent(){return this._getEventByEither(u)}get phase(){return this._phase}get verifier(){return this._verifier}get canAccept(){return this.phase<f&&!this._accepting&&!this._declining}get accepting(){return this._accepting}get declining(){return this._declining}get pending(){return!this.observeOnly&&this._phase!==v&&this._phase!==b}get qrCodeData(){return this._qrCodeData}otherPartySupportsMethod(e,t=!1){if(!t&&!this.ready&&!this.started)return!1;const n=this._eventsByThem.get(u)||this._eventsByThem.get(p);if(!n){if(this.started&&this.initiatedByMe){const t=this._eventsByUs.get(d),n=t&&t.getContent();return e==(n&&n.method)}return!1}const r=n.getContent();if(!r)return!1;const{methods:o}=r;return!!Array.isArray(o)&&o.includes(e)}get initiatedByMe(){const e=this._eventsByUs.size+this._eventsByThem.size===0;if(this._phase===m&&e)return!0;const t=this._eventsByUs.has(u),n=this._eventsByThem.has(u);if(t&&!n)return!0;if(!t&&n)return!1;const r=this._eventsByUs.has(d),o=this._eventsByThem.has(d);return!(!r||o)}get requestingUserId(){return this.initiatedByMe?this._client.getUserId():this.otherUserId}get receivingUserId(){return this.initiatedByMe?this.otherUserId:this._client.getUserId()}get otherUserId(){return this.channel.userId}get isSelfVerification(){return this._client.getUserId()===this.otherUserId}get cancellingUserId(){const e=this._eventsByUs.get(h),t=this._eventsByThem.get(h);return e&&(!t||e.getId()<t.getId())?e.getSender():t?t.getSender():void 0}get cancellationCode(){const e=this._getEventByEither(h);return e?e.getContent().code:null}get observeOnly(){return this._observeOnly}get targetDevice(){const e=(this._eventsByThem.get(u)||this._eventsByThem.get(p)||this._eventsByThem.get(d)).getContent().from_device;return{userId:this.otherUserId,deviceId:e}}beginKeyVerification(e,t=null){if(!this.observeOnly&&!this._verifier){if(this.phase===g||this.phase===f||this.phase===m&&this.channel.constructor.canCreateRequest(d)){if(this._commonMethods.length&&!this._commonMethods.includes(e))throw Object(s.g)();if(this._verifier=this._createVerifier(e,null,t),!this._verifier)throw Object(s.g)();this._chosenMethod=e}}return this._verifier}async sendRequest(){if(!this.observeOnly&&this._phase===m){const e=[...this._verificationMethods.keys()];await this.channel.send(u,{methods:e})}}async cancel({reason:e="User declined",code:t="m.user"}={}){if(!this.observeOnly&&this._phase!==b){if(this._declining=!0,this.emit("change"),this._verifier)return this._verifier.cancel(Object(s.a)(t,e)());this._cancellingUserId=this._client.getUserId(),await this.channel.send(h,{code:t,reason:e})}}async accept(){if(!this.observeOnly&&this.phase===g&&!this.initiatedByMe){const e=[...this._verificationMethods.keys()];this._accepting=!0,this.emit("change"),await this.channel.send(p,{methods:e})}}waitFor(e){return new Promise((t,n)=>{const r=()=>{let o=!1;return e(this)?(t(this),o=!0):this.cancelled&&(n(new Error("cancelled")),o=!0),o&&this.off("change",r),o};r()||this.on("change",r)})}_setPhase(e,t=!0){this._phase=e,t&&this.emit("change")}_getEventByEither(e){return this._eventsByThem.get(e)||this._eventsByUs.get(e)}_getEventBy(e,t){return t?this._eventsByThem.get(e):this._eventsByUs.get(e)}_calculatePhaseTransitions(){const e=[{phase:m}],t=()=>e[e.length-1].phase,n=this._eventsByThem.has(u),r=this._getEventBy(u,n);r&&e.push({phase:g,event:r});const o=r&&this._getEventBy(p,!n);let i;if(o&&t()===g&&e.push({phase:f,event:o}),o||!r){const e=this._eventsByThem.get(d),t=this._eventsByUs.get(d);i=e&&t?e.getSender()<t.getSender()?e:t:e||t}else i=this._getEventBy(d,!n);if(i){const n=t()===g&&r.getSender()!==i.getSender(),o=t()===m&&this.channel.constructor.canCreateRequest(d);(n||t()===f||o)&&e.push({phase:_,event:i})}const a=this._eventsByUs.get("m.key.verification.done");(this._verifierHasFinished||a&&t()===_)&&e.push({phase:v});const s=this._getEventByEither(h);return(this._cancelled||s)&&t()!==v?(e.push({phase:b,event:s}),e):e}_transitionToPhase(e){const{phase:t,event:n}=e;if((t===g||t===f)&&!this._wasSentByOwnDevice(n)){const e=n.getContent();this._commonMethods=e.methods.filter(e=>this._verificationMethods.has(e))}if(this.observeOnly||t!==g&&t!==_&&t!==f||this.channel.receiveStartFromOtherDevices&&this._wasSentByOwnUser(n)&&!this._wasSentByOwnDevice(n)&&(this._observeOnly=!0),t===_){const{method:e}=n.getContent();this._verifier||this.observeOnly||(this._verifier=this._createVerifier(e,n),this._verifier?this._chosenMethod=e:this.cancel({code:"m.unknown_method",reason:"Unknown method: "+e}))}}_applyPhaseTransitions(){const e=this._calculatePhaseTransitions(),t=e.findIndex(e=>e.phase===this.phase),n=e.slice(t+1);for(const e of n)this._transitionToPhase(e);return n}_isWinningStartRace(e){if(e.getType()!==d)return!1;const t=this._verifier.startEvent;let n,r;if(this.isSelfVerification)if(t){const e=t.getContent();n=e&&e.from_device}else n=this._client.getDeviceId();else n=t?t.getSender():this._client.getUserId();if(this.isSelfVerification){const t=e.getContent();r=t&&t.from_device}else r=e.getSender();return r<n}hasEventId(e){for(const t of this._eventsByUs.values())if(t.getId()===e)return!0;for(const t of this._eventsByThem.values())if(t.getId()===e)return!0;return!1}async handleEvent(e,t,n,r,o){if(this.done||this.cancelled)return;const a=this._observeOnly;if(this._adjustObserveOnly(t,n),!this.observeOnly&&!r&&await this._cancelOnError(e,t))return;if(o?this._eventsByUs.has(e):this._eventsByThem.has(e))return;const s=this.phase;this._addEvent(e,t,o);const l=this._applyPhaseTransitions();try{if(this._verifier&&!this.observeOnly){const n=this._isWinningStartRace(t);this._verifier.canSwitchStartEvent(t)&&n?this._verifier.switchStartEvent(t):r||(e===h||this._verifier.events&&this._verifier.events.includes(e))&&this._verifier.handleEvent(t)}if(l.length){if(n&&l.some(e=>e.phase===f)){this.otherPartySupportsMethod(c.c,!0)&&(this._qrCodeData=await c.a.create(this,this._client))}const e=l[l.length-1],{phase:t}=e;this._setupTimeout(t),this._setPhase(t)}else this._observeOnly!==a&&this.emit("change")}finally{i.a.log(`Verification request ${this.channel.transactionId}: ${e} event with id:${t.getId()}, content:${JSON.stringify(t.getContent())} deviceId:${this.channel.deviceId}, sender:${t.getSender()}, isSentByUs:${o}, isLiveEvent:${n}, isRemoteEcho:${r}, phase:${s}=>${this.phase}, observeOnly:${a}=>${this._observeOnly}`)}}_setupTimeout(e){if(!this._timeoutTimer&&!this.observeOnly&&e===g&&(this._timeoutTimer=setTimeout(this._cancelOnTimeout,this.timeout)),this._timeoutTimer){(e===_||e===f||e===v||e===b)&&(clearTimeout(this._timeoutTimer),this._timeoutTimer=null)}}async _cancelOnError(e,t){if(e===d){const e=t.getContent().method;if(!this._verificationMethods.has(e))return await this.cancel(Object(s.b)(Object(s.g)())),!0}const n=e===u&&this.phase!==m,r=e===p&&this.phase!==g;if(this.phase!==m&&(n||r)){i.a.warn(`Cancelling, unexpected ${e} verification event from `+t.getSender());const n=`Unexpected ${e} event in phase ${this.phase}`;return await this.cancel(Object(s.b)(Object(s.f)({reason:n}))),!0}return!1}_adjustObserveOnly(e,t){t||(this._observeOnly=!0),this.calculateEventTimeout(e)<3e3&&(this._observeOnly=!0)}_addEvent(e,t,n){if(n?this._eventsByUs.set(e,t):this._eventsByThem.set(e,t),e===u){for(const[e,t]of this._eventsByThem.entries())t.getSender()!==this.otherUserId&&this._eventsByThem.delete(e);this._requestReceivedAt=Date.now()}}_createVerifier(e,t=null,n=null){n||(n=this.targetDevice);const{userId:r,deviceId:o}=n,a=this._verificationMethods.get(e);if(a)return new a(this.channel,this._client,r,o,t,this);i.a.warn("could not find verifier constructor for method",e)}_wasSentByOwnUser(e){return e.getSender()===this._client.getUserId()}_wasSentByOwnDevice(e){if(!this._wasSentByOwnUser(e))return!1;const t=e.getContent();return!(!t||t.from_device!==this._client.getDeviceId())}onVerifierCancelled(){this._cancelled=!0;const e=this._applyPhaseTransitions();e.length&&this._setPhase(e[e.length-1].phase)}onVerifierFinished(){this.channel.send("m.key.verification.done",{}),this._verifierHasFinished=!0;const e=this._applyPhaseTransitions();e.length&&this._setPhase(e[e.length-1].phase)}getEventFromOtherParty(e){return this._eventsByThem.get(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(79),o=n.n(r),i=n(150),a=n(83),s=n(107),c=n(82),l=n(80),u=n(100);class d extends i.a{constructor(){super(a.a,{displayName:window.localStorage.getItem("mx_profile_displayname"),avatarUrl:window.localStorage.getItem("mx_profile_avatar_url")}),o()(this,"monitoredUser",void 0),o()(this,"onProfileUpdate",async()=>{const e=await this.matrixClient.getProfileInfo(this.matrixClient.getUserId());e.displayname?window.localStorage.setItem("mx_profile_displayname",e.displayname):window.localStorage.removeItem("mx_profile_displayname"),e.avatar_url?window.localStorage.setItem("mx_profile_avatar_url",e.avatar_url):window.localStorage.removeItem("mx_profile_avatar_url"),await this.updateState({displayName:e.displayname,avatarUrl:e.avatar_url})}),o()(this,"onStateEvents",Object(s.throttle)(async e=>{const t=c.a.get().getUserId();"m.room.member"===e.getType()&&e.getSender()===t&&e.getStateKey()===t&&await this.onProfileUpdate()},200,{trailing:!0,leading:!0}))}static get instance(){return d.internalInstance}get displayName(){return this.matrixClient?this.matrixClient.isGuest()?Object(l.a)("Guest"):this.state.displayName?this.state.displayName:this.matrixClient.getUserId():this.state.displayName||null}get avatarMxc(){return this.state.avatarUrl||null}getHttpAvatarUrl(e=0){if(!this.avatarMxc)return null;const t=Object(u.b)(this.avatarMxc);return!e||e<=0?t.srcHttp:t.getSquareThumbnailHttp(e)}async onNotReady(){this.monitoredUser&&(this.monitoredUser.removeListener("User.displayName",this.onProfileUpdate),this.monitoredUser.removeListener("User.avatarUrl",this.onProfileUpdate)),this.matrixClient&&this.matrixClient.removeListener("RoomState.events",this.onStateEvents),await this.reset({})}async onReady(){const e=this.matrixClient.getUserId();this.monitoredUser=this.matrixClient.getUser(e),this.monitoredUser&&(this.monitoredUser.on("User.displayName",this.onProfileUpdate),this.monitoredUser.on("User.avatarUrl",this.onProfileUpdate)),this.matrixClient.on("RoomState.events",this.onStateEvents),await this.onProfileUpdate()}async onAction(e){}}o()(d,"internalInstance",new d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},t.asArray=function(e){return Array.isArray(e)?e:[e]}},function(e,t,n){"use strict";t.a={SHOW_ENCRYPTION_SETUP_UI:!0}},function(e,t,n){"use strict";function r(e,t){return Number.isFinite(e)?Number(e):t}function o(e,t,n){return Math.min(Math.max(e,t),n)}function i(...e){return[...e].reduce((e,t)=>t+e,0)}function a(e,t,n){return e*(n-t)+t}function s(e,t,n){return(e-t)/(n-t)}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"e",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return s}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(79),o=n.n(r),i=n(150),a=n(83),s=n(268),c=n(269),l=n(139),u=n(155),d=n(115),h=n(82);function p(e){var t;return`${null!==(t=e.roomId)&&void 0!==t?t:h.a.get().getUserId()}::${e.id}`}class m extends i.a{constructor(){super(a.a,{}),o()(this,"widgetMap",new Map),o()(this,"roomMap",new Map),o()(this,"onWidgetEchoStoreUpdate",(e,t)=>{this.initRoom(e),this.loadRoomWidgets(this.matrixClient.getRoom(e)),this.emit(d.b,e)}),o()(this,"onRoom",e=>{this.initRoom(e.roomId),this.loadRoomWidgets(e),this.emit(d.b,e.roomId)}),o()(this,"onRoomStateEvents",e=>{if("im.vector.modular.widgets"!==e.getType())return;const t=e.getRoomId();this.initRoom(t),this.loadRoomWidgets(this.matrixClient.getRoom(t)),this.emit(d.b,t)}),o()(this,"getRoom",(e,t=!1)=>(t&&this.initRoom(e),this.roomMap.get(e))),s.a.on("update",this.onWidgetEchoStoreUpdate)}static get instance(){return m.internalInstance}initRoom(e){this.roomMap.has(e)||this.roomMap.set(e,{widgets:[]})}async onReady(){this.matrixClient.on("Room",this.onRoom),this.matrixClient.on("RoomState.events",this.onRoomStateEvents),this.matrixClient.getRooms().forEach(e=>{this.loadRoomWidgets(e)}),this.emit(d.b,null)}async onNotReady(){this.matrixClient.off("Room",this.onRoom),this.matrixClient.off("RoomState.events",this.onRoomStateEvents),this.widgetMap=new Map,this.roomMap=new Map,await this.reset({})}async onAction(e){}generateApps(e){return s.a.getEchoedRoomWidgets(e.roomId,l.a.getRoomWidgets(e)).map(e=>l.a.makeAppConfig(e.getStateKey(),e.getContent(),e.getSender(),e.getRoomId(),e.getId()))}loadRoomWidgets(e){if(!e)return;const t=this.roomMap.get(e.roomId)||{};t.widgets=[],Array.from(this.widgetMap.values()).forEach(t=>{t.roomId===e.roomId&&this.widgetMap.delete(p(t))});let n=!1;this.generateApps(e).forEach(e=>{const r=this.widgetMap.get(p(e));r&&console.warn(`Possible widget ID conflict for ${e.id} - wants to store in room ${e.roomId} but is currently stored as ${r.roomId} - letting the want win`),this.widgetMap.set(p(e),e),t.widgets.push(e),n=!0}),n&&!this.roomMap.has(e.roomId)&&this.roomMap.set(e.roomId,t),this.emit(e.roomId)}getApps(e){const t=this.getRoom(e);return(null==t?void 0:t.widgets)||[]}doesRoomHaveConference(e){const t=this.getRoom(e.roomId);if(!t)return!1;const n=t.widgets.filter(e=>u.a.JITSI.matches(e.type)),r=s.a.roomHasPendingWidgetsOfType(e.roomId,[],u.a.JITSI);return n.length>0||r}isJoinedToConferenceIn(e){const t=this.getRoom(e.roomId);if(!t)return!1;return t.widgets.filter(e=>u.a.JITSI.matches(e.type)).some(e=>c.a.getWidgetPersistence(e.id))}}o()(m,"internalInstance",new m),window.mxWidgetStore=m.instance},function(e,t){e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var c=n(584);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return c.Parser}});var l=n(146);function u(e,t){var n=new l.DomHandler(void 0,t);return new c.Parser(n,t).end(e),n.root}Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return l.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return l.DomHandler}}),t.parseDocument=u,t.parseDOM=function(e,t){return u(e,t).children},t.createDomStream=function(e,t,n){var r=new l.DomHandler(e,t,n);return new c.Parser(r,t)};var d=n(585);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return s(d).default}});var h=i(n(273));t.ElementType=h,a(n(586),t),t.DomUtils=i(n(317));var p=n(586);Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return p.FeedHandler}})},function(e,t,n){"use strict";let r,o,i,{isClean:a,my:s}=n(410),c=n(321),l=n(323),u=n(322);class d extends u{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("decl"===e.type)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("rule"===e.type)return t(e,n)}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("atrule"===e.type)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if("comment"===t.type)return e(t,n)})}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertBefore(e,t){let n,r=0===(e=this.index(e))&&"prepend",o=this.normalize(t,this.proxyOf.nodes[e],r).reverse();for(let t of o)this.proxyOf.nodes.splice(e,0,t);for(let t in this.indexes)n=this.indexes[t],e<=n&&(this.indexes[t]=n+o.length);return this.markDirty(),this}insertAfter(e,t){e=this.index(e);let n,r=this.normalize(t,this.proxyOf.nodes[e]).reverse();for(let t of r)this.proxyOf.nodes.splice(e+1,0,t);for(let t in this.indexes)n=this.indexes[t],e<n&&(this.indexes[t]=n+r.length);return this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if("string"==typeof e)e=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(r(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector)e=[new o(e)];else if(e.name)e=[new i(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new l(e)]}return e.map(e=>(e[s]||d.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[a]&&function e(t){if(t[a]=!1,t.proxyOf.nodes)for(let n of t.proxyOf.nodes)e(n)}(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this,e))}getProxyProcessor(){return{set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map(e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e)):"every"===t||"some"===t?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}}d.registerParse=e=>{r=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{i=e},e.exports=d,d.default=d,d.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,i.prototype):"rule"===e.type?Object.setPrototypeOf(e,o.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type&&Object.setPrototypeOf(e,l.prototype),e[s]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(104),p=n(83),m=n(107),g=n(85),f=n(86),_=n.n(f),b=n(81);let v=Object(b.a)("structures.SearchBox")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"onAction",e=>{if(this.props.enableRoomSearchFocus)switch(e.action){case"view_room":this._search.current&&e.clear_search&&this._clearSearch();break;case"focus_room_filter":this._search.current&&this._search.current.focus()}}),s()(this,"onChange",()=>{this._search.current&&(this.setState({searchTerm:this._search.current.value}),this.onSearch())}),s()(this,"onSearch",Object(m.throttle)(()=>{this.props.onSearch(this._search.current.value)},200,{trailing:!0,leading:!0})),s()(this,"_onKeyDown",e=>{switch(e.key){case h.a.ESCAPE:this._clearSearch("keyboard")}this.props.onKeyDown&&this.props.onKeyDown(e)}),s()(this,"_onFocus",e=>{this.setState({blurred:!1}),e.target.select(),this.props.onFocus&&this.props.onFocus(e)}),s()(this,"_onBlur",e=>{this.setState({blurred:!0}),this.props.onBlur&&this.props.onBlur(e)}),this._search=Object(c.createRef)(),this.state={searchTerm:this.props.initialValue||"",blurred:!0}}componentDidMount(){this.dispatcherRef=p.a.register(this.onAction)}componentWillUnmount(){p.a.unregister(this.dispatcherRef)}_clearSearch(e){this._search.current.value="",this.onChange(),this.props.onCleared&&this.props.onCleared(e)}render(){if(this.props.collapsed)return null;const e=!this.state.blurred||this.state.searchTerm?l.a.createElement(g.a,{key:"button",tabIndex:-1,className:"mx_SearchBox_closeButton",onClick:()=>{this._clearSearch("button")}}):void 0,t=this.state.blurred&&this.props.blurredPlaceholder||this.props.placeholder,n=this.props.className||"";return l.a.createElement("div",{className:_()("mx_SearchBox","mx_textinput",{mx_SearchBox_blurred:this.state.blurred})},l.a.createElement("input",{key:"searchfield",type:"text",ref:this._search,className:"mx_textinput_icon mx_textinput_search "+n,value:this.state.searchTerm,onFocus:this._onFocus,onChange:this.onChange,onKeyDown:this._onKeyDown,onBlur:this._onBlur,placeholder:t,autoComplete:"off",autoFocus:this.props.autoFocus}),e)}},s()(o,"propTypes",{onSearch:d.a.func,onCleared:d.a.func,onKeyDown:d.a.func,className:d.a.string,placeholder:d.a.string.isRequired,autoFocus:d.a.bool,initialValue:d.a.string,enableRoomSearchFocus:d.a.bool}),s()(o,"defaultProps",{enableRoomSearchFocus:!1}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(79),o=n.n(r),i=n(3),a=n(183);const s="update";class c extends i.EventEmitter{constructor(...e){super(...e),o()(this,"_symbol",void 0),o()(this,"_count",void 0),o()(this,"_color",void 0)}get symbol(){return this._symbol}get count(){return this._count}get color(){return this._color}get isIdle(){return this.color<=a.a.None}get isUnread(){return this.color>=a.a.Bold}get hasUnreadCount(){return this.color>=a.a.Grey&&(!!this.count||!!this.symbol)}get hasMentions(){return this.color>=a.a.Red}emitIfUpdated(e){e.isDifferentFrom(this)&&this.emit(s)}snapshot(){return new l(this)}destroy(){this.removeAllListeners(s)}}class l{constructor(e){o()(this,"symbol",void 0),o()(this,"count",void 0),o()(this,"color",void 0),this.symbol=e.symbol,this.count=e.count,this.color=e.color}isDifferentFrom(e){const t={count:this.count,symbol:this.symbol,color:this.color},n={count:e.count,symbol:e.symbol,color:e.color};return JSON.stringify(t)!==JSON.stringify(n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(183),a=n(217);class s extends a.b{constructor(e,t,n){super(),this._symbol=e,this._count=t,this._color=n}static forCount(e,t){return new s(null,e,t)}static forSymbol(e,t){return new s(e,0,t)}}o()(s,"RED_EXCLAMATION",s.forSymbol("!",i.a.Red))},function(e,t){var n,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},function(e,t,n){var r=n(626),o=n(627);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return C})),n.d(t,"b",(function(){return T})),n.d(t,"h",(function(){return x})),n.d(t,"d",(function(){return k})),n.d(t,"e",(function(){return F})),n.d(t,"g",(function(){return O})),n.d(t,"f",(function(){return D})),n.d(t,"a",(function(){return I}));var r=n(78),o=n.n(r),i=n(93),a=n(114),s=n(87),c=n(658),l=n(247),u=n(447),d=n(125),h=n(80),p=n(449),m=n(166),g=n(151),f=n(665),_=n(673),b=n(83),v=n(126),y=n(91),E=n(171),S=n(97),w=n(674);const C=e=>{const t=e.client.getUserId();return"join"===e.getMyMembership()&&(e.currentState.maySendStateEvent(i.a.RoomAvatar,t)||e.currentState.maySendStateEvent(i.a.RoomName,t)||e.currentState.maySendStateEvent(i.a.RoomTopic,t)||e.currentState.maySendStateEvent(i.a.RoomJoinRules,t))},T=(e,t=!1)=>({type:i.a.SpaceParent,content:{via:Object(a.b)(e),canonical:t},state_key:e.roomId}),x=e=>{s.a.createTrackedDialog("Space Settings","",c.a,{matrixClient:e.client,space:e},null,!1,!0)},k=e=>{s.a.createTrackedDialog("Space Landing","Add Existing",l.d,{onCreateRoomClick:()=>F(e),onAddSubspaceClick:()=>R(e),space:e,onFinished:t=>{t&&v.a.getRoomId()===e.roomId&&b.a.fire(y.a.UpdateSpaceHierarchy)}},"mx_AddExistingToSpaceDialog_wrapper")},F=async e=>{const t=s.a.createTrackedDialog("Space Landing","Create Room",u.a,{defaultPublic:"public"===e.getJoinRule(),parentSpace:e}),[n,r]=await t.finished;return n&&await Object(d.b)(r),n},O=(e,t="")=>{if("public"===e.getJoinRule()){const t=s.a.createTrackedDialog("Space Invite","User Menu",m.a,{title:Object(h.a)("Invite to %(spaceName)s",{spaceName:e.name}),description:o.a.createElement(o.a.Fragment,null,o.a.createElement("span",null,Object(h.a)("Share your public space")),o.a.createElement(p.a,{space:e,onFinished:()=>t.close()})),fixedWidth:!1,button:!1,className:"mx_SpacePanel_sharePublicSpace",hasCloseButton:!0})}else Object(g.g)(e.roomId,t)},R=e=>{s.a.createTrackedDialog("Space Landing","Create Subspace",_.a,{space:e,onCreateSubspaceClick:()=>D(e),onFinished:t=>{t&&v.a.getRoomId()===e.roomId&&b.a.fire(y.a.UpdateSpaceHierarchy)}},"mx_AddExistingToSpaceDialog_wrapper")},D=e=>{s.a.createTrackedDialog("Space Landing","Create Subspace",f.a,{space:e,onAddExistingSpaceClick:()=>R(e),onFinished:t=>{t&&v.a.getRoomId()===e.roomId&&b.a.fire(y.a.UpdateSpaceHierarchy)}},"mx_CreateSubspaceDialog_wrapper")},I=e=>{s.a.createTrackedDialog("Leave Space","",w.a,{space:e,onFinished:async(t,n)=>{if(!t)return;const r=s.a.createDialog(S.a,null,"mx_Dialog_spinner");try{await Promise.all(n.map(e=>Object(E.d)(e.roomId))),await Object(E.d)(e.roomId)}finally{r.close()}b.a.dispatch({action:"after_leave_room",room_id:e.roomId})}},"mx_LeaveSpaceDialog_wrapper")}},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(90),l=n(87),u=n(80),d=n(451),h=n(85),p=n(81),m=n(110),g=n(95),f=n(101),_=n(97),b=n(116);let v=Object(p.a)("views.dialogs.BugReportDialog")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"unmounted",void 0),i()(this,"onCancel",()=>{this.props.onFinished(!1)}),i()(this,"onSubmit",()=>{if(!(this.state.text&&this.state.text.trim()||this.state.issueUrl&&this.state.issueUrl.trim()))return void this.setState({err:Object(u.a)("Please tell us what went wrong or, better, create a GitHub issue that describes the problem.")});const e=(this.state.text.length>0?this.state.text+"\n\n":"")+"Issue: "+(this.state.issueUrl.length>0?this.state.issueUrl:"No issue link given");this.setState({busy:!0,progress:null,err:null}),this.sendProgressCallback(Object(u.a)("Preparing to send logs")),Object(d.a)(c.a.get().bug_report_endpoint_url,{userText:e,sendLogs:!0,progressCallback:this.sendProgressCallback,label:this.props.label}).then(()=>{this.unmounted||(this.props.onFinished(!1),l.a.createTrackedDialog("Bug report sent","",m.a,{title:Object(u.a)("Logs sent"),description:Object(u.a)("Thank you!"),hasCancelButton:!1}))},e=>{this.unmounted||this.setState({busy:!1,progress:null,err:Object(u.a)("Failed to send logs: ")+""+e.message})})}),i()(this,"onDownload",async()=>{this.setState({downloadBusy:!0}),this.downloadProgressCallback(Object(u.a)("Preparing to download logs"));try{await Object(d.b)({sendLogs:!0,progressCallback:this.downloadProgressCallback,label:this.props.label}),this.setState({downloadBusy:!1,downloadProgress:null})}catch(e){this.unmounted||this.setState({downloadBusy:!1,downloadProgress:Object(u.a)("Failed to send logs: ")+""+e.message})}}),i()(this,"onTextChange",e=>{this.setState({text:e.currentTarget.value})}),i()(this,"onIssueUrlChange",e=>{this.setState({issueUrl:e.currentTarget.value})}),i()(this,"sendProgressCallback",e=>{this.unmounted||this.setState({progress:e})}),i()(this,"downloadProgressCallback",e=>{this.unmounted||this.setState({downloadProgress:e})}),this.state={sendLogs:!0,busy:!1,err:null,issueUrl:"",text:e.initialText||"",progress:null,downloadBusy:!1,downloadProgress:null},this.unmounted=!1}componentWillUnmount(){this.unmounted=!0}render(){let e=null;this.state.err&&(e=s.a.createElement("div",{className:"error"},this.state.err));let t,n=null;return this.state.busy&&(n=s.a.createElement("div",{className:"progress"},s.a.createElement(_.a,null),this.state.progress," ...")),window.Modernizr&&Object.values(window.Modernizr).some(e=>!1===e)&&(t=s.a.createElement("p",null,s.a.createElement("b",null,Object(u.a)("Reminder: Your browser is unsupported, so your experience may be unpredictable.")))),s.a.createElement(g.a,{className:"mx_BugReportDialog",onFinished:this.onCancel,title:Object(u.a)("Submit debug logs"),contentId:"mx_Dialog_content"},s.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},t,s.a.createElement("p",null,Object(u.a)("Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.")),s.a.createElement("p",null,s.a.createElement("b",null,Object(u.a)("Before submitting logs, you must <a>create a GitHub issue</a> to describe your problem.",{},{a:e=>s.a.createElement("a",{target:"_blank",href:"https://github.com/vector-im/element-web/issues/new"},e)}))),s.a.createElement("div",{className:"mx_BugReportDialog_download"},s.a.createElement(h.a,{onClick:this.onDownload,kind:"link",disabled:this.state.downloadBusy},Object(u.a)("Download logs")),this.state.downloadProgress&&s.a.createElement("span",null,this.state.downloadProgress," ...")),s.a.createElement(f.a,{type:"text",className:"mx_BugReportDialog_field_input",label:Object(u.a)("GitHub issue"),onChange:this.onIssueUrlChange,value:this.state.issueUrl,placeholder:"https://github.com/vector-im/element-web/issues/..."}),s.a.createElement(f.a,{className:"mx_BugReportDialog_field_input",element:"textarea",label:Object(u.a)("Notes"),rows:5,onChange:this.onTextChange,value:this.state.text,placeholder:Object(u.a)("If there is additional context that would help in analysing the issue, such as what you were doing at the time, room IDs, user IDs, etc., please include those things here.")}),n,e),s.a.createElement(b.a,{primaryButton:Object(u.a)("Send logs"),onPrimaryButtonClick:this.onSubmit,focus:!0,onCancel:this.onCancel,disabled:this.state.busy}))}})||r},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.default=t.ReactReduxContext=void 0;var o=r(n(78)).default.createContext(null);t.ReactReduxContext=o,o.displayName="ReactRedux";var i=o;t.default=i},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(86),a=n.n(i);const s=Object(r.forwardRef)(({className:e,title:t,subtitle:n,children:r},i)=>o.a.createElement("div",{className:a()("mx_EventTileBubble",e),ref:i},o.a.createElement("div",{className:"mx_EventTileBubble_title"},t),n&&o.a.createElement("div",{className:"mx_EventTileBubble_subtitle"},n),r));t.a=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,o=n(78),i=n.n(o),a=n(81),s=n(821);let c=Object(a.a)("views.auth.AuthPage")(r=class extends i.a.PureComponent{render(){return i.a.createElement("div",{className:"mx_AuthPage"},i.a.createElement("div",{className:"mx_AuthPage_modal"},this.props.children),i.a.createElement(s.a,null))}})||r},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(111),a=n(3),s=n(160),c=n(152),l=n(2),u=n(82),d=n(84),h=n(98);class p extends a.EventEmitter{constructor(...e){super(...e),o()(this,"crawlerCheckpoints",[]),o()(this,"crawler",null),o()(this,"currentCheckpoint",null),o()(this,"onSync",async(e,t,n)=>{const r=i.a.get().getEventIndexingManager();if("PREPARED"===t&&"SYNCING"===e){return await r.isEventIndexEmpty()&&await this.addInitialCheckpoints(),void this.startCrawler()}"SYNCING"!==t||"SYNCING"!==e||await r.commitLiveEvents()}),o()(this,"onRoomTimeline",async(e,t,n,r,o)=>{const i=u.a.get();i.isRoomEncrypted(t.roomId)&&!n&&o&&o.liveEvent&&!e.isRedacted()&&(await i.decryptEventIfNeeded(e),await this.addLiveEventToIndex(e))}),o()(this,"onRoomStateEvent",async(e,t)=>{u.a.get().isRoomEncrypted(t.roomId)&&("m.room.encryption"!==e.getType()||await this.isRoomIndexed(t.roomId)||(console.log("EventIndex: Adding a checkpoint for a newly encrypted room",t.roomId),this.addRoomCheckpoint(t.roomId,!0)))}),o()(this,"onRedaction",async(e,t)=>{if(!u.a.get().isRoomEncrypted(t.roomId))return;const n=i.a.get().getEventIndexingManager();try{await n.deleteEvent(e.getAssociatedId())}catch(e){console.log("EventIndex: Error deleting event from index",e)}}),o()(this,"onTimelineReset",async(e,t,n)=>{null!==e&&u.a.get().isRoomEncrypted(e.roomId)&&(console.log("EventIndex: Adding a checkpoint because of a limited timeline",e.roomId),this.addRoomCheckpoint(e.roomId,!1))})}async init(){const e=i.a.get().getEventIndexingManager();this.crawlerCheckpoints=await e.loadCheckpoints(),console.log("EventIndex: Loaded checkpoints",this.crawlerCheckpoints),this.registerListeners()}registerListeners(){const e=u.a.get();e.on("sync",this.onSync),e.on("Room.timeline",this.onRoomTimeline),e.on("Room.timelineReset",this.onTimelineReset),e.on("Room.redaction",this.onRedaction),e.on("RoomState.events",this.onRoomStateEvent)}removeListeners(){const e=u.a.get();null!==e&&(e.removeListener("sync",this.onSync),e.removeListener("Room.timeline",this.onRoomTimeline),e.removeListener("Room.timelineReset",this.onTimelineReset),e.removeListener("Room.redaction",this.onRedaction),e.removeListener("RoomState.events",this.onRoomStateEvent))}async addInitialCheckpoints(){const e=i.a.get().getEventIndexingManager(),t=u.a.get(),n=t.getRooms().filter(e=>t.isRoomEncrypted(e.roomId));console.log("EventIndex: Adding initial crawler checkpoints"),await Promise.all(n.map(async t=>{const n=t.getLiveTimeline().getPaginationToken(c.a.Backward),r={roomId:t.roomId,token:n,direction:c.a.Backward,fullCrawl:!0},o={roomId:t.roomId,token:n,direction:c.a.Forward};try{r.token&&(await e.addCrawlerCheckpoint(r),this.crawlerCheckpoints.push(r)),o.token&&(await e.addCrawlerCheckpoint(o),this.crawlerCheckpoints.push(o))}catch(e){console.log("EventIndex: Error adding initial checkpoints for room",t.roomId,r,o,e)}}))}isValidEvent(e){const t=["m.room.message","m.room.name","m.room.topic"].includes(e.getType())&&!e.isRedacted()&&!e.isDecryptionFailure();let n=!0,r=!0;if("m.room.message"!==e.getType()||e.isRedacted())"m.room.topic"!==e.getType()||e.isRedacted()?"m.room.name"!==e.getType()||e.isRedacted()||e.getContent().name||(r=!1):e.getContent().topic||(r=!1);else{const t=e.getContent().msgtype;n=!!t&&!t.startsWith("m.key.verification"),e.getContent().body||(r=!1)}return t&&n&&r}eventToJson(e){const t=e.toJSON(),n=e.isEncrypted()?t.decrypted:t;return e.isEncrypted()?(n.curve25519Key=e.getSenderKey(),n.ed25519Key=e.getClaimedEd25519Key(),n.algorithm=e.getWireContent().algorithm,n.forwardingCurve25519KeyChain=e.getForwardingCurve25519KeyChain()):(delete n.curve25519Key,delete n.ed25519Key,delete n.algorithm,delete n.forwardingCurve25519KeyChain),n}async addLiveEventToIndex(e){const t=i.a.get().getEventIndexingManager();if(!this.isValidEvent(e))return;const n=this.eventToJson(e),r={displayname:e.sender.rawDisplayName,avatar_url:e.sender.getMxcAvatarUrl()};await t.addEventToIndex(n,r)}emitNewCheckpoint(){this.emit("changedCheckpoint",this.currentRoom())}async addEventsFromLiveTimeline(e){const t=e.getEvents();for(let e=0;e<t.length;e++){const n=t[e];await this.addLiveEventToIndex(n)}}async addRoomCheckpoint(e,t=!1){const n=i.a.get().getEventIndexingManager(),r=u.a.get().getRoom(e);if(!r)return;const o=r.getLiveTimeline(),a=o.getPaginationToken(c.a.Backward);if(!a)return void await this.addEventsFromLiveTimeline(o);const s={roomId:r.roomId,token:a,fullCrawl:t,direction:c.a.Backward};console.log("EventIndex: Adding checkpoint",s);try{await n.addCrawlerCheckpoint(s)}catch(e){console.log("EventIndex: Error adding new checkpoint for room",r.roomId,s,e)}this.crawlerCheckpoints.push(s)}async crawlerFunc(){let e=!1;const t=u.a.get(),n=i.a.get().getEventIndexingManager();this.crawler={cancel:()=>{e=!0}};let r=!1;for(;!e;){let o=d.b.getValueAt(h.a.DEVICE,"crawlerSleepTime");if(o=Math.max(o,100),r&&(o=5e3),null!==this.currentCheckpoint&&(this.currentCheckpoint=null,this.emitNewCheckpoint()),await Object(l.H)(o),e)break;const i=this.crawlerCheckpoints.shift();if(void 0===i){r=!0;continue}this.currentCheckpoint=i,this.emitNewCheckpoint(),r=!1;const a=t.getEventMapper({preventReEmit:!0});let s;try{s=await t.createMessagesRequest(i.roomId,i.token,100,i.direction)}catch(e){if(403===e.httpStatus){console.log("EventIndex: Removing checkpoint as we don't have ","permissions to fetch messages from this room.",i);try{await n.removeCrawlerCheckpoint(i)}catch(e){console.log("EventIndex: Error removing checkpoint",i,e)}continue}console.log("EventIndex: Error crawling using checkpoint:",i,",",e),this.crawlerCheckpoints.push(i);continue}if(e){this.crawlerCheckpoints.push(i);break}if(0===s.chunk.length){console.log("EventIndex: Done with the checkpoint",i);try{await n.removeCrawlerCheckpoint(i)}catch(e){console.log("EventIndex: Error removing checkpoint",i,e)}continue}const c=s.chunk.map(a);let u=[];void 0!==s.state&&(u=s.state.map(a));const p={};u.forEach(e=>{e.event.content&&"join"===e.event.content.membership&&(p[e.event.sender]={displayname:e.event.content.displayname,avatar_url:e.event.content.avatar_url})});const m=c.filter(e=>e.isEncrypted()).map(e=>t.decryptEventIfNeeded(e,{isRetry:!0,emit:!1}));await Promise.all(m);const g=c.filter(this.isValidEvent),f=c.filter(e=>"m.room.redaction"===e.getType()),_=g.map(e=>{const t=this.eventToJson(e);let n={};t.sender in p&&(n=p[t.sender]);return{event:t,profile:n}});let b;s.end&&(b={roomId:i.roomId,token:s.end,fullCrawl:i.fullCrawl,direction:i.direction});try{for(let e=0;e<f.length;e++){const t=f[e],r=t.getAssociatedId();r?await n.deleteEvent(r):console.warn("EventIndex: Redaction event doesn't contain a valid associated event id",t)}const e=await n.addHistoricEvents(_,b,i);if(!b){console.log("EventIndex: The server didn't return a valid ","new checkpoint, not continuing the crawl.",i);continue}!0===e&&!0!==b.fullCrawl?(console.log("EventIndex: Checkpoint had already all events","added, stopping the crawl",i),await n.removeCrawlerCheckpoint(b)):(!0===e&&console.log("EventIndex: Checkpoint had already all events","added, but continuing due to a full crawl",i),this.crawlerCheckpoints.push(b))}catch(e){console.log("EventIndex: Error durring a crawl",e),this.crawlerCheckpoints.push(i)}}this.crawler=null}startCrawler(){null===this.crawler&&this.crawlerFunc()}stopCrawler(){null!==this.crawler&&this.crawler.cancel()}async close(){const e=i.a.get().getEventIndexingManager();this.removeListeners(),this.stopCrawler(),await e.closeEventIndex()}async search(e){return i.a.get().getEventIndexingManager().searchEventIndex(e)}async loadFileEvents(e,t=10,n=null,r=c.b.BACKWARDS){const o=u.a.get(),a=i.a.get().getEventIndexingManager(),l={roomId:e.roomId,limit:t};let d;n&&(l.fromEvent=n,l.direction=r);try{d=await a.loadFileEvents(l)}catch(e){return console.log("EventIndex: Error getting file events",e),[]}const h=o.getEventMapper();return d.map(t=>{const n=h(t.event),r=new s.a(e.roomId,n.getSender());r.name=t.profile.displayname+" ("+n.getSender()+")";const o=h({content:{membership:"join",avatar_url:t.profile.avatar_url,displayname:t.profile.displayname},type:"m.room.member",event_id:n.getId()+":eventIndex",room_id:n.getRoomId(),sender:n.getSender(),origin_server_ts:n.getTs(),state_key:n.getSender()});return r.events.member=o,n.sender=r,n})}async populateFileTimeline(e,t,n,r=10,o=null,i=c.b.BACKWARDS){const a=await this.loadFileEvents(n,r,o,i);null===o&&(a.reverse(),i=i==c.b.BACKWARDS?c.b.FORWARDS:c.b.BACKWARDS),a.forEach(n=>{e.eventIdToTimeline(n.getId())||e.addEventToTimeline(n,t,i==c.b.BACKWARDS)});let s=!1,l="";return a.length>0&&(l=a[a.length-1].getId(),s=!0),console.log("EventIndex: Populating file panel with",a.length,"events and setting the pagination token to",l),t.setPaginationToken(l,c.b.BACKWARDS),s}paginateTimelineWindow(e,t,n,r){const o=t.getTimelineIndex(n);if(!o)return Promise.resolve(!1);if(o.pendingPaginate)return o.pendingPaginate;if(t.extend(n,r))return Promise.resolve(!0);const i=(async(e,t,n,r,o)=>{const i=e._timelineSet,a=t.timeline.getPaginationToken(r),s=await this.populateFileTimeline(i,t.timeline,n,o,a,r);return t.pendingPaginate=null,e.extend(r,o),s})(t,o,e,n,r);return o.pendingPaginate=i,i}async getStats(){return i.a.get().getEventIndexingManager().getStats()}async isRoomIndexed(e){return i.a.get().getEventIndexingManager().isRoomIndexed(e)}currentRoom(){if(null===this.currentCheckpoint&&0===this.crawlerCheckpoints.length)return null;const e=u.a.get();return null!==this.currentCheckpoint?e.getRoom(this.currentCheckpoint.roomId):e.getRoom(this.crawlerCheckpoints[0].roomId)}crawlingRooms(){const e=new Set,t=new Set;this.crawlerCheckpoints.forEach((e,n)=>{t.add(e.roomId)}),null!==this.currentCheckpoint&&t.add(this.currentCheckpoint.roomId);const n=u.a.get();return n.getRooms().filter(e=>n.isRoomEncrypted(e.roomId)).forEach((t,n)=>{e.add(t.roomId)}),{crawlingRooms:t,totalRooms:e}}}class m{constructor(){o()(this,"index",null),o()(this,"error",null),o()(this,"_supportIsInstalled",!1)}async init(){const e=i.a.get().getEventIndexingManager();return e?(this._supportIsInstalled=await e.supportsEventIndexing(),this.supportIsInstalled()?d.b.getValueAt(h.a.DEVICE,"enableEventIndexing")?this.initEventIndex():(console.log("EventIndex: Event indexing is disabled, not initializing"),!1):(console.log("EventIndex: Event indexing isn't installed for the platform, not initializing."),!1)):(console.log("EventIndex: Platform doesn't support event indexing, not initializing."),!1)}async initEventIndex(){const e=new p,t=i.a.get().getEventIndexingManager(),n=u.a.get(),r=n.getUserId(),o=n.getDeviceId();try{await t.initEventIndex(r,o);const n=await t.getUserVersion(),i=await t.isEventIndexEmpty();i?await t.setUserVersion(1):0!==n||i||(await t.closeEventIndex(),await this.deleteEventIndex(),await t.initEventIndex(r,o),await t.setUserVersion(1)),console.log("EventIndex: Successfully initialized the event index"),await e.init()}catch(e){return console.log("EventIndex: Error initializing the event index",e),this.error=e,!1}return this.index=e,!0}platformHasSupport(){return null!==i.a.get().getEventIndexingManager()}supportIsInstalled(){return this._supportIsInstalled}get(){return this.index}start(){null!==this.index&&this.index.startCrawler()}stop(){null!==this.index&&this.index.stopCrawler()}async unset(){null!==this.index&&(await this.index.close(),this.index=null)}async deleteEventIndex(){const e=i.a.get().getEventIndexingManager();null!==e&&(await this.unset(),console.log("EventIndex: Deleting event index."),await e.deleteEventIndex())}}window.mxEventIndexPeg||(window.mxEventIndexPeg=new m);t.a=window.mxEventIndexPeg},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2),o=n(3);function i(e){this.groupId=e,this.name=null,this.avatarUrl=null,this.myMembership=null,this.inviter=null}r.t(i,o.EventEmitter),i.prototype.setProfile=function(e,t){this.name===e&&this.avatarUrl===t||(this.name=e||this.groupId,this.avatarUrl=t,this.emit("Group.profile",this))},i.prototype.setMyMembership=function(e){this.myMembership!==e&&(this.myMembership=e,this.emit("Group.myMembership",this))},i.prototype.setInviter=function(e){this.inviter=e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),o=n(96);const i=["override","content","room","sender","underride"],a=[{rule_id:".m.rule.tombstone",default:!0,enabled:!0,conditions:[{kind:"event_match",key:"type",pattern:"m.room.tombstone"},{kind:"event_match",key:"state_key",pattern:""}],actions:["notify",{set_tweak:"highlight",value:!0}]},{rule_id:".m.rule.reaction",default:!0,enabled:!0,conditions:[{kind:"event_match",key:"type",pattern:"m.reaction"}],actions:["dont_notify"]}];function s(e){const t={},n=(e,t)=>{for(let n=0;n<i.length;++n){const r=i[n],a=t[r];if(a)for(let t=0;t<a.length;++t){const n=a[t];if(!n.enabled)continue;const i=o(r,n);if(i&&this.ruleMatchesEvent(i,e))return n.kind=r,n}}return null},o=function(e,t){const n={rule_id:t.rule_id,actions:t.actions,conditions:[]};switch(e){case"underride":case"override":n.conditions=t.conditions;break;case"room":if(!t.rule_id)return null;n.conditions.push({kind:"event_match",key:"room_id",value:t.rule_id});break;case"sender":if(!t.rule_id)return null;n.conditions.push({kind:"event_match",key:"user_id",value:t.rule_id});break;case"content":if(!t.pattern)return null;n.conditions.push({kind:"event_match",key:"content.body",pattern:t.pattern})}return n},a=function(e,t){const n={event_match:d,contains_display_name:u,room_member_count:l,sender_notification_permission:c};return!!n[e.kind]&&n[e.kind](e,t)},c=function(t,n){const r=t.key;if(!r)return!1;const o=e.getRoom(n.getRoomId());return!(!o||!o.currentState)&&o.currentState.mayTriggerNotifOfType(r,n.getSender())},l=function(t,n){if(!t.is)return!1;const r=e.getRoom(n.getRoomId());if(!r||!r.currentState||!r.currentState.members)return!1;const o=r.currentState.getJoinedMemberCount(),i=t.is.match(/^([=<>]*)([0-9]*)$/);if(!i)return!1;const a=i[1],s=parseInt(i[2]);if(isNaN(s))return!1;switch(a){case"":case"==":return o==s;case"<":return o<s;case">":return o>s;case"<=":return o<=s;case">=":return o>=s;default:return!1}},u=function(t,n){let o=n.getContent();if(n.isEncrypted()&&n.getClearContent()&&(o=n.getClearContent()),!o||!o.body||"string"!=typeof o.body)return!1;const i=e.getRoom(n.getRoomId());if(!(i&&i.currentState&&i.currentState.members&&i.currentState.getMember(e.credentials.userId)))return!1;const a=i.currentState.getMember(e.credentials.userId).name,s=new RegExp("(^|\\W)"+Object(r.p)(a)+"(\\W|$)","i");return o.body.search(s)>-1},d=function(e,t){if(!e.key)return!1;const n=p(e.key,t);if("string"!=typeof n)return!1;if(e.value)return e.value===n;if("string"!=typeof e.pattern)return!1;let r;return r="content.body"==e.key?h("(^|\\W)",e.pattern,"(\\W|$)"):h("^",e.pattern,"$"),!!n.match(r)},h=function(e,n,o){return t[n]||(t[n]=new RegExp(e+Object(r.s)(n)+o,"i")),t[n]},p=function(e,t){const n=e.split(".");let o;const i=n[0];for("content"===i?(o=t.getContent(),n.shift()):"type"===i?(o=t.getType(),n.shift()):o=t.event;n.length>0;){const e=n.shift();if(Object(r.v)(o[e]))return null;o=o[e]}return o},m=function(t,r){const o=function(t,r){return r?t.getSender()===e.credentials.userId?null:n(t,r.global):null}(t,r);if(!o)return{};const i=s.actionListToActionsObject(o.actions);return void 0===i.tweaks.highlight&&(i.tweaks.highlight="content"==o.kind),i};this.ruleMatchesEvent=function(e,t){let n=!0;for(let r=0;r<e.conditions.length;++r){const o=e.conditions[r];n&=a(o,t)}return n},this.actionsForEvent=function(t){return m(t,e.pushRules)},this.getPushRuleById=function(t){for(const n of["global"])if(void 0!==e.pushRules[n])for(const r of i)if(void 0!==e.pushRules[n][r])for(const o of e.pushRules[n][r])if(o.rule_id===t)return o;return null}}s.actionListToActionsObject=function(e){const t={notify:!1,tweaks:{}};for(let n=0;n<e.length;++n){const r=e[n];"notify"===r?t.notify=!0:"object"==typeof r&&(void 0===r.value&&(r.value=!0),t.tweaks[r.set_tweak]=r.value)}return t},s.rewriteDefaultRules=function(e){let t=JSON.parse(JSON.stringify(e));t||(t={}),t.global||(t.global={}),t.global.override||(t.global.override=[]);const n=t.global.override;for(const e of a){const t=n.find(t=>t.rule_id===e.rule_id);if(t)t.default=e.default,t.conditions=e.conditions,t.actions=e.actions;else{const t=e.rule_id;o.a.warn("Adding default global override for "+t),n.push(e)}}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(96),o=n(169);class i{static get ERROR_INVALID(){return"Invalid homeserver discovery response"}static get ERROR_GENERIC_FAILURE(){return"Failed to get autodiscovery configuration from server"}static get ERROR_INVALID_HS_BASE_URL(){return"Invalid base_url for m.homeserver"}static get ERROR_INVALID_HOMESERVER(){return"Homeserver URL does not appear to be a valid Matrix homeserver"}static get ERROR_INVALID_IS_BASE_URL(){return"Invalid base_url for m.identity_server"}static get ERROR_INVALID_IDENTITY_SERVER(){return"Identity server URL does not appear to be a valid identity server"}static get ERROR_INVALID_IS(){return"Invalid identity server discovery response"}static get ERROR_MISSING_WELLKNOWN(){return"No .well-known JSON file found"}static get ERROR_INVALID_JSON(){return"Invalid JSON"}static get ALL_ERRORS(){return[i.ERROR_INVALID,i.ERROR_GENERIC_FAILURE,i.ERROR_INVALID_HS_BASE_URL,i.ERROR_INVALID_HOMESERVER,i.ERROR_INVALID_IS_BASE_URL,i.ERROR_INVALID_IDENTITY_SERVER,i.ERROR_INVALID_IS,i.ERROR_MISSING_WELLKNOWN,i.ERROR_INVALID_JSON]}static get FAIL_ERROR(){return"FAIL_ERROR"}static get FAIL_PROMPT(){return"FAIL_PROMPT"}static get PROMPT(){return"PROMPT"}static get SUCCESS(){return"SUCCESS"}static async fromDiscoveryConfig(e){const t={"m.homeserver":{state:i.FAIL_ERROR,error:i.ERROR_INVALID,base_url:null},"m.identity_server":{state:i.PROMPT,error:null,base_url:null}};if(!e||!e["m.homeserver"])return r.a.error("No m.homeserver key in config"),t["m.homeserver"].state=i.FAIL_PROMPT,t["m.homeserver"].error=i.ERROR_INVALID,Promise.resolve(t);if(!e["m.homeserver"].base_url)return r.a.error("No m.homeserver base_url in config"),t["m.homeserver"].state=i.FAIL_PROMPT,t["m.homeserver"].error=i.ERROR_INVALID_HS_BASE_URL,Promise.resolve(t);const n=this._sanitizeWellKnownUrl(e["m.homeserver"].base_url);if(!n)return r.a.error("Invalid base_url for m.homeserver"),t["m.homeserver"].error=i.ERROR_INVALID_HS_BASE_URL,Promise.resolve(t);const o=await this._fetchWellKnownObject(n+"/_matrix/client/versions");if(!o||!o.raw.versions)return r.a.error("Invalid /versions response"),t["m.homeserver"].error=i.ERROR_INVALID_HOMESERVER,t["m.homeserver"].base_url=n,Promise.resolve(t);t["m.homeserver"]={state:i.SUCCESS,error:null,base_url:n};let a="";if(e["m.identity_server"]){const n={"m.homeserver":t["m.homeserver"],"m.identity_server":{state:i.FAIL_PROMPT,error:i.ERROR_INVALID_IS,base_url:null}};if(a=this._sanitizeWellKnownUrl(e["m.identity_server"].base_url),!a)return r.a.error("Invalid base_url for m.identity_server"),n["m.identity_server"].error=i.ERROR_INVALID_IS_BASE_URL,Promise.resolve(n);const o=await this._fetchWellKnownObject(a+"/_matrix/identity/api/v1");if(!o||!o.raw||"SUCCESS"!==o.action)return r.a.error("Invalid /api/v1 response"),n["m.identity_server"].error=i.ERROR_INVALID_IDENTITY_SERVER,n["m.identity_server"].base_url=a,Promise.resolve(n)}return a&&a.length>0&&(t["m.identity_server"]={state:i.SUCCESS,error:null,base_url:a}),Object.keys(e).map(n=>{if("m.homeserver"===n||"m.identity_server"===n){const r=["error","state","base_url"];for(const o of Object.keys(e[n]))r.includes(o)||(t[n][o]=e[n][o])}else t[n]=e[n]}),Promise.resolve(t)}static async findClientConfig(e){if(!e||"string"!=typeof e||0===e.length)throw new Error("'domain' must be a string of non-zero length");const t={"m.homeserver":{state:i.FAIL_ERROR,error:i.ERROR_INVALID,base_url:null},"m.identity_server":{state:i.PROMPT,error:null,base_url:null}},n=await this._fetchWellKnownObject(`https://${e}/.well-known/matrix/client`);return n&&"SUCCESS"===n.action?i.fromDiscoveryConfig(n.raw):(r.a.error("No response or error when parsing .well-known"),n.reason&&r.a.error(n.reason),"IGNORE"===n.action?t["m.homeserver"]={state:i.PROMPT,error:null,base_url:null}:(t["m.homeserver"].state=i.FAIL_PROMPT,t["m.homeserver"].error=i.ERROR_INVALID),Promise.resolve(t))}static async getRawClientConfig(e){if(!e||"string"!=typeof e||0===e.length)throw new Error("'domain' must be a string of non-zero length");const t=await this._fetchWellKnownObject(`https://${e}/.well-known/matrix/client`);return t&&t.raw||{}}static _sanitizeWellKnownUrl(e){if(!e)return!1;try{let t=null;try{t=o.URL?new o.URL(e):new URL(e)}catch(n){t=new URL(e)}if(!t||!t.hostname)return!1;if("http:"!==t.protocol&&"https:"!==t.protocol)return!1;const n=t.port?":"+t.port:"",r=t.pathname?t.pathname:"";let i=`${t.protocol}//${t.hostname}${n}${r}`;return i.endsWith("/")&&(i=i.substring(0,i.length-1)),i}catch(e){return r.a.error(e),!1}}static async _fetchWellKnownObject(e){return new Promise((function(t,r){const o=n(134).getRequest();if(!o)throw new Error("No request library available");o({method:"GET",uri:e,timeout:5e3},(e,n,r)=>{if(e||n&&(n.statusCode<200||n.statusCode>=300)){let r="FAIL_PROMPT",o=(e?e.message:null)||"General failure";return n&&404===n.statusCode&&(r="IGNORE",o=i.ERROR_MISSING_WELLKNOWN),void t({raw:{},action:r,reason:o,error:e})}try{t({raw:JSON.parse(r),action:"SUCCESS"})}catch(e){let n=i.ERROR_INVALID;"SyntaxError"===e.name&&(n=i.ERROR_INVALID_JSON),t({raw:{},action:"FAIL_PROMPT",reason:n,error:e})}})}))}}},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));var r=n(2),o=n(135);const i="undefined"!=typeof window&&window.crypto?window.crypto.subtle||window.crypto.webkitSubtle:null,a=new Uint8Array(8);function s(t,n){const o=Object(r.r)(),i=o.createHmac("sha256",a).update(t).digest(),s=e.alloc(1,1),c=o.createHmac("sha256",i).update(n,"utf8").update(s).digest();s[0]=2;return[c,o.createHmac("sha256",i).update(c).update(n,"utf8").update(s).digest()]}async function c(e,t){const n=await i.importKey("raw",e,{name:"HKDF"},!1,["deriveBits"]),r=await i.deriveBits({name:"HKDF",salt:a,info:(new TextEncoder).encode(t),hash:"SHA-256"},n,512),o=r.slice(0,32),s=r.slice(32),c=i.importKey("raw",o,{name:"AES-CTR"},!1,["encrypt","decrypt"]),l=i.importKey("raw",s,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]);return await Promise.all([c,l])}function l(t,n,a,l){return i?async function(e,t,n,r){let a;r?a=Object(o.decodeBase64)(r):(a=new Uint8Array(16),window.crypto.getRandomValues(a),a[8]&=127);const[s,l]=await c(t,n),u=(new TextEncoder).encode(e),d=await i.encrypt({name:"AES-CTR",counter:a,length:64},s,u),h=await i.sign({name:"HMAC"},l,d);return{iv:Object(o.encodeBase64)(a),ciphertext:Object(o.encodeBase64)(d),mac:Object(o.encodeBase64)(h)}}(t,n,a,l):async function(t,n,i,a){const c=Object(r.r)();if(!c)throw new Error("No usable crypto implementation");let l;a?l=Object(o.decodeBase64)(a):(l=c.randomBytes(16),l[8]&=127);const[u,d]=s(n,i),h=c.createCipheriv("aes-256-ctr",u,l),p=e.concat([h.update(t,"utf8"),h.final()]),m=c.createHmac("sha256",d).update(p).digest("base64");return{iv:Object(o.encodeBase64)(l),ciphertext:p.toString("base64"),mac:m}}(t,n,a,l)}function u(t,n,a){return i?async function(e,t,n){const[r,a]=await c(t,n),s=Object(o.decodeBase64)(e.ciphertext);if(!await i.verify({name:"HMAC"},a,Object(o.decodeBase64)(e.mac),s))throw new Error(`Error decrypting secret ${n}: bad MAC`);const l=await i.decrypt({name:"AES-CTR",counter:Object(o.decodeBase64)(e.iv),length:64},r,s);return(new TextDecoder).decode(new Uint8Array(l))}(t,n,a):async function(t,n,i){const a=Object(r.r)();if(!a)throw new Error("No usable crypto implementation");const[c,l]=s(n,i);if(a.createHmac("sha256",l).update(e.from(t.ciphertext,"base64")).digest("base64").replace(/=+$/g,"")!==t.mac.replace(/=+$/g,""))throw new Error(`Error decrypting secret ${i}: bad MAC`);const u=a.createDecipheriv("aes-256-ctr",c,Object(o.decodeBase64)(t.iv));return u.update(t.ciphertext,"base64","utf8")+u.final("utf8")}(t,n,a)}function d(e,t){return l("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",e,"",t)}}).call(this,n(24).Buffer)},function(e,t,n){"use strict";let r,o,i;n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c})),function(e){e.DontNotify="dont_notify",e.Notify="notify",e.Coalesce="coalesce"}(r||(r={})),function(e){e.Highlight="highlight",e.Sound="sound"}(o||(o={})),function(e){e.ExactEquals="==",e.LessThan="<",e.GreaterThan=">",e.GreaterThanOrEqual=">=",e.LessThanOrEqual="<="}(i||(i={}));let a,s,c;!function(e){e.EventMatch="event_match",e.ContainsDisplayName="contains_display_name",e.RoomMemberCount="room_member_count",e.SenderNotificationPermission="sender_notification_permission"}(a||(a={})),function(e){e.Override="override",e.ContentSpecific="content",e.RoomSpecific="room",e.SenderSpecific="sender",e.Underride="underride"}(s||(s={})),function(e){e.Master=".m.rule.master",e.ContainsDisplayName=".m.rule.contains_display_name",e.ContainsUserName=".m.rule.contains_user_name",e.AtRoomNotification=".m.rule.roomnotif",e.DM=".m.rule.room_one_to_one",e.EncryptedDM=".m.rule.encrypted_room_one_to_one",e.Message=".m.rule.message",e.EncryptedMessage=".m.rule.encrypted",e.InviteToSelf=".m.rule.invite_for_me",e.MemberEvent=".m.rule.member_event",e.IncomingCall=".m.rule.call",e.SuppressNotices=".m.rule.suppress_notices",e.Tombstone=".m.rule.tombstone"}(c||(c={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n(80),u=n(117),d=n(81),h=n(86),p=n.n(h),m=n(85);class g{constructor(e,t,n,r){this.id=e,this.label=t,this.icon=n,this.body=r}}let f;!function(e){e.LEFT="left",e.TOP="top"}(f||(f={}));let _=Object(d.a)("structures.TabbedView")((i=o=class extends c.Component{constructor(e){super(e);let t=0;if(e.initialTabId){const n=e.tabs.findIndex(t=>t.id===e.initialTabId);n>=0&&(t=n)}this.state={activeTabIndex:t}}getActiveTabIndex(){return this.state&&this.state.activeTabIndex?this.state.activeTabIndex:0}setActiveTab(e){const t=this.props.tabs.indexOf(e);-1!==t?(this.props.onChange&&this.props.onChange(e.id),this.setState({activeTabIndex:t})):console.error("Could not find tab "+e.label+" in tabs")}renderTabLabel(e){let t="mx_TabbedView_tabLabel ";this.props.tabs.indexOf(e)===this.getActiveTabIndex()&&(t+="mx_TabbedView_tabLabel_active");let n=null;e.icon&&(n=c.createElement("span",{className:"mx_TabbedView_maskedIcon "+e.icon}));const r=Object(l.a)(e.label);return c.createElement(m.a,{className:t,key:"tab_label_"+e.label,onClick:()=>this.setActiveTab(e)},n,c.createElement("span",{className:"mx_TabbedView_tabLabel_text"},r))}renderTabPanel(e){return c.createElement("div",{className:"mx_TabbedView_tabPanel",key:"mx_tabpanel_"+e.label},c.createElement(u.a,{className:"mx_TabbedView_tabPanelContent"},e.body))}render(){const e=this.props.tabs.map(e=>this.renderTabLabel(e)),t=this.renderTabPanel(this.props.tabs[this.getActiveTabIndex()]),n=p()({mx_TabbedView:!0,mx_TabbedView_tabsOnLeft:this.props.tabLocation==f.LEFT,mx_TabbedView_tabsOnTop:this.props.tabLocation==f.TOP});return c.createElement("div",{className:n},c.createElement("div",{className:"mx_TabbedView_tabLabels"},e),t)}},s()(o,"defaultProps",{tabLocation:f.LEFT}),r=i))||r},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Notifier",(function(){return E}));var r=n(82),o=n(90),i=n(111),a=n(311),s=n(124),c=n(196),l=n(83),u=n(80),d=n(87),h=n(84),p=n(455),m=n(98),g=n(624),f=n(126),_=n(456),b=n(100),v=n(105);const y={"m.key.verification.request":e=>{const t=(e.sender||{}).name;return Object(u.a)("%(name)s is requesting verification",{name:t})}},E={notifsByRoom:{},pendingEncryptedEventIds:[],notificationMessageForEvent:function(e){return y.hasOwnProperty(e.getContent().msgtype)?y[e.getContent().msgtype](e):a.b(e)},_displayPopupNotification:function(t,n){const r=i.a.get();if(!r)return;if(!r.supportsNotifications()||!r.maySendNotifications())return;if(e.document.hasFocus())return;let o,a=this.notificationMessageForEvent(t);if(!a)return;t.sender&&n.name!==t.sender.name?"m.room.member"===t.getType()?o=n.name:t.sender&&(o=t.sender.name+" ("+n.name+")",t.getContent().body&&!y.hasOwnProperty(t.getContent().msgtype)&&(a=t.getContent().body)):(o=n.name,t.getContent().body&&!y.hasOwnProperty(t.getContent().msgtype)&&(a=t.getContent().body)),this.isBodyEnabled()||(a="");let s=null;t.sender&&!h.b.getValue("lowBandwidth")&&(s=c.a(t.sender,40,40,"crop"));const l=r.displayNotification(o,a,s,n);l&&(void 0===this.notifsByRoom[t.getRoomId()]&&(this.notifsByRoom[t.getRoomId()]=[]),this.notifsByRoom[t.getRoomId()].push(l))},getSoundForRoom:function(e){const t=h.b.getValue("notificationSound",e);return t?t.url?t.url.startsWith("mxc://")?{url:Object(b.b)(t.url).srcHttp,name:t.name,type:t.type,size:t.size}:(console.warn(e+" has custom notification sound event, but url is not a mxc url"),null):(console.warn(e+" has custom notification sound event, but no url key"),null):null},_playAudioNotification:async function(e,t){const n=this.getSoundForRoom(t.roomId);console.log(`Got sound ${n&&n.name||"default"} for ${t.roomId}`);try{const e=document.querySelector(n?`audio[src='${n.url}']`:"#messageAudio");let t=e;if(!e){if(!n)return void console.error("No audio element or sound to play for notification");t=new Audio(n.url),n.type&&(t.type=n.type),document.body.appendChild(t)}await t.play()}catch(e){console.warn("Caught error when trying to fetch room notification sound:",e)}},start:function(){this.boundOnEvent=this.boundOnEvent||this.onEvent.bind(this),this.boundOnSyncStateChange=this.boundOnSyncStateChange||this.onSyncStateChange.bind(this),this.boundOnRoomReceipt=this.boundOnRoomReceipt||this.onRoomReceipt.bind(this),this.boundOnEventDecrypted=this.boundOnEventDecrypted||this.onEventDecrypted.bind(this),r.a.get().on("event",this.boundOnEvent),r.a.get().on("Room.receipt",this.boundOnRoomReceipt),r.a.get().on("Event.decrypted",this.boundOnEventDecrypted),r.a.get().on("sync",this.boundOnSyncStateChange),this.toolbarHidden=!1,this.isSyncing=!1},stop:function(){r.a.get()&&(r.a.get().removeListener("Event",this.boundOnEvent),r.a.get().removeListener("Room.receipt",this.boundOnRoomReceipt),r.a.get().removeListener("Event.decrypted",this.boundOnEventDecrypted),r.a.get().removeListener("sync",this.boundOnSyncStateChange)),this.isSyncing=!1},supportsDesktopNotifications:function(){const e=i.a.get();return e&&e.supportsNotifications()},setEnabled:function(e,t){const n=i.a.get();n&&(s.a.trackEvent("Notifier","Set Enabled",String(e)),h.b.isLevelSupported(m.a.DEVICE)&&h.b.setValue("audioNotificationsEnabled",null,m.a.DEVICE,this.isEnabled()),e?n.requestNotificationPermission().then(e=>{if("granted"===e)t&&t(),l.a.dispatch({action:"notifier_enabled",value:!0});else{const t=o.a.get().brand,n="denied"===e?Object(u.a)("%(brand)s does not have permission to send you notifications - please check your browser settings",{brand:t}):Object(u.a)("%(brand)s was not given permission to send notifications - please try again",{brand:t});d.a.createTrackedDialog("Unable to enable Notifications",e,v.a,{title:Object(u.a)("Unable to enable Notifications"),description:n})}}):l.a.dispatch({action:"notifier_enabled",value:!1}),this.setPromptHidden(!0))},isEnabled:function(){return this.isPossible()&&h.b.getValue("notificationsEnabled")},isPossible:function(){const e=i.a.get();return!!e&&(!!e.supportsNotifications()&&!!e.maySendNotifications())},isBodyEnabled:function(){return this.isEnabled()&&h.b.getValue("notificationBodyEnabled")},isAudioEnabled:function(){return h.b.getValue("audioNotificationsEnabled")},setPromptHidden:function(t,n=!0){this.toolbarHidden=t,s.a.trackEvent("Notifier","Set Toolbar Hidden",String(t)),Object(p.a)(),n&&e.localStorage&&e.localStorage.setItem("notifications_hidden",String(t))},shouldShowPrompt:function(){const e=r.a.get();if(!e)return!1;return!e.isGuest()&&this.supportsDesktopNotifications()&&!Object(g.c)()&&!this.isEnabled()&&!this._isPromptHidden()},_isPromptHidden:function(){return e.localStorage?"true"===e.localStorage.getItem("notifications_hidden"):this.toolbarHidden},onSyncStateChange:function(e){"SYNCING"===e?this.isSyncing=!0:"STOPPED"!==e&&"ERROR"!==e||(this.isSyncing=!1)},onEvent:function(e){if(this.isSyncing&&e.getSender()!==r.a.get().credentials.userId)if(r.a.get().decryptEventIfNeeded(e),e.isBeingDecrypted()||e.isDecryptionFailure())for(this.pendingEncryptedEventIds.push(e.getId());this.pendingEncryptedEventIds.length>20;)this.pendingEncryptedEventIds.shift();else this._evaluateEvent(e)},onEventDecrypted:function(e){if(e.isDecryptionFailure())return;const t=this.pendingEncryptedEventIds.indexOf(e.getId());-1!==t&&(this.pendingEncryptedEventIds.splice(t,1),this._evaluateEvent(e))},onRoomReceipt:function(e,t){if(0===t.getUnreadNotificationCount()){const e=i.a.get();if(!e)return;if(void 0===this.notifsByRoom[t.roomId])return;for(const n of this.notifsByRoom[t.roomId])e.clearNotification(n);delete this.notifsByRoom[t.roomId]}},_evaluateEvent:function(e){const t=r.a.get().getRoom(e.getRoomId()),n=r.a.get().getPushActionsForEvent(e);if(n&&n.notify){if(f.a.getRoomId()===t.roomId&&_.a.sharedInstance().userActiveRecently())return;if(h.b.getValue("doNotDisturb"))return;this.isEnabled()&&this._displayPopupNotification(e,t),n.tweaks.sound&&this.isAudioEnabled()&&(i.a.get().loudNotification(e,t),this._playAudioNotification(e,t))}}};window.mxNotifier||(window.mxNotifier=E),t.default=window.mxNotifier}.call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(169),o=n.n(r);function i(e){if(!e)return"";const t=o.a.parse(e);return t&&"/"===t.path?t.host:e}function a(e){if(!e)return"";let t=e;e.startsWith("https://")||(t="https://"+e);return null===o.a.parse(t).hostname?e:t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return c}));var r=n(82);function o(){const e=r.a.get().getClientWellKnown();return null==e?void 0:e["io.element.call_behaviour"]}function i(){const e=r.a.get().getClientWellKnown();return e&&e["io.element.e2ee"]?e["io.element.e2ee"]:e&&e["im.vector.riot.e2ee"]?e["im.vector.riot.e2ee"]:null}function a(){const e=i();return e&&!0===e.secure_backup_required}let s;function c(){const e=i();return e&&e.secure_backup_setup_methods&&e.secure_backup_setup_methods.length&&(e.secure_backup_setup_methods.includes(s.Key)||e.secure_backup_setup_methods.includes(s.Passphrase))?e.secure_backup_setup_methods:[s.Key,s.Passphrase]}!function(e){e.Key="key",e.Passphrase="passphrase"}(s||(s={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r),i=n(150),a=n(83),s=n(315);class c extends i.a{constructor(){super(a.a),o()(this,"widgetMap",new s.a)}static get instance(){return c.internalInstance}async onAction(e){}async onReady(){this.widgetMap.clear()}storeMessaging(e,t){this.stopMessaging(e),this.widgetMap.set(e.id,t)}stopMessaging(e){var t;null===(t=this.widgetMap.remove(e.id))||void 0===t||t.stop()}getMessaging(e){return this.widgetMap.get(e.id)}stopMessagingById(e){var t;null===(t=this.widgetMap.remove(e))||void 0===t||t.stop()}getMessagingForId(e){return this.widgetMap.get(e)}}o()(c,"internalInstance",new c)},function(e,t,n){"use strict";let r,o;n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o})),function(e){e.Manual="MANUAL",e.Alphabetic="ALPHABETIC",e.Recent="RECENT"}(r||(r={})),function(e){e.Importance="IMPORTANCE",e.Natural="NATURAL"}(o||(o={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(83),h=n(114),p=n(84),m=n(1008),g=n.n(m),f=n(94),_=n(145),b=n(91),v=n(320),y=n.n(v),E=n(131),S=n(81),w=n(97),C=n(418),T=n(331);let x=Object(S.a)("views.elements.ReplyThread")((i=o=class e extends l.a.Component{constructor(e,t){super(e,t),s()(this,"unmounted",!1),s()(this,"room",void 0),s()(this,"canCollapse",()=>this.state.events.length>1),s()(this,"collapse",()=>{this.initialize()}),s()(this,"onQuoteClick",async()=>{const e=[this.state.loadedEv,...this.state.events];let t=null;e.length>0&&(t=await this.getNextEvent(e[0])),this.setState({loadedEv:t,events:e}),d.a.fire(b.a.FocusSendMessageComposer)}),this.state={events:[],loadedEv:null,loading:!0,err:!1},this.room=this.context.getRoom(this.props.parentEv.getRoomId())}static getParentEventId(e){if(!e||e.isRedacted())return;const t=e.getWireContent()["m.relates_to"];if(t&&t["m.in_reply_to"]){const e=t["m.in_reply_to"];if(e&&e.event_id)return e.event_id}}static stripPlainReply(e){const t=e.split("\n");for(;t.length&&t[0].startsWith("> ");)t.shift();return""===t[0]&&t.shift(),t.join("\n")}static stripHTMLReply(e){return y()(e,{allowedTags:!1,allowedAttributes:!1,allowedSchemes:[...E.a,"mxc"],exclusiveFilter:e=>"mx-reply"===e.tag})}static getNestedReplyText(e,t){if(!e)return null;let{body:n,formatted_body:r}=e.getContent();this.getParentEventId(e)&&n&&(n=this.stripPlainReply(n)),n||(n=""),r=r?this.stripHTMLReply(r):g()(n).replace(/\n/g,"<br/>");const o=t.forEvent(e.getId()),i=Object(h.h)(e.getSender()),a=e.getSender();switch(e.getContent().msgtype){case"m.text":case"m.notice":{r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${i}">${a}</a><br>${r}</blockquote></mx-reply>`;const e=n.trim().split("\n");e.length>0&&(e[0]=`<${a}> ${e[0]}`,n=e.map(e=>"> "+e).join("\n")+"\n\n");break}case"m.image":r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${i}">${a}</a><br>sent an image.</blockquote></mx-reply>`,n=`> <${a}> sent an image.\n\n`;break;case"m.video":r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${i}">${a}</a><br>sent a video.</blockquote></mx-reply>`,n=`> <${a}> sent a video.\n\n`;break;case"m.audio":r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${i}">${a}</a><br>sent an audio file.</blockquote></mx-reply>`,n=`> <${a}> sent an audio file.\n\n`;break;case"m.file":r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${i}">${a}</a><br>sent a file.</blockquote></mx-reply>`,n=`> <${a}> sent a file.\n\n`;break;case"m.emote":{r=`<mx-reply><blockquote><a href="${o}">In reply to</a> * <a href="${i}">${a}</a><br>${r}</blockquote></mx-reply>`;const e=n.trim().split("\n");e.length>0&&(e[0]=`* <${a}> ${e[0]}`,n=e.map(e=>"> "+e).join("\n")+"\n\n");break}default:return null}return{body:n,html:r}}static makeReplyMixIn(e){return e?{"m.relates_to":{"m.in_reply_to":{event_id:e.getId()}}}:{}}static makeThread(t,n,r,o,i,a){return e.getParentEventId(t)?l.a.createElement(e,{parentEv:t,onHeightChanged:n,ref:o,permalinkCreator:r,layout:i,alwaysShowTimestamps:a}):null}componentDidMount(){this.initialize()}componentDidUpdate(){this.props.onHeightChanged()}componentWillUnmount(){this.unmounted=!0}async initialize(){const{parentEv:t}=this.props,n=await this.getEvent(e.getParentEventId(t));if(!this.unmounted)if(n){const e=await this.getNextEvent(n);this.setState({events:[n],loadedEv:e,loading:!1})}else this.setState({err:!0})}async getNextEvent(t){try{const n=e.getParentEventId(t);return await this.getEvent(n)}catch(e){return null}}async getEvent(e){if(!e)return null;const t=this.room.findEventById(e);if(t)return t;try{await this.context.getEventTimeline(this.room.getUnfilteredTimelineSet(),e)}catch(e){return null}return this.room.findEventById(e)}getReplyThreadColorClass(e){return Object(_.f)(e.getSender()).replace("Username","ReplyThread")}render(){let e=null;if(this.state.err)e=l.a.createElement("blockquote",{className:"mx_ReplyThread mx_ReplyThread_error"},Object(u.a)("Unable to load event that was replied to, it either does not exist or you do not have permission to view it."));else if(this.state.loadedEv){const t=this.state.loadedEv,n=this.context.getRoom(t.getRoomId());e=l.a.createElement("blockquote",{className:"mx_ReplyThread "+this.getReplyThreadColorClass(t)},Object(u.a)("<a>In reply to</a> <pill>",{},{a:e=>l.a.createElement("a",{onClick:this.onQuoteClick,className:"mx_ReplyThread_show"},e),pill:l.a.createElement(T.a,{type:T.a.TYPE_USER_MENTION,room:n,url:Object(h.h)(t.getSender()),shouldShowPillAvatar:p.b.getValue("Pill.shouldShowPillAvatar")})}))}else this.state.loading&&(e=l.a.createElement(w.a,{w:16,h:16}));const t=this.state.events.map(e=>l.a.createElement("blockquote",{className:"mx_ReplyThread "+this.getReplyThreadColorClass(e),key:e.getId()},l.a.createElement(C.a,{mxEvent:e,onHeightChanged:this.props.onHeightChanged,permalinkCreator:this.props.permalinkCreator})));return l.a.createElement("div",{className:"mx_ReplyThread_wrapper"},l.a.createElement("div",null,e),l.a.createElement("div",null,t))}},s()(o,"contextType",f.a),r=i))||r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHtml=t.cloneDom=t.domEach=t.cssCase=t.camelCase=t.isCheerio=t.isTag=void 0;var r=n(214),o=n(146);t.isTag=r.DomUtils.isTag,t.isCheerio=function(e){return null!=e.cheerio},t.camelCase=function(e){return e.replace(/[_.-](\w|$)/g,(function(e,t){return t.toUpperCase()}))},t.cssCase=function(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()},t.domEach=function(e,t){for(var n=e.length,r=0;r<n;r++)t(e[r],r);return e},t.cloneDom=function(e){var t="length"in e?Array.prototype.map.call(e,(function(e){return o.cloneNode(e,!0)})):[o.cloneNode(e,!0)],n=new o.Document(t);return t.forEach((function(e){e.parent=n})),t};var i=/<[a-zA-Z][^]*>/;t.isHtml=function(e){return i.test(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(276),d=n.n(u),h=n(80),p=n(87),m=n(85),g=n(81),f=n(100),_=n(105),b=n(144),v=n(612),y=n(613),E=n(174);let S;function w(e){if(!e)return"";const t=window.getComputedStyle(e,null);let n=t.cssText;if(""==n)for(let e=0;e<t.length;e++)n+=t[e]+":",n+=t.getPropertyValue(t[e])+";";return n}!async function(){if(S)return;const e=await fetch(n(1083)).then(e=>e.text());S="data:image/svg+xml;base64,"+window.btoa(e)}();let C=Object(g.a)("views.messages.MFileBody")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"iframe",Object(c.createRef)()),s()(this,"dummyLink",Object(c.createRef)()),s()(this,"userDidClick",!1),s()(this,"fileDownloader",new y.a(()=>this.iframe.current)),s()(this,"decryptFile",async()=>{if(!this.state.decryptedBlob)try{this.userDidClick=!0,this.setState({decryptedBlob:await this.props.mediaEventHelper.sourceBlob.value})}catch(e){console.warn("Unable to decrypt attachment: ",e),p.a.createTrackedDialog("Error decrypting attachment","",_.a,{title:Object(h.a)("Error"),description:Object(h.a)("Error decrypting attachment")})}}),s()(this,"onPlaceholderClick",async()=>{const e=this.props.mediaEventHelper;e.media.isEncrypted?(await this.decryptFile(),this.downloadFile(this.fileName,this.linkText)):this.fileDownloader.download({blob:await e.sourceBlob.value,name:this.fileName})}),this.state={}}get content(){return this.props.mxEvent.getContent()}get fileName(){return this.content.body&&this.content.body.length>0?this.content.body:Object(h.a)("Attachment")}get linkText(){return Object(v.a)(this.content)}downloadFile(e,t){this.fileDownloader.download({blob:this.state.decryptedBlob,name:e,autoDownload:this.userDidClick,opts:{imgSrc:S,imgStyle:null,style:w(this.dummyLink.current),textContent:Object(h.a)("Download %(text)s",{text:t})}})}getContentUrl(){return Object(f.a)(this.props.mxEvent.getContent()).srcHttp}componentDidUpdate(e,t){this.props.onHeightChanged&&!t.decryptedBlob&&this.state.decryptedBlob&&this.props.onHeightChanged()}render(){const e=this.props.mediaEventHelper.media.isEncrypted,t=this.getContentUrl(),n=this.content.info?this.content.info.size:null,r=this.content.info?this.content.info.mimetype:"application/octet-stream";let o=null;this.props.showGenericPlaceholder&&(o=l.a.createElement(m.a,{className:"mx_MediaBody mx_MFileBody_info",onClick:this.onPlaceholderClick},l.a.createElement("span",{className:"mx_MFileBody_info_icon"}),l.a.createElement(E.a,{tooltip:Object(v.a)(this.content,Object(h.a)("Attachment"),!0)},l.a.createElement("span",{className:"mx_MFileBody_info_filename"},Object(v.a)(this.content,Object(h.a)("Attachment"),!0,!0)))));const i=this.props.tileShape||!this.props.showGenericPlaceholder;if(e){if(!this.state.decryptedBlob)return l.a.createElement("span",{className:"mx_MFileBody"},o,i&&l.a.createElement("div",{className:"mx_MFileBody_download"},l.a.createElement(m.a,{onClick:this.decryptFile},Object(h.a)("Decrypt %(text)s",{text:this.linkText}))));const e="usercontent/";return l.a.createElement("span",{className:"mx_MFileBody"},o,i&&l.a.createElement("div",{className:"mx_MFileBody_download"},l.a.createElement("div",{style:{display:"none"}},l.a.createElement("a",{ref:this.dummyLink})),l.a.createElement("iframe",{src:e,onLoad:()=>this.downloadFile(this.fileName,this.linkText),ref:this.iframe,sandbox:"allow-scripts allow-downloads allow-downloads-without-user-activation"})))}if(t){const e={target:"_blank",rel:"noreferrer noopener",href:t},a="number"!=typeof n||n>524288e3;return["application/pdf"].includes(r)&&!a?e.onClick=e=>{console.log(`Downloading ${r} as blob (unencrypted)`),e.preventDefault(),e.stopPropagation(),this.props.mediaEventHelper.sourceBlob.value.then(e=>{const t=URL.createObjectURL(e),n=document.createElement("a");n.download=this.fileName,n.href=t,document.body.appendChild(n),n.click(),n.remove()})}:e.download=this.fileName,l.a.createElement("span",{className:"mx_MFileBody"},o,i&&l.a.createElement("div",{className:"mx_MFileBody_download"},l.a.createElement("a",e,l.a.createElement("span",{className:"mx_MFileBody_download_icon"}),Object(h.a)("Download %(text)s",{text:this.linkText})),this.props.tileShape===b.a.FileGrid&&l.a.createElement("div",{className:"mx_MImageBody_size"},this.content.info&&this.content.info.size?d()(this.content.info.size):"")))}{const e=this.linkText?": "+this.linkText:"";return l.a.createElement("span",{className:"mx_MFileBody"},o,Object(h.a)("Invalid file%(extra)s",{extra:e}))}}},s()(o,"defaultProps",{showGenericPlaceholder:!0}),r=i))||r},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d}));var r=n(80),o=n(84),i=n(328);const a="light";function s(){const e={light:Object(r.a)("Light"),dark:Object(r.a)("Dark")},t=o.b.getValue("custom_themes"),n={};for(const{name:e}of t)n["custom-"+e]=e;return Object.assign({},n,e)}const c=["font-display","font-family","font-stretch","font-style","font-weight","font-variant","font-feature-settings","font-variation-settings","src","unicode-range"];function l(e){const{style:t}=document.body;function n(e,n,r=!0){t.setProperty("--"+e,n),r&&(t.setProperty(`--${e}-0pct`,n+"00"),t.setProperty(`--${e}-15pct`,n+"26"),t.setProperty(`--${e}-50pct`,n+"7F"))}if(e.colors)for(const[t,r]of Object.entries(e.colors))if(Array.isArray(r))for(let e=0;e<r.length;e+=1)n(`${t}_${e}`,r[e],!1);else n(t,r);if(e.fonts){const{fonts:n}=e;if(n.faces){const e=n.faces.map(e=>{const t=e.src&&e.src.map(e=>{let t;return e.format&&(t=`format("${e.format}")`),e.url?`url("${e.url}") ${t}`:e.local?`local("${e.local}") ${t}`:""}).join(", ");return`@font-face {${Object.keys(e).filter(e=>c.includes(e)).map(n=>{let r;return r="src"===n?t:"font-family"===n?`"${e[n]}"`:e[n],`${n}: ${r}`}).join(";")}}`}).join("\n"),t=document.createElement("style");t.setAttribute("title","custom-theme-font-faces"),t.setAttribute("type","text/css"),t.appendChild(document.createTextNode(e)),document.head.appendChild(t)}n.general&&t.setProperty("--font-family",n.general),n.monospace&&t.setProperty("--font-family-monospace",n.monospace)}}function u(e){const t=o.b.getValue("custom_themes");if(!t)throw new Error(`No custom themes set, can't set custom theme "${e}"`);const n=t.find(t=>t.name===e);if(!n){const n=t.map(e=>e.name).join(", ");throw new Error(`Can't find custom theme "${e}", only know ${n}`)}return n}async function d(t){if(!t){t=(new i.a).getEffectiveTheme()}!function(){const e=Object.values(document.body.style);for(const t of e)t.startsWith("--")&&document.body.style.removeProperty(t);const t=document.querySelector("head > style[title='custom-theme-font-faces']");t&&t.remove()}();let n=t;if(t.startsWith("custom-")){const e=u(t.substr(7));n=e.is_dark?"dark-custom":"light-custom",l(e)}const r=Object.create(null);if(Array.from(document.querySelectorAll("[data-mx-theme]")).forEach(e=>{r[e.attributes["data-mx-theme"].value.toLowerCase()]=e}),!(n in r))throw new Error("Unknown theme "+n);return r[n].disabled=!1,new Promise(t=>{const o=function(){r[n].disabled=!1,Object.values(r).forEach(e=>{e!=r[n]&&(e.disabled=!0)});const o=e.getComputedStyle(document.body);o.backgroundColor&&(document.querySelector('meta[name="theme-color"]').content=o.backgroundColor),t()};let i=!1;r[n].onload=()=>{o()};for(let e=0;e<document.styleSheets.length;e++){const t=document.styleSheets[e];if(t&&t.href===r[n].href){i=!0;break}}i&&(r[n].onload=void 0,o())})}}).call(this,n(23))},function(e,t,n){"use strict";var r=n(431);i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}();var o=i.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function i(e,t,n){return i.TYPED_ARRAY_SUPPORT||this instanceof i?"number"==typeof e?c(this,e):function(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer)return function(e,t,n,r){if(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");var o;o=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);i.TYPED_ARRAY_SUPPORT?o.__proto__=i.prototype:o=l(e,o);return o}(e,t,n,r);if("string"==typeof t)return function(e,t){var n=0|d(t),r=s(e,n),o=r.write(t);o!==n&&(r=r.slice(0,o));return r}(e,t);return function(e,t){if(i.isBuffer(t)){var n=0|a(t.length),r=s(e,n);return 0===r.length||t.copy(r,0,0,n),r}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(o=t.length)!=o?s(e,0):l(e,t);if("Buffer"===t.type&&Array.isArray(t.data))return l(e,t.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}(this,e,t,n):new i(e,t,n)}function a(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function s(e,t){var n;return i.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t)).__proto__=i.prototype:(null===(n=e)&&(n=new i(t)),n.length=t),n}function c(e,t){var n=s(e,t<0?0:0|a(t));if(!i.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)n[r]=0;return n}function l(e,t){for(var n=t.length<0?0:0|a(t.length),r=s(e,n),o=0;o<n;o+=1)r[o]=255&t[o];return r}function u(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+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 d(e){return i.isBuffer(e)?e.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)?e.byteLength:("string"!=typeof e&&(e=""+e),0===e.length?0:u(e).length)}i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),i.prototype.write=function(e,t,n){void 0===t||void 0===n&&"string"==typeof t?(n=this.length,t=0):isFinite(t)&&(t|=0,isFinite(n)?n|=0:n=void 0);var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(e,t,n,r){return function(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}(u(t,e.length-n),e,n,r)}(this,e,t,n)},i.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),i.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=i.prototype;else{var o=t-e;n=new i(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+e]}return n},i.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,a=r-n;if(this===e&&n<t&&t<r)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},i.prototype.fill=function(e,t,n){if("string"==typeof e){if("string"==typeof t?(t=0,n=this.length):"string"==typeof n&&(n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=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 o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=i.isBuffer(e)?e:new i(e),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this},i.concat=function(e,t){if(!r(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s(null,0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var o=c(null,t),a=0;for(n=0;n<e.length;++n){var l=e[n];if(!i.isBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(o,a),a+=l.length}return o},i.byteLength=d,i.prototype._isBuffer=!0,i.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.exports.alloc=function(e){var t=new i(e);return t.fill(0),t},e.exports.from=function(e){return new i(e)}},function(e,t){e.exports="img/warning.05cc423.svg"},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(86),a=n.n(i),s=n(189);t.a=function({name:e,definitions:t,value:n,className:r,outlined:i,disabled:c,onChange:l}){const u=e=>{l(e.target.value)};return o.a.createElement(o.a.Fragment,null,t.map(t=>{var l;return o.a.createElement(o.a.Fragment,{key:t.value},o.a.createElement(s.a,{className:a()(r,t.className),onChange:u,checked:void 0!==t.checked?t.checked:t.value===n,name:e,value:t.value,disabled:null!==(l=t.disabled)&&void 0!==l?l:c,outlined:i},t.label),t.description?o.a.createElement("span",null,t.description):null)}))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return R})),n.d(t,"f",(function(){return D})),n.d(t,"g",(function(){return I})),n.d(t,"e",(function(){return A})),n.d(t,"c",(function(){return N}));var r=n(78),o=n.n(r),i=n(86),a=n.n(i),s=n(2),c=n(93),l=n(80),u=n(95),d=n(263),h=n(216),p=n(102),m=n(119),g=n(186),f=n(85),_=n(117),b=n(122),v=n(114),y=n(137),E=n(94),S=n(393),w=n(446),C=n(255),T=n(199),x=n(277),k=n(278),F=n(120);const O=({room:e,checked:t,onChange:n})=>o.a.createElement("label",{className:"mx_AddExistingToSpace_entry"},null!=e&&e.isSpaceRoom()?o.a.createElement(m.a,{room:e,height:32,width:32}):o.a.createElement(C.a,{room:e,avatarSize:32}),o.a.createElement("span",{className:"mx_AddExistingToSpace_entry_name"},e.name),o.a.createElement(y.a,{onChange:n?e=>n(e.target.checked):null,checked:t,disabled:!n})),R=({space:e,footerPrompt:t,emptySelectionButton:i,filterPlaceholder:a,roomsRenderer:c,dmsRenderer:u,spacesRenderer:d,onFinished:m})=>{const g=Object(r.useContext)(E.a),y=Object(r.useMemo)(()=>g.getVisibleRooms().filter(e=>"join"===e.getMyMembership()),[g]),[C,x]=Object(r.useState)(new Set),[O,R]=Object(r.useState)(null),[D,I]=Object(r.useState)(null),[A,N]=Object(r.useState)(""),M=A.toLowerCase().trim(),P=Object(r.useMemo)(()=>new Set(p.g.instance.getChildSpaces(e.roomId)),[e]),L=Object(r.useMemo)(()=>new Set(p.g.instance.getChildRooms(e.roomId)),[e]),[j,U,B]=Object(r.useMemo)(()=>{let t=y;if(M){t=new T.a(y,{keys:["name"],funcs:[e=>[e.getCanonicalAlias(),...e.getAltAliases()].filter(Boolean)],shouldMatchWordsOnly:!1}).match(M)}const n=e.getJoinRule();return Object(S.b)(t).reduce((t,r)=>(r.isSpaceRoom()?r===e||P.has(r)||t[0].push(r):L.has(r)||(b.a.shared().getUserIdForRoomId(r.roomId)?"public"!==n&&t[2].push(r):t[1].push(r)),t),[[],[],[]])},[y,e,M,L,P]),G=async()=>{let t;I(null),R(0);for(const n of C){const r=Object(v.b)(n);try{await p.g.instance.addRoomToSpace(e,n.roomId,r).catch(async t=>{if("M_LIMIT_EXCEEDED"===t.errcode)return await Object(s.H)(t.data.retry_after_ms),p.g.instance.addRoomToSpace(e,n.roomId,r);throw t}),R(e=>e+1)}catch(e){console.error("Failed to add rooms to space",e),I(t=e);break}}t||m(!0)},V=null!==O;let q;if(D)q=o.a.createElement(o.a.Fragment,null,o.a.createElement("img",{src:n(664),height:"24",width:"24",alt:""}),o.a.createElement("span",{className:"mx_AddExistingToSpaceDialog_error"},o.a.createElement("div",{className:"mx_AddExistingToSpaceDialog_errorHeading"},Object(l.a)("Not all selected were added")),o.a.createElement("div",{className:"mx_AddExistingToSpaceDialog_errorCaption"},Object(l.a)("Try again"))),o.a.createElement(f.a,{className:"mx_AddExistingToSpaceDialog_retryButton",onClick:G},Object(l.a)("Retry")));else if(V)q=o.a.createElement("span",null,o.a.createElement(w.a,{value:O,max:C.size}),o.a.createElement("div",{className:"mx_AddExistingToSpaceDialog_progressText"},Object(l.a)("Adding rooms... (%(progress)s out of %(count)s)",{count:C.size,progress:O})));else{let e=i;(!e||C.size>0)&&(e=o.a.createElement(f.a,{kind:"primary",disabled:C.size<1,onClick:G},Object(l.a)("Add"))),q=o.a.createElement(o.a.Fragment,null,o.a.createElement("span",null,t),e)}const H=V||D?null:(e,t)=>{e?C.add(t):C.delete(t),x(new Set(C))},[z,W]=Object(r.useState)(20);let K=!0;return(c&&U.length>0||u&&B.length>0||!c&&!u&&d&&j.length>0)&&(K=!1),o.a.createElement("div",{className:"mx_AddExistingToSpace"},o.a.createElement(h.a,{className:"mx_textinput_icon mx_textinput_search",placeholder:a,onSearch:N,autoComplete:!0,autoFocus:!0}),o.a.createElement(_.a,{className:"mx_AddExistingToSpace_content"},U.length>0&&c?c(U,C,H,z,(function(e,t){const r=Object(l.a)("and %(count)s others...",{count:e});return o.a.createElement(k.b,{className:"mx_EntityTile_ellipsis",avatarJsx:o.a.createElement(F.a,{url:n(279),name:"...",width:36,height:36}),name:r,presenceState:"online",suppressOnHover:!0,onClick:()=>W(t)})})):void 0,j.length>0&&d?d(j,C,H):null,B.length>0&&u?u(B,C,H):null,K?o.a.createElement("span",{className:"mx_AddExistingToSpace_noResults"},Object(l.a)("No results")):void 0),o.a.createElement("div",{className:"mx_AddExistingToSpace_footer"},q))},D=(e,t,n,r,i)=>o.a.createElement("div",{className:"mx_AddExistingToSpace_section"},o.a.createElement("h3",null,Object(l.a)("Rooms")),o.a.createElement(x.a,{truncateAt:r,createOverflowElement:i,getChildren:(r,i)=>e.slice(r,i).map(e=>o.a.createElement(O,{key:e.roomId,room:e,checked:t.has(e),onChange:n?t=>{n(t,e)}:null})),getChildCount:()=>e.length})),I=(e,t,n)=>o.a.createElement("div",{className:"mx_AddExistingToSpace_section"},e.map(e=>o.a.createElement(O,{key:e.roomId,room:e,checked:t.has(e),onChange:n?t=>{n(t,e)}:null}))),A=(e,t,n)=>o.a.createElement("div",{className:"mx_AddExistingToSpace_section"},o.a.createElement("h3",null,Object(l.a)("Direct Messages")),e.map(e=>o.a.createElement(O,{key:e.roomId,room:e,checked:t.has(e),onChange:n?t=>{n(t,e)}:null}))),N=({title:e,space:t,value:n,onChange:i})=>{const s=Object(r.useMemo)(()=>[t,...p.g.instance.getChildSpaces(t.roomId).filter(e=>e.currentState.maySendStateEvent(c.a.SpaceChild,e.client.credentials.userId))],[t]);let u;return u=s.length>1?o.a.createElement(d.a,{id:"mx_SpaceSelectDropdown",className:"mx_SpaceSelectDropdown",onOptionChange:e=>{i(s.find(t=>t.roomId===e)||t)},value:n.roomId,label:Object(l.a)("Space selection")},s.map(e=>{const t=a()({mx_SubspaceSelector_dropdownOptionActive:e===n});return o.a.createElement("div",{key:e.roomId,className:t},o.a.createElement(m.a,{room:e,width:24,height:24}),e.name||Object(g.b)(e)||e.roomId)})):o.a.createElement("div",{className:"mx_SubspaceSelector_onlySpace"},t.name||Object(g.b)(t)||t.roomId),o.a.createElement("div",{className:"mx_SubspaceSelector"},o.a.createElement(m.a,{room:n,height:40,width:40}),o.a.createElement("div",null,o.a.createElement("h1",null,e),u))};t.d=({space:e,onCreateRoomClick:t,onAddSubspaceClick:n,onFinished:i})=>{const[a,s]=Object(r.useState)(e);return o.a.createElement(u.a,{title:o.a.createElement(N,{title:Object(l.a)("Add existing rooms"),space:e,value:a,onChange:s}),className:"mx_AddExistingToSpaceDialog",contentId:"mx_AddExistingToSpace",onFinished:i,fixedWidth:!1},o.a.createElement(E.a.Provider,{value:e.client},o.a.createElement(R,{space:e,onFinished:i,footerPrompt:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",null,Object(l.a)("Want to add a new room instead?")),o.a.createElement(f.a,{kind:"link",onClick:()=>{t(),i()}},Object(l.a)("Create a new room"))),filterPlaceholder:Object(l.a)("Search for rooms"),roomsRenderer:D,spacesRenderer:()=>o.a.createElement("div",{className:"mx_AddExistingToSpace_section"},o.a.createElement("h3",null,Object(l.a)("Spaces")),o.a.createElement(f.a,{kind:"link",onClick:()=>{n(),i()}},Object(l.a)("Adding spaces has moved."))),dmsRenderer:A})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(78),o=n.n(r),i=n(86),a=n.n(i),s=n(80),c=n(85),l=n(84),u=n(98),d=n(174),h=n(87),p=n(666),m=n(90),g=n(201);const f=({onClick:e})=>e?o.a.createElement(d.a,{class:a()("mx_BetaCard_betaPill",{mx_BetaCard_betaPill_clickable:!!e}),tooltip:o.a.createElement("div",null,o.a.createElement("div",{className:"mx_Tooltip_title"},Object(s.a)("Spaces is a beta feature")),o.a.createElement("div",{className:"mx_Tooltip_sub"},Object(s.a)("Tap for more info"))),onClick:e,tooltipProps:{yOffset:-10}},Object(s.a)("Beta")):o.a.createElement("span",{className:a()("mx_BetaCard_betaPill",{mx_BetaCard_betaPill_clickable:!!e}),onClick:e},Object(s.a)("Beta"));t.b=({title:e,featureId:t})=>{const n=l.b.getBetaInfo(t);if(!n)return null;const{title:r,caption:i,disclaimer:a,image:d,feedbackLabel:_,feedbackSubheading:b,extraSettings:v}=n,y=l.b.getValue(t);let E;return y&&_&&b&&m.a.get().bug_report_endpoint_url&&(E=o.a.createElement(c.a,{onClick:()=>{h.a.createTrackedDialog("Beta Feedback",t,p.a,{featureId:t})},kind:"primary"},Object(s.a)("Feedback"))),o.a.createElement("div",{className:"mx_BetaCard"},o.a.createElement("div",{className:"mx_BetaCard_columns"},o.a.createElement("div",null,o.a.createElement("h3",{className:"mx_BetaCard_title"},e||Object(s.a)(r),o.a.createElement(f,null)),o.a.createElement("span",{className:"mx_BetaCard_caption"},Object(s.a)(i)),o.a.createElement("div",{className:"mx_BetaCard_buttons"},E,o.a.createElement(c.a,{onClick:()=>l.b.setValue(t,null,u.a.DEVICE,!y),kind:E?"primary_outline":"primary"},y?Object(s.a)("Leave the beta"):Object(s.a)("Join the beta"))),a&&o.a.createElement("div",{className:"mx_BetaCard_disclaimer"},a(y))),o.a.createElement("img",{src:d,alt:""})),v&&y&&o.a.createElement("div",{className:"mx_BetaCard_relatedSettings"},v.map(e=>o.a.createElement(g.a,{key:e,name:e,level:u.a.DEVICE}))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79),o=n.n(r);class i{constructor(e){this.timeout=e,o()(this,"timerHandle",void 0),o()(this,"startTs",void 0),o()(this,"promise",void 0),o()(this,"resolve",void 0),o()(this,"reject",void 0),o()(this,"onTimeout",()=>{const e=Date.now()-this.startTs;if(e>=this.timeout)this.resolve(),this.setNotStarted();else{const t=this.timeout-e;this.timerHandle=setTimeout(this.onTimeout,t)}}),this.setNotStarted()}setNotStarted(){this.timerHandle=null,this.startTs=null,this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t}).finally(()=>{this.timerHandle=null})}changeTimeout(e){if(e===this.timeout)return;const t=e<this.timeout;this.timeout=e,this.isRunning()&&t&&(clearTimeout(this.timerHandle),this.onTimeout())}start(){return this.isRunning()||(this.startTs=Date.now(),this.timerHandle=setTimeout(this.onTimeout,this.timeout)),this}restart(){return this.isRunning()?(this.startTs=Date.now(),this):this.start()}abort(){return this.isRunning()&&(clearTimeout(this.timerHandle),this.reject(new Error("Timer was aborted.")),this.setNotStarted()),this}finished(){return this.promise}isRunning(){return null!==this.timerHandle}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(88),c=n.n(s),l=n(89),u=n(82),d=n(168),h=n(80),p=n(177);class m extends a.a.PureComponent{constructor(e){super(e),o()(this,"_onCancel",()=>{this.props.onFinished(!1)}),o()(this,"_onDone",()=>{this.props.onFinished(!0)}),o()(this,"_onUseRecoveryKeyClick",()=>{this.setState({forceRecoveryKey:!0})}),o()(this,"_progressCallback",e=>{this.setState({progress:e})}),o()(this,"_onResetRecoveryClick",()=>{this.props.onFinished(!1),Object(p.b)(()=>{},!0)}),o()(this,"_onRecoveryKeyChange",e=>{this.setState({recoveryKey:e.target.value,recoveryKeyValid:u.a.get().isValidRecoveryKey(e.target.value)})}),o()(this,"_onPassPhraseNext",async()=>{this.setState({loading:!0,restoreError:null,restoreType:0});try{const e=await u.a.get().restoreKeyBackupWithPassword(this.state.passPhrase,void 0,void 0,this.state.backupInfo,{progressCallback:this._progressCallback});if(this.props.keyCallback){const e=await u.a.get().keyBackupKeyFromPassword(this.state.passPhrase,this.state.backupInfo);this.props.keyCallback(e)}if(!this.props.showSummary)return void this.props.onFinished(!0);this.setState({loading:!1,recoverInfo:e})}catch(e){console.log("Error restoring backup",e),this.setState({loading:!1,restoreError:e})}}),o()(this,"_onRecoveryKeyNext",async()=>{if(this.state.recoveryKeyValid){this.setState({loading:!0,restoreError:null,restoreType:1});try{const e=await u.a.get().restoreKeyBackupWithRecoveryKey(this.state.recoveryKey,void 0,void 0,this.state.backupInfo,{progressCallback:this._progressCallback});if(this.props.keyCallback){const e=u.a.get().keyBackupKeyFromRecoveryKey(this.state.recoveryKey);this.props.keyCallback(e)}if(!this.props.showSummary)return void this.props.onFinished(!0);this.setState({loading:!1,recoverInfo:e})}catch(e){console.log("Error restoring backup",e),this.setState({loading:!1,restoreError:e})}}}),o()(this,"_onPassPhraseChange",e=>{this.setState({passPhrase:e.target.value})}),this.state={backupInfo:null,backupKeyStored:null,loading:!1,loadError:null,restoreError:null,recoveryKey:"",recoverInfo:null,recoveryKeyValid:!1,forceRecoveryKey:!1,passPhrase:"",restoreType:null,progress:{stage:"prefetch"}}}componentDidMount(){this._loadBackupStatus()}async _restoreWithSecretStorage(){this.setState({loading:!0,restoreError:null,restoreType:2});try{const e=await Object(p.b)(async()=>u.a.get().restoreKeyBackupWithSecretStorage(this.state.backupInfo,void 0,void 0,{progressCallback:this._progressCallback}));this.setState({loading:!1,recoverInfo:e})}catch(e){console.log("Error restoring backup",e),this.setState({restoreError:e,loading:!1})}}async _restoreWithCachedKey(e){if(!e)return!1;try{const t=await u.a.get().restoreKeyBackupWithCache(void 0,void 0,e,{progressCallback:this._progressCallback});return this.setState({recoverInfo:t}),!0}catch(e){return console.log("restoreWithCachedKey failed:",e),!1}}async _loadBackupStatus(){this.setState({loading:!0,loadError:null});try{const e=u.a.get(),t=await e.getKeyBackupVersion(),n=await e.hasSecretStorageKey()&&await e.isKeyBackupKeyStored();this.setState({backupInfo:t,backupKeyStored:n});if(await this._restoreWithCachedKey(t))return console.log("RestoreKeyBackupDialog: found cached backup key"),void this.setState({loading:!1});if(n)return this._restoreWithSecretStorage();this.setState({loadError:null,loading:!1})}catch(e){console.log("Error loading backup status",e),this.setState({loadError:e,loading:!1})}}render(){const e=l.getComponent("views.dialogs.BaseDialog"),t=l.getComponent("elements.Spinner"),n=this.state.backupInfo&&this.state.backupInfo.auth_data&&this.state.backupInfo.auth_data.private_key_salt&&this.state.backupInfo.auth_data.private_key_iterations;let r,o;if(this.state.loading){let e;if(o=Object(h.a)("Restoring keys from backup"),"fetch"===this.state.progress.stage)e=Object(h.a)("Fetching keys from server...");else if("load_keys"===this.state.progress.stage){const{total:t,successes:n,failures:r}=this.state.progress;e=Object(h.a)("%(completed)s of %(total)s keys restored",{total:t,completed:n+r})}else"prefetch"===this.state.progress.stage&&(e=Object(h.a)("Fetching keys from server..."));r=a.a.createElement("div",null,a.a.createElement("div",null,e),a.a.createElement(t,null))}else if(this.state.loadError)o=Object(h.a)("Error"),r=Object(h.a)("Unable to load backup status");else if(this.state.restoreError)this.state.restoreError.errcode===d.b.RESTORE_BACKUP_ERROR_BAD_KEY?1===this.state.restoreType?(o=Object(h.a)("Security Key mismatch"),r=a.a.createElement("div",null,a.a.createElement("p",null,Object(h.a)("Backup could not be decrypted with this Security Key: please verify that you entered the correct Security Key.")))):(o=Object(h.a)("Incorrect Security Phrase"),r=a.a.createElement("div",null,a.a.createElement("p",null,Object(h.a)("Backup could not be decrypted with this Security Phrase: please verify that you entered the correct Security Phrase.")))):(o=Object(h.a)("Error"),r=Object(h.a)("Unable to restore backup"));else if(null===this.state.backupInfo)o=Object(h.a)("Error"),r=Object(h.a)("No backup found!");else if(this.state.recoverInfo){const e=l.getComponent("views.elements.DialogButtons");let t;o=Object(h.a)("Keys restored"),this.state.recoverInfo.total>this.state.recoverInfo.imported&&(t=a.a.createElement("p",null,Object(h.a)("Failed to decrypt %(failedCount)s sessions!",{failedCount:this.state.recoverInfo.total-this.state.recoverInfo.imported}))),r=a.a.createElement("div",null,a.a.createElement("p",null,Object(h.a)("Successfully restored %(sessionCount)s keys",{sessionCount:this.state.recoverInfo.imported})),t,a.a.createElement(e,{primaryButton:Object(h.a)("OK"),onPrimaryButtonClick:this._onDone,hasCancel:!1,focus:!0}))}else if(n&&!this.state.forceRecoveryKey){const e=l.getComponent("views.elements.DialogButtons"),t=l.getComponent("elements.AccessibleButton");o=Object(h.a)("Enter Security Phrase"),r=a.a.createElement("div",null,a.a.createElement("p",null,Object(h.a)("<b>Warning</b>: you should only set up key backup from a trusted computer.",{},{b:e=>a.a.createElement("b",null,e)})),a.a.createElement("p",null,Object(h.a)("Access your secure message history and set up secure messaging by entering your Security Phrase.")),a.a.createElement("form",{className:"mx_RestoreKeyBackupDialog_primaryContainer"},a.a.createElement("input",{type:"password",className:"mx_RestoreKeyBackupDialog_passPhraseInput",onChange:this._onPassPhraseChange,value:this.state.passPhrase,autoFocus:!0}),a.a.createElement(e,{primaryButton:Object(h.a)("Next"),onPrimaryButtonClick:this._onPassPhraseNext,primaryIsSubmit:!0,hasCancel:!0,onCancel:this._onCancel,focus:!1})),Object(h.a)("If you've forgotten your Security Phrase you can <button1>use your Security Key</button1> or <button2>set up new recovery options</button2>",{},{button1:e=>a.a.createElement(t,{className:"mx_linkButton",element:"span",onClick:this._onUseRecoveryKeyClick},e),button2:e=>a.a.createElement(t,{className:"mx_linkButton",element:"span",onClick:this._onResetRecoveryClick},e)}))}else{o=Object(h.a)("Enter Security Key");const e=l.getComponent("views.elements.DialogButtons"),t=l.getComponent("elements.AccessibleButton");let n;n=0===this.state.recoveryKey.length?a.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_keyStatus"}):this.state.recoveryKeyValid?a.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_keyStatus"},"👍 ",Object(h.a)("This looks like a valid Security Key!")):a.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_keyStatus"},"👎 ",Object(h.a)("Not a valid Security Key")),r=a.a.createElement("div",null,a.a.createElement("p",null,Object(h.a)("<b>Warning</b>: You should only set up key backup from a trusted computer.",{},{b:e=>a.a.createElement("b",null,e)})),a.a.createElement("p",null,Object(h.a)("Access your secure message history and set up secure messaging by entering your Security Key.")),a.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_primaryContainer"},a.a.createElement("input",{className:"mx_RestoreKeyBackupDialog_recoveryKeyInput",onChange:this._onRecoveryKeyChange,value:this.state.recoveryKey,autoFocus:!0}),n,a.a.createElement(e,{primaryButton:Object(h.a)("Next"),onPrimaryButtonClick:this._onRecoveryKeyNext,hasCancel:!0,onCancel:this._onCancel,focus:!1,primaryDisabled:!this.state.recoveryKeyValid})),Object(h.a)("If you've forgotten your Security Key you can <button>set up new recovery options</button>",{},{button:e=>a.a.createElement(t,{className:"mx_linkButton",element:"span",onClick:this._onResetRecoveryClick},e)}))}return a.a.createElement(e,{className:"mx_RestoreKeyBackupDialog",onFinished:this.props.onFinished,title:o},a.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_content"},r))}}o()(m,"propTypes",{showSummary:c.a.bool,keyCallback:c.a.func}),o()(m,"defaultProps",{showSummary:!0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(79),o=n.n(r),i=n(83),a=n(749),s=n(313),c=n(84),l=n(121),u=n(91),d=n(98);function h(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}const p={showRoomPanel:c.b.getValue("showRightPanelInRoom"),showGroupPanel:c.b.getValue("showRightPanelInGroup"),lastRoomPhase:c.b.getValue("lastRightPanelPhaseForRoom"),lastGroupPhase:c.b.getValue("lastRightPanelPhaseForGroup"),lastRoomPhaseParams:{}},m=[l.c.GroupMemberList,l.c.GroupRoomList,l.c.GroupRoomInfo,l.c.GroupMemberInfo],g=[l.c.RoomMemberInfo,l.c.Room3pidMemberInfo,l.c.EncryptionPanel];class f extends s.Store{constructor(){super(i.a),o()(this,"state",void 0),o()(this,"lastRoomId",void 0),this.state=p}get isOpenForRoom(){return this.state.showRoomPanel}get isOpenForGroup(){return this.state.showGroupPanel}get roomPanelPhase(){return this.state.lastRoomPhase}get groupPanelPhase(){return this.state.lastGroupPhase}get previousPhase(){return l.a.includes(this.state.previousPhase)?this.state.previousPhase:null}get visibleRoomPanelPhase(){return this.isOpenForRoom?this.roomPanelPhase:null}get visibleGroupPanelPhase(){return this.isOpenForGroup?this.groupPanelPhase:null}get roomPanelPhaseParams(){return this.state.lastRoomPhaseParams||{}}setState(e){this.state=Object.assign(this.state,e),c.b.setValue("showRightPanelInRoom",null,d.a.DEVICE,this.state.showRoomPanel),c.b.setValue("showRightPanelInGroup",null,d.a.DEVICE,this.state.showGroupPanel),l.a.includes(this.state.lastRoomPhase)&&c.b.setValue("lastRightPanelPhaseForRoom",null,d.a.DEVICE,this.state.lastRoomPhase),l.a.includes(this.state.lastGroupPhase)&&c.b.setValue("lastRightPanelPhaseForGroup",null,d.a.DEVICE,this.state.lastGroupPhase),this.__emitChange()}__onDispatch(e){switch(e.action){case"view_room":if(e.room_id===this.lastRoomId)break;case"view_group":this.lastRoomId=e.room_id,g.includes(this.state.lastRoomPhase)&&this.setState({lastRoomPhase:l.c.RoomMemberList,lastRoomPhaseParams:{}}),this.state.lastGroupPhase===l.c.GroupMemberInfo&&this.setState({lastGroupPhase:l.c.GroupMemberList});break;case u.a.SetRightPanelPhase:{var t;let n=e.phase,r=e.refireParams;const s=null===(t=e.allowClose)||void 0===t||t;if(n===l.c.RoomMemberInfo&&e.refireParams){const{member:t}=e.refireParams,o=Object(a.b)(t);o&&(n=l.c.EncryptionPanel,r={verificationRequest:o,member:t})}if(!l.c[n])return void console.warn("Tried to switch right panel to unknown phase: "+n);m.includes(n)?n===this.state.lastGroupPhase?this.setState({showGroupPanel:!this.state.showGroupPanel,previousPhase:null}):this.setState({lastGroupPhase:n,showGroupPanel:!0,previousPhase:this.state.lastGroupPhase}):n===this.state.lastRoomPhase&&!r&&s?this.setState({showRoomPanel:!this.state.showRoomPanel,previousPhase:null}):this.setState({lastRoomPhase:n,showRoomPanel:!0,lastRoomPhaseParams:r||{},previousPhase:this.state.lastRoomPhase}),i.a.dispatch(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({action:u.a.AfterRightPanelPhaseChange,phase:n},r||{}));break}case u.a.ToggleRightPanel:"room"===e.type?this.setState({showRoomPanel:!this.state.showRoomPanel}):this.setState({showGroupPanel:!this.state.showGroupPanel})}}static getSharedInstance(){return f.instance||(f.instance=new f),f.instance}}o()(f,"instance",void 0),window.mxRightPanelStore=f.getSharedInstance()},function(e,t,n){"use strict";var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(90),p=n(157),m=n(80),g=n(101),f=n(81);let _=Object(f.a)("views.auth.PassphraseField")((i=o=class extends c.PureComponent{constructor(...e){super(...e),s()(this,"validate",Object(p.a)({description:function(e){const t=e?e.score:0;return l.a.createElement("progress",{className:"mx_PassphraseField_progress",max:4,value:t})},deriveData:async({value:e})=>{if(!e)return null;const{scorePassword:t}=await n.e(24).then(n.bind(null,1416));return t(e)},rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(m.a)(this.props.labelEnterPassword)},{key:"complexity",test:async function({value:e},t){if(!e)return!1;const n=t.score>=this.props.minScore;return h.a.get().dangerously_allow_unsafe_and_insecure_passwords||n},valid:function(e){return e.score>=this.props.minScore?Object(m.a)(this.props.labelStrongPassword):Object(m.a)(this.props.labelAllowedButUnsafe)},invalid:function(e){if(!e)return null;const{feedback:t}=e;return t.warning||t.suggestions[0]||Object(m.a)("Keep going...")}}]})),s()(this,"onValidate",async e=>{const t=await this.validate(e);return this.props.onValidate(t),t})}render(){return l.a.createElement(g.a,{id:this.props.id,autoFocus:this.props.autoFocus,className:d()("mx_PassphraseField",this.props.className),ref:this.props.fieldRef,type:"password",autoComplete:"new-password",label:Object(m.a)(this.props.label),value:this.props.value,onChange:this.props.onChange,onValidate:this.onValidate})}},s()(o,"defaultProps",{label:Object(m.b)("Password"),labelEnterPassword:Object(m.b)("Enter password"),labelStrongPassword:Object(m.b)("Nice, strong password!"),labelAllowedButUnsafe:Object(m.b)("Password is allowed, but unsafe")}),r=i))||r;t.a=_},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return g}));var r=n(79),o=n.n(r),i=n(135),a=n(83),s=n(91),c=n(496),l=n(82),u=n(339);const d="mx_sso_hs_url",h="mx_sso_is_url",p="mx_sso_idp_id";let m;!function(e){e.Checking="CHECKING",e.Error="ERROR",e.NotAvailable="NOTAVAILABLE",e.Downloading="DOWNLOADING",e.Ready="READY"}(m||(m={}));class g{constructor(){o()(this,"notificationCount",0),o()(this,"errorDidOccur",!1),o()(this,"onAction",e=>{switch(e.action){case"on_client_not_viable":case"on_logged_out":this.setNotificationCount(0)}}),a.a.register(this.onAction),this.startUpdateCheck=this.startUpdateCheck.bind(this)}setNotificationCount(e){this.notificationCount=e}setErrorStatus(e){this.errorDidOccur=e}async canSelfUpdate(){return!1}startUpdateCheck(){Object(c.a)(),localStorage.removeItem("mx_defer_update"),a.a.dispatch({action:s.a.CheckUpdates,status:m.Checking})}installUpdate(){}shouldShowUpdate(e){if(l.a.userRegisteredWithinLastHours(24))return!1;try{const[t,n]=JSON.parse(localStorage.getItem("mx_defer_update"));return e!==t||Date.now()>n}catch(e){return!0}}deferUpdate(e){const t=new Date(Date.now()+864e5);t.setHours(8,0,0,0),localStorage.setItem("mx_defer_update",JSON.stringify([e,t.getTime()])),Object(c.a)()}supportsMultiLanguageSpellCheck(){return!1}supportsNotifications(){return!1}maySendNotifications(){return!1}loudNotification(e,t){}clearNotification(e){e.close&&e.close()}screenCaptureErrorString(){return"Not implemented"}supportsAutoLaunch(){return!1}async getAutoLaunchEnabled(){return!1}async setAutoLaunchEnabled(e){throw new Error("Unimplemented")}supportsWarnBeforeExit(){return!1}async shouldWarnBeforeExit(){return!1}async setWarnBeforeExit(e){throw new Error("Unimplemented")}supportsAutoHideMenuBar(){return!1}async getAutoHideMenuBarEnabled(){return!1}async setAutoHideMenuBarEnabled(e){throw new Error("Unimplemented")}supportsMinimizeToTray(){return!1}async getMinimizeToTrayEnabled(){return!1}async setMinimizeToTrayEnabled(e){throw new Error("Unimplemented")}getEventIndexingManager(){return null}async setLanguage(e){}setSpellCheckLanguages(e){}getSpellCheckLanguages(){return null}getAvailableSpellCheckLanguages(){return null}getSSOCallbackUrl(e){const t=new URL(window.location.href);return t.hash=e||"",t}startSingleSignOn(e,t,n,r){localStorage.setItem(d,e.getHomeserverUrl()),e.getIdentityServerUrl()&&localStorage.setItem(h,e.getIdentityServerUrl()),r&&localStorage.setItem(p,r);const o=this.getSSOCallbackUrl(n);window.location.href=e.getSsoLoginUrl(o.toString(),t,r)}onKeyDown(e){return!1}async getPickleKey(e,t){if(!window.crypto||!window.crypto.subtle)return null;let n;try{n=await Object(u.c)("pickleKey",[e,t])}catch(e){}if(!n)return null;if(!n.encrypted||!n.iv||!n.cryptoKey)return console.error("Badly formatted pickle key"),null;const r=new Uint8Array(e.length+t.length+1);for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);r[e.length]=124;for(let n=0;n<t.length;n++)r[e.length+1+n]=t.charCodeAt(n);try{const e=await crypto.subtle.decrypt({name:"AES-GCM",iv:n.iv,additionalData:r},n.cryptoKey,n.encrypted);return Object(i.encodeUnpaddedBase64)(e)}catch(e){return console.error("Error decrypting pickle key"),null}}async createPickleKey(e,t){if(!window.crypto||!window.crypto.subtle)return null;const n=window.crypto,r=new Uint8Array(32);n.getRandomValues(r);const o=await n.subtle.generateKey({name:"AES-GCM",length:256},!1,["encrypt","decrypt"]),a=new Uint8Array(32);n.getRandomValues(a);const s=new Uint8Array(e.length+t.length+1);for(let t=0;t<e.length;t++)s[t]=e.charCodeAt(t);s[e.length]=124;for(let n=0;n<t.length;n++)s[e.length+1+n]=t.charCodeAt(n);const c=await n.subtle.encrypt({name:"AES-GCM",iv:a,additionalData:s},o,r);try{await Object(u.d)("pickleKey",[e,t],{encrypted:c,iv:a,cryptoKey:o})}catch(e){return null}return Object(i.encodeUnpaddedBase64)(r)}async destroyPickleKey(e,t){try{await Object(u.b)("pickleKey",[e,t])}catch(e){}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(231),c=n(80);var l=n(90);const u=[s.a.ERROR_INVALID_HOMESERVER,s.a.ERROR_INVALID_IDENTITY_SERVER];class d{constructor(){o()(this,"hsUrl",void 0),o()(this,"hsName",void 0),o()(this,"hsNameIsDifferent",void 0),o()(this,"isUrl",void 0),o()(this,"isDefault",void 0),o()(this,"isNameResolvable",void 0),o()(this,"warning",void 0)}}class h{static isLivelinessError(e){return!!e&&!!u.find(t=>"string"==typeof e?t===e:t===e.message)}static authComponentStateForError(e,t="login"){if(!e)return{serverIsAlive:!0,serverErrorIsFatal:!1,serverDeadError:null};let n=Object(c.a)("Cannot reach homeserver"),r=Object(c.a)("Ensure you have a stable internet connection, or get in touch with the server admin");if(!h.isLivelinessError(e)){const e=l.a.get().brand;n=Object(c.a)("Your %(brand)s is misconfigured",{brand:e}),r=Object(c.a)("Ask your %(brand)s admin to check <a>your config</a> for incorrect or duplicate entries.",{brand:e},{a:e=>a.a.createElement("a",{href:"https://github.com/vector-im/element-web/blob/master/docs/config.md",target:"_blank",rel:"noreferrer noopener"},e)})}let o=!0;return("string"==typeof e?e:e.message)===s.a.ERROR_INVALID_IDENTITY_SERVER&&(o=!1,n=Object(c.a)("Cannot reach identity server"),r="register"===t?Object(c.a)("You can register, but some features will be unavailable until the identity server is back online. If you keep seeing this warning, check your configuration or contact a server admin."):"reset_password"===t?Object(c.a)("You can reset your password, but some features will be unavailable until the identity server is back online. If you keep seeing this warning, check your configuration or contact a server admin."):Object(c.a)("You can log in, but some features will be unavailable until the identity server is back online. If you keep seeing this warning, check your configuration or contact a server admin.")),{serverIsAlive:!1,serverErrorIsFatal:o,serverDeadError:a.a.createElement("div",null,a.a.createElement("strong",null,n),a.a.createElement("div",null,r))}}static async validateServerConfigWithStaticUrls(e,t,n=!1){if(!e)throw Object(c.h)(Object(c.b)("No homeserver URL provided"));const r={"m.homeserver":{base_url:e}};t&&(r["m.identity_server"]={base_url:t});const o=await s.a.fromDiscoveryConfig(r),i=new URL(e).hostname;return h.buildValidatedConfigFromDiscovery(i,o,n,!0)}static async validateServerName(e){const t=await s.a.findClientConfig(e);return h.buildValidatedConfigFromDiscovery(e,t)}static buildValidatedConfigFromDiscovery(e,t,n=!1,r=!1){if(!t||!t["m.homeserver"])throw console.error("Ended up in a state of not knowing which homeserver to connect to."),Object(c.h)(Object(c.b)("Unexpected error resolving homeserver configuration"));const o=t["m.homeserver"],i=t["m.identity_server"],a=l.a.get().validated_server_config;let u=a&&a.isUrl;if(i&&i.state===s.a.SUCCESS)u=i.base_url;else if(i&&i.state!==s.a.PROMPT){if(console.error("Error determining preferred identity server URL:",i),i.state===s.a.FAIL_ERROR){if(-1!==s.a.ALL_ERRORS.indexOf(i.error))throw Object(c.h)(i.error);throw Object(c.h)(Object(c.b)("Unexpected error resolving identity server configuration"))}o.error=s.a.ERROR_INVALID_IDENTITY_SERVER,i.base_url&&(u=i.base_url)}if(o.state!==s.a.SUCCESS&&(console.error("Error processing homeserver config:",o),!n||!h.isLivelinessError(o.error))){if(-1!==s.a.ALL_ERRORS.indexOf(o.error))throw Object(c.h)(o.error);throw Object(c.h)(Object(c.b)("Unexpected error resolving homeserver configuration"))}const p=o.base_url;let m=e||o.server_name;const g=new URL(p);if(m||(m=g.hostname),!m)throw console.error("Failed to parse homeserver name from homeserver URL"),Object(c.h)(Object(c.b)("Unexpected error resolving homeserver configuration"));return function(e,t){const n=new e;return Object.assign(n,t),n}(d,{hsUrl:p,hsName:m,hsNameIsDifferent:g.hostname!==m,isUrl:u,isDefault:!1,warning:o.error,isNameResolvable:!r})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(86),c=n.n(s),l=n(119),u=n(175),d=n(167),h=n(82),p=n(90);var m,g,f=n(80),_=n(174),b=n(122),v=n(81);function y(e){switch(e){case g.Globe:return Object(f.a)("This room is public");case g.PresenceOnline:return Object(f.a)("Online");case g.PresenceAway:return Object(f.a)("Away");case g.PresenceOffline:return Object(f.a)("Offline")}}!function(e){e.None="NONE",e.Globe="GLOBE",e.PresenceOnline="ONLINE",e.PresenceAway="AWAY",e.PresenceOffline="OFFLINE"}(g||(g={}));let E=Object(v.a)("views.avatars.DecoratedRoomAvatar")(m=class extends a.a.PureComponent{constructor(e){super(e),o()(this,"_dmUser",void 0),o()(this,"isUnmounted",!1),o()(this,"isWatchingTimeline",!1),o()(this,"onRoomTimeline",(e,t)=>{if(!this.isUnmounted&&t&&this.props.room.roomId===t.roomId&&("m.room.join_rules"===e.getType()||"m.room.member"===e.getType())){const e=this.calculateIcon();e!==this.state.icon&&this.setState({icon:e})}}),o()(this,"onPresenceUpdate",()=>{if(this.isUnmounted)return;const e=this.getPresenceIcon();e!==this.state.icon&&this.setState({icon:e})}),this.state={notificationState:d.a.instance.getRoomState(this.props.room),icon:this.calculateIcon()}}componentWillUnmount(){this.isUnmounted=!0,this.isWatchingTimeline&&this.props.room.off("Room.timeline",this.onRoomTimeline),this.dmUser=null}get isPublicRoom(){const e=this.props.room.currentState.getStateEvents("m.room.join_rules","");return"public"===(e&&e.getContent().join_rule)}get dmUser(){return this._dmUser}set dmUser(e){const t=this._dmUser;this._dmUser=e,t&&t!==this._dmUser&&(t.off("User.currentlyActive",this.onPresenceUpdate),t.off("User.presence",this.onPresenceUpdate)),this._dmUser&&t!==this._dmUser&&(this._dmUser.on("User.currentlyActive",this.onPresenceUpdate),this._dmUser.on("User.presence",this.onPresenceUpdate))}getPresenceIcon(){if(!this.dmUser)return g.None;let e=g.None;return this.dmUser.currentlyActive||"online"===this.dmUser.presence?e=g.PresenceOnline:"offline"===this.dmUser.presence?e=g.PresenceOffline:"unavailable"===this.dmUser.presence&&(e=g.PresenceAway),e}calculateIcon(){let e=g.None;const t=b.a.shared().getUserIdForRoomId(this.props.room.roomId);return t&&2===this.props.room.getJoinedMemberCount()?function(){const e=h.a.get().baseUrl,t=p.a.get().enable_presence_by_hs_url;return!t||!(!t[e]&&void 0!==t[e])}()&&t&&(this.dmUser=h.a.get().getUser(t),e=this.getPresenceIcon()):(e=this.isPublicRoom?g.Globe:g.None,this.isWatchingTimeline||(this.props.room.on("Room.timeline",this.onRoomTimeline),this.isWatchingTimeline=!0)),e}render(){let e,t;this.props.displayBadge&&(e=a.a.createElement(u.a,{notification:this.state.notificationState,forceCount:this.props.forceCount,roomId:this.props.room.roomId})),this.state.icon!==g.None&&(t=a.a.createElement(_.a,{tooltip:y(this.state.icon),class:"mx_DecoratedRoomAvatar_icon mx_DecoratedRoomAvatar_icon_"+this.state.icon.toLowerCase()}));const n=c()("mx_DecoratedRoomAvatar",{mx_DecoratedRoomAvatar_cutout:t});return a.a.createElement("div",{className:n},a.a.createElement(l.a,{room:this.props.room,width:this.props.avatarSize,height:this.props.avatarSize,oobData:this.props.oobData,viewAvatarOnClick:this.props.viewAvatarOnClick}),t,e)}})||m},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(96),a=n(2);function s(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}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class l{constructor(){o()(this,"outgoingRoomKeyRequests",[]),o()(this,"account",null),o()(this,"crossSigningKeys",null),o()(this,"privateKeys",{}),o()(this,"sessions",{}),o()(this,"sessionProblems",{}),o()(this,"notifiedErrorDevices",{}),o()(this,"inboundGroupSessions",{}),o()(this,"inboundGroupSessionsWithheld",{}),o()(this,"deviceData",null),o()(this,"rooms",{}),o()(this,"sessionsNeedingBackup",{}),o()(this,"sharedHistoryInboundGroupSessions",{})}async startup(){return this}deleteAllData(){return Promise.resolve()}getOrAddOutgoingRoomKeyRequest(e){const t=e.requestBody;return a.C(()=>{const n=this._getOutgoingRoomKeyRequest(t);return n?(i.a.log(`already have key request outstanding for ${t.room_id} / ${t.session_id}: not sending another`),n):(i.a.log(`enqueueing key request for ${t.room_id} / `+t.session_id),this.outgoingRoomKeyRequests.push(e),e)})}getOutgoingRoomKeyRequest(e){return Promise.resolve(this._getOutgoingRoomKeyRequest(e))}_getOutgoingRoomKeyRequest(e){for(const t of this.outgoingRoomKeyRequests)if(a.i(t.requestBody,e))return t;return null}getOutgoingRoomKeyRequestByState(e){for(const t of this.outgoingRoomKeyRequests)for(const n of e)if(t.state===n)return Promise.resolve(t);return Promise.resolve(null)}getAllOutgoingRoomKeyRequestsByState(e){return Promise.resolve(this.outgoingRoomKeyRequests.filter(t=>t.state==e))}getOutgoingRoomKeyRequestsByTarget(e,t,n){const r=[];for(const o of this.outgoingRoomKeyRequests)for(const i of n)o.state===i&&o.recipients.includes({userId:e,deviceId:t})&&r.push(o);return Promise.resolve(r)}updateOutgoingRoomKeyRequest(e,t,n){for(const r of this.outgoingRoomKeyRequests)if(r.requestId===e)return r.state!==t?(i.a.warn(`Cannot update room key request from ${t} as it was already updated to `+r.state),Promise.resolve(null)):(Object.assign(r,n),Promise.resolve(r));return Promise.resolve(null)}deleteOutgoingRoomKeyRequest(e,t){for(let n=0;n<this.outgoingRoomKeyRequests.length;n++){const r=this.outgoingRoomKeyRequests[n];if(r.requestId===e)return r.state!=t?(i.a.warn(`Cannot delete room key request in state ${r.state} (expected ${t})`),Promise.resolve(null)):(this.outgoingRoomKeyRequests.splice(n,1),Promise.resolve(r))}return Promise.resolve(null)}getAccount(e,t){t(this.account)}storeAccount(e,t){this.account=t}getCrossSigningKeys(e,t){t(this.crossSigningKeys)}getSecretStorePrivateKey(e,t,n){t(this.privateKeys[n]||null)}storeCrossSigningKeys(e,t){this.crossSigningKeys=t}storeSecretStorePrivateKey(e,t,n){this.privateKeys[t]=n}countEndToEndSessions(e,t){t(Object.keys(this.sessions).length)}getEndToEndSession(e,t,n,r){r((this.sessions[e]||{})[t]||null)}getEndToEndSessions(e,t,n){n(this.sessions[e]||{})}getAllEndToEndSessions(e,t){Object.entries(this.sessions).forEach(([e,n])=>{Object.entries(n).forEach(([n,r])=>{t(c(c({},r),{},{deviceKey:e,sessionId:n}))})})}storeEndToEndSession(e,t,n,r){let o=this.sessions[e];void 0===o&&(o={},this.sessions[e]=o),o[t]=n}async storeEndToEndSessionProblem(e,t,n){const r=this.sessionProblems[e]=this.sessionProblems[e]||[];r.push({type:t,fixed:n,time:Date.now()}),r.sort((e,t)=>e.time-t.time)}async getEndToEndSessionProblem(e,t){const n=this.sessionProblems[e]||[];if(!n.length)return null;const r=n[n.length-1];for(const e of n)if(e.time>t)return Object.assign({},e,{fixed:r.fixed});return r.fixed?null:r}async filterOutNotifiedErrorDevices(e){const t=this.notifiedErrorDevices,n=[];for(const r of e){const{userId:e,deviceInfo:o}=r;e in t?o.deviceId in t[e]||(n.push(r),t[e][o.deviceId]=!0):(n.push(r),t[e]={[o.deviceId]:!0})}return n}getEndToEndInboundGroupSession(e,t,n,r){const o=e+"/"+t;r(this.inboundGroupSessions[o]||null,this.inboundGroupSessionsWithheld[o]||null)}getAllEndToEndInboundGroupSessions(e,t){for(const e of Object.keys(this.inboundGroupSessions))t({senderKey:e.substr(0,43),sessionId:e.substr(44),sessionData:this.inboundGroupSessions[e]});t(null)}addEndToEndInboundGroupSession(e,t,n,r){const o=e+"/"+t;void 0===this.inboundGroupSessions[o]&&(this.inboundGroupSessions[o]=n)}storeEndToEndInboundGroupSession(e,t,n,r){this.inboundGroupSessions[e+"/"+t]=n}storeEndToEndInboundGroupSessionWithheld(e,t,n,r){const o=e+"/"+t;this.inboundGroupSessionsWithheld[o]=n}getEndToEndDeviceData(e,t){t(this.deviceData)}storeEndToEndDeviceData(e,t){this.deviceData=e}storeEndToEndRoom(e,t,n){this.rooms[e]=t}getEndToEndRooms(e,t){t(this.rooms)}getSessionsNeedingBackup(e){const t=[];for(const n in this.sessionsNeedingBackup)if(this.inboundGroupSessions[n]&&(t.push({senderKey:n.substr(0,43),sessionId:n.substr(44),sessionData:this.inboundGroupSessions[n]}),e&&n.length>=e))break;return Promise.resolve(t)}countSessionsNeedingBackup(){return Promise.resolve(Object.keys(this.sessionsNeedingBackup).length)}unmarkSessionsNeedingBackup(e){for(const t of e){const e=t.senderKey+"/"+t.sessionId;delete this.sessionsNeedingBackup[e]}return Promise.resolve()}markSessionsNeedingBackup(e){for(const t of e){const e=t.senderKey+"/"+t.sessionId;this.sessionsNeedingBackup[e]=!0}return Promise.resolve()}addSharedHistoryInboundGroupSession(e,t,n){const r=this.sharedHistoryInboundGroupSessions[e]||[];r.push([t,n]),this.sharedHistoryInboundGroupSessions[e]=r}getSharedHistoryInboundGroupSessions(e){return Promise.resolve(this.sharedHistoryInboundGroupSessions[e]||[])}doTxn(e,t,n){return Promise.resolve(n(null))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(205);function a(e){return"string"==typeof e&&!!e&&"undefined"!==e&&"null"!==e||"number"==typeof e}class s{constructor(e={}){o()(this,"rooms",{}),o()(this,"groups",{}),o()(this,"users",{}),o()(this,"syncToken",null),o()(this,"filters",{}),o()(this,"accountData",{}),o()(this,"localStorage",void 0),o()(this,"oobMembers",{}),o()(this,"clientOptions",{}),o()(this,"onRoomMember",(e,t,n)=>{if("invite"===n.membership)return;const r=this.users[n.userId]||new i.a(n.userId);n.name&&(r.setDisplayName(n.name),n.events.member&&r.setRawDisplayName(n.events.member.getDirectionalContent().displayname)),n.events.member&&n.events.member.getContent().avatar_url&&r.setAvatarUrl(n.events.member.getContent().avatar_url),this.users[r.userId]=r}),this.localStorage=e.localStorage}getSyncToken(){return this.syncToken}isNewlyCreated(){return Promise.resolve(!0)}setSyncToken(e){this.syncToken=e}storeGroup(e){this.groups[e.groupId]=e}getGroup(e){return this.groups[e]||null}getGroups(){return Object.values(this.groups)}storeRoom(e){this.rooms[e.roomId]=e,e.currentState.on("RoomState.members",this.onRoomMember),e.currentState.getMembers().forEach(t=>{this.onRoomMember(null,e.currentState,t)})}getRoom(e){return this.rooms[e]||null}getRooms(){return Object.values(this.rooms)}removeRoom(e){this.rooms[e]&&this.rooms[e].removeListener("RoomState.members",this.onRoomMember),delete this.rooms[e]}getRoomSummaries(){return Object.values(this.rooms).map((function(e){return e.summary}))}storeUser(e){this.users[e.userId]=e}getUser(e){return this.users[e]||null}getUsers(){return Object.values(this.users)}scrollback(e,t){return[]}storeEvents(e,t,n,r){}storeFilter(e){e&&(this.filters[e.userId]||(this.filters[e.userId]={}),this.filters[e.userId][e.filterId]=e)}getFilter(e,t){return this.filters[e]&&this.filters[e][t]?this.filters[e][t]:null}getFilterIdByName(e){if(!this.localStorage)return null;const t="mxjssdk_memory_filter_"+e;try{const e=this.localStorage.getItem(t);if(a(e))return e}catch(e){}return null}setFilterIdByName(e,t){if(!this.localStorage)return;const n="mxjssdk_memory_filter_"+e;try{a(t)?this.localStorage.setItem(n,t):this.localStorage.removeItem(n)}catch(e){}}storeAccountDataEvents(e){e.forEach(e=>{this.accountData[e.getType()]=e})}getAccountData(e){return this.accountData[e]}setSyncData(e){return Promise.resolve()}wantsSave(){return!1}save(e){}startup(){return Promise.resolve()}getSavedSync(){return Promise.resolve(null)}getSavedSyncToken(){return Promise.resolve(null)}deleteAllData(){return this.rooms={},this.users={},this.syncToken=null,this.filters={},this.accountData={},Promise.resolve()}getOutOfBandMembers(e){return Promise.resolve(this.oobMembers[e]||null)}setOutOfBandMembers(e,t){return this.oobMembers[e]=t,Promise.resolve()}clearOutOfBandMembers(e){return this.oobMembers={},Promise.resolve()}getClientOptions(){return Promise.resolve(this.clientOptions)}storeClientOptions(e){return this.clientOptions=Object.assign({},e),Promise.resolve()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2);function o(e,t,n,o,i,a=!1){if("string"!=typeof t||!t)return"";if(0!==t.indexOf("mxc://"))return a?t:"";let s=t.slice(6),c="/_matrix/media/r0/download/";const l={};n&&(l.width=Math.round(n)),o&&(l.height=Math.round(o)),i&&(l.method=i),Object.keys(l).length>0&&(c="/_matrix/media/r0/thumbnail/");const u=s.indexOf("#");let d="";u>=0&&(d=s.substr(u),s=s.substr(0,u));return e+c+s+(0===Object.keys(l).length?"":"?"+r.m(l))+d}},function(e,t,n){"use strict";(function(e){n.d(t,"h",(function(){return d})),n.d(t,"i",(function(){return h})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return m})),n.d(t,"g",(function(){return g})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return y})),n.d(t,"j",(function(){return E}));var r=n(79),o=n.n(r),i=n(926),a=n(2),s=n(96),c=n(927);function l(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}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const d="/_matrix/client/r0",h="/_matrix/client/unstable",p="/_matrix/identity/api/v1",m="/_matrix/identity/v2",g="/_matrix/media/r0";function f(e,t){a.e(t,["baseUrl","request","prefix"]),t.onlyData=t.onlyData||!1,this.event_emitter=e,this.opts=t,this.useAuthorizationHeader=Boolean(t.useAuthorizationHeader),this.uploads=[]}f.prototype={setIdBaseUrl:function(e){this.opts.idBaseUrl=e},getContentUri:function(){const e={access_token:this.opts.accessToken};return{base:this.opts.baseUrl,path:"/_matrix/media/r0/upload",params:e}},uploadContent:function(t,n){a.u(n)?n={callback:n}:void 0===n&&(n={});const r=!1!==n.includeFilename,o=n.type||t.type||"application/octet-stream",i=n.name||t.name;let l=t;l.stream&&"function"!=typeof l.stream&&(s.a.warn("Using `file.stream` as the content to upload. Future versions of the js-sdk will change this to expect `file` to be the content directly."),l=l.stream);let u=n.rawResponse;void 0===u&&(e.XMLHttpRequest?u=!1:(s.a.warn("Returning the raw JSON from uploadContent(). Future versions of the js-sdk will change this default, to return the parsed object. Set opts.rawResponse=false to change this behaviour now."),u=!0));let d=n.onlyContentUri;u||void 0!==d||(e.XMLHttpRequest?(s.a.warn("Returning only the content-uri from uploadContent(). Future versions of the js-sdk will change this default, to return the whole response object. Set opts.onlyContentUri=false to change this behaviour now."),d=!0):d=!1);const h={loaded:0,total:0};let p,m=null;if(u||(m=function(e){let t=JSON.parse(e);if(d&&(t=t.content_uri,void 0===t))throw Error("Bad response");return t}),e.XMLHttpRequest){const t=a.l(),s=new e.XMLHttpRequest;h.xhr=s;const u=_(t,n.callback,this.opts.onlyData),d=function(){s.abort(),u(new Error("Timeout"))};s.timeout_timer=c.b(d,3e4),s.onreadystatechange=function(){let t;switch(s.readyState){case e.XMLHttpRequest.DONE:c.a(s.timeout_timer);try{if(0===s.status)throw new y;if(!s.responseText)throw new Error("No response body.");t=s.responseText,m&&(t=m(t))}catch(e){return e.http_status=s.status,void u(e)}u(void 0,s,t)}},s.upload.addEventListener("progress",(function(e){c.a(s.timeout_timer),h.loaded=e.loaded,h.total=e.total,s.timeout_timer=c.b(d,3e4),n.progressHandler&&n.progressHandler({loaded:e.loaded,total:e.total})}));let g=this.opts.baseUrl+"/_matrix/media/r0/upload";const f=[];r&&i&&f.push("filename="+encodeURIComponent(i)),this.useAuthorizationHeader||f.push("access_token="+encodeURIComponent(this.opts.accessToken)),f.length>0&&(g+="?"+f.join("&")),s.open("POST",g),this.useAuthorizationHeader&&s.setRequestHeader("Authorization","Bearer "+this.opts.accessToken),s.setRequestHeader("Content-Type",o),s.send(l),p=t.promise,p.abort=s.abort.bind(s)}else{const e={};r&&i&&(e.filename=i),p=this.authedRequest(n.callback,"POST","/upload",e,l,{prefix:"/_matrix/media/r0",headers:{"Content-Type":o},json:!1,bodyParser:m})}const g=this,f=p.finally((function(){for(let e=0;e<g.uploads.length;++e)if(g.uploads[e]===h)return void g.uploads.splice(e,1)}));return f.abort=p.abort,h.promise=f,this.uploads.push(h),f},cancelUpload:function(e){return!!e.abort&&(e.abort(),!0)},getCurrentUploads:function(){return this.uploads},idServerRequest:function(e,t,n,r,o,i){if(!this.opts.idBaseUrl)throw new Error("No identity server base URL set");const s=this.opts.idBaseUrl+o+n;if(void 0!==e&&!a.u(e))throw Error("Expected callback to be a function but got "+typeof e);const c={uri:s,method:t,withCredentials:!1,json:!0,_matrix_opts:this.opts,headers:{}};"GET"===t?c.qs=r:"object"==typeof r&&(c.json=r),i&&(c.headers.Authorization="Bearer "+i);const l=a.l();return this.opts.request(c,_(l,e,this.opts.onlyData)),l.promise},authedRequest:function(e,t,n,r,o,i){r||(r={}),this.useAuthorizationHeader?(isFinite(i)&&(i={localTimeoutMs:i}),i||(i={}),i.headers||(i.headers={}),i.headers.Authorization||(i.headers.Authorization="Bearer "+this.opts.accessToken),r.access_token&&delete r.access_token):r.access_token||(r.access_token=this.opts.accessToken);const a=this.request(e,t,n,r,o,i),s=this;return a.catch((function(e){"M_UNKNOWN_TOKEN"==e.errcode?s.event_emitter.emit("Session.logged_out",e):"M_CONSENT_NOT_GIVEN"==e.errcode&&s.event_emitter.emit("no_consent",e.message,e.data.consent_uri)})),a},request:function(e,t,n,r,o,i){const a=void 0!==(i=i||{}).prefix?i.prefix:this.opts.prefix,s=this.opts.baseUrl+a+n;return this.requestOtherUrl(e,t,s,r,o,i)},requestOtherUrl:function(e,t,n,r,o,i){return null==i?i={}:isFinite(i)&&(i={localTimeoutMs:i}),this._request(e,t,n,r,o,i)},getUrl:function(e,t,n){let r="";return t&&(r="?"+a.m(t)),this.opts.baseUrl+n+e+r},_request:function(e,t,n,r,o,i){if(void 0!==e&&!a.u(e))throw Error("Expected callback to be a function but got "+typeof e);i=i||{};const s=this;this.opts.extraParams&&(r=u(u({},r),this.opts.extraParams));const l=a.q({},i.headers||{}),d=void 0===i.json||i.json;let h=i.bodyParser;d&&(o&&(o=JSON.stringify(o),l["content-type"]="application/json"),l.accept||(l.accept="application/json"),void 0===h&&(h=function(e){return JSON.parse(e)}));const p=a.l();let m,g,f=!1;const v=i.localTimeoutMs||this.opts.localTimeoutMs,y=()=>{v&&(m&&c.a(m),m=c.b((function(){f=!0,g&&g.abort&&g.abort(),p.reject(new b({error:"Locally timed out waiting for a response",errcode:"ORG.MATRIX.JSSDK_TIMEOUT",timeout:v}))}),v))};y();const E=p.promise;try{g=this.opts.request({uri:n,method:t,withCredentials:!1,qs:r,qsStringifyOptions:i.qsStringifyOptions,useQuerystring:!0,body:o,json:!1,timeout:v,headers:l||{},_matrix_opts:this.opts},(function(t,n,r){if(v&&(c.a(m),f))return;_(p,e,s.opts.onlyData,h)(t,n,r)})),g&&("onprogress"in g&&(g.onprogress=e=>{y()}),g.abort&&(E.abort=g.abort.bind(g)))}catch(t){p.reject(t),e&&e(t)}return E}};const _=function(e,t,n,r){return t=t||function(){},function(o,a,s){if(o){"AbortError"===o.name||"aborted"===o||o instanceof b||(o=new v("request failed",o))}if(!o)try{(a.status||a.statusCode)>=400?o=function(e,t){const n=e.status||e.statusCode,r=function(e){let t;e.getResponseHeader?t=e.getResponseHeader("Content-Type"):e.headers&&(t=e.headers["content-type"]||null);if(!t)return null;try{return Object(i.parse)(t)}catch(e){throw new Error(`Error parsing Content-Type '${t}': ${e}`)}}(e);let o;if(r)if("application/json"===r.type){const e="object"==typeof t?t:JSON.parse(t);o=new b(e)}else"text/plain"===r.type&&(o=new Error(`Server returned ${n} error: ${t}`));o||(o=new Error(`Server returned ${n} error`));return o.httpStatus=n,o}(a,s):r&&(s=r(s))}catch(e){o=new Error("Error parsing server response: "+e)}if(o)e.reject(o),t(o);else{const r={code:a.status||a.statusCode,headers:a.headers,data:s};e.resolve(n?s:r),t(null,n?s:r)}}};class b extends Error{constructor(e){super("MatrixError: "+(e=e||{}).errcode),this.errcode=e.errcode,this.name=e.errcode||"Unknown error code",this.message=e.error||"Unknown message",this.data=e}}class v extends Error{constructor(e,t){super(e+(t?": "+t.message:"")),this._cause=t}get name(){return"ConnectionError"}get cause(){return this._cause}}class y extends Error{constructor(){super("Operation aborted")}get name(){return"AbortError"}}async function E(e,t){let n=0,r=null;for(;n<e;)try{if(n>0){const e=1e3*Math.pow(2,n);s.a.log(`network operation failed ${n} times, retrying in ${e}ms...`),await new Promise(t=>setTimeout(t,e))}return await t()}catch(e){if(!(e instanceof v))throw e;n+=1,r=e}throw r}}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"h",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(108);function o(e,t){return function(n){return function(e,t,n){const o=Object.assign({},{code:e,reason:t},n);return new r.b({type:"m.key.verification.cancel",content:o})}(e,t,n)}}const i=o("m.user","Cancelled by user"),a=o("m.timeout","Timed out"),s=(o("m.unknown_transaction","Unknown transaction"),o("m.unknown_method","Unknown method")),c=o("m.unexpected_message","Unexpected message"),l=o("m.key_mismatch","Key mismatch"),u=(o("m.user_error","User mismatch"),o("m.invalid_message","Invalid message"));function d(e){const t=e.getContent();if(t){const{code:e,reason:n}=t;return{code:e,reason:n}}return{code:"Unknown error",reason:"m.unknown"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(106);const u=["isExpanded","children","onClick","onContextMenu"],d=e=>{let{isExpanded:t,children:n,onClick:r,onContextMenu:i}=e,s=a()(e,u);return c.a.createElement(l.a,o()({},s,{onClick:r,onContextMenu:i||r,"aria-haspopup":!0,"aria-expanded":t}),n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignRef=function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(86),l=n.n(c),u=n(85),d=n(80),h=n(104),p=n(81);class m extends s.a.Component{constructor(...e){super(...e),i()(this,"onMouseEnter",()=>{this.props.onMouseEnter(this.props.dropdownKey)}),i()(this,"onClick",e=>{e.preventDefault(),e.stopPropagation(),this.props.onClick(this.props.dropdownKey)})}render(){const e=l()({mx_Dropdown_option:!0,mx_Dropdown_option_highlight:this.props.highlighted});return s.a.createElement("div",{id:this.props.id,className:e,onClick:this.onClick,onMouseEnter:this.onMouseEnter,role:"option","aria-selected":this.props.highlighted,ref:this.props.inputRef},this.props.children)}}i()(m,"defaultProps",{disabled:!1});let g=Object(p.a)("views.elements.Dropdown")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"buttonRef",Object(a.createRef)()),i()(this,"dropdownRootElement",null),i()(this,"ignoreEvent",null),i()(this,"childrenByKey",{}),i()(this,"onDocumentClick",e=>{e!==this.ignoreEvent&&this.setState({expanded:!1})}),i()(this,"onRootClick",e=>{this.ignoreEvent=e}),i()(this,"onInputClick",e=>{this.props.disabled||this.state.expanded||(this.setState({expanded:!0}),e.preventDefault())}),i()(this,"onMenuOptionClick",e=>{this.close(),this.props.onOptionChange(e)}),i()(this,"onInputKeyDown",e=>{let t=!0;switch(e.key){case h.a.ENTER:this.props.onOptionChange(this.state.highlightedOption);case h.a.ESCAPE:this.close();break;case h.a.ARROW_DOWN:this.setState({highlightedOption:this.nextOption(this.state.highlightedOption)});break;case h.a.ARROW_UP:this.setState({highlightedOption:this.prevOption(this.state.highlightedOption)});break;default:t=!1}t&&(e.preventDefault(),e.stopPropagation())}),i()(this,"onInputChange",e=>{this.setState({searchQuery:e.currentTarget.value}),this.props.onSearchChange&&this.props.onSearchChange(e.currentTarget.value)}),i()(this,"collectRoot",e=>{this.dropdownRootElement&&this.dropdownRootElement.removeEventListener("click",this.onRootClick,!1),e&&e.addEventListener("click",this.onRootClick,!1),this.dropdownRootElement=e}),i()(this,"setHighlightedOption",e=>{this.setState({highlightedOption:e})}),this.reindexChildren(this.props.children);const t=s.a.Children.toArray(e.children)[0];this.state={expanded:!1,highlightedOption:t?t.key:null,searchQuery:""},document.addEventListener("click",this.onDocumentClick,!1)}componentWillUnmount(){document.removeEventListener("click",this.onDocumentClick,!1)}UNSAFE_componentWillReceiveProps(e){if(!e.children||0===e.children.length)return;this.reindexChildren(e.children);const t=e.children[0];this.setState({highlightedOption:t?t.key:null})}reindexChildren(e){this.childrenByKey={},s.a.Children.forEach(e,e=>{this.childrenByKey[e.key]=e})}close(){this.setState({expanded:!1}),this.buttonRef.current&&this.buttonRef.current.focus()}nextOption(e){const t=Object.keys(this.childrenByKey),n=t.indexOf(e);return t[(n+1)%t.length]}prevOption(e){const t=Object.keys(this.childrenByKey),n=t.indexOf(e);return t[(n-1)%t.length]}scrollIntoView(e){e&&e.scrollIntoView({block:"nearest",behavior:"auto"})}getMenuOptions(){const e=s.a.Children.map(this.props.children,e=>{const t=this.state.highlightedOption===e.key;return s.a.createElement(m,{id:`${this.props.id}__${e.key}`,key:e.key,dropdownKey:e.key,highlighted:t,onMouseEnter:this.setHighlightedOption,onClick:this.onMenuOptionClick,inputRef:t?this.scrollIntoView:void 0},e)});return 0===e.length?[s.a.createElement("div",{key:"0",className:"mx_Dropdown_option",role:"option"},Object(d.a)("No results"))]:e}render(){let e;const t={};let n;if(this.props.menuWidth&&(t.width=this.props.menuWidth),this.state.expanded&&(this.props.searchEnabled&&(e=s.a.createElement("input",{type:"text",autoFocus:!0,className:"mx_Dropdown_option",onKeyDown:this.onInputKeyDown,onChange:this.onInputChange,value:this.state.searchQuery,role:"combobox","aria-autocomplete":"list","aria-activedescendant":`${this.props.id}__${this.state.highlightedOption}`,"aria-owns":this.props.id+"_listbox","aria-disabled":this.props.disabled,"aria-label":this.props.label})),n=s.a.createElement("div",{className:"mx_Dropdown_menu",style:t,role:"listbox",id:this.props.id+"_listbox"},this.getMenuOptions())),!e){const t=this.props.getShortOption?this.props.getShortOption(this.props.value):this.childrenByKey[this.props.value];e=s.a.createElement("div",{className:"mx_Dropdown_option",id:this.props.id+"_value"},t)}const r={mx_Dropdown:!0,mx_Dropdown_disabled:this.props.disabled};return this.props.className&&(r[this.props.className]=!0),s.a.createElement("div",{className:l()(r),ref:this.collectRoot},s.a.createElement(u.a,{className:"mx_Dropdown_input mx_no_textinput",onClick:this.onInputClick,"aria-haspopup":"listbox","aria-expanded":this.state.expanded,disabled:this.props.disabled,inputRef:this.buttonRef,"aria-label":this.props.label,"aria-describedby":this.props.id+"_value"},e,s.a.createElement("span",{className:"mx_Dropdown_arrow"}),n))}})||r},function(e,t,n){"use strict";(function(e){n.d(t,"h",(function(){return B})),n.d(t,"b",(function(){return G})),n.d(t,"a",(function(){return V})),n.d(t,"d",(function(){return q})),n.d(t,"c",(function(){return H})),n.d(t,"k",(function(){return K})),n.d(t,"l",(function(){return Y})),n.d(t,"e",(function(){return $})),n.d(t,"i",(function(){return ee})),n.d(t,"m",(function(){return te})),n.d(t,"g",(function(){return ne})),n.d(t,"f",(function(){return re})),n.d(t,"j",(function(){return ie})),n.d(t,"n",(function(){return se}));var r=n(134),o=n(206),i=n(232),a=n(82),s=n(210),c=n(227),l=n(549),u=n(124),d=n(235),h=n(456),p=n(1329),m=n(83),g=n(122),f=n(87),_=n(269),b=n(111),v=n(284),y=n(339),E=n(84),S=n(677),w=n(133),C=n(178),T=n(423),x=n(1427),k=n(391),F=n(253),O=n(690),R=n(112),D=n(329),I=n(138),A=n(1390),N=n(105),M=n(80),P=n(837),L=n(838),j=n(839),U=n(840);async function B(e={}){try{let t=e.enableGuest||!1;const n=e.guestHsUrl,o=e.guestIsUrl,i=e.fragmentQueryParams||{},a=e.defaultDeviceDisplayName;if(t&&!n&&(console.warn("Cannot enable guest access: can't determine HS URL to use"),t=!1),t&&i.guest_user_id&&i.guest_access_token)return console.log("Using guest access credentials"),Q({userId:i.guest_user_id,accessToken:i.guest_access_token,homeserverUrl:n,identityServerUrl:o,guest:!0},!0).then(()=>!0);return!!await K({ignoreGuest:Boolean(e.ignoreGuest)})||!!t&&function(e,t,n){console.log("Doing guest login on "+e);return Object(r.createClient)({baseUrl:e}).registerGuest({body:{initial_device_display_name:n}}).then(n=>(console.log("Registered as guest: "+n.user_id),Q({userId:n.user_id,deviceId:n.device_id,accessToken:n.access_token,homeserverUrl:e,identityServerUrl:t,guest:!0},!0).then(()=>!0)),e=>(console.error("Failed to register as guest",e),!1))}(n,o,a)}catch(e){return!(e instanceof J)&&async function(e){console.error("Unable to load session",e);const t=f.a.createTrackedDialog("Session Restore Error","",j.a,{error:e.message}),[n]=await t.finished;if(n)return await ae(),!1;return B()}(e)}}async function G(){const{hsUrl:e,userId:t,hasAccessToken:n,isGuest:r}=await H();return e&&t&&n?[t,r]:[null,null]}function V(e,t,n){if(!e.loginToken)return Promise.resolve(!1);const o=localStorage.getItem(F.a),i=localStorage.getItem(F.c);return o?Object(v.c)(o,i,"m.login.token",{token:e.loginToken,initial_device_display_name:t}).then((function(e){return console.log("Logged in with token"),ae().then(async()=>(await X(e),sessionStorage.setItem("mx_fresh_login",String(!0)),!0))})).catch(e=>(f.a.createTrackedDialog("SSO","Token Rejected",N.a,{title:Object(M.a)("We couldn't log you in"),description:"ConnectionError"===e.name?Object(M.a)("Your homeserver was unreachable and was not able to log you in. Please try again. If this continues, please contact your homeserver administrator."):Object(M.a)("Your homeserver rejected your log in attempt. This could be due to things just taking too long. Please try again. If this continues, please contact your homeserver administrator."),button:Object(M.a)("Try again"),onFinished:e=>{if(e){const e=Object(r.createClient)({baseUrl:o,idBaseUrl:i}),t=localStorage.getItem(F.b)||void 0;b.a.get().startSingleSignOn(e,"sso",n,t)}}}),console.error("Failed to log in with login token:"),console.error(e),!1)):(console.warn("Cannot log in with token: can't determine HS URL to use"),f.a.createTrackedDialog("SSO","Unknown HS",N.a,{title:Object(M.a)("We couldn't log you in"),description:Object(M.a)("We asked the browser to remember which homeserver you use to let you sign in, but unfortunately your browser has forgotten it. Go to the sign in page and try again."),button:Object(M.a)("Try again")}),Promise.resolve(!1))}function q(e){if(e.reason===o.b.TOGGLED_LAZY_LOADING)return Promise.resolve().then(()=>{const t=e.value;return new Promise(t?e=>{f.a.createDialog(P.a,{onFinished:e})}:e=>{f.a.createDialog(L.a,{onFinished:e,host:window.location.host})})}).then(()=>a.a.get().store.deleteAllData()).then(()=>{b.a.get().reload()})}async function H(){const e=localStorage.getItem("mx_hs_url"),t=localStorage.getItem("mx_is_url");let n;try{n=await y.c("account","mx_access_token")}catch(e){}if(!n&&(n=localStorage.getItem("mx_access_token"),n))try{await y.d("account","mx_access_token",n),localStorage.removeItem("mx_access_token")}catch(e){}const r="true"===localStorage.getItem("mx_has_access_token")||!!n,o=localStorage.getItem("mx_user_id"),i=localStorage.getItem("mx_device_id");let a;return a=null!==localStorage.getItem("mx_is_guest")?"true"===localStorage.getItem("mx_is_guest"):"true"===localStorage.getItem("matrix-is-guest"),{hsUrl:e,isUrl:t,hasAccessToken:r,accessToken:n,userId:o,deviceId:i,isGuest:a}}async function z(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);const n=await window.crypto.subtle.importKey("raw",t,"HKDF",!1,["deriveBits"]);return t.fill(0),new Uint8Array(await window.crypto.subtle.deriveBits({name:"HKDF",hash:"SHA-256",salt:new Uint8Array(32),info:new Uint8Array(0)},n,256))}async function W(){if(await new Promise(e=>{f.a.createTrackedDialog("Storage evicted","",U.a,{onFinished:e})}))throw await ae(),new J("Aborting login in progress because of storage inconsistency")}async function K(e){const t=null==e?void 0:e.ignoreGuest;if(!localStorage)return!1;const{hsUrl:n,isUrl:r,hasAccessToken:o,accessToken:a,userId:s,deviceId:c,isGuest:l}=await H();if(o&&!a&&W(),a&&s&&n){if(t&&l)return console.log("Ignoring stored guest account: "+s),!1;let e=a;const o=await b.a.get().getPickleKey(s,c);if(o){if(console.log("Got pickle key"),"string"!=typeof a){const t=await z(o);e=await Object(i.b)(a,t,"access_token"),t.fill(0)}}else console.log("No pickle key available");const u="true"===sessionStorage.getItem("mx_fresh_login");return sessionStorage.removeItem("mx_fresh_login"),console.log("Restoring session for "+s),await Q({userId:s,deviceId:c,accessToken:e,homeserverUrl:n,identityServerUrl:r,guest:l,pickleKey:o,freshLogin:u},!1),!0}return console.log("No previous session found."),!1}async function Y(e){e.freshLogin=!0,se();const t=e.userId&&e.deviceId?await b.a.get().createPickleKey(e.userId,e.deviceId):null;return t?console.log("Created pickle key"):console.log("Pickle key not created"),Q(Object.assign({},e,{pickleKey:t}),!0)}function $(e){const t=a.a.get().getUserId(),n=a.a.get().getDeviceId();se(),localStorage.removeItem("mx_soft_logout"),Z=!1;const r=e.userId!==t||e.deviceId!==n;return r&&console.warn("Clearing all data: Old session belongs to a different user/session"),Q(e,r)}async function Q(e,t){e.guest=Boolean(e.guest);const n=ne();console.log("setLoggedIn: mxid: "+e.userId+" deviceId: "+e.deviceId+" guest: "+e.guest+" hs: "+e.homeserverUrl+" softLogout: "+n," freshLogin: "+e.freshLogin),m.a.dispatch({action:"on_logging_in"},!0),t&&await ae();const r=await y.a();r.dataInLocalStorage&&r.cryptoInited&&!r.dataInCryptoStore&&await W(),D.a.instance.updateAnonymityFromSettings(e.userId),u.a.setLoggedIn(e.guest,e.homeserverUrl),a.a.replaceUsingCreds(e);const o=a.a.get();if(e.freshLogin&&E.b.getValue("feature_dehydration")){const t=await o.rehydrateDevice();t&&(e.deviceId=t),delete e.freshLogin}if(localStorage)try{await X(e),sessionStorage.removeItem("mx_fresh_login")}catch(e){console.warn("Error using local storage: can't persist session!",e)}else console.warn("No local storage available: can't persist session!");return m.a.dispatch({action:"on_logged_in"}),await oe(!n),o}class J extends Error{}async function X(e){var t;if(localStorage.setItem("mx_hs_url",e.homeserverUrl),e.identityServerUrl&&localStorage.setItem("mx_is_url",e.identityServerUrl),localStorage.setItem("mx_user_id",e.userId),localStorage.setItem("mx_is_guest",JSON.stringify(e.guest)),e.accessToken?localStorage.setItem("mx_has_access_token","true"):localStorage.deleteItem("mx_has_access_token"),e.pickleKey){let t;try{const n=await z(e.pickleKey);t=await Object(i.c)(e.accessToken,n,"access_token"),n.fill(0)}catch(e){console.warn("Could not encrypt access token",e)}try{await y.d("account","mx_access_token",t||e.accessToken)}catch(t){localStorage.setItem("mx_access_token",e.accessToken)}localStorage.setItem("mx_has_pickle_key",String(!0))}else{try{await y.d("account","mx_access_token",e.accessToken)}catch(t){localStorage.setItem("mx_access_token",e.accessToken)}localStorage.getItem("mx_has_pickle_key")&&console.error("Expected a pickle key, but none provided. Encryption may not work.")}e.deviceId&&localStorage.setItem("mx_device_id",e.deviceId),null===(t=s.a.persistCredentials)||void 0===t||t.call(s.a,e),console.log("Session persisted for "+e.userId)}let Z=!1;function ee(){if(!a.a.get())return;if(R.a.instance.disabled||R.a.instance.enable(!0),D.a.instance.logout(),a.a.get().isGuest())return void e(()=>ie());Z=!0;const t=a.a.get();b.a.get().destroyPickleKey(t.getUserId(),t.getDeviceId()),t.logout().then(ie,e=>{console.log("Failed to call logout API: token will not be invalidated"),ie()})}function te(){a.a.get()&&(localStorage.setItem("mx_soft_logout","true"),console.log("Soft logout initiated"),Z=!0,m.a.dispatch({action:"on_client_not_viable"}),se(!1))}function ne(){return"true"===localStorage.getItem("mx_soft_logout")}function re(){return Z}async function oe(e=!0){console.log("Lifecycle: Starting MatrixClient"),m.a.dispatch({action:"will_start_client"},!0),S.a.sharedInstance().reset(),w.a.sharedInstance().reset(),d.default.start(),h.a.sharedInstance().start(),g.a.makeShared().start(),C.a.sharedInstance().startWatching(),_.a.start(),I.d.sharedInstance().start(),T.a.sharedInstance().start(),e?(await c.a.init(),await a.a.start()):(console.warn("Caller requested only auxiliary services be started"),await a.a.assign()),x.a.sharedInstance().start(),E.b.getValue("lowBandwidth")||p.a.start(),await k.a.getInstance().start(),m.a.dispatch({action:"client_started"}),ne()&&te()}async function ie(){var e;Z=!1,m.a.dispatch({action:"on_logged_out"},!0),se(),await ae({deleteEverything:!0}),null===(e=A.a.onLoggedOutAndStorageCleared)||void 0===e||e.call(A.a)}async function ae(e){if(u.a.disable(),window.localStorage){const t=O.a.instance.getWireInvites();window.localStorage.clear();try{await y.b("account","mx_access_token")}catch(e){}null!=e&&e.deleteEverything||t.forEach(e=>{const t=e.roomId;delete e.roomId,O.a.instance.storeInvite(t,e)})}window.sessionStorage&&window.sessionStorage.clear();const t=Object(l.a)({baseUrl:""});await c.a.deleteEventIndex(),await t.clearStores()}function se(e=!0){d.default.stop(),I.d.sharedInstance().stop(),h.a.sharedInstance().stop(),S.a.sharedInstance().reset(),p.a.stop(),_.a.stop(),C.a.sharedInstance().stopWatching(),T.a.sharedInstance().stop(),x.a.sharedInstance().stop(),g.a.shared()&&g.a.shared().stop(),c.a.stop();const t=a.a.get();t&&(t.stopClient(),t.removeAllListeners(),e&&(a.a.unset(),c.a.unset()))}}).call(this,n(161).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c}));const r=/^\S+@\S+\.\S+$/,o=/^@\S+:\S+$/,i=/^!\S+:\S+$/;let a;!function(e){e.Email="email",e.MatrixUserId="mx-user-id",e.MatrixRoomId="mx-room-id"}(a||(a={}));const s=[a.Email,a.MatrixRoomId,a.MatrixUserId];function c(e){return r.test(e)?a.Email:o.test(e)?a.MatrixUserId:i.test(e)?a.MatrixRoomId:null}},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(188),o=n(90),i=n(82);function a(){return o.a.get().validated_server_config.isUrl}function s(){const e=a();i.a.get().setAccountData("m.identity_server",{base_url:e})}async function c(e){let t;try{t=await i.a.get().getTerms(r.a.IS,e)}catch(e){if(console.error(e),"rejected"!==e.cors&&404!==e.httpStatus)throw e;t=null}return t&&t.policies&&Object.keys(t.policies).length>0}function l(){const e=i.a.get().getAccountData("m.identity_server");return e&&e.getContent()&&e.getContent().base_url}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d}));var r=n(86),o=n.n(r),i=n(82),a=n(89),s=n(87);class c extends Error{}class l{constructor(e,t,n){this.serviceType=e,this.baseUrl=t,this.accessToken=n}}async function u(e,t=d){const n=e.map(e=>i.a.get().getTerms(e.serviceType,e.baseUrl)),r=(await Promise.all(n)).map((t,n)=>({service:e[n],policies:t.policies})),o=await i.a.get().getAccountData("m.accepted_terms");let a;a=o&&o.getContent()&&o.getContent().accepted?new Set(o.getContent().accepted):new Set;const s=[];for(const{service:e,policies:t}of r){const n={};for(const[e,r]of Object.entries(t)){let t=!1;for(const e of Object.keys(r))if("version"!==e&&a.has(r[e].url)){t=!0;break}t||(n[e]=r)}Object.keys(n).length>0&&s.push({service:e,policies:n})}const c=a.size;if(s.length>0){const e=await t(s,[...a]);console.log("User has agreed to URLs",e),e.forEach(e=>a.add(e))}else console.log("User has already agreed to all required policies");if(a.size!==c){const e={accepted:Array.from(a)};await i.a.get().setAccountData("m.accepted_terms",e)}const l=r.map(e=>{const t=Array.from(a).filter(t=>{for(const n of Object.values(e.policies))for(const e of Object.keys(n))if("version"!==e&&n[e].url===t)return!0;return!1});return 0===t.length?Promise.resolve():i.a.get().agreeToTerms(e.service.serviceType,e.service.baseUrl,e.service.accessToken,t)});return Promise.all(l)}function d(e,t,n){return new Promise((r,i)=>{console.log("Terms that need agreement",e);const l=a.getComponent("views.dialogs.TermsDialog");s.a.createTrackedDialog("Terms of Service","",l,{policiesAndServicePairs:e,agreedUrls:t,onFinished:(e,t)=>{e?r(t):i(new c)}},o()("mx_TermsDialog",n))})}},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(3),a=n.n(i);class s extends a.a{constructor(){super(),o()(this,"roomWidgetEcho",void 0),this.roomWidgetEcho={}}getEchoedRoomWidgets(e,t){const n=[],r=Object.assign({},this.roomWidgetEcho[e]);for(const e of t){const t=e.getStateKey();r[t]&&0===Object.keys(r[t]).length||n.push(e),delete r[t]}return n}roomHasPendingWidgetsOfType(e,t,n){const r=Object.assign({},this.roomWidgetEcho[e]);for(const e of t){delete r[e.getStateKey()]}return void 0===n?Object.keys(r).length>0:Object.values(r).some(e=>n.matches(e.type))}roomHasPendingWidgets(e,t){return this.roomHasPendingWidgetsOfType(e,t)}setRoomWidgetEcho(e,t,n){void 0===this.roomWidgetEcho[e]&&(this.roomWidgetEcho[e]={}),this.roomWidgetEcho[e][t]=n,this.emit("update",e,t)}removeRoomWidgetEcho(e,t){delete this.roomWidgetEcho[e][t],0===Object.keys(this.roomWidgetEcho[e]).length&&delete this.roomWidgetEcho[e],this.emit("update",e,t)}}let c=null;c||(c=new s),t.a=c},function(e,t,n){"use strict";(function(e){var r=n(3),o=n.n(r),i=n(82),a=n(238);class s extends o.a{constructor(){super(),this._persistentWidgetId=null,this._roomIdByWidgetId={},this.onRoomStateEvents=this.onRoomStateEvents.bind(this),this.dispatcherRef=null}start(){i.a.get().on("RoomState.events",this.onRoomStateEvents)}stop(){i.a.get()&&i.a.get().removeListener("RoomState.events",this.onRoomStateEvents),this._roomIdByWidgetId={}}onRoomStateEvents(e,t){"im.vector.modular.widgets"===e.getType()&&e.getStateKey()===this._persistentWidgetId&&this.destroyPersistentWidget(this._persistentWidgetId)}destroyPersistentWidget(e){if(e!==this._persistentWidgetId)return;const t=this._persistentWidgetId;a.a.instance.stopMessagingById(e),this.setWidgetPersistence(t,!1),this.delRoomId(t)}setWidgetPersistence(e,t){this._persistentWidgetId!==e||t?this._persistentWidgetId!==e&&t&&(this._persistentWidgetId=e):this._persistentWidgetId=null,this.emit("update")}getWidgetPersistence(e){return this._persistentWidgetId===e}getPersistentWidgetId(){return this._persistentWidgetId}getRoomId(e){return this._roomIdByWidgetId[e]}setRoomId(e,t){this._roomIdByWidgetId[e]=t,this.emit("update")}delRoomId(e){delete this._roomIdByWidgetId[e],this.emit("update")}}void 0===e.singletonActiveWidgetStore&&(e.singletonActiveWidgetStore=new s),t.a=e.singletonActiveWidgetStore}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r="filter_changed";let o;!function(e){e[e.Prefilter=0]="Prefilter",e[e.Runtime=1]="Runtime"}(o||(o={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(84);function o(e,t){const n=t?e=>t[e]:t=>r.b.getValue(t,e.getRoomId());if(e.isRedacted()&&!n("showRedactions"))return!0;if(e.isRelation("m.replace"))return!0;const o=function(e){const t={isMemberEvent:"m.room.member"===e.getType()};if(!t.isMemberEvent)return t;const n=e.getContent(),r=e.getPrevContent(),o=n.membership!==r.membership;t.isJoin=o&&"join"===n.membership,t.isPart=o&&"leave"===n.membership&&e.getStateKey()===e.getSender();const i=!o&&"join"===n.membership;return t.isDisplaynameChange=i&&n.displayname!==r.displayname,t.isAvatarChange=i&&n.avatar_url!==r.avatar_url,t}(e);if(o.isMemberEvent){if((o.isJoin||o.isPart)&&!n("showJoinLeaves"))return!0;if(o.isAvatarChange&&!n("showAvatarChanges"))return!0;if(o.isDisplaynameChange&&!n("showDisplaynameChanges"))return!0}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=t.contains=t.root=t.parseHTML=t.text=t.xml=t.html=void 0;var r=n(181),o=r.__importStar(n(394)),i=n(572),a=n(214),s=n(587),c=n(593);function l(e,t,n){var r,o=t?"string"==typeof t?i.select(t,null!==(r=null==e?void 0:e._root)&&void 0!==r?r:[],n):t:null==e?void 0:e._root.children;return o?n.xmlMode||n._useHtmlParser2?c.render(o,n):s.render(o):""}function u(e){if(Array.isArray(e))return!0;if("object"!=typeof e||!Object.prototype.hasOwnProperty.call(e,"length")||"number"!=typeof e.length||e.length<0)return!1;for(var t=0;t<e.length;t++)if(!(t in e))return!1;return!0}t.html=function(e,t){return!t&&function(e){return"object"==typeof e&&null!=e&&!("length"in e)&&!("type"in e)}(e)&&(t=e,e=void 0),l(this||void 0,e,r.__assign(r.__assign(r.__assign({},o.default),this?this._options:{}),o.flatten(null!=t?t:{})))},t.xml=function(e){return l(this,e,r.__assign(r.__assign({},this._options),{xmlMode:!0}))},t.text=function e(t){for(var n=t||(this?this.root():[]),r="",o=0;o<n.length;o++){var i=n[o];a.DomUtils.isText(i)?r+=i.data:a.DomUtils.hasChildren(i)&&i.type!==a.ElementType.Comment&&i.type!==a.ElementType.Script&&i.type!==a.ElementType.Style&&(r+=e(i.children))}return r},t.parseHTML=function(e,t,n){if(void 0===n&&(n="boolean"==typeof t&&t),!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t);var r=this.load(e,o.default,!1);return n||r("script").remove(),r.root()[0].children.slice()},t.root=function(){return this(this._root)},t.contains=function(e,t){if(t===e)return!1;for(var n=t;n&&n!==n.parent;)if((n=n.parent)===e)return!0;return!1},t.merge=function(e,t){if(u(e)&&u(t)){for(var n=e.length,r=+t.length,o=0;o<r;o++)e[n++]=t[o];return e.length=n,e}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(79),o=n.n(r),i=n(1062),a=n(1063);function s(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}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l=new Map,u=new Map,d=e=>l.get(g(e)),h=["people","people","control","nature","foods","places","activity","objects","symbols","flags"],p={people:[],nature:[],foods:[],places:[],activity:[],objects:[],symbols:[],flags:[]},m=i.map(e=>{var t,n;const r=null!==(t=a[e.hexcode])&&void 0!==t?t:[e.annotation.toLowerCase().replace(/ /g,"_")],o=c(c({},e),{},{shortcodes:"string"==typeof r?[r]:r}),i=null!==(n=h[o.group])&&void 0!==n?n:(s=o.unicode,1===Array.from(s).length&&s>="🇦"&&s<="🇿"?"symbols":null);var s;return p.hasOwnProperty(i)&&p[i].push(o),l.set(g(o.unicode),o),o.emoticon&&u.set(o.emoticon,o),o});function g(e){return e.replace(/[\uFE00-\uFE0F]$/,"")}},function(e,t,n){"use strict";let r,o,i=n(215);class a extends i{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}normalize(e,t,n){let r=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before;return r}toResult(e={}){return new r(new o,this,e).stringify()}}a.registerLazyResult=e=>{r=e},a.registerProcessor=e=>{o=e},e.exports=a,a.default=a},function(e,t,n){"use strict";(function(t){!function(t){var n=/^(b|B)$/,r={iec:{bits:["b","Kib","Mib","Gib","Tib","Pib","Eib","Zib","Yib"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["b","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},o={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]};function i(e){var t,i,a,s,c,l,u,d,h,p,m,g,f,_,b,v=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},y=[],E=0,S=void 0,w=void 0;if(isNaN(e))throw new TypeError("Invalid number");return i=!0===v.bits,m=!0===v.unix,t=v.base||2,p=void 0!==v.round?v.round:m?1:2,l=void 0!==v.locale?v.locale:"",u=v.localeOptions||{},g=void 0!==v.separator?v.separator:"",f=void 0!==v.spacer?v.spacer:m?"":" ",b=v.symbols||{},_=2===t&&v.standard||"jedec",h=v.output||"string",s=!0===v.fullform,c=v.fullforms instanceof Array?v.fullforms:[],S=void 0!==v.exponent?v.exponent:-1,a=2<t?1e3:1024,(d=(w=Number(e))<0)&&(w=-w),(-1===S||isNaN(S))&&(S=Math.floor(Math.log(w)/Math.log(a)))<0&&(S=0),8<S&&(S=8),"exponent"===h?S:(0===w?(y[0]=0,y[1]=m?"":r[_][i?"bits":"bytes"][S]):(E=w/(2===t?Math.pow(2,10*S):Math.pow(1e3,S)),i&&a<=(E*=8)&&S<8&&(E/=a,S++),y[0]=Number(E.toFixed(0<S?p:0)),y[0]===a&&S<8&&void 0===v.exponent&&(y[0]=1,S++),y[1]=10===t&&1===S?i?"kb":"kB":r[_][i?"bits":"bytes"][S],m&&(y[1]="jedec"===_?y[1].charAt(0):0<S?y[1].replace(/B$/,""):y[1],n.test(y[1])&&(y[0]=Math.floor(y[0]),y[1]=""))),d&&(y[0]=-y[0]),y[1]=b[y[1]]||y[1],!0===l?y[0]=y[0].toLocaleString():0<l.length?y[0]=y[0].toLocaleString(l,u):0<g.length&&(y[0]=y[0].toString().replace(".",g)),"array"===h?y:(s&&(y[1]=c[S]?c[S]:o[_][S]+(i?"bit":"byte")+(1===y[0]?"":"s")),"object"===h?{value:y[0],symbol:y[1],exponent:S}:y.join(f)))}i.partial=function(e){return function(t){return i(t,e)}},e.exports=i}("undefined"!=typeof window&&window)}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(81);let h=Object(d.a)("views.elements.TruncatedList")((i=o=class extends l.a.Component{getChildren(e,t){return this.props.getChildren&&this.props.getChildCount?this.props.getChildren(e,t):l.a.Children.toArray(this.props.children).filter(e=>null!=e).slice(e,t)}getChildCount(){return this.props.getChildren&&this.props.getChildCount?this.props.getChildCount():l.a.Children.toArray(this.props.children).filter(e=>null!=e).length}render(){let e=null;const t=this.getChildCount();let n=t;if(this.props.truncateAt>=0){const r=t-this.props.truncateAt;r>1&&(e=this.props.createOverflowElement(r,t),n=this.props.truncateAt)}const r=this.getChildren(0,n);return l.a.createElement("div",{className:this.props.className},r,e)}},s()(o,"defaultProps",{truncateAt:2,createOverflowElement:(e,t)=>l.a.createElement("div",null,Object(u.a)("And %(count)s more...",{count:e}))}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return E}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(85),d=n(80),h=n(86),p=n.n(h),m=n(200),g=n(81),f=n(120),_=n(425);let b;!function(e){e.Admin="admin",e.Moderator="moderator"}(b||(b={}));const v={[b.Admin]:Object(d.b)("Admin"),[b.Moderator]:Object(d.b)("Mod")},y={offline:"mx_EntityTile_offline",online:"mx_EntityTile_online",unavailable:"mx_EntityTile_unavailable"};let E=Object(g.a)("views.rooms.EntityTile")((i=o=class extends l.a.PureComponent{constructor(e){super(e),this.state={hover:!1}}render(){const e={mx_EntityTile:!0,mx_EntityTile_noHover:this.props.suppressOnHover};this.props.className&&(e[this.props.className]=!0);var t,r;let o;e[(t=this.props.presenceState,r=this.props.presenceLastActiveAgo,!1===this.props.showPresence?"mx_EntityTile_online_beenactive":"offline"===t?r?y.offline+"_beenactive":y.offline+"_neveractive":t?y[t]:y.offline+"_neveractive")]=!0;const{name:i}=this.props;if(this.props.suppressOnHover)o=this.props.subtextLabel?l.a.createElement("div",{className:"mx_EntityTile_details"},l.a.createElement("div",{className:"mx_EntityTile_name",dir:"auto"},i),l.a.createElement("span",{className:"mx_EntityTile_subtext"},this.props.subtextLabel)):l.a.createElement("div",{className:"mx_EntityTile_name",dir:"auto"},i);else{const e=this.props.presenceLastActiveAgo?Date.now()-(this.props.presenceLastTs-this.props.presenceLastActiveAgo):-1;let t=null;this.props.showPresence&&(t=l.a.createElement(_.a,{activeAgo:e,currentlyActive:this.props.presenceCurrentlyActive,presenceState:this.props.presenceState})),this.props.subtextLabel&&(t=l.a.createElement("span",{className:"mx_EntityTile_subtext"},this.props.subtextLabel)),o=l.a.createElement("div",{className:"mx_EntityTile_details"},l.a.createElement("div",{className:"mx_EntityTile_name",dir:"auto"},i),t)}let a,s;this.props.showInviteButton&&(a=l.a.createElement("div",{className:"mx_EntityTile_invite"},l.a.createElement("img",{src:n(1088),width:"16",height:"16"})));const c=this.props.powerStatus;if(c){const e=v[c];s=l.a.createElement("div",{className:"mx_EntityTile_power"},e)}let d;const{e2eStatus:h}=this.props;h&&(d=l.a.createElement(m.b,{status:h,isUser:!0,bordered:!0}));const g=this.props.avatarJsx||l.a.createElement(f.a,{name:this.props.name,width:36,height:36,"aria-hidden":"true"});return l.a.createElement("div",null,l.a.createElement(u.a,{className:p()(e),title:this.props.title,onClick:this.props.onClick},l.a.createElement("div",{className:"mx_EntityTile_avatar"},g,d),o,s,a))}},s()(o,"defaultProps",{onClick:()=>{},presenceState:"offline",presenceLastActiveAgo:0,presenceLastTs:0,showInviteButton:!1,suppressOnHover:!1,showPresence:!0}),r=i))||r},function(e,t){e.exports="img/ellipsis.c2118e5.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(81);let p=Object(h.a)("views.context_menus.GenericTextContextMenu")((i=o=class extends l.a.Component{render(){return l.a.createElement("div",null,this.props.message)}},s()(o,"propTypes",{message:d.a.string.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79),o=n.n(r);class i{constructor(e,t){this.fn=e,this.onMarkCallback=t,o()(this,"marked",!1)}reset(){this.marked=!1}mark(){var e;this.marked||null===(e=this.onMarkCallback)||void 0===e||e.call(this),this.marked=!0}trigger(){this.marked&&(this.reset(),this.fn())}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(78),o=n.n(r),i=n(80);function a(e,t,n,r){let a=n[e];void 0===a&&(a=n[""]);const s=e=>t?o.a.createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener"},e):e;return a.includes("<a>")?Object(i.a)(a,{},Object.assign({a:s},r)):Object(i.a)(a,{},r)}function s(e){if("M_RESOURCE_LIMIT_EXCEEDED"===e.errcode){const t=a(e.data.limit_type,e.data.admin_contact,{monthly_active_user:Object(i.b)("This homeserver has hit its Monthly Active User limit."),hs_blocked:Object(i.b)("This homeserver has been blocked by its administrator."),"":Object(i.b)("This homeserver has exceeded one of its resource limits.")}),n=a(e.data.limit_type,e.data.admin_contact,{"":Object(i.b)("Please <a>contact your service administrator</a> to continue using the service.")});return o.a.createElement("div",null,o.a.createElement("div",null,t),o.a.createElement("div",null,n))}return o.a.createElement("div",null,Object(i.a)("Unable to connect to Homeserver. Retrying..."))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(78),i=(r=n(1314))&&"object"==typeof r&&"default"in r?r.default:r,a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function s(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},l={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return s(t,e),t.prototype.render=function(){return o.createElement("div",{className:this.props.className||"",style:c(c({position:"absolute",userSelect:"none"},l[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(o.PureComponent),d={width:"auto",height:"auto"},h=i((function(e,t,n){return Math.max(Math.min(e,n),t)})),p=i((function(e,t){return Math.round(e/t)*t})),m=i((function(e,t){return new RegExp(e,"i").test(t)})),g=function(e){return Boolean(e.touches&&e.touches.length)},f=i((function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e})),_=i((function(e,t){return e.substr(e.length-t.length,t.length)===t})),b=i((function(e){return"auto"===(e=e.toString())||_(e,"px")||_(e,"%")||_(e,"vh")||_(e,"vw")||_(e,"vmax")||_(e,"vmin")?e:e+"px"})),v=function(e,t,n,r){if(e&&"string"==typeof e){if(_(e,"px"))return Number(e.replace("px",""));if(_(e,"%"))return t*(Number(e.replace("%",""))/100);if(_(e,"vw"))return n*(Number(e.replace("vw",""))/100);if(_(e,"vh"))return r*(Number(e.replace("vh",""))/100)}return e},y=i((function(e,t,n,r,o,i,a){return r=v(r,e.width,t,n),o=v(o,e.height,t,n),i=v(i,e.width,t,n),a=v(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}})),E=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],S=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0",t.classList?t.classList.add("__resizable_base__"):t.className+="__resizable_base__",e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return s(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||d},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&_(e.propsSize[t].toString(),"%")){if(_(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return b(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?b(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?b(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&m("left",i),s=o&&m("top",i);if("parent"===this.props.bounds){var c=this.parentNode;c&&(n=a?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,a=o.original,s=this.props,c=s.lockAspectRatio,l=s.lockAspectRatioExtraHeight,u=s.lockAspectRatioExtraWidth,d=a.width,h=a.height,p=l||0,g=u||0;return m("right",i)&&(d=a.width+(e-a.x)*r/n,c&&(h=(d-g)/this.ratio+p)),m("left",i)&&(d=a.width-(e-a.x)*r/n,c&&(h=(d-g)/this.ratio+p)),m("bottom",i)&&(h=a.height+(t-a.y)*r/n,c&&(d=(h-p)*this.ratio+g)),m("top",i)&&(h=a.height-(t-a.y)*r/n,c&&(d=(h-p)*this.ratio+g)),{newWidth:d,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,c=void 0===r.width?10:r.width,l=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=a||0,m=s||0;if(i){var g=(u-p)*this.ratio+m,f=(d-p)*this.ratio+m,_=(c-m)/this.ratio+p,b=(l-m)/this.ratio+p,v=Math.max(c,g),y=Math.min(l,f),E=Math.max(u,_),S=Math.min(d,b);e=h(e,v,y),t=h(t,E,S)}else e=h(e,c,l),t=h(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,a=r.right,s=r.bottom;this.resizableLeft=o,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)){if(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY,3===e.nativeEvent.which)return}else e.nativeEvent&&g(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY);if(this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:c(c({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&g(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var t=this.props,n=t.maxWidth,r=t.maxHeight,o=t.minWidth,i=t.minHeight,a=g(e)?e.touches[0].clientX:e.clientX,s=g(e)?e.touches[0].clientY:e.clientY,c=this.state,l=c.direction,u=c.original,d=c.width,h=c.height,m=this.getParentSize(),b=y(m,this.window.innerWidth,this.window.innerHeight,n,r,o,i);n=b.maxWidth,r=b.maxHeight,o=b.minWidth,i=b.minHeight;var v=this.calculateNewSizeFromDirection(a,s),E=v.newHeight,S=v.newWidth,w=this.calculateNewMaxFromBoundary(n,r),C=this.calculateNewSizeFromAspectRatio(S,E,{width:w.maxWidth,height:w.maxHeight},{width:o,height:i});if(S=C.newWidth,E=C.newHeight,this.props.grid){var T=p(S,this.props.grid[0]),x=p(E,this.props.grid[1]),k=this.props.snapGap||0;S=0===k||Math.abs(T-S)<=k?T:S,E=0===k||Math.abs(x-E)<=k?x:E}this.props.snap&&this.props.snap.x&&(S=f(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(E=f(E,this.props.snap.y,this.props.snapGap));var F={width:S-u.width,height:E-u.height};if(d&&"string"==typeof d)if(_(d,"%"))S=S/m.width*100+"%";else if(_(d,"vw")){S=S/this.window.innerWidth*100+"vw"}else if(_(d,"vh")){S=S/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(_(h,"%"))E=E/m.height*100+"%";else if(_(h,"vw")){E=E/this.window.innerWidth*100+"vw"}else if(_(h,"vh")){E=E/this.window.innerHeight*100+"vh"}var O={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(E,"height")};"row"===this.flexDir?O.flexBasis=O.width:"column"===this.flexDir&&(O.flexBasis=O.height),this.setState(O),this.props.onResize&&this.props.onResize(e,l,this.resizable,F)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:c(c({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,i=t.handleClasses,a=t.handleWrapperStyle,s=t.handleWrapperClass,c=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?o.createElement(u,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t]},c&&c[t]?c[t]:null):null}));return o.createElement("div",{className:s,style:a},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==E.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=c(c(c({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return o.createElement(r,c({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&o.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(o.PureComponent);t.Resizable=S},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(79),o=n.n(r),i=n(134),a=n(210);let s;!function(e){e.Gitlab="gitlab",e.Github="github",e.Apple="apple",e.Google="google",e.Facebook="facebook",e.Twitter="twitter"}(s||(s={}));class c{constructor(e,t,n,r){o()(this,"hsUrl",void 0),o()(this,"isUrl",void 0),o()(this,"fallbackHsUrl",void 0),o()(this,"flows",void 0),o()(this,"defaultDeviceDisplayName",void 0),o()(this,"tempClient",void 0),this.hsUrl=e,this.isUrl=t,this.fallbackHsUrl=n,this.flows=[],this.defaultDeviceDisplayName=r.defaultDeviceDisplayName,this.tempClient=null}getHomeserverUrl(){return this.hsUrl}getIdentityServerUrl(){return this.isUrl}setHomeserverUrl(e){this.tempClient=null,this.hsUrl=e}setIdentityServerUrl(e){this.tempClient=null,this.isUrl=e}createTemporaryClient(){return this.tempClient?this.tempClient:this.tempClient=Object(i.createClient)({baseUrl:this.hsUrl,idBaseUrl:this.isUrl})}async getFlows(){const e=this.createTemporaryClient(),{flows:t}=await e.loginFlows();return this.flows=t,this.flows}loginViaPassword(e,t,n,r){const o=e.indexOf("@")>0;let i;i=t&&n?{type:"m.id.phone",country:t,phone:n,number:n}:o?{type:"m.id.thirdparty",medium:"email",address:e}:{type:"m.id.user",user:e};const a={password:r,identifier:i,initial_device_display_name:this.defaultDeviceDisplayName},s=e=>l(this.fallbackHsUrl,this.isUrl,"m.login.password",a).catch(t=>{throw console.log("fallback HS login failed",t),e});let c=null;return l(this.hsUrl,this.isUrl,"m.login.password",a).catch(e=>{if(c=e,403===e.httpStatus&&this.fallbackHsUrl)return s(c);throw c}).catch(e=>{throw console.log("Login failed",e),e})}}async function l(e,t,n,r){var o;const s=Object(i.createClient)({baseUrl:e,idBaseUrl:t}),c=await s.login(n,r),l=c.well_known;l&&(l["m.homeserver"]&&l["m.homeserver"].base_url&&(e=l["m.homeserver"].base_url,console.log(`Overrode homeserver setting with ${e} from login response`)),l["m.identity_server"]&&l["m.identity_server"].base_url&&(t=l["m.identity_server"].base_url,console.log(`Overrode IS setting with ${t} from login response`)));const u={homeserverUrl:e,identityServerUrl:t,userId:c.user_id,deviceId:c.device_id,accessToken:c.access_token};return null===(o=a.a.examineLoginResponse)||void 0===o||o.call(a.a,c,u),u}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return h}));var r=n(79),o=n.n(r),i=n(84),a=n(98),s=n(134),c=n(3),l=n.n(c);let u,d;!function(e){e.AudioOutput="audiooutput",e.AudioInput="audioinput",e.VideoInput="videoinput"}(u||(u={})),function(e){e.AudioOutputChanged="audio_output_changed"}(d||(d={}));class h extends l.a{static get instance(){return h.internalInstance||(h.internalInstance=new h),h.internalInstance}static async hasAnyLabeledDevices(){return(await navigator.mediaDevices.enumerateDevices()).some(e=>Boolean(e.label))}static async getDevices(){try{const e=await navigator.mediaDevices.enumerateDevices(),t={[u.AudioOutput]:[],[u.AudioInput]:[],[u.VideoInput]:[]};return e.forEach(e=>t[e.kind].push(e)),t}catch(e){console.warn("Unable to refresh WebRTC Devices: ",e)}}static loadDevices(){const e=i.b.getValue("webrtc_audioinput"),t=i.b.getValue("webrtc_videoinput");Object(s.setMatrixCallAudioInput)(e),Object(s.setMatrixCallVideoInput)(t)}setAudioOutput(e){i.b.setValue("webrtc_audiooutput",null,a.a.DEVICE,e),this.emit(d.AudioOutputChanged,e)}setAudioInput(e){i.b.setValue("webrtc_audioinput",null,a.a.DEVICE,e),Object(s.setMatrixCallAudioInput)(e)}setVideoInput(e){i.b.setValue("webrtc_videoinput",null,a.a.DEVICE,e),Object(s.setMatrixCallVideoInput)(e)}setDevice(e,t){switch(t){case u.AudioOutput:this.setAudioOutput(e);break;case u.AudioInput:this.setAudioInput(e);break;case u.VideoInput:this.setVideoInput(e)}}static getAudioOutput(){return i.b.getValueAt(a.a.DEVICE,"webrtc_audiooutput")}static getAudioInput(){return i.b.getValueAt(a.a.DEVICE,"webrtc_audioinput")}static getVideoInput(){return i.b.getValueAt(a.a.DEVICE,"webrtc_videoinput")}}o()(h,"internalInstance",void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return N}));var r,o=n(92),i=n.n(o),a=n(79),s=n.n(a),c=n(169),l=n.n(c),u=n(78),d=n.n(u),h=n(88),p=n.n(h),m=n(82),g=n(85),f=n(80),_=n(719),b=n(720),v=n(97),y=n(83),E=n(269),S=n(86),w=n.n(S),C=n(84),T=n(103),x=n(345),k=n(155),F=n(878),O=n(1),R=n(0),D=n(369),I=n(470),A=n(81);let N=Object(A.a)("views.elements.AppTile")(r=class extends d.a.Component{constructor(e){super(e),s()(this,"hasPermissionToLoad",e=>{if(this._usingLocalWidget())return!0;if(!e.room)return!0;const t=C.b.getValue("allowedWidgets",e.room.roomId);return void 0===t[e.app.eventId]?e.userId===e.creatorUserId:!!t[e.app.eventId]}),s()(this,"onAllowedWidgetsChange",()=>{const e=this.hasPermissionToLoad(this.props);this.state.hasPermissionToLoad&&!e&&(E.a.destroyPersistentWidget(this.props.app.id),x.a.destroyElement(this._persistKey),this._sgWidget&&this._sgWidget.stop()),this.setState({hasPermissionToLoad:e})}),s()(this,"_iframeRefChange",e=>{this.iframe=e,e?this._sgWidget&&this._sgWidget.start(e):this._resetWidget(this.props)}),s()(this,"_onWidgetPrepared",()=>{this.setState({loading:!1})}),s()(this,"_onWidgetReady",()=>{k.a.JITSI.matches(this.props.app.type)&&this._sgWidget.widgetApi.transport.send(O.a.ClientReady,{})}),s()(this,"_onAction",e=>{if(e.widgetId===this.props.app.id)switch(e.action){case"m.sticker":this._sgWidget.widgetApi.hasCapability(R.MatrixCapabilities.StickerSending)?(y.a.dispatch({action:"post_sticker_message",data:e.data}),y.a.dispatch({action:"stickerpicker_close"})):console.warn("Ignoring sticker message. Invalid capability")}}),s()(this,"_grantWidgetPermission",()=>{const e=this.props.room.roomId;console.info("Granting permission for widget to load: "+this.props.app.eventId);const t=C.b.getValue("allowedWidgets",e);t[this.props.app.eventId]=!0;const n=C.b.firstSupportedLevel("allowedWidgets");C.b.setValue("allowedWidgets",e,n,t).then(()=>{this.setState({hasPermissionToLoad:!0}),this._startWidget()}).catch(e=>{console.error(e)})}),s()(this,"_onPopoutWidgetClick",()=>{k.a.JITSI.matches(this.props.app.type)&&this._endWidgetActions().then(()=>{this.iframe&&(this.iframe.src=this._sgWidget.embedUrl,this.setState({}))}),Object.assign(document.createElement("a"),{target:"_blank",href:this._sgWidget.popoutUrl,rel:"noreferrer noopener"}).click()}),s()(this,"_onContextMenuClick",()=>{this.setState({menuDisplayed:!0})}),s()(this,"_closeContextMenu",()=>{this.setState({menuDisplayed:!1})}),this._persistKey=Object(x.b)(this.props.app.id);try{this._sgWidget=new F.b(this.props),this._sgWidget.on("preparing",this._onWidgetPrepared),this._sgWidget.on("ready",this._onWidgetReady)}catch(e){console.log("Failed to construct widget",e),this._sgWidget=null}this.iframe=null,this.state=this._getNewState(e),this._contextMenuButton=Object(u.createRef)(),this._allowedWidgetsWatchRef=C.b.watchSetting("allowedWidgets",null,this.onAllowedWidgetsChange)}_getNewState(e){return{initialising:!0,loading:this.props.waitForIframeLoad&&!x.a.isMounted(this._persistKey),hasPermissionToLoad:this.hasPermissionToLoad(e),error:null,widgetPageTitle:e.widgetPageTitle,menuDisplayed:!1}}isMixedContent(){const e=window.location.protocol,t=l.a.parse(this.props.app.url).protocol;return"https:"===e&&"https:"!==t&&(console.warn("Refusing to load mixed-content app:",e,t,window.location,this.props.app.url),!0)}componentDidMount(){this._sgWidget&&this.state.hasPermissionToLoad&&this._startWidget(),this.dispatcherRef=y.a.register(this._onAction)}componentWillUnmount(){this.dispatcherRef&&y.a.unregister(this.dispatcherRef),E.a.getWidgetPersistence(this.props.app.id)||(E.a.destroyPersistentWidget(this.props.app.id),x.a.destroyElement(this._persistKey)),this._sgWidget&&this._sgWidget.stop(),C.b.unwatchSetting(this._allowedWidgetsWatchRef)}_resetWidget(e){this._sgWidget&&this._sgWidget.stop();try{this._sgWidget=new F.b(e),this._sgWidget.on("preparing",this._onWidgetPrepared),this._sgWidget.on("ready",this._onWidgetReady),this._startWidget()}catch(e){console.log("Failed to construct widget",e),this._sgWidget=null}}_startWidget(){this._sgWidget.prepare().then(()=>{this.setState({initialising:!1})})}UNSAFE_componentWillReceiveProps(e){e.app.url!==this.props.app.url&&(this._getNewState(e),this.state.hasPermissionToLoad&&this._resetWidget(e)),e.widgetPageTitle!==this.props.widgetPageTitle&&this.setState({widgetPageTitle:e.widgetPageTitle})}async _endWidgetActions(){this.iframe&&(this.iframe.src="about:blank"),k.a.JITSI.matches(this.props.app.type)&&y.a.dispatch({action:"hangup_conference"}),x.a.destroyElement(this._persistKey),this._sgWidget&&this._sgWidget.stop({forceDestroy:!0})}formatAppTileName(){let e="No name";return this.props.app.name&&this.props.app.name.trim()&&(e=this.props.app.name.trim()),e}_usingLocalWidget(){return k.a.JITSI.matches(this.props.app.type)}_getTileTitle(){const e=this.formatAppTileName(),t=d.a.createElement("span",null," - ");let n="";return this.state.widgetPageTitle&&this.state.widgetPageTitle!==this.formatAppTileName()&&(n=this.state.widgetPageTitle),d.a.createElement("span",null,d.a.createElement(I.a,{app:this.props.app}),d.a.createElement("b",null,e),d.a.createElement("span",null,n?t:"",n))}render(){let e;const t="mx_AppTileBody"+(this.props.miniMode?"_mini ":" "),n={};this.props.pointerEvents&&(n["pointer-events"]=this.props.pointerEvents);const r=d.a.createElement("div",{className:"mx_AppLoading_spinner_fadeIn"},d.a.createElement(v.a,{message:Object(f.a)("Loading...")}));if(null===this._sgWidget)e=d.a.createElement("div",{className:t,style:n},d.a.createElement(b.a,{errorMsg:Object(f.a)("Error loading Widget")}));else if(this.state.hasPermissionToLoad)this.state.initialising?e=d.a.createElement("div",{className:t+(this.state.loading?"mx_AppLoading":""),style:n},r):this.isMixedContent()?e=d.a.createElement("div",{className:t,style:n},d.a.createElement(b.a,{errorMsg:Object(f.a)("Error - Mixed content")})):(e=d.a.createElement("div",{className:t+(this.state.loading?"mx_AppLoading":""),style:n},this.state.loading&&r,d.a.createElement("iframe",{allow:"microphone; camera; encrypted-media; autoplay; display-capture; clipboard-write;",ref:this._iframeRefChange,src:this._sgWidget.embedUrl,allowFullScreen:!0,sandbox:"allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-presentation"})),this.props.userWidget||(e=d.a.createElement("div",{className:"mx_AppTile_persistedWrapper"},d.a.createElement(x.a,{persistKey:this._persistKey},e))));else{const r=m.a.get().isRoomEncrypted(this.props.room.roomId);e=d.a.createElement("div",{className:t,style:n},d.a.createElement(_.a,{roomId:this.props.room.roomId,creatorUserId:this.props.creatorUserId,url:this._sgWidget.embedUrl,isRoomEncrypted:r,onPermissionGranted:this._grantWidgetPermission}))}let o,a;return o=this.props.miniMode?{mx_AppTile_mini:!0}:this.props.fullWidth?{mx_AppTileFullWidth:!0}:{mx_AppTile:!0},o=w()(o),this.state.menuDisplayed&&(a=d.a.createElement(D.a,i()({},Object(T.k)(this._contextMenuButton.current.getBoundingClientRect(),null),{app:this.props.app,onFinished:this._closeContextMenu,showUnpin:!this.props.userWidget,userWidget:this.props.userWidget,onEditClick:this.props.onEditClick,onDeleteClick:this.props.onDeleteClick}))),d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{className:o,id:this.props.app.id},this.props.showMenubar&&d.a.createElement("div",{className:"mx_AppTileMenuBar"},d.a.createElement("span",{className:"mx_AppTileMenuBarTitle",style:{pointerEvents:!!this.props.handleMinimisePointerEvents&&"all"}},this.props.showTitle&&this._getTileTitle()),d.a.createElement("span",{className:"mx_AppTileMenuBarWidgets"},this.props.showPopout&&d.a.createElement(g.a,{className:"mx_AppTileMenuBar_iconButton mx_AppTileMenuBar_iconButton_popout",title:Object(f.a)("Popout widget"),onClick:this._onPopoutWidgetClick}),d.a.createElement(T.c,{className:"mx_AppTileMenuBar_iconButton mx_AppTileMenuBar_iconButton_menu",label:Object(f.a)("Options"),isExpanded:this.state.menuDisplayed,inputRef:this._contextMenuButton,onClick:this._onContextMenuClick}))),e),a)}})||r;N.displayName="AppTile",N.propTypes={app:p.a.object.isRequired,room:p.a.object,fullWidth:p.a.bool,miniMode:p.a.bool,userId:p.a.string.isRequired,creatorUserId:p.a.string,waitForIframeLoad:p.a.bool,showMenubar:p.a.bool,onEditClick:p.a.func,onDeleteClick:p.a.func,onMinimiseClick:p.a.func,showTitle:p.a.bool,handleMinimisePointerEvents:p.a.bool,showPopout:p.a.bool,userWidget:p.a.bool,pointerEvents:p.a.string},N.defaultProps={waitForIframeLoad:!0,showMenubar:!0,showTitle:!0,showPopout:!0,handleMinimisePointerEvents:!1,userWidget:!1,miniMode:!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"containsEmoji",(function(){return r}));const r=(e,t)=>t.some(t=>e.body&&e.body.includes(t))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(82),u=n(111),d=n(87),h=n(90),p=n(81),m=n(223),g=n(85);let f=Object(p.a)("views.elements.ErrorBoundary")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"onClearCacheAndReload",()=>{u.a.get()&&(l.a.get().stopClient(),l.a.get().store.deleteAllData().then(()=>{u.a.get().reload()}))}),i()(this,"onBugReport",()=>{d.a.createTrackedDialog("Bug Report Dialog","",m.a,{label:"react-soft-crash"})}),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,{componentStack:t}){console.error(e),console.error("The above error occured while React was rendering the following components:",t)}render(){if(this.state.error){const e="https://github.com/vector-im/element-web/issues/new";let t;return h.a.get().bug_report_endpoint_url&&(t=s.a.createElement(s.a.Fragment,null,s.a.createElement("p",null,Object(c.a)("Please <newIssueLink>create a new issue</newIssueLink> on GitHub so that we can investigate this bug.",{},{newIssueLink:t=>s.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:e},t)})),s.a.createElement("p",null,Object(c.a)("If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.")),s.a.createElement(g.a,{onClick:this.onBugReport,kind:"primary"},Object(c.a)("Submit debug logs")))),s.a.createElement("div",{className:"mx_ErrorBoundary"},s.a.createElement("div",{className:"mx_ErrorBoundary_body"},s.a.createElement("h1",null,Object(c.a)("Something went wrong!")),t,s.a.createElement(g.a,{onClick:this.onClearCacheAndReload,kind:"danger"},Object(c.a)("Clear cache and reload"))))}return this.props.children}})||r},,function(e,t,n){"use strict";n.d(t,"c",(function(){return T})),n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return F}));var r=n(79),o=n.n(r),i=n(1376),a=n.p+"opus-encoderWorker.min.b4c5d1b.js",s=n(285),c=n(0),l=n(3),u=n.n(l),d=n(315);const h=new d.a;class p{constructor(){}static for(e,t){if(!e||!t)throw new Error("An instance and key must be supplied");return new m(e,t)}static forgetAllFor(e){h.delete(e)}static forgetAll(){for(const e of h.keys())h.remove(e)}}o()(p,"Void",Symbol("void"));class m{constructor(e,t){this.instance=e,this.key=t}forget(){const e=h.get(this.instance);e&&(e.remove(this.key),e.size||h.remove(this.instance))}do(e){const t=h.getOrCreate(this.instance,new d.a);let n=t.get(this.key);return void 0===n&&(n=e(),t.set(this.key,n)),n}}let g;!function(e){e.Timekeep="timekeep",e.AmplitudeMark="amplitude_mark"}(g||(g={}));var f=n(115),_=n(204),b=n(875),v=n(187),y=n(109);class E{constructor(e,t){this.width=e,o()(this,"samples",[]),this.samples=Object(y.h)(t,this.width)}get value(){return this.samples}pushValue(e){let t=Object(y.b)(this.samples);t.splice(0,0,e),t.length>this.width&&(t=t.slice(0,this.width)),this.samples=t}}var S=n(211),w=n(1377),C=n.n(w);const T=48e3,x=44;let k;!function(e){e.Started="started",e.EndingSoon="ending_soon",e.Ended="ended",e.Uploading="uploading",e.Uploaded="uploaded"}(k||(k={}));class F extends u.a{constructor(e){super(),this.client=e,o()(this,"recorder",void 0),o()(this,"recorderContext",void 0),o()(this,"recorderSource",void 0),o()(this,"recorderStream",void 0),o()(this,"recorderWorklet",void 0),o()(this,"recorderProcessor",void 0),o()(this,"buffer",new Uint8Array(0)),o()(this,"lastUpload",void 0),o()(this,"recording",!1),o()(this,"observable",void 0),o()(this,"amplitudes",[]),o()(this,"playback",void 0),o()(this,"liveWaveform",new E(x,0)),o()(this,"onAudioProcess",e=>{this.processAudioUpdate(e.playbackTime)}),o()(this,"processAudioUpdate",e=>{if(!this.recording)return;this.observable.update({waveform:this.liveWaveform.value.map(e=>Object(S.a)(e,0,1)),timeSeconds:e});const t=120-this.recorder.encodedSamplePosition/48e3;t<0?this.stop():t<=10&&p.for(this,"ending_soon").do(()=>(this.emit(k.EndingSoon,{secondsLeft:t}),p.Void))})}get contentType(){return"audio/ogg"}get contentLength(){return this.buffer.length}get durationSeconds(){if(!this.recorder)throw new Error("Duration not available without a recording");return this.recorderContext.currentTime}get isRecording(){return this.recording}emit(e,...t){return super.emit(e,...t),super.emit(f.b,e,...t),!0}async makeRecorder(){try{this.recorderStream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,noiseSuppression:!0,deviceId:s.c.getAudioInput()}}),this.recorderContext=Object(b.a)({}),this.recorderSource=this.recorderContext.createMediaStreamSource(this.recorderStream),this.recorderContext.audioWorklet?(await this.recorderContext.audioWorklet.addModule(C.a),this.recorderWorklet=new AudioWorkletNode(this.recorderContext,"mx-voice-worklet"),this.recorderSource.connect(this.recorderWorklet),this.recorderWorklet.connect(this.recorderContext.destination),this.recorderWorklet.port.onmessage=e=>{switch(e.data.ev){case g.Timekeep:this.processAudioUpdate(e.data.timeSeconds);break;case g.AmplitudeMark:e.data.forIndex===this.amplitudes.length&&(this.amplitudes.push(e.data.amplitude),this.liveWaveform.pushValue(e.data.amplitude))}}):(this.recorderProcessor=this.recorderContext.createScriptProcessor(1024,1,1),this.recorderSource.connect(this.recorderProcessor),this.recorderProcessor.connect(this.recorderContext.destination),this.recorderProcessor.addEventListener("audioprocess",this.onAudioProcess)),this.recorder=new i({encoderPath:a,encoderSampleRate:T,encoderApplication:2048,streamPages:!0,encoderFrameSize:20,numberOfChannels:1,sourceNode:this.recorderSource,encoderBitRate:24e3,encoderComplexity:3,resampleQuality:3}),this.recorder.ondataavailable=e=>{const t=new Uint8Array(e),n=new Uint8Array(this.buffer.length+t.length);n.set(this.buffer,0),n.set(t,this.buffer.length),this.buffer=n}}catch(e){throw console.error("Error starting recording: ",e),e instanceof DOMException&&console.error(`${e.name} (${e.code}): ${e.message}`),this.recorderStream&&this.recorderStream.getTracks().forEach(e=>e.stop()),this.recorderSource&&this.recorderSource.disconnect(),this.recorder&&this.recorder.close(),this.recorderContext&&this.recorderContext.close(),e}}get audioBuffer(){return this.buffer.slice(0)}get liveData(){if(!this.recording)throw new Error("No observable when not recording");return this.observable}get isSupported(){return!!i.isRecordingSupported()}get hasRecording(){return this.buffer.length>0}async start(){if(this.lastUpload||this.hasRecording)throw new Error("Recording already prepared");if(this.recording)throw new Error("Recording already in progress");this.observable&&this.observable.close(),this.observable=new c.SimpleObservable,await this.makeRecorder(),await this.recorder.start(),this.recording=!0,this.emit(k.Started)}async stop(){return p.for(this,"stop").do(async()=>{if(!this.recording)throw new Error("No recording to stop");return await this.recorder.stop(),this.recorderSource.disconnect(),this.recorderWorklet&&this.recorderWorklet.disconnect(),this.recorderProcessor&&(this.recorderProcessor.disconnect(),this.recorderProcessor.removeEventListener("audioprocess",this.onAudioProcess)),await this.recorderContext.close(),this.recorderStream.getTracks().forEach(e=>e.stop()),this.recording=!1,await this.recorder.close(),this.emit(k.Ended),this.audioBuffer})}getPlayback(){return this.playback=p.for(this,"playback").do(()=>new _.c(this.audioBuffer.buffer,this.amplitudes)),this.playback}destroy(){var e;this.stop(),this.removeAllListeners(),p.forgetAllFor(this),null===(e=this.playback)||void 0===e||e.destroy(),this.observable.close()}async upload(e){if(!this.hasRecording)throw new Error("No recording available to upload");if(this.lastUpload)return this.lastUpload;try{this.emit(k.Uploading);const{url:t,file:n}=await Object(v.c)(this.client,e,new Blob([this.audioBuffer],{type:this.contentType}));this.lastUpload={mxc:t,encrypted:n},this.emit(k.Uploaded)}catch(e){throw this.emit(k.Ended),e}return this.lastUpload}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r);class i{constructor(e){this.filterJson=e}check(e){return this.checkFields(e.getRoomId(),e.getSender(),e.getType(),!!e.getContent()&&void 0!==e.getContent().url)}toJSON(){return{types:this.filterJson.types||null,not_types:this.filterJson.not_types||[],rooms:this.filterJson.rooms||null,not_rooms:this.filterJson.not_rooms||[],senders:this.filterJson.senders||null,not_senders:this.filterJson.not_senders||[],contains_url:this.filterJson.contains_url||null}}checkFields(e,t,n,r){const o={rooms:function(t){return e===t},senders:function(e){return t===e},types:function(e){return function(e,t){if(t.endsWith("*")){const n=t.slice(0,-1);return e.substr(0,n.length)===n}return e===t}(n,e)}};for(let e=0;e<Object.keys(o).length;e++){const t=Object.keys(o)[e],n=o[t],r="not_"+t,i=this.filterJson[r];if(null!=i&&i.some(n))return!1;const a=this.filterJson[t];if(a&&!a.some(n))return!1}const i=this.filterJson.contains_url;return void 0===i||i===r}filter(e){return e.filter(this.check,this)}limit(){return void 0!==this.filterJson.limit?this.filterJson.limit:10}}function a(e,t,n){const r=t.split(".");let o=e;for(let e=0;e<r.length-1;e++)o[r[e]]||(o[r[e]]={}),o=o[r[e]];o[r[r.length-1]]=n}class s{static fromJson(e,t,n){const r=new s(e,t);return r.setDefinition(n),r}constructor(e,t){this.userId=e,this.filterId=t,o()(this,"definition",{}),o()(this,"roomFilter",void 0),o()(this,"roomTimelineFilter",void 0)}getFilterId(){return this.filterId}getDefinition(){return this.definition}setDefinition(e){this.definition=e;const t=e.room,n={};t&&(t.rooms&&(n.rooms=t.rooms),t.rooms&&(n.not_rooms=t.not_rooms)),this.roomFilter=new i(n),this.roomTimelineFilter=new i((null==t?void 0:t.timeline)||{})}getRoomTimelineFilterComponent(){return this.roomTimelineFilter}filterRoomTimeline(e){return this.roomTimelineFilter.filter(this.roomFilter.filter(e))}setTimelineLimit(e){a(this.definition,"room.timeline.limit",e)}setLazyLoadMembers(e){a(this.definition,"room.state.lazy_load_members",!!e)}setIncludeLeaveRooms(e){a(this.definition,"room.include_leave",e)}}o()(s,"LAZY_LOADING_MESSAGES_FILTER",{lazy_load_members:!0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r,o=n(92),i=n.n(o),a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(106),h=n(104),p=n(383),m=n.n(p),g=n(132),f=n(261),_=n(421),b=n(103),v=n(433),y=n(84),E=n(148),S=n(83),w=n(81);function C(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}function T(e){let t,n,r;return 1===e.deltaMode?(t=18*e.deltaX,n=18*e.deltaY,r=18*e.deltaZ):(t=e.deltaX,n=e.deltaY,r=e.deltaZ),new WheelEvent("syntheticWheel",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({deltaMode:0,deltaY:n,deltaX:t,deltaZ:r},e))}let x=Object(w.a)("views.elements.ImageView")(r=class extends l.a.Component{constructor(e){super(e),s()(this,"contextMenuButton",Object(c.createRef)()),s()(this,"focusLock",Object(c.createRef)()),s()(this,"imageWrapper",Object(c.createRef)()),s()(this,"image",Object(c.createRef)()),s()(this,"initX",0),s()(this,"initY",0),s()(this,"previousX",0),s()(this,"previousY",0),s()(this,"recalculateZoom",()=>{this.setZoomAndRotation()}),s()(this,"setZoomAndRotation",e=>{const t=this.image.current,n=this.imageWrapper.current,r=null!=e?e:this.state.rotation,o=r%180==0,i=o?t.naturalWidth:t.naturalHeight,a=o?t.naturalHeight:t.naturalWidth,s=n.clientWidth/i,c=n.clientHeight/a;if(s>=1&&c>=1)return void this.setState({zoom:1,minZoom:1,maxZoom:1,rotation:r});const l=.95*Math.min(s,c),u=this.state.zoom<=this.state.minZoom?l:this.state.zoom;this.setState({minZoom:l,maxZoom:1,rotation:r,zoom:u})}),s()(this,"onWheel",e=>{if(e.target===this.image.current){e.stopPropagation(),e.preventDefault();const{deltaY:t}=T(e);this.zoomDelta(.0025*-t,e.offsetX,e.offsetY)}}),s()(this,"onZoomInClick",()=>{this.zoomDelta(.1)}),s()(this,"onZoomOutClick",()=>{this.zoomDelta(-.1)}),s()(this,"onKeyDown",e=>{e.key===h.a.ESCAPE&&(e.stopPropagation(),e.preventDefault(),this.props.onFinished())}),s()(this,"onRotateCounterClockwiseClick",()=>{const e=this.state.rotation;this.setZoomAndRotation(e-90)}),s()(this,"onRotateClockwiseClick",()=>{const e=this.state.rotation;this.setZoomAndRotation(e+90)}),s()(this,"onDownloadClick",()=>{const e=document.createElement("a");e.href=this.props.src,e.download=this.props.name,e.target="_blank",e.rel="noreferrer noopener",e.click()}),s()(this,"onOpenContextMenu",()=>{this.setState({contextMenuDisplayed:!0})}),s()(this,"onCloseContextMenu",()=>{this.setState({contextMenuDisplayed:!1})}),s()(this,"onPermalinkClicked",e=>{e.preventDefault(),S.a.dispatch({action:"view_room",event_id:this.props.mxEvent.getId(),highlighted:!0,room_id:this.props.mxEvent.getRoomId()}),this.props.onFinished()}),s()(this,"onStartMoving",e=>{e.stopPropagation(),e.preventDefault(),0===e.button&&(this.state.zoom!==this.state.minZoom?(this.setState({moving:!0}),this.previousX=this.state.translationX,this.previousY=this.state.translationY,this.initX=e.pageX-this.state.translationX,this.initY=e.pageY-this.state.translationY):this.zoom(this.state.maxZoom,e.nativeEvent.offsetX,e.nativeEvent.offsetY))}),s()(this,"onMoving",e=>{e.stopPropagation(),e.preventDefault(),this.state.moving&&this.setState({translationX:e.pageX-this.initX,translationY:e.pageY-this.initY})}),s()(this,"onEndMoving",()=>{!0===this.state.moving&&Math.abs(this.state.translationX-this.previousX)<10&&Math.abs(this.state.translationY-this.previousY)<10&&(this.zoom(this.state.minZoom),this.initX=0,this.initY=0),this.setState({moving:!1})}),this.state={zoom:0,minZoom:.95,maxZoom:.95,rotation:0,translationX:0,translationY:0,moving:!1,contextMenuDisplayed:!1}}componentDidMount(){this.focusLock.current.addEventListener("wheel",this.onWheel,{passive:!1}),window.addEventListener("resize",this.recalculateZoom),this.image.current.addEventListener("load",this.recalculateZoom)}componentWillUnmount(){this.focusLock.current.removeEventListener("wheel",this.onWheel),window.removeEventListener("resize",this.recalculateZoom),this.image.current.removeEventListener("load",this.recalculateZoom)}zoomDelta(e,t,n){this.zoom(this.state.zoom+e,t,n)}zoom(e,t,n){const r=this.state.zoom,o=Math.min(e,this.state.maxZoom);if(o<=this.state.minZoom)this.setState({zoom:this.state.minZoom,translationX:0,translationY:0});else if("number"!=typeof t&&"number"!=typeof n)this.setState({zoom:o,translationX:this.state.translationX*o/r,translationY:this.state.translationY*o/r});else{let e,i;switch((this.state.rotation%360+360)%360){case 0:e=this.image.current.clientWidth/2-t,i=this.image.current.clientHeight/2-n;break;case 90:e=n-this.image.current.clientHeight/2,i=this.image.current.clientWidth/2-t;break;case 180:e=t-this.image.current.clientWidth/2,i=n-this.image.current.clientHeight/2;break;case 270:e=this.image.current.clientHeight/2-n,i=t-this.image.current.clientWidth/2}this.setState({zoom:o,translationX:this.state.translationX+(o-r)*e,translationY:this.state.translationY+(o-r)*i})}}renderContextMenu(){let e=null;return this.state.contextMenuDisplayed&&(e=l.a.createElement(_.b,i()({},Object(b.k)(this.contextMenuButton.current.getBoundingClientRect()),{mxEvent:this.props.mxEvent,permalinkCreator:this.props.permalinkCreator,onFinished:this.onCloseContextMenu,onCloseDialog:this.props.onFinished}))),l.a.createElement(l.a.Fragment,null,e)}render(){const e=!!this.props.mxEvent,t=this.state.maxZoom===this.state.minZoom;let n;n=this.state.moving?"grabbing":t?"default":this.state.zoom===this.state.minZoom?"zoom-in":"zoom-out";const r=this.state.rotation+"deg",o=this.state.zoom,i=this.state.translationX+"px",a=this.state.translationY+"px",s={cursor:n,transition:this.state.moving?null:"transform 200ms ease 0s",transform:`translateX(${i})\n translateY(${a})\n scale(${o})\n rotate(${r})`};let c,h,p,_;if(e){const e=this.props.mxEvent,t=y.b.getValue("showTwelveHourTimestamps");let n="#";this.props.permalinkCreator&&(n=this.props.permalinkCreator.forEvent(this.props.mxEvent.getId()));const r=e.sender?e.sender.name:e.getSender(),o=l.a.createElement("div",{className:"mx_ImageView_info_sender"},r),i=l.a.createElement("a",{href:n,onClick:this.onPermalinkClicked,"aria-label":Object(E.c)(new Date(this.props.mxEvent.getTs()),t,!1)},l.a.createElement(v.a,{showFullDate:!0,showTwelveHour:t,ts:e.getTs(),showSeconds:!1})),a=l.a.createElement(g.a,{member:e.sender,width:32,height:32,viewUserOnClick:!0});c=l.a.createElement("div",{className:"mx_ImageView_info_wrapper"},a,l.a.createElement("div",{className:"mx_ImageView_info"},o,i))}else c=l.a.createElement("div",null);return this.props.mxEvent&&(h=l.a.createElement(f.a,{className:"mx_ImageView_button mx_ImageView_button_more",title:Object(u.a)("Options"),onClick:this.onOpenContextMenu,inputRef:this.contextMenuButton,isExpanded:this.state.contextMenuDisplayed})),t||(p=l.a.createElement(d.a,{className:"mx_ImageView_button mx_ImageView_button_zoomOut",title:Object(u.a)("Zoom out"),onClick:this.onZoomOutClick}),_=l.a.createElement(d.a,{className:"mx_ImageView_button mx_ImageView_button_zoomIn",title:Object(u.a)("Zoom in"),onClick:this.onZoomInClick})),l.a.createElement(m.a,{returnFocus:!0,lockProps:{onKeyDown:this.onKeyDown,role:"dialog"},className:"mx_ImageView",ref:this.focusLock},l.a.createElement("div",{className:"mx_ImageView_panel"},c,l.a.createElement("div",{className:"mx_ImageView_toolbar"},p,_,l.a.createElement(d.a,{className:"mx_ImageView_button mx_ImageView_button_rotateCCW",title:Object(u.a)("Rotate Left"),onClick:this.onRotateCounterClockwiseClick}),l.a.createElement(d.a,{className:"mx_ImageView_button mx_ImageView_button_rotateCW",title:Object(u.a)("Rotate Right"),onClick:this.onRotateClockwiseClick}),l.a.createElement(d.a,{className:"mx_ImageView_button mx_ImageView_button_download",title:Object(u.a)("Download"),onClick:this.onDownloadClick}),h,l.a.createElement(d.a,{className:"mx_ImageView_button mx_ImageView_button_close",title:Object(u.a)("Close"),onClick:this.props.onFinished}),this.renderContextMenu())),l.a.createElement("div",{className:"mx_ImageView_image_wrapper",ref:this.imageWrapper,onMouseDown:this.props.onFinished,onMouseMove:this.onMoving,onMouseUp:this.onEndMoving,onMouseLeave:this.onEndMoving},l.a.createElement("img",{src:this.props.src,style:s,alt:this.props.name,ref:this.image,className:"mx_ImageView_image",draggable:!0,onMouseDown:this.onStartMoving})))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return z})),n.d(t,"c",(function(){return Q})),n.d(t,"b",(function(){return J})),n.d(t,"e",(function(){return X})),n.d(t,"d",(function(){return Z}));var r=n(79),o=n.n(r),i=n(78),a=n(303),s=n(82),c=n(83),l=n(80),u=n(87),d=n(312),h=n(131),p=n(110),m=n(139);function g(e){const t=2*Math.PI/e.length;return Array.from(e).map((e,n)=>{if(" "===e)return e;const[r,o]=function(e,t){const n=127*t*Math.cos(e),r=127*t*Math.sin(e);return[n,r]}(n*t,1),[i,a,s]=function(e,t,n){let r=(e+16)/116;const o=.9505*f(r+t/500),i=1.089*f(r-n/200);r=f(r);const a=-.96924364*o+1.8759675*r+.04155506*i,s=.05563008*o-.20397696*r+1.05697151*i;return[_(3.24096994*o-1.53738318*r-.49861076*i),_(a),_(s)]}(75,r,o);return'<font color="#'+i.toString(16).padStart(2,"0")+a.toString(16).padStart(2,"0")+s.toString(16).padStart(2,"0")+'">'+e+"</font>"}).join("")}function f(e){return e>.2069?Math.pow(e,3):.1284*e-.01771}function _(e){const t=function(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}(e),n=Math.min(Math.max(t,0),1);return Math.round(255*n)}var b=n(265),v=n(236),y=n(266),E=n(114),S=n(155),w=n(391),C=n(588),T=n(223),x=n(125),k=n(91),F=n(171),O=n(90),R=n(84),D=n(113),I=n(202),A=n(138),N=n(186),M=n(445),P=n(803),L=n(105),j=n(327),U=n(480),B=n(166),G=n(804);function V(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}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const H=async()=>new Promise(e=>{const t=document.createElement("input");t.setAttribute("type","file"),t.onchange=t=>{const n=t.target.files[0];u.a.createTrackedDialog("Upload Files confirmation","",P.a,{file:n,onFinished:t=>{e(t?s.a.get().uploadContent(n):null)}})},t.click()}),z={messages:Object(l.b)("Messages"),actions:Object(l.b)("Actions"),admin:Object(l.b)("Admin"),advanced:Object(l.b)("Advanced"),effects:Object(l.b)("Effects"),other:Object(l.b)("Other")};class W{constructor(e){o()(this,"command",void 0),o()(this,"aliases",void 0),o()(this,"args",void 0),o()(this,"description",void 0),o()(this,"runFn",void 0),o()(this,"category",void 0),o()(this,"hideCompletionAfterSpace",void 0),o()(this,"_isEnabled",void 0),this.command=e.command,this.aliases=e.aliases||[],this.args=e.args||"",this.description=e.description,this.runFn=e.runFn,this.category=e.category||z.other,this.hideCompletionAfterSpace=e.hideCompletionAfterSpace||!1,this._isEnabled=e.isEnabled}getCommand(){return"/"+this.command}getCommandWithArgs(){return this.getCommand()+" "+this.args}run(e,t){return this.runFn?this.runFn.bind(this)(e,t):K(Object(l.a)("Command error"))}getUsage(){return Object(l.a)("Usage")+": "+this.getCommandWithArgs()}isEnabled(){return!this._isEnabled||this._isEnabled()}}function K(e){return{error:e}}function Y(e){return{promise:e}}function $(e){return Y(Promise.resolve(e))}const Q=[new W({command:"spoiler",args:"<message>",description:Object(l.b)("Sends the given message as a spoiler"),runFn:function(e,t){return $(a.makeHtmlMessage(t,`<span data-mx-spoiler>${t}</span>`))},category:z.messages}),new W({command:"shrug",args:"<message>",description:Object(l.b)("Prepends ¯\\_(ツ)_/¯ to a plain-text message"),runFn:function(e,t){let n="¯\\_(ツ)_/¯";return t&&(n=n+" "+t),$(a.makeTextMessage(n))},category:z.messages}),new W({command:"tableflip",args:"<message>",description:Object(l.b)("Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message"),runFn:function(e,t){let n="(╯°□°)╯︵ ┻━┻";return t&&(n=n+" "+t),$(a.makeTextMessage(n))},category:z.messages}),new W({command:"unflip",args:"<message>",description:Object(l.b)("Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message"),runFn:function(e,t){let n="┬──┬ ノ( ゜-゜ノ)";return t&&(n=n+" "+t),$(a.makeTextMessage(n))},category:z.messages}),new W({command:"lenny",args:"<message>",description:Object(l.b)("Prepends ( ͡° ͜ʖ ͡°) to a plain-text message"),runFn:function(e,t){let n="( ͡° ͜ʖ ͡°)";return t&&(n=n+" "+t),$(a.makeTextMessage(n))},category:z.messages}),new W({command:"plain",args:"<message>",description:Object(l.b)("Sends a message as plain text, without interpreting it as markdown"),runFn:function(e,t){return $(a.makeTextMessage(t))},category:z.messages}),new W({command:"html",args:"<message>",description:Object(l.b)("Sends a message as html, without interpreting it as markdown"),runFn:function(e,t){return $(a.makeHtmlMessage(t,t))},category:z.messages}),new W({command:"ddg",args:"<query>",description:Object(l.b)("Searches DuckDuckGo for results"),runFn:function(){return u.a.createTrackedDialog("Slash Commands","/ddg is not a command",L.a,{title:Object(l.a)("/ddg is not a command"),description:Object(l.a)("To use it, just wait for autocomplete results to load and tab through them.")}),Y()},category:z.actions,hideCompletionAfterSpace:!0}),new W({command:"upgraderoom",args:"<new_version>",description:Object(l.b)("Upgrades a room to a new version"),runFn:function(e,t){if(t){const n=s.a.get(),r=n.getRoom(e);if(!r.currentState.mayClientSendStateEvent("m.room.tombstone",n))return K(Object(l.a)("You do not have the required permissions to use this command."));const{finished:o}=u.a.createTrackedDialog("Slash Commands","upgrade room confirmation",U.a,{roomId:e,targetVersion:t},null,!1,!0);return Y(o.then(async([e])=>{null!=e&&e.continue&&await Object(M.a)(r,t,e.invite)}))}return K(this.getUsage())},category:z.admin}),new W({command:"nick",args:"<display_name>",description:Object(l.b)("Changes your display nickname"),runFn:function(e,t){return t?Y(s.a.get().setDisplayName(t)):K(this.getUsage())},category:z.actions}),new W({command:"myroomnick",aliases:["roomnick"],args:"<display_name>",description:Object(l.b)("Changes your display nickname in the current room only"),runFn:function(e,t){if(t){const n=s.a.get(),r=n.getRoom(e).currentState.getStateEvents("m.room.member",n.getUserId()),o=q(q({},r?r.getContent():{membership:"join"}),{},{displayname:t});return Y(n.sendStateEvent(e,"m.room.member",o,n.getUserId()))}return K(this.getUsage())},category:z.actions}),new W({command:"roomavatar",args:"[<mxc_url>]",description:Object(l.b)("Changes the avatar of the current room"),runFn:function(e,t){let n=Promise.resolve(t);return t||(n=H()),Y(n.then(t=>{if(t)return s.a.get().sendStateEvent(e,"m.room.avatar",{url:t},"")}))},category:z.actions}),new W({command:"myroomavatar",args:"[<mxc_url>]",description:Object(l.b)("Changes your avatar in this current room only"),runFn:function(e,t){const n=s.a.get(),r=n.getRoom(e),o=n.getUserId();let i=Promise.resolve(t);return t||(i=H()),Y(i.then(t=>{if(!t)return;const i=r.currentState.getStateEvents("m.room.member",o),a=q(q({},i?i.getContent():{membership:"join"}),{},{avatar_url:t});return n.sendStateEvent(e,"m.room.member",a,o)}))},category:z.actions}),new W({command:"myavatar",args:"[<mxc_url>]",description:Object(l.b)("Changes your avatar in all rooms"),runFn:function(e,t){let n=Promise.resolve(t);return t||(n=H()),Y(n.then(e=>{if(e)return s.a.get().setAvatarUrl(e)}))},category:z.actions}),new W({command:"topic",args:"[<topic>]",description:Object(l.b)("Gets or sets the room topic"),runFn:function(e,t){const n=s.a.get();if(t)return Y(n.setRoomTopic(e,t));const r=n.getRoom(e);if(!r)return K(Object(l.a)("Failed to set topic"));const o=r.currentState.getStateEvents("m.room.topic",""),a=o&&o.getContent().topic,c=a?Object(h.f)(a):Object(l.a)("This room has no topic.");return u.a.createTrackedDialog("Slash Commands","Topic",B.a,{title:r.name,description:i.createElement("div",{dangerouslySetInnerHTML:{__html:c}}),hasCloseButton:!0}),Y()},category:z.admin}),new W({command:"roomname",args:"<name>",description:Object(l.b)("Sets the room name"),runFn:function(e,t){return t?Y(s.a.get().setRoomName(e,t)):K(this.getUsage())},category:z.admin}),new W({command:"invite",args:"<user-id> [<reason>]",description:Object(l.b)("Invites user with given id to current room"),runFn:function(e,t){if(t){const[n,r]=t.split(/\s+(.+)/);if(n){let t=Promise.resolve();if("email"===Object(b.c)(n)&&!s.a.get().getIdentityServerUrl()){const e=Object(y.c)();if(!e)return K(Object(l.a)("Use an identity server to invite by email. Manage in Settings."));{const{finished:n}=u.a.createTrackedDialog("Slash Commands","Identity server",p.a,{title:Object(l.a)("Use an identity server"),description:i.createElement("p",null,Object(l.a)("Use an identity server to invite by email. Click continue to use the default identity server (%(defaultIdentityServerName)s) or manage in Settings.",{defaultIdentityServerName:Object(v.a)(e)})),button:Object(l.a)("Continue")});t=n.then(([e])=>{if(!e)throw new Error(Object(l.a)("Use an identity server to invite by email. Manage in Settings."));Object(y.d)()})}}const o=new d.a(e);return Y(t.then(()=>o.invite([n],r)).then(()=>{if("invited"!==o.getCompletionState(n))throw new Error(o.getErrorText(n))}))}}return K(this.getUsage())},category:z.actions}),new W({command:"join",aliases:["j","goto"],args:"<room-address>",description:Object(l.b)("Joins room with given address"),runFn:function(e,t){if(t){const e=t.split(" ");if(e.length<1)return K(this.getUsage());let n=!1;if(e[0].startsWith("http:")||e[0].startsWith("https:")){const t=new URL(e[0]),r=t.host||t.hostname;Object(E.d)(r)&&(n=!0)}if("#"===e[0][0]){let t=e[0];return t.includes(":")||(t+=":"+s.a.get().getDomain()),c.a.dispatch({action:"view_room",room_alias:t,auto_join:!0,_type:"slash_command"}),Y()}if("!"===e[0][0]){const[t,...n]=e;return c.a.dispatch({action:"view_room",room_id:t,opts:{viaServers:n},via_servers:n,auto_join:!0,_type:"slash_command"}),Y()}if(n){const t=Object(E.j)(e[0]);if(!t)return K(this.getUsage());if(!t.roomIdOrAlias)return K(this.getUsage());const n=t.roomIdOrAlias,r=t.viaServers,o=t.eventId,i={action:"view_room",auto_join:!0,_type:"slash_command"};return"!"===n[0]?i.room_id=n:i.room_alias=n,o&&(i.event_id=o,i.highlighted=!0),r&&(i.opts={viaServers:r},i.via_servers=r),c.a.dispatch(i),Y()}}return K(this.getUsage())},category:z.actions}),new W({command:"part",args:"[<room-address>]",description:Object(l.b)("Leave room"),runFn:function(e,t){const n=s.a.get();let r;if(t){const e=t.match(/^(\S+)$/);if(e){let t=e[1];if("#"!==t[0])return K(this.getUsage());t.includes(":")||(t+=":"+n.getDomain());const o=n.getRooms();for(let e=0;e<o.length;e++){const n=o[e].currentState.getStateEvents("m.room.aliases");for(let i=0;i<n.length;i++){const a=n[i].getContent().aliases||[];for(let n=0;n<a.length;n++)if(a[n]===t){r=o[e].roomId;break}if(r)break}if(r)break}if(!r)return K(Object(l.a)("Unrecognised room address:")+" "+t)}}return r||(r=e),Y(Object(F.d)(r))},category:z.actions}),new W({command:"kick",args:"<user-id> [reason]",description:Object(l.b)("Kicks user with given id"),runFn:function(e,t){if(t){const n=t.match(/^(\S+?)( +(.*))?$/);if(n)return Y(s.a.get().kick(e,n[1],n[3]))}return K(this.getUsage())},category:z.admin}),new W({command:"ban",args:"<user-id> [reason]",description:Object(l.b)("Bans user with given id"),runFn:function(e,t){if(t){const n=t.match(/^(\S+?)( +(.*))?$/);if(n)return Y(s.a.get().ban(e,n[1],n[3]))}return K(this.getUsage())},category:z.admin}),new W({command:"unban",args:"<user-id>",description:Object(l.b)("Unbans user with given ID"),runFn:function(e,t){if(t){const n=t.match(/^(\S+)$/);if(n)return Y(s.a.get().unban(e,n[1]))}return K(this.getUsage())},category:z.admin}),new W({command:"ignore",args:"<user-id>",description:Object(l.b)("Ignores a user, hiding their messages from you"),runFn:function(e,t){if(t){const e=s.a.get(),n=t.match(/^(@[^:]+:\S+)$/);if(n){const t=n[1],r=e.getIgnoredUsers();return r.push(t),Y(e.setIgnoredUsers(r).then(()=>{u.a.createTrackedDialog("Slash Commands","User ignored",B.a,{title:Object(l.a)("Ignored user"),description:i.createElement("div",null,i.createElement("p",null,Object(l.a)("You are now ignoring %(userId)s",{userId:t})))})}))}}return K(this.getUsage())},category:z.actions}),new W({command:"unignore",args:"<user-id>",description:Object(l.b)("Stops ignoring a user, showing their messages going forward"),runFn:function(e,t){if(t){const e=s.a.get(),n=t.match(/(^@[^:]+:\S+$)/);if(n){const t=n[1],r=e.getIgnoredUsers(),o=r.indexOf(t);return-1!==o&&r.splice(o,1),Y(e.setIgnoredUsers(r).then(()=>{u.a.createTrackedDialog("Slash Commands","User unignored",B.a,{title:Object(l.a)("Unignored user"),description:i.createElement("div",null,i.createElement("p",null,Object(l.a)("You are no longer ignoring %(userId)s",{userId:t})))})}))}}return K(this.getUsage())},category:z.actions}),new W({command:"op",args:"<user-id> [<power-level>]",description:Object(l.b)("Define the power level of a user"),runFn:function(e,t){if(t){const n=t.match(/^(\S+?)( +(-?\d+))?$/);let r=50;if(n){const t=n[1];if(4===n.length&&void 0!==n[3]&&(r=parseInt(n[3],10)),!isNaN(r)){const n=s.a.get(),o=n.getRoom(e);if(!o)return K(Object(l.a)("Command failed"));const i=o.getMember(t);if(!i||Object(F.b)(i.membership)===F.a.Leave)return K(Object(l.a)("Could not find user in room"));const a=o.currentState.getStateEvents("m.room.power_levels","");return Y(n.setPowerLevel(e,t,r,a))}}}return K(this.getUsage())},category:z.admin}),new W({command:"deop",args:"<user-id>",description:Object(l.b)("Deops user with given id"),runFn:function(e,t){if(t){if(t.match(/^(\S+)$/)){const n=s.a.get(),r=n.getRoom(e);if(!r)return K(Object(l.a)("Command failed"));const o=r.currentState.getStateEvents("m.room.power_levels","");return o.getContent().users[t]?Y(n.setPowerLevel(e,t,void 0,o)):K(Object(l.a)("Could not find user in room"))}}return K(this.getUsage())},category:z.admin}),new W({command:"devtools",description:Object(l.b)("Opens the Developer Tools dialog"),runFn:function(e){return u.a.createDialog(j.b,{roomId:e}),Y()},category:z.advanced}),new W({command:"addwidget",args:"<url | embed code | Jitsi url>",description:Object(l.b)("Adds a custom widget by URL to the room"),isEnabled:()=>R.b.getValue(D.a.Widgets),runFn:function(e,t){if(!t)return K(Object(l.a)("Please supply a widget URL or embed code"));if(t.toLowerCase().startsWith("<iframe ")){const e=Object(C.parseFragment)(t);if(e&&e.childNodes&&1===e.childNodes.length){const n=e.childNodes[0];if("iframe"===n.tagName.toLowerCase()&&n.attrs){const e=n.attrs.find(e=>"src"===e.name);console.log("Pulling URL out of iframe (embed code)"),t=e.value}}}if(!t.startsWith("https://")&&!t.startsWith("http://"))return K(Object(l.a)("Please supply a https:// or http:// widget URL"));if(m.a.canUserModifyWidgets(e)){const n=s.a.get().getUserId(),r=(new Date).getTime(),o=encodeURIComponent(`${e}_${n}_${r}`);let i=S.a.CUSTOM,a="Custom Widget",c={};const l=w.a.getInstance().parsePreferredConferenceUrl(t);return l&&(console.log("Making /addwidget widget a Jitsi conference"),i=S.a.JITSI,a="Jitsi Conference",c=l,t=m.a.getLocalJitsiWrapperUrl()),Y(m.a.setRoomWidget(e,o,i,t,a,c))}return K(Object(l.a)("You cannot modify widgets in this room."))},category:z.admin}),new W({command:"verify",args:"<user-id> <device-id> <device-signing-key>",description:Object(l.b)("Verifies a user, session, and pubkey tuple"),runFn:function(e,t){if(t){const e=t.match(/^(\S+) +(\S+) +(\S+)$/);if(e){const t=s.a.get(),n=e[1],r=e[2],o=e[3];return Y((async()=>{const e=t.getStoredDevice(n,r);if(!e)throw new Error(Object(l.a)("Unknown (user, session) pair:")+` (${n}, ${r})`);if((await t.checkDeviceTrust(n,r)).isVerified())throw e.getFingerprint()===o?new Error(Object(l.a)("Session already verified!")):new Error(Object(l.a)("WARNING: Session already verified, but keys do NOT MATCH!"));if(e.getFingerprint()!==o){const t=e.getFingerprint();throw new Error(Object(l.a)('WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and session %(deviceId)s is "%(fprint)s" which does not match the provided key "%(fingerprint)s". This could mean your communications are being intercepted!',{fprint:t,userId:n,deviceId:r,fingerprint:o}))}await t.setDeviceVerified(n,r,!0),u.a.createTrackedDialog("Slash Commands","Verified key",B.a,{title:Object(l.a)("Verified key"),description:i.createElement("div",null,i.createElement("p",null,Object(l.a)("The signing key you provided matches the signing key you received from %(userId)s's session %(deviceId)s. Session marked as verified.",{userId:n,deviceId:r})))})})())}}return K(this.getUsage())},category:z.advanced}),new W({command:"discardsession",description:Object(l.b)("Forces the current outbound group session in an encrypted room to be discarded"),runFn:function(e){try{s.a.get().forceDiscardSession(e)}catch(e){return K(e.message)}return Y()},category:z.advanced}),new W({command:"rainbow",description:Object(l.b)("Sends the given message coloured as a rainbow"),args:"<message>",runFn:function(e,t){return t?$(a.makeHtmlMessage(t,g(t))):K(this.getUserId())},category:z.messages}),new W({command:"rainbowme",description:Object(l.b)("Sends the given emote coloured as a rainbow"),args:"<message>",runFn:function(e,t){return t?$(a.makeHtmlEmote(t,g(t))):K(this.getUserId())},category:z.messages}),new W({command:"help",description:Object(l.b)("Displays list of commands with usages and descriptions"),runFn:function(){return u.a.createTrackedDialog("Slash Commands","Help",G.a),Y()},category:z.advanced}),new W({command:"whois",description:Object(l.b)("Displays information about a user"),args:"<user-id>",runFn:function(e,t){if(!t||!t.startsWith("@")||!t.includes(":"))return K(this.getUsage());const n=s.a.get().getRoom(e).getMember(t);return c.a.dispatch({action:k.a.ViewUser,member:n||{userId:t}}),Y()},category:z.advanced}),new W({command:"rageshake",aliases:["bugreport"],description:Object(l.b)("Send a bug report with logs"),isEnabled:()=>!!O.a.get().bug_report_endpoint_url,args:"<description>",runFn:function(e,t){return Y(u.a.createTrackedDialog("Slash Commands","Bug Report Dialog",T.a,{initialText:t}).finished)},category:z.advanced}),new W({command:"query",description:Object(l.b)("Opens chat with the given user"),args:"<user-id>",runFn:function(e,t){const n=t&&/^\+?[0123456789]+$/.test(t);return t&&(t.startsWith("@")&&t.includes(":")||n)?Y((async()=>{if(n){const e=await A.d.sharedInstance().pstnLookup(this.state.value);if(!e||0===e.length||!e[0].userid)throw new Error("Unable to find Matrix ID for phone number");t=e[0].userid}const e=await Object(x.c)(s.a.get(),t);c.a.dispatch({action:"view_room",room_id:e})})()):K(this.getUsage())},category:z.actions}),new W({command:"msg",description:Object(l.b)("Sends a message to the given user"),args:"<user-id> <message>",runFn:function(e,t){if(t){const e=t.match(/^(\S+?)(?: +(.*))?$/s);if(e){const[t,n]=e.slice(1);if(n&&t&&t.startsWith("@")&&t.includes(":"))return Y((async()=>{const e=s.a.get(),r=await Object(x.c)(e,t);c.a.dispatch({action:"view_room",room_id:r}),e.sendTextMessage(r,n)})())}}return K(this.getUsage())},category:z.actions}),new W({command:"holdcall",description:Object(l.b)("Places the call in the current room on hold"),category:z.other,runFn:function(e,t){const n=A.d.sharedInstance().getCallForRoom(e);return n?(n.setRemoteOnHold(!0),Y()):K("No active call in this room")}}),new W({command:"unholdcall",description:Object(l.b)("Takes the call in the current room off hold"),category:z.other,runFn:function(e,t){const n=A.d.sharedInstance().getCallForRoom(e);return n?(n.setRemoteOnHold(!1),Y()):K("No active call in this room")}}),new W({command:"converttodm",description:Object(l.b)("Converts the room to a DM"),category:z.other,runFn:function(e,t){const n=s.a.get().getRoom(e);return Y(Object(N.c)(n,!0))}}),new W({command:"converttoroom",description:Object(l.b)("Converts the DM to a room"),category:z.other,runFn:function(e,t){const n=s.a.get().getRoom(e);return Y(Object(N.c)(n,!1))}}),new W({command:"me",args:"<message>",description:Object(l.b)("Displays action"),category:z.messages,hideCompletionAfterSpace:!0}),...I.CHAT_EFFECTS.map(e=>new W({command:e.command,description:e.description(),args:"<message>",runFn:function(t,n){return Y((async()=>{if(n){const r={msgtype:e.msgType,body:n};s.a.get().sendMessage(t,r)}else n=e.fallbackMessage(),s.a.get().sendEmoteMessage(t,n);c.a.dispatch({action:"effects."+e.command})})())},category:z.effects}))],J=new Map;function X(e){if("/"!==(e=e.replace(/\s+$/,""))[0])return{};const t=e.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/);let n,r;return t?(n=t[1].substring(1).toLowerCase(),r=t[2]):n=e,{cmd:n,args:r}}function Z(e){const{cmd:t,args:n}=X(e);return J.has(t)&&J.get(t).isEnabled()?{cmd:J.get(t),args:n}:{}}Q.forEach(e=>{J.set(e.command,e),e.aliases.forEach(t=>{J.set(t,e)})})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(79),o=n.n(r),i=n(96),a=n(2);let s;!function(e){e.Invite="invite",e.Leave="leave",e.Join="join"}(s||(s={}));class c{constructor(e={}){this.opts=e,o()(this,"accountData",{}),o()(this,"inviteRooms",{}),o()(this,"joinRooms",{}),o()(this,"nextBatch",null),o()(this,"groups",{invite:{},join:{},leave:{}}),this.opts.maxTimelineEntries=this.opts.maxTimelineEntries||50}accumulate(e,t=!1){this.accumulateRooms(e,t),this.accumulateGroups(e),this.accumulateAccountData(e),this.nextBatch=e.next_batch}accumulateAccountData(e){e.account_data&&e.account_data.events&&e.account_data.events.forEach(e=>{this.accountData[e.type]=e})}accumulateRooms(e,t=!1){e.rooms&&(e.rooms.invite&&Object.keys(e.rooms.invite).forEach(n=>{this.accumulateRoom(n,s.Invite,e.rooms.invite[n],t)}),e.rooms.join&&Object.keys(e.rooms.join).forEach(n=>{this.accumulateRoom(n,s.Join,e.rooms.join[n],t)}),e.rooms.leave&&Object.keys(e.rooms.leave).forEach(n=>{this.accumulateRoom(n,s.Leave,e.rooms.leave[n],t)}))}accumulateRoom(e,t,n,r=!1){switch(t){case s.Invite:this.accumulateInviteState(e,n);break;case s.Join:this.inviteRooms[e]&&delete this.inviteRooms[e],this.accumulateJoinState(e,n,r);break;case s.Leave:this.inviteRooms[e]?delete this.inviteRooms[e]:delete this.joinRooms[e];break;default:i.a.error("Unknown cateogory: ",t)}}accumulateInviteState(e,t){if(!t.invite_state||!t.invite_state.events)return;if(!this.inviteRooms[e])return void(this.inviteRooms[e]={invite_state:t.invite_state});const n=this.inviteRooms[e];t.invite_state.events.forEach(e=>{let t=!1;for(let r=0;r<n.invite_state.events.length;r++){const o=n.invite_state.events[r];o.type===e.type&&o.state_key==e.state_key&&(n.invite_state.events[r]=e,t=!0)}t||n.invite_state.events.push(e)})}accumulateJoinState(e,t,n=!1){this.joinRooms[e]||(this.joinRooms[e]={_currentState:Object.create(null),_timeline:[],_accountData:Object.create(null),_unreadNotifications:{},_summary:{},_readReceipts:{}});const r=this.joinRooms[e];if(t.account_data&&t.account_data.events&&t.account_data.events.forEach(e=>{r._accountData[e.type]=e}),t.unread_notifications&&(r._unreadNotifications=t.unread_notifications),t.summary){const e="m.heroes",n="m.invited_member_count",o="m.joined_member_count",i=r._summary,a=t.summary;i[e]=a[e]||i[e],i[o]=a[o]||i[o],i[n]=a[n]||i[n]}if(t.ephemeral&&t.ephemeral.events&&t.ephemeral.events.forEach(e=>{"m.receipt"===e.type&&e.content&&Object.keys(e.content).forEach(t=>{e.content[t]["m.read"]&&Object.keys(e.content[t]["m.read"]).forEach(n=>{r._readReceipts[n]={data:e.content[t]["m.read"][n],eventId:t}})})}),t.timeline&&t.timeline.limited&&(r._timeline=[]),t.state&&t.state.events&&t.state.events.forEach(e=>{l(r._currentState,e)}),t.timeline&&t.timeline.events&&t.timeline.events.forEach((e,o)=>{let i;if(l(r._currentState,e),n)i=e;else{i=Object.assign({},e),void 0!==i.unsigned&&(i.unsigned=Object.assign({},i.unsigned));const t=e.unsigned?e.unsigned.age:e.age;void 0!==t&&(i._localTs=Date.now()-t)}r._timeline.push({event:i,token:0===o?t.timeline.prev_batch:null})}),r._timeline.length>this.opts.maxTimelineEntries){for(let e=r._timeline.length-this.opts.maxTimelineEntries;e<r._timeline.length;e++)if(r._timeline[e].token){r._timeline=r._timeline.slice(e,r._timeline.length);break}}}accumulateGroups(e){e.groups&&(e.groups.invite&&Object.keys(e.groups.invite).forEach(t=>{this.accumulateGroup(t,s.Invite,e.groups.invite[t])}),e.groups.join&&Object.keys(e.groups.join).forEach(t=>{this.accumulateGroup(t,s.Join,e.groups.join[t])}),e.groups.leave&&Object.keys(e.groups.leave).forEach(t=>{this.accumulateGroup(t,s.Leave,e.groups.leave[t])}))}accumulateGroup(e,t,n){for(const t of[s.Invite,s.Leave,s.Join])delete this.groups[t][e];this.groups[t][e]=n}getJSON(e=!1){const t={join:{},invite:{},leave:{}};Object.keys(this.inviteRooms).forEach(e=>{t.invite[e]=this.inviteRooms[e]}),Object.keys(this.joinRooms).forEach(n=>{const r=this.joinRooms[n],o={ephemeral:{events:[]},account_data:{events:[]},state:{events:[]},timeline:{events:[],prev_batch:null},unread_notifications:r._unreadNotifications,summary:r._summary};Object.keys(r._accountData).forEach(e=>{o.account_data.events.push(r._accountData[e])});const i={type:"m.receipt",room_id:n,content:{}};Object.keys(r._readReceipts).forEach(e=>{const t=r._readReceipts[e];i.content[t.eventId]||(i.content[t.eventId]={"m.read":{}}),i.content[t.eventId]["m.read"][e]=t.data}),Object.keys(i.content).length>0&&o.ephemeral.events.push(i),r._timeline.forEach(t=>{if(!o.timeline.prev_batch){if(!t.token)return;o.timeline.prev_batch=t.token}let n;!e&&t.event._localTs?(n=Object.assign({},t.event),void 0!==n.unsigned&&(n.unsigned=Object.assign({},n.unsigned)),delete n._localTs,n.unsigned=n.unsigned||{},n.unsigned.age=Date.now()-t.event._localTs):n=t.event,o.timeline.events.push(n)});const s=Object.create(null);for(let e=o.timeline.events.length-1;e>=0;e--){const t=o.timeline.events[e];if(null===t.state_key||void 0===t.state_key)continue;const n=Object(a.j)(t);n.unsigned&&(n.unsigned.prev_content&&(n.content=n.unsigned.prev_content),n.unsigned.prev_sender&&(n.sender=n.unsigned.prev_sender)),l(s,n)}Object.keys(r._currentState).forEach(e=>{Object.keys(r._currentState[e]).forEach(t=>{let n=r._currentState[e][t];s[e]&&s[e][t]&&(n=s[e][t]),o.state.events.push(n)})}),t.join[n]=o});const n=[];return Object.keys(this.accountData).forEach(e=>{n.push(this.accountData[e])}),{nextBatch:this.nextBatch,roomsData:t,groupsData:this.groups,accountData:n}}getNextBatchToken(){return this.nextBatch}}function l(e,t){null!==t.state_key&&void 0!==t.state_key&&t.type&&(e[t.type]||(e[t.type]=Object.create(null)),e[t.type][t.state_key]=t)}},function(e,t,n){"use strict";for(var r=/[\\\"\x00-\x1F]/g,o={},i=0;i<32;++i)o[String.fromCharCode(i)]="\\U"+("0000"+i.toString(16)).slice(-4).toUpperCase();function a(e){return r.lastIndex=0,e.replace(r,(function(e){return o[e]}))}function s(e){switch(typeof e){case"string":return'"'+a(e)+'"';case"number":return isFinite(e)?e:"null";case"boolean":return e;case"object":return null===e?"null":Array.isArray(e)?function(e){for(var t="[",n="",r=0;r<e.length;++r)n+=t,t=",",n+=s(e[r]);return","!=t?"[]":n+"]"}(e):function(e){var t="{",n="",r=Object.keys(e);r.sort();for(var o=0;o<r.length;++o){var i=r[o];n+=t+'"'+a(i)+'":',t=",",n+=s(e[i])}return","!=t?"{}":n+"}"}(e);default:throw new Error("Cannot stringify: "+typeof e)}}o["\b"]="\\b",o["\t"]="\\t",o["\n"]="\\n",o["\f"]="\\f",o["\r"]="\\r",o['"']='\\"',o["\\"]="\\\\",e.exports={stringify:s}},function(e,t,n){"use strict";(function(e,r){n.d(t,"d",(function(){return P})),n.d(t,"c",(function(){return L})),n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return U}));var o=n(79),i=n.n(o),a=n(295),s=n.n(a),c=n(3),l=n(374),u=n(96),d=n(515),h=n(135),p=n(928),m=n(297),g=n(893),f=n(299),_=n(929),b=n(930),v=n(931),y=n(153),E=n(300),S=n(932),w=n(301),C=n(302),T=n(207),x=n(936),k=n(937),F=n(938),O=n(206),R=n(232),D=n(517),I=n(518),A=n(108);const N=m.a.DeviceVerification,M={[E.b.NAME]:E.b,[S.a.NAME]:S.a,[E.d]:F.a,[E.c]:F.a};let P;function L(){return Boolean(e.Olm)}!function(e){e[e.RECIPROCATE_QR_CODE=E.b.NAME]="RECIPROCATE_QR_CODE",e[e.SAS=S.a.NAME]="SAS"}(P||(P={}));class j extends c.EventEmitter{static getOlmVersion(){return d.a.getOlmVersion()}constructor(e,t,n,r,o,a,s,c){if(super(),this.baseApis=e,this.sessionStore=t,this.userId=n,this.deviceId=r,this.clientStore=o,this.cryptoStore=a,this.roomList=s,i()(this,"backupManager",void 0),i()(this,"crossSigningInfo",void 0),i()(this,"olmDevice",void 0),i()(this,"deviceList",void 0),i()(this,"dehydrationManager",void 0),i()(this,"secretStorage",void 0),i()(this,"reEmitter",void 0),i()(this,"verificationMethods",void 0),i()(this,"supportedAlgorithms",void 0),i()(this,"outgoingRoomKeyRequestManager",void 0),i()(this,"toDeviceVerificationRequests",void 0),i()(this,"inRoomVerificationRequests",void 0),i()(this,"trustCrossSignedDevices",!0),i()(this,"lastOneTimeKeyCheck",null),i()(this,"oneTimeKeyCheckInProgress",!1),i()(this,"roomEncryptors",{}),i()(this,"roomDecryptors",{}),i()(this,"deviceKeys",{}),i()(this,"globalBlacklistUnverifiedDevices",!1),i()(this,"globalErrorOnUnknownDevices",!0),i()(this,"receivedRoomKeyRequests",[]),i()(this,"receivedRoomKeyRequestCancellations",[]),i()(this,"processingRoomKeyRequests",!1),i()(this,"lazyLoadMembers",!1),i()(this,"roomDeviceTrackingState",{}),i()(this,"lastNewSessionForced",{}),i()(this,"sendKeyRequestsImmediately",!1),i()(this,"oneTimeKeyCount",void 0),i()(this,"needsNewFallback",void 0),i()(this,"onDeviceListUserCrossSigningUpdated",async e=>{if(e===this.userId){const t=this.deviceList.getStoredCrossSigningForUser(e),n=t?t.getId():null,r=this.crossSigningInfo.getId(),o=r!==n;r&&n&&!o?await this.checkOwnCrossSigningTrust():(this.storeTrustedSelfKeys(null),this.emit("crossSigning.keysChanged",{}),this.emit("userTrustStatusChanged",this.userId,this.checkUserTrust(e)))}else{await this.checkDeviceVerifications(e);const t=this.deviceList.getStoredCrossSigningForUser(e);t&&(t.updateCrossSigningVerifiedBefore(this.checkUserTrust(e).isCrossSigningVerified()),this.deviceList.setRawStoredCrossSigningForUser(e,t.toStorage())),this.emit("userTrustStatusChanged",e,this.checkUserTrust(e))}}),i()(this,"onToDeviceEvent",e=>{try{u.a.log(`received to_device ${e.getType()} from: ${e.getSender()} id: ${e.getId()}`),"m.room_key"==e.getType()||"m.forwarded_room_key"==e.getType()?this.onRoomKeyEvent(e):"m.room_key_request"==e.getType()?this.onRoomKeyRequestEvent(e):"m.secret.request"===e.getType()?this.secretStorage.onRequestReceived(e):"m.secret.send"===e.getType()?this.secretStorage.onSecretReceived(e):"org.matrix.room_key.withheld"===e.getType()?this.onRoomKeyWithheldEvent(e):e.getContent().transaction_id?this.onKeyVerificationMessage(e):"m.bad.encrypted"===e.getContent().msgtype?this.onToDeviceBadEncrypted(e):(e.isBeingDecrypted()||e.shouldAttemptDecryption())&&(e.isBeingDecrypted()||e.attemptDecryption(this),e.once("Event.decrypted",e=>{this.onToDeviceEvent(e)}))}catch(e){u.a.error("Error handling toDeviceEvent:",e)}}),i()(this,"onTimelineEvent",(e,t,n,r,{liveEvent:o=!0}={})=>{if(!x.a.validateEvent(e,this.baseApis))return;this.handleVerificationEvent(e,this.inRoomVerificationRequests,e=>{const t=new x.a(this.baseApis,e.getRoomId());return new T.k(t,this.verificationMethods,this.baseApis)},o)}),this.reEmitter=new l.a(this),c){this.verificationMethods=new Map;for(const e of c)"string"==typeof e?M[e]&&this.verificationMethods.set(e,M[e]):e.NAME?this.verificationMethods.set(e.NAME,e):u.a.warn("Excluding unknown verification method "+e)}else this.verificationMethods=M;this.backupManager=new I.a(e,async()=>{const e=await this.getSessionBackupPrivateKey();if(e)return e;const t=await this.getSecret("m.megolm_backup.v1");if(t){const e=U(t);if(e){const[t]=await this.getSecretStorageKey();await this.storeSecret("m.megolm_backup.v1",e,[t])}return h.decodeBase64(e||t)}if(this.baseApis.cryptoCallbacks&&this.baseApis.cryptoCallbacks.getBackupKey)return await this.baseApis.cryptoCallbacks.getBackupKey();throw new Error("Unable to get private key")}),this.olmDevice=new d.a(a),this.deviceList=new p.a(e,a,this.olmDevice),this.deviceList.on("userCrossSigningUpdated",this.onDeviceListUserCrossSigningUpdated),this.reEmitter.reEmit(this.deviceList,["crypto.devicesUpdated","crypto.willUpdateDevices"]),this.supportedAlgorithms=Object.keys(g.a),this.outgoingRoomKeyRequestManager=new v.a(e,this.deviceId,this.cryptoStore),this.toDeviceVerificationRequests=new k.b,this.inRoomVerificationRequests=new x.b;const m=this.baseApis.cryptoCallbacks||{},_=Object(f.d)(a,this.olmDevice);this.crossSigningInfo=new f.a(n,m,_),this.secretStorage=new b.b(e,m,e),this.dehydrationManager=new D.b(this),!m.getCrossSigningKey&&m.getSecretStorageKey&&(m.getCrossSigningKey=async e=>f.a.getFromSecretStorage(e,this.secretStorage))}async init({exportedOlmDevice:t,pickleKey:n}={}){u.a.log("Crypto: initialising Olm..."),await e.Olm.init(),u.a.log(t?"Crypto: initialising Olm device from exported device...":"Crypto: initialising Olm device..."),await this.olmDevice.init({fromExportedDevice:t,pickleKey:n}),u.a.log("Crypto: loading device list..."),await this.deviceList.load(),this.deviceKeys["ed25519:"+this.deviceId]=this.olmDevice.deviceEd25519Key,this.deviceKeys["curve25519:"+this.deviceId]=this.olmDevice.deviceCurve25519Key,u.a.log("Crypto: fetching own devices...");let r=this.deviceList.getRawStoredDevicesForUser(this.userId);if(r||(r={}),!r[this.deviceId]){u.a.log("Crypto: adding this device to the store...");const e={keys:this.deviceKeys,algorithms:this.supportedAlgorithms,verified:N.VERIFIED,known:!0};r[this.deviceId]=e,this.deviceList.storeDevicesForUser(this.userId,r),this.deviceList.saveIfDirty()}await this.cryptoStore.doTxn("readonly",[y.a.STORE_ACCOUNT],e=>{this.cryptoStore.getCrossSigningKeys(e,e=>{e&&0!==Object.keys(e).length&&(u.a.log("Loaded cross-signing public keys from crypto store"),this.crossSigningInfo.setKeys(e))})}),this.deviceList.startTrackingDeviceList(this.userId),u.a.log("Crypto: checking for key backup..."),this.backupManager.checkAndStart()}getCryptoTrustCrossSignedDevices(){return this.trustCrossSignedDevices}setCryptoTrustCrossSignedDevices(e){this.trustCrossSignedDevices=e;for(const e of this.deviceList.getKnownUserIds()){const t=this.deviceList.getRawStoredDevicesForUser(e);for(const n of Object.keys(t)){const t=this.checkDeviceTrust(e,n);if(!t.isLocallyVerified()&&t.isCrossSigningVerified()){const t=this.deviceList.getStoredDevice(e,n);this.emit("deviceVerificationChanged",e,n,t)}}}}async createRecoveryKeyFromPassphrase(t){const n=new e.Olm.PkDecryption;try{const e={};if(t){const r=await Object(w.c)(t);e.passphrase={algorithm:"m.pbkdf2",iterations:r.iterations,salt:r.salt},e.pubkey=n.init_with_private_key(r.key)}else e.pubkey=n.generate_key();const r=n.get_private_key();return{keyInfo:e,encodedPrivateKey:Object(C.b)(r),privateKey:r}}finally{n&&n.free()}}async isCrossSigningReady(){const e=this.crossSigningInfo.getId(),t=await this.crossSigningInfo.isStoredInKeyCache()||await this.crossSigningInfo.isStoredInSecretStorage(this.secretStorage);return!(!e||!t)}async isSecretStorageReady(){const e=await this.secretStorage.hasKey(),t=await this.crossSigningInfo.isStoredInSecretStorage(this.secretStorage),n=!this.backupManager.getKeyBackupEnabled()||await this.baseApis.isKeyBackupKeyStored();return!!(e&&t&&n)}async bootstrapCrossSigning({authUploadDeviceSigningKeys:e,setupNewCrossSigning:t}={}){u.a.log("Bootstrapping cross-signing");const n=this.baseApis.cryptoCallbacks,r=new _.a(this.baseApis.store.accountData,n),o=new f.a(this.userId,r.crossSigningCallbacks,r.crossSigningCallbacks),i=async()=>{o.resetKeys(),await this.signObject(o.keys.master),r.addCrossSigningKeys(e,o.keys);const t=this.deviceList.getStoredDevice(this.userId,this.deviceId),n=await o.signDevice(this.userId,t);r.addKeySignature(this.userId,this.deviceId,n),this.backupManager.backupInfo&&(await o.signObject(this.backupManager.backupInfo.auth_data,"master"),r.addSessionBackup(this.backupManager.backupInfo))},a=this.crossSigningInfo.getId(),s=await this.crossSigningInfo.isStoredInKeyCache(),c=await this.crossSigningInfo.isStoredInSecretStorage(this.secretStorage),l=s||c;u.a.log({setupNewCrossSigning:t,publicKeysOnDevice:a,privateKeysInCache:s,privateKeysInStorage:c,privateKeysExistSomewhere:l}),!l||t?(u.a.log("Cross-signing private keys not found locally or in secret storage, creating new keys"),await i()):a&&s?u.a.log("Cross-signing public keys trusted and private keys found locally"):c&&(u.a.log("Cross-signing private keys not found locally, but they are available in secret storage, reading storage and caching locally"),await this.checkOwnCrossSigningTrust({allowPrivateKeyRequests:!0}));const d=r.crossSigningCallbacks.privateKeys;if(d.size&&!this.baseApis.cryptoCallbacks.saveCrossSigningKeys){const e=new b.b(r.accountDataClientAdapter,r.ssssCryptoCallbacks);await e.hasKey()&&(u.a.log("Storing new cross-signing private keys in secret storage"),await f.a.storeInSecretStorage(d,e))}const h=r.buildOperation();await h.apply(this),await r.persist(this),u.a.log("Cross-signing ready")}async bootstrapSecretStorage({createSecretStorageKey:e=(async()=>({})),keyBackupInfo:t,setupNewKeyBackup:n,setupNewSecretStorage:r,getKeyBackupPassphrase:o}={}){u.a.log("Bootstrapping Secure Secret Storage");const i=this.baseApis.cryptoCallbacks,a=new _.a(this.baseApis.store.accountData,i),s=new b.b(a.accountDataClientAdapter,a.ssssCryptoCallbacks);let c=null;const l=async(e,t)=>{e=e||{},t&&(e.key=t);const{keyId:n,keyInfo:r}=await s.addKey(b.a,e);return t&&a.ssssCryptoCallbacks.addPrivateKey(n,r,t),await s.setDefaultKeyId(n),n},d=async(e,t)=>{if(!t.mac){const n=await this.baseApis.cryptoCallbacks.getSecretStorageKey({keys:{[e]:t}},"");if(n){const r=n[1];a.ssssCryptoCallbacks.addPrivateKey(e,t,r);const{iv:o,mac:i}=await Object(R.a)(r);t.iv=o,t.mac=i,await a.setAccountData("m.secret_storage.key."+e,t)}}},p=async e=>{if(this.crossSigningInfo.getId()&&await this.crossSigningInfo.isStoredInKeyCache("master"))try{u.a.log("Adding cross-signing signature to key backup"),await this.crossSigningInfo.signObject(e,"master")}catch(e){u.a.error("Signing key backup with cross-signing keys failed",e)}else u.a.warn("Cross-signing keys not available, skipping signature on key backup")},m=await this.getSecretStorageKey(),[g,v]=m||[null,null],y=!r&&v&&v.algorithm===b.a;if(u.a.log({keyBackupInfo:t,setupNewKeyBackup:n,setupNewSecretStorage:r,storageExists:y,oldKeyInfo:v}),y||t)if(!y&&t){u.a.log("Secret storage does not exist, using key backup key");const e=await this.getSessionBackupPrivateKey()||await o(),n={};t.auth_data.private_key_salt&&t.auth_data.private_key_iterations&&(n.passphrase={algorithm:"m.pbkdf2",iterations:t.auth_data.private_key_iterations,salt:t.auth_data.private_key_salt,bits:256}),c=await l(n,e),await s.store("m.megolm_backup.v1",h.encodeBase64(e),[c]),await p(t.auth_data),a.addSessionBackup(t)}else u.a.log("Secret storage exists"),v&&v.algorithm===b.a&&await d(g,v);else{u.a.log("Secret storage does not exist, creating new storage key");const{keyInfo:t,privateKey:n}=await e();c=await l(t,n)}if(!this.baseApis.cryptoCallbacks.saveCrossSigningKeys&&await this.isCrossSigningReady()&&(c||!await this.crossSigningInfo.isStoredInSecretStorage(s))){u.a.log("Copying cross-signing private keys from cache to secret storage");const e=await this.crossSigningInfo.getCrossSigningKeysFromCache();await f.a.storeInSecretStorage(e,s)}if(n&&!t){u.a.log("Creating new message key backup version");const e=await this.baseApis.prepareKeyBackupVersion(null,{secureSecretStorage:!1}),t=Object(C.a)(e.recovery_key);await s.store("m.megolm_backup.v1",h.encodeBase64(t));const n={algorithm:e.algorithm,auth_data:e.auth_data};await p(n.auth_data),await this.signObject(n.auth_data),a.addSessionBackup(n)}const E=await s.get("m.megolm_backup.v1");if(E){u.a.info("Got session backup key from secret storage: caching");const e=U(E);e&&await s.store("m.megolm_backup.v1",e,[c||g]);const t=new Uint8Array(h.decodeBase64(e||E));await a.addSessionBackupPrivateKeyToCache(t)}else if(this.backupManager.getKeyBackupEnabled()){const e=await this.getSessionBackupPrivateKey()||await o();if(!e)return void u.a.error("Key backup is enabled but couldn't get key backup key!");u.a.info("Got session backup key from cache/user that wasn't in SSSS: saving to SSSS"),await s.store("m.megolm_backup.v1",h.encodeBase64(e))}const S=a.buildOperation();await S.apply(this),await a.persist(this),u.a.log("Secure Secret Storage ready")}addSecretStorageKey(e,t,n){return this.secretStorage.addKey(e,t,n)}hasSecretStorageKey(e){return this.secretStorage.hasKey(e)}getSecretStorageKey(e){return this.secretStorage.getKey(e)}storeSecret(e,t,n){return this.secretStorage.store(e,t,n)}getSecret(e){return this.secretStorage.get(e)}isSecretStored(e,t){return this.secretStorage.isStored(e,t)}requestSecret(e,t){return t||(t=Object.keys(this.deviceList.getRawStoredDevicesForUser(this.userId))),this.secretStorage.request(e,t)}getDefaultSecretStorageKeyId(){return this.secretStorage.getDefaultKeyId()}setDefaultSecretStorageKeyId(e){return this.secretStorage.setDefaultKeyId(e)}checkSecretStorageKey(e,t){return this.secretStorage.checkKey(e,t)}checkSecretStoragePrivateKey(t,n){let r=null;try{r=new e.Olm.PkDecryption;return r.init_with_private_key(t)===n}finally{r&&r.free()}}async getSessionBackupPrivateKey(){let e=await new Promise(e=>{this.cryptoStore.doTxn("readonly",[y.a.STORE_ACCOUNT],t=>{this.cryptoStore.getSecretStorePrivateKey(t,e,"m.megolm_backup.v1")})});if(e&&"string"==typeof e&&(e=new Uint8Array(h.decodeBase64(U(e)||e)),await this.storeSessionBackupPrivateKey(e)),e&&e.ciphertext){const t=r.from(this.olmDevice._pickleKey),n=await Object(R.b)(e,t,"m.megolm_backup.v1");e=h.decodeBase64(n)}return e}async storeSessionBackupPrivateKey(e){if(!(e instanceof Uint8Array))throw new Error("storeSessionBackupPrivateKey expects Uint8Array, got "+e);const t=r.from(this.olmDevice._pickleKey),n=await Object(R.c)(h.encodeBase64(e),t,"m.megolm_backup.v1");return this.cryptoStore.doTxn("readwrite",[y.a.STORE_ACCOUNT],e=>{this.cryptoStore.storeSecretStorePrivateKey(e,"m.megolm_backup.v1",n)})}checkCrossSigningPrivateKey(t,n){let r=null;try{r=new e.Olm.PkSigning;return r.init_with_seed(t)===n}finally{r&&r.free()}}async afterCrossSigningLocalKeyChange(){u.a.info("Starting cross-signing key change post-processing");const e=this.deviceList.getStoredDevice(this.userId,this.deviceId),t=await this.crossSigningInfo.signDevice(this.userId,e);u.a.info("Starting background key sig upload for "+this.deviceId);const n=({shouldEmit:e})=>this.baseApis.uploadKeySignatures({[this.userId]:{[this.deviceId]:t}}).then(t=>{const{failures:r}=t||{};if(Object.keys(r||[]).length>0)throw e&&this.baseApis.emit("crypto.keySignatureUploadFailure",r,"afterCrossSigningLocalKeyChange",n),new O.c("Key upload failed",{failures:r});u.a.info("Finished background key sig upload for "+this.deviceId)}).catch(e=>{u.a.error("Error during background key sig upload for "+this.deviceId,e)});n({shouldEmit:!0});const r=this.baseApis.cryptoCallbacks.shouldUpgradeDeviceVerifications;if(r){u.a.info("Starting device verification upgrade");const e={};for(const[t,n]of Object.entries(this.deviceList.crossSigningInfo)){const r=await this.checkForDeviceVerificationUpgrade(t,f.a.fromStorage(n,t));r&&(e[t]=r)}if(Object.keys(e).length>0){u.a.info(`Found ${Object.keys(e).length} verif users to upgrade`);try{const t=await r({users:e});if(t)for(const n of t)n in e&&await this.baseApis.setDeviceVerified(n,e[n].crossSigningInfo.getId())}catch(e){u.a.log("shouldUpgradeDeviceVerifications threw an error: not upgrading",e)}}u.a.info("Finished device verification upgrade")}u.a.info("Finished cross-signing key change post-processing")}async checkForDeviceVerificationUpgrade(e,t){const n=this.crossSigningInfo.checkUserTrust(t);if(t.firstUse&&!n.isVerified()){const n=this.deviceList.getRawStoredDevicesForUser(e),r=await this.checkForValidDeviceSignature(e,t.keys.master,n);if(r.length)return{devices:r.map(e=>m.a.fromStorage(n[e],e)),crossSigningInfo:t}}}async checkForValidDeviceSignature(e,t,n){const r=[];if(n&&t.signatures&&t.signatures[e])for(const o of Object.keys(t.signatures[e])){const[,i]=o.split(":",2);if(i in n&&n[i].verified===N.VERIFIED)try{await h.verifySignature(this.olmDevice,t,e,i,n[i].keys[o]),r.push(i)}catch(e){}}return r}getCrossSigningId(e){return this.crossSigningInfo.getId(e)}getStoredCrossSigningForUser(e){return this.deviceList.getStoredCrossSigningForUser(e)}checkUserTrust(e){const t=this.deviceList.getStoredCrossSigningForUser(e);return t?this.crossSigningInfo.checkUserTrust(t):new f.c(!1,!1,!1)}checkDeviceTrust(e,t){const n=this.deviceList.getStoredDevice(e,t);return this.checkDeviceInfoTrust(e,n)}checkDeviceInfoTrust(e,t){const n=!(!t||!t.isVerified()),r=this.deviceList.getStoredCrossSigningForUser(e);if(t&&r){const o=this.trustCrossSignedDevices||e===this.userId;return this.crossSigningInfo.checkDeviceTrust(r,t,n,o)}return new f.b(!1,!1,n,!1)}async checkOwnCrossSigningTrust({allowPrivateKeyRequests:e=!1}={}){const t=this.userId;await this.downloadKeys([this.userId]);const n=await this.crossSigningInfo.getCrossSigningKeysFromCache(),r=this.deviceList.getStoredCrossSigningForUser(t);if(!r)return void u.a.error("Got cross-signing update event for user "+t+" but no new cross-signing information found!");const o=r.getId(),i=this.crossSigningInfo.getId()!==o,a=r.getId()&&!n.has("master");if(i&&u.a.info("Got new master public key",o),e&&(i||a)){u.a.info("Attempting to retrieve cross-signing master private key");let e=null;try{e=(await this.crossSigningInfo.getCrossSigningKey("master",o))[1],u.a.info("Got cross-signing master private key")}finally{e&&e.free()}}const s=this.crossSigningInfo.getId("self_signing"),c=this.crossSigningInfo.getId("user_signing");this.storeTrustedSelfKeys(r.keys);const l=s!==r.getId("self_signing"),d=c!==r.getId("user_signing"),h=r.getId("self_signing")&&!n.has("self_signing"),p=r.getId("user_signing")&&!n.has("user_signing"),m={};if(l&&u.a.info("Got new self-signing key",r.getId("self_signing")),e&&(l||h)){u.a.info("Attempting to retrieve cross-signing self-signing private key");let e=null;try{e=(await this.crossSigningInfo.getCrossSigningKey("self_signing",r.getId("self_signing")))[1],u.a.info("Got cross-signing self-signing private key")}finally{e&&e.free()}const t=this.deviceList.getStoredDevice(this.userId,this.deviceId),n=await this.crossSigningInfo.signDevice(this.userId,t);m[this.deviceId]=n}if(d&&u.a.info("Got new user-signing key",r.getId("user_signing")),e&&(d||p)){u.a.info("Attempting to retrieve cross-signing user-signing private key");let e=null;try{e=(await this.crossSigningInfo.getCrossSigningKey("user_signing",r.getId("user_signing")))[1],u.a.info("Got cross-signing user-signing private key")}finally{e&&e.free()}}if(i){const e=this.crossSigningInfo.keys.master;await this.signObject(e);const t=e.signatures[this.userId]["ed25519:"+this.deviceId];m[this.crossSigningInfo.getId()]=Object.assign({},e,{signatures:{[this.userId]:{["ed25519:"+this.deviceId]:t}}})}const g=Object.keys(m);if(g.length){const e=({shouldEmit:t})=>(u.a.info("Starting background key sig upload for "+g),this.baseApis.uploadKeySignatures({[this.userId]:m}).then(n=>{const{failures:r}=n||{};if(u.a.info("Finished background key sig upload for "+g),Object.keys(r||[]).length>0)throw t&&this.baseApis.emit("crypto.keySignatureUploadFailure",r,"checkOwnCrossSigningTrust",e),new O.c("Key upload failed",{failures:r})}).catch(e=>{u.a.error("Error during background key sig upload for "+g,e)}));e({shouldEmit:!0})}this.emit("userTrustStatusChanged",t,this.checkUserTrust(t)),i&&(this.baseApis.emit("crossSigning.keysChanged",{}),await this.afterCrossSigningLocalKeyChange()),await this.backupManager.checkKeyBackup()}async storeTrustedSelfKeys(e){e?this.crossSigningInfo.setKeys(e):this.crossSigningInfo.clearKeys(),await this.cryptoStore.doTxn("readwrite",[y.a.STORE_ACCOUNT],e=>{this.cryptoStore.storeCrossSigningKeys(e,this.crossSigningInfo.keys)})}async checkDeviceVerifications(e){const t=this.baseApis.cryptoCallbacks.shouldUpgradeDeviceVerifications;if(t){if(u.a.info("Starting device verification upgrade for "+e),this.crossSigningInfo.keys.user_signing){const n=this.deviceList.getStoredCrossSigningForUser(e);if(n){const r=await this.checkForDeviceVerificationUpgrade(e,n);if(r){(await t({users:{[e]:r}})).includes(e)&&await this.baseApis.setDeviceVerified(e,n.getId())}}}u.a.info("Finished device verification upgrade for "+e)}}async setTrustedBackupPubKey(e){this.sessionStore.setLocalTrustedBackupPubKey(e),await this.backupManager.checkKeyBackup()}enableLazyLoading(){this.lazyLoadMembers=!0}registerEventHandlers(e){e.on("RoomMember.membership",(e,t,n)=>{try{this.onRoomMembership(e,t,n)}catch(e){u.a.error("Error handling membership change:",e)}}),e.on("toDeviceEvent",this.onToDeviceEvent),e.on("Room.timeline",this.onTimelineEvent),e.on("Event.decrypted",this.onTimelineEvent)}start(){this.outgoingRoomKeyRequestManager.start()}stop(){this.outgoingRoomKeyRequestManager.stop(),this.deviceList.stop(),this.dehydrationManager.stop()}getDeviceEd25519Key(){return this.olmDevice.deviceEd25519Key}getDeviceCurve25519Key(){return this.olmDevice.deviceCurve25519Key}setGlobalBlacklistUnverifiedDevices(e){this.globalBlacklistUnverifiedDevices=e}getGlobalBlacklistUnverifiedDevices(){return this.globalBlacklistUnverifiedDevices}setGlobalErrorOnUnknownDevices(e){this.globalErrorOnUnknownDevices=e}getGlobalErrorOnUnknownDevices(){return this.globalErrorOnUnknownDevices}uploadDeviceKeys(){const e={algorithms:this.supportedAlgorithms,device_id:this.deviceId,keys:this.deviceKeys,user_id:this.userId};return this.signObject(e).then(()=>this.baseApis.uploadKeysRequest({device_keys:e}))}updateOneTimeKeyCount(e){if(!isFinite(e))throw new TypeError("Parameter for updateOneTimeKeyCount has to be a number");this.oneTimeKeyCount=e}setNeedsNewFallback(e){this.needsNewFallback=!!e}getNeedsNewFallback(){return this.needsNewFallback}maybeUploadOneTimeKeys(){if(this.oneTimeKeyCheckInProgress)return;const e=Date.now();if(null!==this.lastOneTimeKeyCheck&&e-this.lastOneTimeKeyCheck<6e4)return;this.lastOneTimeKeyCheck=e;const t=this.olmDevice.maxNumberOfOneTimeKeys(),n=Math.floor(t/2),r=async e=>{for(;n>e||this.getNeedsNewFallback();){if(n>e){u.a.info("generating oneTimeKeys");const t=Math.min(n-e,5);await this.olmDevice.generateOneTimeKeys(t)}this.getNeedsNewFallback()&&(u.a.info("generating fallback key"),await this.olmDevice.generateFallbackKey()),u.a.info("calling uploadOneTimeKeys");const t=await this.uploadOneTimeKeys();if(!t.one_time_key_counts||!t.one_time_key_counts.signed_curve25519)throw new Error("response for uploading keys does not contain one_time_key_counts.signed_curve25519");e=t.one_time_key_counts.signed_curve25519}};this.oneTimeKeyCheckInProgress=!0,Promise.resolve().then(()=>void 0!==this.oneTimeKeyCount?Promise.resolve(this.oneTimeKeyCount):this.baseApis.uploadKeysRequest({}).then(e=>e.one_time_key_counts.signed_curve25519||0)).then(e=>r(e)).catch(e=>{u.a.error("Error uploading one-time keys",e.stack||e)}).finally(()=>{this.oneTimeKeyCount=void 0,this.oneTimeKeyCheckInProgress=!1})}async uploadOneTimeKeys(){const e=[],t={};if(this.getNeedsNewFallback()){const n=await this.olmDevice.getFallbackKey();for(const[r,o]of Object.entries(n.curve25519)){const n={key:o,fallback:!0};t["signed_curve25519:"+r]=n,e.push(this.signObject(n))}this.setNeedsNewFallback(!1)}const n=await this.olmDevice.getOneTimeKeys(),r={};for(const t in n.curve25519)if(n.curve25519.hasOwnProperty(t)){const o={key:n.curve25519[t]};r["signed_curve25519:"+t]=o,e.push(this.signObject(o))}await Promise.all(e);const o=await this.baseApis.uploadKeysRequest({one_time_keys:r,"org.matrix.msc2732.fallback_keys":t});return await this.olmDevice.markKeysAsPublished(),o}downloadKeys(e,t){return this.deviceList.downloadKeys(e,t)}getStoredDevicesForUser(e){return this.deviceList.getStoredDevicesForUser(e)}getStoredDevice(e,t){return this.deviceList.getStoredDevice(e,t)}saveDeviceList(e){return this.deviceList.saveIfDirty(e)}async setDeviceVerification(e,t,n,r,o){void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=null);const i=this.deviceList.getStoredCrossSigningForUser(e);if(i&&i.getId()===t){if(null!==r||null!==o)throw new Error("Cannot set blocked or known for a cross-signing key");if(!n)throw new Error("Cannot set a cross-signing key as unverified");if(this.crossSigningInfo.getId()||e!==this.crossSigningInfo.userId||(this.storeTrustedSelfKeys(i.keys),this.emit("userTrustStatusChanged",this.userId,this.checkUserTrust(e))),e!==this.userId){u.a.info("Master key "+i.getId()+" for "+e+" marked verified. Signing...");const n=await this.crossSigningInfo.signUser(i);if(n){const r=async({shouldEmit:o})=>{u.a.info("Uploading signature for "+e+"...");const i=await this.baseApis.uploadKeySignatures({[e]:{[t]:n}}),{failures:a}=i||{};if(Object.keys(a||[]).length>0)throw o&&this.baseApis.emit("crypto.keySignatureUploadFailure",a,"setDeviceVerification",r),new O.c("Key upload failed",{failures:a})};await r({shouldEmit:!0})}return n}return i}const a=this.deviceList.getRawStoredDevicesForUser(e);if(!a||!a[t])throw new Error("Unknown device "+e+":"+t);const s=a[t];let c=s.verified;n?c=N.VERIFIED:null!==n&&c==N.VERIFIED&&(c=N.UNVERIFIED),r?c=N.BLOCKED:null!==r&&c==N.BLOCKED&&(c=N.UNVERIFIED);let l=s.known;if(null!==o&&(l=o),s.verified===c&&s.known===l||(s.verified=c,s.known=l,this.deviceList.storeDevicesForUser(e,a),this.deviceList.saveIfDirty()),n&&e===this.userId){let n;u.a.info("Own device "+t+" marked verified: signing");if(this.checkDeviceTrust(e,t).isCrossSigningVerified()?u.a.log(`Own device ${t} already cross-signing verified`):n=await this.crossSigningInfo.signDevice(e,m.a.fromStorage(s,t)),n){const r=async({shouldEmit:o})=>{u.a.info("Uploading signature for "+t);const i=await this.baseApis.uploadKeySignatures({[e]:{[t]:n}}),{failures:a}=i||{};if(Object.keys(a||[]).length>0)throw o&&this.baseApis.emit("crypto.keySignatureUploadFailure",a,"setDeviceVerification",r),new O.c("Key upload failed",{failures:a})};await r({shouldEmit:!0})}}const d=m.a.fromStorage(s,t);return this.emit("deviceVerificationChanged",e,t,d),d}findVerificationRequestDMInProgress(e){return this.inRoomVerificationRequests.findRequestInProgress(e)}getVerificationRequestsToDeviceInProgress(e){return this.toDeviceVerificationRequests.getRequestsInProgress(e)}requestVerificationDM(e,t){const n=this.inRoomVerificationRequests.findRequestInProgress(t);if(n)return Promise.resolve(n);const r=new x.a(this.baseApis,t,e);return this.requestVerificationWithChannel(e,r,this.inRoomVerificationRequests)}requestVerification(e,t){t||(t=Object.keys(this.deviceList.getRawStoredDevicesForUser(e)));const n=this.toDeviceVerificationRequests.findRequestInProgress(e,t);if(n)return Promise.resolve(n);const r=new k.a(this.baseApis,e,t,k.a.makeTransactionId());return this.requestVerificationWithChannel(e,r,this.toDeviceVerificationRequests)}async requestVerificationWithChannel(e,t,n){let r=new T.k(t,this.verificationMethods,this.baseApis);t.transactionId&&n.setRequestByChannel(t,r),await r.sendRequest();const o=n.getRequestByChannel(t);return o?r=o:(u.a.log(`Crypto: adding new request to requestsByTxnId with id ${t.transactionId} ${t.roomId}`),n.setRequestByChannel(t,r)),r}beginKeyVerification(e,t,n,r=null){let o;if(r){if(o=this.toDeviceVerificationRequests.getRequestBySenderAndTxnId(t,r),!o)throw new Error(`No request found for user ${t} with transactionId `+r)}else{r=k.a.makeTransactionId();const e=new k.a(this.baseApis,t,[n],r,n);o=new T.k(e,this.verificationMethods,this.baseApis),this.toDeviceVerificationRequests.setRequestBySenderAndTxnId(t,r,o)}return o.beginKeyVerification(e,{userId:t,deviceId:n})}async legacyDeviceVerification(e,t,n){const r=k.a.makeTransactionId(),o=new k.a(this.baseApis,e,[t],r,t),i=new T.k(o,this.verificationMethods,this.baseApis);this.toDeviceVerificationRequests.setRequestBySenderAndTxnId(e,r,i);const a=i.beginKeyVerification(n,{userId:e,deviceId:t});return await Promise.race([a.verify(),i.waitFor(e=>e.started)]),i}async getOlmSessionsForUser(e){const t=this.getStoredDevicesForUser(e)||[],n={};for(let e=0;e<t.length;++e){const r=t[e],o=r.getIdentityKey(),i=await this.olmDevice.getSessionInfoForDevice(o);n[r.deviceId]={deviceIdKey:o,sessions:i}}return n}getEventSenderDeviceInfo(e){const t=e.getSenderKey(),n=e.getWireContent().algorithm;if(!t||!n)return null;if(e.getForwardingCurve25519KeyChain().length>0)return null;if(e.isKeySourceUntrusted())return null;const r=this.deviceList.getDeviceByIdentityKey(n,t);if(null===r)return null;const o=e.getClaimedEd25519Key();return o?o!==r.getFingerprint()?(u.a.warn("Event "+e.getId()+" claims ed25519 key "+o+" but sender device has key "+r.getFingerprint()),null):r:(u.a.warn("Event "+e.getId()+" claims no ed25519 key: cannot verify sending device"),null)}getEventEncryptionInfo(e){const t={};if(t.senderKey=e.getSenderKey(),t.algorithm=e.getWireContent().algorithm,!t.senderKey||!t.algorithm)return t.encrypted=!1,t;t.encrypted=!0;e.getForwardingCurve25519KeyChain().length>0||e.isKeySourceUntrusted()?t.authenticated=!1:t.authenticated=!0,t.sender=this.deviceList.getDeviceByIdentityKey(t.algorithm,t.senderKey);const n=e.getClaimedEd25519Key();return n||(u.a.warn("Event "+e.getId()+" claims no ed25519 key: cannot verify sending device"),t.mismatchedSender=!0),t.sender&&n!==t.sender.getFingerprint()&&(u.a.warn("Event "+e.getId()+" claims ed25519 key "+n+"but sender device has key "+t.sender.getFingerprint()),t.mismatchedSender=!0),t}forceDiscardSession(e){const t=this.roomEncryptors[e];if(void 0===t)throw new Error("Room not encrypted");if(void 0===t.forceDiscardSession)throw new Error("Room encryption algorithm doesn't support session discarding");t.forceDiscardSession()}async setRoomEncryption(e,t,n){if(!t.algorithm)return void u.a.log("Ignoring setRoomEncryption with no algorithm");const r=this.roomList.getRoomEncryption(e);if(r&&JSON.stringify(r)!=JSON.stringify(t))return void u.a.error("Ignoring m.room.encryption event which requests a change of config in "+e);if(this.roomEncryptors[e])return;let o=null;r||(o=this.roomList.setRoomEncryption(e,t));const i=g.c[t.algorithm];if(!i)throw new Error("Unable to encrypt with "+t.algorithm);const a=new i({userId:this.userId,deviceId:this.deviceId,crypto:this,olmDevice:this.olmDevice,baseApis:this.baseApis,roomId:e,config:t});this.roomEncryptors[e]=a,o&&await o,this.lazyLoadMembers?u.a.log("Enabling encryption in "+e):(u.a.log("Enabling encryption in "+e+"; starting to track device lists for all users therein"),await this.trackRoomDevices(e),n||this.deviceList.refreshOutdatedDeviceLists())}trackRoomDevices(e){const t=async()=>{if(!this.roomEncryptors[e])return;const t=this.clientStore.getRoom(e);if(!t)throw new Error("Unable to start tracking devices in unknown room "+e);u.a.log(`Starting to track devices for room ${e} ...`);(await t.getEncryptionTargetMembers()).forEach(e=>{this.deviceList.startTrackingDeviceList(e.userId)})};let n=this.roomDeviceTrackingState[e];return n||(n=t(),this.roomDeviceTrackingState[e]=n.catch(t=>{throw this.roomDeviceTrackingState[e]=null,t})),n}ensureOlmSessionsForUsers(e){const t={};for(let n=0;n<e.length;++n){const r=e[n];t[r]=[];const o=this.getStoredDevicesForUser(r)||[];for(let e=0;e<o.length;++e){const n=o[e];n.getIdentityKey()!=this.olmDevice.deviceCurve25519Key&&(n.verified!=N.BLOCKED&&t[r].push(n))}}return h.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,t)}async exportRoomKeys(){const e=[];return await this.cryptoStore.doTxn("readonly",[y.a.STORE_INBOUND_GROUP_SESSIONS],t=>{this.cryptoStore.getAllEndToEndInboundGroupSessions(t,t=>{if(null===t)return;const n=this.olmDevice.exportInboundGroupSession(t.senderKey,t.sessionId,t.sessionData);delete n.first_known_index,n.algorithm=h.MEGOLM_ALGORITHM,e.push(n)})}),e}importRoomKeys(e,t={}){let n=0,r=0;const o=e.length;function i(){t.progressCallback({stage:"load_keys",successes:n,failures:r,total:o})}return Promise.all(e.map(e=>{if(!e.room_id||!e.algorithm)return u.a.warn("ignoring room key entry with missing fields",e),r++,t.progressCallback&&i(),null;return this.getRoomDecryptor(e.room_id,e.algorithm).importRoomKey(e,t).finally(()=>{n++,t.progressCallback&&i()})}))}countSessionsNeedingBackup(){return this.backupManager.countSessionsNeedingBackup()}prepareToEncrypt(e){const t=this.roomEncryptors[e.roomId];t&&t.prepareToEncrypt(e)}async encryptEvent(e,t){if(!t)throw new Error("Cannot send encrypted messages in unknown rooms");const n=e.getRoomId(),r=this.roomEncryptors[n];if(!r)throw new Error("Room was previously configured to use encryption, but is no longer. Perhaps the homeserver is hiding the configuration event.");this.roomDeviceTrackingState[n]||this.trackRoomDevices(n),await this.roomDeviceTrackingState[n];let o=e.getContent();const i=o["m.relates_to"];i&&(o=Object.assign({},o),delete o["m.relates_to"]);const a=await r.encryptMessage(t,e.getType(),o);i&&(a["m.relates_to"]=i),e.makeEncrypted("m.room.encrypted",a,this.olmDevice.deviceCurve25519Key,this.olmDevice.deviceEd25519Key)}async decryptEvent(e){if(e.isRedacted()){const t=new A.b(e.getUnsigned().redacted_because),n=await this.decryptEvent(t);return{clearEvent:{room_id:e.getRoomId(),type:"m.room.message",content:{},unsigned:{redacted_because:n.clearEvent}}}}{const t=e.getWireContent(),n=this.getRoomDecryptor(e.getRoomId(),t.algorithm);return await n.decryptEvent(e)}}async handleDeviceListChanges(e,t){e.oldSyncToken&&await this.evalDeviceListChanges(t)}requestRoomKey(e,t,n=!1){return this.outgoingRoomKeyRequestManager.queueRoomKeyRequest(e,t,n).then(()=>{this.sendKeyRequestsImmediately&&this.outgoingRoomKeyRequestManager.sendQueuedRequests()}).catch(e=>{u.a.error("Error requesting key for event",e)})}cancelRoomKeyRequest(e){this.outgoingRoomKeyRequestManager.cancelRoomKeyRequest(e).catch(e=>{u.a.warn("Error clearing pending room key requests",e)})}async cancelAndResendAllOutgoingKeyRequests(){await this.outgoingRoomKeyRequestManager.cancelAndResendAllOutgoingRequests()}async onCryptoEvent(e){const t=e.getRoomId(),n=e.getContent();try{await this.setRoomEncryption(t,n,!0)}catch(e){u.a.error("Error configuring encryption in room "+t+":",e)}}async onSyncWillProcess(e){e.oldSyncToken||(u.a.log("Initial sync performed - resetting device tracking state"),this.deviceList.stopTrackingAllDeviceLists(),this.deviceList.startTrackingDeviceList(this.userId),this.roomDeviceTrackingState={}),this.sendKeyRequestsImmediately=!1}async onSyncCompleted(e){this.deviceList.setSyncToken(e.nextSyncToken),this.deviceList.saveIfDirty(),this.deviceList.startTrackingDeviceList(this.userId),this.deviceList.refreshOutdatedDeviceLists(),e.catchingUp||(this.maybeUploadOneTimeKeys(),this.processReceivedRoomKeyRequests(),this.outgoingRoomKeyRequestManager.sendQueuedRequests(),this.sendKeyRequestsImmediately=!0)}async evalDeviceListChanges(e){if(e.changed&&Array.isArray(e.changed)&&e.changed.forEach(e=>{this.deviceList.invalidateUserDeviceList(e)}),e.left&&Array.isArray(e.left)&&e.left.length){const t=new Set(await this.getTrackedE2eUsers());e.left.forEach(e=>{t.has(e)||this.deviceList.stopTrackingDeviceList(e)})}}async getTrackedE2eUsers(){const e=[];for(const t of this.getTrackedE2eRooms()){const n=await t.getEncryptionTargetMembers();for(const t of n)e.push(t.userId)}return e}getTrackedE2eRooms(){return this.clientStore.getRooms().filter(e=>{if(!this.roomEncryptors[e.roomId])return!1;if(!this.roomDeviceTrackingState[e.roomId])return!1;const t=e.getMyMembership();return"join"===t||"invite"===t})}onRoomKeyEvent(e){const t=e.getContent();if(!t.room_id||!t.algorithm)return void u.a.error("key event is missing fields");this.backupManager.checkedForBackup||this.backupManager.checkAndStart();this.getRoomDecryptor(t.room_id,t.algorithm).onRoomKeyEvent(e)}onRoomKeyWithheldEvent(e){const t=e.getContent();if(!(("m.no_olm"===t.code||t.room_id&&t.session_id)&&t.algorithm&&t.sender_key))return void u.a.error("key withheld event is missing fields");u.a.info(`Got room key withheld event from ${e.getSender()} (${t.sender_key}) for ${t.algorithm}/${t.room_id}/${t.session_id} with reason ${t.code} (${t.reason})`);const n=this.getRoomDecryptor(t.room_id,t.algorithm);if(n.onRoomKeyWithheldEvent&&n.onRoomKeyWithheldEvent(e),!t.room_id){const e=this.getRoomDecryptors(t.algorithm);for(const n of e)n.retryDecryptionFromSender(t.sender_key)}}onKeyVerificationMessage(e){if(!k.a.validateEvent(e,this.baseApis))return;this.handleVerificationEvent(e,this.toDeviceVerificationRequests,e=>{if(!k.a.canCreateRequest(k.a.getEventType(e)))return;const t=e.getContent(),n=t&&t.from_device;if(!n)return;const r=e.getSender(),o=new k.a(this.baseApis,r,[n]);return new T.k(o,this.verificationMethods,this.baseApis)})}async handleVerificationEvent(e,t,n,r=!0){let o=t.getRequest(e),i=!1;if(!o){if(o=n(e),!o)return void u.a.log("Crypto: could not find VerificationRequest for "+e.getType()+", and could not create one, so ignoring.");i=!0,t.setRequest(e,o)}e.setVerificationRequest(o);try{await o.channel.handleEvent(e,o,r)}catch(e){u.a.error("error while handling verification event: "+e.message)}i&&!o.initiatedByMe&&!o.invalid&&!o.observeOnly&&this.baseApis.emit("crypto.verification.request",o)}async onToDeviceBadEncrypted(e){const t=e.getWireContent(),n=e.getSender(),r=t.algorithm,o=t.sender_key,i=()=>{const e=this.getRoomDecryptors(h.MEGOLM_ALGORITHM);for(const t of e)t.retryDecryptionFromSender(o)};if(void 0===n||void 0===o||void 0===o)return;this.lastNewSessionForced[n]=this.lastNewSessionForced[n]||{};const a=this.lastNewSessionForced[n][o]||0;if(a+36e5>Date.now())return u.a.debug("New session already forced with device "+n+":"+o+" at "+a+": not forcing another"),await this.olmDevice.recordSessionProblem(o,"wedged",!0),void i();let s=this.deviceList.getDeviceByIdentityKey(r,o);if(!s&&(await this.downloadKeys([n],!1),s=this.deviceList.getDeviceByIdentityKey(r,o),!s))return u.a.info("Couldn't find device for identity key "+o+": not re-establishing session"),await this.olmDevice.recordSessionProblem(o,"wedged",!1),void i();const c={};c[n]=[s],await h.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,c,!0),this.lastNewSessionForced[n][o]=Date.now();const l={algorithm:h.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{}};await h.encryptMessageForDevice(l.ciphertext,this.userId,this.deviceId,this.olmDevice,n,s,{type:"m.dummy"}),await this.olmDevice.recordSessionProblem(o,"wedged",!0),i(),await this.baseApis.sendToDevice("m.room.encrypted",{[n]:{[s.deviceId]:l}});const d=await this.outgoingRoomKeyRequestManager.getOutgoingSentRoomKeyRequest(n,s.deviceId);for(const e of d)this.requestRoomKey(e.requestBody,e.recipients,!0)}onRoomMembership(e,t,n){const r=t.roomId,o=this.roomEncryptors[r];o&&(this.roomDeviceTrackingState[r]&&("join"==t.membership?(u.a.log("Join event for "+t.userId+" in "+r),this.deviceList.startTrackingDeviceList(t.userId)):"invite"==t.membership&&this.clientStore.getRoom(r).shouldEncryptForInvitedMembers()&&(u.a.log("Invite event for "+t.userId+" in "+r),this.deviceList.startTrackingDeviceList(t.userId))),o.onRoomMembership(e,t,n))}onRoomKeyRequestEvent(e){const t=e.getContent();if("request"===t.action){const t=new B(e);this.receivedRoomKeyRequests.push(t)}else if("request_cancellation"===t.action){const t=new G(e);this.receivedRoomKeyRequestCancellations.push(t)}}async processReceivedRoomKeyRequests(){if(!this.processingRoomKeyRequests){this.processingRoomKeyRequests=!0;try{const e=this.receivedRoomKeyRequests;this.receivedRoomKeyRequests=[];const t=this.receivedRoomKeyRequestCancellations;this.receivedRoomKeyRequestCancellations=[],await Promise.all(e.map(e=>this.processReceivedRoomKeyRequest(e))),await Promise.all(t.map(e=>this.processReceivedRoomKeyRequestCancellation(e)))}catch(e){u.a.error("Error processing room key requsts: "+e)}finally{this.processingRoomKeyRequests=!1}}}async processReceivedRoomKeyRequest(e){const t=e.userId,n=e.deviceId,r=e.requestBody,o=r.room_id,i=r.algorithm;if(u.a.log(`m.room_key_request from ${t}:${n} for ${o} / ${r.session_id} (id ${e.requestId})`),t!==this.userId){if(!this.roomEncryptors[o])return void u.a.debug("room key request for unencrypted room "+o);const e=this.roomEncryptors[o],i=this.deviceList.getStoredDevice(t,n);if(!i)return void u.a.debug(`Ignoring keyshare for unknown device ${t}:${n}`);try{await e.reshareKeyWithDevice(r.sender_key,r.session_id,t,i)}catch(e){u.a.warn("Failed to re-share keys for session "+r.session_id+" with device "+t+":"+i.deviceId,e)}return}if(n===this.deviceId)return void u.a.log("Ignoring room key request from ourselves");if(!this.roomDecryptors[o])return void u.a.log("room key request for unencrypted room "+o);const a=this.roomDecryptors[o][i];if(a)if(await a.hasKeysForKeyRequest(e)){if(e.share=()=>{a.shareKeysWithDevice(e)},this.checkDeviceTrust(t,n).isVerified())return u.a.log("device is already verified: sharing keys"),void e.share();this.emit("crypto.roomKeyRequest",e)}else u.a.log(`room key request for unknown session ${o} / `+r.session_id);else u.a.log(`room key request for unknown alg ${i} in room ${o}`)}async processReceivedRoomKeyRequestCancellation(e){u.a.log(`m.room_key_request cancellation for ${e.userId}:${e.deviceId} (id ${e.requestId})`),this.emit("crypto.roomKeyRequestCancellation",e)}getRoomDecryptor(e,t){let n,r;if((e=e||null)&&(n=this.roomDecryptors[e],n||(this.roomDecryptors[e]=n={}),r=n[t],r))return r;const o=g.a[t];if(!o)throw new g.b("UNKNOWN_ENCRYPTION_ALGORITHM",'Unknown encryption algorithm "'+t+'".');return r=new o({userId:this.userId,crypto:this,olmDevice:this.olmDevice,baseApis:this.baseApis,roomId:e}),n&&(n[t]=r),r}getRoomDecryptors(e){const t=[];for(const n of Object.values(this.roomDecryptors))e in n&&t.push(n[e]);return t}async signObject(e){const t=e.signatures||{},n=e.unsigned;delete e.signatures,delete e.unsigned,t[this.userId]=t[this.userId]||{},t[this.userId]["ed25519:"+this.deviceId]=await this.olmDevice.sign(s.a.stringify(e)),e.signatures=t,void 0!==n&&(e.unsigned=n)}}function U(e){if("string"!=typeof e||e.indexOf(",")<0)return null;const t=Uint8Array.from(e.split(","),e=>parseInt(e));return h.encodeBase64(t)}class B{constructor(e){i()(this,"userId",void 0),i()(this,"deviceId",void 0),i()(this,"requestId",void 0),i()(this,"requestBody",void 0),i()(this,"share",void 0);const t=e.getContent();this.userId=e.getSender(),this.deviceId=t.requesting_device_id,this.requestId=t.request_id,this.requestBody=t.body||{},this.share=()=>{throw new Error("don't know how to share keys for this request yet")}}}class G{constructor(e){i()(this,"userId",void 0),i()(this,"deviceId",void 0),i()(this,"requestId",void 0);const t=e.getContent();this.userId=e.getSender(),this.deviceId=t.requesting_device_id,this.requestId=t.request_id}}}).call(this,n(23),n(24).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,o=n(79),i=n.n(o);!function(e){e[e.Blocked=-1]="Blocked",e[e.Unverified=0]="Unverified",e[e.Verified=1]="Verified"}(r||(r={}));class a{static fromStorage(e,t){const n=new a(t);for(const t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}constructor(e){this.deviceId=e,i()(this,"algorithms",void 0),i()(this,"keys",{}),i()(this,"verified",r.Unverified),i()(this,"known",!1),i()(this,"unsigned",{}),i()(this,"signatures",{})}toStorage(){return{algorithms:this.algorithms,keys:this.keys,verified:this.verified,known:this.known,unsigned:this.unsigned,signatures:this.signatures}}getFingerprint(){return this.keys["ed25519:"+this.deviceId]}getIdentityKey(){return this.keys["curve25519:"+this.deviceId]}getDisplayName(){return this.unsigned.device_display_name||null}isBlocked(){return this.verified==r.Blocked}isVerified(){return this.verified==r.Verified}isUnverified(){return this.verified==r.Unverified}isKnown(){return!0===this.known}}i()(a,"DeviceVerification",{VERIFIED:r.Verified,UNVERIFIED:r.Unverified,BLOCKED:r.Blocked})},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return d}));var r=n(79),o=n.n(r);const i={},a={};class s{constructor(e){o()(this,"userId",void 0),o()(this,"deviceId",void 0),o()(this,"crypto",void 0),o()(this,"olmDevice",void 0),o()(this,"baseApis",void 0),o()(this,"roomId",void 0),this.userId=e.userId,this.deviceId=e.deviceId,this.crypto=e.crypto,this.olmDevice=e.olmDevice,this.baseApis=e.baseApis,this.roomId=e.roomId}prepareToEncrypt(e){}onRoomMembership(e,t,n){}}class c{constructor(e){o()(this,"userId",void 0),o()(this,"crypto",void 0),o()(this,"olmDevice",void 0),o()(this,"baseApis",void 0),o()(this,"roomId",void 0),this.userId=e.userId,this.crypto=e.crypto,this.olmDevice=e.olmDevice,this.baseApis=e.baseApis,this.roomId=e.roomId}onRoomKeyEvent(e){}async importRoomKey(e,t){}hasKeysForKeyRequest(e){return Promise.resolve(!1)}shareKeysWithDevice(e){throw new Error("shareKeysWithDevice not supported for this DecryptionAlgorithm")}async retryDecryptionFromSender(e){return!1}}class l extends Error{constructor(e,t,n){super(t),this.code=e,o()(this,"detailedString",void 0),this.code=e,this.name="DecryptionError",this.detailedString=function(e,t){let n=e.name+"[msg: "+e.message;t&&(n+=", "+Object.keys(t).map(e=>e+": "+t[e]).join(", "));return n+="]",n}(this,n)}}class u extends Error{constructor(e,t){super(e),this.devices=t,this.name="UnknownDeviceError",this.devices=t}}function d(e,t,n){i[e]=t,a[e]=n}},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return m})),n.d(t,"b",(function(){return g})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return _}));var o=n(79),i=n.n(o),a=n(3),s=n(135),c=n(96),l=n(153),u=n(232);function d(e){return Object.values(e.keys)[0]}class h extends a.EventEmitter{constructor(e,t={},n={}){super(),this.userId=e,this.callbacks=t,this.cacheCallbacks=n,i()(this,"keys",{}),i()(this,"firstUse",!0),i()(this,"crossSigningVerifiedBefore",!1)}static fromStorage(e,t){const n=new h(t);for(const t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}toStorage(){return{keys:this.keys,firstUse:this.firstUse,crossSigningVerifiedBefore:this.crossSigningVerifiedBefore}}async getCrossSigningKey(t,n){const r=["master","self_signing","user_signing"].indexOf(t)>=0;if(!this.callbacks.getCrossSigningKey)throw new Error("No getCrossSigningKey callback supplied");function o(t){if(!t)return;const r=new e.Olm.PkSigning,o=r.init_with_seed(t);if(o===n)return[o,r];r.free()}let i;void 0===n&&(n=this.getId(t)),this.cacheCallbacks.getCrossSigningKeyCache&&r&&(i=await this.cacheCallbacks.getCrossSigningKeyCache(t,n));const a=o(i);if(a)return a;i=await this.callbacks.getCrossSigningKey(t,n);const s=o(i);if(s)return this.cacheCallbacks.storeCrossSigningKeyCache&&r&&await this.cacheCallbacks.storeCrossSigningKeyCache(t,i),s;if(!i)throw new Error("getCrossSigningKey callback for "+t+" returned falsey");throw new Error("Key type "+t+" from getCrossSigningKey callback did not match")}async isStoredInSecretStorage(e){const t=await e.isStored("m.cross_signing.master",!1)||{};function n(e){for(const n of Object.keys(t))e[n]||delete t[n]}for(const t of["self_signing","user_signing"])n(await e.isStored("m.cross_signing."+t,!1)||{});return Object.keys(t).length?t:null}static async storeInSecretStorage(e,t){for(const[n,r]of e){const e=Object(s.encodeBase64)(r);await t.store("m.cross_signing."+n,e)}}static async getFromSecretStorage(e,t){const n=await t.get("m.cross_signing."+e);return n?Object(s.decodeBase64)(n):null}async isStoredInKeyCache(e){const t=this.cacheCallbacks;if(!t)return!1;const n=e?[e]:["master","self_signing","user_signing"];for(const e of n)if(!await t.getCrossSigningKeyCache(e))return!1;return!0}async getCrossSigningKeysFromCache(){const e=new Map,t=this.cacheCallbacks;if(!t)return e;for(const n of["master","self_signing","user_signing"]){const r=await t.getCrossSigningKeyCache(n);r&&e.set(n,r)}return e}getId(e="master"){if(!this.keys[e])return null;return d(this.keys[e])}async resetKeys(t){if(!this.callbacks.saveCrossSigningKeys)throw new Error("No saveCrossSigningKeys callback supplied");if(void 0===t||t&p.MASTER||!this.keys.master)t=p.MASTER|p.USER_SIGNING|p.SELF_SIGNING;else if(0===t)return;const n={},r={};let o,i;try{if(t&p.MASTER?(o=new e.Olm.PkSigning,n.master=o.generate_seed(),i=o.init_with_seed(n.master),r.master={user_id:this.userId,usage:["master"],keys:{["ed25519:"+i]:i}}):[i,o]=await this.getCrossSigningKey("master"),t&p.SELF_SIGNING){const t=new e.Olm.PkSigning;try{n.self_signing=t.generate_seed();const e=t.init_with_seed(n.self_signing);r.self_signing={user_id:this.userId,usage:["self_signing"],keys:{["ed25519:"+e]:e}},Object(s.pkSign)(r.self_signing,o,this.userId,i)}finally{t.free()}}if(t&p.USER_SIGNING){const t=new e.Olm.PkSigning;try{n.user_signing=t.generate_seed();const e=t.init_with_seed(n.user_signing);r.user_signing={user_id:this.userId,usage:["user_signing"],keys:{["ed25519:"+e]:e}},Object(s.pkSign)(r.user_signing,o,this.userId,i)}finally{t.free()}}Object.assign(this.keys,r),this.callbacks.saveCrossSigningKeys(n)}finally{o&&o.free()}}clearKeys(){this.keys={}}setKeys(e){const t={};if(e.master){if(e.master.user_id!==this.userId){const t="Mismatched user ID "+e.master.user_id+" in master key from "+this.userId;throw c.a.error(t),new Error(t)}this.keys.master?d(e.master)!==this.getId()&&(this.firstUse=!1):this.firstUse=!0,t.master=e.master}else{if(!this.keys.master)throw new Error("Tried to set cross-signing keys without a master key");t.master=this.keys.master}const n=d(t.master);if(e.user_signing){if(e.user_signing.user_id!==this.userId){const t="Mismatched user ID "+e.master.user_id+" in user_signing key from "+this.userId;throw c.a.error(t),new Error(t)}try{Object(s.pkVerify)(e.user_signing,n,this.userId)}catch(e){throw c.a.error("invalid signature on user-signing key"),e}}if(e.self_signing){if(e.self_signing.user_id!==this.userId){const t="Mismatched user ID "+e.master.user_id+" in self_signing key from "+this.userId;throw c.a.error(t),new Error(t)}try{Object(s.pkVerify)(e.self_signing,n,this.userId)}catch(e){throw c.a.error("invalid signature on self-signing key"),e}}e.master&&(this.keys.master=e.master,this.keys.self_signing=null,this.keys.user_signing=null),e.self_signing&&(this.keys.self_signing=e.self_signing),e.user_signing&&(this.keys.user_signing=e.user_signing)}updateCrossSigningVerifiedBefore(e){!this.crossSigningVerifiedBefore&&e&&(this.crossSigningVerifiedBefore=!0)}async signObject(e,t){if(!this.keys[t])throw new Error("Attempted to sign with "+t+" key but no such key present");const[n,r]=await this.getCrossSigningKey(t);try{return Object(s.pkSign)(e,r,this.userId,n),e}finally{r.free()}}async signUser(e){if(this.keys.user_signing)return this.signObject(e.keys.master,"user_signing");c.a.info("No user signing key: not signing user")}async signDevice(e,t){if(e!==this.userId)throw new Error(`Trying to sign ${e}'s device; can only sign our own device`);if(this.keys.self_signing)return this.signObject({algorithms:t.algorithms,keys:t.keys,device_id:t.deviceId,user_id:e},"self_signing");c.a.info("No self signing key: not signing device")}checkUserTrust(e){if(this.userId===e.userId&&this.getId()&&this.getId()===e.getId()&&this.getId("self_signing")&&this.getId("self_signing")===e.getId("self_signing"))return new m(!0,!0,this.firstUse);if(!this.keys.user_signing)return new m(!1,!1,e.firstUse);let t;const n=e.keys.master,r=this.getId("user_signing");try{Object(s.pkVerify)(n,r,this.userId),t=!0}catch(e){t=!1}return new m(t,e.crossSigningVerifiedBefore,e.firstUse)}checkDeviceTrust(e,t,n,r){const o=this.checkUserTrust(e),i=e.keys.self_signing;if(!i)return new g(!1,!1,n,r);const a=function(e,t){return{algorithms:e.algorithms,keys:e.keys,device_id:e.deviceId,user_id:t,signatures:e.signatures}}(t,e.userId);try{return Object(s.pkVerify)(i,e.getId(),e.userId),Object(s.pkVerify)(a,d(i),e.userId),g.fromUserTrustLevel(o,n,r)}catch(e){return new g(!1,!1,n,r)}}getCacheCallbacks(){return this.cacheCallbacks}}let p;!function(e){e[e.MASTER=4]="MASTER",e[e.USER_SIGNING=2]="USER_SIGNING",e[e.SELF_SIGNING=1]="SELF_SIGNING"}(p||(p={}));class m{constructor(e,t,n){this.crossSigningVerified=e,this.crossSigningVerifiedBefore=t,this.tofu=n}isVerified(){return this.isCrossSigningVerified()}isCrossSigningVerified(){return this.crossSigningVerified}wasCrossSigningVerified(){return this.crossSigningVerifiedBefore}isTofu(){return this.tofu}}class g{constructor(e,t,n,r){this.crossSigningVerified=e,this.tofu=t,this.localVerified=n,this.trustCrossSignedDevices=r}static fromUserTrustLevel(e,t,n){return new g(e.isCrossSigningVerified(),e.isTofu(),t,n)}isVerified(){return Boolean(this.isLocallyVerified()||this.trustCrossSignedDevices&&this.isCrossSigningVerified())}isCrossSigningVerified(){return this.crossSigningVerified}isLocallyVerified(){return this.localVerified}isTofu(){return this.tofu}}function f(e,t){return{getCrossSigningKeyCache:async function(n,o){const i=await new Promise(t=>e.doTxn("readonly",[l.a.STORE_ACCOUNT],r=>{e.getSecretStorePrivateKey(r,t,n)}));if(i&&i.ciphertext){const e=r.from(t._pickleKey),o=await Object(u.b)(i,e,n);return Object(s.decodeBase64)(o)}return i},storeCrossSigningKeyCache:async function(n,o){if(!(o instanceof Uint8Array))throw new Error("storeCrossSigningKeyCache expects Uint8Array, got "+o);const i=r.from(t._pickleKey),a=await Object(u.c)(Object(s.encodeBase64)(o),i,n);return e.doTxn("readwrite",[l.a.STORE_ACCOUNT],t=>{e.storeSecretStorePrivateKey(t,n,a)})}}}async function _(e,t,n){if(e.getUserId()===t)return c.a.log("Cross-signing: Self-verification done; requesting keys"),new Promise((t,r)=>{const o=e,i=o.crypto.crossSigningInfo,a=new h(i.userId,{getCrossSigningKey:async e=>{c.a.debug("Cross-signing: requesting secret",e,n);const{promise:t}=o.requestSecret("m.cross_signing."+e,[n]),r=await t,i=Object(s.decodeBase64)(r);return Uint8Array.from(i)}},i.getCacheCallbacks());a.keys=i.keys;const l=new Promise((e,t)=>{setTimeout(e,6e4,new Error("Timeout"))}),u=(async()=>{if(!await o.crypto.getSessionBackupPrivateKey()){c.a.info("No cached backup key found. Requesting...");const e=o.requestSecret("m.megolm_backup.v1",[n]),t=await e.promise;c.a.info("Got key backup key, decoding...");const r=Object(s.decodeBase64)(t);c.a.info("Decoded backup key, storing..."),o.crypto.storeSessionBackupPrivateKey(Uint8Array.from(r)),c.a.info("Backup key stored. Starting backup restore...");const i=await o.getKeyBackupVersion();o.restoreKeyBackupWithCache(void 0,void 0,i).then(()=>{c.a.info("Backup restored.")})}})();return Promise.race([Promise.all([a.getCrossSigningKey("master"),a.getCrossSigningKey("self_signing"),a.getCrossSigningKey("user_signing"),u]),l]).then(t,r)}).catch(e=>{c.a.warn("Cross-signing: failure while requesting keys:",e)})}}).call(this,n(23),n(24).Buffer)},function(e,t,n){"use strict";(function(e,r){n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return m}));var o=n(377),i=n(260),a=n(135),s=n(96);const c="m.qr_code.show.v1",l="m.qr_code.scan.v1";class u extends o.b{static factory(...e){return new u(...e)}static get NAME(){return"m.reciprocate.v1"}async _doVerification(){if(!this.startEvent)throw new Error("It is not currently possible to start verificationwith this method yet.");const{qrCodeData:e}=this.request;if(this.startEvent.getContent().secret!==e.encodedSharedSecret)throw Object(i.d)();await new Promise((e,t)=>{this.reciprocateQREvent={confirm:e,cancel:()=>t(Object(i.h)())},this.emit("show_reciprocate_qr",this.reciprocateQREvent)});const t={};switch(e.mode){case d:{const n=e.otherUserMasterKey;t["ed25519:"+n]=n;break}case h:{const n=this.request.targetDevice.deviceId;t["ed25519:"+n]=e.otherDeviceKey;break}case p:{const n=e.myMasterKey;t["ed25519:"+n]=n;break}}await this._verifyKeys(this.userId,t,(e,n,r)=>{const o=t[e];if(!o)throw Object(i.d)();if(r!==o)throw s.a.error("key ID from key info does not match"),Object(i.d)();for(const e in n.keys){if(!e.startsWith("ed25519"))continue;const r=t[e];if(!r)throw Object(i.d)();if(n.keys[e]!==r)throw s.a.error("master key does not match"),Object(i.d)()}})}}const d=0,h=1,p=2;class m{constructor(e,t,n,r,o,i){this._sharedSecret=t,this._mode=e,this._otherUserMasterKey=n,this._otherDeviceKey=r,this._myMasterKey=o,this._buffer=i}static async create(e,t){const n=m._generateSharedSecret(),r=m._determineMode(e,t);let o=null,i=null,a=null;if(r===d){o=t.getStoredCrossSigningForUser(e.otherUserId).getId("master")}else if(r===h)i=await m._getOtherDeviceKey(e,t);else if(r===p){const e=t.getUserId();a=t.getStoredCrossSigningForUser(e).getId("master")}const s=m._generateQrData(e,t,r,n,o,i,a),c=m._generateBuffer(s);return new m(r,n,o,i,a,c)}get buffer(){return this._buffer}get mode(){return this._mode}get otherDeviceKey(){return this._otherDeviceKey}get otherUserMasterKey(){return this._otherUserMasterKey}get myMasterKey(){return this._myMasterKey}get encodedSharedSecret(){return this._sharedSecret}static _generateSharedSecret(){const t=new Uint8Array(11);return e.crypto.getRandomValues(t),Object(a.encodeUnpaddedBase64)(t)}static async _getOtherDeviceKey(e,t){const n=t.getUserId(),r=e.targetDevice,o=r?r.deviceId:null,i=t.getStoredDevice(n,o);if(!i)throw new Error("could not find device "+o);return i.getFingerprint()}static _determineMode(e,t){const n=t.getUserId(),r=e.otherUserId;let o=d;if(n===r){o=t.checkUserTrust(n).isCrossSigningVerified()?h:p}return o}static _generateQrData(e,t,n,r,o,i,a){const s=t.getUserId(),c={prefix:"MATRIX",version:2,mode:n,transactionId:e.channel.transactionId,firstKeyB64:"",secondKeyB64:"",secretB64:r},l=t.getStoredCrossSigningForUser(s);return n===d?(c.firstKeyB64=l.getId("master"),c.secondKeyB64=o):n===h?(c.firstKeyB64=l.getId("master"),c.secondKeyB64=i):n===p&&(c.firstKeyB64=t.getDeviceEd25519Key(),c.secondKeyB64=a),c}static _generateBuffer(e){let t=r.alloc(0);const n=e=>{const n=r.from([e]);t=r.concat([t,n])},o=(e,n,o=!0)=>{const i=r.from(e,n);o&&(e=>{const n=r.alloc(2);n.writeInt16BE(e,0),t=r.concat([t,n])})(i.byteLength),t=r.concat([t,i])},i=e=>{const n=Object(a.decodeBase64)(e),o=r.from(n);t=r.concat([t,o])};return o(e.prefix,"ascii",!1),n(e.version),n(e.mode),o(e.transactionId,"utf-8"),i(e.firstKeyB64),i(e.secondKeyB64),i(e.secretB64),t}}}).call(this,n(23),n(24).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(180);async function o(t,n){if(!e.Olm)throw new Error("Olm is not available");if(!t.private_key_salt||!t.private_key_iterations)throw new Error("Salt and/or iterations not found: this backup cannot be restored with a passphrase");return await a(n,t.private_key_salt,t.private_key_iterations,t.private_key_bits||256)}async function i(t){if(!e.Olm)throw new Error("Olm is not available");const n=Object(r.b)(32);return{key:await a(t,n,5e5,256),salt:n,iterations:5e5}}async function a(t,n,r,o=256){const i=e.crypto.subtle,a=e.TextEncoder;if(!i||!a)throw new Error("Password-based backup is not avaiable on this platform");const s=await i.importKey("raw",(new a).encode(t),{name:"PBKDF2"},!1,["deriveBits"]),c=await i.deriveBits({name:"PBKDF2",salt:(new a).encode(n),iterations:r,hash:"SHA-512"},s,o);return new Uint8Array(c)}}).call(this,n(23))},function(e,t,n){"use strict";(function(e,r){n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var o=n(933),i=n.n(o);const a=[139,1];function s(t){const n=new e(a.length+t.length+1);n.set(a,0),n.set(t,a.length);let r=0;for(let e=0;e<n.length-1;++e)r^=n[e];n[n.length-1]=r;return i.a.encode(n).match(/.{1,4}/g).join(" ")}function c(e){const t=i.a.decode(e.replace(/ /g,""));let n=0;for(const e of t)n^=e;if(0!==n)throw new Error("Incorrect parity");for(let e=0;e<a.length;++e)if(t[e]!==a[e])throw new Error("Incorrect prefix");if(t.length!==a.length+r.Olm.PRIVATE_KEY_LENGTH+1)throw new Error("Incorrect length");return Uint8Array.from(t.slice(a.length,a.length+r.Olm.PRIVATE_KEY_LENGTH))}}).call(this,n(24).Buffer,n(23))},function(e,t,n){"use strict";n.r(t),n.d(t,"makeHtmlMessage",(function(){return o})),n.d(t,"makeHtmlNotice",(function(){return i})),n.d(t,"makeHtmlEmote",(function(){return a})),n.d(t,"makeTextMessage",(function(){return s})),n.d(t,"makeNotice",(function(){return c})),n.d(t,"makeEmoteMessage",(function(){return l}));var r=n(93);function o(e,t){return{msgtype:r.b.Text,format:"org.matrix.custom.html",body:e,formatted_body:t}}function i(e,t){return{msgtype:r.b.Notice,format:"org.matrix.custom.html",body:e,formatted_body:t}}function a(e,t){return{msgtype:r.b.Emote,format:"org.matrix.custom.html",body:e,formatted_body:t}}function s(e){return{msgtype:r.b.Text,body:e}}function c(e){return{msgtype:r.b.Notice,body:e}}function l(e){return{msgtype:r.b.Emote,body:e}}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";e.exports=n(949)},function(e,t,n){(function(n){var r,o,i,a,s,c,l,u,d,h,p,m,g,f,_,b,v,y,E,S,w,C,T,x;!function(k){var F="object"==typeof n?n:"object"==typeof self?self:"object"==typeof this?this:{};function O(e,t){return e!==F&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,r){return e[n]=t?t(n,r):r}}void 0===(r=function(e){var t,n;t=O(F,O(e)),n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},o=function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},s=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},c=function(e,t){return function(n,r){t(n,r,e)}},l=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},x=function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},h=function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])},p=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},g=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e},f=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},_=function(e){return this instanceof _?(this.v=e,this):new _(e)},b=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof _?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}},v=function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:_(e[r](t)),done:"return"===r}:o?o(t):t}:o}},y=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}},E=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},S=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},w=function(e){return e&&e.__esModule?e:{default:e}},C=function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},T=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n},t("__extends",o),t("__assign",i),t("__rest",a),t("__decorate",s),t("__param",c),t("__metadata",l),t("__awaiter",u),t("__generator",d),t("__exportStar",h),t("__createBinding",x),t("__values",p),t("__read",m),t("__spread",g),t("__spreadArrays",f),t("__await",_),t("__asyncGenerator",b),t("__asyncDelegator",v),t("__asyncValues",y),t("__makeTemplateObject",E),t("__importStar",S),t("__importDefault",w),t("__classPrivateFieldGet",C),t("__classPrivateFieldSet",T)}.apply(t,[t]))||(e.exports=r)}()}).call(this,n(23))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(193),o=n(209),i=function(e){return e.parentNode?i(e.parentNode):e};t.getAllAffectedNodes=function(e){return o.asArray(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute(r.FOCUS_GROUP);return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var o=r+1;o<n;o+=1){var i=e[r].compareDocumentPosition(e[o]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(o.toArray(i(t).querySelectorAll("["+r.FOCUS_GROUP+'="'+n+'"]:not(['+r.FOCUS_DISABLED+'="disabled"])'))):[t]),e}),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(209),o=n(309),i=n(980),a=n(981);t.filterFocusable=function(e,t){return r.toArray(e).filter((function(e){return o.isVisibleCached(t,e)})).filter((function(e){return o.notHiddenInput(e)}))},t.getTabbableNodes=function(e,n,r){return i.orderByTabIndex(t.filterFocusable(a.getFocusables(e,r),n),!0,r)},t.getAllTabbableNodes=function(e,n){return i.orderByTabIndex(t.filterFocusable(a.getFocusables(e),n),!1)},t.parentAutofocusables=function(e,n){return t.filterFocusable(a.getParentAutofocusables(e),n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.isVisibleCached=function(e,n){var r=e.get(n);if(void 0!==r)return r;var o=function(e,t){return!e||e===document||e&&e.nodeType===Node.DOCUMENT_NODE||!((n=window.getComputedStyle(e,null))&&n.getPropertyValue&&("none"===n.getPropertyValue("display")||"hidden"===n.getPropertyValue("visibility")))&&t(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode);var n}(n,t.isVisibleCached.bind(void 0,e));return e.set(n,o),o},t.notHiddenInput=function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))},t.isGuard=function(e){return Boolean(e&&e.dataset&&e.dataset.focusGuard)},t.isNotAGuard=function(e){return!t.isGuard(e)},t.isDefined=function(e){return Boolean(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deferAction=function(e){var t=window.setImmediate;void 0!==t?t(e):setTimeout(e,1)},t.inlineProp=void 0;t.inlineProp=function(e,t){var n={};return n[e]=t,n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return y}));var r=n(78),o=n.n(r),i=n(80),a=n(388),s=n(151),c=n(84),l=n(365),u=n(172),d=n(121),h=n(91),p=n(83),m=n(82);const g=()=>{p.a.dispatch({action:h.a.SetRightPanelPhase,phase:d.c.PinnedMessages,allowClose:!1})};function f(e){const t=e.getSender(),{entity:n}=e.getPrevContent(),{entity:r,recommendation:o,reason:a}=e.getContent();return r?o&&a?r===n?l.g.includes(e.getType())?()=>Object(i.a)("%(senderName)s updated the rule banning users matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:a}):l.c.includes(e.getType())?()=>Object(i.a)("%(senderName)s updated the rule banning rooms matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:a}):l.f.includes(e.getType())?()=>Object(i.a)("%(senderName)s updated the rule banning servers matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:a}):()=>Object(i.a)("%(senderName)s updated a ban rule matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:a}):n?l.g.includes(e.getType())?()=>Object(i.a)("%(senderName)s changed a rule that was banning users matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",{senderName:t,oldGlob:n,newGlob:r,reason:a}):l.c.includes(e.getType())?()=>Object(i.a)("%(senderName)s changed a rule that was banning rooms matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",{senderName:t,oldGlob:n,newGlob:r,reason:a}):l.f.includes(e.getType())?()=>Object(i.a)("%(senderName)s changed a rule that was banning servers matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",{senderName:t,oldGlob:n,newGlob:r,reason:a}):()=>Object(i.a)("%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",{senderName:t,oldGlob:n,newGlob:r,reason:a}):l.g.includes(e.getType())?()=>Object(i.a)("%(senderName)s created a rule banning users matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:a}):l.c.includes(e.getType())?()=>Object(i.a)("%(senderName)s created a rule banning rooms matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:a}):l.f.includes(e.getType())?()=>Object(i.a)("%(senderName)s created a rule banning servers matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:a}):()=>Object(i.a)("%(senderName)s created a ban rule matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:a}):()=>Object(i.a)("%(senderName)s updated an invalid ban rule",{senderName:t}):l.g.includes(e.getType())?()=>Object(i.a)("%(senderName)s removed the rule banning users matching %(glob)s",{senderName:t,glob:n}):l.c.includes(e.getType())?()=>Object(i.a)("%(senderName)s removed the rule banning rooms matching %(glob)s",{senderName:t,glob:n}):l.f.includes(e.getType())?()=>Object(i.a)("%(senderName)s removed the rule banning servers matching %(glob)s",{senderName:t,glob:n}):()=>Object(i.a)("%(senderName)s removed a ban rule matching %(glob)s",{senderName:t,glob:n})}const _={"m.room.message":function(e){return()=>{const t=e.sender&&e.sender.name?e.sender.name:e.getSender();let n=t+": "+e.getContent().body;return"m.emote"===e.getContent().msgtype?n="* "+t+" "+n:"m.image"===e.getContent().msgtype&&(n=Object(i.a)("%(senderDisplayName)s sent an image.",{senderDisplayName:t})),n}},"m.call.invite":function(e){const t=()=>e.sender?e.sender.name:Object(i.a)("Someone");let n=!0;e.getContent().offer&&e.getContent().offer.sdp&&-1!==e.getContent().offer.sdp.indexOf("m=video")&&(n=!1);const r=m.a.get().supportsVoip();return n&&r?()=>Object(i.a)("%(senderName)s placed a voice call.",{senderName:t()}):n&&!r?()=>Object(i.a)("%(senderName)s placed a voice call. (not supported by this browser)",{senderName:t()}):!n&&r?()=>Object(i.a)("%(senderName)s placed a video call.",{senderName:t()}):n||r?void 0:()=>Object(i.a)("%(senderName)s placed a video call. (not supported by this browser)",{senderName:t()})}},b={"m.room.canonical_alias":function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender(),n=e.getPrevContent().alias,r=e.getPrevContent().alt_aliases||[],o=e.getContent().alias,a=e.getContent().alt_aliases||[],s=r.filter(e=>!a.includes(e)),c=a.filter(e=>!r.includes(e));if(s.length||c.length){if(o!==n)return()=>Object(i.a)("%(senderName)s changed the main and alternative addresses for this room.",{senderName:t});if(c.length&&!s.length)return()=>Object(i.a)("%(senderName)s added the alternative addresses %(addresses)s for this room.",{senderName:t,addresses:c.join(", "),count:c.length});if(s.length&&!c.length)return()=>Object(i.a)("%(senderName)s removed the alternative addresses %(addresses)s for this room.",{senderName:t,addresses:s.join(", "),count:s.length});if(s.length&&c.length)return()=>Object(i.a)("%(senderName)s changed the alternative addresses for this room.",{senderName:t})}else{if(o)return()=>Object(i.a)("%(senderName)s set the main address for this room to %(address)s.",{senderName:t,address:e.getContent().alias});if(n)return()=>Object(i.a)("%(senderName)s removed the main address for this room.",{senderName:t})}return()=>Object(i.a)("%(senderName)s changed the addresses for this room.",{senderName:t})},"m.room.name":function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender();return e.getContent().name&&0!==e.getContent().name.trim().length?e.getPrevContent().name?()=>Object(i.a)("%(senderDisplayName)s changed the room name from %(oldRoomName)s to %(newRoomName)s.",{senderDisplayName:t,oldRoomName:e.getPrevContent().name,newRoomName:e.getContent().name}):()=>Object(i.a)("%(senderDisplayName)s changed the room name to %(roomName)s.",{senderDisplayName:t,roomName:e.getContent().name}):()=>Object(i.a)("%(senderDisplayName)s removed the room name.",{senderDisplayName:t})},"m.room.topic":function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender();return()=>Object(i.a)('%(senderDisplayName)s changed the topic to "%(topic)s".',{senderDisplayName:t,topic:e.getContent().topic})},"m.room.member":function(e,t,n){const r=e.sender?e.sender.name:e.getSender(),o=e.target?e.target.name:e.getStateKey(),a=e.getPrevContent(),s=e.getContent(),l=s.reason;switch(s.membership){case"invite":{const e=s.third_party_invite;return e?e.display_name?()=>Object(i.a)("%(targetName)s accepted the invitation for %(displayName)s",{targetName:o,displayName:e.display_name}):()=>Object(i.a)("%(targetName)s accepted an invitation",{targetName:o}):()=>Object(i.a)("%(senderName)s invited %(targetName)s",{senderName:r,targetName:o})}case"ban":return()=>l?Object(i.a)("%(senderName)s banned %(targetName)s: %(reason)s",{senderName:r,targetName:o,reason:l}):Object(i.a)("%(senderName)s banned %(targetName)s",{senderName:r,targetName:o});case"join":return a&&"join"===a.membership?a.displayname&&s.displayname&&a.displayname!==s.displayname?()=>Object(i.a)("%(oldDisplayName)s changed their display name to %(displayName)s",{oldDisplayName:a.displayname,displayName:s.displayname}):!a.displayname&&s.displayname?()=>Object(i.a)("%(senderName)s set their display name to %(displayName)s",{senderName:e.getSender(),displayName:s.displayname}):a.displayname&&!s.displayname?()=>Object(i.a)("%(senderName)s removed their display name (%(oldDisplayName)s)",{senderName:r,oldDisplayName:a.displayname}):a.avatar_url&&!s.avatar_url?()=>Object(i.a)("%(senderName)s removed their profile picture",{senderName:r}):a.avatar_url&&s.avatar_url&&a.avatar_url!==s.avatar_url?()=>Object(i.a)("%(senderName)s changed their profile picture",{senderName:r}):!a.avatar_url&&s.avatar_url?()=>Object(i.a)("%(senderName)s set a profile picture",{senderName:r}):(null!=n?n:c.b.getValue("showHiddenEventsInTimeline"))?()=>Object(i.a)("%(senderName)s made no change",{senderName:r}):null:(e.target||console.warn("Join message has no target! -- "+e.getContent().state_key),()=>Object(i.a)("%(targetName)s joined the room",{targetName:o}));case"leave":return e.getSender()===e.getStateKey()?"invite"===a.membership?()=>Object(i.a)("%(targetName)s rejected the invitation",{targetName:o}):()=>l?Object(i.a)("%(targetName)s left the room: %(reason)s",{targetName:o,reason:l}):Object(i.a)("%(targetName)s left the room",{targetName:o}):"ban"===a.membership?()=>Object(i.a)("%(senderName)s unbanned %(targetName)s",{senderName:r,targetName:o}):"invite"===a.membership?()=>l?Object(i.a)("%(senderName)s withdrew %(targetName)s's invitation: %(reason)s",{senderName:r,targetName:o,reason:l}):Object(i.a)("%(senderName)s withdrew %(targetName)s's invitation",{senderName:r,targetName:o}):"join"===a.membership?()=>l?Object(i.a)("%(senderName)s kicked %(targetName)s: %(reason)s",{senderName:r,targetName:o,reason:l}):Object(i.a)("%(senderName)s kicked %(targetName)s",{senderName:r,targetName:o}):null}},"m.room.third_party_invite":function(e){const t=e.sender?e.sender.name:e.getSender();return Object(s.c)(e)?()=>Object(i.a)("%(senderName)s sent an invitation to %(targetDisplayName)s to join the room.",{senderName:t,targetDisplayName:e.getContent().display_name}):()=>Object(i.a)("%(senderName)s revoked the invitation for %(targetDisplayName)s to join the room.",{senderName:t,targetDisplayName:e.getPrevContent().display_name||Object(i.a)("Someone")})},"m.room.history_visibility":function(e){const t=e.sender?e.sender.name:e.getSender();switch(e.getContent().history_visibility){case"invited":return()=>Object(i.a)("%(senderName)s made future room history visible to all room members, from the point they are invited.",{senderName:t});case"joined":return()=>Object(i.a)("%(senderName)s made future room history visible to all room members, from the point they joined.",{senderName:t});case"shared":return()=>Object(i.a)("%(senderName)s made future room history visible to all room members.",{senderName:t});case"world_readable":return()=>Object(i.a)("%(senderName)s made future room history visible to anyone.",{senderName:t});default:return()=>Object(i.a)("%(senderName)s made future room history visible to unknown (%(visibility)s).",{senderName:t,visibility:e.getContent().history_visibility})}},"m.room.power_levels":function(e){const t=e.sender?e.sender.name:e.getSender();if(!(e.getPrevContent()&&e.getPrevContent().users&&e.getContent()&&e.getContent().users))return null;const n=e.getPrevContent().users_default||0,r=e.getContent().users_default||0,o=[];Object.keys(e.getContent().users).forEach(e=>{-1===o.indexOf(e)&&o.push(e)}),Object.keys(e.getPrevContent().users).forEach(e=>{-1===o.indexOf(e)&&o.push(e)});const s=[];return o.forEach(t=>{let o=e.getPrevContent().users[t];Number.isInteger(o)||(o=n);let i=e.getContent().users[t];Number.isInteger(i)||(i=r),o===n&&i===r||i!==o&&s.push({userId:t,from:o,to:i})}),s.length?()=>Object(i.a)("%(senderName)s changed the power level of %(powerLevelDiffText)s.",{senderName:t,powerLevelDiffText:s.map(e=>Object(i.a)("%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s",{userId:e.userId,fromPowerLevel:a.b(e.from,n),toPowerLevel:a.b(e.to,r)})).join(", ")}):null},"m.room.pinned_events":function(e,t){if(!c.b.getValue("feature_pinning"))return null;const n=e.sender?e.sender.name:e.getSender();return t?()=>o.a.createElement("span",null,Object(i.a)("%(senderName)s changed the <a>pinned messages</a> for the room.",{senderName:n},{a:e=>o.a.createElement("a",{onClick:g}," ",e," ")})):()=>Object(i.a)("%(senderName)s changed the pinned messages for the room.",{senderName:n})},"m.room.server_acl":function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender(),n=e.getPrevContent(),r=e.getContent(),o=Array.isArray(n.deny)?n.deny:[],a=Array.isArray(n.allow)?n.allow:[];n.allow_ip_literals;let s=null;return s=0===o.length&&0===a.length?()=>Object(i.a)("%(senderDisplayName)s set the server ACLs for this room.",{senderDisplayName:t}):()=>Object(i.a)("%(senderDisplayName)s changed the server ACLs for this room.",{senderDisplayName:t}),Array.isArray(r.allow)||(r.allow=[]),0===r.allow.length?()=>s()+" "+Object(i.a)("🎉 All servers are banned from participating! This room can no longer be used."):s},"m.room.tombstone":function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender();return()=>Object(i.a)("%(senderDisplayName)s upgraded this room.",{senderDisplayName:t})},"m.room.join_rules":function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender();switch(e.getContent().join_rule){case"public":return()=>Object(i.a)("%(senderDisplayName)s made the room public to whoever knows the link.",{senderDisplayName:t});case"invite":return()=>Object(i.a)("%(senderDisplayName)s made the room invite only.",{senderDisplayName:t});default:return()=>Object(i.a)("%(senderDisplayName)s changed the join rule to %(rule)s",{senderDisplayName:t,rule:e.getContent().join_rule})}},"m.room.guest_access":function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender();switch(e.getContent().guest_access){case"can_join":return()=>Object(i.a)("%(senderDisplayName)s has allowed guests to join the room.",{senderDisplayName:t});case"forbidden":return()=>Object(i.a)("%(senderDisplayName)s has prevented guests from joining the room.",{senderDisplayName:t});default:return()=>Object(i.a)("%(senderDisplayName)s changed guest access to %(rule)s",{senderDisplayName:t,rule:e.getContent().guest_access})}},"m.room.related_groups":function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender(),n=e.getContent().groups||[],r=e.getPrevContent().groups||[],o=n.filter(e=>!r.includes(e)),a=r.filter(e=>!n.includes(e));return o.length&&!a.length?()=>Object(i.a)("%(senderDisplayName)s enabled flair for %(groups)s in this room.",{senderDisplayName:t,groups:o.join(", ")}):!o.length&&a.length?()=>Object(i.a)("%(senderDisplayName)s disabled flair for %(groups)s in this room.",{senderDisplayName:t,groups:a.join(", ")}):o.length&&a.length?()=>Object(i.a)("%(senderDisplayName)s enabled flair for %(newGroups)s and disabled flair for %(oldGroups)s in this room.",{senderDisplayName:t,newGroups:o.join(", "),oldGroups:a.join(", ")}):null},"im.vector.modular.widgets":function(e){const t=e.getSender(),{name:n,type:r,url:o}=e.getPrevContent(),{name:a,type:s,url:c}=e.getContent()||{};let l=a||n||s||r||"";return l&&l.length>0&&(l=l[0].toUpperCase()+l.slice(1)),c?o?()=>Object(i.a)("%(widgetName)s widget modified by %(senderName)s",{widgetName:l,senderName:t}):()=>Object(i.a)("%(widgetName)s widget added by %(senderName)s",{widgetName:l,senderName:t}):()=>Object(i.a)("%(widgetName)s widget removed by %(senderName)s",{widgetName:l,senderName:t})},[u.c]:function(e){var t;const n=(null===(t=e.sender)||void 0===t?void 0:t.name)||e.getSender();return()=>Object(i.a)("%(senderName)s has updated the widget layout",{senderName:n})}};for(const e of l.a)b[e]=f;function v(e,t){const n=(e.isState()?b:_)[e.getType()];return Boolean(null==n?void 0:n(e,!1,t))}function y(e,t=!1,n){var r;const o=(e.isState()?b:_)[e.getType()];return(null==o||null===(r=o(e,t,n))||void 0===r?void 0:r())||""}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(79),o=n.n(r),i=n(259),a=n(2),s=n(82),c=n(265),l=n(123),u=n(80),d=n(87),h=n(84),p=n(550);let m;!function(e){e.Invited="invited",e.Error="error"}(m||(m={}));const g=["M_NOT_FOUND","M_USER_NOT_FOUND","M_PROFILE_UNDISCLOSED","M_PROFILE_NOT_FOUND"];class f{constructor(e){o()(this,"roomId",void 0),o()(this,"groupId",void 0),o()(this,"canceled",!1),o()(this,"addresses",[]),o()(this,"busy",!1),o()(this,"_fatal",!1),o()(this,"completionStates",{}),o()(this,"errors",{}),o()(this,"deferred",null),o()(this,"reason",null),"+"===e[0]?(this.roomId=null,this.groupId=e):(this.roomId=e,this.groupId=null)}get fatal(){return this._fatal}invite(e,t){if(this.addresses.length>0)throw new Error("Already inviting/invited");this.addresses.push(...e),this.reason=t;for(const e of this.addresses)null===Object(c.c)(e)&&(this.completionStates[e]=m.Error,this.errors[e]={errcode:"M_INVALID",errorText:Object(u.a)("Unrecognised address")});return this.deferred=Object(a.l)(),this.inviteMore(0),this.deferred.promise}cancel(){this.busy&&(this.canceled=!0,this.deferred.reject(new Error("canceled")))}getCompletionState(e){return this.completionStates[e]}getErrorText(e){return this.errors[e]?this.errors[e].errorText:null}async inviteToRoom(e,t,n=!1){const r=Object(c.c)(t);if(r===c.a.Email)return s.a.get().inviteByEmail(e,t);if(r===c.a.MatrixUserId){const r=s.a.get().getRoom(e);if(!r)throw new Error("Room not found");const o=r.getMember(t);if("join"===(null==o?void 0:o.membership))throw new i.c({errcode:"IO.ELEMENT.ALREADY_JOINED",error:"Member already joined"});if("invite"===(null==o?void 0:o.membership))throw new i.c({errcode:"IO.ELEMENT.ALREADY_INVITED",error:"Member already invited"});if(!n&&h.b.getValue("promptBeforeInviteUnknownUsers",this.roomId)){if(!await s.a.get().getProfileInfo(t))throw new Error("User has no profile")}return s.a.get().invite(e,t,void 0,this.reason)}throw new Error("Unsupported address")}doInvite(e,t=!1){return new Promise((n,r)=>{let o;console.log("Inviting "+e),o=null!==this.groupId?l.a.inviteUserToGroup(this.groupId,e):this.inviteToRoom(this.roomId,e,t),o.then(()=>{this.canceled||(this.completionStates[e]=m.Invited,delete this.errors[e],n())}).catch(o=>{if(this.canceled)return;let i;console.error(o);let a=!1;switch(o.errcode){case"M_FORBIDDEN":i=Object(u.a)("You do not have permission to invite people to this room."),a=!0;break;case"IO.ELEMENT.ALREADY_INVITED":i=Object(u.a)("User %(userId)s is already invited to the room",{userId:e});break;case"IO.ELEMENT.ALREADY_JOINED":i=Object(u.a)("User %(userId)s is already in the room",{userId:e});break;case"M_LIMIT_EXCEEDED":return void setTimeout(()=>{this.doInvite(e,t).then(n,r)},5e3);case"M_NOT_FOUND":case"M_USER_NOT_FOUND":i=Object(u.a)("User %(user_id)s does not exist",{user_id:e});break;case"M_PROFILE_UNDISCLOSED":i=Object(u.a)("User %(user_id)s may or may not exist",{user_id:e});break;case"M_PROFILE_NOT_FOUND":if(!t)return console.warn(`User ${e} does not have a profile - inviting anyways automatically`),void this.doInvite(e,!0).then(n,r);break;case"M_BAD_STATE":i=Object(u.a)("The user must be unbanned before they can be invited.");break;case"M_UNSUPPORTED_ROOM_VERSION":i=Object(u.a)("The user's homeserver does not support the version of the room.")}i||(i=Object(u.a)("Unknown server error")),this.completionStates[e]=m.Error,this.errors[e]={errorText:i,errcode:o.errcode},this.busy=!a,this._fatal=a,a?r(o):n()})})}inviteMore(e,t=!1){if(this.canceled)return;if(e===this.addresses.length){if(this.busy=!1,Object.keys(this.errors).length>0&&!this.groupId){const e=Object.keys(this.errors).filter(e=>g.includes(this.errors[e].errcode));if(e.length>0){const t=()=>{const t=e.map(e=>this.doInvite(e,!0));Promise.all(t).then(()=>this.deferred.resolve(this.completionStates))};return h.b.getValue("promptBeforeInviteUnknownUsers",this.roomId)?(console.log("Showing failed to invite dialog..."),void d.a.createTrackedDialog("Failed to invite","",p.a,{unknownProfileUsers:e.map(e=>({userId:e,errorText:this.errors[e].errorText})),onInviteAnyways:()=>t(),onGiveUp:()=>{for(const t of e)this.completionStates[t]=m.Invited;this.deferred.resolve(this.completionStates)}})):void t()}}return void this.deferred.resolve(this.completionStates)}const n=this.addresses[e];null!==Object(c.c)(n)&&this.completionStates[n]!==m.Invited?this.doInvite(n,t).then(()=>{this.inviteMore(e+1,t)}).catch(()=>this.deferred.resolve(this.completionStates)):this.inviteMore(e+1)}}},function(e,t,n){e.exports.Container=n(996),e.exports.MapStore=n(998),e.exports.Mixin=n(1006),e.exports.ReduceStore=n(554),e.exports.Store=n(555)},function(e,t,n){"use strict";async function r(e,t,n){const r=new Promise(r=>{const o=setTimeout(r,n,t);e.then(()=>{clearTimeout(o)})});return Promise.race([e,r])}async function o(e,t,n){let r;for(let o=0;o<t;o++)try{return await e()}catch(e){if(n&&!n(e))throw e;r=e}throw r}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));var r=n(109);function o(e,t){const n=[...e.keys()],o=[...t.keys()],i=Object(r.a)(n,o);return{changed:Object(r.k)(n,o).filter(n=>e.get(n)!==t.get(n)),added:i.added,removed:i.removed}}class i extends Map{constructor(e){super(e)}getOrCreate(e,t){return this.has(e)?this.get(e):(this.set(e,t),t)}remove(e){const t=this.get(e);return this.delete(e),t}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"g",(function(){return f}));var r=n(82),o=n(230);const i="all_messages_loud",a="all_messages",s="mentions_only",c="mute",l=[a,i],u=[...l,s];function d(e){return l.includes(e)}function h(e){return u.includes(e)}function p(e){return e.reduce((e,t)=>{const n=m(t.roomId),r=t.getUnreadNotificationCount("highlight")>0,o=f(t),i=o>0&&d(n),a=r&&h(n);return(i||a)&&(e.count+=o,r&&(e.highlight=!0)),e},{count:0,highlight:!1})}function m(e){if(r.a.get().isGuest())return a;if(_(e))return c;let t=null;try{t=r.a.get().getRoomPushRule("global",e)}catch(e){return null}if(!t||!t.enabled)return a;if(v(t))return s;return o.a.actionListToActionsObject(t.actions).tweaks.sound?i:null}function g(e,t){return t===c?function(e){const t=r.a.get(),n=[],o=t.getRoomPushRule("global",e);o&&n.push(t.deletePushRule("global","room",o.rule_id));return n.push(t.addPushRule("global","override",e,{conditions:[{kind:"event_match",key:"room_id",pattern:e}],actions:["dont_notify"]})),Promise.all(n)}(e):function(e,t){const n=r.a.get(),o=[],i=_(e);i&&o.push(n.deletePushRule("global","override",i.rule_id));if("all_messages"===t){const t=n.getRoomPushRule("global",e);t&&o.push(n.deletePushRule("global","room",t.rule_id))}else"mentions_only"===t?(o.push(n.addPushRule("global","room",e,{actions:["dont_notify"]})),o.push(n.setPushRuleEnabled("global","room",e,!0))):(o.push(n.addPushRule("global","room",e,{actions:["notify",{set_tweak:"sound",value:"default"}]})),o.push(n.setPushRuleEnabled("global","room",e,!0)));return Promise.all(o)}(e,t)}function f(e,t=null){let n=e.getUnreadNotificationCount(t);const o=e.currentState.getStateEvents("m.room.create","");if(o&&o.getContent().predecessor){const e=o.getContent().predecessor.room_id,t=r.a.get().getRoom(e);t&&(n+=t.getUnreadNotificationCount("highlight"))}return n}function _(e){const t=r.a.get();if(!t.pushRules||!t.pushRules.global||!t.pushRules.global.override)return null;for(const n of t.pushRules.global.override)if(b(e,n)&&v(n)&&n.enabled)return n;return null}function b(e,t){if(1!==t.conditions.length)return!1;const n=t.conditions[0];return"event_match"===n.kind&&"room_id"===n.key&&n.pattern===e}function v(e){return 1===e.actions.length&&"dont_notify"===e.actions[0]}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,o(n(1011),t),o(n(1015),t),o(n(1016),t),o(n(581),t),o(n(1017),t),o(n(1018),t);var i=n(146);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return i.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return i.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return i.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return i.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return i.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return i.hasChildren}})},function(e,t,n){"use strict";const r=n(1031),o=n(400),i=n(1032),a=n(401),s=o.CODE_POINTS,c=o.CODE_POINT_SEQUENCES,l={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},u="DATA_STATE";function d(e){return e===s.SPACE||e===s.LINE_FEED||e===s.TABULATION||e===s.FORM_FEED}function h(e){return e>=s.DIGIT_0&&e<=s.DIGIT_9}function p(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_Z}function m(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_Z}function g(e){return m(e)||p(e)}function f(e){return g(e)||h(e)}function _(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_F}function b(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_F}function v(e){return e+32}function y(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function E(e){return String.fromCharCode(v(e))}function S(e,t){const n=i[++e];let r=++e,o=r+n-1;for(;r<=o;){const e=r+o>>>1,a=i[e];if(a<t)r=e+1;else{if(!(a>t))return i[e+n];o=e-1}}return-1}class w{constructor(){this.preprocessor=new r,this.tokenQueue=[],this.allowCDATA=!1,this.state=u,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:w.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,o=!0;const i=e.length;let a=0,c=t,l=void 0;for(;a<i;a++){if(a>0&&(c=this._consume(),r++),c===s.EOF){o=!1;break}if(l=e[a],c!==l&&(n||c!==v(l))){o=!1;break}}if(!o)for(;r--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==c.SCRIPT_STRING.length)return!1;for(let e=0;e<this.tempBuff.length;e++)if(this.tempBuff[e]!==c.SCRIPT_STRING[e])return!1;return!0}_createStartTagToken(){this.currentToken={type:w.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:w.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:w.COMMENT_TOKEN,data:""}}_createDoctypeToken(e){this.currentToken={type:w.DOCTYPE_TOKEN,name:e,forceQuirks:!1,publicId:null,systemId:null}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t}}_createEOFToken(){this.currentToken={type:w.EOF_TOKEN}}_createAttr(e){this.currentAttr={name:e,value:""}}_leaveAttrName(e){null===w.getTokenAttr(this.currentToken,this.currentAttr.name)?this.currentToken.attrs.push(this.currentAttr):this._err(a.duplicateAttribute),this.state=e}_leaveAttrValue(e){this.state=e}_emitCurrentToken(){this._emitCurrentCharacterToken();const e=this.currentToken;this.currentToken=null,e.type===w.START_TAG_TOKEN?this.lastStartTagName=e.tagName:e.type===w.END_TAG_TOKEN&&(e.attrs.length>0&&this._err(a.endTagWithAttributes),e.selfClosing&&this._err(a.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=w.CHARACTER_TOKEN;d(e)?t=w.WHITESPACE_CHARACTER_TOKEN:e===s.NULL&&(t=w.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,y(e))}_emitSeveralCodePoints(e){for(let t=0;t<e.length;t++)this._emitCodePoint(e[t])}_emitChars(e){this._appendCharToCurrentCharacterToken(w.CHARACTER_TOKEN,e)}_matchNamedCharacterReference(e){let t=null,n=1,r=S(0,e);for(this.tempBuff.push(e);r>-1;){const e=i[r],o=e<7;o&&1&e&&(t=2&e?[i[++r],i[++r]]:[i[++r]],n=0);const a=this._consume();if(this.tempBuff.push(a),n++,a===s.EOF)break;r=o?4&e?S(r,a):-1:a===e?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_UNQUOTED_STATE"===this.returnState}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===s.EQUALS_SIGN||f(e)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e<this.tempBuff.length;e++)this.currentAttr.value+=y(this.tempBuff[e]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[u](e){this.preprocessor.dropParsedChunk(),e===s.LESS_THAN_SIGN?this.state="TAG_OPEN_STATE":e===s.AMPERSAND?(this.returnState=u,this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitCodePoint(e)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}RCDATA_STATE(e){this.preprocessor.dropParsedChunk(),e===s.AMPERSAND?(this.returnState="RCDATA_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.LESS_THAN_SIGN?this.state="RCDATA_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}RAWTEXT_STATE(e){this.preprocessor.dropParsedChunk(),e===s.LESS_THAN_SIGN?this.state="RAWTEXT_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}SCRIPT_DATA_STATE(e){this.preprocessor.dropParsedChunk(),e===s.LESS_THAN_SIGN?this.state="SCRIPT_DATA_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}PLAINTEXT_STATE(e){this.preprocessor.dropParsedChunk(),e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}TAG_OPEN_STATE(e){e===s.EXCLAMATION_MARK?this.state="MARKUP_DECLARATION_OPEN_STATE":e===s.SOLIDUS?this.state="END_TAG_OPEN_STATE":g(e)?(this._createStartTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===s.QUESTION_MARK?(this._err(a.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE")):e===s.EOF?(this._err(a.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(a.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(u))}END_TAG_OPEN_STATE(e){g(e)?(this._createEndTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===s.GREATER_THAN_SIGN?(this._err(a.missingEndTagName),this.state=u):e===s.EOF?(this._err(a.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(a.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"))}TAG_NAME_STATE(e){d(e)?this.state="BEFORE_ATTRIBUTE_NAME_STATE":e===s.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):p(e)?this.currentToken.tagName+=E(e):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.tagName+=o.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=y(e)}RCDATA_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="RCDATA_END_TAG_OPEN_STATE"):(this._emitChars("<"),this._reconsumeInState("RCDATA_STATE"))}RCDATA_END_TAG_OPEN_STATE(e){g(e)?(this._createEndTagToken(),this._reconsumeInState("RCDATA_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("RCDATA_STATE"))}RCDATA_END_TAG_NAME_STATE(e){if(p(e))this.currentToken.tagName+=E(e),this.tempBuff.push(e);else if(m(e))this.currentToken.tagName+=y(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(d(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===s.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===s.GREATER_THAN_SIGN)return this.state=u,void this._emitCurrentToken()}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RCDATA_STATE")}}RAWTEXT_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="RAWTEXT_END_TAG_OPEN_STATE"):(this._emitChars("<"),this._reconsumeInState("RAWTEXT_STATE"))}RAWTEXT_END_TAG_OPEN_STATE(e){g(e)?(this._createEndTagToken(),this._reconsumeInState("RAWTEXT_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("RAWTEXT_STATE"))}RAWTEXT_END_TAG_NAME_STATE(e){if(p(e))this.currentToken.tagName+=E(e),this.tempBuff.push(e);else if(m(e))this.currentToken.tagName+=y(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(d(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===s.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RAWTEXT_STATE")}}SCRIPT_DATA_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_END_TAG_OPEN_STATE"):e===s.EXCLAMATION_MARK?(this.state="SCRIPT_DATA_ESCAPE_START_STATE",this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_STATE"))}SCRIPT_DATA_END_TAG_OPEN_STATE(e){g(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("SCRIPT_DATA_STATE"))}SCRIPT_DATA_END_TAG_NAME_STATE(e){if(p(e))this.currentToken.tagName+=E(e),this.tempBuff.push(e);else if(m(e))this.currentToken.tagName+=y(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(d(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===s.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_STATE")}}SCRIPT_DATA_ESCAPE_START_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPE_START_DASH_STATE",this._emitChars("-")):this._reconsumeInState("SCRIPT_DATA_STATE")}SCRIPT_DATA_ESCAPE_START_DASH_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):this._reconsumeInState("SCRIPT_DATA_STATE")}SCRIPT_DATA_ESCAPED_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_STATE",this._emitChars("-")):e===s.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}SCRIPT_DATA_ESCAPED_DASH_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):e===s.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_ESCAPED_DASH_DASH_STATE(e){e===s.HYPHEN_MINUS?this._emitChars("-"):e===s.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===s.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChars(">")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):g(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE(e){g(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE(e){if(p(e))this.currentToken.tagName+=E(e),this.tempBuff.push(e);else if(m(e))this.currentToken.tagName+=y(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(d(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===s.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")}}SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_DOUBLE_ESCAPED_STATE":"SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e)):p(e)?(this.tempBuff.push(v(e)),this._emitCodePoint(e)):m(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")}SCRIPT_DATA_DOUBLE_ESCAPED_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",this._emitChars("-")):e===s.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):e===s.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE(e){e===s.HYPHEN_MINUS?this._emitChars("-"):e===s.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===s.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChars(">")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(o.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChars("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):p(e)?(this.tempBuff.push(v(e)),this._emitCodePoint(e)):m(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}BEFORE_ATTRIBUTE_NAME_STATE(e){d(e)||(e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===s.EQUALS_SIGN?(this._err(a.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}ATTRIBUTE_NAME_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===s.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):p(e)?this.currentAttr.name+=E(e):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN?(this._err(a.unexpectedCharacterInAttributeName),this.currentAttr.name+=y(e)):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.name+=o.REPLACEMENT_CHARACTER):this.currentAttr.name+=y(e)}AFTER_ATTRIBUTE_NAME_STATE(e){d(e)||(e===s.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===s.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}BEFORE_ATTRIBUTE_VALUE_STATE(e){d(e)||(e===s.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===s.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":e===s.GREATER_THAN_SIGN?(this._err(a.missingAttributeValue),this.state=u,this._emitCurrentToken()):this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"))}ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=y(e)}ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=y(e)}ATTRIBUTE_VALUE_UNQUOTED_STATE(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_UNQUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN||e===s.EQUALS_SIGN||e===s.GRAVE_ACCENT?(this._err(a.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=y(e)):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=y(e)}AFTER_ATTRIBUTE_VALUE_QUOTED_STATE(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===s.SOLIDUS?this._leaveAttrValue("SELF_CLOSING_START_TAG_STATE"):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.missingWhitespaceBetweenAttributes),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}SELF_CLOSING_START_TAG_STATE(e){e===s.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.unexpectedSolidusInTag),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}BOGUS_COMMENT_STATE(e){e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=o.REPLACEMENT_CHARACTER):this.currentToken.data+=y(e)}MARKUP_DECLARATION_OPEN_STATE(e){this._consumeSequenceIfMatch(c.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state="COMMENT_START_STATE"):this._consumeSequenceIfMatch(c.DOCTYPE_STRING,e,!1)?this.state="DOCTYPE_STATE":this._consumeSequenceIfMatch(c.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state="CDATA_SECTION_STATE":(this._err(a.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state="BOGUS_COMMENT_STATE"):this._ensureHibernation()||(this._err(a.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"))}COMMENT_START_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_START_DASH_STATE":e===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):this._reconsumeInState("COMMENT_STATE")}COMMENT_START_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}COMMENT_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_DASH_STATE":e===s.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state="COMMENT_LESS_THAN_SIGN_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=o.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=y(e)}COMMENT_LESS_THAN_SIGN_STATE(e){e===s.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state="COMMENT_LESS_THAN_SIGN_BANG_STATE"):e===s.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState("COMMENT_STATE")}COMMENT_LESS_THAN_SIGN_BANG_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE":this._reconsumeInState("COMMENT_STATE")}COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE":this._reconsumeInState("COMMENT_END_DASH_STATE")}COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE(e){e!==s.GREATER_THAN_SIGN&&e!==s.EOF&&this._err(a.nestedComment),this._reconsumeInState("COMMENT_END_STATE")}COMMENT_END_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}COMMENT_END_STATE(e){e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EXCLAMATION_MARK?this.state="COMMENT_END_BANG_STATE":e===s.HYPHEN_MINUS?this.currentToken.data+="-":e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState("COMMENT_STATE"))}COMMENT_END_BANG_STATE(e){e===s.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state="COMMENT_END_DASH_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.incorrectlyClosedComment),this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState("COMMENT_STATE"))}DOCTYPE_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_NAME_STATE":e===s.GREATER_THAN_SIGN?this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"):e===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingWhitespaceBeforeDoctypeName),this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"))}BEFORE_DOCTYPE_NAME_STATE(e){d(e)||(p(e)?(this._createDoctypeToken(E(e)),this.state="DOCTYPE_NAME_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this._createDoctypeToken(o.REPLACEMENT_CHARACTER),this.state="DOCTYPE_NAME_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(y(e)),this.state="DOCTYPE_NAME_STATE"))}DOCTYPE_NAME_STATE(e){d(e)?this.state="AFTER_DOCTYPE_NAME_STATE":e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):p(e)?this.currentToken.name+=E(e):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.name+=o.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=y(e)}AFTER_DOCTYPE_NAME_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(c.PUBLIC_STRING,e,!1)?this.state="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE":this._consumeSequenceIfMatch(c.SYSTEM_STRING,e,!1)?this.state="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE":this._ensureHibernation()||(this._err(a.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){d(e)||(e===s.QUOTATION_MARK?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=o.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=y(e)}DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=o.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=y(e)}AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){d(e)?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){d(e)||(e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=o.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=y(e)}DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=o.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=y(e)}AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}BOGUS_DOCTYPE_STATE(e){e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===s.NULL?this._err(a.unexpectedNullCharacter):e===s.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}CDATA_SECTION_STATE(e){e===s.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_BRACKET_STATE":e===s.EOF?(this._err(a.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}CDATA_SECTION_BRACKET_STATE(e){e===s.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_END_STATE":(this._emitChars("]"),this._reconsumeInState("CDATA_SECTION_STATE"))}CDATA_SECTION_END_STATE(e){e===s.GREATER_THAN_SIGN?this.state=u:e===s.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState("CDATA_SECTION_STATE"))}CHARACTER_REFERENCE_STATE(e){this.tempBuff=[s.AMPERSAND],e===s.NUMBER_SIGN?(this.tempBuff.push(e),this.state="NUMERIC_CHARACTER_REFERENCE_STATE"):f(e)?this._reconsumeInState("NAMED_CHARACTER_REFERENCE_STATE"):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}NAMED_CHARACTER_REFERENCE_STATE(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[s.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===s.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(a.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state="AMBIGUOS_AMPERSAND_STATE"}AMBIGUOS_AMPERSAND_STATE(e){f(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=y(e):this._emitCodePoint(e):(e===s.SEMICOLON&&this._err(a.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}NUMERIC_CHARACTER_REFERENCE_STATE(e){this.charRefCode=0,e===s.LATIN_SMALL_X||e===s.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE"):this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_START_STATE")}HEXADEMICAL_CHARACTER_REFERENCE_START_STATE(e){!function(e){return h(e)||_(e)||b(e)}(e)?(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState("HEXADEMICAL_CHARACTER_REFERENCE_STATE")}DECIMAL_CHARACTER_REFERENCE_START_STATE(e){h(e)?this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_STATE"):(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}HEXADEMICAL_CHARACTER_REFERENCE_STATE(e){_(e)?this.charRefCode=16*this.charRefCode+e-55:b(e)?this.charRefCode=16*this.charRefCode+e-87:h(e)?this.charRefCode=16*this.charRefCode+e-48:e===s.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}DECIMAL_CHARACTER_REFERENCE_STATE(e){h(e)?this.charRefCode=10*this.charRefCode+e-48:e===s.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}NUMERIC_CHARACTER_REFERENCE_END_STATE(){if(this.charRefCode===s.NULL)this._err(a.nullCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(a.characterReferenceOutsideUnicodeRange),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(o.isSurrogate(this.charRefCode))this._err(a.surrogateCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(o.isUndefinedCodePoint(this.charRefCode))this._err(a.noncharacterCharacterReference);else if(o.isControlCodePoint(this.charRefCode)||this.charRefCode===s.CARRIAGE_RETURN){this._err(a.controlCharacterReference);const e=l[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}w.CHARACTER_TOKEN="CHARACTER_TOKEN",w.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",w.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",w.START_TAG_TOKEN="START_TAG_TOKEN",w.END_TAG_TOKEN="END_TAG_TOKEN",w.COMMENT_TOKEN="COMMENT_TOKEN",w.DOCTYPE_TOKEN="DOCTYPE_TOKEN",w.EOF_TOKEN="EOF_TOKEN",w.HIBERNATION_TOKEN="HIBERNATION_TOKEN",w.MODE={DATA:u,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},w.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=w},function(e,t,n){"use strict";t.__esModule=!0,t.inherits=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var o in n)r[o]=n[o];return r.constructor=t,t.prototype=r,t}},function(e,t,n){const r=n(214),o=n(1064),{klona:i}=n(1065),{isPlainObject:a}=n(1066),s=n(1067),c=n(1068),{parse:l}=n(1069),u=["img","audio","video","picture","svg","object","map","iframe","embed"],d=["script","style"];function h(e,t){e&&Object.keys(e).forEach((function(n){t(e[n],n)}))}function p(e,t){return{}.hasOwnProperty.call(e,t)}function m(e,t){const n=[];return h(e,(function(e){t(e)&&n.push(e)})),n}e.exports=f;const g=/^[^\0\t\n\f\r /<=>]+$/;function f(e,t,n){let b="",v="";function y(e,t){const n=this;this.tag=e,this.attribs=t||{},this.tagPosition=b.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(O.length){O[O.length-1].text+=n.text}},this.updateParentNodeMediaChildren=function(){if(O.length&&u.includes(this.tag)){O[O.length-1].mediaChildren.push(this.tag)}}}(t=Object.assign({},f.defaults,t)).parser=Object.assign({},_,t.parser),d.forEach((function(e){t.allowedTags&&t.allowedTags.indexOf(e)>-1&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const E=t.nonTextTags||["script","style","textarea","option"];let S,w;t.allowedAttributes&&(S={},w={},h(t.allowedAttributes,(function(e,t){S[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(o(e).replace(/\\\*/g,".*")):S[t].push(e)})),n.length&&(w[t]=new RegExp("^("+n.join("|")+")$"))})));const C={},T={};h(t.allowedClasses,(function(e,t){S&&(p(S,t)||(S[t]=[]),S[t].push("class")),C[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(o(e).replace(/\\\*/g,".*")):C[t].push(e)})),n.length&&(T[t]=new RegExp("^("+n.join("|")+")$"))}));const x={};let k,F,O,R,D,I,A;h(t.transformTags,(function(e,t){let n;"function"==typeof e?n=e:"string"==typeof e&&(n=f.simpleTransform(e)),"*"===t?k=n:x[t]=n}));let N=!1;P();const M=new r.Parser({onopentag:function(e,n){if(t.enforceHtmlBoundary&&"html"===e&&P(),I)return void A++;const r=new y(e,n);O.push(r);let o=!1;const u=!!r.text;let d;if(p(x,e)&&(d=x[e](e,n),r.attribs=n=d.attribs,void 0!==d.text&&(r.innerText=d.text),e!==d.tagName&&(r.name=e=d.tagName,D[F]=d.tagName)),k&&(d=k(e,n),r.attribs=n=d.attribs,e!==d.tagName&&(r.name=e=d.tagName,D[F]=d.tagName)),(t.allowedTags&&-1===t.allowedTags.indexOf(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(p(e,t))return!1;return!0}(R)||null!=t.nestingLimit&&F>=t.nestingLimit)&&(o=!0,R[F]=!0,"discard"===t.disallowedTagsMode&&-1!==E.indexOf(e)&&(I=!0,A=1),R[F]=!0),F++,o){if("discard"===t.disallowedTagsMode)return;v=b,b=""}b+="<"+e,(!S||p(S,e)||S["*"])&&h(n,(function(n,o){if(!g.test(o))return void delete r.attribs[o];let u,d=!1;if(!S||p(S,e)&&-1!==S[e].indexOf(o)||S["*"]&&-1!==S["*"].indexOf(o)||p(w,e)&&w[e].test(o)||w["*"]&&w["*"].test(o))d=!0;else if(S&&S[e])for(const t of S[e])if(a(t)&&t.name&&t.name===o){d=!0;let e="";if(!0===t.multiple){const r=n.split(" ");for(const n of r)-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n)}else t.values.indexOf(n)>=0&&(e=n);n=e}if(d){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(o)&&j(e,n))return void delete r.attribs[o];if("iframe"===e&&"src"===o){let e=!0;try{if((n=n.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let r="relative://relative-site";for(let e=0;e<100;e++)r+="/"+e;const o=new URL(n,r);if(o&&"relative-site"===o.hostname&&"relative:"===o.protocol)e=p(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const n=(t.allowedIframeHostnames||[]).find((function(e){return e===o.hostname})),r=(t.allowedIframeDomains||[]).find((function(e){return o.hostname===e||o.hostname.endsWith("."+e)}));e=n||r}}catch(t){e=!1}if(!e)return void delete r.attribs[o]}if("srcset"===o)try{if(u=c(n),u.forEach((function(e){j("srcset",e.url)&&(e.evil=!0)})),u=m(u,(function(e){return!e.evil})),!u.length)return void delete r.attribs[o];n=m(u,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),r.attribs[o]=n}catch(e){return void delete r.attribs[o]}if("class"===o){const t=C[e],i=C["*"],a=[T[e],T["*"]].filter((function(e){return e}));if(!(n=U(n,t&&i?s(t,i):t||i,a)).length)return void delete r.attribs[o]}if("style"===o)try{const a=l(e+" {"+n+"}");if(0===(n=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(t.prop+":"+t.value),e}),[]).join(";")}(function(e,t){if(!t)return e;const n=i(e),r=e.nodes[0];let o;o=t[r.selector]&&t["*"]?s(t[r.selector],t["*"]):t[r.selector]||t["*"];o&&(n.nodes[0].nodes=r.nodes.reduce(function(e){return function(t,n){if(p(e,n.prop)){e[n.prop].some((function(e){return e.test(n.value)}))&&t.push(n)}return t}}(o),[]));return n}(a,t.allowedStyles))).length)return void delete r.attribs[o]}catch(e){return void delete r.attribs[o]}b+=" "+o,n&&n.length&&(b+='="'+L(n,!0)+'"')}else delete r.attribs[o]})),-1!==t.selfClosing.indexOf(e)?b+=" />":(b+=">",!r.innerText||u||t.textFilter||(b+=L(r.innerText),N=!0)),o&&(b=v+L(b),v="")},ontext:function(e){if(I)return;const n=O[O.length-1];let r;if(n&&(r=n.tag,e=void 0!==n.innerText?n.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==r&&"style"!==r){const n=L(e,!1);t.textFilter&&!N?b+=t.textFilter(n,r):N||(b+=n)}else b+=e;if(O.length){O[O.length-1].text+=e}},onclosetag:function(e){if(I){if(A--,A)return;I=!1}const n=O.pop();if(!n)return;I=!!t.enforceHtmlBoundary&&"html"===e,F--;const r=R[F];if(r){if(delete R[F],"discard"===t.disallowedTagsMode)return void n.updateParentNodeText();v=b,b=""}D[F]&&(e=D[F],delete D[F]),t.exclusiveFilter&&t.exclusiveFilter(n)?b=b.substr(0,n.tagPosition):(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1===t.selfClosing.indexOf(e)?(b+="</"+e+">",r&&(b=v+L(b),v="")):r&&(b=v,v=""))}},t.parser);return M.write(e),M.end(),b;function P(){b="",F=0,O=[],R={},D={},I=!1,A=0}function L(e,n){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,""")),e}function j(e,n){const r=(n=(n=n.replace(/[\x00-\x20]+/g,"")).replace(/<!--.*?-->/g,"")).match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!r)return!!n.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const o=r[1].toLowerCase();return p(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(o):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(o)}function U(e,t,n){return t?(e=e.split(/\s+/)).filter((function(e){return-1!==t.indexOf(e)||n.some((function(t){return t.test(e)}))})).join(" "):e}}const _={decodeEntities:!0};f.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1},f.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,o){let i;if(n)for(i in t)o[i]=t[i];else o=t;return{tagName:e,attribs:o}}}},function(e,t,n){"use strict";let r=n(322);class o extends r{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=o,o.default=o},function(e,t,n){"use strict";let{isClean:r,my:o}=n(410),i=n(409),a=n(598),s=n(411);class c{constructor(e={}){this.raws={},this[r]=!1,this[o]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}error(e,t={}){if(this.source){let n=this.positionBy(t);return this.source.input.error(e,n.line,n.column,t)}return new i(e)}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}assign(e={}){for(let t in e)this[t]=e[t];return this}clone(e={}){let t=function e(t,n){let r=new t.constructor;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;if("proxyCache"===o)continue;let i=t[o],a=typeof i;"parent"===o&&"object"===a?n&&(r[o]=n):"source"===o?r[o]=i:Array.isArray(i)?r[o]=i.map(t=>e(t,r)):("object"===a&&null!==i&&(i=e(i)),r[o]=i)}return r}(this);for(let n in e)t[n]=e[n];return t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}raw(e,t){return(new a).raw(this,e,t)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,t){let n={},r=null==t;t=t||new Map;let o=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof r&&r.toJSON)n[e]=r.toJSON(null,t);else if("source"===e){let i=t.get(r.input);null==i&&(i=o,t.set(r.input,o),o++),n[e]={inputId:i,start:r.start,end:r.end}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}positionInside(e){let t=this.toString(),n=this.source.start.column,r=this.source.start.line;for(let o=0;o<e;o++)"\n"===t[o]?(n=1,r+=1):n+=1;return{line:r,column:n}}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n=this.toString().indexOf(e.word);-1!==n&&(t=this.positionInside(n))}return t}getProxyProcessor(){return{set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[r]){this[r]=!1;let e=this;for(;e=e.parent;)e[r]=!1}}get proxyOf(){return this}}e.exports=c,c.default=c},function(e,t,n){"use strict";let r=n(322);class o extends r{constructor(e){super(e),this.type="comment"}}e.exports=o,o.default=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(93),d=n(606),h=n(162),p=n(145),m=n(94),g=n(81);let f=Object(g.a)("views.messages.SenderProfile")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"unmounted",!1),s()(this,"onRoomStateEvents",e=>{"m.room.related_groups"===e.getType()&&e.getRoomId()===this.props.mxEvent.getRoomId()&&this.updateRelatedGroups()});const t=this.props.mxEvent.getSender();this.state={userGroups:h.a.cachedPublicisedGroups(t)||[],relatedGroups:[]}}componentDidMount(){this.updateRelatedGroups(),0===this.state.userGroups.length&&this.getPublicisedGroups(),this.context.on("RoomState.events",this.onRoomStateEvents)}componentWillUnmount(){this.unmounted=!0,this.context.removeListener("RoomState.events",this.onRoomStateEvents)}async getPublicisedGroups(){const e=await h.a.getPublicisedGroupsCached(this.context,this.props.mxEvent.getSender());this.unmounted||this.setState({userGroups:e})}updateRelatedGroups(){const e=this.context.getRoom(this.props.mxEvent.getRoomId());if(!e)return;const t=e.currentState.getStateEvents("m.room.related_groups","");this.setState({relatedGroups:(null==t?void 0:t.getContent().groups)||[]})}getDisplayedGroups(e,t){let n=e||[];return n=t&&t.length>0?t.filter(e=>n.includes(e)):[],n}render(){var e,t,n;const{mxEvent:r}=this.props,o=Object(p.f)(r.getSender()),{msgtype:i}=r.getContent(),a=null===(e=r.sender)||void 0===e?void 0:e.disambiguate,s=(null===(t=r.sender)||void 0===t?void 0:t.rawDisplayName)||r.getSender()||"",c=(null===(n=r.sender)||void 0===n?void 0:n.userId)||r.getSender()||"";if(i===u.b.Emote)return null;let h,m;if(a&&(h=l.a.createElement("span",{className:"mx_SenderProfile_mxid"},c)),this.props.enableFlair){const e=this.getDisplayedGroups(this.state.userGroups,this.state.relatedGroups);m=l.a.createElement(d.a,{key:"flair",userId:r.getSender(),groups:e})}return l.a.createElement("div",{className:"mx_SenderProfile",dir:"auto",onClick:this.props.onClick},l.a.createElement("span",{className:"mx_SenderProfile_displayName "+o},s),h,m)}},s()(o,"contextType",m.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(78);const o=(e,t,n)=>{const[o,i]=Object(r.useState)(n);return Object(r.useEffect)(()=>{let t=!1;return e().then(e=>{t||i(e)}),()=>{t=!0}},t),o}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(78),o=n(84);const i=(e,t=null,n=!1)=>{const[i,a]=Object(r.useState)(o.b.getValue(e,t,n));return Object(r.useEffect)(()=>{const r=o.b.watchSetting(e,t,()=>{a(o.b.getValue(e,t,n))});return()=>{o.b.unwatchSetting(r)}},[e,t,n]),i},a=(e,t=null)=>{const[n,i]=Object(r.useState)(o.b.getValue(e,t));return Object(r.useEffect)(()=>{const n=o.b.watchSetting(e,t,()=>{i(o.b.getValue(e,t))});return()=>{o.b.unwatchSetting(n)}},[e,t]),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return P}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(426),l=n(80),u=n(101),d=n(94),h=n(127),p=n(207),m=n(212),g=n(115),f=n(870),_=n(84),b=n(87),v=n(105),y=n(81),E=n(95),S=n(277);class w extends s.a.PureComponent{constructor(...e){super(...e),i()(this,"onBack",()=>{this.state.message?this.setState({message:null}):this.props.onBack()}),i()(this,"onChange",e=>{this.setState({[e.target.id]:"checkbox"===e.target.type?e.target.checked:e.target.value})})}buttons(){return s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back")),!this.state.message&&s.a.createElement("button",{onClick:this.send},Object(l.a)("Send")))}textInput(e,t){return s.a.createElement(u.a,{id:e,label:t,size:42,autoFocus:!0,type:"text",autoComplete:"on",value:this.state[e],onChange:this.onChange})}}class C extends w{static getLabel(){return Object(l.a)("Send Custom Event")}constructor(e){super(e),i()(this,"send",async()=>{if(""===this.state.eventType)return void this.setState({message:Object(l.a)("You must specify an event type!")});let e;try{const t=JSON.parse(this.state.evContent);await this.doSend(t),e=Object(l.a)("Event sent!")}catch(t){e=Object(l.a)("Failed to send custom event.")+" ("+t.toString()+")"}this.setState({message:e})});const{eventType:t,stateKey:n,evContent:r}=Object.assign({eventType:"",stateKey:"",evContent:"{\n\n}"},this.props.inputs);this.state={isStateEvent:Boolean(this.props.forceStateEvent),eventType:t,stateKey:n,evContent:r}}doSend(e){const t=this.context;return this.state.isStateEvent?t.sendStateEvent(this.props.room.roomId,this.state.eventType,e,this.state.stateKey):t.sendEvent(this.props.room.roomId,this.state.eventType,e)}render(){if(this.state.message)return s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content"},this.state.message),this.buttons());const e=!this.state.message&&!this.props.forceStateEvent&&!this.props.forceGeneralEvent;return s.a.createElement("div",null,s.a.createElement("div",{className:"mx_DevTools_content"},s.a.createElement("div",{className:"mx_DevTools_eventTypeStateKeyGroup"},this.textInput("eventType",Object(l.a)("Event Type")),this.state.isStateEvent&&this.textInput("stateKey",Object(l.a)("State Key"))),s.a.createElement("br",null),s.a.createElement(u.a,{id:"evContent",label:Object(l.a)("Event Content"),type:"text",className:"mx_DevTools_textarea",autoComplete:"off",value:this.state.evContent,onChange:this.onChange,element:"textarea"})),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back")),!this.state.message&&s.a.createElement("button",{onClick:this.send},Object(l.a)("Send")),e&&s.a.createElement("div",{style:{float:"right"}},s.a.createElement("input",{id:"isStateEvent",className:"mx_DevTools_tgl mx_DevTools_tgl-flip",type:"checkbox",checked:this.state.isStateEvent,onChange:this.onChange}),s.a.createElement("label",{className:"mx_DevTools_tgl-btn","data-tg-off":"Event","data-tg-on":"State Event",htmlFor:"isStateEvent"}))))}}i()(C,"contextType",d.a);class T extends w{static getLabel(){return Object(l.a)("Send Account Data")}constructor(e){super(e),i()(this,"send",async()=>{if(""===this.state.eventType)return void this.setState({message:Object(l.a)("You must specify an event type!")});let e;try{const t=JSON.parse(this.state.evContent);await this.doSend(t),e=Object(l.a)("Event sent!")}catch(t){e=Object(l.a)("Failed to send custom event.")+" ("+t.toString()+")"}this.setState({message:e})});const{eventType:t,evContent:n}=Object.assign({eventType:"",evContent:"{\n\n}"},this.props.inputs);this.state={isRoomAccountData:Boolean(this.props.isRoomAccountData),eventType:t,evContent:n}}doSend(e){const t=this.context;return this.state.isRoomAccountData?t.setRoomAccountData(this.props.room.roomId,this.state.eventType,e):t.setAccountData(this.state.eventType,e)}render(){return this.state.message?s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content"},this.state.message),this.buttons()):s.a.createElement("div",null,s.a.createElement("div",{className:"mx_DevTools_content"},this.textInput("eventType",Object(l.a)("Event Type")),s.a.createElement("br",null),s.a.createElement(u.a,{id:"evContent",label:Object(l.a)("Event Content"),type:"text",className:"mx_DevTools_textarea",autoComplete:"off",value:this.state.evContent,onChange:this.onChange,element:"textarea"})),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back")),!this.state.message&&s.a.createElement("button",{onClick:this.send},Object(l.a)("Send")),!this.state.message&&s.a.createElement("div",{style:{float:"right"}},s.a.createElement("input",{id:"isRoomAccountData",className:"mx_DevTools_tgl mx_DevTools_tgl-flip",type:"checkbox",checked:this.state.isRoomAccountData,disabled:this.props.forceMode,onChange:this.onChange}),s.a.createElement("label",{className:"mx_DevTools_tgl-btn","data-tg-off":"Account Data","data-tg-on":"Room Data",htmlFor:"isRoomAccountData"}))))}}i()(T,"contextType",d.a);class x extends s.a.PureComponent{static filterChildren(e,t){if(!t)return e;const n=t.toLowerCase();return e.filter(e=>e.key.toString().toLowerCase().includes(n))}constructor(e){super(e),i()(this,"showAll",()=>{this.setState({truncateAt:this.state.truncateAt+50})}),i()(this,"createOverflowElement",(e,t)=>s.a.createElement("button",{className:"mx_DevTools_RoomStateExplorer_button",onClick:this.showAll},Object(l.a)("and %(count)s others...",{count:e}))),i()(this,"onQuery",e=>{this.props.onChange&&this.props.onChange(e.target.value)}),i()(this,"getChildren",(e,t)=>this.state.filteredChildren.slice(e,t)),i()(this,"getChildCount",()=>this.state.filteredChildren.length),this.state={filteredChildren:x.filterChildren(this.props.children,this.props.query),truncateAt:20}}UNSAFE_componentWillReceiveProps(e){this.props.children===e.children&&this.props.query===e.query||this.setState({filteredChildren:x.filterChildren(e.children,e.query),truncateAt:20})}render(){return s.a.createElement("div",null,s.a.createElement(u.a,{label:Object(l.a)("Filter results"),autoFocus:!0,size:64,type:"text",autoComplete:"off",value:this.props.query,onChange:this.onQuery,className:"mx_TextInputDialog_input mx_DevTools_RoomStateExplorer_query",key:this.props.children[0]?this.props.children[0].key:""}),s.a.createElement(S.a,{getChildren:this.getChildren,getChildCount:this.getChildCount,truncateAt:this.state.truncateAt,createOverflowElement:this.createOverflowElement}))}}class k extends s.a.PureComponent{static getLabel(){return Object(l.a)("Explore Room State")}constructor(e){super(e),i()(this,"roomStateEvents",void 0),i()(this,"onBack",()=>{this.state.editing?this.setState({editing:!1}):this.state.event?this.setState({event:null}):this.state.eventType?this.setState({eventType:null}):this.props.onBack()}),i()(this,"editEv",()=>{this.setState({editing:!0})}),i()(this,"onQueryEventType",e=>{this.setState({queryEventType:e})}),i()(this,"onQueryStateKey",e=>{this.setState({queryStateKey:e})}),this.roomStateEvents=this.props.room.currentState.events,this.state={eventType:null,event:null,editing:!1,queryEventType:"",queryStateKey:""}}browseEventType(e){return()=>{this.setState({eventType:e})}}onViewSourceClick(e){return()=>{this.setState({event:e})}}render(){if(this.state.event)return this.state.editing?s.a.createElement(C,{room:this.props.room,forceStateEvent:!0,onBack:this.onBack,inputs:{eventType:this.state.event.getType(),evContent:JSON.stringify(this.state.event.getContent(),null,"\t"),stateKey:this.state.event.getStateKey()}}):s.a.createElement("div",{className:"mx_ViewSource"},s.a.createElement("div",{className:"mx_Dialog_content"},s.a.createElement(c.a,{className:"json"},JSON.stringify(this.state.event.event,null,2))),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back")),s.a.createElement("button",{onClick:this.editEv},Object(l.a)("Edit"))));let e=null;const t="mx_DevTools_RoomStateExplorer_button";if(null===this.state.eventType)e=s.a.createElement(x,{query:this.state.queryEventType,onChange:this.onQueryEventType},Array.from(this.roomStateEvents.entries()).map(([e,n])=>{let r;return r=1===n.size&&n.has("")?this.onViewSourceClick(n.get("")):this.browseEventType(e),s.a.createElement("button",{className:t,key:e,onClick:r},e)}));else{const n=this.roomStateEvents.get(this.state.eventType);e=s.a.createElement(x,{query:this.state.queryStateKey,onChange:this.onQueryStateKey},Array.from(n.entries()).map(([e,n])=>s.a.createElement("button",{className:t,key:e,onClick:this.onViewSourceClick(n)},e)))}return s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content"},e),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back"))))}}i()(k,"contextType",d.a);class F extends s.a.PureComponent{static getLabel(){return Object(l.a)("Explore Account Data")}constructor(e){super(e),i()(this,"onBack",()=>{this.state.editing?this.setState({editing:!1}):this.state.event?this.setState({event:null}):this.props.onBack()}),i()(this,"onChange",e=>{this.setState({[e.target.id]:"checkbox"===e.target.type?e.target.checked:e.target.value})}),i()(this,"editEv",()=>{this.setState({editing:!0})}),i()(this,"onQueryEventType",e=>{this.setState({queryEventType:e})}),this.state={isRoomAccountData:!1,event:null,editing:!1,queryEventType:""}}getData(){return this.state.isRoomAccountData?this.props.room.accountData:this.context.store.accountData}onViewSourceClick(e){return()=>{this.setState({event:e})}}render(){if(this.state.event)return this.state.editing?s.a.createElement(T,{room:this.props.room,isRoomAccountData:this.state.isRoomAccountData,onBack:this.onBack,inputs:{eventType:this.state.event.getType(),evContent:JSON.stringify(this.state.event.getContent(),null,"\t")},forceMode:!0}):s.a.createElement("div",{className:"mx_ViewSource"},s.a.createElement("div",{className:"mx_DevTools_content"},s.a.createElement(c.a,{className:"json"},JSON.stringify(this.state.event.event,null,2))),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back")),s.a.createElement("button",{onClick:this.editEv},Object(l.a)("Edit"))));const e=[],t=this.getData();return Object.keys(t).forEach(n=>{const r=t[n];e.push(s.a.createElement("button",{className:"mx_DevTools_RoomStateExplorer_button",key:n,onClick:this.onViewSourceClick(r)},n))}),s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content"},s.a.createElement(x,{query:this.state.queryEventType,onChange:this.onQueryEventType},e)),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back")),s.a.createElement("div",{style:{float:"right"}},s.a.createElement("input",{id:"isRoomAccountData",className:"mx_DevTools_tgl mx_DevTools_tgl-flip",type:"checkbox",checked:this.state.isRoomAccountData,onChange:this.onChange}),s.a.createElement("label",{className:"mx_DevTools_tgl-btn","data-tg-off":"Account Data","data-tg-on":"Room Data",htmlFor:"isRoomAccountData"}))))}}i()(F,"contextType",d.a);class O extends s.a.PureComponent{static getLabel(){return Object(l.a)("View Servers in Room")}constructor(e){super(e),i()(this,"servers",void 0),i()(this,"onQuery",e=>{this.setState({query:e})});const t=this.props.room,n=new Set;t.currentState.getStateEvents("m.room.member").forEach(e=>n.add(e.getSender().split(":")[1])),this.servers=Array.from(n).map(e=>s.a.createElement("button",{key:e,className:"mx_DevTools_ServersInRoomList_button"},e)),this.state={query:""}}render(){return s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content"},s.a.createElement(x,{query:this.state.query,onChange:this.onQuery},this.servers)),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.props.onBack},Object(l.a)("Back"))))}}i()(O,"contextType",d.a);const R={[p.g]:"unsent",[p.e]:"requested",[p.d]:"ready",[p.c]:"done",[p.f]:"started",[p.b]:"cancelled"},D=({txnId:e,request:t})=>{const[,n]=Object(a.useState)(),[r,o]=Object(a.useState)(t.timeout);return Object(h.a)(t,"change",n),Object(a.useEffect)(()=>{if(0==t.timeout)return;const e=setInterval(()=>{o(t.timeout)},500);return()=>{clearInterval(e)}},[t]),s.a.createElement("div",{className:"mx_DevTools_VerificationRequest"},s.a.createElement("dl",null,s.a.createElement("dt",null,"Transaction"),s.a.createElement("dd",null,e),s.a.createElement("dt",null,"Phase"),s.a.createElement("dd",null,R[t.phase]||t.phase),s.a.createElement("dt",null,"Timeout"),s.a.createElement("dd",null,Math.floor(r/1e3)),s.a.createElement("dt",null,"Methods"),s.a.createElement("dd",null,t.methods&&t.methods.join(", ")),s.a.createElement("dt",null,"requestingUserId"),s.a.createElement("dd",null,t.requestingUserId),s.a.createElement("dt",null,"observeOnly"),s.a.createElement("dd",null,JSON.stringify(t.observeOnly))))};class I extends s.a.PureComponent{constructor(...e){super(...e),i()(this,"onNewRequest",()=>{this.forceUpdate()})}static getLabel(){return Object(l.a)("Verification Requests")}componentDidMount(){this.context.on("crypto.verification.request",this.onNewRequest)}componentWillUnmount(){this.context.off("crypto.verification.request",this.onNewRequest)}render(){const e=this.context,t=this.props.room,n=(e.crypto.inRoomVerificationRequests._requestsByRoomId||new Map).get(t.roomId)||new Map;return s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content"},Array.from(n.entries()).reverse().map(([e,t])=>s.a.createElement(D,{txnId:e,request:t,key:e}))),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.props.onBack},Object(l.a)("Back"))))}}i()(I,"contextType",d.a);class A extends s.a.Component{static getLabel(){return Object(l.a)("Active Widgets")}constructor(e){super(e),i()(this,"onWidgetStoreUpdate",()=>{this.forceUpdate()}),i()(this,"onQueryChange",e=>{this.setState({query:e})}),i()(this,"onEditWidget",e=>{this.setState({editWidget:e})}),i()(this,"onBack",()=>{const e=m.a.instance.getApps(this.props.room.roomId);this.state.editWidget&&e.includes(this.state.editWidget)?this.setState({editWidget:null}):this.props.onBack()}),this.state={query:"",editWidget:null}}componentDidMount(){m.a.instance.on(g.b,this.onWidgetStoreUpdate)}componentWillUnmount(){m.a.instance.off(g.b,this.onWidgetStoreUpdate)}render(){const e=this.props.room,t=this.state.editWidget,n=m.a.instance.getApps(e.roomId);if(t&&n.includes(t)){const n=Array.from(Array.from(e.currentState.events.values()).map(e=>e.values())).reduce((e,t)=>(e.push(...t),e),[]).find(e=>e.getId()===t.eventId);return n?s.a.createElement(C,{onBack:this.onBack,room:e,forceStateEvent:!0,inputs:{eventType:n.getType(),evContent:JSON.stringify(n.getContent(),null,"\t"),stateKey:n.getStateKey()}}):s.a.createElement("div",null,Object(l.a)("There was an error finding this widget."),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back"))))}return s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content"},s.a.createElement(x,{query:this.state.query,onChange:this.onQueryChange},n.map(e=>s.a.createElement("button",{className:"mx_DevTools_RoomStateExplorer_button",key:e.url+e.eventId,onClick:()=>this.onEditWidget(e)},e.url)))),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back"))))}}class N extends s.a.PureComponent{static getLabel(){return Object(l.a)("Settings Explorer")}constructor(e){super(e),i()(this,"onQueryChange",e=>{this.setState({query:e.target.value})}),i()(this,"onExplValuesEdit",e=>{this.setState({explicitValues:e.target.value})}),i()(this,"onExplRoomValuesEdit",e=>{this.setState({explicitRoomValues:e.target.value})}),i()(this,"onBack",()=>{this.state.editSetting?this.setState({editSetting:null}):this.state.viewSetting?this.setState({viewSetting:null}):this.props.onBack()}),i()(this,"onViewClick",(e,t)=>{e.preventDefault(),this.setState({viewSetting:t})}),i()(this,"onEditClick",(e,t)=>{e.preventDefault(),this.setState({editSetting:t,explicitValues:this.renderExplicitSettingValues(t,null),explicitRoomValues:this.renderExplicitSettingValues(t,this.props.room.roomId)})}),i()(this,"onSaveClick",async()=>{try{const e=this.state.editSetting,t=JSON.parse(this.state.explicitValues),n=JSON.parse(this.state.explicitRoomValues);for(const n of Object.keys(t)){console.log(`[Devtools] Setting value of ${e} at ${n} from user input`);try{const r=t[n];await _.b.setValue(e,null,n,r)}catch(e){console.warn(e)}}const r=this.props.room.roomId;for(const o of Object.keys(t)){console.log(`[Devtools] Setting value of ${e} at ${o} in ${r} from user input`);try{const t=n[o];await _.b.setValue(e,r,o,t)}catch(e){console.warn(e)}}this.setState({viewSetting:e,editSetting:null})}catch(e){b.a.createTrackedDialog("Devtools - Failed to save settings","",v.a,{title:Object(l.a)("Failed to save settings"),description:e.message})}}),this.state={query:"",editSetting:null,viewSetting:null,explicitValues:null,explicitRoomValues:null}}renderSettingValue(e){return["boolean","number"].includes(typeof e)?e.toString():JSON.stringify(e)}renderExplicitSettingValues(e,t){const n={};for(const r of _.a)try{n[r]=_.b.getValueAt(r,e,t,!0,!0),void 0===n[r]&&(n[r]=null)}catch(e){console.warn(e)}return JSON.stringify(n,null,4)}renderCanEditLevel(e,t){const n=_.b.canSetValue(this.state.editSetting,e,t),r=n?"mx_DevTools_SettingsExplorer_mutable":"mx_DevTools_SettingsExplorer_immutable";return s.a.createElement("td",{className:r},s.a.createElement("code",null,n.toString()))}render(){const e=this.props.room;if(!this.state.viewSetting&&!this.state.editSetting){const t=Object.keys(f.a).filter(e=>!this.state.query||e.toLowerCase().includes(this.state.query.toLowerCase()));return s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content mx_DevTools_SettingsExplorer"},s.a.createElement(u.a,{label:Object(l.a)("Filter results"),autoFocus:!0,size:64,type:"text",autoComplete:"off",value:this.state.query,onChange:this.onQueryChange,className:"mx_TextInputDialog_input mx_DevTools_RoomStateExplorer_query"}),s.a.createElement("table",null,s.a.createElement("thead",null,s.a.createElement("tr",null,s.a.createElement("th",null,Object(l.a)("Setting ID")),s.a.createElement("th",null,Object(l.a)("Value")),s.a.createElement("th",null,Object(l.a)("Value in this room")))),s.a.createElement("tbody",null,t.map(t=>s.a.createElement("tr",{key:t},s.a.createElement("td",null,s.a.createElement("a",{href:"",onClick:e=>this.onViewClick(e,t)},s.a.createElement("code",null,t)),s.a.createElement("a",{href:"",onClick:e=>this.onEditClick(e,t),className:"mx_DevTools_SettingsExplorer_edit"},"✏")),s.a.createElement("td",null,s.a.createElement("code",null,this.renderSettingValue(_.b.getValue(t)))),s.a.createElement("td",null,s.a.createElement("code",null,this.renderSettingValue(_.b.getValue(t,e.roomId))))))))),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back"))))}return this.state.editSetting?s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content mx_DevTools_SettingsExplorer"},s.a.createElement("h3",null,Object(l.a)("Setting:")," ",s.a.createElement("code",null,this.state.editSetting)),s.a.createElement("div",{className:"mx_DevTools_SettingsExplorer_warning"},s.a.createElement("b",null,Object(l.a)("Caution:"))," ",Object(l.a)("This UI does NOT check the types of the values. Use at your own risk.")),s.a.createElement("div",null,Object(l.a)("Setting definition:"),s.a.createElement("pre",null,s.a.createElement("code",null,JSON.stringify(f.a[this.state.editSetting],null,4)))),s.a.createElement("div",null,s.a.createElement("table",null,s.a.createElement("thead",null,s.a.createElement("tr",null,s.a.createElement("th",null,Object(l.a)("Level")),s.a.createElement("th",null,Object(l.a)("Settable at global")),s.a.createElement("th",null,Object(l.a)("Settable at room")))),s.a.createElement("tbody",null,_.a.map(t=>s.a.createElement("tr",{key:t},s.a.createElement("td",null,s.a.createElement("code",null,t)),this.renderCanEditLevel(null,t),this.renderCanEditLevel(e.roomId,t)))))),s.a.createElement("div",null,s.a.createElement(u.a,{id:"valExpl",label:Object(l.a)("Values at explicit levels"),type:"text",className:"mx_DevTools_textarea",element:"textarea",autoComplete:"off",value:this.state.explicitValues,onChange:this.onExplValuesEdit})),s.a.createElement("div",null,s.a.createElement(u.a,{id:"valExpl",label:Object(l.a)("Values at explicit levels in this room"),type:"text",className:"mx_DevTools_textarea",element:"textarea",autoComplete:"off",value:this.state.explicitRoomValues,onChange:this.onExplRoomValuesEdit}))),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onSaveClick},Object(l.a)("Save setting values")),s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back")))):this.state.viewSetting?s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Dialog_content mx_DevTools_SettingsExplorer"},s.a.createElement("h3",null,Object(l.a)("Setting:")," ",s.a.createElement("code",null,this.state.viewSetting)),s.a.createElement("div",null,Object(l.a)("Setting definition:"),s.a.createElement("pre",null,s.a.createElement("code",null,JSON.stringify(f.a[this.state.viewSetting],null,4)))),s.a.createElement("div",null,Object(l.a)("Value:")," ",s.a.createElement("code",null,this.renderSettingValue(_.b.getValue(this.state.viewSetting)))),s.a.createElement("div",null,Object(l.a)("Value in this room:")," ",s.a.createElement("code",null,this.renderSettingValue(_.b.getValue(this.state.viewSetting,e.roomId)))),s.a.createElement("div",null,Object(l.a)("Values at explicit levels:"),s.a.createElement("pre",null,s.a.createElement("code",null,this.renderExplicitSettingValues(this.state.viewSetting,null)))),s.a.createElement("div",null,Object(l.a)("Values at explicit levels in this room:"),s.a.createElement("pre",null,s.a.createElement("code",null,this.renderExplicitSettingValues(this.state.viewSetting,e.roomId))))),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:e=>this.onEditClick(e,this.state.viewSetting)},Object(l.a)("Edit Values")),s.a.createElement("button",{onClick:this.onBack},Object(l.a)("Back")))):void 0}}const M=[C,k,T,F,O,I,A,N];let P=Object(y.a)("views.dialogs.DevtoolsDialog")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"onBack",()=>{this.setState({mode:null})}),i()(this,"onCancel",()=>{this.props.onFinished(!1)}),this.state={mode:null}}setMode(e){return()=>{this.setState({mode:e})}}render(){let e;if(this.state.mode)e=s.a.createElement(d.a.Consumer,null,e=>s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:"mx_DevTools_label_left"},this.state.mode.getLabel()),s.a.createElement("div",{className:"mx_DevTools_label_right"},"Room ID: ",this.props.roomId),s.a.createElement("div",{className:"mx_DevTools_label_bottom"}),s.a.createElement(this.state.mode,{onBack:this.onBack,room:e.getRoom(this.props.roomId)})));else{const t="mx_DevTools_RoomStateExplorer_button";e=s.a.createElement(s.a.Fragment,null,s.a.createElement("div",null,s.a.createElement("div",{className:"mx_DevTools_label_left"},Object(l.a)("Toolbox")),s.a.createElement("div",{className:"mx_DevTools_label_right"},"Room ID: ",this.props.roomId),s.a.createElement("div",{className:"mx_DevTools_label_bottom"}),s.a.createElement("div",{className:"mx_Dialog_content"},M.map(e=>{const n=e.getLabel(),r=this.setMode(e);return s.a.createElement("button",{className:t,key:n,onClick:r},n)}))),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onCancel},Object(l.a)("Cancel"))))}return s.a.createElement(E.a,{className:"mx_QuestionDialog",onFinished:this.props.onFinished,title:Object(l.a)("Developer Tools")},e)}})||r},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(79),o=n.n(r),i=n(84),a=n(83),s=n(91),c=n(427),l=n(243),u=n(98);class d{constructor(){o()(this,"themeWatchRef",void 0),o()(this,"systemThemeWatchRef",void 0),o()(this,"dispatcherRef",void 0),o()(this,"preferDark",void 0),o()(this,"preferLight",void 0),o()(this,"currentTheme",void 0),o()(this,"onChange",()=>{this.recheck()}),o()(this,"onAction",e=>{e.action===s.a.RecheckTheme&&this.recheck(e.forceTheme)}),this.themeWatchRef=null,this.systemThemeWatchRef=null,this.dispatcherRef=null,this.preferDark=e.matchMedia("(prefers-color-scheme: dark)"),this.preferLight=e.matchMedia("(prefers-color-scheme: light)"),this.currentTheme=this.getEffectiveTheme()}start(){this.themeWatchRef=i.b.watchSetting("theme",null,this.onChange),this.systemThemeWatchRef=i.b.watchSetting("use_system_theme",null,this.onChange),this.preferDark.addEventListener&&(this.preferDark.addEventListener("change",this.onChange),this.preferLight.addEventListener("change",this.onChange)),this.dispatcherRef=a.a.register(this.onAction)}stop(){this.preferDark.addEventListener&&(this.preferDark.removeEventListener("change",this.onChange),this.preferLight.removeEventListener("change",this.onChange)),i.b.unwatchSetting(this.systemThemeWatchRef),i.b.unwatchSetting(this.themeWatchRef),a.a.unregister(this.dispatcherRef)}recheck(e){const t=this.currentTheme;this.currentTheme=void 0===e?this.getEffectiveTheme():e,t!==this.currentTheme&&Object(l.d)(this.currentTheme)}getEffectiveTheme(){if(c.a.isLogin)return"light";if(i.b.getValueAt(u.a.DEVICE,"use_system_theme",null,!1,!0)){if(console.log("returning explicit system theme"),this.preferDark.matches)return"dark";if(this.preferLight.matches)return"light"}const e=i.b.getValueAt(u.a.DEVICE,"theme",null,!1,!0);if(e)return console.log("returning explicit theme: "+e),e;if(i.b.getValue("use_system_theme")){if(this.preferDark.matches)return"dark";if(this.preferLight.matches)return"light"}return console.log("returning theme value"),i.b.getValue("theme")}isSystemThemeSupported(){return this.preferDark.matches||this.preferLight.matches}}}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(79),o=n.n(r),i=n(1282),a=n.n(i),s=n(111),c=n(90),l=n(84);function u(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}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let h;!function(e){e[e.Disabled=0]="Disabled",e[e.Anonymous=1]="Anonymous",e[e.Pseudonymous=2]="Pseudonymous"}(h||(h={}));const p=async e=>{const t=(new TextEncoder).encode(e),n=await window.crypto.subtle.digest("sha-256",t);return[...new Uint8Array(n)].map(e=>e.toString(16).padStart(2,"0")).join("")},m=new Set(["register","login","forgot_password","soft_logout","new","settings","welcome","home","start","directory","start_sso","start_cas","groups","complete_security","post_registration","room","user","group"]);class g{static get instance(){return this._instance||(this._instance=new g(a.a)),this._instance}constructor(e){this.posthog=e,o()(this,"anonymity",h.Disabled),o()(this,"enabled",!1),o()(this,"platformSuperProperties",{}),o()(this,"sanitizeProperties",e=>(e.$redacted_current_url||console.log("$redacted_current_url not set in sanitizeProperties, will drop $current_url entirely"),e.$current_url=e.$redacted_current_url,delete e.$redacted_current_url,this.anonymity==h.Anonymous&&(e.$referrer=null,e.$referring_domain=null,e.$initial_referrer=null,e.$initial_referring_domain=null,e.$device_id=null),e));const t=c.a.get().posthog;t?(this.posthog.init(t.projectApiKey,{api_host:t.apiHost,autocapture:!1,mask_all_text:!0,mask_all_element_attributes:!0,capture_pageview:!1,sanitize_properties:this.sanitizeProperties,respect_dnt:!0}),this.enabled=!0):this.enabled=!1}static getAnonymityFromSettings(){const e=l.b.getValue("analyticsOptIn",null,!0);let t;return t=l.b.getValue("feature_pseudonymous_analytics_opt_in",null,!0)?h.Pseudonymous:e?h.Anonymous:h.Disabled,t}registerSuperProperties(e){this.enabled&&this.posthog.register(e)}static async getPlatformProperties(){const e=s.a.get();let t;try{t=await e.getAppVersion()}catch(e){t="unknown"}return{appVersion:t,appPlatform:e.getHumanReadableName()}}async capture(e,t){if(!this.enabled)return;const{origin:n,hash:r,pathname:o}=window.location;t.$redacted_current_url=await async function(e,t,n,r){let o;if(e.startsWith("file://")&&(n="/<redacted_file_scheme_url>/"),""==t)o="";else{let[e,n,...i]=t.split("/");m.has(n)||(n="<redacted_screen_name>");for(let e=0;e<i.length;e++)i[e]=r===h.Anonymous?"<redacted>":await p(i[e]);o=`${e}/${n}/${i.join("/")}`}return e+n+o}(n,r,o,this.anonymity),this.posthog.capture(e,t)}isEnabled(){return this.enabled}setAnonymity(e){!this.enabled||e!=h.Disabled&&e!=h.Anonymous||(this.posthog.reset(),this.registerSuperProperties(this.platformSuperProperties)),this.anonymity=e}async identifyUser(e){this.anonymity==h.Pseudonymous&&this.posthog.identify(await p(e))}getAnonymity(){return this.anonymity}logout(){this.enabled&&this.posthog.reset(),this.setAnonymity(h.Anonymous)}async trackPseudonymousEvent(e,t={}){this.anonymity!=h.Anonymous&&this.anonymity!=h.Disabled&&await this.capture(e,t)}async trackAnonymousEvent(e,t={}){this.anonymity!=h.Disabled&&await this.capture(e,t)}async trackRoomEvent(e,t,n){const r=d(d({},n),{},{hashedRoomId:t?await p(t):null});await this.trackPseudonymousEvent(e,r)}async trackPageView(e){let t=null;const n=window.location.hash.split("/");n.length>=2&&(t=n[1]),await this.trackAnonymousEvent("$pageview",{durationMs:e,screen:t})}async updatePlatformSuperProperties(){this.platformSuperProperties=await g.getPlatformProperties(),this.registerSuperProperties(this.platformSuperProperties)}async updateAnonymityFromSettings(e){this.setAnonymity(g.getAnonymityFromSettings()),e&&this.getAnonymity()==h.Pseudonymous&&await this.identifyUser(e)}}o()(g,"_instance",null)},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n(88),u=n(185),d=n(205),h=n(229),p=n(160),m=n(108),g=n(80),f=n(430),_=n(114),b=n(103),v=n(130),y=n(137),E=n(106),S=n(84),w=n(113),C=n(81),T=n(95),x=n(280);function k(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}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const O=[{name:"Facebook",img:n(1305),url:e=>"https://www.facebook.com/sharer/sharer.php?u="+e},{name:"Twitter",img:n(1306),url:e=>"https://twitter.com/home?status="+e},{name:"LinkedIn",img:n(1307),url:e=>"https://www.linkedin.com/shareArticle?mini=true&url="+e},{name:"Reddit",img:n(1308),url:e=>"http://www.reddit.com/submit?url="+e},{name:"email",img:n(1309),url:e=>"mailto:?body="+e}];let R=Object(C.a)("views.dialogs.ShareDialog")((i=o=class e extends c.PureComponent{constructor(e){super(e),s()(this,"closeCopiedTooltip",void 0),this.onCopyClick=this.onCopyClick.bind(this),this.onLinkSpecificEventCheckboxClick=this.onLinkSpecificEventCheckboxClick.bind(this);let t=null;e.target instanceof u.b&&(t=new _.a(e.target),t.load()),this.state={linkSpecificEvent:this.props.target instanceof m.b,permalinkCreator:t}}static onLinkClick(e){e.preventDefault(),Object(v.d)(e.target)}async onCopyClick(e){e.preventDefault();const t=e.target,n=await Object(v.c)(this.getUrl()),r=t.getBoundingClientRect(),{close:o}=b.n(x.a,F(F({},Object(b.p)(r,2)),{},{message:n?Object(g.a)("Copied!"):Object(g.a)("Failed to copy")}));this.closeCopiedTooltip=t.onmouseleave=o}onLinkSpecificEventCheckboxClick(){this.setState({linkSpecificEvent:!this.state.linkSpecificEvent})}componentWillUnmount(){this.closeCopiedTooltip&&this.closeCopiedTooltip()}getUrl(){let e;if(this.props.target instanceof u.b)if(this.state.linkSpecificEvent){const t=this.props.target.getLiveTimeline().getEvents();e=this.state.permalinkCreator.forEvent(t[t.length-1].getId())}else e=this.state.permalinkCreator.forShareableRoom();else this.props.target instanceof d.a||this.props.target instanceof p.a?e=Object(_.h)(this.props.target.userId):this.props.target instanceof h.a?e=Object(_.f)(this.props.target.groupId):this.props.target instanceof m.b&&(e=this.state.linkSpecificEvent?this.props.permalinkCreator.forEvent(this.props.target.getId()):this.props.permalinkCreator.forRoom());return e}render(){let t,n;if(this.props.target instanceof u.b){t=Object(g.a)("Share Room");this.props.target.getLiveTimeline().getEvents().length>0&&(n=c.createElement("div",null,c.createElement(y.a,{checked:this.state.linkSpecificEvent,onChange:this.onLinkSpecificEventCheckboxClick},Object(g.a)("Link to most recent message"))))}else this.props.target instanceof d.a||this.props.target instanceof p.a?t=Object(g.a)("Share User"):this.props.target instanceof h.a?t=Object(g.a)("Share Community"):this.props.target instanceof m.b&&(t=Object(g.a)("Share Room Message"),n=c.createElement("div",null,c.createElement(y.a,{checked:this.state.linkSpecificEvent,onClick:this.onLinkSpecificEventCheckboxClick},Object(g.a)("Link to selected message"))));const r=this.getUrl(),o=encodeURIComponent(r),i=S.b.getValue(w.a.ShareQRCode),a=S.b.getValue(w.a.ShareSocial);let s;return(i||a)&&(s=c.createElement(c.Fragment,null,c.createElement("hr",null),c.createElement("div",{className:"mx_ShareDialog_split"},i&&c.createElement("div",{className:"mx_ShareDialog_qrcode_container"},c.createElement(f.a,{data:r,width:256})),a&&c.createElement("div",{className:"mx_ShareDialog_social_container"},O.map(e=>c.createElement("a",{rel:"noreferrer noopener",target:"_blank",key:e.name,title:e.name,href:e.url(o),className:"mx_ShareDialog_social_icon"},c.createElement("img",{src:e.img,alt:e.name,height:64,width:64}))))))),c.createElement(T.a,{title:t,className:"mx_ShareDialog",contentId:"mx_Dialog_content",onFinished:this.props.onFinished},c.createElement("div",{className:"mx_ShareDialog_content"},c.createElement("div",{className:"mx_ShareDialog_matrixto"},c.createElement("a",{href:r,onClick:e.onLinkClick,className:"mx_ShareDialog_matrixto_link"},r),c.createElement(E.a,{title:Object(g.a)("Copy"),onClick:this.onCopyClick,className:"mx_ShareDialog_matrixto_copy"})),n,s))}},s()(o,"propTypes",{onFinished:l.func.isRequired,target:l.oneOfType([l.instanceOf(u.b),l.instanceOf(d.a),l.instanceOf(h.a),l.instanceOf(p.a),l.instanceOf(m.b)]).isRequired}),r=i))||r},function(e,t,n){"use strict";var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(89),d=n(83),h=n(86),p=n.n(h),m=n(185),g=n(160),f=n(88),_=n.n(f),b=n(82),v=n(162),y=n(114),E=n(94),S=n(91),w=n(100),C=n(154),T=n(81);let x=Object(T.a)("views.elements.Pill")((i=o=class e extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{resourceId:null,pillType:null,member:null,group:null,room:null,hover:!1}),s()(this,"onMouseOver",()=>{this.setState({hover:!0})}),s()(this,"onMouseLeave",()=>{this.setState({hover:!1})}),s()(this,"onUserPillClicked",e=>{e.preventDefault(),d.a.dispatch({action:S.a.ViewUser,member:this.state.member})})}static roomNotifPos(e){return e.indexOf("@room")}static roomNotifLen(){return"@room".length}async UNSAFE_componentWillReceiveProps(t){let n,r;if(t.url)if(t.inMessage){const e=Object(y.i)(t.url);n=e.primaryEntityId,r=e.sigil}else n=Object(y.c)(t.url),r=n?n[0]:void 0;const o=this.props.type||{"@":e.TYPE_USER_MENTION,"#":e.TYPE_ROOM_MENTION,"!":e.TYPE_ROOM_MENTION,"+":e.TYPE_GROUP_MENTION}[r];let i,a,s;switch(o){case e.TYPE_AT_ROOM_MENTION:s=t.room;break;case e.TYPE_USER_MENTION:{const e=t.room?t.room.getMember(n):void 0;i=e,e||(i=new g.a(null,n),this.doProfileLookup(n,i))}break;case e.TYPE_ROOM_MENTION:{const e="#"===n[0]?b.a.get().getRooms().find(e=>e.getCanonicalAlias()===n||e.getAltAliases().includes(n)):b.a.get().getRoom(n);s=e}break;case e.TYPE_GROUP_MENTION:{const e=b.a.get();try{a=await v.a.getGroupProfileCached(e,n)}catch(e){a={groupId:n,avatarUrl:null,name:null}}}}this.setState({resourceId:n,pillType:o,member:i,group:a,room:s})}componentDidMount(){this._unmounted=!1,this._matrixClient=b.a.get(),this.UNSAFE_componentWillReceiveProps(this.props)}componentWillUnmount(){this._unmounted=!0}doProfileLookup(e,t){b.a.get().getProfileInfo(e).then(e=>{this._unmounted||(t.name=e.displayname,t.rawDisplayName=e.displayname,t.events.member={getContent:()=>({avatar_url:e.avatar_url}),getDirectionalContent:function(){return this.getContent()}},this.setState({member:t}))}).catch(t=>{console.error("Could not retrieve profile data for "+e+":",t)})}render(){const t=u.getComponent("views.avatars.BaseAvatar"),n=u.getComponent("avatars.MemberAvatar"),r=u.getComponent("avatars.RoomAvatar"),o=this.state.resourceId;let i,a,s,c=null,d=o,h=this.props.url;switch(this.state.pillType){case e.TYPE_AT_ROOM_MENTION:{const e=this.props.room;e&&(d="@room",this.props.shouldShowPillAvatar&&(c=l.a.createElement(r,{room:e,width:16,height:16,"aria-hidden":"true"})),i="mx_AtRoomPill")}break;case e.TYPE_USER_MENTION:{const e=this.state.member;e&&(a=e.userId,e.rawDisplayName=e.rawDisplayName||"",d=e.rawDisplayName,this.props.shouldShowPillAvatar&&(c=l.a.createElement(n,{member:e,width:16,height:16,"aria-hidden":"true"})),i="mx_UserPill",h=null,s=this.onUserPillClicked)}break;case e.TYPE_ROOM_MENTION:{const e=this.state.room;e&&(d=e.name||o,this.props.shouldShowPillAvatar&&(c=l.a.createElement(r,{room:e,width:16,height:16,"aria-hidden":"true"}))),i="mx_RoomPill"}break;case e.TYPE_GROUP_MENTION:if(this.state.group){const{avatarUrl:e,groupId:n,name:r}=this.state.group;d=n,this.props.shouldShowPillAvatar&&(c=l.a.createElement(t,{name:r||n,width:16,height:16,"aria-hidden":"true",url:e?Object(w.b)(e).getSquareThumbnailHttp(16):null})),i="mx_GroupPill"}}const m=p()("mx_Pill",i,{mx_UserPill_me:a===b.a.get().getUserId(),mx_UserPill_selected:this.props.isSelected});if(this.state.pillType){const{yOffset:e}=this.props;let t;return this.state.hover&&o&&(t=l.a.createElement(C.b,{label:o,yOffset:e})),l.a.createElement(E.a.Provider,{value:this._matrixClient},this.props.inMessage?l.a.createElement("a",{className:m,href:h,onClick:s,"data-offset-key":this.props.offsetKey,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},c,d,t):l.a.createElement("span",{className:m,"data-offset-key":this.props.offsetKey,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},c,d,t))}return null}},s()(o,"TYPE_USER_MENTION","TYPE_USER_MENTION"),s()(o,"TYPE_ROOM_MENTION","TYPE_ROOM_MENTION"),s()(o,"TYPE_GROUP_MENTION","TYPE_GROUP_MENTION"),s()(o,"TYPE_AT_ROOM_MENTION","TYPE_AT_ROOM_MENTION"),s()(o,"propTypes",{type:_.a.string,url:_.a.string,inMessage:_.a.bool,room:_.a.instanceOf(m.b),shouldShowPillAvatar:_.a.bool,isSelected:_.a.bool}),r=i))||r;t.a=x},function(e,t,n){"use strict";function r(e){return e/10+"rem"}function o(e){return e+"px"}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));var r=n(78),o=n.n(r),i=n(93),a=n(127),s=n(131);const c=e=>{var t,n,r;return null==e||null===(t=e.currentState)||void 0===t||null===(n=t.getStateEvents(i.a.RoomTopic,""))||void 0===n||null===(r=n.getContent())||void 0===r?void 0:r.topic};t.a=({room:e,children:t})=>{const[n,i]=Object(r.useState)(c(e));Object(a.a)(e.currentState,"RoomState.events",()=>{i(c(e))}),Object(r.useEffect)(()=>{i(c(e))},[e]);const l=e=>e&&Object(s.g)(e);return t?t(n,l):o.a.createElement("span",{ref:l},n)}},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(86),u=n.n(l),d=n(85);const h=["checked","disabled","onChange"];t.a=e=>{let{checked:t,disabled:n=!1,onChange:r}=e,i=a()(e,h);const s=u()({mx_ToggleSwitch:!0,mx_ToggleSwitch_on:t,mx_ToggleSwitch_enabled:!n});return c.a.createElement(d.a,o()({},i,{className:s,onClick:()=>{n||r(!t)},role:"switch","aria-checked":t,"aria-disabled":n}),c.a.createElement("div",{className:"mx_ToggleSwitch_ball"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(157),u=n(82),d=n(81),h=n(101);let p=Object(d.a)("views.elements.RoomAliasField")(r=class extends s.a.PureComponent{constructor(e,t){super(e,t),i()(this,"fieldRef",Object(a.createRef)()),i()(this,"onChange",e=>{this.props.onChange&&this.props.onChange(this.asFullAlias(e.target.value))}),i()(this,"onValidate",async e=>{const t=await this.validationRules(e);return this.setState({isValid:t.valid}),t}),i()(this,"validationRules",Object(l.a)({rules:[{key:"safeLocalpart",test:async({value:e})=>{if(!e)return!0;const t=this.asFullAlias(e);return!e.includes("#")&&!e.includes(":")&&!e.includes(",")&&encodeURI(t)===t},invalid:()=>Object(c.a)("Some characters not allowed")},{key:"required",test:async({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(c.a)("Please provide an address")},{key:"taken",final:!0,test:async({value:e})=>{if(!e)return!0;const t=u.a.get();try{return await t.getRoomIdForAlias(this.asFullAlias(e)),!1}catch(e){return!!e.errcode}},valid:()=>Object(c.a)("This address is available to use"),invalid:()=>Object(c.a)("This address is already in use")}]})),this.state={isValid:!0}}asFullAlias(e){return`#${e}:${this.props.domain}`}render(){const e=s.a.createElement("span",null,"#"),t=":"+this.props.domain,n=s.a.createElement("span",{title:t},t),r=255-this.props.domain.length-2;return s.a.createElement(h.a,{label:this.props.label||Object(c.a)("Room address"),className:"mx_RoomAliasField",prefixComponent:e,postfixComponent:n,ref:this.fieldRef,onValidate:this.onValidate,placeholder:this.props.placeholder||Object(c.a)("e.g. my-room"),onChange:this.onChange,value:this.props.value.substring(1,this.props.value.length-this.props.domain.length-1),maxLength:r,disabled:this.props.disabled})}get isValid(){return this.state.isValid}validate(e){var t;return null===(t=this.fieldRef.current)||void 0===t?void 0:t.validate(e)}focus(){var e;null===(e=this.fieldRef.current)||void 0===e||e.focus()}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(78);const o=(e=!1)=>{const[t,n]=Object(r.useState)(e);return[t,()=>{n(!t)},n]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return A})),n.d(t,"a",(function(){return N}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(86),c=n.n(s),l=n(93),u=n(383),d=n.n(u),h=n(80),p=n(106),m=n(103),g=n(125),f=n(94),_=n(443),b=n(85),v=n(101),y=n(157),E=n(136),S=n(335),w=n(90),C=n(87),T=n(450),x=n(84);function k(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}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const O=({title:e,description:t,className:n,onClick:r})=>a.a.createElement(b.a,{className:c()("mx_SpaceCreateMenuType",n),onClick:r},a.a.createElement("h3",null,e),a.a.createElement("span",null,t));var R;!function(e){e[e.Public=0]="Public",e[e.Private=1]="Private"}(R||(R={}));const D=Object(y.a)({rules:[{key:"required",test:async({value:e})=>!!e,invalid:()=>Object(h.a)("Please enter a name for the space")}]}),I=(e,t)=>`#${e.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9_-]+/gi,"")}:${t}`,A=({onClick:e})=>w.a.get().bug_report_endpoint_url?a.a.createElement("div",{className:"mx_SpaceFeedbackPrompt"},a.a.createElement("span",{className:"mx_SpaceFeedbackPrompt_text"},Object(h.a)("Spaces are a new feature.")),a.a.createElement(b.a,{kind:"link",onClick:()=>{e&&e(),C.a.createTrackedDialog("Spaces Feedback","",T.a,{title:Object(h.a)("Spaces feedback"),subheading:Object(h.a)("Thank you for trying Spaces. Your feedback will help inform the next versions."),rageshakeLabel:"spaces-feedback",rageshakeData:Object.fromEntries(["feature_spaces.all_rooms","feature_spaces.space_member_dms","feature_spaces.space_dm_badges"].map(e=>[e,x.b.getValue(e)]))})}},Object(h.a)("Give feedback."))):null,N=({busy:e,onSubmit:t,setAvatar:n,name:r,setName:o,nameFieldRef:s,alias:c,aliasFieldRef:l,setAlias:u,showAliasField:d,topic:p,setTopic:m,children:g})=>{const b=Object(i.useContext)(f.a).getDomain();return a.a.createElement("form",{className:"mx_SpaceBasicSettings",onSubmit:t},a.a.createElement(_.a,{setAvatar:n,avatarDisabled:e}),a.a.createElement(v.a,{name:"spaceName",label:Object(h.a)("Name"),autoFocus:!0,value:r,onChange:e=>{const t=e.target.value;c&&c!==I(r,b)||u(I(t,b)),o(t)},ref:s,onValidate:D,disabled:e}),d?a.a.createElement(S.a,{ref:l,onChange:u,domain:b,value:c,placeholder:r?I(r,b):Object(h.a)("e.g. my-space"),label:Object(h.a)("Address"),disabled:e}):null,a.a.createElement(v.a,{name:"spaceTopic",element:"textarea",label:Object(h.a)("Description"),value:p,onChange:e=>m(e.target.value),rows:3,disabled:e}),g)};t.c=({onFinished:e})=>{const[t,n]=Object(i.useState)(null),[r,o]=Object(i.useState)(!1),[s,c]=Object(i.useState)(""),u=Object(i.useRef)(),[f,_]=Object(i.useState)(""),v=Object(i.useRef)(),[y,S]=Object(i.useState)(null),[w,C]=Object(i.useState)(""),T=async n=>{if(n.preventDefault(),!r){if(o(!0),!await u.current.validate({allowEmpty:!1}))return u.current.focus(),u.current.validate({allowEmpty:!1,focused:!0}),void o(!1);if(t===R.Public&&!await v.current.validate({allowEmpty:!0}))return v.current.focus(),v.current.validate({allowEmpty:!0,focused:!0}),void o(!1);try{await Object(g.b)({createOpts:{preset:t===R.Public?E.d.PublicChat:E.d.PrivateChat,name:s,power_level_content_override:F({events_default:100},t===R.Public?{invite:0}:{}),room_alias_name:t===R.Public&&f?f.substr(1,f.indexOf(":")-1):void 0,topic:w},avatar:y,roomType:l.e.Space,historyVisibility:t===R.Public?E.b.WorldReadable:E.b.Invited,spinner:!1,encryption:!1,andView:!0,inlineErrors:!0}),e()}catch(n){console.error(n)}}};let x;return x=null===t?a.a.createElement(a.a.Fragment,null,a.a.createElement("h2",null,Object(h.a)("Create a space")),a.a.createElement("p",null,Object(h.a)("Spaces are a new way to group rooms and people. To join an existing space you'll need an invite.")),a.a.createElement(O,{title:Object(h.a)("Public"),description:Object(h.a)("Open space for anyone, best for communities"),className:"mx_SpaceCreateMenuType_public",onClick:()=>n(R.Public)}),a.a.createElement(O,{title:Object(h.a)("Private"),description:Object(h.a)("Invite only, best for yourself or teams"),className:"mx_SpaceCreateMenuType_private",onClick:()=>n(R.Private)}),a.a.createElement("p",null,Object(h.a)("You can change this later")),a.a.createElement(A,{onClick:e})):a.a.createElement(a.a.Fragment,null,a.a.createElement(p.a,{className:"mx_SpaceCreateMenu_back",onClick:()=>n(null),title:Object(h.a)("Go back")}),a.a.createElement("h2",null,t===R.Public?Object(h.a)("Your public space"):Object(h.a)("Your private space")),a.a.createElement("p",null,Object(h.a)("Add some details to help people recognise it.")," ",Object(h.a)("You can change these anytime.")),a.a.createElement(N,{busy:r,onSubmit:T,setAvatar:S,name:s,setName:c,nameFieldRef:u,topic:w,setTopic:C,alias:f,setAlias:_,showAliasField:t===R.Public,aliasFieldRef:v}),a.a.createElement(b.a,{kind:"primary",onClick:T,disabled:r},r?Object(h.a)("Creating..."):Object(h.a)("Create"))),a.a.createElement(m.b,{left:72,top:62,chevronOffset:0,chevronFace:m.a.None,onFinished:e,wrapperClassName:"mx_SpaceCreateMenu_wrapper",managed:!1},a.a.createElement(d.a,{returnFocus:!0},x))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n(85),c=n(81);const l=["1","2","3","4","5","6","7","8","9","*","0","#"],u=["","ABC","DEF","GHI","JKL","MNO","PQRS","TUV","WXYZ","","+",""];var d;!function(e){e[e.Digit=0]="Digit",e[e.Dial=1]="Dial"}(d||(d={}));class h extends a.PureComponent{constructor(...e){super(...e),i()(this,"onClick",()=>{this.props.onButtonPress(this.props.digit)})}render(){switch(this.props.kind){case d.Digit:return a.createElement(s.a,{className:"mx_DialPad_button",onClick:this.onClick},this.props.digit,a.createElement("div",{className:"mx_DialPad_buttonSubText"},this.props.digitSubtext));case d.Dial:return a.createElement(s.a,{className:"mx_DialPad_button mx_DialPad_dialButton",onClick:this.onClick})}}}let p=Object(c.a)("views.voip.DialPad")(r=class extends a.PureComponent{render(){const e=[];for(let t=0;t<l.length;t++){const n=l[t],r=u[t];e.push(a.createElement(h,{key:n,kind:d.Digit,digit:n,digitSubtext:r,onButtonPress:this.props.onDigitPress}))}return this.props.hasDial&&e.push(a.createElement(h,{key:"dial",kind:d.Dial,onButtonPress:this.props.onDialPress})),a.createElement("div",{className:"mx_DialPad"},e)}})||r},function(e,t,n){"use strict";n.d(t,"g",(function(){return h})),n.d(t,"a",(function(){return p})),n.d(t,"f",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"c",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"b",(function(){return y}));var r=n(513),o=n(124),i=n(363),a=n(153);const s=window.localStorage;let c;try{c=window.indexedDB}catch(e){}function l(e){console.log("StorageManager: "+e)}function u(e,...t){console.error("StorageManager: "+e,...t)}function d(e){o.a.trackEvent("StorageManager",e)}function h(){navigator.storage&&navigator.storage.persist?navigator.storage.persist().then(e=>{console.log("StorageManager: Persistent?",e)}):document.requestStorageAccess?document.requestStorageAccess().then(()=>console.log("StorageManager: Persistent?",!0),()=>console.log("StorageManager: Persistent?",!1)):console.log("StorageManager: Persistence unsupported")}async function p(){l("Checking storage consistency"),l("Local storage supported? "+!!s),l("IndexedDB supported? "+!!c);let e=!1,t=!1,n=!1,o=!0;if(s?(e=s.length>0,l("Local storage contains data? "+e),n=!!s.getItem("mx_crypto_initialised"),l("Crypto initialised? "+n)):(o=!1,u("Local storage cannot be used on this browser"),d("Local storage disabled")),c&&s){(await async function(){let e=!1;try{return e=await i.a.exists(c,"riot-web-sync"),l("Sync store using IndexedDB contains data? "+e),{exists:e,healthy:!0}}catch(e){u("Sync store using IndexedDB inaccessible",e),d("Sync store using IndexedDB inaccessible")}return l("Sync store using memory only"),{exists:e,healthy:!1}}()).healthy||(o=!1)}else o=!1,u("Sync store cannot be used on this browser"),d("Sync store disabled");if(c){const e=await async function(){let e=!1;try{return e=await a.a.exists(c,"matrix-js-sdk:crypto"),l("Crypto store using IndexedDB contains data? "+e),{exists:e,healthy:!0}}catch(e){u("Crypto store using IndexedDB inaccessible",e),d("Crypto store using IndexedDB inaccessible")}try{return e=await r.a.exists(s),l("Crypto store using local storage contains data? "+e),{exists:e,healthy:!0}}catch(e){u("Crypto store using local storage inaccessible",e),d("Crypto store using local storage inaccessible")}return l("Crypto store using memory only"),{exists:e,healthy:!1}}();t=e.exists,e.healthy||(o=!1)}else o=!1,u("Crypto store cannot be used on this browser"),d("Crypto store disabled");return e&&n&&!t&&(o=!1,u("Data exists in local storage and crypto is marked as initialised but no data found in crypto store. IndexedDB storage has likely been evicted by the browser!"),d("Crypto store evicted")),o?(l("Storage consistency checks passed"),d("Consistency checks passed")):(u("Storage consistency checks failed"),d("Consistency checks failed")),{dataInLocalStorage:e,dataInCryptoStore:t,cryptoInited:n,healthy:o}}function m(e){e.store&&e.store.on&&e.store.on("degraded",()=>{d("Sync store using IndexedDB degraded to memory")})}function g(e){s.setItem("mx_crypto_initialised",e)}let f=null;async function _(){if(!c)throw new Error("IndexedDB not available");f=await new Promise((e,t)=>{const n=c.open("matrix-react-sdk",1);n.onerror=t,n.onsuccess=t=>{e(n.result)},n.onupgradeneeded=e=>{const t=n.result;t.createObjectStore("pickleKey"),t.createObjectStore("account")}})}async function b(e,t){return f||await _(),new Promise((n,r)=>{const o=f.transaction([e],"readonly");o.onerror=r;const i=o.objectStore(e).get(t);i.onerror=r,i.onsuccess=e=>{n(i.result)}})}async function v(e,t,n){return f||await _(),new Promise((r,o)=>{const i=f.transaction([e],"readwrite");i.onerror=o;const a=i.objectStore(e).put(n,t);a.onerror=o,a.onsuccess=e=>{r()}})}async function y(e,t){return f||await _(),new Promise((n,r)=>{const o=f.transaction([e],"readwrite");o.onerror=r;const i=o.objectStore(e).delete(t);i.onerror=r,i.onsuccess=e=>{n()}})}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(207),a=n(459),s=n(679),c=n(82),l=n(125),u=n(127),d=n(87),h=n(89),p=n(80),m=n(83),g=n(91),f=n(121);const _=["m.key_mismatch","m.user_error","m.mismatched_sas"];t.a=e=>{const{verificationRequest:t,verificationRequestPromise:b,member:v,onClose:y,layout:E,isRoomEncrypted:S}=e,[w,C]=Object(r.useState)(t),[T,x]=Object(r.useState)(!1),[k,F]=Object(r.useState)(w&&w.phase);Object(r.useEffect)(()=>{C(t),t&&(x(!1),F(t.phase))},[t]),Object(r.useEffect)(()=>{b&&async function(){x(!0);const e=await b;x(!1),C(e),F(e.phase)}()},[b]);const O=Object(r.useCallback)(()=>{if(w&&w.cancelled&&_.includes(w.cancellationCode)){const e=h.getComponent("dialogs.ErrorDialog");d.a.createTrackedDialog("Verification failed","insecure",e,{headerImage:n(683),title:Object(p.a)("Your messages are not secure"),description:o.a.createElement("div",null,Object(p.a)("One of the following may be compromised:"),o.a.createElement("ul",null,o.a.createElement("li",null,Object(p.a)("Your homeserver")),o.a.createElement("li",null,Object(p.a)("The homeserver the user you’re verifying is connected to")),o.a.createElement("li",null,Object(p.a)("Yours, or the other users’ internet connection")),o.a.createElement("li",null,Object(p.a)("Yours, or the other users’ session")))),onFinished:y})}else w&&F(w.phase)},[y,w]);Object(u.a)(w,"change",O);const R=Object(r.useCallback)(async()=>{x(!0);const e=c.a.get(),t=await Object(l.c)(e,v.userId),n=await e.requestVerificationDM(v.userId,t);C(n),F(n.phase),m.a.dispatch({action:g.a.SetRightPanelPhase,phase:f.c.EncryptionPanel,refireParams:{member:v,verificationRequest:n}})},[v]),D=!w&&T||w&&(k===i.e||k===i.g||void 0===k),I=w?w.isSelfVerification:v.userId===c.a.get().getUserId();if(!w||D){const e=!w&&T||w&&w.initiatedByMe;return o.a.createElement(a.b,{isRoomEncrypted:S,onStartVerification:R,member:v,isSelfVerification:I,waitingForOtherParty:D&&e,waitingForNetwork:D&&!e,inDialog:"dialog"===E})}return o.a.createElement(s.a,{isRoomEncrypted:S,layout:E,onClose:y,member:v,request:w,key:w.channel.transactionId,inDialog:"dialog"===E,phase:k})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(86),l=n.n(c),u=n(154),d=n(80),h=n(81);let p;!function(e){e.Info="info",e.Warning="warning"}(p||(p={}));let m=Object(h.a)("views.elements.InfoTooltip")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"onMouseOver",()=>{this.setState({hover:!0})}),i()(this,"onMouseLeave",()=>{this.setState({hover:!1})}),this.state={hover:!1}}render(){const{tooltip:e,children:t,tooltipClassName:n,className:r,kind:o}=this.props,i=Object(d.a)("Information"),a=o!==p.Warning?"mx_InfoTooltip_icon_info":"mx_InfoTooltip_icon_warning",c=this.state.hover?s.a.createElement(u.b,{className:"mx_InfoTooltip_container",tooltipClassName:l()("mx_InfoTooltip_tooltip",n),label:e||i,alignment:u.a.Right}):s.a.createElement("div",null);return s.a.createElement("div",{onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,className:l()("mx_InfoTooltip",r)},s.a.createElement("span",{className:l()("mx_InfoTooltip_icon",a),"aria-label":i}),t,c)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(249),d=n(117),h=n(81),p=n(179);let m;m=function(){};let g=Object(h.a)("structures.ScrollPanel")((i=o=class extends l.a.Component{constructor(e,t){super(e,t),s()(this,"pendingFillRequests",{b:null,f:null}),s()(this,"itemlist",Object(c.createRef)()),s()(this,"unmounted",!1),s()(this,"scrollTimeout",void 0),s()(this,"isFilling",void 0),s()(this,"isFillingDueToPropsUpdate",!1),s()(this,"fillRequestWhileRunning",void 0),s()(this,"pendingFillDueToPropsUpdate",void 0),s()(this,"scrollState",void 0),s()(this,"preventShrinkingState",void 0),s()(this,"unfillDebouncer",void 0),s()(this,"bottomGrowth",void 0),s()(this,"pages",void 0),s()(this,"heightUpdateInProgress",void 0),s()(this,"divScroll",void 0),s()(this,"onScroll",e=>{this.props.resizeNotifier&&this.props.resizeNotifier.isResizing||(m("onScroll",this.getScrollNode().scrollTop),this.scrollTimeout.restart(),this.saveScrollState(),this.updatePreventShrinking(),this.props.onScroll(e),this.checkFillState())}),s()(this,"onResize",()=>{m("onResize"),this.checkScroll(),this.preventShrinkingState&&this.preventShrinking()}),s()(this,"checkScroll",(e=!1)=>{this.unmounted||(this.restoreSavedScrollState(),this.checkFillState(0,e))}),s()(this,"isAtBottom",()=>{const e=this.getScrollNode();return Math.abs(e.scrollHeight-(e.scrollTop+e.clientHeight))<=1}),s()(this,"checkFillState",async(e=0,t=!1)=>{if(this.unmounted)return;const n=0===e,r=this.getScrollNode();if(n){if(this.isFilling&&!this.isFillingDueToPropsUpdate)return m("isFilling: not entering while request is ongoing, marking for a subsequent request"),this.fillRequestWhileRunning=!0,void(this.pendingFillDueToPropsUpdate=t);m("isFilling: setting"),this.isFilling=!0,this.isFillingDueToPropsUpdate=t}const o=this.itemlist.current,i=o&&o.firstElementChild,a=i&&i.offsetTop,s=[];if((!i||r.scrollTop-a<r.clientHeight)&&s.push(this.maybeFill(e,!0)),r.scrollHeight-r.scrollTop<2*r.clientHeight&&s.push(this.maybeFill(e,!1)),s.length)try{await Promise.all(s)}catch(e){console.error(e)}if(n&&(m("isFilling: clearing"),this.isFilling=!1,this.isFillingDueToPropsUpdate=!1),this.fillRequestWhileRunning){const e=this.pendingFillDueToPropsUpdate;this.fillRequestWhileRunning=!1,this.pendingFillDueToPropsUpdate=!1,this.checkFillState(0,e)}}),s()(this,"getScrollState",()=>this.scrollState),s()(this,"resetScrollState",()=>{this.scrollState={stuckAtBottom:this.props.startAtBottom},this.bottomGrowth=0,this.pages=0,this.scrollTimeout=new u.a(100),this.heightUpdateInProgress=!1}),s()(this,"scrollToTop",()=>{this.getScrollNode().scrollTop=0,this.saveScrollState()}),s()(this,"scrollToBottom",()=>{const e=this.getScrollNode();e.scrollTop=e.scrollHeight,this.saveScrollState()}),s()(this,"scrollRelative",e=>{const t=this.getScrollNode(),n=e*t.clientHeight*.9;t.scrollBy(0,n),this.saveScrollState()}),s()(this,"handleScrollKey",e=>{let t=!1;switch(Object(p.f)().getRoomAction(e)){case p.d.ScrollUp:this.scrollRelative(-1),t=!0;break;case p.d.RoomScrollDown:this.scrollRelative(1),t=!0;break;case p.d.JumpToFirstMessage:this.scrollToTop(),t=!0;break;case p.d.JumpToLatestMessage:this.scrollToBottom(),t=!0}t&&this.props.onUserScroll&&this.props.onUserScroll(e)}),s()(this,"scrollToToken",(e,t,n)=>{t=t||0,n=n||0,this.scrollState={stuckAtBottom:!1,trackedScrollToken:e};const r=this.getTrackedNode(),o=this.getScrollNode();r&&(m("scrollToken: setting scrollTop",{offsetBase:n,pixelOffset:t,offsetTop:r.offsetTop}),o.scrollTop=r.offsetTop-o.clientHeight*n+t,this.saveScrollState())}),s()(this,"collectScroll",e=>{this.divScroll=e}),s()(this,"preventShrinking",()=>{const e=this.itemlist.current,t=e&&e.children;if(!e)return;let n;for(let e=t.length-1;e>=0;e--){const r=t[e];if(r.dataset.scrollTokens){n=r;break}}if(!n)return;this.clearPreventShrinking();const r=e.clientHeight-(n.offsetTop+n.clientHeight);this.preventShrinkingState={offsetFromBottom:r,offsetNode:n},m("prevent shrinking, last tile ",r,"px from bottom")}),s()(this,"clearPreventShrinking",()=>{const e=this.itemlist.current,t=e&&e.parentElement;t&&(t.style.paddingBottom=null),this.preventShrinkingState=null,m("prevent shrinking cleared")}),s()(this,"updatePreventShrinking",()=>{if(this.preventShrinkingState){const e=this.getScrollNode(),t=this.scrollState,n=this.itemlist.current,{offsetNode:r,offsetFromBottom:o}=this.preventShrinkingState,i=n.parentElement;let a=!r.parentElement;if(!a&&!t.stuckAtBottom){a=e.scrollHeight-(e.scrollTop+e.clientHeight)>=200}if(!a){const e=o-(n.clientHeight-(r.offsetTop+r.clientHeight));e>0?(i.style.paddingBottom=e+"px",m("update prevent shrinking ",e,"px from bottom")):e<0&&(a=!0)}a&&this.clearPreventShrinking()}}),this.props.resizeNotifier&&this.props.resizeNotifier.on("middlePanelResizedNoisy",this.onResize),this.resetScrollState()}componentDidMount(){this.checkScroll()}componentDidUpdate(){this.checkScroll(!0),this.updatePreventShrinking()}componentWillUnmount(){this.unmounted=!0,this.props.resizeNotifier&&this.props.resizeNotifier.removeListener("middlePanelResizedNoisy",this.onResize)}getExcessHeight(e){const t=this.getScrollNode(),n=this.getMessagesHeight(),r=n-this.getListHeight(),o=t.scrollTop+r;return e?o-t.clientHeight-6e3:n-(o+2*t.clientHeight)-6e3}checkUnfillState(e){let t=this.getExcessHeight(e);if(t<=0)return;const n=t,r=this.itemlist.current.children;let o,i=null;for(let n=0;n<r.length&&(o=r[e?n:r.length-1-n],t-=o.clientHeight,!(o.clientHeight>t));n++)o.dataset.scrollTokens&&(i=o.dataset.scrollTokens.split(",")[0]);i&&(this.unfillDebouncer&&clearTimeout(this.unfillDebouncer),this.unfillDebouncer=setTimeout(()=>{this.unfillDebouncer=null,m("unfilling now",e,n),this.props.onUnfillRequest(e,i)},200))}maybeFill(e,t){const n=t?"b":"f";if(!this.pendingFillRequests[n])return m("starting "+n+" fill"),this.pendingFillRequests[n]=!0,new Promise(e=>setTimeout(e,1)).then(()=>this.props.onFillRequest(t)).finally(()=>{this.pendingFillRequests[n]=!1}).then(r=>{if(!this.unmounted)return this.checkUnfillState(!t),m(n+" fill complete; hasMoreResults:"+r),r?this.checkFillState(e+1):void 0});m("Already a "+n+" fill in progress - not starting another")}saveScrollState(){if(this.props.stickyBottom&&this.isAtBottom())return this.scrollState={stuckAtBottom:!0},void m("saved stuckAtBottom state");const e=this.getScrollNode(),t=e.scrollHeight-(e.scrollTop+e.clientHeight),n=this.itemlist.current.children;let r=null;for(let e=n.length-1;e>=0&&!(n[e].dataset.scrollTokens&&(r=n[e],this.topFromBottom(r)>t));--e);if(!r)return void m("unable to save scroll state: found no children in the viewport");const o=r.dataset.scrollTokens.split(",")[0];m("saving anchored scroll state to message",r&&r.innerText,o);const i=this.topFromBottom(r);this.scrollState={stuckAtBottom:!1,trackedNode:r,trackedScrollToken:o,bottomOffset:i,pixelOffset:i-t}}async restoreSavedScrollState(){const e=this.scrollState;if(e.stuckAtBottom){const e=this.getScrollNode();e.scrollTop!==e.scrollHeight&&(e.scrollTop=e.scrollHeight)}else if(e.trackedScrollToken){const t=this.itemlist.current,n=this.getTrackedNode();if(n){const r=this.topFromBottom(n),o=r-e.bottomOffset;this.bottomGrowth+=o,e.bottomOffset=r;const i=this.getListHeight()+"px";t.style.height!==i&&(t.style.height=i),m("balancing height because messages below viewport grew by",o)}}if(this.heightUpdateInProgress)m("not updating height because request already in progress");else{this.heightUpdateInProgress=!0;try{await this.updateHeight()}finally{this.heightUpdateInProgress=!1}}}async updateHeight(){if(this.scrollTimeout.isRunning()?(m("updateHeight waiting for scrolling to end ... "),await this.scrollTimeout.finished()):m("updateHeight getting straight to business, no scrolling going on."),this.unmounted)return;const e=this.getScrollNode(),t=this.itemlist.current,n=this.getMessagesHeight(),r=e.clientHeight,o=Math.max(r,n);this.pages=Math.ceil(o/400),this.bottomGrowth=0;const i=this.getListHeight()+"px",a=this.scrollState;if(a.stuckAtBottom)t.style.height!==i&&(t.style.height=i),e.scrollTop!==e.scrollHeight&&(e.scrollTop=e.scrollHeight),m("updateHeight to",i);else if(a.trackedScrollToken){const n=this.getTrackedNode();if(n){const r=n.offsetTop;t.style.height!==i&&(t.style.height=i);const o=n.offsetTop-r;e.scrollBy(0,o),m("updateHeight to",{newHeight:i,topDiff:o})}}}getTrackedNode(){const e=this.scrollState,t=e.trackedNode;if(!t||!t.parentElement){let t;const n=this.itemlist.current.children,r=e.trackedScrollToken;for(let e=n.length-1;e>=0;--e){const o=n[e];if(o.dataset.scrollTokens&&-1!==o.dataset.scrollTokens.split(",").indexOf(r)){t=o;break}}t&&m("had to find tracked node again for "+e.trackedScrollToken),e.trackedNode=t}if(e.trackedNode)return e.trackedNode;m("No node with ; '"+e.trackedScrollToken+"'")}getListHeight(){return this.bottomGrowth+400*this.pages}getMessagesHeight(){const e=this.itemlist.current,t=e.lastElementChild;return(t?t.offsetTop+t.clientHeight:0)-(e.firstElementChild?e.firstElementChild.offsetTop:0)+36}topFromBottom(e){return this.itemlist.current.clientHeight-e.offsetTop}getScrollNode(){if(this.unmounted)throw new Error("ScrollPanel.getScrollNode called when unmounted");if(!this.divScroll)throw new Error("ScrollPanel.getScrollNode called before AutoHideScrollbar ref collected");return this.divScroll}render(){return l.a.createElement(d.a,{wrappedRef:this.collectScroll,onScroll:this.onScroll,onWheel:this.props.onUserScroll,className:"mx_ScrollPanel "+this.props.className,style:this.props.style},this.props.fixedChildren,l.a.createElement("div",{className:"mx_RoomView_messageListWrapper"},l.a.createElement("ol",{ref:this.itemlist,className:"mx_RoomView_MessageList","aria-live":"polite",role:"list"},this.props.children)))}},s()(o,"defaultProps",{stickyBottom:!0,startAtBottom:!0,onFillRequest:function(e){return Promise.resolve(!1)},onUnfillRequest:function(e,t){},onScroll:function(){}}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(700),a=n(701);class s{static createItem(e,t,n){return new i.a(e,t,n)}static createSizer(e,t,n){return new a.a(e,t,n)}constructor(e){this.item=e,o()(this,"beforeOffset",void 0),this.beforeOffset=e.offset()}get size(){return this.item.getSize()}set size(e){this.item.setRawSize(e)}resize(e){this.item.setSize(e)}resizeFromContainerOffset(e){this.resize(e-this.beforeOffset)}start(){this.item.start()}finish(){this.item.finish()}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"f",(function(){return E})),n.d(t,"e",(function(){return S}));var r=n(78),o=n(86),i=n.n(o),a=n(87),s=n(80),c=n(104),l=n(166);let u,d;Object(s.b)("Navigation"),Object(s.b)("Calls"),Object(s.b)("Composer"),Object(s.b)("Room List"),Object(s.b)("Autocomplete"),function(e){e.NAVIGATION="Navigation",e.CALLS="Calls",e.COMPOSER="Composer",e.ROOM_LIST="Room List",e.ROOM="Room",e.AUTOCOMPLETE="Autocomplete"}(u||(u={})),Object(s.b)("Alt"),Object(s.b)("Alt Gr"),Object(s.b)("Shift"),Object(s.b)("Super"),Object(s.b)("Ctrl"),function(e){e.ALT="Alt",e.ALT_GR="Alt Gr",e.SHIFT="Shift",e.SUPER="Super",e.COMMAND="Command",e.CONTROL="Ctrl"}(d||(d={}));const h=c.b?d.COMMAND:d.CONTROL,p="digits",m={[u.COMPOSER]:[{keybinds:[{modifiers:[h],key:c.a.B}],description:Object(s.b)("Toggle Bold")},{keybinds:[{modifiers:[h],key:c.a.I}],description:Object(s.b)("Toggle Italics")},{keybinds:[{modifiers:[h],key:c.a.GREATER_THAN}],description:Object(s.b)("Toggle Quote")},{keybinds:[{modifiers:[d.SHIFT],key:c.a.ENTER}],description:Object(s.b)("New line")},{keybinds:[{key:c.a.ARROW_UP},{key:c.a.ARROW_DOWN}],description:Object(s.b)("Navigate recent messages to edit")},{keybinds:[{modifiers:[h],key:c.a.HOME},{modifiers:[h],key:c.a.END}],description:Object(s.b)("Jump to start/end of the composer")},{keybinds:[{modifiers:[d.CONTROL,d.ALT],key:c.a.ARROW_UP},{modifiers:[d.CONTROL,d.ALT],key:c.a.ARROW_DOWN}],description:Object(s.b)("Navigate composer history")},{keybinds:[{key:c.a.ESCAPE}],description:Object(s.b)("Cancel replying to a message")}],[u.CALLS]:[{keybinds:[{modifiers:[h],key:c.a.D}],description:Object(s.b)("Toggle microphone mute")},{keybinds:[{modifiers:[h],key:c.a.E}],description:Object(s.b)("Toggle video on/off")}],[u.ROOM]:[{keybinds:[{key:c.a.PAGE_UP},{key:c.a.PAGE_DOWN}],description:Object(s.b)("Scroll up/down in the timeline")},{keybinds:[{key:c.a.ESCAPE}],description:Object(s.b)("Dismiss read marker and jump to bottom")},{keybinds:[{modifiers:[d.SHIFT],key:c.a.PAGE_UP}],description:Object(s.b)("Jump to oldest unread message")},{keybinds:[{modifiers:[h,d.SHIFT],key:c.a.U}],description:Object(s.b)("Upload a file")},{keybinds:[{modifiers:[h],key:c.a.F}],description:Object(s.b)("Search (must be enabled)")}],[u.ROOM_LIST]:[{keybinds:[{modifiers:[h],key:c.a.K}],description:Object(s.b)("Jump to room search")},{keybinds:[{key:c.a.ARROW_UP},{key:c.a.ARROW_DOWN}],description:Object(s.b)("Navigate up/down in the room list")},{keybinds:[{key:c.a.ENTER}],description:Object(s.b)("Select room from the room list")},{keybinds:[{key:c.a.ARROW_LEFT}],description:Object(s.b)("Collapse room list section")},{keybinds:[{key:c.a.ARROW_RIGHT}],description:Object(s.b)("Expand room list section")},{keybinds:[{key:c.a.ESCAPE}],description:Object(s.b)("Clear room list filter field")}],[u.NAVIGATION]:[{keybinds:[{modifiers:[d.ALT,d.SHIFT],key:c.a.ARROW_UP},{modifiers:[d.ALT,d.SHIFT],key:c.a.ARROW_DOWN}],description:Object(s.b)("Previous/next unread room or DM")},{keybinds:[{modifiers:[d.ALT],key:c.a.ARROW_UP},{modifiers:[d.ALT],key:c.a.ARROW_DOWN}],description:Object(s.b)("Previous/next room or DM")},{keybinds:[{modifiers:[h],key:c.a.BACKTICK}],description:Object(s.b)("Toggle the top left menu")},{keybinds:[{key:c.a.ESCAPE}],description:Object(s.b)("Close dialog or context menu")},{keybinds:[{key:c.a.ENTER},{key:c.a.SPACE}],description:Object(s.b)("Activate selected button")},{keybinds:[{modifiers:[h],key:c.a.PERIOD}],description:Object(s.b)("Toggle right panel")},{keybinds:[{modifiers:[h],key:c.a.SLASH}],description:Object(s.b)("Toggle this dialog")},{keybinds:[{modifiers:[d.CONTROL,c.b?d.SHIFT:d.ALT],key:c.a.H}],description:Object(s.b)("Go to Home View")}],[u.AUTOCOMPLETE]:[{keybinds:[{key:c.a.ARROW_UP},{key:c.a.ARROW_DOWN}],description:Object(s.b)("Move autocomplete selection up/down")},{keybinds:[{key:c.a.ESCAPE}],description:Object(s.b)("Cancel autocomplete")}]},g=[u.COMPOSER,u.AUTOCOMPLETE,u.ROOM,u.ROOM_LIST,u.NAVIGATION,u.CALLS],f={[d.COMMAND]:"⌘"};c.b&&(f[d.ALT]="⌥");const _={[c.a.PAGE_UP]:Object(s.b)("Page Up"),[c.a.PAGE_DOWN]:Object(s.b)("Page Down"),[c.a.ESCAPE]:Object(s.b)("Esc"),[c.a.ENTER]:Object(s.b)("Enter"),[c.a.SPACE]:Object(s.b)("Space"),[c.a.HOME]:Object(s.b)("Home"),[c.a.END]:Object(s.b)("End"),[p]:Object(s.b)("[number]")},b={[c.a.ARROW_UP]:"↑",[c.a.ARROW_DOWN]:"↓",[c.a.ARROW_LEFT]:"←",[c.a.ARROW_RIGHT]:"→"},v=({shortcut:e})=>{const t=i()({mx_KeyboardShortcutsDialog_inline:e.keybinds.every(e=>!e.modifiers||0===e.modifiers.length)});return r.createElement("div",{className:t},r.createElement("h5",null,Object(s.a)(e.description)),e.keybinds.map(e=>{let t=e.key;return _[e.key]?t=Object(s.a)(_[e.key]):b[e.key]&&(t=b[e.key]),r.createElement("div",{key:e.key},e.modifiers&&e.modifiers.map(e=>r.createElement(r.Fragment,{key:e},r.createElement("kbd",null,f[e]||Object(s.a)(e)),"+")),r.createElement("kbd",null,t))}))};let y=null;const E=()=>{if(y)return y.close(),void(y=null);const e=g.map(e=>{const t=m[e];return r.createElement("div",{className:"mx_KeyboardShortcutsDialog_category",key:e},r.createElement("h3",null,Object(s.a)(e)),r.createElement("div",null,t.map(e=>r.createElement(v,{key:e.description,shortcut:e}))))});y=a.a.createTrackedDialog("Keyboard Shortcuts","",l.a,{className:"mx_KeyboardShortcutsDialog",title:Object(s.a)("Keyboard Shortcuts"),description:e,hasCloseButton:!0,onKeyDown:e=>{!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||e.key!==c.a.SLASH||(e.stopPropagation(),y.close())},onFinished:()=>{y=null}})},S=(e,t)=>{m[e].push(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return C}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(142),d=n.n(u),h=n(88),p=n.n(h),m=n(107),g=n(520),f=n.n(g),_=n(83),b=n(94),v=n(82),y=n(2),E=n(81);function S(e){return document.getElementById(e)}let w=Object(E.a)("views.elements.PersistedElement")((i=o=class e extends l.a.Component{constructor(){super(),s()(this,"updateChildPosition",Object(m.throttle)((e,t)=>{if(!e||!t)return;const n=t.getBoundingClientRect();Object.assign(e.style,{zIndex:Object(y.v)(this.props.zIndex)?9:this.props.zIndex,position:"absolute",top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"})},100,{trailing:!0,leading:!0})),this.collectChildContainer=this.collectChildContainer.bind(this),this.collectChild=this.collectChild.bind(this),this._repositionChild=this._repositionChild.bind(this),this._onAction=this._onAction.bind(this),this.resizeObserver=new f.a(this._repositionChild),window.addEventListener("resize",this._repositionChild),this._dispatcherRef=_.a.register(this._onAction)}static destroyElement(e){const t=S("mx_persistedElement_"+e);t&&t.remove()}static isMounted(e){return Boolean(S("mx_persistedElement_"+e))}collectChildContainer(e){this.childContainer&&this.resizeObserver.unobserve(this.childContainer),this.childContainer=e,e&&this.resizeObserver.observe(e)}collectChild(e){this.child=e,this.updateChild()}componentDidMount(){this.updateChild(),this.renderApp()}componentDidUpdate(){this.updateChild(),this.renderApp()}componentWillUnmount(){this.updateChildVisibility(this.child,!1),this.resizeObserver.disconnect(),window.removeEventListener("resize",this._repositionChild),_.a.unregister(this._dispatcherRef)}_onAction(t){"timeline_resize"===t.action?this._repositionChild():"logout"===t.action&&e.destroyElement(this.props.persistKey)}_repositionChild(){this.updateChildPosition(this.child,this.childContainer)}updateChild(){this.updateChildPosition(this.child,this.childContainer),this.updateChildVisibility(this.child,!0)}renderApp(){const e=l.a.createElement(b.a.Provider,{value:v.a.get()},l.a.createElement("div",{ref:this.collectChild,style:this.props.style},this.props.children));d.a.render(e,function(e){let t=S(e);return t||(t=document.createElement("div"),t.id=e,document.body.appendChild(t)),t}("mx_persistedElement_"+this.props.persistKey))}updateChildVisibility(e,t){e&&(e.style.display=t?"block":"none")}render(){return l.a.createElement("div",{ref:this.collectChildContainer})}},s()(o,"propTypes",{persistKey:p.a.string.isRequired,zIndex:p.a.number}),r=i))||r;const C=e=>"widget_"+e},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(283),l=n(81);let u=Object(l.a)("structures.MainSplit")(r=class extends s.a.Component{constructor(...e){super(...e),i()(this,"_onResizeStart",()=>{this.props.resizeNotifier.startResizing()}),i()(this,"_onResize",()=>{this.props.resizeNotifier.notifyRightHandleResized()}),i()(this,"_onResizeStop",(e,t,n,r)=>{this.props.resizeNotifier.stopResizing(),window.localStorage.setItem("mx_rhs_size",this._loadSidePanelSize().width+r.width)})}_loadSidePanelSize(){let e=parseInt(window.localStorage.getItem("mx_rhs_size"),10);return isNaN(e)&&(e=350),{height:"100%",width:e}}render(){const e=s.a.Children.only(this.props.children),t=this.props.panel;let n;return!this.props.collapsedRhs&&t&&(n=s.a.createElement(c.Resizable,{defaultSize:this._loadSidePanelSize(),minWidth:264,maxWidth:"50%",enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:this._onResizeStart,onResize:this._onResize,onResizeStop:this._onResizeStop,className:"mx_RightPanel_ResizeWrapper",handleClasses:{left:"mx_RightPanel_ResizeHandle"}},t)),s.a.createElement("div",{className:"mx_MainSplit"},e,n)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(83),d=n(123),h=n(121),p=n(251),m=n(94),g=n(91),f=n(475),_=n(753),b=n(81),v=n(84),y=n(754),E=n(756),S=n(757),w=n(758),C=n(759),T=n(761),x=n(528),k=n(762),F=n(364),O=n(107),R=n(102);function D(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}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let A=Object(b.a)("structures.RightPanel")((i=o=class extends l.a.Component{constructor(e,t){super(e,t),s()(this,"dispatcherRef",void 0),s()(this,"delayedUpdate",Object(O.throttle)(()=>{this.forceUpdate()},500,{leading:!0,trailing:!0})),s()(this,"onGroupStoreUpdated",()=>{this.setState({isUserPrivilegedInGroup:d.a.isUserPrivileged(this.props.groupId)})}),s()(this,"onRoomStateMember",(e,t,n)=>{this.props.room&&n.roomId===this.props.room.roomId&&(this.state.phase===h.c.RoomMemberList&&n.roomId===this.props.room.roomId||this.state.phase===h.c.RoomMemberInfo&&n.roomId===this.props.room.roomId&&n.userId===this.state.member.userId)&&this.delayedUpdate()}),s()(this,"onAction",e=>{e.action===g.a.AfterRightPanelPhaseChange&&this.setState({phase:e.phase,groupRoomId:e.groupRoomId,groupId:e.groupId,member:e.member,event:e.event,verificationRequest:e.verificationRequest,verificationRequestPromise:e.verificationRequestPromise,widgetId:e.widgetId,space:e.space})}),s()(this,"onClose",()=>{this.props.user?u.a.dispatch({action:"view_home_page"}):this.state.phase===h.c.EncryptionPanel&&this.state.verificationRequest&&this.state.verificationRequest.pending?this.state.verificationRequest.cancel():u.a.dispatch({action:g.a.ToggleRightPanel,type:this.props.groupId?"group":"room"})}),this.state=I(I({},p.a.getSharedInstance().roomPanelPhaseParams),{},{phase:this.getPhaseFromProps(),isUserPrivilegedInGroup:null,member:this.getUserForPanel()})}getUserForPanel(){if(this.state&&this.state.member)return this.state.member;const e=p.a.getSharedInstance().roomPanelPhaseParams;return this.props.user||e.member}getPhaseFromProps(){var e;const t=p.a.getSharedInstance(),n=this.getUserForPanel();return this.props.groupId?h.a.includes(t.groupPanelPhase)?t.groupPanelPhase:(u.a.dispatch({action:g.a.SetRightPanelPhase,phase:h.c.GroupMemberList}),h.c.GroupMemberList):R.g.spacesEnabled&&null!==(e=this.props.room)&&void 0!==e&&e.isSpaceRoom()&&!h.b.includes(t.roomPanelPhase)?h.c.SpaceMemberList:n?t.roomPanelPhaseParams.member&&n.userId===t.roomPanelPhaseParams.member.userId&&t.roomPanelPhaseParams.verificationRequest?t.roomPanelPhase:h.c.RoomMemberInfo:t.roomPanelPhase}componentDidMount(){this.dispatcherRef=u.a.register(this.onAction);this.context.on("RoomState.members",this.onRoomStateMember),this.initGroupStore(this.props.groupId)}componentWillUnmount(){u.a.unregister(this.dispatcherRef),this.context&&this.context.removeListener("RoomState.members",this.onRoomStateMember),this.unregisterGroupStore()}UNSAFE_componentWillReceiveProps(e){e.groupId!==this.props.groupId&&(this.unregisterGroupStore(),this.initGroupStore(e.groupId))}initGroupStore(e){e&&d.a.registerListener(e,this.onGroupStoreUpdated)}unregisterGroupStore(){d.a.unregisterListener(this.onGroupStoreUpdated)}render(){let e=l.a.createElement("div",null);const t=this.props.room?this.props.room.roomId:void 0;switch(this.state.phase){case h.c.RoomMemberList:t&&(e=l.a.createElement(y.a,{roomId:t,key:t,onClose:this.onClose}));break;case h.c.SpaceMemberList:e=l.a.createElement(y.a,{roomId:this.state.space?this.state.space.roomId:t,key:this.state.space?this.state.space.roomId:t,onClose:this.onClose});break;case h.c.GroupMemberList:this.props.groupId&&(e=l.a.createElement(E.a,{groupId:this.props.groupId,key:this.props.groupId}));break;case h.c.GroupRoomList:e=l.a.createElement(S.a,{groupId:this.props.groupId,key:this.props.groupId});break;case h.c.RoomMemberInfo:case h.c.SpaceMemberInfo:case h.c.EncryptionPanel:e=l.a.createElement(C.a,{user:this.state.member,room:this.state.phase===h.c.SpaceMemberInfo?this.state.space:this.props.room,key:t||this.state.member.userId,onClose:this.onClose,phase:this.state.phase,verificationRequest:this.state.verificationRequest,verificationRequestPromise:this.state.verificationRequestPromise});break;case h.c.Room3pidMemberInfo:case h.c.Space3pidMemberInfo:e=l.a.createElement(T.a,{event:this.state.event,key:t});break;case h.c.GroupMemberInfo:e=l.a.createElement(C.a,{user:this.state.member,groupId:this.props.groupId,key:this.state.member.userId,phase:this.state.phase,onClose:this.onClose});break;case h.c.GroupRoomInfo:e=l.a.createElement(w.a,{groupRoomId:this.state.groupRoomId,groupId:this.props.groupId,key:this.state.groupRoomId});break;case h.c.NotificationPanel:e=l.a.createElement(k.a,{onClose:this.onClose});break;case h.c.PinnedMessages:v.b.getValue("feature_pinning")&&(e=l.a.createElement(F.b,{room:this.props.room,onClose:this.onClose}));break;case h.c.FilePanel:e=l.a.createElement(x.a,{roomId:t,resizeNotifier:this.props.resizeNotifier,onClose:this.onClose});break;case h.c.RoomSummary:e=l.a.createElement(f.a,{room:this.props.room,onClose:this.onClose});break;case h.c.Widget:e=l.a.createElement(_.a,{room:this.props.room,widgetId:this.state.widgetId,onClose:this.onClose})}return l.a.createElement("aside",{className:"mx_RightPanel dark-panel",id:"mx_RightPanel"},e)}},s()(o,"contextType",m.a),r=i))||r},function(e,t){e.exports="img/cancel.4b9715b.svg"},function(e,t,n){"use strict";var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(142),d=n.n(u),h=n(185),p=n(152),m=n(378),g=n(93),f=n(84),_=n(80),b=n(82),v=n(164),y=n(456),E=n(87),S=n(83),w=n(104),C=n(249),T=n(271),x=n(144),k=n(113),F=n(81),O=n(109),R=n(763),D=n(97),I=n(105);let A=function(...e){};let N=Object(F.a)("structures.TimelinePanel")((i=o=class e extends l.a.Component{constructor(t,n){super(t,n),s()(this,"lastRRSentEventId",void 0),s()(this,"lastRMSentEventId",void 0),s()(this,"messagePanel",Object(c.createRef)()),s()(this,"dispatcherRef",void 0),s()(this,"timelineWindow",void 0),s()(this,"unmounted",!1),s()(this,"readReceiptActivityTimer",void 0),s()(this,"readMarkerActivityTimer",void 0),s()(this,"onMessageListUnfillRequest",(e,t)=>{const n=e?p.b.BACKWARDS:p.b.FORWARDS;A("TimelinePanel: unpaginating events in direction",n);const r=t,o=this.state.events.findIndex(e=>e.getId()===r),i=e?o+1:this.state.events.length-o;if(i>0){A("TimelinePanel: Unpaginating",i,"in direction",n),this.timelineWindow.unpaginate(i,e);const{events:t,liveEvents:r,firstVisibleEventIndex:o}=this.getEvents(),a={events:t,liveEvents:r,firstVisibleEventIndex:o};e?a.canBackPaginate=!0:a.canForwardPaginate=!0,this.setState(a)}}),s()(this,"onPaginationRequest",(e,t,n)=>this.props.onPaginationRequest?this.props.onPaginationRequest(e,t,n):e.paginate(t,n)),s()(this,"onMessageListFillRequest",e=>{if(!this.shouldPaginate())return Promise.resolve(!1);const t=e?p.b.BACKWARDS:p.b.FORWARDS,n=e?"canBackPaginate":"canForwardPaginate",r=e?"backPaginating":"forwardPaginating";return this.state[n]?this.timelineWindow.canPaginate(t)?e&&0!==this.state.firstVisibleEventIndex?(A("TimelinePanel: won't",t,"paginate past first visible event"),Promise.resolve(!1)):(A("TimelinePanel: Initiating paginate; backwards:"+e),this.setState({[r]:!0}),this.onPaginationRequest(this.timelineWindow,t,20).then(t=>{if(this.unmounted)return;A("TimelinePanel: paginate complete backwards:"+e+"; success:"+t);const{events:o,liveEvents:i,firstVisibleEventIndex:a}=this.getEvents(),s={[r]:!1,[n]:t,events:o,liveEvents:i,firstVisibleEventIndex:a},c=e?p.b.FORWARDS:p.b.BACKWARDS,l=e?"canForwardPaginate":"canBackPaginate";return!this.state[l]&&this.timelineWindow.canPaginate(c)&&(A("TimelinePanel: can now",c,"paginate again"),s[l]=!0),new Promise(n=>{this.setState(s,()=>{n(t&&(!e||0===a))})})})):(A("TimelinePanel: can't",t,"paginate any further"),this.setState({[n]:!1}),Promise.resolve(!1)):(A("TimelinePanel: have given up",t,"paginating this timeline"),Promise.resolve(!1))}),s()(this,"onMessageListScroll",e=>{if(this.props.onScroll&&this.props.onScroll(e),this.props.manageReadMarkers){const e=this.getReadMarkerPosition();e<0&&this.setState({readMarkerVisible:!0});const t=this.readMarkerTimeout(e);this.readMarkerActivityTimer.changeTimeout(t)}}),s()(this,"onAction",e=>{switch(e.action){case"ignore_state_changed":this.forceUpdate()}}),s()(this,"onRoomTimeline",(e,t,n,r,o)=>{o.timeline.getTimelineSet()===this.props.timelineSet&&!n&&o&&o.liveEvent&&this.messagePanel.current&&(this.messagePanel.current.getScrollState().stuckAtBottom?this.timelineWindow.paginate(p.b.FORWARDS,1,!1).then(()=>{if(this.unmounted)return;const{events:t,liveEvents:n,firstVisibleEventIndex:r}=this.getEvents(),o=n[n.length-1],i={events:t,liveEvents:n,firstVisibleEventIndex:r};let a;if(this.props.manageReadMarkers){const t=b.a.get().credentials.userId;a=!1,e.getSender()===t||y.a.sharedInstance().userActiveRecently()?o&&0===this.getReadMarkerPosition()&&(this.setReadMarker(o.getId(),o.getTs(),!0),i.readMarkerVisible=!1,i.readMarkerEventId=o.getId(),a=!0):i.readMarkerVisible=!0}this.setState(i,()=>{this.messagePanel.current.updateTimelineMinHeight(),a&&this.props.onReadMarkerUpdated()})}):this.setState({canForwardPaginate:!0}))}),s()(this,"onRoomTimelineReset",(e,t)=>{t===this.props.timelineSet&&this.messagePanel.current&&this.messagePanel.current.isAtBottom()&&this.loadTimeline()}),s()(this,"canResetTimeline",()=>{var e;return null===(e=this.messagePanel)||void 0===e?void 0:e.current.isAtBottom()}),s()(this,"onRoomRedaction",(e,t)=>{this.unmounted||t===this.props.timelineSet.room&&this.forceUpdate()}),s()(this,"onEventReplaced",(e,t)=>{this.unmounted||t===this.props.timelineSet.room&&this.forceUpdate()}),s()(this,"onRoomReceipt",(e,t)=>{this.unmounted||t===this.props.timelineSet.room&&this.forceUpdate()}),s()(this,"onLocalEchoUpdated",(e,t,n)=>{this.unmounted||t===this.props.timelineSet.room&&this.reloadEvents()}),s()(this,"onAccountData",(e,t)=>{this.unmounted||t===this.props.timelineSet.room&&e.getType()===g.a.FullyRead&&this.setState({readMarkerEventId:e.getContent().event_id},this.props.onReadMarkerUpdated)}),s()(this,"onEventDecrypted",e=>{this.props.timelineSet.room&&e.getRoomId()===this.props.timelineSet.room.roomId&&this.forceUpdate()}),s()(this,"onSync",(e,t,n)=>{this.setState({clientSyncState:e})}),s()(this,"sendReadReceipt",()=>{if(f.b.getValue("lowBandwidth"))return;if(!this.messagePanel.current)return;if(!this.props.manageReadReceipts)return;const e=b.a.get();if(!e||e.isGuest())return;let t=!0;const n=this.getCurrentReadReceipt(!0),r=this.indexForEventId(n);n&&null===r&&this.timelineWindow.canPaginate(p.b.FORWARDS)&&(t=!1);const o=this.getLastDisplayedEventIndex({ignoreOwn:!0});null===o&&(t=!1);let i=this.state.events[o];t=t&&o>r&&this.lastRRSentEventId!=i.getId();const a=this.lastRMSentEventId!=this.state.readMarkerEventId;if(t||a){t?this.lastRRSentEventId=i.getId():i=null,this.lastRMSentEventId=this.state.readMarkerEventId;const e=this.props.timelineSet.room.roomId,n=f.b.getValue("feature_hidden_read_receipts",e);A("TimelinePanel: Sending Read Markers for ",this.props.timelineSet.room.roomId,"rm",this.state.readMarkerEventId,i?"rr "+i.getId():""," hidden:"+n),b.a.get().setRoomReadMarkers(e,this.state.readMarkerEventId,i,{hidden:n}).catch(e=>{if("M_UNRECOGNIZED"===e.errcode&&i)return b.a.get().sendReadReceipt(i,{}).catch(e=>{console.error(e),this.lastRRSentEventId=void 0});console.error(e),this.lastRRSentEventId=void 0,this.lastRMSentEventId=void 0}),this.isAtEndOfLiveTimeline()&&(this.props.timelineSet.room.setUnreadNotificationCount(h.a.Total,0),this.props.timelineSet.room.setUnreadNotificationCount(h.a.Highlight,0),S.a.dispatch({action:"on_room_read",roomId:this.props.timelineSet.room.roomId}))}}),s()(this,"updateReadMarker",()=>{if(!this.props.manageReadMarkers)return;if(1===this.getReadMarkerPosition())return;const e=this.getLastDisplayedEventIndex({allowPartial:!0});if(null===e)return;const t=this.state.events[e];this.setReadMarker(t.getId(),t.getTs()),this.state.readMarkerVisible&&this.setState({readMarkerVisible:!1}),this.sendReadReceipt()}),s()(this,"jumpToLiveTimeline",()=>{var e;this.timelineWindow.canPaginate(p.b.FORWARDS)?this.loadTimeline():null===(e=this.messagePanel.current)||void 0===e||e.scrollToBottom()}),s()(this,"scrollToEventIfNeeded",e=>{var t;null===(t=this.messagePanel.current)||void 0===t||t.scrollToEventIfNeeded(e)}),s()(this,"jumpToReadMarker",()=>{if(!this.props.manageReadMarkers)return;if(!this.messagePanel.current)return;if(!this.state.readMarkerEventId)return;null===this.messagePanel.current.getReadMarkerPosition()?this.loadTimeline(this.state.readMarkerEventId,0,1/3):this.messagePanel.current.scrollToEvent(this.state.readMarkerEventId,0,1/3)}),s()(this,"forgetReadMarker",()=>{if(!this.props.manageReadMarkers)return;const e=this.getCurrentReadReceipt(),t=this.props.timelineSet.getTimelineForEvent(e);let n;if(t){const r=t.getEvents().find(t=>t.getId()==e);r&&(n=r.getTs())}this.setReadMarker(e,n)}),s()(this,"isAtEndOfLiveTimeline",()=>{var e;return(null===(e=this.messagePanel.current)||void 0===e?void 0:e.isAtBottom())&&this.timelineWindow&&!this.timelineWindow.canPaginate(p.b.FORWARDS)}),s()(this,"getScrollState",()=>this.messagePanel.current?this.messagePanel.current.getScrollState():null),s()(this,"getReadMarkerPosition",()=>{if(!this.props.manageReadMarkers)return null;if(!this.messagePanel.current)return null;const t=this.messagePanel.current.getReadMarkerPosition();if(null!==t)return t;const n=e.roomReadMarkerTsMap[this.props.timelineSet.room.roomId];return n&&this.state.events.length>0?n<this.state.events[0].getTs()?-1:1:null}),s()(this,"canJumpToReadMarker",()=>{const e=this.getReadMarkerPosition();return null!==this.state.readMarkerEventId&&(e<0||null===e)}),s()(this,"handleScrollKey",e=>{this.messagePanel.current&&(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||e.key!==w.a.END?this.messagePanel.current.handleScrollKey(e):this.jumpToLiveTimeline())}),s()(this,"getRelationsForEvent",(e,t,n)=>this.props.timelineSet.getRelationsForEvent(e,t,n)),A("TimelinePanel: mounting");let r=null;if(this.props.manageReadMarkers){const e=this.props.timelineSet.room.getAccountData("m.fully_read");r=e?e.getContent().event_id:this.getCurrentReadReceipt()}this.state={events:[],liveEvents:[],timelineLoading:!0,firstVisibleEventIndex:0,canBackPaginate:!1,canForwardPaginate:!1,readMarkerVisible:!0,readMarkerEventId:r,backPaginating:!1,forwardPaginating:!1,clientSyncState:b.a.get().getSyncState(),isTwelveHour:f.b.getValue("showTwelveHourTimestamps"),alwaysShowTimestamps:f.b.getValue("alwaysShowTimestamps"),readMarkerInViewThresholdMs:f.b.getValue("readMarkerInViewThresholdMs"),readMarkerOutOfViewThresholdMs:f.b.getValue("readMarkerOutOfViewThresholdMs")},this.dispatcherRef=S.a.register(this.onAction);const o=b.a.get();o.on("Room.timeline",this.onRoomTimeline),o.on("Room.timelineReset",this.onRoomTimelineReset),o.on("Room.redaction",this.onRoomRedaction),o.on("Room.redactionCancelled",this.onRoomRedaction),o.on("Room.receipt",this.onRoomReceipt),o.on("Room.localEchoUpdated",this.onLocalEchoUpdated),o.on("Room.accountData",this.onAccountData),o.on("Event.decrypted",this.onEventDecrypted),o.on("Event.replaced",this.onEventReplaced),o.on("sync",this.onSync)}UNSAFE_componentWillMount(){this.props.manageReadReceipts&&this.updateReadReceiptOnUserActivity(),this.props.manageReadMarkers&&this.updateReadMarkerOnUserActivity(),this.initTimeline(this.props)}UNSAFE_componentWillReceiveProps(e){e.timelineSet!==this.props.timelineSet&&console.warn("Replacing timelineSet on a TimelinePanel - confusion may ensue");const t=e.eventId!=this.props.eventId,n=e.highlightedEventId!=this.props.highlightedEventId;if(t||n)return console.log("TimelinePanel switching to eventId "+e.eventId+" (was "+this.props.eventId+")"),this.initTimeline(e)}componentWillUnmount(){this.unmounted=!0,this.readReceiptActivityTimer&&(this.readReceiptActivityTimer.abort(),this.readReceiptActivityTimer=null),this.readMarkerActivityTimer&&(this.readMarkerActivityTimer.abort(),this.readMarkerActivityTimer=null),S.a.unregister(this.dispatcherRef);const e=b.a.get();e&&(e.removeListener("Room.timeline",this.onRoomTimeline),e.removeListener("Room.timelineReset",this.onRoomTimelineReset),e.removeListener("Room.redaction",this.onRoomRedaction),e.removeListener("Room.redactionCancelled",this.onRoomRedaction),e.removeListener("Room.receipt",this.onRoomReceipt),e.removeListener("Room.localEchoUpdated",this.onLocalEchoUpdated),e.removeListener("Room.accountData",this.onAccountData),e.removeListener("Event.decrypted",this.onEventDecrypted),e.removeListener("Event.replaced",this.onEventReplaced),e.removeListener("sync",this.onSync))}readMarkerTimeout(e){var t,n,r,o;return 0===e?null!==(t=null===(n=this.context)||void 0===n?void 0:n.readMarkerInViewThresholdMs)&&void 0!==t?t:this.state.readMarkerInViewThresholdMs:null!==(r=null===(o=this.context)||void 0===o?void 0:o.readMarkerOutOfViewThresholdMs)&&void 0!==r?r:this.state.readMarkerOutOfViewThresholdMs}async updateReadMarkerOnUserActivity(){const e=this.readMarkerTimeout(this.getReadMarkerPosition());for(this.readMarkerActivityTimer=new C.a(e);this.readMarkerActivityTimer;){y.a.sharedInstance().timeWhileActiveRecently(this.readMarkerActivityTimer);try{await this.readMarkerActivityTimer.finished()}catch(e){continue}this.updateReadMarker()}}async updateReadReceiptOnUserActivity(){for(this.readReceiptActivityTimer=new C.a(500);this.readReceiptActivityTimer;){y.a.sharedInstance().timeWhileActiveNow(this.readReceiptActivityTimer);try{await this.readReceiptActivityTimer.finished()}catch(e){continue}this.sendReadReceipt()}}advanceReadMarkerPastMyEvents(){if(!this.props.manageReadMarkers)return;const e=this.timelineWindow.getEvents();let t;for(t=0;t<e.length&&e[t].getId()!=this.state.readMarkerEventId;t++);if(t>=e.length)return;const n=b.a.get().credentials.userId;for(t++;t<e.length;t++){if(e[t].getSender()!==n)break}t--;const r=e[t];this.setReadMarker(r.getId(),r.getTs())}initTimeline(e){const t=e.eventId,n=e.eventPixelOffset;let r=1;return null==n&&(r=.5),this.loadTimeline(t,n,r)}loadTimeline(e,t,n){this.timelineWindow=new m.b(b.a.get(),this.props.timelineSet,{windowLimit:this.props.timelineCap});const r=()=>{this.unmounted||(this.messagePanel.current&&this.messagePanel.current.onTimelineReset(),this.reloadEvents(),this.advanceReadMarkerPastMyEvents(),this.setState({canBackPaginate:this.timelineWindow.canPaginate(p.b.BACKWARDS),canForwardPaginate:this.timelineWindow.canPaginate(p.b.FORWARDS),timelineLoading:!1},()=>{this.messagePanel.current?(e?this.messagePanel.current.scrollToEvent(e,t,n):this.messagePanel.current.scrollToBottom(),this.props.sendReadReceiptOnLoad&&this.sendReadReceipt()):console.log("can't initialise scroll state because messagePanel didn't load")}))},o=t=>{if(this.unmounted)return;let n,r;this.setState({timelineLoading:!1}),console.error(`Error loading timeline panel at ${e}: ${t}`),e&&(n=()=>{S.a.dispatch({action:"view_room",room_id:this.props.timelineSet.room.roomId})}),r="M_FORBIDDEN"==t.errcode?Object(_.a)("Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question."):Object(_.a)("Tried to load a specific point in this room's timeline, but was unable to find it."),E.a.createTrackedDialog("Failed to load timeline position","",I.a,{title:Object(_.a)("Failed to load timeline position"),description:r,onFinished:n})};if(this.props.timelineSet.getTimelineForEvent(e))this.timelineWindow.load(e,20),r();else{const t=this.timelineWindow.load(e,20);this.setState({events:[],liveEvents:[],canBackPaginate:!1,canForwardPaginate:!1,timelineLoading:!0}),t.then(r,o)}}reloadEvents(){this.unmounted||this.setState(this.getEvents())}getEvents(){const e=this.timelineWindow.getEvents();Object(O.b)(e).reverse().forEach(e=>{b.a.get().decryptEventIfNeeded(e)});const t=this.checkForPreJoinUISI(e),n=[...e];return this.timelineWindow.canPaginate(p.b.FORWARDS)||e.push(...this.props.timelineSet.getPendingEvents()),{events:e,liveEvents:n,firstVisibleEventIndex:t}}checkForPreJoinUISI(e){const t=this.props.timelineSet.room;if(0===e.length||!t||!b.a.get().isRoomEncrypted(t.roomId))return 0;const n=b.a.get().credentials.userId;let r,o="leave";for(r=e.length-1;r>=0;r--){const i=t.getTimelineForEvent(e[r].getId());if(!i){console.warn(`Event ${e[r].getId()} in room ${t.roomId} is live, but it does not have a timeline`);continue}const a=i.getState(p.b.FORWARDS).getMember(n);o=a?a.membership:"leave";const s=i.getEvents();for(let t=s.length-1;t>=0;t--){const i=s[t];if(i.getId()===e[r].getId())break;if(i.getStateKey()===n&&"m.room.member"===i.getType()){o=i.getPrevContent().membership||"leave"}}break}for(;r>=0;r--){const t=e[r];if(t.getStateKey()===n&&"m.room.member"===t.getType()){o=t.getPrevContent().membership||"leave"}else if("leave"===o&&(t.isDecryptionFailure()||t.isBeingDecrypted()))return r+1}return 0}indexForEventId(e){for(let t=0;t<this.state.events.length;++t)if(e==this.state.events[t].getId())return t;return null}getLastDisplayedEventIndex(e={}){const t=e.ignoreOwn||!1,n=e.allowPartial||!1,r=this.messagePanel.current;if(!r)return null;const o=d.a.findDOMNode(r);if(!o)return null;const i=o.getBoundingClientRect(),a=b.a.get().credentials.userId,s=e=>{if(e){const t=e.getBoundingClientRect();if(n&&t.top<i.bottom||!n&&t.bottom<i.bottom)return!0}return!1};let c=0;for(let e=this.state.liveEvents.length-1;e>=0;--e){var l;const n=this.state.liveEvents[e],o=r.getNodeForEventId(n.getId()),i=s(o);if(i&&0!==c)return e+c;o&&!i&&(c=0);const u=!!n.status||t&&n.getSender()===a;if(!(!Object(x.d)(n,null===(l=this.context)||void 0===l?void 0:l.showHiddenEventsInTimeline)||Object(T.a)(n,this.context))&&o){if(!u&&i)return e}else(!u||u&&0!==c)&&++c}return null}getCurrentReadReceipt(e=!1){const t=b.a.get();if(null==t)return null;const n=t.credentials.userId;return this.props.timelineSet.room.getEventReadUpTo(n,e)}setReadMarker(t,n,r=!1){const o=this.props.timelineSet.room.roomId;t!==this.state.readMarkerEventId&&(e.roomReadMarkerTsMap[o]=n,r||this.setState({readMarkerEventId:t},this.props.onReadMarkerUpdated))}shouldPaginate(){return!this.state.events.some(e=>e.isBeingDecrypted())}render(){var e,t,n,r,o;if(this.state.timelineLoading)return l.a.createElement("div",{className:"mx_RoomView_messagePanelSpinner"},l.a.createElement(D.a,null));if(0==this.state.events.length&&!this.state.canBackPaginate&&this.props.empty)return l.a.createElement("div",{className:this.props.className+" mx_RoomView_messageListWrapper"},l.a.createElement("div",{className:"mx_RoomView_empty"},this.props.empty));const i=!this.timelineWindow.canPaginate(p.b.FORWARDS),a=this.state.forwardPaginating||["PREPARED","CATCHUP"].includes(this.state.clientSyncState),s=this.state.firstVisibleEventIndex?this.state.events.slice(this.state.firstVisibleEventIndex):this.state.events;return l.a.createElement(R.a,{ref:this.messagePanel,room:this.props.timelineSet.room,permalinkCreator:this.props.permalinkCreator,hidden:this.props.hidden,backPaginating:this.state.backPaginating,forwardPaginating:a,events:s,highlightedEventId:this.props.highlightedEventId,readMarkerEventId:this.state.readMarkerEventId,readMarkerVisible:this.state.readMarkerVisible,suppressFirstDateSeparator:this.state.canBackPaginate,showUrlPreview:this.props.showUrlPreview,showReadReceipts:this.props.showReadReceipts,ourUserId:b.a.get().credentials.userId,stickyBottom:i,onScroll:this.onMessageListScroll,onUserScroll:this.props.onUserScroll,onFillRequest:this.onMessageListFillRequest,onUnfillRequest:this.onMessageListUnfillRequest,isTwelveHour:null!==(e=null===(t=this.context)||void 0===t?void 0:t.showTwelveHourTimestamps)&&void 0!==e?e:this.state.isTwelveHour,alwaysShowTimestamps:null!==(n=null!==(r=this.props.alwaysShowTimestamps)&&void 0!==r?r:null===(o=this.context)||void 0===o?void 0:o.alwaysShowTimestamps)&&void 0!==n?n:this.state.alwaysShowTimestamps,className:this.props.className,tileShape:this.props.tileShape,resizeNotifier:this.props.resizeNotifier,getRelationsForEvent:this.getRelationsForEvent,editState:this.props.editState,showReactions:this.props.showReactions,layout:this.props.layout,enableFlair:f.b.getValue(k.a.Flair)})}},s()(o,"contextType",v.a),s()(o,"roomReadMarkerTsMap",{}),s()(o,"defaultProps",{timelineCap:Number.MAX_VALUE,className:"mx_RoomView_messagePanel",sendReadReceiptOnLoad:!0}),r=i))||r;t.a=N},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,o=n(78),i=n.n(o),a=n(81);let s=Object(a.a)("views.audio_messages.Clock")(r=class extends i.a.Component{constructor(e){super(e)}shouldComponentUpdate(e,t,n){return Math.floor(this.props.seconds)!==Math.floor(e.seconds)}render(){const e=Math.floor(this.props.seconds/60).toFixed(0).padStart(2,"0"),t=Math.floor(this.props.seconds%60).toFixed(0).padStart(2,"0");return i.a.createElement("span",{className:"mx_Clock"},e,":",t)}})||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(85),a=n(80),s=n(174),c=n(90),l=n(87),u=n(822),d=n(166);const h=()=>{l.a.createTrackedDialog("Custom Server Dialog","",d.a,{title:Object(a.a)("Server Options"),description:Object(a.a)("You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver."),button:Object(a.a)("Dismiss"),hasCloseButton:!1,fixedWidth:!1},"mx_ServerPicker_helpDialog")};t.a=({title:e,dialogTitle:t,serverConfig:n,onServerConfigChange:r})=>{let d;if(!c.a.get().disable_custom_urls&&r){const e=()=>{((e,t,n)=>{l.a.createTrackedDialog("Server Picker","",u.a,{title:e,serverConfig:t,onFinished:n})})(t,n,e=>{e&&r(e)})};d=o.a.createElement(i.a,{className:"mx_ServerPicker_change",kind:"link",onClick:e},Object(a.a)("Edit"))}let p,m=n.isNameResolvable?n.hsName:n.hsUrl;return n.hsNameIsDifferent&&(m=o.a.createElement(s.a,{class:"mx_Login_underlinedServerName",tooltip:n.hsUrl},n.hsName)),"matrix.org"===n.hsName&&(p=o.a.createElement("span",{className:"mx_ServerPicker_desc"},Object(a.a)("Join millions for free on the largest public server"))),o.a.createElement("div",{className:"mx_ServerPicker"},o.a.createElement("h3",null,e||Object(a.a)("Homeserver")),o.a.createElement(i.a,{className:"mx_ServerPicker_help",onClick:h}),o.a.createElement("span",{className:"mx_ServerPicker_server"},m),d,p)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return T}));var r,o,i,a,s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(194),h=n(823),p=n(87),m=n(80),g=n(90),f=n(686),_=n(157),b=n(252),v=n(112),y=n(101),E=n(824),S=n(81),w=n(353);!function(e){e.Email="field_email",e.PhoneNumber="field_phone_number",e.Username="field_username",e.Password="field_password",e.PasswordConfirm="field_password_confirm"}(a||(a={}));const C=3;let T=Object(S.a)("views.auth.RegistrationForm")((i=o=class extends u.a.PureComponent{constructor(e){super(e),c()(this,"onSubmit",async e=>{if(e.preventDefault(),e.persist(),!this.props.canSubmit)return;if(await this.verifyFieldsBeforeSubmit())if(""===this.state.email){if(!this.showEmail())return void this.doSubmit(e);v.a.instance.track("onboarding_registration_submit_warn"),p.a.createTrackedDialog("Email prompt dialog","",E.a,{onFinished:async(t,n)=>{t&&this.setState({email:n},()=>{this.doSubmit(e)})}})}else this.doSubmit(e);else v.a.instance.track("onboarding_registration_submit_failed")}),c()(this,"onEmailChange",e=>{this.setState({email:e.target.value})}),c()(this,"onEmailValidate",async e=>{const t=await this.validateEmailRules(e);return this.markFieldValid(a.Email,t.valid),t}),c()(this,"validateEmailRules",Object(_.a)({description:()=>Object(m.a)("Use an email address to recover your account"),hideDescriptionIfValid:!0,rules:[{key:"required",test({value:e,allowEmpty:t}){return t||!this.authStepIsRequired("m.login.email.identity")||!!e},invalid:()=>Object(m.a)("Enter email address (required on this homeserver)")},{key:"email",test:({value:e})=>!e||d.a(e),invalid:()=>Object(m.a)("Doesn't look like a valid email address")}]})),c()(this,"onPasswordChange",e=>{this.setState({password:e.target.value})}),c()(this,"onPasswordValidate",e=>{this.markFieldValid(a.Password,e.valid)}),c()(this,"onPasswordConfirmChange",e=>{this.setState({passwordConfirm:e.target.value})}),c()(this,"onPasswordConfirmValidate",async e=>{const t=await this.validatePasswordConfirmRules(e);return this.markFieldValid(a.PasswordConfirm,t.valid),t}),c()(this,"validatePasswordConfirmRules",Object(_.a)({rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(m.a)("Confirm password")},{key:"match",test({value:e}){return!e||e===this.state.password},invalid:()=>Object(m.a)("Passwords don't match")}]})),c()(this,"onPhoneCountryChange",e=>{this.setState({phoneCountry:e.iso2})}),c()(this,"onPhoneNumberChange",e=>{this.setState({phoneNumber:e.target.value})}),c()(this,"onPhoneNumberValidate",async e=>{const t=await this.validatePhoneNumberRules(e);return this.markFieldValid(a.PhoneNumber,t.valid),t}),c()(this,"validatePhoneNumberRules",Object(_.a)({description:()=>Object(m.a)("Other users can invite you to rooms using your contact details"),hideDescriptionIfValid:!0,rules:[{key:"required",test({value:e,allowEmpty:t}){return t||!this.authStepIsRequired("m.login.msisdn")||!!e},invalid:()=>Object(m.a)("Enter phone number (required on this homeserver)")},{key:"email",test:({value:e})=>!e||Object(h.c)(e),invalid:()=>Object(m.a)("That phone number doesn't look quite right, please check and try again")}]})),c()(this,"onUsernameChange",e=>{this.setState({username:e.target.value})}),c()(this,"onUsernameValidate",async e=>{const t=await this.validateUsernameRules(e);return this.markFieldValid(a.Username,t.valid),t}),c()(this,"validateUsernameRules",Object(_.a)({description:()=>Object(m.a)("Use lowercase letters, numbers, dashes and underscores only"),hideDescriptionIfValid:!0,rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(m.a)("Enter username")},{key:"safeLocalpart",test:({value:e})=>!e||f.a.test(e),invalid:()=>Object(m.a)("Some characters not allowed")}]})),this.state={fieldValid:{},phoneCountry:this.props.defaultPhoneCountry,username:this.props.defaultUsername||"",email:this.props.defaultEmail||"",phoneNumber:this.props.defaultPhoneNumber||"",password:this.props.defaultPassword||"",passwordConfirm:this.props.defaultPassword||"",passwordComplexity:null},v.a.instance.track("onboarding_registration_begin")}doSubmit(e){const t=this.state.email.trim();v.a.instance.track("onboarding_registration_submit_ok",{email:!!t});const n=this.props.onRegisterClick({username:this.state.username.trim(),password:this.state.password.trim(),email:t,phoneCountry:this.state.phoneCountry,phoneNumber:this.state.phoneNumber});n&&(e.target.disabled=!0,n.finally((function(){e.target.disabled=!1})))}async verifyFieldsBeforeSubmit(){const e=document.activeElement;e&&e.blur();const t=[a.Username,a.Password,a.PasswordConfirm,a.Email,a.PhoneNumber];for(const e of t){const t=this[e];t&&await t.validate({allowEmpty:!1})}if(await new Promise(e=>this.setState({},e)),this.allFieldsValid())return!0;const n=this.findFirstInvalidField(t);return!n||(n.focus(),n.validate({allowEmpty:!1,focused:!0}),!1)}allFieldsValid(){const e=Object.keys(this.state.fieldValid);for(let t=0;t<e.length;++t)if(!this.state.fieldValid[e[t]])return!1;return!0}findFirstInvalidField(e){for(const t of e)if(!this.state.fieldValid[t]&&this[t])return this[t];return null}markFieldValid(e,t){const{fieldValid:n}=this.state;n[e]=t,this.setState({fieldValid:n})}authStepIsRequired(e){return this.props.flows.every(t=>t.stages.includes(e))}authStepIsUsed(e){return this.props.flows.some(t=>t.stages.includes(e))}showEmail(){return!!this.authStepIsUsed("m.login.email.identity")}showPhoneNumber(){return!(g.a.get().disable_3pid_login||!this.authStepIsUsed("m.login.msisdn"))}renderEmail(){if(!this.showEmail())return null;const e=this.authStepIsRequired("m.login.email.identity")?Object(m.a)("Email"):Object(m.a)("Email (optional)");return u.a.createElement(y.a,{ref:e=>this[a.Email]=e,type:"text",label:e,value:this.state.email,onChange:this.onEmailChange,onValidate:this.onEmailValidate,onFocus:()=>v.a.instance.track("onboarding_registration_email_focus"),onBlur:()=>v.a.instance.track("onboarding_registration_email_blur")})}renderPassword(){return u.a.createElement(b.a,{id:"mx_RegistrationForm_password",fieldRef:e=>this[a.Password]=e,minScore:C,value:this.state.password,onChange:this.onPasswordChange,onValidate:this.onPasswordValidate,onFocus:()=>v.a.instance.track("onboarding_registration_password_focus"),onBlur:()=>v.a.instance.track("onboarding_registration_password_blur")})}renderPasswordConfirm(){return u.a.createElement(y.a,{id:"mx_RegistrationForm_passwordConfirm",ref:e=>this[a.PasswordConfirm]=e,type:"password",autoComplete:"new-password",label:Object(m.a)("Confirm password"),value:this.state.passwordConfirm,onChange:this.onPasswordConfirmChange,onValidate:this.onPasswordConfirmValidate,onFocus:()=>v.a.instance.track("onboarding_registration_passwordConfirm_focus"),onBlur:()=>v.a.instance.track("onboarding_registration_passwordConfirm_blur")})}renderPhoneNumber(){if(!this.showPhoneNumber())return null;const e=this.authStepIsRequired("m.login.msisdn")?Object(m.a)("Phone"):Object(m.a)("Phone (optional)"),t=u.a.createElement(w.a,{value:this.state.phoneCountry,isSmall:!0,showPrefix:!0,onOptionChange:this.onPhoneCountryChange});return u.a.createElement(y.a,{ref:e=>this[a.PhoneNumber]=e,type:"text",label:e,value:this.state.phoneNumber,prefixComponent:t,onChange:this.onPhoneNumberChange,onValidate:this.onPhoneNumberValidate})}renderUsername(){return u.a.createElement(y.a,{id:"mx_RegistrationForm_username",ref:e=>this[a.Username]=e,type:"text",autoFocus:!0,label:Object(m.a)("Username"),placeholder:Object(m.a)("Username").toLocaleLowerCase(),value:this.state.username,onChange:this.onUsernameChange,onValidate:this.onUsernameValidate,onFocus:()=>v.a.instance.track("onboarding_registration_username_focus"),onBlur:()=>v.a.instance.track("onboarding_registration_username_blur")})}render(){const e=u.a.createElement("input",{className:"mx_Login_submit",type:"submit",value:Object(m.a)("Register"),disabled:!this.props.canSubmit});let t=null;return this.showEmail()&&(t=this.showPhoneNumber()?u.a.createElement("div",null,Object(m.a)("Add an email to be able to reset your password.")," ",Object(m.a)("Use email or phone to optionally be discoverable by existing contacts.")):u.a.createElement("div",null,Object(m.a)("Add an email to be able to reset your password.")," ",Object(m.a)("Use email to optionally be discoverable by existing contacts."))),u.a.createElement("div",null,u.a.createElement("form",{onSubmit:this.onSubmit},u.a.createElement("div",{className:"mx_AuthBody_fieldRow"},this.renderUsername()),u.a.createElement("div",{className:"mx_AuthBody_fieldRow"},this.renderPassword(),this.renderPasswordConfirm()),u.a.createElement("div",{className:"mx_AuthBody_fieldRow"},this.renderEmail(),this.renderPhoneNumber()),t,e))}},c()(o,"defaultProps",{onValidationChange:console.error,canSubmit:!0}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(823),l=n(90),u=n(80),d=n(81),h=n(263);const p={};for(const e of c.a)p[e.iso2]=e;function m(e,t){return"+"===e[0]&&(e=e.slice(1)),0==t.name.toUpperCase().indexOf(e.toUpperCase())||(t.iso2==e.toUpperCase()||-1!==t.prefix.indexOf(e))}let g=Object(d.a)("views.auth.CountryDropdown")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onSearchChange",e=>{this.setState({searchQuery:e})}),i()(this,"onOptionChange",e=>{this.props.onOptionChange(p[e])}),i()(this,"getShortOption",e=>{if(!this.props.isSmall)return;let t;return this.props.showPrefix&&(t="+"+p[e].prefix),s.a.createElement("span",{className:"mx_CountryDropdown_shortOption"},this.flagImgForIso2(e),t)});let t=c.a[0];const n=l.a.get().defaultCountryCode;if(n){const e=c.a.find(e=>e.iso2===n.toUpperCase());e&&(t=e)}this.state={searchQuery:"",defaultCountry:t}}componentDidMount(){this.props.value||this.props.onOptionChange(this.state.defaultCountry)}flagImgForIso2(e){return s.a.createElement("div",{className:"mx_Dropdown_option_emoji"},Object(c.b)(e))}render(){let e;if(this.state.searchQuery){if(e=c.a.filter(m.bind(this,this.state.searchQuery)),2==this.state.searchQuery.length&&p[this.state.searchQuery.toUpperCase()]){const t=p[this.state.searchQuery.toUpperCase()];e=e.filter(e=>e.iso2!=t.iso2),e.unshift(t)}}else e=c.a;const t=e.map(e=>s.a.createElement("div",{className:"mx_CountryDropdown_option",key:e.iso2},this.flagImgForIso2(e.iso2),Object(u.a)(e.name)," (+",e.prefix,")")),n=this.props.value||this.state.defaultCountry.iso2;return s.a.createElement(h.a,{id:"mx_CountryDropdown",className:this.props.className+" mx_CountryDropdown",onOptionChange:this.onOptionChange,onSearchChange:this.onSearchChange,menuWidth:298,getShortOption:this.getShortOption,value:n,searchEnabled:!0,disabled:this.props.disabled,label:Object(u.a)("Country Dropdown")},t)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(379),l=n(78),u=n.n(l),d=n(88),h=n.n(d),p=n(203),m=n(89),g=n(81);const f=new Error("User cancelled auth session");let _=Object(g.a)("structures.InteractiveAuthComponent")((i=o=class extends u.a.Component{constructor(e){super(e),s()(this,"_requestEmailToken",async(...e)=>{this.setState({busy:!0});try{return await this.props.requestEmailToken(...e)}finally{this.setState({busy:!1})}}),s()(this,"tryContinue",()=>{this._stageComponent.current&&this._stageComponent.current.tryContinue&&this._stageComponent.current.tryContinue()}),s()(this,"_authStateUpdated",(e,t)=>{const n=this.state.authStage;this.setState({busy:!1,authStage:e,stageState:t,errorText:t.error},()=>{n!==e?this._setFocus():!t.error&&this._stageComponent.current&&this._stageComponent.current.attemptFailed&&this._stageComponent.current.attemptFailed()})}),s()(this,"_requestCallback",e=>this.props.makeRequest(e)),s()(this,"_onBusyChanged",e=>{e&&this.setState({busy:!0,errorText:null,stageErrorText:null})}),s()(this,"_submitAuthDict",e=>{this._authLogic.submitAuthDict(e)}),s()(this,"_onPhaseChange",e=>{this.props.onStagePhaseChange&&this.props.onStagePhaseChange(this.state.authStage,e||0)}),s()(this,"_onStageCancel",()=>{this.props.onAuthFinished(!1,f)}),s()(this,"_onAuthStageFailed",e=>{this.props.onAuthFinished(!1,e)}),s()(this,"_setEmailSid",e=>{this._authLogic.setEmailSid(e)}),this.state={authStage:null,busy:!1,errorText:null,stageErrorText:null,submitButtonEnabled:!1},this._unmounted=!1,this._authLogic=new c.a({authData:this.props.authData,doRequest:this._requestCallback,busyChanged:this._onBusyChanged,inputs:this.props.inputs,stateUpdated:this._authStateUpdated,matrixClient:this.props.matrixClient,sessionId:this.props.sessionId,clientSecret:this.props.clientSecret,emailSid:this.props.emailSid,requestEmailToken:this._requestEmailToken}),this._intervalId=null,this.props.poll&&(this._intervalId=setInterval(()=>{this._authLogic.poll()},2e3)),this._stageComponent=Object(l.createRef)()}UNSAFE_componentWillMount(){this._authLogic.attemptAuth().then(e=>{const t={emailSid:this._authLogic.getEmailSid(),clientSecret:this._authLogic.getClientSecret()};this.props.onAuthFinished(!0,e,t)}).catch(e=>{if(this.props.onAuthFinished(!1,e),console.error("Error during user-interactive auth:",e),this._unmounted)return;const t=e.message||e.toString();this.setState({errorText:t})})}componentWillUnmount(){this._unmounted=!0,null!==this._intervalId&&clearInterval(this._intervalId)}_setFocus(){this._stageComponent.current&&this._stageComponent.current.focus&&this._stageComponent.current.focus()}_renderCurrentStage(){const e=this.state.authStage;if(!e){if(this.state.busy){const e=m.getComponent("elements.Spinner");return u.a.createElement(e,null)}return null}const t=Object(p.d)(e);return u.a.createElement(t,{ref:this._stageComponent,loginType:e,matrixClient:this.props.matrixClient,authSessionId:this._authLogic.getSessionId(),clientSecret:this._authLogic.getClientSecret(),stageParams:this._authLogic.getStageParams(e),submitAuthDict:this._submitAuthDict,errorText:this.state.stageErrorText,busy:this.state.busy,inputs:this.props.inputs,stageState:this.state.stageState,fail:this._onAuthStageFailed,setEmailSid:this._setEmailSid,showContinue:!this.props.continueIsManaged,onPhaseChange:this._onPhaseChange,continueText:this.props.continueText,continueKind:this.props.continueKind,onCancel:this._onStageCancel})}render(){let e=null;return this.state.errorText&&(e=u.a.createElement("div",{className:"error"},this.state.errorText)),u.a.createElement("div",null,u.a.createElement("div",null,this._renderCurrentStage(),e))}},s()(o,"propTypes",{matrixClient:h.a.object.isRequired,authData:h.a.shape({flows:h.a.array,params:h.a.object,session:h.a.string}),makeRequest:h.a.func.isRequired,onAuthFinished:h.a.func.isRequired,inputs:h.a.object,requestEmailToken:h.a.func,sessionId:h.a.string,clientSecret:h.a.string,emailSid:h.a.string,poll:h.a.bool,continueIsManaged:h.a.bool,onStagePhaseChange:h.a.func,continueText:h.a.string,continueKind:h.a.string}),r=i))||r},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(107),u=n(86),d=n.n(u),h=n(111),p=n(85),m=n(80),g=n(284),f=n(106),_=n(100);const b=["matrixClient","loginType","fragmentAfterLogin","idp","primary","mini"],v=e=>{let{matrixClient:t,loginType:r,fragmentAfterLogin:i,idp:s,primary:l,mini:u}=e,v=a()(e,b);const y=s?Object(m.a)("Continue with %(provider)s",{provider:s.name}):Object(m.a)("Sign in with single sign-on"),E=()=>{h.a.get().startSingleSignOn(t,r,i,null==s?void 0:s.id)};let S,w;const C=s?(e=>{switch(e){case g.a.Apple:return n(1384);case g.a.Facebook:return n(1385);case g.a.Github:return n(1386);case g.a.Gitlab:return n(1387);case g.a.Google:return n(1388);case g.a.Twitter:return n(1389);default:return null}})(s.brand):null;if(C){const e=s.brand.split(".").pop();w="mx_SSOButton_brand_"+e,S=c.a.createElement("img",{src:C,height:"24",width:"24",alt:e})}else if("string"==typeof(null==s?void 0:s.icon)&&s.icon.startsWith("mxc://")){const e=Object(_.b)(s.icon,t).getSquareThumbnailHttp(24);S=c.a.createElement("img",{src:e,height:"24",width:"24",alt:s.name})}const T=d()("mx_SSOButton",{[w]:w,mx_SSOButton_mini:u,mx_SSOButton_default:!s,mx_SSOButton_primary:l});return u?c.a.createElement(f.a,o()({},v,{title:y,className:T,onClick:E}),S):c.a.createElement(p.a,o()({},v,{className:T,onClick:E}),S,y)};t.a=({matrixClient:e,flow:t,loginType:n,fragmentAfterLogin:r,primary:o})=>{const i=t.identity_providers||[];if(i.length<2)return c.a.createElement("div",{className:"mx_SSOButtons"},c.a.createElement(v,{matrixClient:e,loginType:n,fragmentAfterLogin:r,idp:i[0],primary:o}));const a=Math.ceil(i.length/6),s=Math.ceil(i.length/a);return c.a.createElement("div",{className:"mx_SSOButtons"},Object(l.chunk)(i,s).map(t=>c.a.createElement("div",{key:t[0].id,className:"mx_SSOButtons_row"},t.map(t=>c.a.createElement(v,{key:t.id,matrixClient:e,loginType:n,fragmentAfterLogin:r,idp:t,mini:!0,primary:o})))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,o=n(78),i=n.n(o),a=n(81);let s=Object(a.a)("views.auth.AuthBody")(r=class extends i.a.PureComponent{render(){return i.a.createElement("div",{className:"mx_AuthBody"},this.props.children)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r,o=n(78),i=n.n(o),a=n(81),s=n(830),c=n(493);let l=Object(a.a)("views.auth.AuthHeader")(r=class extends i.a.Component{render(){return i.a.createElement("div",{className:"mx_AuthHeader"},i.a.createElement(s.a,null),i.a.createElement(c.a,{disabled:this.props.disableLanguageSelector}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),o=n.n(r),i=n(228);class a extends i.a{static set matrixClient(e){const t=a._matrixClient;a._matrixClient=e;for(const n of a.instances)n.initMatrixClient(t,e)}constructor(){super(),a.instances.push(this)}get client(){return a._matrixClient}initMatrixClient(e,t){console.warn("initMatrixClient not overridden")}}o()(a,"_matrixClient",void 0),o()(a,"instances",[])},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(79),o=n.n(r),i=n(3),a=n(257),s=n(294),c=n(2),l=n(514),u=n(96);function d(e,t,n){const r=e.openCursor(t);return new Promise((e,t)=>{const o=[];r.onerror=()=>{t(new Error("Query failed: "+r.error))},r.onsuccess=()=>{const t=r.result;t?(o.push(n(t)),t.continue()):e(o)}})}function h(e){return new Promise((t,n)=>{e.oncomplete=function(e){t(e)},e.onerror=function(){n(e.error)}})}function p(e){return new Promise((t,n)=>{e.onsuccess=function(e){t(e)},e.onerror=function(){n(e.error)}})}function m(e){return p(e).then(t=>e.result)}class g{static exists(e,t){return t="matrix-js-sdk:"+(t||"default"),l.a(e,t)}constructor(e,t){this.indexedDB=e,o()(this,"dbName",void 0),o()(this,"syncAccumulator",void 0),o()(this,"db",null),o()(this,"disconnected",!0),o()(this,"_isNewlyCreated",!1),this.dbName="matrix-js-sdk:"+(t||"default"),this.syncAccumulator=new s.b}connect(){if(!this.disconnected)return u.a.log("LocalIndexedDBStoreBackend.connect: already connected or connecting"),Promise.resolve();this.disconnected=!1,u.a.log("LocalIndexedDBStoreBackend.connect: connecting...");const e=this.indexedDB.open(this.dbName,3);return e.onupgradeneeded=t=>{const n=e.result,r=t.oldVersion;u.a.log("LocalIndexedDBStoreBackend.connect: upgrading from "+r),r<1&&(this._isNewlyCreated=!0,function(e){e.createObjectStore("users",{keyPath:["userId"]}),e.createObjectStore("accountData",{keyPath:["type"]}),e.createObjectStore("sync",{keyPath:["clobber"]})}(n)),r<2&&function(e){e.createObjectStore("oob_membership_events",{keyPath:["room_id","state_key"]}).createIndex("room","room_id")}(n),r<3&&function(e){e.createObjectStore("client_options",{keyPath:["clobber"]})}(n)},e.onblocked=()=>{u.a.log("can't yet open LocalIndexedDBStoreBackend because it is open elsewhere")},u.a.log("LocalIndexedDBStoreBackend.connect: awaiting connection..."),p(e).then(()=>(u.a.log("LocalIndexedDBStoreBackend.connect: connected"),this.db=e.result,this.db.onversionchange=()=>{this.db.close()},this.init()))}isNewlyCreated(){return Promise.resolve(this._isNewlyCreated)}init(){return Promise.all([this.loadAccountData(),this.loadSyncData()]).then(([e,t])=>{u.a.log("LocalIndexedDBStoreBackend: loaded initial data"),this.syncAccumulator.accumulate({next_batch:t.nextBatch,rooms:t.roomsData,groups:t.groupsData,account_data:{events:e}},!0)})}getOutOfBandMembers(e){return new Promise((t,n)=>{const r=this.db.transaction(["oob_membership_events"],"readonly").objectStore("oob_membership_events").index("room"),o=IDBKeyRange.only(e),i=r.openCursor(o),a=[];let s=!1;i.onsuccess=()=>{const e=i.result;if(!e)return a.length||s?t(a):t(null);const n=e.value;n.oob_written?s=!0:a.push(n),e.continue()},i.onerror=e=>{n(e)}}).then(t=>(u.a.log(`LL: got ${t&&t.length} membershipEvents from storage for room ${e} ...`),t))}async setOutOfBandMembers(e,t){u.a.log("LL: backend about to store "+t.length+" members for "+e);const n=this.db.transaction(["oob_membership_events"],"readwrite"),r=n.objectStore("oob_membership_events");t.forEach(e=>{r.put(e)});const o={room_id:e,oob_written:!0,state_key:0};r.put(o),await h(n),u.a.log(`LL: backend done storing for ${e}!`)}async clearOutOfBandMembers(e){const t=this.db.transaction(["oob_membership_events"],"readonly").objectStore("oob_membership_events").index("room"),n=IDBKeyRange.only(e),r=m(t.openKeyCursor(n,"next")).then(e=>e&&e.primaryKey[1]),o=m(t.openKeyCursor(n,"prev")).then(e=>e&&e.primaryKey[1]),[i,a]=await Promise.all([r,o]),s=this.db.transaction(["oob_membership_events"],"readwrite").objectStore("oob_membership_events"),c=IDBKeyRange.bound([e,i],[e,a]);var l;u.a.log(`LL: Deleting all users + marker in storage for room ${e}, with key range:`,[e,i],[e,a]),await(l=s.delete(c),new Promise((e,t)=>{l.onsuccess=()=>e(l),l.onerror=e=>t(e)}))}clearDatabase(){return new Promise(e=>{u.a.log("Removing indexeddb instance: "+this.dbName);const t=this.indexedDB.deleteDatabase(this.dbName);t.onblocked=()=>{u.a.log(`can't yet delete indexeddb ${this.dbName} because it is open elsewhere`)},t.onerror=()=>{u.a.warn("unable to delete js-sdk store indexeddb: "+t.error),e()},t.onsuccess=()=>{u.a.log("Removed indexeddb instance: "+this.dbName),e()}})}getSavedSync(e=!0){const t=this.syncAccumulator.getJSON();return t.nextBatch?e?Promise.resolve(c.j(t)):Promise.resolve(t):Promise.resolve(null)}getNextBatchToken(){return Promise.resolve(this.syncAccumulator.getNextBatchToken())}setSyncData(e){return Promise.resolve().then(()=>{this.syncAccumulator.accumulate(e)})}async syncToDatabase(e){const t=this.syncAccumulator.getJSON(!0);await Promise.all([this.persistUserPresenceEvents(e),this.persistAccountData(t.accountData),this.persistSyncData(t.nextBatch,t.roomsData,t.groupsData)])}persistSyncData(e,t,n){return u.a.log("Persisting sync data up to",e),c.C(()=>{const r=this.db.transaction(["sync"],"readwrite");return r.objectStore("sync").put({clobber:"-",nextBatch:e,roomsData:t,groupsData:n}),h(r).then()})}persistAccountData(e){return c.C(()=>{const t=this.db.transaction(["accountData"],"readwrite"),n=t.objectStore("accountData");for(let t=0;t<e.length;t++)n.put(e[t]);return h(t).then()})}persistUserPresenceEvents(e){return c.C(()=>{const t=this.db.transaction(["users"],"readwrite"),n=t.objectStore("users");for(const t of e)n.put({userId:t[0],event:t[1]});return h(t).then()})}getUserPresenceEvents(){return c.C(()=>d(this.db.transaction(["users"],"readonly").objectStore("users"),void 0,e=>[e.value.userId,e.value.event]))}loadAccountData(){return u.a.log("LocalIndexedDBStoreBackend: loading account data..."),c.C(()=>d(this.db.transaction(["accountData"],"readonly").objectStore("accountData"),void 0,e=>e.value).then(e=>(u.a.log("LocalIndexedDBStoreBackend: loaded account data"),e)))}loadSyncData(){return u.a.log("LocalIndexedDBStoreBackend: loading sync data..."),c.C(()=>d(this.db.transaction(["sync"],"readonly").objectStore("sync"),void 0,e=>e.value).then(e=>(u.a.log("LocalIndexedDBStoreBackend: loaded sync data"),e.length>1&&u.a.warn("loadSyncData: More than 1 sync row found."),e.length>0?e[0]:{})))}getClientOptions(){return Promise.resolve().then(()=>d(this.db.transaction(["client_options"],"readonly").objectStore("client_options"),void 0,e=>{if(e.value&&e.value&&e.value.options)return e.value.options}).then(e=>e[0]))}async storeClientOptions(e){const t=this.db.transaction(["client_options"],"readwrite");t.objectStore("client_options").put({clobber:"-",options:e}),await h(t)}}class f{constructor(e,t){this.workerFactory=e,this.dbName=t,o()(this,"worker",void 0),o()(this,"nextSeq",0),o()(this,"inFlight",{}),o()(this,"startPromise",null),o()(this,"onWorkerMessage",e=>{const t=e.data;if("cmd_success"==t.command||"cmd_fail"==t.command){if(void 0===t.seq)return void u.a.error("Got reply from worker with no seq");const e=this.inFlight[t.seq];if(void 0===e)return void u.a.error("Got reply for unknown seq "+t.seq);if(delete this.inFlight[t.seq],"cmd_success"==t.command)e.resolve(t.result);else{const n=new Error(t.error.message);n.name=t.error.name,e.reject(n)}}else u.a.warn("Unrecognised message from worker: ",t)})}connect(){return this.ensureStarted().then(()=>this.doCmd("connect"))}clearDatabase(){return this.ensureStarted().then(()=>this.doCmd("clearDatabase"))}isNewlyCreated(){return this.doCmd("isNewlyCreated")}getSavedSync(){return this.doCmd("getSavedSync")}getNextBatchToken(){return this.doCmd("getNextBatchToken")}setSyncData(e){return this.doCmd("setSyncData",[e])}syncToDatabase(e){return this.doCmd("syncToDatabase",[e])}getOutOfBandMembers(e){return this.doCmd("getOutOfBandMembers",[e])}setOutOfBandMembers(e,t){return this.doCmd("setOutOfBandMembers",[e,t])}clearOutOfBandMembers(e){return this.doCmd("clearOutOfBandMembers",[e])}getClientOptions(){return this.doCmd("getClientOptions")}storeClientOptions(e){return this.doCmd("storeClientOptions",[e])}getUserPresenceEvents(){return this.doCmd("getUserPresenceEvents")}ensureStarted(){return null===this.startPromise&&(this.worker=this.workerFactory(),this.worker.onmessage=this.onWorkerMessage,this.startPromise=this.doCmd("_setupWorker",[this.dbName]).then(()=>{u.a.log("IndexedDB worker is ready")})),this.startPromise}doCmd(e,t){return Promise.resolve().then(()=>{const n=this.nextSeq++,r=Object(c.l)();return this.inFlight[n]=r,this.worker.postMessage({command:e,seq:n,args:t}),r.promise})}}var _=n(205),b=n(108);class v extends a.a{static exists(e,t){return g.exists(e,t)}constructor(e){if(super(e),o()(this,"backend",void 0),o()(this,"startedUp",!1),o()(this,"syncTs",0),o()(this,"userModifiedMap",{}),o()(this,"emitter",new i.EventEmitter),o()(this,"on",this.emitter.on.bind(this.emitter)),o()(this,"getSavedSync",this.degradable(()=>this.backend.getSavedSync(),"getSavedSync")),o()(this,"isNewlyCreated",this.degradable(()=>this.backend.isNewlyCreated(),"isNewlyCreated")),o()(this,"getSavedSyncToken",this.degradable(()=>this.backend.getNextBatchToken(),"getSavedSyncToken")),o()(this,"deleteAllData",this.degradable(()=>(super.deleteAllData(),this.backend.clearDatabase().then(()=>{u.a.log("Deleted indexeddb data.")},e=>{throw u.a.error("Failed to delete indexeddb data: "+e),e})))),o()(this,"reallySave",this.degradable(()=>{this.syncTs=Date.now();const e=[];for(const t of this.getUsers())this.userModifiedMap[t.userId]!==t.getLastModifiedTime()&&t.events.presence&&(e.push([t.userId,t.events.presence.event]),this.userModifiedMap[t.userId]=t.getLastModifiedTime());return this.backend.syncToDatabase(e)})),o()(this,"setSyncData",this.degradable(e=>this.backend.setSyncData(e),"setSyncData")),o()(this,"getOutOfBandMembers",this.degradable(e=>this.backend.getOutOfBandMembers(e),"getOutOfBandMembers")),o()(this,"setOutOfBandMembers",this.degradable((e,t)=>(super.setOutOfBandMembers(e,t),this.backend.setOutOfBandMembers(e,t)),"setOutOfBandMembers")),o()(this,"clearOutOfBandMembers",this.degradable(e=>(super.clearOutOfBandMembers(e),this.backend.clearOutOfBandMembers(e)),"clearOutOfBandMembers")),o()(this,"getClientOptions",this.degradable(()=>this.backend.getClientOptions(),"getClientOptions")),o()(this,"storeClientOptions",this.degradable(e=>(super.storeClientOptions(e),this.backend.storeClientOptions(e)),"storeClientOptions")),!e.indexedDB)throw new Error("Missing required option: indexedDB");e.workerFactory?this.backend=new f(e.workerFactory,e.dbName):this.backend=new g(e.indexedDB,e.dbName)}startup(){return this.startedUp?(u.a.log("IndexedDBStore.startup: already started"),Promise.resolve()):(u.a.log("IndexedDBStore.startup: connecting to backend"),this.backend.connect().then(()=>(u.a.log("IndexedDBStore.startup: loading presence events"),this.backend.getUserPresenceEvents())).then(e=>{u.a.log("IndexedDBStore.startup: processing presence events"),e.forEach(([e,t])=>{const n=new _.a(e);t&&n.setPresenceEvent(new b.b(t)),this.userModifiedMap[n.userId]=n.getLastModifiedTime(),this.storeUser(n)})}))}wantsSave(){return Date.now()-this.syncTs>3e5}save(e=!1){return e||this.wantsSave()?this.reallySave():Promise.resolve()}degradable(e,t){const n=super[t];return async(...t)=>{try{return e.call(this,...t)}catch(e){u.a.error("IndexedDBStore failure, degrading to MemoryStore",e),this.emitter.emit("degraded",e);try{u.a.log("IndexedDBStore trying to delete degraded data"),await this.backend.clearDatabase(),u.a.log("IndexedDBStore delete after degrading succeeded")}catch(e){u.a.warn("IndexedDBStore delete after degrading failed",e)}if(n)return n(...t)}}}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return g})),n.d(t,"a",(function(){return f})),n.d(t,"d",(function(){return _}));var r=n(78),o=n.n(r),i=n(108),a=n(93),s=n(80),c=n(190),l=n(97),u=n(94),d=n(127);var h=n(325),p=n(615);const m=e=>e,g=e=>{const[t,n]=Object(r.useState)([]),o=Object(r.useCallback)(t=>{var r,o;e&&(t&&t.getType()!==a.a.RoomPinnedEvents||n((null===(r=e.currentState.getStateEvents(a.a.RoomPinnedEvents,""))||void 0===r||null===(o=r.getContent())||void 0===o?void 0:o.pinned)||[]))},[e]);return Object(d.a)(null==e?void 0:e.currentState,"RoomState.events",o),Object(r.useEffect)(()=>(o(),()=>{n([])}),[o]),t},f="im.vector.room.read_pins",_=e=>{const[t,n]=Object(r.useState)(new Set),o=Object(r.useCallback)(t=>{var r,o;if(!e)return;if(t&&t.getType()!==f)return;const i=null===(r=e.getAccountData(f))||void 0===r||null===(o=r.getContent())||void 0===o?void 0:o.event_ids;n(new Set(i||[]))},[e]);return Object(d.a)(e,"Room.accountData",o),Object(r.useEffect)(()=>(o(),()=>{n(new Set)}),[o]),t};t.b=({room:e,onClose:t})=>{const n=Object(r.useContext)(u.a),b=((e,t=m)=>{const[n,o]=Object(r.useState)(e?t(e.currentState):void 0),i=Object(r.useCallback)(()=>{e&&o(t(e.currentState))},[e,t]);return Object(d.a)(null==e?void 0:e.currentState,"RoomState.events",i),Object(r.useEffect)(()=>(i(),()=>{o(void 0)}),[i]),n})(e,e=>e.mayClientSendStateEvent(a.a.RoomPinnedEvents,n)),v=g(e),y=_(e);Object(r.useEffect)(()=>{v.filter(e=>!y.has(e)).length>0&&n.setRoomAccountData(e.roomId,f,{event_ids:v})},[n,e.roomId,v,y]);const E=Object(h.a)(()=>{const t=v.map(async t=>{var r;const o=e.getUnfilteredTimelineSet(),a=null==o||null===(r=o.getTimelineForEvent(t))||void 0===r?void 0:r.getEvents().find(e=>e.getId()===t);if(a)return a;try{const r=await n.fetchRoomEvent(e.roomId,t),o=new i.b(r);if(o.isEncrypted()&&await n.decryptEventIfNeeded(o),o&&class{static isPinnable(e){return!!e&&("m.room.message"===e.getType()&&!e.isRedacted())}}.isPinnable(o))return o}catch(n){console.error("Error looking up pinned event "+t+" in room "+e.roomId),console.error(n)}return null});return Promise.all(t)},[n,e,v],null);let S;if(E)if(E.length>0){let t;b&&(t=async t=>{var r;const o=e.currentState.getStateEvents(a.a.RoomPinnedEvents,"");if(null!=o&&null!==(r=o.getContent())&&void 0!==r&&r.pinned){const r=o.getContent().pinned,i=r.indexOf(t.getId());-1!==i&&(r.splice(i,1),await n.sendStateEvent(e.roomId,a.a.RoomPinnedEvents,{pinned:r},""))}}),S=E.filter(Boolean).reverse().map(n=>o.a.createElement(p.a,{key:n.getId(),room:e,event:n,onUnpinClicked:()=>t(n)}))}else S=o.a.createElement("div",{className:"mx_PinnedMessagesCard_empty"},o.a.createElement("div",null,o.a.createElement("div",{className:"mx_PinnedMessagesCard_MessageActionBar"},o.a.createElement("div",{className:"mx_MessageActionBar_maskButton mx_MessageActionBar_reactButton"}),o.a.createElement("div",{className:"mx_MessageActionBar_maskButton mx_MessageActionBar_replyButton"}),o.a.createElement("div",{className:"mx_MessageActionBar_maskButton mx_MessageActionBar_optionsButton"})),o.a.createElement("h2",null,Object(s.a)("Nothing pinned, yet")),Object(s.a)("If you have permissions, open the menu on any message and select <b>Pin</b> to stick them here.",{},{b:e=>o.a.createElement("b",null,e)})));else S=o.a.createElement(l.a,null);return o.a.createElement(c.b,{header:o.a.createElement("h2",null,Object(s.a)("Pinned messages")),className:"mx_PinnedMessagesCard",onClose:t},S)}},function(e,t,n){"use strict";n.d(t,"e",(function(){return h})),n.d(t,"d",(function(){return p})),n.d(t,"g",(function(){return m})),n.d(t,"c",(function(){return g})),n.d(t,"f",(function(){return f})),n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return v}));var r=n(79),o=n.n(r),i=n(1087),a=n.n(i);class s{constructor(e){o()(this,"_regex",void 0);const t=a()(e,{extended:!1,globstar:!1}).toString().replace(/\\\?/g,".");this._regex=new RegExp(t.substring(1,t.length-1))}test(e){return this._regex.test(e)}}const c=["m.ban","org.matrix.mjolnir.ban"];function l(e,t=!0){return c.includes(e)?t?c[c.length-1]:"m.ban":null}class u{constructor(e,t,n,r){o()(this,"_glob",void 0),o()(this,"_entity",void 0),o()(this,"_action",void 0),o()(this,"_reason",void 0),o()(this,"_kind",void 0),this._glob=new s(e),this._entity=e,this._action=l(t,!1),this._reason=n,this._kind=r}get entity(){return this._entity}get reason(){return this._reason}get kind(){return this._kind}get recommendation(){return this._action}isMatch(e){return this._glob.test(e)}}var d=n(82);const h="m.room.rule.user",p="m.room.rule.server",m=[h,"org.matrix.mjolnir.rule.user"],g=["m.room.rule.room","org.matrix.mjolnir.rule.room"],f=[p,"org.matrix.mjolnir.rule.server"],_=[...m,...g,...f];function b(e,t=!0){return m.includes(e)?t?m[m.length-1]:h:g.includes(e)?t?g[g.length-1]:"m.room.rule.room":f.includes(e)?t?f[f.length-1]:p:null}class v{constructor(e){o()(this,"_rules",[]),o()(this,"_roomId",void 0),this._roomId=e,this.updateList()}get roomId(){return this._roomId}get serverRules(){return this._rules.filter(e=>e.kind===p)}get userRules(){return this._rules.filter(e=>e.kind===h)}get roomRules(){return this._rules.filter(e=>"m.room.rule.room"===e.kind)}async banEntity(e,t,n){await d.a.get().sendStateEvent(this._roomId,b(e,!0),{entity:t,reason:n,recommendation:l("m.ban",!0)},"rule:"+t),this._rules.push(new u(t,"m.ban",n,b(e,!1)))}async unbanEntity(e,t){await d.a.get().sendStateEvent(this._roomId,b(e,!0),{},"rule:"+t),this._rules=this._rules.filter(n=>n.kind!==b(e,!1)||n.entity!==t)}updateList(){this._rules=[];const e=d.a.get().getRoom(this._roomId);if(e)for(const t of _){const n=e.currentState.getStateEvents(t);for(const e of n){if(!e.getStateKey())continue;const n=b(t,!1),r=e.getContent().entity,o=e.getContent().recommendation,i=e.getContent().reason;r&&o&&i&&this._rules.push(new u(r,o,i,n))}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(79),o=n.n(r),i=n(3),a=n(152),s=n(108),c=n(96),l=n(93);class u extends i.EventEmitter{constructor(e,t,n){super(),this.relationType=e,this.eventType=t,this.room=n,o()(this,"relationEventIds",new Set),o()(this,"relations",new Set),o()(this,"annotationsByKey",{}),o()(this,"annotationsBySender",{}),o()(this,"sortedAnnotationsByKey",[]),o()(this,"targetEvent",null),o()(this,"creationEmitted",!1),o()(this,"onEventStatus",(e,t)=>{e.isSending()?t===s.a.CANCELLED&&(e.removeListener("Event.status",this.onEventStatus),this.removeEvent(e)):e.removeListener("Event.status",this.onEventStatus)}),o()(this,"onBeforeRedaction",async e=>{if(this.relations.has(e)){if(this.relations.delete(e),this.relationType===l.c.Annotation)this.removeAnnotationFromAggregation(e);else if(this.relationType===l.c.Replace&&this.targetEvent){const e=await this.getLastReplacement();this.targetEvent.makeReplaced(e)}e.removeListener("Event.beforeRedaction",this.onBeforeRedaction),this.emit("Relations.redaction",e)}})}async addEvent(e){if(this.relationEventIds.has(e.getId()))return;const t=e.getRelation();if(!t)return void c.a.error("Event must have relation info");const n=t.rel_type,r=e.getType();if(this.relationType===n&&this.eventType===r){if(e.isSending()&&e.on("Event.status",this.onEventStatus),this.relations.add(e),this.relationEventIds.add(e.getId()),this.relationType===l.c.Annotation)this.addAnnotationToAggregation(e);else if(this.relationType===l.c.Replace&&this.targetEvent){const e=await this.getLastReplacement();this.targetEvent.makeReplaced(e)}e.on("Event.beforeRedaction",this.onBeforeRedaction),this.emit("Relations.add",e),this.maybeEmitCreated()}else c.a.error("Event relation info doesn't match this container")}async removeEvent(e){if(!this.relations.has(e))return;const t=e.getRelation();if(!t)return void c.a.error("Event must have relation info");const n=t.rel_type,r=e.getType();if(this.relationType===n&&this.eventType===r){if(this.relations.delete(e),this.relationType===l.c.Annotation)this.removeAnnotationFromAggregation(e);else if(this.relationType===l.c.Replace&&this.targetEvent){const e=await this.getLastReplacement();this.targetEvent.makeReplaced(e)}this.emit("Relations.remove",e)}else c.a.error("Event relation info doesn't match this container")}getRelations(){return[...this.relations]}addAnnotationToAggregation(e){const{key:t}=e.getRelation();if(!t)return;let n=this.annotationsByKey[t];n||(n=this.annotationsByKey[t]=new Set,this.sortedAnnotationsByKey.push([t,n])),n.add(e),this.sortedAnnotationsByKey.sort((e,t)=>{const n=e[1];return t[1].size-n.size});const r=e.getSender();let o=this.annotationsBySender[r];o||(o=this.annotationsBySender[r]=new Set),o.add(e)}removeAnnotationFromAggregation(e){const{key:t}=e.getRelation();if(!t)return;const n=this.annotationsByKey[t];n&&(n.delete(e),this.sortedAnnotationsByKey.sort((e,t)=>{const n=e[1];return t[1].size-n.size}));const r=e.getSender(),o=this.annotationsBySender[r];o&&o.delete(e)}getSortedAnnotationsByKey(){return this.relationType!==l.c.Annotation?null:this.sortedAnnotationsByKey}getAnnotationsBySender(){return this.relationType!==l.c.Annotation?null:this.annotationsBySender}async getLastReplacement(){if(this.relationType!==l.c.Replace)return null;if(!this.targetEvent)return null;const e=this.targetEvent.getServerAggregatedRelation(l.c.Replace),t=e&&e.origin_server_ts,n=this.getRelations().reduce((e,n)=>n.getSender()!==this.targetEvent.getSender()||t&&t>n.getTs()||e&&e.getTs()>n.getTs()?e:n,null);return null!=n&&n.shouldAttemptDecryption()?await n.attemptDecryption(this.room.client.crypto):null!=n&&n.isBeingDecrypted()&&await n.getDecryptionPromise(),n}async setTargetEvent(e){if(!this.targetEvent){if(this.targetEvent=e,this.relationType===l.c.Replace){const e=await this.getLastReplacement();e&&this.targetEvent.makeReplaced(e)}this.maybeEmitCreated()}}maybeEmitCreated(){this.creationEmitted||this.targetEvent&&this.relations.size&&(this.creationEmitted=!0,this.targetEvent.emit("Event.relationsCreated",this.relationType,this.eventType))}}let d;d=c.a.log.bind(c.a);class h extends i.EventEmitter{constructor(e,t){super(),this.room=e,o()(this,"timelineSupport",void 0),o()(this,"unstableClientRelationAggregation",void 0),o()(this,"liveTimeline",void 0),o()(this,"timelines",void 0),o()(this,"_eventIdToTimeline",void 0),o()(this,"filter",void 0),o()(this,"relations",void 0),this.timelineSupport=Boolean(t.timelineSupport),this.liveTimeline=new a.b(this),this.unstableClientRelationAggregation=!!t.unstableClientRelationAggregation,this.timelines=[this.liveTimeline],this._eventIdToTimeline={},this.filter=t.filter,this.unstableClientRelationAggregation&&(this.relations={})}getTimelines(){return this.timelines}getFilter(){return this.filter}setFilter(e){this.filter=e}getPendingEvents(){return this.room?this.filter?this.filter.filterRoomTimeline(this.room.getPendingEvents()):this.room.getPendingEvents():[]}getLiveTimeline(){return this.liveTimeline}eventIdToTimeline(e){return this._eventIdToTimeline[e]}replaceEventId(e,t){const n=this._eventIdToTimeline[e];n&&(delete this._eventIdToTimeline[e],this._eventIdToTimeline[t]=n)}resetLiveTimeline(e,t){const n=!this.timelineSupport||!t,r=this.liveTimeline,o=n?r.forkLive(a.b.FORWARDS):r.fork(a.b.FORWARDS);n?(this.timelines=[o],this._eventIdToTimeline={}):this.timelines.push(o),t&&r.setPaginationToken(t,a.b.FORWARDS),o.setPaginationToken(e,a.b.BACKWARDS),this.liveTimeline=o,this.emit("Room.timelineReset",this.room,this,n)}getTimelineForEvent(e){const t=this._eventIdToTimeline[e];return void 0===t?null:t}findEventById(e){const t=this.getTimelineForEvent(e);if(t)return t.getEvents().find((function(t){return t.getId()==e}))}addTimeline(){if(!this.timelineSupport)throw new Error("timeline support is disabled. Set the 'timelineSupport' parameter to true when creating MatrixClient to enable it.");const e=new a.b(this);return this.timelines.push(e),e}addEventsToTimeline(e,t,n,r){if(!n)throw new Error("'timeline' not specified for EventTimelineSet.addEventsToTimeline");if(!t&&n==this.liveTimeline)throw new Error("EventTimelineSet.addEventsToTimeline cannot be used for adding events to the live timeline - use Room.addLiveEvents instead");if(this.filter&&!(e=this.filter.filterRoomTimeline(e)).length)return;const o=t?a.b.BACKWARDS:a.b.FORWARDS,i=t?a.b.FORWARDS:a.b.BACKWARDS;let s=!1,l=!1;for(let r=0;r<e.length;r++){const u=e[r],h=u.getId(),p=this._eventIdToTimeline[h];if(!p){this.addEventToTimeline(u,n,t),l=!0,s=!0;continue}if(l=!1,p==n){d("Event "+h+" already in timeline "+n);continue}const m=n.getNeighbouringTimeline(o);if(m){d(p==m?"Event "+h+" in neighbouring timeline - switching to "+p:"Event "+h+" already in a different timeline "+p),n=p;continue}c.a.info("Already have timeline for "+h+" - joining timeline "+n+" to "+p);const g=p===this.liveTimeline,f=n===this.liveTimeline,_=o===a.b.BACKWARDS&&g,b=o===a.b.FORWARDS&&f;_||b?(_&&c.a.warn("Refusing to set a preceding existingTimeLine on our timeline as the existingTimeLine is live ("+p+")"),b&&c.a.warn("Refusing to set our preceding timeline on a existingTimeLine as our timeline is live ("+n+")")):(n.setNeighbouringTimeline(p,o),p.setNeighbouringTimeline(n,i),n=p,s=!0)}if(l||!s){if(o===a.b.FORWARDS&&n===this.liveTimeline)return c.a.warn({lastEventWasNew:l,didUpdate:s}),void c.a.warn(`Refusing to set forwards pagination token of live timeline ${n} to ${r}`);n.setPaginationToken(r,o)}}addLiveEvent(e,t,n=!1){if(this.filter){if(!this.filter.filterRoomTimeline([e]).length)return}const r=this._eventIdToTimeline[e.getId()];if(r)if("replace"===t){d("EventTimelineSet.addLiveEvent: replacing duplicate event "+e.getId());const t=r.getEvents();for(let n=0;n<t.length;n++)if(t[n].getId()===e.getId()){a.b.setEventMetadata(e,r.getState(a.b.FORWARDS),!1),t[n]=e;break}}else d("EventTimelineSet.addLiveEvent: ignoring duplicate event "+e.getId());else this.addEventToTimeline(e,this.liveTimeline,!1,n)}addEventToTimeline(e,t,n,r=!1){const o=e.getId();t.addEvent(e,n),this._eventIdToTimeline[o]=t,this.setRelationsTarget(e),this.aggregateRelations(e);const i={timeline:t,liveEvent:!n&&t==this.liveTimeline&&!r};this.emit("Room.timeline",e,this.room,Boolean(n),!1,i)}handleRemoteEcho(e,t,n){const r=this._eventIdToTimeline[t];r?(delete this._eventIdToTimeline[t],this._eventIdToTimeline[n]=r):this.filter?this.filter.filterRoomTimeline([e]).length&&this.addEventToTimeline(e,this.liveTimeline,!1):this.addEventToTimeline(e,this.liveTimeline,!1)}removeEvent(e){const t=this._eventIdToTimeline[e];if(!t)return null;const n=t.removeEvent(e);if(n){delete this._eventIdToTimeline[e];const r={timeline:t};this.emit("Room.timeline",n,this.room,void 0,!0,r)}return n}compareEventOrdering(e,t){if(e==t)return 0;const n=this._eventIdToTimeline[e],r=this._eventIdToTimeline[t];if(void 0===n)return null;if(void 0===r)return null;if(n===r){let r,o;const i=n.getEvents();for(let n=0;n<i.length&&(void 0===r||void 0===o);n++){const a=i[n].getId();a==e&&(r=n),a==t&&(o=n)}return r-o}let o=n;for(;o;){if(o===r)return-1;o=o.getNeighbouringTimeline(a.b.FORWARDS)}for(o=n;o;){if(o===r)return 1;o=o.getNeighbouringTimeline(a.b.BACKWARDS)}return null}getRelationsForEvent(e,t,n){if(!this.unstableClientRelationAggregation)throw new Error("Client-side relation aggregation is disabled");if(!e||!t||!n)throw new Error("Invalid arguments for `getRelationsForEvent`");return((this.relations[e]||{})[t]||{})[n]}setRelationsTarget(e){if(!this.unstableClientRelationAggregation)return;const t=this.relations[e.getId()];if(t)for(const n of Object.values(t))for(const t of Object.values(n))t.setTargetEvent(e)}aggregateRelations(e){if(!this.unstableClientRelationAggregation)return;if(e.isRedacted()||e.status===s.a.CANCELLED)return;if(e.isBeingDecrypted()||e.shouldAttemptDecryption())return void e.once("Event.decrypted",()=>{this.aggregateRelations(e)});const t=e.getRelation();if(!t)return;const n=t.event_id,r=t.rel_type,o=e.getType();let i=this.relations[n];i||(i=this.relations[n]={});let a=i[r];a||(a=i[r]={});let c,l=a[o];l||(l=a[o]=new u(r,o,this.room),c=this.findEventById(n)||this.room.getPendingEvent(n),c&&l.setTargetEvent(c)),l.addEvent(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return X})),n.d(t,"c",(function(){return Z})),n.d(t,"a",(function(){return ee})),n.d(t,"d",(function(){return se}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(86),c=n.n(s),l=n(80),u=n(82),d=n(114),h=n(122),p=n(90),m=n(194),g=n(266),f=n(236),_=n(83),b=n(195),v=n(87);var y,E,S,w=n(125),C=n(151),T=n(104),x=n(91),k=n(141),F=n(156),O=n(176),R=n(84),D=n(113),I=n(112),A=n(81),N=n(100),M=n(265),P=n(120),L=n(85),j=n(130),U=n(106),B=n(103),G=n(280),V=n(101),q=n(234),H=n(338),z=n(110),W=n(97),K=n(95),Y=n(454),$=n(102);function Q(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}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const X="dm",Z="invite",ee="call_transfer";var te;!function(e){e.UserDirectory="users",e.DialPad="dialpad"}(te||(te={}));class ne{}class re extends ne{constructor(e){super(),o()(this,"_userId",void 0),o()(this,"displayName",void 0),o()(this,"avatarUrl",void 0),this._userId=e.user_id,this.displayName=e.display_name,this.avatarUrl=e.avatar_url}get name(){return this.displayName||this._userId}get userId(){return this._userId}getMxcAvatarUrl(){return this.avatarUrl}}class oe extends ne{constructor(e){super(),o()(this,"id",void 0),this.id=e}get isEmail(){return this.id.includes("@")}get name(){return this.id}get userId(){return this.id}getMxcAvatarUrl(){return null}}class ie extends a.a.PureComponent{constructor(...e){super(...e),o()(this,"onRemove",e=>{e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.member)})}render(){const e=this.props.member.isEmail?a.a.createElement("img",{className:"mx_InviteDialog_userTile_avatar mx_InviteDialog_userTile_threepidAvatar",src:n(675),width:20,height:20}):a.a.createElement(P.a,{className:"mx_InviteDialog_userTile_avatar",url:this.props.member.getMxcAvatarUrl()?Object(N.b)(this.props.member.getMxcAvatarUrl()).getSquareThumbnailHttp(20):null,name:this.props.member.name,idName:this.props.member.userId,width:20,height:20});let t;return this.props.onRemove&&(t=a.a.createElement(L.a,{className:"mx_InviteDialog_userTile_remove",onClick:this.onRemove},a.a.createElement("img",{src:n(1327),alt:Object(l.a)("Remove"),width:8,height:8}))),a.a.createElement("span",{className:"mx_InviteDialog_userTile"},a.a.createElement("span",{className:"mx_InviteDialog_userTile_pill"},e,a.a.createElement("span",{className:"mx_InviteDialog_userTile_name"},this.props.member.name)),t)}}class ae extends a.a.PureComponent{constructor(...e){super(...e),o()(this,"onClick",e=>{e.preventDefault(),e.stopPropagation(),this.props.onToggle(this.props.member)})}highlightName(e){if(!this.props.highlightWord)return e;const t=e.toLowerCase(),n=this.props.highlightWord.toLowerCase(),r=[];let o,i=0;for(;(o=t.indexOf(n,i))>=0;){o>i&&r.push(a.a.createElement("span",{key:i+"begin"},e.substring(i,o))),i=o;const t=e.substring(i,n.length+i);r.push(a.a.createElement("span",{className:"mx_InviteDialog_roomTile_highlight",key:i+"bold"},t)),i+=t.length}return i<e.length&&r.push(a.a.createElement("span",{key:i+"end"},e.substring(i))),r}render(){let e=null;if(this.props.lastActiveTs){const t=function(e){let t=(new Date).getTime()-e;const n=Math.abs(Math.ceil(t/6e4)),r=Math.ceil(n/60),o=Math.ceil(r/24);return t>=0?t<=15e3?Object(l.a)("a few seconds ago"):t<=75e3?Object(l.a)("about a minute ago"):n<=45?Object(l.a)("%(num)s minutes ago",{num:n}):n<=75?Object(l.a)("about an hour ago"):r<=23?Object(l.a)("%(num)s hours ago",{num:r}):r<=26?Object(l.a)("about a day ago"):Object(l.a)("%(num)s days ago",{num:o}):(t=Math.abs(t),t<=15e3?Object(l.a)("a few seconds from now"):t<=75e3?Object(l.a)("about a minute from now"):n<=45?Object(l.a)("%(num)s minutes from now",{num:n}):n<=75?Object(l.a)("about an hour from now"):r<=23?Object(l.a)("%(num)s hours from now",{num:r}):r<=26?Object(l.a)("about a day from now"):Object(l.a)("%(num)s days from now",{num:o}))}(this.props.lastActiveTs);e=a.a.createElement("span",{className:"mx_InviteDialog_roomTile_time"},t)}const t=this.props.member.isEmail?a.a.createElement("img",{src:n(675),width:36,height:36}):a.a.createElement(P.a,{url:this.props.member.getMxcAvatarUrl()?Object(N.b)(this.props.member.getMxcAvatarUrl()).getSquareThumbnailHttp(36):null,name:this.props.member.name,idName:this.props.member.userId,width:36,height:36});let r=null;this.props.isSelected&&(r=a.a.createElement("div",{className:"mx_InviteDialog_roomTile_selected"}));const o=a.a.createElement("span",{className:"mx_InviteDialog_roomTile_avatarStack"},t,r),i=this.props.member.isEmail?Object(l.a)("Invite by email"):this.highlightName(this.props.member.userId);return a.a.createElement("div",{className:"mx_InviteDialog_roomTile",onClick:this.onClick},o,a.a.createElement("span",{className:"mx_InviteDialog_roomTile_nameStack"},a.a.createElement("div",{className:"mx_InviteDialog_roomTile_name"},this.highlightName(this.props.member.name)),a.a.createElement("div",{className:"mx_InviteDialog_roomTile_userId"},i)),e)}}let se=Object(A.a)("views.dialogs.InviteDialog")((S=E=class e extends a.a.PureComponent{constructor(t){if(super(t),o()(this,"closeCopiedTooltip",void 0),o()(this,"debounceTimer",null),o()(this,"editorRef",Object(i.createRef)()),o()(this,"unmounted",!1),o()(this,"onConsultFirstChange",e=>{this.setState({consultFirst:e.target.checked})}),o()(this,"startDm",async()=>{this.setState({busy:!0});const e=u.a.get(),t=this.convertFilter(),n=t.map(e=>e.userId);let r;if(r=1===n.length?Object(w.e)(e,n[0]):h.a.shared().getDMRoomForIdentifiers(n),r)return _.a.dispatch({action:"view_room",room_id:r.roomId,should_peek:!1,joining:!1}),void this.props.onFinished();const o={inlineErrors:!0};if(Object(w.f)()){if(!t.some(e=>e instanceof oe)){await Object(w.a)(e,n)&&(o.encryption=!0)}}try{const t=1===n.length&&n[0]===e.getUserId();1!==n.length||t||(o.dmUserId=n[0]),n.length>1&&(o.createOpts=n.reduce((t,n)=>{const r=Object(M.c)(n);if("email"===r){const r={id_server:e.getIdentityServerUrl(!0),medium:"email",address:n};t.invite_3pid.push(r)}else"mx-user-id"===r&&t.invite.push(n);return t},{invite:[],invite_3pid:[]})),await Object(w.b)(o),this.props.onFinished()}catch(e){console.error(e),this.setState({busy:!1,errorText:Object(l.a)("We couldn't create your DM.")})}}),o()(this,"inviteUsers",async()=>{const e=I.a.getTimestamp();this.setState({busy:!0}),this.convertFilter();const t=this.convertFilter().map(e=>e.userId),n=u.a.get(),r=n.getRoom(this.props.roomId);if(!r)return console.error("Failed to find the room to invite users to"),void this.setState({busy:!1,errorText:Object(l.a)("Something went wrong trying to invite the users.")});try{const o=await Object(C.a)(this.props.roomId,t);if(I.a.instance.trackSendInvite(e,this.props.roomId,t.length),this.shouldAbortAfterInviteError(o,r)||this.props.onFinished(),n.isRoomEncrypted(this.props.roomId)){const e=r.currentState.getStateEvents("m.room.history_visibility",""),t=e&&e.getContent()&&e.getContent().history_visibility;if("world_readable"==t||"shared"==t){const e=[];for(const[t,n]of Object.entries(o.states))"invited"===n&&"mx-user-id"===Object(M.c)(t)&&e.push(t);console.log("Sharing history with",e),n.sendSharedHistoryKeys(this.props.roomId,e)}}}catch(e){console.error(e),this.setState({busy:!1,errorText:Object(l.a)("We couldn't invite those users. Please check the users you want to invite and try again.")})}}),o()(this,"transferCall",async()=>{if(this.state.currentTabId==te.UserDirectory){this.convertFilter();const e=this.convertFilter().map(e=>e.userId);if(e.length>1)return void this.setState({errorText:Object(l.a)("A call can only be transferred to a single user.")});_.a.dispatch({action:x.a.TransferCallToMatrixID,call:this.props.call,destination:e[0],consultFirst:this.state.consultFirst})}else _.a.dispatch({action:x.a.TransferCallToPhoneNumber,call:this.props.call,destination:this.state.dialPadValue,consultFirst:this.state.consultFirst});this.props.onFinished()}),o()(this,"onKeyDown",e=>{if(this.state.busy)return;const t=e.target.value.trim(),n=e.ctrlKey||e.shiftKey||e.metaKey;!t&&this.state.targets.length>0&&e.key===T.a.BACKSPACE&&!n?(e.preventDefault(),this.removeMember(this.state.targets[this.state.targets.length-1])):(t&&e.key===T.a.ENTER&&!n||t&&e.key===T.a.SPACE&&!n&&t.includes("@")&&!t.includes(" "))&&(e.preventDefault(),this.convertFilter())}),o()(this,"onCancel",()=>{this.props.onFinished([])}),o()(this,"updateSuggestions",async e=>{if(u.a.get().searchUserDirectory({term:e}).then(async t=>{if(e===this.state.filterText){if(t.results||(t.results=[]),"@"===e[0]&&e.indexOf(":")>1)try{const n=await u.a.get().getProfileInfo(e);n&&t.results.splice(0,0,{user_id:e,display_name:n.displayname,avatar_url:n.avatar_url})}catch(n){console.warn("Non-fatal error trying to make an invite for a user ID"),console.warn(n),t.results.splice(0,0,{user_id:e,display_name:e,avatar_url:null})}this.setState({serverResultsMixin:t.results.map(e=>({userId:e.user_id,user:new re(e)}))})}}).catch(e=>{console.error("Error searching user directory:"),console.error(e),this.setState({serverResultsMixin:[]})}),this.state.canUseIdentityServer){if(e.indexOf("@")>0&&m.a(e)&&R.b.getValue(D.a.IdentityServer)){this.setState({threepidResultsMixin:[{user:new oe(e),userId:e}]});try{const t=new b.a,n=await t.getAccessToken();if(e!==this.state.filterText)return;const r=await u.a.get().lookupThreePid("email",e,void 0,n);if(e!==this.state.filterText)return;if(!r||!r.mxid)return;const o=await u.a.get().getProfileInfo(r.mxid);if(e!==this.state.filterText||!o)return;this.setState({threepidResultsMixin:[...this.state.threepidResultsMixin,{user:new re({user_id:r.mxid,display_name:o.displayname,avatar_url:o.avatar_url}),userId:r.mxid}]})}catch(e){console.error("Error searching identity server:"),console.error(e),this.setState({threepidResultsMixin:[]})}}}else this.setState({tryingIdentityServer:!0})}),o()(this,"updateFilter",e=>{const t=e.target.value;this.setState({filterText:t}),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.updateSuggestions(t)},150)}),o()(this,"showMoreRecents",()=>{this.setState({numRecentsShown:this.state.numRecentsShown+5})}),o()(this,"showMoreSuggestions",()=>{this.setState({numSuggestionsShown:this.state.numSuggestionsShown+5})}),o()(this,"toggleMember",e=>{if(!this.state.busy){let t=this.state.filterText,n=this.state.targets.map(e=>e);const r=n.indexOf(e);r>=0?n.splice(r,1):(this.props.kind===ee&&n.length>0&&(n=[]),n.push(e),t=""),this.setState({targets:n,filterText:t}),this.editorRef&&this.editorRef.current&&this.editorRef.current.focus()}}),o()(this,"removeMember",e=>{const t=this.state.targets.map(e=>e),n=t.indexOf(e);n>=0&&(t.splice(n,1),this.setState({targets:t})),this.editorRef&&this.editorRef.current&&this.editorRef.current.focus()}),o()(this,"onPaste",async e=>{if(this.state.filterText)return;e.preventDefault();const t=e.clipboardData.getData("text"),n=[...this.state.recents,...this.state.suggestions,...this.state.serverResultsMixin,...this.state.threepidResultsMixin],r=[],o=[],i=t.split(/[\s,]+/).map(e=>e.trim()).filter(e=>!!e);for(const t of i){const i=n.find(e=>e.userId===t);if(i)r.push(i.user);else if(t.indexOf("@")>0&&m.a(t))r.push(new oe(t));else if("@"===t[0])try{const e=await u.a.get().getProfileInfo(t),n=e?e.displayname:null,o=e?e.avatar_url:null;r.push(new re({user_id:t,display_name:n,avatar_url:o}))}catch(e){console.error("Error looking up profile for "+t),console.error(e),o.push(t)}else o.push(t)}this.unmounted||(o.length>0&&v.a.createTrackedDialog("Invite Paste Fail","",z.a,{title:Object(l.a)("Failed to find the following users"),description:Object(l.a)("The following users might not exist or are invalid, and cannot be invited: %(csvNames)s",{csvNames:o.join(", ")}),button:Object(l.a)("OK")}),this.setState({targets:[...this.state.targets,...r]}))}),o()(this,"onClickInputArea",e=>{e.preventDefault(),e.stopPropagation(),this.editorRef&&this.editorRef.current&&this.editorRef.current.focus()}),o()(this,"onUseDefaultIdentityServerClick",e=>{e.preventDefault(),Object(g.d)(),this.setState({canUseIdentityServer:!0,tryingIdentityServer:!1})}),o()(this,"onManageSettingsClick",e=>{e.preventDefault(),_.a.fire(x.a.ViewUserSettings),this.props.onFinished()}),o()(this,"onCommunityInviteClick",e=>{this.props.onFinished(),Object(C.e)(O.a.instance.getSelectedCommunityId())}),o()(this,"onDialFormSubmit",e=>{e.preventDefault(),this.transferCall()}),o()(this,"onDialChange",e=>{this.setState({dialPadValue:e.currentTarget.value})}),o()(this,"onDigitPress",e=>{this.setState({dialPadValue:this.state.dialPadValue+e})}),o()(this,"onDeletePress",()=>{0!==this.state.dialPadValue.length&&this.setState({dialPadValue:this.state.dialPadValue.slice(0,-1)})}),o()(this,"onTabChange",e=>{this.setState({currentTabId:e})}),o()(this,"onCopyClick",async e=>{e.preventDefault();const t=e.target,n=await Object(j.c)(Object(d.h)(u.a.get().getUserId())),r=t.getBoundingClientRect(),{close:o}=B.n(G.a,J(J({},Object(B.p)(r,2)),{},{message:n?Object(l.a)("Copied!"):Object(l.a)("Failed to copy")}));this.closeCopiedTooltip=t.onmouseleave=o}),t.kind===Z&&!t.roomId)throw new Error("When using KIND_INVITE a roomId is required for an InviteDialog");if(t.kind===ee&&!t.call)throw new Error("When using KIND_CALL_TRANSFER a call is required for an InviteDialog");const n=new Set([u.a.get().getUserId(),p.a.get().welcomeUserId]);if(t.roomId){const e=u.a.get().getRoom(t.roomId);if(!e)throw new Error("Room ID given to InviteDialog does not look like a room");e.getMembersWithMembership("invite").forEach(e=>n.add(e.userId)),e.getMembersWithMembership("join").forEach(e=>n.add(e.userId)),e.getMembersWithMembership("ban").forEach(e=>n.add(e.userId)),I.a.instance.trackBeginInvite(t.roomId)}this.state={targets:[],filterText:this.props.initialText,recents:e.buildRecents(n),numRecentsShown:3,suggestions:this.buildSuggestions(n),numSuggestionsShown:3,serverResultsMixin:[],threepidResultsMixin:[],canUseIdentityServer:!!u.a.get().getIdentityServerUrl(),tryingIdentityServer:!1,consultFirst:!1,dialPadValue:"",currentTabId:te.UserDirectory,busy:!1,errorText:null}}componentDidMount(){this.props.initialText&&this.updateSuggestions(this.props.initialText)}componentWillUnmount(){this.unmounted=!0,this.closeCopiedTooltip&&this.closeCopiedTooltip()}static buildRecents(e){const t=h.a.shared().getUniqueRoomsWithIndividuals(),n=F.b.instance.orderedLists[k.a.DM]||[],r=u.a.get().getUserId();for(const e of n){const n=e.getJoinedMembers().filter(e=>e.userId!==r);for(const r of n)t[r.userId]||(console.warn(`Adding DM room for ${r.userId} as ${e.roomId} from tag, not DM map`),t[r.userId]=e)}const o=[];for(const n in t){if(e.has(n)){console.warn(`[Invite:Recents] Excluding ${n} from recents`);continue}const r=t[n],i=r.getMember(n);if(!i){console.warn(`[Invite:Recents] ${n} is missing a member object in their own DM (${r.roomId})`);continue}const a=["m.room.message","m.room.encrypted","m.sticker"],s=20;let c=0;if(r.timeline&&r.timeline.length)for(let e=r.timeline.length-1;e>=0;e--){const t=r.timeline[e];if(a.includes(t.getType())){c=t.getTs();break}if(r.timeline.length-e>s)break}c?o.push({userId:n,user:i,lastActive:c}):console.warn(`[Invite:Recents] ${n} (${r.roomId}) has a weird last timestamp: ${c}`)}return o||console.warn("[Invite:Recents] No recents to suggest!"),o.sort((e,t)=>t.lastActive-e.lastActive),o}buildSuggestions(e){const t=u.a.get().getRooms().filter(e=>"join"===e.getMyMembership()&&e.getJoinedMemberCount()<=200).reduce((t,n)=>{if(h.a.shared().getUserIdForRoomId(n.roomId))return t;const r=n.getJoinedMembers().filter(t=>!e.has(t.userId));for(const o of r)e.has(o.userId)||(t[o.userId]||(t[o.userId]={member:o,pickedMemberRoomSize:n.getJoinedMemberCount(),rooms:[]}),t[o.userId].rooms.push(n),n.getJoinedMemberCount()<t[o.userId].pickedMemberRoomSize&&(t[o.userId].member=o,t[o.userId].pickedMemberRoomSize=n.getJoinedMemberCount()));return t},{}),n=Object.values(t).reduce((e,t)=>{const n=t.rooms.reduce((e,t)=>e+t.getJoinedMemberCount(),0),r=200*t.rooms.length;return e[t.member.userId]={member:t.member,numRooms:t.rooms.length,score:Math.max(0,Math.pow(1-n/r,5))},e},{}),r=u.a.get().getRooms().filter(e=>"join"===e.getMyMembership()),o=(new Date).getTime(),i=o-36e5,a={},s={};for(const t of r){const n=h.a.shared().getUserIdForRoomId(t.roomId);if(Object.keys(t.tags).includes("m.lowpriority")||n)continue;const r=t.getLiveTimeline().getEvents();for(let n=r.length-1;n>=Math.max(0,r.length-50);n--){const o=r[n];if(!e.has(o.getSender())){if(o.getTs()<=i)break;(!a[o.getSender()]||a[o.getSender()]<o.getTs())&&(a[o.getSender()]=o.getTs(),s[o.getSender()]=t.getMember(o.getSender()))}}}for(const e in a){const t=a[e],r=s[e];if(!r)continue;const c=o-i-Math.abs(o-t),l=Math.max(1,c/9e5);let u=n[e];u||(u=n[e]={score:0}),u.member=r,u.score+=l}const c=Object.values(n);return c.sort((e,t)=>e.score===t.score?e.numRooms===t.numRooms?Object(j.a)(e.member.userId,t.member.userId):t.numRooms-e.numRooms:t.score-e.score),c.map(e=>({userId:e.member.userId,user:e.member}))}shouldAbortAfterInviteError(e,t){this.setState({busy:!1});const n=new Map(this.state.targets.map(e=>[e.userId,e]));return!Object(C.d)(e.states,t,e.inviter,n)}convertFilter(){if(!this.state.filterText||!this.state.filterText.includes("@"))return this.state.targets||[];let e;this.state.filterText.startsWith("@")?e=new re({user_id:this.state.filterText,display_name:null,avatar_url:null}):R.b.getValue(D.a.IdentityServer)&&(e=new oe(this.state.filterText));const t=[...this.state.targets||[],e];return this.setState({targets:t,filterText:""}),t}renderSection(e){let t="recents"===e?this.state.recents:this.state.suggestions,n="recents"===e?this.state.numRecentsShown:this.state.numSuggestionsShown;const r="recents"===e?this.showMoreRecents.bind(this):this.showMoreSuggestions.bind(this);let o="recents"===e?Object(l.a)("Recent Conversations"):Object(l.a)("Suggestions"),i=null;if("suggestions"===e&&O.a.instance.getSelectedCommunityId()){const e=O.a.instance.getSelectedCommunityName();i=Object(l.a)("May include members not in %(communityName)s",{communityName:e})}this.props.kind===Z&&(o="recents"===e?Object(l.a)("Recently Direct Messaged"):Object(l.a)("Suggestions"));let s=[],c=[];const u=this.state.serverResultsMixin||this.state.threepidResultsMixin;if(this.state.filterText&&u&&"suggestions"===e){const e=e=>!t.some(t=>t.userId===e.userId)&&!s.some(t=>t.userId===e.userId)&&!c.some(t=>t.userId===e.userId);c=this.state.serverResultsMixin.filter(e),s=this.state.threepidResultsMixin.filter(e)}const d=s.length>0||c.length>0;if(0===t.length&&!d)return null;if(this.state.filterText){const e=this.state.filterText.toLowerCase();if(t=t.filter(t=>t.user.name.toLowerCase().includes(e)||t.userId.toLowerCase().includes(e)),0===t.length&&!d)return a.a.createElement("div",{className:"mx_InviteDialog_section"},a.a.createElement("h3",null,o),a.a.createElement("p",null,Object(l.a)("No results")))}t=[...s,...t,...c],n===t.length-1&&n++;const h=t.slice(0,n);let p=null;h.length<t.length&&(p=a.a.createElement(L.a,{onClick:r,kind:"link"},Object(l.a)("Show more")));const m=h.map(t=>{return a.a.createElement(ae,{member:t.user,lastActiveTs:(n=t,"recents"===e?n.lastActive:null),key:t.userId,onToggle:this.toggleMember,highlightWord:this.state.filterText,isSelected:this.state.targets.some(e=>e.userId===t.userId)});var n});return a.a.createElement("div",{className:"mx_InviteDialog_section"},a.a.createElement("h3",null,o),i?a.a.createElement("p",{className:"mx_InviteDialog_subname"},i):null,m,p)}renderEditor(){const e=this.props.kind==ee&&0===this.state.targets.length&&0===this.state.filterText.length,t=this.state.targets.map(e=>a.a.createElement(ie,{member:e,onRemove:!this.state.busy&&this.removeMember,key:e.userId})),n=a.a.createElement("input",{type:"text",onKeyDown:this.onKeyDown,onChange:this.updateFilter,value:this.state.filterText,ref:this.editorRef,onPaste:this.onPaste,autoFocus:!0,disabled:this.state.busy||this.props.kind==ee&&this.state.targets.length>0,autoComplete:"off",placeholder:e?Object(l.a)("Search"):null});return a.a.createElement("div",{className:"mx_InviteDialog_editor",onClick:this.onClickInputArea},t,n)}renderIdentityServerWarning(){if(!this.state.tryingIdentityServer||this.state.canUseIdentityServer||!R.b.getValue(D.a.IdentityServer))return null;const e=Object(g.c)();return e?a.a.createElement("div",{className:"mx_AddressPickerDialog_identityServer"},Object(l.a)("Use an identity server to invite by email. <default>Use the default (%(defaultIdentityServerName)s)</default> or manage in <settings>Settings</settings>.",{defaultIdentityServerName:Object(f.a)(e)},{default:e=>a.a.createElement("a",{href:"#",onClick:this.onUseDefaultIdentityServerClick},e),settings:e=>a.a.createElement("a",{href:"#",onClick:this.onManageSettingsClick},e)})):a.a.createElement("div",{className:"mx_AddressPickerDialog_identityServer"},Object(l.a)("Use an identity server to invite by email. Manage in <settings>Settings</settings>.",{},{settings:e=>a.a.createElement("a",{href:"#",onClick:this.onManageSettingsClick},e)}))}async onLinkClick(e){e.preventDefault(),Object(j.d)(e.target)}render(){let e,t,r,o,i,s,h,p=null;this.state.busy&&(p=a.a.createElement(W.a,{w:20,h:20}));let m=a.a.createElement("span",null);const g=R.b.getValue(D.a.IdentityServer),f=this.state.targets.length>0||this.state.filterText&&this.state.filterText.includes("@"),_=u.a.get(),b=_.getUserId();if(this.props.kind===X){if(e=Object(l.a)("Direct Messages"),t=g?Object(l.a)("Start a conversation with someone using their name, email address or username (like <userId/>).",{},{userId:()=>a.a.createElement("a",{href:Object(d.h)(b),rel:"noreferrer noopener",target:"_blank"},b)}):Object(l.a)("Start a conversation with someone using their name or username (like <userId/>).",{},{userId:()=>a.a.createElement("a",{href:Object(d.h)(b),rel:"noreferrer noopener",target:"_blank"},b)}),O.a.instance.getSelectedCommunityId()){const e=O.a.instance.getSelectedCommunityName(),n=Object(l.a)("This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click <a>here</a>",{communityName:e},{userId:()=>a.a.createElement("a",{href:Object(d.h)(b),rel:"noreferrer noopener",target:"_blank"},b),a:e=>a.a.createElement(L.a,{kind:"link",onClick:this.onCommunityInviteClick},e)});t=a.a.createElement(a.a.Fragment,null,t," ",n)}r=Object(l.a)("Go"),o=this.startDm,s=a.a.createElement("div",{className:"mx_InviteDialog_section_hidden_suggestions_disclaimer"},a.a.createElement("span",null,Object(l.a)("Some suggestions may be hidden for privacy.")),a.a.createElement("p",null,Object(l.a)("If you can't see who you’re looking for, send them your invite link below.")));const n=Object(d.h)(u.a.get().getUserId());h=a.a.createElement("div",{className:"mx_InviteDialog_footer"},a.a.createElement("h3",null,Object(l.a)("Or send invite link")),a.a.createElement("div",{className:"mx_InviteDialog_footer_link"},a.a.createElement("a",{href:n,onClick:this.onLinkClick},n),a.a.createElement(U.a,{title:Object(l.a)("Copy"),onClick:this.onCopyClick,className:"mx_InviteDialog_footer_link_copy"},a.a.createElement("div",null))))}else if(this.props.kind===Z){var v;const i=null===(v=u.a.get())||void 0===v?void 0:v.getRoom(this.props.roomId),s=$.g.spacesEnabled&&(null==i?void 0:i.isSpaceRoom());let c;if(e=s?Object(l.a)("Invite to %(spaceName)s",{spaceName:i.name||Object(l.a)("Unnamed Space")}):Object(l.a)("Invite to %(roomName)s",{roomName:i.name||Object(l.a)("Unnamed Room")}),c=s?g?Object(l.b)("Invite someone using their name, email address, username (like <userId/>) or <a>share this space</a>."):Object(l.b)("Invite someone using their name, username (like <userId/>) or <a>share this space</a>."):g?Object(l.b)("Invite someone using their name, email address, username (like <userId/>) or <a>share this room</a>."):Object(l.b)("Invite someone using their name, username (like <userId/>) or <a>share this room</a>."),t=Object(l.a)(c,{},{userId:()=>a.a.createElement("a",{href:Object(d.h)(b),rel:"noreferrer noopener",target:"_blank"},b),a:e=>a.a.createElement("a",{href:Object(d.g)(this.props.roomId),rel:"noreferrer noopener",target:"_blank"},e)}),r=Object(l.a)("Invite"),o=this.inviteUsers,_.isRoomEncrypted(this.props.roomId)){const e=_.getRoom(this.props.roomId).currentState.getStateEvents("m.room.history_visibility",""),t=e&&e.getContent()&&e.getContent().history_visibility;"world_readable"!==t&&"shared"!==t||(m=a.a.createElement("p",{className:"mx_InviteDialog_helpText"},a.a.createElement("img",{src:n(1328),width:14,height:14})," "+Object(l.a)("Invited people will be able to read old messages.")))}}else this.props.kind===ee?(e=Object(l.a)("Transfer"),i=a.a.createElement("div",{className:"mx_InviteDialog_transferConsultConnect"},a.a.createElement("label",null,a.a.createElement("input",{type:"checkbox",checked:this.state.consultFirst,onChange:this.onConsultFirstChange}),Object(l.a)("Consult first")),a.a.createElement(L.a,{kind:"secondary",onClick:this.onCancel,className:"mx_InviteDialog_transferConsultConnect_pushRight"},Object(l.a)("Cancel")),a.a.createElement(L.a,{kind:"primary",onClick:this.transferCall,className:"mx_InviteDialog_transferButton",disabled:!f&&""===this.state.dialPadValue},Object(l.a)("Transfer")))):console.error("Unknown kind of InviteDialog: "+this.props.kind);const y=this.props.kind==ee?null:a.a.createElement(L.a,{kind:"primary",onClick:o,className:"mx_InviteDialog_goButton",disabled:this.state.busy||!f},r),E=a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"mx_InviteDialog_helpText"},t),a.a.createElement("div",{className:"mx_InviteDialog_addressBar"},this.renderEditor(),a.a.createElement("div",{className:"mx_InviteDialog_buttonAndSpinner"},y,p)),m,this.renderIdentityServerWarning(),a.a.createElement("div",{className:"error"},this.state.errorText),a.a.createElement("div",{className:"mx_InviteDialog_userSections"},this.renderSection("recents"),this.renderSection("suggestions"),s),h);let S;if(this.props.kind===ee){const e=[];e.push(new q.a(te.UserDirectory,Object(l.b)("User Directory"),"mx_InviteDialog_userDirectoryIcon",E));const t=a.a.createElement(Y.a,{onBackspacePress:this.onDeletePress});let n;n=0!==this.state.dialPadValue.length?a.a.createElement(V.a,{className:"mx_InviteDialog_dialPadField",id:"dialpad_number",value:this.state.dialPadValue,autoFocus:!0,onChange:this.onDialChange,postfixComponent:t}):a.a.createElement(V.a,{className:"mx_InviteDialog_dialPadField",id:"dialpad_number",value:this.state.dialPadValue,autoFocus:!0,onChange:this.onDialChange});const r=a.a.createElement("div",{className:"mx_InviteDialog_dialPad"},a.a.createElement("form",{onSubmit:this.onDialFormSubmit},n),a.a.createElement(H.a,{hasDial:!1,onDigitPress:this.onDigitPress,onDeletePress:this.onDeletePress}));e.push(new q.a(te.DialPad,Object(l.b)("Dial pad"),"mx_InviteDialog_dialPadIcon",r)),S=a.a.createElement(a.a.Fragment,null,a.a.createElement(q.c,{tabs:e,initialTabId:this.state.currentTabId,tabLocation:q.b.TOP,onChange:this.onTabChange}),i)}else S=a.a.createElement(a.a.Fragment,null,E,i);return a.a.createElement(K.a,{className:c()({mx_InviteDialog_transfer:this.props.kind===ee,mx_InviteDialog_other:this.props.kind!==ee,mx_InviteDialog_hasFooter:!!h}),hasCancel:!0,onFinished:this.props.onFinished,title:e},a.a.createElement("div",{className:"mx_InviteDialog_content"},S))}},o()(E,"defaultProps",{kind:X,initialText:""}),y=S))||y},function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"c",(function(){return C})),n.d(t,"b",(function(){return T}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(80),c=n(84),l=n(107),u=n(98);function d(){return c.b.getValue("recent_emoji")||[]}function h(e=24){let t=d();t.length<1&&(!function(){const e=JSON.parse(window.localStorage.mx_reaction_count||"{}"),t=Object.entries(e).sort(([,[e,t]],[,[n,r]])=>r-t).map(([e,[t,n]])=>[e,t]);c.b.setValue("recent_emoji",null,u.a.ACCOUNT,t.slice(0,100))}(),t=d());return Object(l.orderBy)(t,"1","desc").slice(0,e).map(([e])=>e)}var p,m=n(274),g=n(117),f=n(634),_=n(635),b=n(636),v=n(637),y=n(638),E=n(81);function S(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}const w=22,C=37,T=8;let x=Object(E.a)("views.emojipicker.EmojiPicker")(p=class e extends a.a.Component{constructor(e){super(e),o()(this,"recentlyUsed",void 0),o()(this,"memoizedDataByCategory",void 0),o()(this,"categories",void 0),o()(this,"bodyRef",a.a.createRef()),o()(this,"onScroll",()=>{const e=this.bodyRef.current;this.setState({scrollTop:e.scrollTop,viewportHeight:e.clientHeight}),this.updateVisibility()}),o()(this,"updateVisibility",()=>{const e=this.bodyRef.current,t=e.getBoundingClientRect();for(const n of this.categories){const r=e.querySelector(`[data-category-id="${n.id}"]`);if(!r){n.visible=!1,n.ref.current.classList.remove("mx_EmojiPicker_anchor_visible");continue}const o=r.getBoundingClientRect(),i=o.y-t.y,a=o.y+o.height-t.y;n.visible=i<t.height&&a>0,n.visible?(n.ref.current.classList.add("mx_EmojiPicker_anchor_visible"),n.ref.current.setAttribute("aria-selected","true"),n.ref.current.setAttribute("tabindex","0")):(n.ref.current.classList.remove("mx_EmojiPicker_anchor_visible"),n.ref.current.setAttribute("aria-selected","false"),n.ref.current.setAttribute("tabindex","-1"))}}),o()(this,"scrollToCategory",e=>{this.bodyRef.current.querySelector(`[data-category-id="${e}"]`).scrollIntoView()}),o()(this,"onChangeFilter",e=>{e=e.toLowerCase();for(const t of this.categories){let n;n=e.includes(this.state.filter)?this.memoizedDataByCategory[t.id]:"recent"===t.id?this.recentlyUsed:m.a[t.id],n=n.filter(t=>this.emojiMatchesFilter(t,e)),this.memoizedDataByCategory[t.id]=n,t.enabled=n.length>0,t.ref.current.disabled=!t.enabled}this.setState({filter:e}),setTimeout(this.updateVisibility,0)}),o()(this,"emojiMatchesFilter",(e,t)=>[e.annotation,...e.shortcodes,e.emoticon,...e.unicode.split("")].some(e=>null==e?void 0:e.includes(t))),o()(this,"onEnterFilter",()=>{const e=this.bodyRef.current.querySelector(".mx_EmojiPicker_item");e&&e.click()}),o()(this,"onHoverEmoji",e=>{this.setState({previewEmoji:e})}),o()(this,"onHoverEmojiEnd",e=>{this.setState({previewEmoji:null})}),o()(this,"onClickEmoji",e=>{!1!==this.props.onChoose(e.unicode)&&function(e){const t=d(),n=t.findIndex(([t])=>t===e);let r;n>=0?([r]=t.splice(n,1),r[1]++):r=[e,1],c.b.setValue("recent_emoji",null,u.a.ACCOUNT,[r,...t].slice(0,100))}(e.unicode)}),this.state={filter:"",previewEmoji:null,scrollTop:0,viewportHeight:280},this.recentlyUsed=Array.from(new Set(h().map(m.d).filter(Boolean))),this.memoizedDataByCategory=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({recent:this.recentlyUsed},m.a),this.categories=[{id:"recent",name:Object(s.a)("Frequently Used"),enabled:this.recentlyUsed.length>0,visible:this.recentlyUsed.length>0,ref:a.a.createRef()},{id:"people",name:Object(s.a)("Smileys & People"),enabled:!0,visible:!0,ref:a.a.createRef()},{id:"nature",name:Object(s.a)("Animals & Nature"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"foods",name:Object(s.a)("Food & Drink"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"activity",name:Object(s.a)("Activities"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"places",name:Object(s.a)("Travel & Places"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"objects",name:Object(s.a)("Objects"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"symbols",name:Object(s.a)("Symbols"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"flags",name:Object(s.a)("Flags"),enabled:!0,visible:!1,ref:a.a.createRef()}]}static categoryHeightForEmojiCount(e){return 0===e?0:w+Math.ceil(e/T)*C}render(){let t=0;return a.a.createElement("div",{className:"mx_EmojiPicker"},a.a.createElement(f.a,{categories:this.categories,onAnchorClick:this.scrollToCategory}),a.a.createElement(_.a,{query:this.state.filter,onChange:this.onChangeFilter,onEnter:this.onEnterFilter}),a.a.createElement(g.a,{className:"mx_EmojiPicker_body",wrappedRef:e=>{this.bodyRef.current=e},onScroll:this.onScroll},this.categories.map(n=>{const r=this.memoizedDataByCategory[n.id],o=a.a.createElement(y.a,{key:n.id,id:n.id,name:n.name,heightBefore:t,viewportHeight:this.state.viewportHeight,scrollTop:this.state.scrollTop,emojis:r,onClick:this.onClickEmoji,onMouseEnter:this.onHoverEmoji,onMouseLeave:this.onHoverEmojiEnd,selectedEmojis:this.props.selectedEmojis}),i=e.categoryHeightForEmojiCount(r.length);return t+=i,o})),this.state.previewEmoji||!this.props.showQuickReactions?a.a.createElement(b.a,{emoji:this.state.previewEmoji}):a.a.createElement(v.a,{onClick:this.onClickEmoji,selectedEmojis:this.props.selectedEmojis}))}})||p;t.d=x},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(0),u=n(163),d=n(103),h=n(80),p=n(139),m=n(238),g=n(164),f=n(83),_=n(84),b=n(87),v=n(110),y=n(105),E=n(155),S=n(94),w=n(172),C=n(82),T=n(90),x=n(1);function k(){return T.a.get().audioStreamUrl}async function F(e,t){const n=await async function(e){const t=await C.a.get().getOpenIdToken(),n=k()+"/createStream",r=await window.fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({room_id:e,openid_token:t})});return(await r.json()).stream_id}(t);await e.transport.send(x.a.StartLiveStream,{rtmpStreamKey:"rtmp://audiostream.dummy/"+n})}const O=["onFinished","app","userWidget","onDeleteClick","onEditClick","showUnpin"];t.a=e=>{let{onFinished:t,app:n,userWidget:r,onDeleteClick:i,onEditClick:C,showUnpin:T}=e,x=a()(e,O);const R=Object(s.useContext)(S.a),{room:D,roomId:I}=Object(s.useContext)(g.a),A=m.a.instance.getMessagingForId(n.id),N=r||p.a.canUserModifyWidgets(I);let M,P,L,j,U;if(k()&&E.a.JITSI.matches(n.type)){const e=async()=>{try{await F(A,I)}catch(e){console.error("Failed to start livestream",e);const t=e.message||Object(h.a)("Unable to start audio streaming.");b.a.createTrackedDialog("WidgetContext Menu","Livestream failed",y.a,{title:Object(h.a)("Failed to start livestream"),description:t})}t()};M=c.a.createElement(u.b,{onClick:e,label:Object(h.a)("Start audio stream")})}if(T){const e=()=>{w.d.instance.moveToContainer(D,n,w.a.Right),t()};P=c.a.createElement(u.b,{onClick:e,label:Object(h.a)("Unpin")})}if(N&&p.a.isManagedByManager(n)){const e=()=>{C?C():p.a.editWidget(D,n),t()};L=c.a.createElement(u.b,{onClick:e,label:Object(h.a)("Edit")})}if(null!=A&&A.hasCapability(l.MatrixCapabilities.Screenshots)){const e=()=>{null==A||A.takeScreenshot().then(e=>{f.a.dispatch({action:"picture_snapshot",file:e.screenshot})}).catch(e=>{console.error("Failed to take screenshot: ",e)}),t()};j=c.a.createElement(u.b,{onClick:e,label:Object(h.a)("Take a picture")})}if(i||N){const e=()=>{i?i():b.a.createTrackedDialog("Delete Widget","",v.a,{title:Object(h.a)("Delete Widget"),description:Object(h.a)("Deleting a widget removes it for all users in this room. Are you sure you want to delete this widget?"),button:Object(h.a)("Delete widget"),onFinished:e=>{e&&p.a.setRoomWidget(I,n.id)}}),t()};U=c.a.createElement(u.b,{onClick:e,label:r?Object(h.a)("Remove"):Object(h.a)("Remove for everyone")})}let B=_.b.getValue("allowedWidgets",I)[n.eventId];void 0===B&&(B=n.creatorUserId===R.getUserId());const G=E.a.JITSI.matches(n.type);let V;if(!r&&!G&&B){const e=()=>{console.info("Revoking permission for widget to load: "+n.eventId);const e=_.b.getValue("allowedWidgets",I);e[n.eventId]=!1;const r=_.b.firstSupportedLevel("allowedWidgets");_.b.setValue("allowedWidgets",I,r,e).catch(e=>{console.error(e)}),t()};V=c.a.createElement(u.b,{onClick:e,label:Object(h.a)("Revoke permissions")})}const q=w.d.instance.getContainerWidgets(D,w.a.Top),H=q.findIndex(e=>e.id===n.id);let z,W;if(T&&H>0){const e=()=>{w.d.instance.moveWithinContainer(D,w.a.Top,n,-1),t()};z=c.a.createElement(u.b,{onClick:e,label:Object(h.a)("Move left")})}if(T&&H<q.length-1){const e=()=>{w.d.instance.moveWithinContainer(D,w.a.Top,n,1),t()};W=c.a.createElement(u.b,{onClick:e,label:Object(h.a)("Move right")})}return c.a.createElement(u.e,o()({},x,{chevronFace:d.a.None,onFinished:t}),c.a.createElement(u.c,null,M,L,V,U,j,z,W,P))}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),l=1;l<arguments.length;l++){for(var u in n=Object(arguments[l]))o.call(n,u)&&(c[u]=n[u]);if(r){s=r(n);for(var d=0;d<s.length;d++)i.call(n,s[d])&&(c[s[d]]=n[s[d]])}}return c}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(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:a}catch(e){r=a}}();var c,l=[],u=!1,d=-1;function h(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!u){var e=s(h);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!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 m(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];l.push(new m(e,t)),1!==l.length||u||s(p)},m.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,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2);n(96);function o(e,t){this.retryAlgorithm=e||o.RETRY_BACKOFF_RATELIMIT,this.queueAlgorithm=t||o.QUEUE_MESSAGES,this._queues={},this._activeQueues=[],this._procFn=null}function i(e){e._procFn&&Object.keys(e._queues).filter((function(t){return-1===e._activeQueues.indexOf(t)&&e._queues[t].length>0})).forEach((function(t){e._activeQueues.push(t),s("Spinning up queue: '%s'",t),function e(t,n){const r=function(e,t){const n=e._queues[t];if(!Array.isArray(n))return null;return n[0]}(t,n);if(!r){const e=t._activeQueues.indexOf(n);return e>=0&&t._activeQueues.splice(e,1),void s("Stopping queue '%s' as it is now empty",n)}s("Queue '%s' has %s pending events",n,t._queues[n].length),Promise.resolve().then(()=>t._procFn(r.event)).then((function(o){a(t,n),s("Queue '%s' sent event %s",n,r.event.getId()),r.defer.resolve(o),e(t,n)}),(function(o){r.attempts+=1;const i=t.retryAlgorithm(r.event,r.attempts,o);s("retry(%s) err=%s event_id=%s waitTime=%s",r.attempts,o,r.event.getId(),i),-1===i?(s("Queue '%s' giving up on event %s",n,r.event.getId()),a(t,n),r.defer.reject(o),e(t,n)):setTimeout((function(){e(t,n)}),i)}))}(e,t)}))}function a(e,t){const n=e._queues[t];return Array.isArray(n)?n.shift():null}function s(){0}o.prototype.getQueueForEvent=function(e){const t=this.queueAlgorithm(e);return t&&this._queues[t]?this._queues[t].map((function(e){return e.event})):null},o.prototype.removeEventFromQueue=function(e){const t=this.queueAlgorithm(e);if(!t||!this._queues[t])return!1;let n=!1;return r.E(this._queues[t],(function(t){if(t.event.getId()===e.getId())return n=!0,!0})),n},o.prototype.setProcessFunction=function(e){this._procFn=e,i(this)},o.prototype.queueEvent=function(e){const t=this.queueAlgorithm(e);if(!t)return null;this._queues[t]||(this._queues[t]=[]);const n=r.l();return this._queues[t].push({event:e,defer:n,attempts:0}),s("Queue algorithm dumped event %s into queue '%s'",e.getId(),t),i(this),n.promise},o.RETRY_BACKOFF_RATELIMIT=function(e,t,n){if(400===n.httpStatus||403===n.httpStatus||401===n.httpStatus)return-1;if("rejected"===n.cors)return-1;if("M_TOO_LARGE"===n.name)return-1;if("M_LIMIT_EXCEEDED"===n.name){const e=n.data.retry_after_ms;if(e>0)return e}return t>4?-1:1e3*Math.pow(2,t)},o.QUEUE_MESSAGES=function(e){return"m.room.message"===e.getType()||e.hasAssocation()?"message":null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r,o=n(79),i=n.n(o),a=n(3),s=n(160),c=n(96),l=n(2),u=n(93);!function(e){e[e.NotStarted=0]="NotStarted",e[e.InProgress=1]="InProgress",e[e.Finished=2]="Finished"}(r||(r={}));class d extends a.EventEmitter{constructor(e,t={status:r.NotStarted}){super(),this.roomId=e,this.oobMemberFlags=t,i()(this,"sentinels",{}),i()(this,"displayNameToUserIds",{}),i()(this,"userIdsToDisplayNames",{}),i()(this,"tokenToInvite",{}),i()(this,"joinedMemberCount",null),i()(this,"summaryJoinedMemberCount",null),i()(this,"invitedMemberCount",null),i()(this,"summaryInvitedMemberCount",null),i()(this,"modified",void 0),i()(this,"members",{}),i()(this,"events",new Map),i()(this,"paginationToken",null),this.updateModifiedTime()}getJoinedMemberCount(){return null!==this.summaryJoinedMemberCount?this.summaryJoinedMemberCount:(null===this.joinedMemberCount&&(this.joinedMemberCount=this.getMembers().reduce((e,t)=>"join"===t.membership?e+1:e,0)),this.joinedMemberCount)}setJoinedMemberCount(e){this.summaryJoinedMemberCount=e}getInvitedMemberCount(){return null!==this.summaryInvitedMemberCount?this.summaryInvitedMemberCount:(null===this.invitedMemberCount&&(this.invitedMemberCount=this.getMembers().reduce((e,t)=>"invite"===t.membership?e+1:e,0)),this.invitedMemberCount)}setInvitedMemberCount(e){this.summaryInvitedMemberCount=e}getMembers(){return Object.values(this.members)}getMembersExcept(e){return this.getMembers().filter(t=>!e.includes(t.userId))}getMember(e){return this.members[e]||null}getSentinelMember(e){if(!e)return null;let t=this.sentinels[e];if(void 0===t){t=new s.a(this.roomId,e);const n=this.members[e];n&&t.setMembershipEvent(n.events.member,this),this.sentinels[e]=t}return t}getStateEvents(e,t){if(!this.events.has(e))return void 0===t?[]:null;if(void 0===t)return Array.from(this.events.get(e).values());const n=this.events.get(e).get(t);return n||null}clone(){const e=new d(this.roomId,this.oobMemberFlags),t=this.oobMemberFlags.status;return this.oobMemberFlags.status=r.NotStarted,Array.from(this.events.values()).forEach(t=>{e.setStateEvents(Array.from(t.values()))}),this.oobMemberFlags.status=t,null!==this.summaryInvitedMemberCount&&e.setInvitedMemberCount(this.getInvitedMemberCount()),null!==this.summaryJoinedMemberCount&&e.setJoinedMemberCount(this.getJoinedMemberCount()),this.oobMemberFlags.status==r.Finished&&this.getMembers().forEach(t=>{if(t.isOutOfBand()){e.getMember(t.userId).markOutOfBand()}}),e}setUnknownStateEvents(e){const t=e.filter(e=>!this.events.has(e.getType())||!this.events.get(e.getType()).has(e.getStateKey()));this.setStateEvents(t)}setStateEvents(e){this.updateModifiedTime(),e.forEach(e=>{if(e.getRoomId()!==this.roomId)return;if(!e.isState())return;const t=this.getStateEventMatching(e);this.setStateEvent(e),e.getType()===u.a.RoomMember&&(this.updateDisplayNameCache(e.getStateKey(),e.getContent().displayname),this.updateThirdPartyTokenCache(e)),this.emit("RoomState.events",e,this,t)}),e.forEach(e=>{if(e.getRoomId()===this.roomId&&e.isState())if(e.getType()===u.a.RoomMember){const t=e.getStateKey();"leave"!==e.getContent().membership&&"ban"!==e.getContent().membership||(e.getContent().avatar_url=e.getContent().avatar_url||e.getPrevContent().avatar_url,e.getContent().displayname=e.getContent().displayname||e.getPrevContent().displayname);const n=this.getOrCreateMember(t,e);n.setMembershipEvent(e,this),this.updateMember(n),this.emit("RoomState.members",e,this,n)}else if(e.getType()===u.a.RoomPowerLevels){if(""!==e.getStateKey())return;Object.values(this.members).forEach(t=>{const n=t.getLastModifiedTime();t.setPowerLevelEvent(e),n!==t.getLastModifiedTime()&&this.emit("RoomState.members",e,this,t)}),this.sentinels={}}})}getOrCreateMember(e,t){let n=this.members[e];return n||(n=new s.a(this.roomId,e),this.members[e]=n,this.emit("RoomState.newMember",t,this,n)),n}setStateEvent(e){this.events.has(e.getType())||this.events.set(e.getType(),new Map),this.events.get(e.getType()).set(e.getStateKey(),e)}getStateEventMatching(e){return this.events.has(e.getType())?this.events.get(e.getType()).get(e.getStateKey()):null}updateMember(e){const t=this.getStateEvents(u.a.RoomPowerLevels,"");t&&e.setPowerLevelEvent(t),delete this.sentinels[e.userId],this.members[e.userId]=e,this.joinedMemberCount=null,this.invitedMemberCount=null}needsOutOfBandMembers(){return this.oobMemberFlags.status===r.NotStarted}markOutOfBandMembersStarted(){this.oobMemberFlags.status===r.NotStarted&&(this.oobMemberFlags.status=r.InProgress)}markOutOfBandMembersFailed(){this.oobMemberFlags.status===r.InProgress&&(this.oobMemberFlags.status=r.NotStarted)}clearOutOfBandMembers(){let e=0;Object.keys(this.members).forEach(t=>{this.members[t].isOutOfBand()&&(++e,delete this.members[t])}),c.a.log(`LL: RoomState removed ${e} members...`),this.oobMemberFlags.status=r.NotStarted}setOutOfBandMembers(e){c.a.log(`LL: RoomState about to set ${e.length} OOB members ...`),this.oobMemberFlags.status===r.InProgress&&(c.a.log("LL: RoomState put in finished state ..."),this.oobMemberFlags.status=r.Finished,e.forEach(e=>this.setOutOfBandMember(e)))}setOutOfBandMember(e){if(e.getType()!==u.a.RoomMember)return;const t=e.getStateKey(),n=this.getMember(t);if(n&&!n.isOutOfBand())return;const r=this.getOrCreateMember(t,e);r.setMembershipEvent(e,this),r.markOutOfBand(),this.updateDisplayNameCache(r.userId,r.name),this.setStateEvent(e),this.updateMember(r),this.emit("RoomState.members",e,this,r)}setTypingEvent(e){Object.values(this.members).forEach((function(t){t.setTypingEvent(e)}))}getInviteForThreePidToken(e){return this.tokenToInvite[e]||null}updateModifiedTime(){this.modified=Date.now()}getLastModifiedTime(){return this.modified}getUserIdsWithDisplayName(e){return this.displayNameToUserIds[l.F(e)]||[]}maySendRedactionForEvent(e,t){const n=this.getMember(t);if(!n||"leave"===n.membership)return!1;if(e.status||e.isRedacted())return!1;const r=this.maySendEvent(u.a.RoomRedaction,t);return e.getSender()===t?r:this.hasSufficientPowerLevelFor("redact",n.powerLevel)}hasSufficientPowerLevelFor(e,t){const n=this.getStateEvents(u.a.RoomPowerLevels,"");let r={};n&&(r=n.getContent());let o=50;return l.w(r[e])&&(o=r[e]),t>=o}maySendMessage(e){return this.maySendEventOfType(u.a.RoomMessage,e,!1)}maySendEvent(e,t){return this.maySendEventOfType(e,t,!1)}mayClientSendStateEvent(e,t){return!t.isGuest()&&this.maySendStateEvent(e,t.credentials.userId)}maySendStateEvent(e,t){return this.maySendEventOfType(e,t,!0)}maySendEventOfType(e,t,n){const r=this.getStateEvents(u.a.RoomPowerLevels,"");let o,i={},a=0,s=0,c=0;if(r){o=r.getContent(),i=o.events||{},a=Number.isSafeInteger(o.state_default)?o.state_default:50;const e=o.users&&o.users[t];Number.isSafeInteger(e)?c=e:Number.isSafeInteger(o.users_default)&&(c=o.users_default),Number.isSafeInteger(o.events_default)&&(s=o.events_default)}let l=n?a:s;return Number.isSafeInteger(i[e])&&(l=i[e]),c>=l}mayTriggerNotifOfType(e,t){const n=this.getMember(t);if(!n)return!1;const r=this.getStateEvents(u.a.RoomPowerLevels,"");let o=50;return r&&r.getContent()&&r.getContent().notifications&&l.w(r.getContent().notifications[e])&&(o=r.getContent().notifications[e]),n.powerLevel>=o}getJoinRule(){const e=this.getStateEvents(u.a.RoomJoinRules,"");return(e?e.getContent():{}).join_rule||"invite"}updateThirdPartyTokenCache(e){if(!e.getContent().third_party_invite)return;const t=(e.getContent().third_party_invite.signed||{}).token;if(!t)return;this.getStateEvents(u.a.RoomThirdPartyInvite,t)&&(this.tokenToInvite[t]=e)}updateDisplayNameCache(e,t){const n=this.userIdsToDisplayNames[e];if(delete this.userIdsToDisplayNames[e],n){const t=l.F(n),r=this.displayNameToUserIds[t];if(r){const n=r.filter(t=>t!==e);this.displayNameToUserIds[t]=n}}this.userIdsToDisplayNames[e]=t;const r=t&&l.F(t);r&&(this.displayNameToUserIds[r]||(this.displayNameToUserIds[r]=[]),this.displayNameToUserIds[r].push(e))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79),o=n.n(r);class i{constructor(e){o()(this,"target",void 0),this.target=e}reEmit(e,t){for(const n of t){const t=(...t)=>{"error"===n&&0===this.target.listenerCount("error")||this.target.emit(n,...t,e)};e.on(n,t)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r="org.matrix.msc3077.sdp_stream_metadata";let o;!function(e){e.Usermedia="m.usermedia",e.Screenshare="m.screenshare"}(o||(o={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(3),o=n.n(r);let i;!function(e){e.NewStream="new_stream",e.MuteStateChanged="mute_state_changed"}(i||(i={}));class a extends o.a{constructor(e,t,n,r,o,i,a){super(),this.stream=e,this.userId=t,this.purpose=n,this.client=r,this.roomId=o,this.audioMuted=i,this.videoMuted=a}getMember(){return this.client.getRoom(this.roomId).getMember(this.userId)}isLocal(){return this.userId===this.client.getUserId()}isAudioMuted(){return 0===this.stream.getAudioTracks().length||this.audioMuted}isVideoMuted(){return 0===this.stream.getVideoTracks().length||this.videoMuted}setNewStream(e){this.stream=e,this.emit(i.NewStream,this.stream)}setAudioMuted(e){this.audioMuted=e,this.emit(i.MuteStateChanged,this.audioMuted,this.videoMuted)}setVideoMuted(e){this.videoMuted=e,this.emit(i.MuteStateChanged,this.audioMuted,this.videoMuted)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(108),o=n(3),i=n(96),a=n(297),s=n(260),c=n(299);const l=new Error("Verification timed out");class u extends Error{constructor(e){super(),this.startEvent=e}}class d extends o.EventEmitter{constructor(e,t,n,r,o,i){super(),this._channel=e,this._baseApis=t,this.userId=n,this.deviceId=r,this.startEvent=o,this.request=i,this.cancelled=!1,this._done=!1,this._promise=null,this._transactionTimeoutTimer=null}get initiatedByMe(){if(!this.startEvent)return!0;const e=this.startEvent.getSender(),t=this.startEvent.getContent();return e===this._baseApis.getUserId()&&t.from_device===this._baseApis.getDeviceId()}_resetTimer(){i.a.info("Refreshing/starting the verification transaction timeout timer"),null!==this._transactionTimeoutTimer&&clearTimeout(this._transactionTimeoutTimer),this._transactionTimeoutTimer=setTimeout(()=>{this._done||this.cancelled||(i.a.info("Triggering verification timeout"),this.cancel(l))},6e5)}_endTimer(){null!==this._transactionTimeoutTimer&&(clearTimeout(this._transactionTimeoutTimer),this._transactionTimeoutTimer=null)}_send(e,t){return this._channel.send(e,t)}_waitForEvent(e){if(this._done)return Promise.reject(new Error("Verification is already done"));const t=this.request.getEventFromOtherParty(e);return t?Promise.resolve(t):(this._expectedEvent=e,new Promise((e,t)=>{this._resolveEvent=e,this._rejectEvent=t}))}canSwitchStartEvent(){return!1}switchStartEvent(e){if(this.canSwitchStartEvent(e))if(i.a.log("Verification Base: switching verification start event",{restartingFlow:!!this._rejectEvent}),this._rejectEvent){const t=this._rejectEvent;this._rejectEvent=void 0,t(new u(e))}else this.startEvent=e}handleEvent(e){if(!this._done)if(e.getType()===this._expectedEvent)"m.key.verification.done"!==this._expectedEvent&&(this._expectedEvent=void 0,this._rejectEvent=void 0,this._resetTimer(),this._resolveEvent(e));else if("m.key.verification.cancel"===e.getType()){const t=this._reject;if(this._reject=void 0,t){const n=e.getContent(),{reason:r,code:o}=n;t(new Error(`Other side cancelled verification because ${r} (${o})`))}}else if(this._expectedEvent){const t=new Error("Unexpected message: expecting "+this._expectedEvent+" but got "+e.getType());if(this._expectedEvent=void 0,this._rejectEvent){const e=this._rejectEvent;this._rejectEvent=void 0,e(t)}this.cancel(t)}}done(){if(this._endTimer(),!this._done)return this.request.onVerifierFinished(),this._resolve(),Object(c.e)(this._baseApis,this.userId,this.deviceId)}cancel(e){if(this._endTimer(),!this._done){if(this.cancelled=!0,this.request.onVerifierCancelled(),this.userId&&this.deviceId)if(e===l){const e=Object(s.e)();this._send(e.getType(),e.getContent())}else if(e instanceof r.b){if(e.getSender()!==this.userId){const t=e.getContent();"m.key.verification.cancel"===e.getType()?(t.code=t.code||"m.unknown",t.reason=t.reason||t.body||"Unknown reason",this._send("m.key.verification.cancel",t)):this._send("m.key.verification.cancel",{code:"m.unknown",reason:t.body||"Unknown reason"})}}else this._send("m.key.verification.cancel",{code:"m.unknown",reason:e.toString()});null!==this._promise?this._reject&&this._reject(e):this._promise=Promise.reject(e),this.emit("cancel",e)}}verify(){return this._promise||(this._promise=new Promise((e,t)=>{this._resolve=(...t)=>{this._done=!0,this._endTimer(),e(...t)},this._reject=(...e)=>{this._done=!0,this._endTimer(),t(...e)}}),this._doVerification&&!this._started&&(this._started=!0,this._resetTimer(),Promise.resolve(this._doVerification()).then(this.done.bind(this),this.cancel.bind(this)))),this._promise}async _verifyKeys(e,t,n){const r=[];for(const[o,s]of Object.entries(t)){const t=o.split(":",2)[1],c=this._baseApis.getStoredDevice(e,t);if(c)await n(o,c,s),r.push(t);else{const c=this._baseApis.crypto.deviceList.getStoredCrossSigningForUser(e);c&&c.getId()===t?(await n(o,a.a.fromStorage({keys:{[o]:t}},t),s),r.push(t)):i.a.warn(`verification: Could not find device ${t} to verify`)}}if(!r.length)throw new Error("No devices could be verified");i.a.info("Verification completed! Marking devices verified: ",r);for(const t of r)await this._baseApis.setDeviceVerified(e,t)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r),i=n(152);n(96);const a=function(){};class s{constructor(e,t,n={}){this.client=e,this.timelineSet=t,o()(this,"windowLimit",void 0),o()(this,"start",null),o()(this,"end",null),o()(this,"eventCount",0),this.windowLimit=n.windowLimit||1e3}load(e,t=20){const n=n=>{let r;const o=n.getEvents();if(e){for(let t=0;t<o.length;t++)if(o[t].getId()==e){r=t;break}if(void 0===r)throw new Error("getEventTimeline result didn't include requested event")}else r=o.length;const i=Math.min(o.length,r+Math.ceil(t/2)),a=Math.max(0,i-t);this.start=new c(n,a-n.getBaseIndex()),this.end=new c(n,i-n.getBaseIndex()),this.eventCount=i-a};if(e){const t=this.timelineSet.getTimelineForEvent(e);if(t)return n(t),Promise.resolve(t);return this.client.getEventTimeline(this.timelineSet,e).then(n)}return n(this.timelineSet.getLiveTimeline()),Promise.resolve()}getTimelineIndex(e){if(e==i.b.BACKWARDS)return this.start;if(e==i.b.FORWARDS)return this.end;throw new Error("Invalid direction '"+e+"'")}extend(e,t){const n=this.getTimelineIndex(e);if(!n)return a("TimelineWindow: no timeline yet"),!1;const r=e==i.b.BACKWARDS?n.retreat(t):n.advance(t);if(r){this.eventCount+=r,a("TimelineWindow: increased cap by "+r+" (now "+this.eventCount+")");const t=this.eventCount-this.windowLimit;return t>0&&this.unpaginate(t,e!=i.b.BACKWARDS),!0}return!1}canPaginate(e){const t=this.getTimelineIndex(e);if(!t)return a("TimelineWindow: no timeline yet"),!1;if(e==i.b.BACKWARDS){if(t.index>t.minIndex())return!0}else if(t.index<t.maxIndex())return!0;return Boolean(t.timeline.getNeighbouringTimeline(e)||t.timeline.getPaginationToken(e))}paginate(e,t,n=!0,r=5){const o=this.getTimelineIndex(e);if(!o)return a("TimelineWindow: no timeline yet"),Promise.resolve(!1);if(o.pendingPaginate)return o.pendingPaginate;if(this.extend(e,t))return Promise.resolve(!0);if(!n||0===r)return Promise.resolve(!1);if(!o.timeline.getPaginationToken(e))return a("TimelineWindow: no token"),Promise.resolve(!1);a("TimelineWindow: starting request");const s=this.client.paginateEventTimeline(o.timeline,{backwards:e==i.b.BACKWARDS,limit:t}).finally((function(){o.pendingPaginate=null})).then(n=>(a("TimelineWindow: request completed with result "+n),!!n&&this.paginate(e,t,!0,r-1)));return o.pendingPaginate=s,s}unpaginate(e,t){const n=t?this.start:this.end;if(e>this.eventCount||e<0)throw new Error("Attemting to unpaginate "+e+" events, but only have "+this.eventCount+" in the timeline");for(;e>0;){const r=t?n.advance(e):n.retreat(e);if(r<=0)throw new Error("Unable to unpaginate any further, but still have "+this.eventCount+" events");e-=r,this.eventCount-=r,a("TimelineWindow.unpaginate: dropped "+r+" (now "+this.eventCount+")")}}getEvents(){if(!this.start)return[];const e=[];let t=this.start.timeline;for(;;){const n=t.getEvents();let r=0,o=n.length;t===this.start.timeline&&(r=this.start.index+t.getBaseIndex()),t===this.end.timeline&&(o=this.end.index+t.getBaseIndex());for(let t=r;t<o;t++)e.push(n[t]);if(t===this.end.timeline)break;t=t.getNeighbouringTimeline(i.b.FORWARDS)}return e}}class c{constructor(e,t){this.timeline=e,this.index=t,o()(this,"pendingPaginate",void 0)}minIndex(){return-1*this.timeline.getBaseIndex()}maxIndex(){return this.timeline.getEvents().length-this.timeline.getBaseIndex()}advance(e){if(!e)return 0;let t;if(e<0){if(t=Math.max(e,this.minIndex()-this.index),t<0)return this.index+=t,t}else if(t=Math.min(e,this.maxIndex()-this.index),t>0)return this.index+=t,t;const n=this.timeline.getNeighbouringTimeline(e<0?i.b.BACKWARDS:i.b.FORWARDS);return n?(this.timeline=n,this.index=e<0?this.maxIndex():this.minIndex(),a("paginate: switched to new neighbour"),this.advance(e)):0}retreat(e){return-1*this.advance(-1*e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2),o=n(96);function i(e){this._matrixClient=e.matrixClient,this._data=e.authData||{},this._requestCallback=e.doRequest,this._busyChangedCallback=e.busyChanged,this._stateUpdatedCallback=e.stateUpdated||e.startAuthStage,this._resolveFunc=null,this._rejectFunc=null,this._inputs=e.inputs||{},this._requestEmailTokenCallback=e.requestEmailToken,e.sessionId&&(this._data.session=e.sessionId),this._clientSecret=e.clientSecret||this._matrixClient.generateClientSecret(),this._emailSid=e.emailSid,void 0===this._emailSid&&(this._emailSid=null),this._requestingEmailToken=!1,this._chosenFlow=null,this._currentStage=null,this._submitPromise=null}i.prototype={attemptAuth:function(){return new Promise((e,t)=>{this._resolveFunc=e,this._rejectFunc=t;if(this._data&&this._data.flows)this._startNextAuthStage();else{this._busyChangedCallback&&this._busyChangedCallback(!0);let e=null;this._data.session&&(e={session:this._data.session}),this._doRequest(e).finally(()=>{this._busyChangedCallback&&this._busyChangedCallback(!1)})}})},poll:async function(){if(!this._data.session)return;if(!this._resolveFunc)return;if(this._submitPromise)return;let e={};if("m.login.email.identity"==this._currentStage&&this._emailSid){const t={sid:this._emailSid,client_secret:this._clientSecret};if(await this._matrixClient.doesServerRequireIdServerParam()){const e=new URL(this._matrixClient.getIdentityServerUrl());t.id_server=e.host}e={type:"m.login.email.identity",threepid_creds:t,threepidCreds:t}}this.submitAuthDict(e,!0)},getSessionId:function(){return this._data?this._data.session:void 0},getClientSecret:function(){return this._clientSecret},getStageParams:function(e){let t={};return this._data&&this._data.params&&(t=this._data.params),t[e]},getChosenFlow(){return this._chosenFlow},submitAuthDict:async function(e,t){if(!this._resolveFunc)throw new Error("submitAuthDict() called before attemptAuth()");for(!t&&this._busyChangedCallback&&this._busyChangedCallback(!0);this._submitPromise;)try{await this._submitPromise}catch(e){}let n;this._data.session?(n={session:this._data.session},r.q(n,e)):n=e;try{this._submitPromise=this._doRequest(n,t),await this._submitPromise}finally{this._submitPromise=null,!t&&this._busyChangedCallback&&this._busyChangedCallback(!1)}},getEmailSid:function(){return this._emailSid},setEmailSid:function(e){this._emailSid=e},_doRequest:async function(e,t){try{const n=await this._requestCallback(e,t);this._resolveFunc(n),this._resolveFunc=null,this._rejectFunc=null}catch(e){const n=e.data?e.data.flows:null,r=this._data.flows||Boolean(n);401===e.httpStatus&&e.data&&r||(t?o.a.log("Background poll request failed doing UI auth: ignoring",e):this._rejectFunc(e)),e.data.flows||e.data.completed||e.data.session||(e.data.flows=this._data.flows,e.data.completed=this._data.completed,e.data.session=this._data.session),this._data=e.data;try{this._startNextAuthStage()}catch(e){this._rejectFunc(e),this._resolveFunc=null,this._rejectFunc=null}if(!this._emailSid&&!this._requestingEmailToken&&this._chosenFlow.stages.includes("m.login.email.identity")){this._requestingEmailToken=!0;try{const e=await this._requestEmailTokenCallback(this._inputs.emailAddress,this._clientSecret,1,this._data.session);this._emailSid=e.sid}catch(e){this._rejectFunc(e),this._resolveFunc=null,this._rejectFunc=null}finally{this._requestingEmailToken=!1}}}},_startNextAuthStage:function(){const e=this._chooseStage();if(!e)throw new Error("No incomplete flows from the server");if(this._currentStage=e,"m.login.dummy"===e)return void this.submitAuthDict({type:"m.login.dummy"});if(this._data&&this._data.errcode||this._data.error)return void this._stateUpdatedCallback(e,{errcode:this._data.errcode||"",error:this._data.error||""});const t={};"m.login.email.identity"==e&&(t.emailSid=this._emailSid),this._stateUpdatedCallback(e,t)},_chooseStage:function(){null===this._chosenFlow&&(this._chosenFlow=this._chooseFlow()),o.a.log("Active flow => %s",JSON.stringify(this._chosenFlow));const e=this._firstUncompletedStage(this._chosenFlow);return o.a.log("Next stage: %s",e),e},_chooseFlow:function(){const e=this._data.flows||[],t=Boolean(this._inputs.emailAddress)||Boolean(this._emailSid),n=Boolean(this._inputs.phoneCountry)&&Boolean(this._inputs.phoneNumber);for(const r of e){let e=!1,o=!1;for(const t of r.stages)"m.login.email.identity"===t?e=!0:"m.login.msisdn"==t&&(o=!0);if(e==t&&o==n)return r}const r=new Error("No appropriate authentication flow found");throw r.name="NoAuthFlowFoundError",r.required_stages=[],t&&r.required_stages.push("m.login.email.identity"),n&&r.required_stages.push("m.login.msisdn"),r.available_flows=e,r},_firstUncompletedStage:function(e){const t=(this._data||{}).completed||[];for(let n=0;n<e.stages.length;++n){const r=e.stages[n];if(-1===t.indexOf(r))return r}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2);n(96);const o="session.e2e.";function i(e){if(this.store=e,!(r.u(e.getItem)&&r.u(e.setItem)&&r.u(e.removeItem)&&r.u(e.key)&&"number"==typeof e.length))throw new Error("Supplied webStore does not meet the WebStorage API interface")}i.prototype={removeEndToEndAccount:function(){this.store.removeItem(a)},getEndToEndAccount:function(){return this.store.getItem(a)},getAllEndToEndDevices:function(){const e=u(""),t={};for(let n=0;n<this.store.length;++n){const r=this.store.key(n),o=r.substr(e.length);r.startsWith(e)&&(t[o]=p(this.store,r))}return t},getEndToEndDeviceTrackingStatus:function(){return p(this.store,c)},getEndToEndDeviceSyncToken:function(){return p(this.store,s)},removeEndToEndDeviceData:function(){g(this.store,u("")),g(this.store,c),g(this.store,s)},getEndToEndSessions:function(e){return p(this.store,d(e))},getAllEndToEndSessions:function(){const e=m(this.store,d("")),t={};for(const n of e){t[n.substr(d("").length)]=p(this.store,n)}return t},removeAllEndToEndSessions:function(){g(this.store,d(""))},getAllEndToEndInboundGroupSessionKeys:function(){const e=o+"inboundgroupsessions/",t=[];for(let n=0;n<this.store.length;n++){const r=this.store.key(n);r.startsWith(e)&&t.push({senderKey:r.substr(e.length,43),sessionId:r.substr(e.length+44)})}return t},getEndToEndInboundGroupSession:function(e,t){const n=function(e,t){return o+"inboundgroupsessions/"+e+"/"+t}(e,t);return this.store.getItem(n)},removeAllEndToEndInboundGroupSessions:function(){g(this.store,o+"inboundgroupsessions/")},getAllEndToEndRooms:function(){const e=m(this.store,h("")),t={};for(const n of e){t[n.substr(h("").length)]=p(this.store,n)}return t},removeAllEndToEndRooms:function(){g(this.store,h(""))},setLocalTrustedBackupPubKey:function(e){this.store.setItem(l,e)},getLocalTrustedBackupPubKey:function(){return this.store.getItem(l)}};const a=o+"account",s=o+"device_sync_token",c=o+"device_tracking",l=o+"trusted_backup_pubkey";function u(e){return o+"devices/"+e}function d(e){return o+"sessions/"+e}function h(e){return o+"rooms/"+e}function p(e,t){try{return JSON.parse(e.getItem(t))}catch(e){f("Failed to get key %s: %s",t,e),f(e.stack)}return null}function m(e,t){const n=[];for(let r=0;r<e.length;++r){const o=e.key(r);o.startsWith(t)&&n.push(o)}return n}function g(e,t){const n=[];for(let r=0;r<e.length;++r){const o=e.key(r);o.startsWith(t)&&n.push(o)}for(const t of n)e.removeItem(t)}function f(){0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79),o=n.n(r);class i{get action(){return"NOT_USED"}constructor(e){o()(this,"fn",void 0),this.fn=e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(78),o=n.n(r),i=n(227),a=n(80),s=n(90),c=n(83),l=n(91),u=n(192);let d;function h({isRoomEncrypted:e,kind:t}){if(!e)return null;if(i.a.get())return null;if(i.a.error)return o.a.createElement(o.a.Fragment,null,Object(a.a)("Message search initialisation failed, check <a>your settings</a> for more information",{},{a:e=>o.a.createElement("a",{onClick:e=>{e.preventDefault(),c.a.dispatch({action:l.a.ViewUserSettings,initialTabId:u.a.Security})}},e)}));const{desktopBuilds:n,brand:r}=s.a.get();let h=null,p=null;if(n.available)switch(p=o.a.createElement("img",{src:n.logo}),t){case d.Files:h=Object(a.a)("Use the <a>Desktop app</a> to see all encrypted files",{},{a:e=>o.a.createElement("a",{href:n.url,target:"_blank",rel:"noreferrer noopener"},e)});break;case d.Search:h=Object(a.a)("Use the <a>Desktop app</a> to search encrypted messages",{},{a:e=>o.a.createElement("a",{href:n.url,target:"_blank",rel:"noreferrer noopener"},e)})}else switch(t){case d.Files:h=Object(a.a)("This version of %(brand)s does not support viewing some encrypted files",{brand:r});break;case d.Search:h=Object(a.a)("This version of %(brand)s does not support searching encrypted messages",{brand:r})}return h?o.a.createElement("div",{className:"mx_DesktopBuildsNotice"},p,o.a.createElement("span",null,h)):(console.warn("Unknown desktop builds warning kind: ",t),null)}!function(e){e[e.Files=0]="Files",e[e.Search=1]="Search"}(d||(d={}))},function(e,t,n){"use strict";var r=n(118);Object.defineProperty(t,"__esModule",{value:!0});var o={};t.default=void 0;var i=r(n(952)),a=n(989);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=i.default;t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78);t.useCallbackRef=function(e,t){var n=r.useState((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCallbackRef=function(e){var t=null;return{get current(){return t},set current(n){var r=t;r!==n&&(t=n,e(n,r))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mediumSidecar=t.mediumEffect=t.mediumBlur=t.mediumFocus=void 0;var r=n(963),o=(0,r.createMedium)({},(function(e){return{target:e.target,currentTarget:e.currentTarget}}));t.mediumFocus=o;var i=(0,r.createMedium)();t.mediumBlur=i;var a=(0,r.createMedium)();t.mediumEffect=a;var s=(0,r.createSidecarMedium)({async:!0});t.mediumSidecar=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o=n(78),i=n.n(o),a=n(88),s=n.n(a),c=n(89),l=n(80),u=n(84),d=n(81);let h=Object(d.a)("views.elements.LanguageDropdown")(r=class extends i.a.Component{constructor(e){super(e),this._onSearchChange=this._onSearchChange.bind(this),this.state={searchQuery:"",langs:null}}componentDidMount(){if(l.c().then(e=>{e.sort((function(e,t){return e.label<t.label?-1:e.label>t.label?1:0})),this.setState({langs:e})}).catch(()=>{this.setState({langs:["en"]})}),!this.props.value){const e=l.g();this.props.onOptionChange(e)}}_onSearchChange(e){this.setState({searchQuery:e})}render(){if(null===this.state.langs){const e=c.getComponent("elements.Spinner");return i.a.createElement(e,null)}const e=c.getComponent("elements.Dropdown");let t;t=this.state.searchQuery?this.state.langs.filter(e=>function(e,t){return!!t.label.toUpperCase().includes(e.toUpperCase())||t.value.toUpperCase()===e.toUpperCase()}(this.state.searchQuery,e)):this.state.langs;const n=t.map(e=>i.a.createElement("div",{key:e.value},e.label));let r=u.b.getValue("language",null,!0),o=null;return r||(r=navigator.language||navigator.userLanguage),o=this.props.value||r,i.a.createElement(e,{id:"mx_LanguageDropdown",className:this.props.className,onOptionChange:this.props.onOptionChange,onSearchChange:this._onSearchChange,searchEnabled:!0,value:o,label:Object(l.a)("Language Dropdown"),disabled:this.props.disabled},n)}})||r;h.propTypes={className:s.a.string,onOptionChange:s.a.func.isRequired,value:s.a.string}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(80);function o(e){return{undefined:Object(r.a)("Default"),0:Object(r.a)("Restricted"),[e]:Object(r.a)("Default"),50:Object(r.a)("Moderator"),100:Object(r.a)("Admin")}}function i(e,t){const n=o(t);return n[e]?n[e]:Object(r.a)("Custom (%(level)s)",{level:e})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return l}));var r=n(88),o=n.n(r),i=n(80);const a=o.a.shape({userId:o.a.string.isRequired,displayname:o.a.string,avatarUrl:o.a.string}),s=o.a.shape({displayname:o.a.string,name:o.a.string,roomId:o.a.string.isRequired,canonicalAlias:o.a.string,avatarUrl:o.a.string});function c(e){return{userId:e.user_id,displayname:e.displayname,avatarUrl:e.avatar_url,isPrivileged:e.is_privileged}}function l(e){return{displayname:e.name||e.canonical_alias||Object(i.a)("Unnamed Room"),name:e.name,roomId:e.room_id,canonicalAlias:e.canonical_alias,avatarUrl:e.avatar_url,topic:e.topic,numJoinedMembers:e.num_joined_members,worldReadable:e.world_readable,guestCanJoin:e.guest_can_join,isPublic:!1!==e.is_public}}},function(e,t,n){"use strict";var r=n(551),o=n(114);function i(e){const t=e.scanner.TOKENS,n=e.parser.TOKENS.Base,r=e.parser.start;if(void 0===t.UNDERSCORE)throw new Error("linkify-matrix requires linkifyjs 2.1.1: this version is too old.");const o=function(e){n.call(this,e),this.type="roomalias",this.isLink=!0};o.prototype=new n;const i=r.jump(t.POUND),a=new e.parser.State,s=new e.parser.State,c=new e.parser.State(o),l=new e.parser.State,u=new e.parser.State(o),d=new e.parser.State,h=new e.parser.State(o),p=[t.DOT,t.PLUS,t.NUM,t.DOMAIN,t.TLD,t.UNDERSCORE,t.POUND,t.LOCALHOST];i.on(p,a),a.on(p,a),a.on(t.DOMAIN,a),a.on(t.COLON,s),s.on(t.DOMAIN,c),s.on(t.LOCALHOST,u),s.on(t.TLD,u),c.on(t.DOT,l),l.on(t.DOMAIN,c),l.on(t.TLD,u),u.on(t.DOT,l),u.on(t.COLON,d),d.on(t.NUM,h);const m=function(e){n.call(this,e),this.type="userid",this.isLink=!0};m.prototype=new n;const g=r.jump(t.AT),f=new e.parser.State,_=new e.parser.State,b=new e.parser.State(m),v=new e.parser.State,y=new e.parser.State(m),E=new e.parser.State,S=new e.parser.State(m),w=[t.DOT,t.UNDERSCORE,t.PLUS,t.NUM,t.DOMAIN,t.TLD,t.LOCALHOST];g.on(w,f),f.on(w,f),f.on(t.DOMAIN,f),f.on(t.COLON,_),_.on(t.DOMAIN,b),_.on(t.LOCALHOST,y),_.on(t.TLD,y),b.on(t.DOT,v),v.on(t.DOMAIN,b),v.on(t.TLD,y),y.on(t.DOT,v),y.on(t.COLON,E),E.on(t.NUM,S);const C=function(e){n.call(this,e),this.type="groupid",this.isLink=!0};C.prototype=new n;const T=r.jump(t.PLUS),x=new e.parser.State,k=new e.parser.State,F=new e.parser.State(C),O=new e.parser.State,R=new e.parser.State(C),D=new e.parser.State,I=new e.parser.State(C),A=[t.DOT,t.UNDERSCORE,t.PLUS,t.NUM,t.DOMAIN,t.TLD,t.LOCALHOST];T.on(A,x),x.on(A,x),x.on(t.DOMAIN,x),x.on(t.COLON,k),k.on(t.DOMAIN,F),k.on(t.LOCALHOST,R),k.on(t.TLD,R),F.on(t.DOT,O),O.on(t.DOMAIN,F),O.on(t.TLD,R),R.on(t.DOT,O),R.on(t.COLON,D),D.on(t.NUM,I)}i.onUserClick=function(e,t){e.preventDefault()},i.onAliasClick=function(e,t){e.preventDefault()},i.onGroupClick=function(e,t){e.preventDefault()};i.ELEMENT_URL_PATTERN="^(?:https?://)?(?:"+((window.location.host+window.location.pathname).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"|(?:www\\.)?(?:riot|vector)\\.im/(?:app|beta|staging|develop)/|(?:app|beta|staging|develop)\\.element\\.io/)(#.*)"),i.MATRIXTO_URL_PATTERN="^(?:https?://)?(?:www\\.)?matrix\\.to/#/(([#@!+]).*)",i.MATRIXTO_MD_LINK_PATTERN="\\[([^\\]]*)\\]\\((?:https?://)?(?:www\\.)?matrix\\.to/#/([#@!+][^\\)]*)\\)",i.MATRIXTO_BASE_URL=r.a,i.options={events:function(e,t){switch(t){case"url":try{const t=Object(o.j)(e);if(t&&t.userId)return{click:function(e){i.onUserClick(e,t.userId)}}}catch(e){}break;case"userid":return{click:function(t){i.onUserClick(t,e)}};case"roomalias":return{click:function(t){i.onAliasClick(t,e)}};case"groupid":return{click:function(t){i.onGroupClick(t,e)}}}},formatHref:function(e,t){switch(t){case"roomalias":case"userid":case"groupid":default:return Object(o.k)(e)}},linkAttributes:{rel:"noreferrer noopener"},target:function(e,t){if("url"===t)try{return Object(o.l)(e)!==e||decodeURIComponent(e).match(i.ELEMENT_URL_PATTERN)?null:"_blank"}catch(e){}return null}},t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(90),a=n(82);class s{constructor(){o()(this,"domain",void 0),o()(this,"update",async e=>{let t=(i.a.get().jitsi||{}).preferredDomain||"jitsi.riot.im";if(console.log("Attempting to get Jitsi conference information from homeserver"),e&&e["im.vector.riot.jitsi"]){const n=e["im.vector.riot.jitsi"].preferredDomain;n&&(t=n)}this.domain=t,console.log("Jitsi conference domain:",this.preferredDomain)})}get preferredDomain(){return this.domain||"jitsi.riot.im"}async getJitsiAuth(){if(!this.preferredDomain)return null;let e;try{const t=await fetch(`https://${this.preferredDomain}/.well-known/element/jitsi`);e=await t.json()}catch(e){return null}return e.auth?e.auth:null}start(){const e=a.a.get();e.on("WellKnown.client",this.update),this.update(e.getClientWellKnown())}parsePreferredConferenceUrl(e){const t=new URL(e);return t.hostname!==this.preferredDomain?null:{conferenceId:t.pathname,domain:t.hostname,isAudioOnly:!1}}static getInstance(){return s.instance||(s.instance=new s),s.instance}}o()(s,"instance",void 0)},function(e,t,n){"use strict";function r(e,t){return e.size!==t.size||(!!Array.from(t).some(t=>!e.has(t))||!!Array.from(e).some(e=>!t.has(e)))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(82),o=n(568),i=n(171);const a=e=>{let t="";r.a.get()&&(t=r.a.get().getUserId());const n={},a=e=>{if(n[e.roomId])return n[e.roomId];const r=(()=>{if(!e||!e.timeline)return Number.MAX_SAFE_INTEGER;if(Object(i.b)(e.getMyMembership())!==i.a.Join){const n=e.currentState.getStateEvents("m.room.member",t);if(n&&!Array.isArray(n))return n.getTs()}for(let n=e.timeline.length-1;n>=0;--n){const r=e.timeline[n];if(r.getTs()&&(r.getSender()===t||o.b(r)))return r.getTs()}return e.timeline.length&&e.timeline[0].getTs()?e.timeline[0].getTs():Number.MAX_SAFE_INTEGER})();return n[e.roomId]=r,r};return e.sort((e,t)=>a(t)-a(e))};class s{sortRooms(e,t){return a(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatten=void 0;var r=n(181);t.default={xml:!1,decodeEntities:!0};var o={_useHtmlParser2:!0,xmlMode:!0};t.flatten=function(e){return(null==e?void 0:e.xml)?"boolean"==typeof e.xml?o:r.__assign(r.__assign({},o),e.xml):null!=e?e:void 0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=t.parse=void 0,o(n(573),t);var a=n(573);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return i(a).default}});var s=n(1010);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i(s).default}})},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":" ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}')},function(e){e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTraversal=t.procedure=void 0,t.procedure={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0,descendant:-1,child:-1,parent:-1,sibling:-1,adjacent:-1,_flexibleDescendant:-1},t.isTraversal=function(e){return t.procedure[e.type]<0}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.subselects=t.getNextSiblings=t.ensureIsTag=t.PLACEHOLDER_ELEMENT=void 0;var o=n(213),i=n(398);function a(e,t){return e===o.falseFunc?o.falseFunc:function(n){return t.isTag(n)&&e(n)}}function s(e,t){var n=t.getSiblings(e);if(n.length<=1)return[];var r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}t.PLACEHOLDER_ELEMENT={},t.ensureIsTag=a,t.getNextSiblings=s;var c=function(e,t,n,r,o){var i=o(t,{xmlMode:!!n.xmlMode,adapter:n.adapter,equals:n.equals},r);return function(t){return i(t)&&e(t)}};t.subselects={is:c,matches:c,not:function(e,t,n,r,i){var a=i(t,{xmlMode:!!n.xmlMode,adapter:n.adapter,equals:n.equals},r);return a===o.falseFunc?e:a===o.trueFunc?o.falseFunc:function(t){return!a(t)&&e(t)}},has:function(e,n,c,l,u){var d=c.adapter,h={xmlMode:!!c.xmlMode,adapter:d,equals:c.equals},p=n.some((function(e){return e.some(i.isTraversal)}))?[t.PLACEHOLDER_ELEMENT]:void 0,m=u(n,h,p);if(m===o.falseFunc)return o.falseFunc;if(m===o.trueFunc)return function(t){return d.getChildren(t).some(d.isTag)&&e(t)};var g=a(m,d),f=m.shouldTestNextSiblings,_=void 0!==f&&f;return p?function(t){p[0]=t;var n=d.getChildren(t),o=_?r(r([],n),s(t,d)):n;return e(t)&&d.existsOne(g,o)}:function(t){return e(t)&&d.existsOne(g,d.getChildren(t))}}}},function(e,t,n){"use strict";const r=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];t.REPLACEMENT_CHARACTER="<22>",t.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},t.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},function(e,t,n){"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},function(e,t,n){"use strict";const r=n(182);e.exports=class extends r{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}}},function(e,t,n){"use strict";const{DOCUMENT_MODE:r}=n(197),o=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],i=o.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),a=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],s=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],c=s.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function l(e){const t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function u(e,t){for(let n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return!0;return!1}t.isConforming=function(e){return"html"===e.name&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)},t.getDocumentMode=function(e){if("html"!==e.name)return r.QUIRKS;const t=e.systemId;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return r.QUIRKS;let n=e.publicId;if(null!==n){if(n=n.toLowerCase(),a.indexOf(n)>-1)return r.QUIRKS;let e=null===t?i:o;if(u(n,e))return r.QUIRKS;if(e=null===t?s:c,u(n,e))return r.LIMITED_QUIRKS}return r.NO_QUIRKS},t.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+l(t):n&&(r+=" SYSTEM"),null!==n&&(r+=" "+l(n)),r}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.update=void 0;var r=n(214),o=n(593),i=n(587),a=n(146);function s(e,t){var n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(var o=0;o<n.length;o++){var i=n[o];i.parent&&i.parent.children!==n&&r.DomUtils.removeElement(i),t?(i.prev=n[o-1]||null,i.next=n[o+1]||null):i.prev=i.next=null,i.parent=t}return t}t.default=function(t,n,r){if(void 0!==e&&e.isBuffer(t)&&(t=t.toString()),"string"==typeof t)return n.xmlMode||n._useHtmlParser2?o.parse(t,n):i.parse(t,n,r);var c=t;if(!Array.isArray(c)&&a.isDocument(c))return c;var l=new a.Document([]);return s(c,l),l},t.update=s}).call(this,n(24).Buffer)},function(e,t,n){"use strict";t.__esModule=!0,t.tokenize=t.test=t.scanner=t.parser=t.options=t.inherits=t.find=void 0;var r=n(319),o=s(n(1050)),i=s(n(1051)),a=s(n(1052));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var c=function(e){return a.run(i.run(e))};t.find=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=c(e),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||t&&i.type!==t||r.push(i.toObject())}return r},t.inherits=r.inherits,t.options=o,t.parser=a,t.scanner=i,t.test=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=c(e);return 1===n.length&&n[0].isLink&&(!t||n[0].type===t)},t.tokenize=c},function(e,t,n){"use strict";t.__esModule=!0,t.AMPERSAND=t.CLOSEPAREN=t.CLOSEANGLEBRACKET=t.CLOSEBRACKET=t.CLOSEBRACE=t.OPENPAREN=t.OPENANGLEBRACKET=t.OPENBRACKET=t.OPENBRACE=t.WS=t.TLD=t.SYM=t.UNDERSCORE=t.SLASH=t.MAILTO=t.PROTOCOL=t.QUERY=t.POUND=t.PLUS=t.NUM=t.NL=t.LOCALHOST=t.PUNCTUATION=t.DOT=t.COLON=t.AT=t.DOMAIN=t.Base=void 0;var r=n(595),o=n(319),i=(0,r.createTokenClass)();function a(e){var t=e?{v:e}:{};return(0,o.inherits)(i,(0,r.createTokenClass)(),t)}i.prototype={toString:function(){return this.v+""}};var s=a(),c=a("@"),l=a(":"),u=a("."),d=a(),h=a(),p=a("\n"),m=a(),g=a("+"),f=a("#"),_=a(),b=a("mailto:"),v=a("?"),y=a("/"),E=a("_"),S=a(),w=a(),C=a(),T=a("{"),x=a("["),k=a("<"),F=a("("),O=a("}"),R=a("]"),D=a(">"),I=a(")"),A=a("&");t.Base=i,t.DOMAIN=s,t.AT=c,t.COLON=l,t.DOT=u,t.PUNCTUATION=d,t.LOCALHOST=h,t.NL=p,t.NUM=m,t.PLUS=g,t.POUND=f,t.QUERY=v,t.PROTOCOL=_,t.MAILTO=b,t.SLASH=y,t.UNDERSCORE=E,t.SYM=S,t.TLD=w,t.WS=C,t.OPENBRACE=T,t.OPENBRACKET=x,t.OPENANGLEBRACKET=k,t.OPENPAREN=F,t.CLOSEBRACE=O,t.CLOSEBRACKET=R,t.CLOSEANGLEBRACKET=D,t.CLOSEPAREN=I,t.AMPERSAND=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1059);t.XmlEntities=r.XmlEntities;var o=n(1060);t.Html4Entities=o.Html4Entities;var i=n(1061);t.Html5Entities=i.Html5Entities,t.AllHtmlEntities=i.Html5Entities},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromCodePoint=String.fromCodePoint||function(e){return String.fromCharCode(Math.floor((e-65536)/1024)+55296,(e-65536)%1024+56320)},t.getCodePoint=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536},t.highSurrogateFrom=55296,t.highSurrogateTo=56319},function(e,t,n){"use strict";let{red:r,bold:o,gray:i,options:a}=n(1070),s=n(597);class c extends Error{constructor(e,t,n,r,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),r&&(this.source=r),i&&(this.plugin=i),void 0!==t&&void 0!==n&&(this.line=t,this.column=n),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,c)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=a.enabled),s&&e&&(t=s(t));let n,c,l=t.split(/\r?\n/),u=Math.max(this.line-3,0),d=Math.min(this.line+2,l.length),h=String(d).length;return e?(n=e=>o(r(e)),c=e=>i(e)):n=c=e=>e,l.slice(u,d).map((e,t)=>{let r=u+1+t,o=" "+(" "+r).slice(-h)+" | ";if(r===this.line){let t=c(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+c(o)+e+"\n "+t+n("^")}return" "+c(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=c,c.default=c},function(e,t,n){"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},function(e,t,n){"use strict";let r=n(598);function o(e,t){new r(t).stringify(e)}e.exports=o,o.default=o},,,function(e,t,n){"use strict";let r,o,i=n(215);class a extends i{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new r(new o,this,e).stringify()}}a.registerLazyResult=e=>{r=e},a.registerProcessor=e=>{o=e},e.exports=a,a.default=a},function(e,t,n){"use strict";let r=n(215);class o extends r{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=o,o.default=o,r.registerAtRule(o)},function(e,t,n){"use strict";let r=n(215),o=n(604);class i extends r{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return o.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=i,i.default=i,r.registerRule(i)},function(e,t,n){"use strict";let{SourceMapConsumer:r,SourceMapGenerator:o}=n(412),{fileURLToPath:i,pathToFileURL:a}=n(600),{resolve:s,isAbsolute:c}=n(413),{nanoid:l}=n(1075),u=n(597),d=n(409),h=n(605),p=Symbol("fromOffsetCache"),m=Boolean(r&&o),g=Boolean(s&&c);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!g||/^\w+:\/\//.test(t.from)||c(t.from)?this.file=t.from:this.file=s(t.from)),g&&m){let e=new h(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from)}fromOffset(e){let t,n;if(this[p])n=this[p];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let r=0,o=e.length;r<o;r++)n[r]=t,t+=e[r].length+1;this[p]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t,o=n.length-2;for(;r<o;)if(t=r+(o-r>>1),e<n[t])o=t-1;else{if(!(e>=n[t+1])){r=t;break}r=t+1}}return{line:r+1,col:e-n[r]+1}}error(e,t,n,r={}){let o;if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let i=this.origin(t,n);return o=i?new d(e,i.line,i.column,i.source,i.file,r.plugin):new d(e,t,n,this.css,this.file,r.plugin),o.input={line:t,column:n,source:this.css},this.file&&(a&&(o.input.url=a(this.file).toString()),o.input.file=this.file),o}origin(e,t){if(!this.map)return!1;let n,r=this.map.consumer(),o=r.originalPositionFor({line:e,column:t});if(!o.source)return!1;n=c(o.source)?a(o.source):new URL(o.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let s={url:n.toString(),line:o.line,column:o.column};if("file:"===n.protocol){if(!i)throw new Error("file: protocol is not available in this PostCSS build");s.file=i(n)}let l=r.sourceContentFor(o.source);return l&&(s.source=l),s}mapResolve(e){return/^\w+:\/\//.test(e)?e:s(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=f,f.default=f,u&&u.registerInput&&u.registerInput(f)},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(80),p=n(83),m=n(324),g=n(607),f=n(89),_=n(93),b=n(81),v=n(198),y=n(242);let E=Object(b.a)("views.rooms.ReplyTile")((i=o=class extends l.a.PureComponent{constructor(...e){super(...e),s()(this,"anchorElement",Object(c.createRef)()),s()(this,"onDecrypted",()=>{this.forceUpdate(),this.props.onHeightChanged&&this.props.onHeightChanged()}),s()(this,"onEventRequiresUpdate",()=>{this.forceUpdate()}),s()(this,"onClick",e=>{const t=e.target;"a"===t.tagName.toLowerCase()&&null!==t.closest("a")&&t!==this.anchorElement.current||(e.preventDefault(),p.a.dispatch({action:"view_room",event_id:this.props.mxEvent.getId(),highlighted:!0,room_id:this.props.mxEvent.getRoomId()}))})}componentDidMount(){this.props.mxEvent.on("Event.decrypted",this.onDecrypted),this.props.mxEvent.on("Event.beforeRedaction",this.onEventRequiresUpdate),this.props.mxEvent.on("Event.replaced",this.onEventRequiresUpdate)}componentWillUnmount(){this.props.mxEvent.removeListener("Event.decrypted",this.onDecrypted),this.props.mxEvent.removeListener("Event.beforeRedaction",this.onEventRequiresUpdate),this.props.mxEvent.removeListener("Event.replaced",this.onEventRequiresUpdate)}render(){const e=this.props.mxEvent,t=e.getContent().msgtype,n=e.getType(),{tileHandler:r,isInfoMessage:o}=Object(v.c)(this.props.mxEvent);if(!r){const{mxEvent:e}=this.props;return console.warn(`Event type not supported: type:${e.getType()} isState:${e.isState()}`),l.a.createElement("div",{className:"mx_ReplyTile mx_ReplyTile_info mx_MNoticeBody"},Object(h.a)("This event could not be displayed"))}const i=f.getComponent(r),a=d()("mx_ReplyTile",{mx_ReplyTile_info:o&&!this.props.mxEvent.isRedacted(),mx_ReplyTile_audio:t===_.b.Audio,mx_ReplyTile_video:t===_.b.Video});let s,c="#";this.props.permalinkCreator&&(c=this.props.permalinkCreator.forEvent(this.props.mxEvent.getId()));!o&&t!==_.b.Image&&r!==_.a.RoomCreate&&n!==_.a.Sticker&&(s=l.a.createElement(m.a,{mxEvent:this.props.mxEvent,enableFlair:!1}));const u={[_.b.Image]:g.a,[_.b.Audio]:y.a,[_.b.Video]:y.a},p={[_.a.Sticker]:g.a};return l.a.createElement("div",{className:a},l.a.createElement("a",{href:c,onClick:this.onClick,ref:this.anchorElement},s,l.a.createElement(i,{ref:"tile",mxEvent:this.props.mxEvent,highlights:this.props.highlights,highlightLink:this.props.highlightLink,onHeightChanged:this.props.onHeightChanged,showUrlPreview:!1,overrideBodyTypes:u,overrideEventTypes:p,replacingEventId:this.props.mxEvent.replacingEventId(),maxImageHeight:96})))}},s()(o,"defaultProps",{onHeightChanged:()=>{}}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r,o,i,a=n(92),s=n.n(a),c=n(79),l=n.n(c),u=n(78),d=n.n(u),h=n(1079),p=n(242),m=n(87),g=n(80),f=n(84),_=n(94),b=n(147),v=n(81),y=n(100),E=n(187),S=n(292);let w=Object(v.a)("views.messages.MImageBody")((i=o=class extends d.a.Component{constructor(e){super(e),l()(this,"unmounted",!0),l()(this,"image",Object(u.createRef)()),l()(this,"onClientSync",(e,t)=>{if(this.unmounted)return;"ERROR"!==e&&t!==e&&this.state.imgError&&this.setState({imgError:!1})}),l()(this,"onClick",e=>{if(0===e.button&&!e.metaKey){var t;if(e.preventDefault(),!this.state.showImage)return void this.showImage();const n=this.props.mxEvent.getContent(),r={src:this.getContentUrl(),name:(null===(t=n.body)||void 0===t?void 0:t.length)>0?n.body:Object(g.a)("Attachment"),mxEvent:this.props.mxEvent,permalinkCreator:this.props.permalinkCreator};n.info&&(r.width=n.info.w,r.height=n.info.h,r.fileSize=n.info.size),m.a.createDialog(S.a,r,"mx_Dialog_lightbox",null,!0)}}),l()(this,"isGif",()=>{var e;return"image/gif"===(null===(e=this.props.mxEvent.getContent().info)||void 0===e?void 0:e.mimetype)}),l()(this,"onImageEnter",e=>{if(this.setState({hover:!0}),!this.state.showImage||!this.isGif()||f.b.getValue("autoplayGifsAndVideos"))return;e.currentTarget.src=this.getContentUrl()}),l()(this,"onImageLeave",e=>{if(this.setState({hover:!1}),!this.state.showImage||!this.isGif()||f.b.getValue("autoplayGifsAndVideos"))return;e.currentTarget.src=this.getThumbUrl()}),l()(this,"onImageError",()=>{this.setState({imgError:!0})}),l()(this,"onImageLoad",()=>{let e;if(this.props.onHeightChanged(),this.image.current){const{naturalWidth:t,naturalHeight:n}=this.image.current;e={naturalWidth:t,naturalHeight:n}}this.setState({imgLoaded:!0,loadedImageDimensions:e})}),this.state={decryptedUrl:null,decryptedThumbnailUrl:null,decryptedBlob:null,error:null,imgError:!1,imgLoaded:!1,loadedImageDimensions:null,hover:!1,showImage:f.b.getValue("showImages")}}showImage(){localStorage.setItem("mx_ShowImage_"+this.props.mxEvent.getId(),"true"),this.setState({showImage:!0}),this.downloadImage()}getContentUrl(){const e=Object(y.a)(this.props.mxEvent.getContent());return e.isEncrypted?this.state.decryptedUrl:e.srcHttp}getThumbUrl(){const e=this.props.mxEvent.getContent(),t=Object(y.a)(e);if(t.isEncrypted)return this.state.decryptedThumbnailUrl?this.state.decryptedThumbnailUrl:this.state.decryptedUrl;if(e.info&&"image/svg+xml"===e.info.mimetype&&t.hasThumbnail)return t.getThumbnailHttp(800,600,"scale");{const n=e.info;if(!this.isGif()&&1!==window.devicePixelRatio&&n&&n.w&&n.h&&n.size){const e=n.w>800||n.h>600;return n.size>1048576&&e?t.getThumbnailOfSourceHttp(800,600):t.srcHttp}return t.getThumbnailOfSourceHttp(800,600)}}async downloadImage(){if(this.props.mediaEventHelper.media.isEncrypted&&null===this.state.decryptedUrl)try{const e=await this.props.mediaEventHelper.thumbnailUrl.value;this.setState({decryptedUrl:await this.props.mediaEventHelper.sourceUrl.value,decryptedThumbnailUrl:e,decryptedBlob:await this.props.mediaEventHelper.sourceBlob.value})}catch(e){if(this.unmounted)return;console.warn("Unable to decrypt attachment: ",e),this.setState({error:e})}}componentDidMount(){this.unmounted=!1,this.context.on("sync",this.onClientSync);(this.state.showImage||"true"===localStorage.getItem("mx_ShowImage_"+this.props.mxEvent.getId()))&&(this.downloadImage(),this.setState({showImage:!0}))}componentWillUnmount(){this.unmounted=!0,this.context.removeListener("sync",this.onClientSync)}messageContent(e,t,n,r){let o,i;if(n&&n.info&&n.info.w&&n.info.h)o=n.info.w,i=n.info.h;else{if(!this.state.loadedImageDimensions){let r;return r=this.state.showImage?d.a.createElement("img",{style:{display:"none"},src:t,ref:this.image,alt:n.body,onError:this.onImageError,onLoad:this.onImageLoad}):d.a.createElement(C,null),this.wrapImage(e,r)}o=this.state.loadedImageDimensions.naturalWidth,i=this.state.loadedImageDimensions.naturalHeight}const a=r||Math.min(this.props.maxImageHeight||600,i),s=o*a/i;let c=null,l=null,u=null;this.state.imgLoaded||(l=this.getPlaceholder(s,a));let h=Boolean(l);t&&!this.state.imgError&&(c=d.a.createElement("img",{className:"mx_MImageBody_thumbnail",src:t,ref:this.image,style:{height:"100%"},alt:n.body,onError:this.onImageError,onLoad:this.onImageLoad,onMouseEnter:this.onImageEnter,onMouseLeave:this.onImageLeave})),this.state.showImage||(c=d.a.createElement(C,{maxWidth:s}),h=!1),!this.isGif()||f.b.getValue("autoplayGifsAndVideos")||this.state.hover||(u=d.a.createElement("p",{className:"mx_MImageBody_gifLabel"},"GIF"));const p=d.a.createElement("div",{className:"mx_MImageBody_thumbnail_container",style:{maxHeight:a,maxWidth:s,aspectRatio:`${o}/${i}`}},h&&d.a.createElement("div",{className:"mx_MImageBody_thumbnail",style:{maxWidth:`min(100%, ${o}px)`}},l),d.a.createElement("div",{style:{display:h?"none":void 0,height:"100%"}},c,u),this.state.hover&&this.getTooltip());return this.wrapImage(e,p)}wrapImage(e,t){return d.a.createElement("a",{href:e,onClick:this.onClick},t)}getPlaceholder(e,t){const n=this.props.mxEvent.getContent().info[E.a];return n?d.a.createElement(h.Blurhash,{hash:n,width:e,height:t}):d.a.createElement(b.a,{w:32,h:32})}getTooltip(){return null}getFileBody(){if(this.props.tileShape)return d.a.createElement(p.a,s()({},this.props,{showGenericPlaceholder:!1}))}render(){const e=this.props.mxEvent.getContent();if(null!==this.state.error)return d.a.createElement("div",{className:"mx_MImageBody"},d.a.createElement("img",{src:n(245),width:"16",height:"16"}),Object(g.a)("Error decrypting image"));const t=this.getContentUrl();let r;r=this.isGif()&&f.b.getValue("autoplayGifsAndVideos")?t:this.getThumbUrl();const o=this.messageContent(t,r,e),i=this.getFileBody();return d.a.createElement("div",{className:"mx_MImageBody"},o,i)}},l()(o,"contextType",_.a),r=i))||r;class C extends d.a.PureComponent{render(){const e=this.props.maxWidth?this.props.maxWidth+"px":null;let t="mx_HiddenImagePlaceholder";return this.props.hover&&(t+=" mx_HiddenImagePlaceholder_hover"),d.a.createElement("div",{className:t,style:{maxWidth:`min(100%, ${e}px)`}},d.a.createElement("div",{className:"mx_HiddenImagePlaceholder_button"},d.a.createElement("span",{className:"mx_HiddenImagePlaceholder_eye"}),d.a.createElement("span",null,Object(g.a)("Show image"))))}}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this,t)||this;return n.name="ValidationError",n.message=t,n}return o(t,e),t}(Error);t.ValidationError=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return R})),n.d(t,"b",(function(){return D}));var r,o=n(92),i=n.n(o),a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(108),d=n(93),h=n(82),p=n(83),m=n(80),g=n(87),f=n(422),_=n(84),b=n(131),v=n(198),y=n(163),E=n(81),S=n(364),w=n(619),C=n(91),T=n(620),x=n(622),k=n(428),F=n(105),O=n(330);function R(e){return e===u.a.QUEUED||e===u.a.NOT_SENT}let D=Object(E.a)("views.context_menus.MessageContextMenu")(r=class extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{canRedact:!1,canPin:!1}),s()(this,"checkPermissions",()=>{const e=h.a.get(),t=e.getRoom(this.props.mxEvent.getRoomId()),n=t.currentState.maySendRedactionForEvent(this.props.mxEvent,e.credentials.userId)&&this.props.mxEvent.getType()!==d.a.RoomServerAcl&&this.props.mxEvent.getType()!==d.a.RoomEncryption;let r=t.currentState.mayClientSendStateEvent(d.a.RoomPinnedEvents,e);_.b.getValue("feature_pinning")||(r=!1),this.setState({canRedact:n,canPin:r})}),s()(this,"onResendReactionsClick",()=>{for(const e of this.getUnsentReactions())f.a.resend(e);this.closeMenu()}),s()(this,"onReportEventClick",()=>{g.a.createTrackedDialog("Report Event","",T.a,{mxEvent:this.props.mxEvent},"mx_Dialog_reportEvent"),this.closeMenu()}),s()(this,"onViewSourceClick",()=>{g.a.createTrackedDialog("View Event Source","",x.a,{mxEvent:this.props.mxEvent},"mx_Dialog_viewsource"),this.closeMenu()}),s()(this,"onRedactClick",()=>{g.a.createTrackedDialog("Confirm Redact Dialog","",k.a,{onFinished:async(e,t)=>{if(!e)return;const n=h.a.get();try{var r,o;null===(r=(o=this.props).onCloseDialog)||void 0===r||r.call(o),await n.redactEvent(this.props.mxEvent.getRoomId(),this.props.mxEvent.getId(),void 0,t?{reason:t}:{})}catch(e){const t=e.errcode||e.statusCode;void 0!==t&&g.a.createTrackedDialog("You cannot delete this message","",F.a,{title:Object(m.a)("Error"),description:Object(m.a)("You cannot delete this message. (%(code)s)",{code:t})})}}},"mx_Dialog_confirmredact"),this.closeMenu()}),s()(this,"onForwardClick",()=>{g.a.createTrackedDialog("Forward Message","",w.a,{matrixClient:h.a.get(),event:this.props.mxEvent,permalinkCreator:this.props.permalinkCreator}),this.closeMenu()}),s()(this,"onPinClick",()=>{var e,t;const n=h.a.get(),r=n.getRoom(this.props.mxEvent.getRoomId()),o=this.props.mxEvent.getId(),i=(null==r||null===(e=r.currentState)||void 0===e||null===(t=e.getStateEvents(d.a.RoomPinnedEvents,""))||void 0===t?void 0:t.getContent().pinned)||[];var a,s;i.includes(o)?i.splice(i.indexOf(o),1):(i.push(o),n.setRoomAccountData(r.roomId,S.a,{event_ids:[...(null===(a=r.getAccountData(S.a))||void 0===a||null===(s=a.getContent())||void 0===s?void 0:s.event_ids)||[],o]}));n.sendStateEvent(this.props.mxEvent.getRoomId(),d.a.RoomPinnedEvents,{pinned:i},""),this.closeMenu()}),s()(this,"closeMenu",()=>{this.props.onFinished()}),s()(this,"onUnhidePreviewClick",()=>{var e;null===(e=this.props.eventTileOps)||void 0===e||e.unhideWidget(),this.closeMenu()}),s()(this,"onQuoteClick",()=>{p.a.dispatch({action:C.a.ComposerInsert,event:this.props.mxEvent}),this.closeMenu()}),s()(this,"onPermalinkClick",e=>{e.preventDefault(),g.a.createTrackedDialog("share room message dialog","",O.a,{target:this.props.mxEvent,permalinkCreator:this.props.permalinkCreator}),this.closeMenu()}),s()(this,"onCollapseReplyThreadClick",()=>{this.props.collapseReplyThread(),this.closeMenu()})}componentDidMount(){h.a.get().on("RoomMember.powerLevel",this.checkPermissions),this.checkPermissions()}componentWillUnmount(){const e=h.a.get();e&&e.removeListener("RoomMember.powerLevel",this.checkPermissions)}isPinned(){const e=h.a.get().getRoom(this.props.mxEvent.getRoomId()).currentState.getStateEvents(d.a.RoomPinnedEvents,"");if(!e)return!1;const t=e.getContent();return t.pinned&&Array.isArray(t.pinned)&&t.pinned.includes(this.props.mxEvent.getId())}getReactions(e){const t=h.a.get().getRoom(this.props.mxEvent.getRoomId()),n=this.props.mxEvent.getId();return t.getPendingEvents().filter(t=>{const r=t.getRelation();return(null==r?void 0:r.rel_type)===d.c.Annotation&&r.event_id===n&&e(t)})}getPendingReactions(){return this.getReactions(e=>R(e.status))}getUnsentReactions(){return this.getReactions(e=>e.status===u.a.NOT_SENT)}render(){const e=h.a.get().getUserId(),t=this.props.mxEvent,n=t.status,r=this.getUnsentReactions().length;let o,a,s,c,d,p,g,f,_;const E=!n||n===u.a.SENT;t.isRedacted()||0!==r&&(o=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconResend",label:Object(m.a)("Resend %(unsentCount)s reaction(s)",{unsentCount:r}),onClick:this.onResendReactionsClick})),E&&this.state.canRedact&&(a=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconRedact",label:Object(m.a)("Remove"),onClick:this.onRedactClick})),Object(v.d)(t)&&(s=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconForward",label:Object(m.a)("Forward"),onClick:this.onForwardClick}),this.state.canPin&&(c=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconPin",label:this.isPinned()?Object(m.a)("Unpin"):Object(m.a)("Pin"),onClick:this.onPinClick})));const S=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconSource",label:Object(m.a)("View source"),onClick:this.onViewSourceClick});let w;this.props.eventTileOps&&this.props.eventTileOps.isWidgetHidden()&&(d=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconUnhidePreview",label:Object(m.a)("Show preview"),onClick:this.onUnhidePreviewClick})),this.props.permalinkCreator&&(w=this.props.permalinkCreator.forEvent(this.props.mxEvent.getId()));const C=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconPermalink",onClick:this.onPermalinkClick,label:Object(m.a)("Share"),element:"a",href:w,target:"_blank",rel:"noreferrer noopener"});let T;this.props.eventTileOps&&(g=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconQuote",label:Object(m.a)("Quote"),onClick:this.onQuoteClick})),"string"==typeof t.getContent().external_url&&Object(b.e)(t.getContent().external_url)&&(p=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconLink",onClick:this.closeMenu,label:Object(m.a)("Source URL"),element:"a",target:"_blank",rel:"noreferrer noopener",href:t.getContent().external_url})),this.props.collapseReplyThread&&(f=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconCollapse",label:Object(m.a)("Collapse reply thread"),onClick:this.onCollapseReplyThreadClick})),t.getSender()!==e&&(T=l.a.createElement(y.b,{iconClassName:"mx_MessageContextMenu_iconReport",label:Object(m.a)("Report"),onClick:this.onReportEventClick}));const x=l.a.createElement(y.c,null,g,s,c,C,T,p,d,S,o,f);return a&&(_=l.a.createElement(y.c,{red:!0},a)),l.a.createElement(y.e,i()({},this.props,{className:"mx_MessageContextMenu",compact:!0}),x,_)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(108),o=n(82),i=n(83);class a{static resendUnsentEvents(e){return Promise.all(e.getPendingEvents().filter((function(e){return e.status===r.a.NOT_SENT})).map((function(e){return a.resend(e)})))}static cancelUnsentEvents(e){e.getPendingEvents().filter((function(e){return e.status===r.a.NOT_SENT})).forEach((function(e){a.removeFromQueue(e)}))}static resend(e){const t=o.a.get().getRoom(e.getRoomId());return o.a.get().resendEvent(e,t).then((function(t){i.a.dispatch({action:"message_sent",event:e})}),(function(t){console.log("Resend got send failure: "+t.name+"("+t+")"),i.a.dispatch({action:"message_send_failed",event:e})}))}static removeFromQueue(e){o.a.get().cancelPendingEvent(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(79),o=n.n(r),i=n(82),a=n(365),s=n(84),c=n(80),l=n(83),u=n(98),d=n(136);class h{constructor(){o()(this,"_lists",[]),o()(this,"_roomIds",[]),o()(this,"mjolnirWatchRef",null),o()(this,"dispatcherRef",null),o()(this,"onAction",e=>{"setup_mjolnir"===e.action&&(console.log("Setting up Mjolnir: after sync"),this.setup())}),o()(this,"onEvent",e=>{i.a.get()&&this._roomIds.includes(e.getRoomId())&&a.a.includes(e.getType())&&this.updateLists(this._roomIds)})}get roomIds(){return this._roomIds}get lists(){return this._lists}start(){this.mjolnirWatchRef=s.b.watchSetting("mjolnirRooms",null,this.onListsChanged.bind(this)),this.dispatcherRef=l.a.register(this.onAction),l.a.dispatch({action:"do_after_sync_prepared",deferred_action:{action:"setup_mjolnir"}})}setup(){i.a.get()&&(this.updateLists(s.b.getValue("mjolnirRooms")),i.a.get().on("RoomState.events",this.onEvent))}stop(){this.mjolnirWatchRef&&(s.b.unwatchSetting(this.mjolnirWatchRef),this.mjolnirWatchRef=null),this.dispatcherRef&&(l.a.unregister(this.dispatcherRef),this.dispatcherRef=null),i.a.get()&&i.a.get().removeListener("RoomState.events",this.onEvent)}async getOrCreatePersonalList(){let e=s.b.getValue("mjolnirPersonalRoom");if(!e){const t=await i.a.get().createRoom({name:Object(c.a)("My Ban List"),topic:Object(c.a)("This is your list of users/servers you have blocked - don't leave the room!"),preset:d.d.PrivateChat});e=t.room_id,await s.b.setValue("mjolnirPersonalRoom",null,u.a.ACCOUNT,e),await s.b.setValue("mjolnirRooms",null,u.a.ACCOUNT,[e,...this._roomIds])}if(!e)throw new Error("Error finding a room ID to use");let t=this._lists.find(t=>t.roomId===e);return t||(t=new a.b(e)),t}getPersonalList(){const e=s.b.getValue("mjolnirPersonalRoom");if(!e)return null;let t=this._lists.find(t=>t.roomId===e);return t||(t=new a.b(e)),t}async subscribeToList(e){const t=[...this._roomIds,e];await s.b.setValue("mjolnirRooms",null,u.a.ACCOUNT,t),this._lists.push(new a.b(e))}async unsubscribeFromList(e){const t=this._roomIds.filter(t=>t!==e);await s.b.setValue("mjolnirRooms",null,u.a.ACCOUNT,t),this._lists=this._lists.filter(t=>t.roomId!==e)}onListsChanged(e,t,n,r){this.updateLists(r)}updateLists(e){if(i.a.get()&&(console.log("Updating Mjolnir ban lists to: "+e),this._lists=[],this._roomIds=e||[],e))for(const t of e)this._lists.push(new a.b(t))}isServerBanned(e){for(const t of this._lists)for(const n of t.serverRules)if(n.isMatch(e))return!0;return!1}isUserBanned(e){for(const t of this._lists)for(const n of t.userRules)if(n.isMatch(e))return!0;return!1}static sharedInstance(){return h.instance||(h.instance=new h),h.instance}}o()(h,"instance",null)},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(80),a=n(94),s=n(148),c=n(84);const l=o.a.forwardRef(({mxEvent:e},t)=>{const n=Object(r.useContext)(a.a);let l=Object(i.a)("Message deleted");const u=e.getUnsigned(),d=u&&u.redacted_because&&u.redacted_because.sender;if(d&&d!==e.getSender()){const t=n.getRoom(e.getRoomId()),r=t&&t.getMember(d);l=Object(i.a)("Message deleted by %(name)s",{name:r?r.name:d})}const h=c.b.getValue("showTwelveHourTimestamps"),p=Object(s.c)(new Date(u.redacted_because.origin_server_ts),h),m=Object(i.a)("Message deleted on %(date)s",{date:p});return o.a.createElement("span",{className:"mx_RedactedBody",ref:t,title:m},l)});t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(81);let h=Object(d.a)("views.rooms.PresenceLabel")((i=o=class extends l.a.Component{getDuration(e){if(!e)return;const t=Math.round(e/1e3),n=t%60,r=Math.round(t/60)%60,o=Math.round(t/3600)%24,i=Math.round(t/86400);return t<60?t<0?Object(u.a)("%(duration)ss",{duration:0}):Object(u.a)("%(duration)ss",{duration:n}):t<3600?Object(u.a)("%(duration)sm",{duration:r}):t<86400?Object(u.a)("%(duration)sh",{duration:o}):Object(u.a)("%(duration)sd",{duration:i})}getPrettyPresence(e,t,n){if(!n&&void 0!==t&&t>0){const n=this.getDuration(t);return"online"===e?Object(u.a)("Online for %(duration)s",{duration:n}):"unavailable"===e?Object(u.a)("Idle for %(duration)s",{duration:n}):"offline"===e?Object(u.a)("Offline for %(duration)s",{duration:n}):Object(u.a)("Unknown for %(duration)s",{duration:n})}return"online"===e?Object(u.a)("Online"):"unavailable"===e?Object(u.a)("Idle"):"offline"===e?Object(u.a)("Offline"):Object(u.a)("Unknown")}render(){return l.a.createElement("div",{className:"mx_PresenceLabel"},this.getPrettyPresence(this.props.presenceState,this.props.activeAgo,this.props.currentlyActive))}},s()(o,"defaultProps",{activeAgo:-1,presenceState:null}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(623),p=n(81);let m=Object(p.a)("views.elements.SyntaxHighlight")((i=o=class extends l.a.Component{constructor(e){super(e),this._ref=this._ref.bind(this)}componentDidUpdate(){this._el&&Object(h.highlightBlock)(this._el)}_ref(e){this._el=e,this.componentDidUpdate()}render(){const{className:e,children:t}=this.props;return l.a.createElement("pre",{className:e+" mx_SyntaxHighlight",ref:this._ref},l.a.createElement("code",null,t))}},s()(o,"propTypes",{className:d.a.string,children:d.a.node}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(149),a=n(243);class s extends i.a{getValueOverride(e,t,n,r){if(!n)return null;if(s.isLogin)return"light";return Object(a.b)()[n]?null:a.a}}o()(s,"isLogin",!1)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r,o=n(78),i=n.n(o),a=n(80),s=n(81),c=n(429);let l=Object(s.a)("views.dialogs.ConfirmRedactDialog")(r=class extends i.a.Component{render(){return i.a.createElement(c.a,{onFinished:this.props.onFinished,title:Object(a.a)("Confirm Removal"),description:Object(a.a)("Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change."),placeholder:Object(a.a)("Reason (optional)"),focus:!0,button:Object(a.a)("Remove")})}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(89),p=n(101),m=n(80),g=n(81);let f=Object(g.a)("views.dialogs.TextInputDialog")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"onOk",async e=>{if(e.preventDefault(),this.props.validator&&(this.setState({busy:!0}),await this._field.current.validate({allowEmpty:!1}),!this._field.current.state.valid))return this._field.current.focus(),this._field.current.validate({allowEmpty:!1,focused:!0}),void this.setState({busy:!1});this.props.onFinished(!0,this.state.value)}),s()(this,"onCancel",()=>{this.props.onFinished(!1)}),s()(this,"onChange",e=>{this.setState({value:e.target.value})}),s()(this,"onValidate",async e=>{const t=await this.props.validator(e);return this.setState({valid:t.valid}),t}),this._field=Object(c.createRef)(),this.state={value:this.props.value,busy:!1,valid:!1}}componentDidMount(){this.props.focus&&this._field.current.focus()}render(){const e=h.getComponent("views.dialogs.BaseDialog"),t=h.getComponent("views.elements.DialogButtons");return l.a.createElement(e,{className:"mx_TextInputDialog",onFinished:this.props.onFinished,title:this.props.title,fixedWidth:this.props.fixedWidth},l.a.createElement("form",{onSubmit:this.onOk},l.a.createElement("div",{className:"mx_Dialog_content"},l.a.createElement("div",{className:"mx_TextInputDialog_label"},l.a.createElement("label",{htmlFor:"textinput"}," ",this.props.description," ")),l.a.createElement("div",null,l.a.createElement(p.a,{className:"mx_TextInputDialog_input",ref:this._field,type:"text",label:this.props.placeholder,value:this.state.value,onChange:this.onChange,onValidate:this.props.validator?this.onValidate:void 0,size:"64"})))),l.a.createElement(t,{primaryButton:this.state.busy?Object(m.a)(this.props.busyMessage):this.props.button,disabled:this.state.busy,onPrimaryButtonClick:this.onOk,onCancel:this.onCancel,hasCancel:this.props.hasCancel}))}},s()(o,"propTypes",{title:d.a.string,description:d.a.oneOfType([d.a.element,d.a.string]),value:d.a.string,placeholder:d.a.string,button:d.a.string,busyMessage:d.a.string,focus:d.a.bool,onFinished:d.a.func.isRequired,hasCancel:d.a.bool,validator:d.a.func,fixedWidth:d.a.bool}),s()(o,"defaultProps",{title:"",value:"",description:"",busyMessage:Object(m.b)("Loading..."),focus:!0,hasCancel:!0}),r=i))||r},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n(1284),l=n(86),u=n.n(l),d=n(80),h=n(97);const p=["data","className"];function m(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}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const f={errorCorrectionLevel:"L"};t.a=e=>{let{data:t,className:n}=e,r=a()(e,p);const[o,i]=s.useState(null);return s.useEffect(()=>{let e=!1;return Object(c.toDataURL)(t,g(g({},f),r)).then(t=>{e||i(t)}),()=>{e=!0}},[JSON.stringify(t),r]),s.createElement("div",{className:u()("mx_QRCode",n)},o?s.createElement("img",{src:o,className:"mx_VerificationQRCode",alt:Object(d.a)("QR Code")}):s.createElement(h.a,null))}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,o=n(78),i=n.n(o),a=n(148),s=n(81);let c=Object(s.a)("views.messages.MessageTimestamp")(r=class extends i.a.Component{render(){const e=new Date(this.props.ts);let t;return t=this.props.showFullDate?Object(a.c)(e,this.props.showTwelveHour,this.props.showSeconds):this.props.showSeconds?Object(a.e)(e,this.props.showTwelveHour):Object(a.f)(e,this.props.showTwelveHour),i.a.createElement("span",{className:"mx_MessageTimestamp",title:Object(a.c)(e,this.props.showTwelveHour),"aria-hidden":!0},t)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(81),l=n(154);let u=Object(c.a)("views.elements.TooltipButton")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onMouseOver",()=>{this.setState({hover:!0})}),i()(this,"onMouseLeave",()=>{this.setState({hover:!1})}),this.state={hover:!1}}render(){const e=this.state.hover?s.a.createElement(l.b,{className:"mx_TooltipButton_container",tooltipClassName:"mx_TooltipButton_helpText",label:this.props.helpText}):s.a.createElement("div",null);return s.a.createElement("div",{className:"mx_TooltipButton",onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},"?",e)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(106),u=n(159);const d=["inputRef"],h=e=>{let{inputRef:t}=e,n=a()(e,d);const[r,i,s]=Object(u.e)(t);return c.a.createElement(l.a,o()({},n,{onFocus:r,inputRef:s,tabIndex:i?0:-1}))}},function(e,t,n){"use strict";var r,o=n(78),i=n.n(o),a=n(103),s=n(81);let c=Object(s.a)("views.emojipicker.Emoji")(r=class extends i.a.PureComponent{render(){const{onClick:e,onMouseEnter:t,onMouseLeave:n,emoji:r,selectedEmojis:o}=this.props,s=o&&o.has(r.unicode);return i.a.createElement(a.f,{element:"li",onClick:()=>e(r),onMouseEnter:()=>t(r),onMouseLeave:()=>n(r),className:"mx_EmojiPicker_item_wrapper",label:r.unicode},i.a.createElement("div",{className:"mx_EmojiPicker_item "+(s?"mx_EmojiPicker_item_selected":"")},r.unicode))}})||r;t.a=c},function(e,t,n){"use strict";n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return L}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(93),l=n(80),u=n(159),d=n(156),h=n(126),p=n(141),m=n(83),g=n(438),f=n(82),_=n(655),b=n(656),v=n(218),y=n(91),E=n(167),S=n(84),w=n(657),C=n(109),T=n(129),x=n(163),k=n(85),F=n(176),O=n(102),R=n(221),D=n(81),I=n(119);const A=[p.a.Invite,p.a.Favourite,p.a.DM,p.a.Untagged,p.a.LowPriority,p.a.ServerNotice,p.a.Suggested,p.a.Archived],N=p.a.LowPriority,M=[p.a.DM,p.a.Untagged],P={[p.a.Invite]:{sectionLabel:Object(l.b)("Invites"),isInvite:!0,defaultHidden:!1},[p.a.Favourite]:{sectionLabel:Object(l.b)("Favourites"),isInvite:!1,defaultHidden:!1},[p.a.DM]:{sectionLabel:Object(l.b)("People"),isInvite:!1,defaultHidden:!1,addRoomLabel:Object(l.b)("Start chat"),onAddRoom:e=>{(e||m.a).dispatch({action:"view_create_chat"})}},[p.a.Untagged]:{sectionLabel:Object(l.b)("Rooms"),isInvite:!1,defaultHidden:!1,addRoomLabel:Object(l.b)("Add room"),addRoomContextMenu:e=>{if(O.g.instance.activeSpace){const t=O.g.instance.activeSpace.currentState.maySendStateEvent(c.a.SpaceChild,f.a.get().getUserId());return s.a.createElement(x.c,{first:!0},s.a.createElement(x.b,{label:Object(l.a)("Create new room"),iconClassName:"mx_RoomList_iconPlus",onClick:t=>{t.preventDefault(),t.stopPropagation(),e(),Object(R.e)(O.g.instance.activeSpace)},disabled:!t,tooltip:t?void 0:Object(l.a)("You do not have permissions to create new rooms in this space")}),s.a.createElement(x.b,{label:Object(l.a)("Add existing room"),iconClassName:"mx_RoomList_iconHash",onClick:t=>{t.preventDefault(),t.stopPropagation(),e(),Object(R.d)(O.g.instance.activeSpace)},disabled:!t,tooltip:t?void 0:Object(l.a)("You do not have permissions to add rooms to this space")}),s.a.createElement(x.b,{label:Object(l.a)("Explore rooms"),iconClassName:"mx_RoomList_iconBrowse",onClick:t=>{t.preventDefault(),t.stopPropagation(),e(),m.a.fire(y.a.ViewRoomDirectory)}}))}return s.a.createElement(x.c,{first:!0},s.a.createElement(x.b,{label:Object(l.a)("Create new room"),iconClassName:"mx_RoomList_iconPlus",onClick:t=>{t.preventDefault(),t.stopPropagation(),e(),m.a.dispatch({action:"view_create_room"})}}),s.a.createElement(x.b,{label:F.a.instance.getSelectedCommunityId()?Object(l.a)("Explore community rooms"):Object(l.a)("Explore public rooms"),iconClassName:"mx_RoomList_iconExplore",onClick:t=>{t.preventDefault(),t.stopPropagation(),e(),m.a.fire(y.a.ViewRoomDirectory)}}))}},[p.a.LowPriority]:{sectionLabel:Object(l.b)("Low priority"),isInvite:!1,defaultHidden:!1},[p.a.ServerNotice]:{sectionLabel:Object(l.b)("System Alerts"),isInvite:!1,defaultHidden:!1},[p.a.Archived]:{sectionLabel:Object(l.b)("Historical"),isInvite:!1,defaultHidden:!0},[p.a.Suggested]:{sectionLabel:Object(l.b)("Suggested Rooms"),isInvite:!1,defaultHidden:!1}};let L=Object(D.a)("views.rooms.RoomList")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"dispatcherRef",void 0),i()(this,"customTagStoreRef",void 0),i()(this,"roomStoreToken",void 0),i()(this,"onRoomViewStoreUpdate",()=>{this.setState({currentRoomId:h.a.getRoomId()})}),i()(this,"onAction",e=>{if(e.action===y.a.ViewRoomDelta){const t=e,n=h.a.getRoomId(),r=this.getRoomDelta(n,t.delta,t.unread);r&&m.a.dispatch({action:"view_room",room_id:r.roomId,show_room_tile:!0})}else e.action===y.a.PstnSupportUpdated&&this.updateLists()}),i()(this,"getRoomDelta",(e,t,n=!1)=>{const r=d.b.instance.orderedLists,o=[];A.forEach(t=>{let i=r[t];n&&(i=i.filter(t=>{const n=E.a.instance.getRoomState(t);return n.room.roomId===e||n.isUnread})),o.push(...i)});const i=o.findIndex(t=>t.roomId===e),[a]=o.slice((i+t)%o.length);return a}),i()(this,"updateSuggestedRooms",e=>{this.setState({suggestedRooms:e})}),i()(this,"updateLists",()=>{const e=d.b.instance.orderedLists;S.b.getValue("advancedRoomListLogging")&&console.log("new lists",e);const t=Object.keys(this.state.sublists),n=Object.keys(e).filter(e=>!Object(p.d)(e)||w.a.getTags()[e]),r=!!d.b.instance.getFirstNameFilterCondition();let o=this.state.isNameFiltering!==r||Object(C.d)(t,n);if(!o)for(const t of n){const n=this.state.sublists[t],r=e[t];if(n.length!==r.length){o=!0;break}}if(o){const t=Object(T.g)(e,n),o=Object(T.f)(t,(e,t)=>Object(C.b)(t));this.setState({sublists:o,isNameFiltering:r},()=>{this.props.onResize()})}}),i()(this,"onStartChat",()=>{var e;const t=null===(e=d.b.instance.getFirstNameFilterCondition())||void 0===e?void 0:e.search;m.a.dispatch({action:"view_create_chat",initialText:t})}),i()(this,"onExplore",()=>{var e;const t=null===(e=d.b.instance.getFirstNameFilterCondition())||void 0===e?void 0:e.search;m.a.dispatch({action:y.a.ViewRoomDirectory,initialText:t})}),i()(this,"onSpaceInviteClick",()=>{var e;const t=null===(e=d.b.instance.getFirstNameFilterCondition())||void 0===e?void 0:e.search;Object(R.g)(this.props.activeSpace,t)}),this.state={sublists:{},isNameFiltering:!!d.b.instance.getFirstNameFilterCondition(),suggestedRooms:O.g.instance.suggestedRooms}}componentDidMount(){this.dispatcherRef=m.a.register(this.onAction),this.roomStoreToken=h.a.addListener(this.onRoomViewStoreUpdate),O.g.instance.on(O.b,this.updateSuggestedRooms),d.b.instance.on(d.a,this.updateLists),this.customTagStoreRef=w.a.addListener(this.updateLists),this.updateLists()}componentWillUnmount(){O.g.instance.off(O.b,this.updateSuggestedRooms),d.b.instance.off(d.a,this.updateLists),m.a.unregister(this.dispatcherRef),this.customTagStoreRef&&this.customTagStoreRef.remove(),this.roomStoreToken&&this.roomStoreToken.remove()}renderSuggestedRooms(){return this.state.suggestedRooms.map(e=>{var t;const n=e.name||e.canonical_alias||(null===(t=e.aliases)||void 0===t?void 0:t[0])||Object(l.a)("Empty room"),r=s.a.createElement(I.a,{oobData:{name:n,avatarUrl:e.avatar_url},width:32,height:32,resizeMethod:"crop"});return s.a.createElement(b.a,{isMinimized:this.props.isMinimized,isSelected:this.state.currentRoomId===e.room_id,displayName:n,avatar:r,onClick:()=>{var t;m.a.dispatch({action:"view_room",room_alias:e.canonical_alias||(null===(t=e.aliases)||void 0===t?void 0:t[0]),room_id:e.room_id,via_servers:e.viaServers,oobData:{avatarUrl:e.avatar_url,name:n}})},key:"suggestedRoomTile_"+e.room_id})})}renderCommunityInvites(){return O.g.spacesEnabled?[]:f.a.get().getGroups().filter(e=>"invite"===e.myMembership).map(e=>{const t=s.a.createElement(_.a,{groupId:e.groupId,groupName:e.name,groupAvatarUrl:e.avatarUrl,width:32,height:32,resizeMethod:"crop"});return s.a.createElement(b.a,{isMinimized:this.props.isMinimized,isSelected:!1,displayName:e.name,avatar:t,notificationState:v.a.RED_EXCLAMATION,onClick:()=>{m.a.dispatch({action:"view_group",group_id:e.groupId})},key:"temporaryGroupTile_"+e.groupId})})}renderSublists(){const e=!this.state.isNameFiltering&&Object.values(d.b.instance.unfilteredLists).every(e=>!(null!=e&&e.length));return A.reduce((e,t)=>{if(t===N){const t=Object.keys(this.state.sublists).filter(e=>Object(p.d)(e));e.push(...t)}return e.push(t),e},[]).map(t=>{let n=null;t===p.a.Invite?n=this.renderCommunityInvites():t===p.a.Suggested&&(n=this.renderSuggestedRooms());const r=Object(p.d)(t)?((o=t).startsWith("u.")&&(o=o.substring(2)),{sectionLabel:Object(l.b)("Custom Tag"),sectionLabelRaw:o,isInvite:!1,defaultHidden:!1}):P[t];var o;if(!r)throw new Error(`Tag ${t} does not have aesthetics`);return s.a.createElement(g.b,{key:"sublist-"+t,tagId:t,forRooms:!0,startAsHidden:r.defaultHidden,label:r.sectionLabelRaw?r.sectionLabelRaw:Object(l.a)(r.sectionLabel),onAddRoom:r.onAddRoom,addRoomLabel:r.addRoomLabel?Object(l.a)(r.addRoomLabel):r.addRoomLabel,addRoomContextMenu:r.addRoomContextMenu,isMinimized:this.props.isMinimized,showSkeleton:e,extraTiles:n,resizeNotifier:this.props.resizeNotifier,alwaysVisible:M.includes(t),onListCollapse:this.props.onListCollapse})})}render(){const e=f.a.get().getUserId();let t;var n,r;if(!this.props.isMinimized)if(this.state.isNameFiltering)t=s.a.createElement("div",{className:"mx_RoomList_explorePrompt"},s.a.createElement("div",null,Object(l.a)("Can't see what you’re looking for?")),s.a.createElement(k.a,{className:"mx_RoomList_explorePrompt_startChat",kind:"link",onClick:this.onStartChat},Object(l.a)("Start a new chat")),s.a.createElement(k.a,{className:"mx_RoomList_explorePrompt_explore",kind:"link",onClick:this.onExplore},this.props.activeSpace?Object(l.a)("Explore rooms"):Object(l.a)("Explore all public rooms")));else if(null!==(n=this.props.activeSpace)&&void 0!==n&&n.canInvite(e)||"join"===(null===(r=this.props.activeSpace)||void 0===r?void 0:r.getMyMembership()))t=s.a.createElement("div",{className:"mx_RoomList_explorePrompt"},s.a.createElement("div",null,Object(l.a)("Quick actions")),this.props.activeSpace.canInvite(e)&&s.a.createElement(k.a,{className:"mx_RoomList_explorePrompt_spaceInvite",onClick:this.onSpaceInviteClick},Object(l.a)("Invite people")),"join"===this.props.activeSpace.getMyMembership()&&s.a.createElement(k.a,{className:"mx_RoomList_explorePrompt_spaceExplore",onClick:this.onExplore},Object(l.a)("Explore rooms")));else if(Object.values(this.state.sublists).some(e=>e.length>0)){const e=d.b.instance.unfilteredLists,n=e[p.a.Untagged]||[],r=e[p.a.Archived]||[],o=e[p.a.Favourite]||[];n.length<1&&r<1&&o<1&&(t=s.a.createElement("div",{className:"mx_RoomList_explorePrompt"},s.a.createElement("div",null,Object(l.a)("Use the + to make a new room or explore existing ones below")),s.a.createElement(k.a,{className:"mx_RoomList_explorePrompt_startChat",kind:"link",onClick:this.onStartChat},Object(l.a)("Start a new chat")),s.a.createElement(k.a,{className:"mx_RoomList_explorePrompt_explore",kind:"link",onClick:this.onExplore},Object(l.a)("Explore all public rooms"))))}const o=this.renderSublists();return s.a.createElement(u.c,{handleHomeEnd:!0,onKeyDown:this.props.onKeyDown},({onKeyDownHandler:e})=>s.a.createElement("div",{onFocus:this.props.onFocus,onBlur:this.props.onBlur,onKeyDown:e,className:"mx_RoomList",role:"tree","aria-label":Object(l.a)("Rooms")},o,t))}})||r},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return D})),n.d(t,"b",(function(){return I}));var r,o=n(79),i=n.n(o),a=n(78),s=n(2),c=n(86),l=n.n(c),u=n(159),d=n(80),h=n(85),p=n(643),m=n(103),g=n(156),f=n(239),_=n(141),b=n(83),v=n(175),y=n(106),E=n(104),S=n(283),w=n(1315),C=n(167),T=n(894),x=n(109),k=n(129),F=n(163),O=n(179),R=n(81);const D=32;Object(w.a)();let I=Object(R.a)("views.rooms.RoomSublist")(r=class t extends a.Component{constructor(t){super(t),i()(this,"headerButton",Object(a.createRef)()),i()(this,"sublistRef",Object(a.createRef)()),i()(this,"tilesRef",Object(a.createRef)()),i()(this,"dispatcherRef",void 0),i()(this,"layout",void 0),i()(this,"heightAtStart",void 0),i()(this,"isBeingFiltered",void 0),i()(this,"notificationState",void 0),i()(this,"onListsUpdated",()=>{const e={};if(this.props.extraTiles){const t=g.b.instance.getFirstNameFilterCondition();t?e.filteredExtraTiles=this.props.extraTiles.filter(e=>t.matches(Object(s.z)(e.props.displayName||""))):this.state.filteredExtraTiles&&(e.filteredExtraTiles=null)}const t=this.state.rooms,n=Object(x.b)(g.b.instance.orderedLists[this.props.tagId]||[]);Object(x.e)(t,n)&&(e.rooms=n);const r=!!g.b.instance.getFirstNameFilterCondition();r!==this.isBeingFiltered&&(this.isBeingFiltered=r,e.isExpanded=!!r||!this.layout.isCollapsed),Object.keys(e).length>0&&this.setState(e)}),i()(this,"onAction",t=>{"view_room"===t.action&&t.show_room_tile&&this.state.rooms&&e(()=>{const e=this.state.rooms.findIndex(e=>e.roomId===t.room_id);!this.state.isExpanded&&e>-1&&this.toggleCollapsed(),e>=this.numVisibleTiles&&(this.layout.visibleTiles=this.layout.tilesWithPadding(e+1,32),this.forceUpdate())})}),i()(this,"onAddRoom",e=>{e.stopPropagation(),this.props.onAddRoom&&this.props.onAddRoom()}),i()(this,"onResize",(e,t,n,r)=>{const o=this.heightAtStart+r.height;this.applyHeightChange(o),this.setState({height:o})}),i()(this,"onResizeStart",()=>{this.heightAtStart=this.state.height,this.setState({isResizing:!0})}),i()(this,"onResizeStop",(e,t,n,r)=>{const o=this.heightAtStart+r.height;this.applyHeightChange(o),this.setState({isResizing:!1,height:o})}),i()(this,"onShowAllClick",()=>{const e=this.numVisibleTiles,t=this.layout.tilesToPixelsWithPadding(this.numTiles,this.padding);this.applyHeightChange(t),this.setState({height:t},()=>{this.focusRoomTile(e)})}),i()(this,"onShowLessClick",()=>{const e=this.layout.tilesToPixelsWithPadding(this.layout.defaultVisibleTiles,this.padding);this.applyHeightChange(e),this.setState({height:e})}),i()(this,"focusRoomTile",e=>{if(!this.sublistRef.current)return;const t=this.sublistRef.current.querySelectorAll(".mx_RoomTile"),n=t&&t[e];n&&n.focus()}),i()(this,"onOpenMenuClick",e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this.setState({contextMenuPosition:t.getBoundingClientRect()})}),i()(this,"onContextMenu",e=>{e.preventDefault(),e.stopPropagation(),this.setState({contextMenuPosition:{left:e.clientX,top:e.clientY,height:0}})}),i()(this,"onAddRoomContextMenu",e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this.setState({addRoomContextMenuPosition:t.getBoundingClientRect()})}),i()(this,"onCloseMenu",()=>{this.setState({contextMenuPosition:null})}),i()(this,"onCloseAddRoomMenu",()=>{this.setState({addRoomContextMenuPosition:null})}),i()(this,"onUnreadFirstChanged",()=>{const e=g.b.instance.getListOrder(this.props.tagId)===f.a.Importance?f.a.Natural:f.a.Importance;g.b.instance.setListOrder(this.props.tagId,e),this.forceUpdate()}),i()(this,"onTagSortChanged",async e=>{await g.b.instance.setTagSorting(this.props.tagId,e)}),i()(this,"onMessagePreviewChanged",()=>{this.layout.showPreviews=!this.layout.showPreviews,this.forceUpdate()}),i()(this,"onBadgeClick",e=>{let t;e.preventDefault(),e.stopPropagation(),t=this.props.tagId===_.a.Invite?this.state.rooms&&this.state.rooms[0]:g.b.instance.unfilteredLists[this.props.tagId].find(e=>{const t=this.notificationState.getForRoom(e);return t.count>0&&t.color===this.notificationState.color}),t&&b.a.dispatch({action:"view_room",room_id:t.roomId,show_room_tile:!0})}),i()(this,"onHeaderClick",()=>{const t=this.headerButton.current.parentElement,n=t.parentElement.parentElement,r=n.parentElement.parentElement,o=Math.round(r.scrollTop),i=o<=Math.round(D),a=o>=Math.round(r.scrollHeight-r.offsetHeight),s=t.classList.contains("mx_RoomSublist_headerContainer_stickyTop"),c=t.classList.contains("mx_RoomSublist_headerContainer_stickyBottom");if(c&&!a||s&&!i)n.scrollIntoView({behavior:"smooth"});else{const t=this.state.isExpanded;this.toggleCollapsed(),!t&&c&&e(()=>{n.scrollIntoView({behavior:"smooth"})})}}),i()(this,"toggleCollapsed",()=>{this.layout.isCollapsed=this.state.isExpanded,this.setState({isExpanded:!this.layout.isCollapsed}),this.props.onListCollapse&&this.props.onListCollapse(!this.layout.isCollapsed)}),i()(this,"onHeaderKeyDown",e=>{switch(Object(O.f)().getRoomListAction(e)){case O.e.CollapseSection:e.stopPropagation(),this.state.isExpanded&&this.toggleCollapsed();break;case O.e.ExpandSection:if(e.stopPropagation(),this.state.isExpanded){if(this.sublistRef.current){const e=this.sublistRef.current.querySelector(".mx_RoomTile");e&&e.focus()}}else this.toggleCollapsed()}}),i()(this,"onKeyDown",e=>{switch(e.key){case E.a.ARROW_LEFT:e.stopPropagation(),this.headerButton.current.focus();break;case E.a.ARROW_RIGHT:e.stopPropagation()}}),this.layout=T.a.instance.getLayoutFor(this.props.tagId),this.heightAtStart=0,this.isBeingFiltered=!!g.b.instance.getFirstNameFilterCondition(),this.notificationState=C.a.instance.getListState(this.props.tagId),this.state={contextMenuPosition:null,addRoomContextMenuPosition:null,isResizing:!1,isExpanded:this.isBeingFiltered?this.isBeingFiltered:!this.layout.isCollapsed,height:0,rooms:Object(x.b)(g.b.instance.orderedLists[this.props.tagId]||[])},this.state=Object.assign(this.state,{height:this.calculateInitialHeight()})}calculateInitialHeight(){const e=Math.max(Math.floor(this.layout.visibleTiles),this.layout.minVisibleTiles),t=Math.min(this.numTiles,e);return this.layout.tilesToPixelsWithPadding(t,this.padding)}get padding(){let e=4;const t=this.numTiles>this.numVisibleTiles,n=this.numTiles>this.layout.defaultVisibleTiles;return(t||n)&&(e+=28),e}get extraTiles(){return this.state.filteredExtraTiles?this.state.filteredExtraTiles:this.props.extraTiles?this.props.extraTiles:null}get numTiles(){return t.calcNumTiles(this.state.rooms,this.extraTiles)}static calcNumTiles(e,t){return(e||[]).length+(t||[]).length}get numVisibleTiles(){const e=Math.ceil(this.layout.visibleTiles);return Math.min(e,this.numTiles)}componentDidUpdate(e,n){const r=n.filteredExtraTiles||e.extraTiles;t.calcNumTiles(n.rooms,r)!==this.numTiles&&this.setState({height:this.calculateInitialHeight()})}shouldComponentUpdate(e,n){if(Object(k.d)(this.props,e))return!0;const r=Object(k.c)(this.state,["rooms"]),o=Object(k.c)(n,["rooms"]);if(Object(k.d)(r,o))return!0;const i=this.props.extraTiles||[],a=n.filteredExtraTiles||e.extraTiles||[];if(i.length>0||a.length>0)return!0;if(t.calcNumTiles(n.rooms,a)!==this.numTiles)return!0;if(!n.isExpanded)return!1;if(this.state.rooms.length!==n.rooms.length)return!0;const s=this.state.rooms.slice(0,this.numVisibleTiles),c=n.rooms.slice(0,this.numVisibleTiles);return!!Object(x.e)(s,c)}componentDidMount(){var e;this.dispatcherRef=b.a.register(this.onAction),g.b.instance.on(g.a,this.onListsUpdated),null===(e=this.tilesRef.current)||void 0===e||e.addEventListener("scroll",this.onScrollPrevent,{passive:!0})}componentWillUnmount(){var e;b.a.unregister(this.dispatcherRef),g.b.instance.off(g.a,this.onListsUpdated),null===(e=this.tilesRef.current)||void 0===e||e.removeEventListener("scroll",this.onScrollPrevent)}applyHeightChange(e){const t=Math.ceil(this.layout.pixelsToTiles(e-this.padding));this.layout.visibleTiles=Math.min(this.numTiles,t)}renderVisibleTiles(){if(!this.state.isExpanded)return[];const e=[];if(this.state.rooms){const t=this.state.rooms.slice(0,this.numVisibleTiles);for(const n of t)e.push(a.createElement(p.a,{room:n,key:"room-"+n.roomId,showMessagePreview:this.layout.showPreviews,isMinimized:this.props.isMinimized,tag:this.props.tagId}))}return this.extraTiles&&e.push(...this.extraTiles),e.length>this.numVisibleTiles?e.slice(0,this.numVisibleTiles):e}renderMenu(){let e=null;if(this.state.contextMenuPosition){const t=g.b.instance.getTagSorting(this.props.tagId)===f.b.Alphabetic,n=g.b.instance.getListOrder(this.props.tagId)===f.a.Importance;let r=null;this.props.tagId!==_.a.Invite&&(r=a.createElement(a.Fragment,null,a.createElement("hr",null),a.createElement("div",null,a.createElement("div",{className:"mx_RoomSublist_contextMenu_title"},Object(d.a)("Appearance")),a.createElement(m.i,{onClose:this.onCloseMenu,onChange:this.onUnreadFirstChanged,checked:n},Object(d.a)("Show rooms with unread messages first")),a.createElement(m.i,{onClose:this.onCloseMenu,onChange:this.onMessagePreviewChanged,checked:this.layout.showPreviews},Object(d.a)("Show previews of messages"))))),e=a.createElement(m.b,{chevronFace:m.a.None,left:this.state.contextMenuPosition.left,top:this.state.contextMenuPosition.top+this.state.contextMenuPosition.height,onFinished:this.onCloseMenu},a.createElement("div",{className:"mx_RoomSublist_contextMenu"},a.createElement("div",null,a.createElement("div",{className:"mx_RoomSublist_contextMenu_title"},Object(d.a)("Sort by")),a.createElement(m.j,{onClose:this.onCloseMenu,onChange:()=>this.onTagSortChanged(f.b.Recent),checked:!t,name:`mx_${this.props.tagId}_sortBy`},Object(d.a)("Activity")),a.createElement(m.j,{onClose:this.onCloseMenu,onChange:()=>this.onTagSortChanged(f.b.Alphabetic),checked:t,name:`mx_${this.props.tagId}_sortBy`},Object(d.a)("A-Z"))),r))}else this.state.addRoomContextMenuPosition&&(e=a.createElement(F.e,{chevronFace:m.a.None,left:this.state.addRoomContextMenuPosition.left-7,top:this.state.addRoomContextMenuPosition.top+this.state.addRoomContextMenuPosition.height,onFinished:this.onCloseAddRoomMenu,compact:!0},this.props.addRoomContextMenu(this.onCloseAddRoomMenu)));return a.createElement(a.Fragment,null,a.createElement(m.d,{className:"mx_RoomSublist_menuButton",onClick:this.onOpenMenuClick,title:Object(d.a)("List options"),isExpanded:!!this.state.contextMenuPosition}),e)}renderHeader(){return a.createElement(u.d,{inputRef:this.headerButton},({onFocus:e,isActive:t,ref:n})=>{const r=t?0:-1;let o=Object(d.a)("Jump to first unread room.");this.props.tagId===_.a.Invite&&(o=Object(d.a)("Jump to first invite."));const i=a.createElement(v.a,{forceCount:!0,notification:this.notificationState,onClick:this.onBadgeClick,tabIndex:r,"aria-label":o});let s=null;this.props.onAddRoom?s=a.createElement(y.a,{tabIndex:r,onClick:this.onAddRoom,className:"mx_RoomSublist_auxButton",tooltipClassName:"mx_RoomSublist_addRoomTooltip","aria-label":this.props.addRoomLabel||Object(d.a)("Add room"),title:this.props.addRoomLabel}):this.props.addRoomContextMenu&&(s=a.createElement(m.d,{tabIndex:r,onClick:this.onAddRoomContextMenu,className:"mx_RoomSublist_auxButton",tooltipClassName:"mx_RoomSublist_addRoomTooltip","aria-label":this.props.addRoomLabel||Object(d.a)("Add room"),title:this.props.addRoomLabel,isExpanded:!!this.state.addRoomContextMenuPosition}));const c=l()({mx_RoomSublist_collapseBtn:!0,mx_RoomSublist_collapseBtn_collapsed:!this.state.isExpanded}),u=l()({mx_RoomSublist_headerContainer:!0,mx_RoomSublist_headerContainer_withAux:!!s}),p=a.createElement("div",{className:"mx_RoomSublist_badgeContainer"},i);let g=h.a;return this.props.isMinimized&&(g=y.a),a.createElement("div",{className:u,onKeyDown:this.onHeaderKeyDown,onFocus:e,"aria-label":this.props.label},a.createElement("div",{className:"mx_RoomSublist_stickable"},a.createElement(g,{onFocus:e,inputRef:n,tabIndex:r,className:"mx_RoomSublist_headerText",role:"treeitem","aria-expanded":this.state.isExpanded,"aria-level":1,onClick:this.onHeaderClick,onContextMenu:this.onContextMenu,title:this.props.isMinimized?this.props.label:void 0},a.createElement("span",{className:c}),a.createElement("span",null,this.props.label)),this.renderMenu(),this.props.isMinimized?null:p,this.props.isMinimized?null:s),this.props.isMinimized?p:null,this.props.isMinimized?s:null)})}onScrollPrevent(e){e.target.scrollTop=0}render(){var e;const t=this.renderVisibleTiles(),n=l()({mx_RoomSublist:!0,mx_RoomSublist_hasMenuOpen:!!this.state.contextMenuPosition,mx_RoomSublist_minimized:this.props.isMinimized,mx_RoomSublist_hidden:!(this.state.rooms.length||null!==(e=this.props.extraTiles)&&void 0!==e&&e.length||!0===this.props.alwaysVisible)});let r=null;if(t.length>0){const e=this.layout,n=Math.min(e.minVisibleTiles,this.numTiles),o=4+(n<this.numTiles?28:0),i=e.tilesToPixelsWithPadding(n,o),s=e.tilesToPixelsWithPadding(this.numTiles,this.padding),c=l()({mx_RoomSublist_showNButton:!0});let h=null;if(s>this.state.height){const e=this.state.height-4-28,t=Math.floor(e/this.layout.tileHeight),n=this.numTiles-t,r=Object(d.a)("Show %(count)s more",{count:n});let o=a.createElement("span",{className:"mx_RoomSublist_showNButtonText"},r);this.props.isMinimized&&(o=null),h=a.createElement(u.a,{role:"treeitem",onClick:this.onShowAllClick,className:c,"aria-label":r},a.createElement("span",{className:"mx_RoomSublist_showMoreButtonChevron mx_RoomSublist_showNButtonChevron"}),o)}else if(this.numTiles>this.layout.defaultVisibleTiles){const e=Object(d.a)("Show less");let t=a.createElement("span",{className:"mx_RoomSublist_showNButtonText"},e);this.props.isMinimized&&(t=null),h=a.createElement(u.a,{role:"treeitem",onClick:this.onShowLessClick,className:c,"aria-label":e},a.createElement("span",{className:"mx_RoomSublist_showLessButtonChevron mx_RoomSublist_showNButtonChevron"}),t)}const p={bottom:!0,bottomLeft:!1,bottomRight:!1,left:!1,right:!1,top:!1,topLeft:!1,topRight:!1};e.visibleTiles>=this.numTiles&&this.numTiles<=e.minVisibleTiles&&(p.bottom=!1);const m=l()({mx_RoomSublist_resizerHandles:!0,mx_RoomSublist_resizerHandles_showNButton:!!h});r=a.createElement(a.Fragment,null,a.createElement(S.Resizable,{size:{height:this.state.height},minHeight:i,maxHeight:s,onResizeStart:this.onResizeStart,onResizeStop:this.onResizeStop,onResize:this.onResize,handleWrapperClass:m,handleClasses:{bottom:"mx_RoomSublist_resizerHandle"},className:"mx_RoomSublist_resizeBox",enable:p},a.createElement("div",{className:"mx_RoomSublist_tiles",ref:this.tilesRef},t),h))}else this.props.showSkeleton&&this.state.isExpanded&&(r=a.createElement("div",{className:"mx_RoomSublist_skeletonUI"}));return a.createElement("div",{ref:this.sublistRef,className:n,role:"group","aria-label":this.props.label,onKeyDown:this.onKeyDown},this.renderHeader(),r)}})||r}).call(this,n(161).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(381);function o(e,t,n){return new r.a(r=>{r({action:e+".pending",request:"function"==typeof n?n():void 0}),t().then(t=>{r({action:e+".success",result:t})}).catch(t=>{r({action:e+".failure",err:t})})})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(648);let a;!function(e){e[e.Pending=0]="Pending",e[e.Success=1]="Success",e[e.Error=2]="Error"}(a||(a={}));class s extends i.a{constructor(e,t){super(),this.auditName=e,this.runFn=t,o()(this,"_status",a.Pending),o()(this,"didFail",!1),o()(this,"startTime",new Date)}get didPreviouslyFail(){return this.didFail}get status(){return this._status}run(){if(this.status===a.Success)throw new Error("Cannot re-run a successful echo transaction");this.setStatus(a.Pending),this.runFn().then(()=>this.setStatus(a.Success)).catch(()=>this.setStatus(a.Error))}cancel(){this.setStatus(a.Success)}setStatus(e){this._status=e,e===a.Error?this.didFail=!0:e===a.Success&&(this.didFail=!1),this.notifyCondition(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return C})),n.d(t,"a",(function(){return T}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(82),m=n(422),g=n(83),f=n(282),_=n(91),b=n(81),v=n(108),y=n(175),E=n(218),S=n(85),w=n(147);function C(e){return e?e.getPendingEvents().filter((function(e){return e.status===v.a.NOT_SENT})):[]}let T=Object(b.a)("structures.RoomStatusBar")((i=o=class extends l.a.PureComponent{constructor(...e){super(...e),s()(this,"state",{syncState:p.a.get().getSyncState(),syncStateData:p.a.get().getSyncStateData(),unsentMessages:C(this.props.room),isResending:!1}),s()(this,"onSyncStateChange",(e,t,n)=>{"SYNCING"===e&&"SYNCING"===t||this.setState({syncState:e,syncStateData:n})}),s()(this,"_onResendAllClick",()=>{m.a.resendUnsentEvents(this.props.room).then(()=>{this.setState({isResending:!1})}),this.setState({isResending:!0}),g.a.fire(_.a.FocusSendMessageComposer)}),s()(this,"_onCancelAllClick",()=>{m.a.cancelUnsentEvents(this.props.room),g.a.fire(_.a.FocusSendMessageComposer)}),s()(this,"_onRoomLocalEchoUpdated",(e,t,n,r)=>{if(t.roomId!==this.props.room.roomId)return;const o=C(this.props.room);this.setState({unsentMessages:o,isResending:o.length>0&&this.state.isResending})})}componentDidMount(){p.a.get().on("sync",this.onSyncStateChange),p.a.get().on("Room.localEchoUpdated",this._onRoomLocalEchoUpdated),this._checkSize()}componentDidUpdate(){this._checkSize()}componentWillUnmount(){const e=p.a.get();e&&(e.removeListener("sync",this.onSyncStateChange),e.removeListener("Room.localEchoUpdated",this._onRoomLocalEchoUpdated))}_checkSize(){this._getSize()?this.props.onVisible&&this.props.onVisible():this.props.onHidden&&this.props.onHidden()}_getSize(){return this._shouldShowConnectionError()?1:this.state.unsentMessages.length>0||this.state.isResending?2:0}_shouldShowConnectionError(){const e=Boolean(this.state.syncStateData&&this.state.syncStateData.error&&"M_RESOURCE_LIMIT_EXCEEDED"===this.state.syncStateData.error.errcode);return"ERROR"===this.state.syncState&&!e}_getUnsentMessageContent(){const e=this.state.unsentMessages;let t,n=null,r=null;for(const t of e){if(t.error&&"M_CONSENT_NOT_GIVEN"===t.error.errcode){n=t.error;break}if(t.error&&"M_RESOURCE_LIMIT_EXCEEDED"===t.error.errcode){r=t.error;break}}t=n?Object(h.a)("You can't send any messages until you review and agree to <consentLink>our terms and conditions</consentLink>.",{},{consentLink:e=>l.a.createElement("a",{href:n.data&&n.data.consent_uri,target:"_blank"},e)}):r?Object(f.a)(r.data.limit_type,r.data.admin_contact,{monthly_active_user:Object(h.b)("Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please <a>contact your service administrator</a> to continue using the service."),hs_disabled:Object(h.b)("Your message wasn't sent because this homeserver has been blocked by it's administrator. Please <a>contact your service administrator</a> to continue using the service."),"":Object(h.b)("Your message wasn't sent because this homeserver has exceeded a resource limit. Please <a>contact your service administrator</a> to continue using the service.")}):Object(h.a)("Some of your messages have not been sent");let o=l.a.createElement(l.a.Fragment,null,l.a.createElement(S.a,{onClick:this._onCancelAllClick,className:"mx_RoomStatusBar_unsentCancelAllBtn"},Object(h.a)("Delete all")),l.a.createElement(S.a,{onClick:this._onResendAllClick,className:"mx_RoomStatusBar_unsentResendAllBtn"},Object(h.a)("Retry all")));return this.state.isResending&&(o=l.a.createElement(l.a.Fragment,null,l.a.createElement(w.a,{w:20,h:20}),l.a.createElement("span",null,Object(h.a)("Sending")))),l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"mx_RoomStatusBar mx_RoomStatusBar_unsentMessages"},l.a.createElement("div",{role:"alert"},l.a.createElement("div",{className:"mx_RoomStatusBar_unsentBadge"},l.a.createElement(y.a,{notification:E.a.RED_EXCLAMATION})),l.a.createElement("div",null,l.a.createElement("div",{className:"mx_RoomStatusBar_unsentTitle"},t),l.a.createElement("div",{className:"mx_RoomStatusBar_unsentDescription"},Object(h.a)("You can select all or individual messages to retry or delete"))),l.a.createElement("div",{className:"mx_RoomStatusBar_unsentButtonBar"},o))))}render(){return this._shouldShowConnectionError()?l.a.createElement("div",{className:"mx_RoomStatusBar"},l.a.createElement("div",{role:"alert"},l.a.createElement("div",{className:"mx_RoomStatusBar_connectionLostBar"},l.a.createElement("img",{src:n(654),width:"24",height:"24",title:"/!\\ ",alt:"/!\\ "}),l.a.createElement("div",null,l.a.createElement("div",{className:"mx_RoomStatusBar_connectionLostBar_title"},Object(h.a)("Connectivity to the server has been lost.")),l.a.createElement("div",{className:"mx_RoomStatusBar_connectionLostBar_desc"},Object(h.a)("Sent messages will be stored until your connection has returned.")))))):this.state.unsentMessages.length>0||this.state.isResending?this._getUnsentMessageContent():null}},s()(o,"propTypes",{room:d.a.object.isRequired,isPeeking:d.a.bool,onResendAllClick:d.a.func,onCancelAllClick:d.a.func,onInviteClick:d.a.func,onResize:d.a.func,onHidden:d.a.func,onVisible:d.a.func}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(78);const o=(e,t)=>{const n=Object(r.useRef)(e=>{});Object(r.useEffect)(()=>{n.current=t},[t]),Object(r.useEffect)(()=>{const t=e.register(e=>n.current(e));return()=>{e.unregister(t)}},[e])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(78),o=n.n(r),i=n(80),a=n(85),s=n(101);const c=({avatarUrl:e,avatarDisabled:t=!1,setAvatar:n})=>{const s=Object(r.useRef)(),[c,l]=Object(r.useState)(e);let u;return u=t?c?o.a.createElement("img",{className:"mx_SpaceBasicSettings_avatar",src:c,alt:""}):o.a.createElement("div",{className:"mx_SpaceBasicSettings_avatar"}):c?o.a.createElement(o.a.Fragment,null,o.a.createElement(a.a,{className:"mx_SpaceBasicSettings_avatar",onClick:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.click()},element:"img",src:c,alt:""}),o.a.createElement(a.a,{onClick:()=>{s.current.value="",l(void 0),n(void 0)},kind:"link",className:"mx_SpaceBasicSettings_avatar_remove"},Object(i.a)("Delete"))):o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"mx_SpaceBasicSettings_avatar",onClick:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.click()}}),o.a.createElement(a.a,{onClick:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.click()},kind:"link"},Object(i.a)("Upload"))),o.a.createElement("div",{className:"mx_SpaceBasicSettings_avatarContainer"},u,o.a.createElement("input",{type:"file",ref:s,onChange:e=>{var t;if(null===(t=e.target.files)||void 0===t||!t.length)return;const r=e.target.files[0];n(r);const o=new FileReader;o.onload=e=>{l(e.target.result)},o.readAsDataURL(r)},accept:"image/*"}))};t.b=({avatarUrl:e,avatarDisabled:t=!1,setAvatar:n,name:r="",nameDisabled:a=!1,setName:l,topic:u="",topicDisabled:d=!1,setTopic:h})=>o.a.createElement("div",{className:"mx_SpaceBasicSettings"},o.a.createElement(c,{avatarUrl:e,avatarDisabled:t,setAvatar:n}),o.a.createElement(s.a,{name:"spaceName",label:Object(i.a)("Name"),autoFocus:!0,value:r,onChange:e=>l(e.target.value),disabled:a}),o.a.createElement(s.a,{name:"spaceTopic",element:"textarea",label:Object(i.a)("Description"),value:u,onChange:e=>h(e.target.value),rows:3,disabled:d}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(93),l=n(80),u=n(82),d=n(85),h=n(663),p=n(327),m=n(87),g=n(83),f=n(81);function _(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}let b=Object(f.a)("views.settings.tabs.room.AdvancedRoomSettingsTab")(r=class extends s.a.Component{constructor(e,t){super(e,t),i()(this,"upgradeRoom",e=>{const t=u.a.get().getRoom(this.props.roomId);m.a.createTrackedDialog("Upgrade Room Version","",h.a,{room:t})}),i()(this,"openDevtools",e=>{m.a.createDialog(p.b,{roomId:this.props.roomId})}),i()(this,"onOldRoomClicked",e=>{e.preventDefault(),e.stopPropagation(),g.a.dispatch({action:"view_room",room_id:this.state.oldRoomId,event_id:this.state.oldEventId}),this.props.closeSettingsFn()}),this.state={upgradeRecommendation:null};const n=u.a.get().getRoom(this.props.roomId);n.getRecommendedVersion().then(e=>{const t=n.currentState.getStateEvents(c.a.RoomTombstone,""),r={},o=n.currentState.getStateEvents(c.a.RoomCreate,""),a=o?o.getContent().predecessor:null;a&&a.room_id&&(r.oldRoomId=a.room_id,r.oldEventId=a.event_id),this.setState(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({upgraded:!(null==t||!t.getContent().replacement_room),upgradeRecommendation:e},r))})}render(){const e=u.a.get().getRoom(this.props.roomId);let t;const n=e.currentState.getStateEvents(c.a.RoomCreate,"");let r,o;if(n&&!1===n.getContent()["m.federate"]&&(t=s.a.createElement("div",null,Object(l.a)("This room is not accessible by remote Matrix servers"))),this.state.upgradeRecommendation&&this.state.upgradeRecommendation.needsUpgrade&&!this.state.upgraded&&(r=s.a.createElement("div",null,s.a.createElement("p",{className:"mx_SettingsTab_warningText"},Object(l.a)("<b>Warning</b>: Upgrading a room will <i>not automatically migrate room members to the new version of the room.</i> We'll post a link to the new room in the old version of the room - room members will have to click this link to join the new room.",{},{b:e=>s.a.createElement("b",null,e),i:e=>s.a.createElement("i",null,e)})),s.a.createElement(d.a,{onClick:this.upgradeRoom,kind:"primary"},Object(l.a)("Upgrade this room to the recommended room version")))),this.state.oldRoomId){let e=Object(l.a)("this room");const t=u.a.get().getRoom(this.props.roomId);t&&t.name&&(e=t.name),o=s.a.createElement(d.a,{element:"a",onClick:this.onOldRoomClicked},Object(l.a)("View older messages in %(roomName)s.",{roomName:e}))}return s.a.createElement("div",{className:"mx_SettingsTab"},s.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(l.a)("Advanced")),s.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},null!=e&&e.isSpaceRoom()?Object(l.a)("Space information"):Object(l.a)("Room information")),s.a.createElement("div",null,s.a.createElement("span",null,Object(l.a)("Internal room ID:"))," ",this.props.roomId),t),s.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(l.a)("Room version")),s.a.createElement("div",null,s.a.createElement("span",null,Object(l.a)("Room version:"))," ",e.getVersion()),o,r),s.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(l.a)("Developer options")),s.a.createElement(d.a,{onClick:this.openDevtools,kind:"primary"},Object(l.a)("Open Devtools"))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(79),o=n.n(r),i=n(93),a=n(151),s=n(87),c=n(80),l=n(105),u=n(102);function d(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}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}async function p(e,t,n=!1,r=!0,o=!0){const d=e.client;let p;try{({replacement_room:p}=await d.upgradeRoom(e.roomId,t))}catch(e){if(!r)throw e;throw console.error(e),s.a.createTrackedDialog("Room Upgrade Error","",l.a,{title:Object(c.a)("Error upgrading room"),description:Object(c.a)("Double check that your server supports the room version chosen and try again.")}),e}if(n){const t=async n=>{if(n.roomId!==p)return;const r=[...e.getMembersWithMembership("join"),...e.getMembersWithMembership("invite")].map(e=>e.userId).filter(e=>e!==d.getUserId());r.length>0&&await Object(a.b)(p,r),d.removeListener("Room",t)};d.on("Room",t)}if(o){const t=u.g.instance.getKnownParents(e.roomId);try{for(const n of t){const t=d.getRoom(n);if(null==t||!t.currentState.maySendStateEvent(i.a.SpaceChild,d.getUserId()))continue;const r=t.currentState.getStateEvents(i.a.SpaceChild,e.roomId);await d.sendStateEvent(n,i.a.SpaceChild,h(h({},(null==r?void 0:r.getContent())||{}),{},{via:[d.getDomain()]}),p),await d.sendStateEvent(n,i.a.SpaceChild,{},e.roomId)}}catch(e){console.warn("Failed to update parent spaces during room upgrade",e)}}return p}},function(e,t,n){"use strict";var r=n(78),o=n.n(r);t.a=({value:e,max:t})=>o.a.createElement("progress",{className:"mx_ProgressBar",max:t,value:e})},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(136),d=n(90),h=n(157),p=n(80),m=n(82),g=n(104),f=n(125),_=n(176),b=n(81),v=n(101),y=n(335),E=n(165),S=n(116),w=n(95),C=n(102),T=n(448);let x=Object(b.a)("views.dialogs.CreateRoomDialog")((i=o=class e extends l.a.Component{constructor(t){var n;super(t),s()(this,"supportsRestricted",void 0),s()(this,"nameField",Object(c.createRef)()),s()(this,"aliasField",Object(c.createRef)()),s()(this,"onKeyDown",e=>{e.key===g.a.ENTER&&(this.onOk(),e.preventDefault(),e.stopPropagation())}),s()(this,"onOk",async()=>{const e=document.activeElement;if(e&&e.blur(),await this.nameField.current.validate({allowEmpty:!1}),this.aliasField.current&&await this.aliasField.current.validate({allowEmpty:!1}),await new Promise(e=>this.setState({},e)),!this.state.nameIsValid||this.aliasField.current&&!this.aliasField.current.isValid){let e;this.state.nameIsValid?this.aliasField.current&&!this.aliasField.current.isValid&&(e=this.aliasField.current):e=this.nameField.current,e&&(e.focus(),e.validate({allowEmpty:!1,focused:!0}))}else this.props.onFinished(!0,this.roomCreateOptions())}),s()(this,"onCancel",()=>{this.props.onFinished(!1)}),s()(this,"onNameChange",e=>{this.setState({name:e.target.value})}),s()(this,"onTopicChange",e=>{this.setState({topic:e.target.value})}),s()(this,"onJoinRuleChange",e=>{this.setState({joinRule:e})}),s()(this,"onEncryptedChange",e=>{this.setState({isEncrypted:e})}),s()(this,"onAliasChange",e=>{this.setState({alias:e})}),s()(this,"onDetailsToggled",e=>{this.setState({detailsOpen:e.target.open})}),s()(this,"onNoFederateChange",e=>{this.setState({noFederate:e})}),s()(this,"onNameValidate",async t=>{const n=await e.validateRoomName(t);return this.setState({nameIsValid:n.valid}),n}),this.supportsRestricted=this.props.parentSpace&&!(null===(n=C.g.instance.restrictedJoinRuleSupport)||void 0===n||!n.preferred);let r=u.c.Invite;this.props.defaultPublic?r=u.c.Public:this.supportsRestricted&&(r=u.c.Restricted);const o=d.a.get();this.state={joinRule:r,isEncrypted:Object(f.f)(),name:this.props.defaultName||"",topic:"",alias:"",detailsOpen:!1,noFederate:!1===o.default_federate,nameIsValid:!1,canChangeEncryption:!0},m.a.get().doesServerForceEncryptionForPreset(u.d.PrivateChat).then(e=>this.setState({canChangeEncryption:!e}))}roomCreateOptions(){const e={},t=e.createOpts={};if(t.name=this.state.name,this.state.joinRule===u.c.Public){t.visibility=u.f.Public,t.preset=u.d.PublicChat,e.guestAccess=!1;const{alias:n}=this.state;t.room_alias_name=n.substr(1,n.indexOf(":")-1)}else e.encryption=!this.state.canChangeEncryption||this.state.isEncrypted;return this.state.topic&&(t.topic=this.state.topic),this.state.noFederate&&(t.creation_content={"m.federate":!1}),_.a.instance.getSelectedCommunityId()&&(e.associatedWithCommunity=_.a.instance.getSelectedCommunityId()),e.parentSpace=this.props.parentSpace,this.props.parentSpace&&this.state.joinRule===u.c.Restricted&&(e.joinRule=u.c.Restricted),e}componentDidMount(){this.nameField.current.focus()}componentWillUnmount(){}render(){let e,t,n;if(this.state.joinRule===u.c.Public){const t=m.a.get().getDomain();e=l.a.createElement("div",{className:"mx_CreateRoomDialog_aliasContainer"},l.a.createElement(y.a,{ref:this.aliasField,onChange:this.onAliasChange,domain:t,value:this.state.alias}))}if(_.a.instance.getSelectedCommunityId()?t=l.a.createElement("p",null,Object(p.a)("Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone in this community.")):this.state.joinRule===u.c.Restricted?t=l.a.createElement("p",null,Object(p.a)("Everyone in <SpaceName/> will be able to find and join this room.",{},{SpaceName:()=>l.a.createElement("b",null,this.props.parentSpace.name)})," ",Object(p.a)("You can change this at any time from room settings.")):this.state.joinRule===u.c.Public&&this.props.parentSpace?t=l.a.createElement("p",null,Object(p.a)("Anyone will be able to find and join this room, not just members of <SpaceName/>.",{},{SpaceName:()=>l.a.createElement("b",null,this.props.parentSpace.name)})," ",Object(p.a)("You can change this at any time from room settings.")):this.state.joinRule===u.c.Public?t=l.a.createElement("p",null,Object(p.a)("Anyone will be able to find and join this room.")," ",Object(p.a)("You can change this at any time from room settings.")):this.state.joinRule===u.c.Invite&&(t=l.a.createElement("p",null,Object(p.a)("Only people invited will be able to find and join this room.")," ",Object(p.a)("You can change this at any time from room settings."))),this.state.joinRule!==u.c.Public){let e;e=Object(f.f)()?this.state.canChangeEncryption?Object(p.a)("You can’t disable this later. Bridges & most bots won’t work yet."):Object(p.a)("Your server requires encryption to be enabled in private rooms."):Object(p.a)("Your server admin has disabled end-to-end encryption by default in private rooms & Direct Messages."),n=l.a.createElement(l.a.Fragment,null,l.a.createElement(E.a,{label:Object(p.a)("Enable end-to-end encryption"),onChange:this.onEncryptedChange,value:this.state.isEncrypted,className:"mx_CreateRoomDialog_e2eSwitch",disabled:!this.state.canChangeEncryption}),l.a.createElement("p",null,e))}let r=Object(p.a)("You might enable this if the room will only be used for collaborating with internal teams on your homeserver. This cannot be changed later.");!1===d.a.get().default_federate&&(r=Object(p.a)("You might disable this if the room will be used for collaborating with external teams who have their own homeserver. This cannot be changed later."));let o=Object(p.a)("Create a room");if(_.a.instance.getSelectedCommunityId()){const e=_.a.instance.getSelectedCommunityName();o=Object(p.a)("Create a room in %(communityName)s",{communityName:e})}else this.props.parentSpace||(o=this.state.joinRule===u.c.Public?Object(p.a)("Create a public room"):Object(p.a)("Create a private room"));return l.a.createElement(w.a,{className:"mx_CreateRoomDialog",onFinished:this.props.onFinished,title:o},l.a.createElement("form",{onSubmit:this.onOk,onKeyDown:this.onKeyDown},l.a.createElement("div",{className:"mx_Dialog_content"},l.a.createElement(v.a,{ref:this.nameField,label:Object(p.a)("Name"),onChange:this.onNameChange,onValidate:this.onNameValidate,value:this.state.name,className:"mx_CreateRoomDialog_name"}),l.a.createElement(v.a,{label:Object(p.a)("Topic (optional)"),onChange:this.onTopicChange,value:this.state.topic,className:"mx_CreateRoomDialog_topic"}),l.a.createElement(T.a,{label:Object(p.a)("Room visibility"),labelInvite:Object(p.a)("Private room (invite only)"),labelPublic:Object(p.a)("Public room"),labelRestricted:this.supportsRestricted?Object(p.a)("Visible to space members"):void 0,value:this.state.joinRule,onChange:this.onJoinRuleChange}),t,n,e,l.a.createElement("details",{onToggle:this.onDetailsToggled,className:"mx_CreateRoomDialog_details"},l.a.createElement("summary",{className:"mx_CreateRoomDialog_details_summary"},this.state.detailsOpen?Object(p.a)("Hide advanced"):Object(p.a)("Show advanced")),l.a.createElement(E.a,{label:Object(p.a)("Block anyone not part of %(serverName)s from ever joining this room.",{serverName:m.a.getHomeserverName()}),onChange:this.onNoFederateChange,value:this.state.noFederate}),l.a.createElement("p",null,r)))),l.a.createElement(S.a,{primaryButton:Object(p.a)("Create Room"),onPrimaryButtonClick:this.onOk,onCancel:this.onCancel}))}},s()(o,"validateRoomName",Object(h.a)({rules:[{key:"required",test:async({value:e})=>!!e,invalid:()=>Object(p.a)("Please enter a name for the room")}]})),r=i))||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(136),a=n(263);t.a=({label:e,labelInvite:t,labelPublic:n,labelRestricted:r,value:s,width:c=448,onChange:l})=>{const u=[o.a.createElement("div",{key:i.c.Invite,className:"mx_JoinRuleDropdown_invite"},t),o.a.createElement("div",{key:i.c.Public,className:"mx_JoinRuleDropdown_public"},n)];return r&&u.unshift(o.a.createElement("div",{key:i.c.Restricted,className:"mx_JoinRuleDropdown_restricted"},r)),o.a.createElement(a.a,{id:"mx_JoinRuleDropdown",className:"mx_JoinRuleDropdown",onOptionChange:l,menuWidth:c,value:s,label:e},u)}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(2),a=n(80),s=n(85),c=n(130),l=n(114),u=n(151),d=n(82);t.a=({space:e,onFinished:t})=>{var n;const[h,p]=Object(r.useState)(Object(a.a)("Click to copy"));return o.a.createElement("div",{className:"mx_SpacePublicShare"},o.a.createElement(s.a,{className:"mx_SpacePublicShare_shareButton",onClick:async()=>{const t=new l.a(e);t.load();const n=await Object(c.c)(t.forRoom())?Object(a.a)("Copied!"):Object(a.a)("Failed to copy");p(n),await Object(i.H)(5e3),h===n&&p(Object(a.a)("Click to copy"))}},o.a.createElement("h3",null,Object(a.a)("Share invite link")),o.a.createElement("span",null,h)),e.canInvite(null===(n=d.a.get())||void 0===n?void 0:n.getUserId())?o.a.createElement(s.a,{className:"mx_SpacePublicShare_inviteButton",onClick:()=>{Object(u.g)(e.roomId),t&&t()}},o.a.createElement("h3",null,Object(a.a)("Invite people")),o.a.createElement("span",null,Object(a.a)("Invite with email or username"))):null)}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(110),a=n(80),s=n(101),c=n(90),l=n(451),u=n(137),d=n(87),h=n(166);t.a=({title:e,subheading:t,children:n,rageshakeLabel:p,rageshakeData:m={},onFinished:g})=>{const[f,_]=Object(r.useState)(""),[b,v]=Object(r.useState)(!1);return o.a.createElement(i.a,{className:"mx_GenericFeatureFeedbackDialog",hasCancelButton:!0,title:e,description:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"mx_GenericFeatureFeedbackDialog_subheading"},t," ",Object(a.a)("Your platform and username will be noted to help us use your feedback as much as we can."),n),o.a.createElement(s.a,{id:"feedbackComment",label:Object(a.a)("Feedback"),type:"text",autoComplete:"off",value:f,element:"textarea",onChange:e=>{_(e.target.value)},autoFocus:!0}),o.a.createElement(u.a,{checked:b,onChange:e=>v(e.target.checked)},Object(a.a)("You may contact me if you have any follow up questions"))),button:Object(a.a)("Send feedback"),buttonDisabled:!f,onFinished:async t=>{if(!t)return g(!1);Object(l.c)(c.a.get().bug_report_endpoint_url,p,f,b,m),g(!0),d.a.createTrackedDialog("Feedback Sent",p,h.a,{title:e,description:Object(a.a)("Thank you for your feedback, we really appreciate it."),button:Object(a.a)("Done"),hasCloseButton:!1,fixedWidth:!1})}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return f}));var r=n(1316),o=n.n(r),i=n(82),a=n(111),s=n(80),c=n(1325),l=n.n(c),u=n(453),d=n(84),h=n(90);async function p(e={},t=!0){const n=e.progressCallback||(()=>{});n(Object(s.a)("Collecting app version information"));let r="UNKNOWN";try{r=await a.a.get().getAppVersion()}catch(e){}let c="UNKNOWN";window.navigator&&window.navigator.userAgent&&(c=window.navigator.userAgent);let l="UNKNOWN";try{l=String(window.matchMedia("(display-mode: standalone)").matches)}catch(e){}let h="UNKNOWN";try{h=String(window.matchMedia("(pointer: coarse)").matches)}catch(e){}const p=i.a.get();console.log("Sending bug report.");const m=new FormData;if(m.append("text",e.userText||"User did not supply any additional text."),m.append("app","element-web"),m.append("version",r),m.append("user_agent",c),m.append("installed_pwa",l),m.append("touch_input",h),p&&(m.append("user_id",p.credentials.userId),m.append("device_id",p.deviceId),p.isCryptoEnabled())){const e=["ed25519:"+p.getDeviceEd25519Key()];p.getDeviceCurve25519Key&&e.push("curve25519:"+p.getDeviceCurve25519Key()),m.append("device_keys",e.join(", ")),m.append("cross_signing_key",p.getCrossSigningId());const t=p.crypto.crossSigningInfo,n=p.crypto.secretStorage;m.append("cross_signing_ready",String(await p.isCrossSigningReady())),m.append("cross_signing_supported_by_hs",String(await p.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"))),m.append("cross_signing_key",t.getId()),m.append("cross_signing_privkey_in_secret_storage",String(!!await t.isStoredInSecretStorage(n)));const r=p.getCrossSigningCacheCallbacks();m.append("cross_signing_master_privkey_cached",String(!(!r||!await r.getCrossSigningKeyCache("master")))),m.append("cross_signing_self_signing_privkey_cached",String(!(!r||!await r.getCrossSigningKeyCache("self_signing")))),m.append("cross_signing_user_signing_privkey_cached",String(!(!r||!await r.getCrossSigningKeyCache("user_signing")))),m.append("secret_storage_ready",String(await p.isSecretStorageReady())),m.append("secret_storage_key_in_account",String(!!await n.hasKey())),m.append("session_backup_key_in_secret_storage",String(!!await p.isKeyBackupKeyStored()));const o=await p.crypto.getSessionBackupPrivateKey();m.append("session_backup_key_cached",String(!!o)),m.append("session_backup_key_well_formed",String(o instanceof Uint8Array))}e.label&&m.append("label",e.label);const g=d.b.getFeatureSettingNames().filter(e=>d.b.getValue(e));if(g.length&&m.append("enabled_labs",g.join(", ")),d.b.getValue("lowBandwidth")&&m.append("lowBandwidth","enabled"),navigator.storage&&navigator.storage.persisted)try{m.append("storageManager_persisted",String(await navigator.storage.persisted()))}catch(e){}else if(document.hasStorageAccess)try{m.append("storageManager_persisted",String(await document.hasStorageAccess()))}catch(e){}if(navigator.storage&&navigator.storage.estimate)try{const e=await navigator.storage.estimate();m.append("storageManager_quota",String(e.quota)),m.append("storageManager_usage",String(e.usage)),e.usageDetails&&Object.keys(e.usageDetails).forEach(t=>{m.append("storageManager_usage_"+t,String(e.usageDetails[t]))})}catch(e){}if(window.Modernizr){const e=Object.keys(window.Modernizr).filter(e=>!1===window.Modernizr[e]);e.length>0&&m.append("modernizr_missing_features",e.join(", "))}if(m.append("mx_local_settings",localStorage.getItem("mx_local_settings")),e.sendLogs){n(Object(s.a)("Collecting logs"));const e=await u.c();for(const n of e){let e=(new TextEncoder).encode(n.lines);t&&(e=o.a.gzip(e)),m.append("compressed-log",new Blob([e]),n.id)}}return m}async function m(e,t={}){if(!e)throw new Error("No bug report endpoint has been set.");const n=t.progressCallback||(()=>{}),r=await p(t);n(Object(s.a)("Uploading logs")),await _(e,r,n)}async function g(e={}){const t=e.progressCallback||(()=>{}),n=await p(e,!1);t(Object(s.a)("Downloading logs"));let r="";const o=new l.a;let i=0;for(const[e,t]of n.entries())"compressed-log"===e?await new Promise(e=>{const n=new FileReader;n.addEventListener("loadend",t=>{o.append(`log-${i++}.log`,(new TextDecoder).decode(t.target.result)),e()}),n.readAsArrayBuffer(t)}):r+=`${e} = ${t}\n`;o.append("issue.txt",r);const a=document.createElement("a");a.href="data:application/octet-stream;base64,"+btoa(function(e){let t="";for(let n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return t}(o.out)),a.download="rageshake.tar",document.body.appendChild(a),a.click(),document.body.removeChild(a)}async function f(e,t,n,r=!1,o={}){var s;let c="UNKNOWN";try{c=await a.a.get().getAppVersion()}catch(e){}const l=new FormData;l.append("label",t),l.append("text",n),l.append("can_contact",r?"yes":"no"),l.append("app","element-web"),l.append("version",c),l.append("platform",a.a.get().getHumanReadableName()),l.append("user_id",null===(s=i.a.get())||void 0===s?void 0:s.getUserId());for(const e in o)l.append(e,o[e]);await _(h.a.get().bug_report_endpoint_url,l,()=>{})}function _(e,t,n){return new Promise((r,o)=>{const i=new XMLHttpRequest;i.open("POST",e),i.timeout=3e5,i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.LOADING)n(Object(s.a)("Waiting for response from server"));else if(i.readyState===XMLHttpRequest.DONE){if(i.status<200||i.status>=400)return void o(new Error("HTTP "+i.status));r()}},i.send(t)})}},function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l}));class r{constructor(){this.logs=""}monkeyPatch(e){const t={log:"I",info:"I",warn:"W",error:"E"};Object.keys(t).forEach(n=>{const r=t[n],o=e[n].bind(e);e[n]=(...e)=>{this.log(r,...e),o(...e)}})}log(e,...t){let n=`${(new Date).toISOString()} ${e} ${(t=t.map(e=>{if(e instanceof DOMException)return e.message+` (${e.name} | ${e.code}) `+(e.stack?"\n"+e.stack:"");if(e instanceof Error)return e.message+(e.stack?"\n"+e.stack:"");if("object"!=typeof e)return e;try{return JSON.stringify(e)}catch(t){return JSON.stringify(e,(e,t)=>e&&"object"==typeof t?"<object>":t)}})).join(" ")}\n`;n=n.replace(/token=[a-zA-Z0-9-]+/gm,"token=xxxxx"),this.logs+=n}flush(e){if(e)return this.logs;const t=this.logs;return this.logs="",t}}class o{constructor(e,t){this.indexedDB=e,this.logger=t,this.id="instance-"+Math.random()+Date.now(),this.index=0,this.db=null,this.flushPromise=null,this.flushAgainPromise=null}connect(){const e=this.indexedDB.open("logs");return new Promise((t,n)=>{e.onsuccess=e=>{this.db=e.target.result,setInterval(this.flush.bind(this),3e4),t()},e.onerror=e=>{const t="Failed to open log database: "+e.target.error.name;console.error(t),n(new Error(t))},e.onupgradeneeded=e=>{const t=e.target.result,n=t.createObjectStore("logs",{keyPath:["id","index"]});n.createIndex("id","id",{unique:!1}),n.add(this._generateLogEntry(new Date+" ::: Log database was created."));t.createObjectStore("logslastmod",{keyPath:"id"}).add(this._generateLastModifiedTime())}})}flush(){return this.flushPromise?(this.flushAgainPromise||(this.flushAgainPromise=this.flushPromise.then(()=>this.flush()).then(()=>{this.flushAgainPromise=null})),this.flushAgainPromise):(this.flushPromise=new Promise((e,t)=>{if(!this.db)return void t(new Error("No connected database"));const n=this.logger.flush();if(0===n.length)return void e();const r=this.db.transaction(["logs","logslastmod"],"readwrite"),o=r.objectStore("logs");r.oncomplete=t=>{e()},r.onerror=e=>{console.error("Failed to flush logs : ",e),t(new Error("Failed to write logs: "+e.target.errorCode))},o.add(this._generateLogEntry(n));r.objectStore("logslastmod").put(this._generateLastModifiedTime())}).then(()=>{this.flushPromise=null}),this.flushPromise)}async consume(){const e=this.db;function t(t,n){const r=e.transaction("logs","readonly").objectStore("logs");return new Promise((e,o)=>{const i=r.index("id").openCursor(IDBKeyRange.only(t),"prev");let a="";i.onerror=e=>{o(new Error("Query failed: "+e.target.errorCode))},i.onsuccess=t=>{const r=t.target.result;r?(a=r.value.lines+a,a.length>=n?e(a):r.continue()):e(a)}})}const n=await function(e,t,n){const r=e.openCursor(t);return new Promise((e,t)=>{const o=[];r.onerror=e=>{t(new Error("Query failed: "+e.target.errorCode))},r.onsuccess=t=>{const r=t.target.result;r?(o.push(n(r)),r.continue()):e(o)}})}(e.transaction("logslastmod","readonly").objectStore("logslastmod"),void 0,e=>({id:e.value.id,ts:e.value.ts})).then(e=>e.sort((e,t)=>t.ts-e.ts).map(e=>e.id));let r=[];const o=[];let i=0;for(let e=0;e<n.length;e++){const a=await t(n[e],5242880-i);if(o.push({lines:a,id:n[e]}),i+=a.length,i>=5242880){r=n.slice(e+1);break}}return r.length>0&&(console.log("Removing logs: ",r),Promise.all(r.map(t=>function(t){return new Promise((n,r)=>{const o=e.transaction(["logs","logslastmod"],"readwrite"),i=o.objectStore("logs");i.index("id").openKeyCursor(IDBKeyRange.only(t)).onsuccess=e=>{const t=e.target.result;t&&(i.delete(t.primaryKey),t.continue())},o.oncomplete=()=>{n()},o.onerror=e=>{r(new Error(`Failed to delete logs for '${t}' : ${e.target.errorCode}`))};o.objectStore("logslastmod").delete(t)})}(t))).then(()=>{console.log(`Removed ${r.length} old logs.`)},e=>{console.error(e)})),o}_generateLogEntry(e){return{id:this.id,lines:e,index:this.index++}}_generateLastModifiedTime(){return{id:this.id,ts:Date.now()}}}function i(t=!0){return e.mx_rage_initPromise?e.mx_rage_initPromise:(e.mx_rage_logger=new r,e.mx_rage_logger.monkeyPatch(window.console),t?a():(e.mx_rage_initPromise=Promise.resolve(),e.mx_rage_initPromise))}function a(){if(e.mx_rage_initStoragePromise)return e.mx_rage_initStoragePromise;let t;console.log("Configuring rageshake persistence...");try{t=window.indexedDB}catch(e){}return t?(e.mx_rage_store=new o(t,e.mx_rage_logger),e.mx_rage_initStoragePromise=e.mx_rage_store.connect(),e.mx_rage_initStoragePromise):(e.mx_rage_initStoragePromise=Promise.resolve(),e.mx_rage_initStoragePromise)}function s(){e.mx_rage_store&&e.mx_rage_store.flush()}async function c(){e.mx_rage_store&&await e.mx_rage_store.consume()}async function l(){if(!e.mx_rage_logger)throw new Error("No console logger, did you forget to call init()?");return e.mx_rage_store?(await e.mx_rage_store.flush(),await e.mx_rage_store.consume()):[{lines:e.mx_rage_logger.flush(!0),id:"-"}]}}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(78),o=n(85);class i extends r.PureComponent{render(){return r.createElement("div",{className:"mx_DialPadBackspaceButtonWrapper"},r.createElement(o.a,{className:"mx_DialPadBackspaceButton",onClick:this.props.onBackspacePress}))}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u}));var r=n(80),o=n(235),i=n(158),a=n(133);const s=()=>{o.default.setEnabled(!0)},c=()=>{o.default.setPromptHidden(!0)},l=e=>{a.a.sharedInstance().addOrReplaceToast({key:"desktopnotifications",title:e?Object(r.a)("Don't miss a reply"):Object(r.a)("Notifications"),props:{description:Object(r.a)("Enable desktop notifications"),acceptLabel:Object(r.a)("Enable"),onAccept:s,rejectLabel:Object(r.a)("Dismiss"),onReject:c},component:i.a,priority:30})},u=()=>{a.a.sharedInstance().dismissToast("desktopnotifications")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(83),a=n(249);class s{constructor(e,t){this.window=e,this.document=t,o()(this,"activeNowTimeout",void 0),o()(this,"activeRecentlyTimeout",void 0),o()(this,"attachedActiveNowTimers",[]),o()(this,"attachedActiveRecentlyTimers",[]),o()(this,"lastScreenX",0),o()(this,"lastScreenY",0),o()(this,"onPageVisibilityChanged",e=>{"hidden"===this.document.visibilityState?(this.activeNowTimeout.abort(),this.activeRecentlyTimeout.abort()):this.onUserActivity(e)}),o()(this,"onWindowBlurred",()=>{this.activeNowTimeout.abort(),this.activeRecentlyTimeout.abort()}),o()(this,"onUserActivity",e=>{if(this.document.hasFocus()){if(e.screenX&&"mousemove"===e.type){if(e.screenX===this.lastScreenX&&e.screenY===this.lastScreenY)return;this.lastScreenX=e.screenX,this.lastScreenY=e.screenY}i.a.dispatch({action:"user_activity"}),this.activeNowTimeout.isRunning()?this.activeNowTimeout.restart():(this.activeNowTimeout.start(),i.a.dispatch({action:"user_activity_start"}),s.runTimersUntilTimeout(this.attachedActiveNowTimers,this.activeNowTimeout)),this.activeRecentlyTimeout.isRunning()?this.activeRecentlyTimeout.restart():(this.activeRecentlyTimeout.start(),s.runTimersUntilTimeout(this.attachedActiveRecentlyTimers,this.activeRecentlyTimeout))}}),this.activeNowTimeout=new a.a(700),this.activeRecentlyTimeout=new a.a(12e4)}static sharedInstance(){return void 0===window.mxUserActivity&&(window.mxUserActivity=new s(window,document)),window.mxUserActivity}timeWhileActiveNow(e){this.timeWhile(e,this.attachedActiveNowTimers),this.userActiveNow()&&e.start()}timeWhileActiveRecently(e){this.timeWhile(e,this.attachedActiveRecentlyTimers),this.userActiveRecently()&&e.start()}timeWhile(e,t){-1===t.indexOf(e)&&(t.push(e),e.finished().finally(()=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)}).catch(e=>{}))}start(){this.document.addEventListener("mousedown",this.onUserActivity),this.document.addEventListener("mousemove",this.onUserActivity),this.document.addEventListener("keydown",this.onUserActivity),this.document.addEventListener("visibilitychange",this.onPageVisibilityChanged),this.window.addEventListener("blur",this.onWindowBlurred),this.window.addEventListener("focus",this.onUserActivity),this.window.addEventListener("wheel",this.onUserActivity,{passive:!0,capture:!0})}stop(){this.document.removeEventListener("mousedown",this.onUserActivity),this.document.removeEventListener("mousemove",this.onUserActivity),this.document.removeEventListener("keydown",this.onUserActivity),this.window.removeEventListener("wheel",this.onUserActivity,{capture:!0}),this.document.removeEventListener("visibilitychange",this.onPageVisibilityChanged),this.window.removeEventListener("blur",this.onWindowBlurred),this.window.removeEventListener("focus",this.onUserActivity)}userActiveNow(){return this.activeNowTimeout.isRunning()}userActiveRecently(){return this.activeRecentlyTimeout.isRunning()}static async runTimersUntilTimeout(e,t){e.forEach(e=>e.start());try{await t.finished()}catch(e){}e.forEach(e=>e.abort())}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(82),u=n(87),d=n(458),h=n(460),p=n(81),m=n(340),g=n(85),f=n(97);let _=Object(p.a)("structures.auth.SetupEncryptionBody")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onStoreUpdate",()=>{const e=h.b.sharedInstance();e.phase!==h.a.Finished?this.setState({phase:e.phase,verificationRequest:e.verificationRequest,backupInfo:e.backupInfo}):this.props.onFinished(!0)}),i()(this,"onUsePassphraseClick",async()=>{h.b.sharedInstance().usePassPhrase()}),i()(this,"onVerifyClick",()=>{const e=l.a.get(),t=e.getUserId(),n=e.requestVerification(t);this.props.onFinished(!0),u.a.createTrackedDialog("New Session Verification","Starting dialog",d.a,{verificationRequestPromise:n,member:e.getUser(t),onFinished:async()=>{(await n).cancel()}})}),i()(this,"onSkipClick",()=>{h.b.sharedInstance().skip()}),i()(this,"onSkipConfirmClick",()=>{h.b.sharedInstance().skipConfirm()}),i()(this,"onSkipBackClick",()=>{h.b.sharedInstance().returnAfterSkip()}),i()(this,"onDoneClick",()=>{h.b.sharedInstance().done()}),i()(this,"onEncryptionPanelClose",()=>{this.props.onFinished(!1)});const t=h.b.sharedInstance();t.on("update",this.onStoreUpdate),t.start(),this.state={phase:t.phase,verificationRequest:t.verificationRequest,backupInfo:t.backupInfo}}componentWillUnmount(){const e=h.b.sharedInstance();e.off("update",this.onStoreUpdate),e.stop()}render(){const{phase:e}=this.state;if(this.state.verificationRequest)return s.a.createElement(m.a,{layout:"dialog",verificationRequest:this.state.verificationRequest,onClose:this.onEncryptionPanelClose,member:l.a.get().getUser(this.state.verificationRequest.otherUserId),isRoomEncrypted:!1});if(e===h.a.Intro){const e=h.b.sharedInstance();let n,r,o;return e.keyInfo&&(t=e.keyInfo,Boolean(t.passphrase&&t.passphrase.salt&&t.passphrase.iterations))?n=Object(c.a)("Use Security Key or Phrase"):e.keyInfo&&(n=Object(c.a)("Use Security Key")),n&&(r=s.a.createElement(g.a,{kind:"link",onClick:this.onUsePassphraseClick},n)),e.hasDevicesToVerifyAgainst&&(o=s.a.createElement(g.a,{kind:"primary",onClick:this.onVerifyClick},Object(c.a)("Use another login"))),s.a.createElement("div",null,s.a.createElement("p",null,Object(c.a)("Verify your identity to access encrypted messages and prove your identity to others.")),s.a.createElement("div",{className:"mx_CompleteSecurity_actionRow"},o,r,s.a.createElement(g.a,{kind:"danger",onClick:this.onSkipClick},Object(c.a)("Skip"))))}if(e===h.a.Done){let e;return e=this.state.backupInfo?s.a.createElement("p",null,Object(c.a)("Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.")):s.a.createElement("p",null,Object(c.a)("Your new session is now verified. Other users will see it as trusted.")),s.a.createElement("div",null,s.a.createElement("div",{className:"mx_CompleteSecurity_heroIcon mx_E2EIcon_verified"}),e,s.a.createElement("div",{className:"mx_CompleteSecurity_actionRow"},s.a.createElement(g.a,{kind:"primary",onClick:this.onDoneClick},Object(c.a)("Done"))))}return e===h.a.ConfirmSkip?s.a.createElement("div",null,s.a.createElement("p",null,Object(c.a)("Without verifying, you won’t have access to all your messages and may appear as untrusted to others.")),s.a.createElement("div",{className:"mx_CompleteSecurity_actionRow"},s.a.createElement(g.a,{className:"warning",kind:"secondary",onClick:this.onSkipConfirmClick},Object(c.a)("Skip")),s.a.createElement(g.a,{kind:"danger",onClick:this.onSkipBackClick},Object(c.a)("Go Back")))):e===h.a.Busy||e===h.a.Loading?s.a.createElement(f.a,null):void console.log("SetupEncryptionBody: Unknown phase "+e);var t}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r,o=n(78),i=n.n(o),a=n(82),s=n(80),c=n(81),l=n(95),u=n(340);let d=Object(c.a)("views.dialogs.VerificationRequestDialog")(r=class extends i.a.Component{constructor(e){super(e),this.state={verificationRequest:this.props.verificationRequest},this.props.verificationRequestPromise&&this.props.verificationRequestPromise.then(e=>{this.setState({verificationRequest:e})})}render(){const e=this.state.verificationRequest,t=e&&e.otherUserId,n=this.props.member||t&&a.a.get().getUser(t),r=e&&e.isSelfVerification?Object(s.a)("Verify other login"):Object(s.a)("Verification Request");return i.a.createElement(l.a,{className:"mx_InfoDialog",onFinished:this.props.onFinished,contentId:"mx_Dialog_content",title:r,hasCancel:!0},i.a.createElement(u.a,{layout:"dialog",verificationRequest:this.props.verificationRequest,verificationRequestPromise:this.props.verificationRequestPromise,onClose:this.props.onFinished,member:n,isRoomEncrypted:!1}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(78),o=n.n(r),i=n(80),a=n(85),s=n(97);const c=({text:e})=>o.a.createElement("div",{className:"mx_EncryptionInfo_spinner"},o.a.createElement(s.a,null),e);t.b=({waitingForOtherParty:e,waitingForNetwork:t,member:n,onStartVerification:r,isRoomEncrypted:s,inDialog:l,isSelfVerification:u})=>{let d,h;if(e||t){let t;t=e?u?Object(i.a)("Accept on your other login…"):Object(i.a)("Waiting for %(displayName)s to accept…",{displayName:n.displayName||n.name||n.userId}):Object(i.a)("Accepting…"),d=o.a.createElement(c,{text:t})}else d=o.a.createElement(a.a,{kind:"primary",className:"mx_UserInfo_wideButton",onClick:r},Object(i.a)("Start Verification"));return h=s?o.a.createElement("div",null,o.a.createElement("p",null,Object(i.a)("Messages in this room are end-to-end encrypted.")),o.a.createElement("p",null,Object(i.a)("Your messages are secured and only you and the recipient have the unique keys to unlock them."))):o.a.createElement("div",null,o.a.createElement("p",null,Object(i.a)("Messages in this room are not end-to-end encrypted.")),o.a.createElement("p",null,Object(i.a)("In encrypted rooms, your messages are secured and only you and the recipient have the unique keys to unlock them."))),l?d:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"mx_UserInfo_container"},o.a.createElement("h3",null,Object(i.a)("Encryption")),h),o.a.createElement("div",{className:"mx_UserInfo_container"},o.a.createElement("h3",null,Object(i.a)("Verify User")),o.a.createElement("div",null,o.a.createElement("p",null,Object(i.a)("For extra security, verify this user by checking a one-time code on both of your devices.")),o.a.createElement("p",null,Object(i.a)("To be secure, do this in person or use a trusted way to communicate.")),d)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(79),o=n.n(r),i=n(3),a=n.n(i),s=n(207),c=n(82),l=n(177);let u;!function(e){e[e.Loading=0]="Loading",e[e.Intro=1]="Intro",e[e.Busy=2]="Busy",e[e.Done=3]="Done",e[e.ConfirmSkip=4]="ConfirmSkip",e[e.Finished=5]="Finished"}(u||(u={}));class d extends a.a{constructor(...e){super(...e),o()(this,"started",void 0),o()(this,"phase",void 0),o()(this,"verificationRequest",void 0),o()(this,"backupInfo",void 0),o()(this,"keyId",void 0),o()(this,"keyInfo",void 0),o()(this,"hasDevicesToVerifyAgainst",void 0),o()(this,"onUserTrustStatusChanged",e=>{if(e!==c.a.get().getUserId())return;c.a.get().getCrossSigningId()&&(this.phase=u.Done,this.emit("update"))}),o()(this,"onVerificationRequest",e=>{this.setActiveVerificationRequest(e)}),o()(this,"onVerificationRequestChange",()=>{if(this.verificationRequest.cancelled)this.verificationRequest.off("change",this.onVerificationRequestChange),this.verificationRequest=null,this.emit("update");else if(this.verificationRequest.phase===s.c){this.verificationRequest.off("change",this.onVerificationRequestChange),this.verificationRequest=null;const e=c.a.get().getCrossSigningId();this.phase=e?u.Done:u.Busy,this.emit("update")}})}static sharedInstance(){return window.mxSetupEncryptionStore||(window.mxSetupEncryptionStore=new d),window.mxSetupEncryptionStore}start(){if(this.started)return;this.started=!0,this.phase=u.Loading,this.verificationRequest=null,this.backupInfo=null,this.keyId=null,this.keyInfo=null;const e=c.a.get();e.on("crypto.verification.request",this.onVerificationRequest),e.on("userTrustStatusChanged",this.onUserTrustStatusChanged);const t=e.getVerificationRequestsToDeviceInProgress(e.getUserId());t.length&&this.setActiveVerificationRequest(t[t.length-1]),this.fetchKeyInfo()}stop(){this.started&&(this.started=!1,this.verificationRequest&&this.verificationRequest.off("change",this.onVerificationRequestChange),c.a.get()&&(c.a.get().removeListener("crypto.verification.request",this.onVerificationRequest),c.a.get().removeListener("userTrustStatusChanged",this.onUserTrustStatusChanged)))}async fetchKeyInfo(){const e=c.a.get(),t=await e.isSecretStored("m.cross_signing.master",!1);null===t||0===Object.keys(t).length?(this.keyId=null,this.keyInfo=null):(this.keyId=Object.keys(t)[0],this.keyInfo=t[this.keyId]);const n=await e.getDehydratedDevice();this.hasDevicesToVerifyAgainst=e.getStoredDevicesForUser(e.getUserId()).some(e=>e.getIdentityKey()&&(!n||e.deviceId!=n.device_id)),this.hasDevicesToVerifyAgainst||this.keyInfo?this.phase=u.Intro:this.phase=u.Finished,this.emit("update")}async usePassPhrase(){this.phase=u.Busy,this.emit("update");const e=c.a.get();try{const t=await e.getKeyBackupVersion();this.backupInfo=t,this.emit("update"),await new Promise((n,r)=>{Object(l.b)(async()=>{await e.checkOwnCrossSigningTrust(),n(),t&&await e.restoreKeyBackupWithSecretStorage(t)}).catch(r)}),e.getCrossSigningId()&&(this.phase=u.Done,this.emit("update"))}catch(e){e instanceof l.a||console.log(e),this.phase=u.Intro,this.emit("update")}}skip(){this.phase=u.ConfirmSkip,this.emit("update")}skipConfirm(){this.phase=u.Finished,this.emit("update")}returnAfterSkip(){this.phase=u.Intro,this.emit("update")}done(){this.phase=u.Finished,this.emit("update"),c.a.get().crypto.cancelAndResendAllOutgoingKeyRequests()}async setActiveVerificationRequest(e){e.otherUserId===c.a.get().getUserId()&&(this.verificationRequest&&this.verificationRequest.off("change",this.onVerificationRequestChange),this.verificationRequest=e,await e.accept(),e.on("change",this.onVerificationRequestChange),this.emit("update"))}}},function(e,t,n){"use strict";function r(e){const t=e.embeddedPages;let n=null==t?void 0:t.homeUrl;return n||(n=e.welcomePageUrl),n}function o(e){const t=e.embeddedPages;return!0===(null==t?void 0:t.loginForWelcome)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}))},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(88),a=n.n(i);const s=e=>{const t=["mx_ResizeHandle"];return e.vertical?t.push("mx_ResizeHandle_vertical"):t.push("mx_ResizeHandle_horizontal"),e.reverse&&t.push("mx_ResizeHandle_reverse"),o.a.createElement("div",{className:t.join(" "),"data-id":e.id},o.a.createElement("div",null))};s.propTypes={vertical:a.a.bool,reverse:a.a.bool,id:a.a.string},t.a=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(701),o=n(343);class i extends r.a{start(e){this.vertical?e.style.minHeight=null:e.style.minWidth=null}finish(e){const t=e.offsetParent;if(t)if(this.vertical){const n=(e.offsetHeight/t.offsetHeight*100).toFixed(2)+"%";e.style.minHeight=n,e.style.height=n}else{const n=(e.offsetWidth/t.offsetWidth*100).toFixed(2)+"%";e.style.minWidth=n,e.style.width=n}}}class a extends o.a{static createSizer(e,t,n){return new i(e,t,n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),o=n.n(r),i=n(107);class a{constructor(e,t,n){if(this.container=e,this.distributorCtor=t,this.config=n,o()(this,"classNames",void 0),o()(this,"onMouseDown",e=>{const t=e.target&&e.target.closest("."+this.classNames.handle);if(!t||t.parentElement!==this.container)return;e.preventDefault(),this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),this.config.onResizeStart&&this.config.onResizeStart();const{sizer:n,distributor:r}=this.createSizerAndDistributor(t);r.start();const o=e=>{const t=n.offsetFromEvent(e);r.resizeFromContainerOffset(t)},i=document.body,a=()=>{this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),r.finish(),this.config.onResizeStop&&this.config.onResizeStop(),i.removeEventListener("mouseup",a,!1),document.removeEventListener("mouseleave",a,!1),i.removeEventListener("mousemove",o,!1)};i.addEventListener("mouseup",a,!1),document.addEventListener("mouseleave",a,!1),i.addEventListener("mousemove",o,!1)}),o()(this,"onResize",Object(i.throttle)(()=>{const e=this.getDistributors();e.forEach(e=>e.start()),e.forEach(e=>e.finish())},100,{trailing:!0,leading:!0})),o()(this,"getDistributors",()=>this.getResizeHandles().map(e=>{const{distributor:t}=this.createSizerAndDistributor(e);return t})),!e)throw new Error("Resizer requires a non-null `container` arg");this.classNames={handle:"resizer-handle",reverse:"resizer-reverse",vertical:"resizer-vertical",resizing:"resizer-resizing"}}setClassNames(e){this.classNames=e}attach(){this.container.addEventListener("mousedown",this.onMouseDown,!1),window.addEventListener("resize",this.onResize)}detach(){this.container.removeEventListener("mousedown",this.onMouseDown,!1),window.removeEventListener("resize",this.onResize)}forHandleAt(e){const t=this.getResizeHandles()[e];if(t){const{distributor:e}=this.createSizerAndDistributor(t);return e}}forHandleWithId(e){const t=this.getResizeHandles().find(t=>t.getAttribute("data-id")===e);if(t){const{distributor:e}=this.createSizerAndDistributor(t);return e}}isReverseResizeHandle(e){return e&&e.classList.contains(this.classNames.reverse)}isResizeHandle(e){return e&&e.classList.contains(this.classNames.handle)}createSizerAndDistributor(e){const t=e.classList.contains(this.classNames.vertical),n=this.isReverseResizeHandle(e),r=this.distributorCtor,o=r.createSizer(this.container,t,n),i=r.createItem(e,this,o);return{sizer:o,distributor:new r(i)}}getResizeHandles(){return this.container.children?Array.from(this.container.children).filter(e=>this.isResizeHandle(e)):[]}}},function(e,t,n){"use strict";var r=n(78),o=n(117),i=n(461),a=n(80),s=n(90),c=n(89),l=n(83),u=n(91),d=n(120),h=n(208),p=n(85),m=n(115),g=n(127),f=n(94),_=n(466),b=n(124),v=n(112);const y=()=>{b.a.trackEvent("home_page","button","dm"),v.a.instance.track("home_page_button",{button:"dm"}),l.a.dispatch({action:"view_create_chat"})},E=()=>{b.a.trackEvent("home_page","button","room_directory"),v.a.instance.track("home_page_button",{button:"room_directory"}),l.a.fire(u.a.ViewRoomDirectory)},S=()=>{b.a.trackEvent("home_page","button","create_room"),v.a.instance.track("home_page_button",{button:"create_room"}),l.a.dispatch({action:"view_create_room"})},w=e=>({displayName:h.a.instance.displayName||e,avatarUrl:h.a.instance.getHttpAvatarUrl(_.a)}),C=()=>{const e=Object(r.useContext)(f.a),t=e.getUserId(),[n,o]=Object(r.useState)(w(t));return Object(g.a)(h.a.instance,m.b,()=>{o(w(t))}),r.createElement("div",null,r.createElement(_.b,{hasAvatar:!!n.avatarUrl,hasAvatarLabel:Object(a.a)("Great, that'll help people know it's you"),noAvatarLabel:Object(a.a)("Add a photo so people know it's you."),setAvatarUrl:t=>e.setAvatarUrl(t)},r.createElement(d.a,{idName:t,name:n.displayName,url:n.avatarUrl,width:_.a,height:_.a,resizeMethod:"crop"})),r.createElement("h1",null,Object(a.a)("Welcome %(name)s",{name:n.displayName})),r.createElement("h4",null,Object(a.a)("Now, let's help you get started")))};t.a=({justRegistered:e=!1})=>{const t=s.a.get(),n=Object(i.a)(t);if(n){const e=c.getComponent("structures.EmbeddedPage");return r.createElement(e,{className:"mx_HomePage",url:n,scrollbar:!0})}let l;if(e)l=r.createElement(C,null);else{const e=t.branding;let n="themes/element/img/logos/element-logo.svg";e&&e.authHeaderLogoUrl&&(n=e.authHeaderLogoUrl),l=r.createElement(r.Fragment,null,r.createElement("img",{src:n,alt:t.brand}),r.createElement("h1",null,Object(a.a)("Welcome to %(appName)s",{appName:t.brand})),r.createElement("h4",null,Object(a.a)("Liberate your communication")))}return r.createElement(o.a,{className:"mx_HomePage mx_HomePage_default"},r.createElement("div",{className:"mx_HomePage_default_wrapper"},l,r.createElement("div",{className:"mx_HomePage_default_buttons"},r.createElement(p.a,{onClick:y,className:"mx_HomePage_button_sendDm"},Object(a.a)("Send a Direct Message")),r.createElement(p.a,{onClick:E,className:"mx_HomePage_button_explore"},Object(a.a)("Explore Public Rooms")),r.createElement(p.a,{onClick:S,className:"mx_HomePage_button_createGroup"},Object(a.a)("Create a Group Chat")))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(78),o=n.n(r),i=n(93),a=n(86),s=n.n(a),c=n(85),l=n(97),u=n(94),d=n(702),h=n(124),p=n(112),m=n(164);const g=52;t.b=({hasAvatar:e,hasAvatarLabel:t,noAvatarLabel:n,setAvatarUrl:a,children:g})=>{const f=Object(r.useContext)(u.a),[_,b]=Object(r.useState)(!1),[v,y]=Object(r.useState)(!1),[E,S]=Object(r.useState)(!1);Object(d.b)(()=>{S(!0)},3e3),Object(d.b)(()=>{S(!1)},13e3);const w=Object(r.useRef)(),C=e||_?t:n,{room:T}=Object(r.useContext)(m.a);if(!(null==T?void 0:T.currentState.maySendStateEvent(i.a.RoomAvatar,f.getUserId())))return o.a.createElement(o.a.Fragment,null,g);const x=!!C&&(v||E);return o.a.createElement(o.a.Fragment,null,o.a.createElement("input",{type:"file",ref:w,className:"mx_MiniAvatarUploader_input",onChange:async e=>{var t;if(null===(t=e.target.files)||void 0===t||!t.length)return;b(!0),h.a.trackEvent("mini_avatar","upload"),p.a.instance.track("mini_avatar_upload");const n=e.target.files[0],r=await f.uploadContent(n);await a(r),b(!1)},accept:"image/*"}),o.a.createElement(c.a,{className:s()("mx_MiniAvatarUploader",{mx_MiniAvatarUploader_busy:_,mx_MiniAvatarUploader_hasAvatar:e}),disabled:_,onClick:()=>{w.current.click()},onMouseOver:()=>y(!0),onMouseLeave:()=>y(!1)},g,o.a.createElement("div",{className:"mx_MiniAvatarUploader_indicator"},_?o.a.createElement(l.a,{w:20,h:20}):o.a.createElement("div",{className:"mx_MiniAvatarUploader_cameraIcon"})),o.a.createElement("div",{className:s()("mx_Tooltip",{mx_Tooltip_visible:x,mx_Tooltip_invisible:!x})},o.a.createElement("div",{className:"mx_Tooltip_chevron"}),C)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(83),a=n(115);class s extends a.a{constructor(){super(i.a,{hostSignupActive:!1})}static get instance(){return s.internalInstance}get isHostSignupActive(){return this.state.hostSignupActive}async setHostSignupActive(e){return this.updateState({hostSignupActive:e})}onDispatch(e){}}o()(s,"internalInstance",new s)},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=l(n(88)),o=l(n(78)),i=l(n(142)),a=l(n(714)),s=n(715),c=l(n(469));function l(e){return e&&e.__esModule?e:{default:e}}t.UNMOUNTED="unmounted";t.EXITED="exited";t.ENTERING="entering";t.ENTERED="entered";t.EXITING="exiting";var u=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var s=r.prototype;return s.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},s.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},s.componentWillUnmount=function(){this.cancelNextCallback()},s.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},s.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},s.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[i.default.findDOMNode(this),r],s=o[0],c=o[1],l=this.getTimeouts(),u=r?l.appear:l.enter;!e&&!n||a.default.disabled?this.safeSetState({status:"entered"},(function(){t.props.onEntered(s)})):(this.props.onEnter(s,c),this.safeSetState({status:"entering"},(function(){t.props.onEntering(s,c),t.onTransitionEnd(u,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(s,c)}))}))})))},s.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:i.default.findDOMNode(this);t&&!a.default.disabled?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},s.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},s.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},s.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},s.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:i.default.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],s=o[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},s.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.default.createElement(c.default.Provider,{value:null},"function"==typeof n?n(e,r):o.default.cloneElement(o.default.Children.only(n),r))},r}(o.default.Component);function d(){}u.contextType=c.default,u.propTypes={nodeRef:r.default.shape({current:"undefined"==typeof Element?r.default.any:function(e,t,n,o,i,a){var s=e[t];return r.default.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,o,i,a)}}),children:r.default.oneOfType([r.default.func.isRequired,r.default.element.isRequired]).isRequired,in:r.default.bool,mountOnEnter:r.default.bool,unmountOnExit:r.default.bool,appear:r.default.bool,enter:r.default.bool,exit:r.default.bool,timeout:function(e){var t=s.timeoutsShape;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.apply(void 0,[e].concat(r))},addEndListener:r.default.func,onEnter:r.default.func,onEntering:r.default.func,onEntered:r.default.func,onExit:r.default.func,onExiting:r.default.func,onExited:r.default.func},u.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},u.UNMOUNTED="unmounted",u.EXITED="exited",u.ENTERING="entering",u.ENTERED="entered",u.EXITING="exiting";var h=u;t.default=h},function(e,t,n){"use strict";var r;t.__esModule=!0,t.default=void 0;var o=((r=n(78))&&r.__esModule?r:{default:r}).default.createContext(null);t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(86),u=n.n(l),d=n(120),h=n(100);const p=["app","className","width","height"];t.a=e=>{let{app:t,className:r,width:i=20,height:s=20}=e,l=a()(e,p),m=[n(1344)];return t.type.includes("jitsi")?m=[n(1345)]:t.type.includes("meeting")||t.type.includes("calendar")?m=[n(1346)]:t.type.includes("pad")||t.type.includes("doc")||t.type.includes("calc")?m=[n(1347)]:t.type.includes("clock")&&(m=[n(1348)]),c.a.createElement(d.a,o()({},l,{name:t.id,className:u()("mx_WidgetAvatar",r),url:t.avatar_url?Object(h.b)(t.avatar_url).getSquareThumbnailHttp(20):void 0,urls:m,width:i,height:s}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));var r,o=n(92),i=n.n(o),a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(83),d=n(138),h=n(82),p=n(80),m=n(472),g=n(119),f=n(128),_=n(86),b=n.n(_),v=n(85),y=n(104),E=n(103),S=n(728),w=n(196),C=n(729),T=n(81),x=n(730),k=n(87),F=n(375),O=n(731),R=n(732),D=n(106),I=n(154);function A(){return document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement}function N(){const e=document.exitFullscreen||document.webkitExitFullscreen||document.msExitFullscreen;e&&e.call(document)}let M=Object(T.a)("views.voip.CallView")(r=class e extends l.a.Component{constructor(t){super(t),s()(this,"dispatcherRef",void 0),s()(this,"contentRef",Object(c.createRef)()),s()(this,"controlsHideTimer",null),s()(this,"dialpadButton",Object(c.createRef)()),s()(this,"contextMenuButton",Object(c.createRef)()),s()(this,"onAction",e=>{switch(e.action){case"video_fullscreen":if(!this.contentRef.current)return;e.fullscreen?function(e){const t=e.requestFullscreen||e.webkitRequestFullScreen||e.msRequestFullscreen;t&&t.call(e)}(this.contentRef.current):A()&&N()}}),s()(this,"onCallState",e=>{this.setState({callState:e})}),s()(this,"onFeedsChanged",t=>{const{primary:n,secondary:r}=e.getOrderedFeeds(t);this.setState({primaryFeed:n,secondaryFeeds:r})}),s()(this,"onCallLocalHoldUnhold",()=>{this.setState({isLocalOnHold:this.props.call.isLocalOnHold()})}),s()(this,"onCallRemoteHoldUnhold",()=>{this.setState({isRemoteOnHold:this.props.call.isRemoteOnHold(),isLocalOnHold:this.props.call.isLocalOnHold()})}),s()(this,"onControlsHideTimer",()=>{this.state.hoveringControls||this.state.showDialpad||this.state.showMoreMenu||(this.controlsHideTimer=null,this.setState({controlsVisible:!1}))}),s()(this,"onMouseMove",()=>{this.showControls()}),s()(this,"onDialpadClick",()=>{this.state.showDialpad?this.setState({showDialpad:!1}):(this.setState({showDialpad:!0}),this.showControls())}),s()(this,"onMicMuteClick",()=>{const e=!this.state.micMuted;this.props.call.setMicrophoneMuted(e),this.setState({micMuted:e})}),s()(this,"onVidMuteClick",()=>{const e=!this.state.vidMuted;this.props.call.setLocalVideoMuted(e),this.setState({vidMuted:e})}),s()(this,"onScreenshareClick",async()=>{const e=await this.props.call.setScreensharingEnabled(!this.state.screensharing,async()=>{const{finished:e}=k.a.createDialog(x.a),[t]=await e;return t});this.setState({sidebarShown:!0,screensharing:e})}),s()(this,"onMoreClick",()=>{this.setState({showMoreMenu:!0}),this.showControls()}),s()(this,"closeDialpad",()=>{this.setState({showDialpad:!1})}),s()(this,"closeContextMenu",()=>{this.setState({showMoreMenu:!1})}),s()(this,"onNativeKeyDown",e=>{let t=!1;const n=Object(y.d)(e);switch(e.key){case y.a.D:n&&(this.onMicMuteClick(),this.showControls(),t=!0);break;case y.a.E:n&&(this.onVidMuteClick(),this.showControls(),t=!0)}t&&(e.stopPropagation(),e.preventDefault())}),s()(this,"onCallControlsMouseEnter",()=>{this.setState({hoveringControls:!0}),this.showControls()}),s()(this,"onCallControlsMouseLeave",()=>{this.setState({hoveringControls:!1})}),s()(this,"onCallResumeClick",()=>{const e=d.d.sharedInstance().roomIdForCall(this.props.call);d.d.sharedInstance().setActiveCallRoomId(e)}),s()(this,"onTransferClick",()=>{const e=d.d.sharedInstance().getTransfereeForCallId(this.props.call.callId);this.props.call.transferToCall(e)}),s()(this,"onHangupClick",()=>{u.a.dispatch({action:"hangup",room_id:d.d.sharedInstance().roomIdForCall(this.props.call)})}),s()(this,"onToggleSidebar",()=>{this.setState({sidebarShown:!this.state.sidebarShown})});const{primary:n,secondary:r}=e.getOrderedFeeds(this.props.call.getFeeds());this.state={isLocalOnHold:this.props.call.isLocalOnHold(),isRemoteOnHold:this.props.call.isRemoteOnHold(),micMuted:this.props.call.isMicrophoneMuted(),vidMuted:this.props.call.isLocalVideoMuted(),screensharing:this.props.call.isScreensharing(),callState:this.props.call.state,controlsVisible:!0,hoveringControls:!1,showMoreMenu:!1,showDialpad:!1,primaryFeed:n,secondaryFeeds:r,sidebarShown:!0},this.updateCallListeners(null,this.props.call)}componentDidMount(){this.dispatcherRef=u.a.register(this.onAction),document.addEventListener("keydown",this.onNativeKeyDown),this.showControls()}componentWillUnmount(){A()&&N(),document.removeEventListener("keydown",this.onNativeKeyDown),this.updateCallListeners(this.props.call,null),u.a.unregister(this.dispatcherRef)}static getDerivedStateFromProps(t){const{primary:n,secondary:r}=e.getOrderedFeeds(t.call.getFeeds());return{primaryFeed:n,secondaryFeeds:r}}componentDidUpdate(e){this.props.call!==e.call&&(this.setState({isLocalOnHold:this.props.call.isLocalOnHold(),isRemoteOnHold:this.props.call.isRemoteOnHold(),micMuted:this.props.call.isMicrophoneMuted(),vidMuted:this.props.call.isLocalVideoMuted(),callState:this.props.call.state}),this.updateCallListeners(null,this.props.call))}updateCallListeners(e,t){e!==t&&(e&&(e.removeListener(f.c.State,this.onCallState),e.removeListener(f.c.LocalHoldUnhold,this.onCallLocalHoldUnhold),e.removeListener(f.c.RemoteHoldUnhold,this.onCallRemoteHoldUnhold),e.removeListener(f.c.FeedsChanged,this.onFeedsChanged)),t&&(t.on(f.c.State,this.onCallState),t.on(f.c.LocalHoldUnhold,this.onCallLocalHoldUnhold),t.on(f.c.RemoteHoldUnhold,this.onCallRemoteHoldUnhold),t.on(f.c.FeedsChanged,this.onFeedsChanged)))}static getOrderedFeeds(e){let t;const n=e.filter(e=>e.purpose===F.b.Screenshare);t=n.find(e=>!e.isLocal())||n[0],t||(t=e.find(e=>!e.isLocal()));const r=[...e];return t&&r.splice(r.indexOf(t),1),r.sort((e,t)=>e.isLocal()&&!t.isLocal()?-1:!e.isLocal()&&t.isLocal()?1:0),{primary:t,secondary:r}}showControls(){this.state.showMoreMenu||this.state.showDialpad||(this.state.controlsVisible||this.setState({controlsVisible:!0}),null!==this.controlsHideTimer&&clearTimeout(this.controlsHideTimer),this.controlsHideTimer=window.setTimeout(this.onControlsHideTimer,2e3))}renderCallControls(){var e;const t=b()({mx_CallView_callControls_button:!0,mx_CallView_callControls_button_micOn:!this.state.micMuted,mx_CallView_callControls_button_micOff:this.state.micMuted}),n=b()({mx_CallView_callControls_button:!0,mx_CallView_callControls_button_vidOn:!this.state.vidMuted,mx_CallView_callControls_button_vidOff:this.state.vidMuted}),r=b()({mx_CallView_callControls_button:!0,mx_CallView_callControls_button_screensharingOn:this.state.screensharing,mx_CallView_callControls_button_screensharingOff:!this.state.screensharing}),o=b()({mx_CallView_callControls_button:!0,mx_CallView_callControls_button_sidebarOn:this.state.sidebarShown,mx_CallView_callControls_button_sidebarOff:!this.state.sidebarShown}),a=b()({mx_CallView_callControls_button:!0,mx_CallView_callControls_button_micOn:this.state.micMuted,mx_CallView_callControls_button_micOff:!this.state.micMuted,mx_CallView_callControls_button_invisible:!0}),s=b()({mx_CallView_callControls_button:!0,mx_CallView_callControls_button_vidOn:this.state.micMuted,mx_CallView_callControls_button_vidOff:!this.state.micMuted,mx_CallView_callControls_button_invisible:!0}),c=b()({mx_CallView_callControls:!0,mx_CallView_callControls_hidden:!this.state.controlsVisible});let u,d,h,m,g,_,v;return this.props.call.type===f.f.Video&&(u=l.a.createElement(D.a,{className:n,onClick:this.onVidMuteClick,title:this.state.vidMuted?Object(p.a)("Start the camera"):Object(p.a)("Stop the camera"),alignment:I.a.Top,yOffset:-24})),!this.props.call.opponentSupportsSDPStreamMetadata()&&this.props.call.type!==f.f.Video||this.props.call.state!==f.e.Connected||(d=l.a.createElement(D.a,{className:r,onClick:this.onScreenshareClick,title:this.state.screensharing?Object(p.a)("Stop sharing your screen"):Object(p.a)("Start sharing your screen"),alignment:I.a.Top,yOffset:-24})),this.props.pipMode||(null===(e=this.state.primaryFeed)||void 0===e?void 0:e.purpose)!==F.b.Screenshare&&!this.props.call.isScreensharing()||(h=l.a.createElement(D.a,{className:o,onClick:this.onToggleSidebar,title:this.state.sidebarShown?Object(p.a)("Hide sidebar"):Object(p.a)("Show sidebar"),alignment:I.a.Top,yOffset:-24})),this.state.callState===f.e.Connected&&(m=l.a.createElement(E.d,{className:"mx_CallView_callControls_button mx_CallView_callControls_button_more",onClick:this.onMoreClick,inputRef:this.contextMenuButton,isExpanded:this.state.showMoreMenu,title:Object(p.a)("More"),alignment:I.a.Top,yOffset:-24})),this.state.callState===f.e.Connected&&this.props.call.opponentSupportsDTMF()&&(g=l.a.createElement(E.d,{className:"mx_CallView_callControls_button mx_CallView_callControls_dialpad",inputRef:this.dialpadButton,onClick:this.onDialpadClick,isExpanded:this.state.showDialpad,title:Object(p.a)("Dialpad"),alignment:I.a.Top,yOffset:-24})),this.state.showDialpad&&(_=l.a.createElement(C.a,i()({},Object(E.m)(this.dialpadButton.current.getBoundingClientRect(),E.a.None,8),{mountAsChild:!this.props.pipMode,onFinished:this.closeDialpad,call:this.props.call}))),this.state.showMoreMenu&&(v=l.a.createElement(S.a,i()({},Object(E.l)(this.contextMenuButton.current.getBoundingClientRect(),E.a.None,8),{mountAsChild:!this.props.pipMode,onFinished:this.closeContextMenu,call:this.props.call}))),l.a.createElement("div",{className:c,onMouseEnter:this.onCallControlsMouseEnter,onMouseLeave:this.onCallControlsMouseLeave},_,v,g,l.a.createElement(D.a,{className:t,onClick:this.onMicMuteClick,title:this.state.micMuted?Object(p.a)("Unmute the microphone"):Object(p.a)("Mute the microphone"),alignment:I.a.Top,yOffset:-24}),u,l.a.createElement("div",{className:a}),l.a.createElement("div",{className:s}),d,h,m,l.a.createElement(D.a,{className:"mx_CallView_callControls_button mx_CallView_callControls_button_hangup",onClick:this.onHangupClick,title:Object(p.a)("Hangup"),alignment:I.a.Top,yOffset:-24}))}render(){const e=h.a.get(),t=d.d.sharedInstance().roomIdForCall(this.props.call),n=d.d.sharedInstance().roomIdForCall(this.props.secondaryCall),r=e.getRoom(t),o=this.props.secondaryCall?e.getRoom(n):null,i=this.props.pipMode?76:160,a=d.d.sharedInstance().getTransfereeForCallId(this.props.call.callId),s=this.state.isLocalOnHold||this.state.isRemoteOnHold,c=this.props.call.isScreensharing(),u=this.state.sidebarShown,_=this.props.call.getFeeds().some(e=>e.purpose===F.b.Screenshare),y=this.props.call.type===f.f.Video;let E,S,C;if(a){const e=h.a.get().getRoom(d.d.sharedInstance().roomIdForCall(this.props.call)),t=e?e.name:Object(p.a)("unknown person"),n=h.a.get().getRoom(d.d.sharedInstance().roomIdForCall(a)),r=n?n.name:Object(p.a)("unknown person");S=l.a.createElement("div",{className:"mx_CallView_holdTransferContent"},Object(p.a)("Consulting with %(transferTarget)s. <a>Transfer to %(transferee)s</a>",{transferTarget:t,transferee:r},{a:e=>l.a.createElement(v.a,{kind:"link",onClick:this.onTransferClick},e)}))}else if(s){let e=null;if(this.state.isRemoteOnHold){const t=d.d.sharedInstance().hasAnyUnheldCall()?Object(p.b)("You held the call <a>Switch</a>"):Object(p.b)("You held the call <a>Resume</a>");e=Object(p.a)(t,{},{a:e=>l.a.createElement(v.a,{kind:"link",onClick:this.onCallResumeClick},e)})}else this.state.isLocalOnHold&&(e=Object(p.a)("%(peerName)s held the call",{peerName:this.props.call.getOpponentMember().name}));S=l.a.createElement("div",{className:"mx_CallView_holdTransferContent"},e)}if(s||a||!u||!y&&!_||(C=l.a.createElement(O.a,{feeds:this.state.secondaryFeeds,call:this.props.call,pipMode:this.props.pipMode})),s||a)if(y){const e=b()({mx_CallView_content:!0,mx_CallView_video:!0,mx_CallView_video_hold:s});let t=null;const n={},r=Object(w.a)(this.props.call.getOpponentMember(),1024,1024,"crop");n.backgroundImage="url("+r+")",t=l.a.createElement("div",{className:"mx_CallView_video_holdBackground",style:n}),E=l.a.createElement("div",{className:e,ref:this.contentRef,onMouseMove:this.onMouseMove},t,S,this.renderCallControls())}else{const e=b()({mx_CallView_content:!0,mx_CallView_voice:!0,mx_CallView_voice_hold:s});E=l.a.createElement("div",{className:e,onMouseMove:this.onMouseMove},l.a.createElement("div",{className:"mx_CallView_voice_avatarsContainer"},l.a.createElement("div",{className:"mx_CallView_voice_avatarContainer",style:{width:i,height:i}},l.a.createElement(g.a,{room:r,height:i,width:i}))),S,this.renderCallControls())}else if(this.props.call.noIncomingFeeds()){const e=b()({mx_CallView_content:!0,mx_CallView_voice:!0});E=l.a.createElement("div",{className:e,onMouseMove:this.onMouseMove},C,l.a.createElement("div",{className:"mx_CallView_voice_avatarsContainer"},l.a.createElement("div",{className:"mx_CallView_voice_avatarContainer",style:{width:i,height:i}},l.a.createElement(g.a,{room:r,height:i,width:i}))),l.a.createElement("div",{className:"mx_CallView_holdTransferContent"},Object(p.a)("Connecting")),this.renderCallControls())}else{const e=b()({mx_CallView_content:!0,mx_CallView_video:!0});let t;if(_){const e=b()({mx_CallView_presenting:!0,mx_CallView_presenting_hidden:!this.state.controlsVisible}),n=this.state.primaryFeed.getMember().name;let r=c?Object(p.a)("You are presenting"):Object(p.a)("%(sharerName)s is presenting",{sharerName:n});!this.state.sidebarShown&&y&&(r+=" • "+(this.props.call.isLocalVideoMuted()?Object(p.a)("Your camera is turned off"):Object(p.a)("Your camera is still enabled"))),t=l.a.createElement("div",{className:e},r)}E=l.a.createElement("div",{className:e,ref:this.contentRef,onMouseMove:this.onMouseMove},t,C,l.a.createElement(m.a,{feed:this.state.primaryFeed,call:this.props.call,pipMode:this.props.pipMode,onResize:this.props.onResize,primary:!0}),this.renderCallControls())}const T=this.props.pipMode?"mx_CallView_pip":"mx_CallView_large";return l.a.createElement("div",{className:"mx_CallView "+T},l.a.createElement(R.a,{onPipMouseDown:this.props.onMouseDownOnHeader,pipMode:this.props.pipMode,type:this.props.call.type,callRooms:[r,o]}),E)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o=n(79),i=n.n(o),a=n(86),s=n.n(a),c=n(78),l=n.n(c),u=n(84),d=n(376),h=n(96),p=n(132),m=n(81),g=n(375);let f=Object(m.a)("views.voip.VideoFeed")(r=class extends l.a.PureComponent{constructor(e){super(e),i()(this,"element",void 0),i()(this,"setElementRef",e=>{var t;e?(this.element=e,e.addEventListener("resize",this.onResize)):null===(t=this.element)||void 0===t||t.removeEventListener("resize",this.onResize)}),i()(this,"onNewStream",()=>{this.setState({audioMuted:this.props.feed.isAudioMuted(),videoMuted:this.props.feed.isVideoMuted()})}),i()(this,"onMuteStateChanged",()=>{this.setState({audioMuted:this.props.feed.isAudioMuted(),videoMuted:this.props.feed.isVideoMuted()})}),i()(this,"onResize",e=>{this.props.onResize&&!this.props.feed.isLocal()&&this.props.onResize(e)}),this.state={audioMuted:this.props.feed.isAudioMuted(),videoMuted:this.props.feed.isVideoMuted()}}componentDidMount(){this.updateFeed(null,this.props.feed),this.playMedia()}componentWillUnmount(){this.updateFeed(this.props.feed,null)}componentDidUpdate(e,t){this.updateFeed(e.feed,this.props.feed),t.videoMuted===this.state.videoMuted&&e.feed.stream===this.props.feed.stream||this.playMedia()}static getDerivedStateFromProps(e){return{audioMuted:e.feed.isAudioMuted(),videoMuted:e.feed.isVideoMuted()}}updateFeed(e,t){e!==t&&(e&&(this.props.feed.removeListener(d.b.NewStream,this.onNewStream),this.props.feed.removeListener(d.b.MuteStateChanged,this.onMuteStateChanged),this.stopMedia()),t&&(this.props.feed.addListener(d.b.NewStream,this.onNewStream),this.props.feed.addListener(d.b.MuteStateChanged,this.onMuteStateChanged),this.playMedia()))}playMedia(){const e=this.element;if(e){e.muted=!0,e.srcObject=this.props.feed.stream,e.autoplay=!0;try{e.play()}catch(e){h.a.info("Failed to play media element with feed",this.props.feed,e)}}}stopMedia(){const e=this.element;e&&(e.pause(),e.src=null)}render(){const{pipMode:e,primary:t,feed:n}=this.props,r=s()("mx_VideoFeed",{mx_VideoFeed_voice:this.state.videoMuted}),o=s()("mx_VideoFeed_mic",{mx_VideoFeed_mic_muted:this.state.audioMuted,mx_VideoFeed_mic_unmuted:!this.state.audioMuted});let i,a;if(n.purpose===g.b.Screenshare||e||(i=l.a.createElement("div",{className:o})),this.state.videoMuted){const n=this.props.feed.getMember();let r;e&&t?r=76:e&&!t?r=16:!e&&t&&(r=160),a=l.a.createElement(p.a,{member:n,height:r,width:r})}else{const e=s()("mx_VideoFeed_video",{mx_VideoFeed_video_mirror:this.props.feed.isLocal()&&this.props.feed.purpose===g.b.Usermedia&&u.b.getValue("VideoView.flipVideoHorizontally")});a=l.a.createElement("video",{className:e,ref:this.setElementRef})}return l.a.createElement("div",{className:r},i,a)}})||r},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(738),o={notify:function(){}};var i=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=o,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t,n;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=(e=(0,r.getBatch)(),t=null,n=null,{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=o)},e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.useIsomorphicLayoutEffect=void 0;var r=n(78),o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;t.useIsomorphicLayoutEffect=o},function(e,t,n){"use strict";n.d(t,"b",(function(){return P}));var r=n(78),o=n.n(r),i=n(86),a=n.n(i),s=n(94),c=n(752),l=n(190),u=n(80),d=n(119),h=n(85),p=n(83),m=n(91),g=n(121),f=n(87),_=n(330),b=n(127),v=n(139),y=n(178),E=n(84),S=n(174),w=n(470),C=n(106),T=n(212),x=n(476),k=n(164),F=n(113),O=n(103),R=n(369),D=n(477),I=n(172),A=n(184),N=n(143);const M=({children:e,className:t,onClick:n})=>o.a.createElement(h.a,{className:a()("mx_BaseCard_Button mx_RoomSummaryCard_Button",t),onClick:n},e),P=e=>{const[t,n]=Object(r.useState)(T.a.instance.getApps(e.roomId)),o=Object(r.useCallback)(()=>{n([...T.a.instance.getApps(e.roomId)])},[e]);return Object(r.useEffect)(o,[e,o]),Object(b.a)(T.a.instance,e.roomId,o),Object(b.a)(I.d.instance,I.d.emissionForRoom(e),o),t},L=({app:e,room:t})=>{const n=v.a.getWidgetName(e),r=v.a.getWidgetDataTitle(e),i=r&&" - "+r,s=I.d.instance.isInContainer(t,e,I.a.Top),c=s?()=>{I.d.instance.moveToContainer(t,e,I.a.Right)}:()=>{I.d.instance.moveToContainer(t,e,I.a.Top)},[l,d,h,f]=Object(O.q)();let _;if(l){const t=d.current.getBoundingClientRect();_=o.a.createElement(R.a,{chevronFace:O.a.None,right:N.b.instance.windowWidth-t.right,bottom:N.b.instance.windowHeight-t.top,onFinished:f,app:e})}const b=!s&&!I.d.instance.canAddToContainer(t,I.a.Top);let y;y=b?Object(u.a)("You can only pin up to %(count)s widgets",{count:I.b}):s?Object(u.a)("Unpin"):Object(u.a)("Pin");const E=a()("mx_BaseCard_Button mx_RoomSummaryCard_Button",{mx_RoomSummaryCard_Button_pinned:s});return o.a.createElement("div",{className:E,ref:d},o.a.createElement(C.a,{className:"mx_RoomSummaryCard_icon_app",onClick:()=>{p.a.dispatch({action:m.a.SetRightPanelPhase,phase:g.c.Widget,refireParams:{widgetId:e.id}})},title:s?Object(u.a)("Unpin a widget to view it in this panel"):"",forceHide:!s,disabled:s,yOffset:-48},o.a.createElement(w.a,{app:e}),o.a.createElement("span",null,n),i),o.a.createElement(O.d,{className:"mx_RoomSummaryCard_app_options",isExpanded:l,onClick:h,title:Object(u.a)("Options"),yOffset:-24}),o.a.createElement(C.a,{className:"mx_RoomSummaryCard_app_pinToggle",onClick:c,title:y,disabled:b,yOffset:-24}),_)},j=({room:e})=>{const t=P(e);let n=null;return t.length>0&&I.d.instance.canCopyLayoutToRoom(e)&&(n=o.a.createElement(h.a,{kind:"link",onClick:()=>I.d.instance.copyLayoutToRoom(e)},Object(u.a)("Set my room layout for everyone"))),o.a.createElement(l.a,{className:"mx_RoomSummaryCard_appsGroup",title:Object(u.a)("Widgets")},t.map(t=>o.a.createElement(L,{key:t.id,app:t,room:e})),n,o.a.createElement(h.a,{kind:"link",onClick:()=>{const t=y.a.sharedInstance();t.hasManager()?E.b.getValue("feature_many_integration_managers")?t.openAll(e):t.getPrimaryManager().open(e):t.openNoManagerDialog()}},t.length>0?Object(u.a)("Edit widgets, bridges & bots"):Object(u.a)("Add widgets, bridges & bots")))},U=()=>{p.a.dispatch({action:m.a.SetRightPanelPhase,phase:g.c.RoomMemberList})},B=()=>{p.a.dispatch({action:m.a.SetRightPanelPhase,phase:g.c.FilePanel})},G=()=>{p.a.dispatch({action:"open_room_settings"})};t.a=({room:e,onClose:t})=>{const n=Object(r.useContext)(s.a),i=Object(c.a)(n,e),h=Object(r.useContext)(k.a).e2eStatus,p=e.getCanonicalAlias()||e.getAltAliases()[0]||"",m=o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"mx_RoomSummaryCard_avatar",role:"presentation"},o.a.createElement(d.a,{room:e,height:54,width:54,viewAvatarOnClick:!0}),o.a.createElement(S.a,{tooltip:i?Object(u.a)("Encrypted"):Object(u.a)("Not encrypted"),class:a()("mx_RoomSummaryCard_e2ee",{mx_RoomSummaryCard_e2ee_normal:i,mx_RoomSummaryCard_e2ee_warning:i&&h===x.a.Warning,mx_RoomSummaryCard_e2ee_verified:i&&h===x.a.Verified})})),o.a.createElement(A.a,{room:e},e=>o.a.createElement("h2",{title:e},e)),o.a.createElement("div",{className:"mx_RoomSummaryCard_alias",title:p},p)),g=Object(D.a)(e);return o.a.createElement(l.b,{header:m,className:"mx_RoomSummaryCard",onClose:t},o.a.createElement(l.a,{title:Object(u.a)("About"),className:"mx_RoomSummaryCard_aboutGroup"},o.a.createElement(M,{className:"mx_RoomSummaryCard_icon_people",onClick:U},Object(u.a)("%(count)s people",{count:g})),o.a.createElement(M,{className:"mx_RoomSummaryCard_icon_files",onClick:B},Object(u.a)("Show files")),o.a.createElement(M,{className:"mx_RoomSummaryCard_icon_share",onClick:()=>{f.a.createTrackedDialog("share room dialog","",_.a,{target:e})}},Object(u.a)("Share room")),o.a.createElement(M,{className:"mx_RoomSummaryCard_icon_settings",onClick:G},Object(u.a)("Room settings"))),E.b.getValue(F.a.Widgets)&&o.a.createElement(j,{room:e}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(122);let o;async function i(e,t){const n=(await t.getEncryptionTargetMembers()).map(({userId:e})=>e),i=!!r.a.shared().getUserIdForRoomId(t.roomId),a=[],s=[];n.filter(t=>t!==e.getUserId()).forEach(t=>{(e.checkUserTrust(t).isCrossSigningVerified()?a:s).push(t)});for(const t of s)if(e.checkUserTrust(t).wasCrossSigningVerified())return o.Warning;const c=a.length>0&&!i&&2!==n.length||1===n.length?[...a,e.getUserId()]:a;for(const t of c){if(e.getStoredDevicesForUser(t).some(({deviceId:n})=>!e.checkDeviceTrust(t,n).isVerified()))return o.Warning}return 0===s.length?o.Verified:o.Normal}!function(e){e.Warning="warning",e.Verified="verified",e.Normal="normal"}(o||(o={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(78),o=n(127),i=n(107);const a=(e,t=250)=>{const[n,a]=Object(r.useState)(e.getJoinedMembers());return Object(o.a)(e.currentState,"RoomState.members",Object(i.throttle)(()=>{a(e.getJoinedMembers())},t,{leading:!0,trailing:!0})),n},s=(e,t=250)=>{const[n,a]=Object(r.useState)(e.getJoinedMemberCount());return Object(o.a)(e.currentState,"RoomState.members",Object(i.throttle)(()=>{a(e.getJoinedMemberCount())},t,{leading:!0,trailing:!0})),n}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return p}));var r=n(78),o=n.n(r),i=n(87),a=n(89),s=n(312),c=n(80),l=n(82),u=n(123),d=n(137);function h(e){return new Promise((t,n)=>{const r=o.a.createElement("div",null,o.a.createElement("div",null,Object(c.a)("Who would you like to add to this community?")),o.a.createElement("div",{className:"warning"},Object(c.a)("Warning: any person you add to a community will be publicly visible to anyone who knows the community ID"))),l=a.getComponent("dialogs.AddressPickerDialog");i.a.createTrackedDialog("Group Invite","",l,{title:Object(c.a)("Invite new community members"),description:r,placeholder:Object(c.a)("Name or Matrix ID"),button:Object(c.a)("Invite to Community"),validAddressTypes:["mx-user-id"],onFinished:(r,o)=>{r&&function(e,t){const n=new s.a(e),r=t.map(e=>e.address);return n.invite(r).then(n=>{const r=[];for(const e of Object.keys(n))"error"===t[e]&&r.push(e);if(r.length>0){const t=a.getComponent("dialogs.ErrorDialog");i.a.createTrackedDialog("Failed to invite the following users to the group","",t,{title:Object(c.a)("Failed to invite the following users to %(groupId)s:",{groupId:e}),description:r.join(", ")})}}).catch(t=>{const n=a.getComponent("dialogs.ErrorDialog");i.a.createTrackedDialog("Failed to invite users to group","",n,{title:Object(c.a)("Failed to invite users to community"),description:Object(c.a)("Failed to invite users to %(groupId)s",{groupId:e})})})}(e,o).then(t,n)}},null,!1,!0)})}function p(e){return new Promise((t,n)=>{let r=!1;const s=o.a.createElement("div",null,o.a.createElement("div",null,Object(c.a)("Which rooms would you like to add to this community?"))),h=o.a.createElement(d.a,{className:"mx_GroupAddressPicker_checkboxContainer",onChange:e=>{r=e.target.checked}},Object(c.a)("Show these rooms to non-members on the community page and room list?")),p=a.getComponent("dialogs.AddressPickerDialog");i.a.createTrackedDialog("Add Rooms to Group","",p,{title:Object(c.a)("Add rooms to the community"),description:s,extraNode:h,placeholder:Object(c.a)("Room name or address"),button:Object(c.a)("Add to community"),pickerType:"room",validAddressTypes:["mx-room-id"],onFinished:(o,s)=>{o&&function(e,t,n){const r=l.a.get(),o=[];return Promise.allSettled(t.map(t=>u.a.addRoomToGroup(e,t.address,n).catch(()=>{o.push(t.address)}).then(()=>{const n=t.address,o=r.getRoom(n);if(!o||!o.currentState.mayClientSendStateEvent("m.room.related_groups",r))return;const i=o.currentState.getStateEvents("m.room.related_groups",""),a=i&&i.getContent().groups||[];return a.includes(e)?void 0:(a.push(e),l.a.get().sendStateEvent(n,"m.room.related_groups",{groups:a},""))}))).then(()=>{if(0===o.length)return;const t=a.getComponent("dialogs.ErrorDialog");i.a.createTrackedDialog("Failed to add the following room to the group","",t,{title:Object(c.a)("Failed to add the following rooms to %(groupId)s:",{groupId:e}),description:o.join(", ")})})}(e,s,r).then(t,n)}},null,!1,!0)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(388),p=n(80),m=n(101),g=n(104),f=n(81);let _=Object(f.a)("views.elements.PowerSelector")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"onSelectChange",e=>{"SELECT_VALUE_CUSTOM"===e.target.value?this.setState({custom:!0}):(this.props.onChange(e.target.value,this.props.powerLevelKey),this.setState({selectValue:e.target.value}))}),s()(this,"onCustomChange",e=>{this.setState({customValue:e.target.value})}),s()(this,"onCustomBlur",e=>{e.preventDefault(),e.stopPropagation(),this.props.onChange(parseInt(this.state.customValue),this.props.powerLevelKey)}),s()(this,"onCustomKeyDown",e=>{e.key===g.a.ENTER&&(e.preventDefault(),e.stopPropagation(),e.target.blur())}),this.state={levelRoleMap:{},options:[],customValue:this.props.value,selectValue:0}}UNSAFE_componentWillMount(){this._initStateFromProps(this.props)}UNSAFE_componentWillReceiveProps(e){this._initStateFromProps(e)}_initStateFromProps(e){const t=h.a(e.usersDefault),n=Object.keys(t).filter(t=>void 0===t||t<=e.maxValue||t==e.value),r=void 0===t[e.value];this.setState({levelRoleMap:t,options:n,custom:r,customLevel:e.value,selectValue:r?"SELECT_VALUE_CUSTOM":e.value})}render(){let e;const t=void 0===this.props.label?Object(p.a)("Power level"):this.props.label;if(this.state.custom)e=l.a.createElement(m.a,{type:"number",label:t,max:this.props.maxValue,onBlur:this.onCustomBlur,onKeyDown:this.onCustomKeyDown,onChange:this.onCustomChange,value:String(this.state.customValue),disabled:this.props.disabled});else{let n=this.state.options.map(e=>({value:e,text:h.b(e,this.props.usersDefault)}));n.push({value:"SELECT_VALUE_CUSTOM",text:Object(p.a)("Custom level")}),n=n.map(e=>l.a.createElement("option",{value:e.value,key:e.value},e.text)),e=l.a.createElement(m.a,{element:"select",label:t,onChange:this.onSelectChange,value:String(this.state.selectValue),disabled:this.props.disabled},n)}return l.a.createElement("div",{className:"mx_PowerSelector"},e)}},s()(o,"propTypes",{value:d.a.number.isRequired,maxValue:d.a.number.isRequired,usersDefault:d.a.number.isRequired,disabled:d.a.bool,onChange:d.a.func,powerLevelKey:d.a.string,label:d.a.string}),s()(o,"defaultProps",{maxValue:1/0,usersDefault:0}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(93),l=n(136),u=n(80),d=n(90),h=n(165),p=n(82),m=n(87),g=n(81),f=n(223),_=n(95),b=n(116);let v=Object(g.a)("views.dialogs.RoomUpgradeWarningDialog")(r=class extends s.a.Component{constructor(e){var t;super(e),i()(this,"isPrivate",void 0),i()(this,"currentVersion",void 0),i()(this,"onContinue",()=>{this.props.onFinished({continue:!0,invite:this.isPrivate&&this.state.inviteUsersToNewRoom})}),i()(this,"onCancel",()=>{this.props.onFinished({continue:!1,invite:!1})}),i()(this,"onInviteUsersToggle",e=>{this.setState({inviteUsersToNewRoom:e})}),i()(this,"openBugReportDialog",e=>{e.preventDefault(),e.stopPropagation(),m.a.createTrackedDialog("Bug Report Dialog","",f.a,{})});const n=p.a.get().getRoom(this.props.roomId),r=null==n?void 0:n.currentState.getStateEvents(c.a.RoomJoinRules,"");this.isPrivate=null===(t=(null==r?void 0:r.getContent().join_rule)!==l.c.Public)||void 0===t||t,this.currentVersion=(null==n?void 0:n.getVersion())||"1",this.state={inviteUsersToNewRoom:!0}}render(){const e=d.a.get().brand;let t=null;this.isPrivate&&(t=s.a.createElement(h.a,{value:this.state.inviteUsersToNewRoom,onChange:this.onInviteUsersToggle,label:Object(u.a)("Automatically invite members from this room to the new one")}));const n=this.isPrivate?Object(u.a)("Upgrade private room"):Object(u.a)("Upgrade public room");let r=s.a.createElement("p",null,Object(u.a)("This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please report a bug.",{brand:e}));return d.a.get().bug_report_endpoint_url&&(r=s.a.createElement("p",null,Object(u.a)("This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please <a>report a bug</a>.",{brand:e},{a:e=>s.a.createElement("a",{href:"#",onClick:this.openBugReportDialog},e)}))),s.a.createElement(_.a,{className:"mx_RoomUpgradeWarningDialog",hasCancel:!0,fixedWidth:!1,onFinished:this.props.onFinished,title:n},s.a.createElement("div",null,s.a.createElement("p",null,this.props.description||Object(u.a)("Upgrading a room is an advanced action and is usually recommended when a room is unstable due to bugs, missing features or security vulnerabilities.")),s.a.createElement("p",null,Object(u.a)("<b>Please note upgrading will make a new version of the room</b>. All current messages will stay in this archived room.",{},{b:e=>s.a.createElement("b",null,e)})),r,s.a.createElement("p",null,Object(u.a)("You'll upgrade this room from <oldVersion /> to <newVersion />.",{},{oldVersion:()=>s.a.createElement("code",null,this.currentVersion),newVersion:()=>s.a.createElement("code",null,this.props.targetVersion)})),t),s.a.createElement(b.a,{primaryButton:Object(u.a)("Upgrade"),onPrimaryButtonClick:this.onContinue,cancelButton:Object(u.a)("Cancel"),onCancel:this.onCancel}))}})||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(132),a=n(80),s=n(336),c=n(85),l=n(140);const u=({events:e,children:t,threshold:n=3,onToggle:l,startExpanded:u,summaryMembers:d=[],summaryText:h,layout:p})=>{const[m,g]=Object(s.a)(u);Object(r.useEffect)(()=>{l&&l()},[m]);const f=e.map(e=>e.getId()).join(",");if(e.length<n)return o.a.createElement("li",{className:"mx_EventListSummary","data-scroll-tokens":f,"data-expanded":!0,"data-layout":p},t);let _;if(m)_=o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"mx_EventListSummary_line"}," "),t);else{const e=d.map(e=>o.a.createElement(i.a,{key:e.userId,member:e,width:14,height:14}));_=o.a.createElement("div",{className:"mx_EventTile_line"},o.a.createElement("div",{className:"mx_EventTile_info"},o.a.createElement("span",{className:"mx_EventListSummary_avatars",onClick:g},e),o.a.createElement("span",{className:"mx_TextualEvent mx_EventListSummary_summary"},h)))}return o.a.createElement("li",{className:"mx_EventListSummary","data-scroll-tokens":f,"data-expanded":m+"","data-layout":p},o.a.createElement(c.a,{className:"mx_EventListSummary_toggle",onClick:g,"aria-expanded":m},m?Object(a.a)("collapse"):Object(a.a)("expand")),_)};u.defaultProps={startExpanded:!1,layout:l.a.Group},t.a=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r,o=n(78),i=n.n(o),a=n(80),s=n(148),c=n(81);let l=Object(c.a)("views.messages.DateSeparator")(r=class extends i.a.Component{getLabel(){const e=new Date(this.props.ts),t=new Date,n=new Date,r=[Object(a.a)("Sunday"),Object(a.a)("Monday"),Object(a.a)("Tuesday"),Object(a.a)("Wednesday"),Object(a.a)("Thursday"),Object(a.a)("Friday"),Object(a.a)("Saturday")];return n.setDate(t.getDate()-1),e.toDateString()===t.toDateString()?Object(a.a)("Today"):e.toDateString()===n.toDateString()?Object(a.a)("Yesterday"):t.getTime()-e.getTime()<5184e5?r[e.getDay()]:Object(s.d)(e)}render(){return i.a.createElement("h2",{className:"mx_DateSeparator",role:"separator",tabIndex:-1},i.a.createElement("hr",{role:"none"}),i.a.createElement("div",null,this.getLabel()),i.a.createElement("hr",{role:"none"}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(86),h=n.n(d),p=n(124),m=n(106),g=n(81);const f=["isHighlighted","onClick","analytics","name","title"];var _;let b=Object(g.a)("views.right_panel.HeaderButton")(_=class extends u.a.Component{constructor(...e){super(...e),c()(this,"onClick",()=>{p.a.trackEvent(...this.props.analytics),this.props.onClick()})}render(){const e=this.props,{isHighlighted:t,onClick:n,analytics:r,name:i,title:s}=e,c=a()(e,f),l=h()({mx_RightPanel_headerButton:!0,mx_RightPanel_headerButton_highlight:t,["mx_RightPanel_"+i]:!0});return u.a.createElement(m.a,o()({},c,{"aria-selected":t,role:"tab",title:s,className:l,onClick:this.onClick}))}})||_},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(83),l=n(251),u=n(91),d=n(81);let h;!function(e){e.Room="room",e.Group="group"}(h||(h={}));let p=Object(d.a)("views.right_panel.HeaderButtons")(r=class extends s.a.Component{constructor(e,t){super(e),i()(this,"storeToken",void 0),i()(this,"dispatcherRef",void 0);const n=l.a.getSharedInstance();this.state={headerKind:t,phase:t===h.Room?n.visibleRoomPanelPhase:n.visibleGroupPanelPhase}}componentDidMount(){this.storeToken=l.a.getSharedInstance().addListener(this.onRightPanelUpdate.bind(this)),this.dispatcherRef=c.a.register(this.onAction.bind(this))}componentWillUnmount(){this.storeToken&&this.storeToken.remove(),this.dispatcherRef&&c.a.unregister(this.dispatcherRef)}setPhase(e,t){c.a.dispatch({action:u.a.SetRightPanelPhase,phase:e,refireParams:t})}isPhase(e){return Array.isArray(e)?e.includes(this.state.phase):e===this.state.phase}onRightPanelUpdate(){const e=l.a.getSharedInstance();this.state.headerKind===h.Room?this.setState({phase:e.visibleRoomPanelPhase}):this.state.headerKind===h.Group&&this.setState({phase:e.visibleGroupPanelPhase})}render(){return s.a.createElement("div",{className:"mx_HeaderButtons"},this.renderButtons())}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(81),d=n(86),h=n.n(d);let p=Object(u.a)("views.audio_messages.Waveform")((i=o=class extends l.a.PureComponent{render(){return l.a.createElement("div",{className:"mx_Waveform"},this.props.relHeights.map((e,t)=>{const n=this.props.progress,r=t/this.props.relHeights.length<=n&&n>0,o=h()({mx_Waveform_bar:!0,mx_Waveform_bar_100pct:r});return l.a.createElement("span",{key:t,style:{"--barHeight":e},className:o})}))}},s()(o,"defaultProps",{progress:1}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o=n(78),i=n.n(o),a=n(487),s=n(488),c=n(81),l=n(144),u=n(799),d=n(489);let h=Object(c.a)("views.audio_messages.RecordingPlayback")(r=class extends d.a{get isWaveformable(){return this.props.tileShape!==l.a.Notif&&this.props.tileShape!==l.a.FileGrid&&this.props.tileShape!==l.a.Pinned}renderComponent(){const e=this.isWaveformable?"":"mx_VoiceMessagePrimaryContainer_noWaveform";return i.a.createElement("div",{className:"mx_MediaBody mx_VoiceMessagePrimaryContainer "+e},i.a.createElement(a.a,{playback:this.props.playback,playbackPhase:this.state.playbackPhase}),i.a.createElement(s.a,{playback:this.props.playback}),this.isWaveformable&&i.a.createElement(u.a,{playback:this.props.playback}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(81),h=n(106),p=n(80),m=n(204),g=n(86),f=n.n(g);const _=["playback","playbackPhase"];var b;let v=Object(d.a)("views.audio_messages.PlayPauseButton")(b=class extends u.a.PureComponent{constructor(e){super(e),c()(this,"onClick",()=>{this.toggleState()})}async toggleState(){await this.props.playback.toggle()}render(){const e=this.props,{playback:t,playbackPhase:n}=e,r=a()(e,_),i=t.isPlaying,s=n===m.d.Decoding,c=f()("mx_PlayPauseButton",{mx_PlayPauseButton_play:!i,mx_PlayPauseButton_pause:i,mx_PlayPauseButton_disabled:s});return u.a.createElement(h.a,o()({className:c,title:i?Object(p.a)("Pause"):Object(p.a)("Play"),onClick:this.onClick,disabled:s},r))}})||b},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(81),l=n(350),u=n(204),d=n(115);let h=Object(c.a)("views.audio_messages.PlaybackClock")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"onPlaybackUpdate",e=>{e===u.d.Decoding&&(e=u.d.Stopped),this.setState({playbackPhase:e})}),i()(this,"onTimeUpdate",e=>{this.setState({seconds:e[0],durationSeconds:e[1]})}),this.state={seconds:this.props.playback.clockInfo.timeSeconds,durationSeconds:this.props.playback.clockInfo.durationSeconds,playbackPhase:u.d.Stopped},this.props.playback.on(d.b,this.onPlaybackUpdate),this.props.playback.clockInfo.liveData.onUpdate(this.onTimeUpdate)}render(){let e=this.state.seconds;return this.state.playbackPhase===u.d.Stopped&&(e=Number.isFinite(this.props.defaultDisplaySeconds)?this.props.defaultDisplaySeconds:this.state.durationSeconds),s.a.createElement(l.a,{seconds:e})}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o=n(79),i=n.n(o),a=n(204),s=n(78),c=n.n(s),l=n(115),u=n(81),d=n(80);let h=Object(u.a)("views.audio_messages.AudioPlayerBase")(r=class extends c.a.PureComponent{constructor(e){super(e),i()(this,"onPlaybackUpdate",e=>{this.setState({playbackPhase:e})}),this.state={playbackPhase:a.d.Decoding},this.props.playback.on(l.b,this.onPlaybackUpdate),this.props.playback.prepare().catch(e=>{console.error("Error processing audio file:",e),this.setState({error:!0})})}render(){return c.a.createElement(c.a.Fragment,null,this.renderComponent(),this.state.error&&c.a.createElement("div",{className:"text-warning"},Object(d.a)("Error downloading audio")))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),o=n.n(r);const i=(e,t,n)=>""===n.text[t].trim();class a{constructor(e,t,n=t){this.model=e,o()(this,"_start",void 0),o()(this,"_end",void 0);const r=t.compare(n)<0;this._start=r?t:n,this._end=r?n:t}moveStart(e){this._start=this._start.forwardsWhile(this.model,()=>(e-=1)>=0)}trim(){this._start=this._start.forwardsWhile(this.model,i),this._end=this._end.backwardsWhile(this.model,i)}expandBackwardsWhile(e){this._start=this._start.backwardsWhile(this.model,e)}get text(){let e="";return this._start.iteratePartsBetween(this._end,this.model,(t,n,r)=>{const o=t.text.substring(n,r);e+=o}),e}replace(e){const t=e.reduce((e,t)=>e+t.text.length,0);let n=0;return this._start.iteratePartsBetween(this._end,this.model,(e,t,r)=>{n+=r-t}),this.model.replaceRange(this._start,this._end,e),t-n}get parts(){const e=[];return this._start.iteratePartsBetween(this._end,this.model,(t,n,r)=>{const o=t.serialize();o.text=t.text.substring(n,r);const i=this.model.partCreator.deserializePart(o);e.push(i)}),e}get length(){let e=0;return this._start.iteratePartsBetween(this._end,this.model,(t,n,r)=>{e+=r-n}),e}get start(){return this._start}get end(){return this._end}}},function(e,t,n){"use strict";function r(e,t){const n=!t||"newline"===t.type;return!e.canEdit&&(n||!t.canEdit)}function o(e,t){return!e.canEdit&&t}function i(e,t){const n=e.nextSibling;n?e.parentElement.insertBefore(t,n):e.parentElement.appendChild(t)}n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return d}));const a="\ufeff";function s(){const e=document.createElement("span");return e.className="caretNode",e.appendChild(document.createTextNode(a)),e}function c(e){e.textContent!==a&&(e.textContent=a)}function l(e){return e&&"SPAN"===e.tagName&&"caretNode"===e.className}function u(e){if(e)for(e=e.nextSibling;e;){const t=e;e=e.nextSibling,t.remove()}}function d(e,t){const n=t.parts.reduce((e,t)=>{if("newline"===t.type)e.push([]);else{e[e.length-1].push(t)}return e},[[]]);n.forEach((t,n)=>{let a=e.childNodes[n];for(;a&&("DIV"!==a.tagName||a.className);)e.removeChild(a),a=e.childNodes[n];a||(a=document.createElement("div"),e.appendChild(a)),t.length?function(e,t){let n,a;const d=t[t.length-1];for(const u of t){for(n=!a?e.firstChild:n.nextSibling,r(u,a)&&(l(n)?(c(n),n=n.nextSibling):e.insertBefore(s(),n));n&&!u.canUpdateDOMNode(n);){const t=n.nextSibling;e.removeChild(n),n=t}if(n&&u?u.updateDOMNode(n):u&&(n=u.toDOMNode(),e.appendChild(n)),o(u,u===d))if(l(n.nextSibling))n=n.nextSibling,c(n);else{const e=s();i(n,e),n=e}a=u}u(n)}(a,t):function(e){let t=!1,n=e.firstChild;for(;n;){const e=n.nextSibling;t||"BR"!==n.tagName?n.remove():t=!0,n=e}t||e.appendChild(document.createElement("br"))}(a)}),n.length?u(e.children[n.length-1]):function(e){const t=e.firstChild;t&&(u(t),t.remove())}(e)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c}));var r=n(491),o=n(801);function i(e,t,n){let r=e.firstChild;for(;r&&r!==e;){if(t(r)&&r.firstChild)r=r.firstChild;else if(r.nextSibling)r=r.nextSibling;else{for(;!r.nextSibling&&r!==e;)r=r.parentElement,r!==e&&n(r);r!==e&&(r=r.nextSibling)}}}function a(e,t){const{offset:n,text:r}=s(e,t.focusNode,t.focusOffset);return{caret:n,text:r}}function s(e,t,n){const{node:a,characterOffset:s}=function(e,t){for(;e&&e.nodeType===Node.ELEMENT_NODE;){const n=e.childNodes.length;if(!n)break;t>=n?t=(e=e.lastChild).nodeType===Node.TEXT_NODE?e.textContent.length:Number.MAX_SAFE_INTEGER:(e=e.childNodes[t],t=0)}return{node:e,characterOffset:t}}(t,n),{text:c,offsetToNode:l}=function(e,t){let n=0,o=!1,a="";function s(e){o||e===t&&(o=!0),"BR"===e.tagName&&e.nextSibling&&(o||(n+=1),a+="\n");const i=e.nodeType===Node.TEXT_NODE&&function(e){const t=e.nodeValue;return Object(r.b)(e.parentElement)?1!==t.length?t.replace(r.a,""):"":t}(e);return i&&(o||(n+=i.length),a+=i),!0}function c(e){"DIV"===e.tagName&&e.nextSibling&&"DIV"===e.nextSibling.tagName&&(a+="\n",o||(n+=1))}return i(e,s,c),{text:a,offsetToNode:n}}(e,a);return{offset:function(e,t,n){if(!e)return new o.a(0,!1);let i=n===e.textContent.length;if(e.nodeType===Node.TEXT_NODE&&Object(r.b)(e.parentElement)){const t=e.nodeValue.indexOf(r.a);-1!==t&&t<n&&(n-=1),i=!0}return new o.a(t+n,i)}(a,l,s),text:c}}function c(e,t,n){const r=s(e,n.focusNode,n.focusOffset).offset,o=s(e,n.anchorNode,n.anchorOffset).offset,i=r.asPosition(t),a=o.asPosition(t);return t.startRange(i,a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(90),o=n(80),i=n(84),a=n(111),s=n(78),c=n.n(s),l=n(98),u=n(387);function d(e){Object(o.d)()!==e&&(i.b.setValue("language",null,l.a.DEVICE,e),a.a.get().reload())}function h({disabled:e}){return r.a.get().disable_login_language_selector?c.a.createElement("div",null):c.a.createElement(u.a,{className:"mx_AuthBody_language",onOptionChange:d,value:Object(o.d)(),disabled:e})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(89),p=n(80),m=n(85),g=n(354),f=n(203),_=n(81);let b=Object(_.a)("views.dialogs.InteractiveAuthDialog")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{authError:null,uiaStage:null,uiaStagePhase:null}),s()(this,"_onAuthFinished",(e,t)=>{e?this.props.onFinished(!0,t):t===g.a?this.props.onFinished(!1,null):this.setState({authError:t})}),s()(this,"_onUpdateStagePhase",(e,t)=>{this.setState({uiaStage:e,uiaStagePhase:t})}),s()(this,"_onDismissClick",()=>{this.props.onFinished(!1)})}_getDefaultDialogAesthetics(){const e={[f.c.PHASE_PREAUTH]:{title:Object(p.a)("Use Single Sign On to continue"),body:Object(p.a)("To continue, use Single Sign On to prove your identity."),continueText:Object(p.a)("Single Sign On"),continueKind:"primary"},[f.c.PHASE_POSTAUTH]:{title:Object(p.a)("Confirm to continue"),body:Object(p.a)("Click the button below to confirm your identity."),continueText:Object(p.a)("Confirm"),continueKind:"primary"}};return{[f.c.LOGIN_TYPE]:e,[f.c.UNSTABLE_LOGIN_TYPE]:e}}render(){const e=h.getComponent("structures.InteractiveAuth"),t=h.getComponent("views.dialogs.BaseDialog");let n=this.state.authError?"Error":this.props.title||Object(p.a)("Authentication"),r=this.state.authError?null:this.props.body,o=null,i=null;const a=this.props.aestheticsForStagePhases||this._getDefaultDialogAesthetics();if(!this.state.authError&&a&&a[this.state.uiaStage]){const e=a[this.state.uiaStage][this.state.uiaStagePhase];e&&e.title&&(n=e.title),e&&e.body&&(r=e.body),e&&e.continueText&&(o=e.continueText),e&&e.continueKind&&(i=e.continueKind)}let s;return s=this.state.authError?l.a.createElement("div",{id:"mx_Dialog_content"},l.a.createElement("div",{role:"alert"},this.state.authError.message||this.state.authError.toString()),l.a.createElement("br",null),l.a.createElement(m.a,{onClick:this._onDismissClick,className:"mx_GeneralButton",autoFocus:"true"},Object(p.a)("Dismiss"))):l.a.createElement("div",{id:"mx_Dialog_content"},r,l.a.createElement(e,{ref:this._collectInteractiveAuth,matrixClient:this.props.matrixClient,authData:this.props.authData,makeRequest:this.props.makeRequest,onAuthFinished:this._onAuthFinished,onStagePhaseChange:this._onUpdateStagePhase,continueText:o,continueKind:i})),l.a.createElement(t,{className:"mx_InteractiveAuthDialog",onFinished:this.props.onFinished,title:n,contentId:"mx_Dialog_content"},s)}},s()(o,"propTypes",{matrixClient:d.a.object.isRequired,authData:d.a.shape({flows:d.a.array,params:d.a.object,session:d.a.string}),makeRequest:d.a.func.isRequired,onFinished:d.a.func.isRequired,title:d.a.string,body:d.a.string,aestheticsForStagePhases:d.a.object}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(82),o=n(80);function i(e,t){const n=r.a.get().getRoom(t),o=n&&n.getMember(e);return o?o.name:e}function a(e,t){const n=i(e,t);return n!==e?Object(o.a)("%(name)s (%(userId)s)",{name:n,userId:e}):e}},function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return f}));var r=n(78),o=n.n(r),i=n(80),a=n(90),s=n(158),c=n(133),l=n(110),u=n(835),d=n(111),h=n(87);function p(e){const t=e.split("-");return 5===t.length&&"react"===t[1]&&"js"===t[3]}function m(){d.a.get().installUpdate()}const g=(e,t,n)=>{let r,g=Object(i.a)("What's new?");n?r=()=>{h.a.createTrackedDialog("Display release notes","",l.a,{title:Object(i.a)("What's New"),description:o.a.createElement("pre",null,n),button:Object(i.a)("Update"),onFinished:e=>{e&&d.a.get()&&d.a.get().installUpdate()}})}:p(e)&&p(t)?r=()=>{h.a.createTrackedDialog("Display Changelog","",u.a,{version:e,newVersion:t,onFinished:e=>{e&&d.a.get()&&d.a.get().installUpdate()}})}:(r=m,g=Object(i.a)("Update"));const f=a.a.get().brand;c.a.sharedInstance().addOrReplaceToast({key:"update",title:Object(i.a)("Update %(brand)s",{brand:f}),props:{description:Object(i.a)("New version of %(brand)s is available",{brand:f}),acceptLabel:g,onAccept:r,rejectLabel:Object(i.a)("Dismiss"),onReject:function(){d.a.get().deferUpdate(t)}},component:s.a,priority:20})},f=()=>{c.a.sharedInstance().dismissToast("update")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o=n(78),i=n.n(o),a=n(86),s=n.n(a),c=n(108),l=n(196),u=n(144),d=n(84),h=n(140),p=n(113),m=n(81);let g=Object(m.a)("views.elements.EventTilePreview")(r=class extends i.a.Component{constructor(e){super(e),this.state={message:e.message}}fakeEvent({message:e}){const t={type:"m.room.message",sender:this.props.userId,content:{"m.new_content":{msgtype:"m.text",body:e,displayname:this.props.displayName,avatar_url:this.props.avatarUrl},msgtype:"m.text",body:e,displayname:this.props.displayName,avatar_url:this.props.avatarUrl},unsigned:{age:97},event_id:"$9999999999999999999999999999999999999999999",room_id:"!999999999999999999:example.org"},n=new c.b(t);return n.sender={name:this.props.displayName||this.props.userId,rawDisplayName:this.props.displayName,userId:this.props.userId,getAvatarUrl:(...e)=>l.c({avatarUrl:this.props.avatarUrl},32,32,"crop"),getMxcAvatarUrl:()=>this.props.avatarUrl},n}render(){const e=this.fakeEvent(this.state),t=s()(this.props.className,{mx_IRCLayout:this.props.layout==h.a.IRC,mx_GroupLayout:this.props.layout==h.a.Group});return i.a.createElement("div",{className:t},i.a.createElement(u.b,{mxEvent:e,layout:this.props.layout,enableFlair:d.b.getValue(p.a.Flair),as:"div"}))}})||r},function(e,t,n){"use strict";var r=SyntaxError,o=Function,i=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var c=function(){throw new i},l=s?function(){try{return c}catch(e){try{return s(arguments,"callee").get}catch(e){return c}}}():c,u=n(1402)(),d=Object.getPrototypeOf||function(e){return e.__proto__},h={},p="undefined"==typeof Uint8Array?void 0:d(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":u?d([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?d(d([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?d((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?d((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?d(""[Symbol.iterator]()):void 0,"%Symbol%":u?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":l,"%TypedArray%":p,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},f=n(499),_=n(1405),b=f.call(Function.call,Array.prototype.concat),v=f.call(Function.apply,Array.prototype.splice),y=f.call(Function.call,String.prototype.replace),E=f.call(Function.call,String.prototype.slice),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,w=/\\(\\)?/g,C=function(e){var t=E(e,0,1),n=E(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var o=[];return y(e,S,(function(e,t,n,r){o[o.length]=n?y(r,w,"$1"):t||e})),o},T=function(e,t){var n,o=e;if(_(g,o)&&(o="%"+(n=g[o])[0]+"%"),_(m,o)){var s=m[o];if(s===h&&(s=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=d(o.prototype))}return m[t]=n,n}(o)),void 0===s&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:o,value:s}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new i('"allowMissing" argument must be a boolean');var n=C(e),o=n.length>0?n[0]:"",a=T("%"+o+"%",t),c=a.name,l=a.value,u=!1,d=a.alias;d&&(o=d[0],v(n,b([0,1],d)));for(var h=1,p=!0;h<n.length;h+=1){var g=n[h],f=E(g,0,1),y=E(g,-1);if(('"'===f||"'"===f||"`"===f||'"'===y||"'"===y||"`"===y)&&f!==y)throw new r("property names with quotes must have matching quotes");if("constructor"!==g&&p||(u=!0),_(m,c="%"+(o+="."+g)+"%"))l=m[c];else if(null!=l){if(!(g in l)){if(!t)throw new i("base intrinsic for "+e+" exists, but the property is not available.");return}if(s&&h+1>=n.length){var S=s(l,g);l=(p=!!S)&&"get"in S&&!("originalValue"in S.get)?S.get:l[g]}else p=_(l,g),l=l[g];p&&!u&&(m[c]=l)}}return l}},function(e,t,n){"use strict";var r=n(1404);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";var r=String.prototype.replace,o=/%20/g,i="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:a}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return V}));var r=n(79),o=n.n(r),i=n(86),a=n.n(i),s=n(78),c=n.n(s),l=n(805),u=n.n(l);class d{constructor(){o()(this,"stack",[]),o()(this,"newlyTypedCharCount",0),o()(this,"currentIndex",-1),o()(this,"changedSinceLastPush",!1),o()(this,"lastCaret",null),o()(this,"nonWordBoundarySinceLastPush",!1),o()(this,"addedSinceLastPush",!1),o()(this,"removedSinceLastPush",!1)}clear(){this.stack=[],this.newlyTypedCharCount=0,this.currentIndex=-1,this.changedSinceLastPush=!1,this.lastCaret=null,this.nonWordBoundarySinceLastPush=!1,this.addedSinceLastPush=!1,this.removedSinceLastPush=!1}shouldPush(e,t){if(t&&("insertText"===e||"deleteContentForward"===e||"deleteContentBackward"===e)){if(t.added&&(this.addedSinceLastPush=!0),t.removed&&(this.removedSinceLastPush=!0),this.addedSinceLastPush!==this.removedSinceLastPush){const e=t.added?t.added:t.removed,n=" "===e||"\t"===e||"\n"===e;return!(!this.nonWordBoundarySinceLastPush||!n)||(n||(this.nonWordBoundarySinceLastPush=!0),this.newlyTypedCharCount+=e.length,this.newlyTypedCharCount>10)}return!0}return!0}pushState(e,t){for(;this.currentIndex<this.stack.length-1;)this.stack.pop();const n=e.serializeParts();this.stack.push({parts:n,caret:t}),this.currentIndex=this.stack.length-1,this.lastCaret=null,this.changedSinceLastPush=!1,this.newlyTypedCharCount=0,this.nonWordBoundarySinceLastPush=!1,this.addedSinceLastPush=!1,this.removedSinceLastPush=!1}tryPush(e,t,n,r){if("historyUndo"===n||"historyRedo"===n)return!1;const o=this.shouldPush(n,r);return o?this.pushState(e,t):(this.lastCaret=t,this.changedSinceLastPush=!0),o}ensureLastChangesPushed(e){this.changedSinceLastPush&&this.pushState(e,this.lastCaret)}canUndo(){return this.currentIndex>=1||this.changedSinceLastPush}canRedo(){return this.currentIndex<this.stack.length-1}undo(e){if(this.canUndo())return this.ensureLastChangesPushed(e),this.currentIndex-=1,this.stack[this.currentIndex]}redo(){if(this.canRedo())return this.changedSinceLastPush=!1,this.currentIndex+=1,this.stack[this.currentIndex]}}var h=n(491),p=n(490);function m(e,t,n){n instanceof p.a?function(e,t,n){const r=document.getSelection();r.removeAllRanges();const o=document.createRange(),i=g(e,t,n.start);o.setStart(i.node,i.offset);const a=g(e,t,n.end);o.setEnd(a.node,a.offset),r.addRange(o)}(e,t,n):function(e,t,n){const r=document.createRange(),{node:o,offset:i}=g(e,t,n);r.setStart(o,i),r.collapse(!0);const a=document.getSelection();if(1===a.rangeCount){const e=a.getRangeAt(0);if(e.startContainer===r.startContainer&&e.startOffset===r.startOffset&&e.collapsed===r.collapsed)return}a.removeAllRanges(),a.addRange(r)}(e,t,n)}function g(e,t,n){const{offset:r,lineIndex:o,nodeIndex:i}=function(e,t){const{parts:n}=e,r=t.index,o=function(e,t){let n=0,r=-1,o=null;for(let i=0;i<=t;++i){const a=e[i];if("newline"===a.type)n+=1,r=-1,o=null;else{if(r+=1,Object(h.d)(a,o)&&(r+=1),i<t){const t=e[i+1],n=!t||"newline"===t.type;Object(h.c)(a,n)&&(r+=1)}o=a}}return{lineIndex:n,nodeIndex:r}}(n,r),{lineIndex:i}=o;let{nodeIndex:a}=o,{offset:s}=t;-1===a?s=0:({nodeIndex:a,offset:s}=function(e,t,n,r){const o=e[t];if(o&&!o.canEdit)if(0===r){n-=1;const i=e[t-1];Object(h.d)(o,i)||(r=i.text.length)}else n+=1,r=0;return{nodeIndex:n,offset:r}}(n,r,a,s));return{lineIndex:i,nodeIndex:a,offset:s}}(t,n),a=e.childNodes[o];let s;return-1===i?s=a:(s=a.childNodes[i],s.nodeType===Node.ELEMENT_NODE&&s.firstChild&&(s=s.firstChild)),{node:s,offset:r}}function f(e,t){const{model:n}=e;n.transform(()=>{const r=e.length,o=e.replace(t),i=e.start.asOffset(n),a=i.add(r+o);return n.startRange(i.asPosition(n),a.asPosition(n))})}function _(e,t){const{model:n}=e;n.transform(()=>{const r=e.length,o=e.replace(t);return e.start.asOffset(n).add(r+o).asPosition(n)})}function b(e){const{model:t}=e,n=0!==e.start.offset,r=0===e.start.index,o=!r&&"newline"===t.parts[e.start.index-1].type;return!n&&(r||o)}function v(e){const{model:t}=e,n=t.parts[e.end.index],r=e.end.offset!==n.text.length,o=e.end.index===t.parts.length-1,i=!o&&"newline"===t.parts[e.end.index+1].type;return!r&&(o||i)}const y=e=>!e.text||!/\S/.test(e.text),E=e=>"newline"===e.type;function S(e,t,n=t){const{model:r,parts:o}=e,{partCreator:i}=r,a=[];let s=0;for(let e=2;e<o.length;e++)y(o[e-2])&&E(o[e-1])&&!E(o[e])&&!y(o[e])&&(s=e),E(o[e-1])&&E(o[e])?(a.push([s,e-1]),s=e+1):E(o[e-2])&&y(o[e-1])&&E(o[e])&&(a.push([s,e-2]),s=e+1);const c=o.map(y).lastIndexOf(!1);s<=c&&a.push([s,c+1]);let l=0;a.forEach(([e,r])=>{const a=e+l,s=r+l;if(s-a>0&&o[a].text.startsWith(t)&&o[s-1].text.endsWith(n)){const e=o[a].serialize();e.text=e.text.substr(t.length),o[a]=i.deserializePart(e);const r=o[s-1].serialize(),c=r.text;r.text=c.substring(0,c.length-n.length),o[s-1]=i.deserializePart(r)}else o.splice(s,0,i.plain(n)),o.splice(a,0,i.plain(t)),l+=2}),f(e,o)}var w,C=n(492),T=n(871),x=n(506),k=n(806),F=n(677),O=n(84),R=n(104),D=n(274),I=n(293),A=n(807),N=n(179),M=n(81);const P=new RegExp("(?:^|\\s)("+u.a.source+")\\s$"),L=-1!==navigator.platform.indexOf("Mac"),j=['"',"_","`","'","*","~","$"],U=new Map([["(",")"],["[","]"],["{","}"],["<",">"]]);function B(e){return(L?"⌘":"Ctrl")+"+"+e}function G(e){return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,rangeCount:e.rangeCount,type:e.type}}let V=Object(M.a)("views.rooms.BasicMessageEditor")(w=class extends c.a.Component{constructor(e){super(e),o()(this,"editorRef",Object(s.createRef)()),o()(this,"autocompleteRef",Object(s.createRef)()),o()(this,"formatBarRef",Object(s.createRef)()),o()(this,"modifiedFlag",!1),o()(this,"isIMEComposing",!1),o()(this,"hasTextSelected",!1),o()(this,"_isCaretAtEnd",void 0),o()(this,"lastCaret",void 0),o()(this,"lastSelection",void 0),o()(this,"emoticonSettingHandle",void 0),o()(this,"shouldShowPillAvatarSettingHandle",void 0),o()(this,"surroundWithHandle",void 0),o()(this,"historyManager",new d),o()(this,"replaceEmoticon",e=>{const{model:t}=this.props,n=t.startRange(e);let r=8;n.expandBackwardsWhile((e,n)=>{const o=t.parts[e];return r-=1,r>=0&&("plain"===o.type||"pill-candidate"===o.type)});const o=P.exec(n.text);if(o){const e=o[1].replace("-",""),r=D.c.get(e)||D.c.get(e.toLowerCase());if(r){const{partCreator:e}=t,i=" "===o[0][0];return n.moveStart(o.index+(i?1:0)),n.replace([e.plain(r.unicode+" ")])}}}),o()(this,"updateEditorState",(e,t,n)=>{if(Object(h.e)(this.editorRef.current,this.props.model),e){try{m(this.editorRef.current,this.props.model,e)}catch(e){console.error(e)}const t=e instanceof p.a?e.end:e;this.setLastCaretFromPosition(t)}const{isEmpty:r}=this.props.model;this.props.placeholder&&(r?this.showPlaceholder():this.hidePlaceholder()),r&&this.formatBarRef.current.hide(),this.setState({autoComplete:this.props.model.autoComplete}),this.historyManager.tryPush(this.props.model,e,t,n);let o=!this.props.model.isEmpty;if(o&&"command"===this.props.model.parts[0].type){const{cmd:e}=Object(I.e)(this.props.model.parts[0].text),t=I.b.get(e);t&&t.isEnabled()&&t.category===I.a.messages||(o=!1)}F.a.sharedInstance().setSelfTyping(this.props.room.roomId,o),this.props.onChange&&this.props.onChange()}),o()(this,"onCompositionStart",()=>{this.isIMEComposing=!0,this.hidePlaceholder()}),o()(this,"onCompositionEnd",()=>{this.isIMEComposing=!1;const e=navigator.userAgent.toLowerCase();e.includes("safari/")&&!e.includes("chrome/")?this.onInput({inputType:"insertCompositionText"}):Promise.resolve().then(()=>{this.onInput({inputType:"insertCompositionText"})})}),o()(this,"onCutCopy",(e,t)=>{const n=document.getSelection(),r=n.toString();if(r){const{model:o}=this.props,i=Object(C.b)(this.editorRef.current,o,n),a=i.parts.map(e=>e.serialize());e.clipboardData.setData("application/x-element-composer",JSON.stringify(a)),e.clipboardData.setData("text/plain",r),"cut"===t&&(this.modifiedFlag=!0,_(i,[])),e.preventDefault()}}),o()(this,"onCopy",e=>{this.onCutCopy(e,"copy")}),o()(this,"onCut",e=>{this.onCutCopy(e,"cut")}),o()(this,"onPaste",e=>{if(e.preventDefault(),this.props.onPaste&&this.props.onPaste(e,this.props.model))return!0;const{model:t}=this.props,{partCreator:n}=t,r=e.clipboardData.getData("application/x-element-composer");let o;if(r){o=JSON.parse(r).map(e=>n.deserializePart(e))}else{const t=e.clipboardData.getData("text/plain");o=Object(k.b)(t,n)}this.modifiedFlag=!0;_(Object(C.b)(this.editorRef.current,t,document.getSelection()),o)}),o()(this,"onInput",e=>{if(this.isIMEComposing)return;this.modifiedFlag=!0;const t=document.getSelection(),{caret:n,text:r}=Object(C.a)(this.editorRef.current,t);this.props.model.update(r,e.inputType,n)}),o()(this,"onBlur",()=>{document.removeEventListener("selectionchange",this.onSelectionChange)}),o()(this,"onFocus",()=>{document.addEventListener("selectionchange",this.onSelectionChange),this.lastSelection=null,this.refreshLastCaretIfNeeded()}),o()(this,"onSelectionChange",()=>{const{isEmpty:e}=this.props.model;this.refreshLastCaretIfNeeded();const t=document.getSelection();if(this.hasTextSelected&&t.isCollapsed)this.hasTextSelected=!1,this.formatBarRef.current&&this.formatBarRef.current.hide();else if(!t.isCollapsed&&!e&&(this.hasTextSelected=!0,this.formatBarRef.current)){const e=t.getRangeAt(0).getBoundingClientRect();this.formatBarRef.current.showAt(e)}}),o()(this,"onKeyDown",e=>{const t=this.props.model;let n=!1;if(this.state.surroundWith&&"Caret"!=document.getSelection().type){const t=Object(C.b)(this.editorRef.current,this.props.model,document.getSelection());t.trim(),[...U.keys(),...j].includes(e.key)&&(this.historyManager.ensureLastChangesPushed(this.props.model),this.modifiedFlag=!0,S(t,e.key,U.get(e.key)),n=!0)}switch(Object(N.f)().getMessageComposerAction(e)){case N.b.FormatBold:this.onFormatAction(A.a.Bold),n=!0;break;case N.b.FormatItalics:this.onFormatAction(A.a.Italics),n=!0;break;case N.b.FormatQuote:this.onFormatAction(A.a.Quote),n=!0;break;case N.b.EditRedo:if(this.historyManager.canRedo()){const{parts:e,caret:n}=this.historyManager.redo();t.reset(e,n,"historyRedo")}n=!0;break;case N.b.EditUndo:if(this.historyManager.canUndo()){const{parts:e,caret:n}=this.historyManager.undo(this.props.model);t.reset(e,n,"historyUndo")}n=!0;break;case N.b.NewLine:this.insertText("\n"),n=!0;break;case N.b.MoveCursorToStart:m(this.editorRef.current,t,{index:0,offset:0}),n=!0;break;case N.b.MoveCursorToEnd:m(this.editorRef.current,t,{index:t.parts.length-1,offset:t.parts[t.parts.length-1].text.length}),n=!0}if(n)return e.preventDefault(),void e.stopPropagation();const r=Object(N.f)().getAutocompleteAction(e);if(t.autoComplete&&t.autoComplete.hasCompletions()){const o=t.autoComplete;switch(r){case N.a.CompleteOrPrevSelection:case N.a.PrevSelection:o.selectPreviousSelection(),n=!0;break;case N.a.CompleteOrNextSelection:case N.a.NextSelection:o.selectNextSelection(),n=!0;break;case N.a.Cancel:o.onEscape(e),n=!0;break;default:return}}else r===N.a.CompleteOrPrevSelection||r===N.a.CompleteOrNextSelection?(this.tabCompleteName(),n=!0):e.key!==R.a.BACKSPACE&&e.key!==R.a.DELETE||this.formatBarRef.current.hide();n&&(e.preventDefault(),e.stopPropagation())}),o()(this,"onAutoCompleteConfirm",e=>{this.modifiedFlag=!0,this.props.model.autoComplete.onComponentConfirm(e)}),o()(this,"onAutoCompleteSelectionChange",(e,t)=>{this.modifiedFlag=!0,this.props.model.autoComplete.onComponentSelectionChange(e),this.setState({completionIndex:t})}),o()(this,"configureEmoticonAutoReplace",()=>{const e=O.b.getValue("MessageComposerInput.autoReplaceEmoji");this.props.model.setTransformCallback(e?this.replaceEmoticon:null)}),o()(this,"configureShouldShowPillAvatar",()=>{const e=O.b.getValue("Pill.shouldShowPillAvatar");this.setState({showPillAvatar:e})}),o()(this,"surroundWithSettingChanged",()=>{const e=O.b.getValue("MessageComposerInput.surroundWith");this.setState({surroundWith:e})}),o()(this,"onFormatAction",e=>{const t=Object(C.b)(this.editorRef.current,this.props.model,document.getSelection());if(t.trim(),0!==t.length)switch(this.historyManager.ensureLastChangesPushed(this.props.model),this.modifiedFlag=!0,e){case A.a.Bold:S(t,"**");break;case A.a.Italics:S(t,"_");break;case A.a.Strikethrough:S(t,"<del>","</del>");break;case A.a.Code:!function(e){const{model:t,parts:n}=e,{partCreator:r}=t;n.some(e=>"newline"===e.type)?(n.unshift(r.plain("```"),r.newline()),b(e)||n.unshift(r.newline()),n.push(r.newline(),r.plain("```")),v(e)||n.push(r.newline())):(n.unshift(r.plain("`")),n.push(r.plain("`"))),f(e,n)}(t);break;case A.a.Quote:!function(e){const{model:t,parts:n}=e,{partCreator:r}=t;for(let e=0;e<n.length;++e){"newline"===n[e].type&&n.splice(e+1,0,r.plain("> "))}n.unshift(r.plain("> ")),b(e)||n.unshift(r.newline()),v(e)||n.push(r.newline()),n.push(r.newline()),f(e,n)}(t)}}),this.state={showPillAvatar:O.b.getValue("Pill.shouldShowPillAvatar"),surroundWith:O.b.getValue("MessageComposerInput.surroundWith")},this.emoticonSettingHandle=O.b.watchSetting("MessageComposerInput.autoReplaceEmoji",null,this.configureEmoticonAutoReplace),this.configureEmoticonAutoReplace(),this.shouldShowPillAvatarSettingHandle=O.b.watchSetting("Pill.shouldShowPillAvatar",null,this.configureShouldShowPillAvatar),this.surroundWithHandle=O.b.watchSetting("MessageComposerInput.surroundWith",null,this.surroundWithSettingChanged)}componentDidUpdate(e){const t=this.props.disabled!==e.disabled,n=this.props.placeholder!==e.placeholder;if(this.props.placeholder&&(n||t)){const{isEmpty:e}=this.props.model;e?this.showPlaceholder():this.hidePlaceholder()}}showPlaceholder(){const e=this.props.placeholder.replace(/'/g,"\\'");this.editorRef.current.style.setProperty("--placeholder",`'${e}'`),this.editorRef.current.classList.add("mx_BasicMessageComposer_inputEmpty")}hidePlaceholder(){this.editorRef.current.classList.remove("mx_BasicMessageComposer_inputEmpty"),this.editorRef.current.style.removeProperty("--placeholder")}isComposing(e){return!!(this.isIMEComposing||e.nativeEvent&&e.nativeEvent.isComposing)}insertText(e,t="insertText"){const n=document.getSelection(),{caret:r,text:o}=Object(C.a)(this.editorRef.current,n),i=o.substr(0,r.offset)+e+o.substr(r.offset);r.offset+=e.length,this.modifiedFlag=!0,this.props.model.update(i,t,r)}setLastCaretFromPosition(e){const{model:t}=this.props;this._isCaretAtEnd=e.isAtEnd(t),this.lastCaret=e.asOffset(t),this.lastSelection=G(document.getSelection())}refreshLastCaretIfNeeded(){if(!this.editorRef.current)return;const e=document.getSelection();if(!this.lastSelection||(t=this.lastSelection,n=e,t.anchorNode!==n.anchorNode||t.anchorOffset!==n.anchorOffset||t.focusNode!==n.focusNode||t.focusOffset!==n.focusOffset||t.isCollapsed!==n.isCollapsed||t.rangeCount!==n.rangeCount||t.type!==n.type)){this.lastSelection=G(e);const{caret:t,text:n}=Object(C.a)(this.editorRef.current,e);this.lastCaret=t,this._isCaretAtEnd=t.offset===n.length}var t,n;return this.lastCaret}clearUndoHistory(){this.historyManager.clear()}getCaret(){return this.lastCaret}isSelectionCollapsed(){return!this.lastSelection||this.lastSelection.isCollapsed}isCaretAtStart(){return 0===this.getCaret().offset}isCaretAtEnd(){return this._isCaretAtEnd}async tabCompleteName(){try{await new Promise(e=>this.setState({showVisualBell:!1},e));const{model:e}=this.props,t=this.getCaret(),n=e.positionForOffset(t.offset,t.atNodeEnd),r=e.startRange(n);r.expandBackwardsWhile((e,t,n)=>" "!==n.text[t]&&"+"!==n.text[t]&&("plain"===n.type||"pill-candidate"===n.type||"command"===n.type));const{partCreator:o}=e;await e.transform(()=>{const n=r.replace([o.pillCandidate(r.text)]);return e.positionForOffset(t.offset+n,!0)}),e.autoComplete&&(await e.autoComplete.startSelection(),e.autoComplete.hasSelection()||(this.setState({showVisualBell:!0}),e.autoComplete.close()))}catch(e){console.error(e)}}isModified(){return this.modifiedFlag}componentWillUnmount(){document.removeEventListener("selectionchange",this.onSelectionChange),this.editorRef.current.removeEventListener("input",this.onInput,!0),this.editorRef.current.removeEventListener("compositionstart",this.onCompositionStart,!0),this.editorRef.current.removeEventListener("compositionend",this.onCompositionEnd,!0),O.b.unwatchSetting(this.emoticonSettingHandle),O.b.unwatchSetting(this.shouldShowPillAvatarSettingHandle),O.b.unwatchSetting(this.surroundWithHandle)}componentDidMount(){const e=this.props.model;e.setUpdateCallback(this.updateEditorState);e.partCreator.setAutoCompleteCreator(Object(x.b)(()=>this.autocompleteRef.current,e=>new Promise(t=>this.setState({query:e},t)))),this.updateEditorState(this.getInitialCaretPosition()),this.editorRef.current.addEventListener("input",this.onInput,!0),this.editorRef.current.addEventListener("compositionstart",this.onCompositionStart,!0),this.editorRef.current.addEventListener("compositionend",this.onCompositionEnd,!0),this.editorRef.current.focus()}getInitialCaretPosition(){let e;if(this.props.initialCaret){const t=this.props.initialCaret;e=this.props.model.positionForOffset(t.offset,t.atNodeEnd)}else e=this.props.model.getPositionAtEnd();return e}render(){let e;if(this.state.autoComplete){const t=this.state.query,n=t.length;e=c.a.createElement("div",{className:"mx_BasicMessageComposer_AutoCompleteWrapper"},c.a.createElement(T.a,{ref:this.autocompleteRef,query:t,onConfirm:this.onAutoCompleteConfirm,onSelectionChange:this.onAutoCompleteSelectionChange,selection:{beginning:!0,end:n,start:n},room:this.props.room}))}const t=a()("mx_BasicMessageComposer",{mx_BasicMessageComposer_input_error:this.state.showVisualBell}),n=a()("mx_BasicMessageComposer_input",{mx_BasicMessageComposer_input_shouldShowPillAvatar:this.state.showPillAvatar,mx_BasicMessageComposer_input_disabled:this.props.disabled}),r={[A.a.Bold]:B("B"),[A.a.Italics]:B("I"),[A.a.Quote]:B(">")},{completionIndex:o}=this.state;return c.a.createElement("div",{className:t},e,c.a.createElement(A.b,{ref:this.formatBarRef,onAction:this.onFormatAction,shortcuts:r}),c.a.createElement("div",{className:n,contentEditable:!this.props.disabled||null,tabIndex:0,onBlur:this.onBlur,onFocus:this.onFocus,onCopy:this.onCopy,onCut:this.onCut,onPaste:this.onPaste,onKeyDown:this.onKeyDown,ref:this.editorRef,"aria-label":this.props.label,role:"textbox","aria-multiline":"true","aria-autocomplete":"both","aria-haspopup":"listbox","aria-expanded":Boolean(this.state.autoComplete),"aria-activedescendant":o>=0?Object(T.b)(o):void 0,dir:"auto","aria-disabled":this.props.disabled}))}focus(){this.editorRef.current.focus()}insertMention(e){this.modifiedFlag=!0;const{model:t}=this.props,{partCreator:n}=t,r=this.props.room.getMember(e),o=r?r.rawDisplayName:e,i=this.getCaret(),a=t.positionForOffset(i.offset,i.atNodeEnd),s=n.createMentionParts(0===i.offset,o,e);t.transform(()=>{const e=t.insert(s,a);return t.positionForOffset(i.offset+e,!0)}),this.focus()}insertQuotedMessage(e){this.modifiedFlag=!0;const{model:t}=this.props,{partCreator:n}=t,r=Object(k.a)(e,n,{isQuotedMessage:!0});r.push(n.newline()),r.push(n.newline()),t.transform(()=>{const e=t.insert(r,t.positionForOffset(0));return t.positionForOffset(e,!0)}),this.focus()}insertPlaintext(e){this.modifiedFlag=!0;const{model:t}=this.props,{partCreator:n}=t,r=this.getCaret(),o=t.positionForOffset(r.offset,r.atNodeEnd);t.transform(()=>{const i=t.insert([n.plain(e)],o);return t.positionForOffset(r.offset+i,!0)})}})||w},function(e,t,n){"use strict";n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return b}));var r=n(79),o=n.n(r);class i{constructor(e,t,n,r){this.updateCallback=e,this.getAutocompleterComponent=t,this.updateQuery=n,this.partCreator=r,o()(this,"queryPart",void 0),o()(this,"partIndex",void 0)}onEscape(e){this.getAutocompleterComponent().onEscape(e),this.updateCallback({replaceParts:[this.partCreator.plain(this.queryPart.text)],close:!0})}close(){this.updateCallback({close:!0})}hasSelection(){return this.getAutocompleterComponent().hasSelection()}hasCompletions(){const e=this.getAutocompleterComponent();return e&&e.countCompletions()>0}onEnter(){this.updateCallback({close:!0})}async startSelection(){const e=this.getAutocompleterComponent();0===e.countCompletions()&&(await e.forceComplete(),await e.moveSelection(1))}selectPreviousSelection(){this.getAutocompleterComponent().moveSelection(-1)}selectNextSelection(){this.getAutocompleterComponent().moveSelection(1)}onPartUpdate(e,t){return this.queryPart=e,this.partIndex=t.index,this.updateQuery(e.text)}onComponentSelectionChange(e){e?this.updateCallback({replaceParts:this.partForCompletion(e)}):this.updateCallback({replaceParts:[this.queryPart]})}onComponentConfirm(e){this.updateCallback({replaceParts:this.partForCompletion(e),close:!0})}partForCompletion(e){const{completionId:t}=e,n=e.completion;switch(e.type){case"room":return[this.partCreator.roomPill(n,t),this.partCreator.plain(e.suffix)];case"at-room":return[this.partCreator.atRoomPill(t),this.partCreator.plain(e.suffix)];case"user":return this.partCreator.createMentionParts(0===this.partIndex,n,t);case"command":return[this.partCreator.command(n)];default:return[this.partCreator.plain(n)]}}}var a,s=n(196);!function(e){e.Plain="plain",e.Newline="newline",e.Command="command",e.UserPill="user-pill",e.RoomPill="room-pill",e.AtRoomPill="at-room-pill",e.PillCandidate="pill-candidate"}(a||(a={}));class c{constructor(e=""){o()(this,"_text",void 0),this._text=e}acceptsInsertion(e,t,n){return!0}acceptsRemoval(e,t){return!0}merge(e){return!1}split(e){const t=this.text.substr(e);return this._text=this.text.substr(0,e),new u(t)}remove(e,t){const n=this.text.substr(0,e)+this.text.substr(e+t);for(let r=e;r<t+e;++r){const e=this.text.charAt(r);if(!this.acceptsRemoval(r,e))return n}this._text=n}appendUntilRejected(e,t){const n=this.text.length;for(let r=0;r<e.length;++r){const o=e.charAt(r);if(!this.acceptsInsertion(o,n+r,t))return this._text=this._text+e.substr(0,r),e.substr(r)}this._text=this._text+e}validateAndInsert(e,t,n){for(let r=0;r<t.length;++r){const o=t.charAt(r);if(!this.acceptsInsertion(o,e+r,n))return!1}const r=this._text.substr(0,e),o=this._text.substr(e);return this._text=r+t+o,!0}createAutoComplete(e){}trim(e){const t=this._text.substr(e);return this._text=this._text.substr(0,e),t}get text(){return this._text}get canEdit(){return!0}toString(){return`${this.type}(${this.text})`}serialize(){return{type:this.type,text:this.text}}}class l extends c{acceptsInsertion(e,t,n){return"\n"!==e&&("insertFromPaste"===n||"insertFromDrop"===n||("@"!==e&&"#"!==e&&":"!==e&&"+"!==e||0!==t&&(" "!==this._text[t-1]&&("+"!==this._text[t-1]||":"!==e))))}toDOMNode(){return document.createTextNode(this.text)}merge(e){return e.type===this.type&&(this._text=this.text+e.text,!0)}updateDOMNode(e){e.textContent!==this.text&&(e.textContent=this.text)}canUpdateDOMNode(e){return e.nodeType===Node.TEXT_NODE}}class u extends l{get type(){return a.Plain}}class d extends c{constructor(e,t){super(t),this.resourceId=e}acceptsInsertion(e){return" "!==e}acceptsRemoval(e,t){return 0!==e}toDOMNode(){const e=document.createElement("span");return e.setAttribute("spellcheck","false"),e.className=this.className,e.appendChild(document.createTextNode(this.text)),this.setAvatar(e),e}updateDOMNode(e){const t=e.childNodes[0];t.textContent!==this.text&&(t.textContent=this.text),e.className!==this.className&&(e.className=this.className),this.setAvatar(e)}canUpdateDOMNode(e){return e.nodeType===Node.ELEMENT_NODE&&"SPAN"===e.nodeName&&1===e.childNodes.length&&e.childNodes[0].nodeType===Node.TEXT_NODE}setAvatarVars(e,t,n){const r=`url('${t}')`,o=`'${n}'`;e.style.getPropertyValue("--avatar-background")!==r&&e.style.setProperty("--avatar-background",r),e.style.getPropertyValue("--avatar-letter")!==o&&e.style.setProperty("--avatar-letter",o)}serialize(){return{type:this.type,text:this.text,resourceId:this.resourceId}}get canEdit(){return!1}}class h extends c{acceptsInsertion(e,t){return 0===t&&"\n"===e}acceptsRemoval(e,t){return!0}toDOMNode(){return document.createElement("br")}merge(){return!1}updateDOMNode(){}canUpdateDOMNode(e){return"BR"===e.tagName}get type(){return a.Newline}get canEdit(){return!1}}class p extends d{constructor(e,t,n){super(e,t),this.room=n}setAvatar(e){let t="",n=s.b(this.room,16,16,"crop");n||(t=s.e(this.room?this.room.name:this.resourceId),n=s.d(this.room?this.room.roomId:this.resourceId)),this.setAvatarVars(e,n,t)}get type(){return a.RoomPill}get className(){return"mx_RoomPill mx_Pill"}}class m extends p{constructor(e,t){super(e,e,t)}get type(){return a.AtRoomPill}serialize(){return{type:this.type,text:this.text}}}class g extends d{constructor(e,t,n){super(e,t),this.member=n}setAvatar(e){if(!this.member)return;const t=this.member.name||this.member.userId,n=s.d(this.member.userId),r=s.a(this.member,16,16,"crop");let o="";r===n&&(o=s.e(t)),this.setAvatarVars(e,r,o)}get type(){return a.UserPill}get className(){return"mx_UserPill mx_Pill"}}class f extends l{constructor(e,t){super(e),this.autoCompleteCreator=t}createAutoComplete(e){return this.autoCompleteCreator.create(e)}acceptsInsertion(e,t,n){return 0===t||super.acceptsInsertion(e,t,n)}merge(){return!1}acceptsRemoval(e,t){return!0}get type(){return a.PillCandidate}}function _(e,t){return n=>r=>new i(r,e,t,n)}class b extends class{constructor(e,t,n=null){this.room=e,this.client=t,o()(this,"autoCompleteCreator",void 0),this.autoCompleteCreator={create:n&&n(this)}}setAutoCompleteCreator(e){this.autoCompleteCreator.create=e(this)}createPartForInput(e,t,n){switch(e[0]){case"#":case"@":case":":case"+":return this.pillCandidate("");case"\n":return new h;default:return new u}}createDefaultPart(e){return this.plain(e)}deserializePart(e){switch(e.type){case a.Plain:return this.plain(e.text);case a.Newline:return this.newline();case a.AtRoomPill:return this.atRoomPill(e.text);case a.PillCandidate:return this.pillCandidate(e.text);case a.RoomPill:return this.roomPill(e.resourceId);case a.UserPill:return this.userPill(e.text,e.resourceId)}}plain(e){return new u(e)}newline(){return new h("\n")}pillCandidate(e){return new f(e,this.autoCompleteCreator)}roomPill(e,t){let n;return n=t||"#"!==e[0]?this.client.getRoom(t||e):this.client.getRooms().find(t=>t.getCanonicalAlias()===e||t.getAltAliases().includes(e)),new p(e,n?n.name:e,n)}atRoomPill(e){return new m(e,this.room)}userPill(e,t){const n=this.room.getMember(t);return new g(t,e,n)}createMentionParts(e,t,n){return[this.userPill(t,n),this.plain(e?": ":" ")]}}{createPartForInput(e,t){return 0===t&&"/"===e[0]?this.command(""):super.createPartForInput(e,t)}command(e){return new v(e,this.autoCompleteCreator)}deserializePart(e){return"command"===e.type?this.command(e.text):super.deserializePart(e)}}class v extends f{get type(){return a.Command}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(138);const a={};var s=n(565),c=n(102);class l{constructor(){}static get instance(){return l.internalInstance||(l.internalInstance=new l),l.internalInstance}async onNewInvitedRoom(e){await s.a.sharedInstance().onNewInvitedRoom(e)}isRoomVisible(e){if(!e)return!1;if(i.d.sharedInstance().getSupportsVirtualRooms()&&s.a.sharedInstance().isVirtualRoom(e))return!1;if(c.g.spacesEnabled&&e.isSpaceRoom())return!1;const t=a.isRoomVisible;return!t||t(e)}}o()(l,"internalInstance",void 0)},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},o=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),c=r[n];n<i;c=r[++n])g(c)||!y(c)?a+=" "+c:a+=" "+s(c);return a},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),o=!0}return n.apply(this,arguments)}};var i,a={};function s(e,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),u(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function l(e,t){return e}function u(e,n,r){if(e.customInspect&&n&&w(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return _(o)||(o=u(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(f(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(n);if(0===a.length){if(w(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(v(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return d(n)}var l,y="",C=!1,T=["{","}"];(p(n)&&(C=!0,T=["[","]"]),w(n))&&(y=" [Function"+(n.name?": "+n.name:"")+"]");return v(n)&&(y=" "+RegExp.prototype.toString.call(n)),E(n)&&(y=" "+Date.prototype.toUTCString.call(n)),S(n)&&(y=" "+d(n)),0!==a.length||C&&0!=n.length?r<0?v(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=C?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a<s;++a)F(t,String(a))?i.push(h(e,t,n,r,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(h(e,t,n,r,o,!0))})),i}(e,n,r,s,a):a.map((function(t){return h(e,n,r,s,t,C)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(l,y,T)):T[0]+y+T[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),F(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=g(n)?u(e,c.value,null):u(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function f(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return void 0===e}function v(e){return y(e)&&"[object RegExp]"===C(e)}function y(e){return"object"==typeof e&&null!==e}function E(e){return y(e)&&"[object Date]"===C(e)}function S(e){return y(e)&&("[object Error]"===C(e)||e instanceof Error)}function w(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=m,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=f,t.isString=_,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=v,t.isObject=y,t.isDate=E,t.isError=S,t.isFunction=w,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(906);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),x[e.getMonth()],t].join(" ")}function F(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",k(),t.format.apply(t,arguments))},t.inherits=n(907),t._extend=function(e,t){if(!t||!y(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var O="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(O&&e[O]){var t;if("function"!=typeof(t=e[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,O,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),O&&Object.defineProperty(t,O,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=O,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};t.apply(this,n).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(R,t,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(371))},function(e,t,n){"use strict";e.exports={__locale:"en",days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviated_days:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviated_months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],am:"AM",pm:"PM"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r extends class{constructor(e,t){if(this.stable=e,this.unstable=t,!this.unstable&&!this.stable)throw new Error("One of stable or unstable values must be supplied")}get name(){return this.stable?this.stable:this.unstable}get altName(){return this.stable?this.unstable:null}matches(e){return this.name===e||this.altName===e}findIn(e){let t;return this.name&&(t=null==e?void 0:e[this.name]),!t&&this.altName&&(t=null==e?void 0:e[this.altName]),t}includedIn(e){let t=!1;return this.name&&(t=e.includes(this.name)),!t&&this.altName&&(t=e.includes(this.altName)),t}}{constructor(e,t){if(super(e,t),!this.unstable)throw new Error("Unstable value must be supplied")}get name(){return this.unstable}get altName(){return this.stable}}},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.Error="ERROR",e.Prepared="PREPARED",e.Stopped="STOPPED",e.Syncing="SYNCING",e.Catchup="CATCHUP",e.Reconnecting="RECONNECTING"}(r||(r={}))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(96),o=n(256);function i(e){return"crypto.sessions/"+e}function a(e){return"crypto.session.problems/"+e}function s(e,t){return"crypto.inboundgroupsessions/"+e+"/"+t}function c(e,t){return"crypto.inboundgroupsessions.withheld/"+e+"/"+t}function l(e){return"crypto.rooms/"+e}class u extends o.a{static exists(e){const t=e.length;for(let n=0;n<t;n++)if(e.key(n).startsWith("crypto."))return!0;return!1}constructor(e){super(),this.store=e}countEndToEndSessions(e,t){let n=0;for(let e=0;e<this.store.length;++e)this.store.key(e).startsWith(i(""))&&++n;t(n)}_getEndToEndSessions(e){const t=d(this.store,i(e)),n={};for(const[e,r]of Object.entries(t||{}))n[e]="string"==typeof r?{session:r}:r;return n}getEndToEndSession(e,t,n,r){r(this._getEndToEndSessions(e)[t]||{})}getEndToEndSessions(e,t,n){n(this._getEndToEndSessions(e)||{})}getAllEndToEndSessions(e,t){for(let e=0;e<this.store.length;++e)if(this.store.key(e).startsWith(i(""))){const n=this.store.key(e).split("/")[1];for(const e of Object.values(this._getEndToEndSessions(n)))t(e)}}storeEndToEndSession(e,t,n,r){const o=this._getEndToEndSessions(e)||{};o[t]=n,h(this.store,i(e),o)}async storeEndToEndSessionProblem(e,t,n){const r=a(e),o=d(this.store,r)||[];o.push({type:t,fixed:n,time:Date.now()}),o.sort((e,t)=>e.time-t.time),h(this.store,r,o)}async getEndToEndSessionProblem(e,t){const n=a(e),r=d(this.store,n)||[];if(!r.length)return null;const o=r[r.length-1];for(const e of r)if(e.time>t)return Object.assign({},e,{fixed:o.fixed});return o.fixed?null:o}async filterOutNotifiedErrorDevices(e){const t=d(this.store,"crypto.notified_error_devices")||{},n=[];for(const r of e){const{userId:e,deviceInfo:o}=r;e in t?o.deviceId in t[e]||(n.push(r),t[e][o.deviceId]=!0):(n.push(r),t[e]={[o.deviceId]:!0})}return h(this.store,"crypto.notified_error_devices",t),n}getEndToEndInboundGroupSession(e,t,n,r){r(d(this.store,s(e,t)),d(this.store,c(e,t)))}getAllEndToEndInboundGroupSessions(e,t){for(let e=0;e<this.store.length;++e){const n=this.store.key(e);n.startsWith("crypto.inboundgroupsessions/")&&t({senderKey:n.substr("crypto.inboundgroupsessions/".length,43),sessionId:n.substr("crypto.inboundgroupsessions/".length+44),sessionData:d(this.store,n)})}t(null)}addEndToEndInboundGroupSession(e,t,n,r){d(this.store,s(e,t))||this.storeEndToEndInboundGroupSession(e,t,n,r)}storeEndToEndInboundGroupSession(e,t,n,r){h(this.store,s(e,t),n)}storeEndToEndInboundGroupSessionWithheld(e,t,n,r){h(this.store,c(e,t),n)}getEndToEndDeviceData(e,t){t(d(this.store,"crypto.device_data"))}storeEndToEndDeviceData(e,t){h(this.store,"crypto.device_data",e)}storeEndToEndRoom(e,t,n){h(this.store,l(e),t)}getEndToEndRooms(e,t){const n={},r=l("");for(let e=0;e<this.store.length;++e){const t=this.store.key(e);if(t.startsWith(r)){n[t.substr(r.length)]=d(this.store,t)}}t(n)}getSessionsNeedingBackup(e){const t=d(this.store,"crypto.sessionsneedingbackup")||{},n=[];for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const t=r.substr(0,43),o=r.substr(44);if(this.getEndToEndInboundGroupSession(t,o,null,e=>{n.push({senderKey:t,sessionId:o,sessionData:e})}),e&&r.length>=e)break}return Promise.resolve(n)}countSessionsNeedingBackup(){const e=d(this.store,"crypto.sessionsneedingbackup")||{};return Promise.resolve(Object.keys(e).length)}unmarkSessionsNeedingBackup(e){const t=d(this.store,"crypto.sessionsneedingbackup")||{};for(const n of e)delete t[n.senderKey+"/"+n.sessionId];return h(this.store,"crypto.sessionsneedingbackup",t),Promise.resolve()}markSessionsNeedingBackup(e){const t=d(this.store,"crypto.sessionsneedingbackup")||{};for(const n of e)t[n.senderKey+"/"+n.sessionId]=!0;return h(this.store,"crypto.sessionsneedingbackup",t),Promise.resolve()}deleteAllData(){return this.store.removeItem("crypto.account"),Promise.resolve()}getAccount(e,t){t(d(this.store,"crypto.account"))}storeAccount(e,t){h(this.store,"crypto.account",t)}getCrossSigningKeys(e,t){t(d(this.store,"crypto.cross_signing_keys"))}getSecretStorePrivateKey(e,t,n){t(d(this.store,"crypto.ssss_cache."+n))}storeCrossSigningKeys(e,t){h(this.store,"crypto.cross_signing_keys",t)}storeSecretStorePrivateKey(e,t,n){h(this.store,"crypto.ssss_cache."+t,n)}doTxn(e,t,n){return Promise.resolve(n(null))}}function d(e,t){try{return JSON.parse(e.getItem(t))}catch(e){r.a.log("Error: Failed to get key %s: %s",t,e.stack||e),r.a.log(e.stack)}return null}function h(e,t,n){e.setItem(t,JSON.stringify(n))}},function(e,t,n){"use strict";function r(e,t){return new Promise((n,r)=>{let o=!0;const i=e.open(t);i.onupgradeneeded=()=>{o=!1},i.onblocked=()=>r(i.error),i.onsuccess=()=>{i.result.close(),o||e.deleteDatabase(t),n(o)},i.onerror=e=>r(i.error)})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(96),o=n(153),i=n(893);function a(e){if(void 0===e)throw new Error("payloadString undefined");if(e.length>49152){const t=new Error("Message too long ("+e.length+" bytes). The maximum for an encrypted message is 49152 bytes.");throw t.data={errcode:"M_TOO_LARGE",error:"Payload too large for encrypted message"},t}}function s(e){this._cryptoStore=e,this._pickleKey="DEFAULT_KEY",this.deviceCurve25519Key=null,this.deviceEd25519Key=null,this._maxOneTimeKeys=null,this._outboundGroupSessionStore={},this._inboundGroupSessionMessageIndexes={},this._sessionsInProgress={},this._olmPrekeyPromise=Promise.resolve()}s.prototype.init=async function(t={}){let n;const i=new e.Olm.Account,{pickleKey:a,fromExportedDevice:s}=t;try{s?(a&&r.a.warn("ignoring opts.pickleKey because opts.fromExportedDevice is present."),this._pickleKey=s.pickleKey,await async function(e,t,n,r){await t.doTxn("readwrite",[o.a.STORE_ACCOUNT,o.a.STORE_SESSIONS],n=>{t.storeAccount(n,e.pickledAccount),e.sessions.forEach(e=>{const{deviceKey:r,sessionId:o}=e,i={session:e.session,lastReceivedMessageTs:e.lastReceivedMessageTs};t.storeEndToEndSession(r,o,i,n)})}),r.unpickle(n,e.pickledAccount)}(s,this._cryptoStore,this._pickleKey,i)):(a&&(this._pickleKey=a),await async function(e,t,n){await e.doTxn("readwrite",[o.a.STORE_ACCOUNT],r=>{e.getAccount(r,o=>{null!==o?n.unpickle(t,o):(n.create(),o=n.pickle(t),e.storeAccount(r,o))})})}(this._cryptoStore,this._pickleKey,i)),n=JSON.parse(i.identity_keys()),this._maxOneTimeKeys=i.max_number_of_one_time_keys()}finally{i.free()}this.deviceCurve25519Key=n.curve25519,this.deviceEd25519Key=n.ed25519},s.getOlmVersion=function(){return e.Olm.get_library_version()},s.prototype._getAccount=function(t,n){this._cryptoStore.getAccount(t,t=>{const r=new e.Olm.Account;try{r.unpickle(this._pickleKey,t),n(r)}finally{r.free()}})},s.prototype._storeAccount=function(e,t){this._cryptoStore.storeAccount(e,t.pickle(this._pickleKey))},s.prototype.export=async function(){const e={pickleKey:this._pickleKey};return await this._cryptoStore.doTxn("readonly",[o.a.STORE_ACCOUNT,o.a.STORE_SESSIONS],t=>{this._cryptoStore.getAccount(t,t=>{e.pickledAccount=t}),e.sessions=[],this._cryptoStore.getAllEndToEndSessions(t,t=>{e.sessions.push(t)})}),e},s.prototype._getSession=function(e,t,n,r){this._cryptoStore.getEndToEndSession(e,t,n,e=>{this._unpickleSession(e,r)})},s.prototype._unpickleSession=function(t,n){const r=new e.Olm.Session;try{r.unpickle(this._pickleKey,t.session);n(Object.assign({},t,{session:r}))}finally{r.free()}},s.prototype._saveSession=function(e,t,n){const r=t.session.session_id(),o=Object.assign(t,{session:t.session.pickle(this._pickleKey)});this._cryptoStore.storeEndToEndSession(e,r,o,n)},s.prototype._getUtility=function(t){const n=new e.Olm.Utility;try{return t(n)}finally{n.free()}},s.prototype.sign=async function(e){let t;return await this._cryptoStore.doTxn("readonly",[o.a.STORE_ACCOUNT],n=>{this._getAccount(n,n=>{t=n.sign(e)})}),t},s.prototype.getOneTimeKeys=async function(){let e;return await this._cryptoStore.doTxn("readonly",[o.a.STORE_ACCOUNT],t=>{this._getAccount(t,t=>{e=JSON.parse(t.one_time_keys())})}),e},s.prototype.maxNumberOfOneTimeKeys=function(){return this._maxOneTimeKeys},s.prototype.markKeysAsPublished=async function(){await this._cryptoStore.doTxn("readwrite",[o.a.STORE_ACCOUNT],e=>{this._getAccount(e,t=>{t.mark_keys_as_published(),this._storeAccount(e,t)})})},s.prototype.generateOneTimeKeys=function(e){return this._cryptoStore.doTxn("readwrite",[o.a.STORE_ACCOUNT],t=>{this._getAccount(t,n=>{n.generate_one_time_keys(e),this._storeAccount(t,n)})})},s.prototype.generateFallbackKey=async function(){await this._cryptoStore.doTxn("readwrite",[o.a.STORE_ACCOUNT],e=>{this._getAccount(e,t=>{t.generate_fallback_key(),this._storeAccount(e,t)})})},s.prototype.getFallbackKey=async function(){let e;return await this._cryptoStore.doTxn("readonly",[o.a.STORE_ACCOUNT],t=>{this._getAccount(t,t=>{e=JSON.parse(t.fallback_key())})}),e},s.prototype.createOutboundSession=async function(t,n){let i;return await this._cryptoStore.doTxn("readwrite",[o.a.STORE_ACCOUNT,o.a.STORE_SESSIONS],r=>{this._getAccount(r,o=>{const a=new e.Olm.Session;try{a.create_outbound(o,t,n),i=a.session_id(),this._storeAccount(r,o);const e={session:a,lastReceivedMessageTs:Date.now()};this._saveSession(t,e,r)}finally{a.free()}})},r.a.withPrefix("[createOutboundSession]")),i},s.prototype.createInboundSession=async function(t,n,i){if(0!==n)throw new Error("Need messageType == 0 to create inbound session");let a;return await this._cryptoStore.doTxn("readwrite",[o.a.STORE_ACCOUNT,o.a.STORE_SESSIONS],r=>{this._getAccount(r,o=>{const s=new e.Olm.Session;try{s.create_inbound_from(o,t,i),o.remove_one_time_keys(s),this._storeAccount(r,o);const e=s.decrypt(n,i),c={session:s,lastReceivedMessageTs:Date.now()};this._saveSession(t,c,r),a={payload:e,session_id:s.session_id()}}finally{s.free()}})},r.a.withPrefix("[createInboundSession]")),a},s.prototype.getSessionIdsForDevice=async function(e){const t=r.a.withPrefix("[getSessionIdsForDevice]");if(this._sessionsInProgress[e]){t.debug(`Waiting for Olm session for ${e} to be created`);try{await this._sessionsInProgress[e]}catch(e){}}let n;return await this._cryptoStore.doTxn("readonly",[o.a.STORE_SESSIONS],t=>{this._cryptoStore.getEndToEndSessions(e,t,e=>{n=Object.keys(e)})},t),n},s.prototype.getSessionIdForDevice=async function(e,t,n){const r=await this.getSessionInfoForDevice(e,t,n);if(0===r.length)return null;let o=0;for(let e=1;e<r.length;e++){const t=r[e],n=void 0===t.lastReceivedMessageTs?0:t.lastReceivedMessageTs,i=r[o],a=void 0===i.lastReceivedMessageTs?0:i.lastReceivedMessageTs;(n>a||n===a&&t.sessionId<i.sessionId)&&(o=e)}return r[o].sessionId},s.prototype.getSessionInfoForDevice=async function(e,t,n=r.a){if(n=n.withPrefix("[getSessionInfoForDevice]"),this._sessionsInProgress[e]&&!t){n.debug(`Waiting for Olm session for ${e} to be created`);try{await this._sessionsInProgress[e]}catch(e){}}const i=[];return await this._cryptoStore.doTxn("readonly",[o.a.STORE_SESSIONS],t=>{this._cryptoStore.getEndToEndSessions(e,t,e=>{const t=Object.keys(e).sort();for(const n of t)this._unpickleSession(e[n],e=>{i.push({lastReceivedMessageTs:e.lastReceivedMessageTs,hasReceivedMessage:e.session.has_received_message(),sessionId:n})})})},n),i},s.prototype.encryptMessage=async function(e,t,n){let i;return a(n),await this._cryptoStore.doTxn("readwrite",[o.a.STORE_SESSIONS],o=>{this._getSession(e,t,o,a=>{const s=a.session.describe();r.a.log("encryptMessage: Olm Session ID "+t+" to "+e+": "+s),i=a.session.encrypt(n),this._saveSession(e,a,o)})},r.a.withPrefix("[encryptMessage]")),i},s.prototype.decryptMessage=async function(e,t,n,i){let a;return await this._cryptoStore.doTxn("readwrite",[o.a.STORE_SESSIONS],o=>{this._getSession(e,t,o,s=>{const c=s.session.describe();r.a.log("decryptMessage: Olm Session ID "+t+" from "+e+": "+c),a=s.session.decrypt(n,i),s.lastReceivedMessageTs=Date.now(),this._saveSession(e,s,o)})},r.a.withPrefix("[decryptMessage]")),a},s.prototype.matchesSession=async function(e,t,n,i){if(0!==n)return!1;let a;return await this._cryptoStore.doTxn("readonly",[o.a.STORE_SESSIONS],n=>{this._getSession(e,t,n,e=>{a=e.session.matches_inbound(i)})},r.a.withPrefix("[matchesSession]")),a},s.prototype.recordSessionProblem=async function(e,t,n){await this._cryptoStore.storeEndToEndSessionProblem(e,t,n)},s.prototype.sessionMayHaveProblems=async function(e,t){return await this._cryptoStore.getEndToEndSessionProblem(e,t)},s.prototype.filterOutNotifiedErrorDevices=async function(e){return await this._cryptoStore.filterOutNotifiedErrorDevices(e)},s.prototype._saveOutboundGroupSession=function(e){const t=e.pickle(this._pickleKey);this._outboundGroupSessionStore[e.session_id()]=t},s.prototype._getOutboundGroupSession=function(t,n){const r=this._outboundGroupSessionStore[t];if(void 0===r)throw new Error("Unknown outbound group session "+t);const o=new e.Olm.OutboundGroupSession;try{return o.unpickle(this._pickleKey,r),n(o)}finally{o.free()}},s.prototype.createOutboundGroupSession=function(){const t=new e.Olm.OutboundGroupSession;try{return t.create(),this._saveOutboundGroupSession(t),t.session_id()}finally{t.free()}},s.prototype.encryptGroupMessage=function(e,t){const n=this;return r.a.log("encrypting msg with megolm session "+e),a(t),this._getOutboundGroupSession(e,(function(e){const r=e.encrypt(t);return n._saveOutboundGroupSession(e),r}))},s.prototype.getOutboundGroupSessionKey=function(e){return this._getOutboundGroupSession(e,(function(e){return{chain_index:e.message_index(),key:e.session_key()}}))},s.prototype._unpickleInboundGroupSession=function(t,n){const r=new e.Olm.InboundGroupSession;try{return r.unpickle(this._pickleKey,t.session),n(r)}finally{r.free()}},s.prototype._getInboundGroupSession=function(e,t,n,r,o){this._cryptoStore.getEndToEndInboundGroupSession(t,n,r,(t,n)=>{if(null!==t){if(null!==e&&e!==t.room_id)throw new Error("Mismatched room_id for inbound group session (expected "+t.room_id+", was "+e+")");this._unpickleInboundGroupSession(t,e=>{o(e,t,n)})}else o(null,null,n)})},s.prototype.addInboundGroupSession=async function(t,n,i,a,s,c,l,u={}){await this._cryptoStore.doTxn("readwrite",[o.a.STORE_INBOUND_GROUP_SESSIONS,o.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD,o.a.STORE_SHARED_HISTORY_INBOUND_GROUP_SESSIONS],o=>{this._getInboundGroupSession(t,n,a,o,(d,h)=>{const p=new e.Olm.InboundGroupSession;try{if(l?p.import_session(s):p.create(s),a!=p.session_id())throw new Error("Mismatched group session ID from senderKey: "+n);if(d&&(r.a.log("Update for megolm session "+n+"/"+a),d.first_known_index()<=p.first_known_index()&&(d.first_known_index()!=p.first_known_index()||u.untrusted||!h.untrusted)))return void r.a.log("Keeping existing megolm session "+a);r.a.info("Storing megolm session "+n+"/"+a+" with first index "+p.first_known_index());const e=Object.assign({},u,{room_id:t,session:p.pickle(this._pickleKey),keysClaimed:c,forwardingCurve25519KeyChain:i});this._cryptoStore.storeEndToEndInboundGroupSession(n,a,e,o),!d&&u.sharedHistory&&this._cryptoStore.addSharedHistoryInboundGroupSession(t,n,a,o)}finally{p.free()}})},r.a.withPrefix("[addInboundGroupSession]"))},s.prototype.addInboundGroupSessionWithheld=async function(e,t,n,r,i){await this._cryptoStore.doTxn("readwrite",[o.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],o=>{this._cryptoStore.storeEndToEndInboundGroupSessionWithheld(t,n,{room_id:e,code:r,reason:i},o)})};const c={"m.unverified":"The sender has disabled encrypting to unverified devices.","m.blacklisted":"The sender has blocked you.","m.unauthorised":"You are not authorised to read the message.","m.no_olm":"Unable to establish a secure channel."};function l(e){return e.code&&e.code in c?c[e.code]:e.reason?e.reason:"decryption key withheld"}s.prototype.decryptGroupMessage=async function(e,t,n,a,s,c){let u,d;if(await this._cryptoStore.doTxn("readwrite",[o.a.STORE_INBOUND_GROUP_SESSIONS,o.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],r=>{this._getInboundGroupSession(e,t,n,r,(e,o,h)=>{if(null===e)return h&&(d=new i.b("MEGOLM_UNKNOWN_INBOUND_SESSION_ID",l(h),{session:t+"|"+n})),void(u=null);let p;try{p=e.decrypt(a)}catch(e){return void(d=e&&"OLM.UNKNOWN_MESSAGE_INDEX"===e.message&&h?new i.b("MEGOLM_UNKNOWN_INBOUND_SESSION_ID",l(h),{session:t+"|"+n}):e)}let m=p.plaintext;if(void 0===m)m=p;else{const e=t+"|"+n+"|"+p.message_index;if(e in this._inboundGroupSessionMessageIndexes){const t=this._inboundGroupSessionMessageIndexes[e];if(t.id!==s||t.timestamp!==c)return void(d=new Error("Duplicate message index, possible replay attack: "+e))}this._inboundGroupSessionMessageIndexes[e]={id:s,timestamp:c}}o.session=e.pickle(this._pickleKey),this._cryptoStore.storeEndToEndInboundGroupSession(t,n,o,r),u={result:m,keysClaimed:o.keysClaimed||{},senderKey:t,forwardingCurve25519KeyChain:o.forwardingCurve25519KeyChain||[],untrusted:o.untrusted}})},r.a.withPrefix("[decryptGroupMessage]")),d)throw d;return u},s.prototype.hasInboundSessionKeys=async function(e,t,n){let i;return await this._cryptoStore.doTxn("readonly",[o.a.STORE_INBOUND_GROUP_SESSIONS,o.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],o=>{this._cryptoStore.getEndToEndInboundGroupSession(t,n,o,o=>{null!==o?e!==o.room_id?(r.a.warn(`requested keys for inbound group session ${t}|`+n+", with incorrect room_id "+`(expected ${o.room_id}, `+`was ${e})`),i=!1):i=!0:i=!1})},r.a.withPrefix("[hasInboundSessionKeys]")),i},s.prototype.getInboundGroupSessionKey=async function(e,t,n,i){let a;return await this._cryptoStore.doTxn("readonly",[o.a.STORE_INBOUND_GROUP_SESSIONS,o.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],r=>{this._getInboundGroupSession(e,t,n,r,(e,t)=>{if(null===e)return void(a=null);void 0===i&&(i=e.first_known_index());const n=e.export_session(i),r=(t.keysClaimed||{}).ed25519||null;a={chain_index:i,key:n,forwarding_curve25519_key_chain:t.forwardingCurve25519KeyChain||[],sender_claimed_ed25519_key:r,shared_history:t.sharedHistory||!1}})},r.a.withPrefix("[getInboundGroupSessionKey]")),a},s.prototype.exportInboundGroupSession=function(e,t,n){return this._unpickleInboundGroupSession(n,r=>{const o=r.first_known_index();return{sender_key:e,sender_claimed_keys:n.keysClaimed,room_id:n.room_id,session_id:t,session_key:r.export_session(o),forwarding_curve25519_key_chain:r.forwardingCurve25519KeyChain||[],first_known_index:r.first_known_index(),"org.matrix.msc3061.shared_history":n.sharedHistory||!1}})},s.prototype.getSharedHistoryInboundGroupSessions=async function(e){let t;return await this._cryptoStore.doTxn("readonly",[o.a.STORE_SHARED_HISTORY_INBOUND_GROUP_SESSIONS],n=>{t=this._cryptoStore.getSharedHistoryInboundGroupSessions(e,n)},r.a.withPrefix("[getSharedHistoryInboundGroupSessionsForRoom]")),t},s.prototype.verifySignature=function(e,t,n){this._getUtility((function(r){r.ed25519_verify(e,t,n)}))}}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(96),a=n(135),s=n(298),c=n(515);function l(e){var t,n;const r=null==e||null===(t=e.currentState)||void 0===t?void 0:t.getStateEvents("m.room.history_visibility",""),o=null==r||null===(n=r.getContent())||void 0===n?void 0:n.history_visibility;return["world_readable","shared"].includes(o)}class u{constructor(e,t=!1){this.sessionId=e,this.sharedHistory=t,o()(this,"useCount",0),o()(this,"creationTime",void 0),o()(this,"sharedWithDevices",{}),o()(this,"blockedDevicesNotified",{}),this.creationTime=(new Date).getTime()}needsRotation(e,t){const n=(new Date).getTime()-this.creationTime;return(this.useCount>=e||n>=t)&&(i.a.log("Rotating megolm session after "+this.useCount+" messages, "+n+"ms"),!0)}markSharedWithDevice(e,t,n){this.sharedWithDevices[e]||(this.sharedWithDevices[e]={}),this.sharedWithDevices[e][t]=n}markNotifiedBlockedDevice(e,t){this.blockedDevicesNotified[e]||(this.blockedDevicesNotified[e]={}),this.blockedDevicesNotified[e][t]=!0}sharedWithTooManyDevices(e){for(const t in this.sharedWithDevices)if(this.sharedWithDevices.hasOwnProperty(t)){if(!e.hasOwnProperty(t))return i.a.log("Starting new megolm session because we shared with "+t),!0;for(const n in this.sharedWithDevices[t])if(this.sharedWithDevices[t].hasOwnProperty(n)&&!e[t].hasOwnProperty(n))return i.a.log("Starting new megolm session because we shared with "+t+":"+n),!0}}}class d extends s.e{constructor(e){var t,n,r,i;super(e),o()(this,"setupPromise",Promise.resolve(void 0)),o()(this,"outboundSessions",{}),o()(this,"sessionRotationPeriodMsgs",void 0),o()(this,"sessionRotationPeriodMs",void 0),o()(this,"encryptionPreparation",void 0),o()(this,"encryptionPreparationMetadata",void 0),this.sessionRotationPeriodMsgs=null!==(t=null===(n=e.config)||void 0===n?void 0:n.rotation_period_msgs)&&void 0!==t?t:100,this.sessionRotationPeriodMs=null!==(r=null===(i=e.config)||void 0===i?void 0:i.rotation_period_ms)&&void 0!==r?r:6048e5}async ensureOutboundSession(e,t,n,r=!1){let o;function s(){return o}const c=this.setupPromise.then(async s=>{o=s;const c=l(e);o&&c!==o.sharedHistory&&(o=null),o&&o.needsRotation(this.sessionRotationPeriodMsgs,this.sessionRotationPeriodMs)&&(i.a.log("Starting new megolm session because we need to rotate."),o=null),o&&o.sharedWithTooManyDevices(t)&&(o=null),o||(i.a.log("Starting new megolm session for room "+this.roomId),o=await this.prepareNewSession(c),i.a.log(`Started new megolm session ${o.sessionId} for room `+this.roomId),this.outboundSessions[o.sessionId]=o);const u={};for(const[e,n]of Object.entries(t))for(const[t,r]of Object.entries(n)){r.getIdentityKey()!=this.olmDevice.deviceCurve25519Key&&(o.sharedWithDevices[e]&&void 0!==o.sharedWithDevices[e][t]||(u[e]=u[e]||[],u[e].push(r)))}const d=this.olmDevice.getOutboundGroupSessionKey(o.sessionId),h={type:"m.room_key",content:{algorithm:a.MEGOLM_ALGORITHM,room_id:this.roomId,session_id:o.sessionId,session_key:d.key,chain_index:d.chain_index,"org.matrix.msc3061.shared_history":c}},[p,m]=await a.getExistingOlmSessions(this.olmDevice,this.baseApis,u);await Promise.all([(async()=>{i.a.debug("Sharing keys with existing Olm sessions in "+this.roomId),await this.shareKeyWithOlmSessions(o,d,h,m),i.a.debug("Shared keys with existing Olm sessions in "+this.roomId)})(),(async()=>{i.a.debug("Sharing keys (start phase 1) with new Olm sessions in "+this.roomId);const e=[],t=Date.now(),n=[];await this.shareKeyWithDevices(o,d,h,p,e,r?1e4:2e3,n),i.a.debug("Shared keys (end phase 1) with new Olm sessions in "+this.roomId),!r&&Date.now()-t<1e4?(async()=>{const t={},r=new Set;for(const e of n)r.add(e);const a=[];for(const{userId:n,deviceInfo:o}of e){const e=n.slice(n.indexOf(":")+1);r.has(e)?(t[n]=t[n]||[],t[n].push(o)):a.push({userId:n,deviceInfo:o})}i.a.debug("Sharing keys (start phase 2) with new Olm sessions in "+this.roomId),await this.shareKeyWithDevices(o,d,h,t,a,3e4),i.a.debug("Shared keys (end phase 2) with new Olm sessions in "+this.roomId),await this.notifyFailedOlmDevices(o,d,a)})():await this.notifyFailedOlmDevices(o,d,e),i.a.debug("Shared keys (all phases done) with new Olm sessions in "+this.roomId)})(),(async()=>{i.a.debug("Notifying blocked devices in "+this.roomId);const e={};let t=0;for(const[r,i]of Object.entries(n))for(const[n,a]of Object.entries(i))o.blockedDevicesNotified[r]&&void 0!==o.blockedDevicesNotified[r][n]||(e[r]=e[r]||{},e[r][n]={device:a},t++);await this.notifyBlockedDevices(o,e),i.a.debug(`Notified ${t} blocked devices in ${this.roomId}`)})()])});return c.catch(e=>{i.a.error("Failed to ensure outbound session in "+this.roomId,e)}),this.setupPromise=c.then(s,s),c.then(s)}async prepareNewSession(e){const t=this.olmDevice.createOutboundGroupSession(),n=this.olmDevice.getOutboundGroupSessionKey(t);return await this.olmDevice.addInboundGroupSession(this.roomId,this.olmDevice.deviceCurve25519Key,[],t,n.key,{ed25519:this.olmDevice.deviceEd25519Key},!1,{sharedHistory:e}),this.crypto.backupManager.backupGroupSession(this.olmDevice.deviceCurve25519Key,t),new u(t,e)}getDevicesWithoutSessions(e,t,n=[]){for(const[r,o]of Object.entries(t)){const t=e[r];for(const e of o){const o=e.deviceId;t[o].sessionId||(n.push({userId:r,deviceInfo:e}),delete t[o])}}return n}splitDevices(e){let t=[];const n=[t];for(const[r,o]of Object.entries(e)){for(const e of Object.values(o))t.push({userId:r,deviceInfo:e.device});t.length>20&&(t=[],n.push(t))}return 0===t.length&&n.pop(),n}encryptAndSendKeysToDevices(e,t,n,r){const o={},s=[];for(let e=0;e<n.length;e++){const t={algorithm:a.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{}},i=n[e],c=i.userId,l=i.deviceInfo,u=l.deviceId;o[c]||(o[c]={}),o[c][u]=t,s.push(a.encryptMessageForDevice(t.ciphertext,this.userId,this.deviceId,this.olmDevice,c,l,r))}return Promise.all(s).then(()=>{for(const e of Object.keys(o)){for(const t of Object.keys(o[e]))0===Object.keys(o[e][t].ciphertext).length&&(i.a.log("No ciphertext for device "+e+":"+t+": pruning"),delete o[e][t]);0===Object.keys(o[e]).length&&(i.a.log("Pruned all devices for user "+e),delete o[e])}if(0!==Object.keys(o).length)return this.baseApis.sendToDevice("m.room.encrypted",o).then(()=>{for(const n of Object.keys(o))for(const r of Object.keys(o[n]))e.markSharedWithDevice(n,r,t)});i.a.log("No users left to send to: aborting")})}async sendBlockedNotificationsToDevices(e,t,n){const r={};for(const e of t){const t=e.userId,o=e.deviceInfo,i=o.deviceInfo.deviceId,a=Object.assign({},n);a.code=o.code,a.reason=o.reason,"m.no_olm"===a.code&&(delete a.room_id,delete a.session_id),r[t]||(r[t]={}),r[t][i]=a}await this.baseApis.sendToDevice("org.matrix.room_key.withheld",r);for(const t of Object.keys(r))for(const n of Object.keys(r[t]))e.markNotifiedBlockedDevice(t,n)}async reshareKeyWithDevice(e,t,n,r){const o=this.outboundSessions[t];if(!o)return void i.a.debug(`megolm session ${t} not found: not re-sharing keys`);if(void 0===o.sharedWithDevices[n])return void i.a.debug(`megolm session ${t} never shared with user ${n}`);const s=o.sharedWithDevices[n][r.deviceId];if(void 0===s)return void i.a.debug("megolm session ID "+t+" never shared with device "+n+":"+r.deviceId);const c=await this.olmDevice.getInboundGroupSessionKey(this.roomId,e,t,s);if(!c)return void i.a.warn(`No inbound session key found for megolm ${t}: not re-sharing keys`);await a.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,{[n]:[r]});const l={type:"m.forwarded_room_key",content:{algorithm:a.MEGOLM_ALGORITHM,room_id:this.roomId,session_id:t,session_key:c.key,chain_index:c.chain_index,sender_key:e,sender_claimed_ed25519_key:c.sender_claimed_ed25519_key,forwarding_curve25519_key_chain:c.forwarding_curve25519_key_chain,"org.matrix.msc3061.shared_history":c.shared_history||!1}},u={algorithm:a.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{}};await a.encryptMessageForDevice(u.ciphertext,this.userId,this.deviceId,this.olmDevice,n,r,l),await this.baseApis.sendToDevice("m.room.encrypted",{[n]:{[r.deviceId]:u}}),i.a.debug(`Re-shared key for megolm session ${t} with ${n}:${r.deviceId}`)}async shareKeyWithDevices(e,t,n,r,o,s,c){i.a.debug("Ensuring Olm sessions for devices in "+this.roomId);const l=await a.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,r,!1,s,c,i.a.withPrefix(`[${this.roomId}]`));i.a.debug("Ensured Olm sessions for devices in "+this.roomId),this.getDevicesWithoutSessions(l,r,o),i.a.debug("Sharing keys with Olm sessions in "+this.roomId),await this.shareKeyWithOlmSessions(e,t,n,l),i.a.debug("Shared keys with Olm sessions in "+this.roomId)}async shareKeyWithOlmSessions(e,t,n,r){const o=this.splitDevices(r);for(let r=0;r<o.length;r++){const a=`megolm keys for ${e.sessionId} in ${this.roomId} (slice ${r+1}/${o.length})`;try{i.a.debug("Sharing "+a),await this.encryptAndSendKeysToDevices(e,t.chain_index,o[r],n),i.a.debug("Shared "+a)}catch(e){throw i.a.error("Failed to share "+a),e}}}async notifyFailedOlmDevices(e,t,n){i.a.debug(`Notifying ${n.length} devices we failed to create Olm sessions in `+this.roomId);for(const{userId:r,deviceInfo:o}of n){const n=o.deviceId;e.markSharedWithDevice(r,n,t.chain_index)}const r=await this.olmDevice.filterOutNotifiedErrorDevices(n);i.a.debug(`Filtered down to ${r.length} error devices in `+this.roomId);const o={};for(const{userId:e,deviceInfo:t}of r)o[e]=o[e]||{},o[e][t.deviceId]={device:{code:"m.no_olm",reason:c.b["m.no_olm"],deviceInfo:t}};await this.notifyBlockedDevices(e,o),i.a.debug(`Notified ${r.length} devices we failed to create Olm sessions in `+this.roomId)}async notifyBlockedDevices(e,t){const n={room_id:this.roomId,session_id:e.sessionId,algorithm:a.MEGOLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key},r=this.splitDevices(t);for(let t=0;t<r.length;t++)try{await this.sendBlockedNotificationsToDevices(e,r[t],n),i.a.log(`Completed blacklist notification for ${e.sessionId} in ${this.roomId} (slice ${t+1}/${r.length})`)}catch(n){throw i.a.log(`blacklist notification for ${e.sessionId} in ${this.roomId} (slice ${t+1}/${r.length}) failed`),n}}prepareToEncrypt(e){if(this.encryptionPreparation){const e=Date.now()-this.encryptionPreparationMetadata.startTime;i.a.debug(`Already started preparing to encrypt for ${this.roomId} `+e+" ms ago, skipping")}else i.a.debug("Preparing to encrypt events for "+this.roomId),this.encryptionPreparationMetadata={startTime:Date.now()},this.encryptionPreparation=(async()=>{try{i.a.debug("Getting devices in "+this.roomId);const[t,n]=await this.getDevicesInRoom(e);this.crypto.getGlobalErrorOnUnknownDevices()&&this.removeUnknownDevices(t),i.a.debug("Ensuring outbound session in "+this.roomId),await this.ensureOutboundSession(e,t,n,!0),i.a.debug("Ready to encrypt events for "+this.roomId)}catch(e){i.a.error("Failed to prepare to encrypt events for "+this.roomId,e)}finally{delete this.encryptionPreparationMetadata,delete this.encryptionPreparation}})()}async encryptMessage(e,t,n){if(i.a.log("Starting to encrypt event for "+this.roomId),this.encryptionPreparation)try{await this.encryptionPreparation}catch(e){}const[r,o]=await this.getDevicesInRoom(e);this.crypto.getGlobalErrorOnUnknownDevices()&&this.checkForUnknownDevices(r);const s=await this.ensureOutboundSession(e,r,o),c={room_id:this.roomId,type:t,content:n},l=this.olmDevice.encryptGroupMessage(s.sessionId,JSON.stringify(c)),u={algorithm:a.MEGOLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:l,session_id:s.sessionId,device_id:this.deviceId};return s.useCount++,u}forceDiscardSession(){this.setupPromise=this.setupPromise.then(()=>null)}checkForUnknownDevices(e){const t={};if(Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(r=>{const o=e[n][r];o.isUnverified()&&!o.isKnown()&&(t[n]||(t[n]={}),t[n][r]=o)})}),Object.keys(t).length)throw new s.f("This room contains unknown devices which have not been verified. We strongly recommend you verify them before continuing.",t)}removeUnknownDevices(e){for(const[t,n]of Object.entries(e)){for(const[e,t]of Object.entries(n))t.isUnverified()&&!t.isKnown()&&delete n[e];0===Object.keys(n).length&&delete e[t]}}async getDevicesInRoom(e){const t=(await e.getEncryptionTargetMembers()).map((function(e){return e.userId}));let n=this.crypto.getGlobalBlacklistUnverifiedDevices();"boolean"==typeof e.getBlacklistUnverifiedDevices()&&(n=e.getBlacklistUnverifiedDevices());const r=await this.crypto.downloadKeys(t,!1),o={};for(const e in r){if(!r.hasOwnProperty(e))continue;const t=r[e];for(const r in t){if(!t.hasOwnProperty(r))continue;const i=this.crypto.checkDeviceTrust(e,r);if(t[r].isBlocked()||!i.isVerified()&&n){o[e]||(o[e]={});const n=t[r].isBlocked();o[e][r]={code:n?"m.blacklisted":"m.unverified",reason:c.b[n?"m.blacklisted":"m.unverified"],deviceInfo:t[r]},delete t[r]}}}return[r,o]}}class h extends s.b{constructor(...e){super(...e),o()(this,"pendingEvents",{}),o()(this,"olmlib",a)}async decryptEvent(e){const t=e.getWireContent();if(!t.sender_key||!t.session_id||!t.ciphertext)throw new s.c("MEGOLM_MISSING_FIELDS","Missing fields in input");let n;this.addEventToPendingList(e);try{n=await this.olmDevice.decryptGroupMessage(e.getRoomId(),t.sender_key,t.session_id,t.ciphertext,e.getId(),e.getTs())}catch(n){if("DecryptionError"===n.name)throw n;let r="OLM_DECRYPT_GROUP_MESSAGE_ERROR";throw n&&"OLM.UNKNOWN_MESSAGE_INDEX"===n.message&&(this.requestKeysForEvent(e),r="OLM_UNKNOWN_MESSAGE_INDEX"),new s.c(r,n?n.toString():"Unknown Error: Error is undefined",{session:t.sender_key+"|"+t.session_id})}if(null===n){this.requestKeysForEvent(e);const n=await this.olmDevice.sessionMayHaveProblems(t.sender_key,e.getTs()-12e4);if(n){let e=p[n.type]||p.unknown;throw n.fixed&&(e+=" Trying to create a new secure channel and re-requesting the keys."),new s.c("MEGOLM_UNKNOWN_INBOUND_SESSION_ID",e,{session:t.sender_key+"|"+t.session_id})}throw new s.c("MEGOLM_UNKNOWN_INBOUND_SESSION_ID","The sender's device has not sent us the keys for this message.",{session:t.sender_key+"|"+t.session_id})}this.removeEventFromPendingList(e);const r=JSON.parse(n.result);if(r.room_id!==e.getRoomId())throw new s.c("MEGOLM_BAD_ROOM","Message intended for room "+r.room_id);return{clearEvent:r,senderCurve25519Key:n.senderKey,claimedEd25519Key:n.keysClaimed.ed25519,forwardingCurve25519KeyChain:n.forwardingCurve25519KeyChain,untrusted:n.untrusted}}requestKeysForEvent(e){const t=e.getWireContent(),n=e.getKeyRequestRecipients(this.userId);this.crypto.requestRoomKey({room_id:e.getRoomId(),algorithm:t.algorithm,sender_key:t.sender_key,session_id:t.session_id},n)}addEventToPendingList(e){const t=e.getWireContent(),n=t.sender_key,r=t.session_id;this.pendingEvents[n]||(this.pendingEvents[n]=new Map);const o=this.pendingEvents[n];o.has(r)||o.set(r,new Set),o.get(r).add(e)}removeEventFromPendingList(e){const t=e.getWireContent(),n=t.sender_key,r=t.session_id,o=this.pendingEvents[n],i=o&&o.get(r);i&&(i.delete(e),0===i.size&&o.delete(n),0===o.size&&delete this.pendingEvents[n])}onRoomKeyEvent(e){const t=e.getContent(),n=t.session_id;let r,o=e.getSenderKey(),a=[],s=!1;if(!t.room_id||!n||!t.session_key)return void i.a.error("key event is missing fields");if(!o)return void i.a.error("key event has no sender key (not encrypted?)");if("m.forwarded_room_key"==e.getType()){if(s=!0,a=t.forwarding_curve25519_key_chain,Array.isArray(a)||(a=[]),a=a.slice(),a.push(o),o=t.sender_key,!o)return void i.a.error("forwarded_room_key event is missing sender_key field");const e=t.sender_claimed_ed25519_key;if(!e)return void i.a.error("forwarded_room_key_event is missing sender_claimed_ed25519_key field");r={ed25519:e}}else r=e.getKeysClaimed();const c={};return t["org.matrix.msc3061.shared_history"]&&(c.sharedHistory=!0),this.olmDevice.addInboundGroupSession(t.room_id,o,a,n,t.session_key,r,s,c).then(()=>{this.retryDecryption(o,n).then(e=>{e&&this.crypto.cancelRoomKeyRequest({algorithm:t.algorithm,room_id:t.room_id,session_id:t.session_id,sender_key:o})})}).then(()=>{this.crypto.backupManager.backupGroupSession(o,t.session_id)}).catch(e=>{i.a.error("Error handling m.room_key_event: "+e)})}async onRoomKeyWithheldEvent(e){const t=e.getContent(),n=t.sender_key;if("m.no_olm"===t.code){const r=e.getSender();if(i.a.warn(`${r}:${n} was unable to establish an olm session with us`),await this.olmDevice.getSessionIdForDevice(n))return i.a.debug("New session already created. Not creating a new one."),await this.olmDevice.recordSessionProblem(n,"no_olm",!0),void this.retryDecryptionFromSender(n);let o=this.crypto.deviceList.getDeviceByIdentityKey(t.algorithm,n);if(!o&&(await this.crypto.downloadKeys([r],!1),o=this.crypto.deviceList.getDeviceByIdentityKey(t.algorithm,n),!o))return i.a.info("Couldn't find device for identity key "+n+": not establishing session"),await this.olmDevice.recordSessionProblem(n,"no_olm",!1),void this.retryDecryptionFromSender(n);await a.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,{[r]:[o]},!1);const s={algorithm:a.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{}};await a.encryptMessageForDevice(s.ciphertext,this.userId,void 0,this.olmDevice,r,o,{type:"m.dummy"}),await this.olmDevice.recordSessionProblem(n,"no_olm",!0),this.retryDecryptionFromSender(n),await this.baseApis.sendToDevice("m.room.encrypted",{[r]:{[o.deviceId]:s}})}else await this.olmDevice.addInboundGroupSessionWithheld(t.room_id,n,t.session_id,t.code,t.reason)}hasKeysForKeyRequest(e){const t=e.requestBody;return this.olmDevice.hasInboundSessionKeys(t.room_id,t.sender_key,t.session_id)}shareKeysWithDevice(e){const t=e.userId,n=e.deviceId,r=this.crypto.getStoredDevice(t,n),o=e.requestBody;this.olmlib.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,{[t]:[r]}).then(e=>e[t][n].sessionId?(i.a.log("sharing keys for session "+o.sender_key+"|"+o.session_id+" with device "+t+":"+n),this.buildKeyForwardingMessage(o.room_id,o.sender_key,o.session_id)):null).then(e=>{const o={algorithm:a.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{}};return this.olmlib.encryptMessageForDevice(o.ciphertext,this.userId,void 0,this.olmDevice,t,r,e).then(()=>{const e={[t]:{[n]:o}};return this.baseApis.sendToDevice("m.room.encrypted",e)})})}async buildKeyForwardingMessage(e,t,n){const r=await this.olmDevice.getInboundGroupSessionKey(e,t,n);return{type:"m.forwarded_room_key",content:{algorithm:a.MEGOLM_ALGORITHM,room_id:e,sender_key:t,sender_claimed_ed25519_key:r.sender_claimed_ed25519_key,session_id:n,session_key:r.key,chain_index:r.chain_index,forwarding_curve25519_key_chain:r.forwarding_curve25519_key_chain,"org.matrix.msc3061.shared_history":r.shared_history||!1}}}importRoomKey(e,t={}){const n={};return(t.untrusted||e.untrusted)&&(n.untrusted=!0),e["org.matrix.msc3061.shared_history"]&&(n.sharedHistory=!0),this.olmDevice.addInboundGroupSession(e.room_id,e.sender_key,e.forwarding_curve25519_key_chain,e.session_id,e.session_key,e.sender_claimed_keys,!0,n).then(()=>{"backup"!==t.source&&this.crypto.backupManager.backupGroupSession(e.sender_key,e.session_id).catch(e=>{i.a.log("Failed to back up megolm session",e)}),this.retryDecryption(e.sender_key,e.session_id)})}async retryDecryption(e,t){const n=this.pendingEvents[e];if(!n)return!0;const r=n.get(t);return!r||(i.a.debug("Retrying decryption on events",[...r]),await Promise.all([...r].map(async e=>{try{await e.attemptDecryption(this.crypto,{isRetry:!0})}catch(e){}})),!(this.pendingEvents[e]||{})[t])}async retryDecryptionFromSender(e){const t=this.pendingEvents[e];return!t||(delete this.pendingEvents[e],await Promise.all([...t].map(async([e,t])=>{await Promise.all([...t].map(async e=>{try{await e.attemptDecryption(this.crypto)}catch(e){}}))})),!this.pendingEvents[e])}async sendSharedHistoryInboundSessions(e){await a.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,e),i.a.log("sendSharedHistoryInboundSessions to users",Object.keys(e));const t=await this.olmDevice.getSharedHistoryInboundGroupSessions(this.roomId);i.a.log("shared-history sessions",t);for(const[n,r]of t){const t=await this.buildKeyForwardingMessage(this.roomId,n,r),o=[],s={};for(const[n,r]of Object.entries(e)){s[n]={};for(const e of r){const r={algorithm:a.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{}};s[n][e.deviceId]=r,o.push(a.encryptMessageForDevice(r.ciphertext,this.userId,void 0,this.olmDevice,n,e,t))}}await Promise.all(o);for(const e of Object.keys(s)){for(const t of Object.keys(s[e]))0===Object.keys(s[e][t].ciphertext).length&&(i.a.log("No ciphertext for device "+e+":"+t+": pruning"),delete s[e][t]);0===Object.keys(s[e]).length&&(i.a.log("Pruned all devices for user "+e),delete s[e])}if(0===Object.keys(s).length)return void i.a.log("No users left to send to: aborting");await this.baseApis.sendToDevice("m.room.encrypted",s)}}}const p={no_olm:"The sender was unable to establish a secure channel.",unknown:"The secure channel with the sender was corrupted."};Object(s.g)(a.MEGOLM_ALGORITHM,d,h)},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return p}));var o=n(79),i=n.n(o),a=n(135),s=n(153),c=n(232),l=n(295),u=n.n(l),d=n(96);const h="org.matrix.msc2697.v1.olm.libolm_pickle";class p{constructor(e){this.crypto=e,i()(this,"inProgress",!1),i()(this,"timeoutId",void 0),i()(this,"key",void 0),i()(this,"keyInfo",void 0),i()(this,"deviceDisplayName",void 0),this.getDehydrationKeyFromCache()}async getDehydrationKeyFromCache(){return await this.crypto.cryptoStore.doTxn("readonly",[s.a.STORE_ACCOUNT],t=>{this.crypto.cryptoStore.getSecretStorePrivateKey(t,async t=>{if(t){const{key:n,keyInfo:o,deviceDisplayName:i,time:s}=t,l=e.from(this.crypto.olmDevice._pickleKey),u=await Object(c.b)(n,l,h);this.key=Object(a.decodeBase64)(u),this.keyInfo=o,this.deviceDisplayName=i;const d=Date.now(),p=Math.max(1,s+6048e5-d);this.timeoutId=r.setTimeout(this.dehydrateDevice.bind(this),p)}},"dehydration")})}async setKeyAndQueueDehydration(e,t={},n){await this.setKey(e,t,n)||this.dehydrateDevice()}async setKey(e,t={},n){if(!e)return this.timeoutId&&(r.clearTimeout(this.timeoutId),this.timeoutId=void 0),await this.crypto.cryptoStore.doTxn("readwrite",[s.a.STORE_ACCOUNT],e=>{this.crypto.cryptoStore.storeSecretStorePrivateKey(e,"dehydration",null)}),this.key=void 0,void(this.keyInfo=void 0);let o=this.key&&e.length==this.key.length;for(let t=0;o&&t<e.length;t++)e[t]!=this.key[t]&&(o=!1);return o||(this.key=e,this.keyInfo=t,this.deviceDisplayName=n),o}async dehydrateDevice(){if(this.inProgress)d.a.log("Dehydration already in progress -- not starting new dehydration");else{this.inProgress=!0,this.timeoutId&&(r.clearTimeout(this.timeoutId),this.timeoutId=void 0);try{const t=e.from(this.crypto.olmDevice._pickleKey),n=await Object(c.c)(Object(a.encodeBase64)(this.key),t,h);await this.crypto.cryptoStore.doTxn("readwrite",[s.a.STORE_ACCOUNT],e=>{this.crypto.cryptoStore.storeSecretStorePrivateKey(e,"dehydration",{keyInfo:this.keyInfo,key:n,deviceDisplayName:this.deviceDisplayName,time:Date.now()})}),d.a.log("Attempting to dehydrate device"),d.a.log("Creating account");const o=new r.Olm.Account;o.create();const i=JSON.parse(o.identity_keys()),l=o.max_number_of_one_time_keys();o.generate_one_time_keys(l/2),o.generate_fallback_key();const p=JSON.parse(o.one_time_keys()),m=JSON.parse(o.fallback_key());o.mark_keys_as_published();const g=o.pickle(new Uint8Array(this.key)),f={algorithm:h,account:g};this.keyInfo.passphrase&&(f.passphrase=this.keyInfo.passphrase),d.a.log("Uploading account to server");const _=(await this.crypto.baseApis.http.authedRequest(void 0,"PUT","/dehydrated_device",void 0,{device_data:f,initial_device_display_name:this.deviceDisplayName},{prefix:"/_matrix/client/unstable/org.matrix.msc2697.v2"})).device_id;d.a.log("Preparing device keys",_);const b={algorithms:this.crypto.supportedAlgorithms,device_id:_,user_id:this.crypto.userId,keys:{["ed25519:"+_]:i.ed25519,["curve25519:"+_]:i.curve25519}},v=o.sign(u.a.stringify(b));b.signatures={[this.crypto.userId]:{["ed25519:"+_]:v}},this.crypto.crossSigningInfo.getId("self_signing")&&await this.crypto.crossSigningInfo.signObject(b,"self_signing"),d.a.log("Preparing one-time keys");const y={};for(const[e,t]of Object.entries(p.curve25519)){const n={key:t},r=o.sign(u.a.stringify(n));n.signatures={[this.crypto.userId]:{["ed25519:"+_]:r}},y["signed_curve25519:"+e]=n}d.a.log("Preparing fallback keys");const E={};for(const[e,t]of Object.entries(m.curve25519)){const n={key:t,fallback:!0},r=o.sign(u.a.stringify(n));n.signatures={[this.crypto.userId]:{["ed25519:"+_]:r}},E["signed_curve25519:"+e]=n}return d.a.log("Uploading keys to server"),await this.crypto.baseApis.http.authedRequest(void 0,"POST","/keys/upload/"+encodeURI(_),void 0,{device_keys:b,one_time_keys:y,"org.matrix.msc2732.fallback_keys":E}),d.a.log("Done dehydrating"),this.timeoutId=r.setTimeout(this.dehydrateDevice.bind(this),6048e5),_}finally{this.inProgress=!1}}}stop(){this.timeoutId&&(r.clearTimeout(this.timeoutId),this.timeoutId=void 0)}}}).call(this,n(24).Buffer,n(23))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return m}));var r=n(79),o=n.n(r),i=n(168),a=n(96),s=n(135),c=n(301),l=n(2),u=n(153),d=n(302),h=n(232),p=n(510);class m{constructor(e,t){this.baseApis=e,this.getKey=t,o()(this,"algorithm",void 0),o()(this,"backupInfo",void 0),o()(this,"checkedForBackup",void 0),o()(this,"sendingBackups",void 0),this.checkedForBackup=!1,this.sendingBackups=!1}get version(){return this.backupInfo&&this.backupInfo.version}static checkBackupVersion(e){const t=b[e.algorithm];if(!t)throw new Error("Unknown backup algorithm: "+e.algorithm);if("object"!=typeof e.auth_data)throw new Error("Invalid backup data returned");return t.checkBackupVersion(e)}static async makeAlgorithm(e,t){const n=b[e.algorithm];if(!n)throw new Error("Unknown backup algorithm");return await n.init(e.auth_data,t)}async enableKeyBackup(e){this.backupInfo=e,this.algorithm&&this.algorithm.free(),this.algorithm=await m.makeAlgorithm(e,this.getKey),this.baseApis.emit("crypto.keyBackupStatus",!0),this.scheduleKeyBackupSend()}disableKeyBackup(){this.algorithm&&this.algorithm.free(),this.algorithm=void 0,this.backupInfo=void 0,this.baseApis.emit("crypto.keyBackupStatus",!1)}getKeyBackupEnabled(){return this.checkedForBackup?Boolean(this.algorithm):null}async prepareKeyBackupVersion(e,t){const n=t?b[t]:v;if(!n)throw new Error("Unknown backup algorithm");const[r,o]=await n.prepare(e),i=Object(d.b)(r);return{algorithm:n.algorithmName,auth_data:o,recovery_key:i,privateKey:r}}async createKeyBackupVersion(e){this.algorithm=await m.makeAlgorithm(e,this.getKey)}async checkAndStart(){if(a.a.log("Checking key backup status..."),this.baseApis.isGuest())return a.a.log("Skipping key backup check since user is guest"),this.checkedForBackup=!0,null;let e;try{e=await this.baseApis.getKeyBackupVersion()}catch(e){return a.a.log("Error checking for active key backup",e),404===e.httpStatus&&(this.checkedForBackup=!0),null}this.checkedForBackup=!0;const t=await this.isKeyBackupTrusted(e);return t.usable&&!this.backupInfo?(a.a.log("Found usable key backup v"+e.version+": enabling key backups"),await this.enableKeyBackup(e)):!t.usable&&this.backupInfo?(a.a.log("No usable key backup: disabling key backup"),this.disableKeyBackup()):t.usable||this.backupInfo?t.usable&&this.backupInfo&&(e.version!==this.backupInfo.version?(a.a.log("On backup version "+this.backupInfo.version+" but found version "+e.version+": switching."),this.disableKeyBackup(),await this.enableKeyBackup(e),await this.scheduleAllGroupSessionsForBackup()):a.a.log("Backup version "+e.version+" still current")):a.a.log("No usable key backup: not enabling key backup"),{backupInfo:e,trustInfo:t}}async checkKeyBackup(){return this.checkedForBackup=!1,this.checkAndStart()}async isKeyBackupTrusted(e){const t={usable:!1,trusted_locally:!1,sigs:[]};if(!(e&&e.algorithm&&e.auth_data&&e.auth_data.signatures))return a.a.info("Key backup is absent or missing required data"),t;const n=this.baseApis.crypto.sessionStore.getLocalTrustedBackupPubKey();"public_key"in e.auth_data&&e.auth_data.public_key===n&&(a.a.info("Backup public key "+n+" is trusted locally"),t.trusted_locally=!0);const r=e.auth_data.signatures[this.baseApis.getUserId()]||[];for(const n of Object.keys(r)){const r=n.split(":");if("ed25519"!==r[0]){a.a.log("Ignoring unknown signature type: "+r[0]);continue}const o={deviceId:r[1]},i=this.baseApis.crypto.crossSigningInfo.getId();if(i===o.deviceId){o.crossSigningId=!0;try{await Object(s.verifySignature)(this.baseApis.crypto.olmDevice,e.auth_data,this.baseApis.getUserId(),o.deviceId,i),o.valid=!0}catch(e){a.a.warn("Bad signature from cross signing key "+i,e),o.valid=!1}t.sigs.push(o);continue}const c=this.baseApis.crypto.deviceList.getStoredDevice(this.baseApis.getUserId(),o.deviceId);if(c){o.device=c,o.deviceTrust=await this.baseApis.checkDeviceTrust(this.baseApis.getUserId(),o.deviceId);try{await Object(s.verifySignature)(this.baseApis.crypto.olmDevice,e.auth_data,this.baseApis.getUserId(),c.deviceId,c.getFingerprint()),o.valid=!0}catch(t){a.a.info("Bad signature from key ID "+n+" userID "+this.baseApis.getUserId()+" device ID "+c.deviceId+" fingerprint: "+c.getFingerprint(),e.auth_data,t),o.valid=!1}}else o.valid=null,a.a.info("Ignoring signature from unknown key "+n);t.sigs.push(o)}return t.usable=t.sigs.some(e=>e.valid&&(e.device&&e.deviceTrust.isVerified()||e.crossSigningId)),t.usable=t.usable||t.trusted_locally,t}async scheduleKeyBackupSend(e=1e4){if(!this.sendingBackups){this.sendingBackups=!0;try{const t=Math.random()*e;await Object(l.H)(t,void 0);let n=0;for(;;){if(!this.algorithm)return;try{if(0===await this.backupPendingKeys(200))return;n=0}catch(e){if(n++,a.a.log("Key backup request failed",e),e.data&&("M_NOT_FOUND"==e.data.errcode||"M_WRONG_ROOM_KEYS_VERSION"==e.data.errcode))throw await this.checkKeyBackup(),this.baseApis.crypto.emit("crypto.keyBackupFailed",e.data.errcode),e}n&&await Object(l.H)(1e3*Math.pow(2,Math.min(n-1,4)),void 0)}}finally{this.sendingBackups=!1}}}async backupPendingKeys(e){const t=await this.baseApis.crypto.cryptoStore.getSessionsNeedingBackup(e);if(!t.length)return 0;let n=await this.baseApis.crypto.cryptoStore.countSessionsNeedingBackup();this.baseApis.crypto.emit("crypto.keyBackupSessionsRemaining",n);const r={};for(const e of t){const t=e.sessionData.room_id;void 0===r[t]&&(r[t]={sessions:{}});const n=await this.baseApis.crypto.olmDevice.exportInboundGroupSession(e.senderKey,e.sessionId,e.sessionData);n.algorithm=s.MEGOLM_ALGORITHM;const o=(n.forwarding_curve25519_key_chain||[]).length,i=this.baseApis.crypto.deviceList.getUserByIdentityKey(s.MEGOLM_ALGORITHM,e.senderKey),a=this.baseApis.crypto.deviceList.getDeviceByIdentityKey(s.MEGOLM_ALGORITHM,e.senderKey),c=this.baseApis.crypto.checkDeviceInfoTrust(i,a).isVerified();r[t].sessions[e.sessionId]={first_message_index:n.first_known_index,forwarded_count:o,is_verified:c,session_data:await this.algorithm.encryptSession(n)}}return await this.baseApis.sendKeyBackup(void 0,void 0,this.backupInfo.version,{rooms:r}),await this.baseApis.crypto.cryptoStore.unmarkSessionsNeedingBackup(t),n=await this.baseApis.crypto.cryptoStore.countSessionsNeedingBackup(),this.baseApis.crypto.emit("crypto.keyBackupSessionsRemaining",n),t.length}async backupGroupSession(e,t){await this.baseApis.crypto.cryptoStore.markSessionsNeedingBackup([{senderKey:e,sessionId:t}]),this.backupInfo&&this.scheduleKeyBackupSend()}async scheduleAllGroupSessionsForBackup(){await this.flagAllGroupSessionsForBackup(),this.scheduleKeyBackupSend(0)}async flagAllGroupSessionsForBackup(){await this.baseApis.crypto.cryptoStore.doTxn("readwrite",[u.a.STORE_INBOUND_GROUP_SESSIONS,u.a.STORE_BACKUP],e=>{this.baseApis.crypto.cryptoStore.getAllEndToEndInboundGroupSessions(e,t=>{null!==t&&this.baseApis.crypto.cryptoStore.markSessionsNeedingBackup([t],e)})});const e=await this.baseApis.crypto.cryptoStore.countSessionsNeedingBackup();return this.baseApis.emit("crypto.keyBackupSessionsRemaining",e),e}countSessionsNeedingBackup(){return this.baseApis.crypto.cryptoStore.countSessionsNeedingBackup()}}class g{constructor(e,t,n){this.authData=e,this.publicKey=t,this.getKey=n}static async init(t,n){if(!t||!("public_key"in t))throw new Error("auth_data missing required information");const r=new e.Olm.PkEncryption;return r.set_recipient_key(t.public_key),new g(t,r,n)}static async prepare(t){const n=new e.Olm.PkDecryption;try{const r={};if(t)if(t instanceof Uint8Array)r.public_key=n.init_with_private_key(t);else{const e=await Object(c.c)(t);r.private_key_salt=e.salt,r.private_key_iterations=e.iterations,r.public_key=n.init_with_private_key(e.key)}else r.public_key=n.generate_key();return(new e.Olm.PkEncryption).set_recipient_key(r.public_key),[n.get_private_key(),r]}finally{n.free()}}static checkBackupVersion(e){if(!("public_key"in e.auth_data))throw new Error("Invalid backup data returned")}get untrusted(){return!0}async encryptSession(e){const t=Object.assign({},e);return delete t.session_id,delete t.room_id,delete t.first_known_index,this.publicKey.encrypt(JSON.stringify(t))}async decryptSessions(t){const n=await this.getKey(),r=new e.Olm.PkDecryption;try{if(r.init_with_private_key(n)!==this.authData.public_key)throw{errcode:i.b.RESTORE_BACKUP_ERROR_BAD_KEY};const e=[];for(const[n,o]of Object.entries(t))try{const t=JSON.parse(r.decrypt(o.session_data.ephemeral,o.session_data.mac,o.session_data.ciphertext));t.session_id=n,e.push(t)}catch(e){a.a.log("Failed to decrypt megolm session from backup",e,o)}return e}finally{r.free()}}async keyMatches(t){const n=new e.Olm.PkDecryption;let r;try{r=n.init_with_private_key(t)}finally{n.free()}return r===this.authData.public_key}free(){this.publicKey.free()}}o()(g,"algorithmName","m.megolm_backup.v1.curve25519-aes-sha2");const f=new p.a(null,"org.matrix.msc3270.v1.aes-hmac-sha2");class _{constructor(e,t){this.authData=e,this.key=t}static async init(e,t){if(!e)throw new Error("auth_data missing");const n=await t();if(e.mac){const{mac:t}=await Object(h.a)(n,e.iv);if(e.mac.replace(/=+$/g,"")!==t.replace(/=+/g,""))throw new Error("Key does not match")}return new _(e,n)}static async prepare(e){let t;const n={};if(e)if(e instanceof Uint8Array)t=new Uint8Array(e);else{const r=await Object(c.c)(e);n.private_key_salt=r.salt,n.private_key_iterations=r.iterations,t=r.key}else t=function(e){var t;const n=Object(l.r)();if(n)return n.randomBytes(e);if(null!==(t=window)&&void 0!==t&&t.crypto){const t=new Uint8Array(e);return window.crypto.getRandomValues(t),t}throw new Error("No usable crypto implementation")}(32);const{iv:r,mac:o}=await Object(h.a)(t);return n.iv=r,n.mac=o,[t,n]}static checkBackupVersion(e){if(!("iv"in e.auth_data)||!("mac"in e.auth_data))throw new Error("Invalid backup data returned")}get untrusted(){return!1}async encryptSession(e){const t=Object.assign({},e);return delete t.session_id,delete t.room_id,delete t.first_known_index,await Object(h.c)(JSON.stringify(t),this.key,e.session_id)}async decryptSessions(e){const t=[];for(const[n,r]of Object.entries(e))try{const e=JSON.parse(await Object(h.b)(r.session_data,this.key,n));e.session_id=n,t.push(e)}catch(e){a.a.log("Failed to decrypt megolm session from backup",e,r)}return t}async keyMatches(e){if(this.authData.mac){const{mac:t}=await Object(h.a)(e,this.authData.iv);return this.authData.mac.replace(/=+$/g,"")===t.replace(/=+/g,"")}return!0}free(){this.key.fill(0)}}o()(_,"algorithmName",f.name);const b={[g.algorithmName]:g,[_.algorithmName]:_},v=g}).call(this,n(23))},function(e,t,n){"use strict";var r;let o;n.d(t,"a",(function(){return o})),function(e){e.RoomId="room_id",e.Sender="sender"}(r||(r={})),function(e){e.Recent="recent",e.Rank="rank"}(o||(o={}))},function(e,t,n){(function(t){var n;n=function(){"use strict";var e=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,r=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},i=["top","right","bottom","left","width","height","size","weight"],a="undefined"!=typeof MutationObserver,s=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&c()}function s(){o(a)}function c(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return c}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},l=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||r},u=f(0,0,0,0);function d(e){return parseFloat(e)||0}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return u;var r=l(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=d(i)}return t}(r),i=o.left+o.right,a=o.top+o.bottom,s=d(r.width),c=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+i)!==t&&(s-=h(r,"left","right")+i),Math.round(c+a)!==n&&(c-=h(r,"top","bottom")+a)),!function(e){return e===l(e).document.documentElement}(e)){var p=Math.round(s+i)-t,m=Math.round(c+a)-n;1!==Math.abs(p)&&(s-=p),1!==Math.abs(m)&&(c-=m)}return f(o.left,o.top,s,c)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof l(e).SVGGraphicsElement}:function(e){return e instanceof l(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return n?m(e)?function(e){var t=e.getBBox();return f(0,0,t.width,t.height)}(e):p(e):u}function f(e,t,n,r){return{x:e,y:t,width:n,height:r}}var _=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=f(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,o,i,a,s,l,u=(r=(n=t).x,o=n.y,i=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:r,y:o,width:i,height:a,top:o,right:r+i,bottom:a+o,left:r}),l);c(this,{target:e,contentRect:u})},v=function(){function t(t,n,r){if(this.activeObservations_=[],this.observations_=new e,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new _(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),y="undefined"!=typeof WeakMap?new WeakMap:new e,E=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=s.getInstance(),r=new v(t,n,this);y.set(this,r)};return["observe","unobserve","disconnect"].forEach((function(e){E.prototype[e]=function(){var t;return(t=y.get(this))[e].apply(t,arguments)}})),void 0!==r.ResizeObserver?r.ResizeObserver:E},e.exports=n()}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(85);const u=["label","isExpanded","children","onClick","onContextMenu"],d=e=>{let{label:t,isExpanded:n,children:r,onClick:i,onContextMenu:s}=e,d=a()(e,u);return c.a.createElement(l.a,o()({},d,{onClick:i,onContextMenu:s||i,title:t,"aria-label":t,"aria-haspopup":!0,"aria-expanded":n}),r)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s);const l=["children","label"],u=e=>{let{children:t,label:n}=e,r=a()(e,l);return c.a.createElement("div",o()({},r,{role:"group","aria-label":n}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(85),u=n(106);const d=["children","label","tooltip"],h=e=>{let{children:t,label:n,tooltip:r}=e,i=a()(e,d);const s=i["aria-label"]||n;return r?c.a.createElement(u.a,o()({},i,{role:"menuitem",tabIndex:-1,"aria-label":s,title:r}),t):c.a.createElement(l.a,o()({},i,{role:"menuitem",tabIndex:-1,"aria-label":s}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(85);const u=["children","label","active","disabled"],d=e=>{let{children:t,label:n,active:r,disabled:i}=e,s=a()(e,u);return c.a.createElement(l.a,o()({},s,{role:"menuitemcheckbox","aria-checked":r,"aria-disabled":i,disabled:i,tabIndex:-1,"aria-label":n}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(85);const u=["children","label","active","disabled"],d=e=>{let{children:t,label:n,active:r,disabled:i}=e,s=a()(e,u);return c.a.createElement(l.a,o()({},s,{role:"menuitemradio","aria-checked":r,"aria-disabled":i,disabled:i,tabIndex:-1,"aria-label":n}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(104),u=n(137);const d=["children","label","onChange","onClose"],h=e=>{let{children:t,label:n,onChange:r,onClose:i}=e,s=a()(e,d);return c.a.createElement(u.a,o()({},s,{role:"menuitemcheckbox",tabIndex:-1,"aria-label":n,onChange:r,onKeyDown:e=>{e.key!==l.a.ENTER&&e.key!==l.a.SPACE||(e.stopPropagation(),e.preventDefault(),r(),e.key===l.a.ENTER&&i())},onKeyUp:e=>{e.key!==l.a.SPACE&&e.key!==l.a.ENTER||(e.stopPropagation(),e.preventDefault())}}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(104),u=n(189);const d=["children","label","onChange","onClose"],h=e=>{let{children:t,label:n,onChange:r,onClose:i}=e,s=a()(e,d);return c.a.createElement(u.a,o()({},s,{role:"menuitemradio",tabIndex:-1,"aria-label":n,onChange:r,onKeyDown:e=>{e.key!==l.a.ENTER&&e.key!==l.a.SPACE||(e.stopPropagation(),e.preventDefault(),r(),e.key===l.a.ENTER&&i())},onKeyUp:e=>{e.key!==l.a.SPACE&&e.key!==l.a.ENTER||(e.stopPropagation(),e.preventDefault())}}),t)}},function(e,t,n){"use strict";var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(291),l=n(82),u=n(227),d=n(80),h=n(190),p=n(121),m=n(382),g=n(81),f=n(349),_=n(97),b=n(144),v=n(140);let y=Object(g.a)("structures.FilePanel")(r=class extends s.a.Component{constructor(...e){super(...e),i()(this,"decryptingEvents",new Set),i()(this,"noRoom",void 0),i()(this,"state",{timelineSet:null}),i()(this,"onRoomTimeline",(e,t,n,r,o)=>{var i;if((null==t?void 0:t.roomId)!==(null===(i=this.props)||void 0===i?void 0:i.roomId))return;if(n||!o||!o.liveEvent||e.isRedacted())return;l.a.get().decryptEventIfNeeded(e),e.isBeingDecrypted()?this.decryptingEvents.add(e.getId()):this.addEncryptedLiveEvent(e)}),i()(this,"onEventDecrypted",(e,t)=>{if(e.getRoomId()!==this.props.roomId)return;const n=e.getId();this.decryptingEvents.delete(n)&&(t||this.addEncryptedLiveEvent(e))}),i()(this,"onPaginationRequest",(e,t,n)=>{const r=l.a.get(),o=u.a.get(),i=this.props.roomId,a=r.getRoom(i);return r.isRoomEncrypted(i)&&null!==o?o.paginateTimelineWindow(a,e,t,n):e.paginate(t,n)})}addEncryptedLiveEvent(e){if(!this.state.timelineSet)return;const t=this.state.timelineSet.getLiveTimeline();"m.room.message"===e.getType()&&-1!=["m.file","m.image","m.video","m.audio"].indexOf(e.getContent().msgtype)&&(this.state.timelineSet.eventIdToTimeline(e.getId())||this.state.timelineSet.addEventToTimeline(e,t,!1))}async componentDidMount(){const e=l.a.get();await this.updateTimelineSet(this.props.roomId),l.a.get().isRoomEncrypted(this.props.roomId)&&null!==u.a.get()&&(e.on("Room.timeline",this.onRoomTimeline),e.on("Event.decrypted",this.onEventDecrypted))}componentWillUnmount(){const e=l.a.get();null!==e&&l.a.get().isRoomEncrypted(this.props.roomId)&&null!==u.a.get()&&(e.removeListener("Room.timeline",this.onRoomTimeline),e.removeListener("Event.decrypted",this.onEventDecrypted))}async fetchFileEventsServer(e){const t=l.a.get(),n=new c.a(t.credentials.userId);n.setDefinition({room:{timeline:{contains_url:!0,types:["m.room.message"]}}});const r=await t.getOrCreateFilter("FILTER_FILES_"+t.credentials.userId,n);n.filterId=r;return e.getOrCreateFilteredTimelineSet(n)}async updateTimelineSet(e){const t=l.a.get(),n=t.getRoom(e),r=u.a.get();if(this.noRoom=!n,n){let o;try{if(o=await this.fetchFileEventsServer(n),t.isRoomEncrypted(e)&&null!==r){const e=o.getLiveTimeline();await r.populateFileTimeline(o,e,n,10)}this.setState({timelineSet:o})}catch(e){console.error("Failed to get or create file panel filter",e)}}else console.error("Failed to add filtered timelineSet for FilePanel as no room!")}render(){if(l.a.get().isGuest())return s.a.createElement(h.b,{className:"mx_FilePanel mx_RoomView_messageListWrapper",onClose:this.props.onClose,previousPhase:p.c.RoomSummary},s.a.createElement("div",{className:"mx_RoomView_empty"},Object(d.a)("You must <a>register</a> to use this functionality",{},{a:e=>s.a.createElement("a",{href:"#/register",key:"sub"},e)})));if(this.noRoom)return s.a.createElement(h.b,{className:"mx_FilePanel mx_RoomView_messageListWrapper",onClose:this.props.onClose,previousPhase:p.c.RoomSummary},s.a.createElement("div",{className:"mx_RoomView_empty"},Object(d.a)("You must join the room to see its files")));const e=s.a.createElement("div",{className:"mx_RightPanel_empty mx_FilePanel_empty"},s.a.createElement("h2",null,Object(d.a)("No files visible in this room")),s.a.createElement("p",null,Object(d.a)("Attach files from chat or just drag and drop them anywhere in a room."))),t=!this.noRoom&&l.a.get().isRoomEncrypted(this.props.roomId);return this.state.timelineSet?s.a.createElement(h.b,{className:"mx_FilePanel",onClose:this.props.onClose,previousPhase:p.c.RoomSummary,withoutScrollContainer:!0},s.a.createElement(m.b,{isRoomEncrypted:t,kind:m.a.Files}),s.a.createElement(f.a,{manageReadReceipts:!1,manageReadMarkers:!1,timelineSet:this.state.timelineSet,showUrlPreview:!1,onPaginationRequest:this.onPaginationRequest,tileShape:b.a.FileGrid,resizeNotifier:this.props.resizeNotifier,empty:e,layout:v.a.Group})):s.a.createElement(h.b,{className:"mx_FilePanel",onClose:this.props.onClose,previousPhase:p.c.RoomSummary},s.a.createElement(_.a,null))}})||r;t.a=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(530),h=n(84),p=n(387),m=n(546),g=n(85),f=n(548),_=n(88),b=n.n(_),v=n(111),y=n(82),E=n(89),S=n(87),w=n(83),C=n(267),T=n(188),x=n(195),k=n(236),F=n(841),O=n(97),R=n(98),D=n(113),I=n(81);let A=Object(I.a)("views.settings.tabs.user.GeneralUserSettingsTab")((i=o=class extends l.a.Component{constructor(){super(),s()(this,"_onAction",e=>{"id_server_changed"===e.action&&(this.setState({haveIdServer:Boolean(y.a.get().getIdentityServerUrl())}),this._getThreepidState())}),s()(this,"_onEmailsChange",e=>{this.setState({emails:e})}),s()(this,"_onMsisdnsChange",e=>{this.setState({msisdns:e})}),s()(this,"_onLanguageChange",e=>{if(this.state.language===e)return;h.b.setValue("language",null,R.a.DEVICE,e),this.setState({language:e});const t=v.a.get();t&&(t.setLanguage(e),t.reload())}),s()(this,"_onSpellCheckLanguagesChange",e=>{this.setState({spellCheckLanguages:e});const t=v.a.get();t&&t.setSpellCheckLanguages(e)}),s()(this,"_onPasswordChangeError",e=>{let t=e.error||e.message||"";403===e.httpStatus?t=Object(u.a)("Failed to change password. Is your password correct?"):t||(t+=` (HTTP status ${e.httpStatus})`);const n=E.getComponent("dialogs.ErrorDialog");console.error("Failed to change password: "+t),S.a.createTrackedDialog("Failed to change password","",n,{title:Object(u.a)("Error"),description:t})}),s()(this,"_onPasswordChanged",()=>{const e=E.getComponent("dialogs.ErrorDialog");S.a.createTrackedDialog("Password changed","",e,{title:Object(u.a)("Success"),description:Object(u.a)("Your password was successfully changed. You will not receive push notifications on other sessions until you log back in to them")+"."})}),s()(this,"_onDeactivateClicked",()=>{S.a.createTrackedDialog("Deactivate Account","",f.a,{onFinished:e=>{e&&this.props.closeSettingsFn()}})}),this.state={language:u.d(),spellCheckLanguages:[],haveIdServer:Boolean(y.a.get().getIdentityServerUrl()),serverSupportsSeparateAddAndBind:null,idServerHasUnsignedTerms:!1,requiredPolicyInfo:{hasTerms:!1},emails:[],msisdns:[],loading3pids:!0},this.dispatcherRef=w.a.register(this._onAction)}async UNSAFE_componentWillMount(){const e=y.a.get(),t=await e.doesServerSupportSeparateAddAndBind(),n=(await e.getCapabilities())["m.change_password"],r=!n||!1!==n.enabled;this.setState({serverSupportsSeparateAddAndBind:t,canChangePassword:r}),this._getThreepidState()}async componentDidMount(){const e=v.a.get();e&&this.setState({spellCheckLanguages:await e.getSpellCheckLanguages()})}componentWillUnmount(){w.a.unregister(this.dispatcherRef)}async _getThreepidState(){const e=y.a.get();this._checkTerms();let t=[];try{t=await Object(F.a)(e)}catch(e){const t=y.a.get().getIdentityServerUrl();console.warn(`Unable to reach identity server at ${t} to check for 3PIDs bindings in Settings`),console.warn(e)}this.setState({emails:t.filter(e=>"email"===e.medium),msisdns:t.filter(e=>"msisdn"===e.medium),loading3pids:!1})}async _checkTerms(){if(!this.state.haveIdServer)return void this.setState({idServerHasUnsignedTerms:!1});const e=y.a.get().getIdentityServerUrl(),t=new x.a;try{const n=await t.getAccessToken({check:!1});await Object(C.d)([new C.a(T.a.IS,e,n)],(t,n,r)=>new Promise((r,o)=>{this.setState({idServerName:Object(k.a)(e),requiredPolicyInfo:{hasTerms:!0,policiesAndServices:t,agreedUrls:n,resolve:r}})})),this.setState({requiredPolicyInfo:{hasTerms:!1}})}catch(t){console.warn(`Unable to reach identity server at ${e} to check for terms in Settings`),console.warn(t)}}_renderProfileSection(){return l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement(d.a,null))}_renderAccountSection(){const e=E.getComponent("views.settings.ChangePassword"),t=E.getComponent("views.settings.account.EmailAddresses"),n=E.getComponent("views.settings.account.PhoneNumbers");let r=l.a.createElement(e,{className:"mx_GeneralUserSettingsTab_changePassword",rowClassName:"",buttonKind:"primary",onError:this._onPasswordChangeError,onFinished:this._onPasswordChanged}),o=null;if(h.b.getValue(D.a.ThirdPartyID)&&(this.state.haveIdServer||!0===this.state.serverSupportsSeparateAddAndBind)){const e=this.state.loading3pids?l.a.createElement(O.a,null):l.a.createElement(t,{emails:this.state.emails,onEmailsChange:this._onEmailsChange}),r=this.state.loading3pids?l.a.createElement(O.a,null):l.a.createElement(n,{msisdns:this.state.msisdns,onMsisdnsChange:this._onMsisdnsChange});o=l.a.createElement("div",null,l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Email addresses")),e,l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Phone numbers")),r)}else null===this.state.serverSupportsSeparateAddAndBind&&(o=l.a.createElement(O.a,null));let i=Object(u.a)("Set a new account password...");return this.state.canChangePassword||(i=null,r=null),l.a.createElement("div",{className:"mx_SettingsTab_section mx_GeneralUserSettingsTab_accountSection"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Account")),l.a.createElement("p",{className:"mx_SettingsTab_subsectionText"},i),r,o)}_renderLanguageSection(){return l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Language and region")),l.a.createElement(p.a,{className:"mx_GeneralUserSettingsTab_languageInput",onOptionChange:this._onLanguageChange,value:this.state.language}))}_renderSpellCheckSection(){return l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Spell check dictionaries")),l.a.createElement(m.a,{languages:this.state.spellCheckLanguages,onLanguagesChange:this._onSpellCheckLanguagesChange}))}_renderDiscoverySection(){const e=E.getComponent("views.settings.SetIdServer");if(this.state.requiredPolicyInfo.hasTerms){const t=E.getComponent("views.terms.InlineTermsAgreement"),n=l.a.createElement("span",{className:"mx_SettingsTab_subsectionText"},Object(u.a)("Agree to the identity server (%(serverName)s) Terms of Service to allow yourself to be discoverable by email address or phone number.",{serverName:this.state.idServerName}));return l.a.createElement("div",null,l.a.createElement(t,{policiesAndServicePairs:this.state.requiredPolicyInfo.policiesAndServices,agreedUrls:this.state.requiredPolicyInfo.agreedUrls,onFinished:this.state.requiredPolicyInfo.resolve,introElement:n}),l.a.createElement(e,{missingTerms:!0}))}const t=E.getComponent("views.settings.discovery.EmailAddresses"),n=E.getComponent("views.settings.discovery.PhoneNumbers"),r=this.state.loading3pids?l.a.createElement(O.a,null):l.a.createElement(t,{emails:this.state.emails}),o=this.state.loading3pids?l.a.createElement(O.a,null):l.a.createElement(n,{msisdns:this.state.msisdns}),i=this.state.haveIdServer?l.a.createElement("div",{className:"mx_GeneralUserSettingsTab_discovery"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Email addresses")),r,l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Phone numbers")),o):null;return l.a.createElement("div",{className:"mx_SettingsTab_section"},i,l.a.createElement(e,null))}_renderManagementSection(){return l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Account management")),l.a.createElement("span",{className:"mx_SettingsTab_subsectionText"},Object(u.a)("Deactivating your account is a permanent action - be careful!")),l.a.createElement(g.a,{onClick:this._onDeactivateClicked,kind:"danger"},Object(u.a)("Deactivate Account")))}_renderIntegrationManagerSection(){if(!h.b.getValue(D.a.Widgets))return null;const e=E.getComponent("views.settings.SetIntegrationManager");return l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement(e,null))}render(){const e=v.a.get().supportsMultiLanguageSpellCheck(),t=this.state.requiredPolicyInfo.hasTerms?l.a.createElement("img",{className:"mx_GeneralUserSettingsTab_warningIcon",src:n(654),width:"18",height:"18",alt:Object(u.a)("Warning")}):null;let r,o;return h.b.getValue(D.a.Deactivate)&&(r=l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(u.a)("Deactivate account")),this._renderManagementSection())),h.b.getValue(D.a.IdentityServer)&&(o=l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"mx_SettingsTab_heading"},t," ",Object(u.a)("Discovery")),this._renderDiscoverySection())),l.a.createElement("div",{className:"mx_SettingsTab"},l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(u.a)("General")),this._renderProfileSection(),this._renderAccountSection(),this._renderLanguageSection(),e?this._renderSpellCheckSection():null,o,this._renderIntegrationManagerSection(),r)}},s()(o,"propTypes",{closeSettingsFn:b.a.func.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(82),u=n(101),d=n(531),h=n(89),p=n(208),m=n(87),g=n(105),f=n(81),_=n(100);let b=Object(f.a)("views.settings.ProfileSettings")(r=class extends s.a.Component{constructor(){super(),i()(this,"_uploadAvatar",()=>{this._avatarUpload.current.click()}),i()(this,"_removeAvatar",()=>{this._avatarUpload.current.value="",this.setState({avatarUrl:null,avatarFile:null,enableProfileSave:!0})}),i()(this,"_cancelProfileChanges",async e=>{e.stopPropagation(),e.preventDefault(),this.state.enableProfileSave&&this.setState({enableProfileSave:!1,displayName:this.state.originalDisplayName,avatarUrl:this.state.originalAvatarUrl,avatarFile:null})}),i()(this,"_saveProfile",async e=>{if(e.stopPropagation(),e.preventDefault(),!this.state.enableProfileSave)return;this.setState({enableProfileSave:!1});const t=l.a.get(),n={},r=this.state.displayName.trim();try{if(this.state.originalDisplayName!==this.state.displayName&&(await t.setDisplayName(r),n.originalDisplayName=r,n.displayName=r),this.state.avatarFile){console.log(`Uploading new avatar, ${this.state.avatarFile.name} of type ${this.state.avatarFile.type}, (${this.state.avatarFile.size}) bytes`);const e=await t.uploadContent(this.state.avatarFile);await t.setAvatarUrl(e),n.avatarUrl=Object(_.b)(e).getSquareThumbnailHttp(96),n.originalAvatarUrl=n.avatarUrl,n.avatarFile=null}else this.state.originalAvatarUrl!==this.state.avatarUrl&&await t.setAvatarUrl("")}catch(e){console.log("Failed to save profile",e),m.a.createTrackedDialog("Failed to save profile","",g.a,{title:Object(c.a)("Failed to save your profile"),description:e&&e.message?e.message:Object(c.a)("The operation could not be completed")})}this.setState(n)}),i()(this,"_onDisplayNameChanged",e=>{this.setState({displayName:e.target.value,enableProfileSave:!0})}),i()(this,"_onAvatarChanged",e=>{if(!e.target.files||!e.target.files.length)return void this.setState({avatarUrl:this.state.originalAvatarUrl,avatarFile:null,enableProfileSave:!1});const t=e.target.files[0],n=new FileReader;n.onload=e=>{this.setState({avatarUrl:e.target.result,avatarFile:t,enableProfileSave:!0})},n.readAsDataURL(t)});const e=l.a.get();let t=p.a.instance.avatarMxc;t&&(t=Object(_.b)(t).getSquareThumbnailHttp(96)),this.state={userId:e.getUserId(),originalDisplayName:p.a.instance.displayName,displayName:p.a.instance.displayName,originalAvatarUrl:t,avatarUrl:t,avatarFile:null,enableProfileSave:!1},this._avatarUpload=Object(a.createRef)()}render(){const e=Object(d.a)("user-settings");let t=null;e&&(t=s.a.createElement("span",{className:"mx_ProfileSettings_hostingSignup"},Object(c.a)("<a>Upgrade</a> to your own domain",{},{a:t=>s.a.createElement("a",{href:e,target:"_blank",rel:"noreferrer noopener"},t)}),s.a.createElement("a",{href:e,target:"_blank",rel:"noreferrer noopener"},s.a.createElement("img",{src:n(545),width:"11",height:"10",alt:""}))));const r=h.getComponent("elements.AccessibleButton"),o=h.getComponent("settings.AvatarSetting");return s.a.createElement("form",{onSubmit:this._saveProfile,autoComplete:"off",noValidate:!0,className:"mx_ProfileSettings_profileForm"},s.a.createElement("input",{type:"file",ref:this._avatarUpload,className:"mx_ProfileSettings_avatarUpload",onChange:this._onAvatarChanged,accept:"image/*"}),s.a.createElement("div",{className:"mx_ProfileSettings_profile"},s.a.createElement("div",{className:"mx_ProfileSettings_controls"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(c.a)("Profile")),s.a.createElement(u.a,{label:Object(c.a)("Display Name"),type:"text",value:this.state.displayName,autoComplete:"off",onChange:this._onDisplayNameChanged}),s.a.createElement("p",null,this.state.userId,t)),s.a.createElement(o,{avatarUrl:this.state.avatarUrl,avatarName:this.state.displayName||this.state.userId,avatarAltText:Object(c.a)("Profile picture"),uploadAvatar:this._uploadAvatar,removeAvatar:this._removeAvatar})),s.a.createElement("div",{className:"mx_ProfileSettings_buttons"},s.a.createElement(r,{onClick:this._cancelProfileChanges,kind:"link",disabled:!this.state.enableProfileSave},Object(c.a)("Cancel")),s.a.createElement(r,{onClick:this._saveProfile,kind:"primary",disabled:!this.state.enableProfileSave},Object(c.a)("Save"))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(90),o=n(82);function i(e){const t=r.a.get().hosting_signup_link;if(!t)return null;if(!e)return t;if("matrix.org"!==o.a.get().getDomain())return null;try{const n=new URL(t);return n.searchParams.set("utm_campaign",e),n.format()}catch(e){return t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(82),a=n(3);class s extends a.EventEmitter{constructor(e){super(),this.dispatcher=e,o()(this,"matrixClient",void 0),o()(this,"dispatcherRef",void 0),o()(this,"onAction",async e=>{if("MatrixActions.sync"===e.action){if("PREPARED"!==e.prevState||"PREPARED"===e.state)return;this.matrixClient!==e.matrixClient&&(this.matrixClient&&await this.onNotReady(),this.matrixClient=e.matrixClient,await this.onReady())}else"on_client_not_viable"!==e.action&&"on_logged_out"!==e.action||this.matrixClient&&(await this.onNotReady(),this.matrixClient=null)}),this.dispatcherRef=this.dispatcher.register(this.onAction),i.a.get()&&(this.matrixClient=i.a.get(),this.onReady())}get mxClient(){return this.matrixClient}useUnitTestClient(e){this.matrixClient=e}destroy(){this.dispatcher.unregister(this.dispatcherRef)}async onReady(){}async onNotReady(){}}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(170),o=n(118);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(92)),a=o(n(79)),s=o(n(534)),c=o(n(953)),l=r(n(78)),u=n(88),d=r(n(193)),h=n(957),p=n(538),m=n(386);function g(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}var f=[],_=l.forwardRef((function(e,t){var n,r=l.useState(),o=(0,c.default)(r,2),u=o[0],_=o[1],b=l.useRef(),v=l.useRef(!1),y=l.useRef(null),E=e.children,S=e.disabled,w=e.noFocusGuards,C=e.persistentFocus,T=e.crossFrame,x=e.autoFocus,k=e.allowTextSelection,F=e.group,O=e.className,R=e.whiteList,D=e.shards,I=void 0===D?f:D,A=e.as,N=void 0===A?"div":A,M=e.lockProps,P=void 0===M?{}:M,L=e.sideCar,j=e.returnFocus,U=e.onActivation,B=e.onDeactivation,G=l.useState({}),V=(0,c.default)(G,1)[0],q=l.useCallback((function(){y.current=y.current||document&&document.activeElement,b.current&&U&&U(b.current),v.current=!0}),[U]),H=l.useCallback((function(){v.current=!1,B&&B(b.current)}),[B]),z=l.useCallback((function(e){var t=y.current;if(Boolean(j)&&t&&t.focus){var n="object"===(0,s.default)(j)?j:void 0;y.current=null,e?Promise.resolve().then((function(){return t.focus(n)})):t.focus(n)}}),[j]),W=l.useCallback((function(e){v.current&&m.mediumFocus.useMedium(e)}),[]),K=m.mediumBlur.useMedium,Y=l.useCallback((function(e){b.current!==e&&(b.current=e,_(e))}),[]);void 0!==k&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),l.useEffect((function(){b.current||console.error("FocusLock: could not obtain ref to internal node")}),[]);var $=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}((n={},(0,a.default)(n,d.FOCUS_DISABLED,S&&"disabled"),(0,a.default)(n,d.FOCUS_GROUP,F),n),P),Q=!0!==w,J=Q&&"tail"!==w,X=(0,h.useMergeRefs)([t,Y]);return l.createElement(l.Fragment,null,Q&&[l.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:S?-1:0,style:p.hiddenGuard}),l.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:S?-1:1,style:p.hiddenGuard})],!S&&l.createElement(L,{id:V,sideCar:m.mediumSidecar,observed:u,disabled:S,persistentFocus:C,crossFrame:T,autoFocus:x,whiteList:R,shards:I,onActivation:q,onDeactivation:H,returnFocus:z}),l.createElement(N,(0,i.default)({ref:X},$,{className:O,onBlur:K,onFocus:W}),E),J&&l.createElement("div",{"data-focus-guard":!0,tabIndex:S?-1:0,style:p.hiddenGuard}))}));_.propTypes={children:u.node,disabled:u.bool,returnFocus:(0,u.oneOfType)([u.bool,u.object]),noFocusGuards:u.bool,allowTextSelection:u.bool,autoFocus:u.bool,persistentFocus:u.bool,crossFrame:u.bool,group:u.string,className:u.string,whiteList:u.func,shards:(0,u.arrayOf)(u.any),as:(0,u.oneOfType)([u.string,u.func,u.object]),lockProps:u.object,onActivation:u.func,onDeactivation:u.func,sideCar:u.any.isRequired},_.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var b=_;t.default=b},function(e,t,n){var r=n(537);e.exports=function(e,t){if(e){if("string"==typeof e)return r(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?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(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},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(118),o=n(170);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.hiddenGuard=void 0;var i=o(n(78)),a=r(n(88)),s={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};t.hiddenGuard=s;var c=function(e){var t=e.children;return i.createElement(i.Fragment,null,i.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:s}),t,t&&i.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:s}))};c.propTypes={children:a.default.node},c.defaultProps={children:null};var l=c;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78),o=n(965),i=new WeakMap;t.useSidecar=function(e,t){var n=t&&t.options||{};if(o.env.isNode&&!n.ssr)return[null,null];var a=o.env.forceCache||o.env.isNode&&!!n.ssr||!n.async,s=r.useState(a?function(){return i.get(e)}:void 0),c=s[0],l=s[1],u=r.useState(null),d=u[0],h=u[1];return r.useEffect((function(){c||e().then((function(n){var r,o=t?t.read():n.default||n;if(!o)throw console.error("Sidecar error: with importer",e),t?(console.error("Sidecar error: with medium",t),r=new Error("Sidecar medium was not found")):r=new Error("Sidecar was not found in exports"),h((function(){return r})),r;i.set(e,o),l((function(){return o}))}),(function(e){return h((function(){return e}))}))}),[]),[c,d]}},function(e,t,n){var r=n(977);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(209),o=n(308),i=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&i(e.parentNode,t),t};t.getCommonParent=function(e,t){for(var n=i(e),r=i(t),o=0;o<n.length;o+=1){var a=n[o];if(r.indexOf(a)>=0)return a}return!1},t.getTopCommonParent=function(e,n,o){var i=r.asArray(e),a=r.asArray(n),s=i[0],c=!1;return a.filter(Boolean).forEach((function(e){c=t.getCommonParent(c||e,e)||c,o.filter(Boolean).forEach((function(e){var n=t.getCommonParent(s,e);n&&(c=!c||n.contains(c)?n:t.getCommonParent(n,c))}))})),c},t.allParentAutofocusables=function(e,t){return e.reduce((function(e,n){return e.concat(o.parentAutofocusables(n,t))}),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(985),o=n(307),i=n(308),a=n(544),s=n(309),c=n(541);t.getFocusMerge=function(e,t){var n=document&&document.activeElement,l=o.getAllAffectedNodes(e).filter(s.isNotAGuard),u=c.getTopCommonParent(n||e,e,l),d=new Map,h=i.getAllTabbableNodes(l,d),p=i.getTabbableNodes(l,d).filter((function(e){var t=e.node;return s.isNotAGuard(t)}));if(p[0]||(p=h)[0]){var m,g,f,_,b=i.getAllTabbableNodes([u],d).map((function(e){return e.node})),v=(m=b,g=p,f=new Map,g.forEach((function(e){return f.set(e.node,e)})),m.map((function(e){return f.get(e)})).filter(s.isDefined)),y=v.map((function(e){return e.node})),E=r.newFocus(y,b,n,t);if(E===r.NEW_FOCUS){var S=h.map((function(e){return e.node})).filter((_=c.allParentAutofocusables(l,d),function(e){return e.autofocus||e.dataset&&!!e.dataset.autofocus||_.indexOf(e)>=0}));return{node:S&&S.length?a.pickFirstFocus(S):a.pickFirstFocus(y)}}return void 0===E?E:v[E]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return"INPUT"===e.tagName&&"radio"===e.type};t.correctNode=function(e,t){return r(e)&&e.name?function(e,t){return t.filter(r).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},t.correctNodes=function(e){var n=new Set;return e.forEach((function(r){return n.add(t.correctNode(r,e))})),e.filter((function(e){return n.has(e)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(543);t.pickFirstFocus=function(e){return e[0]&&e.length>1?r.correctNode(e[0],e):e[0]},t.pickFocusable=function(e,t){return e.length>1?e.indexOf(r.correctNode(e[t],e)):t}},function(e,t){e.exports="img/external-link.a8d3e9b.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(547),l=n(85),u=n(80),d=n(81);class h extends s.a.Component{constructor(...e){super(...e),i()(this,"onRemove",e=>(e.stopPropagation(),e.preventDefault(),this.props.onRemoved(this.props.language)))}render(){return s.a.createElement("div",{className:"mx_ExistingSpellCheckLanguage"},s.a.createElement("span",{className:"mx_ExistingSpellCheckLanguage_language"},this.props.language),s.a.createElement(l.a,{onClick:this.onRemove,kind:"danger_sm"},Object(u.a)("Remove")))}}let p=Object(d.a)("views.settings.SpellCheckLanguages")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onRemoved",e=>{const t=this.props.languages.filter(t=>t!==e);this.props.onLanguagesChange(t)}),i()(this,"onAddClick",e=>{e.stopPropagation(),e.preventDefault();const t=this.state.newLanguage;t&&(this.props.languages.includes(t)||(this.props.languages.push(t),this.props.onLanguagesChange(this.props.languages)))}),i()(this,"onNewLanguageChange",e=>{this.state.newLanguage!==e&&this.setState({newLanguage:e})}),this.state={newLanguage:""}}render(){const e=this.props.languages.map(e=>s.a.createElement(h,{language:e,onRemoved:this.onRemoved,key:e})),t=s.a.createElement(l.a,{onClick:this.onAddClick,kind:"primary"},Object(u.a)("Add"));return s.a.createElement("div",{className:"mx_SpellCheckLanguages"},e,s.a.createElement("form",{onSubmit:this.onAddClick,noValidate:!0},s.a.createElement(c.a,{className:"mx_GeneralUserSettingsTab_spellCheckLanguageInput",value:this.state.newLanguage,onOptionChange:this.onNewLanguageChange}),t))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o=n(78),i=n.n(o),a=n(263),s=n(111),c=n(84),l=n(80),u=n(81),d=n(97);let h=Object(u.a)("views.elements.SpellCheckLanguagesDropdown")(r=class extends i.a.Component{constructor(e){super(e),this.onSearchChange=this.onSearchChange.bind(this),this.state={searchQuery:"",languages:null}}componentDidMount(){const e=s.a.get();e&&e.getAvailableSpellCheckLanguages().then(e=>{e.sort((function(e,t){return e<t?-1:e>t?1:0}));const t=[];e.forEach(e=>{t.push({label:e,value:e})}),this.setState({languages:t})}).catch(e=>{this.setState({languages:["en"]})})}onSearchChange(e){this.setState({searchQuery:e})}render(){if(null===this.state.languages)return i.a.createElement(d.a,null);let e;e=this.state.searchQuery?this.state.languages.filter(e=>function(e,t){return!!t.label.toUpperCase().includes(e.toUpperCase())||t.value.toUpperCase()===e.toUpperCase()}(this.state.searchQuery,e)):this.state.languages;const t=e.map(e=>i.a.createElement("div",{key:e.value},e.label));let n=c.b.getValue("language",null,!0),r=null;return n||(n=navigator.language||navigator.userLanguage),r=this.props.value||n,i.a.createElement(a.a,{id:"mx_LanguageDropdown",className:this.props.className,onOptionChange:this.props.onOptionChange,onSearchChange:this.onSearchChange,searchEnabled:!0,value:r,label:Object(l.a)("Language Dropdown")},t)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(124),l=n(82),u=n(264),d=n(80),h=n(354),p=n(203),m=n(137),g=n(81),f=n(95);let _=Object(g.a)("views.dialogs.DeactivateAccountDialog")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onStagePhaseChange",(e,t)=>{const n={[p.c.PHASE_PREAUTH]:{body:Object(d.a)("Confirm your account deactivation by using Single Sign On to prove your identity."),continueText:Object(d.a)("Single Sign On"),continueKind:"danger"},[p.c.PHASE_POSTAUTH]:{body:Object(d.a)("Are you sure you want to deactivate your account? This is irreversible."),continueText:Object(d.a)("Confirm account deactivation"),continueKind:"danger"}},r={[p.c.LOGIN_TYPE]:n,[p.c.UNSTABLE_LOGIN_TYPE]:n,[p.b.LOGIN_TYPE]:{[p.a]:{body:Object(d.a)("To continue, please enter your password:")}}}[e];let o=null,i=null,a=null;if(r){const e=r[t];e&&e.body&&(o=e.body),e&&e.continueText&&(i=e.continueText),e&&e.continueKind&&(a=e.continueKind)}this.setState({bodyText:o,continueText:i,continueKind:a})}),i()(this,"onUIAuthFinished",(e,t)=>{e||(t!==h.a?(console.error("Error during UI Auth:",{result:t}),this.setState({errStr:Object(d.a)("There was a problem communicating with the server. Please try again.")})):this.onCancel())}),i()(this,"onUIAuthComplete",e=>{l.a.get().deactivateAccount(e,this.state.shouldErase).then(e=>{c.a.trackEvent("Account","Deactivate Account"),u.j(),this.props.onFinished(!0)}).catch(e=>{console.error(e),this.setState({errStr:Object(d.a)("There was a problem communicating with the server. Please try again.")})})}),i()(this,"onEraseFieldChange",e=>{this.setState({shouldErase:e.currentTarget.checked,authEnabled:!1}),this.initAuth(e.currentTarget.checked)}),this.state={shouldErase:!1,errStr:null,authData:null,authEnabled:!0,bodyText:null,continueText:null,continueKind:null},this.initAuth(!1)}onCancel(){this.props.onFinished(!1)}initAuth(e){l.a.get().deactivateAccount(null,e).then(e=>{console.warn("User's account got deactivated without confirmation: Server had no auth"),this.setState({errStr:Object(d.a)("Server did not require any authentication")})}).catch(e=>{e&&401===e.httpStatus&&e.data?this.setState({authData:e.data,authEnabled:!0}):this.setState({errStr:Object(d.a)("Server did not return valid authentication information.")})})}render(){let e=null;this.state.errStr&&(e=s.a.createElement("div",{className:"error"},this.state.errStr));let t=s.a.createElement("div",null,Object(d.a)("Loading..."));return this.state.authData&&this.state.authEnabled&&(t=s.a.createElement("div",null,this.state.bodyText,s.a.createElement(h.b,{matrixClient:l.a.get(),authData:this.state.authData,makeRequest:this.onUIAuthComplete,onAuthFinished:this.onUIAuthFinished,onStagePhaseChange:this.onStagePhaseChange,continueText:this.state.continueText,continueKind:this.state.continueKind}))),s.a.createElement(f.a,{className:"mx_DeactivateAccountDialog",onFinished:this.props.onFinished,titleClass:"danger",title:Object(d.a)("Deactivate Account")},s.a.createElement("div",{className:"mx_Dialog_content"},s.a.createElement("p",null,Object(d.a)("This will make your account permanently unusable. You will not be able to log in, and no one will be able to re-register the same user ID. This will cause your account to leave all rooms it is participating in, and it will remove your account details from your identity server. <b>This action is irreversible.</b>",{},{b:e=>s.a.createElement("b",null," ",e," ")})),s.a.createElement("p",null,Object(d.a)("Deactivating your account <b>does not by default cause us to forget messages you have sent.</b> If you would like us to forget your messages, please tick the box below.",{},{b:e=>s.a.createElement("b",null," ",e," ")})),s.a.createElement("p",null,Object(d.a)("Message visibility in Matrix is similar to email. Our forgetting your messages means that messages you have sent will not be shared with any new or unregistered users, but registered users who already have access to these messages will still have access to their copy.")),s.a.createElement("div",{className:"mx_DeactivateAccountDialog_input_section"},s.a.createElement("p",null,s.a.createElement(m.a,{checked:this.state.shouldErase,onChange:this.onEraseFieldChange},Object(d.a)("Please forget all messages I have sent when my account is deactivated (<b>Warning:</b> this will cause future users to see an incomplete view of conversations)",{},{b:e=>s.a.createElement("b",null,e)}))),e,t)))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(79),o=n.n(r),i=n(993),a=n.n(i),s=n(134),c=n(153),l=n(380),u=n(363);function d(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}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const p=window.localStorage;let m;try{m=window.indexedDB}catch(e){}function g(e){const t={useAuthorizationHeader:!0};return m&&p&&(t.store=new u.a({indexedDB:m,dbName:"riot-web-sync",localStorage:p,workerFactory:()=>new a.a})),p&&(t.sessionStore=new l.a(p)),m&&(t.cryptoStore=new c.a(m,"matrix-js-sdk:crypto")),Object(s.createClient)(h(h({},t),e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(84),u=n(98),d=n(81),h=n(95);let p=Object(d.a)("views.dialogs.AskInviteAnywayDialog")(r=class extends s.a.Component{constructor(...e){super(...e),i()(this,"onInviteClicked",()=>{this.props.onInviteAnyways(),this.props.onFinished(!0)}),i()(this,"onInviteNeverWarnClicked",()=>{l.b.setValue("promptBeforeInviteUnknownUsers",null,u.a.ACCOUNT,!1),this.props.onInviteAnyways(),this.props.onFinished(!0)}),i()(this,"onGiveUpClicked",()=>{this.props.onGiveUp(),this.props.onFinished(!1)})}render(){const e=this.props.unknownProfileUsers.map(e=>s.a.createElement("li",{key:e.userId},e.userId,": ",e.errorText));return s.a.createElement(h.a,{className:"mx_RetryInvitesDialog",onFinished:this.onGiveUpClicked,title:Object(c.a)("The following users may not exist"),contentId:"mx_Dialog_content"},s.a.createElement("div",{id:"mx_Dialog_content"},s.a.createElement("p",null,Object(c.a)("Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?")),s.a.createElement("ul",null,e)),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("button",{onClick:this.onGiveUpClicked},Object(c.a)("Close")),s.a.createElement("button",{onClick:this.onInviteNeverWarnClicked},Object(c.a)("Invite anyway and never warn me again")),s.a.createElement("button",{onClick:this.onInviteClicked,autoFocus:!0},Object(c.a)("Invite anyway"))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(552);const o="https://matrix.to";class i extends r.b{constructor(){super()}forEvent(e,t,n){return`${o}/#/${e}/${t}${this.encodeServerCandidates(n)}`}forRoom(e,t){return`${o}/#/${e}${this.encodeServerCandidates(t)}`}forUser(e){return`${o}/#/${e}`}forGroup(e){return`${o}/#/${e}`}forEntity(e){return`${o}/#/${e}`}isPermalinkHost(e){return"matrix.to"===e}encodeServerCandidates(e){return e&&0!==e.length?"?via="+e.map(e=>encodeURIComponent(e)).join("&via="):""}parsePermalink(e){if(!e||!e.startsWith(o))throw new Error("Does not appear to be a permalink");const t=e.substring((o+"/#/").length).split("/"),n=t[0];if("@"===n[0])return r.a.forUser(n);if("+"===n[0])return r.a.forGroup(n);if("#"===n[0]||"!"===n[0]){if(1===t.length){const[e,t=""]=n.split("?"),o=t.split(/&?via=/g).filter(e=>!!e);return r.a.forRoom(e,o)}const e=t.length>1?t.slice(1).join("/"):"",[o,i=""]=e.split("?"),a=i.split(/&?via=/g).filter(e=>!!e);return r.a.forEvent(n,o,a)}throw new Error("Unknown entity type in permalink")}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(79),o=n.n(r);class i{forEvent(e,t,n=[]){throw new Error("Not implemented")}forRoom(e,t=[]){throw new Error("Not implemented")}forGroup(e){throw new Error("Not implemented")}forUser(e){throw new Error("Not implemented")}forEntity(e){throw new Error("Not implemented")}isPermalinkHost(e){throw new Error("Not implemented")}parsePermalink(e){throw new Error("Not implemented")}}class a{constructor(e,t,n,r,i){o()(this,"roomIdOrAlias",void 0),o()(this,"eventId",void 0),o()(this,"userId",void 0),o()(this,"groupId",void 0),o()(this,"viaServers",void 0),this.roomIdOrAlias=e,this.eventId=t,this.groupId=r,this.userId=n,this.viaServers=i}static forUser(e){return new a(null,null,e,null,null)}static forGroup(e){return new a(null,null,null,e,null)}static forRoom(e,t=[]){return new a(e,null,null,null,t)}static forEvent(e,t,n=[]){return new a(e,t,null,null,n)}get primaryEntityId(){return this.roomIdOrAlias||this.userId||this.groupId}get sigil(){return this.primaryEntityId[0]}}},function(e,t,n){"use strict";var r=n(191),o=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._dispatcher=function(e){e&&e.length||r(!1,"Must provide at least one store to FluxStoreGroup");var t=e[0].getDispatcher();var n=e,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var a;if(o){if(i>=n.length)break;a=n[i++]}else{if((i=n.next()).done)break;a=i.value}a.getDispatcher()!==t&&r(!1,"All stores in a FluxStoreGroup must use the same dispatcher")}return t}(t);var i=t.map((function(e){return e.getDispatchToken()}));this._dispatchToken=this._dispatcher.register((function(e){o._dispatcher.waitFor(i),n()}))}return e.prototype.release=function(){this._dispatcher.unregister(this._dispatchToken)},e}();e.exports=o},function(e,t,n){"use strict";var r=n(555),o=n(1004),i=n(191),a=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,n),this._state=this.getInitialState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getState=function(){return this._state},t.prototype.getInitialState=function(){return o("FluxReduceStore","getInitialState")},t.prototype.reduce=function(e,t){return o("FluxReduceStore","reduce")},t.prototype.areEqual=function(e,t){return e===t},t.prototype.__invokeOnDispatch=function(e){this.__changed=!1;var t=this._state,n=this.reduce(t,e);void 0===n&&i(!1,"%s returned undefined from reduce(...), did you forget to return state in the default case? (use null if this was intentional)",this.constructor.name),this.areEqual(t,n)||(this._state=n,this.__emitChange()),this.__changed&&this.__emitter.emit(this.__changeEvent)},t}(r);e.exports=a},function(e,t,n){"use strict";var r=n(999).EventEmitter,o=n(191),i=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__className=this.constructor.name,this.__changed=!1,this.__changeEvent="change",this.__dispatcher=t,this.__emitter=new r,this._dispatchToken=t.register((function(e){n.__invokeOnDispatch(e)}))}return e.prototype.addListener=function(e){return this.__emitter.addListener(this.__changeEvent,e)},e.prototype.getDispatcher=function(){return this.__dispatcher},e.prototype.getDispatchToken=function(){return this._dispatchToken},e.prototype.hasChanged=function(){return this.__dispatcher.isDispatching()||o(!1,"%s.hasChanged(): Must be invoked while dispatching.",this.__className),this.__changed},e.prototype.__emitChange=function(){this.__dispatcher.isDispatching()||o(!1,"%s.__emitChange(): Must be invoked while dispatching.",this.__className),this.__changed=!0},e.prototype.__invokeOnDispatch=function(e){this.__changed=!1,this.__onDispatch(e),this.__changed&&this.__emitter.emit(this.__changeEvent)},e.prototype.__onDispatch=function(e){o(!1,"%s has not overridden FluxStore.__onDispatch(), which is required",this.__className)},e}();e.exports=i},function(e,t,n){"use strict";var r=function(e){function t(n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,n),this.listener=r,this.context=o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(1001));e.exports=r},function(e,t,n){"use strict";var r=function(e){};r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")},e.exports=function(e,t,n,o,i,a,s,c){if(r(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,i,a,s,c],d=0;(l=new Error(t.replace(/%s/g,(function(){return u[d++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));const r=new Map;function o(e,t){r.set(e,t)}function i(e){return r.get(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(89),p=n(80),m=n(83),g=n(104),f=n(81);let _=Object(f.a)("views.settings.IntegrationManager")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"onKeyDown",e=>{e.key===g.a.ESCAPE&&(e.stopPropagation(),e.preventDefault(),this.props.onFinished())}),s()(this,"onAction",e=>{"close_scalar"===e.action&&this.props.onFinished()}),s()(this,"onError",()=>{this.setState({errored:!0})}),this.state={errored:!1}}componentDidMount(){this.dispatcherRef=m.a.register(this.onAction),document.addEventListener("keydown",this.onKeyDown)}componentWillUnmount(){m.a.unregister(this.dispatcherRef),document.removeEventListener("keydown",this.onKeyDown)}render(){if(this.props.loading){const e=h.getComponent("elements.Spinner");return l.a.createElement("div",{className:"mx_IntegrationManager_loading"},l.a.createElement("h3",null,Object(p.a)("Connecting to integration manager...")),l.a.createElement(e,null))}return!this.props.connected||this.state.errored?l.a.createElement("div",{className:"mx_IntegrationManager_error"},l.a.createElement("h3",null,Object(p.a)("Cannot connect to integration manager")),l.a.createElement("p",null,Object(p.a)("The integration manager is offline or it cannot reach your homeserver."))):l.a.createElement("iframe",{src:this.props.url,onError:this.onError})}},s()(o,"propTypes",{connected:d.a.bool.isRequired,loading:d.a.bool.isRequired,url:d.a.string,onFinished:d.a.func.isRequired}),s()(o,"defaultProps",{connected:!0,loading:!1}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(90),m=n(89),g=n(81);let f=Object(g.a)("views.dialogs.IntegrationsImpossibleDialog")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"_onAcknowledgeClick",()=>{this.props.onFinished()})}render(){const e=p.a.get().brand,t=m.getComponent("views.dialogs.BaseDialog"),n=m.getComponent("views.elements.DialogButtons");return l.a.createElement(t,{className:"mx_IntegrationsImpossibleDialog",hasCancel:!1,onFinished:this.props.onFinished,title:Object(h.a)("Integrations not allowed")},l.a.createElement("div",{className:"mx_IntegrationsImpossibleDialog_content"},l.a.createElement("p",null,Object(h.a)("Your %(brand)s doesn't allow you to use an integration manager to do this. Please contact an admin.",{brand:e}))),l.a.createElement(n,{primaryButton:Object(h.a)("OK"),onPrimaryButtonClick:this._onAcknowledgeClick,hasCancel:!1}))}},s()(o,"propTypes",{onFinished:d.a.func.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(178),p=n(185),m=n(89),g=n(267),f=n(86),_=n.n(f),b=n(562),v=n(81);let y=Object(v.a)("views.dialogs.TabbedIntegrationManagerDialog")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"openManager",async(e,t=!1)=>{if(e===this.state.currentIndex&&!t)return;const n=this.state.managers[e],r=n.getScalarClient();this.setState({busy:!0,currentIndex:e,currentLoading:!0,currentConnected:!1,currentScalarClient:r}),b.a(n.uiUrl),r.setTermsInteractionCallback((e,t)=>Object(g.c)(e,t,"mx_TermsDialog_forIntegrationManager"));try{await r.connect(),r.hasCredentials()?this.setState({busy:!1,currentLoading:!1,currentConnected:!0}):this.setState({busy:!1,currentLoading:!1,currentConnected:!1})}catch(e){if(e instanceof g.b)return;console.error(e),this.setState({busy:!1,currentLoading:!1,currentConnected:!1})}}),this.state={managers:h.a.sharedInstance().getOrderedManagers(),busy:!0,currentIndex:0,currentConnected:!1,currentLoading:!0,currentScalarClient:null}}componentDidMount(){this.openManager(0,!0)}_renderTabs(){const e=m.getComponent("views.elements.AccessibleButton");return this.state.managers.map((t,n)=>{const r=_()({mx_TabbedIntegrationManagerDialog_tab:!0,mx_TabbedIntegrationManagerDialog_currentTab:this.state.currentIndex===n});return l.a.createElement(e,{className:r,onClick:()=>this.openManager(n),key:"tab_"+n,disabled:this.state.busy},t.name)})}_renderTab(){const e=m.getComponent("views.settings.IntegrationManager");let t=null;return this.state.currentScalarClient&&(t=this.state.currentScalarClient.getScalarInterfaceUrlForRoom(this.props.room,this.props.screen,this.props.integrationId)),l.a.createElement(e,{configured:!0,loading:this.state.currentLoading,connected:this.state.currentConnected,url:t,onFinished:()=>{}})}render(){return l.a.createElement("div",{className:"mx_TabbedIntegrationManagerDialog_container"},l.a.createElement("div",{className:"mx_TabbedIntegrationManagerDialog_tabs"},this._renderTabs()),l.a.createElement("div",{className:"mx_TabbedIntegrationManagerDialog_currentManager"},this._renderTab()))}},s()(o,"propTypes",{onFinished:d.a.func.isRequired,room:d.a.instanceOf(p.b),screen:d.a.string,integrationId:d.a.string}),r=i))||r},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"c",(function(){return E})),n.d(t,"a",(function(){return S}));var r=n(82),o=n(108),i=n(83),a=n(139),s=n(126),c=n(80),l=n(178),u=n(155),d=n(129);function h(e,t){const n=Object(d.a)(e.data);n.response=t,e.source.postMessage(n,e.origin)}function p(e,t,n){console.error("Action:"+e.data.action+" failed with message: "+t);const r=Object(d.a)(e.data);r.response={error:{message:t}},n&&(r.response.error._error=n),e.source.postMessage(r,e.origin)}function m(e,t){const n=e.data.widget_id;let r=e.data.type;const o=e.data.url,s=e.data.name,l=e.data.data,d=e.data.userWidget;if(n&&void 0!==o){if(null!==o){if(void 0!==s&&"string"!=typeof s)return void p(e,Object(c.a)("Unable to create widget."),new Error("Optional field 'name' must be a string."));if(void 0!==l&&!(l instanceof Object))return void p(e,Object(c.a)("Unable to create widget."),new Error("Optional field 'data' must be an Object."));if("string"!=typeof r)return void p(e,Object(c.a)("Unable to create widget."),new Error("Field 'type' must be a string."));if("string"!=typeof o)return void p(e,Object(c.a)("Unable to create widget."),new Error("Field 'url' must be a string or null."))}r=u.a.fromString(r),d?a.a.setUserWidget(n,r,o,s,l).then(()=>{h(e,{success:!0}),i.a.dispatch({action:"user_widget_updated"})}).catch(t=>{p(e,Object(c.a)("Unable to create widget."),t)}):(t||p(e,Object(c.a)("Missing roomId."),null),a.a.setRoomWidget(t,n,r,o,s,l).then(()=>{h(e,{success:!0})},t=>{p(e,Object(c.a)("Failed to send request."),t)}))}else p(e,Object(c.a)("Unable to create widget."),new Error("Missing required widget fields."))}function g(e,t){const n=r.a.get();if(!n)return void p(e,Object(c.a)("You need to be logged in."));let o=[];if(t){const r=n.getRoom(t);if(!r)return void p(e,Object(c.a)("This room is not recognised."));o=a.a.getRoomWidgets(r).map(e=>e.event)}const i=a.a.getUserWidgetsArray();o=o.concat(i),h(e,o)}function f(e,t,n,o){const i=r.a.get();if(!i)return void p(e,Object(c.a)("You need to be logged in."));const a=i.getRoom(t);if(!a)return void p(e,Object(c.a)("This room is not recognised."));const s=a.currentState.getStateEvents(n,o);h(e,s?s.getContent():null)}const _=function(e){let t,n;e.origin||(e.origin=e.originalEvent.origin);try{v||(v=l.a.sharedInstance().getPrimaryManager().uiUrl),t=new URL(v)}catch(e){return}try{n=new URL(e.origin)}catch(e){return}if(t.origin!==n.origin||!e.data.action||e.data.api)return;if("close_scalar"===e.data.action)return i.a.dispatch({action:"close_scalar"}),void h(e,null);const a=e.data.room_id,u=e.data.user_id;if(!a)return"get_widgets"===e.data.action?void g(e,null):"set_widget"===e.data.action?void m(e,null):void p(e,Object(c.a)("Missing room_id in request"));if(a===s.a.getRoomId())if("get_widgets"!==e.data.action)if("set_widget"!==e.data.action)if("join_rules_state"!==e.data.action)if("set_plumbing_state"!==e.data.action)if("get_membership_count"!==e.data.action)if("get_room_enc_state"!==e.data.action)if("can_send_event"!==e.data.action)if(u)switch(e.data.action){case"membership_state":!function(e,t,n){console.log(`membership_state of ${n} in room ${t} requested.`),f(e,t,"m.room.member",n)}(e,a,u);break;case"invite":!function(e,t,n){console.log(`Received request to invite ${n} into room ${t}`);const o=r.a.get();if(!o)return void p(e,Object(c.a)("You need to be logged in."));const i=o.getRoom(t);if(i){const t=i.getMember(n);if(t&&"invite"===t.membership)return void h(e,{success:!0})}o.invite(t,n).then((function(){h(e,{success:!0})}),(function(t){p(e,Object(c.a)("You need to be able to invite users to do that."),t)}))}(e,a,u);break;case"bot_options":!function(e,t,n){console.log(`bot_options of ${n} in room ${t} requested.`),f(e,t,"m.room.bot.options","_"+n)}(e,a,u);break;case"set_bot_options":!function(e,t,n){console.log(`Received request to set options for bot ${n} in room ${t}`);const o=r.a.get();o?o.sendStateEvent(t,"m.room.bot.options",e.data.content,"_"+n).then(()=>{h(e,{success:!0})},t=>{p(e,t.message?t.message:Object(c.a)("Failed to send request."),t)}):p(e,Object(c.a)("You need to be logged in."))}(e,a,u);break;case"set_bot_power":!function(e,t,n,i){if(!(Number.isInteger(i)&&i>=0))return void p(e,Object(c.a)("Power level must be positive integer."));console.log(`Received request to set power level to ${i} for bot ${n} in room ${t}.`);const a=r.a.get();a?a.getStateEvent(t,"m.room.power_levels","").then(r=>{const s=new o.b({type:"m.room.power_levels",content:r});a.setPowerLevel(t,n,i,s).then(()=>{h(e,{success:!0})},t=>{p(e,t.message?t.message:Object(c.a)("Failed to send request."),t)})}):p(e,Object(c.a)("You need to be logged in."))}(e,a,u,e.data.level);break;default:console.warn("Unhandled postMessage event with action '"+e.data.action+"'")}else p(e,Object(c.a)("Missing user_id in request"));else!function(e,t){const n=""+e.data.event_type,o=Boolean(e.data.is_state),i=r.a.get();if(!i)return void p(e,Object(c.a)("You need to be logged in."));const a=i.getRoom(t);if(!a)return void p(e,Object(c.a)("This room is not recognised."));if("join"!==a.getMyMembership())return void p(e,Object(c.a)("You are not in this room."));const s=i.credentials.userId;let l=!1;l=o?a.currentState.maySendStateEvent(n,s):a.currentState.maySendEvent(n,s),l?h(e,!0):p(e,Object(c.a)("You do not have permission to do that in this room."))}(e,a);else!function(e,t){const n=r.a.get();if(!n)return void p(e,Object(c.a)("You need to be logged in."));if(!n.getRoom(t))return void p(e,Object(c.a)("This room is not recognised."));h(e,r.a.get().isRoomEncrypted(t))}(e,a);else!function(e,t){const n=r.a.get();if(!n)return void p(e,Object(c.a)("You need to be logged in."));const o=n.getRoom(t);if(!o)return void p(e,Object(c.a)("This room is not recognised."));h(e,o.getJoinedMemberCount())}(e,a);else!function(e,t,n){if("string"!=typeof n)throw new Error("Plumbing state status should be a string");console.log(`Received request to set plumbing state to status "${n}" in room ${t}`);const o=r.a.get();o?o.sendStateEvent(t,"m.room.plumbing",{status:n}).then(()=>{h(e,{success:!0})},t=>{p(e,t.message?t.message:Object(c.a)("Failed to send request."),t)}):p(e,Object(c.a)("You need to be logged in."))}(e,a,e.data.status);else!function(e,t){console.log(`join_rules of ${t} requested.`),f(e,t,"m.room.join_rules","")}(e,a);else m(e,a);else g(e,a);else p(e,Object(c.a)("Room %(roomId)s not visible",{roomId:a}))};let b=0,v=null;function y(){0===b&&window.addEventListener("message",_,!1),b+=1}function E(){if(b-=1,0===b&&window.removeEventListener("message",_),b<0){const e=new Error("ScalarMessaging: mismatched startListening / stopListening detected. Negative count");console.error(e)}}function S(e){v=e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(89),m=n(83),g=n(91),f=n(81);let _=Object(f.a)("views.dialogs.IntegrationsDisabledDialog")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"_onAcknowledgeClick",()=>{this.props.onFinished()}),s()(this,"_onOpenSettingsClick",()=>{this.props.onFinished(),m.a.fire(g.a.ViewUserSettings)})}render(){const e=p.getComponent("views.dialogs.BaseDialog"),t=p.getComponent("views.elements.DialogButtons");return l.a.createElement(e,{className:"mx_IntegrationsDisabledDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(h.a)("Integrations are disabled")},l.a.createElement("div",{className:"mx_IntegrationsDisabledDialog_content"},l.a.createElement("p",null,Object(h.a)("Enable 'Manage Integrations' in Settings to do this."))),l.a.createElement(t,{primaryButton:Object(h.a)("Settings"),onPrimaryButtonClick:this._onOpenSettingsClick,cancelButton:Object(h.a)("OK"),onCancel:this._onAcknowledgeClick}))}},s()(o,"propTypes",{onFinished:d.a.func.isRequired}),r=i))||r},function(e,t,n){"use strict";function r(e,t,n){var r;if(void 0===n&&(n={}),!t.codes){t.codes={};for(var o=0;o<t.chars.length;++o)t.codes[t.chars[o]]=o}if(!n.loose&&e.length*t.bits&7)throw new SyntaxError("Invalid padding");for(var i=e.length;"="===e[i-1];)if(--i,!(n.loose||(e.length-i)*t.bits&7))throw new SyntaxError("Invalid padding");for(var a=new(null!=(r=n.out)?r:Uint8Array)(i*t.bits/8|0),s=0,c=0,l=0,u=0;u<i;++u){var d=t.codes[e[u]];if(void 0===d)throw new SyntaxError("Invalid character "+e[u]);c=c<<t.bits|d,(s+=t.bits)>=8&&(s-=8,a[l++]=255&c>>s)}if(s>=t.bits||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a}function o(e,t,n){void 0===n&&(n={});for(var r=n.pad,o=void 0===r||r,i=(1<<t.bits)-1,a="",s=0,c=0,l=0;l<e.length;++l)for(c=c<<8|255&e[l],s+=8;s>t.bits;)s-=t.bits,a+=t.chars[i&c>>s];if(s&&(a+=t.chars[i&c<<t.bits-s]),o)for(;a.length*t.bits&7;)a+="=";return a}Object.defineProperty(t,"__esModule",{value:!0});var i={chars:"0123456789ABCDEF",bits:4},a={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bits:5},s={chars:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bits:5},c={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bits:6},l={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bits:6},u={parse:function(e,t){return r(e.toUpperCase(),i,t)},stringify:function(e,t){return o(e,i,t)}},d={parse:function(e,t){return void 0===t&&(t={}),r(t.loose?e.toUpperCase().replace(/0/g,"O").replace(/1/g,"L").replace(/8/g,"B"):e,a,t)},stringify:function(e,t){return o(e,a,t)}},h={parse:function(e,t){return r(e,s,t)},stringify:function(e,t){return o(e,s,t)}},p={parse:function(e,t){return r(e,c,t)},stringify:function(e,t){return o(e,c,t)}},m={parse:function(e,t){return r(e,l,t)},stringify:function(e,t){return o(e,l,t)}},g={parse:r,stringify:o};t.base16=u,t.base32=d,t.base32hex=h,t.base64=p,t.base64url=m,t.codec=g},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(125),a=n(82),s=n(122),c=n(138);class l{constructor(){o()(this,"virtualToNativeRoomIdCache",new Map)}static sharedInstance(){return void 0===window.mxVoipUserMapper&&(window.mxVoipUserMapper=new l),window.mxVoipUserMapper}async userToVirtualUser(e){const t=await c.d.sharedInstance().sipVirtualLookup(e);return 0!==t.length&&t[0].fields.lookup_success?t[0].userid:null}async getOrCreateVirtualRoomForRoom(e){const t=s.a.shared().getUserIdForRoomId(e);if(!t)return null;const n=await this.userToVirtualUser(t);if(!n)return null;const r=await Object(i.d)(a.a.get(),n,e);return a.a.get().setRoomAccountData(r,c.c,{native_room:e}),this.virtualToNativeRoomIdCache.set(r,e),r}nativeRoomForVirtualRoom(e){const t=this.virtualToNativeRoomIdCache.get(e);if(t)return console.log("Returning native room ID "+t+" for virtual room ID "+e+" from cache"),t;const n=a.a.get().getRoom(e);if(!n)return null;const r=n.getAccountData(c.c);if(!r||!r.getContent())return null;const o=r.getContent().native_room,i=a.a.get().getRoom(o);return i&&"join"===i.getMyMembership()?o:null}isVirtualRoom(e){if(this.nativeRoomForVirtualRoom(e.roomId))return!0;if(this.virtualToNativeRoomIdCache.has(e.roomId))return!0;const t=e.currentState.getStateEvents("m.room.create","");if(!t||!t.getContent())return!1;if(t.getSender()!==a.a.get().getUserId())return!1;const n=t.getContent()[c.c];return Boolean(n)}async onNewInvitedRoom(e){if(!c.d.sharedInstance().getSupportsVirtualRooms())return;const t=e.getDMInviter();console.log(`Checking virtual-ness of room ID ${e.roomId}, invited by ${t}`);const n=await c.d.sharedInstance().sipNativeLookup(t);if(0!==n.length&&n[0].fields.is_virtual){const t=n[0].userid,r=Object(i.e)(a.a.get(),t);r&&(a.a.get().setRoomAccountData(e.roomId,c.c,{native_room:r.roomId}),a.a.get().joinRoom(e.roomId)),this.virtualToNativeRoomIdCache.set(e.roomId,r.roomId)}}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return y}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(128),l=n(86),u=n.n(l),d=n(81),h=n(138),p=n(83),m=n(82),g=n(80),f=n(119),_=n(106),b=n(85);const v=e=>"call_"+e;let y=Object(d.a)("views.voip.IncomingCallToast")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"componentDidMount",()=>{h.d.sharedInstance().addListener(h.a.SilencedCallsChanged,this.onSilencedCallsChanged)}),i()(this,"onSilencedCallsChanged",()=>{this.setState({silenced:h.d.sharedInstance().isCallSilenced(this.props.call.callId)})}),i()(this,"onAnswerClick",e=>{e.stopPropagation(),p.a.dispatch({action:"answer",room_id:h.d.sharedInstance().roomIdForCall(this.props.call)})}),i()(this,"onRejectClick",e=>{e.stopPropagation(),p.a.dispatch({action:"reject",room_id:h.d.sharedInstance().roomIdForCall(this.props.call)})}),i()(this,"onSilenceClick",e=>{e.stopPropagation();const t=this.props.call.callId;this.state.silenced?h.d.sharedInstance().unSilenceCall(t):h.d.sharedInstance().silenceCall(t)}),this.state={silenced:h.d.sharedInstance().isCallSilenced(this.props.call.callId)}}componentWillUnmount(){h.d.sharedInstance().removeListener(h.a.SilencedCallsChanged,this.onSilencedCallsChanged)}render(){const e=this.props.call,t=m.a.get().getRoom(h.d.sharedInstance().roomIdForCall(e)),n=e.type===c.f.Voice,r=u()("mx_IncomingCallToast_content",{mx_IncomingCallToast_content_voice:n,mx_IncomingCallToast_content_video:!n}),o=u()("mx_IncomingCallToast_iconButton",{mx_IncomingCallToast_unSilence:this.state.silenced,mx_IncomingCallToast_silence:!this.state.silenced});return s.a.createElement(s.a.Fragment,null,s.a.createElement(f.a,{room:t,height:32,width:32}),s.a.createElement("div",{className:r},s.a.createElement("span",{className:"mx_CallEvent_caller"},t?t.name:Object(g.a)("Unknown caller")),s.a.createElement("div",{className:"mx_CallEvent_type"},s.a.createElement("div",{className:"mx_CallEvent_type_icon"}),n?Object(g.a)("Voice call"):Object(g.a)("Video call")),s.a.createElement("div",{className:"mx_IncomingCallToast_buttons"},s.a.createElement(b.a,{className:"mx_IncomingCallToast_button mx_IncomingCallToast_button_decline",onClick:this.onRejectClick,kind:"danger"},s.a.createElement("span",null," ",Object(g.a)("Decline")," ")),s.a.createElement(b.a,{className:"mx_IncomingCallToast_button mx_IncomingCallToast_button_accept",onClick:this.onAnswerClick,kind:"primary"},s.a.createElement("span",null," ",Object(g.a)("Accept")," ")))),s.a.createElement(_.a,{className:o,onClick:this.onSilenceClick,title:this.state.silenced?Object(g.a)("Sound on"):Object(g.a)("Silence call")}))}})||r},function(e,t,n){"use strict";function r(e,t){const n=t.getUserId();for(const t of Object.keys(e.getContent())){if(Object.keys(e.getContent()[t]["m.read"]||{}).includes(n))return!0}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(93),o=n(82),i=n(271),a=n(144);function s(e){if(e.getSender()===o.a.get().credentials.userId)return!1;switch(e.getType()){case r.a.RoomMember:case r.a.RoomThirdPartyInvite:case r.a.CallAnswer:case r.a.CallHangup:case r.a.RoomAliases:case r.a.RoomCanonicalAlias:case r.a.RoomServerAcl:return!1}return!e.isRedacted()&&Object(a.d)(e)}function c(e){const t=o.a.get().getUserId(),n=e.getEventReadUpTo(t);if(e.timeline.length&&e.timeline[e.timeline.length-1].getSender()===t)return!1;for(let t=e.timeline.length-1;t>=0;--t){const r=e.timeline[t];if(r.getId()==n)return!1;if(!Object(i.a)(r)&&s(r))return!0}return!0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(78),o=n.n(r);function i(e,t){const n=[];return e.forEach((r,o)=>{n.push(r,o===e.length-1?null:t)}),o.a.createElement("span",null,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.root=t.parseHTML=t.merge=t.contains=void 0;var r=n(181);r.__exportStar(n(1009),t),r.__exportStar(n(571),t);var o=n(571);t.default=o.load([]);var i=r.__importStar(n(272));t.contains=i.contains,t.merge=i.merge,t.parseHTML=i.parseHTML,t.root=i.root},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.load=void 0;var r=n(181),o=r.__importStar(n(394)),i=r.__importStar(n(272)),a=n(1043),s=r.__importDefault(n(404));t.load=function e(t,n,c){if(void 0===c&&(c=!0),null==t)throw new Error("cheerio.load() expects a string");var l=r.__assign(r.__assign({},o.default),o.flatten(n)),u=s.default(t,l,c),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(a.Cheerio);function h(e,t,n,i){return void 0===n&&(n=u),new d(e,t,n,r.__assign(r.__assign({},l),o.flatten(i)))}return Object.assign(h,i,{load:e,_root:u,_options:l,fn:d.prototype,prototype:d.prototype}),h}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.select=t.filter=t.some=t.is=t.aliases=t.pseudos=t.filters=void 0;var c=n(395),l=n(574),u=a(n(317)),d=n(1029),h=n(583),p=n(574);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return p.filters}}),Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return p.pseudos}}),Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return p.aliases}});var m={type:"pseudo",name:"scope",data:null},g=r({},m),f={type:"universal",namespace:null};function _(e,t,n){if(void 0===n&&(n={}),"function"==typeof t)return e.some(t);var r=d.groupSelectors(c.parse(t,n)),o=r[0],i=r[1];return o.length>0&&e.some(l._compileToken(o,n))||i.some((function(t){return v(t,e,n).length>0}))}function b(e,t,n){if(0===t.length)return[];var r,o=d.groupSelectors(e),i=o[0],a=o[1];if(i.length){var s=x(t,i,n);if(0===a.length)return s;s.length&&(r=new Set(s))}for(var c=0;c<a.length&&(null==r?void 0:r.size)!==t.length;c++){var l=a[c];if(0===(r?t.filter((function(e){return u.isTag(e)&&!r.has(e)})):t).length)break;if((s=v(l,t,n)).length)if(r)s.forEach((function(e){return r.add(e)}));else{if(c===a.length-1)return s;r=new Set(s)}}return void 0!==r?r.size===t.length?t:t.filter((function(e){return r.has(e)})):[]}function v(e,t,n){var r;return e.some(c.isTraversal)?w(null!==(r=n.root)&&void 0!==r?r:d.getDocumentRoot(t[0]),s(s([],e),[g]),n,!0,t):w(t,e,n,!1)}t.is=function(e,t,n){return void 0===n&&(n={}),_([e],t,n)},t.some=_,t.filter=function(e,t,n){return void 0===n&&(n={}),b(c.parse(e,n),t,n)},t.select=function(e,t,n){if(void 0===n&&(n={}),"function"==typeof e)return T(t,e);var r=d.groupSelectors(c.parse(e,n)),o=r[0],i=r[1].map((function(e){return w(t,e,n,!0)}));return o.length&&i.push(C(t,o,n,1/0)),1===i.length?i[0]:u.uniqueSort(i.reduce((function(e,t){return s(s([],e),t)})))};var y=new Set(["descendant","adjacent"]);function E(e){return e!==m&&"pseudo"===e.type&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((function(e){return e.some(E)})))}function S(e,t,n){return n&&e.some(E)?r(r({},t),{context:n}):t}function w(e,t,n,r,o){var i=t.findIndex(h.isFilter),a=t.slice(0,i),s=t[i],l=h.getLimit(s.name,s.data);if(0===l)return[];var d=S(a,n,o),p=(0!==a.length||Array.isArray(e)?0===a.length||1===a.length&&a[0]===m?(Array.isArray(e)?e:[e]).filter(u.isTag):r||a.some(c.isTraversal)?C(e,[a],d,l):x(e,[a],d):u.getChildren(e).filter(u.isTag)).slice(0,l),g=function(e,t,n,r){var o="string"==typeof n?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(o)&&Math.abs(o)<t.length?[o<0?t[t.length+o]:t[o]]:[];case"gt":return isFinite(o)?t.slice(o+1):[];case"even":return t.filter((function(e,t){return t%2==0}));case"odd":return t.filter((function(e,t){return t%2==1}));case"not":var i=new Set(b(n,t,r));return t.filter((function(e){return!i.has(e)}))}}(s.name,p,s.data,n);if(0===g.length||t.length===i+1)return g;var _=t.slice(i+1),v=_.some(c.isTraversal),E=S(_,n,o);return v&&(y.has(_[0].type)&&_.unshift(f),_.unshift(m)),_.some(h.isFilter)?w(g,_,n,!1,o):v?C(g,[_],E,1/0):x(g,[_],E)}function C(e,t,n,r){return 0===r?[]:T(e,l._compileToken(t,n,e),r)}function T(e,t,n){void 0===n&&(n=1/0);var r=l.prepareContext(e,u,t.shouldTestNextSiblings);return u.find((function(e){return u.isTag(e)&&t(e)}),r,!0,n)}function x(e,t,n){var r=(Array.isArray(e)?e:[e]).filter(u.isTag);if(0===r.length)return r;var o=l._compileToken(t,n);return r.filter(o)}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isTraversal=void 0;var o=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,i=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,a=new Map([["~","element"],["^","start"],["$","end"],["*","any"],["!","not"],["|","hyphen"]]),s={">":"child","<":"parent","~":"sibling","+":"adjacent"},c={"#":["id","equals"],".":["class","element"]},l=new Set(["has","not","matches","is","host","host-context"]),u=new Set(r(["descendant"],Object.keys(s).map((function(e){return s[e]})))),d=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function h(e){return u.has(e.type)}t.isTraversal=h;var p=new Set(["contains","icontains"]),m=new Set(['"',"'"]);function g(e,t,n){var r=parseInt(t,16)-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}function f(e){return e.replace(i,g)}function _(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function b(e,t){if(e.length>0&&0===t.length)throw new Error("Empty sub-selector");e.push(t)}t.default=function(e,t){var n=[],r=function e(t,n,r,i){var u,g;void 0===r&&(r={});var v=[],y=!1;function E(e){var t=n.slice(i+e).match(o);if(!t)throw new Error("Expected name, found "+n.slice(i));var r=t[0];return i+=e+r.length,f(r)}function S(e){for(;_(n.charAt(i+e));)e++;i+=e}function w(e){for(var t=0;"\\"===n.charAt(--e);)t++;return 1==(1&t)}function C(){if(v.length>0&&h(v[v.length-1]))throw new Error("Did not expect successive traversals.")}S(0);for(;""!==n;){var T=n.charAt(i);if(_(T))y=!0,S(1);else if(T in s)C(),v.push({type:s[T]}),y=!1,S(1);else if(","===T){if(0===v.length)throw new Error("Empty sub-selector");t.push(v),v=[],y=!1,S(1)}else if(n.startsWith("/*",i)){var x=n.indexOf("*/",i+2);if(x<0)throw new Error("Comment was not terminated");i=x+2}else if(y&&(C(),v.push({type:"descendant"}),y=!1),T in c){var k=c[T],F=k[0],O=k[1];v.push({type:"attribute",name:F,action:O,value:E(1),namespace:null,ignoreCase:!!r.xmlMode&&null})}else if("["===T){S(1);var R=void 0,D=null;"|"===n.charAt(i)&&(D="",i+=1),n.startsWith("*|",i)&&(D="*",i+=2),R=E(0),null===D&&"|"===n.charAt(i)&&"="!==n.charAt(i+1)&&(D=R,R=E(1)),(null!==(u=r.lowerCaseAttributeNames)&&void 0!==u?u:!r.xmlMode)&&(R=R.toLowerCase()),S(0);O="exists";var I=a.get(n.charAt(i));if(I){if(O=I,"="!==n.charAt(i+1))throw new Error("Expected `=`");S(2)}else"="===n.charAt(i)&&(O="equals",S(1));var A="",N=null;if("exists"!==O){if(m.has(n.charAt(i))){for(var M=n.charAt(i),P=i+1;P<n.length&&(n.charAt(P)!==M||w(P));)P+=1;if(n.charAt(P)!==M)throw new Error("Attribute value didn't end");A=f(n.slice(i+1,P)),i=P+1}else{for(var L=i;i<n.length&&(!_(n.charAt(i))&&"]"!==n.charAt(i)||w(i));)i+=1;A=f(n.slice(L,i))}S(0);var j=n.charAt(i);"s"===j||"S"===j?(N=!1,S(1)):"i"!==j&&"I"!==j||(N=!0,S(1))}if(r.xmlMode||null!=N||(N=d.has(R)),"]"!==n.charAt(i))throw new Error("Attribute selector didn't terminate");i+=1;var U={type:"attribute",name:R,action:O,value:A,namespace:D,ignoreCase:N};v.push(U)}else if(":"===T){if(":"===n.charAt(i+1)){v.push({type:"pseudo-element",name:E(2).toLowerCase()});continue}var B=E(1).toLowerCase(),G=null;if("("===n.charAt(i))if(l.has(B)){if(m.has(n.charAt(i+1)))throw new Error("Pseudo-selector "+B+" cannot be quoted");if(i=e(G=[],n,r,i+1),")"!==n.charAt(i))throw new Error("Missing closing parenthesis in :"+B+" ("+n+")");i+=1}else{for(var V=i+=1,q=1;q>0&&i<n.length;i++)"("!==n.charAt(i)||w(i)?")"!==n.charAt(i)||w(i)||q--:q++;if(q)throw new Error("Parenthesis not matched");if(G=n.slice(V,i-1),p.has(B)){var H=G.charAt(0);H===G.slice(-1)&&m.has(H)&&(G=G.slice(1,-1)),G=f(G)}}v.push({type:"pseudo",name:B,data:G})}else{D=null;var z=void 0;if("*"===T)i+=1,z="*";else{if(!o.test(n.slice(i)))return v.length&&"descendant"===v[v.length-1].type&&v.pop(),b(t,v),i;"|"===n.charAt(i)&&(D="",i+=1),z=E(0)}"|"===n.charAt(i)&&(D=z,"*"===n.charAt(i+1)?(z="*",i+=2):z=E(1)),"*"===z?v.push({type:"universal",namespace:D}):((null!==(g=r.lowerCaseTags)&&void 0!==g?g:!r.xmlMode)&&(z=z.toLowerCase()),v.push({type:"tag",name:z,namespace:D}))}}return b(t,v),i}(n,""+e,t,0);if(r<e.length)throw new Error("Unmatched selector: "+e.slice(r));return n}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=t.pseudos=t.filters=t.is=t.selectOne=t.selectAll=t.prepareContext=t._compileToken=t._compileUnsafe=t.compile=void 0;var a=i(n(317)),s=n(213),c=n(1019),l=n(399),u=function(e,t){return e===t},d={adapter:a,equals:u};function h(e){var t,n,r,o,i=null!=e?e:d;return null!==(t=i.adapter)&&void 0!==t||(i.adapter=a),null!==(n=i.equals)&&void 0!==n||(i.equals=null!==(o=null===(r=i.adapter)||void 0===r?void 0:r.equals)&&void 0!==o?o:u),i}function p(e){return function(t,n,r){var o=h(n);return e(t,o,r)}}function m(e){return function(t,n,r){var o=h(r);"function"!=typeof t&&(t=c.compileUnsafe(t,o,n));var i=g(n,o.adapter,t.shouldTestNextSiblings);return e(t,i,o)}}function g(e,t,n){return void 0===n&&(n=!1),n&&(e=function(e,t){for(var n=Array.isArray(e)?e.slice(0):[e],r=0;r<n.length;r++){var o=l.getNextSiblings(n[r],t);n.push.apply(n,o)}return n}(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}t.compile=p(c.compile),t._compileUnsafe=p(c.compileUnsafe),t._compileToken=p(c.compileToken),t.prepareContext=g,t.selectAll=m((function(e,t,n){return e!==s.falseFunc&&t&&0!==t.length?n.adapter.findAll(e,t):[]})),t.selectOne=m((function(e,t,n){return e!==s.falseFunc&&t&&0!==t.length?n.adapter.findOne(e,t):null})),t.is=function(e,t,n){var r=h(n);return("function"==typeof t?t:c.compile(t,r))(e)},t.default=t.selectAll;var f=n(582);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return f.filters}}),Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return f.pseudos}}),Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return f.aliases}})},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(273),s=new Map([[a.ElementType.Tag,1],[a.ElementType.Script,1],[a.ElementType.Style,1],[a.ElementType.Directive,1],[a.ElementType.Text,3],[a.ElementType.CDATA,4],[a.ElementType.Comment,8],[a.ElementType.Root,9]]),c=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=s.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=c;var l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(c);t.DataNode=l;var u=function(e){function t(t){return e.call(this,a.ElementType.Text,t)||this}return o(t,e),t}(l);t.Text=u;var d=function(e){function t(t){return e.call(this,a.ElementType.Comment,t)||this}return o(t,e),t}(l);t.Comment=d;var h=function(e){function t(t,n){var r=e.call(this,a.ElementType.Directive,n)||this;return r.name=t,r}return o(t,e),t}(l);t.ProcessingInstruction=h;var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(c);t.NodeWithChildren=p;var m=function(e){function t(t){return e.call(this,a.ElementType.Root,t)||this}return o(t,e),t}(p);t.Document=m;var g=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,o,r)||this;return i.name=t,i.attribs=n,i}return o(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(p);function f(e){return a.isTag(e)}function _(e){return e.type===a.ElementType.CDATA}function b(e){return e.type===a.ElementType.Text}function v(e){return e.type===a.ElementType.Comment}function y(e){return e.type===a.ElementType.Directive}function E(e){return e.type===a.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),b(e))n=new u(e.data);else if(v(e))n=new d(e.data);else if(f(e)){var r=t?w(e.children):[],o=new g(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(_(e)){r=t?w(e.children):[];var s=new p(a.ElementType.CDATA,r);r.forEach((function(e){return e.parent=s})),n=s}else if(E(e)){r=t?w(e.children):[];var c=new m(r);r.forEach((function(e){return e.parent=c})),e["x-mode"]&&(c["x-mode"]=e["x-mode"]),n=c}else{if(!y(e))throw new Error("Not implemented yet: "+e.type);var l=new h(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,n}function w(e){for(var t=e.map((function(e){return S(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=g,t.isTag=f,t.isCDATA=_,t.isText=b,t.isComment=v,t.isDirective=y,t.isDocument=E,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var s=a(n(273)),c=n(1012),l=n(1014),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);var d=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(e,t){void 0===t&&(t={});for(var n=("length"in e?e:[e]),r="",o=0;o<n.length;o++)r+=p(n[o],t);return r}function p(e,t){switch(e.type){case s.Root:return h(e.children,t);case s.Directive:case s.Doctype:return"<"+e.data+">";case s.Comment:return function(e){return"\x3c!--"+e.data+"--\x3e"}(e);case s.CDATA:return function(e){return"<![CDATA["+e.children[0].data+"]]>"}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=l.elementNames.get(e.name))&&void 0!==n?n:e.name,e.parent&&m.has(e.parent.name)&&(t=r(r({},t),{xmlMode:!1})));!t.xmlMode&&g.has(e.name)&&(t=r(r({},t),{xmlMode:"foreign"}));var o="<"+e.name,i=function(e,t){if(e)return Object.keys(e).map((function(n){var r,o,i=null!==(r=e[n])&&void 0!==r?r:"";return"foreign"===t.xmlMode&&(n=null!==(o=l.attributeNames.get(n))&&void 0!==o?o:n),t.emptyAttrs||t.xmlMode||""!==i?n+'="'+(!1!==t.decodeEntities?c.encodeXML(i):i.replace(/"/g,"""))+'"':n})).join(" ")}(e.attribs,t);i&&(o+=" "+i);0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))?(t.xmlMode||(o+=" "),o+="/>"):(o+=">",e.children.length>0&&(o+=h(e.children,t)),!t.xmlMode&&d.has(e.name)||(o+="</"+e.name+">"));return o}(e,t);case s.Text:return function(e,t){var n=e.data||"";!1===t.decodeEntities||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=c.encodeXML(n));return n}(e,t)}}t.default=h;var m=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g=new Set(["svg","math"])},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var o=r(n(396)),i=r(n(578)),a=r(n(397)),s=r(n(579)),c=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function l(e){var t=d(e);return function(e){return String(e).replace(c,t)}}t.decodeXML=l(a.default),t.decodeHTMLStrict=l(o.default);var u=function(e,t){return e<t?1:-1};function d(e){return function(t){if("#"===t.charAt(1)){var n=t.charAt(2);return"X"===n||"x"===n?s.default(parseInt(t.substr(3),16)):s.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]||t}}t.decodeHTML=function(){for(var e=Object.keys(i.default).sort(u),t=Object.keys(o.default).sort(u),n=0,r=0;n<t.length;n++)e[r]===t[n]?(t[n]+=";?",r++):t[n]+=";";var a=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),s=d(o.default);function c(e){return";"!==e.substr(-1)&&(e+=";"),s(e)}return function(e){return String(e).replace(a,c)}}()},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(1013)),i=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};t.default=function(e){return e>=55296&&e<=57343||e>1114111?"<22>":(e in o.default&&(e=o.default[e]),i(e))}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var o=u(r(n(397)).default),i=d(o);t.encodeXML=f(o);var a,s,c=u(r(n(396)).default),l=d(c);function u(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function d(e){for(var t=[],n=[],r=0,o=Object.keys(e);r<o.length;r++){var i=o[r];1===i.length?t.push("\\"+i):n.push(i)}t.sort();for(var a=0;a<t.length-1;a++){for(var s=a;s<t.length-1&&t[s].charCodeAt(1)+1===t[s+1].charCodeAt(1);)s+=1;var c=1+s-a;c<3||t.splice(a,c,t[a]+"-"+t[s])}return n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.encodeHTML=(a=c,s=l,function(e){return e.replace(s,(function(e){return a[e]})).replace(h,m)}),t.encodeNonAsciiHTML=f(c);var h=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,p=null!=String.prototype.codePointAt?function(e){return e.codePointAt(0)}:function(e){return 1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536};function m(e){return"&#x"+(e.length>1?p(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var g=new RegExp(i.source+"|"+h.source,"g");function f(e){return function(t){return t.replace(g,(function(t){return e[t]||m(t)}))}}t.escape=function(e){return e.replace(g,m)},t.escapeUTF8=function(e){return e.replace(i,m)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var r=n(146);function o(e,t,n,i){for(var a=[],s=0,c=t;s<c.length;s++){var l=c[s];if(e(l)&&(a.push(l),--i<=0))break;if(n&&r.hasChildren(l)&&l.children.length>0){var u=o(e,l.children,n,i);if(a.push.apply(a,u),(i-=u.length)<=0)break}}return a}t.filter=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(t)||(t=[t]),o(e,t,n,r)},t.find=o,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,n,o){void 0===o&&(o=!0);for(var i=null,a=0;a<n.length&&!i;a++){var s=n[a];r.isTag(s)&&(t(s)?i=s:o&&s.children.length>0&&(i=e(t,s.children)))}return i},t.existsOne=function e(t,n){return n.some((function(n){return r.isTag(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},t.findAll=function(e,t){for(var n,o,i=[],a=t.filter(r.isTag);o=a.shift();){var s=null===(n=o.children)||void 0===n?void 0:n.filter(r.isTag);s&&s.length>0&&a.unshift.apply(a,s),e(o)&&i.push(o)}return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compilePseudoSelector=t.aliases=t.pseudos=t.filters=void 0;var r=n(213),o=n(395),i=n(1023);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return i.filters}});var a=n(1027);Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return a.pseudos}});var s=n(1028);Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return s.aliases}});var c=n(399);t.compilePseudoSelector=function(e,t,n,l,u){var d=t.name,h=t.data;if(Array.isArray(h))return c.subselects[d](e,h,n,l,u);if(d in s.aliases){if(null!=h)throw new Error("Pseudo "+d+" doesn't have any arguments");var p=o.parse(s.aliases[d],n);return c.subselects.is(e,p,n,l,u)}if(d in i.filters)return i.filters[d](e,h,n,l);if(d in a.pseudos){var m=a.pseudos[d];return a.verifyPseudoArgs(m,d,h),m===r.falseFunc?r.falseFunc:e===r.trueFunc?function(e){return m(e,n,h)}:function(t){return m(t,n,h)&&e(t)}}throw new Error("unmatched pseudo-class :"+d)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLimit=t.isFilter=t.filterNames=void 0,t.filterNames=new Set(["first","last","eq","gt","nth","lt","even","odd"]),t.isFilter=function e(n){return"pseudo"===n.type&&(!!t.filterNames.has(n.name)||!("not"!==n.name||!Array.isArray(n.data))&&n.data.some((function(t){return t.some(e)})))},t.getLimit=function(e,t){var n=null!=t?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(n)?n>=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?n:1/0:0;case"gt":return isFinite(n)?1/0:0;default:return 1/0}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=r(n(585)),i=new Set(["input","option","optgroup","select","button","datalist","textarea"]),a=new Set(["p"]),s={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:a,h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,select:i,input:i,output:i,button:i,datalist:i,textarea:i,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:a,article:a,aside:a,blockquote:a,details:a,div:a,dl:a,fieldset:a,figcaption:a,figure:a,footer:a,form:a,header:a,hr:a,main:a,nav:a,ol:a,pre:a,section:a,table:a,ul:a,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},c=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),l=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),d=/\s|\//,h=function(){function e(e,t){var n,r,i,a,s;void 0===t&&(t={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=t,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(n=t.lowerCaseTags)&&void 0!==n?n:!t.xmlMode,this.lowerCaseAttributeNames=null!==(r=t.lowerCaseAttributeNames)&&void 0!==r?r:!t.xmlMode,this.tokenizer=new(null!==(i=t.Tokenizer)&&void 0!==i?i:o.default)(this.options,this),null===(s=(a=this.cbs).onparserinit)||void 0===s||s.call(a,this)}return e.prototype.updatePosition=function(e){null===this.endIndex?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(e){var t,n;this.updatePosition(1),this.endIndex--,null===(n=(t=this.cbs).ontext)||void 0===n||n.call(t,e)},e.prototype.onopentagname=function(e){var t,n;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(s,e))for(var r=void 0;this.stack.length>0&&s[e].has(r=this.stack[this.stack.length-1]);)this.onclosetag(r);!this.options.xmlMode&&c.has(e)||(this.stack.push(e),l.has(e)?this.foreignContext.push(!0):u.has(e)&&this.foreignContext.push(!1)),null===(n=(t=this.cbs).onopentagname)||void 0===n||n.call(t,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.onopentagend=function(){var e,t;this.updatePosition(1),this.attribs&&(null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&c.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},e.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(l.has(e)||u.has(e))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&c.has(e))this.options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this.closeCurrentTag());else{var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag)for(t=this.stack.length-t;t--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=t;else"p"!==e||this.options.xmlMode||(this.onopentagname(e),this.closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},e.prototype.closeCurrentTag=function(){var e,t,n=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===n&&(null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,n),this.stack.pop())},e.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},e.prototype.onattribdata=function(e){this.attribvalue+=e},e.prototype.onattribend=function(e){var t,n;null===(n=(t=this.cbs).onattribute)||void 0===n||n.call(t,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(d),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}},e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}},e.prototype.oncomment=function(e){var t,n,r,o;this.updatePosition(4),null===(n=(t=this.cbs).oncomment)||void 0===n||n.call(t,e),null===(o=(r=this.cbs).oncommentend)||void 0===o||o.call(r)},e.prototype.oncdata=function(e){var t,n,r,o,i,a;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(n=(t=this.cbs).oncdatastart)||void 0===n||n.call(t),null===(o=(r=this.cbs).ontext)||void 0===o||o.call(r,e),null===(a=(i=this.cbs).oncdataend)||void 0===a||a.call(i)):this.oncomment("[CDATA["+e+"]]")},e.prototype.onerror=function(e){var t,n;null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,e)},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this)},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.write=function(e){this.tokenizer.write(e)},e.prototype.end=function(e){this.tokenizer.end(e)},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){this.tokenizer.resume()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=h},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(579)),i=r(n(396)),a=r(n(578)),s=r(n(397));function c(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function l(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,n){var r=e.toLowerCase();return e===r?function(e,o){o===r?e._state=t:(e._state=n,e._index--)}:function(o,i){i===r||i===e?o._state=t:(o._state=n,o._index--)}}function d(e,t){var n=e.toLowerCase();return function(r,o){o===n||o===e?r._state=t:(r._state=3,r._index--)}}var h=u("C",24,16),p=u("D",25,16),m=u("A",26,16),g=u("T",27,16),f=u("A",28,16),_=d("R",35),b=d("I",36),v=d("P",37),y=d("T",38),E=u("R",40,1),S=u("I",41,1),w=u("P",42,1),C=u("T",43,1),T=d("Y",45),x=d("L",46),k=d("E",47),F=u("Y",49,1),O=u("L",50,1),R=u("E",51,1),D=d("I",54),I=d("T",55),A=d("L",56),N=d("E",57),M=u("I",58,1),P=u("T",59,1),L=u("L",60,1),j=u("E",61,1),U=u("#",63,64),B=u("X",66,65),G=function(){function e(e,t){var n;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=t,this.xmlMode=!!(null==e?void 0:e.xmlMode),this.decodeEntities=null===(n=null==e?void 0:e.decodeEntities)||void 0===n||n}return e.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},e.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},e.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this._index<this.buffer.length&&this.parse(),this.ended&&this.finish()},e.prototype.getAbsoluteIndex=function(){return this.bufferOffset+this._index},e.prototype.stateText=function(e){"<"===e?(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==e||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},e.prototype.isTagStartChar=function(e){return l(e)||this.xmlMode&&!c(e)&&"/"!==e&&">"!==e},e.prototype.stateBeforeTagName=function(e){"/"===e?this._state=5:"<"===e?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===e||1!==this.special||c(e)?this._state=1:"!"===e?(this._state=15,this.sectionStart=this._index+1):"?"===e?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=this.xmlMode||"s"!==e&&"S"!==e?this.xmlMode||"t"!==e&&"T"!==e?3:52:32,this.sectionStart=this._index):this._state=1},e.prototype.stateInTagName=function(e){("/"===e||">"===e||c(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},e.prototype.stateBeforeClosingTagName=function(e){c(e)||(">"===e?this._state=1:1!==this.special?4===this.special||"s"!==e&&"S"!==e?4!==this.special||"t"!==e&&"T"!==e?(this._state=1,this._index--):this._state=53:this._state=33:this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},e.prototype.stateInClosingTagName=function(e){(">"===e||c(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},e.prototype.stateAfterClosingTagName=function(e){">"===e&&(this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeAttributeName=function(e){">"===e?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===e?this._state=4:c(e)||(this._state=9,this.sectionStart=this._index)},e.prototype.stateInSelfClosingTag=function(e){">"===e?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):c(e)||(this._state=8,this._index--)},e.prototype.stateInAttributeName=function(e){("="===e||"/"===e||">"===e||c(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},e.prototype.stateAfterAttributeName=function(e){"="===e?this._state=11:"/"===e||">"===e?(this.cbs.onattribend(void 0),this._state=8,this._index--):c(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},e.prototype.stateBeforeAttributeValue=function(e){'"'===e?(this._state=12,this.sectionStart=this._index+1):"'"===e?(this._state=13,this.sectionStart=this._index+1):c(e)||(this._state=14,this.sectionStart=this._index,this._index--)},e.prototype.handleInAttributeValue=function(e,t){e===t?(this.emitToken("onattribdata"),this.cbs.onattribend(t),this._state=8):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},e.prototype.stateInAttributeValueNoQuotes=function(e){c(e)||">"===e?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16},e.prototype.stateInDeclaration=function(e){">"===e&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateInProcessingInstruction=function(e){">"===e&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeComment=function(e){"-"===e?(this._state=19,this.sectionStart=this._index+1):this._state=16},e.prototype.stateInComment=function(e){"-"===e&&(this._state=21)},e.prototype.stateInSpecialComment=function(e){">"===e&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateAfterComment1=function(e){this._state="-"===e?22:19},e.prototype.stateAfterComment2=function(e){">"===e?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==e&&(this._state=19)},e.prototype.stateBeforeCdata6=function(e){"["===e?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},e.prototype.stateInCdata=function(e){"]"===e&&(this._state=30)},e.prototype.stateAfterCdata1=function(e){this._state="]"===e?31:29},e.prototype.stateAfterCdata2=function(e){">"===e?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==e&&(this._state=29)},e.prototype.stateBeforeSpecialS=function(e){"c"===e||"C"===e?this._state=34:"t"===e||"T"===e?this._state=44:(this._state=3,this._index--)},e.prototype.stateBeforeSpecialSEnd=function(e){2!==this.special||"c"!==e&&"C"!==e?3!==this.special||"t"!==e&&"T"!==e?this._state=1:this._state=48:this._state=39},e.prototype.stateBeforeSpecialLast=function(e,t){("/"===e||">"===e||c(e))&&(this.special=t),this._state=3,this._index--},e.prototype.stateAfterSpecialLast=function(e,t){">"===e||c(e)?(this.special=1,this._state=6,this.sectionStart=this._index-t,this._index--):this._state=1},e.prototype.parseFixedEntity=function(e){if(void 0===e&&(e=this.xmlMode?s.default:i.default),this.sectionStart+1<this._index){var t=this.buffer.substring(this.sectionStart+1,this._index);Object.prototype.hasOwnProperty.call(e,t)&&(this.emitPartial(e[t]),this.sectionStart=this._index+1)}},e.prototype.parseLegacyEntity=function(){for(var e=this.sectionStart+1,t=Math.min(this._index-e,6);t>=2;){var n=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(a.default,n))return this.emitPartial(a.default[n]),void(this.sectionStart+=t+1);t--}},e.prototype.stateInNamedEntity=function(e){";"===e?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1<this._index&&!this.xmlMode&&this.parseLegacyEntity(),this._state=this.baseState):(e<"0"||e>"9")&&!l(e)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==e&&this.parseFixedEntity(a.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},e.prototype.decodeNumericEntity=function(e,t,n){var r=this.sectionStart+e;if(r!==this._index){var i=this.buffer.substring(r,this._index),a=parseInt(i,t);this.emitPartial(o.default(a)),this.sectionStart=n?this._index+1:this._index}this._state=this.baseState},e.prototype.stateInNumericEntity=function(e){";"===e?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},e.prototype.stateInHexEntity=function(e){";"===e?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},e.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},e.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var e=this.buffer.charAt(this._index);1===this._state?this.stateText(e):12===this._state?this.stateInAttributeValueDoubleQuotes(e):9===this._state?this.stateInAttributeName(e):19===this._state?this.stateInComment(e):20===this._state?this.stateInSpecialComment(e):8===this._state?this.stateBeforeAttributeName(e):3===this._state?this.stateInTagName(e):6===this._state?this.stateInClosingTagName(e):2===this._state?this.stateBeforeTagName(e):10===this._state?this.stateAfterAttributeName(e):13===this._state?this.stateInAttributeValueSingleQuotes(e):11===this._state?this.stateBeforeAttributeValue(e):5===this._state?this.stateBeforeClosingTagName(e):7===this._state?this.stateAfterClosingTagName(e):32===this._state?this.stateBeforeSpecialS(e):21===this._state?this.stateAfterComment1(e):14===this._state?this.stateInAttributeValueNoQuotes(e):4===this._state?this.stateInSelfClosingTag(e):16===this._state?this.stateInDeclaration(e):15===this._state?this.stateBeforeDeclaration(e):22===this._state?this.stateAfterComment2(e):18===this._state?this.stateBeforeComment(e):33===this._state?this.stateBeforeSpecialSEnd(e):53===this._state?M(this,e):39===this._state?E(this,e):40===this._state?S(this,e):41===this._state?w(this,e):34===this._state?_(this,e):35===this._state?b(this,e):36===this._state?v(this,e):37===this._state?y(this,e):38===this._state?this.stateBeforeSpecialLast(e,2):42===this._state?C(this,e):43===this._state?this.stateAfterSpecialLast(e,6):44===this._state?T(this,e):29===this._state?this.stateInCdata(e):45===this._state?x(this,e):46===this._state?k(this,e):47===this._state?this.stateBeforeSpecialLast(e,3):48===this._state?F(this,e):49===this._state?O(this,e):50===this._state?R(this,e):51===this._state?this.stateAfterSpecialLast(e,5):52===this._state?D(this,e):54===this._state?I(this,e):55===this._state?A(this,e):56===this._state?N(this,e):57===this._state?this.stateBeforeSpecialLast(e,4):58===this._state?P(this,e):59===this._state?L(this,e):60===this._state?j(this,e):61===this._state?this.stateAfterSpecialLast(e,5):17===this._state?this.stateInProcessingInstruction(e):64===this._state?this.stateInNamedEntity(e):23===this._state?h(this,e):62===this._state?U(this,e):24===this._state?p(this,e):25===this._state?m(this,e):30===this._state?this.stateAfterCdata1(e):31===this._state?this.stateAfterCdata2(e):26===this._state?g(this,e):27===this._state?f(this,e):28===this._state?this.stateBeforeCdata6(e):66===this._state?this.stateInHexEntity(e):65===this._state?this.stateInNumericEntity(e):63===this._state?B(this,e):this.cbs.onerror(Error("unknown _state"),this._state),this._index++}this.cleanup()},e.prototype.finish=function(){this.sectionStart<this._index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.substr(this.sectionStart);29===this._state||30===this._state||31===this._state?this.cbs.oncdata(e):19===this._state||21===this._state||22===this._state?this.cbs.oncomment(e):64!==this._state||this.xmlMode?65!==this._state||this.xmlMode?66!==this._state||this.xmlMode?3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state&&this.cbs.ontext(e):(this.decodeNumericEntity(3,16,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.decodeNumericEntity(2,10,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.parseLegacyEntity(),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData()))},e.prototype.getSection=function(){return this.buffer.substring(this.sectionStart,this._index)},e.prototype.emitToken=function(e){this.cbs[e](this.getSection()),this.sectionStart=-1},e.prototype.emitPartial=function(e){1!==this.baseState?this.cbs.onattribdata(e):this.cbs.ontext(e)},e}();t.default=G},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=t.FeedHandler=void 0;var l,u,d=c(n(146)),h=s(n(317)),p=n(584);!function(e){e[e.image=0]="image",e[e.audio=1]="audio",e[e.video=2]="video",e[e.document=3]="document",e[e.executable=4]="executable"}(l||(l={})),function(e){e[e.sample=0]="sample",e[e.full=1]="full",e[e.nonstop=2]="nonstop"}(u||(u={}));var m=function(e){function t(t,n){return"object"==typeof t&&(n=t=void 0),e.call(this,t,n)||this}return o(t,e),t.prototype.onend=function(){var e,t,n=_(E,this.dom);if(n){var r={};if("feed"===n.name){var o=n.children;r.type="atom",y(r,"id","id",o),y(r,"title","title",o);var i=v("href",_("link",o));i&&(r.link=i),y(r,"description","subtitle",o),(a=b("updated",o))&&(r.updated=new Date(a)),y(r,"author","email",o,!0),r.items=f("entry",o).map((function(e){var t={},n=e.children;y(t,"id","id",n),y(t,"title","title",n);var r=v("href",_("link",n));r&&(t.link=r);var o=b("summary",n)||b("content",n);o&&(t.description=o);var i=b("updated",n);return i&&(t.pubDate=new Date(i)),t.media=g(n),t}))}else{var a;o=null!==(t=null===(e=_("channel",n.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[];r.type=n.name.substr(0,3),r.id="",y(r,"title","title",o),y(r,"link","link",o),y(r,"description","description",o),(a=b("lastBuildDate",o))&&(r.updated=new Date(a)),y(r,"author","managingEditor",o,!0),r.items=f("item",n.children).map((function(e){var t={},n=e.children;y(t,"id","guid",n),y(t,"title","title",n),y(t,"link","link",n),y(t,"description","description",n);var r=b("pubDate",n);return r&&(t.pubDate=new Date(r)),t.media=g(n),t}))}this.feed=r,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},t}(d.default);function g(e){return f("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(t.url=e.attribs.url),e.attribs.fileSize&&(t.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(t.type=e.attribs.type),e.attribs.expression&&(t.expression=e.attribs.expression),e.attribs.bitrate&&(t.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(t.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(t.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(t.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(t.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(t.height=parseInt(e.attribs.height,10)),e.attribs.width&&(t.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(t.lang=e.attribs.lang),t}))}function f(e,t){return h.getElementsByTagName(e,t,!0)}function _(e,t){return h.getElementsByTagName(e,t,!0,1)[0]}function b(e,t,n){return void 0===n&&(n=!1),h.getText(h.getElementsByTagName(e,t,n,1)).trim()}function v(e,t){return t?t.attribs[e]:null}function y(e,t,n,r,o){void 0===o&&(o=!1);var i=b(n,r,o);i&&(e[t]=i)}function E(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.FeedHandler=m,t.parseFeed=function(e,t){void 0===t&&(t={xmlMode:!0});var n=new m(t);return new p.Parser(n,t).end(e),n.feed}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.render=t.parse=void 0;var r=n(181),o=n(146),i=n(588),a=r.__importDefault(n(1042));t.parse=function(e,t,n){var r={scriptingEnabled:"boolean"!=typeof t.scriptingEnabled||t.scriptingEnabled,treeAdapter:a.default,sourceCodeLocationInfo:t.sourceCodeLocationInfo},o=t.context;return n?i.parse(e,r):i.parseFragment(o,e,r)},t.render=function(e){for(var t,n=("length"in e?e:[e]),s=0;s<n.length;s+=1){var c=n[s];o.isDocument(c)&&(t=Array.prototype.splice).call.apply(t,r.__spreadArray([n,s,1],c.children))}return i.serialize({children:n},{treeAdapter:a.default})}},function(e,t,n){"use strict";const r=n(1030),o=n(1041);t.parse=function(e,t){return new r(t).parse(e)},t.parseFragment=function(e,t,n){"string"==typeof e&&(n=t,t=e,e=null);return new r(n).parseFragment(t,e)},t.serialize=function(e,t){return new o(e,t).serialize()}},function(e,t,n){"use strict";const r=n(182),o=n(318),i=n(590);e.exports=class extends r{constructor(e){super(e),this.tokenizer=e,this.posTracker=r.install(e.preprocessor,i),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){const n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(n){t._createDoctypeToken.call(this,n),this.currentToken.location=e.ctLoc},_createCharacterToken(n,r){t._createCharacterToken.call(this,n,r),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(n){t._createAttr.call(this,n),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(n){t._leaveAttrName.call(this,n),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(n){t._leaveAttrValue.call(this,n),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const n=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=n.startLine,this.currentCharacterToken.location.endCol=n.startCol,this.currentCharacterToken.location.endOffset=n.startOffset),this.currentToken.type===o.EOF_TOKEN?(n.endLine=n.startLine,n.endCol=n.startCol,n.endOffset=n.startOffset):(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col+1,n.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const n=this.currentCharacterToken&&this.currentCharacterToken.location;n&&-1===n.endOffset&&(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col,n.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(o.MODE).forEach(r=>{const i=o.MODE[r];n[i]=function(n){e.ctLoc=e._getCurrentLocation(),t[i].call(this,n)}}),n}}},function(e,t,n){"use strict";const r=n(182);e.exports=class extends r{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){const n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),("\n"===r||"\r"===r&&"\n"!==this.html[n+1])&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){const n=this.pos;t.dropParsedChunk.call(this);const r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}}},function(e,t,n){"use strict";const{DOCUMENT_MODE:r}=n(197);t.createDocument=function(){return{nodeName:"#document",mode:r.NO_QUIRKS,childNodes:[]}},t.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},t.createElement=function(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},t.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};const o=function(e){return{nodeName:"#text",value:e,parentNode:null}},i=t.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},a=t.insertBefore=function(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e};t.setTemplateContent=function(e,t){e.content=t},t.getTemplateContent=function(e){return e.content},t.setDocumentType=function(e,t,n,r){let o=null;for(let t=0;t<e.childNodes.length;t++)if("#documentType"===e.childNodes[t].nodeName){o=e.childNodes[t];break}o?(o.name=t,o.publicId=n,o.systemId=r):i(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r})},t.setDocumentMode=function(e,t){e.mode=t},t.getDocumentMode=function(e){return e.mode},t.detachNode=function(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},t.insertText=function(e,t){if(e.childNodes.length){const n=e.childNodes[e.childNodes.length-1];if("#text"===n.nodeName)return void(n.value+=t)}i(e,o(t))},t.insertTextBefore=function(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&"#text"===r.nodeName?r.value+=t:a(e,o(t),n)},t.adoptAttributes=function(e,t){const n=[];for(let t=0;t<e.attrs.length;t++)n.push(e.attrs[t].name);for(let r=0;r<t.length;r++)-1===n.indexOf(t[r].name)&&e.attrs.push(t[r])},t.getFirstChild=function(e){return e.childNodes[0]},t.getChildNodes=function(e){return e.childNodes},t.getParentNode=function(e){return e.parentNode},t.getAttrList=function(e){return e.attrs},t.getTagName=function(e){return e.tagName},t.getNamespaceURI=function(e){return e.namespaceURI},t.getTextNodeContent=function(e){return e.value},t.getCommentNodeContent=function(e){return e.data},t.getDocumentTypeNodeName=function(e){return e.name},t.getDocumentTypeNodePublicId=function(e){return e.publicId},t.getDocumentTypeNodeSystemId=function(e){return e.systemId},t.isTextNode=function(e){return"#text"===e.nodeName},t.isCommentNode=function(e){return"#comment"===e.nodeName},t.isDocumentTypeNode=function(e){return"#documentType"===e.nodeName},t.isElementNode=function(e){return!!e.tagName},t.setNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=t},t.getNodeSourceCodeLocation=function(e){return e.sourceCodeLocation},t.updateNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=Object.assign(e.sourceCodeLocation,t)}},function(e,t,n){"use strict";e.exports=function(e,t){return[e,t=t||Object.create(null)].reduce((e,t)=>(Object.keys(t).forEach(n=>{e[n]=t[n]}),e),Object.create(null))}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.render=t.parse=void 0;var o=n(214);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.parseDocument}});var i=n(576);Object.defineProperty(t,"render",{enumerable:!0,get:function(){return r(i).default}})},function(e,t,n){"use strict";t.__esModule=!0,t.stateify=t.TokenState=t.CharacterState=void 0;var r=n(319);var o=function(e){this.j=[],this.T=e||null};o.prototype={defaultTransition:!1,on:function(e,t){if(e instanceof Array){for(var n=0;n<e.length;n++)this.j.push([e[n],t]);return this}return this.j.push([e,t]),this},next:function(e){for(var t=0;t<this.j.length;t++){var n=this.j[t],r=n[0],o=n[1];if(this.test(e,r))return o}return this.defaultTransition},accepts:function(){return!!this.T},test:function(e,t){return e===t},emit:function(){return this.T}};var i=(0,r.inherits)(o,(function(e){this.j=[],this.T=e||null}),{test:function(e,t){return e===t||t instanceof RegExp&&t.test(e)}}),a=(0,r.inherits)(o,(function(e){this.j=[],this.T=e||null}),{jump:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.next(new e(""));return n===this.defaultTransition?(n=new this.constructor(t),this.on(e,n)):t&&(n.T=t),n},test:function(e,t){return e instanceof t}});t.CharacterState=i,t.TokenState=a,t.stateify=function(e,t,n,r){for(var o=0,a=e.length,s=t,c=[],l=void 0;o<a&&(l=s.next(e[o]));)s=l,o++;if(o>=a)return[];for(;o<a-1;)l=new i(r),c.push(l),s.on(e[o],l),s=l,o++;return l=new i(n),c.push(l),s.on(e[a-1],l),c}},function(e,t,n){"use strict";t.__esModule=!0,t.createTokenClass=function(){return function(e){e&&(this.v=e)}}},function(e,t){e.exports=/\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFE])|\uD83C\uDFFE\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C\uDFFD\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C\uDFFC\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C\uDFFB\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFC-\uDFFF]))|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC68|(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\uFE0F\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFE])|\uD83C\uDFFE\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C\uDFFD\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C\uDFFC\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C\uDFFB\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFC-\uDFFF]))|\uD83D\uDC69(?:\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFF]))|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83D\uDC68\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83D\uDC68\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83D\uDC68\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83D\uDC68\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC69(?:\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFE])|\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFC-\uDFFF]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68\u200D(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68\u200D\u2764\uFE0F\u200D\uD83D\uDC68|\uD83D\uDC69\u200D\u2764\uFE0F\u200D(?:\uD83D[\uDC68\uDC69])|\uD83E\uDDD1\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC68(?:\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D[\uDC67-\uDC69])\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]\uFE0F)|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83C\uDFF3\uFE0F\u200D\u26A7|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF]))\u200D[\u2695\u2696\u2708]\uFE0F|\uD83D\uDC69\u200D(?:\uD83D[\uDC67\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83D\uDC3B\u200D\u2744|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDF])\u200D[\u2640\u2642])\uFE0F|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83E\uDDD1\u200D[\u2695\u2696\u2708]\uFE0F|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|(?:\uD83D[\uDC68\uDC69])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D[\u2695\u2696\u2708]\uFE0F)|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC08\u200D\u2B1B|\uD83E\uDDD1\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDC66\uDC67\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC3\uDFC7]|\uD83D[\uDC43\uDC4A-\uDC4C\uDC4F\uDC50\uDC66-\uDC69\uDC6B-\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270C\u270D]|\uD83C[\uDFC2\uDFC4\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC46-\uDC49\uDC4D\uDC4E\uDD74\uDD75\uDD90])(?:[\uFE0E\uFE0F]|\uD83C[\uDFFB-\uDFFF])|(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9\u23EA\u23ED-\u23EF\u23F1-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7\u26F8\u26FA\u26FD\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2753\u2757\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE1A\uDE2F\uDE37\uDF0D-\uDF0F\uDF15\uDF1C\uDF21\uDF24-\uDF2C\uDF36\uDF78\uDF7D\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFA7\uDFAC-\uDFAE\uDFC6\uDFCD\uDFCE\uDFD4-\uDFE0\uDFED\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC08\uDC15\uDC1F\uDC26\uDC3F\uDC41\uDC53\uDC6A\uDC7D\uDCA3\uDCB0\uDCB3\uDCBB\uDCBF\uDCCB\uDCDA\uDCDF\uDCE4-\uDCE6\uDCEA-\uDCED\uDCF7\uDCF9-\uDCFB\uDCFD\uDD08\uDD0D\uDD12\uDD13\uDD49\uDD4A\uDD50-\uDD67\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDE10\uDE87\uDE8D\uDE91\uDE94\uDE98\uDEAD\uDEB2\uDEB9\uDEBA\uDEBC\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])[\uFE0E\uFE0F]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]/},,function(e,t,n){"use strict";const r={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};e.exports=class{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+r+o,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==r||n)}}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}raw(e,t,n){let o;if(n||(n=t),t&&(o=e.raws[t],void 0!==o))return o;let i=e.parent;if("before"===n){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return r[n];let a=e.root();if(a.rawCache||(a.rawCache={}),void 0!==a.rawCache[n])return a.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let r="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[r]?o=this[r](a,e):a.walk(e=>{if(o=e.raws[t],void 0!==o)return!1})}var s;return void 0===o&&(o=r[n]),a.rawCache[n]=o,o}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,o=0;for(;r&&"root"!==r.type;)o+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)n+=t}return n}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}}},function(e,t,n){"use strict";let{isClean:r,my:o}=n(410),i=n(1071),a=n(411),s=n(215),c=n(414),l=n(1072),u=n(601),d=n(603),h=n(275);const p={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},m={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},g={postcssPlugin:!0,prepare:!0,Once:!0};function f(e){return"object"==typeof e&&"function"==typeof e.then}function _(e){let t=!1,n=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function b(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:_(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function v(e){return e[r]=!1,e.nodes&&e.nodes.forEach(e=>v(e)),e}let y={};class E{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof E||t instanceof u)r=v(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=d;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[o]&&s.rebuild(r)}else r=v(t);this.result=new u(e,r,n),this.helpers={...y,result:this.result,postcss:y},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return"from"in this.opts||l("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(f(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];)e[r]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=a;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}walkSync(e){e[r]=!0;let t=_(e);for(let n of t)if(0===n)e.nodes&&e.each(e=>{e[r]||this.walkSync(e)});else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion){let e=n.postcssPlugin,t=n.postcssVersion,r=this.result.processor.version,o=t.split("."),i=r.split(".");(o[0]!==i[0]||parseInt(o[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];){e[r]=!0;let t=[b(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!m[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!g[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:n,visitors:o}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(o.length>0&&t.visitorIndex<o.length){let[e,r]=o[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===o.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return r(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let o,i=t.iterator;for(;o=n.nodes[n.indexes[i]];)if(n.indexes[i]+=1,!o[r])return o[r]=!0,void e.push(b(o));t.iterator=0,delete n.indexes[i]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,0===e)return void(n.nodes&&n.nodes.length&&(n[r]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}}E.registerPostcss=e=>{y=e},e.exports=E,E.default=E,h.registerLazyResult(E),c.registerLazyResult(E)},,function(e,t,n){"use strict";let r=n(602);class o{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new r(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}e.exports=o,o.default=o},function(e,t,n){"use strict";class r{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.positionBy(t);this.line=e.line,this.column=e.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=r,r.default=r},function(e,t,n){"use strict";let r=n(215),o=n(1073),i=n(417);function a(e,t){let n=new i(e,t),r=new o(n);try{r.parse()}catch(e){throw"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return r.root}e.exports=a,a.default=a,r.registerParse(a)},function(e,t,n){"use strict";let r={split(e,t,n){let r=[],o="",i=!1,a=0,s=!1,c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:s?n===s&&(s=!1):'"'===n||"'"===n?s=n:"("===n?a+=1:")"===n?a>0&&(a-=1):0===a&&t.includes(n)&&(i=!0),i?(""!==o&&r.push(o.trim()),o="",i=!1):o+=n;return(n||""!==o)&&r.push(o.trim()),r},space:e=>r.split(e,[" ","\n","\t"]),comma:e=>r.split(e,[","],!0)};e.exports=r,r.default=r},function(e,t,n){"use strict";(function(t){let{SourceMapConsumer:r,SourceMapGenerator:o}=n(412),{existsSync:i,readFileSync:a}=n(1076),{dirname:s,join:c}=n(413);class l{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.match(/\/\*\s*# sourceMappingURL=((?:(?!sourceMappingURL=).)*)\*\//)[1].trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=(?:(?!sourceMappingURL=).)*\*\//gm);if(t&&t.length>0){let e=t[t.length-1];e&&(this.annotation=this.getAnnotationURL(e))}}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return n=e.substr(RegExp.lastMatch.length),t?t.from(n,"base64").toString():window.atob(n);var n;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}loadFile(e){if(this.root=s(e),i(e))return this.mapFile=e,a(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return o.fromSourceMap(t).toString();if(t instanceof o)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=c(s(e),t)),this.loadFile(t)}}}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}}e.exports=l,l.default=l}).call(this,n(24).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o=n(78),i=n.n(o),a=n(88),s=n.n(a),c=n(162),l=n(83),u=n(94),d=n(81),h=n(100);class p extends i.a.Component{constructor(){super(),this.onClick=this.onClick.bind(this)}onClick(e){e.preventDefault(),e.stopPropagation(),l.a.dispatch({action:"view_group",group_id:this.props.groupProfile.groupId})}render(){const e=Object(h.b)(this.props.groupProfile.avatarUrl).getSquareThumbnailHttp(16),t=this.props.groupProfile.name?`${this.props.groupProfile.name} (${this.props.groupProfile.groupId})`:this.props.groupProfile.groupId;return i.a.createElement("img",{src:e,width:"16",height:"16",onClick:this.onClick,title:t})}}p.propTypes={groupProfile:s.a.shape({groupId:s.a.string.isRequired,name:s.a.string,avatarUrl:s.a.string.isRequired})},p.contextType=u.a;let m=Object(d.a)("views.elements.Flair")(r=class extends i.a.Component{constructor(){super(),this.state={profiles:[]}}componentDidMount(){this._unmounted=!1,this._generateAvatars(this.props.groups)}componentWillUnmount(){this._unmounted=!0}UNSAFE_componentWillReceiveProps(e){this._generateAvatars(e.groups)}async _getGroupProfiles(e){const t=[];for(const n of e){let e=null;try{e=await c.a.getGroupProfileCached(this.context,n)}catch(e){console.error("Could not get profile for group",n,e)}t.push(e)}return t.filter(e=>null!==e)}async _generateAvatars(e){if(!e||0===e.length)return;const t=await this._getGroupProfiles(e);this.unmounted||this.setState({profiles:t.filter(e=>!!e&&e.avatarUrl)})}render(){if(0===this.state.profiles.length)return null;const e=this.state.profiles.map((e,t)=>i.a.createElement(p,{key:t,groupProfile:e}));return i.a.createElement("span",{className:"mx_Flair"},e)}})||r;m.propTypes={groups:s.a.arrayOf(s.a.string)},m.contextType=u.a},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(419),c=n(612),l=n(324),u=n(93),d=n(80);class h extends s.a{constructor(...e){super(...e),o()(this,"onClick",e=>{e.preventDefault()})}wrapImage(e,t){return t}getFileBody(){const e=this.props.mxEvent.getType()===u.a.Sticker;return Object(c.a)(this.props.mxEvent.getContent(),e?Object(d.a)("Sticker"):Object(d.a)("Image"),!e)}render(){if(null!==this.state.error)return super.render();const e=this.props.mxEvent.getContent(),t=this.getContentUrl(),n=this.messageContent(t,this.getThumbUrl(),e,44),r=this.getFileBody(),o=a.a.createElement(l.a,{mxEvent:this.props.mxEvent,enableFlair:!1});return a.a.createElement("div",{className:"mx_MImageReplyBody"},n,a.a.createElement("div",{className:"mx_MImageReplyBody_info"},a.a.createElement("div",{className:"mx_MImageReplyBody_sender"},o),a.a.createElement("div",{className:"mx_MImageReplyBody_filename"},r)))}}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return s(t,e),t},l=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var u=c(n(78)),d=n(609),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.canvas=null,t.handleRef=function(e){t.canvas=e,t.draw()},t.draw=function(){var e=t.props,n=e.hash,r=e.height,o=e.punch,i=e.width;if(t.canvas){var a=d.decode(n,i,r,o),s=t.canvas.getContext("2d"),c=s.createImageData(i,r);c.data.set(a),s.putImageData(c,0,0)}},t}return o(t,e),t.prototype.componentDidUpdate=function(){this.draw()},t.prototype.render=function(){var e=this.props,t=(e.hash,e.height),n=e.width,r=l(e,["hash","height","width"]);return u.createElement("canvas",i({},r,{height:t,width:n,ref:this.handleRef}))},t.defaultProps={height:128,width:128},t}(u.PureComponent);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1081);t.decode=r.default,t.isBlurhashValid=r.isBlurhashValid;var o=n(1082);t.encode=o.default,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(420))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"];t.decode83=function(e){for(var t=0,n=0;n<e.length;n++){var o=e[n];t=83*t+r.indexOf(o)}return t},t.encode83=function(e,t){for(var n="",o=1;o<=t;o++){var i=Math.floor(e)/Math.pow(83,t-o)%83;n+=r[Math.floor(i)]}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sRGBToLinear=function(e){var t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t.linearTosRGB=function(e){var t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.round(12.92*t*255+.5):Math.round(255*(1.055*Math.pow(t,1/2.4)-.055)+.5)},t.sign=function(e){return e<0?-1:1},t.signPow=function(e,n){return t.sign(e)*Math.pow(Math.abs(e),n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(276),o=n.n(r),i=n(80);function a(e,t=Object(i.a)("Attachment"),n=!0,r=!1){let a=t;if(e.body&&e.body.length>0&&(a=e.body),r&&a.length>19){const e=a.split(".");let t=e.slice(0,e.length-1).join(".").substring(0,15);const n=e[e.length-1];t=t.replace(/\.*$/g,""),a=`${t}...${n}`}return e.info&&e.info.size&&n&&(a+=" ("+o()(e.info.size)+")"),a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(79),o=n.n(r);function i(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}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const s={imgSrc:"",imgStyle:null,style:"",textContent:""};let c,l;class u{constructor(e=null){this.iframeFn=e,o()(this,"onLoadPromise",void 0)}get iframe(){var e;const t=null===(e=this.iframeFn)||void 0===e?void 0:e.call(this);if(!t){const e=(c||(c=document.createElement("iframe"),document.body.appendChild(c),c.style.display="none",c.sandbox="allow-scripts allow-downloads allow-downloads-without-user-activation",l=new Promise(e=>{c.onload=()=>{e()},c.src="usercontent/"})),{iframe:c,onLoadPromise:l});return this.onLoadPromise=e.onLoadPromise,e.iframe}return this.onLoadPromise=null,t}async download({blob:e,name:t,autoDownload:n=!0,opts:r=s}){const o=this.iframe;this.onLoadPromise&&await this.onLoadPromise,o.contentWindow.postMessage(a(a({},r),{},{blob:e,download:t,auto:n}),"*")}}},function(e,t){function n(e){var t=String.fromCharCode.apply(null,e),n=window.btoa(t),r=e.length,o=4*Math.floor((r+2)/3)+(r+2)%3-2;return n.slice(0,o)}try{t.encryptAttachment=function(e){var t,r,o,i,a;return a=new Uint8Array(16),window.crypto.getRandomValues(a.subarray(0,8)),window.crypto.subtle.generateKey({name:"AES-CTR",length:256},!0,["encrypt","decrypt"]).then((function(e){return t=e,window.crypto.subtle.exportKey("jwk",t)})).then((function(n){return r=n,window.crypto.subtle.encrypt({name:"AES-CTR",counter:a,length:64},t,e)})).then((function(e){return o=e,window.crypto.subtle.digest("SHA-256",o)})).then((function(e){return i=e,{data:o,info:{v:"v2",key:r,iv:n(a),hashes:{sha256:n(new Uint8Array(i))}}}}))},t.decryptAttachment=function(e,t){if(void 0===t||void 0===t.key||void 0===t.iv||void 0===t.hashes||void 0===t.hashes.sha256)throw new Error("Invalid info. Missing info.key, info.iv or info.hashes.sha256 key");var r,o=function(e){for(var t=e+"===".slice(0,(4-e.length%4)%4),n=window.atob(t),r=new Uint8Array(n.length),o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}(t.iv),i=t.hashes.sha256;return window.crypto.subtle.importKey("jwk",t.key,{name:"AES-CTR"},!1,["encrypt","decrypt"]).then((function(t){return r=t,window.crypto.subtle.digest("SHA-256",e)})).then((function(a){if(n(new Uint8Array(a))!=i)throw new Error("Mismatched SHA-256 digest");var s;return s="v1"==t.v||"v2"==t.v?64:128,window.crypto.subtle.decrypt({name:"AES-CTR",counter:o,length:s},r,e)}))}}catch(e){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(83),d=n(85),h=n(616),p=n(132),m=n(80),g=n(148),f=n(81),_=n(94),b=n(145),v=n(106),y=n(144);let E=Object(f.a)("views.rooms.PinnedEventTile")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"onTileClicked",()=>{u.a.dispatch({action:"view_room",event_id:this.props.event.getId(),highlighted:!0,room_id:this.props.event.getRoomId()})})}render(){const e=this.props.event.getSender(),t=this.props.room.getMember(e);let n=null;return this.props.onUnpinClicked&&(n=l.a.createElement(v.a,{onClick:this.props.onUnpinClicked,className:"mx_PinnedEventTile_unpinButton",title:Object(m.a)("Unpin")})),l.a.createElement("div",{className:"mx_PinnedEventTile"},l.a.createElement(p.a,{className:"mx_PinnedEventTile_senderAvatar",member:t,width:24,height:24,fallbackUserId:e}),l.a.createElement("span",{className:"mx_PinnedEventTile_sender "+Object(b.f)(e)},(null==t?void 0:t.name)||e),n,l.a.createElement("div",{className:"mx_PinnedEventTile_message"},l.a.createElement(h.a,{mxEvent:this.props.event,className:"mx_PinnedEventTile_body",maxImageHeight:150,onHeightChanged:()=>{},tileShape:y.a.Pinned})),l.a.createElement("div",{className:"mx_PinnedEventTile_footer"},l.a.createElement("span",{className:"mx_PinnedEventTile_timestamp"},Object(g.b)(new Date(this.props.event.getTs()))),l.a.createElement(d.a,{onClick:this.onTileClicked,kind:"link"},Object(m.a)("View message"))))}},s()(o,"contextType",_.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(89),l=n(84),u=n(423),d=n(424),h=n(617),p=n(81),m=n(877),g=n(93);function f(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}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let b=Object(p.a)("views.messages.MessageEvent")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"body",Object(a.createRef)()),i()(this,"mediaHelper",void 0),i()(this,"getEventTileOps",()=>{var e,t;return(null===(e=this.body.current)||void 0===e||null===(t=e.getEventTileOps)||void 0===t?void 0:t.call(e))||null}),i()(this,"onTileUpdate",()=>{this.forceUpdate()}),m.a.isEligible(this.props.mxEvent)&&(this.mediaHelper=new m.a(this.props.mxEvent))}componentWillUnmount(){var e;null===(e=this.mediaHelper)||void 0===e||e.destroy()}componentDidUpdate(e){var t;this.props.mxEvent!==e.mxEvent&&m.a.isEligible(this.props.mxEvent)&&(null===(t=this.mediaHelper)||void 0===t||t.destroy(),this.mediaHelper=new m.a(this.props.mxEvent))}get bodyTypes(){return _({[g.b.Text]:c.getComponent("messages.TextualBody"),[g.b.Notice]:c.getComponent("messages.TextualBody"),[g.b.Emote]:c.getComponent("messages.TextualBody"),[g.b.Image]:c.getComponent("messages.MImageBody"),[g.b.File]:c.getComponent("messages.MFileBody"),[g.b.Audio]:c.getComponent("messages.MVoiceOrAudioBody"),[g.b.Video]:c.getComponent("messages.MVideoBody")},this.props.overrideBodyTypes||{})}get evTypes(){return _({[g.a.Sticker]:c.getComponent("messages.MStickerBody")},this.props.overrideEventTypes||{})}getMediaHelper(){return this.mediaHelper}render(){const e=this.props.mxEvent.getContent(),t=this.props.mxEvent.getType(),n=e.msgtype;let r=d.a;if(this.props.mxEvent.isRedacted()||(r=t&&this.evTypes[t]?this.evTypes[t]:n&&this.bodyTypes[n]?this.bodyTypes[n]:e.url?this.bodyTypes[g.b.File]:h.a),l.b.getValue("feature_mjolnir")){const e=`mx_mjolnir_render_${this.props.mxEvent.getRoomId()}__${this.props.mxEvent.getId()}`;if(!("true"===localStorage.getItem(e))){const e=this.props.mxEvent.getSender().split(":").slice(1).join(":"),t=u.a.sharedInstance().isUserBanned(this.props.mxEvent.getSender()),n=u.a.sharedInstance().isServerBanned(e);(t||n)&&(r=c.getComponent("messages.MjolnirBody"))}}return r?s.a.createElement(r,{ref:this.body,mxEvent:this.props.mxEvent,highlights:this.props.highlights,highlightLink:this.props.highlightLink,showUrlPreview:this.props.showUrlPreview,tileShape:this.props.tileShape,maxImageHeight:this.props.maxImageHeight,replacingEventId:this.props.replacingEventId,editState:this.props.editState,onHeightChanged:this.props.onHeightChanged,onMessageAllowed:this.onTileUpdate,permalinkCreator:this.props.permalinkCreator,mediaEventHelper:this.mediaHelper}):null}})||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r);t.a=Object(r.forwardRef)(({mxEvent:e,children:t},n)=>{const r=e.getContent().body;return o.a.createElement("span",{className:"mx_UnknownBody",ref:n},r,t)})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r=["image/jpeg","image/gif","image/png","video/mp4","video/webm","video/ogg","audio/mp4","audio/webm","audio/aac","audio/mpeg","audio/ogg","audio/wave","audio/wav","audio/x-wav","audio/x-pn-wav","audio/flac","audio/x-flac"];function o(e){return r.includes(e)?e:"application/octet-stream"}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(86),a=n.n(i),s=n(108),c=n(80),l=n(83),u=n(326),d=n(113),h=n(140),p=n(95),m=n(196),g=n(144),f=n(216),_=n(255),b=n(154),v=n(106),y=n(117),E=n(218),S=n(175),w=n(393),C=n(199),T=n(277),x=n(278),k=n(120),F=n(102);var O;!function(e){e[e.CanSend=0]="CanSend",e[e.Sending=1]="Sending",e[e.Sent=2]="Sent",e[e.Failed=3]="Failed"}(O||(O={}));const R=({room:e,event:t,matrixClient:n,onFinished:i})=>{const[a,s]=Object(r.useState)(O.CanSend);let u,d,h,p=!1;return a===O.CanSend?(u="mx_ForwardList_canSend",e.maySendMessage()?d=Object(c.a)("Send"):(p=!0,d=Object(c.a)("You don't have permission to do this"))):a===O.Sending?(u="mx_ForwardList_sending",p=!0,d=Object(c.a)("Sending"),h=o.a.createElement("div",{className:"mx_ForwardList_sendIcon","aria-label":d})):a===O.Sent?(u="mx_ForwardList_sent",p=!0,d=Object(c.a)("Sent"),h=o.a.createElement("div",{className:"mx_ForwardList_sendIcon","aria-label":d})):(u="mx_ForwardList_sendFailed",p=!0,d=Object(c.a)("Failed to send"),h=o.a.createElement(S.a,{notification:E.a.RED_EXCLAMATION})),o.a.createElement("div",{className:"mx_ForwardList_entry"},o.a.createElement(v.a,{className:"mx_ForwardList_roomButton",onClick:()=>{l.a.dispatch({action:"view_room",room_id:e.roomId}),i(!0)},title:Object(c.a)("Open link"),yOffset:-20,alignment:b.a.Top},o.a.createElement(_.a,{room:e,avatarSize:32}),o.a.createElement("span",{className:"mx_ForwardList_entry_name"},e.name)),o.a.createElement(v.a,{kind:a===O.Failed?"danger_outline":"primary_outline",className:"mx_ForwardList_sendButton "+u,onClick:async()=>{s(O.Sending);try{await n.sendEvent(e.roomId,t.getType(),t.getContent()),s(O.Sent)}catch(e){s(O.Failed)}},disabled:p,title:d,yOffset:-20,alignment:b.a.Top},o.a.createElement("div",{className:"mx_ForwardList_sendLabel"},Object(c.a)("Send")),h))};t.a=({matrixClient:e,event:t,permalinkCreator:i,onFinished:l})=>{const _=e.getUserId(),[b,v]=Object(r.useState)({});Object(r.useEffect)(()=>{e.getProfileInfo(_).then(e=>v(e))},[e,_]);const E=new s.b({type:"m.room.message",sender:_,content:t.getContent(),unsigned:{age:97},event_id:"$9999999999999999999999999999999999999999999",room_id:t.getRoomId()});E.sender={name:b.displayname||_,rawDisplayName:b.displayname,userId:_,getAvatarUrl:(...e)=>Object(m.c)({avatarUrl:b.avatar_url},30,30,"crop"),getMxcAvatarUrl:()=>b.avatar_url};const[S,O]=Object(r.useState)(""),D=S.toLowerCase(),I=F.g.spacesEnabled,A=Object(u.a)(d.a.Flair),N=Object(u.b)("layout");let M=Object(r.useMemo)(()=>Object(w.b)(e.getVisibleRooms().filter(e=>"join"===e.getMyMembership()&&!(I&&e.isSpaceRoom()))),[e,I]);D&&(M=new C.a(M,{keys:["name"],funcs:[e=>[e.getCanonicalAlias(),...e.getAltAliases()].filter(Boolean)],shouldMatchWordsOnly:!1}).match(D));const[P,L]=Object(r.useState)(20);return o.a.createElement(p.a,{title:Object(c.a)("Forward message"),className:"mx_ForwardDialog",contentId:"mx_ForwardList",onFinished:l,fixedWidth:!1},o.a.createElement("h3",null,Object(c.a)("Message preview")),o.a.createElement("div",{className:a()("mx_ForwardDialog_preview",{mx_IRCLayout:N==h.a.IRC,mx_GroupLayout:N==h.a.Group})},o.a.createElement(g.b,{mxEvent:E,layout:N,enableFlair:A,permalinkCreator:i,as:"div"})),o.a.createElement("hr",null),o.a.createElement("div",{className:"mx_ForwardList",id:"mx_ForwardList"},o.a.createElement(f.a,{className:"mx_textinput_icon mx_textinput_search",placeholder:Object(c.a)("Search for rooms or people"),onSearch:O,autoComplete:!0,autoFocus:!0}),o.a.createElement(y.a,{className:"mx_ForwardList_content"},M.length>0?o.a.createElement("div",{className:"mx_ForwardList_results"},o.a.createElement(T.a,{truncateAt:P,createOverflowElement:function(e,t){const r=Object(c.a)("and %(count)s others...",{count:e});return o.a.createElement(x.b,{className:"mx_EntityTile_ellipsis",avatarJsx:o.a.createElement(k.a,{url:n(279),name:"...",width:36,height:36}),name:r,presenceState:"online",suppressOnHover:!0,onClick:()=>L(t)})},getChildren:(n,r)=>M.slice(n,r).map(n=>o.a.createElement(R,{key:n.roomId,room:n,event:t,matrixClient:e,onFinished:l})),getChildCount:()=>M.length})):o.a.createElement("span",{className:"mx_ForwardList_noResults"},Object(c.a)("No results")))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(125),u=n(82),d=n(90),h=n(621),p=n(81),m=n(84),g=n(189),f=n(95),_=n(116),b=n(101),v=n(97);const y=["org.matrix.msc3215.room.moderation.moderated_by"];var E,S;!function(e){e.Disagreement="org.matrix.msc3215.abuse.nature.disagreement",e.Toxic="org.matrix.msc3215.abuse.nature.toxic",e.Illegal="org.matrix.msc3215.abuse.nature.illegal",e.Spam="org.matrix.msc3215.abuse.nature.spam",e.Other="org.matrix.msc3215.abuse.nature.other"}(E||(E={})),function(e){e.Admin="non-standard.abuse.nature.admin"}(S||(S={}));let w=Object(p.a)("views.dialogs.ReportEventDialog")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"moderation",void 0),i()(this,"onReasonChange",({target:{value:e}})=>{this.setState({reason:e})}),i()(this,"onNatureChosen",e=>{this.setState({nature:e.currentTarget.value})}),i()(this,"onCancel",()=>{this.props.onFinished(!1)}),i()(this,"onSubmit",async()=>{let e=this.state.reason||"";if(e=e.trim(),this.moderation){if(!this.state.nature||(this.state.nature==E.Other||this.state.nature==S.Admin)&&!e)return void this.setState({err:Object(c.a)("Please fill why you're reporting.")})}else if(!e)return void this.setState({err:Object(c.a)("Please fill why you're reporting.")});this.setState({busy:!0,err:null});try{const e=u.a.get(),t=this.props.mxEvent;if(this.moderation&&this.state.nature!=S.Admin){const n=this.state.nature,r=await Object(l.c)(e,this.moderation.moderationBotUserId);await e.sendEvent(r,"org.matrix.msc3215.abuse.report",{event_id:t.getId(),room_id:t.getRoomId(),moderated_by_id:this.moderation.moderationRoomId,nature:n,reporter:e.getUserId(),comment:this.state.reason.trim()})}else await e.reportEvent(t.getRoomId(),t.getId(),-100,this.state.reason.trim());this.props.onFinished(!0)}catch(e){this.setState({busy:!1,err:e.message})}});let t=null,n=null;if(m.b.getValue("feature_report_to_moderators")){const r=u.a.get().getRoom(e.mxEvent.getRoomId());for(const e of y){const o=r.currentState.getStateEvents(e,e);if(!o)continue;if(Array.isArray(o))throw new TypeError(`getStateEvents(${e}, ${e}) should return at most one state event`);const i=o.event;if(!("content"in i)||"object"!=typeof i.content){console.debug("Moderation error","state event",e,"should have an object field `content`, got",i);continue}const a=i.content;"room_id"in a&&"string"==typeof a.room_id?"user_id"in a&&"string"==typeof a.user_id?(t=a.room_id,n=a.user_id):console.debug("Moderation error","state event",e,"should have a string field `content.user_id`, got",i):console.debug("Moderation error","state event",e,"should have a string field `content.room_id`, got",i)}t&&n&&(this.moderation={moderationRoomId:t,moderationBotUserId:n})}this.state={reason:"",busy:!1,err:null,nature:null}}render(){let e=null;this.state.err&&(e=s.a.createElement("div",{className:"error"},this.state.err));let t=null;this.state.busy&&(t=s.a.createElement("div",{className:"progress"},s.a.createElement(v.a,null)));const n=d.a.get().reportEvent&&d.a.get().reportEvent.adminMessageMD;let r;if(n){const e=new h.a(n).toHTML({externalLinks:!0});r=s.a.createElement("p",{dangerouslySetInnerHTML:{__html:e}})}if(this.moderation){const n=u.a.get(),r=d.a.get().validated_server_config.hsName;let o;switch(this.state.nature){case E.Disagreement:o=Object(c.a)("What this user is writing is wrong.\nThis will be reported to the room moderators.");break;case E.Toxic:o=Object(c.a)("This user is displaying toxic behaviour, for instance by insulting other users or sharing adult-only content in a family-friendly room or otherwise violating the rules of this room.\nThis will be reported to the room moderators.");break;case E.Illegal:o=Object(c.a)("This user is displaying illegal behaviour, for instance by doxing people or threatening violence.\nThis will be reported to the room moderators who may escalate this to legal authorities.");break;case E.Spam:o=Object(c.a)("This user is spamming the room with ads, links to ads or to propaganda.\nThis will be reported to the room moderators.");break;case S.Admin:o=n.isRoomEncrypted(this.props.mxEvent.getRoomId())?Object(c.a)("This room is dedicated to illegal or toxic content or the moderators fail to moderate illegal or toxic content.\nThis will be reported to the administrators of %(homeserver)s. The administrators will NOT be able to read the encrypted content of this room.",{homeserver:r}):Object(c.a)("This room is dedicated to illegal or toxic content or the moderators fail to moderate illegal or toxic content.\n This will be reported to the administrators of %(homeserver)s.",{homeserver:r});break;case E.Other:o=Object(c.a)("Any other reason. Please describe the problem.\nThis will be reported to the room moderators.");break;default:o=Object(c.a)("Please pick a nature and describe what makes this message abusive.")}return s.a.createElement(f.a,{className:"mx_ReportEventDialog",onFinished:this.props.onFinished,title:Object(c.a)("Report Content"),contentId:"mx_ReportEventDialog"},s.a.createElement("div",null,s.a.createElement(g.a,{name:"nature",value:E.Disagreement,checked:this.state.nature==E.Disagreement,onChange:this.onNatureChosen},Object(c.a)("Disagree")),s.a.createElement(g.a,{name:"nature",value:E.Toxic,checked:this.state.nature==E.Toxic,onChange:this.onNatureChosen},Object(c.a)("Toxic Behaviour")),s.a.createElement(g.a,{name:"nature",value:E.Illegal,checked:this.state.nature==E.Illegal,onChange:this.onNatureChosen},Object(c.a)("Illegal Content")),s.a.createElement(g.a,{name:"nature",value:E.Spam,checked:this.state.nature==E.Spam,onChange:this.onNatureChosen},Object(c.a)("Spam or propaganda")),s.a.createElement(g.a,{name:"nature",value:S.Admin,checked:this.state.nature==S.Admin,onChange:this.onNatureChosen},Object(c.a)("Report the entire room")),s.a.createElement(g.a,{name:"nature",value:E.Other,checked:this.state.nature==E.Other,onChange:this.onNatureChosen},Object(c.a)("Other")),s.a.createElement("p",null,o),s.a.createElement(b.a,{className:"mx_ReportEventDialog_reason",element:"textarea",label:Object(c.a)("Reason"),rows:5,onChange:this.onReasonChange,value:this.state.reason,disabled:this.state.busy}),t,e),s.a.createElement(_.a,{primaryButton:Object(c.a)("Send report"),onPrimaryButtonClick:this.onSubmit,focus:!0,onCancel:this.onCancel,disabled:this.state.busy}))}return s.a.createElement(f.a,{className:"mx_ReportEventDialog",onFinished:this.props.onFinished,title:Object(c.a)("Report Content to Your Homeserver Administrator"),contentId:"mx_ReportEventDialog"},s.a.createElement("div",{className:"mx_ReportEventDialog",id:"mx_ReportEventDialog"},s.a.createElement("p",null,Object(c.a)("Reporting this message will send its unique 'event ID' to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.")),r,s.a.createElement(b.a,{className:"mx_ReportEventDialog_reason",element:"textarea",label:Object(c.a)("Reason"),rows:5,onChange:this.onReasonChange,value:this.state.reason,disabled:this.state.busy}),t,e),s.a.createElement(_.a,{primaryButton:Object(c.a)("Send report"),onPrimaryButtonClick:this.onSubmit,focus:!0,onCancel:this.onCancel,disabled:this.state.busy}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(79),o=n.n(r),i=n(1089),a=n(107);const s=["sub","sup","del","u"],c=["text","softbreak","linebreak","paragraph","document"];function l(e){if(null!=e.literal&&null!=e.literal.match('^<((div|span) data-mx-maths="[^"]*"|/(div|span))>$'))return!0;const t=/^<\/?(.*)>$/.exec(e.literal);if(t&&2==t.length){const e=t[1];return s.indexOf(e)>-1}return!1}function u(e){let t=e;for(;t.parent;)t=t.parent;return t.firstChild!=t.lastChild}class d{constructor(e){o()(this,"input",void 0),o()(this,"parsed",void 0),this.input=e;const t=new i.Parser;this.parsed=t.parse(this.input)}isPlainText(){const e=this.parsed.walker();let t;for(;t=e.next();){const e=t.node;if(!(c.indexOf(e.type)>-1)){if("html_inline"!=e.type&&"html_block"!=e.type)return!1;if(l(e))return!1}}return!0}toHTML({externalLinks:e=!1}={}){const t=new i.HtmlRenderer({safe:!1,softbreak:"<br />"}),n=t.paragraph;return t.paragraph=function(e,t){u(e)&&n.call(this,e,t)},t.link=function(t,n){const r=this.attrs(t);n?(r.push(["href",this.esc(t.destination)]),t.title&&r.push(["title",this.esc(t.title)]),e&&(r.push(["target","_blank"]),r.push(["rel","noreferrer noopener"])),this.tag("a",r)):this.tag("/a")},t.html_inline=function(e){l(e)?this.lit(e.literal):this.lit(Object(a.escape)(e.literal))},t.html_block=function(e){t.html_inline(e)},t.render(this.parsed)}toPlaintext(){const e=new i.HtmlRenderer({safe:!1});return e.paragraph=function(e,t){u(e)&&!t&&e.next&&this.lit("\n\n")},e.html_block=function(e){this.lit(e.literal),u(e)&&e.next&&this.lit("\n\n")},e.render(this.parsed)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(426),p=n(80),m=n(89),g=n(94),f=n(327),_=n(198),b=n(82),v=n(81);let y=Object(v.a)("structures.ViewSource")((i=o=class extends l.a.Component{constructor(e){super(e),this.state={isEditing:!1}}onBack(){this.setState({isEditing:!1})}onEdit(){this.setState({isEditing:!0})}viewSourceContent(){const e=this.props.mxEvent.replacingEvent()||this.props.mxEvent,t=e.isEncrypted(),n=e.clearEvent,r=e.event;return t?l.a.createElement(l.a.Fragment,null,l.a.createElement("details",{open:!0,className:"mx_ViewSource_details"},l.a.createElement("summary",null,l.a.createElement("span",{className:"mx_ViewSource_heading"},Object(p.a)("Decrypted event source"))),l.a.createElement(h.a,{className:"json"},JSON.stringify(n,null,2))),l.a.createElement("details",{className:"mx_ViewSource_details"},l.a.createElement("summary",null,l.a.createElement("span",{className:"mx_ViewSource_heading"},Object(p.a)("Original event source"))),l.a.createElement(h.a,{className:"json"},JSON.stringify(r,null,2)))):l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"mx_ViewSource_heading"},Object(p.a)("Original event source")),l.a.createElement(h.a,{className:"json"},JSON.stringify(r,null,2)))}getBaseEventId(){const e=this.props.mxEvent.replacingEvent()||this.props.mxEvent,t=e.isEncrypted(),n=this.props.mxEvent;var r,o,i,a;return t?null!==(r=null===(o=e.event.content["m.relates_to"])||void 0===o?void 0:o.event_id)&&void 0!==r?r:n.getId():null!==(i=null===(a=e.getContent()["m.relates_to"])||void 0===a?void 0:a.event_id)&&void 0!==i?i:n.getId()}editSourceContent(){const e=this.props.mxEvent.replacingEvent()||this.props.mxEvent,t=e.isState(),n=e.getRoomId(),r=e.getContent();if(t)return l.a.createElement(g.a.Consumer,null,t=>l.a.createElement(f.a,{room:t.getRoom(n),forceStateEvent:!0,onBack:()=>this.onBack(),inputs:{eventType:e.getType(),evContent:JSON.stringify(r,null,"\t"),stateKey:e.getStateKey()}}));{var o,i;const t=null!==(o=null===(i=r["m.new_content"])||void 0===i?void 0:i.body)&&void 0!==o?o:r.body,a={body:" * "+t,msgtype:r.msgtype,"m.new_content":{body:t,msgtype:r.msgtype},"m.relates_to":{rel_type:"m.replace",event_id:this.getBaseEventId()}};return l.a.createElement(g.a.Consumer,null,t=>l.a.createElement(f.a,{room:t.getRoom(n),forceStateEvent:!1,forceGeneralEvent:!0,onBack:()=>this.onBack(),inputs:{eventType:e.getType(),evContent:JSON.stringify(a,null,"\t")}}))}}canSendStateEvent(e){const t=b.a.get();return t.getRoom(e.getRoomId()).currentState.mayClientSendStateEvent(e.getType(),t)}render(){const e=m.getComponent("views.dialogs.BaseDialog"),t=this.props.mxEvent.replacingEvent()||this.props.mxEvent,n=this.state.isEditing,r=t.getRoomId(),o=t.getId(),i=t.isState()?this.canSendStateEvent(t):Object(_.a)(this.props.mxEvent);return l.a.createElement(e,{className:"mx_ViewSource",onFinished:this.props.onFinished,title:Object(p.a)("View Source")},l.a.createElement("div",null,l.a.createElement("div",null,"Room ID: ",r),l.a.createElement("div",null,"Event ID: ",o),l.a.createElement("div",{className:"mx_ViewSource_separator"}),n?this.editSourceContent():this.viewSourceContent()),!n&&i&&l.a.createElement("div",{className:"mx_Dialog_buttons"},l.a.createElement("button",{onClick:()=>this.onEdit()},Object(p.a)("Edit"))))}},s()(o,"propTypes",{onFinished:d.a.func.isRequired,mxEvent:d.a.object.isRequired}),r=i))||r},function(e,t,n){var r=n(1090);r.registerLanguage("1c",n(1091)),r.registerLanguage("abnf",n(1092)),r.registerLanguage("accesslog",n(1093)),r.registerLanguage("actionscript",n(1094)),r.registerLanguage("ada",n(1095)),r.registerLanguage("angelscript",n(1096)),r.registerLanguage("apache",n(1097)),r.registerLanguage("applescript",n(1098)),r.registerLanguage("arcade",n(1099)),r.registerLanguage("arduino",n(1100)),r.registerLanguage("armasm",n(1101)),r.registerLanguage("xml",n(1102)),r.registerLanguage("asciidoc",n(1103)),r.registerLanguage("aspectj",n(1104)),r.registerLanguage("autohotkey",n(1105)),r.registerLanguage("autoit",n(1106)),r.registerLanguage("avrasm",n(1107)),r.registerLanguage("awk",n(1108)),r.registerLanguage("axapta",n(1109)),r.registerLanguage("bash",n(1110)),r.registerLanguage("basic",n(1111)),r.registerLanguage("bnf",n(1112)),r.registerLanguage("brainfuck",n(1113)),r.registerLanguage("c-like",n(1114)),r.registerLanguage("c",n(1115)),r.registerLanguage("cal",n(1116)),r.registerLanguage("capnproto",n(1117)),r.registerLanguage("ceylon",n(1118)),r.registerLanguage("clean",n(1119)),r.registerLanguage("clojure",n(1120)),r.registerLanguage("clojure-repl",n(1121)),r.registerLanguage("cmake",n(1122)),r.registerLanguage("coffeescript",n(1123)),r.registerLanguage("coq",n(1124)),r.registerLanguage("cos",n(1125)),r.registerLanguage("cpp",n(1126)),r.registerLanguage("crmsh",n(1127)),r.registerLanguage("crystal",n(1128)),r.registerLanguage("csharp",n(1129)),r.registerLanguage("csp",n(1130)),r.registerLanguage("css",n(1131)),r.registerLanguage("d",n(1132)),r.registerLanguage("markdown",n(1133)),r.registerLanguage("dart",n(1134)),r.registerLanguage("delphi",n(1135)),r.registerLanguage("diff",n(1136)),r.registerLanguage("django",n(1137)),r.registerLanguage("dns",n(1138)),r.registerLanguage("dockerfile",n(1139)),r.registerLanguage("dos",n(1140)),r.registerLanguage("dsconfig",n(1141)),r.registerLanguage("dts",n(1142)),r.registerLanguage("dust",n(1143)),r.registerLanguage("ebnf",n(1144)),r.registerLanguage("elixir",n(1145)),r.registerLanguage("elm",n(1146)),r.registerLanguage("ruby",n(1147)),r.registerLanguage("erb",n(1148)),r.registerLanguage("erlang-repl",n(1149)),r.registerLanguage("erlang",n(1150)),r.registerLanguage("excel",n(1151)),r.registerLanguage("fix",n(1152)),r.registerLanguage("flix",n(1153)),r.registerLanguage("fortran",n(1154)),r.registerLanguage("fsharp",n(1155)),r.registerLanguage("gams",n(1156)),r.registerLanguage("gauss",n(1157)),r.registerLanguage("gcode",n(1158)),r.registerLanguage("gherkin",n(1159)),r.registerLanguage("glsl",n(1160)),r.registerLanguage("gml",n(1161)),r.registerLanguage("go",n(1162)),r.registerLanguage("golo",n(1163)),r.registerLanguage("gradle",n(1164)),r.registerLanguage("groovy",n(1165)),r.registerLanguage("haml",n(1166)),r.registerLanguage("handlebars",n(1167)),r.registerLanguage("haskell",n(1168)),r.registerLanguage("haxe",n(1169)),r.registerLanguage("hsp",n(1170)),r.registerLanguage("htmlbars",n(1171)),r.registerLanguage("http",n(1172)),r.registerLanguage("hy",n(1173)),r.registerLanguage("inform7",n(1174)),r.registerLanguage("ini",n(1175)),r.registerLanguage("irpf90",n(1176)),r.registerLanguage("isbl",n(1177)),r.registerLanguage("java",n(1178)),r.registerLanguage("javascript",n(1179)),r.registerLanguage("jboss-cli",n(1180)),r.registerLanguage("json",n(1181)),r.registerLanguage("julia",n(1182)),r.registerLanguage("julia-repl",n(1183)),r.registerLanguage("kotlin",n(1184)),r.registerLanguage("lasso",n(1185)),r.registerLanguage("latex",n(1186)),r.registerLanguage("ldif",n(1187)),r.registerLanguage("leaf",n(1188)),r.registerLanguage("less",n(1189)),r.registerLanguage("lisp",n(1190)),r.registerLanguage("livecodeserver",n(1191)),r.registerLanguage("livescript",n(1192)),r.registerLanguage("llvm",n(1193)),r.registerLanguage("lsl",n(1194)),r.registerLanguage("lua",n(1195)),r.registerLanguage("makefile",n(1196)),r.registerLanguage("mathematica",n(1197)),r.registerLanguage("matlab",n(1198)),r.registerLanguage("maxima",n(1199)),r.registerLanguage("mel",n(1200)),r.registerLanguage("mercury",n(1201)),r.registerLanguage("mipsasm",n(1202)),r.registerLanguage("mizar",n(1203)),r.registerLanguage("perl",n(1204)),r.registerLanguage("mojolicious",n(1205)),r.registerLanguage("monkey",n(1206)),r.registerLanguage("moonscript",n(1207)),r.registerLanguage("n1ql",n(1208)),r.registerLanguage("nginx",n(1209)),r.registerLanguage("nim",n(1210)),r.registerLanguage("nix",n(1211)),r.registerLanguage("node-repl",n(1212)),r.registerLanguage("nsis",n(1213)),r.registerLanguage("objectivec",n(1214)),r.registerLanguage("ocaml",n(1215)),r.registerLanguage("openscad",n(1216)),r.registerLanguage("oxygene",n(1217)),r.registerLanguage("parser3",n(1218)),r.registerLanguage("pf",n(1219)),r.registerLanguage("pgsql",n(1220)),r.registerLanguage("php",n(1221)),r.registerLanguage("php-template",n(1222)),r.registerLanguage("plaintext",n(1223)),r.registerLanguage("pony",n(1224)),r.registerLanguage("powershell",n(1225)),r.registerLanguage("processing",n(1226)),r.registerLanguage("profile",n(1227)),r.registerLanguage("prolog",n(1228)),r.registerLanguage("properties",n(1229)),r.registerLanguage("protobuf",n(1230)),r.registerLanguage("puppet",n(1231)),r.registerLanguage("purebasic",n(1232)),r.registerLanguage("python",n(1233)),r.registerLanguage("python-repl",n(1234)),r.registerLanguage("q",n(1235)),r.registerLanguage("qml",n(1236)),r.registerLanguage("r",n(1237)),r.registerLanguage("reasonml",n(1238)),r.registerLanguage("rib",n(1239)),r.registerLanguage("roboconf",n(1240)),r.registerLanguage("routeros",n(1241)),r.registerLanguage("rsl",n(1242)),r.registerLanguage("ruleslanguage",n(1243)),r.registerLanguage("rust",n(1244)),r.registerLanguage("sas",n(1245)),r.registerLanguage("scala",n(1246)),r.registerLanguage("scheme",n(1247)),r.registerLanguage("scilab",n(1248)),r.registerLanguage("scss",n(1249)),r.registerLanguage("shell",n(1250)),r.registerLanguage("smali",n(1251)),r.registerLanguage("smalltalk",n(1252)),r.registerLanguage("sml",n(1253)),r.registerLanguage("sqf",n(1254)),r.registerLanguage("sql_more",n(1255)),r.registerLanguage("sql",n(1256)),r.registerLanguage("stan",n(1257)),r.registerLanguage("stata",n(1258)),r.registerLanguage("step21",n(1259)),r.registerLanguage("stylus",n(1260)),r.registerLanguage("subunit",n(1261)),r.registerLanguage("swift",n(1262)),r.registerLanguage("taggerscript",n(1263)),r.registerLanguage("yaml",n(1264)),r.registerLanguage("tap",n(1265)),r.registerLanguage("tcl",n(1266)),r.registerLanguage("thrift",n(1267)),r.registerLanguage("tp",n(1268)),r.registerLanguage("twig",n(1269)),r.registerLanguage("typescript",n(1270)),r.registerLanguage("vala",n(1271)),r.registerLanguage("vbnet",n(1272)),r.registerLanguage("vbscript",n(1273)),r.registerLanguage("vbscript-html",n(1274)),r.registerLanguage("verilog",n(1275)),r.registerLanguage("vhdl",n(1276)),r.registerLanguage("vim",n(1277)),r.registerLanguage("x86asm",n(1278)),r.registerLanguage("xl",n(1279)),r.registerLanguage("xquery",n(1280)),r.registerLanguage("zephir",n(1281)),e.exports=r},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(149),o=n(82),i=n(230);function a(){const e=new i.a(o.a.get()).getPushRuleById(".m.rule.master");return e?e.enabled&&!e.actions.includes("notify"):(console.warn("No master push rule! Notifications are disabled for this user."),!0)}function s(){let e=n(235);return e.default&&(e=e.default),e}class c extends r.a{getValueOverride(e,t,n,r){return!!s().isPossible()&&(null===n||"default"===r?!a():n)}onChange(e,t,n){s().supportsDesktopNotifications()&&s().setEnabled(n)}}class l extends r.a{getValueOverride(e,t,n){return!!s().isPossible()&&(null===n?!a():n)}}},function(e,t,n){var r=n(432),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}}},function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},function(e,t){var n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(r,"g"),t.NUMERIC=new RegExp("[0-9]+","g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+n+"$"),i=new RegExp("^[0-9]+$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return i.test(e)},t.testAlphanumeric=function(e){return a.test(e)}},function(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});var t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){var r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){for(var o=n.modules.size,i=n.modules.data,a=t.getScale(o,r),s=Math.floor((o+2*r.margin)*a),c=r.margin*a,l=[r.color.light,r.color.dark],u=0;u<s;u++)for(var d=0;d<s;d++){var h=4*(u*s+d),p=r.color.light;if(u>=c&&d>=c&&u<s-c&&d<s-c)p=l[i[Math.floor((u-c)/a)*o+Math.floor((d-c)/a)]?1:0];e[h++]=p.r,e[h++]=p.g,e[h++]=p.b,e[h]=p.a}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return D}));var r,o,i,a=n(79),s=n.n(a),c=n(92),l=n.n(c),u=n(78),d=n.n(u),h=n(88),p=n.n(h),m=n(108),g=n(80),f=n(89),_=n(83),b=n(103),v=n(198),y=n(164),E=n(630),S=n(159),w=n(81),C=n(421),T=n(422),x=n(82),k=n(877),F=n(631);const O=({mxEvent:e,getTile:t,getReplyThread:n,permalinkCreator:r,onFocusChange:o})=>{const[i,a,s,c]=Object(b.q)(),[h,p,m]=Object(S.e)(a);let _;if(Object(u.useEffect)(()=>{o(i)},[o,i]),i){const o=f.getComponent("context_menus.MessageContextMenu"),i=t&&t(),s=n&&n(),u=a.current.getBoundingClientRect();_=d.a.createElement(o,l()({},Object(b.k)(u),{mxEvent:e,permalinkCreator:r,eventTileOps:i&&i.getEventTileOps?i.getEventTileOps():void 0,collapseReplyThread:s&&s.canCollapse()?s.collapse:void 0,onFinished:c}))}return d.a.createElement(d.a.Fragment,null,d.a.createElement(b.d,{className:"mx_MessageActionBar_maskButton mx_MessageActionBar_optionsButton",title:Object(g.a)("Options"),onClick:s,isExpanded:i,inputRef:m,onFocus:h,tabIndex:p?0:-1}),_)},R=({mxEvent:e,reactions:t,onFocusChange:n})=>{const[r,o,i,a]=Object(b.q)(),[s,c,h]=Object(S.e)(o);let p;if(Object(u.useEffect)(()=>{n(r)},[n,r]),r){const n=o.current.getBoundingClientRect(),r=f.getComponent("emojipicker.ReactionPicker");p=d.a.createElement(b.b,l()({},Object(b.k)(n),{onFinished:a,managed:!1}),d.a.createElement(r,{mxEvent:e,reactions:t,onFinished:a}))}return d.a.createElement(d.a.Fragment,null,d.a.createElement(b.d,{className:"mx_MessageActionBar_maskButton mx_MessageActionBar_reactButton",title:Object(g.a)("React"),onClick:i,isExpanded:r,inputRef:h,onFocus:s,tabIndex:c?0:-1}),p)};let D=Object(w.a)("views.messages.MessageActionBar")((i=o=class extends d.a.PureComponent{constructor(...e){super(...e),s()(this,"onDecrypted",()=>{this.forceUpdate()}),s()(this,"onBeforeRedaction",()=>{this.forceUpdate()}),s()(this,"onSent",()=>{this.forceUpdate()}),s()(this,"onFocusChange",e=>{this.props.onFocusChange&&this.props.onFocusChange(e)}),s()(this,"onReplyClick",e=>{_.a.dispatch({action:"reply_to_event",event:this.props.mxEvent})}),s()(this,"onEditClick",e=>{_.a.dispatch({action:"edit_event",event:this.props.mxEvent})}),s()(this,"onResendClick",e=>{this.runActionOnFailedEv(e=>T.a.resend(e))}),s()(this,"onCancelClick",e=>{this.runActionOnFailedEv(e=>T.a.removeFromQueue(e),e=>Object(C.a)(e.status))})}componentDidMount(){this.props.mxEvent.status&&this.props.mxEvent.status!==m.a.SENT&&this.props.mxEvent.on("Event.status",this.onSent);x.a.get().decryptEventIfNeeded(this.props.mxEvent),this.props.mxEvent.isBeingDecrypted()&&this.props.mxEvent.once("Event.decrypted",this.onDecrypted),this.props.mxEvent.on("Event.beforeRedaction",this.onBeforeRedaction)}componentWillUnmount(){this.props.mxEvent.off("Event.status",this.onSent),this.props.mxEvent.off("Event.decrypted",this.onDecrypted),this.props.mxEvent.off("Event.beforeRedaction",this.onBeforeRedaction)}runActionOnFailedEv(e,t){t||(t=()=>!0);const n=this.props.mxEvent,r=n.replacingEvent(),o=[n.localRedactionEvent(),r,n];for(const n of o)if(n&&t(n)){e(n);break}}render(){const e=[];Object(v.a)(this.props.mxEvent)&&e.push(d.a.createElement(S.b,{className:"mx_MessageActionBar_maskButton mx_MessageActionBar_editButton",title:Object(g.a)("Edit"),onClick:this.onEditClick,key:"edit"}));const t=d.a.createElement(S.b,{className:"mx_MessageActionBar_maskButton mx_MessageActionBar_cancelButton",title:Object(g.a)("Delete"),onClick:this.onCancelClick,key:"cancel"}),n=this.props.mxEvent,r=n.replacingEvent()&&n.replacingEvent().status,o=n.localRedactionEvent()&&n.localRedactionEvent().status,i=Object(C.a)(n.status)||Object(C.a)(r)||Object(C.a)(o),a=[n.status,r,o].includes("not_sent");return i&&a?(e.splice(0,0,d.a.createElement(S.b,{className:"mx_MessageActionBar_maskButton mx_MessageActionBar_resendButton",title:Object(g.a)("Retry"),onClick:this.onResendClick,key:"resend"})),e.push(t)):(Object(v.d)(this.props.mxEvent)&&(this.context.canReply&&e.splice(0,0,d.a.createElement(S.b,{className:"mx_MessageActionBar_maskButton mx_MessageActionBar_replyButton",title:Object(g.a)("Reply"),onClick:this.onReplyClick,key:"reply"})),this.context.canReact&&e.splice(0,0,d.a.createElement(R,{mxEvent:this.props.mxEvent,reactions:this.props.reactions,onFocusChange:this.onFocusChange,key:"react"})),k.a.isEligible(this.props.mxEvent)&&e.splice(0,0,d.a.createElement(F.a,{mxEvent:this.props.mxEvent,mediaEventHelperGet:()=>{var e,t,n,r;return null===(e=(t=this.props).getTile)||void 0===e||null===(n=(r=e.call(t)).getMediaHelper)||void 0===n?void 0:n.call(r)},key:"download"}))),i&&e.push(t),e.push(d.a.createElement(O,{mxEvent:this.props.mxEvent,getReplyThread:this.props.getReplyThread,getTile:this.props.getTile,permalinkCreator:this.props.permalinkCreator,onFocusChange:this.onFocusChange,key:"menu"}))),d.a.createElement(E.a,{className:"mx_MessageActionBar","aria-label":Object(g.a)("Message Actions"),"aria-live":"off"},e)}},s()(o,"propTypes",{mxEvent:p.a.object.isRequired,reactions:p.a.object,permalinkCreator:p.a.object,getTile:p.a.func,getReplyThread:p.a.func,onFocusChange:p.a.func}),s()(o,"contextType",y.a),r=i))||r},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(159),u=n(104);const d=["children"];t.a=e=>{let{children:t}=e,n=a()(e,d);return c.a.createElement(l.c,{handleHomeEnd:!0,onKeyDown:(e,t)=>{const n=e.target;if("INPUT"===n.tagName)return;let r=!0;switch(e.key){case u.a.ARROW_UP:case u.a.ARROW_DOWN:n.hasAttribute("aria-haspopup")&&n.click();break;case u.a.ARROW_LEFT:case u.a.ARROW_RIGHT:if(t.refs.length>0){const n=t.refs.findIndex(e=>e===t.activeRef),r=e.key===u.a.ARROW_RIGHT?1:-1;t.refs.slice((n+r)%t.refs.length)[0].current.focus()}break;default:r=!1}r&&(e.preventDefault(),e.stopPropagation())}},({onKeyDownHandler:e})=>c.a.createElement("div",o()({},n,{onKeyDown:e,role:"toolbar"}),t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(159),l=n(97),u=n(86),d=n.n(u),h=n(80),p=n(81),m=n(613);let g=Object(p.a)("views.messages.DownloadActionButton")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"downloader",new m.a),i()(this,"onDownloadClick",async()=>{if(this.state.loading)return;if(this.setState({loading:!0}),this.state.blob)return this.doDownload();const e=await this.props.mediaEventHelperGet().sourceBlob.value;this.setState({blob:e}),await this.doDownload()}),this.state={loading:!1}}async doDownload(){await this.downloader.download({blob:this.state.blob,name:this.props.mediaEventHelperGet().fileName}),this.setState({loading:!1})}render(){let e;this.state.loading&&(e=s.a.createElement(l.a,{w:18,h:18}));const t=d()({mx_MessageActionBar_maskButton:!0,mx_MessageActionBar_downloadButton:!0,mx_MessageActionBar_downloadSpinnerButton:!!e});return s.a.createElement(c.b,{className:t,title:e?Object(h.a)("Decrypting"):Object(h.a)("Download"),onClick:this.onDownloadClick,disabled:!!e},e)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r,o,i,a=n(79),s=n.n(a),c=n(92),l=n.n(c),u=n(78),d=n.n(u),h=n(86),p=n.n(h),m=n(93),g=n(80),f=n(198),_=n(81),b=n(261),v=n(103),y=n(633),E=n(640),S=n(94);const w=({mxEvent:e,reactions:t})=>{const[n,r,o,i]=Object(v.q)();let a;if(n){const n=r.current.getBoundingClientRect();a=d.a.createElement(v.b,l()({},Object(v.k)(n),{onFinished:i,managed:!1}),d.a.createElement(y.a,{mxEvent:e,reactions:t,onFinished:i}))}return d.a.createElement(d.a.Fragment,null,d.a.createElement(b.a,{className:p()("mx_ReactionsRow_addReactionButton",{mx_ReactionsRow_addReactionButton_active:n}),title:Object(g.a)("Add reaction"),onClick:o,onContextMenu:e=>{e.preventDefault(),o()},isExpanded:n,inputRef:r}),a)};let C=Object(_.a)("views.messages.ReactionsRow")((i=o=class extends d.a.PureComponent{constructor(e,t){super(e,t),s()(this,"onDecrypted",()=>{this.forceUpdate()}),s()(this,"onReactionsChange",()=>{this.setState({myReactions:this.getMyReactions()}),this.forceUpdate()}),s()(this,"onShowAllClick",()=>{this.setState({showAll:!0})}),this.state={myReactions:this.getMyReactions(),showAll:!1}}componentDidMount(){const{mxEvent:e,reactions:t}=this.props;(e.isBeingDecrypted()||e.shouldAttemptDecryption())&&e.once("Event.decrypted",this.onDecrypted),t&&(t.on("Relations.add",this.onReactionsChange),t.on("Relations.remove",this.onReactionsChange),t.on("Relations.redaction",this.onReactionsChange))}componentWillUnmount(){const{mxEvent:e,reactions:t}=this.props;e.off("Event.decrypted",this.onDecrypted),t&&(t.off("Relations.add",this.onReactionsChange),t.off("Relations.remove",this.onReactionsChange),t.off("Relations.redaction",this.onReactionsChange))}componentDidUpdate(e){e.reactions!==this.props.reactions&&(this.props.reactions.on("Relations.add",this.onReactionsChange),this.props.reactions.on("Relations.remove",this.onReactionsChange),this.props.reactions.on("Relations.redaction",this.onReactionsChange),this.onReactionsChange())}getMyReactions(){const e=this.props.reactions;if(!e)return null;const t=this.context.getUserId(),n=e.getAnnotationsBySender()[t];return n?[...n.values()]:null}render(){const{mxEvent:e,reactions:t}=this.props,{myReactions:n,showAll:r}=this.state;if(!t||!Object(f.d)(e))return null;let o,i=t.getSortedAnnotationsByKey().map(([t,r])=>{const o=r.size;if(!o)return null;const i=n&&n.find(e=>!e.isRedacted()&&e.getRelation().key===t);return d.a.createElement(E.a,{key:t,content:t,count:o,mxEvent:e,reactionEvents:r,myReactionEvent:i})}).filter(e=>!!e);if(!i.length)return null;i.length>9&&!r&&(i=i.slice(0,8),o=d.a.createElement("a",{className:"mx_ReactionsRow_showAll",href:"#",onClick:this.onShowAllClick},Object(g.a)("Show all")));const a=this.context;let s;const c=a.getRoom(e.getRoomId());return"join"===c.getMyMembership()&&c.currentState.maySendEvent(m.a.Reaction,a.getUserId())&&(s=d.a.createElement(w,{mxEvent:e,reactions:t})),d.a.createElement("div",{className:"mx_ReactionsRow",role:"toolbar","aria-label":Object(g.a)("Reactions")},i,o,s)}},s()(o,"contextType",S.a),r=i))||r},function(e,t,n){"use strict";var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(368),l=n(82),u=n(83),d=n(81),h=n(91);let p=Object(d.a)("views.emojipicker.ReactionPicker")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onReactionsChange",()=>{this.setState({selectedEmojis:new Set(Object.keys(this.getReactions()))})}),i()(this,"onChoose",e=>{this.componentWillUnmount(),this.props.onFinished();const t=this.getReactions();return t.hasOwnProperty(e)?(l.a.get().redactEvent(this.props.mxEvent.getRoomId(),t[e]),u.a.dispatch({action:h.a.FocusAComposer}),!1):(l.a.get().sendEvent(this.props.mxEvent.getRoomId(),"m.reaction",{"m.relates_to":{rel_type:"m.annotation",event_id:this.props.mxEvent.getId(),key:e}}),u.a.dispatch({action:"message_sent"}),u.a.dispatch({action:h.a.FocusAComposer}),!0)}),this.state={selectedEmojis:new Set(Object.keys(this.getReactions()))},this.addListeners()}componentDidUpdate(e){e.reactions!==this.props.reactions&&(this.addListeners(),this.onReactionsChange())}addListeners(){this.props.reactions&&(this.props.reactions.on("Relations.add",this.onReactionsChange),this.props.reactions.on("Relations.remove",this.onReactionsChange),this.props.reactions.on("Relations.redaction",this.onReactionsChange))}componentWillUnmount(){this.props.reactions&&(this.props.reactions.removeListener("Relations.add",this.onReactionsChange),this.props.reactions.removeListener("Relations.remove",this.onReactionsChange),this.props.reactions.removeListener("Relations.redaction",this.onReactionsChange))}getReactions(){if(!this.props.reactions)return{};const e=l.a.get().getUserId(),t=this.props.reactions.getAnnotationsBySender()[e]||[];return Object.fromEntries([...t].filter(e=>!e.isRedacted()).map(e=>[e.getRelation().key,e.getId()]))}render(){return s.a.createElement(c.d,{onChoose:this.onChoose,selectedEmojis:this.state.selectedEmojis,showQuickReactions:!0})}})||r;t.a=p},function(e,t,n){"use strict";var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(86),l=n.n(c),u=n(80),d=n(104),h=n(81);let p=Object(h.a)("views.emojipicker.Header")(r=class extends s.a.PureComponent{constructor(...e){super(...e),i()(this,"onKeyDown",e=>{let t=!0;switch(e.key){case d.a.ARROW_LEFT:this.changeCategoryRelative(-1);break;case d.a.ARROW_RIGHT:this.changeCategoryRelative(1);break;case d.a.HOME:this.changeCategoryAbsolute(0);break;case d.a.END:this.changeCategoryAbsolute(this.props.categories.length-1,-1);break;default:t=!1}t&&(e.preventDefault(),e.stopPropagation())})}findNearestEnabled(e,t){e+=this.props.categories.length;const n=[...this.props.categories,...this.props.categories,...this.props.categories];for(;e<n.length&&e>=0;){if(n[e].enabled)return e%this.props.categories.length;e+=t>0?1:-1}}changeCategoryRelative(e){const t=this.props.categories.findIndex(e=>e.visible);this.changeCategoryAbsolute(t+e,e)}changeCategoryAbsolute(e,t=1){const n=this.props.categories[this.findNearestEnabled(e,t)];n&&(this.props.onAnchorClick(n.id),n.ref.current.focus())}render(){return s.a.createElement("nav",{className:"mx_EmojiPicker_header",role:"tablist","aria-label":Object(u.a)("Categories"),onKeyDown:this.onKeyDown},this.props.categories.map(e=>{const t=l()("mx_EmojiPicker_anchor mx_EmojiPicker_anchor_"+e.id,{mx_EmojiPicker_anchor_visible:e.visible});return s.a.createElement("button",{disabled:!e.enabled,key:e.id,ref:e.ref,className:t,onClick:()=>this.props.onAnchorClick(e.id),title:e.name,role:"tab",tabIndex:e.visible?0:-1,"aria-selected":e.visible,"aria-controls":"mx_EmojiPicker_category_"+e.id})}))}})||r;t.a=p},function(e,t,n){"use strict";var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(104),u=n(81);let d=Object(u.a)("views.emojipicker.Search")(r=class extends s.a.PureComponent{constructor(...e){super(...e),i()(this,"inputRef",s.a.createRef()),i()(this,"onKeyDown",e=>{e.key===l.a.ENTER&&(this.props.onEnter(),e.stopPropagation(),e.preventDefault())})}componentDidMount(){setTimeout(()=>this.inputRef.current.focus(),0)}render(){let e;return e=this.props.query?s.a.createElement("button",{onClick:()=>this.props.onChange(""),className:"mx_EmojiPicker_search_icon mx_EmojiPicker_search_clear",title:Object(c.a)("Cancel search")}):s.a.createElement("span",{className:"mx_EmojiPicker_search_icon"}),s.a.createElement("div",{className:"mx_EmojiPicker_search"},s.a.createElement("input",{autoFocus:!0,type:"text",placeholder:"Search",value:this.props.query,onChange:e=>this.props.onChange(e.target.value),onKeyDown:this.onKeyDown,ref:this.inputRef}),e)}})||r;t.a=d},function(e,t,n){"use strict";var r,o=n(78),i=n.n(o),a=n(81);let s=Object(a.a)("views.emojipicker.Preview")(r=class extends i.a.PureComponent{render(){const{unicode:e,annotation:t,shortcodes:[n]}=this.props.emoji;return i.a.createElement("div",{className:"mx_EmojiPicker_footer mx_EmojiPicker_preview"},i.a.createElement("div",{className:"mx_EmojiPicker_preview_emoji"},e),i.a.createElement("div",{className:"mx_EmojiPicker_preview_text"},i.a.createElement("div",{className:"mx_EmojiPicker_name mx_EmojiPicker_preview_name"},t),i.a.createElement("div",{className:"mx_EmojiPicker_shortcode"},n)))}})||r;t.a=s},function(e,t,n){"use strict";var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(274),u=n(436),d=n(81);const h=["👍","👎","😄","🎉","😕","❤️","🚀","👀"].map(e=>{const t=Object(l.d)(e);if(!t)throw new Error(`Emoji ${e} doesn't exist in emojibase`);return t});let p=Object(d.a)("views.emojipicker.QuickReactions")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onMouseEnter",e=>{this.setState({hover:e})}),i()(this,"onMouseLeave",()=>{this.setState({hover:null})}),this.state={hover:null}}render(){return s.a.createElement("section",{className:"mx_EmojiPicker_footer mx_EmojiPicker_quick mx_EmojiPicker_category"},s.a.createElement("h2",{className:"mx_EmojiPicker_quick_header mx_EmojiPicker_category_label"},this.state.hover?s.a.createElement(s.a.Fragment,null,s.a.createElement("span",{className:"mx_EmojiPicker_name"},this.state.hover.annotation),s.a.createElement("span",{className:"mx_EmojiPicker_shortcode"},this.state.hover.shortcodes[0])):Object(c.a)("Quick Reactions")),s.a.createElement("ul",{className:"mx_EmojiPicker_list","aria-label":Object(c.a)("Quick Reactions")},h.map(e=>s.a.createElement(u.a,{key:e.hexcode,emoji:e,onClick:this.props.onClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,selectedEmojis:this.props.selectedEmojis}))))}})||r;t.a=p},function(e,t,n){"use strict";var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(368),l=n(639),u=n(436),d=n(81);let h=Object(d.a)("views.emojipicker.Category")(r=class extends s.a.PureComponent{constructor(...e){super(...e),i()(this,"renderEmojiRow",e=>{const{onClick:t,onMouseEnter:n,onMouseLeave:r,selectedEmojis:o,emojis:i}=this.props,a=i.slice(8*e,8*(e+1));return s.a.createElement("div",{key:e},a.map(e=>s.a.createElement(u.a,{key:e.hexcode,emoji:e,selectedEmojis:o,onClick:t,onMouseEnter:n,onMouseLeave:r})))})}render(){const{emojis:e,name:t,heightBefore:n,viewportHeight:r,scrollTop:o}=this.props;if(!e||0===e.length)return null;const i=new Array(Math.ceil(e.length/c.b));for(let e=0;e<i.length;++e)i[e]=e;const a=o,u=a+r,d=n+c.a,h=d+i.length*c.c,p=Math.max(a,d),m=Math.min(u,h),g=Math.max(0,m-p),f=Math.max(0,o-d);return s.a.createElement("section",{id:"mx_EmojiPicker_category_"+this.props.id,className:"mx_EmojiPicker_category","data-category-id":this.props.id,role:"tabpanel","aria-label":t},s.a.createElement("h2",{className:"mx_EmojiPicker_category_label"},t),s.a.createElement(l.a,{element:"ul",className:"mx_EmojiPicker_list",itemHeight:c.c,items:i,scrollTop:f,height:g,overflowItems:3,overflowMargin:0,renderItem:this.renderEmojiRow}))}})||r;t.a=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,o=n(78),i=n.n(o),a=n(88),s=n.n(a),c=n(81);class l{constructor(e,t,n){this.topCount=e,this.renderCount=t,this.bottomCount=n}contains(e){return!(!e.renderCount&&this.renderCount)&&(e.topCount>=this.topCount&&e.topCount+e.renderCount<=this.topCount+this.renderCount)}expand(e){if(0===this.renderCount)return this;const t=Math.min(e,this.topCount),n=Math.min(e,this.bottomCount);return new l(this.topCount-t,this.renderCount+t+n,this.bottomCount-n)}totalSize(){return this.topCount+this.renderCount+this.bottomCount}}let u=Object(c.a)("views.elements.LazyRenderList")(r=class e extends i.a.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromProps(t,n){const r=e.getVisibleRangeFromProps(t),o=r.expand(t.overflowMargin),i=r.expand(t.overflowItems);return!(!!n.renderRange&&i.totalSize()!==n.renderRange.totalSize())&&n.renderRange&&n.renderRange.contains(o)?null:{renderRange:i}}static getVisibleRangeFromProps(e){const{items:t,itemHeight:n,scrollTop:r,height:o}=e,i=t?t.length:0,a=Math.min(Math.max(0,Math.floor(r/n)),i),s=i-a,c=0!==o?Math.ceil(o/n):0,u=Math.min(c,s);return new l(a,u,s-u)}render(){const{itemHeight:e,items:t,renderItem:n}=this.props,{renderRange:r}=this.state,{topCount:o,renderCount:a,bottomCount:s}=r,c=o*e,l=s*e,u=(t||[]).slice(o,o+a),d=this.props.element||"div",h={style:{paddingTop:c+"px",paddingBottom:l+"px"},className:this.props.className};return i.a.createElement(d,h,u.map(n))}})||r;u.defaultProps={overflowItems:20,overflowMargin:5},u.propTypes={itemHeight:s.a.number.isRequired,renderItem:s.a.func.isRequired,scrollTop:s.a.number.isRequired,height:s.a.number.isRequired,items:s.a.array,overflowMargin:s.a.number,overflowItems:s.a.number}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(80),p=n(145),m=n(83),g=n(81),f=n(641),_=n(85),b=n(94);let v=Object(g.a)("views.messages.ReactionsRowButton")((i=o=class extends l.a.PureComponent{constructor(...e){super(...e),s()(this,"state",{tooltipRendered:!1,tooltipVisible:!1}),s()(this,"onClick",()=>{const{mxEvent:e,myReactionEvent:t,content:n}=this.props;t?this.context.redactEvent(e.getRoomId(),t.getId()):(this.context.sendEvent(e.getRoomId(),"m.reaction",{"m.relates_to":{rel_type:"m.annotation",event_id:e.getId(),key:n}}),m.a.dispatch({action:"message_sent"}))}),s()(this,"onMouseOver",()=>{this.setState({tooltipRendered:!0,tooltipVisible:!0})}),s()(this,"onMouseLeave",()=>{this.setState({tooltipVisible:!1})})}render(){const{mxEvent:e,content:t,count:n,reactionEvents:r,myReactionEvent:o}=this.props,i=d()({mx_ReactionsRowButton:!0,mx_ReactionsRowButton_selected:!!o});let a;this.state.tooltipRendered&&(a=l.a.createElement(f.a,{mxEvent:this.props.mxEvent,content:t,reactionEvents:r,visible:this.state.tooltipVisible}));const s=this.context.getRoom(e.getRoomId());let c;if(s){const e=[];for(const t of r){const n=s.getMember(t.getSender()),r=n?n.name:t.getSender();e.push(r)}c=Object(h.a)("<reactors/><reactedWith> reacted with %(content)s</reactedWith>",{content:t},{reactors:()=>Object(p.b)(e,6),reactedWith:e=>t?e:null})}const u="join"!==s.getMyMembership();return l.a.createElement(_.a,{className:i,"aria-label":c,onClick:this.onClick,disabled:u,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},l.a.createElement("span",{className:"mx_ReactionsRowButton_content","aria-hidden":"true"},t),l.a.createElement("span",{className:"mx_ReactionsRowButton_count","aria-hidden":"true"},n),a)}},s()(o,"contextType",b.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(131),d=n(80),h=n(145),p=n(81),m=n(154),g=n(94);let f=Object(p.a)("views.messages.ReactionsRowButtonTooltip")((i=o=class extends l.a.PureComponent{render(){const{content:e,reactionEvents:t,mxEvent:n,visible:r}=this.props,o=this.context.getRoom(n.getRoomId());let i,a;if(o){const n=[];for(const e of t){const t=o.getMember(e.getSender()),r=t?t.name:e.getSender();n.push(r)}const r=Object(u.i)(e);i=l.a.createElement("div",null,Object(d.a)("<reactors/><reactedWith>reacted with %(shortName)s</reactedWith>",{shortName:r},{reactors:()=>l.a.createElement("div",{className:"mx_Tooltip_title"},Object(h.b)(n,6)),reactedWith:e=>r?l.a.createElement("div",{className:"mx_Tooltip_sub"},e):null}))}return i&&(a=l.a.createElement(m.b,{visible:r,label:i})),a}},s()(o,"contextType",g.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(270),a=n(3),s=n(2),c=n(107);class l extends a.EventEmitter{constructor(){super(),o()(this,"_search",""),o()(this,"callUpdate",Object(c.throttle)(()=>{this.emit(i.a)},200,{trailing:!0,leading:!0}))}get kind(){return i.b.Runtime}get search(){return this._search}set search(e){this._search=e,this.callUpdate()}isVisible(e){const t=this.search.toLowerCase();if("#"===this.search[0]){if(e.getCanonicalAlias()&&e.getCanonicalAlias().toLowerCase().startsWith(t))return!0;if(e.getAltAliases().some(e=>e.toLowerCase().startsWith(t)))return!0}return!!e.name&&this.matches(e.normalizedName)}matches(e){return e.includes(Object(s.z)(this.search))}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return B}));var r,o=n(92),i=n.n(o),a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(159),p=n(85),m=n(83),g=n(104),f=n(644),_=n(80),b=n(103),v=n(141),y=n(1425),E=n(255),S=n(316),w=n(82),C=n(175),T=n(156),x=n(1312),k=n(167),F=n(217),O=n(106),R=n(1313),D=n(646),I=n(647),A=n(163),N=n(176),M=n(81),P=n(441),L=n(218);const j=e=>"mx_RoomTile_messagePreview_"+e,U=e=>({left:e.left+window.pageXOffset-9,top:e.bottom+window.pageYOffset+17,chevronFace:b.a.None});let B=Object(M.a)("views.rooms.RoomTile")(r=class extends l.a.PureComponent{constructor(t){super(t),s()(this,"dispatcherRef",void 0),s()(this,"roomTileRef",Object(c.createRef)()),s()(this,"notificationState",void 0),s()(this,"roomProps",void 0),s()(this,"onRoomNameUpdate",e=>{this.forceUpdate()}),s()(this,"onNotificationUpdate",()=>{this.forceUpdate()}),s()(this,"onLocalEchoUpdated",(e,t)=>{(null==t?void 0:t.roomId)===this.props.room.roomId&&this.setState({hasUnsentEvents:this.countUnsentEvents()>0})}),s()(this,"onRoomPropertyUpdate",e=>{e===D.a.NotificationVolume&&this.onNotificationUpdate()}),s()(this,"onAction",t=>{"view_room"===t.action&&t.room_id===this.props.room.roomId&&t.show_room_tile&&e(()=>{this.scrollIntoView()})}),s()(this,"onCommunityUpdate",e=>{e===this.props.room.roomId&&this.forceUpdate()}),s()(this,"onRoomPreviewChanged",e=>{this.props.room&&e.roomId===this.props.room.roomId&&this.generatePreview()}),s()(this,"scrollIntoView",()=>{this.roomTileRef.current&&this.roomTileRef.current.scrollIntoView({block:"nearest",behavior:"auto"})}),s()(this,"onTileClick",e=>{e.preventDefault(),e.stopPropagation(),m.a.dispatch({action:"view_room",show_room_tile:!0,room_id:this.props.room.roomId,clear_search:e&&(e.key===g.a.ENTER||e.key===g.a.SPACE)})}),s()(this,"onActiveRoomUpdate",e=>{this.setState({selected:e})}),s()(this,"onNotificationsMenuOpenClick",e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this.setState({notificationsMenuPosition:t.getBoundingClientRect()})}),s()(this,"onCloseNotificationsMenu",()=>{this.setState({notificationsMenuPosition:null})}),s()(this,"onGeneralMenuOpenClick",e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this.setState({generalMenuPosition:t.getBoundingClientRect()})}),s()(this,"onContextMenu",e=>{this.showContextMenu&&(e.preventDefault(),e.stopPropagation(),this.setState({generalMenuPosition:{left:e.clientX,bottom:e.clientY}}))}),s()(this,"onCloseGeneralMenu",()=>{this.setState({generalMenuPosition:null})}),s()(this,"onTagRoom",(e,t)=>{if(e.preventDefault(),e.stopPropagation(),t===v.a.Favourite||t===v.a.LowPriority){const e=t===v.a.Favourite?v.a.LowPriority:v.a.Favourite,n=T.b.instance.getTagsForRoom(this.props.room).includes(t),r=n?t:e,o=n?null:t;m.a.dispatch(x.a.tagRoom(w.a.get(),this.props.room,r,o,void 0,0))}else console.warn(`Unexpected tag ${t} applied to ${this.props.room.roomId}`);e.key===g.a.ENTER&&this.setState({generalMenuPosition:null})}),s()(this,"onLeaveRoomClick",e=>{e.preventDefault(),e.stopPropagation(),m.a.dispatch({action:"leave_room",room_id:this.props.room.roomId}),this.setState({generalMenuPosition:null})}),s()(this,"onForgetRoomClick",e=>{e.preventDefault(),e.stopPropagation(),m.a.dispatch({action:"forget_room",room_id:this.props.room.roomId}),this.setState({generalMenuPosition:null})}),s()(this,"onOpenRoomSettings",e=>{e.preventDefault(),e.stopPropagation(),m.a.dispatch({action:"open_room_settings",room_id:this.props.room.roomId}),this.setState({generalMenuPosition:null})}),s()(this,"onCopyRoomClick",e=>{e.preventDefault(),e.stopPropagation(),m.a.dispatch({action:"copy_room",room_id:this.props.room.roomId}),this.setState({generalMenuPosition:null})}),s()(this,"onInviteClick",e=>{e.preventDefault(),e.stopPropagation(),m.a.dispatch({action:"view_invite",roomId:this.props.room.roomId}),this.setState({generalMenuPosition:null})}),s()(this,"onClickAllNotifs",e=>this.saveNotifState(e,S.a)),s()(this,"onClickAlertMe",e=>this.saveNotifState(e,S.b)),s()(this,"onClickMentions",e=>this.saveNotifState(e,S.c)),s()(this,"onClickMute",e=>this.saveNotifState(e,S.d)),this.state={selected:f.a.activeRoomId===this.props.room.roomId,notificationsMenuPosition:null,generalMenuPosition:null,hasUnsentEvents:this.countUnsentEvents()>0,messagePreview:""},this.generatePreview(),this.notificationState=k.a.instance.getRoomState(this.props.room),this.roomProps=R.a.forRoom(this.props.room)}countUnsentEvents(){return Object(P.b)(this.props.room).length}get showContextMenu(){return this.props.tag!==v.a.Invite}get showMessagePreview(){return!this.props.isMinimized&&this.props.showMessagePreview}componentDidUpdate(e,t){var n,r;const o=e.showMessagePreview!==this.props.showMessagePreview,i=e.isMinimized!==this.props.isMinimized;var a,s,c,l;((o||i)&&this.generatePreview(),(null===(n=e.room)||void 0===n?void 0:n.roomId)!==(null===(r=this.props.room)||void 0===r?void 0:r.roomId))&&(y.a.instance.off(y.a.getPreviewChangedEventName(e.room),this.onRoomPreviewChanged),y.a.instance.on(y.a.getPreviewChangedEventName(this.props.room),this.onRoomPreviewChanged),N.a.instance.off(N.a.getUpdateEventName(null===(a=e.room)||void 0===a?void 0:a.roomId),this.onCommunityUpdate),N.a.instance.on(N.a.getUpdateEventName(null===(s=this.props.room)||void 0===s?void 0:s.roomId),this.onCommunityUpdate),null===(c=e.room)||void 0===c||c.off("Room.name",this.onRoomNameUpdate),null===(l=this.props.room)||void 0===l||l.on("Room.name",this.onRoomNameUpdate))}componentDidMount(){this.state.selected&&this.scrollIntoView(),f.a.addListener(this.props.room.roomId,this.onActiveRoomUpdate),this.dispatcherRef=m.a.register(this.onAction),y.a.instance.on(y.a.getPreviewChangedEventName(this.props.room),this.onRoomPreviewChanged),this.notificationState.on(F.a,this.onNotificationUpdate),this.roomProps.on(I.b,this.onRoomPropertyUpdate),this.roomProps.on("Room.name",this.onRoomNameUpdate),N.a.instance.on(N.a.getUpdateEventName(this.props.room.roomId),this.onCommunityUpdate),w.a.get().on("Room.localEchoUpdated",this.onLocalEchoUpdated)}componentWillUnmount(){var e;this.props.room&&(f.a.removeListener(this.props.room.roomId,this.onActiveRoomUpdate),y.a.instance.off(y.a.getPreviewChangedEventName(this.props.room),this.onRoomPreviewChanged),N.a.instance.off(N.a.getUpdateEventName(this.props.room.roomId),this.onCommunityUpdate),this.props.room.off("Room.name",this.onRoomNameUpdate)),f.a.removeListener(this.props.room.roomId,this.onActiveRoomUpdate),m.a.unregister(this.dispatcherRef),this.notificationState.off(F.a,this.onNotificationUpdate),this.roomProps.off(I.b,this.onRoomPropertyUpdate),this.roomProps.off("Room.name",this.onRoomNameUpdate),N.a.instance.off(N.a.getUpdateEventName(this.props.room.roomId),this.onCommunityUpdate),null===(e=w.a.get())||void 0===e||e.removeListener("Room.localEchoUpdated",this.onLocalEchoUpdated)}async generatePreview(){if(!this.showMessagePreview)return null;const e=await y.a.instance.getPreviewForRoom(this.props.room,this.props.tag);this.setState({messagePreview:e})}async saveNotifState(e,t){if(e.preventDefault(),e.stopPropagation(),w.a.get().isGuest())return;this.roomProps.notificationVolume=t;e.key===g.a.ENTER&&this.setState({notificationsMenuPosition:null})}renderNotificationsMenu(e){if(w.a.get().isGuest()||this.props.tag===v.a.Archived||!this.showContextMenu||this.props.isMinimized)return null;const t=this.roomProps.notificationVolume;let n=null;this.state.notificationsMenuPosition&&(n=l.a.createElement(A.e,i()({},U(this.state.notificationsMenuPosition),{onFinished:this.onCloseNotificationsMenu,className:"mx_RoomTile_contextMenu",compact:!0}),l.a.createElement(A.c,{first:!0},l.a.createElement(A.d,{label:Object(_.a)("Use default"),active:t===S.a,iconClassName:"mx_RoomTile_iconBell",onClick:this.onClickAllNotifs}),l.a.createElement(A.d,{label:Object(_.a)("All messages"),active:t===S.b,iconClassName:"mx_RoomTile_iconBellDot",onClick:this.onClickAlertMe}),l.a.createElement(A.d,{label:Object(_.a)("Mentions & Keywords"),active:t===S.c,iconClassName:"mx_RoomTile_iconBellMentions",onClick:this.onClickMentions}),l.a.createElement(A.d,{label:Object(_.a)("None"),active:t===S.d,iconClassName:"mx_RoomTile_iconBellCrossed",onClick:this.onClickMute}))));const r=d()("mx_RoomTile_notificationsButton",{mx_RoomTile_iconBell:t===S.a,mx_RoomTile_iconBellDot:t===S.b,mx_RoomTile_iconBellMentions:t===S.c,mx_RoomTile_iconBellCrossed:t===S.d,mx_RoomTile_notificationsButton_show:t===S.d});return l.a.createElement(l.a.Fragment,null,l.a.createElement(b.d,{className:r,onClick:this.onNotificationsMenuOpenClick,title:Object(_.a)("Notification options"),isExpanded:!!this.state.notificationsMenuPosition,tabIndex:e?0:-1}),n)}renderGeneralMenu(){if(!this.showContextMenu)return null;let e=null;if(this.state.generalMenuPosition&&this.props.tag===v.a.Archived)e=l.a.createElement(A.e,i()({},U(this.state.generalMenuPosition),{onFinished:this.onCloseGeneralMenu,className:"mx_RoomTile_contextMenu",compact:!0}),l.a.createElement(A.c,{red:!0},l.a.createElement(A.b,{iconClassName:"mx_RoomTile_iconSignOut",label:Object(_.a)("Forget Room"),onClick:this.onForgetRoomClick})));else if(this.state.generalMenuPosition){const t=T.b.instance.getTagsForRoom(this.props.room),n=t.includes(v.a.Favourite),r=n?Object(_.a)("Favourited"):Object(_.a)("Favourite"),o=t.includes(v.a.LowPriority),a=Object(_.a)("Low Priority"),s=w.a.get().getUserId(),c=this.props.room.canInvite(s);e=l.a.createElement(A.e,i()({},U(this.state.generalMenuPosition),{onFinished:this.onCloseGeneralMenu,className:"mx_RoomTile_contextMenu",compact:!0}),l.a.createElement(A.c,null,l.a.createElement(A.a,{onClick:e=>this.onTagRoom(e,v.a.Favourite),active:n,label:r,iconClassName:"mx_RoomTile_iconStar"}),l.a.createElement(A.a,{onClick:e=>this.onTagRoom(e,v.a.LowPriority),active:o,label:a,iconClassName:"mx_RoomTile_iconArrowDown"}),c?l.a.createElement(A.b,{onClick:this.onInviteClick,label:Object(_.a)("Invite People"),iconClassName:"mx_RoomTile_iconInvite"}):null,l.a.createElement(A.b,{onClick:this.onCopyRoomClick,label:Object(_.a)("Copy Room Link"),iconClassName:"mx_RoomTile_iconCopyLink"}),l.a.createElement(A.b,{onClick:this.onOpenRoomSettings,label:Object(_.a)("Settings"),iconClassName:"mx_RoomTile_iconSettings"})),l.a.createElement(A.c,{red:!0},l.a.createElement(A.b,{onClick:this.onLeaveRoomClick,label:Object(_.a)("Leave Room"),iconClassName:"mx_RoomTile_iconSignOut"})))}return l.a.createElement(l.a.Fragment,null,l.a.createElement(b.d,{className:"mx_RoomTile_menuButton",onClick:this.onGeneralMenuOpenClick,title:Object(_.a)("Room options"),isExpanded:!!this.state.generalMenuPosition}),e)}render(){const e=d()({mx_RoomTile:!0,mx_RoomTile_selected:this.state.selected,mx_RoomTile_hasMenuOpen:!(!this.state.generalMenuPosition&&!this.state.notificationsMenuPosition),mx_RoomTile_minimized:this.props.isMinimized});let t={displayName:null,avatarMxc:null};this.props.tag===v.a.Invite&&(t=N.a.instance.getInviteProfile(this.props.room.roomId));let n=t.displayName||this.props.room.name;"string"!=typeof n&&(n=""),n=n.replace(":",":");const r=l.a.createElement(E.a,{room:this.props.room,avatarSize:32,displayBadge:this.props.isMinimized,oobData:{avatarUrl:t.avatarMxc}});let o;this.props.isMinimized||(this.state.hasUnsentEvents?o=l.a.createElement("div",{className:"mx_RoomTile_badgeContainer","aria-hidden":"true"},l.a.createElement(C.a,{notification:L.a.RED_EXCLAMATION,forceCount:!1,roomId:this.props.room.roomId})):this.notificationState&&(o=l.a.createElement("div",{className:"mx_RoomTile_badgeContainer","aria-hidden":"true"},l.a.createElement(C.a,{notification:this.notificationState,forceCount:!1,roomId:this.props.room.roomId}))));let a=null;this.showMessagePreview&&this.state.messagePreview&&(a=l.a.createElement("div",{className:"mx_RoomTile_messagePreview",id:j(this.props.room.roomId),title:this.state.messagePreview},this.state.messagePreview));const s=d()({mx_RoomTile_name:!0,mx_RoomTile_nameWithPreview:!!a,mx_RoomTile_nameHasUnreadEvents:this.notificationState.isUnread});let c=l.a.createElement("div",{className:"mx_RoomTile_nameContainer"},l.a.createElement("div",{title:n,className:s,tabIndex:-1,dir:"auto"},n),a);this.props.isMinimized&&(c=null);let u,m=n;this.props.tag===v.a.Invite||(this.notificationState.hasMentions?m+=" "+Object(_.a)("%(count)s unread messages including mentions.",{count:this.notificationState.count}):this.notificationState.hasUnreadCount?m+=" "+Object(_.a)("%(count)s unread messages.",{count:this.notificationState.count}):this.notificationState.isUnread&&(m+=" "+Object(_.a)("Unread messages."))),this.showMessagePreview&&(u=j(this.props.room.roomId));const g={};let f=p.a;return this.props.isMinimized&&(f=O.a,g.title=n,g.forceHide=!!this.state.generalMenuPosition),l.a.createElement(l.a.Fragment,null,l.a.createElement(h.d,{inputRef:this.roomTileRef},({onFocus:t,isActive:n,ref:a})=>l.a.createElement(f,i()({},g,{onFocus:t,tabIndex:n?0:-1,inputRef:a,className:e,onClick:this.onTileClick,onContextMenu:this.onContextMenu,role:"treeitem","aria-label":m,"aria-selected":this.state.selected,"aria-describedby":u}),r,c,o,this.renderGeneralMenu(),this.renderNotificationsMenu(n))))}})||r}).call(this,n(161).setImmediate)},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(126);class a{constructor(){o()(this,"listeners",{}),o()(this,"_activeRoomId",i.a.getRoomId()),o()(this,"roomStoreToken",void 0),o()(this,"onRoomViewStoreUpdate",()=>{this._activeRoomId&&this.emit(this._activeRoomId,!1),this._activeRoomId=i.a.getRoomId(),this._activeRoomId&&this.emit(this._activeRoomId,!0)}),this.roomStoreToken=i.a.addListener(this.onRoomViewStoreUpdate)}get activeRoomId(){return this._activeRoomId}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}removeListener(e,t){if(this.listeners[e]){const n=this.listeners[e].indexOf(t);n>-1&&this.listeners[e].splice(n,1)}else console.warn("Unregistering unrecognised listener (roomId="+e+")")}emit(e,t){if(this.listeners[e])for(const n of this.listeners[e])n.call(null,t)}}void 0===window.mxActiveRoomObserver&&(window.mxActiveRoomObserver=new a),t.a=window.mxActiveRoomObserver},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(79),o=n.n(r),i=n(646),a=n(649),s=n(150),c=n(83),l=n(650),u=n(651),d=n(652);const h=e=>"room-"+e.roomId;class p extends s.a{constructor(){super(c.a),o()(this,"caches",new Map)}static get instance(){return p._instance||(p._instance=new p),p._instance}get contexts(){return Array.from(this.caches.values()).map(e=>e.context)}getOrCreateChamberForRoom(e){if(this.caches.has(h(e)))return this.caches.get(h(e));const t=new a.a(e);t.whenAnything(()=>this.checkContexts());const n=new i.b(t);return n.setClient(this.matrixClient),this.caches.set(h(e),n),n}async checkContexts(){let e=!1;for(const t of this.caches.values())if(e=t.context.state===l.a.PendingErrors,e)break;if(e&&!this.state.toastRef){const e=u.a.instance.addToast(d.a);await this.updateState({toastRef:e})}else!e&&this.state.toastRef&&(u.a.instance.removeToast(this.state.toastRef),await this.updateState({toastRef:null}))}async onReady(){if(this.caches)for(const e of this.caches.values())e.setClient(this.matrixClient)}async onNotReady(){for(const e of this.caches.values())e.setClient(null)}async onAction(e){return Promise.resolve()}}o()(p,"_instance",void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(79),o=n.n(r),i=n(647),a=n(316),s=n(80);let c;!function(e){e[e.NotificationVolume=0]="NotificationVolume"}(c||(c={}));class l extends i.a{constructor(e){super(e,e=>this.properties.get(e)),o()(this,"properties",new Map),o()(this,"onAccountData",e=>{if("m.push_rules"===e.getType()){this.properties.get(c.NotificationVolume)!==Object(a.f)(this.context.room.roomId)&&this.updateNotificationVolume()}})}onClientChanged(e,t){this.properties.clear(),e&&e.removeListener("accountData",this.onAccountData),t&&(t.on("accountData",this.onAccountData),this.updateNotificationVolume())}updateNotificationVolume(){this.properties.set(c.NotificationVolume,Object(a.f)(this.context.room.roomId)),this.markEchoReceived(c.NotificationVolume),this.emit(i.b,c.NotificationVolume)}get notificationVolume(){return this.getValue(c.NotificationVolume)}set notificationVolume(e){this.setValue(Object(s.a)("Change notification settings"),c.NotificationVolume,e,async()=>Object(a.h)(this.context.room.roomId,e),i.c)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(440),a=n(3);async function s(){}const c="property_updated";class l extends a.EventEmitter{constructor(e,t){super(),this.context=e,this.lookupFn=t,o()(this,"cache",new Map),o()(this,"matrixClient",void 0)}setClient(e){const t=this.matrixClient;this.matrixClient=e,this.onClientChanged(t,e)}getValue(e){return this.cache.has(e)?this.cache.get(e).val:this.lookupFn(e)}cacheVal(e,t,n){this.cache.set(e,{txn:n,val:t}),this.emit(c,e)}decacheKey(e){this.cache.has(e)&&(this.context.disownTransaction(this.cache.get(e).txn),this.cache.delete(e),this.emit(c,e))}markEchoReceived(e){if(this.cache.has(e)){const t=this.cache.get(e).txn;this.context.disownTransaction(t),t.cancel()}this.decacheKey(e)}setValue(e,t,n,r,o){this.cache.has(t)&&this.cache.get(t).txn.cancel();const a=this.context.beginTransaction(e,r);this.cacheVal(t,n,a),a.when(i.b.Pending,()=>this.cacheVal(t,n,a)).when(i.b.Error,()=>o()),a.run()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),o=n.n(r),i=n(109);class a{constructor(){o()(this,"listeners",[])}when(e,t){return this.listeners.push({condition:e,fn:t}),this}whenAnyOf(e,t){for(const n of e)this.when(n,t);return this}whenAnything(e){return this.listeners.push({condition:null,fn:e}),this}notifyCondition(e){const t=Object(i.b)(this.listeners);for(const n of t)if(null===n.condition||n.condition===e)try{n.fn(this)}catch(t){console.error(`Error calling whenable listener for ${e}:`,t)}}destroy(){this.listeners=[]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(650);class o extends r.b{constructor(e){super(),this.room=e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(79),o=n.n(r),i=n(440),a=n(109),s=n(648);let c;!function(e){e[e.NotStarted=0]="NotStarted",e[e.PendingErrors=1]="PendingErrors",e[e.AllSuccessful=2]="AllSuccessful"}(c||(c={}));class l extends s.a{constructor(...e){super(...e),o()(this,"_transactions",[]),o()(this,"_state",c.NotStarted),o()(this,"checkTransactions",()=>{let e=c.AllSuccessful;for(const t of this.transactions){if(t.status===i.b.Error||t.didPreviouslyFail){e=c.PendingErrors;break}t.status===i.b.Pending&&(e=c.NotStarted)}this._state=e,this.notifyCondition(e)})}get transactions(){return Object(a.b)(this._transactions)}get state(){return this._state}get firstFailedTime(){const e=this.transactions.find(e=>e.didPreviouslyFail||e.status===i.b.Error);return e?e.startTime:null}disownTransaction(e){const t=this._transactions.indexOf(e);t>=0&&this._transactions.splice(t,1),e.destroy(),this.checkTransactions()}beginTransaction(e,t){const n=new i.a(e,t);return this._transactions.push(n),n.whenAnything(this.checkTransactions),n.when(i.b.Success,()=>n.destroy()),n}destroy(){for(const e of this.transactions)e.destroy();this._transactions=[],super.destroy()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r),i=n(3),a=n.n(i),s=n(115);class c extends a.a{constructor(...e){super(...e),o()(this,"toasts",new Map)}static get instance(){return c._instance||(c._instance=new c),c._instance}get components(){return Array.from(this.toasts.values())}addToast(e){const t=Symbol();return this.toasts.set(t,e),this.emit(s.b),t}removeToast(e){this.toasts.delete(e),this.emit(s.b)}}o()(c,"_instance",void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(85),u=n(87),d=n(653),h=n(81);let p=Object(h.a)("views.toasts.NonUrgentEchoFailureToast")(r=class extends s.a.PureComponent{constructor(...e){super(...e),i()(this,"openDialog",()=>{u.a.createTrackedDialog("Local Echo Server Error","",d.a,{})})}render(){return s.a.createElement("div",{className:"mx_NonUrgentEchoFailureToast"},s.a.createElement("span",{className:"mx_NonUrgentEchoFailureToast_icon"}),Object(c.a)("Your server isn't responding to some <a>requests</a>.",{},{a:e=>s.a.createElement(l.a,{kind:"link",onClick:this.openDialog},e)}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r,o=n(79),i=n.n(o),a=n(78),s=n(95),c=n(80),l=n(645),u=n(148),d=n(84),h=n(649),p=n(119),m=n(440),g=n(97),f=n(85),_=n(115),b=n(82),v=n(81);let y=Object(v.a)("views.dialogs.ServerOfflineDialog")(r=class extends a.PureComponent{constructor(...e){super(...e),i()(this,"onEchosUpdated",()=>{this.forceUpdate()})}componentDidMount(){l.a.instance.on(_.b,this.onEchosUpdated)}componentWillUnmount(){l.a.instance.off(_.b,this.onEchosUpdated)}renderTimeline(){return l.a.instance.contexts.map((e,t)=>{if(!e.firstFailedTime)return null;if(!(e instanceof h.a))throw new Error("Cannot render unknown context: "+e);const n=a.createElement("div",{className:"mx_ServerOfflineDialog_content_context_timeline_header"},a.createElement(p.a,{width:24,height:24,room:e.room}),a.createElement("span",null,e.room.name)),r=e.transactions.filter(e=>e.status===m.b.Error||e.didPreviouslyFail).map((e,t)=>{let n=a.createElement(g.a,{w:19,h:19});return e.status===m.b.Error&&(n=a.createElement(f.a,{kind:"link",onClick:()=>e.run()},Object(c.a)("Resend"))),a.createElement("div",{className:"mx_ServerOfflineDialog_content_context_txn",key:"txn-"+t},a.createElement("span",{className:"mx_ServerOfflineDialog_content_context_txn_desc"},e.auditName),n)});return a.createElement("div",{className:"mx_ServerOfflineDialog_content_context",key:"context-"+t},a.createElement("div",{className:"mx_ServerOfflineDialog_content_context_timestamp"},Object(u.f)(e.firstFailedTime,d.b.getValue("showTwelveHourTimestamps"))),a.createElement("div",{className:"mx_ServerOfflineDialog_content_context_timeline"},n,r))})}render(){let e=this.renderTimeline().filter(e=>!!e);0===e.length&&(e=[a.createElement("div",{key:1},Object(c.a)("You're all caught up."))]);const t=b.a.getHomeserverName();return a.createElement(s.a,{title:Object(c.a)("Server isn't responding"),className:"mx_ServerOfflineDialog",contentId:"mx_Dialog_content",onFinished:this.props.onFinished,hasCancel:!0},a.createElement("div",{className:"mx_ServerOfflineDialog_content"},a.createElement("p",null,Object(c.a)("Your server isn't responding to some of your requests. Below are some of the most likely reasons.")),a.createElement("ul",null,a.createElement("li",null,Object(c.a)("The server (%(serverName)s) took too long to respond.",{serverName:t})),a.createElement("li",null,Object(c.a)("Your firewall or anti-virus is blocking the request.")),a.createElement("li",null,Object(c.a)("A browser extension is preventing the request.")),a.createElement("li",null,Object(c.a)("The server is offline.")),a.createElement("li",null,Object(c.a)("The server has denied your request.")),a.createElement("li",null,Object(c.a)("Your area is experiencing difficulties connecting to the internet.")),a.createElement("li",null,Object(c.a)("A connection error occurred while trying to contact the server.")),a.createElement("li",null,Object(c.a)("The server is not configured to indicate what the problem is (CORS)."))),a.createElement("hr",null),a.createElement("h2",null,Object(c.a)("Recent changes that have not yet been received")),e))}})||r},function(e,t){e.exports="img/feather-customised/warning-triangle.d050a38.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(120),h=n(81),p=n(100);const m=["groupId","groupAvatarUrl","groupName"];var g,f,_;let b=Object(h.a)("views.avatars.GroupAvatar")((_=f=class extends u.a.Component{getGroupAvatarUrl(){return this.props.groupAvatarUrl?Object(p.b)(this.props.groupAvatarUrl).getThumbnailOfSourceHttp(this.props.width,this.props.height,this.props.resizeMethod):null}render(){const e=this.props,{groupId:t,groupAvatarUrl:n,groupName:r}=e,i=a()(e,m);return u.a.createElement(d.a,o()({name:r||this.props.groupId[1],idName:this.props.groupId,url:this.getGroupAvatarUrl()},i))}},c()(f,"defaultProps",{width:36,height:36,resizeMethod:"crop"}),g=_))||g},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(86),c=n.n(s),l=n(159),u=n(175);class d extends a.a.Component{constructor(e){super(e),o()(this,"onTileMouseEnter",()=>{this.setState({hover:!0})}),o()(this,"onTileMouseLeave",()=>{this.setState({hover:!1})}),this.state={hover:!1}}render(){var e;const t=c()({mx_ExtraTile:!0,mx_RoomTile:!0,mx_RoomTile_selected:this.props.isSelected,mx_RoomTile_minimized:this.props.isMinimized});let n;this.props.notificationState&&(n=a.a.createElement(u.a,{notification:this.props.notificationState,forceCount:!1}));let r=this.props.displayName;"string"!=typeof r&&(r=""),r=r.replace(":",":");const o=c()({mx_RoomTile_name:!0,mx_RoomTile_nameHasUnreadEvents:null===(e=this.props.notificationState)||void 0===e?void 0:e.isUnread});let i=a.a.createElement("div",{className:"mx_RoomTile_nameContainer"},a.a.createElement("div",{title:r,className:o,tabIndex:-1,dir:"auto"},r));this.props.isMinimized&&(i=null);let s=l.a;return this.props.isMinimized&&(s=l.b),a.a.createElement(a.a.Fragment,null,a.a.createElement(s,{className:t,onMouseEnter:this.onTileMouseEnter,onMouseLeave:this.onTileMouseLeave,onClick:this.props.onClick,role:"treeitem",title:this.props.isMinimized?r:void 0},a.a.createElement("div",{className:"mx_RoomTile_avatarContainer"},this.props.avatar),i,a.a.createElement("div",{className:"mx_RoomTile_badgeContainer"},n)))}}},function(e,t,n){"use strict";(function(e){var r=n(79),o=n.n(r),i=n(83),a=n(3),s=n.n(a),c=n(107),l=n(84),u=n(156),d=n(167),h=n(141),p=n(129);function m(e,t){const n=Math.min(e.length,t.length);let r;for(let o=0;o<n;++o)if(e.charAt(o)!==t.charAt(o)){r=e.substr(0,o);break}void 0===r&&(r=e.substr(0,n));const o=r.indexOf(" ");return-1!==o&&(r=r.substr(0,o+1)),r.length>=2?r:""}class g extends s.a{constructor(){super(),o()(this,"_onListsUpdated",()=>{const e=this._getUpdatedTags();this._state.tags&&!Object(p.d)(this._state.tags,e)||this._setState({tags:e})}),this._state={tags:{}},this._getUpdatedTags=Object(c.throttle)(this._getUpdatedTags,500,{leading:!0,trailing:!0}),u.b.instance.on(u.a,this._onListsUpdated),i.a.register(e=>this._onDispatch(e))}getTags(){return this._state.tags}_setState(e){this._state=Object.assign(this._state,e),this.emit("change")}addListener(e){return this.on("change",e),{remove:()=>{this.removeListener("change",e)}}}getSortedTags(){const e=Object.keys(this._state.tags).sort(),t=e.map((t,n)=>{const r=0===n,o=n===e.length-1,i=r?"":m(t,e[n-1]),a=o?"":m(t,e[n+1]);return i.length>a.length?i:a});return e.map((e,n)=>{const r=d.a.instance.getListState(e);let o;r.hasUnreadCount&&(o=r);const i=e.substr(t[n].length,1);return{name:e,avatarLetter:i,badgeNotifState:o,selected:this._state.tags[e]}})}_onDispatch(e){switch(e.action){case"select_custom_room_tag":{const t=this._state.tags;if(t.hasOwnProperty(e.tag)){const n={};n[e.tag]=!t[e.tag];const r=Object.assign({},t,n);this._setState({tags:r})}break}case"on_client_not_viable":case"on_logged_out":this._state={tags:{}},u.b.instance.off(u.a,this._onListsUpdated)}}_getUpdatedTags(){if(!l.b.getValue("feature_custom_tags"))return{};const e=Object.keys(u.b.instance.orderedLists).filter(e=>Object(h.d)(e)).sort(),t=this._state&&this._state.tags;return e.reduce((e,n)=>(e[n]=t&&t[n]||!1,e),{})}}void 0===e.singletonCustomRoomTagStore&&(e.singletonCustomRoomTagStore=new g),t.a=e.singletonCustomRoomTagStore}).call(this,n(23))},function(e,t,n){"use strict";var r=n(99),o=n.n(r),i=n(78),a=n.n(i),s=n(80),c=n(95),l=n(83),u=n(442),d=n(234),h=n(659),p=n(660),m=n(84),g=n(113),f=n(444);const _=["action"];let b;!function(e){e.General="SPACE_GENERAL_TAB",e.Visibility="SPACE_VISIBILITY_TAB",e.Advanced="SPACE_ADVANCED_TAB"}(b||(b={}));t.a=({matrixClient:e,space:t,onFinished:n})=>{Object(u.a)(l.a,e=>{let{action:r}=e,i=o()(e,_);"after_leave_room"===r&&i.room_id===t.roomId&&n(!1)});const r=Object(i.useMemo)(()=>[new d.a(b.General,Object(s.b)("General"),"mx_SpaceSettingsDialog_generalIcon",a.a.createElement(h.a,{matrixClient:e,space:t,onFinished:n})),new d.a(b.Visibility,Object(s.b)("Visibility"),"mx_SpaceSettingsDialog_visibilityIcon",a.a.createElement(p.a,{matrixClient:e,space:t})),m.b.getValue(g.a.AdvancedSettings)?new d.a(b.Advanced,Object(s.b)("Advanced"),"mx_RoomSettingsDialog_warningIcon",a.a.createElement(f.a,{roomId:t.roomId,closeSettingsFn:n})):null].filter(Boolean),[e,t,n]);return a.a.createElement(c.a,{title:Object(s.a)("Space settings"),className:"mx_SpaceSettingsDialog",contentId:"mx_SpaceSettingsDialog",onFinished:n,fixedWidth:!1},a.a.createElement("div",{className:"mx_SpaceSettingsDialog_content",id:"mx_SpaceSettingsDialog",title:Object(s.a)("Settings - %(spaceName)s",{spaceName:t.name})},a.a.createElement(d.c,{tabs:r})))}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(93),a=n(80),s=n(85),c=n(443),l=n(196),u=n(333),d=n(221);t.a=({matrixClient:e,space:t,onFinished:n})=>{const[h,p]=Object(r.useState)(!1),[m,g]=Object(r.useState)(""),f=e.getUserId(),[_,b]=Object(r.useState)(null),v=t.currentState.maySendStateEvent(i.a.RoomAvatar,f),y=null!==_,[E,S]=Object(r.useState)(t.name),w=t.currentState.maySendStateEvent(i.a.RoomName,f),C=E!==t.name,T=Object(u.b)(t),[x,k]=Object(r.useState)(T),F=t.currentState.maySendStateEvent(i.a.RoomTopic,f),O=x!==T;return o.a.createElement("div",{className:"mx_SettingsTab"},o.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(a.a)("General")),o.a.createElement("div",null,Object(a.a)("Edit settings relating to your space.")),m&&o.a.createElement("div",{className:"mx_SpaceRoomView_errorText"},m),o.a.createElement("div",{className:"mx_SettingsTab_section"},o.a.createElement(c.b,{avatarUrl:Object(l.b)(t,80,80,"crop"),avatarDisabled:h||!v,setAvatar:b,name:E,nameDisabled:h||!w,setName:S,topic:x,topicDisabled:h||!F,setTopic:k}),o.a.createElement(s.a,{onClick:()=>{b(null),S(t.name),k(T)},disabled:h||!(y||C||O),kind:"link"},Object(a.a)("Cancel")),o.a.createElement(s.a,{onClick:async()=>{p(!0);const n=[];y&&(_?n.push(e.sendStateEvent(t.roomId,i.a.RoomAvatar,{url:await e.uploadContent(_)},"")):n.push(e.sendStateEvent(t.roomId,i.a.RoomAvatar,{},""))),C&&n.push(e.setRoomName(t.roomId,E)),O&&n.push(e.setRoomTopic(t.roomId,x));const r=await Promise.allSettled(n);p(!1);const o=r.filter(e=>"rejected"===e.status);o.length>0&&(console.error("Failed to save space settings: ",o),g(Object(a.a)("Failed to save space settings.")))},disabled:h,kind:"primary"},h?Object(a.a)("Saving..."):Object(a.a)("Save Changes"))),o.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(a.a)("Leave Space")),o.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},o.a.createElement(s.a,{kind:"danger",onClick:()=>{Object(d.a)(t)}},Object(a.a)("Leave Space"))))}},function(e,t,n){"use strict";var r,o=n(78),i=n.n(o),a=n(93),s=n(136),c=n(80),l=n(85),u=n(661),d=n(336),h=n(165),p=n(246);!function(e){e.Unlisted="unlisted",e.Private="private"}(r||(r={}));const m=(e,t,n)=>{const[r,i]=Object(o.useState)(e);return[r,async r=>{i(r);try{await t(r)}catch(t){i(e()),n(t)}}]};t.a=({matrixClient:e,space:t})=>{const[n,g]=Object(o.useState)(""),f=e.getUserId(),[_,b]=m(()=>t.getJoinRule()===s.c.Invite?r.Private:r.Unlisted,n=>e.sendStateEvent(t.roomId,a.a.RoomJoinRules,{join_rule:n===r.Unlisted?s.c.Public:s.c.Invite},""),()=>g(Object(c.a)("Failed to update the visibility of this space"))),[v,y]=m(()=>{var e,n;return(null===(e=t.currentState.getStateEvents(a.a.RoomGuestAccess,""))||void 0===e||null===(n=e.getContent())||void 0===n?void 0:n.guest_access)===s.a.CanJoin},n=>e.sendStateEvent(t.roomId,a.a.RoomGuestAccess,{guest_access:n?s.a.CanJoin:s.a.Forbidden},""),()=>g(Object(c.a)("Failed to update the guest access of this space"))),[E,S]=m(()=>{var e,n;return(null===(e=t.currentState.getStateEvents(a.a.RoomHistoryVisibility,""))||void 0===e||null===(n=e.getContent())||void 0===n?void 0:n.history_visibility)||s.b.Shared},n=>e.sendStateEvent(t.roomId,a.a.RoomHistoryVisibility,{history_visibility:n},""),()=>g(Object(c.a)("Failed to update the history visibility of this space"))),[w,C]=Object(d.a)(),T=t.currentState.maySendStateEvent(a.a.RoomJoinRules,f),x=t.currentState.maySendStateEvent(a.a.RoomGuestAccess,f),k=t.currentState.maySendStateEvent(a.a.RoomHistoryVisibility,f),F=t.currentState.mayClientSendStateEvent(a.a.RoomCanonicalAlias,e),O=t.currentState.getStateEvents(a.a.RoomCanonicalAlias,"");let R,D;return R=w?i.a.createElement(i.a.Fragment,null,i.a.createElement(l.a,{onClick:C,kind:"link",className:"mx_SettingsTab_showAdvanced"},Object(c.a)("Hide advanced")),i.a.createElement(h.a,{value:v,onChange:y,disabled:!x,label:Object(c.a)("Enable guest access")}),i.a.createElement("p",null,Object(c.a)("Guests can join a space without having an account."),i.a.createElement("br",null),Object(c.a)("This may be useful for public spaces."))):i.a.createElement(i.a.Fragment,null,i.a.createElement(l.a,{onClick:C,kind:"link",className:"mx_SettingsTab_showAdvanced"},Object(c.a)("Show advanced"))),_!==r.Private&&(D=i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(c.a)("Address")),i.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},i.a.createElement(u.a,{roomId:t.roomId,canSetCanonicalAlias:F,canSetAliases:!0,canonicalAliasEvent:O,hidePublishSetting:!0})))),i.a.createElement("div",{className:"mx_SettingsTab"},i.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Visibility")),n&&i.a.createElement("div",{className:"mx_SpaceRoomView_errorText"},n),i.a.createElement("div",{className:"mx_SettingsTab_section"},i.a.createElement("div",{className:"mx_SettingsTab_section_caption"},Object(c.a)("Decide who can view and join %(spaceName)s.",{spaceName:t.name})),i.a.createElement("div",null,i.a.createElement(p.a,{name:"spaceVisibility",value:_,onChange:b,disabled:!T,definitions:[{value:r.Unlisted,label:Object(c.a)("Public"),description:Object(c.a)("anyone with the link can view and join")},{value:r.Private,label:Object(c.a)("Invite only"),description:Object(c.a)("only invited people can view and join")}]})),R,i.a.createElement(h.a,{value:E===s.b.WorldReadable,onChange:e=>{S(e?s.b.WorldReadable:s.b.Shared)},disabled:!k,label:Object(c.a)("Preview Space")}),i.a.createElement("div",null,Object(c.a)("Allow people to preview your space before they join.")),i.a.createElement("b",null,Object(c.a)("Recommended for public spaces."))),D)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(662),d=n(82),h=n(80),p=n(101),m=n(97),g=n(105),f=n(85),_=n(87),b=n(882),v=n(81),y=n(335);class E extends u.a{constructor(...e){super(...e),s()(this,"aliasField",Object(c.createRef)()),s()(this,"onAliasAdded",async()=>{await this.aliasField.current.validate({allowEmpty:!1}),this.aliasField.current.isValid?this.props.onItemAdded&&this.props.onItemAdded(this.props.newItem):(this.aliasField.current.focus(),this.aliasField.current.validate({allowEmpty:!1,focused:!0}))})}renderNewItemField(){if(!this.props.domain)return super.renderNewItemField();return l.a.createElement("form",{onSubmit:this.onAliasAdded,autoComplete:"off",noValidate:!0,className:"mx_EditableItemList_newItem"},l.a.createElement(y.a,{ref:this.aliasField,onChange:e=>this.onNewItemChanged({target:{value:e}}),value:this.props.newItem||"",domain:this.props.domain}),l.a.createElement(f.a,{onClick:this.onAliasAdded,kind:"primary"},Object(h.a)("Add")))}}let S=Object(v.a)("views.room_settings.AliasSettings")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"onNewAliasChanged",e=>{this.setState({newAlias:e})}),s()(this,"onLocalAliasAdded",e=>{if(!e||0===e.length)return;const t=d.a.get().getDomain();e.includes(":")||(e+=":"+t),d.a.get().createAlias(e,this.props.roomId).then(()=>{this.setState({localAliases:this.state.localAliases.concat(e),newAlias:null}),this.state.canonicalAlias||this.changeCanonicalAlias(e)}).catch(e=>{console.error(e),_.a.createTrackedDialog("Error creating address","",g.a,{title:Object(h.a)("Error creating address"),description:Object(h.a)("There was an error creating that address. It may not be allowed by the server or a temporary failure occurred.")})})}),s()(this,"onLocalAliasDeleted",e=>{const t=this.state.localAliases[e];d.a.get().deleteAlias(t).then(()=>{const e=this.state.localAliases.filter(e=>e!==t);this.setState({localAliases:e}),this.state.canonicalAlias===t&&this.changeCanonicalAlias(null)}).catch(e=>{let t;console.error(e),t="M_FORBIDDEN"===e.errcode?Object(h.a)("You don't have permission to delete the address."):Object(h.a)("There was an error removing that address. It may no longer exist or a temporary error occurred."),_.a.createTrackedDialog("Error removing address","",g.a,{title:Object(h.a)("Error removing address"),description:t})})}),s()(this,"onLocalAliasesToggled",e=>{e.target.open&&(this.props.canSetCanonicalAlias||0!==this.state.localAliases.length||this.loadLocalAliases()),this.setState({detailsOpen:e.currentTarget.open})}),s()(this,"onCanonicalAliasChange",e=>{this.changeCanonicalAlias(e.target.value)}),s()(this,"onNewAltAliasChanged",e=>{this.setState({newAltAlias:e})}),s()(this,"onAltAliasAdded",e=>{const t=this.state.altAliases.slice();t.some(t=>t.trim()===e.trim())||(t.push(e.trim()),this.changeAltAliases(t),this.setState({newAltAlias:""}))}),s()(this,"onAltAliasDeleted",e=>{const t=this.state.altAliases.slice();t.splice(e,1),this.changeAltAliases(t)});const t={altAliases:[],localAliases:[],canonicalAlias:null,updatingCanonicalAlias:!1,localAliasesLoading:!1,detailsOpen:!1};if(e.canonicalAliasEvent){const n=e.canonicalAliasEvent.getContent(),r=n.alt_aliases;Array.isArray(r)&&(t.altAliases=r.slice()),t.canonicalAlias=n.alias}this.state=t}componentDidMount(){this.props.canSetCanonicalAlias&&this.loadLocalAliases()}async loadLocalAliases(){this.setState({localAliasesLoading:!0});try{const e=d.a.get();let t=[];if(await e.doesServerSupportUnstableFeature("org.matrix.msc2432")){const n=await e.unstableGetLocalAliases(this.props.roomId);Array.isArray(n.aliases)&&(t=n.aliases)}this.setState({localAliases:t}),0===t.length&&this.setState({detailsOpen:!0})}finally{this.setState({localAliasesLoading:!1})}}changeCanonicalAlias(e){if(!this.props.canSetCanonicalAlias)return;const t=this.state.canonicalAlias;this.setState({canonicalAlias:e,updatingCanonicalAlias:!0});const n={alt_aliases:this.state.altAliases};e&&(n.alias=e),d.a.get().sendStateEvent(this.props.roomId,"m.room.canonical_alias",n,"").catch(e=>{console.error(e),_.a.createTrackedDialog("Error updating main address","",g.a,{title:Object(h.a)("Error updating main address"),description:Object(h.a)("There was an error updating the room's main address. It may not be allowed by the server or a temporary failure occurred.")}),this.setState({canonicalAlias:t})}).finally(()=>{this.setState({updatingCanonicalAlias:!1})})}changeAltAliases(e){if(!this.props.canSetCanonicalAlias)return;this.setState({updatingCanonicalAlias:!0,altAliases:e});const t={};this.state.canonicalAlias&&(t.alias=this.state.canonicalAlias),e&&(t.alt_aliases=e),d.a.get().sendStateEvent(this.props.roomId,"m.room.canonical_alias",t,"").catch(e=>{console.error(e),_.a.createTrackedDialog("Error updating alternative addresses","",g.a,{title:Object(h.a)("Error updating main address"),description:Object(h.a)("There was an error updating the room's alternative addresses. It may not be allowed by the server or a temporary failure occurred.")})}).finally(()=>{this.setState({updatingCanonicalAlias:!1})})}getAliases(){return this.state.altAliases.concat(this.getLocalNonAltAliases())}getLocalNonAltAliases(){const{altAliases:e}=this.state;return this.state.localAliases.filter(t=>!e.includes(t))}render(){var e;const t=d.a.get(),n=t.getDomain(),r=null===(e=t.getRoom(this.props.roomId))||void 0===e?void 0:e.isSpaceRoom();let o=!1;const i=this.state.canonicalAlias||"",a=l.a.createElement(p.a,{onChange:this.onCanonicalAliasChange,value:i,disabled:this.state.updatingCanonicalAlias||!this.props.canSetCanonicalAlias,element:"select",id:"canonicalAlias",label:Object(h.a)("Main address")},l.a.createElement("option",{value:"",key:"unset"},Object(h.a)("not specified")),this.getAliases().map((e,t)=>(e===this.state.canonicalAlias&&(o=!0),l.a.createElement("option",{value:e,key:t},e))),o||!this.state.canonicalAlias?"":l.a.createElement("option",{value:this.state.canonicalAlias,key:"arbitrary"},this.state.canonicalAlias));let s;return s=this.state.localAliasesLoading?l.a.createElement(m.a,null):l.a.createElement(E,{id:"roomAliases",items:this.state.localAliases,newItem:this.state.newAlias,onNewItemChanged:this.onNewAliasChanged,canRemove:this.props.canSetAliases,canEdit:this.props.canSetAliases,onItemAdded:this.onLocalAliasAdded,onItemRemoved:this.onLocalAliasDeleted,noItemsLabel:r?Object(h.a)("This space has no local addresses"):Object(h.a)("This room has no local addresses"),placeholder:Object(h.a)("Local address"),domain:n}),l.a.createElement("div",{className:"mx_AliasSettings"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(h.a)("Published Addresses")),l.a.createElement("p",null,r?Object(h.a)("Published addresses can be used by anyone on any server to join your space."):Object(h.a)("Published addresses can be used by anyone on any server to join your room.")," ",Object(h.a)("To publish an address, it needs to be set as a local address first.")),a,this.props.hidePublishSetting?null:l.a.createElement(b.a,{roomId:this.props.roomId,canSetCanonicalAlias:this.props.canSetCanonicalAlias}),l.a.createElement("datalist",{id:"mx_AliasSettings_altRecommendations"},this.getLocalNonAltAliases().map(e=>l.a.createElement("option",{value:e,key:e})),";"),l.a.createElement(E,{id:"roomAltAliases",items:this.state.altAliases,newItem:this.state.newAltAlias,onNewItemChanged:this.onNewAltAliasChanged,canRemove:this.props.canSetCanonicalAlias,canEdit:this.props.canSetCanonicalAlias,onItemAdded:this.onAltAliasAdded,onItemRemoved:this.onAltAliasDeleted,suggestionsListId:"mx_AliasSettings_altRecommendations",itemsLabel:Object(h.a)("Other published addresses:"),noItemsLabel:Object(h.a)("No other published addresses yet, add one below"),placeholder:Object(h.a)("New published address (e.g. #alias:server)")}),l.a.createElement("span",{className:"mx_SettingsTab_subheading mx_AliasSettings_localAliasHeader"},Object(h.a)("Local Addresses")),l.a.createElement("p",null,r?Object(h.a)("Set addresses for this space so users can find this space through your homeserver (%(localDomain)s)",{localDomain:n}):Object(h.a)("Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)",{localDomain:n})),l.a.createElement("details",{onToggle:this.onLocalAliasesToggled,open:this.state.detailsOpen},l.a.createElement("summary",null,this.state.detailsOpen?Object(h.a)("Show less"):Object(h.a)("Show more")),s))}},s()(o,"defaultProps",{canSetAliases:!1,canSetCanonicalAlias:!1}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(101),u=n(85),d=n(81);class h extends s.a.Component{constructor(...e){super(...e),i()(this,"state",{verifyRemove:!1}),i()(this,"onRemove",e=>{e.stopPropagation(),e.preventDefault(),this.setState({verifyRemove:!0})}),i()(this,"onDontRemove",e=>{e.stopPropagation(),e.preventDefault(),this.setState({verifyRemove:!1})}),i()(this,"onActuallyRemove",e=>{e.stopPropagation(),e.preventDefault(),this.props.onRemove&&this.props.onRemove(this.props.index),this.setState({verifyRemove:!1})})}render(){return this.state.verifyRemove?s.a.createElement("div",{className:"mx_EditableItem"},s.a.createElement("span",{className:"mx_EditableItem_promptText"},Object(c.a)("Are you sure?")),s.a.createElement(u.a,{onClick:this.onActuallyRemove,kind:"primary_sm",className:"mx_EditableItem_confirmBtn"},Object(c.a)("Yes")),s.a.createElement(u.a,{onClick:this.onDontRemove,kind:"danger_sm",className:"mx_EditableItem_confirmBtn"},Object(c.a)("No"))):s.a.createElement("div",{className:"mx_EditableItem"},s.a.createElement("div",{onClick:this.onRemove,className:"mx_EditableItem_delete",title:Object(c.a)("Remove"),role:"button"}),s.a.createElement("span",{className:"mx_EditableItem_item"},this.props.value))}}let p=Object(d.a)("views.elements.EditableItemList")(r=class extends s.a.PureComponent{constructor(...e){super(...e),i()(this,"onItemAdded",e=>{e.stopPropagation(),e.preventDefault(),this.props.onItemAdded&&this.props.onItemAdded(this.props.newItem)}),i()(this,"onItemRemoved",e=>{this.props.onItemRemoved&&this.props.onItemRemoved(e)}),i()(this,"onNewItemChanged",e=>{this.props.onNewItemChanged&&this.props.onNewItemChanged(e.target.value)})}renderNewItemField(){return s.a.createElement("form",{onSubmit:this.onItemAdded,autoComplete:"off",noValidate:!0,className:"mx_EditableItemList_newItem"},s.a.createElement(l.a,{label:this.props.placeholder,type:"text",autoComplete:"off",value:this.props.newItem||"",onChange:this.onNewItemChanged,list:this.props.suggestionsListId}),s.a.createElement(u.a,{onClick:this.onItemAdded,kind:"primary",type:"submit",disabled:!this.props.newItem},Object(c.a)("Add")))}render(){const e=this.props.items.map((e,t)=>this.props.canRemove?s.a.createElement(h,{key:e,index:t,value:e,onRemove:this.onItemRemoved}):s.a.createElement("li",{key:e},e)),t=this.props.canRemove?e:s.a.createElement("ul",null,e),n=this.props.items.length>0?this.props.itemsLabel:this.props.noItemsLabel;return s.a.createElement("div",{className:"mx_EditableItemList"},s.a.createElement("div",{className:"mx_EditableItemList_label"},n),t,this.props.canEdit?this.renderNewItemField():s.a.createElement("div",null))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(87),l=n(80),u=n(81),d=n(445),h=n(95),p=n(105),m=n(116),g=n(97);let f=Object(u.a)("views.dialogs.RoomUpgradeDialog")(r=class extends s.a.Component{constructor(...e){super(...e),i()(this,"targetVersion",void 0),i()(this,"state",{busy:!0}),i()(this,"onCancelClick",()=>{this.props.onFinished(!1)}),i()(this,"onUpgradeClick",()=>{this.setState({busy:!0}),Object(d.a)(this.props.room,this.targetVersion,!1,!1).then(()=>{this.props.onFinished(!0)}).catch(e=>{c.a.createTrackedDialog("Failed to upgrade room","",p.a,{title:Object(l.a)("Failed to upgrade room"),description:e&&e.message?e.message:Object(l.a)("The room upgrade could not be completed")})}).finally(()=>{this.setState({busy:!1})})})}async componentDidMount(){const e=await this.props.room.getRecommendedVersion();this.targetVersion=e.version,this.setState({busy:!1})}render(){let e;return e=this.state.busy?s.a.createElement(g.a,null):s.a.createElement(m.a,{primaryButton:Object(l.a)("Upgrade this room to version %(version)s",{version:this.targetVersion}),primaryButtonClass:"danger",hasCancel:!0,onPrimaryButtonClick:this.onUpgradeClick,onCancel:this.onCancelClick}),s.a.createElement(h.a,{className:"mx_RoomUpgradeDialog",onFinished:this.props.onFinished,title:Object(l.a)("Upgrade Room Version"),contentId:"mx_Dialog_content",hasCancel:!0},s.a.createElement("p",null,Object(l.a)("Upgrading this room requires closing down the current instance of the room and creating a new room in its place. To give room members the best possible experience, we will:")),s.a.createElement("ol",null,s.a.createElement("li",null,Object(l.a)("Create a new room with the same name, description and avatar")),s.a.createElement("li",null,Object(l.a)("Update any local room aliases to point to the new room")),s.a.createElement("li",null,Object(l.a)("Stop users from speaking in the old version of the room, and post a message advising users to move to the new room")),s.a.createElement("li",null,Object(l.a)("Put a link back to the old room at the start of the new room so people can see old messages"))),e)}})||r},function(e,t){e.exports="img/element-icons/warning-badge.413c9a9.svg"},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(136),c=n(93),l=n(80),u=n(95),d=n(85),h=n(94),p=n(248),m=n(102),g=n(337),f=n(125),_=n(247),b=n(448);function v(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}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=({space:e,onAddExistingSpaceClick:t,onFinished:n})=>{var r;const[o,v]=Object(i.useState)(e),[E,S]=Object(i.useState)(!1),[w,C]=Object(i.useState)(""),T=Object(i.useRef)(),[x,k]=Object(i.useState)(""),F=Object(i.useRef)(),[O,R]=Object(i.useState)(null),[D,I]=Object(i.useState)(""),A=!(null===(r=m.g.instance.restrictedJoinRuleSupport)||void 0===r||!r.preferred),N=e.getJoinRule();let M=s.c.Invite;N===s.c.Public?M=s.c.Public:A&&(M=s.c.Restricted);const[P,L]=Object(i.useState)(M),j=async e=>{if(e.preventDefault(),!E){if(S(!0),!await T.current.validate({allowEmpty:!1}))return T.current.focus(),T.current.validate({allowEmpty:!1,focused:!0}),void S(!1);if(P===s.c.Public&&!await F.current.validate({allowEmpty:!0}))return F.current.focus(),F.current.validate({allowEmpty:!0,focused:!0}),void S(!1);try{await Object(f.b)({createOpts:{preset:P===s.c.Public?s.d.PublicChat:s.d.PrivateChat,name:w,power_level_content_override:y({events_default:100},P===s.c.Public?{invite:0}:{}),room_alias_name:P===s.c.Public&&x?x.substr(1,x.indexOf(":")-1):void 0,topic:D},avatar:O,roomType:c.e.Space,parentSpace:o,spinner:!1,encryption:!1,andView:!0,inlineErrors:!0}),n(!0)}catch(e){console.error(e)}}};let U;return P===s.c.Restricted?U=a.a.createElement("p",null,Object(l.a)("Anyone in <SpaceName/> will be able to find and join.",{},{SpaceName:()=>a.a.createElement("b",null,o.name)})):P===s.c.Public?U=a.a.createElement("p",null,Object(l.a)("Anyone will be able to find and join this space, not just members of <SpaceName/>.",{},{SpaceName:()=>a.a.createElement("b",null,o.name)})):P===s.c.Invite&&(U=a.a.createElement("p",null,Object(l.a)("Only people invited will be able to find and join this space."))),a.a.createElement(u.a,{title:a.a.createElement(_.c,{title:Object(l.a)("Create a space"),space:e,value:o,onChange:v}),className:"mx_CreateSubspaceDialog",contentId:"mx_CreateSubspaceDialog",onFinished:n,fixedWidth:!1},a.a.createElement(h.a.Provider,{value:e.client},a.a.createElement("div",{className:"mx_CreateSubspaceDialog_content"},a.a.createElement("div",{className:"mx_CreateSubspaceDialog_betaNotice"},a.a.createElement(p.a,null),Object(l.a)("Add a space to a space you manage.")),a.a.createElement(g.a,{busy:E,onSubmit:j,setAvatar:R,name:w,setName:C,nameFieldRef:T,topic:D,setTopic:I,alias:x,setAlias:k,showAliasField:P===s.c.Public,aliasFieldRef:F},a.a.createElement(b.a,{label:Object(l.a)("Space visibility"),labelInvite:Object(l.a)("Private space (invite only)"),labelPublic:Object(l.a)("Public space"),labelRestricted:A?Object(l.a)("Visible to space members"):void 0,width:478,value:P,onChange:L}),U)),a.a.createElement("div",{className:"mx_CreateSubspaceDialog_footer"},a.a.createElement("div",{className:"mx_CreateSubspaceDialog_footer_prompt"},a.a.createElement("div",null,Object(l.a)("Want to add an existing space instead?")),a.a.createElement(d.a,{kind:"link",onClick:()=>{t(),n()}},Object(l.a)("Add existing space"))),a.a.createElement(d.a,{kind:"primary_outline",disabled:E,onClick:()=>n(!1)},Object(l.a)("Cancel")),a.a.createElement(d.a,{kind:"primary",disabled:E,onClick:j},E?Object(l.a)("Adding..."):Object(l.a)("Add")))))}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(80),a=n(84),s=n(85),c=n(83),l=n(91),u=n(192),d=n(450);t.a=({featureId:e,onFinished:t})=>{var n;const r=a.b.getBetaInfo(e);return o.a.createElement(d.a,{title:Object(i.a)("%(featureName)s beta feedback",{featureName:r.title}),subheading:Object(i.a)(r.feedbackSubheading),onFinished:t,rageshakeLabel:r.feedbackLabel,rageshakeData:Object.fromEntries(((null===(n=a.b.getBetaInfo(e))||void 0===n?void 0:n.extraSettings)||[]).map(e=>a.b.getValue(e)))},o.a.createElement(s.a,{kind:"link",onClick:()=>{t(!1),c.a.dispatch({action:l.a.ViewUserSettings,initialTabId:u.a.Labs})}},Object(i.a)("To leave the beta, visit your settings.")))}},function(e,t,n){"use strict";e.exports=(e,t,n,r)=>{let o=65535&e|0,i=e>>>16&65535|0,a=0;for(;0!==n;){a=n>2e3?2e3:n,n-=a;do{o=o+t[r++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}},function(e,t,n){"use strict";const r=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());e.exports=(e,t,n,o)=>{const i=r,a=o+n;e^=-1;for(let n=o;n<a;n++)e=e>>>8^i[255&(e^t[n])];return-1^e}},function(e,t,n){"use strict";const r=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)r(n,t)&&(e[t]=n[t])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;const n=new Uint8Array(t);for(let t=0,r=0,o=e.length;t<o;t++){let o=e[t];n.set(o,r),r+=o.length}return n}},function(e,t,n){"use strict";let r=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}const o=new Uint8Array(256);for(let e=0;e<256;e++)o[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;o[254]=o[254]=1,e.exports.string2buf=e=>{let t,n,r,o,i,a=e.length,s=0;for(o=0;o<a;o++)n=e.charCodeAt(o),55296==(64512&n)&&o+1<a&&(r=e.charCodeAt(o+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),o++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),i=0,o=0;i<s;o++)n=e.charCodeAt(o),55296==(64512&n)&&o+1<a&&(r=e.charCodeAt(o+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),o++)),n<128?t[i++]=n:n<2048?(t[i++]=192|n>>>6,t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t};e.exports.buf2string=(e,t)=>{let n,i;const a=t||e.length,s=new Array(2*a);for(i=0,n=0;n<a;){let t=e[n++];if(t<128){s[i++]=t;continue}let r=o[t];if(r>4)s[i++]=65533,n+=r-1;else{for(t&=2===r?31:3===r?15:7;r>1&&n<a;)t=t<<6|63&e[n++],r--;r>1?s[i++]=65533:t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&r)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n})(s,i)},e.exports.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+o[e[n]]>t?n:t}},function(e,t,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t){!function(){"use strict";var t=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function n(e){var t,n=new Uint8Array(e);for(t=0;t<e;t+=1)n[t]=0;return n}e.exports.clean=n,e.exports.pad=function(e,t,n){return e=e.toString(n||8),"000000000000".substr(e.length+12-t)+e},e.exports.extend=function(e,t,r,o){var i=n((parseInt((t+r)/o)+1)*o);return i.set(e),i},e.exports.stringToUint8=function(e,t,r){var o,i;for(t=t||n(e.length),r=r||0,o=0,i=e.length;o<i;o+=1)t[r]=e.charCodeAt(o),r+=1;return t},e.exports.uint8ToBase64=function(e){var n,r,o,i,a=e.length%3,s="";for(n=0,o=e.length-a;n<o;n+=3)r=(e[n]<<16)+(e[n+1]<<8)+e[n+2],s+=t[(i=r)>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i];switch(s.length%4){case 1:s+="=";break;case 2:s+="=="}return s},e.exports.base64ToUint8=function(e){for(var r,o=e.match(/^([^=]+)/)[1],i=e.match(/(=*)$/)[1].length,a=0,s=o.length,c=0,l=n(.75*o.length+i);a<s;)r=0,r|=t.indexOf(o.charAt(a)||"A")<<18,a+=1,r|=t.indexOf(o.charAt(a)||"A")<<12,a+=1,r|=t.indexOf(o.charAt(a)||"A")<<6,a+=1,r|=t.indexOf(o.charAt(a)||"A"),a+=1,l[c]=r>>16&255,l[c+=1]=r>>8&255,l[c+=1]=255&r,c+=1;return l}}()},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(80),a=n(95),s=n(85),c=n(94),l=n(247);t.a=({space:e,onCreateSubspaceClick:t,onFinished:n})=>{const[u,d]=Object(r.useState)(e);return o.a.createElement(a.a,{title:o.a.createElement(l.c,{title:Object(i.a)("Add existing space"),space:e,value:u,onChange:d}),className:"mx_AddExistingToSpaceDialog",contentId:"mx_AddExistingToSpace",onFinished:n,fixedWidth:!1},o.a.createElement(c.a.Provider,{value:e.client},o.a.createElement(l.a,{space:e,onFinished:n,footerPrompt:o.a.createElement(o.a.Fragment,null,o.a.createElement("div",null,Object(i.a)("Want to add a new space instead?")),o.a.createElement(s.a,{onClick:t,kind:"link"},Object(i.a)("Create a new space"))),filterPlaceholder:Object(i.a)("Search for spaces"),spacesRenderer:l.g})))}},function(e,t,n){"use strict";var r,o=n(78),i=n.n(o),a=n(136),s=n(80),c=n(116),l=n(95),u=n(102),d=n(117),h=n(247),p=n(216),m=n(199),g=n(246);!function(e){e.All="All",e.Specific="Specific",e.None="None"}(r||(r={}));const f=({filterPlaceholder:e,rooms:t,selected:n,onChange:r})=>{const[a,c]=Object(o.useState)(""),l=a.toLowerCase().trim(),u=Object(o.useMemo)(()=>{if(!l)return t;return new m.a(t,{keys:["name"],funcs:[e=>[e.getCanonicalAlias(),...e.getAltAliases()].filter(Boolean)],shouldMatchWordsOnly:!1}).match(l)},[t,l]);return i.a.createElement("div",{className:"mx_LeaveSpaceDialog_section"},i.a.createElement(p.a,{className:"mx_textinput_icon mx_textinput_search",placeholder:e,onSearch:c,autoComplete:!0,autoFocus:!0}),i.a.createElement(d.a,{className:"mx_LeaveSpaceDialog_content"},u.map(e=>i.a.createElement(h.b,{key:e.roomId,room:e,checked:n.has(e),onChange:t=>{r(t,e)}})),u.length<1?i.a.createElement("span",{className:"mx_LeaveSpaceDialog_noResults"},Object(s.a)("No results")):void 0))},_=({space:e,spaceChildren:t,roomsToLeave:n,setRoomsToLeave:a})=>{const c=Object(o.useMemo)(()=>new Set(n),[n]),[l,u]=Object(o.useState)(r.All);return Object(o.useEffect)(()=>{l===r.All?a(t):a([])},[a,l,t]),i.a.createElement("div",{className:"mx_LeaveSpaceDialog_section"},i.a.createElement(g.a,{name:"roomsToLeave",value:l,onChange:u,definitions:[{value:r.All,label:Object(s.a)("Leave all rooms and spaces")},{value:r.None,label:Object(s.a)("Don't leave any")},{value:r.Specific,label:Object(s.a)("Leave specific rooms and spaces")}]}),l===r.Specific&&i.a.createElement(f,{filterPlaceholder:Object(s.a)("Search %(spaceName)s",{spaceName:e.name}),rooms:t,selected:c,onChange:(e,t)=>{a(e?[t,...n]:n.filter(e=>e!==t))}}))},b=e=>!e.getJoinedMembers().some(t=>t.userId!==e.client.credentials.userId&&100===t.powerLevelNorm);t.a=({space:e,onFinished:t})=>{const n=Object(o.useMemo)(()=>u.g.instance.getChildren(e.roomId),[e.roomId]),[r,d]=Object(o.useState)([]);let h,p;if(e.getJoinRule()!==a.c.Public&&(h=Object(s.a)("You won't be able to rejoin unless you are re-invited.")),b(e))p=Object(s.a)("You're the only admin of this space. Leaving it will mean no one has control over it.");else{r.filter(b).length>0&&(p=Object(s.a)("You're the only admin of some of the rooms or spaces you wish to leave. Leaving them will leave them without any admins."))}return i.a.createElement(l.a,{title:Object(s.a)("Leave %(spaceName)s",{spaceName:e.name}),className:"mx_LeaveSpaceDialog",contentId:"mx_LeaveSpaceDialog",onFinished:()=>t(!1),fixedWidth:!1},i.a.createElement("div",{className:"mx_Dialog_content",id:"mx_LeaveSpaceDialog"},i.a.createElement("p",null,Object(s.a)("Are you sure you want to leave <spaceName/>?",{},{spaceName:()=>i.a.createElement("b",null,e.name)})," ",h),n.length>0&&i.a.createElement(_,{space:e,spaceChildren:n,roomsToLeave:r,setRoomsToLeave:d}),p&&i.a.createElement("div",{className:"mx_LeaveSpaceDialog_section_warning"},p)),i.a.createElement(c.a,{primaryButton:Object(s.a)("Leave space"),onPrimaryButtonClick:()=>t(!0,r),hasCancel:!0,onCancel:t}))}},function(e,t){e.exports="img/icon-email-pill-avatar.575ff20.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(95),l=n(80),u=n(101),d=n(85),h=n(82),p=n(109),m=n(90),g=n(367),f=n(120),_=n(151),b=n(137),v=n(87),y=n(105),E=n(81),S=n(100);let w=Object(E.a)("views.dialogs.CommunityPrototypeInviteDialog")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"onSubmit",async e=>{e.preventDefault(),e.stopPropagation(),this.setState({busy:!0});try{const e=[...this.state.emailTargets,...this.state.userTargets],t=await Object(_.a)(this.props.roomId,e),n=h.a.get().getRoom(this.props.roomId);Object(_.d)(t.states,n,t.inviter)?this.props.onFinished(!0):this.setState({busy:!1})}catch(e){this.setState({busy:!1}),console.error(e),v.a.createTrackedDialog("Failed to invite","",y.a,{title:Object(l.a)("Failed to invite"),description:e&&e.message?e.message:Object(l.a)("Operation failed")})}}),i()(this,"onAddressChange",(e,t)=>{const n=Object(p.b)(this.state.emailTargets);t>=n.length?n.push(e.target.value):n[t]=e.target.value,this.setState({emailTargets:n})}),i()(this,"onAddressBlur",e=>{const t=Object(p.b)(this.state.emailTargets);e>=t.length||""===t[e].trim()&&(t.splice(e,1),this.setState({emailTargets:t}))}),i()(this,"onShowPeopleClick",()=>{this.setState({showPeople:!this.state.showPeople})}),i()(this,"setPersonToggle",(e,t)=>{const n=Object(p.b)(this.state.userTargets);t&&!n.includes(e.userId)?n.push(e.userId):!t&&n.includes(e.userId)&&n.splice(n.indexOf(e.userId),1),this.setState({userTargets:n})}),i()(this,"onShowMorePeople",()=>{this.setState({numPeople:this.state.numPeople+5})}),this.state={emailTargets:[],userTargets:[],showPeople:!1,people:this.buildSuggestions(),numPeople:5,busy:!1}}buildSuggestions(){const e=new Set([h.a.get().getUserId(),m.a.get().welcomeUserId]);if(this.props.roomId){const t=h.a.get().getRoom(this.props.roomId);if(!t)throw new Error("Room ID given to InviteDialog does not look like a room");t.getMembersWithMembership("invite").forEach(t=>e.add(t.userId)),t.getMembersWithMembership("join").forEach(t=>e.add(t.userId)),t.getMembersWithMembership("ban").forEach(t=>e.add(t.userId))}return g.d.buildRecents(e)}renderPerson(e,t){let n=null;return e.user.getMxcAvatarUrl()&&(n=Object(S.b)(e.user.getMxcAvatarUrl()).getSquareThumbnailHttp(36)),s.a.createElement("div",{className:"mx_CommunityPrototypeInviteDialog_person",key:t},s.a.createElement(f.a,{url:n,name:e.user.name,idName:e.user.userId,width:36,height:36}),s.a.createElement("div",{className:"mx_CommunityPrototypeInviteDialog_personIdentifiers"},s.a.createElement("span",{className:"mx_CommunityPrototypeInviteDialog_personName"},e.user.name),s.a.createElement("span",{className:"mx_CommunityPrototypeInviteDialog_personId"},e.userId)),s.a.createElement(b.a,{onChange:t=>this.setPersonToggle(e,t.target.checked)}))}render(){const e=[];this.state.emailTargets.forEach((t,n)=>{e.push(s.a.createElement(u.a,{key:n,value:t,onChange:e=>this.onAddressChange(e,n),label:Object(l.a)("Email address"),placeholder:Object(l.a)("Email address"),onBlur:()=>this.onAddressBlur(n)}))}),e.push(s.a.createElement(u.a,{key:e.length,value:"",onChange:t=>this.onAddressChange(t,e.length),label:e.length>0?Object(l.a)("Add another email"):Object(l.a)("Email address"),placeholder:e.length>0?Object(l.a)("Add another email"):Object(l.a)("Email address")}));let t=null;const n=[];if(this.state.showPeople){const e=this.state.people.slice(0,this.state.numPeople);e.forEach((e,t)=>{n.push(this.renderPerson(e,t))}),e.length<this.state.people.length&&n.push(s.a.createElement(d.a,{onClick:this.onShowMorePeople,kind:"link",key:"more",className:"mx_CommunityPrototypeInviteDialog_morePeople"},Object(l.a)("Show more")))}this.state.people.length>0&&(t=s.a.createElement("div",{className:"mx_CommunityPrototypeInviteDialog_people"},s.a.createElement("span",null,Object(l.a)("People you know on %(brand)s",{brand:m.a.get().brand})),s.a.createElement(d.a,{onClick:this.onShowPeopleClick},this.state.showPeople?Object(l.a)("Hide"):Object(l.a)("Show"))));let r=Object(l.a)("Skip");const o=this.state.userTargets.length+this.state.emailTargets.length;return o>0&&(r=Object(l.a)("Send %(count)s invites",{count:o})),s.a.createElement(c.a,{className:"mx_CommunityPrototypeInviteDialog",onFinished:this.props.onFinished,title:Object(l.a)("Invite people to join %(communityName)s",{communityName:this.props.communityName})},s.a.createElement("form",{onSubmit:this.onSubmit},s.a.createElement("div",{className:"mx_Dialog_content"},e,t,n,s.a.createElement(d.a,{kind:"primary",onClick:this.onSubmit,disabled:this.state.busy,className:"mx_CommunityPrototypeInviteDialog_primaryButton"},r))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r),i=n(82),a=n(84),s=n(249);class c{constructor(){o()(this,"typingStates",void 0),this.reset()}static sharedInstance(){return void 0===window.mxTypingStore&&(window.mxTypingStore=new c),window.mxTypingStore}reset(){this.typingStates={}}setSelfTyping(e,t){if(!a.b.getValue("sendTypingNotifications"))return;if(a.b.getValue("lowBandwidth"))return;let n=this.typingStates[e];!t&&!n||n&&n.isTyping===t||(n||(n=this.typingStates[e]={isTyping:t,serverTimer:new s.a(3e4),userTimer:new s.a(1e4)}),n.isTyping=t,t&&(n.serverTimer.isRunning()?n.serverTimer.restart():n.serverTimer.restart().finished().then(()=>{const t=this.typingStates[e];t&&(t.isTyping=!1)}),n.userTimer.isRunning()?n.userTimer.restart():n.userTimer.restart().finished().then(()=>{this.setSelfTyping(e,!1)})),i.a.get().sendTyping(e,t,3e4))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(457),l=n(95),u=n(80),d=n(460),h=n(81);function p(e){return e===d.a.Done?n(1332):n(683)}let m=Object(h.a)("views.dialogs.security.SetupEncryptionDialog")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"store",void 0),i()(this,"onStoreUpdate",()=>{this.setState({icon:p(this.store.phase)})}),this.store=d.b.sharedInstance(),this.state={icon:p(this.store.phase)}}componentDidMount(){this.store.on("update",this.onStoreUpdate)}componentWillUnmount(){this.store.removeListener("update",this.onStoreUpdate)}render(){return s.a.createElement(l.a,{headerImage:this.state.icon,onFinished:this.props.onFinished,title:Object(u.a)("Verify this session")},s.a.createElement(c.a,{onFinished:this.props.onFinished}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o,i=n(79),a=n.n(i),s=n(78),c=n.n(s),l=n(82),u=n(296),d=n(300),h=n(680),p=n(80),m=n(90),g=n(200),f=n(207),_=n(97),b=n(81),v=n(85),y=n(681);!function(e){e[e.PHASE_UNSENT=0]="PHASE_UNSENT",e[e.PHASE_REQUESTED=1]="PHASE_REQUESTED",e[e.PHASE_READY=2]="PHASE_READY",e[e.PHASE_DONE=3]="PHASE_DONE",e[e.PHASE_STARTED=4]="PHASE_STARTED",e[e.PHASE_CANCELLED=5]="PHASE_CANCELLED"}(o||(o={}));let E=Object(b.a)("views.right_panel.VerificationPanel")(r=class extends c.a.PureComponent{constructor(e){super(e),a()(this,"hasVerifier",void 0),a()(this,"onReciprocateYesClick",()=>{this.setState({reciprocateButtonClicked:!0}),this.state.reciprocateQREvent.confirm()}),a()(this,"onReciprocateNoClick",()=>{this.setState({reciprocateButtonClicked:!0}),this.state.reciprocateQREvent.cancel()}),a()(this,"startSAS",async()=>{this.setState({emojiButtonClicked:!0});const e=this.props.request.beginKeyVerification(u.d.SAS);try{await e.verify()}catch(e){console.error(e)}}),a()(this,"onSasMatchesClick",()=>{this.state.sasEvent.confirm()}),a()(this,"onSasMismatchesClick",()=>{this.state.sasEvent.mismatch()}),a()(this,"updateVerifierState",()=>{const{request:e}=this.props,{sasEvent:t,reciprocateQREvent:n}=e.verifier;e.verifier.off("show_sas",this.updateVerifierState),e.verifier.off("show_reciprocate_qr",this.updateVerifierState),this.setState({sasEvent:t,reciprocateQREvent:n})}),a()(this,"onRequestChange",async()=>{const{request:e}=this.props,t=this.hasVerifier;if(this.hasVerifier=!!e.verifier,!t&&this.hasVerifier){e.verifier.on("show_sas",this.updateVerifierState),e.verifier.on("show_reciprocate_qr",this.updateVerifierState);try{await e.verifier.verify()}catch(e){console.error("error verify",e)}}}),this.state={},this.hasVerifier=!1}renderQRPhase(){const{member:e,request:t}=this.props,n=t.otherPartySupportsMethod(u.d.SAS),r=t.otherPartySupportsMethod(d.c),o=m.a.get().brand,i=n||r?null:c.a.createElement("p",null,Object(p.a)("The session you are trying to verify doesn't support scanning a QR code or emoji verification, which is what %(brand)s supports. Try with a different client.",{brand:o}));if("dialog"===this.props.layout){let e,o;r&&(e=c.a.createElement("div",{className:"mx_VerificationPanel_QRPhase_startOption"},c.a.createElement("p",null,Object(p.a)("Scan this unique code")),c.a.createElement(h.a,{qrCodeData:t.qrCodeData}))),n&&(o=c.a.createElement("div",{className:"mx_VerificationPanel_QRPhase_startOption"},c.a.createElement("p",null,Object(p.a)("Compare unique emoji")),c.a.createElement("span",{className:"mx_VerificationPanel_QRPhase_helpText"},Object(p.a)("Compare a unique set of emoji if you don't have a camera on either device")),c.a.createElement(v.a,{disabled:this.state.emojiButtonClicked,onClick:this.startSAS,kind:"primary"},Object(p.a)("Start"))));const a=e&&o?c.a.createElement("div",{className:"mx_VerificationPanel_QRPhase_betweenText"},Object(p.a)("or")):null;return c.a.createElement("div",null,Object(p.a)("Verify this session by completing one of the following:"),c.a.createElement("div",{className:"mx_VerificationPanel_QRPhase_startOptions"},e,a,o,i))}let a,s;if(r&&(a=c.a.createElement("div",{className:"mx_UserInfo_container"},c.a.createElement("h3",null,Object(p.a)("Verify by scanning")),c.a.createElement("p",null,Object(p.a)("Ask %(displayName)s to scan your code:",{displayName:e.displayName||e.name||e.userId})),c.a.createElement("div",{className:"mx_VerificationPanel_qrCode"},c.a.createElement(h.a,{qrCodeData:t.qrCodeData})))),n){const e=this.state.emojiButtonClicked,t=r?Object(p.a)("If you can't scan the code above, verify by comparing unique emoji."):Object(p.a)("Verify by comparing unique emoji.");s=c.a.createElement("div",{className:"mx_UserInfo_container"},c.a.createElement("h3",null,Object(p.a)("Verify by emoji")),c.a.createElement("p",null,t),c.a.createElement(v.a,{disabled:e,kind:"primary",className:"mx_UserInfo_wideButton mx_VerificationPanel_verifyByEmojiButton",onClick:this.startSAS},Object(p.a)("Verify by emoji")))}const l=i?c.a.createElement("div",{className:"mx_UserInfo_container"},i):null;return c.a.createElement(c.a.Fragment,null,a,s,l)}getDevice(){const e=this.props.request&&this.props.request.channel.deviceId;return l.a.get().getStoredDevice(l.a.get().getUserId(),e)}renderQRReciprocatePhase(){const{member:e,request:t}=this.props,n=t.isSelfVerification?Object(p.a)("Almost there! Is your other session showing the same shield?"):Object(p.a)("Almost there! Is %(displayName)s showing the same shield?",{displayName:e.displayName||e.name||e.userId});let r;return r=this.state.reciprocateQREvent?c.a.createElement(c.a.Fragment,null,c.a.createElement("p",null,n),c.a.createElement(g.b,{isUser:!0,status:"verified",size:128,hideTooltip:!0}),c.a.createElement("div",{className:"mx_VerificationPanel_reciprocateButtons"},c.a.createElement(v.a,{kind:"danger",disabled:this.state.reciprocateButtonClicked,onClick:this.onReciprocateNoClick},Object(p.a)("No")),c.a.createElement(v.a,{kind:"primary",disabled:this.state.reciprocateButtonClicked,onClick:this.onReciprocateYesClick},Object(p.a)("Yes")))):c.a.createElement("p",null,c.a.createElement(_.a,null)),c.a.createElement("div",{className:"mx_UserInfo_container mx_VerificationPanel_reciprocate_section"},c.a.createElement("h3",null,Object(p.a)("Verify by scanning")),r)}renderVerifiedPhase(){const{member:e,request:t}=this.props;let n,r;if(t.isSelfVerification||(n=this.props.isRoomEncrypted?Object(p.a)("Verify all users in a room to ensure it's secure."):Object(p.a)("In encrypted rooms, verify all users to ensure it’s secure.")),t.isSelfVerification){const e=this.getDevice();e?r=Object(p.a)("You've successfully verified %(deviceName)s (%(deviceId)s)!",{deviceName:e?e.getDisplayName():"",deviceId:this.props.request.channel.deviceId}):(console.warn("Verified device we don't know about: "+this.props.request.channel.deviceId),r=Object(p.a)("You've successfully verified your device!"))}else r=Object(p.a)("You've successfully verified %(displayName)s!",{displayName:e.displayName||e.name||e.userId});return c.a.createElement("div",{className:"mx_UserInfo_container mx_VerificationPanel_verified_section"},c.a.createElement("h3",null,Object(p.a)("Verified")),c.a.createElement("p",null,r),c.a.createElement(g.b,{isUser:!0,status:"verified",size:128,hideTooltip:!0}),n?c.a.createElement("p",null,n):null,c.a.createElement(v.a,{kind:"primary",className:"mx_UserInfo_wideButton",onClick:this.props.onClose},Object(p.a)("Got it")))}renderCancelledPhase(){const{member:e,request:t}=this.props;let n,r;return n=t.isSelfVerification?Object(p.a)("Start verification again from the notification."):Object(p.a)("Start verification again from their profile."),"m.timeout"===t.cancellationCode?r=Object(p.a)("Verification timed out.")+" "+n:t.cancellingUserId===t.otherUserId?(r=t.isSelfVerification?Object(p.a)("You cancelled verification on your other session."):Object(p.a)("%(displayName)s cancelled verification.",{displayName:e.displayName||e.name||e.userId}),r=`${r} ${n}`):r=Object(p.a)("You cancelled verification.")+" "+n,c.a.createElement("div",{className:"mx_UserInfo_container"},c.a.createElement("h3",null,Object(p.a)("Verification cancelled")),c.a.createElement("p",null,r),c.a.createElement(v.a,{kind:"primary",className:"mx_UserInfo_wideButton",onClick:this.props.onClose},Object(p.a)("Got it")))}render(){const{member:e,phase:t,request:n}=this.props,r=e.displayName||e.name||e.userId;switch(t){case f.d:return this.renderQRPhase();case f.f:switch(n.chosenMethod){case u.d.RECIPROCATE_QR_CODE:return this.renderQRReciprocatePhase();case u.d.SAS:{const e=this.state.sasEvent?c.a.createElement(y.a,{displayName:r,device:this.getDevice(),sas:this.state.sasEvent.sas,onCancel:this.onSasMismatchesClick,onDone:this.onSasMatchesClick,inDialog:this.props.inDialog,isSelf:n.isSelfVerification}):c.a.createElement(_.a,null);return c.a.createElement("div",{className:"mx_UserInfo_container"},c.a.createElement("h3",null,Object(p.a)("Compare emoji")),e)}default:return null}case f.c:return this.renderVerifiedPhase();case f.b:return this.renderCancelledPhase()}return console.error("VerificationPanel unhandled phase:",t),null}componentDidMount(){const{request:e}=this.props;if(e.on("change",this.onRequestChange),e.verifier){const{sasEvent:t,reciprocateQREvent:n}=e.verifier;this.setState({sasEvent:t,reciprocateQREvent:n})}this.onRequestChange()}componentWillUnmount(){const{request:e}=this.props;e.verifier&&(e.verifier.off("show_sas",this.updateVerifierState),e.verifier.off("show_reciprocate_qr",this.updateVerifierState)),e.off("change",this.onRequestChange)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(81),p=n(430);let m=Object(h.a)("views.elements.crypto.VerificationQRCode")((i=o=class extends l.a.PureComponent{render(){return l.a.createElement(p.a,{data:[{data:this.props.qrCodeData.buffer,mode:"byte"}],className:"mx_VerificationQRCode",width:196})}},s()(o,"propTypes",{qrCodeData:d.a.object.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(459),u=n(85),d=n(116),h=n(682),p=n(81);let m=Object(p.a)("views.verification.VerificationShowSas")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onMatchClick",()=>{this.setState({pending:!0}),this.props.onDone()}),i()(this,"onDontMatchClick",()=>{this.setState({cancelling:!0}),this.props.onCancel()}),this.state={pending:!1}}componentWillMount(){Object(h.a)()}render(){let e,t,n;if(this.props.sas.emoji){const n=this.props.sas.emoji.map((e,t)=>{return s.a.createElement("div",{className:"mx_VerificationShowSas_emojiSas_block",key:t},s.a.createElement("div",{className:"mx_VerificationShowSas_emojiSas_emoji"},e[0]),s.a.createElement("div",{className:"mx_VerificationShowSas_emojiSas_label"},Object(c.a)((n=e[1]).charAt(0).toUpperCase()+n.slice(1))));var n});e=s.a.createElement("div",{className:"mx_VerificationShowSas_emojiSas"},n.slice(0,4),s.a.createElement("div",{className:"mx_VerificationShowSas_emojiSas_break"}),n.slice(4)),t=this.props.isSelf?Object(c.a)("Confirm the emoji below are displayed on both sessions, in the same order:"):Object(c.a)("Verify this user by confirming the following emoji appear on their screen.")}else{if(!this.props.sas.decimal)return s.a.createElement("div",null,Object(c.a)("Unable to find a supported verification method."),s.a.createElement(u.a,{kind:"primary",onClick:this.props.onCancel,className:"mx_UserInfo_wideButton"},Object(c.a)("Cancel")));{const n=this.props.sas.decimal.map((e,t)=>s.a.createElement("span",{key:t},e));e=s.a.createElement("div",{className:"mx_VerificationShowSas_decimalSas"},n),t=this.props.isSelf?Object(c.a)("Verify this session by confirming the following number appears on its screen."):Object(c.a)("Verify this user by confirming the following number appears on their screen.")}}if(this.state.pending||this.state.cancelling){let e;if(this.state.pending)if(this.props.isSelf)e=this.props.device?Object(c.a)("Waiting for your other session, %(deviceName)s (%(deviceId)s), to verify…",{deviceName:this.props.device?this.props.device.getDisplayName():"",deviceId:this.props.device?this.props.device.deviceId:""}):Object(c.a)("Waiting for your other session to verify…");else{const{displayName:t}=this.props;e=Object(c.a)("Waiting for %(displayName)s to verify…",{displayName:t})}else e=Object(c.a)("Cancelling…");n=s.a.createElement(l.a,{text:e})}else n=this.props.inDialog?s.a.createElement(d.a,{primaryButton:Object(c.a)("They match"),onPrimaryButtonClick:this.onMatchClick,primaryButtonClass:"mx_UserInfo_wideButton mx_VerificationShowSas_matchButton",cancelButton:Object(c.a)("They don't match"),onCancel:this.onDontMatchClick,cancelButtonClass:"mx_UserInfo_wideButton mx_VerificationShowSas_noMatchButton"}):s.a.createElement(s.a.Fragment,null,s.a.createElement(u.a,{onClick:this.onDontMatchClick,kind:"danger"},Object(c.a)("They don't match")),s.a.createElement(u.a,{onClick:this.onMatchClick,kind:"primary"},Object(c.a)("They match")));return s.a.createElement("div",{className:"mx_VerificationShowSas"},s.a.createElement("p",null,t),e,s.a.createElement("p",null,this.props.isSelf?"":Object(c.a)("To be secure, do this in person or use a trusted way to communicate.")),n)}})||r;Object(c.b)("Dog"),Object(c.b)("Cat"),Object(c.b)("Lion"),Object(c.b)("Horse"),Object(c.b)("Unicorn"),Object(c.b)("Pig"),Object(c.b)("Elephant"),Object(c.b)("Rabbit"),Object(c.b)("Panda"),Object(c.b)("Rooster"),Object(c.b)("Penguin"),Object(c.b)("Turtle"),Object(c.b)("Fish"),Object(c.b)("Octopus"),Object(c.b)("Butterfly"),Object(c.b)("Flower"),Object(c.b)("Tree"),Object(c.b)("Cactus"),Object(c.b)("Mushroom"),Object(c.b)("Globe"),Object(c.b)("Moon"),Object(c.b)("Cloud"),Object(c.b)("Fire"),Object(c.b)("Banana"),Object(c.b)("Apple"),Object(c.b)("Strawberry"),Object(c.b)("Corn"),Object(c.b)("Pizza"),Object(c.b)("Cake"),Object(c.b)("Heart"),Object(c.b)("Smiley"),Object(c.b)("Robot"),Object(c.b)("Hat"),Object(c.b)("Glasses"),Object(c.b)("Spanner"),Object(c.b)("Santa"),Object(c.b)("Thumbs up"),Object(c.b)("Umbrella"),Object(c.b)("Hourglass"),Object(c.b)("Clock"),Object(c.b)("Gift"),Object(c.b)("Light bulb"),Object(c.b)("Book"),Object(c.b)("Pencil"),Object(c.b)("Paperclip"),Object(c.b)("Scissors"),Object(c.b)("Lock"),Object(c.b)("Key"),Object(c.b)("Hammer"),Object(c.b)("Telephone"),Object(c.b)("Flag"),Object(c.b)("Train"),Object(c.b)("Bicycle"),Object(c.b)("Aeroplane"),Object(c.b)("Rocket"),Object(c.b)("Trophy"),Object(c.b)("Ball"),Object(c.b)("Guitar"),Object(c.b)("Trumpet"),Object(c.b)("Bell"),Object(c.b)("Anchor"),Object(c.b)("Headphones"),Object(c.b)("Folder"),Object(c.b)("Pin")},function(e,t,n){"use strict";async function r(){console.log("Checking for COLR support");const{userAgent:e}=navigator;if(e.includes("Firefox"))return console.log("Browser is Firefox - assuming COLR is supported"),!0;if(!e.includes("Chrome")&&e.includes("Safari"))return function(e){console.log("Browser is Safari - checking version for COLR support");try{const t=e.match(/Mac OS X ([\d|_]+).*Version\/([\d|.]+).*Safari/);if(t){const e=t[1],n=t[2],r=e.split("_").map(e=>parseInt(e,10)),o=n.split(".").map(e=>parseInt(e,10)),i=r[0]>=10&&r[1]>=14&&o[0]>=12;return console.log(`COLR support on Safari requires macOS 10.14 and Safari 12, detected Safari ${n} on macOS ${e}, COLR supported: `+i),i}}catch(e){console.error("Error in Safari COLR version check",e)}return console.warn("Couldn't determine Safari version to check COLR font support, assuming no."),!1}(e);try{const e=document.createElement("canvas"),t=e.getContext("2d"),n=new Image,r=`\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="100" style="background:#fff;fill:#000;">\n <style type="text/css">\n @font-face {\n font-family: "chromacheck-colr";\n src: url(data:application/x-font-woff;base64,${"d09GRgABAAAAAAKAAAwAAAAAAowAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABDT0xSAAACVAAAABYAAAAYAAIAJUNQQUwAAAJsAAAAEgAAABLJAAAQT1MvMgAAAYAAAAA6AAAAYBfxJ0pjbWFwAAABxAAAACcAAAAsAAzpM2dseWYAAAH0AAAAGgAAABoNIh0kaGVhZAAAARwAAAAvAAAANgxLumdoaGVhAAABTAAAABUAAAAkCAEEAmhtdHgAAAG8AAAABgAAAAYEAAAAbG9jYQAAAewAAAAGAAAABgANAABtYXhwAAABZAAAABsAAAAgAg4AHW5hbWUAAAIQAAAAOAAAAD4C5wsecG9zdAAAAkgAAAAMAAAAIAADAAB4AWNgZGAAYQ5+qdB4fpuvDNIsDCBwaQGTAIi+VlscBaJZGMDiHAxMIAoAtjIF/QB4AWNgZGBgYQACOAkUQQWMAAGRABAAAAB4AWNgZGBgYGJgAdMMUJILJMQgAWICAAH3AC4AeAFjYGFhYJzAwMrAwDST6QwDA0M/hGZ8zWDMyMmAChgFkDgKQMBw4CXDSwYWEBdIYgAFBgYA/8sIdAAABAAAAAAAAAB4AWNgYGBkYAZiBgYeBhYGBSDNAoRA/kuG//8hpDgjWJ4BAFVMBiYAAAAAAAANAAAAAQAAAAAEAAQAAAMAABEhESEEAPwABAD8AAAAeAEtxgUNgAAAAMHHIQTShTlOAty9/4bf7AARCwlBNhBw4L/43qXjYGUmf19TMuLcj/BJL3XfBg54AWNgZsALAAB9AAR4AWNgYGAEYj4gFgGygGwICQACOwAoAAAAAAABAAEAAQAAAA4AAAAAyP8AAA=="}) format("woff");\n }\n </style>\n <text x="0" y="0" font-size="20">\n <tspan font-family="chromacheck-colr" x="0" dy="20"></tspan>\n </text>\n </svg>`;e.width=20,e.height=100,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r),console.log("Waiting for COLR SVG to load"),await new Promise(e=>n.onload=e),console.log("Drawing canvas to detect COLR support"),t.drawImage(n,0,0);const o=200===t.getImageData(10,10,1,1).data[0];return console.log("Canvas check revealed COLR is supported? "+o),o}catch(e){return console.error("Couldn't load COLR font",e),!1}}n.d(t,"a",(function(){return i}));let o=!1;async function i(){if(!o)if(o=!0,await r()){const e=`url('${n(1330)}')`;document.fonts.add(new FontFace("Twemoji",e,{})),document.fonts.add(new FontFace("Twemoji",e,{weight:"600"})),document.fonts.add(new FontFace("Twemoji",e,{weight:"700"}))}else{const e=`url('${n(1331)}')`;document.fonts.add(new FontFace("Twemoji",e,{})),document.fonts.add(new FontFace("Twemoji",e,{weight:"600"})),document.fonts.add(new FontFace("Twemoji",e,{weight:"700"}))}}},function(e,t){e.exports="img/e2e/warning.78bb264.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(79),o=n.n(r),i=n(107),a=n(86),s=n.n(a),c=n(78),l=n.n(c),u=n(89),d=n(82),h=n(101),p=n(85),m=n(80),g=n(177),f=n(87);class _ extends l.a.PureComponent{constructor(e){super(e),o()(this,"fileUpload",l.a.createRef()),o()(this,"onCancel",()=>{this.state.resetting&&this.setState({resetting:!1}),this.props.onFinished(!1)}),o()(this,"onUseRecoveryKeyClick",()=>{this.setState({forceRecoveryKey:!0})}),o()(this,"validateRecoveryKeyOnChange",Object(i.debounce)(async()=>{await this.validateRecoveryKey()},200)),o()(this,"onRecoveryKeyChange",e=>{this.setState({recoveryKey:e.target.value,recoveryKeyFileError:null}),this.fileUpload.current&&(this.fileUpload.current.value=null),this.validateRecoveryKeyOnChange()}),o()(this,"onRecoveryKeyFileChange",async e=>{if(0===e.target.files.length)return;const t=e.target.files[0];if(t.size>128)this.setState({recoveryKeyFileError:!0,recoveryKeyCorrect:!1,recoveryKeyValid:!1});else{const e=await t.text();/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\s]+$/.test(e)?(this.setState({recoveryKeyFileError:null,recoveryKey:e.trim()}),await this.validateRecoveryKey()):this.setState({recoveryKeyFileError:!0,recoveryKeyCorrect:!1,recoveryKeyValid:!1,recoveryKey:""})}}),o()(this,"onRecoveryKeyFileUploadClick",()=>{this.fileUpload.current.click()}),o()(this,"onPassPhraseNext",async e=>{if(e.preventDefault(),this.state.passPhrase.length<=0)return;this.setState({keyMatches:null});const t={passphrase:this.state.passPhrase},n=await this.props.checkPrivateKey(t);n?this.props.onFinished(t):this.setState({keyMatches:n})}),o()(this,"onRecoveryKeyNext",async e=>{if(e.preventDefault(),!this.state.recoveryKeyValid)return;this.setState({keyMatches:null});const t={recoveryKey:this.state.recoveryKey},n=await this.props.checkPrivateKey(t);n?this.props.onFinished(t):this.setState({keyMatches:n})}),o()(this,"onPassPhraseChange",e=>{this.setState({passPhrase:e.target.value,keyMatches:null})}),o()(this,"onResetAllClick",e=>{e.preventDefault(),this.setState({resetting:!0})}),o()(this,"onConfirmResetAllClick",async()=>{f.a.toggleCurrentDialogVisibility();try{await Object(g.b)(async()=>{const e=d.a.get();await e.bootstrapCrossSigning({authUploadDeviceSigningKeys:async t=>{const n=u.getComponent("views.dialogs.InteractiveAuthDialog"),{finished:r}=f.a.createTrackedDialog("Cross-signing keys dialog","",n,{title:Object(m.a)("Setting up keys"),matrixClient:e,makeRequest:t}),[o]=await r;if(!o)throw new Error("Cross-signing key upload auth canceled")},setupNewCrossSigning:!0}),this.props.onFinished(!0)},!0)}catch(e){console.error(e),this.props.onFinished(!1)}}),this.state={recoveryKey:"",recoveryKeyValid:null,recoveryKeyCorrect:null,recoveryKeyFileError:null,forceRecoveryKey:!1,passPhrase:"",keyMatches:null,resetting:!1}}async validateRecoveryKey(){if(""!==this.state.recoveryKey)try{const e=d.a.get(),t=e.keyBackupKeyFromRecoveryKey(this.state.recoveryKey),n=await e.checkSecretStorageKey(t,this.props.keyInfo);this.setState({recoveryKeyValid:!0,recoveryKeyCorrect:n})}catch(e){this.setState({recoveryKeyValid:!1,recoveryKeyCorrect:!1})}else this.setState({recoveryKeyValid:null,recoveryKeyCorrect:null})}getKeyValidationText(){return this.state.recoveryKeyFileError?Object(m.a)("Wrong file type"):this.state.recoveryKeyCorrect?Object(m.a)("Looks good!"):this.state.recoveryKeyValid?Object(m.a)("Wrong Security Key"):null===this.state.recoveryKeyValid?"":Object(m.a)("Invalid Security Key")}render(){const e=u.getComponent("views.dialogs.BaseDialog"),t=u.getComponent("views.elements.DialogButtons"),n=this.props.keyInfo&&this.props.keyInfo.passphrase&&this.props.keyInfo.passphrase.salt&&this.props.keyInfo.passphrase.iterations,r=l.a.createElement("div",{className:"mx_AccessSecretStorageDialog_reset"},Object(m.a)("Forgotten or lost all recovery methods? <a>Reset all</a>",null,{a:e=>l.a.createElement("a",{href:"",onClick:this.onResetAllClick,className:"mx_AccessSecretStorageDialog_reset_link"},e)}));let o,i,a;if(this.state.resetting)i=Object(m.a)("Reset everything"),a=["mx_AccessSecretStorageDialog_titleWithIcon mx_AccessSecretStorageDialog_resetBadge"],o=l.a.createElement("div",null,l.a.createElement("p",null,Object(m.a)("Only do this if you have no other device to complete verification with.")),l.a.createElement("p",null,Object(m.a)("If you reset everything, you will restart with no trusted sessions, no trusted users, and might not be able to see past messages.")),l.a.createElement(t,{primaryButton:Object(m.a)("Reset"),onPrimaryButtonClick:this.onConfirmResetAllClick,hasCancel:!0,onCancel:this.onCancel,focus:!1,primaryButtonClass:"danger"}));else if(n&&!this.state.forceRecoveryKey){const e=u.getComponent("elements.AccessibleButton");let n;i=Object(m.a)("Security Phrase"),a=["mx_AccessSecretStorageDialog_titleWithIcon mx_AccessSecretStorageDialog_securePhraseTitle"],n=!1===this.state.keyMatches?l.a.createElement("div",{className:"mx_AccessSecretStorageDialog_keyStatus"},"👎 ",Object(m.a)("Unable to access secret storage. Please verify that you entered the correct Security Phrase.")):l.a.createElement("div",{className:"mx_AccessSecretStorageDialog_keyStatus"}),o=l.a.createElement("div",null,l.a.createElement("p",null,Object(m.a)("Enter your Security Phrase or <button>Use your Security Key</button> to continue.",{},{button:t=>l.a.createElement(e,{className:"mx_linkButton",element:"span",onClick:this.onUseRecoveryKeyClick},t)})),l.a.createElement("form",{className:"mx_AccessSecretStorageDialog_primaryContainer",onSubmit:this.onPassPhraseNext},l.a.createElement("input",{type:"password",id:"mx_passPhraseInput",className:"mx_AccessSecretStorageDialog_passPhraseInput",onChange:this.onPassPhraseChange,value:this.state.passPhrase,autoFocus:!0,autoComplete:"new-password",placeholder:Object(m.a)("Security Phrase")}),n,l.a.createElement(t,{primaryButton:Object(m.a)("Continue"),onPrimaryButtonClick:this.onPassPhraseNext,hasCancel:!0,onCancel:this.onCancel,focus:!1,primaryDisabled:0===this.state.passPhrase.length,additive:r})))}else{i=Object(m.a)("Security Key"),a=["mx_AccessSecretStorageDialog_titleWithIcon mx_AccessSecretStorageDialog_secureBackupTitle"];const e=s()({mx_AccessSecretStorageDialog_recoveryKeyFeedback:!0,mx_AccessSecretStorageDialog_recoveryKeyFeedback_valid:!0===this.state.recoveryKeyCorrect,mx_AccessSecretStorageDialog_recoveryKeyFeedback_invalid:!1===this.state.recoveryKeyCorrect}),n=l.a.createElement("div",{className:e},this.getKeyValidationText());o=l.a.createElement("div",null,l.a.createElement("p",null,Object(m.a)("Use your Security Key to continue.")),l.a.createElement("form",{className:"mx_AccessSecretStorageDialog_primaryContainer",onSubmit:this.onRecoveryKeyNext,spellCheck:!1,autoComplete:"off"},l.a.createElement("div",{className:"mx_AccessSecretStorageDialog_recoveryKeyEntry"},l.a.createElement("div",{className:"mx_AccessSecretStorageDialog_recoveryKeyEntry_textInput"},l.a.createElement(h.a,{type:"password",label:Object(m.a)("Security Key"),value:this.state.recoveryKey,onChange:this.onRecoveryKeyChange,forceValidity:this.state.recoveryKeyCorrect,autoComplete:"off"})),l.a.createElement("span",{className:"mx_AccessSecretStorageDialog_recoveryKeyEntry_entryControlSeparatorText"},Object(m.a)("or")),l.a.createElement("div",null,l.a.createElement("input",{type:"file",className:"mx_AccessSecretStorageDialog_recoveryKeyEntry_fileInput",ref:this.fileUpload,onChange:this.onRecoveryKeyFileChange}),l.a.createElement(p.a,{kind:"primary",onClick:this.onRecoveryKeyFileUploadClick},Object(m.a)("Upload")))),n,l.a.createElement(t,{primaryButton:Object(m.a)("Continue"),onPrimaryButtonClick:this.onRecoveryKeyNext,hasCancel:!0,cancelButton:Object(m.a)("Go Back"),cancelButtonClass:"danger",onCancel:this.onCancel,focus:!1,primaryDisabled:!this.state.recoveryKeyValid,additive:r})))}return l.a.createElement(e,{className:"mx_AccessSecretStorageDialog",onFinished:this.props.onFinished,title:i,titleClass:a},l.a.createElement("div",null,o))}}},function(e,t,n){"use strict";t.a={HomePage:"home_page",RoomView:"room_view",RoomDirectory:"room_directory",UserView:"user_view",GroupView:"group_view",MyGroups:"my_groups"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(83),o=n(89),i=n(87),a=n(80);const s=/^[a-z0-9=_\-./]+$/;async function c(e){void 0===e&&(e={});const t=o.getComponent("dialogs.QuestionDialog"),n=i.a.createTrackedDialog("Registration required","",t,{hasCancelButton:!0,quitOnly:!0,title:Object(a.a)("Sign In or Create Account"),description:Object(a.a)("Use your account or create a new one to continue."),button:Object(a.a)("Create Account"),extraButtons:[React.createElement("button",{key:"start_login",onClick:()=>{n.close(),r.a.dispatch({action:"start_login",screenAfterLogin:e.screen_after})}},Object(a.a)("Sign In"))],onFinished:t=>{t?r.a.dispatch({action:"start_registration",screenAfterLogin:e.screen_after}):e.go_home_on_cancel?r.a.dispatch({action:"view_home_page"}):e.go_welcome_on_cancel&&r.a.dispatch({action:"view_welcome_page"})}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(3),a=n(107);class s extends i.EventEmitter{constructor(...e){super(...e),o()(this,"_isResizing",!1),o()(this,"throttledMiddlePanel",Object(a.throttle)(()=>this.emit("middlePanelResized"),200))}get isResizing(){return this._isResizing}startResizing(){this._isResizing=!0,this.emit("isResizing",!0)}stopResizing(){this._isResizing=!1,this.emit("isResizing",!1)}noisyMiddlePanel(){this.emit("middlePanelResizedNoisy")}updateMiddlePanel(){this.throttledMiddlePanel(),this.noisyMiddlePanel()}notifyLeftHandleResized(){this.updateMiddlePanel()}notifyRightHandleResized(){this.updateMiddlePanel()}notifyTimelineHeightChanged(){this.updateMiddlePanel()}notifyWindowResized(){this.updateMiddlePanel()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(79),o=n.n(r),i=n(83),a=n(84),s=n(332),c=n(91),l=n(98);class u{constructor(){o()(this,"dispatcherRef",void 0),o()(this,"onAction",e=>{e.action===c.a.UpdateFontSize?this.setRootFontSize(e.size):e.action===c.a.UpdateSystemFont&&this.setSystemFont(e)}),o()(this,"setRootFontSize",e=>{const t=Math.max(Math.min(u.MAX_SIZE,e),u.MIN_SIZE);t!==e&&a.b.setValue("baseFontSize",null,l.a.DEVICE,t),document.querySelector(":root").style.fontSize=Object(s.a)(t)}),o()(this,"setSystemFont",({useSystemFont:e,font:t})=>{document.body.style.fontFamily=e?t:""}),this.dispatcherRef=null}start(){this.setRootFontSize(a.b.getValue("baseFontSize")),this.setSystemFont({useSystemFont:a.b.getValue("useSystemFont"),font:a.b.getValue("systemFont")}),this.dispatcherRef=i.a.register(this.onAction)}stop(){i.a.unregister(this.dispatcherRef)}}o()(u,"MIN_SIZE",8),o()(u,"MAX_SIZE",15),o()(u,"SIZE_DIFF",5)},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(95),l=n(80),u=n(101),d=n(85),h=n(82),p=n(341),m=n(83),g=n(151),f=n(123),_=n(81);let b=Object(_.a)("views.dialogs.CreateCommunityPrototypeDialog")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"avatarUploadRef",s.a.createRef()),i()(this,"onNameChange",e=>{const t=(e.target.value||"").toLowerCase().replace(/[^a-z0-9.\-_]/g,"-");this.setState({name:e.target.value,localpart:t})}),i()(this,"onSubmit",async e=>{if(e.preventDefault(),e.stopPropagation(),!this.state.busy){this.setState({busy:!0});try{let e="";this.state.avatarFile&&(e=await h.a.get().uploadContent(this.state.avatarFile));const t=await h.a.get().createGroup({localpart:this.state.localpart,profile:{name:this.state.name,avatar_url:e}});m.a.dispatch({action:"deselect_tags"},!0),m.a.dispatch({action:"select_tag",tag:t.group_id}),this.props.onFinished(!0),t.room_id?(await f.a.refreshGroupRooms(t.group_id),m.a.dispatch({action:"view_room",room_id:t.room_id}),Object(g.f)(t.room_id,this.state.name)):m.a.dispatch({action:"view_group",group_id:t.group_id,group_is_new:!0})}catch(e){console.error(e),this.setState({busy:!1,error:Object(l.a)("There was an error creating your community. The name may be taken or the server is unable to process your request.")})}}}),i()(this,"onAvatarChanged",e=>{if(e.target.files&&e.target.files.length){this.setState({busy:!0});const t=e.target.files[0],n=new FileReader;n.onload=e=>{this.setState({avatarFile:t,busy:!1,avatarPreview:e.target.result})},n.readAsDataURL(t)}else this.setState({avatarFile:null})}),i()(this,"onChangeAvatar",()=>{this.avatarUploadRef.current&&this.avatarUploadRef.current.click()}),this.state={name:"",localpart:"",error:null,busy:!1,avatarFile:null,avatarPreview:null}}render(){let e=null;this.state.localpart&&(e=s.a.createElement("span",{className:"mx_CreateCommunityPrototypeDialog_communityId"},Object(l.a)("Community ID: +<localpart />:%(domain)s",{domain:h.a.getHomeserverName()},{localpart:()=>s.a.createElement("u",null,this.state.localpart)}),s.a.createElement(p.b,{tooltip:Object(l.a)("Use this when referencing your community to others. The community ID cannot be changed.")})));let t=s.a.createElement("span",{className:"mx_CreateCommunityPrototypeDialog_subtext"},Object(l.a)("You can change this later if needed."));if(this.state.error){const e="mx_CreateCommunityPrototypeDialog_subtext mx_CreateCommunityPrototypeDialog_subtext_error";t=s.a.createElement("span",{className:e},this.state.error)}let n=s.a.createElement("img",{src:this.state.avatarPreview,className:"mx_CreateCommunityPrototypeDialog_avatar"});return this.state.avatarPreview||(n=s.a.createElement("div",{className:"mx_CreateCommunityPrototypeDialog_placeholderAvatar"})),s.a.createElement(c.a,{className:"mx_CreateCommunityPrototypeDialog",onFinished:this.props.onFinished,title:Object(l.a)("What's the name of your community or team?")},s.a.createElement("form",{onSubmit:this.onSubmit},s.a.createElement("div",{className:"mx_Dialog_content"},s.a.createElement("div",{className:"mx_CreateCommunityPrototypeDialog_colName"},s.a.createElement(u.a,{value:this.state.name,onChange:this.onNameChange,placeholder:Object(l.a)("Enter name"),label:Object(l.a)("Enter name")}),t,s.a.createElement("span",{className:"mx_CreateCommunityPrototypeDialog_subtext"}," ",e),s.a.createElement(d.a,{kind:"primary",onClick:this.onSubmit,disabled:this.state.busy},Object(l.a)("Create"))),s.a.createElement("div",{className:"mx_CreateCommunityPrototypeDialog_colAvatar"},s.a.createElement("input",{type:"file",style:{display:"none"},ref:this.avatarUploadRef,accept:"image/*",onChange:this.onAvatarChanged}),s.a.createElement(d.a,{onClick:this.onChangeAvatar,className:"mx_CreateCommunityPrototypeDialog_avatarContainer"},n),s.a.createElement("div",{className:"mx_CreateCommunityPrototypeDialog_tip"},s.a.createElement("b",null,Object(l.a)("Add image (optional)")),s.a.createElement("span",null,Object(l.a)("An image will help people identify your community.")))))))}})||r},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(3),a=n.n(i),s=n(564);function c(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}class l extends a.a{static get instance(){return l._instance||(l._instance=new l),l._instance}storeInvite(e,t){const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({roomId:e},t),r=this.generateIdOf(n);return localStorage.setItem("mx_threepid_invite_"+r,JSON.stringify(n)),this.translateInvite(n)}getWireInvites(){const e=[];for(let t=0;t<localStorage.length;t++){const n=localStorage.key(t);n.startsWith("mx_threepid_invite_")&&e.push(JSON.parse(localStorage.getItem(n)))}return e}getInvites(){return this.getWireInvites().map(e=>this.translateInvite(e))}pickBestInvite(){return this.getInvites()[0]}resolveInvite(e){localStorage.removeItem("mx_threepid_invite_"+e.id)}generateIdOf(t){return s.base32.stringify(e.from(JSON.stringify(t)))}translateInvite(e){return{id:this.generateIdOf(e),roomId:e.roomId,toEmail:e.email,signUrl:e.signurl,roomName:e.room_name,roomAvatarUrl:e.room_avatar_url,inviterName:e.inviter_name}}translateToWireFormat(e){return{email:e.toEmail,signurl:e.signUrl,room_name:e.roomName,room_avatar_url:e.roomAvatarUrl,inviter_name:e.inviterName}}}o()(l,"_instance",void 0)}).call(this,n(24).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o=n(79),i=n.n(o),a=n(78),s=n(85),c=n(101),l=n(338),u=n(83),d=n(81),h=n(91),p=n(454);let m=Object(d.a)("views.voip.DialPadModal")(r=class extends a.PureComponent{constructor(e){super(e),i()(this,"onCancelClick",()=>{this.props.onFinished(!1)}),i()(this,"onChange",e=>{this.setState({value:e.target.value})}),i()(this,"onFormSubmit",e=>{e.preventDefault(),this.onDialPress()}),i()(this,"onDigitPress",e=>{this.setState({value:this.state.value+e})}),i()(this,"onDeletePress",()=>{0!==this.state.value.length&&this.setState({value:this.state.value.slice(0,-1)})}),i()(this,"onDialPress",async()=>{const e={action:h.a.DialNumber,number:this.state.value};u.a.dispatch(e),this.props.onFinished(!0)}),this.state={value:""}}render(){const e=a.createElement(p.a,{onBackspacePress:this.onDeletePress});let t;return t=0!==this.state.value.length?a.createElement(c.a,{className:"mx_DialPadModal_field",id:"dialpad_number",value:this.state.value,autoFocus:!0,onChange:this.onChange,postfixComponent:e}):a.createElement(c.a,{className:"mx_DialPadModal_field",id:"dialpad_number",value:this.state.value,autoFocus:!0,onChange:this.onChange}),a.createElement("div",{className:"mx_DialPadModal"},a.createElement("div",null,a.createElement(s.a,{className:"mx_DialPadModal_cancel",onClick:this.onCancelClick})),a.createElement("div",{className:"mx_DialPadModal_header"},a.createElement("form",{onSubmit:this.onFormSubmit},t)),a.createElement("div",{className:"mx_DialPadModal_dialPad"},a.createElement(l.a,{hasDial:!0,onDigitPress:this.onDigitPress,onDeletePress:this.onDeletePress,onDialPress:this.onDialPress})))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(83),l=n(80),u=n(82),d=n(81),h=n(95),p=n(97);let m=Object(d.a)("views.dialogs.CreateGroupDialog")(r=class extends s.a.Component{constructor(...e){super(...e),i()(this,"state",{groupName:"",groupId:"",groupIdError:"",creating:!1,createError:null}),i()(this,"onGroupNameChange",e=>{this.setState({groupName:e.currentTarget.value})}),i()(this,"onGroupIdChange",e=>{this.setState({groupId:e.currentTarget.value})}),i()(this,"onGroupIdBlur",()=>{this.checkGroupId()}),i()(this,"onFormSubmit",e=>{if(e.preventDefault(),this.checkGroupId())return;const t={};""!==this.state.groupName&&(t.name=this.state.groupName),this.setState({creating:!0}),u.a.get().createGroup({localpart:this.state.groupId,profile:t}).then(e=>{c.a.dispatch({action:"view_group",group_id:e.group_id,group_is_new:!0}),this.props.onFinished(!0)}).catch(e=>{this.setState({createError:e})}).finally(()=>{this.setState({creating:!1})})}),i()(this,"onCancel",()=>{this.props.onFinished(!1)})}checkGroupId(){let e=null;return this.state.groupId?/^[a-z0-9=_\-./]*$/.test(this.state.groupId)||(e=Object(l.a)("Community IDs may only contain characters a-z, 0-9, or '=_-./'")):e=Object(l.a)("Community IDs cannot be empty."),this.setState({groupIdError:e,createError:null}),e}render(){if(this.state.creating)return s.a.createElement(p.a,null);let e;return this.state.createError&&(e=s.a.createElement("div",{className:"error",role:"alert"},s.a.createElement("div",null,Object(l.a)("Something went wrong whilst creating your community")),s.a.createElement("div",null,this.state.createError.message))),s.a.createElement(h.a,{className:"mx_CreateGroupDialog",onFinished:this.props.onFinished,title:Object(l.a)("Create Community")},s.a.createElement("form",{onSubmit:this.onFormSubmit},s.a.createElement("div",{className:"mx_Dialog_content"},s.a.createElement("div",{className:"mx_CreateGroupDialog_inputRow"},s.a.createElement("div",{className:"mx_CreateGroupDialog_label"},s.a.createElement("label",{htmlFor:"groupname"},Object(l.a)("Community Name"))),s.a.createElement("div",null,s.a.createElement("input",{id:"groupname",className:"mx_CreateGroupDialog_input",autoFocus:!0,size:64,placeholder:Object(l.a)("Example"),onChange:this.onGroupNameChange,value:this.state.groupName}))),s.a.createElement("div",{className:"mx_CreateGroupDialog_inputRow"},s.a.createElement("div",{className:"mx_CreateGroupDialog_label"},s.a.createElement("label",{htmlFor:"groupid"},Object(l.a)("Community ID"))),s.a.createElement("div",{className:"mx_CreateGroupDialog_input_group"},s.a.createElement("span",{className:"mx_CreateGroupDialog_prefix"},"+"),s.a.createElement("input",{id:"groupid",className:"mx_CreateGroupDialog_input mx_CreateGroupDialog_input_hasPrefixAndSuffix",size:32,placeholder:Object(l.a)("example"),onChange:this.onGroupIdChange,onBlur:this.onGroupIdBlur,value:this.state.groupId}),s.a.createElement("span",{className:"mx_CreateGroupDialog_suffix"},":",u.a.get().getDomain()))),s.a.createElement("div",{className:"error"},this.state.groupIdError),e),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement("input",{type:"submit",value:Object(l.a)("Create"),className:"mx_Dialog_primary"}),s.a.createElement("button",{onClick:this.onCancel},Object(l.a)("Cancel")))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(136),l=n(82),u=n(83),d=n(87),h=n(131),p=n(80),m=n(90),g=n(694),f=n(124),_=n(695),b=n(84),v=n(173),y=n(123),E=n(162),S=n(112),w=n(81),C=n(100),T=n(85),x=n(120),k=n(105),F=n(110),O=n(95),R=n(696),D=n(342),I=n(97),A=n(186);function N(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}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const P="mx_last_room_directory_instance";function L(e){f.a.trackEvent("RoomDirectory",e)}let j=Object(w.a)("structures.RoomDirectory")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"startTime",void 0),i()(this,"unmounted",!1),i()(this,"nextBatch",null),i()(this,"filterTimeout",void 0),i()(this,"protocols",void 0),i()(this,"refreshRoomList",()=>{this.state.selectedCommunityId?this.setState({publicRooms:y.a.getGroupRooms(this.state.selectedCommunityId).map(e=>({room_id:e.roomId,name:e.name,topic:e.topic,canonical_alias:e.canonicalAlias,num_joined_members:e.numJoinedMembers,avatarUrl:e.avatarUrl,world_readable:e.worldReadable,guest_can_join:e.guestsCanJoin})).filter(e=>{const t=this.state.filterString;if(t){const n=e=>(e||"").toLowerCase().includes(t.toLowerCase());return n(e.name)||n(e.topic)||n(e.canonical_alias)}return!0}),loading:!1}):(this.nextBatch=null,this.setState({publicRooms:[],loading:!0}),this.getMoreRooms())}),i()(this,"onRoomClicked",(e,t)=>{t.shiftKey&&!this.state.selectedCommunityId&&(t.preventDefault(),this.removeFromDirectory(e))}),i()(this,"onOptionChange",(e,t)=>{this.nextBatch=null,this.setState({publicRooms:[],roomServer:e,instanceId:t,error:null},this.refreshRoomList),localStorage.setItem("mx_last_room_directory_server",e),t?localStorage.setItem(P,t):localStorage.removeItem(P)}),i()(this,"onFillRequest",e=>e||!this.nextBatch?Promise.resolve(!1):this.getMoreRooms()),i()(this,"onFilterChange",e=>{this.setState({filterString:e||""}),this.filterTimeout&&clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{this.filterTimeout=null,this.refreshRoomList()},700)}),i()(this,"onFilterClear",()=>{this.setState({filterString:""},this.refreshRoomList),this.filterTimeout&&clearTimeout(this.filterTimeout)}),i()(this,"onJoinFromSearchClick",e=>{if(this.state.instanceId&&this.state.instanceId!==_.a){const t=Object(g.b)(this.protocols,this.state.instanceId),n=Object(g.a)(this.protocols,this.state.instanceId),r=t?this.getFieldsForThirdPartyLocation(e,this.protocols[t],n):null;if(!r){const e=m.a.get().brand;return void d.a.createTrackedDialog("Unable to join network","",k.a,{title:Object(p.a)("Unable to join network"),description:Object(p.a)("%(brand)s does not know how to join a room on this network",{brand:e})})}l.a.get().getThirdpartyLocation(t,r).then(e=>{e.length>0&&e[0].alias?this.showRoomAlias(e[0].alias,!0):d.a.createTrackedDialog("Room not found","",k.a,{title:Object(p.a)("Room not found"),description:Object(p.a)("Couldn't find a matching Matrix room")})},e=>{d.a.createTrackedDialog("Fetching third party location failed","",k.a,{title:Object(p.a)("Fetching third party location failed"),description:Object(p.a)("Unable to look up room ID from server")})})}else-1==e.indexOf(":")&&(e=e+":"+this.state.roomServer),this.showRoomAlias(e,!0)}),i()(this,"onPreviewClick",(e,t)=>{this.showRoom(t,null,!1,!0),e.stopPropagation()}),i()(this,"onViewClick",(e,t)=>{this.showRoom(t),e.stopPropagation()}),i()(this,"onJoinClick",(e,t)=>{this.showRoom(t,null,!0),e.stopPropagation()}),i()(this,"onCreateRoomClick",()=>{this.onFinished(),u.a.dispatch({action:"view_create_room",public:!0,defaultName:this.state.filterString.trim()})}),i()(this,"onFinished",()=>{S.a.instance.trackRoomDirectory(this.startTime),this.props.onFinished(!1)}),S.a.instance.trackRoomDirectoryBegin(),this.startTime=S.a.getTimestamp();const t=b.b.getValue("feature_communities_v2_prototypes")?v.a.getSelectedTags()[0]:null;let n=!0;l.a.get()?t?(n=!1,E.a.getGroupProfileCached(l.a.get(),this.state.selectedCommunityId).then(e=>{this.setState({communityName:e.name})})):l.a.get().getThirdpartyProtocols().then(e=>{var t,n,r;this.protocols=e;const o=l.a.getHomeserverName(),i=localStorage.getItem("mx_last_room_directory_server"),a=localStorage.getItem(P);let s=o;(null!==(t=m.a.get().roomDirectory)&&void 0!==t&&null!==(n=t.servers)&&void 0!==n&&n.includes(i)||null!==(r=b.b.getValue("room_directory_servers"))&&void 0!==r&&r.includes(i))&&(s=i);let c=null;if(s!==o||a!==_.a&&!Object.values(this.protocols).some(e=>e.instances.some(e=>e.instance_id===a))||(c=a),this.state.instanceId!==c||this.state.roomServer!==s)return this.setState({protocolsLoading:!1,instanceId:c,roomServer:s}),void this.refreshRoomList();this.setState({protocolsLoading:!1})},e=>{if(console.warn("error loading third party protocols: "+e),this.setState({protocolsLoading:!1}),l.a.get().isGuest())return;L("Failed to get protocol list from homeserver");const t=m.a.get().brand;this.setState({error:Object(p.a)("%(brand)s failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.",{brand:t})})}):n=!1,this.state={publicRooms:[],loading:!0,error:null,instanceId:localStorage.getItem(P),roomServer:localStorage.getItem("mx_last_room_directory_server"),filterString:this.props.initialText||"",selectedCommunityId:t,communityName:null,protocolsLoading:n}}componentDidMount(){this.refreshRoomList()}componentWillUnmount(){this.filterTimeout&&clearTimeout(this.filterTimeout),this.unmounted=!0}getMoreRooms(){if(this.state.selectedCommunityId)return Promise.resolve(!1);if(!l.a.get())return Promise.resolve(!1);this.setState({loading:!0});const e=this.state.filterString,t=this.state.roomServer,n=this.nextBatch,r={limit:20};return t!=l.a.getHomeserverName()&&(r.server=t),this.state.instanceId===_.a?r.include_all_networks=!0:this.state.instanceId&&(r.third_party_instance_id=this.state.instanceId),this.nextBatch&&(r.since=this.nextBatch),e&&(r.filter={generic_search_term:e}),l.a.get().publicRooms(r).then(r=>{if(e!=this.state.filterString||t!=this.state.roomServer||n!=this.nextBatch)return!1;if(this.unmounted)return!1;if(this.state.filterString){const e=r.total_room_count_estimate||r.chunk.length;S.a.instance.trackRoomDirectorySearch(e,this.state.filterString)}return this.nextBatch=r.next_batch,this.setState(e=>M(M({},e),{},{publicRooms:[...e.publicRooms,...r.chunk||[]],loading:!1})),Boolean(r.next_batch)},r=>{if(e!=this.state.filterString||t!=this.state.roomServer||n!=this.nextBatch)return!1;if(this.unmounted)return!1;console.error("Failed to get publicRooms: %s",JSON.stringify(r)),L("Failed to get public room list");const o=m.a.get().brand;this.setState({loading:!1,error:Object(p.a)("%(brand)s failed to get the public room list.",{brand:o})+(r&&r.message)?r.message:Object(p.a)("The homeserver may be unavailable or overloaded.")})})}removeFromDirectory(e){const t=U(e),n=e.name||t||Object(p.a)("Unnamed room");let r;r=t?Object(p.a)("Delete the room address %(alias)s and remove %(name)s from the directory?",{alias:t,name:n}):Object(p.a)("Remove %(name)s from the directory?",{name:n}),d.a.createTrackedDialog("Remove from Directory","",F.a,{title:Object(p.a)("Remove from Directory"),description:r,onFinished:r=>{if(!r)return;const o=d.a.createDialog(I.a);let i=Object(p.a)("remove %(name)s from the directory.",{name:n});l.a.get().setRoomDirectoryVisibility(e.room_id,c.f.Private).then(()=>{if(t)return i=Object(p.a)("delete the address."),l.a.get().deleteAlias(t)}).then(()=>{o.close(),this.refreshRoomList()},e=>{o.close(),this.refreshRoomList(),console.error("Failed to "+i+": "+e),d.a.createTrackedDialog("Remove from Directory Error","",k.a,{title:Object(p.a)("Error"),description:e&&e.message?e.message:Object(p.a)("The server may be unavailable or overloaded")})})}})}showRoomAlias(e,t=!1){this.showRoom(null,e,t)}showRoom(e,t,n=!1,r=!1){this.onFinished();const o={action:"view_room",auto_join:n,should_peek:r,_type:"room_directory"};if(e){if(l.a.get().isGuest()&&!e.world_readable&&!e.guest_can_join)return void u.a.dispatch({action:"require_registration"});t||(t=U(e)),o.oob_data={avatarUrl:e.avatar_url,name:e.name||t||Object(p.a)("Unnamed room")},this.state.roomServer&&(o.via_servers=[this.state.roomServer],o.opts={viaServers:[this.state.roomServer]})}t?o.room_alias=t:o.room_id=e.room_id,u.a.dispatch(o)}createRoomCells(e){const t=l.a.get(),n=t.getRoom(e.room_id),r=n&&"join"===n.getMyMembership(),o=t.isGuest();let i,a;r||!e.world_readable&&!o||(i=s.a.createElement(T.a,{kind:"secondary",onClick:t=>this.onPreviewClick(t,e)},Object(p.a)("Preview"))),r?a=s.a.createElement(T.a,{kind:"secondary",onClick:t=>this.onViewClick(t,e)},Object(p.a)("View")):o||(a=s.a.createElement(T.a,{kind:"primary",onClick:t=>this.onJoinClick(t,e)},Object(p.a)("Join")));let c=e.name||U(e)||Object(p.a)("Unnamed room");c.length>80&&(c=c.substring(0,80)+"...");let u=e.topic||"";u.length>800&&(u=u.substring(0,800)+"..."),u=Object(h.f)(u);let d=null;return e.avatar_url&&(d=Object(C.b)(e.avatar_url).getSquareThumbnailHttp(32)),[s.a.createElement("div",{key:e.room_id+"_avatar",onMouseDown:t=>this.onRoomClicked(e,t),className:"mx_RoomDirectory_roomAvatar"},s.a.createElement(x.a,{width:32,height:32,resizeMethod:"crop",name:c,idName:c,url:d})),s.a.createElement("div",{key:e.room_id+"_description",onMouseDown:t=>this.onRoomClicked(e,t),className:"mx_RoomDirectory_roomDescription"},s.a.createElement("div",{className:"mx_RoomDirectory_name",onMouseDown:t=>this.onRoomClicked(e,t)},c)," ",s.a.createElement("div",{className:"mx_RoomDirectory_topic",onMouseDown:t=>this.onRoomClicked(e,t),dangerouslySetInnerHTML:{__html:u}}),s.a.createElement("div",{className:"mx_RoomDirectory_alias",onMouseDown:t=>this.onRoomClicked(e,t)},U(e))),s.a.createElement("div",{key:e.room_id+"_memberCount",onMouseDown:t=>this.onRoomClicked(e,t),className:"mx_RoomDirectory_roomMemberCount"},e.num_joined_members),s.a.createElement("div",{key:e.room_id+"_preview",onMouseDown:t=>this.onRoomClicked(e,t),className:"mx_RoomDirectory_preview"},i),s.a.createElement("div",{key:e.room_id+"_join",onMouseDown:t=>this.onRoomClicked(e,t),className:"mx_RoomDirectory_join"},a)]}stringLooksLikeId(e,t){let n=/^#[^\s]+:[^\s]/;return t&&t.regexp&&(n=new RegExp(t.regexp)),n.test(e)}getFieldsForThirdPartyLocation(e,t,n){const r=t.location_fields;if(!r)return null;const o={};for(let e=0;e<r.length-1;++e){const t=r[e];if(void 0===n.fields[t])return null;o[t]=n.fields[t]}return o[r[r.length-1]]=e,o}render(){let e,t;if(this.state.error)e=this.state.error;else if(this.state.protocolsLoading)e=s.a.createElement(I.a,null);else{const t=(this.state.publicRooms||[]).reduce((e,t)=>e.concat(this.createRoomCells(t)),[]);let n;this.state.loading&&(n=s.a.createElement(I.a,null));const r=s.a.createElement(s.a.Fragment,null,s.a.createElement("hr",null),s.a.createElement(T.a,{kind:"primary",onClick:this.onCreateRoomClick,className:"mx_RoomDirectory_newRoom"},Object(p.a)("Create new room")));let o,i;0!==t.length||this.state.loading?(o=s.a.createElement("div",{className:"mx_RoomDirectory_table"},t),this.state.loading||this.nextBatch||(i=r)):i=s.a.createElement(s.a.Fragment,null,s.a.createElement("h5",null,Object(p.a)('No results for "%(query)s"',{query:this.state.filterString.trim()})),s.a.createElement("p",null,Object(p.a)("Try different words or check for typos. Some results may not be visible as they're private and you need an invite to join them.")),r),e=s.a.createElement(D.a,{className:"mx_RoomDirectory_tableWrapper",onFillRequest:this.onFillRequest,stickyBottom:!1,startAtBottom:!1},o,n,i&&s.a.createElement("div",{className:"mx_RoomDirectory_footer"},i))}if(!this.state.protocolsLoading){const e=Object(g.b)(this.protocols,this.state.instanceId);let n;if(e&&this.protocols&&this.protocols[e]&&this.protocols[e].location_fields.length>0&&this.protocols[e].field_types){const t=this.protocols[e].location_fields.slice(-1)[0];n=this.protocols[e].field_types[t]}let r=Object(p.a)("Find a room…");this.state.instanceId&&this.state.instanceId!==_.a?n&&(r=n.placeholder):r=Object(p.a)("Find a room… (e.g. %(exampleRoom)s)",{exampleRoom:"#example:"+this.state.roomServer});let o=this.stringLooksLikeId(this.state.filterString,n);if(e){const t=Object(g.a)(this.protocols,this.state.instanceId);null===this.getFieldsForThirdPartyLocation(this.state.filterString,this.protocols[e],t)&&(o=!1)}let i=s.a.createElement(_.b,{protocols:this.protocols,onOptionChange:this.onOptionChange,selectedServerName:this.state.roomServer,selectedInstanceId:this.state.instanceId});this.state.selectedCommunityId&&(i=null),t=s.a.createElement("div",{className:"mx_RoomDirectory_listheader"},s.a.createElement(R.a,{className:"mx_RoomDirectory_searchbox",onChange:this.onFilterChange,onClear:this.onFilterClear,onJoinClick:this.onJoinFromSearchClick,placeholder:r,showJoinButton:o,initialText:this.props.initialText}),i)}const n=Object(p.a)("If you can't find the room you're looking for, ask for an invite or <a>Create a new room</a>.",null,{a:e=>s.a.createElement(T.a,{kind:"secondary",onClick:this.onCreateRoomClick},e)}),r=this.state.selectedCommunityId?Object(p.a)("Explore rooms in %(communityName)s",{communityName:this.state.communityName||this.state.selectedCommunityId}):Object(p.a)("Explore rooms");return s.a.createElement(O.a,{className:"mx_RoomDirectory_dialog",hasCancel:!0,onFinished:this.onFinished,title:r},s.a.createElement("div",{className:"mx_RoomDirectory"},n,s.a.createElement("div",{className:"mx_RoomDirectory_list"},t,e)))}})||r;function U(e){return Object(A.a)(e.canonical_alias,e.aliases)}},function(e,t,n){"use strict";function r(e,t){if(!t)return null;for(const n of Object.keys(e))if(e[n].instances||!(e[n].instances instanceof Array))for(const r of e[n].instances)if(r.instance_id==t)return r}function o(e,t){if(!t)return null;for(const n of Object.keys(e))if(e[n].instances||!(e[n].instances instanceof Array))for(const r of e[n].instances)if(r.instance_id==t)return n}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(92),o=n.n(r),i=n(78),a=n.n(i),s=n(82),c=n(694),l=n(103),u=n(80),d=n(90),h=n(326),p=n(87),m=n(84),g=n(157),f=n(98),_=n(429),b=n(110),v=n(143),y=n(130);const E="ALL_ROOMS",S=Object(g.a)({deriveData:async({value:e})=>{try{return await s.a.get().publicRooms({limit:1,server:e}),{}}catch(e){return{error:e}}},rules:[{key:"required",test:async({value:e})=>!!e,invalid:()=>Object(u.a)("Enter a server name")},{key:"available",final:!0,test:async(e,{error:t})=>!t,valid:()=>Object(u.a)("Looks good"),invalid:({error:e})=>"M_FORBIDDEN"===e.errcode?Object(u.a)("You are not allowed to view this server's rooms list"):Object(u.a)("Can't find this server or its room list")}]});t.b=({onOptionChange:e,protocols:t={},selectedServerName:n,selectedInstanceId:r})=>{const[g,w,C,T]=Object(l.q)(),x=Object(h.b)("room_directory_servers"),[k,F]=Object(i.useState)(x),O=(t,n)=>()=>{e(t,n),T()},R=e=>{F(e),m.b.setValue("room_directory_servers",null,f.a.ACCOUNT,e)};let D;if(Object(i.useEffect)(()=>{F(x)},[x]),g){const i=d.a.get().roomDirectory||{},c=s.a.getHomeserverName(),h=new Set(i.servers),m=new Set(k.filter(e=>!h.has(e)&&e!==c)),g=[c,...Array.from(h).filter(e=>e!==c).sort(),...Array.from(m).sort()],f=g.map(o=>{const i=o===n,s=[],d=o===c?Object.values(t):[];let h,f;if(d.length>0&&d.push({instances:[{fields:[],network_id:"",instance_id:E,desc:Object(u.a)("All rooms")}],location_fields:[],user_fields:[],field_types:{},icon:""}),d.forEach(({instances:e=[]})=>{[...e].sort((e,t)=>Object(y.a)(t.desc,e.desc)).forEach(({desc:e,instance_id:t})=>{s.push(a.a.createElement(l.h,{key:String(t),active:i&&t===r,onClick:O(o,t),label:e,className:"mx_NetworkDropdown_server_network"},e))})}),o===c&&(h=a.a.createElement("div",{className:"mx_NetworkDropdown_server_subtitle"},Object(u.a)("Your server"))),m.has(o)){const t=async()=>{T();const{finished:t}=p.a.createTrackedDialog("Network Dropdown","Remove server",b.a,{title:Object(u.a)("Are you sure?"),description:Object(u.a)("Are you sure you want to remove <b>%(serverName)s</b>",{serverName:o},{b:e=>a.a.createElement("b",null,e)}),button:Object(u.a)("Remove"),fixedWidth:!1},"mx_NetworkDropdown_dialog"),[n]=await t;n&&(R(g.filter(e=>e!==o)),i&&e(c,void 0))};f=a.a.createElement(l.f,{onClick:t,label:Object(u.a)("Remove server")})}return a.a.createElement(l.e,{label:o,className:"mx_NetworkDropdown_server",key:o},a.a.createElement("div",{className:"mx_NetworkDropdown_server_title"},o,f),h,a.a.createElement(l.h,{active:i&&!r,onClick:O(o,void 0),label:Object(u.a)("Matrix"),className:"mx_NetworkDropdown_server_network"},Object(u.a)("Matrix")),s)}),C=async()=>{T();const{finished:t}=p.a.createTrackedDialog("Network Dropdown","Add a new server",_.a,{title:Object(u.a)("Add a new server"),description:Object(u.a)("Enter the name of a new server you want to explore."),button:Object(u.a)("Add"),hasCancel:!1,placeholder:Object(u.a)("Server name"),validator:S,fixedWidth:!1},"mx_NetworkDropdown_dialog"),[n,r]=await t;n&&(k.includes(r)||R([...k,r]),e(r))},x=w.current.getBoundingClientRect();D=a.a.createElement(l.b,o()({},(I=x,{right:v.b.instance.windowWidth-I.right,top:I.top,chevronOffset:0,chevronFace:l.a.None}),{onFinished:T}),a.a.createElement("div",{className:"mx_NetworkDropdown_menu"},f,a.a.createElement(l.f,{className:"mx_NetworkDropdown_server_add",label:void 0,onClick:C},Object(u.a)("Add a new server..."))))}else{let e;if(r===E)e=Object(u.a)("All rooms");else if(r){const n=Object(c.a)(t,r);e=Object(u.a)("%(networkName)s rooms",{networkName:n.desc})}else e=Object(u.a)("Matrix rooms");D=a.a.createElement(l.c,{className:"mx_NetworkDropdown_handle",onClick:C,isExpanded:g},a.a.createElement("span",null,e)," ",a.a.createElement("span",{className:"mx_NetworkDropdown_handle_server"},"(",n,")"))}var I;return a.a.createElement("div",{className:"mx_NetworkDropdown",ref:w},D)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r,o=n(78),i=n.n(o),a=n(88),s=n.n(a),c=n(89),l=n(80),u=n(81);let d=Object(u.a)("views.elements.DirectorySearchBox")(r=class extends i.a.Component{constructor(e){super(e),this._collectInput=this._collectInput.bind(this),this._onClearClick=this._onClearClick.bind(this),this._onChange=this._onChange.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onJoinButtonClick=this._onJoinButtonClick.bind(this),this.input=null,this.state={value:this.props.initialText||""}}_collectInput(e){this.input=e}_onClearClick(){this.setState({value:""}),this.input&&(this.input.focus(),this.props.onClear&&this.props.onClear())}_onChange(e){this.input&&(this.setState({value:e.target.value}),this.props.onChange&&this.props.onChange(e.target.value))}_onKeyUp(e){"Enter"==e.key&&this.props.showJoinButton&&this.props.onJoinClick&&this.props.onJoinClick(this.state.value)}_onJoinButtonClick(){this.props.onJoinClick&&this.props.onJoinClick(this.state.value)}render(){const e=c.getComponent("elements.AccessibleButton");let t;return{mx_DirectorySearchBox:!0}[this.props.className]=!0,this.props.showJoinButton&&(t=i.a.createElement(e,{className:"mx_DirectorySearchBox_joinButton",onClick:this._onJoinButtonClick},Object(l.a)("Join"))),i.a.createElement("div",{className:`mx_DirectorySearchBox ${this.props.className} mx_textinput`},i.a.createElement("input",{type:"text",name:"dirsearch",value:this.state.value,className:"mx_textinput_icon mx_textinput_search",ref:this._collectInput,onChange:this._onChange,onKeyUp:this._onKeyUp,placeholder:this.props.placeholder,autoFocus:!0}),t,i.a.createElement(e,{className:"mx_DirectorySearchBox_clear",onClick:this._onClearClick}))}})||r;d.propTypes={className:s.a.string,onChange:s.a.func,onClear:s.a.func,onJoinClick:s.a.func,placeholder:s.a.string,showJoinButton:s.a.bool,initialText:s.a.string}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(78),o=n.n(r),i=n(89),a=n(80),s=n(90);function c({failures:e,source:t,continuation:n,onFinished:c}){const l=i.getComponent("dialogs.BaseDialog"),u=i.getComponent("views.elements.DialogButtons"),d=i.getComponent("elements.Spinner"),[h,p]=Object(r.useState)(2),[m,g]=Object(r.useState)(!1),[f,_]=Object(r.useState)(!1),[b,v]=Object(r.useState)(!1),y=Object(r.useRef)(c),E=new Map([["_afterCrossSigningLocalKeyChange",Object(a.a)("a new master key signature")],["checkOwnCrossSigningTrust",Object(a.a)("a new cross-signing key signature")],["setDeviceVerification",Object(a.a)("a device cross-signing signature")]]),S=Object(a.a)("a key signature"),w=Object(r.useCallback)(async()=>{try{_(!0);const e=new Promise((e,t)=>{y.current=t}).finally(()=>{g(!0)});await Promise.race([n(),e]),v(!0)}catch(e){p(e=>e-1)}finally{y.current=c,_(!1)}},[n,c]);let C;if(!b&&!m&&n&&h>0){const n=E.get(t)||S,r=s.a.get().brand;C=o.a.createElement("div",null,o.a.createElement("p",null,Object(a.a)("%(brand)s encountered an error during upload of:",{brand:r})),o.a.createElement("p",null,n),f&&o.a.createElement(d,null),o.a.createElement("pre",null,JSON.stringify(e,null,2)),o.a.createElement(u,{primaryButton:"Retry",hasCancel:!0,onPrimaryButtonClick:w,onCancel:y.current,primaryDisabled:f}))}else C=o.a.createElement("div",null,b?o.a.createElement("span",null,Object(a.a)("Upload completed")):m?o.a.createElement("span",null,Object(a.a)("Cancelled signature upload")):o.a.createElement("span",null,Object(a.a)("Unable to upload")),o.a.createElement(u,{primaryButton:Object(a.a)("OK"),hasCancel:!1,onPrimaryButtonClick:c}));return o.a.createElement(l,{title:b?Object(a.a)("Signature upload success"):Object(a.a)("Signature upload failed"),fixedWidth:!1,onFinished:()=>{}},C)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(82),p=n(89),m=n(80),g=n(81),f=n(100);let _=Object(g.a)("views.dialogs.IncomingSasDialog")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"_onFinished",()=>{this.props.onFinished(3===this.state.phase)}),s()(this,"_onCancelClick",()=>{this.props.onFinished(3===this.state.phase)}),s()(this,"_onContinueClick",()=>{this.setState({phase:2}),this.props.verifier.verify().then(()=>{this.setState({phase:3})}).catch(e=>{console.log("Verification failed",e)})}),s()(this,"_onVerifierShowSas",e=>{this._showSasEvent=e,this.setState({phase:1,sas:e.sas})}),s()(this,"_onVerifierCancel",e=>{this.setState({phase:4})}),s()(this,"_onSasMatchesClick",()=>{this._showSasEvent.confirm(),this.setState({phase:2})}),s()(this,"_onVerifiedDoneClick",()=>{this.props.onFinished(!0)});let t=0;this.props.verifier.cancelled&&(console.log("Verifier was cancelled in the background."),t=4),this._showSasEvent=null,this.state={phase:t,sasVerified:!1,opponentProfile:null,opponentProfileError:null},this.props.verifier.on("show_sas",this._onVerifierShowSas),this.props.verifier.on("cancel",this._onVerifierCancel),this._fetchOpponentProfile()}componentWillUnmount(){4!==this.state.phase&&3!==this.state.phase&&this.props.verifier.cancel("User cancel"),this.props.verifier.removeListener("show_sas",this._onVerifierShowSas)}async _fetchOpponentProfile(){try{const e=await h.a.get().getProfileInfo(this.props.verifier.userId);this.setState({opponentProfile:e})}catch(e){this.setState({opponentProfileError:e})}}_renderPhaseStart(){const e=p.getComponent("views.elements.DialogButtons"),t=p.getComponent("views.elements.Spinner"),n=p.getComponent("avatars.BaseAvatar"),r=this.props.verifier.userId===h.a.get().getUserId();let o;const i=this.state.opponentProfile;if(i){const e=i.avatar_url?Object(f.b)(i.avatar_url).getSquareThumbnailHttp(48):null;o=l.a.createElement("div",{className:"mx_IncomingSasDialog_opponentProfile"},l.a.createElement(n,{name:i.displayname,idName:this.props.verifier.userId,url:e,width:48,height:48,resizeMethod:"crop"}),l.a.createElement("h2",null,i.displayname))}else o=this.state.opponentProfileError?l.a.createElement("div",null,l.a.createElement(n,{name:this.props.verifier.userId.slice(1),idName:this.props.verifier.userId,width:48,height:48}),l.a.createElement("h2",null,this.props.verifier.userId)):l.a.createElement(t,null);const a=[l.a.createElement("p",{key:"p1"},Object(m.a)("Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.")),l.a.createElement("p",{key:"p2"},Object(m.a)("Verifying this user will mark their session as trusted, and also mark your session as trusted to them."))],s=[l.a.createElement("p",{key:"p1"},Object(m.a)("Verify this device to mark it as trusted. Trusting this device gives you and other users extra peace of mind when using end-to-end encrypted messages.")),l.a.createElement("p",{key:"p2"},Object(m.a)("Verifying this device will mark it as trusted, and users who have verified with you will trust this device."))];return l.a.createElement("div",null,o,r?s:a,l.a.createElement(e,{primaryButton:Object(m.a)("Continue"),hasCancel:!0,onPrimaryButtonClick:this._onContinueClick,onCancel:this._onCancelClick}))}_renderPhaseShowSas(){const e=p.getComponent("views.verification.VerificationShowSas");return l.a.createElement(e,{sas:this._showSasEvent.sas,onCancel:this._onCancelClick,onDone:this._onSasMatchesClick,isSelf:this.props.verifier.userId===h.a.get().getUserId(),inDialog:!0})}_renderPhaseWaitForPartnerToConfirm(){const e=p.getComponent("views.elements.Spinner");return l.a.createElement("div",null,l.a.createElement(e,null),l.a.createElement("p",null,Object(m.a)("Waiting for partner to confirm...")))}_renderPhaseVerified(){const e=p.getComponent("views.verification.VerificationComplete");return l.a.createElement(e,{onDone:this._onVerifiedDoneClick})}_renderPhaseCancelled(){const e=p.getComponent("views.verification.VerificationCancelled");return l.a.createElement(e,{onDone:this._onCancelClick})}render(){let e;switch(this.state.phase){case 0:e=this._renderPhaseStart();break;case 1:e=this._renderPhaseShowSas();break;case 2:e=this._renderPhaseWaitForPartnerToConfirm();break;case 3:e=this._renderPhaseVerified();break;case 4:e=this._renderPhaseCancelled()}const t=p.getComponent("dialogs.BaseDialog");return l.a.createElement(t,{title:Object(m.a)("Incoming Verification Request"),onFinished:this._onFinished,fixedWidth:!1},e)}},s()(o,"propTypes",{verifier:d.a.object.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(89),u=n(460),d=n(457),h=n(81);let p=Object(h.a)("structures.auth.CompleteSecurity")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onStoreUpdate",()=>{const e=u.b.sharedInstance();this.setState({phase:e.phase})});const t=u.b.sharedInstance();t.on("update",this.onStoreUpdate),t.start(),this.state={phase:t.phase}}componentWillUnmount(){const e=u.b.sharedInstance();e.off("update",this.onStoreUpdate),e.stop()}render(){const e=l.getComponent("auth.AuthPage"),t=l.getComponent("auth.CompleteSecurityBody"),{phase:n}=this.state;let r,o;if(n===u.a.Loading)return null;if(n===u.a.Intro)r=s.a.createElement("span",{className:"mx_CompleteSecurity_headerIcon mx_E2EIcon_warning"}),o=Object(c.a)("Verify this login");else if(n===u.a.Done)r=s.a.createElement("span",{className:"mx_CompleteSecurity_headerIcon mx_E2EIcon_verified"}),o=Object(c.a)("Session verified");else if(n===u.a.ConfirmSkip)r=s.a.createElement("span",{className:"mx_CompleteSecurity_headerIcon mx_E2EIcon_warning"}),o=Object(c.a)("Are you sure?");else{if(n!==u.a.Busy)throw new Error("Unknown phase "+n);r=s.a.createElement("span",{className:"mx_CompleteSecurity_headerIcon mx_E2EIcon_warning"}),o=Object(c.a)("Verify this login")}return s.a.createElement(e,null,s.a.createElement(t,null,s.a.createElement("h2",{className:"mx_CompleteSecurity_header"},r,o),s.a.createElement("div",{className:"mx_CompleteSecurity_body"},s.a.createElement(d.a,{onFinished:this.props.onFinished}))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79),o=n.n(r);class i{constructor(e,t,n){this.resizer=t,this.sizer=n,o()(this,"domNode",void 0),o()(this,"id",void 0),o()(this,"reverse",void 0),this.reverse=t.isReverseResizeHandle(e),this.domNode=this.reverse?e.nextElementSibling:e.previousElementSibling,this.id=e.getAttribute("data-id")}copyWith(e,t,n){return new(0,this.constructor)(e,t,n)}advance(e){let t=this.reverse?this.domNode.previousElementSibling:this.domNode.nextElementSibling;const n=e!==this.reverse;do{t=n?t.nextElementSibling:t.previousElementSibling}while(t&&!this.resizer.isResizeHandle(t));if(t){const e=this.copyWith(t,this.resizer,this.sizer);return e.reverse=this.reverse,e}}next(){return this.advance(!0)}previous(){return this.advance(!1)}size(){return this.sizer.getItemSize(this.domNode)}offset(){return this.sizer.getItemOffset(this.domNode)}start(){this.sizer.start(this.domNode)}finish(){this.sizer.finish(this.domNode)}getSize(){return this.sizer.getDesiredItemSize(this.domNode)}setRawSize(e){this.sizer.setItemSize(this.domNode,e)}setSize(e){this.setRawSize(Math.round(e)+"px");const t=this.resizer.config.onResized;t&&t(e,this.id,this.domNode)}clearSize(){this.sizer.clearItemSize(this.domNode);const e=this.resizer.config.onResized;e&&e(null,this.id,this.domNode)}first(){const e=Array.from(this.domNode.parentElement.children).find(e=>this.resizer.isResizeHandle(e));if(e)return this.copyWith(e,this.resizer,this.sizer)}last(){const e=Array.from(this.domNode.parentElement.children).reverse().find(e=>this.resizer.isResizeHandle(e));if(e)return this.copyWith(e,this.resizer,this.sizer)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(e,t,n){this.container=e,this.vertical=t,this.reverse=n}getItemOffset(e){const t=(this.vertical?e.offsetTop:e.offsetLeft)-this.getOffset();return this.reverse?this.getTotalSize()-(t+this.getItemSize(e)):t}getItemSize(e){return this.vertical?e.offsetHeight:e.offsetWidth}getTotalSize(){return this.vertical?this.container.offsetHeight:this.container.offsetWidth}getOffset(){return this.vertical?this.container.offsetTop:this.container.offsetLeft}getPageOffset(){let e=this.container,t=0;for(;e;){t+=this.vertical?e.offsetTop:e.offsetLeft,e=e.offsetParent}return t}getDesiredItemSize(e){return this.vertical?e.style.height:e.style.width}setItemSize(e,t){this.vertical?e.style.height=t:e.style.width=t}clearItemSize(e){this.vertical?e.style.height=null:e.style.width=null}start(e){}finish(e){}offsetFromEvent(e){const t=this.vertical?e.pageY:e.pageX;return this.reverse?this.getPageOffset()+this.getTotalSize()-t:t-this.getPageOffset()}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));var r=n(78);const o=(e,t)=>{const n=Object(r.useRef)();Object(r.useEffect)(()=>{n.current=e},[e]),Object(r.useEffect)(()=>{const e=setTimeout(()=>{n.current()},t);return()=>clearTimeout(e)},[t])},i=(e,t,n)=>{const[o,i]=Object(r.useState)(n);return((e,t)=>{const n=Object(r.useRef)();Object(r.useEffect)(()=>{n.current=e},[e]),Object(r.useEffect)(()=>{const e=setInterval(()=>{n.current()},t);return()=>clearInterval(e)},[t])})(()=>i(e=>e-1),t),0===o&&e(),o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));var r,o=n(79),i=n.n(o),a=n(78),s=n(86),c=n.n(s),l=n(883),u=n(705),d=n(83),h=n(80),p=n(437),m=n(138),g=n(438),f=n(91),_=n(706),b=n(711),v=n(712),y=n(713),E=n(115),S=n(84),w=n(156),C=n(717),T=n(106),x=n(208),k=n(718),F=n(876),O=n(81),R=n(100),D=n(102),I=n(179),A=n(143);const N=["mx_RoomSearch_input","mx_RoomSearch_minimizedHandle","mx_RoomSublist_headerText","mx_RoomTile","mx_RoomSublist_showNButton"];let M=Object(O.a)("structures.LeftPanel")(r=class extends a.Component{constructor(e){super(e),i()(this,"ref",Object(a.createRef)()),i()(this,"listContainerRef",Object(a.createRef)()),i()(this,"groupFilterPanelWatcherRef",void 0),i()(this,"bgImageWatcherRef",void 0),i()(this,"focusedElement",null),i()(this,"isDoingStickyHeaders",!1),i()(this,"updateActiveSpace",e=>{this.setState({activeSpace:e})}),i()(this,"onDialPad",()=>{d.a.fire(f.a.OpenDialPad)}),i()(this,"onExplore",()=>{d.a.fire(f.a.ViewRoomDirectory)}),i()(this,"refreshStickyHeaders",()=>{this.listContainerRef.current&&this.handleStickyHeaders(this.listContainerRef.current)}),i()(this,"onBreadcrumbsUpdate",()=>{const e=y.a.instance.visible;if(e!==this.state.showBreadcrumbs){if(this.setState({showBreadcrumbs:e}),!this.listContainerRef.current)return;this.handleStickyHeaders(this.listContainerRef.current)}}),i()(this,"onBackgroundImageUpdate",()=>{let e=x.a.instance.getHttpAvatarUrl(32);const t=S.b.getValue("RoomList.backgroundImage");t&&(e=Object(R.b)(t).getSquareThumbnailHttp(32));const n=`url(${e})`;e?document.body.style.getPropertyValue("--avatar-url")!==n&&document.body.style.setProperty("--avatar-url",n):document.body.style.removeProperty("--avatar-url")}),i()(this,"onScroll",e=>{const t=e.target;this.handleStickyHeaders(t)}),i()(this,"onFocus",e=>{this.focusedElement=e.target}),i()(this,"onBlur",()=>{this.focusedElement=null}),i()(this,"onKeyDown",e=>{if(!this.focusedElement)return;const t=Object(I.f)().getRoomListAction(e);switch(t){case I.e.NextRoom:case I.e.PrevRoom:e.stopPropagation(),e.preventDefault(),this.onMoveFocus(t===I.e.PrevRoom)}}),i()(this,"selectRoom",()=>{const e=this.listContainerRef.current.querySelector(".mx_RoomTile");if(e)return e.click(),!0}),i()(this,"onMoveFocus",e=>{let t,n=this.focusedElement,r=!1;do{const o=e?n.lastElementChild:n.firstElementChild,i=e?n.previousElementSibling:n.nextElementSibling;r?o?n=o:i?n=i:(r=!1,n=n.parentElement):i?(n=i,r=!0):n=n.parentElement,n&&(t=n.classList)}while(n&&(!N.some(e=>t.contains(e))||null===n.offsetParent));n&&(n.focus(),this.focusedElement=n)}),this.state={showBreadcrumbs:y.a.instance.visible,showGroupFilterPanel:S.b.getValue("TagPanel.enableTagPanel"),activeSpace:D.g.instance.activeSpace},y.a.instance.on(E.b,this.onBreadcrumbsUpdate),w.b.instance.on(w.a,this.onBreadcrumbsUpdate),x.a.instance.on(E.b,this.onBackgroundImageUpdate),D.g.instance.on(D.e,this.updateActiveSpace),this.bgImageWatcherRef=S.b.watchSetting("RoomList.backgroundImage",null,this.onBackgroundImageUpdate),this.groupFilterPanelWatcherRef=S.b.watchSetting("TagPanel.enableTagPanel",null,()=>{this.setState({showGroupFilterPanel:S.b.getValue("TagPanel.enableTagPanel")})})}componentDidMount(){var e;A.b.instance.trackElementDimensions("ListContainer",this.listContainerRef.current),A.b.instance.on("ListContainer",this.refreshStickyHeaders),null===(e=this.listContainerRef.current)||void 0===e||e.addEventListener("scroll",this.onScroll,{passive:!0})}componentWillUnmount(){var e;S.b.unwatchSetting(this.groupFilterPanelWatcherRef),S.b.unwatchSetting(this.bgImageWatcherRef),y.a.instance.off(E.b,this.onBreadcrumbsUpdate),w.b.instance.off(w.a,this.onBreadcrumbsUpdate),x.a.instance.off(E.b,this.onBackgroundImageUpdate),D.g.instance.off(D.e,this.updateActiveSpace),A.b.instance.stopTrackingElementDimensions("ListContainer"),A.b.instance.removeListener("ListContainer",this.refreshStickyHeaders),null===(e=this.listContainerRef.current)||void 0===e||e.removeEventListener("scroll",this.onScroll)}componentDidUpdate(e,t){t.activeSpace!==this.state.activeSpace&&this.refreshStickyHeaders()}handleStickyHeaders(e){this.isDoingStickyHeaders||(this.isDoingStickyHeaders=!0,window.requestAnimationFrame(()=>{this.doStickyHeaders(e),this.isDoingStickyHeaders=!1}))}doStickyHeaders(e){const t=e.scrollTop,n=e.offsetHeight+e.scrollTop,r=e.querySelectorAll(".mx_RoomSublist:not(.mx_RoomSublist_hidden)"),o=new Map;let i,a;for(const e of r){const s=e.querySelector(".mx_RoomSublist_stickable");s.style.removeProperty("display");const c=.4,l=e.offsetTop+c*g.a<=t,u=e.offsetTop+c*g.a>=n;l||e===r[0]?(o.set(s,{stickyTop:!0}),i&&(i.style.display="none",o.set(i,{makeInvisible:!0})),i=s):u&&!a?(o.set(s,{stickyBottom:!0}),a=s):o.set(s,{})}for(const t of o.keys()){const n=o.get(t);if(n.makeInvisible)t.style.display="none";else{if(n.stickyTop){t.classList.contains("mx_RoomSublist_headerContainer_stickyTop")||t.classList.add("mx_RoomSublist_headerContainer_stickyTop");const n=e.parentElement.offsetTop+"px";t.style.top!==n&&(t.style.top=n)}else t.classList.contains("mx_RoomSublist_headerContainer_stickyTop")&&t.classList.remove("mx_RoomSublist_headerContainer_stickyTop"),t.style.top&&t.style.removeProperty("top");if(n.stickyBottom){t.classList.contains("mx_RoomSublist_headerContainer_stickyBottom")||t.classList.add("mx_RoomSublist_headerContainer_stickyBottom");const n=A.b.instance.windowHeight-(e.parentElement.offsetTop+e.parentElement.offsetHeight)+"px";t.style.bottom!==n&&(t.style.bottom=n)}else t.classList.contains("mx_RoomSublist_headerContainer_stickyBottom")&&t.classList.remove("mx_RoomSublist_headerContainer_stickyBottom"),t.style.bottom&&t.style.removeProperty("bottom");if(n.stickyTop||n.stickyBottom){t.classList.contains("mx_RoomSublist_headerContainer_sticky")||t.classList.add("mx_RoomSublist_headerContainer_sticky");const e=A.b.instance.getElementDimensions("ListContainer");if(e){const n=15,r=e.width-n+"px";t.style.width!==r&&(t.style.width=r)}}else n.stickyTop||n.stickyBottom||(t.classList.contains("mx_RoomSublist_headerContainer_sticky")&&t.classList.remove("mx_RoomSublist_headerContainer_sticky"),t.style.width&&t.style.removeProperty("width"))}}const s=e.parentElement;i?s.classList.add("mx_LeftPanel_roomListWrapper_stickyTop"):s.classList.remove("mx_LeftPanel_roomListWrapper_stickyTop"),a?s.classList.add("mx_LeftPanel_roomListWrapper_stickyBottom"):s.classList.remove("mx_LeftPanel_roomListWrapper_stickyBottom")}renderHeader(){return a.createElement("div",{className:"mx_LeftPanel_userHeader"},a.createElement(_.a,{isMinimized:this.props.isMinimized}))}renderBreadcrumbs(){if(this.state.showBreadcrumbs&&!this.props.isMinimized)return a.createElement(C.a,{className:"mx_LeftPanel_breadcrumbsContainer mx_AutoHideScrollbar",verticalScrollsHorizontally:!0,tabIndex:-1},a.createElement(v.a,null))}renderSearchDialExplore(){let e=null;return m.d.sharedInstance().getSupportsPstnProtocol()&&(e=a.createElement(T.a,{className:c()("mx_LeftPanel_dialPadButton",{}),onClick:this.onDialPad,title:Object(h.a)("Open dial pad")})),a.createElement("div",{className:"mx_LeftPanel_filterContainer",onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown},a.createElement(b.a,{isMinimized:this.props.isMinimized,onKeyDown:this.onKeyDown,onSelectRoom:this.selectRoom}),e,a.createElement(T.a,{className:c()("mx_LeftPanel_exploreButton",{mx_LeftPanel_exploreButton_space:!!this.state.activeSpace}),onClick:this.onExplore,title:Object(h.a)("Explore rooms")}))}render(){let e;this.state.showGroupFilterPanel&&(e=a.createElement("div",{className:"mx_LeftPanel_GroupFilterPanelContainer"},a.createElement(l.a,null),S.b.getValue("feature_custom_tags")?a.createElement(u.a,null):null));const t=a.createElement(p.b,{onKeyDown:this.onKeyDown,resizeNotifier:this.props.resizeNotifier,onFocus:this.onFocus,onBlur:this.onBlur,isMinimized:this.props.isMinimized,activeSpace:this.state.activeSpace,onResize:this.refreshStickyHeaders,onListCollapse:this.refreshStickyHeaders}),n=c()({mx_LeftPanel:!0,mx_LeftPanel_minimized:this.props.isMinimized}),r=c()("mx_LeftPanel_actualRoomListContainer","mx_AutoHideScrollbar");return a.createElement("div",{className:n,ref:this.ref},e,a.createElement("aside",{className:"mx_LeftPanel_roomListContainer"},this.renderHeader(),this.renderSearchDialExplore(),this.renderBreadcrumbs(),a.createElement(k.a,{onVisibilityChange:this.refreshStickyHeaders}),a.createElement("div",{className:"mx_LeftPanel_roomListWrapper"},a.createElement("div",{className:r,ref:this.listContainerRef,tabIndex:-1},t)),!this.props.isMinimized&&a.createElement(F.a,null)))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(83),l=n(173),u=n(106),d=n(86),h=n.n(d),p=n(80),m=n(81);let g=Object(m.a)("views.elements.UserTagTile")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"tagStoreRef",void 0),i()(this,"onTagStoreUpdate",()=>{const e=0===l.a.getSelectedTags().length;this.setState({selected:e})}),i()(this,"onTileClick",e=>{e.preventDefault(),e.stopPropagation(),c.a.dispatch({action:"deselect_tags"})}),this.state={selected:0===l.a.getSelectedTags().length}}componentDidMount(){this.tagStoreRef=l.a.addListener(this.onTagStoreUpdate)}componentWillUnmount(){this.tagStoreRef.remove()}render(){const e=h()({mx_TagTile:!0,mx_TagTile_prototype:!0,mx_TagTile_selected_prototype:this.state.selected,mx_TagTile_home:!0});return s.a.createElement(u.a,{className:e,onClick:this.onTileClick,title:Object(p.a)("Home")},s.a.createElement("div",{className:"mx_TagTile_avatar"},s.a.createElement("div",{className:"mx_TagTile_homeIcon"})))}})||r},function(e,t,n){"use strict";var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(657),l=n(117),u=n(89),d=n(83),h=n(86),p=n.n(h),m=n(145),g=n(81);let f=Object(g.a)("structures.CustomRoomTagPanel")(r=class extends s.a.Component{constructor(e){super(e),this.state={tags:c.a.getSortedTags()}}componentDidMount(){this._tagStoreToken=c.a.addListener(()=>{this.setState({tags:c.a.getSortedTags()})})}componentWillUnmount(){this._tagStoreToken&&this._tagStoreToken.remove()}render(){const e=this.state.tags.map(e=>s.a.createElement(_,{tag:e,key:e.name})),t=p()("mx_CustomRoomTagPanel",{mx_CustomRoomTagPanel_empty:0===this.state.tags.length});return s.a.createElement("div",{className:t},s.a.createElement("div",{className:"mx_CustomRoomTagPanel_divider"}),s.a.createElement(l.a,{className:"mx_CustomRoomTagPanel_scroller"},e))}})||r;class _ extends s.a.Component{constructor(...e){super(...e),i()(this,"onClick",()=>{d.a.dispatch({action:"select_custom_room_tag",tag:this.props.tag.name})})}render(){const e=u.getComponent("avatars.BaseAvatar"),t=u.getComponent("elements.AccessibleTooltipButton"),n=this.props.tag,r=p()({CustomRoomTagPanel_tileSelected:n.selected}),o=n.name,i=n.badgeNotifState;let a;if(i){const e=p()({mx_TagTile_badge:!0,mx_TagTile_badgeHighlight:i.hasMentions});a=s.a.createElement("div",{className:e},m.c(i.count))}return s.a.createElement(t,{className:r,onClick:this.onClick,title:o},s.a.createElement("div",{className:"mx_TagTile_avatar"},s.a.createElement(e,{name:n.avatarLetter,idName:o,width:40,height:40}),a))}}t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(86),l=n.n(c),u=n(82),d=n(83),h=n(91),p=n(80),m=n(103),g=n(192),f=n(707),_=n(87),b=n(708),v=n(84),y=n(243),E=n(85),S=n(90),w=n(461),C=n(208),T=n(115),x=n(120),k=n(106),F=n(98),O=n(163),R=n(176),D=n(173),I=n(151),A=n(121),N=n(105),M=n(709),P=n(113),L=n(710),j=n(102),U=n(184),B=n(81),G=n(147),V=n(434);let q=Object(B.a)("structures.UserMenu")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"dispatcherRef",void 0),i()(this,"themeWatcherRef",void 0),i()(this,"dndWatcherRef",void 0),i()(this,"buttonRef",Object(a.createRef)()),i()(this,"tagStoreRef",void 0),i()(this,"onRoom",e=>{this.removePendingJoinRoom(e.roomId)}),i()(this,"onTagStoreUpdate",()=>{this.forceUpdate()}),i()(this,"onProfileUpdate",async()=>{this.forceUpdate()}),i()(this,"onSelectedSpaceUpdate",async e=>{this.setState({selectedSpace:e})}),i()(this,"onThemeChanged",()=>{this.setState({isDarkTheme:this.isUserOnDarkTheme()})}),i()(this,"onAction",e=>{switch(e.action){case h.a.ToggleUserMenu:this.state.contextMenuPosition?this.setState({contextMenuPosition:null}):this.buttonRef.current&&this.buttonRef.current.click();break;case h.a.JoinRoom:this.addPendingJoinRoom(e.roomId);break;case h.a.JoinRoomReady:case h.a.JoinRoomError:this.removePendingJoinRoom(e.roomId)}}),i()(this,"onOpenMenuClick",e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this.setState({contextMenuPosition:t.getBoundingClientRect()})}),i()(this,"onContextMenu",e=>{e.preventDefault(),e.stopPropagation(),this.setState({contextMenuPosition:{left:e.clientX,top:e.clientY,width:20,height:0}})}),i()(this,"onCloseMenu",()=>{this.setState({contextMenuPosition:null})}),i()(this,"onSwitchThemeClick",e=>{e.preventDefault(),e.stopPropagation(),v.b.setValue("use_system_theme",null,F.a.DEVICE,!1);const t=this.state.isDarkTheme?"light":"dark";v.b.setValue("theme",null,F.a.DEVICE,t)}),i()(this,"onSettingsOpen",(e,t)=>{e.preventDefault(),e.stopPropagation();const n={action:h.a.ViewUserSettings,initialTabId:t};d.a.dispatch(n),this.setState({contextMenuPosition:null})}),i()(this,"onShowArchived",e=>{e.preventDefault(),e.stopPropagation(),console.log("TODO: Show archived rooms")}),i()(this,"onProvideFeedback",e=>{e.preventDefault(),e.stopPropagation(),_.a.createTrackedDialog("Feedback Dialog","",f.a),this.setState({contextMenuPosition:null})}),i()(this,"onSignOutClick",async e=>{var t;e.preventDefault(),e.stopPropagation();const n=u.a.get();n&&n.isCryptoEnabled()&&null!==(t=await n.exportRoomKeys())&&void 0!==t&&t.length?_.a.createTrackedDialog("Logout from LeftPanel","",b.a):d.a.dispatch({action:"logout"}),this.setState({contextMenuPosition:null})}),i()(this,"onSignInClick",()=>{d.a.dispatch({action:"start_login"}),this.setState({contextMenuPosition:null})}),i()(this,"onRegisterClick",()=>{d.a.dispatch({action:"start_registration"}),this.setState({contextMenuPosition:null})}),i()(this,"onHomeClick",e=>{e.preventDefault(),e.stopPropagation(),d.a.dispatch({action:"view_home_page"}),this.setState({contextMenuPosition:null})}),i()(this,"onCommunitySettingsClick",e=>{e.preventDefault(),e.stopPropagation(),_.a.createTrackedDialog("Edit Community","",M.a,{communityId:R.a.instance.getSelectedCommunityId()}),this.setState({contextMenuPosition:null})}),i()(this,"onCommunityMembersClick",e=>{e.preventDefault(),e.stopPropagation();const t=R.a.instance.getSelectedCommunityGeneralChat();t?(d.a.dispatch({action:"view_room",room_id:t.roomId},!0),d.a.dispatch({action:h.a.SetRightPanelPhase,phase:A.c.RoomMemberList})):_.a.createTrackedDialog("Failed to find general chat","",N.a,{title:Object(p.a)("Failed to find the general chat for this community"),description:Object(p.a)("Failed to find the general chat for this community")}),this.setState({contextMenuPosition:null})}),i()(this,"onCommunityInviteClick",e=>{e.preventDefault(),e.stopPropagation(),Object(I.e)(R.a.instance.getSelectedCommunityId()),this.setState({contextMenuPosition:null})}),i()(this,"onDndToggle",e=>{e.stopPropagation();const t=v.b.getValue("doNotDisturb");v.b.setValue("doNotDisturb",null,F.a.DEVICE,!t)}),i()(this,"renderContextMenu",()=>{if(!this.state.contextMenuPosition)return null;const e=R.a.instance.getSelectedCommunityName();let t;const r=S.a.get().hostSignup;if(u.a.get().isGuest())t=s.a.createElement("div",{className:"mx_UserMenu_contextMenu_header mx_UserMenu_contextMenu_guestPrompts"},Object(p.a)("Got an account? <a>Sign in</a>",{},{a:e=>s.a.createElement(E.a,{kind:"link",onClick:this.onSignInClick},e)}),Object(p.a)("New here? <a>Create an account</a>",{},{a:e=>s.a.createElement(E.a,{kind:"link",onClick:this.onRegisterClick},e)}));else if(r&&r&&r.url){const e=r.domains||[],n=u.a.get().getDomain(),o=e.filter(e=>e===n||n.endsWith("."+e));(!r.domains||o.length>0)&&(t=s.a.createElement(L.a,{onClick:this.onCloseMenu}))}let o,i=null;this.hasHomePage&&(i=s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconHome",label:Object(p.a)("Home"),onClick:this.onHomeClick})),v.b.getValue(P.a.Feedback)&&(o=s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconMessage",label:Object(p.a)("Feedback"),onClick:this.onProvideFeedback}));let a=s.a.createElement("div",{className:"mx_UserMenu_contextMenu_name"},s.a.createElement("span",{className:"mx_UserMenu_contextMenu_displayName"},C.a.instance.displayName),s.a.createElement("span",{className:"mx_UserMenu_contextMenu_userId"},u.a.get().getUserId())),c=s.a.createElement(s.a.Fragment,null,s.a.createElement(O.c,null,i,s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconBell",label:Object(p.a)("Notification settings"),onClick:e=>this.onSettingsOpen(e,g.a.Notifications)}),s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconLock",label:Object(p.a)("Security & privacy"),onClick:e=>this.onSettingsOpen(e,g.a.Security)}),s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconSettings",label:Object(p.a)("All settings"),onClick:e=>this.onSettingsOpen(e,null)}),o),s.a.createElement(O.c,{red:!0},s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconSignOut",label:Object(p.a)("Sign out"),onClick:this.onSignOutClick}))),d=null;if(e){const t=R.a.instance.getSelectedCommunityId();let n,r;a=s.a.createElement("div",{className:"mx_UserMenu_contextMenu_name"},s.a.createElement("span",{className:"mx_UserMenu_contextMenu_displayName"},e)),R.a.instance.canInviteTo(t)&&(r=s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconInvite",label:Object(p.a)("Invite"),onClick:this.onCommunityInviteClick})),R.a.instance.isAdminOf(t)&&(n=s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconSettings",label:Object(p.a)("Settings"),"aria-label":Object(p.a)("Community settings"),onClick:this.onCommunitySettingsClick})),c=s.a.createElement(O.c,null,n,s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconMembers",label:Object(p.a)("Members"),onClick:this.onCommunityMembersClick}),r),d=s.a.createElement(s.a.Fragment,null,s.a.createElement("hr",null),s.a.createElement("div",{className:"mx_UserMenu_contextMenu_header"},s.a.createElement("div",{className:"mx_UserMenu_contextMenu_name"},s.a.createElement("span",{className:"mx_UserMenu_contextMenu_displayName"},C.a.instance.displayName),s.a.createElement("span",{className:"mx_UserMenu_contextMenu_userId"},u.a.get().getUserId()))),s.a.createElement(O.c,null,s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconSettings",label:Object(p.a)("Settings"),"aria-label":Object(p.a)("User settings"),onClick:e=>this.onSettingsOpen(e,null)}),o),s.a.createElement(O.c,{red:!0},s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconSignOut",label:Object(p.a)("Sign out"),onClick:this.onSignOutClick})))}else u.a.get().isGuest()&&(c=s.a.createElement(s.a.Fragment,null,s.a.createElement(O.c,null,i,s.a.createElement(O.b,{iconClassName:"mx_UserMenu_iconSettings",label:Object(p.a)("Settings"),onClick:e=>this.onSettingsOpen(e,null)}),o)));const h=l()({mx_UserMenu_contextMenu:!0,mx_UserMenu_contextMenu_prototype:!!e});return s.a.createElement(O.e,{left:this.state.contextMenuPosition.width+this.state.contextMenuPosition.left-10,top:this.state.contextMenuPosition.top+this.state.contextMenuPosition.height+8,onFinished:this.onCloseMenu,className:h},s.a.createElement("div",{className:"mx_UserMenu_contextMenu_header"},a,s.a.createElement(k.a,{className:"mx_UserMenu_contextMenu_themeButton",onClick:this.onSwitchThemeClick,title:this.state.isDarkTheme?Object(p.a)("Switch to light mode"):Object(p.a)("Switch to dark mode")},s.a.createElement("img",{src:n(1335),alt:Object(p.a)("Switch theme"),width:16}))),t,c,d)}),this.state={contextMenuPosition:null,isDarkTheme:this.isUserOnDarkTheme(),pendingRoomJoin:new Set},C.a.instance.on(T.b,this.onProfileUpdate),j.g.spacesEnabled&&j.g.instance.on(j.e,this.onSelectedSpaceUpdate),this.dndWatcherRef=v.b.watchSetting("doNotDisturb",null,()=>this.forceUpdate())}get hasHomePage(){return!!Object(w.a)(S.a.get())}componentDidMount(){this.dispatcherRef=d.a.register(this.onAction),this.themeWatcherRef=v.b.watchSetting("theme",null,this.onThemeChanged),this.tagStoreRef=D.a.addListener(this.onTagStoreUpdate),u.a.get().on("Room",this.onRoom)}componentWillUnmount(){this.themeWatcherRef&&v.b.unwatchSetting(this.themeWatcherRef),this.dndWatcherRef&&v.b.unwatchSetting(this.dndWatcherRef),this.dispatcherRef&&d.a.unregister(this.dispatcherRef),C.a.instance.off(T.b,this.onProfileUpdate),this.tagStoreRef.remove(),j.g.spacesEnabled&&j.g.instance.off(j.e,this.onSelectedSpaceUpdate),u.a.get().removeListener("Room",this.onRoom)}isUserOnDarkTheme(){if(v.b.getValue("use_system_theme"))return window.matchMedia("(prefers-color-scheme: dark)").matches;{const e=v.b.getValue("theme");return e.startsWith("custom-")?Object(y.c)(e.substring("custom-".length)).is_dark:"dark"===e}}addPendingJoinRoom(e){this.setState({pendingRoomJoin:new Set(this.state.pendingRoomJoin).add(e)})}removePendingJoinRoom(e){this.state.pendingRoomJoin.delete(e)&&this.setState({pendingRoomJoin:new Set(this.state.pendingRoomJoin)})}render(){const e=u.a.get().getUserId(),t=C.a.instance.displayName||e,n=C.a.instance.getHttpAvatarUrl(32),r=R.a.instance.getSelectedCommunityName();let o,i=!1,a=Object(p.a)("User menu"),c=s.a.createElement("span",{className:"mx_UserMenu_userName"},t),d=s.a.createElement("span",{className:"mx_UserMenu_headerButtons"});if(this.state.selectedSpace)c=s.a.createElement("div",{className:"mx_UserMenu_doubleName"},s.a.createElement("span",{className:"mx_UserMenu_userName"},t),s.a.createElement(U.a,{room:this.state.selectedSpace},e=>s.a.createElement("span",{className:"mx_UserMenu_subUserName"},e)));else if(r)c=s.a.createElement("div",{className:"mx_UserMenu_doubleName"},s.a.createElement("span",{className:"mx_UserMenu_userName"},r),s.a.createElement("span",{className:"mx_UserMenu_subUserName"},t)),a=Object(p.a)("Community and user menu"),i=!0;else if(v.b.getValue("feature_communities_v2_prototypes"))c=s.a.createElement("div",{className:"mx_UserMenu_doubleName"},s.a.createElement("span",{className:"mx_UserMenu_userName"},Object(p.a)("Home")),s.a.createElement("span",{className:"mx_UserMenu_subUserName"},t)),i=!0;else if(v.b.getValue("feature_dnd")){const e=v.b.getValue("doNotDisturb");o=s.a.createElement(E.a,{onClick:this.onDndToggle,className:l()({mx_UserMenu_dnd:!0,mx_UserMenu_dnd_noisy:!e,mx_UserMenu_dnd_muted:e})})}this.props.isMinimized&&(c=null,d=null);const h=l()({mx_UserMenu:!0,mx_UserMenu_minimized:this.props.isMinimized,mx_UserMenu_prototype:i});return s.a.createElement(s.a.Fragment,null,s.a.createElement(m.c,{className:h,onClick:this.onOpenMenuClick,inputRef:this.buttonRef,label:a,isExpanded:!!this.state.contextMenuPosition,onContextMenu:this.onContextMenu},s.a.createElement("div",{className:"mx_UserMenu_row"},s.a.createElement("span",{className:"mx_UserMenu_userAvatarContainer"},s.a.createElement(x.a,{idName:e,name:t,url:n,width:32,height:32,resizeMethod:"crop",className:"mx_UserMenu_userAvatar"})),c,this.state.pendingRoomJoin.size>0&&s.a.createElement(G.a,null,s.a.createElement(V.a,{helpText:Object(p.a)("Currently joining %(count)s rooms",{count:this.state.pendingRoomJoin.size})})),o,d)),this.renderContextMenu())}})||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(110),a=n(80),s=n(101),c=n(85),l=n(112),u=n(90),d=n(87),h=n(223),p=n(166),m=n(246);t.a=e=>{const[t,n]=Object(r.useState)(""),[g,f]=Object(r.useState)(""),_=()=>{e.onFinished(),d.a.createTrackedDialog("Bug Report Dialog","",h.a,{})},b=l.a.instance.canEnable(),v=u.a.get().brand;let y,E;b&&(y=o.a.createElement(o.a.Fragment,null,o.a.createElement("hr",null),o.a.createElement("div",{className:"mx_FeedbackDialog_section mx_FeedbackDialog_rateApp"},o.a.createElement("h3",null,Object(a.a)("Rate %(brand)s",{brand:v})),o.a.createElement("p",null,Object(a.a)("Tell us below how you feel about %(brand)s so far.",{brand:v})),o.a.createElement("p",null,Object(a.a)("Please go into as much detail as you like, so we can track down the problem.")),o.a.createElement(m.a,{name:"feedbackRating",value:t,onChange:n,definitions:[{value:"1",label:"😠"},{value:"2",label:"😞"},{value:"3",label:"😑"},{value:"4",label:"😄"},{value:"5",label:"😍"}]}),o.a.createElement(s.a,{id:"feedbackComment",label:Object(a.a)("Add comment"),placeholder:Object(a.a)("Comment"),type:"text",autoComplete:"off",value:g,element:"textarea",onChange:e=>{f(e.target.value)}})))),b&&(E=o.a.createElement("h2",null,Object(a.a)("There are two ways you can provide feedback and help us improve %(brand)s.",{brand:v})));let S=null;return u.a.get().bug_report_endpoint_url&&(S=o.a.createElement("p",null,Object(a.a)("PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.",{},{debugLogsLink:e=>o.a.createElement(c.a,{kind:"link",onClick:_},e)}))),o.a.createElement(i.a,{className:"mx_FeedbackDialog",hasCancelButton:!!b,title:Object(a.a)("Feedback"),description:o.a.createElement(o.a.Fragment,null,E,o.a.createElement("div",{className:"mx_FeedbackDialog_section mx_FeedbackDialog_reportBug"},o.a.createElement("h3",null,Object(a.a)("Report a bug")),o.a.createElement("p",null,Object(a.a)("Please view <existingIssuesLink>existing bugs on Github</existingIssuesLink> first. No match? <newIssueLink>Start a new one</newIssueLink>.",{},{existingIssuesLink:e=>o.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://github.com/vector-im/element-web/issues?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc"},e),newIssueLink:e=>o.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://github.com/vector-im/element-web/issues/new"},e)})),S),y),button:b?Object(a.a)("Send feedback"):Object(a.a)("Go back"),buttonDisabled:b&&""===t,onFinished:n=>{b&&n&&(l.a.instance.reportFeedback(parseInt(t,10),g),d.a.createTrackedDialog("Feedback sent","",p.a,{title:Object(a.a)("Feedback sent"),description:Object(a.a)("Thank you!")})),e.onFinished()}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(87),d=n(89),h=n(83),p=n(80),m=n(82),g=n(250),f=n(81);let _=Object(f.a)("views.dialogs.LogoutDialog")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"onSettingsLinkClick",()=>{this.props.onFinished(!0)}),s()(this,"onExportE2eKeysClicked",()=>{u.a.createTrackedDialogAsync("Export E2E Keys","",n.e(4).then(n.bind(null,866)),{matrixClient:m.a.get()})}),s()(this,"onFinished",e=>{e&&h.a.dispatch({action:"logout"}),this.props.onFinished(e)}),s()(this,"onSetRecoveryMethodClick",()=>{this.state.backupInfo?u.a.createTrackedDialog("Restore Backup","",g.a,null,null,!1,!0):u.a.createTrackedDialogAsync("Key Backup","Key Backup",n.e(5).then(n.bind(null,503)),null,null,!1,!0),this.props.onFinished(!0)}),s()(this,"onLogoutConfirm",()=>{h.a.dispatch({action:"logout"}),this.props.onFinished(!0)});const t=m.a.get(),r=t.isCryptoEnabled()&&!t.getKeyBackupEnabled();this.state={shouldLoadBackupStatus:r,loading:r,backupInfo:null,error:null},r&&this.loadBackupStatus()}async loadBackupStatus(){try{const e=await m.a.get().getKeyBackupVersion();this.setState({loading:!1,backupInfo:e})}catch(e){console.log("Unable to fetch key backup status",e),this.setState({loading:!1,error:e})}}render(){if(this.state.shouldLoadBackupStatus){const e=d.getComponent("views.dialogs.BaseDialog"),t=l.a.createElement("div",null,l.a.createElement("p",null,Object(p.a)("Encrypted messages are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.")),l.a.createElement("p",null,Object(p.a)("Back up your keys before signing out to avoid losing them.")));let n;if(this.state.loading){const e=d.getComponent("views.elements.Spinner");n=l.a.createElement(e,null)}else{const e=d.getComponent("views.elements.DialogButtons");let r;r=this.state.backupInfo?Object(p.a)("Connect this session to Key Backup"):Object(p.a)("Start using Key Backup"),n=l.a.createElement("div",null,l.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},t),l.a.createElement(e,{primaryButton:r,hasCancel:!1,onPrimaryButtonClick:this.onSetRecoveryMethodClick,focus:!0},l.a.createElement("button",{onClick:this.onLogoutConfirm},Object(p.a)("I don't want my encrypted messages"))),l.a.createElement("details",null,l.a.createElement("summary",null,Object(p.a)("Advanced")),l.a.createElement("p",null,l.a.createElement("button",{onClick:this.onExportE2eKeysClicked},Object(p.a)("Manually export keys")))))}return l.a.createElement(e,{title:Object(p.a)("You'll lose access to your encrypted messages"),contentId:"mx_Dialog_content",hasCancel:!0,onFinished:this.onFinished},n)}{const e=d.getComponent("views.dialogs.QuestionDialog");return l.a.createElement(e,{hasCancelButton:!0,title:Object(p.a)("Sign out"),description:Object(p.a)("Are you sure you want to sign out?"),button:Object(p.a)("Sign out"),onFinished:this.onFinished})}}},s()(o,"defaultProps",{onFinished:function(){}}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(95),l=n(80),u=n(101),d=n(85),h=n(82),p=n(176),m=n(162),g=n(81),f=n(100);let _=Object(g.a)("views.dialogs.EditCommunityPrototypeDialog")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"avatarUploadRef",s.a.createRef()),i()(this,"onNameChange",e=>{this.setState({name:e.target.value})}),i()(this,"onSubmit",async e=>{if(e.preventDefault(),e.stopPropagation(),!this.state.busy){this.setState({busy:!0});try{let e=this.state.currentAvatarUrl||"";this.state.avatarFile&&(e=await h.a.get().uploadContent(this.state.avatarFile)),await h.a.get().setGroupProfile(this.props.communityId,{name:this.state.name,avatar_url:e}),await m.a.refreshGroupProfile(h.a.get(),this.props.communityId),this.props.onFinished(!0)}catch(e){console.error(e),this.setState({busy:!1,error:Object(l.a)("There was an error updating your community. The server is unable to process your request.")})}}}),i()(this,"onAvatarChanged",e=>{if(e.target.files&&e.target.files.length){this.setState({busy:!0});const t=e.target.files[0],n=new FileReader;n.onload=e=>{this.setState({avatarFile:t,busy:!1,avatarPreview:e.target.result})},n.readAsDataURL(t)}else this.setState({avatarFile:null})}),i()(this,"onChangeAvatar",()=>{this.avatarUploadRef.current&&this.avatarUploadRef.current.click()});const t=p.a.instance.getCommunityProfile(e.communityId);this.state={name:(null==t?void 0:t.name)||"",error:null,busy:!1,avatarFile:null,avatarPreview:null,currentAvatarUrl:null==t?void 0:t.avatarUrl}}render(){let e=s.a.createElement("img",{src:this.state.avatarPreview,className:"mx_EditCommunityPrototypeDialog_avatar"});if(!this.state.avatarPreview)if(this.state.currentAvatarUrl){const t=Object(f.b)(this.state.currentAvatarUrl).srcHttp;e=s.a.createElement("img",{src:t,className:"mx_EditCommunityPrototypeDialog_avatar"})}else e=s.a.createElement("div",{className:"mx_EditCommunityPrototypeDialog_placeholderAvatar"});return s.a.createElement(c.a,{className:"mx_EditCommunityPrototypeDialog",onFinished:this.props.onFinished,title:Object(l.a)("Update community")},s.a.createElement("form",{onSubmit:this.onSubmit},s.a.createElement("div",{className:"mx_Dialog_content"},s.a.createElement("div",{className:"mx_EditCommunityPrototypeDialog_rowName"},s.a.createElement(u.a,{value:this.state.name,onChange:this.onNameChange,placeholder:Object(l.a)("Enter name"),label:Object(l.a)("Enter name")})),s.a.createElement("div",{className:"mx_EditCommunityPrototypeDialog_rowAvatar"},s.a.createElement("input",{type:"file",style:{display:"none"},ref:this.avatarUploadRef,accept:"image/*",onChange:this.onAvatarChanged}),s.a.createElement(d.a,{onClick:this.onChangeAvatar,className:"mx_EditCommunityPrototypeDialog_avatarContainer"},e),s.a.createElement("div",{className:"mx_EditCommunityPrototypeDialog_tip"},s.a.createElement("b",null,Object(l.a)("Add image (optional)")),s.a.createElement("span",null,Object(l.a)("An image will help people identify your community.")))),s.a.createElement(d.a,{kind:"primary",onClick:this.onSubmit,disabled:this.state.busy},Object(l.a)("Save")))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(163),l=n(80),u=n(467),d=n(90),h=n(81);let p=Object(h.a)("structures.HostSignupAction")(r=class extends s.a.PureComponent{constructor(...e){super(...e),i()(this,"openDialog",async()=>{var e,t;null===(e=(t=this.props).onClick)||void 0===e||e.call(t),await u.a.instance.setHostSignupActive(!0)})}render(){const e=d.a.get().hostSignup;return null!=e&&e.brand?s.a.createElement(c.c,null,s.a.createElement(c.b,{iconClassName:"mx_UserMenu_iconHosting",label:Object(l.a)("Upgrade to %(hostSignupBrand)s",{hostSignupBrand:e.brand}),onClick:this.openDialog})):null}})||r},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return b}));var r,o=n(79),i=n.n(o),a=n(78),s=n(86),c=n.n(s),l=n(83),u=n(80),d=n(85),h=n(91),p=n(156),m=n(642),g=n(179),f=n(81),_=n(102);let b=Object(f.a)("structures.RoomSearch")(r=class extends a.PureComponent{constructor(t){super(t),i()(this,"dispatcherRef",void 0),i()(this,"inputRef",Object(a.createRef)()),i()(this,"searchFilter",new m.a),i()(this,"onSpaces",e=>{this.setState({inSpaces:e.length>0})}),i()(this,"onAction",e=>{"view_room"===e.action&&e.clear_search?this.clearInput():"focus_room_filter"===e.action&&this.inputRef.current&&this.inputRef.current.focus()}),i()(this,"clearInput",()=>{this.inputRef.current&&(this.inputRef.current.value="",this.onChange())}),i()(this,"openSearch",()=>{l.a.dispatch({action:"show_left_panel"}),l.a.dispatch({action:"focus_room_filter"})}),i()(this,"onChange",()=>{this.inputRef.current&&this.setState({query:this.inputRef.current.value})}),i()(this,"onFocus",e=>{this.setState({focused:!0}),e.target.select()}),i()(this,"onBlur",e=>{this.setState({focused:!1})}),i()(this,"onKeyDown",t=>{switch(Object(g.f)().getRoomListAction(t)){case g.e.ClearSearch:this.clearInput(),l.a.fire(h.a.FocusSendMessageComposer);break;case g.e.NextRoom:case g.e.PrevRoom:this.props.onKeyDown(t);break;case g.e.SelectRoom:this.props.onSelectRoom()&&e(()=>{this.clearInput()});break}}),this.state={query:"",focused:!1,inSpaces:!1},this.dispatcherRef=l.a.register(this.onAction),_.g.instance.on(_.e,this.clearInput),_.g.instance.on(_.f,this.onSpaces)}componentDidUpdate(e,t){if(t.query!==this.state.query){const e=!!this.searchFilter.search.trim(),t=!!this.state.query.trim();this.searchFilter.search=this.state.query,!e&&t?p.b.instance.addFilter(this.searchFilter):e&&!t&&p.b.instance.removeFilter(this.searchFilter)}}componentWillUnmount(){l.a.unregister(this.dispatcherRef),_.g.instance.off(_.e,this.clearInput),_.g.instance.off(_.f,this.onSpaces)}render(){const e=c()({mx_RoomSearch:!0,mx_RoomSearch_hasQuery:this.state.query,mx_RoomSearch_focused:this.state.focused,mx_RoomSearch_minimized:this.props.isMinimized}),t=c()({mx_RoomSearch_input:!0,mx_RoomSearch_inputExpanded:this.state.query||this.state.focused});let n=Object(u.a)("Filter");this.state.inSpaces&&(n=Object(u.a)("Filter all spaces"));let r=a.createElement("div",{className:"mx_RoomSearch_icon"}),o=a.createElement("input",{type:"text",ref:this.inputRef,className:t,value:this.state.query,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.onChange,onKeyDown:this.onKeyDown,placeholder:n,autoComplete:"off"}),i=a.createElement(d.a,{tabIndex:-1,title:Object(u.a)("Clear filter"),className:"mx_RoomSearch_clearButton",onClick:this.clearInput});return this.props.isMinimized&&(r=a.createElement(d.a,{title:Object(u.a)("Filter rooms and people"),className:"mx_RoomSearch_icon mx_RoomSearch_minimizedHandle",onClick:this.openSearch}),o=null,i=null),a.createElement("div",{className:e},r,o,i)}})||r}).call(this,n(161).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(713),l=n(255),u=n(80),d=n(83),h=n(124),p=n(115),m=n(1336),g=n(159),f=n(630),_=n(81);let b=Object(_.a)("views.rooms.RoomBreadcrumbs")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"isMounted",!0),i()(this,"onBreadcrumbsUpdate",()=>{this.isMounted&&(this.setState({doAnimation:!1,skipFirst:!0}),setTimeout(()=>this.setState({doAnimation:!0,skipFirst:!1}),0))}),i()(this,"viewRoom",(e,t)=>{h.a.trackEvent("Breadcrumbs","click_node",String(t)),d.a.dispatch({action:"view_room",room_id:e.roomId})}),this.state={doAnimation:!0,skipFirst:!1},c.a.instance.on(p.b,this.onBreadcrumbsUpdate)}componentWillUnmount(){this.isMounted=!1,c.a.instance.off(p.b,this.onBreadcrumbsUpdate)}render(){const e=c.a.instance.rooms.map((e,t)=>s.a.createElement(g.b,{className:"mx_RoomBreadcrumbs_crumb",key:e.roomId,onClick:()=>this.viewRoom(e,t),"aria-label":Object(u.a)("Room %(name)s",{name:e.name}),title:e.name,tooltipClassName:"mx_RoomBreadcrumbs_Tooltip"},s.a.createElement(l.a,{room:e,avatarSize:32,displayBadge:!0,forceCount:!0})));return e.length>0?s.a.createElement(m.CSSTransition,{appear:!0,in:this.state.doAnimation,timeout:640,classNames:"mx_RoomBreadcrumbs"},s.a.createElement(f.a,{className:"mx_RoomBreadcrumbs","aria-label":Object(u.a)("Recently visited rooms")},e.slice(this.state.skipFirst?1:0))):s.a.createElement("div",{className:"mx_RoomBreadcrumbs"},s.a.createElement("div",{className:"mx_RoomBreadcrumbs_placeholder"},Object(u.a)("No recently visited rooms")))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(79),o=n.n(r),i=n(84),a=n(150),s=n(83),c=n(109),l=n(2),u=n(98),d=n(102),h=n(91);class p extends a.a{constructor(){super(s.a),o()(this,"waitingRooms",[]),o()(this,"onMyMembership",async e=>{const t=i.b.getValue("breadcrumbs",null,!0);this.meetsRoomRequirement&&Object(l.v)(t)&&await i.b.setValue("breadcrumbs",null,u.a.ACCOUNT,!0)}),o()(this,"onRoom",async e=>{const t=this.waitingRooms.find(t=>t.roomId===e.roomId);t&&(this.waitingRooms.splice(this.waitingRooms.indexOf(t),1),Date.now()-t.addedTs>9e4||await this.appendRoom(e))}),i.b.monitorSetting("breadcrumb_rooms",null),i.b.monitorSetting("breadcrumbs",null)}static get instance(){return p.internalInstance}get rooms(){return this.state.rooms||[]}get visible(){return this.state.enabled&&this.meetsRoomRequirement}get meetsRoomRequirement(){return this.matrixClient&&this.matrixClient.getVisibleRooms().length>=20}async onAction(e){if(this.matrixClient)if(e.action===h.a.SettingUpdated){const t=e;"breadcrumb_rooms"===t.settingName?await this.updateRooms():"breadcrumbs"===t.settingName&&await this.updateState({enabled:i.b.getValue("breadcrumbs",null)})}else if("view_room"===e.action)if(e.auto_join&&!this.matrixClient.getRoom(e.room_id))this.waitingRooms.push({roomId:e.room_id,addedTs:Date.now()});else{const t=this.matrixClient.getRoom(e.room_id);t&&await this.appendRoom(t)}}async onReady(){await this.updateRooms(),await this.updateState({enabled:i.b.getValue("breadcrumbs",null)}),this.matrixClient.on("Room.myMembership",this.onMyMembership),this.matrixClient.on("Room",this.onRoom)}async onNotReady(){this.matrixClient.removeListener("Room.myMembership",this.onMyMembership),this.matrixClient.removeListener("Room",this.onRoom)}async updateRooms(){let e=i.b.getValue("breadcrumb_rooms");e&&0!==e.length||(e=[]);const t=e.map(e=>this.matrixClient.getRoom(e)).filter(e=>!!e),n=this.state.rooms||[];Object(c.d)(t,n)&&await this.updateState({rooms:t})}async appendRoom(e){if(d.g.spacesEnabled&&e.isSpaceRoom())return;let t=!1;const n=(this.state.rooms||[]).slice(),r=this.matrixClient.getRoomUpgradeHistory(e.roomId);if(r.length>1){e=r[r.length-1];for(let e=0;e<r.length-1;e++){const o=n.findIndex(t=>t.roomId===r[e].roomId);-1!==o&&(n.splice(o,1),t=!0)}}const o=n.findIndex(t=>t.roomId===e.roomId);if(0!==o&&(-1!==o&&n.splice(o,1),n.splice(0,0,e),t=!0),n.length>20&&(n.splice(20,n.length-20),t=!0),t){await this.updateState({rooms:n});const e=n.map(e=>e.roomId);e.length>0&&await i.b.setValue("breadcrumb_rooms",null,u.a.ACCOUNT,e)}}}o()(p,"internalInstance",new p)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;t.default={disabled:!1},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(88))&&r.__esModule?r:{default:r};var i=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number,appear:o.default.number}).isRequired]);t.timeoutsShape=i;var a=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(88)),o=s(n(78)),i=s(n(469)),a=n(1342);function s(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},u=function(e){var t,n;function r(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=r.prototype;return s.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},s.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,a.getInitialChildMapping)(e,r):(0,a.getNextChildMapping)(e,n,r),firstRender:!1}},s.handleExited=function(e,t){var n=(0,a.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=c({},t.children);return delete n[e.key],{children:n}})))},s.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=this.state.contextValue,s=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o.default.createElement(i.default.Provider,{value:a},s):o.default.createElement(i.default.Provider,{value:a},o.default.createElement(t,r,s))},r}(o.default.Component);u.propTypes={component:r.default.any,children:r.default.node,appear:r.default.bool,enter:r.default.bool,exit:r.default.bool,childFactory:r.default.func},u.defaultProps={component:"div",childFactory:function(e){return e}};var d=u;t.default=d,e.exports=t.default},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(79),c=n.n(s),l=n(78),u=n.n(l),d=n(88),h=n.n(d),p=n(117),m=n(81);const g=["children","trackHorizontalOverflow","verticalScrollsHorizontally"];var f,_,b;let v=Object(m.a)("structures.IndicatorScrollbar")((b=_=class extends u.a.Component{constructor(e){super(e),c()(this,"onMouseWheel",e=>{if(this.props.verticalScrollsHorizontally&&this._scrollElement){const t=0,n=1,r=(new Date).getTime();if(Math.abs(e.deltaX)>0?(this._likelyTrackpadUser=!0,this._checkAgainForTrackpad=r+6e4):this._likelyTrackpadUser&&r>=this._checkAgainForTrackpad&&(this._likelyTrackpadUser=!1),this._likelyTrackpadUser)return;if(Math.abs(e.deltaX)<=t){const t=e.deltaY<0?-50:50,r=Math.abs(e.deltaY)<25?e.deltaY+t:e.deltaY;this._scrollElement.scrollLeft+=r*n}}}),this._collectScroller=this._collectScroller.bind(this),this._collectScrollerComponent=this._collectScrollerComponent.bind(this),this.checkOverflow=this.checkOverflow.bind(this),this._scrollElement=null,this._autoHideScrollbar=null,this._likelyTrackpadUser=null,this._checkAgainForTrackpad=0,this.state={leftIndicatorOffset:0,rightIndicatorOffset:0}}moveToOrigin(){this._scrollElement&&(this._scrollElement.scrollLeft=0,this._scrollElement.scrollTop=0)}_collectScroller(e){e&&!this._scrollElement&&(this._scrollElement=e,this._scrollElement.addEventListener("scroll",this.checkOverflow,{passive:!0}),this.checkOverflow())}_collectScrollerComponent(e){this._autoHideScrollbar=e}componentDidUpdate(e){(e&&e.children&&e.children.length||0)!==(this.props.children&&this.props.children.length||0)&&this.checkOverflow()}componentDidMount(){this.checkOverflow()}checkOverflow(){const e=this._scrollElement.scrollTop>0,t=this._scrollElement.scrollHeight>this._scrollElement.scrollTop+this._scrollElement.clientHeight,n=this._scrollElement.scrollLeft>0,r=this._scrollElement.scrollWidth>this._scrollElement.scrollLeft+this._scrollElement.clientWidth;e?this._scrollElement.classList.add("mx_IndicatorScrollbar_topOverflow"):this._scrollElement.classList.remove("mx_IndicatorScrollbar_topOverflow"),t?this._scrollElement.classList.add("mx_IndicatorScrollbar_bottomOverflow"):this._scrollElement.classList.remove("mx_IndicatorScrollbar_bottomOverflow"),n?this._scrollElement.classList.add("mx_IndicatorScrollbar_leftOverflow"):this._scrollElement.classList.remove("mx_IndicatorScrollbar_leftOverflow"),r?this._scrollElement.classList.add("mx_IndicatorScrollbar_rightOverflow"):this._scrollElement.classList.remove("mx_IndicatorScrollbar_rightOverflow"),this.props.trackHorizontalOverflow&&this.setState({leftIndicatorOffset:n?this._scrollElement.scrollLeft+"px":"0",rightIndicatorOffset:r?`-${this._scrollElement.scrollLeft}px`:"0"})}getScrollTop(){return this._autoHideScrollbar.getScrollTop()}componentWillUnmount(){this._scrollElement&&this._scrollElement.removeEventListener("scroll",this.checkOverflow)}render(){const e=this.props,{children:t,trackHorizontalOverflow:n,verticalScrollsHorizontally:r}=e,i=a()(e,g),s={left:this.state.leftIndicatorOffset},c={right:this.state.rightIndicatorOffset},l=n?u.a.createElement("div",{className:"mx_IndicatorScrollbar_leftOverflowIndicator",style:s}):null,d=n?u.a.createElement("div",{className:"mx_IndicatorScrollbar_rightOverflowIndicator",style:c}):null;return u.a.createElement(p.a,o()({ref:this._collectScrollerComponent,wrappedRef:this._collectScroller,onWheel:this.onMouseWheel},i),l,t,d)}},c()(_,"propTypes",{trackHorizontalOverflow:h.a.bool,verticalScrollsHorizontally:h.a.bool}),f=b))||f},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(80),a=n(156),s=n(127),c=n(102);t.a=({onVisibilityChange:e})=>{const[t,n]=Object(r.useState)(null);return Object(s.a)(a.b.instance,a.a,()=>{if(a.b.instance.getFirstNameFilterCondition()){const e=Object.values(a.b.instance.orderedLists).flat(1).length;n(e)}else n(null)}),Object(r.useEffect)(()=>{e&&e()},[t,e]),"number"!=typeof t?null:o.a.createElement("div",{className:"mx_LeftPanel_roomListFilterCount"},c.g.instance.spacePanelSpaces.length?Object(i.a)("%(count)s results in all spaces",{count:t}):Object(i.a)("%(count)s results",{count:t}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(169),d=n.n(u),h=n(80),p=n(90),m=n(139),g=n(82),f=n(81),_=n(132),b=n(120),v=n(85),y=n(174);function E(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}let S=Object(f.a)("views.elements.AppPermission")((i=o=class extends l.a.Component{constructor(e){super(e);const t=this.parseWidgetUrl(),n=g.a.get().getRoom(this.props.roomId);let r;n&&(r=n.getMember(this.props.creatorUserId)),this.state=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({widgetDomain:null,isWrapped:null,roomMember:r},t)}parseWidgetUrl(){const e=d.a.parse(this.props.url),t=new URLSearchParams(e.search);if(m.a.isScalarUrl(this.props.url)&&t&&t.get("url")){const e=d.a.parse(t.get("url"));return{widgetDomain:e.host||e.hostname,isWrapped:!0}}return{widgetDomain:e.host||e.hostname,isWrapped:!1}}render(){const e=p.a.get().brand,t=this.state.roomMember?this.state.roomMember.name:this.props.creatorUserId,n=t===this.props.creatorUserId?null:this.props.creatorUserId,r=this.state.roomMember?l.a.createElement(_.a,{member:this.state.roomMember,width:38,height:38}):l.a.createElement(b.a,{name:this.props.creatorUserId,width:38,height:38}),o=l.a.createElement("div",null,Object(h.a)("Any of the following data may be shared:"),l.a.createElement("ul",null,l.a.createElement("li",null,Object(h.a)("Your display name")),l.a.createElement("li",null,Object(h.a)("Your avatar URL")),l.a.createElement("li",null,Object(h.a)("Your user ID")),l.a.createElement("li",null,Object(h.a)("Your theme")),l.a.createElement("li",null,Object(h.a)("%(brand)s URL",{brand:e})),l.a.createElement("li",null,Object(h.a)("Room ID")),l.a.createElement("li",null,Object(h.a)("Widget ID")))),i=l.a.createElement(y.a,{tooltip:o,tooltipClass:"mx_AppPermissionWarning_tooltip mx_Tooltip_dark"},l.a.createElement("span",{className:"mx_AppPermissionWarning_helpIcon"})),a=this.state.isWrapped?Object(h.a)("Using this widget may share data <helpIcon /> with %(widgetDomain)s & your integration manager.",{widgetDomain:this.state.widgetDomain},{helpIcon:()=>i}):Object(h.a)("Using this widget may share data <helpIcon /> with %(widgetDomain)s.",{widgetDomain:this.state.widgetDomain},{helpIcon:()=>i}),s=this.props.isRoomEncrypted?Object(h.a)("Widgets do not use message encryption."):null;return l.a.createElement("div",{className:"mx_AppPermissionWarning"},l.a.createElement("div",{className:"mx_AppPermissionWarning_row mx_AppPermissionWarning_bolder mx_AppPermissionWarning_smallText"},Object(h.a)("Widget added by")),l.a.createElement("div",{className:"mx_AppPermissionWarning_row"},r,l.a.createElement("h4",{className:"mx_AppPermissionWarning_bolder"},t),l.a.createElement("div",{className:"mx_AppPermissionWarning_smallText"},n)),l.a.createElement("div",{className:"mx_AppPermissionWarning_row mx_AppPermissionWarning_smallText"},a),l.a.createElement("div",{className:"mx_AppPermissionWarning_row mx_AppPermissionWarning_smallText"},Object(h.a)("This widget may use cookies.")," ",s),l.a.createElement("div",{className:"mx_AppPermissionWarning_row"},l.a.createElement(v.a,{kind:"primary_sm",onClick:this.props.onPermissionGranted},Object(h.a)("Continue"))))}},s()(o,"defaultProps",{onPermissionGranted:()=>{}}),r=i))||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(88);const a=e=>o.a.createElement("div",{className:"mx_AppPermissionWarning"},o.a.createElement("div",{className:"mx_AppPermissionWarningImage"},o.a.createElement("img",{src:n(245),alt:""})),o.a.createElement("div",{className:"mx_AppPermissionWarningText"},o.a.createElement("span",{className:"mx_AppPermissionWarningTextLabel"},e.errorMsg)));a.propTypes={errorMsg:n.n(i).a.string},a.defaultProps={errorMsg:"Error"},t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(89),m=n(165),g=n(0),f=n(722),_=n(81);let b=Object(_.a)("views.dialogs.WidgetOpenIDPermissionsDialog")((i=o=class extends l.a.Component{constructor(){super(),s()(this,"_onAllow",()=>{this._onPermissionSelection(!0)}),s()(this,"_onDeny",()=>{this._onPermissionSelection(!1)}),s()(this,"_onRememberSelectionChange",e=>{this.setState({rememberSelection:e})}),this.state={rememberSelection:!1}}_onPermissionSelection(e){this.state.rememberSelection&&(console.log(`Remembering ${this.props.widgetId} as allowed=${e} for OpenID`),f.b.instance.setOIDCState(this.props.widget,this.props.widgetKind,this.props.inRoomId,e?f.a.Allowed:f.a.Denied)),this.props.onFinished(e)}render(){const e=p.getComponent("views.dialogs.BaseDialog"),t=p.getComponent("views.elements.DialogButtons");return l.a.createElement(e,{className:"mx_WidgetOpenIDPermissionsDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(h.a)("Allow this widget to verify your identity")},l.a.createElement("div",{className:"mx_WidgetOpenIDPermissionsDialog_content"},l.a.createElement("p",null,Object(h.a)("The widget will verify your user ID, but won't be able to perform actions for you:")),l.a.createElement("p",{className:"text-muted"},this.props.widget.templateUrl.split("?")[0].split("#")[0])),l.a.createElement(t,{primaryButton:Object(h.a)("Continue"),onPrimaryButtonClick:this._onAllow,onCancel:this._onDeny,additive:l.a.createElement(m.a,{value:this.state.rememberSelection,toggleInFront:!0,onChange:this._onRememberSelectionChange,label:Object(h.a)("Remember this")})}))}},s()(o,"propTypes",{onFinished:d.a.func.isRequired,widget:d.a.objectOf(g.Widget).isRequired,widgetKind:d.a.string.isRequired,inRoomId:d.a.string}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(79),o=n.n(r),i=n(84),a=n(0),s=n(82),c=n(98);let l;!function(e){e[e.Allowed=0]="Allowed",e[e.Denied=1]="Denied",e[e.Unknown=2]="Unknown"}(l||(l={}));class u{constructor(){}static get instance(){return u.internalInstance||(u.internalInstance=new u),u.internalInstance}packSettingKey(e,t,n){let r=n;if(t!==a.WidgetKind.Room&&(r=s.a.get().getUserId()),t===a.WidgetKind.Modal&&(r="*MODAL*-"+r),!r)throw new Error("Failed to determine a location to check the widget's OIDC state with");return encodeURIComponent(`${r}::${e.templateUrl}`)}getOIDCState(e,t,n){var r,o;const a=this.packSettingKey(e,t,n),s=i.b.getValue("widgetOpenIDPermissions");return null!=s&&null!==(r=s.deny)&&void 0!==r&&r.includes(a)?l.Denied:null!=s&&null!==(o=s.allow)&&void 0!==o&&o.includes(a)?l.Allowed:l.Unknown}setOIDCState(e,t,n,r){const o=this.packSettingKey(e,t,n),a=i.b.getValue("widgetOpenIDPermissions");a.allow||(a.allow=[]),a.deny||(a.deny=[]),r===l.Allowed?a.allow.push(o):r===l.Denied?a.deny.push(o):(a.allow=a.allow.filter(e=>e!==o),a.deny=a.deny.filter(e=>e!==o)),i.b.setValue("widgetOpenIDPermissions",null,c.a.DEVICE,a)}}o()(u,"internalInstance",void 0)},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.CanChangeViewedRoom="io.element.view_room"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o=n(79),i=n.n(o),a=n(78),s=n(95),c=n(80),l=n(85),u=n(0),d=n(879),h=n(82),p=n(208),m=n(109),g=n(878),f=n(81),_=n(725),b=n(84);function v(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}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let E=Object(f.a)("views.dialogs.ModalWidgetDialog")(r=class extends a.PureComponent{constructor(e){super(e),i()(this,"widget",void 0),i()(this,"possibleButtons",void 0),i()(this,"appFrame",a.createRef()),i()(this,"state",{disabledButtonIds:(this.props.widgetDefinition.buttons||[]).filter(e=>e.disabled).map(e=>e.id)}),i()(this,"onReady",()=>{this.state.messaging.sendWidgetConfig(this.props.widgetDefinition)}),i()(this,"onLoad",()=>{this.state.messaging.once("ready",this.onReady),this.state.messaging.on("action:"+u.WidgetApiFromWidgetAction.CloseModalWidget,this.onWidgetClose),this.state.messaging.on("action:"+u.WidgetApiFromWidgetAction.SetModalButtonEnabled,this.onButtonEnableToggle)}),i()(this,"onWidgetClose",e=>{this.props.onFinished(!0,e.detail.data)}),i()(this,"onButtonEnableToggle",e=>{e.preventDefault();if(e.detail.data.button===u.BuiltInModalButtonID.Close||!this.possibleButtons.includes(e.detail.data.button))return this.state.messaging.transport.reply(e.detail,{error:{message:"Invalid button"}});let t;if(e.detail.data.enabled)t=Object(m.b)(this.state.disabledButtonIds).filter(t=>t!==e.detail.data.button);else{const n=new Set(this.state.disabledButtonIds);n.add(e.detail.data.button),t=Array.from(n)}this.setState({disabledButtonIds:t}),this.state.messaging.transport.reply(e.detail,{})}),this.widget=new g.a(y(y({},this.props.widgetDefinition),{},{creatorUserId:h.a.get().getUserId(),id:"modal_"+this.props.sourceWidgetId})),this.possibleButtons=(this.props.widgetDefinition.buttons||[]).map(e=>e.id)}componentDidMount(){const e=new d.a([],this.widget,u.WidgetKind.Modal),t=new u.ClientWidgetApi(this.widget,this.appFrame.current,e);this.setState({messaging:t})}componentWillUnmount(){this.state.messaging.off("ready",this.onReady),this.state.messaging.off("action:"+u.WidgetApiFromWidgetAction.CloseModalWidget,this.onWidgetClose),this.state.messaging.stop()}render(){const e=this.widget.getCompleteUrl({widgetRoomId:this.props.widgetRoomId,currentUserId:h.a.get().getUserId(),userDisplayName:p.a.instance.displayName,userHttpAvatarUrl:p.a.instance.getHttpAvatarUrl(),clientId:_.a,clientTheme:b.b.getValue("theme"),clientLanguage:Object(c.g)()}),t=new URL(e);t.searchParams.set("widgetId",this.widget.id),t.searchParams.set("parentUrl",window.location.href.split("#",2)[0]);const r=t.toString().replace(/%24/g,"$");let o;return this.props.widgetDefinition.buttons&&(o=this.props.widgetDefinition.buttons.slice(0,3).reverse().map(e=>{let t="secondary";switch(e.kind){case u.ModalButtonKind.Primary:t="primary";break;case u.ModalButtonKind.Secondary:t="primary_outline";break;case u.ModalButtonKind.Danger:t="danger"}const n=this.state.disabledButtonIds.includes(e.id);return a.createElement(l.a,{key:e.id,kind:t,onClick:()=>{this.state.messaging.notifyModalWidgetButtonClicked(e.id)},disabled:n},e.label)})),a.createElement(s.a,{title:this.props.widgetDefinition.name||Object(c.a)("Modal Widget"),className:"mx_ModalWidgetDialog",contentId:"mx_Dialog_content",onFinished:this.props.onFinished},a.createElement("div",{className:"mx_ModalWidgetDialog_warning"},a.createElement("img",{src:n(664),height:"16",width:"16",alt:""}),Object(c.a)("Data on this screen is shared with %(widgetDomain)s",{widgetDomain:t.hostname})),a.createElement("div",null,a.createElement("iframe",{ref:this.appFrame,sandbox:"allow-forms allow-scripts allow-same-origin",src:r,onLoad:this.onLoad})),a.createElement("div",{className:"mx_ModalWidgetDialog_buttons"},o))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="io.element.web"},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,o=n(78),i=n.n(o),a=n(727),s=n(81);let c=Object(s.a)("views.voip.CallContainer")(r=class extends i.a.PureComponent{render(){return i.a.createElement("div",{className:"mx_CallContainer"},i.a.createElement(a.a,null))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(471),l=n(126),u=n(138),d=n(83),h=n(733),p=n(84),m=n(128),g=n(82),f=n(81),_=n(885);const b=[m.e.Connected,m.e.InviteSent,m.e.Connecting,m.e.CreateAnswer,m.e.CreateOffer,m.e.WaitLocalMedia];function v(e){let t=null,n=[];for(const r of e)b.includes(r.state)&&(r.isRemoteOnHold()||null!==t?n.push(r):t=r);return null===t&&n.length>0&&(t=n[0],n=n.slice(1)),n.length>1&&console.log("Found more than 1 secondary call! Other calls will not be shown."),[t,n]}let y=Object(f.a)("views.voip.CallPreview")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"roomStoreToken",void 0),i()(this,"dispatcherRef",void 0),i()(this,"settingsWatcherRef",void 0),i()(this,"onRoomViewStoreUpdate",()=>{if(l.a.getRoomId()===this.state.roomId)return;const e=l.a.getRoomId(),[t,n]=v(u.d.sharedInstance().getAllActiveCallsNotInRoom(e));this.setState({roomId:e,primaryCall:t,secondaryCall:n[0]})}),i()(this,"onAction",e=>{switch(e.action){case"call_state":this.updateCalls()}}),i()(this,"updateCalls",()=>{const[e,t]=v(u.d.sharedInstance().getAllActiveCallsNotInRoom(this.state.roomId));this.setState({primaryCall:e,secondaryCall:t[0]})}),i()(this,"onCallRemoteHold",()=>{const[e,t]=v(u.d.sharedInstance().getAllActiveCallsNotInRoom(this.state.roomId));this.setState({primaryCall:e,secondaryCall:t[0]})});const t=l.a.getRoomId(),[n,r]=v(u.d.sharedInstance().getAllActiveCallsNotInRoom(t));this.state={roomId:t,primaryCall:n,secondaryCall:r[0]}}componentDidMount(){u.d.sharedInstance().addListener(u.a.CallChangeRoom,this.updateCalls),this.roomStoreToken=l.a.addListener(this.onRoomViewStoreUpdate),this.dispatcherRef=d.a.register(this.onAction),g.a.get().on(m.c.RemoteHoldUnhold,this.onCallRemoteHold)}componentWillUnmount(){u.d.sharedInstance().removeListener(u.a.CallChangeRoom,this.updateCalls),g.a.get().removeListener(m.c.RemoteHoldUnhold,this.onCallRemoteHold),this.roomStoreToken&&this.roomStoreToken.remove(),d.a.unregister(this.dispatcherRef),p.b.unwatchSetting(this.settingsWatcherRef)}render(){return this.state.primaryCall?s.a.createElement(_.a,{className:"mx_CallPreview",draggable:!0},({onStartMoving:e,onResize:t})=>s.a.createElement(c.a,{onMouseDownOnHeader:e,call:this.state.primaryCall,secondaryCall:this.state.secondaryCall,pipMode:!0,onResize:t})):s.a.createElement(h.a,null)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(103),m=n(138),g=n(367),f=n(87),_=n(81);let b=Object(_.a)("views.context_menus.CallContextMenu")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"onHoldClick",()=>{this.props.call.setRemoteOnHold(!0),this.props.onFinished()}),s()(this,"onUnholdClick",()=>{m.d.sharedInstance().setActiveCallRoomId(this.props.call.roomId),this.props.onFinished()}),s()(this,"onTransferClick",()=>{f.a.createTrackedDialog("Transfer Call","",g.d,{kind:g.a,call:this.props.call},"mx_InviteDialog_transferWrapper",!1,!0),this.props.onFinished()})}render(){const e=this.props.call.isRemoteOnHold()?Object(h.a)("Resume"):Object(h.a)("Hold"),t=this.props.call.isRemoteOnHold()?this.onUnholdClick:this.onHoldClick;let n;return this.props.call.opponentCanBeTransferred()&&(n=l.a.createElement(p.f,{className:"mx_CallContextMenu_item",onClick:this.onTransferClick},Object(h.a)("Transfer"))),l.a.createElement(p.b,this.props,l.a.createElement(p.f,{className:"mx_CallContextMenu_item",onClick:t},e),n)}},s()(o,"propTypes",{user:d.a.object}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(85),l=n(103),u=n(101),d=n(338),h=n(81);let p=Object(h.a)("views.context_menus.DialpadContextMenu")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onDigitPress",e=>{this.props.call.sendDtmfDigit(e),this.setState({value:this.state.value+e})}),i()(this,"onCancelClick",()=>{this.props.onFinished()}),i()(this,"onKeyDown",e=>{"Backspace"!==e.code&&"Delete"!==e.code||e.preventDefault()}),i()(this,"onChange",e=>{this.setState({value:e.target.value})}),this.state={value:""}}render(){return s.a.createElement(l.b,this.props,s.a.createElement("div",{className:"mx_DialPadContextMenuWrapper"},s.a.createElement("div",null,s.a.createElement(c.a,{className:"mx_DialPadContextMenu_cancel",onClick:this.onCancelClick})),s.a.createElement("div",{className:"mx_DialPadContextMenu_header"},s.a.createElement(u.a,{className:"mx_DialPadContextMenu_dialled",value:this.state.value,autoFocus:!0,onKeyDown:this.onKeyDown,onChange:this.onChange})),s.a.createElement("div",{className:"mx_DialPadContextMenu_dialPad"},s.a.createElement(d.a,{onDigitPress:this.onDigitPress,hasDial:!1}))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(95),u=n(116),d=n(86),h=n.n(d),p=n(85),m=n(128),g=n(81),f=n(234);let _;!function(e){e.Screens="screen",e.Windows="window"}(_||(_={}));class b extends s.a.Component{constructor(e){super(e),i()(this,"onClick",()=>{this.props.onSelect(this.props.source)})}render(){const e=h()({mx_desktopCapturerSourcePicker_source_thumbnail:!0,mx_desktopCapturerSourcePicker_source_thumbnail_selected:this.props.selected});return s.a.createElement(p.a,{className:"mx_desktopCapturerSourcePicker_source",title:this.props.source.name,onClick:this.onClick},s.a.createElement("img",{className:e,src:this.props.source.thumbnailURL}),s.a.createElement("span",{className:"mx_desktopCapturerSourcePicker_source_name"},this.props.source.name))}}let v=Object(g.a)("views.elements.DesktopCapturerSourcePicker")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"interval",void 0),i()(this,"onSelect",e=>{this.setState({selectedSource:e})}),i()(this,"onShare",()=>{this.props.onFinished(this.state.selectedSource)}),i()(this,"onTabChange",()=>{this.setState({selectedSource:null})}),i()(this,"onCloseClick",()=>{this.props.onFinished(null)}),this.state={selectedTab:_.Screens,sources:[],selectedSource:null}}async componentDidMount(){this.setState({sources:await Object(m.h)()}),this.interval=setInterval(async()=>{this.setState({sources:await Object(m.h)()})},500)}componentWillUnmount(){clearInterval(this.interval)}getTab(e,t){const n=this.state.sources.filter(t=>t.id.startsWith(e)).map(e=>{var t;return s.a.createElement(b,{selected:(null===(t=this.state.selectedSource)||void 0===t?void 0:t.id)===e.id,source:e,onSelect:this.onSelect,key:e.id})});return new f.a(e,t,null,s.a.createElement("div",{className:"mx_desktopCapturerSourcePicker_tab"},n))}render(){const e=[this.getTab("screen",Object(c.a)("Share entire screen")),this.getTab("window",Object(c.a)("Application window"))];return s.a.createElement(l.a,{className:"mx_desktopCapturerSourcePicker",onFinished:this.onCloseClick,title:Object(c.a)("Share content")},s.a.createElement(f.c,{tabs:e,tabLocation:f.b.TOP,onChange:this.onTabChange}),s.a.createElement(u.a,{primaryButton:Object(c.a)("Share"),hasCancel:!0,onCancel:this.onCloseClick,onPrimaryButtonClick:this.onShare,primaryDisabled:!this.state.selectedSource}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(78),o=n.n(r),i=n(472),a=n(86),s=n.n(a);class c extends o.a.Component{render(){const e=this.props.feeds.map(e=>o.a.createElement(i.a,{key:e.stream.id,feed:e,call:this.props.call,primary:!1,pipMode:this.props.pipMode})),t=s()("mx_CallViewSidebar",{mx_CallViewSidebar_pipMode:this.props.pipMode});return o.a.createElement("div",{className:t},e)}}},function(e,t,n){"use strict";var r=n(128),o=n(78),i=n.n(o),a=n(80),s=n(119),c=n(85),l=n(83),u=n(86),d=n.n(u),h=n(106);const p={[r.f.Video]:Object(a.b)("Video Call"),[r.f.Voice]:Object(a.b)("Voice Call")},m=e=>{l.a.dispatch({action:"view_room",room_id:e})},g=()=>{l.a.dispatch({action:"video_fullscreen",fullscreen:!0})},f=({pipMode:e=!1,type:t,roomId:n})=>i.a.createElement("div",{className:"mx_CallViewHeader_controls"},!e&&i.a.createElement(h.a,{className:"mx_CallViewHeader_button mx_CallViewHeader_button_fullscreen",onClick:g,title:Object(a.a)("Fill Screen")}),e&&i.a.createElement(h.a,{className:"mx_CallViewHeader_button mx_CallViewHeader_button_expand",onClick:()=>(e=>{l.a.dispatch({action:"view_room",room_id:e})})(n),title:Object(a.a)("Return to call")})),_=({callRoom:e})=>i.a.createElement("span",{className:"mx_CallViewHeader_secondaryCallInfo"},i.a.createElement(c.a,{element:"span",onClick:()=>m(e.roomId)},i.a.createElement(s.a,{room:e,height:16,width:16}),i.a.createElement("span",{className:"mx_CallView_secondaryCall_roomName"},Object(a.a)("%(name)s on hold",{name:e.name})))),b=({type:e})=>{const t=d()({mx_CallViewHeader_callTypeIcon:!0,mx_CallViewHeader_callTypeIcon_video:e===r.f.Video,mx_CallViewHeader_callTypeIcon_voice:e===r.f.Voice});return i.a.createElement("div",{className:t})};t.a=({type:e,pipMode:t=!1,callRooms:n=[],onPipMouseDown:r})=>{const[o,l]=n,u=Object(a.a)(p[e]),d=o.name,{roomId:h}=o;return t?i.a.createElement("div",{className:"mx_CallViewHeader",onMouseDown:r},i.a.createElement(c.a,{onClick:()=>m(h)},i.a.createElement(s.a,{room:o,height:32,width:32})),i.a.createElement("div",{className:"mx_CallViewHeader_callInfo"},i.a.createElement("div",{className:"mx_CallViewHeader_roomName"},d),i.a.createElement("div",{className:"mx_CallViewHeader_callTypeSmall"},u,l&&i.a.createElement(_,{callRoom:l}))),i.a.createElement(f,{roomId:h,pipMode:t,type:e})):i.a.createElement("div",{className:"mx_CallViewHeader"},i.a.createElement(b,{type:e}),i.a.createElement("span",{className:"mx_CallViewHeader_callType"},u),i.a.createElement(f,{roomId:h,pipMode:t,type:e}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(126),l=n(269),u=n(139),d=n(89),h=n(82),p=n(81);let m=Object(p.a)("views.elements.PersistentApp")(r=class extends s.a.Component{constructor(...e){super(...e),i()(this,"state",{roomId:c.a.getRoomId(),persistentWidgetId:l.a.getPersistentWidgetId()}),i()(this,"_onRoomViewStoreUpdate",e=>{c.a.getRoomId()!==this.state.roomId&&this.setState({roomId:c.a.getRoomId()})}),i()(this,"_onActiveWidgetStoreUpdate",()=>{this.setState({persistentWidgetId:l.a.getPersistentWidgetId()})}),i()(this,"_onMyMembership",async(e,t)=>{const n=l.a.getRoomId(this.state.persistentWidgetId);"join"!==t&&e.roomId===n&&l.a.destroyPersistentWidget(this.state.persistentWidgetId)})}componentDidMount(){this._roomStoreToken=c.a.addListener(this._onRoomViewStoreUpdate),l.a.on("update",this._onActiveWidgetStoreUpdate),h.a.get().on("Room.myMembership",this._onMyMembership)}componentWillUnmount(){this._roomStoreToken&&this._roomStoreToken.remove(),l.a.removeListener("update",this._onActiveWidgetStoreUpdate),h.a.get()&&h.a.get().removeListener("Room.myMembership",this._onMyMembership)}render(){if(this.state.persistentWidgetId){const e=l.a.getRoomId(this.state.persistentWidgetId),t=h.a.get().getRoom(e);if(!t)return null;const n=t.getMyMembership();if(this.state.roomId!==e&&"join"===n){const n=u.a.getRoomWidgets(t).find(e=>e.getStateKey()===l.a.getPersistentWidgetId()),r=u.a.makeAppConfig(n.getStateKey(),n.getContent(),n.getSender(),e,n.getId()),o=d.getComponent("elements.AppTile");return s.a.createElement(o,{key:r.id,app:r,fullWidth:!0,room:t,userId:h.a.get().credentials.userId,creatorUserId:r.creatorUserId,widgetPageTitle:u.a.getWidgetDataTitle(r),waitForIframeLoad:r.waitForIframeLoad,miniMode:!0,showMenubar:!1})}}return null}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,o=n(79),i=n.n(o),a=n(78),s=n(651),c=n(115),l=n(81);let u=Object(l.a)("structures.NonUrgentToastContainer")(r=class extends a.PureComponent{constructor(e,t){super(e,t),i()(this,"onUpdateToasts",()=>{this.setState({toasts:s.a.instance.components})}),this.state={toasts:s.a.instance.components},s.a.instance.on(c.b,this.onUpdateToasts)}componentWillUnmount(){s.a.instance.off(c.b,this.onUpdateToasts)}render(){const e=this.state.toasts.map((e,t)=>a.createElement("div",{className:"mx_NonUrgentToastContainer_toast",key:"toast-"+t},a.createElement(e,{})));return a.createElement("div",{className:"mx_NonUrgentToastContainer",role:"alert"},e)}})||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(886),a=n(467),s=n(127),c=n(115);t.a=()=>{const[e,t]=Object(r.useState)(a.a.instance.isHostSignupActive);return Object(s.a)(a.a.instance,c.b,()=>{t(a.a.instance.isHostSignupActive)}),o.a.createElement("div",{className:"mx_HostSignupContainer"},e&&o.a.createElement(i.a,null))}},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(1349),u=n(86),d=n.n(u),h=n(80),p=n(103),m=n(337),g=n(887),f=n(106),_=n(127),b=n(102),v=n(117),y=n(159),E=n(104),S=n(167),w=n(163),C=n(84),T=n(98);const x=["onFinished"],k=e=>{let{onFinished:t}=e,n=a()(e,x);const r=Object(_.b)(b.g.instance,b.c,()=>b.g.instance.allRoomsInHome);return c.a.createElement(w.e,o()({},n,{onFinished:t,className:"mx_SpacePanel_contextMenu",compact:!0}),c.a.createElement("div",{className:"mx_SpacePanel_contextMenu_header"},Object(h.a)("Home")),c.a.createElement(w.c,{first:!0},c.a.createElement(w.a,{iconClassName:"mx_SpacePanel_noIcon",label:Object(h.a)("Show all rooms"),active:r,onClick:()=>{C.b.setValue("Spaces.allRoomsInHome",null,T.a.ACCOUNT,!r)}})))},F=({selected:e,isPanelCollapsed:t})=>{const n=Object(_.b)(b.g.instance,b.c,()=>b.g.instance.allRoomsInHome);return c.a.createElement("li",{className:d()("mx_SpaceItem",{collapsed:t})},c.a.createElement(g.a,{className:"mx_SpaceButton_home",onClick:()=>b.g.instance.setActiveSpace(null),selected:e,label:n?Object(h.a)("All rooms"):Object(h.a)("Home"),notificationState:n?S.a.instance.globalState:b.g.instance.getNotificationState(b.a),isNarrow:t,ContextMenuComponent:k,contextMenuTooltip:Object(h.a)("Options")}))},O=({isPanelCollapsed:e,setPanelCollapsed:t})=>{const[n,r,o,i]=Object(p.q)();Object(s.useEffect)(()=>{!e&&n&&i()},[e]);let a=null;n&&(a=c.a.createElement(m.c,{onFinished:i}));const l=n?i:()=>{e||t(!0),o()};return c.a.createElement("li",{className:d()("mx_SpaceItem",{collapsed:e})},c.a.createElement(g.a,{className:d()("mx_SpaceButton_new",{mx_SpaceButton_newCancel:n}),label:n?Object(h.a)("Cancel"):Object(h.a)("Create a space"),onClick:l,isNarrow:e}),a)},R=c.a.memo(({children:e,isPanelCollapsed:t,setPanelCollapsed:n})=>{const[r,i,a]=[Object(_.b)(b.g.instance,b.d,()=>b.g.instance.invitedSpaces),Object(_.b)(b.g.instance,b.f,()=>b.g.instance.spacePanelSpaces),Object(_.b)(b.g.instance,b.e,()=>b.g.instance.activeSpace)],s=a?[a]:[];return c.a.createElement("div",{className:"mx_SpaceTreeLevel"},c.a.createElement(F,{selected:!a,isPanelCollapsed:t}),r.map(e=>c.a.createElement(g.b,{key:e.roomId,space:e,activeSpaces:s,isPanelCollapsed:t,onExpand:()=>n(!1)})),i.map((e,r)=>c.a.createElement(l.Draggable,{key:e.roomId,draggableId:e.roomId,index:r},(r,i)=>c.a.createElement(g.b,o()({},r.draggableProps,r.dragHandleProps,{key:e.roomId,innerRef:r.innerRef,className:i.isDragging?"mx_SpaceItem_dragging":void 0,space:e,activeSpaces:s,isPanelCollapsed:t,onExpand:()=>n(!1)})))),e,c.a.createElement(O,{isPanelCollapsed:t,setPanelCollapsed:n}))});t.a=()=>{const[e,t]=Object(s.useState)(!0),n=(e,t)=>{let n,r=!1;do{const o=t?e.lastElementChild:e.firstElementChild,i=t?e.previousElementSibling:e.nextElementSibling;r?o?e=o:i?e=i:(r=!1,e=e.parentElement):i?(e=i,r=!0):e=e.parentElement,e&&(e.classList.contains("mx_ContextualMenu")&&(e=t?e.lastElementChild:e.firstElementChild,r=!0),n=e.classList)}while(e&&!n.contains("mx_SpaceButton"));e&&e.focus()};return c.a.createElement(l.DragDropContext,{onDragEnd:e=>{e.destination&&b.g.instance.moveRootSpace(e.source.index,e.destination.index)}},c.a.createElement(y.c,{handleHomeEnd:!0,onKeyDown:e=>{let t=!0;switch(e.key){case E.a.ARROW_UP:n(e.target,!0);break;case E.a.ARROW_DOWN:n(e.target,!1);break;default:t=!1}t&&(e.stopPropagation(),e.preventDefault())}},({onKeyDownHandler:n})=>c.a.createElement("ul",{className:d()("mx_SpacePanel",{collapsed:e}),onKeyDown:n},c.a.createElement(l.Droppable,{droppableId:"top-level-spaces"},(n,r)=>c.a.createElement(v.a,o()({},n.droppableProps,{wrappedRef:n.innerRef,className:"mx_SpacePanel_spaceTreeWrapper",style:r.isDraggingOver?{pointerEvents:"none"}:void 0}),c.a.createElement(R,{isPanelCollapsed:e,setPanelCollapsed:t},n.placeholder))),c.a.createElement(f.a,{className:d()("mx_SpacePanel_toggleCollapse",{expanded:!e}),onClick:()=>t(!e),title:e?Object(h.a)("Expand space panel"):Object(h.a)("Collapse space panel")}))))}},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(93),u=n(163),d=n(80),h=n(221),p=n(94),m=n(83),g=n(126),f=n(91),_=n(121),b=n(248);const v=["space","onFinished"];t.a=e=>{let{space:t,onFinished:n}=e,r=a()(e,v);const i=Object(s.useContext)(p.a).getUserId();let y,E,S;if("public"===t.getJoinRule()||t.canInvite(i)){const e=e=>{e.preventDefault(),e.stopPropagation(),Object(h.g)(t),n()};y=c.a.createElement(u.b,{className:"mx_SpacePanel_contextMenu_inviteButton",iconClassName:"mx_SpacePanel_iconInvite",label:Object(d.a)("Invite people"),onClick:e})}if(Object(h.c)(t)){const e=e=>{e.preventDefault(),e.stopPropagation(),Object(h.h)(t),n()};E=c.a.createElement(u.b,{iconClassName:"mx_SpacePanel_iconSettings",label:Object(d.a)("Settings"),onClick:e})}else{const e=e=>{e.preventDefault(),e.stopPropagation(),Object(h.a)(t),n()};S=c.a.createElement(u.c,{red:!0,first:!0},c.a.createElement(u.b,{iconClassName:"mx_SpacePanel_iconLeave",label:Object(d.a)("Leave space"),onClick:e}))}const w=t.currentState.maySendStateEvent(l.a.SpaceChild,i);let C;if(t.currentState.maySendStateEvent(l.a.SpaceChild,i)){const e=e=>{e.preventDefault(),e.stopPropagation(),Object(h.e)(t),n()},r=e=>{e.preventDefault(),e.stopPropagation(),Object(h.d)(t),n()},o=e=>{e.preventDefault(),e.stopPropagation(),Object(h.f)(t),n()};C=c.a.createElement(u.c,{first:!0},c.a.createElement(u.b,{iconClassName:"mx_SpacePanel_iconPlus",label:Object(d.a)("Create new room"),onClick:e}),c.a.createElement(u.b,{iconClassName:"mx_SpacePanel_iconHash",label:Object(d.a)("Add existing room"),onClick:r}),c.a.createElement(u.b,{iconClassName:"mx_SpacePanel_iconPlus",label:Object(d.a)("Add space"),onClick:o},c.a.createElement(b.a,null)))}return c.a.createElement(u.e,o()({},r,{onFinished:n,className:"mx_SpacePanel_contextMenu",compact:!0}),c.a.createElement("div",{className:"mx_SpacePanel_contextMenu_header"},t.name),c.a.createElement(u.c,{first:!0},y,c.a.createElement(u.b,{iconClassName:"mx_SpacePanel_iconMembers",label:Object(d.a)("Members"),onClick:e=>{e.preventDefault(),e.stopPropagation(),g.a.getRoomId()||m.a.dispatch({action:"view_room",room_id:t.roomId},!0),m.a.dispatch({action:f.a.SetRightPanelPhase,phase:_.c.SpaceMemberList,refireParams:{space:t}}),n()}}),E,c.a.createElement(u.b,{iconClassName:"mx_SpacePanel_iconExplore",label:w?Object(d.a)("Manage & explore rooms"):Object(d.a)("Explore rooms"),onClick:e=>{e.preventDefault(),e.stopPropagation(),m.a.dispatch({action:"view_room",room_id:t.roomId}),n()}})),C,S)}},function(e,t,n){"use strict";t.__esModule=!0,t.getBatch=t.setBatch=void 0;var r=function(e){e()};t.setBatch=function(e){return r=e};t.getBatch=function(){return r}},function(e,t,n){"use strict";var r=n(170),o=n(118);t.__esModule=!0,t.default=function(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,d=n.methodName,y=void 0===d?"connectAdvanced":d,E=n.renderCountProp,S=void 0===E?void 0:E,w=n.shouldHandleStateChanges,C=void 0===w||w,T=n.storeKey,x=void 0===T?"store":T,k=n.withRef,F=void 0!==k&&k,O=n.forwardRef,R=void 0!==O&&O,D=n.context,I=void 0===D?h.ReactReduxContext:D,A=(0,a.default)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);if(void 0!==S)throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");if(F)throw new Error("withRef is removed. To access the wrapped instance, use a ref on the connected component");if("store"!==x)throw new Error("storeKey has been removed and does not do anything. To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect");var N=I;return function(t){if(!(0,l.isValidElementType)(t))throw new Error("You must pass a component to the function returned by "+y+". Instead received "+function(e){try{return JSON.stringify(e)}catch(t){return String(e)}}(t));var n=t.displayName||t.name||"Component",r=o(n),d=(0,i.default)({},A,{getDisplayName:o,methodName:y,renderCountProp:S,shouldHandleStateChanges:C,storeKey:x,displayName:r,wrappedComponentName:n,WrappedComponent:t}),h=A.pure;var E=h?c.useMemo:function(e){return e()};function w(n){var o=(0,c.useMemo)((function(){var e=n.reactReduxForwardedRef,t=(0,a.default)(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),s=o[0],h=o[1],y=o[2],S=(0,c.useMemo)((function(){return s&&s.Consumer&&(0,l.isContextConsumer)(c.default.createElement(s.Consumer,null))?s:N}),[s,N]),w=(0,c.useContext)(S),T=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),x=Boolean(w)&&Boolean(w.store);if(!T&&!x)throw new Error('Could not find "store" in the context of "'+r+'". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to '+r+" in connect options.");var k=T?n.store:w.store,F=(0,c.useMemo)((function(){return function(t){return e(t.dispatch,d)}(k)}),[k]),O=(0,c.useMemo)((function(){if(!C)return m;var e=new u.default(k,T?null:w.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[k,T,w]),R=O[0],D=O[1],I=(0,c.useMemo)((function(){return T?w:(0,i.default)({},w,{subscription:R})}),[T,w,R]),A=(0,c.useReducer)(g,p,v),M=A[0][0],P=A[1];if(M&&M.error)throw M.error;var L=(0,c.useRef)(),j=(0,c.useRef)(y),U=(0,c.useRef)(),B=(0,c.useRef)(!1),G=E((function(){return U.current&&y===j.current?U.current:F(k.getState(),y)}),[k,M,y]);f(_,[j,L,B,y,G,U,D]),f(b,[C,k,R,F,j,L,B,U,D,P],[k,R,F]);var V=(0,c.useMemo)((function(){return c.default.createElement(t,(0,i.default)({},G,{ref:h}))}),[h,t,G]);return(0,c.useMemo)((function(){return C?c.default.createElement(S.Provider,{value:I},V):V}),[S,V,I])}var T=h?c.default.memo(w):w;if(T.WrappedComponent=t,T.displayName=w.displayName=r,R){var k=c.default.forwardRef((function(e,t){return c.default.createElement(T,(0,i.default)({},e,{reactReduxForwardedRef:t}))}));return k.displayName=r,k.WrappedComponent=t,(0,s.default)(k,t)}return(0,s.default)(T,t)}};var i=o(n(92)),a=o(n(304)),s=o(n(1354)),c=r(n(78)),l=n(305),u=o(n(473)),d=n(474),h=n(224),p=[],m=[null,null];function g(e,t){var n=e[1];return[t.payload,n+1]}function f(e,t,n){(0,d.useIsomorphicLayoutEffect)((function(){return e.apply(void 0,t)}),n)}function _(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function b(e,t,n,r,o,i,a,s,c,l){if(e){var u=!1,d=null,h=function(){if(!u){var e,n,h=t.getState();try{e=r(h,o.current)}catch(e){n=e,d=e}n||(d=null),e===i.current?a.current||c():(i.current=e,s.current=e,a.current=!0,l({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=h,n.trySubscribe(),h();return function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var v=function(){return[null,0]}},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}t.__esModule=!0,t.default=function(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!r(e[n[i]],t[n[i]]))return!1;return!0}},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.wrapMapToPropsConstant=function(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}},t.getDependsOnOwnProps=i,t.wrapMapToPropsFunc=function(e,t){return function(n,r){var a=r.displayName,s=function(e,t){return s.dependsOnOwnProps?s.mapToProps(e,t):s.mapToProps(e)};return s.dependsOnOwnProps=!0,s.mapToProps=function(n,r){s.mapToProps=e,s.dependsOnOwnProps=i(e);var c=s(n,r);return"function"==typeof c&&(s.mapToProps=c,s.dependsOnOwnProps=i(c),c=s(n,r)),(0,o.default)(c,a,t),c},s}};var o=r(n(742));function i(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.default=function(e,t,n){(0,o.default)(e)||(0,i.default)(n+"() in "+t+" must return a plain object. Instead received "+e+".")};var o=r(n(1358)),i=r(n(743))},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}},function(e,t,n){"use strict";t.__esModule=!0,t.createStoreHook=a,t.useStore=void 0;var r=n(78),o=n(224),i=n(745);function a(e){void 0===e&&(e=o.ReactReduxContext);var t=e===o.ReactReduxContext?i.useReduxContext:function(){return(0,r.useContext)(e)};return function(){return t().store}}var s=a();t.useStore=s},function(e,t,n){"use strict";t.__esModule=!0,t.useReduxContext=function(){var e=(0,r.useContext)(o.ReactReduxContext);if(!e)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return e};var r=n(78),o=n(224)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(747),c=n(128);class l extends a.a.Component{constructor(e){super(e),o()(this,"onFeedsChanged",()=>{this.setState({feeds:this.props.call.getRemoteFeeds()})}),this.state={feeds:[]}}componentDidMount(){this.props.call.addListener(c.c.FeedsChanged,this.onFeedsChanged)}componentWillUnmount(){this.props.call.removeListener(c.c.FeedsChanged,this.onFeedsChanged)}render(){return this.state.feeds.map((e,t)=>a.a.createElement(s.a,{feed:e,key:t}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(376),c=n(96),l=n(285);class u extends a.a.Component{constructor(e){super(e),o()(this,"element",Object(i.createRef)()),o()(this,"onAudioOutputChanged",e=>{const t=this.element.current;if(e)try{t.setSinkId(e)}catch(e){console.error("Couldn't set requested audio output device: using default",e),c.a.warn("Couldn't set requested audio output device: using default",e)}}),o()(this,"onNewStream",()=>{this.setState({audioMuted:this.props.feed.isAudioMuted()}),this.playMedia()}),this.state={audioMuted:this.props.feed.isAudioMuted()}}componentDidMount(){l.c.instance.addListener(l.a.AudioOutputChanged,this.onAudioOutputChanged),this.props.feed.addListener(s.b.NewStream,this.onNewStream),this.playMedia()}componentWillUnmount(){l.c.instance.removeListener(l.a.AudioOutputChanged,this.onAudioOutputChanged),this.props.feed.removeListener(s.b.NewStream,this.onNewStream),this.stopMedia()}playMedia(){const e=this.element.current;if(e){this.onAudioOutputChanged(l.c.getAudioOutput()),e.muted=!1,e.srcObject=this.props.feed.stream,e.autoplay=!0;try{e.play()}catch(e){c.a.info("Failed to play media element with feed",this.props.feed,e)}}}stopMedia(){const e=this.element.current;e&&(e.pause(),e.src=null)}render(){return this.state.audioMuted?null:a.a.createElement("audio",{ref:this.element})}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return we}));var r=n(99),o=n.n(r),i=n(79),a=n.n(i),s=n(78),c=n.n(s),l=n(86),u=n.n(l),d=n(185),h=n(271),p=n(80),m=n(114),g=n(187),f=n(87),_=n(138),b=n(83),v=n(186),y=n(1371),E=n(346),S=n(347),w=n(126),C=n(1372),T=n(268),x=n(84),k=n(140),F=n(85),O=n(251),R=n(144),D=n(164),I=n(94),A=n(476),N=n(91),M=n(342),P=n(349),L=n(288),j=n(779),U=n(781),B=n(782),G=n(783),V=n(785),q=n(787),H=n(287),z=n(202),W=n(212),K=n(115),Y=n(235),$=n(455),Q=n(167),J=n(172),X=n(179),Z=n(129),ee=n(890),te=n(81),ne=n(143),re=n(1374),oe=n(107),ie=n(105),ae=n(790),se=n(97),ce=n(791),le=n(441),ue=n(792),de=n(811),he=n(812),pe=n(102);const me=["upgradeRecommendation"],ge=["upgradeRecommendation"];var fe,_e,be;function ve(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}function ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let Ee=function(e){};const Se="sandbox"in document.createElement("iframe");let we=Object(te.a)("structures.RoomView")((be=_e=class extends c.a.Component{constructor(t,n){super(t,n),a()(this,"dispatcherRef",void 0),a()(this,"roomStoreToken",void 0),a()(this,"rightPanelStoreToken",void 0),a()(this,"settingWatchers",void 0),a()(this,"unmounted",!1),a()(this,"permalinkCreators",{}),a()(this,"searchId",void 0),a()(this,"roomView",Object(s.createRef)()),a()(this,"searchResultsPanel",Object(s.createRef)()),a()(this,"messagePanel",void 0),a()(this,"onWidgetStoreUpdate",()=>{this.state.room&&this.checkWidgets(this.state.room)}),a()(this,"checkWidgets",e=>{this.setState({hasPinnedWidgets:J.d.instance.getContainerWidgets(e,J.a.Top).length>0,showApps:this.shouldShowApps(e)})}),a()(this,"onReadReceiptsChange",()=>{this.setState({showReadReceipts:x.b.getValue("showReadReceipts",this.state.roomId)})}),a()(this,"onRoomViewStoreUpdate",e=>{if(this.unmounted)return;if(!e&&this.state.roomId!==w.a.getRoomId())return;const t=w.a.getRoomId(),n={roomId:t,roomAlias:w.a.getRoomAlias(),roomLoading:w.a.isRoomLoading(),roomLoadError:w.a.getRoomLoadError(),joining:w.a.isJoining(),initialEventId:w.a.getInitialEventId(),isInitialEventHighlighted:w.a.isInitialEventHighlighted(),replyToEvent:w.a.getQuotingEvent(),shouldPeek:this.state.matrixClientIsReady&&w.a.shouldPeek(),showReadReceipts:x.b.getValue("showReadReceipts",t),showRedactions:x.b.getValue("showRedactions",t),showJoinLeaves:x.b.getValue("showJoinLeaves",t),showAvatarChanges:x.b.getValue("showAvatarChanges",t),showDisplaynameChanges:x.b.getValue("showDisplaynameChanges",t),wasContextSwitch:w.a.getWasContextSwitch()};if(this.settingWatchers=this.settingWatchers.concat([x.b.watchSetting("showReadReceipts",t,(...[,,,e])=>this.setState({showReadReceipts:e})),x.b.watchSetting("showRedactions",t,(...[,,,e])=>this.setState({showRedactions:e})),x.b.watchSetting("showJoinLeaves",t,(...[,,,e])=>this.setState({showJoinLeaves:e})),x.b.watchSetting("showAvatarChanges",t,(...[,,,e])=>this.setState({showAvatarChanges:e})),x.b.watchSetting("showDisplaynameChanges",t,(...[,,,e])=>this.setState({showDisplaynameChanges:e}))]),e||!this.state.shouldPeek||n.shouldPeek||this.context.stopPeeking(),console.log("RVS update:",n.roomId,n.roomAlias,"loading?",n.roomLoading,"joining?",n.joining,"initial?",e,"shouldPeek?",n.shouldPeek),e&&(n.room=this.context.getRoom(n.roomId),n.room&&(n.showApps=this.shouldShowApps(n.room),this.onRoomLoaded(n.room))),null===this.state.roomId&&null!==n.roomId&&!n.initialEventId){const e=C.a.getScrollState(n.roomId);e&&(n.initialEventId=e.focussedEvent,n.initialEventPixelOffset=e.pixelOffset)}this.state.initialEventId!==n.initialEventId&&(n.searchResults=null),this.setState(n),e&&this.setupRoom(n.room,n.roomId,n.joining,n.shouldPeek)}),a()(this,"getRoomId",()=>this.state.room?this.state.room.roomId:this.state.roomId),a()(this,"onWidgetEchoStoreUpdate",()=>{this.state.room&&this.setState({hasPinnedWidgets:J.d.instance.getContainerWidgets(this.state.room,J.a.Top).length>0,showApps:this.shouldShowApps(this.state.room)})}),a()(this,"onWidgetLayoutChange",()=>{this.onWidgetEchoStoreUpdate()}),a()(this,"onUserScroll",()=>{this.state.initialEventId&&this.state.isInitialEventHighlighted&&b.a.dispatch({action:"view_room",room_id:this.state.room.roomId,event_id:this.state.initialEventId,highlighted:!1,replyingToEvent:this.state.replyToEvent})}),a()(this,"onRightPanelStoreUpdate",()=>{this.setState({showRightPanel:O.a.getSharedInstance().isOpenForRoom})}),a()(this,"onPageUnload",e=>g.b.sharedInstance().getCurrentUploads().length>0?e.returnValue=Object(p.a)("You seem to be uploading files, are you sure you want to quit?"):this.getCallForRoom()&&"ended"!==this.state.callState?e.returnValue=Object(p.a)("You seem to be in a call, are you sure you want to quit?"):void 0),a()(this,"onReactKeyDown",e=>{let t=!1;switch(Object(X.f)().getRoomAction(e)){case X.d.DismissReadMarker:this.messagePanel.forgetReadMarker(),this.jumpToLiveTimeline(),t=!0;break;case X.d.JumpToOldestUnread:this.jumpToReadMarker(),t=!0;break;case X.d.UploadFile:b.a.dispatch({action:"upload_file"},!0),t=!0}t&&(e.stopPropagation(),e.preventDefault())}),a()(this,"onAction",t=>{var n;switch(t.action){case"message_sent":this.checkDesktopNotifications();break;case"post_sticker_message":this.injectSticker(t.data.content.url,t.data.content.info,t.data.description||t.data.name);break;case"picture_snapshot":g.b.sharedInstance().sendContentListToRoom([t.file],this.state.room.roomId,this.context);break;case"notifier_enabled":case N.a.UploadStarted:case N.a.UploadFinished:case N.a.UploadCanceled:this.forceUpdate();break;case"call_state":{if(!t.room_id)return;const e=this.getCallForRoom();this.setState({callState:e?e.state:null});break}case"appsDrawer":this.setState({showApps:t.show});break;case"reply_to_event":this.state.searchResults&&t.event.getRoomId()===this.state.roomId&&!this.unmounted&&this.onCancelSearchClick();break;case"quote":if(this.state.searchResults){const n=t.event.getRoomId();n===this.state.roomId&&this.onCancelSearchClick(),e(()=>{b.a.dispatch({action:"view_room",room_id:n,deferred_action:t})})}break;case"sync_state":this.state.matrixClientIsReady||this.setState({matrixClientIsReady:this.context&&this.context.isInitialSyncComplete()},()=>{this.onRoomViewStoreUpdate(!0)});break;case"focus_search":this.onSearchClick();break;case"edit_event":{const e=t.event?new re.a(t.event):null;this.setState({editState:e},()=>{var e;t.event&&(null===(e=this.messagePanel)||void 0===e||e.scrollToEventIfNeeded(t.event.getId()))});break}case N.a.ComposerInsert:b.a.dispatch(ye(ye({},t),{},{action:this.state.editState?"edit_composer_insert":"send_composer_insert"}));break;case N.a.FocusAComposer:b.a.fire(this.state.editState?N.a.FocusEditMessageComposer:N.a.FocusSendMessageComposer);break;case"scroll_to_bottom":null===(n=this.messagePanel)||void 0===n||n.jumpToLiveTimeline()}}),a()(this,"onRoomTimeline",(e,t,n,r,o)=>{var i;this.unmounted||t&&t.roomId===(null===(i=this.state.room)||void 0===i?void 0:i.roomId)&&o.timeline.getTimelineSet()===t.getUnfilteredTimelineSet()&&("org.matrix.room.preview_urls"===e.getType()&&this.updatePreviewUrlVisibility(t),"m.room.encryption"===e.getType()&&this.updateE2EStatus(t),!n&&o&&o.liveEvent&&(this.state.joining||(e.isBeingDecrypted()||e.isDecryptionFailure()||this.handleEffects(e),e.getSender()!==this.context.credentials.userId&&(!this.state.searchResults&&this.state.atEndOfLiveTimeline||Object(h.a)(e,this.state)||this.setState((e,t)=>({numUnreadMessages:e.numUnreadMessages+1}))))))}),a()(this,"onEventDecrypted",e=>{this.state.room&&this.state.matrixClientIsReady&&e.getRoomId()===this.state.room.roomId&&(e.isDecryptionFailure()||this.handleEffects(e))}),a()(this,"handleEffects",e=>{Q.a.instance.getRoomState(this.state.room).isUnread&&z.CHAT_EFFECTS.forEach(t=>{(Object(H.containsEmoji)(e.getContent(),t.emojis)||e.getContent().msgtype===t.msgType)&&b.a.dispatch({action:"effects."+t.command})})}),a()(this,"onRoomName",e=>{this.state.room&&e.roomId==this.state.room.roomId&&this.forceUpdate()}),a()(this,"onKeyBackupStatus",()=>{this.forceUpdate()}),a()(this,"canResetTimeline",()=>!this.messagePanel||this.messagePanel.canResetTimeline()),a()(this,"onRoomLoaded",e=>{this.unmounted||(J.d.instance.on(J.d.emissionForRoom(e),this.onWidgetLayoutChange),this.onWidgetLayoutChange(),this.calculatePeekRules(e),this.updatePreviewUrlVisibility(e),this.loadMembersIfJoined(e),this.calculateRecommendedVersion(e),this.updateE2EStatus(e),this.updatePermissions(e),this.checkWidgets(e))}),a()(this,"onRoom",e=>{e&&e.roomId===this.state.roomId&&(this.state.room&&J.d.instance.off(J.d.emissionForRoom(this.state.room),this.onWidgetLayoutChange),this.setState({room:e},()=>{this.onRoomLoaded(e)}))}),a()(this,"onDeviceVerificationChanged",(e,t)=>{const n=this.state.room;n.currentState.getMember(e)&&this.updateE2EStatus(n)}),a()(this,"onUserVerificationChanged",(e,t)=>{const n=this.state.room;n&&n.currentState.getMember(e)&&this.updateE2EStatus(n)}),a()(this,"onCrossSigningKeysChanged",()=>{const e=this.state.room;e&&this.updateE2EStatus(e)}),a()(this,"onAccountData",e=>{const t=e.getType();"org.matrix.preview_urls"!==t&&"im.vector.web.settings"!==t||!this.state.room||this.updatePreviewUrlVisibility(this.state.room)}),a()(this,"onRoomAccountData",(e,t)=>{if(t.roomId==this.state.roomId){const n=e.getType();"org.matrix.room.preview_urls"!==n&&"im.vector.web.settings"!==n||this.updatePreviewUrlVisibility(t)}}),a()(this,"onRoomStateEvents",(e,t)=>{this.state.room&&this.state.room.roomId===t.roomId&&this.updatePermissions(this.state.room)}),a()(this,"onRoomStateMember",(e,t,n)=>{this.state.room&&n.roomId===this.state.room.roomId&&this.updateRoomMembers()}),a()(this,"onMyMembership",(e,t,n)=>{e.roomId===this.state.roomId&&(this.forceUpdate(),this.loadMembersIfJoined(e),this.updatePermissions(e))}),a()(this,"updateRoomMembers",Object(oe.throttle)(()=>{this.updateDMState(),this.updateE2EStatus(this.state.room)},500,{leading:!0,trailing:!0})),a()(this,"onSearchResultsFillRequest",e=>{if(!e)return Promise.resolve(!1);if(this.state.searchResults.next_batch){Ee("requesting more search results");const e=Object(y.b)(this.state.searchResults);return this.handleSearchResult(e)}return Ee("no more search results"),Promise.resolve(!1)}),a()(this,"onInviteButtonClick",()=>{b.a.dispatch({action:"view_invite",roomId:this.state.room.roomId})}),a()(this,"onJoinButtonClicked",()=>{this.context&&this.context.isGuest()?(b.a.dispatch({action:"do_after_sync_prepared",deferred_action:{action:"view_room",room_id:this.getRoomId()}}),b.a.dispatch({action:"require_registration"})):Promise.resolve().then(()=>{var e;const t=null===(e=this.props.threepidInvite)||void 0===e?void 0:e.signUrl;return b.a.dispatch({action:N.a.JoinRoom,roomId:this.getRoomId(),opts:{inviteSignUrl:t},_type:"unknown"}),Promise.resolve()})}),a()(this,"onMessageListScroll",e=>{this.messagePanel.isAtEndOfLiveTimeline()?this.setState({numUnreadMessages:0,atEndOfLiveTimeline:!0}):this.setState({atEndOfLiveTimeline:!1}),this.updateTopUnreadMessagesBar()}),a()(this,"onDragEnter",e=>{e.stopPropagation(),e.preventDefault(),this.setState({dragCounter:this.state.dragCounter+1}),(e.dataTransfer.types.includes("Files")||e.dataTransfer.types.includes("application/x-moz-file"))&&this.setState({draggingFile:!0})}),a()(this,"onDragLeave",e=>{e.stopPropagation(),e.preventDefault(),this.setState({dragCounter:this.state.dragCounter-1}),0===this.state.dragCounter&&this.setState({draggingFile:!1})}),a()(this,"onDragOver",e=>{e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="none",(e.dataTransfer.types.includes("Files")||e.dataTransfer.types.includes("application/x-moz-file"))&&(e.dataTransfer.dropEffect="copy")}),a()(this,"onDrop",e=>{e.stopPropagation(),e.preventDefault(),g.b.sharedInstance().sendContentListToRoom(e.dataTransfer.files,this.state.room.roomId,this.context),b.a.fire(N.a.FocusSendMessageComposer),this.setState({draggingFile:!1,dragCounter:this.state.dragCounter-1})}),a()(this,"onSearch",(e,t)=>{let n;this.setState({searchTerm:e,searchScope:t,searchResults:{},searchHighlights:[]}),this.searchResultsPanel.current&&this.searchResultsPanel.current.resetScrollState(),this.searchId=(new Date).getTime(),t===U.a.Room&&(n=this.state.room.roomId),Ee("sending search request");const r=Object(y.a)(e,n);this.handleSearchResult(r)}),a()(this,"onCallPlaced",e=>{b.a.dispatch({action:"place_call",type:e,room_id:this.state.room.roomId})}),a()(this,"onSettingsClick",()=>{b.a.dispatch({action:"open_room_settings"})}),a()(this,"onAppsClick",()=>{b.a.dispatch({action:"appsDrawer",show:!this.state.showApps})}),a()(this,"onForgetClick",()=>{b.a.dispatch({action:"forget_room",room_id:this.state.room.roomId})}),a()(this,"onRejectButtonClicked",()=>{this.setState({rejecting:!0}),this.context.leave(this.state.roomId).then(()=>{b.a.dispatch({action:"view_home_page"}),this.setState({rejecting:!1})},e=>{console.error("Failed to reject invite: %s",e);const t=e.message?e.message:JSON.stringify(e);f.a.createTrackedDialog("Failed to reject invite","",ie.a,{title:Object(p.a)("Failed to reject invite"),description:t}),this.setState({rejecting:!1,rejectError:e})})}),a()(this,"onRejectAndIgnoreClick",async()=>{this.setState({rejecting:!0});try{const e=this.state.room.getMember(this.context.getUserId()).events.member,t=this.context.getIgnoredUsers();t.push(e.getSender()),await this.context.setIgnoredUsers(t),await this.context.leave(this.state.roomId),b.a.dispatch({action:"view_home_page"}),this.setState({rejecting:!1})}catch(e){console.error("Failed to reject invite: %s",e);const t=e.message?e.message:JSON.stringify(e);f.a.createTrackedDialog("Failed to reject invite","",ie.a,{title:Object(p.a)("Failed to reject invite"),description:t}),this.setState({rejecting:!1,rejectError:e})}}),a()(this,"onRejectThreepidInviteButtonClicked",()=>{b.a.fire(N.a.ViewRoomDirectory)}),a()(this,"onSearchClick",()=>{this.setState({searching:!this.state.searching})}),a()(this,"onCancelSearchClick",()=>{this.setState({searching:!1,searchResults:null})}),a()(this,"jumpToLiveTimeline",()=>{this.state.initialEventId&&this.state.isInitialEventHighlighted?b.a.dispatch({action:"view_room",room_id:this.state.room.roomId}):(this.messagePanel.jumpToLiveTimeline(),b.a.fire(N.a.FocusSendMessageComposer))}),a()(this,"jumpToReadMarker",()=>{this.messagePanel.jumpToReadMarker()}),a()(this,"forgetReadMarker",e=>{e.stopPropagation(),this.messagePanel.forgetReadMarker()}),a()(this,"updateTopUnreadMessagesBar",()=>{if(!this.messagePanel)return;const e=this.messagePanel.canJumpToReadMarker();this.state.showTopUnreadMessagesBar!=e&&this.setState({showTopUnreadMessagesBar:e})}),a()(this,"onResize",()=>{let e=ne.b.instance.windowHeight-261;e<50&&(e=50),this.state.auxPanelMaxHeight!==e&&this.setState({auxPanelMaxHeight:e})}),a()(this,"onStatusBarVisible",()=>{this.unmounted||this.state.statusBarVisible||this.setState({statusBarVisible:!0})}),a()(this,"onStatusBarHidden",()=>{!this.unmounted&&this.state.statusBarVisible&&this.setState({statusBarVisible:!1})}),a()(this,"handleScrollKey",e=>{let t;this.searchResultsPanel.current?t=this.searchResultsPanel.current:this.messagePanel&&(t=this.messagePanel),t&&t.handleScrollKey(e)}),a()(this,"gatherTimelinePanelRef",e=>{this.messagePanel=e}),a()(this,"onHiddenHighlightsClick",()=>{const e=this.getOldRoom();e&&b.a.dispatch({action:"view_room",room_id:e.roomId})});const r=this.context.hasLazyLoadMembersEnabled();this.state={roomId:null,roomLoading:!0,peekLoading:!1,shouldPeek:!0,membersLoaded:!r,numUnreadMessages:0,draggingFile:!1,searching:!1,searchResults:null,callState:null,guestsCanJoin:!1,canPeek:!1,showApps:!1,isPeeking:!1,showRightPanel:O.a.getSharedInstance().isOpenForRoom,joining:!1,atEndOfLiveTimeline:!0,atEndOfLiveTimelineInit:!1,showTopUnreadMessagesBar:!1,statusBarVisible:!1,canReact:!1,canReply:!1,layout:x.b.getValue("layout"),lowBandwidth:x.b.getValue("lowBandwidth"),alwaysShowTimestamps:x.b.getValue("alwaysShowTimestamps"),showTwelveHourTimestamps:x.b.getValue("showTwelveHourTimestamps"),readMarkerInViewThresholdMs:x.b.getValue("readMarkerInViewThresholdMs"),readMarkerOutOfViewThresholdMs:x.b.getValue("readMarkerOutOfViewThresholdMs"),showHiddenEventsInTimeline:x.b.getValue("showHiddenEventsInTimeline"),showReadReceipts:!0,showRedactions:!0,showJoinLeaves:!0,showAvatarChanges:!0,showDisplaynameChanges:!0,matrixClientIsReady:this.context&&this.context.isInitialSyncComplete(),dragCounter:0},this.dispatcherRef=b.a.register(this.onAction),this.context.on("Room",this.onRoom),this.context.on("Room.timeline",this.onRoomTimeline),this.context.on("Room.name",this.onRoomName),this.context.on("Room.accountData",this.onRoomAccountData),this.context.on("RoomState.events",this.onRoomStateEvents),this.context.on("RoomState.members",this.onRoomStateMember),this.context.on("Room.myMembership",this.onMyMembership),this.context.on("accountData",this.onAccountData),this.context.on("crypto.keyBackupStatus",this.onKeyBackupStatus),this.context.on("deviceVerificationChanged",this.onDeviceVerificationChanged),this.context.on("userTrustStatusChanged",this.onUserVerificationChanged),this.context.on("crossSigning.keysChanged",this.onCrossSigningKeysChanged),this.context.on("Event.decrypted",this.onEventDecrypted),this.roomStoreToken=w.a.addListener(this.onRoomViewStoreUpdate),this.rightPanelStoreToken=O.a.getSharedInstance().addListener(this.onRightPanelStoreUpdate),T.a.on(K.b,this.onWidgetEchoStoreUpdate),W.a.instance.on(K.b,this.onWidgetStoreUpdate),this.settingWatchers=[x.b.watchSetting("layout",null,(...[,,,e])=>this.setState({layout:e})),x.b.watchSetting("lowBandwidth",null,(...[,,,e])=>this.setState({lowBandwidth:e})),x.b.watchSetting("alwaysShowTimestamps",null,(...[,,,e])=>this.setState({alwaysShowTimestamps:e})),x.b.watchSetting("showTwelveHourTimestamps",null,(...[,,,e])=>this.setState({showTwelveHourTimestamps:e})),x.b.watchSetting("readMarkerInViewThresholdMs",null,(...[,,,e])=>this.setState({readMarkerInViewThresholdMs:e})),x.b.watchSetting("readMarkerOutOfViewThresholdMs",null,(...[,,,e])=>this.setState({readMarkerOutOfViewThresholdMs:e})),x.b.watchSetting("showHiddenEventsInTimeline",null,(...[,,,e])=>this.setState({showHiddenEventsInTimeline:e}))]}getPermalinkCreatorForRoom(e){return this.permalinkCreators[e.roomId]||(this.permalinkCreators[e.roomId]=new m.a(e),this.state.room&&e.roomId===this.state.room.roomId?this.permalinkCreators[e.roomId].start():this.permalinkCreators[e.roomId].load()),this.permalinkCreators[e.roomId]}stopAllPermalinkCreators(){if(this.permalinkCreators)for(const e of Object.keys(this.permalinkCreators))this.permalinkCreators[e].stop()}setupRoom(e,t,n,r){!n&&t&&(!e&&r?(console.info("Attempting to peek into room %s",t),this.setState({peekLoading:!0,isPeeking:!0}),this.context.peekInRoom(t).then(e=>{this.unmounted||(this.setState({room:e,peekLoading:!1}),this.onRoomLoaded(e))}).catch(e=>{if(!this.unmounted){if(this.setState({isPeeking:!1}),"M_GUEST_ACCESS_FORBIDDEN"!==e.errcode&&"M_FORBIDDEN"!==e.errcode)throw e;this.setState({peekLoading:!1})}})):e&&(this.context.stopPeeking(),this.setState({isPeeking:!1})))}shouldShowApps(e){if(!Se||!e)return!1;const t="false"===localStorage.getItem(e.roomId+"_hide_widget_drawer");return J.d.instance.getContainerWidgets(e,J.a.Top).length>0||t}componentDidMount(){this.onRoomViewStoreUpdate(!0);const e=this.getCallForRoom(),t=e?e.state:null;this.setState({callState:t}),window.addEventListener("beforeunload",this.onPageUnload),this.props.resizeNotifier&&this.props.resizeNotifier.on("middlePanelResized",this.onResize),this.onResize()}shouldComponentUpdate(e,t){const n=Object(Z.d)(this.props,e),r=this.state,{upgradeRecommendation:i}=r,a=o()(r,me),{upgradeRecommendation:s}=t,c=o()(t,ge),l=(null==s?void 0:s.needsUpgrade)!==(null==i?void 0:i.needsUpgrade)||Object(Z.d)(a,c);return n||l}componentDidUpdate(){if(this.roomView.current){const e=this.roomView.current;e.ondrop||(e.addEventListener("drop",this.onDrop),e.addEventListener("dragover",this.onDragOver),e.addEventListener("dragenter",this.onDragEnter),e.addEventListener("dragleave",this.onDragLeave))}this.messagePanel&&!this.state.atEndOfLiveTimelineInit&&this.setState({atEndOfLiveTimelineInit:!0,atEndOfLiveTimeline:this.messagePanel.isAtEndOfLiveTimeline()})}componentWillUnmount(){if(this.unmounted=!0,this.state.roomId&&C.a.setScrollState(this.state.roomId,this.getScrollState()),this.state.shouldPeek&&this.context.stopPeeking(),this.stopAllPermalinkCreators(),this.roomView.current){const e=this.roomView.current;e.removeEventListener("drop",this.onDrop),e.removeEventListener("dragover",this.onDragOver),e.removeEventListener("dragenter",this.onDragEnter),e.removeEventListener("dragleave",this.onDragLeave)}b.a.unregister(this.dispatcherRef),this.context&&(this.context.removeListener("Room",this.onRoom),this.context.removeListener("Room.timeline",this.onRoomTimeline),this.context.removeListener("Room.name",this.onRoomName),this.context.removeListener("Room.accountData",this.onRoomAccountData),this.context.removeListener("RoomState.events",this.onRoomStateEvents),this.context.removeListener("Room.myMembership",this.onMyMembership),this.context.removeListener("RoomState.members",this.onRoomStateMember),this.context.removeListener("accountData",this.onAccountData),this.context.removeListener("crypto.keyBackupStatus",this.onKeyBackupStatus),this.context.removeListener("deviceVerificationChanged",this.onDeviceVerificationChanged),this.context.removeListener("userTrustStatusChanged",this.onUserVerificationChanged),this.context.removeListener("crossSigning.keysChanged",this.onCrossSigningKeysChanged),this.context.removeListener("Event.decrypted",this.onEventDecrypted)),window.removeEventListener("beforeunload",this.onPageUnload),this.props.resizeNotifier&&this.props.resizeNotifier.removeListener("middlePanelResized",this.onResize),this.roomStoreToken&&this.roomStoreToken.remove(),this.rightPanelStoreToken&&this.rightPanelStoreToken.remove(),T.a.removeListener(K.b,this.onWidgetEchoStoreUpdate),W.a.instance.removeListener(K.b,this.onWidgetStoreUpdate),this.state.room&&J.d.instance.off(J.d.emissionForRoom(this.state.room),this.onWidgetLayoutChange),this.updateRoomMembers.cancel();for(const e of this.settingWatchers)x.b.unwatchSetting(e)}async calculateRecommendedVersion(e){const t=await e.getRecommendedVersion();this.unmounted||this.setState({upgradeRecommendation:t})}async loadMembersIfJoined(e){if(this.context.hasLazyLoadMembersEnabled()&&e&&"join"===e.getMyMembership())try{await e.loadMembersIfNeeded(),this.unmounted||this.setState({membersLoaded:!0})}catch(t){const n=`Fetching room members for ${e.roomId} failed. Room members will appear incomplete.`;console.error(n),console.error(t)}}calculatePeekRules(e){const t=e.currentState.getStateEvents("m.room.guest_access","");t&&"can_join"===t.getContent().guest_access&&this.setState({guestsCanJoin:!0});const n=e.currentState.getStateEvents("m.room.history_visibility","");n&&"world_readable"===n.getContent().history_visibility&&this.setState({canPeek:!0})}updatePreviewUrlVisibility({roomId:e}){const t=this.context.isRoomEncrypted(e)?"urlPreviewsEnabled_e2ee":"urlPreviewsEnabled";this.setState({showUrlPreview:x.b.getValue(t,e)})}async updateE2EStatus(e){if(!this.context.isRoomEncrypted(e.roomId))return;let t=A.a.Warning;this.context.isCryptoEnabled()&&(t=await Object(A.b)(this.context,e)),this.unmounted||this.setState({e2eStatus:t})}updatePermissions(e){if(e){const t=this.context.getUserId(),n="join"===e.getMyMembership()&&e.currentState.maySendEvent("m.reaction",t),r=e.maySendMessage();this.setState({canReact:n,canReply:r})}}checkDesktopNotifications(){this.state.room.getJoinedMemberCount()+this.state.room.getInvitedMemberCount()>1&&Y.default.shouldShowPrompt()&&Object($.b)(!0)}updateDMState(){const e=this.state.room;if("join"!=e.getMyMembership())return;const t=e.getDMInviter();t&&v.d(e.roomId,t)}injectSticker(e,t,n){this.context.isGuest()?b.a.dispatch({action:"require_registration"}):g.b.sharedInstance().sendStickerContentToRoom(e,this.state.room.roomId,t,n,this.context).then(void 0,e=>{e.name})}handleSearchResult(e){const t=this.searchId;return this.setState({searchInProgress:!0}),e.then(e=>{if(Ee("search complete"),this.unmounted||!this.state.searching||this.searchId!=t)return console.error("Discarding stale search results"),!1;let n=e.highlights;n.indexOf(this.state.searchTerm)<0&&(n=n.concat(this.state.searchTerm)),n=n.sort((function(e,t){return t.length-e.length})),this.setState({searchHighlights:n,searchResults:e})},e=>(console.error("Search failed",e),f.a.createTrackedDialog("Search failed","",ie.a,{title:Object(p.a)("Search failed"),description:e&&e.message?e.message:Object(p.a)("Server may be unavailable, overloaded, or search timed out :(")}),!1)).finally(()=>{this.setState({searchInProgress:!1})})}getSearchResultTiles(){const e=[];var t,n;(this.state.searchInProgress&&e.push(c.a.createElement("li",{key:"search-spinner"},c.a.createElement(se.a,null))),this.state.searchResults.next_batch)||(null!==(t=this.state.searchResults)&&void 0!==t&&null!==(n=t.results)&&void 0!==n&&n.length?e.push(c.a.createElement("li",{key:"search-top-marker"},c.a.createElement("h2",{className:"mx_RoomView_topMarker"},Object(p.a)("No more results")))):e.push(c.a.createElement("li",{key:"search-top-marker"},c.a.createElement("h2",{className:"mx_RoomView_topMarker"},Object(p.a)("No results")))));const r=()=>{const e=this.searchResultsPanel.current;e&&e.checkScroll()};let o;for(let t=((null===(i=this.state.searchResults)||void 0===i||null===(a=i.results)||void 0===a?void 0:a.length)||0)-1;t>=0;t--){var i,a;const n=this.state.searchResults.results[t],s=n.context.getEvent(),l=s.getRoomId(),u=this.context.getRoom(l);if(!u){console.log("Hiding search result from an unknown room",l);continue}if(!Object(R.d)(s,this.state.showHiddenEventsInTimeline))continue;"All"===this.state.searchScope&&l!==o&&(e.push(c.a.createElement("li",{key:s.getId()+"-room"},c.a.createElement("h2",null,Object(p.a)("Room"),": ",u.name))),o=l);const d="#/room/"+l+"/"+s.getId();e.push(c.a.createElement(ae.a,{key:s.getId(),searchResult:n,searchHighlights:this.state.searchHighlights,resultLink:d,permalinkCreator:this.getPermalinkCreatorForRoom(u),onHeightChanged:r}))}return e}getScrollState(){const e=this.messagePanel;if(!e)return null;if(this.state.atEndOfLiveTimeline)return null;const t=e.getScrollState();return!t||t.stuckAtBottom?null:{focussedEvent:t.trackedScrollToken,pixelOffset:t.pixelOffset}}getCallForRoom(){return this.state.room?_.d.sharedInstance().getCallForRoom(this.state.room.roomId):null}getOldRoom(){const e=this.state.room.currentState.getStateEvents("m.room.create","");return e&&e.getContent().predecessor?this.context.getRoom(e.getContent().predecessor.room_id):null}getHiddenHighlightCount(){const e=this.getOldRoom();return e?e.getUnreadNotificationCount("highlight"):0}render(){var e;if(!this.state.room){const e=!this.state.matrixClientIsReady||this.state.roomLoading||this.state.peekLoading;if(e){const t=!this.state.matrixClientIsReady||!this.state.roomId||this.state.peekLoading;return c.a.createElement("div",{className:"mx_RoomView"},c.a.createElement(L.a,null,c.a.createElement(j.a,{canPreview:!1,previewLoading:t&&!this.state.roomLoadError,error:this.state.roomLoadError,loading:e,joining:this.state.joining,oobData:this.props.oobData})))}{var t,r;let e=void 0;this.props.oobData&&(e=this.props.oobData.inviterName);const n=null===(t=this.props.threepidInvite)||void 0===t?void 0:t.toEmail,o=this.state.roomAlias;return c.a.createElement("div",{className:"mx_RoomView"},c.a.createElement(L.a,null,c.a.createElement(j.a,{onJoinClick:this.onJoinButtonClicked,onForgetClick:this.onForgetClick,onRejectClick:this.onRejectThreepidInviteButtonClicked,canPreview:!1,error:this.state.roomLoadError,roomAlias:o,joining:this.state.joining,inviterName:e,invitedEmail:n,oobData:this.props.oobData,signUrl:null===(r=this.props.threepidInvite)||void 0===r?void 0:r.signUrl,room:this.state.room})))}}const o=this.state.room.getMyMembership();if(!("invite"!==o||pe.g.spacesEnabled&&this.state.room.isSpaceRoom())){if(this.state.joining||this.state.rejecting)return c.a.createElement(L.a,null,c.a.createElement(j.a,{canPreview:!1,error:this.state.roomLoadError,joining:this.state.joining,rejecting:this.state.rejecting}));{const e=this.context.credentials.userId,t=this.state.room.getMember(e),n=t?t.events.member:null;let r=Object(p.a)("Unknown");return n&&(r=n.sender?n.sender.name:n.getSender()),c.a.createElement("div",{className:"mx_RoomView"},c.a.createElement(L.a,null,c.a.createElement(j.a,{onJoinClick:this.onJoinButtonClicked,onForgetClick:this.onForgetClick,onRejectClick:this.onRejectButtonClicked,onRejectAndIgnoreClick:this.onRejectAndIgnoreClick,inviterName:r,canPreview:!1,joining:this.state.joining,room:this.state.room})))}}let i=null;this.state.draggingFile&&(i=c.a.createElement("div",{className:"mx_RoomView_fileDropTarget"},c.a.createElement("img",{src:n(1380),className:"mx_RoomView_fileDropTarget_image"}),Object(p.a)("Drop file here to upload")));let a=null;{const e=this.getCallForRoom();e&&"ended"!==this.state.callState&&"ringing"!==this.state.callState&&(a=e)}const s=u()({mx_RoomView_scrollheader:!0});let l,h=!0;g.b.sharedInstance().getCurrentUploads().length>0?l=c.a.createElement(ce.a,{room:this.state.room}):this.state.searchResults||(h=this.state.statusBarVisible,l=c.a.createElement(le.a,{room:this.state.room,isPeeking:"join"!==o,onInviteClick:this.onInviteButtonClick,onVisible:this.onStatusBarVisible,onHidden:this.onStatusBarHidden}));const m=this.state.upgradeRecommendation,f=m&&m.needsUpgrade&&this.state.room.userMayUpgradeRoom(this.context.credentials.userId),_=this.getHiddenHighlightCount();let b,v=null;if(this.state.searching)v=c.a.createElement(U.b,{searchInProgress:this.state.searchInProgress,onCancelClick:this.onCancelSearchClick,onSearch:this.onSearch,isRoomEncrypted:this.context.isRoomEncrypted(this.state.room.roomId)});else if(f)v=c.a.createElement(B.a,{room:this.state.room,recommendation:m});else if("join"!==o){var y,w;let e=void 0;this.props.oobData&&(e=this.props.oobData.inviterName);const t=null===(y=this.props.threepidInvite)||void 0===y?void 0:y.toEmail;if(b=c.a.createElement(j.a,{onJoinClick:this.onJoinButtonClicked,onForgetClick:this.onForgetClick,onRejectClick:this.onRejectThreepidInviteButtonClicked,joining:this.state.joining,inviterName:e,invitedEmail:t,oobData:this.props.oobData,canPreview:this.state.canPeek,room:this.state.room}),!(this.state.canPeek||pe.g.spacesEnabled&&null!==(w=this.state.room)&&void 0!==w&&w.isSpaceRoom()))return c.a.createElement("div",{className:"mx_RoomView"},b)}else _>0&&(v=c.a.createElement(F.a,{element:"div",className:"mx_RoomView_auxPanel_hiddenHighlights",onClick:this.onHiddenHighlightsClick},Object(p.a)("You have %(count)s unread notifications in a prior version of this room.",{count:_})));if(null!==(e=this.state.room)&&void 0!==e&&e.isSpaceRoom())return c.a.createElement(ee.a,{space:this.state.room,justCreatedOpts:this.props.justCreatedOpts,resizeNotifier:this.props.resizeNotifier,onJoinButtonClicked:this.onJoinButtonClicked,onRejectButtonClicked:this.props.threepidInvite?this.onRejectThreepidInviteButtonClicked:this.onRejectButtonClicked});const C=c.a.createElement(G.a,{room:this.state.room,fullHeight:!1,userId:this.context.credentials.userId,maxHeight:this.state.auxPanelMaxHeight,showApps:this.state.showApps,onResize:this.onResize,resizeNotifier:this.props.resizeNotifier},v);let T,O;let R;"join"===o&&!this.state.searchResults&&(T=c.a.createElement(ue.a,{room:this.state.room,e2eStatus:this.state.e2eStatus,resizeNotifier:this.props.resizeNotifier,replyToEvent:this.state.replyToEvent,permalinkCreator:this.getPermalinkCreatorForRoom(this.state.room)})),this.state.searchResults&&(O={searchTerm:this.state.searchTerm,searchScope:this.state.searchScope,searchCount:this.state.searchResults.count});let I=!1;this.state.searchResults&&(R=void 0===this.state.searchResults.count?c.a.createElement("div",{className:"mx_RoomView_messagePanel mx_RoomView_messagePanelSearchSpinner"}):c.a.createElement(M.a,{ref:this.searchResultsPanel,className:"mx_RoomView_messagePanel mx_RoomView_searchResultsPanel mx_GroupLayout",onFillRequest:this.onSearchResultsFillRequest,resizeNotifier:this.props.resizeNotifier},c.a.createElement("li",{className:s}),this.getSearchResultTiles()),I=!0);let A=null;this.state.isInitialEventHighlighted&&(A=this.state.initialEventId);const N=u()("mx_RoomView_messagePanel",{mx_IRCLayout:this.state.layout==k.a.IRC,mx_GroupLayout:this.state.layout==k.a.Group}),H=c.a.createElement(P.a,{ref:this.gatherTimelinePanelRef,timelineSet:this.state.room.getUnfilteredTimelineSet(),showReadReceipts:this.state.showReadReceipts,manageReadReceipts:!this.state.isPeeking,sendReadReceiptOnLoad:!this.state.wasContextSwitch,manageReadMarkers:!this.state.isPeeking,hidden:I,highlightedEventId:A,eventId:this.state.initialEventId,eventPixelOffset:this.state.initialEventPixelOffset,onScroll:this.onMessageListScroll,onUserScroll:this.onUserScroll,onReadMarkerUpdated:this.updateTopUnreadMessagesBar,showUrlPreview:this.state.showUrlPreview,className:N,membersLoaded:this.state.membersLoaded,permalinkCreator:this.getPermalinkCreatorForRoom(this.state.room),resizeNotifier:this.props.resizeNotifier,showReactions:!0,layout:this.state.layout,editState:this.state.editState});let z,W=null;this.state.showTopUnreadMessagesBar&&!this.state.searchResults&&(W=c.a.createElement(he.a,{onScrollUpClick:this.jumpToReadMarker,onCloseClick:this.forgetReadMarker})),this.state.atEndOfLiveTimeline||this.state.searchResults||(z=c.a.createElement(de.a,{highlight:this.state.room.getUnreadNotificationCount(d.a.Highlight)>0,numUnreadMessages:this.state.numUnreadMessages,onScrollToBottomClick:this.jumpToLiveTimeline,roomId:this.state.roomId}));const K=u()("mx_RoomView_statusArea",{mx_RoomView_statusArea_expanded:h}),Y=this.state.room&&this.state.showRightPanel?c.a.createElement(S.a,{room:this.state.room,resizeNotifier:this.props.resizeNotifier}):null,$=u()("mx_RoomView_timeline",{mx_RoomView_timeline_rr_enabled:this.state.showReadReceipts}),Q=u()("mx_RoomView",{mx_RoomView_inCall:Boolean(a)}),J=x.b.getValue("showChatEffects");return c.a.createElement(D.a.Provider,{value:this.state},c.a.createElement("main",{className:Q,ref:this.roomView,onKeyDown:this.onReactKeyDown},J&&this.roomView.current&&c.a.createElement(q.a,{roomWidth:this.roomView.current.offsetWidth}),c.a.createElement(L.a,null,c.a.createElement(V.a,{room:this.state.room,searchInfo:O,oobData:this.props.oobData,inRoom:"join"===o,onSearchClick:this.onSearchClick,onSettingsClick:this.onSettingsClick,onForgetClick:"leave"===o?this.onForgetClick:null,e2eStatus:this.state.e2eStatus,onAppsClick:this.state.hasPinnedWidgets?this.onAppsClick:null,appsShown:this.state.showApps,onCallPlaced:this.onCallPlaced}),c.a.createElement(E.a,{panel:Y,resizeNotifier:this.props.resizeNotifier},c.a.createElement("div",{className:"mx_RoomView_body"},C,c.a.createElement("div",{className:$},i,W,z,H,R),c.a.createElement("div",{className:K},c.a.createElement("div",{className:"mx_RoomView_statusAreaBox"},c.a.createElement("div",{className:"mx_RoomView_statusAreaBox_line"}),l)),b,T)))))}},a()(_e,"contextType",I.a),fe=be))||fe}).call(this,n(161).setImmediate)},function(e,t,n){"use strict";n.d(t,"c",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"d",(function(){return f})),n.d(t,"b",(function(){return _}));var r=n(82),o=n(83),i=n(87),a=n(121),s=n(125),c=n(177),l=n(296),u=n(91),d=n(750),h=n(751);async function p(){const e=r.a.get();if(!e.isCryptoEnabled())return!1;return!!e.getCrossSigningId("user_signing")||(await Object(c.b)(),!1)}async function m(e,t){const n=r.a.get();n.isGuest()?o.a.dispatch({action:"require_registration"}):n.getCryptoTrustCrossSignedDevices()&&!await p()||i.a.createTrackedDialog("Verification warning","unverified session",d.a,{user:e,device:t,onFinished:async r=>{if("sas"===r){const r=n.legacyDeviceVerification(e.userId,t.deviceId,l.d.SAS);o.a.dispatch({action:u.a.SetRightPanelPhase,phase:a.c.EncryptionPanel,refireParams:{member:e,verificationRequestPromise:r}})}else"legacy"===r&&i.a.createTrackedDialog("Legacy verify session","legacy verify session",h.a,{userId:e.userId,device:t})}})}async function g(e){const t=r.a.get();if(t.isGuest())return void o.a.dispatch({action:"require_registration"});if(t.getCryptoTrustCrossSignedDevices()&&!await p())return;const n=t.requestVerification(e.userId);o.a.dispatch({action:u.a.SetRightPanelPhase,phase:a.c.EncryptionPanel,refireParams:{member:e,verificationRequestPromise:n}})}async function f(e){if(r.a.get().isGuest())return void o.a.dispatch({action:"require_registration"});if(!await p())return;const t=_(e);o.a.dispatch({action:u.a.SetRightPanelPhase,phase:a.c.EncryptionPanel,refireParams:{member:e,verificationRequest:t}})}function _(e){const t=r.a.get(),n=Object(s.e)(t,e.userId);if(n)return t.findVerificationRequestDMInProgress(n.roomId)}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(80),a=n(82),s=n(200),c=n(85),l=n(95);t.a=({device:e,user:t,onFinished:n})=>{let r,u;return a.a.get().getUserId()===t.userId?(u=Object(i.a)("You signed in to a new session without verifying it:"),r=Object(i.a)("Verify your other session using one of the options below.")):(u=Object(i.a)("%(name)s (%(userId)s) signed in to a new session without verifying it:",{name:t.displayName,userId:t.userId}),r=Object(i.a)("Ask this user to verify their session, or manually verify it below.")),o.a.createElement(l.a,{onFinished:n,className:"mx_UntrustedDeviceDialog",title:o.a.createElement(o.a.Fragment,null,o.a.createElement(s.b,{status:"warning",size:24,hideTooltip:!0}),Object(i.a)("Not Trusted"))},o.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},o.a.createElement("p",null,u),o.a.createElement("p",null,e.getDisplayName()," (",e.deviceId,")"),o.a.createElement("p",null,r)),o.a.createElement("div",{className:"mx_Dialog_buttons"},o.a.createElement(c.a,{element:"button",kind:"secondary",onClick:()=>n("legacy")},Object(i.a)("Manually Verify by Text")),o.a.createElement(c.a,{element:"button",kind:"secondary",onClick:()=>n("sas")},Object(i.a)("Interactively verify by Emoji")),o.a.createElement(c.a,{kind:"primary",onClick:()=>n(!1)},Object(i.a)("Done"))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(82),p=n(89),m=n(145),g=n(80),f=n(81);let _=Object(f.a)("views.dialogs.ManualDeviceKeyVerificationDialog")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"_onCancelClick",()=>{this.props.onFinished(!1)}),s()(this,"_onLegacyFinished",e=>{e&&h.a.get().setDeviceVerified(this.props.userId,this.props.device.deviceId,!0),this.props.onFinished(e)})}render(){const e=p.getComponent("dialogs.QuestionDialog");let t;t=h.a.get().getUserId()===this.props.userId?Object(g.a)("Confirm by comparing the following with the User Settings in your other session:"):Object(g.a)("Confirm this user's session by comparing the following with their User Settings:");const n=m.e(this.props.device.getFingerprint()),r=l.a.createElement("div",null,l.a.createElement("p",null,t),l.a.createElement("div",{className:"mx_DeviceVerifyDialog_cryptoSection"},l.a.createElement("ul",null,l.a.createElement("li",null,l.a.createElement("label",null,Object(g.a)("Session name"),":")," ",l.a.createElement("span",null,this.props.device.getDisplayName())),l.a.createElement("li",null,l.a.createElement("label",null,Object(g.a)("Session ID"),":")," ",l.a.createElement("span",null,l.a.createElement("code",null,this.props.device.deviceId))),l.a.createElement("li",null,l.a.createElement("label",null,Object(g.a)("Session key"),":")," ",l.a.createElement("span",null,l.a.createElement("code",null,l.a.createElement("b",null,n)))))),l.a.createElement("p",null,Object(g.a)("If they don't match, the security of your communication may be compromised.")));return l.a.createElement(e,{title:Object(g.a)("Verify session"),description:r,button:Object(g.a)("Verify session"),onFinished:this._onLegacyFinished})}},s()(o,"propTypes",{userId:d.a.string.isRequired,device:d.a.object.isRequired,onFinished:d.a.func.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(78),o=n(127);function i(e,t){const[n,i]=Object(r.useState)(t?e.isRoomEncrypted(t.roomId):void 0),a=Object(r.useCallback)(n=>{t&&"m.room.encryption"===n.getType()&&i(e.isRoomEncrypted(t.roomId))},[e,t]);return Object(o.a)(t?t.currentState:void 0,"RoomState.events",a),n}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(94),a=n(190),s=n(139),c=n(286),l=n(80),u=n(475),d=n(121),h=n(83),p=n(91),m=n(103),g=n(369),f=n(172),_=n(143);t.a=({room:e,widgetId:t,onClose:n})=>{const b=Object(r.useContext)(i.a),v=Object(u.b)(e).find(e=>e.id===t),y=v&&f.d.instance.isInContainer(e,v,f.a.Top),[E,S,w,C]=Object(m.q)();if(Object(r.useEffect)(()=>{v&&!y||h.a.dispatch({action:p.a.SetRightPanelPhase,phase:d.c.RoomSummary})},[v,y]),!v||y)return null;let T;if(E){const e=S.current.getBoundingClientRect();T=o.a.createElement(g.a,{chevronFace:m.a.None,right:_.b.instance.windowWidth-e.right-12,top:e.bottom+12,onFinished:C,app:v})}const x=o.a.createElement(o.a.Fragment,null,o.a.createElement("h2",null,s.a.getWidgetName(v)),o.a.createElement(m.c,{kind:"secondary",className:"mx_WidgetCard_optionsButton",inputRef:S,onClick:w,isExpanded:E,label:Object(l.a)("Options")}),T);return o.a.createElement(a.b,{header:x,className:"mx_WidgetCard",onClose:n,previousPhase:d.c.RoomSummary,withoutScrollContainer:!0},o.a.createElement(c.a,{app:v,fullWidth:!0,show:!0,showMenubar:!1,room:e,userId:b.getUserId(),creatorUserId:v.creatorUserId,widgetPageTitle:s.a.getWidgetDataTitle(v),waitForIframeLoad:v.waitForIframeLoad}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return D}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(90),u=n(83),d=n(151),h=n(82),p=n(176),m=n(190),g=n(121),f=n(119),_=n(184),b=n(81),v=n(84),y=n(160),E=n(277),S=n(97),w=n(216),C=n(85),T=n(278),x=n(755),k=n(120),F=n(107),O=n(102);const R=/[\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]+/g;let D=Object(b.a)("views.rooms.MemberList")(r=class extends s.a.Component{constructor(e){var t;super(e),i()(this,"showPresence",!0),i()(this,"mounted",!1),i()(this,"collator",void 0),i()(this,"sortNames",new Map),i()(this,"onUserPresenceChange",(e,t)=>{this.refs[t.userId]&&this.updateList()}),i()(this,"onRoom",e=>{e.roomId===this.props.roomId&&this.showMembersAccordingToMembershipWithLL()}),i()(this,"onMyMembership",(e,t,n)=>{e.roomId===this.props.roomId&&"join"===t&&this.showMembersAccordingToMembershipWithLL()}),i()(this,"onRoomStateMember",(e,t,n)=>{n.roomId===this.props.roomId&&this.updateList()}),i()(this,"onRoomMemberName",(e,t)=>{t.roomId===this.props.roomId&&this.updateList()}),i()(this,"onRoomStateEvent",(e,t)=>{e.getRoomId()===this.props.roomId&&"m.room.third_party_invite"===e.getType()&&this.updateList(),this.canInvite!==this.state.canInvite&&this.setState({canInvite:this.canInvite})}),i()(this,"updateList",Object(F.throttle)(()=>{this.updateListNow()},500,{leading:!0,trailing:!0})),i()(this,"createOverflowTileJoined",(e,t)=>this.createOverflowTile(e,t,this.showMoreJoinedMemberList)),i()(this,"createOverflowTileInvited",(e,t)=>this.createOverflowTile(e,t,this.showMoreInvitedMemberList)),i()(this,"createOverflowTile",(e,t,r)=>{const o=Object(c.a)("and %(count)s others...",{count:e});return s.a.createElement(T.b,{className:"mx_EntityTile_ellipsis",avatarJsx:s.a.createElement(k.a,{url:n(279),name:"...",width:36,height:36}),name:o,presenceState:"online",suppressOnHover:!0,onClick:r})}),i()(this,"showMoreJoinedMemberList",()=>{this.setState({truncateAtJoined:this.state.truncateAtJoined+100})}),i()(this,"showMoreInvitedMemberList",()=>{this.setState({truncateAtInvited:this.state.truncateAtInvited+100})}),i()(this,"memberSort",(e,t)=>{const n=e.user,r=t.user;if(!n&&!r)return 0;if(n&&!r)return-1;if(!n&&r)return 1;if(this.showPresence){const e=e=>"unavailable"===e?"online":e,t=t=>{const n=["active","online","offline"],r=n.indexOf(e(t));return-1===r?n.length:r},o=t(n.currentlyActive?"active":n.presence),i=t(r.currentlyActive?"active":r.presence);if(o!==i)return o-i}return e.powerLevel!==t.powerLevel?t.powerLevel-e.powerLevel:this.showPresence&&n.getLastActiveTs()!==r.getLastActiveTs()?r.getLastActiveTs()-n.getLastActiveTs():this.collator.compare(this.sortNames.get(e),this.sortNames.get(t))}),i()(this,"onSearchQueryChanged",e=>{this.setState({searchQuery:e,filteredJoinedMembers:this.filterMembers(this.state.members,"join",e),filteredInvitedMembers:this.filterMembers(this.state.members,"invite",e)})}),i()(this,"onPending3pidInviteClick",e=>{u.a.dispatch({action:"view_3pid_invite",event:e})}),i()(this,"getChildrenJoined",(e,t)=>this.makeMemberTiles(this.state.filteredJoinedMembers.slice(e,t))),i()(this,"getChildCountJoined",()=>this.state.filteredJoinedMembers.length),i()(this,"getChildrenInvited",(e,t)=>{let n=this.state.filteredInvitedMembers;return t>this.state.filteredInvitedMembers.length&&(n=n.concat(this.getPending3PidInvites())),this.makeMemberTiles(n.slice(e,t))}),i()(this,"getChildCountInvited",()=>this.state.filteredInvitedMembers.length+(this.getPending3PidInvites()||[]).length),i()(this,"onInviteButtonClick",()=>{h.a.get().isGuest()?u.a.dispatch({action:"require_registration"}):u.a.dispatch({action:"view_invite",roomId:this.props.roomId})});const r=h.a.get();r.hasLazyLoadMembersEnabled()?this.state=this.getMembersState([]):this.state=this.getMembersState(this.roomMembers()),r.on("Room",this.onRoom);const o=l.a.get().enable_presence_by_hs_url,a=h.a.get().baseUrl;this.showPresence=null===(t=null==o?void 0:o[a])||void 0===t||t}UNSAFE_componentWillMount(){const e=h.a.get();this.mounted=!0,e.hasLazyLoadMembersEnabled()?(this.showMembersAccordingToMembershipWithLL(),e.on("Room.myMembership",this.onMyMembership)):this.listenForMembersChanges()}listenForMembersChanges(){const e=h.a.get();e.on("RoomState.members",this.onRoomStateMember),e.on("RoomMember.name",this.onRoomMemberName),e.on("RoomState.events",this.onRoomStateEvent),e.on("User.lastPresenceTs",this.onUserPresenceChange),e.on("User.presence",this.onUserPresenceChange),e.on("User.currentlyActive",this.onUserPresenceChange)}componentWillUnmount(){this.mounted=!1;const e=h.a.get();e&&(e.removeListener("RoomState.members",this.onRoomStateMember),e.removeListener("RoomMember.name",this.onRoomMemberName),e.removeListener("Room.myMembership",this.onMyMembership),e.removeListener("RoomState.events",this.onRoomStateEvent),e.removeListener("Room",this.onRoom),e.removeListener("User.lastPresenceTs",this.onUserPresenceChange),e.removeListener("User.presence",this.onUserPresenceChange),e.removeListener("User.currentlyActive",this.onUserPresenceChange)),this.updateList.cancel()}async showMembersAccordingToMembershipWithLL(){if(h.a.get().hasLazyLoadMembersEnabled()){const e=h.a.get().getRoom(this.props.roomId);if("join"===(e&&e.getMyMembership())){this.setState({loading:!0});try{await e.loadMembersIfNeeded()}catch(e){}this.mounted&&(this.setState(this.getMembersState(this.roomMembers())),this.listenForMembersChanges())}else this.setState(this.getMembersState(this.roomMembers()))}}get canInvite(){const e=h.a.get(),t=e.getRoom(this.props.roomId);return t&&t.canInvite(e.getUserId())}getMembersState(e){return{loading:!1,members:e,filteredJoinedMembers:this.filterMembers(e,"join"),filteredInvitedMembers:this.filterMembers(e,"invite"),canInvite:this.canInvite,truncateAtJoined:30,truncateAtInvited:5,searchQuery:""}}updateListNow(){const e=this.roomMembers();this.setState({loading:!1,members:e,filteredJoinedMembers:this.filterMembers(e,"join",this.state.searchQuery),filteredInvitedMembers:this.filterMembers(e,"invite",this.state.searchQuery)})}getMembersWithUser(){if(!this.props.roomId)return[];const e=h.a.get(),t=e.getRoom(this.props.roomId);if(!t)return[];const n=Object.values(t.currentState.members);return n.forEach(t=>{t.user||(t.user=e.getUser(t.userId)),this.sortNames.set(t,("@"===t.name[0]?t.name.substr(1):t.name).replace(R,""))}),n}roomMembers(){const e=this.getMembersWithUser().filter(e=>"join"===e.membership||"invite"===e.membership),t=v.b.getValue("language");return this.collator=new Intl.Collator(t,{sensitivity:"base",ignorePunctuation:!1}),e.sort(this.memberSort),e}memberString(e){if(e){const t=e.user;return"("+e.name+", "+e.powerLevel+", "+(t?t.lastActiveAgo:"<null>")+", "+(t?t.getLastActiveTs():"<null>")+", "+(t?t.currentlyActive:"<null>")+", "+(t?t.presence:"<null>")+")"}return"(null)"}filterMembers(e,t,n){return e.filter(e=>{if(n){n=n.toLowerCase();const t=-1!==e.name.toLowerCase().indexOf(n),r=-1!==e.userId.toLowerCase().indexOf(n);if(!t&&!r)return!1}return e.membership===t})}getPending3PidInvites(){const e=h.a.get().getRoom(this.props.roomId);if(e)return e.currentState.getStateEvents("m.room.third_party_invite").filter((function(t){if(!Object(d.c)(t))return!1;return!e.currentState.getInviteForThreePidToken(t.getStateKey())}))}makeMemberTiles(e){return e.map(e=>e instanceof y.a?s.a.createElement(x.a,{key:e.userId,member:e,ref:e.userId,showPresence:this.showPresence}):s.a.createElement(T.b,{key:e.getStateKey(),name:e.getContent().display_name,suppressOnHover:!0,onClick:()=>this.onPending3pidInviteClick(e)}))}render(){if(this.state.loading)return s.a.createElement(m.b,{className:"mx_MemberList",onClose:this.props.onClose,previousPhase:g.c.RoomSummary},s.a.createElement(S.a,null));const e=h.a.get().getRoom(this.props.roomId);let t,n,r;if(e&&"join"===e.getMyMembership()){let n=Object(c.a)("Invite to this room");const r=p.a.instance.getSelectedCommunityGeneralChat();r&&r.roomId===this.props.roomId?n=Object(c.a)("Invite to this community"):O.g.spacesEnabled&&e.isSpaceRoom()&&(n=Object(c.a)("Invite to this space")),t=s.a.createElement(C.a,{className:"mx_MemberList_invite",onClick:this.onInviteButtonClick,disabled:!this.state.canInvite},s.a.createElement("span",null,n))}this.getChildCountInvited()>0&&(n=s.a.createElement("h2",null,Object(c.a)("Invited")),r=s.a.createElement(E.a,{className:"mx_MemberList_section mx_MemberList_invited",truncateAt:this.state.truncateAtInvited,createOverflowElement:this.createOverflowTileInvited,getChildren:this.getChildrenInvited,getChildCount:this.getChildCountInvited}));const o=s.a.createElement(w.a,{className:"mx_MemberList_query mx_textinput_icon mx_textinput_search",placeholder:Object(c.a)("Filter room members"),onSearch:this.onSearchQueryChanged});let i,a=g.c.RoomSummary;return O.g.spacesEnabled&&null!=e&&e.isSpaceRoom()&&(a=void 0,i=s.a.createElement("div",{className:"mx_RightPanel_scopeHeader"},s.a.createElement(f.a,{room:e,height:32,width:32}),s.a.createElement(_.a,{room:e}))),s.a.createElement(m.b,{className:"mx_MemberList",header:s.a.createElement(s.a.Fragment,null,i,t),footer:o,onClose:this.props.onClose,previousPhase:a},s.a.createElement("div",{className:"mx_MemberList_wrapper"},s.a.createElement(E.a,{className:"mx_MemberList_section mx_MemberList_joined",truncateAt:this.state.truncateAtJoined,createOverflowElement:this.createOverflowTileJoined,getChildren:this.getChildrenJoined,getChildCount:this.getChildCountJoined}),n,r))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o,i,a=n(92),s=n.n(a),c=n(79),l=n.n(c),u=n(84),d=n(78),h=n.n(d),p=n(83),m=n(80),g=n(82),f=n(91),_=n(81),b=n(93),v=n(278),y=n(132);let E=Object(_.a)("views.rooms.MemberTile")((i=o=class extends h.a.Component{constructor(e){super(e),l()(this,"userLastModifiedTime",void 0),l()(this,"memberLastModifiedTime",void 0),l()(this,"onRoomStateEvents",e=>{if(e.getType()!==b.a.RoomEncryption)return;const{roomId:t}=this.props.member;if(e.getRoomId()!==t)return;g.a.get().removeListener("RoomState.events",this.onRoomStateEvents),this.setState({isRoomEncrypted:!0}),this.updateE2EStatus()}),l()(this,"onUserTrustStatusChanged",(e,t)=>{e===this.props.member.userId&&this.updateE2EStatus()}),l()(this,"onDeviceVerificationChanged",(e,t,n)=>{e===this.props.member.userId&&this.updateE2EStatus()}),l()(this,"onStatusMessageCommitted",()=>{this.setState({statusMessage:this.getStatusMessage()})}),l()(this,"onClick",()=>{p.a.dispatch({action:f.a.ViewUser,member:this.props.member})}),this.state={statusMessage:this.getStatusMessage(),isRoomEncrypted:!1,e2eStatus:null}}componentDidMount(){const e=g.a.get();if(u.b.getValue("feature_custom_status")){const{user:e}=this.props.member;e&&e.on("User._unstable_statusMessage",this.onStatusMessageCommitted)}const{roomId:t}=this.props.member;if(t){const n=e.isRoomEncrypted(t);this.setState({isRoomEncrypted:n}),n?(e.on("userTrustStatusChanged",this.onUserTrustStatusChanged),e.on("deviceVerificationChanged",this.onDeviceVerificationChanged),this.updateE2EStatus()):e.on("RoomState.events",this.onRoomStateEvents)}}componentWillUnmount(){const e=g.a.get(),{user:t}=this.props.member;t&&t.removeListener("User._unstable_statusMessage",this.onStatusMessageCommitted),e&&(e.removeListener("RoomState.events",this.onRoomStateEvents),e.removeListener("userTrustStatusChanged",this.onUserTrustStatusChanged),e.removeListener("deviceVerificationChanged",this.onDeviceVerificationChanged))}async updateE2EStatus(){const e=g.a.get(),{userId:t}=this.props.member,n=t===e.getUserId(),r=e.checkUserTrust(t);if(!r.isCrossSigningVerified())return void this.setState({e2eStatus:r.wasCrossSigningVerified()?"warning":"normal"});const o=e.getStoredDevicesForUser(t).some(r=>{const{deviceId:o}=r,i=e.checkDeviceTrust(t,o);return n?!i.isCrossSigningVerified():!i.isVerified()});this.setState({e2eStatus:o?"warning":"verified"})}getStatusMessage(){const{user:e}=this.props.member;return e?e.unstable_statusMessage:""}shouldComponentUpdate(e,t){return void 0===this.memberLastModifiedTime||this.memberLastModifiedTime<e.member.getLastModifiedTime()||(!(!e.member.user||!(void 0===this.userLastModifiedTime||this.userLastModifiedTime<e.member.user.getLastModifiedTime()))||(t.isRoomEncrypted!==this.state.isRoomEncrypted||t.e2eStatus!==this.state.e2eStatus))}getDisplayName(){return this.props.member.name}getPowerLabel(){return Object(m.a)("%(userName)s (power %(powerLevelNumber)s)",{userName:this.props.member.userId,powerLevelNumber:this.props.member.powerLevel})}render(){const e=this.props.member,t=this.getDisplayName(),n=e.user?e.user.presence:null;let r=null;e.user&&u.b.getValue("feature_custom_status")&&(r=this.state.statusMessage);const o=h.a.createElement(y.a,{member:e,width:36,height:36,"aria-hidden":"true"});e.user&&(this.userLastModifiedTime=e.user.getLastModifiedTime()),this.memberLastModifiedTime=e.getLastModifiedTime();const i=new Map([[100,v.a.Admin],[50,v.a.Moderator]]);let a=this.props.member.powerLevel;for(const[e]of i)if(this.props.member.powerLevel>=e){a=e;break}const c=i.get(a);let l;return this.state.isRoomEncrypted&&(l=this.state.e2eStatus),h.a.createElement(v.b,s()({},this.props,{presenceState:n,presenceLastActiveAgo:e.user?e.user.lastActiveAgo:0,presenceLastTs:e.user?e.user.lastPresenceTs:0,presenceCurrentlyActive:!!e.user&&e.user.currentlyActive,avatarJsx:o,title:this.getPowerLabel(),name:t,powerStatus:c,showPresence:this.props.showPresence,subtextLabel:r,e2eStatus:l,onClick:this.onClick}))}},l()(o,"defaultProps",{showPresence:!0}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(89),h=n(83),p=n(123),m=n(88),g=n.n(m),f=n(478),_=n(85),b=n(121),v=n(117),y=n(91),E=n(81);let S=Object(E.a)("views.groups.GroupMemberList")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{members:null,membersError:null,invitedMembers:null,invitedMembersError:null,truncateAt:30}),s()(this,"_createOverflowTile",(e,t)=>{const r=d.getComponent("rooms.EntityTile"),o=d.getComponent("avatars.BaseAvatar"),i=Object(u.a)("and %(count)s others...",{count:e});return l.a.createElement(r,{className:"mx_EntityTile_ellipsis",avatarJsx:l.a.createElement(o,{url:n(279),name:"...",width:36,height:36}),name:i,presenceState:"online",suppressOnHover:!0,onClick:this._showFullMemberList})}),s()(this,"_showFullMemberList",()=>{this.setState({truncateAt:-1})}),s()(this,"onSearchQueryChanged",e=>{this.setState({searchQuery:e.target.value})}),s()(this,"onInviteToGroupButtonClick",()=>{Object(f.b)(this.props.groupId).then(()=>{h.a.dispatch({action:y.a.SetRightPanelPhase,phase:b.c.GroupMemberList,refireParams:{groupId:this.props.groupId}})})})}componentDidMount(){this._unmounted=!1,this._initGroupStore(this.props.groupId)}componentWillUnmount(){this._unmounted=!0}_initGroupStore(e){p.a.registerListener(e,()=>{this._fetchMembers()}),p.a.on("error",(t,n,r)=>{this._unmounted||e!==n||(r===p.a.STATE_KEY.GroupMembers&&this.setState({membersError:t}),r===p.a.STATE_KEY.GroupInvitedMembers&&this.setState({invitedMembersError:t}))})}_fetchMembers(){this._unmounted||this.setState({members:p.a.getGroupMembers(this.props.groupId),invitedMembers:p.a.getGroupInvitedMembers(this.props.groupId)})}makeGroupMemberTiles(e,t,n){if(n)return l.a.createElement("div",{className:"warning"},Object(u.a)("Failed to load group members"));const r=d.getComponent("groups.GroupMemberTile"),o=d.getComponent("elements.TruncatedList");(e=(e||"").toLowerCase())&&(t=t.filter(t=>{const n=(t.displayname||"").toLowerCase().includes(e),r=t.userId.toLowerCase().includes(e);return!(!n&&!r)}));const i={};t.forEach(e=>{i[e.userId]||(i[e.userId]=e)}),(t=Object.keys(i).map(e=>i[e])).sort((e,t)=>{if(e.isPrivileged===t.isPrivileged){const n=e.displayname||e.userId,r=t.displayname||t.userId;return n<r?-1:n>r?1:0}return e.isPrivileged?-1:1});const a=t.map(e=>l.a.createElement(r,{key:e.userId,groupId:this.props.groupId,member:e}));return l.a.createElement(o,{className:"mx_MemberList_wrapper",truncateAt:this.state.truncateAt,createOverflowElement:this._createOverflowTile},a)}render(){if(this.state.fetching||this.state.fetchingInvitedMembers){const e=d.getComponent("elements.Spinner");return l.a.createElement("div",{className:"mx_MemberList"},l.a.createElement(e,null))}const e=l.a.createElement("input",{className:"mx_GroupMemberList_query mx_textinput",id:"mx_GroupMemberList_query",type:"text",onChange:this.onSearchQueryChanged,value:this.state.searchQuery,placeholder:Object(u.a)("Filter community members"),autoComplete:"off"}),t=this.state.members?l.a.createElement("div",{className:"mx_MemberList_joined"},this.makeGroupMemberTiles(this.state.searchQuery,this.state.members,this.state.membersError)):l.a.createElement("div",null),n=this.state.invitedMembers&&this.state.invitedMembers.length>0?l.a.createElement("div",{className:"mx_MemberList_invited"},l.a.createElement("h2",null,Object(u.a)("Invited")),this.makeGroupMemberTiles(this.state.searchQuery,this.state.invitedMembers,this.state.invitedMembersError)):l.a.createElement("div",null);let r;return p.a.isUserPrivileged(this.props.groupId)&&(r=l.a.createElement(_.a,{className:"mx_MemberList_invite mx_MemberList_inviteCommunity",onClick:this.onInviteToGroupButtonClick},l.a.createElement("span",null,Object(u.a)("Invite to this community")))),l.a.createElement("div",{className:"mx_MemberList",role:"tabpanel"},r,l.a.createElement(v.a,null,t,n),e)}},s()(o,"propTypes",{groupId:g.a.string.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(89),h=n(123),p=n(88),m=n.n(p),g=n(478),f=n(85),_=n(117),b=n(81);let v=Object(b.a)("views.groups.GroupRoomList")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{rooms:null,truncateAt:30,searchQuery:""}),s()(this,"onGroupStoreUpdated",()=>{this._unmounted||this.setState({rooms:h.a.getGroupRooms(this.props.groupId)})}),s()(this,"_createOverflowTile",(e,t)=>{const r=d.getComponent("rooms.EntityTile"),o=d.getComponent("avatars.BaseAvatar"),i=Object(u.a)("and %(count)s others...",{count:e});return l.a.createElement(r,{className:"mx_EntityTile_ellipsis",avatarJsx:l.a.createElement(o,{url:n(279),name:"...",width:36,height:36}),name:i,presenceState:"online",suppressOnHover:!0,onClick:this._showFullRoomList})}),s()(this,"_showFullRoomList",()=>{this.setState({truncateAt:-1})}),s()(this,"onSearchQueryChanged",e=>{this.setState({searchQuery:e.target.value})}),s()(this,"onAddRoomToGroupButtonClick",()=>{Object(g.a)(this.props.groupId).then(()=>{this.forceUpdate()})})}componentDidMount(){this._unmounted=!1,this._initGroupStore(this.props.groupId)}componentWillUnmount(){this._unmounted=!0,this._unregisterGroupStore()}_unregisterGroupStore(){h.a.unregisterListener(this.onGroupStoreUpdated)}_initGroupStore(e){h.a.registerListener(e,this.onGroupStoreUpdated),h.a.on("error",(t,n)=>{n===e&&this.setState({rooms:null})})}makeGroupRoomTiles(e){const t=d.getComponent("groups.GroupRoomTile");e=(e||"").toLowerCase();let n=this.state.rooms;return e&&(n=n.filter(t=>{const n=(t.name||"").toLowerCase().includes(e),r=(t.canonicalAlias||"").toLowerCase().includes(e);return n||r})),n=n.map((e,n)=>l.a.createElement(t,{key:n,groupId:this.props.groupId,groupRoom:e})),n}render(){if(null===this.state.rooms)return null;let e;h.a.isUserPrivileged(this.props.groupId)&&(e=l.a.createElement(f.a,{className:"mx_MemberList_invite mx_MemberList_addRoomToCommunity",onClick:this.onAddRoomToGroupButtonClick},l.a.createElement("span",null,Object(u.a)("Add rooms to this community"))));const t=l.a.createElement("input",{className:"mx_GroupRoomList_query mx_textinput",id:"mx_GroupRoomList_query",type:"text",onChange:this.onSearchQueryChanged,value:this.state.searchQuery,placeholder:Object(u.a)("Filter community rooms"),autoComplete:"off"}),n=d.getComponent("elements.TruncatedList");return l.a.createElement("div",{className:"mx_GroupRoomList",role:"tabpanel"},e,l.a.createElement(_.a,{className:"mx_GroupRoomList_joined mx_GroupRoomList_outerWrapper"},l.a.createElement(n,{className:"mx_GroupRoomList_wrapper",truncateAt:this.state.truncateAt,createOverflowElement:this._createOverflowTile},this.makeGroupRoomTiles(this.state.searchQuery))),t)}},s()(o,"propTypes",{groupId:m.a.string.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(83),p=n(87),m=n(89),g=n(80),f=n(123),_=n(94),b=n(117),v=n(81),y=n(100);let E=Object(v.a)("views.groups.GroupRoomInfo")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{isUserPrivilegedInGroup:null,groupRoom:null,groupRoomPublicityLoading:!1,groupRoomRemoveLoading:!1}),s()(this,"onGroupStoreUpdated",()=>{this.setState({isUserPrivilegedInGroup:f.a.isUserPrivileged(this.props.groupId)}),this._updateGroupRoom()}),s()(this,"_onRemove",e=>{const t=this.props.groupId,n=this.state.groupRoom.displayname;e.preventDefault(),e.stopPropagation();const r=m.getComponent("dialogs.QuestionDialog");p.a.createTrackedDialog("Confirm removal of group from room","",r,{title:Object(g.a)("Are you sure you want to remove '%(roomName)s' from %(groupId)s?",{roomName:n,groupId:t}),description:Object(g.a)("Removing a room from the community will also remove it from the community page."),button:Object(g.a)("Remove"),onFinished:e=>{if(!e)return;this.setState({groupRoomRemoveLoading:!0});const t=this.props.groupId,r=this.props.groupRoomId;f.a.removeRoomFromGroup(this.props.groupId,r).then(()=>{h.a.dispatch({action:"view_group_room_list"})}).catch(e=>{console.error(`Error whilst removing ${r} from ${t}`,e);const o=m.getComponent("dialogs.ErrorDialog");p.a.createTrackedDialog("Failed to remove room from group","",o,{title:Object(g.a)("Failed to remove room from community"),description:Object(g.a)("Failed to remove '%(roomName)s' from %(groupId)s",{groupId:t,roomName:n})})}).finally(()=>{this.setState({groupRoomRemoveLoading:!1})})}})}),s()(this,"_onCancel",e=>{h.a.dispatch({action:"view_group_room_list"})}),s()(this,"_changeGroupRoomPublicity",e=>{const t="public"===e.target.value;this.setState({groupRoomPublicityLoading:!0});const n=this.props.groupId,r=this.props.groupRoomId,o=this.state.groupRoom.displayname;f.a.updateGroupRoomVisibility(this.props.groupId,r,t).catch(e=>{console.error(`Error whilst changing visibility of ${r} in ${n} to ${t}`,e);const i=m.getComponent("dialogs.ErrorDialog");p.a.createTrackedDialog("Failed to remove room from group","",i,{title:Object(g.a)("Something went wrong!"),description:Object(g.a)("The visibility of '%(roomName)s' in %(groupId)s could not be updated.",{roomName:o,groupId:n})})}).finally(()=>{this.setState({groupRoomPublicityLoading:!1})})})}componentDidMount(){this._initGroupStore(this.props.groupId)}UNSAFE_componentWillReceiveProps(e){e.groupId!==this.props.groupId&&(this._unregisterGroupStore(this.props.groupId),this._initGroupStore(e.groupId))}componentWillUnmount(){this._unregisterGroupStore(this.props.groupId)}_initGroupStore(e){f.a.registerListener(e,this.onGroupStoreUpdated)}_unregisterGroupStore(e){f.a.unregisterListener(this.onGroupStoreUpdated)}_updateGroupRoom(){this.setState({groupRoom:f.a.getGroupRooms(this.props.groupId).find(e=>e.roomId===this.props.groupRoomId)})}render(){const e=m.getComponent("elements.AccessibleButton"),t=m.getComponent("elements.InlineSpinner");if(this.state.groupRoomRemoveLoading||!this.state.groupRoom){const e=m.getComponent("elements.Spinner");return l.a.createElement("div",{className:"mx_MemberInfo"},l.a.createElement(e,null))}let r;this.state.isUserPrivilegedInGroup&&(r=l.a.createElement("div",{className:"mx_MemberInfo_adminTools"},l.a.createElement("h3",null,Object(g.a)("Admin Tools")),l.a.createElement("div",{className:"mx_MemberInfo_buttons"},l.a.createElement(e,{className:"mx_MemberInfo_field",onClick:this._onRemove},Object(g.a)("Remove from community"))),l.a.createElement("h3",null,Object(g.a)("Visibility in Room List"),this.state.groupRoomPublicityLoading?l.a.createElement(t,null):l.a.createElement("div",null)),l.a.createElement("div",null,l.a.createElement("label",null,l.a.createElement("input",{type:"radio",value:"public",checked:this.state.groupRoom.isPublic,onChange:this._changeGroupRoomPublicity}),l.a.createElement("div",{className:"mx_MemberInfo_label_text"},Object(g.a)("Visible to everyone")))),l.a.createElement("div",null,l.a.createElement("label",null,l.a.createElement("input",{type:"radio",value:"private",checked:!this.state.groupRoom.isPublic,onChange:this._changeGroupRoomPublicity}),l.a.createElement("div",{className:"mx_MemberInfo_label_text"},Object(g.a)("Only visible to community members"))))));const o=this.state.groupRoom.avatarUrl;let i;if(o){const e=Object(y.b)(o).getSquareThumbnailHttp(800);i=l.a.createElement("div",{className:"mx_MemberInfo_avatar"},l.a.createElement("img",{src:e}))}const a=this.state.groupRoom.displayname;return l.a.createElement("div",{className:"mx_MemberInfo",role:"tabpanel"},l.a.createElement(b.a,null,l.a.createElement(e,{className:"mx_MemberInfo_cancel",onClick:this._onCancel},l.a.createElement("img",{src:n(348),width:"18",height:"18",className:"mx_filterFlipColor"})),i,l.a.createElement("h2",null,a),l.a.createElement("div",{className:"mx_MemberInfo_profile"},l.a.createElement("div",{className:"mx_MemberInfo_profileField"},this.state.groupRoom.canonicalAlias)),r))}},s()(o,"contextType",_.a),s()(o,"propTypes",{groupId:d.a.string,groupRoomId:d.a.string}),r=i))||r},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(86),u=n.n(l),d=n(160),h=n(152),p=n(83),m=n(87),g=n(80),f=n(125),_=n(122),b=n(85),v=n(90),y=n(84),E=n(126),S=n(312),w=n(123),C=n(82),T=n(200),x=n(127),k=n(388),F=n(94),O=n(121),R=n(340),D=n(325),I=n(749),A=n(91),N=n(192),M=n(752),P=n(190),L=n(476),j=n(292),U=n(97),B=n(479),G=n(132),V=n(425),q=n(330),H=n(105),z=n(110),W=n(760),K=n(166),Y=n(93),$=n(119),Q=n(184),J=n(100),X=n(143),Z=n(102);const ee=["user","groupId","room","onClose","phase"];function te({userId:e,device:t}){var n;const r=Object(s.useContext)(F.a),o=e===r.getUserId(),i=r.checkDeviceTrust(e,t.deviceId),a=r.checkUserTrust(e),l=o?i.isCrossSigningVerified():i.isVerified(),d=u()("mx_UserInfo_device",{mx_UserInfo_device_verified:l,mx_UserInfo_device_unverified:!l}),h=u()("mx_E2EIcon",{mx_E2EIcon_normal:!a.isVerified(),mx_E2EIcon_verified:l,mx_E2EIcon_warning:a.isVerified()&&!l}),p=()=>{Object(I.c)(r.getUser(e),t)};let m;m=null!==(n=t.getDisplayName())&&void 0!==n&&n.trim()?t.ambiguous?t.getDisplayName()+" ("+t.deviceId+")":t.getDisplayName():t.deviceId;let f=null;return a.isVerified()&&(f=l?Object(g.a)("Trusted"):Object(g.a)("Not trusted")),l?c.a.createElement("div",{className:d,title:t.deviceId},c.a.createElement("div",{className:h}),c.a.createElement("div",{className:"mx_UserInfo_device_name"},m),c.a.createElement("div",{className:"mx_UserInfo_device_trusted"},f)):c.a.createElement(b.a,{className:d,title:t.deviceId,onClick:p},c.a.createElement("div",{className:h}),c.a.createElement("div",{className:"mx_UserInfo_device_name"},m),c.a.createElement("div",{className:"mx_UserInfo_device_trusted"},f))}function ne({devices:e,userId:t,loading:n}){const r=Object(s.useContext)(F.a),o=r.checkUserTrust(t),[i,a]=Object(s.useState)(!1);if(n)return c.a.createElement(U.a,null);if(null===e)return c.a.createElement(c.a.Fragment,null,Object(g.a)("Unable to load session list"));const l=t===r.getUserId(),u=e.map(e=>r.checkDeviceTrust(t,e.deviceId));let d=[];const h=[];let p,m,f,_="mx_E2EIcon";if(o.isVerified()){for(let t=0;t<e.length;++t){const n=e[t],r=u[t];(l?r.isCrossSigningVerified():r.isVerified())?d.push(n):h.push(n)}p=Object(g.a)("%(count)s verified sessions",{count:d.length}),m=Object(g.a)("Hide verified sessions"),_+=" mx_E2EIcon_verified"}else d=e,p=Object(g.a)("%(count)s sessions",{count:e.length}),m=Object(g.a)("Hide sessions"),_+=" mx_E2EIcon_normal";d.length&&(f=i?c.a.createElement(b.a,{className:"mx_UserInfo_expand mx_linkButton",onClick:()=>a(!1)},c.a.createElement("div",null,m)):c.a.createElement(b.a,{className:"mx_UserInfo_expand mx_linkButton",onClick:()=>a(!0)},c.a.createElement("div",{className:_}),c.a.createElement("div",null,p)));let v=h.map((e,n)=>c.a.createElement(te,{key:n,userId:t,device:e}));if(i){const e=h.length;v=v.concat(d.map((n,r)=>c.a.createElement(te,{key:r+e,userId:t,device:n})))}return c.a.createElement("div",{className:"mx_UserInfo_devices"},c.a.createElement("div",null,v),c.a.createElement("div",null,f))}const re=({member:e,isIgnored:t,canInvite:n,isSpace:r})=>{const o=Object(s.useContext)(F.a);let i=null,a=null,l=null,d=null;const h=e.userId===o.getUserId();if(!h){const s=()=>{const n=o.getIgnoredUsers();if(t){const t=n.indexOf(e.userId);-1!==t&&n.splice(t,1)}else n.push(e.userId);o.setIgnoredUsers(n)};if(i=c.a.createElement(b.a,{onClick:s,className:u()("mx_UserInfo_field",{mx_UserInfo_destructive:!t})},t?Object(g.a)("Unignore"):Object(g.a)("Ignore")),e.roomId&&!r){const t=function(){const t=o.getRoom(e.roomId);p.a.dispatch({action:"view_room",highlighted:!0,event_id:t.getEventReadUpTo(e.userId),room_id:e.roomId})},n=function(){p.a.dispatch({action:A.a.ComposerInsert,userId:e.userId})},r=o.getRoom(e.roomId);null!=r&&r.getEventReadUpTo(e.userId)&&(d=c.a.createElement(b.a,{onClick:t,className:"mx_UserInfo_field"},Object(g.a)("Jump to read receipt"))),a=c.a.createElement(b.a,{onClick:n,className:"mx_UserInfo_field"},Object(g.a)("Mention"))}if(n&&(!e||!e.membership||"leave"===e.membership)){const t=e&&e.roomId?e.roomId:E.a.getRoomId(),n=async()=>{try{const n=new S.a(t);await n.invite([e.userId]).then(()=>{if("invited"!==n.getCompletionState(e.userId))throw new Error(n.getErrorText(e.userId))})}catch(e){m.a.createTrackedDialog("Failed to invite","",H.a,{title:Object(g.a)("Failed to invite"),description:e&&e.message?e.message:Object(g.a)("Operation failed")})}};l=c.a.createElement(b.a,{onClick:n,className:"mx_UserInfo_field"},Object(g.a)("Invite"))}}const _=c.a.createElement(b.a,{onClick:()=>{m.a.createTrackedDialog("share room member dialog","",q.a,{target:e})},className:"mx_UserInfo_field"},Object(g.a)("Share Link to User"));let v;return h||(v=c.a.createElement(b.a,{onClick:()=>async function(e,t){const n=Object(f.e)(e,t);if(n)return void p.a.dispatch({action:"view_room",room_id:n.roomId});const r={dmUserId:t,encryption:void 0};if(Object(f.f)()){const n=await e.downloadKeys([t]);Object.values(n).every(e=>Object.keys(e).length>0)&&(r.encryption=!0)}return Object(f.b)(r)}(o,e.userId),className:"mx_UserInfo_field"},Object(g.a)("Direct message"))),c.a.createElement("div",{className:"mx_UserInfo_container"},c.a.createElement("h3",null,Object(g.a)("Options")),c.a.createElement("div",null,v,d,_,a,l,i))},oe=async e=>{const{finished:t}=m.a.createTrackedDialog("Demoting Self","",z.a,{title:Object(g.a)("Demote yourself?"),description:c.a.createElement("div",null,e?Object(g.a)("You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the space it will be impossible to regain privileges."):Object(g.a)("You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the room it will be impossible to regain privileges.")),button:Object(g.a)("Demote")}),[n]=await t;return n},ie=({children:e})=>c.a.createElement("div",{className:"mx_UserInfo_container"},c.a.createElement("h3",null,Object(g.a)("Admin Tools")),c.a.createElement("div",{className:"mx_UserInfo_buttons"},e)),ae=e=>{var t,n;return(null==e||null===(t=e.currentState)||void 0===t||null===(n=t.getStateEvents(Y.a.RoomPowerLevels,""))||void 0===n?void 0:n.getContent())||{}},se=({member:e,startUpdating:t,stopUpdating:n})=>{const r=Object(s.useContext)(F.a);if("invite"!==e.membership&&"join"!==e.membership)return null;const o="invite"===e.membership?Object(g.a)("Disinvite"):Object(g.a)("Kick");return c.a.createElement(b.a,{className:"mx_UserInfo_field mx_UserInfo_destructive",onClick:async()=>{const{finished:o}=m.a.createTrackedDialog("Confirm User Action Dialog","onKick",W.a,{member:e,action:"invite"===e.membership?Object(g.a)("Disinvite"):Object(g.a)("Kick"),title:"invite"===e.membership?Object(g.a)("Disinvite this user?"):Object(g.a)("Kick this user?"),askReason:"join"===e.membership,danger:!0}),[i,a]=await o;i&&(t(),r.kick(e.roomId,e.userId,a||void 0).then(()=>{console.log("Kick success")},(function(e){console.error("Kick error: "+e),m.a.createTrackedDialog("Failed to kick","",H.a,{title:Object(g.a)("Failed to kick"),description:e&&e.message?e.message:"Operation failed"})})).finally(()=>{n()}))}},o)},ce=({member:e})=>{const t=Object(s.useContext)(F.a);return c.a.createElement(b.a,{className:"mx_UserInfo_field mx_UserInfo_destructive",onClick:async()=>{const{roomId:n,userId:r}=e,o=t.getRoom(n);if(!o)return;let i=o.getLiveTimeline(),a=[];for(;i;)a=i.getEvents().reduce((e,t)=>t.getSender()!==r||t.isRedacted()||t.isRedaction()||t.getType()===Y.a.RoomCreate||t.getType()===Y.a.RoomServerAcl?e:e.concat(t),a),i=i.getNeighbouringTimeline(h.b.BACKWARDS);const s=a.length,l=e.name;if(0===s)m.a.createTrackedDialog("No user messages found to remove","",K.a,{title:Object(g.a)("No recent messages by %(user)s found",{user:l}),description:c.a.createElement("div",null,c.a.createElement("p",null,Object(g.a)("Try scrolling up in the timeline to see if there are any earlier ones.")))});else{const{finished:e}=m.a.createTrackedDialog("Remove recent messages by user","",z.a,{title:Object(g.a)("Remove recent messages by %(user)s",{user:l}),description:c.a.createElement("div",null,c.a.createElement("p",null,Object(g.a)("You are about to remove %(count)s messages by %(user)s. This cannot be undone. Do you wish to continue?",{count:s,user:l})),c.a.createElement("p",null,Object(g.a)("For a large amount of messages, this might take some time. Please don't refresh your client in the meantime."))),button:Object(g.a)("Remove %(count)s messages",{count:s})}),[r]=await e;if(!r)return;await Promise.resolve(),console.info(`Started redacting recent ${s} messages for ${l} in ${n}`),await Promise.all(a.map(async e=>{try{await t.redactEvent(n,e.getId())}catch(t){console.error("Could not redact",e.getId()),console.error(t)}})),console.info(`Finished redacting recent ${s} messages for ${l} in ${n}`)}}},Object(g.a)("Remove recent messages"))},le=({member:e,startUpdating:t,stopUpdating:n})=>{const r=Object(s.useContext)(F.a);let o=Object(g.a)("Ban");"ban"===e.membership&&(o=Object(g.a)("Unban"));const i=u()("mx_UserInfo_field",{mx_UserInfo_destructive:"ban"!==e.membership});return c.a.createElement(b.a,{className:i,onClick:async()=>{const{finished:o}=m.a.createTrackedDialog("Confirm User Action Dialog","onBanOrUnban",W.a,{member:e,action:"ban"===e.membership?Object(g.a)("Unban"):Object(g.a)("Ban"),title:"ban"===e.membership?Object(g.a)("Unban this user?"):Object(g.a)("Ban this user?"),askReason:"ban"!==e.membership,danger:"ban"!==e.membership}),[i,a]=await o;if(!i)return;let s;t(),s="ban"===e.membership?r.unban(e.roomId,e.userId):r.ban(e.roomId,e.userId,a||void 0),s.then(()=>{console.log("Ban success")},(function(e){console.error("Ban error: "+e),m.a.createTrackedDialog("Failed to ban user","",H.a,{title:Object(g.a)("Error"),description:Object(g.a)("Failed to ban user")})})).finally(()=>{n()})}},o)},ue=({member:e,room:t,powerLevels:n,startUpdating:r,stopUpdating:o})=>{const i=Object(s.useContext)(F.a);if("join"!==e.membership)return null;const a=((e,t)=>{if(!t||!e)return!1;const n=(t.events?t.events["m.room.message"]:null)||t.events_default;return e.powerLevel<n})(e,n),l=u()("mx_UserInfo_field",{mx_UserInfo_destructive:!a}),d=a?Object(g.a)("Unmute"):Object(g.a)("Mute");return c.a.createElement(b.a,{className:l,onClick:async()=>{const n=e.roomId,s=e.userId;if(s===i.getUserId())try{if(!await oe(Z.g.spacesEnabled&&(null==t?void 0:t.isSpaceRoom())))return}catch(e){return void console.error("Failed to warn about self demotion: ",e)}const c=t.currentState.getStateEvents("m.room.power_levels","");if(!c)return;const l=c.getContent(),u=(l.events?l.events["m.room.message"]:null)||l.events_default;let d;d=a?u:u-1,d=parseInt(d),isNaN(d)||(r(),i.setPowerLevel(n,s,d,c).then(()=>{console.log("Mute toggle success")},(function(e){console.error("Mute error: "+e),m.a.createTrackedDialog("Failed to mute user","",H.a,{title:Object(g.a)("Error"),description:Object(g.a)("Failed to mute user")})})).finally(()=>{o()}))}},d)},de=({room:e,children:t,member:n,startUpdating:r,stopUpdating:o,powerLevels:i})=>{const a=Object(s.useContext)(F.a);let l,u,d,h;const p=(i.events?i.events["m.room.power_levels"]:null)||i.state_default,{ban:m=50,kick:g=50,redact:f=50}=i,_=e.getMember(a.getUserId());if(!_)return c.a.createElement("div",null);const b=_.userId===n.userId,v=n.powerLevel<_.powerLevel||b;return v&&_.powerLevel>=g&&(l=c.a.createElement(se,{member:n,startUpdating:r,stopUpdating:o})),!(_.powerLevel>=f)||Z.g.spacesEnabled&&e.isSpaceRoom()||(h=c.a.createElement(ce,{member:n,startUpdating:r,stopUpdating:o})),v&&_.powerLevel>=m&&(u=c.a.createElement(le,{member:n,startUpdating:r,stopUpdating:o})),v&&_.powerLevel>=p&&(d=c.a.createElement(ue,{member:n,room:e,powerLevels:i,startUpdating:r,stopUpdating:o})),l||u||d||h||t?c.a.createElement(ie,null,d,l,u,h,t):c.a.createElement("div",null)},he=({children:e,groupId:t,groupMember:n,startUpdating:r,stopUpdating:o})=>{const i=Object(s.useContext)(F.a),[a,l]=Object(s.useState)(!1),[u,d]=Object(s.useState)(!1);if(Object(s.useEffect)(()=>{let e=!1;const r=()=>{e||(l(w.a.isUserPrivileged(t)),d(w.a.getGroupInvitedMembers(t).some(e=>e.userId===n.userId)))};return w.a.registerListener(t,r),r(),()=>{e=!0,w.a.unregisterListener(r)}},[t,n.userId]),a){const a=async()=>{const{finished:e}=m.a.createDialog(W.a,{matrixClient:i,groupMember:n,action:u?Object(g.a)("Disinvite"):Object(g.a)("Remove from community"),title:u?Object(g.a)("Disinvite this user from community?"):Object(g.a)("Remove this user from community?"),danger:!0}),[a]=await e;a&&(r(),i.removeUserFromGroup(t,n.userId).then(()=>{p.a.dispatch({action:A.a.ViewUser,member:null})}).catch(e=>{m.a.createTrackedDialog("Failed to remove user from group","",H.a,{title:Object(g.a)("Error"),description:u?Object(g.a)("Failed to withdraw invitation"):Object(g.a)("Failed to remove user from community")}),console.log(e)}).finally(()=>{o()}))},s=c.a.createElement(b.a,{className:"mx_UserInfo_field mx_UserInfo_destructive",onClick:a},u?Object(g.a)("Disinvite"):Object(g.a)("Remove from community"));return c.a.createElement(ie,null,s,e)}return c.a.createElement("div",null)};const pe=({user:e,room:t,roomPermissions:n,powerLevels:r})=>{if(n.canEdit)return c.a.createElement(me,{user:e,room:t,roomPermissions:n});{const t=r.users_default||0,n=e.powerLevel,o=Object(k.b)(n,t);return c.a.createElement("div",{className:"mx_UserInfo_profileField"},c.a.createElement("div",{className:"mx_UserInfo_roleDescription"},o))}},me=({user:e,room:t,roomPermissions:n})=>{const r=Object(s.useContext)(F.a),[o,i]=Object(s.useState)(e.powerLevel),a=Object(s.useCallback)(async n=>{const o=parseInt(n,10);i(o);const a=e.roomId,s=e.userId,l=t.currentState.getStateEvents("m.room.power_levels","");if(!l)return;const u=r.getUserId(),d=l.getContent().users[u];if(d&&parseInt(d)===o){const{finished:e}=m.a.createTrackedDialog("Promote to PL100 Warning","",z.a,{title:Object(g.a)("Warning!"),description:c.a.createElement("div",null,Object(g.a)("You will not be able to undo this change as you are promoting the user to have the same power level as yourself."),c.a.createElement("br",null),Object(g.a)("Are you sure?")),button:Object(g.a)("Continue")}),[t]=await e;if(!t)return}else if(u===s)try{if(!await oe(Z.g.spacesEnabled&&(null==t?void 0:t.isSpaceRoom())))return}catch(e){console.error("Failed to warn about self demotion: ",e)}await((e,t,n,o)=>r.setPowerLevel(e,t,parseInt(n),o).then((function(){console.log("Power change success")}),(function(e){console.error("Failed to change power level "+e),m.a.createTrackedDialog("Failed to change power level","",H.a,{title:Object(g.a)("Error"),description:Object(g.a)("Failed to change power level")})})))(a,s,o,l)},[e.roomId,e.userId,r,t]),l=t.currentState.getStateEvents("m.room.power_levels",""),u=l?l.getContent().users_default:0;return c.a.createElement("div",{className:"mx_UserInfo_profileField"},c.a.createElement(B.a,{label:null,value:o,maxValue:n.modifyLevelMax,usersDefault:u,onChange:a}))},ge=e=>{const t=Object(s.useContext)(F.a),[n,r]=Object(s.useState)(void 0);return Object(s.useEffect)(()=>{r(void 0);let n=!1;return async function(){try{await t.downloadKeys([e],!0);const o=t.getStoredDevicesForUser(e);if(n)return;(e=>{const t=Object.create(null);for(let n=0;n<e.length;n++){const r=e[n].getDisplayName(),o=t[r]||[];o.push(n),t[r]=o}for(const n in t)t[n].length>1&&t[n].forEach(t=>{e[t].ambiguous=!0})})(o),r(o)}catch(e){r(null)}}(),()=>{n=!0}},[t,e]),Object(s.useEffect)(()=>{let n=!1;const o=async()=>{const o=t.getStoredDevicesForUser(e);n||r(o)},i=t=>{t.includes(e)&&o()},a=(t,n)=>{t===e&&o()},s=(t,n)=>{t===e&&o()};return t.on("crypto.devicesUpdated",i),t.on("deviceVerificationChanged",a),t.on("userTrustStatusChanged",s),()=>{n=!0,t.removeListener("crypto.devicesUpdated",i),t.removeListener("deviceVerificationChanged",a),t.removeListener("userTrustStatusChanged",s)}},[t,e]),n},fe=({room:e,member:t,groupId:n,devices:r,isRoomEncrypted:o})=>{const i=Object(s.useContext)(F.a),a=((e,t)=>{const[n,r]=Object(s.useState)(ae(t)),o=Object(s.useCallback)(e=>{t&&(e&&e.getType()!==Y.a.RoomPowerLevels||r(ae(t)))},[t]);return Object(x.a)(e,"RoomState.events",o),Object(s.useEffect)(()=>(o(),()=>{r({})}),[o]),n})(i,e),l=(e=>{const[t,n]=Object(s.useState)(!1);return Object(s.useEffect)(()=>{e.isSynapseAdministrator().then(e=>{n(e)},()=>{n(!1)})},[e]),t})(i),[u,d]=Object(s.useState)(i.isUserIgnored(t.userId));Object(s.useEffect)(()=>{d(i.isUserIgnored(t.userId))},[i,t.userId]);const h=Object(s.useCallback)(e=>{"m.ignored_user_list"===e.getType()&&d(i.isUserIgnored(t.userId))},[i,t.userId]);Object(x.a)(i,"accountData",h);const[f,v]=Object(s.useState)(0),y=Object(s.useCallback)(()=>{v(f+1)},[f]),E=Object(s.useCallback)(()=>{v(f-1)},[f]),S=function(e,t,n){const[r,o]=Object(s.useState)({modifyLevelMax:-1,canEdit:!1,canInvite:!1}),i=Object(s.useCallback)(()=>{if(!t)return;const r=t.currentState.getStateEvents("m.room.power_levels","");if(!r)return;const i=r.getContent();if(!i)return;const a=t.getMember(e.getUserId());if(!a)return;const s=n,c=a.userId===s.userId;let l=-1;if(s.powerLevel<a.powerLevel||c){const e=(i.events?i.events["m.room.power_levels"]:null)||i.state_default;a.powerLevel>=e&&(c||a.powerLevel>s.powerLevel)&&(l=a.powerLevel)}o({canInvite:a.powerLevel>=i.invite,canEdit:l>=0,modifyLevelMax:l})},[e,n,t]);return Object(x.a)(e,"RoomState.members",i),Object(s.useEffect)(()=>(i(),()=>{o({modifyLevelMax:-1,canEdit:!1,canInvite:!1})}),[i]),r}(i,e,t),w=Object(s.useCallback)(async()=>{const{finished:e}=m.a.createTrackedDialog("Synapse User Deactivation","",z.a,{title:Object(g.a)("Deactivate user?"),description:c.a.createElement("div",null,Object(g.a)("Deactivating this user will log them out and prevent them from logging back in. Additionally, they will leave all the rooms they are in. This action cannot be reversed. Are you sure you want to deactivate this user?")),button:Object(g.a)("Deactivate user"),danger:!0}),[n]=await e;if(n)try{await i.deactivateSynapseUser(t.userId)}catch(e){console.error("Failed to deactivate user"),console.error(e),m.a.createTrackedDialog("Failed to deactivate Synapse user","",H.a,{title:Object(g.a)("Failed to deactivate user"),description:e&&e.message?e.message:Object(g.a)("Operation failed")})}},[i,t.userId]);let T,k,O,R;l&&t.userId.endsWith(":"+C.a.getHomeserverName())&&(T=c.a.createElement(b.a,{onClick:w,className:"mx_UserInfo_field mx_UserInfo_destructive"},Object(g.a)("Deactivate user"))),e&&t.roomId?(_.a.shared().getUserIdForRoomId(t.roomId)||(O=c.a.createElement("div",{className:"mx_UserInfo_container"},c.a.createElement("h3",null,Object(g.a)("Role")),c.a.createElement(pe,{powerLevels:a,user:t,room:e,roomPermissions:S}))),R=c.a.createElement(de,{powerLevels:a,member:t,room:e,startUpdating:y,stopUpdating:E},T)):n?R=c.a.createElement(he,{groupId:n,groupMember:t,startUpdating:y,stopUpdating:E},T):T&&(R=c.a.createElement(ie,null,T)),f>0&&(k=c.a.createElement(U.a,null));const M=i.isCryptoEnabled();let P,L;o?Z.g.spacesEnabled&&e.isSpaceRoom()||(P=Object(g.a)("Messages in this room are end-to-end encrypted.")):M?!e||Z.g.spacesEnabled&&e.isSpaceRoom()||(P=Object(g.a)("Messages in this room are not end-to-end encrypted.")):P=Object(g.a)("This client does not support end-to-end encryption.");const j=(e=>Object(D.a)(async()=>e.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"),[e],!1))(i),B=M&&i.checkUserTrust(t.userId),G=M&&B.isCrossSigningVerified(),V=t.userId===i.getUserId(),q=M&&j&&!G&&!V&&r&&r.length>0,W=function(e,t,n,r){return Object(D.a)(async()=>{if(n){r(!0);try{await e.downloadKeys([t.userId]);const n=e.getStoredCrossSigningForUser(t.userId);return!!(n&&n.getId())}finally{r(!1)}}},[e,t,n],void 0)}(i,t,q,e=>{v(t=>t+(e?1:-1))}),K=void 0===r;let $;q&&(void 0!==W?L=c.a.createElement(b.a,{className:"mx_UserInfo_field mx_UserInfo_verifyButton",onClick:()=>{W?Object(I.d)(t):Object(I.a)(t)}},Object(g.a)("Verify")):K||(L=c.a.createElement(U.a,null))),t.userId==i.getUserId()&&($=c.a.createElement("p",null,c.a.createElement(b.a,{className:"mx_UserInfo_field",onClick:()=>{p.a.dispatch({action:A.a.ViewUserSettings,initialTabId:N.a.Security})}},Object(g.a)("Edit devices"))));const Q=c.a.createElement("div",{className:"mx_UserInfo_container"},c.a.createElement("h3",null,Object(g.a)("Security")),c.a.createElement("p",null,P),L,M&&c.a.createElement(ne,{loading:K,devices:r,userId:t.userId}),$);return c.a.createElement(c.a.Fragment,null,O,Q,c.a.createElement(re,{canInvite:S.canInvite,isIgnored:u,member:t,isSpace:Z.g.spacesEnabled&&(null==e?void 0:e.isSpaceRoom())}),R,k)},_e=({member:e,e2eStatus:t})=>{const n=Object(s.useContext)(F.a),r=Object(s.useCallback)(()=>{const t=e.getMxcAvatarUrl?e.getMxcAvatarUrl():e.avatarUrl;if(!t)return;const n={src:Object(J.b)(t).srcHttp,name:e.name||e.displayName};m.a.createDialog(j.a,n,"mx_Dialog_lightbox",null,!0)},[e]),o=c.a.createElement("div",{className:"mx_UserInfo_avatar"},c.a.createElement("div",null,c.a.createElement("div",null,c.a.createElement(G.a,{key:e.userId,member:e,width:.6*X.b.instance.windowHeight,height:.6*X.b.instance.windowHeight,resizeMethod:"scale",fallbackUserId:e.userId,onClick:r,urls:e.avatarUrl?[e.avatarUrl]:void 0}))));let i,a,l,u;e instanceof d.a&&e.user&&(i=e.user.presence,a=e.user.lastActiveAgo,l=e.user.currentlyActive,y.b.getValue("feature_custom_status")&&(u=e.user?e.user.unstable_statusMessage:e.unstable_statusMessage));const h=v.a.get().enable_presence_by_hs_url;let p=!0;h&&void 0!==h[n.baseUrl]&&(p=h[n.baseUrl]);let g=null;p&&(g=c.a.createElement(V.a,{activeAgo:a,currentlyActive:l,presenceState:i}));let f,_=null;u&&(_=c.a.createElement("span",{className:"mx_UserInfo_statusMessage"},u)),t&&(f=c.a.createElement(T.b,{size:18,status:t,isUser:!0}));const b=e.rawDisplayName||e.displayname;return c.a.createElement(c.a.Fragment,null,o,c.a.createElement("div",{className:"mx_UserInfo_container mx_UserInfo_separator"},c.a.createElement("div",{className:"mx_UserInfo_profile"},c.a.createElement("div",null,c.a.createElement("h2",null,f,c.a.createElement("span",{title:b,"aria-label":b},b))),c.a.createElement("div",null,e.userId),c.a.createElement("div",{className:"mx_UserInfo_profileStatus"},g,_))))};t.a=e=>{let{user:t,groupId:n,room:r,onClose:i,phase:l=O.c.RoomMemberInfo}=e,u=a()(e,ee);const d=Object(s.useContext)(F.a),h=Object(s.useMemo)(()=>r&&r.getMember(t.userId)||t,[r,t]),m=Object(M.a)(d,r),f=ge(t.userId);let _;m&&f&&(_=((e,t,n)=>{const r=t===e.getUserId(),o=e.checkUserTrust(t);if(!o.isCrossSigningVerified())return o.wasCrossSigningVerified()?L.a.Warning:L.a.Normal;return n.some(n=>{const{deviceId:o}=n,i=e.checkDeviceTrust(t,o);return r?!i.isCrossSigningVerified():!i.isVerified()})?L.a.Warning:L.a.Verified})(d,t.userId,f));const b=["mx_UserInfo"];let v,y;r&&l===O.c.EncryptionPanel?(y=O.c.RoomMemberInfo,v={member:h}):r&&(y=y=Z.g.spacesEnabled&&r.isSpaceRoom()?O.c.SpaceMemberList:O.c.RoomMemberList);const E=()=>{p.a.dispatch({action:A.a.SetRightPanelPhase,phase:y,refireParams:v})};let S;switch(l){case O.c.RoomMemberInfo:case O.c.GroupMemberInfo:case O.c.SpaceMemberInfo:S=c.a.createElement(fe,{room:r,member:h,groupId:n,devices:f,isRoomEncrypted:m});break;case O.c.EncryptionPanel:b.push("mx_UserInfo_smallAvatar"),S=c.a.createElement(R.a,o()({},u,{member:h,onClose:E,isRoomEncrypted:m}))}let w,C=void 0;if(l===O.c.EncryptionPanel){const e=u.verificationRequest;e&&e.pending&&(C=Object(g.a)("Cancel"))}Z.g.spacesEnabled&&null!=r&&r.isSpaceRoom()&&(w=c.a.createElement("div",{className:"mx_RightPanel_scopeHeader"},c.a.createElement($.a,{room:r,height:32,width:32}),c.a.createElement(Q.a,{room:r})));const T=c.a.createElement(c.a.Fragment,null,w,c.a.createElement(_e,{member:h,e2eStatus:_}));return c.a.createElement(P.b,{className:b.join(" "),header:T,onClose:i,closeLabel:C,previousPhase:y,refireParams:v},S)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(81),h=n(100),p=n(132),m=n(120),g=n(95),f=n(116);let _=Object(d.a)("views.dialogs.ConfirmUserActionDialog")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"reasonField",l.a.createRef()),s()(this,"onOk",()=>{var e;this.props.onFinished(!0,null===(e=this.reasonField.current)||void 0===e?void 0:e.value)}),s()(this,"onCancel",()=>{this.props.onFinished(!1)})}render(){const e=this.props.danger?"danger":"";let t,n,r,o;if(this.props.askReason&&(t=l.a.createElement("div",null,l.a.createElement("form",{onSubmit:this.onOk},l.a.createElement("input",{className:"mx_ConfirmUserActionDialog_reasonField",ref:this.reasonField,placeholder:Object(u.a)("Reason"),autoFocus:!0})))),this.props.member)n=l.a.createElement(p.a,{member:this.props.member,width:48,height:48}),r=this.props.member.name,o=this.props.member.userId;else{const e=this.props.groupMember.avatarUrl?Object(h.b)(this.props.groupMember.avatarUrl).getSquareThumbnailHttp(48):null;r=this.props.groupMember.displayname||this.props.groupMember.userId,o=this.props.groupMember.userId,n=l.a.createElement(m.a,{name:r,url:e,width:48,height:48})}return l.a.createElement(g.a,{className:"mx_ConfirmUserActionDialog",onFinished:this.props.onFinished,title:this.props.title,contentId:"mx_Dialog_content"},l.a.createElement("div",{id:"mx_Dialog_content",className:"mx_Dialog_content"},l.a.createElement("div",{className:"mx_ConfirmUserActionDialog_avatar"},n),l.a.createElement("div",{className:"mx_ConfirmUserActionDialog_name"},r),l.a.createElement("div",{className:"mx_ConfirmUserActionDialog_userId"},o)),t,l.a.createElement(f.a,{primaryButton:this.props.action,onPrimaryButtonClick:this.onOk,primaryButtonClass:e,focus:!this.props.askReason,onCancel:this.onCancel}))}},s()(o,"defaultProps",{danger:!1,askReason:!1}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(82),l=n(80),u=n(83),d=n(87),h=n(151),p=n(119),m=n(184),g=n(81),f=n(105),_=n(85),b=n(102);let v=Object(g.a)("views.rooms.ThirdPartyMemberInfo")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"room",void 0),i()(this,"onRoomStateEvents",e=>{if("m.room.third_party_invite"===e.getType()&&e.getStateKey()===this.state.stateKey){const t=e.getContent().display_name,n={invited:Object(h.c)(e)};t&&(n.displayName=t),this.setState(n)}}),i()(this,"onCancel",()=>{u.a.dispatch({action:"view_3pid_invite",event:null})}),i()(this,"onKickClick",()=>{c.a.get().sendStateEvent(this.state.roomId,"m.room.third_party_invite",{},this.state.stateKey).catch(e=>{console.error(e),this.setState({invited:!0}),d.a.createTrackedDialog("Revoke 3pid invite failed","",f.a,{title:Object(l.a)("Failed to revoke invite"),description:Object(l.a)("Could not revoke the invite. The server may be experiencing a temporary problem or you do not have sufficient permissions to revoke the invite.")})}),this.setState({invited:!1})}),this.room=c.a.get().getRoom(this.props.event.getRoomId());const t=this.room.getMember(c.a.get().getUserId()),n=this.room.currentState.getStateEvents("m.room.power_levels","");let r=n?n.getContent().kick:50;"number"!=typeof r&&(r=50);const o=this.room.getMember(this.props.event.getSender());this.state={stateKey:this.props.event.getStateKey(),roomId:this.props.event.getRoomId(),displayName:this.props.event.getContent().display_name,invited:!0,canKick:!!t&&t.powerLevel>r,senderName:o?o.name:this.props.event.getSender()}}componentDidMount(){c.a.get().on("RoomState.events",this.onRoomStateEvents)}componentWillUnmount(){const e=c.a.get();e&&e.removeListener("RoomState.events",this.onRoomStateEvents)}render(){let e,t=null;return this.state.canKick&&this.state.invited&&(t=s.a.createElement("div",{className:"mx_MemberInfo_container"},s.a.createElement("h3",null,Object(l.a)("Admin Tools")),s.a.createElement("div",{className:"mx_MemberInfo_buttons"},s.a.createElement(_.a,{className:"mx_MemberInfo_field",onClick:this.onKickClick},Object(l.a)("Revoke invite"))))),b.g.spacesEnabled&&this.room.isSpaceRoom()&&(e=s.a.createElement("div",{className:"mx_RightPanel_scopeHeader"},s.a.createElement(p.a,{room:this.room,height:32,width:32}),s.a.createElement(m.a,{room:this.room}))),s.a.createElement("div",{className:"mx_MemberInfo",role:"tabpanel"},e,s.a.createElement("div",{className:"mx_MemberInfo_name"},s.a.createElement(_.a,{className:"mx_MemberInfo_cancel",onClick:this.onCancel,title:Object(l.a)("Close")}),s.a.createElement("h2",null,this.state.displayName)),s.a.createElement("div",{className:"mx_MemberInfo_container"},s.a.createElement("div",{className:"mx_MemberInfo_profile"},s.a.createElement("div",{className:"mx_MemberInfo_profileField"},Object(l.a)("Invited by %(sender)s",{sender:this.state.senderName})))),t)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o=n(78),i=n.n(o),a=n(80),s=n(82),c=n(190),l=n(81),u=n(349),d=n(97),h=n(144),p=n(140);let m=Object(l.a)("structures.NotificationPanel")(r=class extends i.a.PureComponent{render(){const e=i.a.createElement("div",{className:"mx_RightPanel_empty mx_NotificationPanel_empty"},i.a.createElement("h2",null,Object(a.a)("You’re all caught up")),i.a.createElement("p",null,Object(a.a)("You have no visible notifications.")));let t;const n=s.a.get().getNotifTimelineSet();return n?t=i.a.createElement(u.a,{manageReadReceipts:!1,manageReadMarkers:!1,timelineSet:n,showUrlPreview:!1,tileShape:h.a.Notif,empty:e,alwaysShowTimestamps:!0,layout:p.a.Group}):(console.error("No notifTimelineSet available!"),t=i.a.createElement(d.a,null)),i.a.createElement(c.b,{className:"mx_NotificationPanel",onClose:this.props.onClose,withoutScrollContainer:!0},t)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(142),d=n.n(u),h=n(93),p=n(271),m=n(148),g=n(82),f=n(84),_=n(164),b=n(140),v=n(80),y=n(144),E=n(311),S=n(764),w=n(122),C=n(766),T=n(81),x=n(83),k=n(776),F=n(888),O=n(342),R=n(481),D=n(777),I=n(482),A=n(288),N=n(97),M=n(778);const P=[h.a.Sticker,h.a.RoomMessage],L=[h.a.RoomMember,h.a.RoomThirdPartyInvite,h.a.RoomServerAcl,h.a.RoomPinnedEvents];let j=Object(T.a)("structures.MessagePanel")((i=o=class extends l.a.Component{constructor(e,t){super(e,t),s()(this,"readReceiptMap",{}),s()(this,"readReceiptsByEvent",{}),s()(this,"readReceiptsByUserId",{}),s()(this,"showHiddenEventsInTimeline",void 0),s()(this,"isMounted",!1),s()(this,"readMarkerNode",Object(c.createRef)()),s()(this,"whoIsTyping",Object(c.createRef)()),s()(this,"scrollPanel",Object(c.createRef)()),s()(this,"showTypingNotificationsWatcherRef",void 0),s()(this,"eventNodes",void 0),s()(this,"callEventGroupers",new Map),s()(this,"membersCount",0),s()(this,"calculateRoomMembersCount",()=>{var e;this.membersCount=(null===(e=this.props.room)||void 0===e?void 0:e.getMembers().length)||0}),s()(this,"onShowTypingNotificationsChange",()=>{this.setState({showTypingNotifications:f.b.getValue("showTypingNotifications")})}),s()(this,"isUnmounting",()=>!this.isMounted),s()(this,"collectGhostReadMarker",e=>{e&&requestAnimationFrame(()=>{e.style.width="10%",e.style.opacity="0"})}),s()(this,"onGhostTransitionEnd",e=>{const t=e.target.dataset.eventid;this.setState({ghostReadMarkers:this.state.ghostReadMarkers.filter(e=>e!==t)})}),s()(this,"collectEventNode",(e,t)=>{var n;this.eventNodes[e]=null==t||null===(n=t.ref)||void 0===n?void 0:n.current}),s()(this,"onHeightChanged",()=>{const e=this.scrollPanel.current;e&&e.checkScroll()}),s()(this,"onTypingShown",()=>{const e=this.scrollPanel.current;e.checkScroll(),e&&e.getScrollState().stuckAtBottom&&e.preventShrinking()}),s()(this,"onTypingHidden",()=>{const e=this.scrollPanel.current;e&&(e.updatePreventShrinking(),e.checkScroll())}),this.state={ghostReadMarkers:[],showTypingNotifications:f.b.getValue("showTypingNotifications")},this.showHiddenEventsInTimeline=f.b.getValue("showHiddenEventsInTimeline"),this.showTypingNotificationsWatcherRef=f.b.watchSetting("showTypingNotifications",null,this.onShowTypingNotificationsChange)}componentDidMount(){var e;this.calculateRoomMembersCount(),null===(e=this.props.room)||void 0===e||e.on("RoomState.members",this.calculateRoomMembersCount),this.isMounted=!0}componentWillUnmount(){var e;this.isMounted=!1,null===(e=this.props.room)||void 0===e||e.off("RoomState.members",this.calculateRoomMembersCount),f.b.unwatchSetting(this.showTypingNotificationsWatcherRef)}componentDidUpdate(e,t){if(e.readMarkerVisible&&this.props.readMarkerEventId!==e.readMarkerEventId){const t=this.state.ghostReadMarkers;t.push(e.readMarkerEventId),this.setState({ghostReadMarkers:t})}}getNodeForEventId(e){if(this.eventNodes)return this.eventNodes[e]}isAtBottom(){var e;return null===(e=this.scrollPanel.current)||void 0===e?void 0:e.isAtBottom()}getScrollState(){var e,t;return null!==(e=null===(t=this.scrollPanel.current)||void 0===t?void 0:t.getScrollState())&&void 0!==e?e:null}getReadMarkerPosition(){const e=this.readMarkerNode.current,t=this.scrollPanel.current;if(!e||!t)return null;const n=d.a.findDOMNode(t).getBoundingClientRect(),r=e.getBoundingClientRect();return r.bottom+2<n.top?-1:r.top<n.bottom?0:1}scrollToTop(){this.scrollPanel.current&&this.scrollPanel.current.scrollToTop()}scrollToBottom(){this.scrollPanel.current&&this.scrollPanel.current.scrollToBottom()}scrollRelative(e){this.scrollPanel.current&&this.scrollPanel.current.scrollRelative(e)}handleScrollKey(e){this.scrollPanel.current&&this.scrollPanel.current.handleScrollKey(e)}scrollToEvent(e,t,n){this.scrollPanel.current&&this.scrollPanel.current.scrollToToken(e,t,n)}scrollToEventIfNeeded(e){const t=this.eventNodes[e];t&&t.scrollIntoView({block:"nearest",behavior:"instant"})}checkFillState(){this.scrollPanel.current&&this.scrollPanel.current.checkFillState()}get showHiddenEvents(){var e,t;return null!==(e=null===(t=this.context)||void 0===t?void 0:t.showHiddenEventsInTimeline)&&void 0!==e?e:this.showHiddenEventsInTimeline}shouldShowEvent(e){return!g.a.get().isUserIgnored(e.getSender())&&(!!this.showHiddenEvents||!!Object(y.d)(e,this.showHiddenEvents)&&(this.props.highlightedEventId===e.getId()||!Object(p.a)(e,this.context)))}readMarkerForEvent(e,t){const n=!t&&this.props.readMarkerVisible;if(this.props.readMarkerEventId===e){let t;return n&&(t=l.a.createElement("hr",{className:"mx_RoomView_myReadMarker",style:{opacity:1,width:"99%"}})),l.a.createElement("li",{key:"readMarker_"+e,ref:this.readMarkerNode,className:"mx_RoomView_myReadMarker_container","data-scroll-tokens":e},t)}if(this.state.ghostReadMarkers.includes(e)){const t=l.a.createElement("hr",{className:"mx_RoomView_myReadMarker",ref:this.collectGhostReadMarker,onTransitionEnd:this.onGhostTransitionEnd,"data-eventid":e});return l.a.createElement("li",{key:"_readuptoghost_"+e,className:"mx_RoomView_myReadMarker_container"},t)}return null}getNextEventInfo(e,t){return{nextEvent:t<e.length-1?e[t+1]:null,nextTile:e.slice(t+1).find(e=>this.shouldShowEvent(e))}}get roomHasPendingEdit(){return this.props.room&&localStorage.getItem("mx_edit_room_"+this.props.room.roomId)}getEventTiles(){let e,t;this.eventNodes={};let n=-1;for(e=this.props.events.length-1;e>=0;e--){const r=this.props.events[e];if(this.shouldShowEvent(r)&&(void 0===t&&(t=r),!r.status)){n=e;break}}const r=[];let o=null;this.readReceiptsByEvent={},this.props.showReadReceipts&&(this.readReceiptsByEvent=this.getReadReceiptsByShownEvent());let i=null;for(e=0;e<this.props.events.length;e++){const a=this.props.events[e],s=a.getId(),c=a===t,{nextEvent:l,nextTile:u}=this.getNextEventInfo(this.props.events,e);if(0===a.getType().indexOf("m.call.")||0===a.getType().indexOf("org.matrix.call.")){const e=a.getContent().call_id;if(this.callEventGroupers.has(e))this.callEventGroupers.get(e).add(a);else{const t=new k.c;t.add(a),this.callEventGroupers.set(e,t)}}if(i){if(i.shouldGroup(a)){i.add(a,this.showHiddenEvents);continue}r.push(...i.getTiles()),o=i.getNewPrevEvent(),i=null}for(const e of q)e.canStartGroup(this,a)&&(i=new e(this,a,o,t,this.props.layout,l,u));if(!i){const t=!1;this.shouldShowEvent(a)&&(r.push(...this.getTilesForEvent(o,a,c,t,l,u)),o=a);const i=this.readMarkerForEvent(s,e>=n);i&&r.push(i)}}return!this.props.editState&&this.roomHasPendingEdit&&x.a.dispatch({action:"edit_event",event:this.props.room.findEventById(this.roomHasPendingEdit)}),i&&r.push(...i.getTiles()),r}getTilesForEvent(e,t,n=!1,r=!1,o,i){const a=[],s=this.props.editState&&this.props.editState.getEvent().getId()===t.getId();let c=t.getTs(),u=t.getDate();t.status&&(u=new Date,c=u.getTime());const d=this.wantsDateSeparator(e,u);if(d&&!r){const e=l.a.createElement("li",{key:c},l.a.createElement(I.a,{key:c,ts:c}));a.push(e)}let h=!1,p=!0;o&&(h=this.wantsDateSeparator(t,o.getDate()||new Date),p=h||t.getSender()!==o.getSender());const m=!d&&function(e,t,n){return!!(e&&e.sender&&t.sender)&&(!(t.getTs()-e.getTs()>3e5)&&(t.isRedacted()===e.isRedacted()&&(!!(t.getType()===e.getType()||P.includes(t.getType())&&P.includes(e.getType()))&&(t.sender.userId===e.sender.userId&&t.sender.name===e.sender.name&&t.sender.getMxcAvatarUrl()===e.sender.getMxcAvatarUrl()&&!!Object(y.d)(e,n)))))}(e,t,this.showHiddenEvents),f=t.getId(),_=f===this.props.highlightedEventId,v=this.readReceiptsByEvent[f];let E=!1;const S=e=>!e||"sent"===e,w=S(t.getAssociatedStatus()),C=o&&this.shouldShowEvent(o);(!C&&w||C&&w&&!S(o.getAssociatedStatus()))&&(E=!0),i&&i!==o&&S(i.getAssociatedStatus())&&(E=!1),E=E&&t.getSender()===g.a.get().getUserId();const T=this.callEventGroupers.get(t.getContent().call_id);return a.push(l.a.createElement(M.a,{key:t.getTxnId()||f,mxEvent:t},l.a.createElement(y.b,{as:"li",ref:this.collectEventNode.bind(this,f),alwaysShowTimestamps:this.props.alwaysShowTimestamps,mxEvent:t,continuation:m,isRedacted:t.isRedacted(),replacingEventId:t.replacingEventId(),editState:s&&this.props.editState,onHeightChanged:this.onHeightChanged,readReceipts:v,readReceiptMap:this.readReceiptMap,showUrlPreview:this.props.showUrlPreview,checkUnmounting:this.isUnmounting,eventSendStatus:t.getAssociatedStatus(),tileShape:this.props.tileShape,isTwelveHour:this.props.isTwelveHour,permalinkCreator:this.props.permalinkCreator,last:n,lastInSection:p,lastSuccessful:E,isSelectedEvent:_,getRelationsForEvent:this.props.getRelationsForEvent,showReactions:this.props.showReactions,layout:this.props.layout,enableFlair:this.props.enableFlair,showReadReceipts:this.props.showReadReceipts,callEventGrouper:T,hideSender:this.membersCount<=2&&this.props.layout===b.a.Bubble}))),a}wantsDateSeparator(e,t){return null==e?!this.props.suppressFirstDateSeparator:Object(m.g)(e.getDate(),t)}getReadReceiptsForEvent(e){const t=g.a.get().credentials.userId,{room:n}=this.props;if(!n)return null;const r=[];return n.getReceiptsForEvent(e).forEach(e=>{if(!e.userId||"m.read"!==e.type||e.userId===t)return;if(g.a.get().isUserIgnored(e.userId))return;const o=n.getMember(e.userId);r.push({userId:e.userId,roomMember:o,ts:e.data?e.data.ts:0})}),r}getReadReceiptsByShownEvent(){const e={},t={};let n;for(const r of this.props.events){if(this.shouldShowEvent(r)&&(n=r.getId()),!n)continue;const o=e[n]||[],i=this.getReadReceiptsForEvent(r);e[n]=o.concat(i);for(const e of i)t[e.userId]={lastShownEventId:n,receipt:e}}for(const n in this.readReceiptsByUserId){if(t[n])continue;const{lastShownEventId:r,receipt:o}=this.readReceiptsByUserId[n],i=e[r]||[];e[r]=i.concat(o),t[n]={lastShownEventId:r,receipt:o}}this.readReceiptsByUserId=t;for(const t in e)e[t].sort((e,t)=>t.ts-e.ts);return e}updateTimelineMinHeight(){const e=this.scrollPanel.current;if(e){const t=e.isAtBottom(),n=this.whoIsTyping.current,r=n&&n.isVisible();t&&r&&e.preventShrinking()}}onTimelineReset(){const e=this.scrollPanel.current;e&&e.clearPreventShrinking()}render(){let e,t;this.props.backPaginating&&(e=l.a.createElement("li",{key:"_topSpinner"},l.a.createElement(N.a,null))),this.props.forwardPaginating&&(t=l.a.createElement("li",{key:"_bottomSpinner"},l.a.createElement(N.a,null)));const n=this.props.hidden?{display:"none"}:{};let r;this.props.room&&!this.props.tileShape&&this.state.showTypingNotifications&&(r=l.a.createElement(F.a,{room:this.props.room,onShown:this.onTypingShown,onHidden:this.onTypingHidden,ref:this.whoIsTyping}));let o=null;return this.props.layout==b.a.IRC&&(o=l.a.createElement(S.a,{minWidth:20,maxWidth:600,roomId:this.props.room?this.props.room.roomId:null})),l.a.createElement(A.a,null,l.a.createElement(O.a,{ref:this.scrollPanel,className:this.props.className,onScroll:this.props.onScroll,onUserScroll:this.props.onUserScroll,onFillRequest:this.props.onFillRequest,onUnfillRequest:this.props.onUnfillRequest,style:n,stickyBottom:this.props.stickyBottom,resizeNotifier:this.props.resizeNotifier,fixedChildren:o},e,this.getEventTiles(),r,t))}},s()(o,"contextType",_.a),r=i))||r;class U{constructor(e,t,n,r,o,i,a){this.panel=e,this.event=t,this.prevEvent=n,this.lastShownEvent=r,this.layout=o,this.nextEvent=i,this.nextEventTile=a,s()(this,"events",[]),s()(this,"ejectedEvents",[]),s()(this,"readMarker",void 0),this.readMarker=e.readMarkerForEvent(t.getId(),t===r)}}s()(U,"canStartGroup",(e,t)=>!0);class B extends U{shouldGroup(e){const t=this.panel,n=this.event;return!t.shouldShowEvent(e)||!t.wantsDateSeparator(this.event,e.getDate())&&((e.getType()!==h.a.RoomMember||e.getStateKey()===n.getSender()&&"join"===e.getContent().membership)&&!(!e.isState()||e.getSender()!==n.getSender()))}add(e){const t=this.panel;this.readMarker=this.readMarker||t.readMarkerForEvent(e.getId(),e===this.lastShownEvent),t.shouldShowEvent(e)&&(e.getType()===h.a.RoomEncryption?this.ejectedEvents.push(e):this.events.push(e))}getTiles(){if(!this.events||!this.events.length)return[];const e=this.panel,t=[],n=this.event,r=this.lastShownEvent;if(e.wantsDateSeparator(this.prevEvent,n.getDate())){const e=n.getTs();t.push(l.a.createElement("li",{key:e+"~"},l.a.createElement(I.a,{key:e+"~",ts:e})))}e.shouldShowEvent(n)&&t.push(...e.getTilesForEvent(n,n));for(const o of this.ejectedEvents)t.push(...e.getTilesForEvent(n,o,n===r,!0));const o=this.events.map(t=>e.getTilesForEvent(t,t,t===r,!0)).reduce((e,t)=>e.concat(t),[]),i=this.events[this.events.length-1];let a;const s=i.getRoomId(),c=i.sender?i.sender.name:i.getSender();return a=w.a.shared().getUserIdForRoomId(s)?Object(v.a)("%(creator)s created this DM.",{creator:c}):Object(v.a)("%(creator)s created and configured the room.",{creator:c}),t.push(l.a.createElement(C.a,{key:"newroomintro"})),t.push(l.a.createElement(R.a,{key:"roomcreationsummary",events:this.events,onToggle:e.onHeightChanged,summaryMembers:[i.sender],summaryText:a,layout:this.layout},o)),this.readMarker&&t.push(this.readMarker),t}getNewPrevEvent(){return this.event}}s()(B,"canStartGroup",(function(e,t){return t.getType()===h.a.RoomCreate}));class G extends U{constructor(e,t,n,r,o,i,a){super(e,t,n,r,o,i,a),this.events=[t]}shouldGroup(e){return!this.panel.shouldShowEvent(e)||!this.panel.wantsDateSeparator(this.events[0],e.getDate())&&e.isRedacted()}add(e){this.readMarker=this.readMarker||this.panel.readMarkerForEvent(e.getId(),e===this.lastShownEvent),this.panel.shouldShowEvent(e)&&this.events.push(e)}getTiles(){if(!this.events||!this.events.length)return[];const e=this.panel,t=[],n=this.lastShownEvent;if(e.wantsDateSeparator(this.prevEvent,this.events[0].getDate())){const e=this.events[0].getTs();t.push(l.a.createElement("li",{key:e+"~"},l.a.createElement(I.a,{key:e+"~",ts:e})))}const r="redactioneventlistsummary-"+(this.prevEvent?this.events[0].getId():"initial"),o=new Set;let i=this.events.map((t,r)=>{o.add(t.sender);const i=0===r?this.prevEvent:this.events[r-1];return e.getTilesForEvent(i,t,t===n,!0,this.nextEvent,this.nextEventTile)}).reduce((e,t)=>e.concat(t),[]);return 0===i.length&&(i=null),t.push(l.a.createElement(R.a,{key:r,threshold:2,events:this.events,onToggle:e.onHeightChanged,summaryMembers:Array.from(o),summaryText:Object(v.a)("%(count)s messages deleted.",{count:i.length}),layout:this.layout},i)),this.readMarker&&t.push(this.readMarker),t}getNewPrevEvent(){return this.events[this.events.length-1]}}s()(G,"canStartGroup",(function(e,t){return e.shouldShowEvent(t)&&t.isRedacted()}));class V extends U{constructor(e,t,n,r,o){super(e,t,n,r,o),this.panel=e,this.event=t,this.prevEvent=n,this.lastShownEvent=r,this.layout=o,this.events=[t]}shouldGroup(e){return!this.panel.wantsDateSeparator(this.events[0],e.getDate())&&L.includes(e.getType())}add(e,t){(e.getType()!==h.a.RoomMember||Object(E.a)(e,t))&&(this.readMarker=this.readMarker||this.panel.readMarkerForEvent(e.getId(),e===this.lastShownEvent),this.events.push(e))}getTiles(){if(!this.events||!this.events.length)return[];const e=this.panel,t=this.lastShownEvent,n=[];if(e.wantsDateSeparator(this.prevEvent,this.events[0].getDate())){const e=this.events[0].getTs();n.push(l.a.createElement("li",{key:e+"~"},l.a.createElement(I.a,{key:e+"~",ts:e})))}const r="membereventlistsummary-"+(this.prevEvent?this.events[0].getId():"initial");let o,i=this.events.map(n=>(n.getId()===e.props.highlightedEventId&&(o=!0),e.getTilesForEvent(n,n,n===t,!0))).reduce((e,t)=>e.concat(t),[]);return 0===i.length&&(i=null),n.push(l.a.createElement(D.a,{key:r,events:this.events,onToggle:e.onHeightChanged,startExpanded:o,layout:this.layout},i)),this.readMarker&&n.push(this.readMarker),n}getNewPrevEvent(){return this.events[0]}}s()(V,"canStartGroup",(function(e,t){return e.shouldShowEvent(t)&&L.includes(t.getType())}));const q=[B,V,G]},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(84),l=n(765),u=n(98),d=n(81);let h=Object(d.a)("views.elements.IRCTimelineProfileResizer")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"dragFunc",(e,t)=>{const n=t.clientX-e.currentX,r=this.state.width+n;return r<this.props.minWidth||r>this.props.maxWidth?e:(this.setState({width:r}),this.updateCSSWidth.bind(this)(r),{currentX:t.clientX,currentY:e.currentY})}),this.state={width:c.b.getValue("ircDisplayNameWidth",this.props.roomId),IRCLayoutRoot:null}}componentDidMount(){this.setState({IRCLayoutRoot:document.querySelector(".mx_IRCLayout")},()=>this.updateCSSWidth(this.state.width))}updateCSSWidth(e){this.state.IRCLayoutRoot.style.setProperty("--name-width",e+"px")}onMoueUp(e){this.props.roomId&&c.b.setValue("ircDisplayNameWidth",this.props.roomId,u.a.ROOM_DEVICE,this.state.width)}render(){return s.a.createElement(l.a,{className:"mx_ProfileResizer",dragFunc:this.dragFunc.bind(this),onMouseUp:this.onMoueUp.bind(this)})}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(81);let l=Object(c.a)("views.elements.Draggable")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onMouseDown",e=>{this.setState({location:{currentX:e.clientX,currentY:e.clientY}}),document.addEventListener("mousemove",this.state.onMouseMove),document.addEventListener("mouseup",this.state.onMouseUp)}),i()(this,"onMouseUp",e=>{document.removeEventListener("mousemove",this.state.onMouseMove),document.removeEventListener("mouseup",this.state.onMouseUp),this.props.onMouseUp(e)}),this.state={onMouseMove:this.onMouseMove.bind(this),onMouseUp:this.onMouseUp.bind(this),location:{currentX:0,currentY:0}}}onMouseMove(e){const t=this.props.dragFunc(this.state.location,e);this.setState({location:t})}render(){return s.a.createElement("div",{className:this.props.className,onMouseDown:this.onMouseDown.bind(this)})}})||r},function(e,t,n){"use strict";(function(e){var r=n(78),o=n.n(r),i=n(93),a=n(94),s=n(164),c=n(122),l=n(80),u=n(85),d=n(466),h=n(119),p=n(83),m=n(91),g=n(102),f=n(221),_=n(125),b=n(225),v=n(767);t.a=()=>{const t=Object(r.useContext)(a.a),{room:n,roomId:y}=Object(r.useContext)(s.a),E=c.a.shared().getUserIdForRoomId(y);let S;if(E){let e;n.getJoinedMemberCount()+n.getInvitedMemberCount()===2&&(e=Object(l.a)("Only the two of you are in this conversation, unless either of you invites anyone to join."));const t=null==n?void 0:n.getMember(E),r=(null==t?void 0:t.rawDisplayName)||E;S=o.a.createElement(o.a.Fragment,null,o.a.createElement(h.a,{room:n,width:d.a,height:d.a,onClick:()=>{p.a.dispatch({action:m.a.ViewUser,member:t||{userId:E}})}}),o.a.createElement("h2",null,n.name),o.a.createElement("p",null,Object(l.a)("This is the beginning of your direct message history with <displayName/>.",{},{displayName:()=>o.a.createElement("b",null,r)})),e&&o.a.createElement("p",null,e))}else{var w,C,T,x,k,F,O;const r=n&&"join"===n.getMyMembership(),a=null===(w=n.currentState.getStateEvents(i.a.RoomTopic,""))||void 0===w||null===(C=w.getContent())||void 0===C?void 0:C.topic,s=r&&n.currentState.maySendStateEvent(i.a.RoomTopic,t.getUserId()),c=()=>{p.a.dispatch({action:"open_room_settings",room_id:y},!0),e(()=>{window.document.getElementById("profileTopic").focus()})};let m;s&&a?m=Object(l.a)("Topic: %(topic)s (<a>edit</a>)",{topic:a},{a:e=>o.a.createElement(u.a,{kind:"link",onClick:c},e)}):a?m=Object(l.a)("Topic: %(topic)s ",{topic:a}):s&&(m=Object(l.a)("<a>Add a topic</a> to help people know what it is about.",{},{a:e=>o.a.createElement(u.a,{kind:"link",onClick:c},e)}));const _=null===(T=n.currentState.getStateEvents(i.a.RoomCreate,""))||void 0===T?void 0:T.getSender(),b=(null==n||null===(x=n.getMember(_))||void 0===x?void 0:x.rawDisplayName)||_;let v,E,R;v=_===t.getUserId()?Object(l.a)("You created this room."):Object(l.a)("%(displayName)s created this room.",{displayName:b}),null!==(k=g.g.instance.activeSpace)&&void 0!==k&&k.canInvite(t.getUserId())&&g.g.instance.getSpaceFilteredRoomIds(g.g.instance.activeSpace).has(n.roomId)&&(E=g.g.instance.activeSpace),E?R=o.a.createElement("div",{className:"mx_NewRoomIntro_buttons"},o.a.createElement(u.a,{className:"mx_NewRoomIntro_inviteButton",kind:"primary",onClick:()=>{Object(f.g)(E)}},Object(l.a)("Invite to %(spaceName)s",{spaceName:E.name})),n.canInvite(t.getUserId())&&o.a.createElement(u.a,{className:"mx_NewRoomIntro_inviteButton",kind:"primary_outline",onClick:()=>{p.a.dispatch({action:"view_invite",roomId:y})}},Object(l.a)("Invite to just this room"))):n.canInvite(t.getUserId())&&(R=o.a.createElement("div",{className:"mx_NewRoomIntro_buttons"},o.a.createElement(u.a,{className:"mx_NewRoomIntro_inviteButton",kind:"primary",onClick:()=>{p.a.dispatch({action:"view_invite",roomId:y})}},Object(l.a)("Invite to this room"))));const D=null===(F=n.currentState.getStateEvents(i.a.RoomAvatar,""))||void 0===F||null===(O=F.getContent())||void 0===O?void 0:O.url;S=o.a.createElement(o.a.Fragment,null,o.a.createElement(d.b,{hasAvatar:!!D,noAvatarLabel:Object(l.a)("Add a photo, so people can easily spot your room."),setAvatarUrl:e=>t.sendStateEvent(y,i.a.RoomAvatar,{url:e},"")},o.a.createElement(h.a,{room:n,width:d.a,height:d.a})),o.a.createElement("h2",null,n.name),o.a.createElement("p",null,v," ",Object(l.a)("This is the start of <roomName/>.",{},{roomName:()=>o.a.createElement("b",null,n.name)})),o.a.createElement("p",null,m),R)}function R(e){e.preventDefault(),p.a.dispatch({action:"open_room_settings",initial_tab_id:v.a})}const D=Object(l.a)("Your private messages are normally encrypted, but this room isn't. Usually this is due to an unsupported device or method being used, like email invites. <a>Enable encryption in settings.</a>",{},{a:e=>o.a.createElement("a",{onClick:R,href:"#"},e)});return o.a.createElement("div",{className:"mx_NewRoomIntro"},!function(e,t){const n=e.isRoomEncrypted(t.roomId);return"public"===t.getJoinRule()||!Object(_.f)()||n}(t,n)&&o.a.createElement(b.a,{className:"mx_cryptoEvent mx_cryptoEvent_icon_warning",title:Object(l.a)("End-to-end encryption isn't enabled"),subtitle:D}),S)}}).call(this,n(161).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return w}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(234),l=n(80),u=n(444),d=n(768),h=n(769),p=n(771),m=n(773),g=n(774),f=n(82),_=n(83),b=n(84),v=n(113),y=n(81),E=n(95);const S="ROOM_SECURITY_TAB";let w=Object(y.a)("views.dialogs.RoomSettingsDialog")(r=class extends s.a.Component{constructor(...e){super(...e),i()(this,"dispatcherRef",void 0),i()(this,"onAction",e=>{"view_home_page"===e.action&&this.props.onFinished(!0)})}componentDidMount(){this.dispatcherRef=_.a.register(this.onAction)}componentWillUnmount(){this.dispatcherRef&&_.a.unregister(this.dispatcherRef)}getTabs(){const e=[];return e.push(new c.a("ROOM_GENERAL_TAB",Object(l.b)("General"),"mx_RoomSettingsDialog_settingsIcon",s.a.createElement(h.a,{roomId:this.props.roomId}))),e.push(new c.a(S,Object(l.b)("Security & Privacy"),"mx_RoomSettingsDialog_securityIcon",s.a.createElement(p.a,{roomId:this.props.roomId}))),e.push(new c.a("ROOM_ROLES_TAB",Object(l.b)("Roles & Permissions"),"mx_RoomSettingsDialog_rolesIcon",s.a.createElement(d.a,{roomId:this.props.roomId}))),e.push(new c.a("ROOM_NOTIFICATIONS_TAB",Object(l.b)("Notifications"),"mx_RoomSettingsDialog_notificationsIcon",s.a.createElement(m.a,{roomId:this.props.roomId}))),b.b.getValue("feature_bridge_state")&&e.push(new c.a("ROOM_BRIDGES_TAB",Object(l.b)("Bridges"),"mx_RoomSettingsDialog_bridgesIcon",s.a.createElement(g.a,{roomId:this.props.roomId}))),b.b.getValue(v.a.AdvancedSettings)&&e.push(new c.a("ROOM_ADVANCED_TAB",Object(l.b)("Advanced"),"mx_RoomSettingsDialog_warningIcon",s.a.createElement(u.a,{roomId:this.props.roomId,closeSettingsFn:()=>this.props.onFinished(!0)}))),e}render(){const e=f.a.get().getRoom(this.props.roomId).name;return s.a.createElement(E.a,{className:"mx_RoomSettingsDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(l.a)("Room Settings - %(roomName)s",{roomName:e})},s.a.createElement("div",{className:"mx_SettingsDialog_content"},s.a.createElement(c.c,{tabs:this.getTabs(),initialTabId:this.props.initialTabId})))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(82),u=n(85),d=n(87),h=n(81),p=n(93),m=n(130),g=n(105),f=n(479);const _={[p.a.RoomAvatar]:Object(c.b)("Change room avatar"),[p.a.RoomName]:Object(c.b)("Change room name"),[p.a.RoomCanonicalAlias]:Object(c.b)("Change main address for the room"),[p.a.RoomHistoryVisibility]:Object(c.b)("Change history visibility"),[p.a.RoomPowerLevels]:Object(c.b)("Change permissions"),[p.a.RoomTopic]:Object(c.b)("Change topic"),[p.a.RoomTombstone]:Object(c.b)("Upgrade the room"),[p.a.RoomEncryption]:Object(c.b)("Enable room encryption"),[p.a.RoomServerAcl]:Object(c.b)("Change server ACLs"),"im.vector.modular.widgets":Object(c.b)("Modify widgets")},b={[p.a.RoomAvatar]:{isState:!0},[p.a.RoomName]:{isState:!0},[p.a.RoomCanonicalAlias]:{isState:!0},[p.a.RoomHistoryVisibility]:{isState:!0},[p.a.RoomPowerLevels]:{isState:!0},[p.a.RoomTopic]:{isState:!0},[p.a.RoomTombstone]:{isState:!0},[p.a.RoomEncryption]:{isState:!0},[p.a.RoomServerAcl]:{isState:!0},"im.vector.modular.widgets":{isState:!0}};function v(e,t){const n=parseInt(e);return isNaN(n)?t:n}class y extends s.a.Component{constructor(...e){super(...e),i()(this,"onUnbanClick",e=>{l.a.get().unban(this.props.member.roomId,this.props.member.userId).catch(e=>{console.error("Failed to unban: "+e),d.a.createTrackedDialog("Failed to unban","",g.a,{title:Object(c.a)("Error"),description:Object(c.a)("Failed to unban")})})})}render(){let e;this.props.canUnban&&(e=s.a.createElement(u.a,{className:"mx_RolesRoomSettingsTab_unbanBtn",kind:"danger_sm",onClick:this.onUnbanClick},Object(c.a)("Unban")));const t=this.props.member.name===this.props.member.userId?null:this.props.member.userId;return s.a.createElement("li",null,e,s.a.createElement("span",{title:Object(c.a)("Banned by %(displayName)s",{displayName:this.props.by})},s.a.createElement("strong",null,this.props.member.name)," ",t,this.props.reason?" "+Object(c.a)("Reason")+": "+this.props.reason:""))}}let E=Object(h.a)("views.settings.tabs.room.RolesRoomSettingsTab")(r=class extends s.a.Component{constructor(...e){super(...e),i()(this,"onRoomMembership",(e,t,n)=>{t.roomId===this.props.roomId&&this.forceUpdate()}),i()(this,"onPowerLevelsChanged",(e,t)=>{const n=l.a.get(),r=n.getRoom(this.props.roomId).currentState.getStateEvents("m.room.power_levels","");let o=r&&r.getContent()||{};o=Object.assign({},o);const i=parseInt(e);if(t.startsWith("event_levels_"))o.events=Object.assign({},o.events||{}),o.events[t.slice("event_levels_".length)]=i;else{const e=t.split(".");let n,r=o;for(const t of e)r[t]||(r[t]={}),n=r,r=r[t];n[e[e.length-1]]=i}n.sendStateEvent(this.props.roomId,"m.room.power_levels",o).catch(e=>{console.error(e),d.a.createTrackedDialog("Power level requirement change failed","",g.a,{title:Object(c.a)("Error changing power level requirement"),description:Object(c.a)("An error occurred changing the room's power level requirements. Ensure you have sufficient permissions and try again.")})})}),i()(this,"onUserPowerLevelChanged",(e,t)=>{const n=l.a.get(),r=n.getRoom(this.props.roomId).currentState.getStateEvents("m.room.power_levels","");let o=r&&r.getContent()||{};o=Object.assign({},o),o.users||(o.users={}),o.users[t]=e,n.sendStateEvent(this.props.roomId,"m.room.power_levels",o).catch(e=>{console.error(e),d.a.createTrackedDialog("Power level change failed","",g.a,{title:Object(c.a)("Error changing power level"),description:Object(c.a)("An error occurred changing the user's power level. Ensure you have sufficient permissions and try again.")})})})}componentDidMount(){l.a.get().on("RoomState.members",this.onRoomMembership)}componentWillUnmount(){const e=l.a.get();e&&e.removeListener("RoomState.members",this.onRoomMembership)}populateDefaultPlEvents(e,t,n){for(const r of Object.keys(b))r in e||(e[r]=b[r].isState?t:n)}render(){const e=l.a.get(),t=e.getRoom(this.props.roomId),n=t.currentState.getStateEvents("m.room.power_levels",""),r=n&&n.getContent()||{},o=t.currentState.mayClientSendStateEvent("m.room.power_levels",e),i={users_default:{desc:Object(c.a)("Default role"),defaultValue:0},events_default:{desc:Object(c.a)("Send messages"),defaultValue:0},invite:{desc:Object(c.a)("Invite users"),defaultValue:50},state_default:{desc:Object(c.a)("Change settings"),defaultValue:50},kick:{desc:Object(c.a)("Kick users"),defaultValue:50},ban:{desc:Object(c.a)("Ban users"),defaultValue:50},redact:{desc:Object(c.a)("Remove messages sent by others"),defaultValue:50},"notifications.room":{desc:Object(c.a)("Notify everyone"),defaultValue:50}},a=r.events||{},u=r.users||{},d=v(r.ban,i.ban.defaultValue),h=v(r.users_default,i.users_default.defaultValue);let p=u[e.getUserId()];void 0===p&&(p=h),this.populateDefaultPlEvents(a,v(r.state_default,i.state_default.defaultValue),v(r.events_default,i.events_default.defaultValue));let g,b=s.a.createElement("div",null,Object(c.a)("No users have specific privileges in this room"));if(Object.keys(u).length){const e=[],t=[];Object.keys(u).forEach(n=>{if(!Number.isInteger(u[n]))return;const r=u[n]<p&&o;u[n]>h?e.push(s.a.createElement(f.a,{value:u[n],disabled:!r,label:n,key:n,powerLevelKey:n,onChange:this.onUserPowerLevelChanged})):u[n]<h&&t.push(s.a.createElement(f.a,{value:u[n],disabled:!r,label:n,key:n,powerLevelKey:n,onChange:this.onUserPowerLevelChanged}))});const n=(e,t)=>{const n=u[t.key]-u[e.key];return 0!==n?n:Object(m.a)(e.key.toLocaleLowerCase(),t.key.toLocaleLowerCase())};e.sort(n),t.sort(n),e.length&&(b=s.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},s.a.createElement("div",{className:"mx_SettingsTab_subheading"},Object(c.a)("Privileged Users")),e)),t.length&&(g=s.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},s.a.createElement("div",{className:"mx_SettingsTab_subheading"},Object(c.a)("Muted Users")),t))}const E=t.getMembersWithMembership("ban");let S;if(E.length){const e=p>=d;S=s.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},s.a.createElement("div",{className:"mx_SettingsTab_subheading"},Object(c.a)("Banned users")),s.a.createElement("ul",null,E.map(n=>{const r=n.events.member.getContent(),o=t.getMember(n.events.member.getSender());let i=n.events.member.getSender();return o&&(i=o.name),s.a.createElement(y,{key:n.userId,canUnban:e,member:n,reason:r.reason,by:i})})))}const w=Object.keys(i).map((e,t)=>{const n=i[e],a=e.split(".");let c=r;for(const e of a){if(void 0===c)break;c=c[e]}const l=v(c,n.defaultValue);return s.a.createElement("div",{key:t,className:""},s.a.createElement(f.a,{label:n.desc,value:l,usersDefault:h,disabled:!o||p<l,powerLevelKey:e,onChange:this.onPowerLevelsChanged}))});e.isRoomEncrypted(this.props.roomId)&&delete a["m.room.encryption"];const C=Object.keys(a).map((e,t)=>{let n=_[e];return n=n?Object(c.a)(n):Object(c.a)("Send %(eventType)s events",{eventType:e}),s.a.createElement("div",{className:"",key:e},s.a.createElement(f.a,{label:n,value:a[e],usersDefault:h,disabled:!o||p<a[e],powerLevelKey:"event_levels_"+e,onChange:this.onPowerLevelsChanged}))});return s.a.createElement("div",{className:"mx_SettingsTab mx_RolesRoomSettingsTab"},s.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Roles & Permissions")),b,g,S,s.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(c.a)("Permissions")),s.a.createElement("p",null,Object(c.a)("Select the roles required to change various parts of the room")),w,C))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(770),m=n(89),g=n(85),f=n(83),_=n(94),b=n(84),v=n(113),y=n(81);let E=Object(y.a)("views.settings.tabs.room.GeneralRoomSettingsTab")((i=o=class extends l.a.Component{constructor(){super(),s()(this,"_onLeaveClick",()=>{f.a.dispatch({action:"leave_room",room_id:this.props.roomId})}),this.state={isRoomPublished:!1}}render(){const e=m.getComponent("room_settings.AliasSettings"),t=m.getComponent("room_settings.RelatedGroupSettings"),n=m.getComponent("room_settings.UrlPreviewSettings"),r=this.context,o=r.getRoom(this.props.roomId),i=o.currentState.mayClientSendStateEvent("m.room.canonical_alias",r),a=o.currentState.getStateEvents("m.room.canonical_alias",""),s=o.currentState.mayClientSendStateEvent("m.room.related_groups",r),c=o.currentState.getStateEvents("m.room.related_groups","");let u,d=l.a.createElement(l.a.Fragment,null,l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(h.a)("URL Previews")),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement(n,{room:o})));return b.b.getValue(v.a.URLPreviews)||(d=null),b.b.getValue(v.a.Flair)&&(u=l.a.createElement(l.a.Fragment,null,l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(h.a)("Flair")),l.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},l.a.createElement(t,{roomId:o.roomId,canSetRelatedGroups:s,relatedGroupsEvent:c})))),l.a.createElement("div",{className:"mx_SettingsTab mx_GeneralRoomSettingsTab"},l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(h.a)("General")),l.a.createElement("div",{className:"mx_SettingsTab_section mx_GeneralRoomSettingsTab_profileSection"},l.a.createElement(p.a,{roomId:this.props.roomId})),l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(h.a)("Room Addresses")),l.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},l.a.createElement(e,{roomId:this.props.roomId,canSetCanonicalAlias:i,canSetAliases:!0,canonicalAliasEvent:a})),l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(h.a)("Other")),u,d,l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(h.a)("Leave room")),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement(g.a,{kind:"danger",onClick:this._onLeaveClick},Object(h.a)("Leave room"))))}},s()(o,"propTypes",{roomId:d.a.string.isRequired}),s()(o,"contextType",_.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(82),m=n(101),g=n(89),f=n(81),_=n(100);let b=Object(f.a)("views.room_settings.RoomProfileSettings")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"_uploadAvatar",()=>{this._avatarUpload.current.click()}),s()(this,"_removeAvatar",()=>{this._avatarUpload.current.value="",this.setState({avatarUrl:null,avatarFile:null,enableProfileSave:!0})}),s()(this,"_cancelProfileChanges",async e=>{e.stopPropagation(),e.preventDefault(),this.state.enableProfileSave&&this.setState({enableProfileSave:!1,displayName:this.state.originalDisplayName,topic:this.state.originalTopic,avatarUrl:this.state.originalAvatarUrl,avatarFile:null})}),s()(this,"_saveProfile",async e=>{if(e.stopPropagation(),e.preventDefault(),!this.state.enableProfileSave)return;this.setState({enableProfileSave:!1});const t=p.a.get(),n={},r=this.state.displayName.trim();if(this.state.originalDisplayName!==this.state.displayName&&(await t.setRoomName(this.props.roomId,r),n.originalDisplayName=r,n.displayName=r),this.state.avatarFile){const e=await t.uploadContent(this.state.avatarFile);await t.sendStateEvent(this.props.roomId,"m.room.avatar",{url:e},""),n.avatarUrl=Object(_.b)(e).getSquareThumbnailHttp(96),n.originalAvatarUrl=n.avatarUrl,n.avatarFile=null}else this.state.originalAvatarUrl!==this.state.avatarUrl&&await t.sendStateEvent(this.props.roomId,"m.room.avatar",{},"");this.state.originalTopic!==this.state.topic&&(await t.setRoomTopic(this.props.roomId,this.state.topic),n.originalTopic=this.state.topic),this.setState(n)}),s()(this,"_onDisplayNameChanged",e=>{this.setState({displayName:e.target.value}),this.state.originalDisplayName===e.target.value?this.setState({enableProfileSave:!1}):this.setState({enableProfileSave:!0})}),s()(this,"_onTopicChanged",e=>{this.setState({topic:e.target.value}),this.state.originalTopic===e.target.value?this.setState({enableProfileSave:!1}):this.setState({enableProfileSave:!0})}),s()(this,"_onAvatarChanged",e=>{if(!e.target.files||!e.target.files.length)return void this.setState({avatarUrl:this.state.originalAvatarUrl,avatarFile:null,enableProfileSave:!1});const t=e.target.files[0],n=new FileReader;n.onload=e=>{this.setState({avatarUrl:e.target.result,avatarFile:t,enableProfileSave:!0})},n.readAsDataURL(t)});const t=p.a.get(),n=t.getRoom(e.roomId);if(!n)throw new Error("Expected a room for ID: ",e.roomId);const r=n.currentState.getStateEvents("m.room.avatar","");let o=r&&r.getContent()?r.getContent().url:null;o&&(o=Object(_.b)(o).getSquareThumbnailHttp(96));const i=n.currentState.getStateEvents("m.room.topic",""),a=i&&i.getContent()?i.getContent().topic:"",l=n.currentState.getStateEvents("m.room.name",""),u=l&&l.getContent()?l.getContent().name:"";this.state={originalDisplayName:u,displayName:u,originalAvatarUrl:o,avatarUrl:o,avatarFile:null,originalTopic:a,topic:a,enableProfileSave:!1,canSetName:n.currentState.maySendStateEvent("m.room.name",t.getUserId()),canSetTopic:n.currentState.maySendStateEvent("m.room.topic",t.getUserId()),canSetAvatar:n.currentState.maySendStateEvent("m.room.avatar",t.getUserId())},this._avatarUpload=Object(c.createRef)()}render(){const e=g.getComponent("elements.AccessibleButton"),t=g.getComponent("settings.AvatarSetting");let n;return(this.state.canSetName||this.state.canSetTopic||this.state.canSetAvatar)&&(n=l.a.createElement("div",{className:"mx_ProfileSettings_buttons"},l.a.createElement(e,{onClick:this._cancelProfileChanges,kind:"link",disabled:!this.state.enableProfileSave},Object(h.a)("Cancel")),l.a.createElement(e,{onClick:this._saveProfile,kind:"primary",disabled:!this.state.enableProfileSave},Object(h.a)("Save")))),l.a.createElement("form",{onSubmit:this._saveProfile,autoComplete:"off",noValidate:!0,className:"mx_ProfileSettings_profileForm"},l.a.createElement("input",{type:"file",ref:this._avatarUpload,className:"mx_ProfileSettings_avatarUpload",onChange:this._onAvatarChanged,accept:"image/*"}),l.a.createElement("div",{className:"mx_ProfileSettings_profile"},l.a.createElement("div",{className:"mx_ProfileSettings_controls"},l.a.createElement(m.a,{label:Object(h.a)("Room Name"),type:"text",value:this.state.displayName,autoComplete:"off",onChange:this._onDisplayNameChanged,disabled:!this.state.canSetName}),l.a.createElement(m.a,{className:"mx_ProfileSettings_controls_topic",id:"profileTopic",label:Object(h.a)("Room Topic"),disabled:!this.state.canSetTopic,type:"text",value:this.state.topic,autoComplete:"off",onChange:this._onTopicChanged,element:"textarea"})),l.a.createElement(t,{avatarUrl:this.state.avatarUrl,avatarName:this.state.displayName||this.props.roomId,avatarAltText:Object(h.a)("Room avatar"),uploadAvatar:this.state.canSetAvatar?this._uploadAvatar:void 0,removeAvatar:this.state.canSetAvatar?this._removeAvatar:void 0})),n)}},s()(o,"propTypes",{roomId:d.a.string.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return F}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(136),l=n(93),u=n(80),d=n(82),h=n(165),p=n(87),m=n(110),g=n(246),f=n(98),_=n(84),b=n(113),v=n(81),y=n(85),E=n(102),S=n(119),w=n(772),C=n(480),T=n(445),x=n(109),k=n(201);let F=Object(v.a)("views.settings.tabs.room.SecurityRoomSettingsTab")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onStateEvent",e=>{[l.a.RoomJoinRules,l.a.RoomGuestAccess,l.a.RoomHistoryVisibility,l.a.RoomEncryption].includes(e.getType())&&this.forceUpdate()}),i()(this,"onEncryptionChange",()=>{p.a.createTrackedDialog("Enable encryption","",m.a,{title:Object(u.a)("Enable encryption?"),description:Object(u.a)("Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>",{},{a:e=>s.a.createElement("a",{href:"https://element.io/help#encryption",rel:"noreferrer noopener",target:"_blank"},e)}),onFinished:e=>{if(!e)return void this.setState({encrypted:!1});const t=this.state.encrypted;this.setState({encrypted:!0}),d.a.get().sendStateEvent(this.props.roomId,l.a.RoomEncryption,{algorithm:"m.megolm.v1.aes-sha2"}).catch(e=>{console.error(e),this.setState({encrypted:t})})}})}),i()(this,"onJoinRuleChange",async e=>{const t=this.state.joinRule;let n;if(e===c.c.Restricted){const e=d.a.get(),r=this.props.roomId,o=e.getRoom(r);if(t===c.c.Restricted||this.state.roomSupportsRestricted){if(n=await this.editRestrictedRoomIds(),!Array.isArray(n))return}else if(this.state.preferredRestrictionVersion){const e=this.state.preferredRestrictionVersion;return void p.a.createTrackedDialog("Restricted join rule upgrade","",C.a,{roomId:r,targetVersion:e,description:Object(u.a)("This upgrade will allow members of selected spaces access to this room without an invite."),onFinished:t=>{null!=t&&t.continue&&Object(T.a)(o,e,t.invite)}})}}if(t===e&&!n)return;const r={join_rule:e};e===c.c.Restricted&&(r.allow=n.map(e=>({type:c.e.RoomMembership,room_id:e}))),this.setState({joinRule:e,restrictedAllowRoomIds:n});d.a.get().sendStateEvent(this.props.roomId,l.a.RoomJoinRules,r,"").catch(e=>{console.error(e),this.setState({joinRule:t,restrictedAllowRoomIds:void 0})})}),i()(this,"onRestrictedRoomIdsChange",e=>{const t=this.state.restrictedAllowRoomIds;if(!Object(x.d)(t||[],e))return;this.setState({restrictedAllowRoomIds:e});d.a.get().sendStateEvent(this.props.roomId,l.a.RoomJoinRules,{join_rule:c.c.Restricted,allow:e.map(e=>({type:c.e.RoomMembership,room_id:e}))},"").catch(e=>{console.error(e),this.setState({restrictedAllowRoomIds:t})})}),i()(this,"onGuestAccessChange",e=>{const t=e?c.a.CanJoin:c.a.Forbidden,n=this.state.guestAccess;if(n===t)return;this.setState({guestAccess:t});d.a.get().sendStateEvent(this.props.roomId,l.a.RoomGuestAccess,{guest_access:t},"").catch(e=>{console.error(e),this.setState({guestAccess:n})})}),i()(this,"onHistoryRadioToggle",e=>{const t=this.state.history;t!==e&&(this.setState({history:e}),d.a.get().sendStateEvent(this.props.roomId,l.a.RoomHistoryVisibility,{history_visibility:e},"").catch(e=>{console.error(e),this.setState({history:t})}))}),i()(this,"updateBlacklistDevicesFlag",e=>{d.a.get().getRoom(this.props.roomId).setBlacklistUnverifiedDevices(e)}),i()(this,"editRestrictedRoomIds",async()=>{var e;let t=this.state.restrictedAllowRoomIds;null!==(e=t)&&void 0!==e&&e.length||!E.g.instance.activeSpace||(t=[E.g.instance.activeSpace.roomId]);const n=d.a.get(),{finished:r}=p.a.createTrackedDialog("Edit restricted","",w.a,{matrixClient:n,room:n.getRoom(this.props.roomId),selected:t},"mx_ManageRestrictedJoinRuleDialog_wrapper"),[o]=await r;return o}),i()(this,"onEditRestrictedClick",async()=>{const e=await this.editRestrictedRoomIds();Array.isArray(e)&&(e.length>0?this.onRestrictedRoomIdsChange(e):this.onJoinRuleChange(c.c.Invite))}),i()(this,"toggleAdvancedSection",()=>{this.setState({showAdvancedSection:!this.state.showAdvancedSection})}),this.state={joinRule:c.c.Invite,guestAccess:c.a.Forbidden,history:c.b.Shared,hasAliases:!1,encrypted:!1,showAdvancedSection:!1}}UNSAFE_componentWillMount(){var e,t;const n=d.a.get();n.on("RoomState.events",this.onStateEvent);const r=n.getRoom(this.props.roomId),o=r.currentState,i=o.getStateEvents(l.a.RoomJoinRules,""),a=this.pullContentPropertyFromEvent(i,"join_rule",c.c.Invite),s=a===c.c.Restricted?null==i||null===(e=i.getContent().allow)||void 0===e||null===(t=e.filter(e=>e.type===c.e.RoomMembership))||void 0===t?void 0:t.map(e=>e.room_id):void 0,u=this.pullContentPropertyFromEvent(o.getStateEvents(l.a.RoomGuestAccess,""),"guest_access",c.a.Forbidden),h=this.pullContentPropertyFromEvent(o.getStateEvents(l.a.RoomHistoryVisibility,""),"history_visibility",c.b.Shared),p=d.a.get().isRoomEncrypted(this.props.roomId),m=E.g.instance.restrictedJoinRuleSupport,g=Array.isArray(null==m?void 0:m.support)&&m.support.includes(r.getVersion()),f=g||null==m?void 0:m.preferred;this.setState({joinRule:a,restrictedAllowRoomIds:s,guestAccess:u,history:h,encrypted:p,roomSupportsRestricted:g,preferredRestrictionVersion:f}),this.hasAliases().then(e=>this.setState({hasAliases:e}))}pullContentPropertyFromEvent(e,t,n){return(null==e?void 0:e.getContent()[t])||n}componentWillUnmount(){d.a.get().removeListener("RoomState.events",this.onStateEvent)}async hasAliases(){const e=d.a.get();if(await e.doesServerSupportUnstableFeature("org.matrix.msc2432")){const t=(await e.unstableGetLocalAliases(this.props.roomId)).aliases;return Array.isArray(t)&&0!==t.length}return!!(e.getRoom(this.props.roomId).currentState.getStateEvents(l.a.RoomAliases)||[]).find(e=>(e.getContent().aliases||[]).length>0)}renderJoinRule(){var e,t;const r=d.a.get(),o=r.getRoom(this.props.roomId),i=this.state.joinRule,a=o.currentState.mayClientSendStateEvent(l.a.RoomJoinRules,r);let h=null;i!==c.c.Public||this.state.hasAliases||(h=s.a.createElement("div",{className:"mx_SecurityRoomSettingsTab_warning"},s.a.createElement("img",{src:n(245),width:15,height:15}),s.a.createElement("span",null,Object(u.a)("To link to this room, please add an address."))));const p=[{value:c.c.Invite,label:Object(u.a)("Private (invite only)"),description:Object(u.a)("Only invited people can join."),checked:this.state.joinRule===c.c.Invite||this.state.joinRule===c.c.Restricted&&!(null!==(e=this.state.restrictedAllowRoomIds)&&void 0!==e&&e.length)},{value:c.c.Public,label:Object(u.a)("Public"),description:Object(u.a)("Anyone can find and join.")}];if(this.state.roomSupportsRestricted||this.state.preferredRestrictionVersion||i===c.c.Restricted){var m,f;let e,t;if(this.state.preferredRestrictionVersion&&(e=s.a.createElement("span",{className:"mx_SecurityRoomSettingsTab_upgradeRequired"},Object(u.a)("Upgrade required"))),i===c.c.Restricted&&null!==(m=this.state.restrictedAllowRoomIds)&&void 0!==m&&m.length){const e=this.state.restrictedAllowRoomIds.map(e=>r.getRoom(e)).filter(e=>null==e?void 0:e.isSpaceRoom()).slice(0,4);let n;e.length<this.state.restrictedAllowRoomIds.length&&(n=e.length>0?Object(u.a)("& %(count)s more",{count:this.state.restrictedAllowRoomIds.length-e.length}):Object(u.a)("Currently, %(count)s spaces have access",{count:this.state.restrictedAllowRoomIds.length})),t=s.a.createElement("div",null,s.a.createElement("span",null,Object(u.a)("Anyone in a space can find and join. <a>Edit which spaces can access here.</a>",{},{a:e=>s.a.createElement(y.a,{disabled:!a,onClick:this.onEditRestrictedClick,kind:"link"},e)})),s.a.createElement("div",{className:"mx_SecurityRoomSettingsTab_spacesWithAccess"},s.a.createElement("h4",null,Object(u.a)("Spaces with access")),e.map(e=>s.a.createElement("span",{key:e.roomId},s.a.createElement(S.a,{room:e,height:32,width:32}),e.name)),n&&s.a.createElement("span",null,n)))}else t=E.g.instance.activeSpace?Object(u.a)("Anyone in %(spaceName)s can find and join. You can select other spaces too.",{spaceName:E.g.instance.activeSpace.name}):Object(u.a)("Anyone in a space can find and join. You can select multiple spaces.");p.splice(1,0,{value:c.c.Restricted,label:s.a.createElement(s.a.Fragment,null,Object(u.a)("Space members"),e),description:t,checked:this.state.joinRule===c.c.Restricted&&!(null===(f=this.state.restrictedAllowRoomIds)||void 0===f||!f.length)})}return s.a.createElement("div",{className:"mx_SecurityRoomSettingsTab_joinRule"},s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},s.a.createElement("span",null,Object(u.a)("Decide who can join %(roomName)s.",{roomName:null===(t=r.getRoom(this.props.roomId))||void 0===t?void 0:t.name}))),h,s.a.createElement(g.a,{name:"joinRule",value:i,onChange:this.onJoinRuleChange,definitions:p,disabled:!a}))}renderHistory(){const e=d.a.get(),t=this.state.history,n=e.getRoom(this.props.roomId).currentState.mayClientSendStateEvent(l.a.RoomHistoryVisibility,e),r=[{value:c.b.Shared,label:Object(u.a)("Members only (since the point in time of selecting this option)")},{value:c.b.Invited,label:Object(u.a)("Members only (since they were invited)")},{value:c.b.Joined,label:Object(u.a)("Members only (since they joined)")}];return this.state.encrypted&&t!==c.b.WorldReadable||r.unshift({value:c.b.WorldReadable,label:Object(u.a)("Anyone")}),s.a.createElement("div",null,s.a.createElement("div",null,Object(u.a)("Changes to who can read history will only apply to future messages in this room. The visibility of existing history will be unchanged.")),s.a.createElement(g.a,{name:"historyVis",value:t,onChange:this.onHistoryRadioToggle,disabled:!n,definitions:r}))}renderAdvanced(){const e=d.a.get(),t=this.state.guestAccess,n=e.getRoom(this.props.roomId).currentState.mayClientSendStateEvent(l.a.RoomGuestAccess,e);return s.a.createElement("div",{className:"mx_SettingsTab_section"},s.a.createElement(h.a,{value:t===c.a.CanJoin,onChange:this.onGuestAccessChange,disabled:!n,label:Object(u.a)("Enable guest access")}),s.a.createElement("p",null,Object(u.a)("People with supported clients will be able to join the room without having a registered account.")))}render(){const e=d.a.get(),t=e.getRoom(this.props.roomId),n=this.state.encrypted,r=t.currentState.mayClientSendStateEvent(l.a.RoomEncryption,e),o=!n&&r;let i=null;n&&_.b.isEnabled("blacklistUnverifiedDevices")&&(i=s.a.createElement(k.a,{name:"blacklistUnverifiedDevices",level:f.a.ROOM_DEVICE,onChange:this.updateBlacklistDevicesFlag,roomId:this.props.roomId}));let a=s.a.createElement(s.a.Fragment,null,s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Who can read history?")),s.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},this.renderHistory()));return _.b.getValue(b.a.RoomHistorySettings)||(a=null),s.a.createElement("div",{className:"mx_SettingsTab mx_SecurityRoomSettingsTab"},s.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(u.a)("Security & Privacy")),s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Encryption")),s.a.createElement("div",{className:"mx_SettingsTab_section mx_SecurityRoomSettingsTab_encryptionSection"},s.a.createElement("div",null,s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},s.a.createElement("span",null,Object(u.a)("Once enabled, encryption cannot be disabled."))),s.a.createElement(h.a,{value:n,onChange:this.onEncryptionChange,label:Object(u.a)("Encrypted"),disabled:!o})),i),s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Access")),s.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},this.renderJoinRule()),s.a.createElement(y.a,{onClick:this.toggleAdvancedSection,kind:"link",className:"mx_SettingsTab_showAdvanced"},this.state.showAdvancedSection?Object(u.a)("Hide advanced"):Object(u.a)("Show advanced")),this.state.showAdvancedSection&&this.renderAdvanced(),a)}})||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(185),a=n(80),s=n(95),c=n(216),l=n(102),u=n(119),d=n(85),h=n(117),p=n(137),m=n(94);const g=({room:e,checked:t,onChange:n})=>{const r=e instanceof i.b;let s;if(r){s=Object(a.a)("%(count)s members",{count:e.getJoinedMemberCount()});const t=l.g.instance.getChildRooms(e.roomId).length;t>0&&(s+=" · "+Object(a.a)("%(count)s rooms",{count:t}))}return o.a.createElement("label",{className:"mx_ManageRestrictedJoinRuleDialog_entry"},o.a.createElement("div",null,o.a.createElement("div",null,r?o.a.createElement(u.a,{room:e,height:20,width:20}):o.a.createElement(u.a,{oobData:e,height:20,width:20}),o.a.createElement("span",{className:"mx_ManageRestrictedJoinRuleDialog_entry_name"},e.name)),s&&o.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_entry_description"},s)),o.a.createElement(p.a,{onChange:n?e=>n(e.target.checked):null,checked:t,disabled:!n}))};t.a=({room:e,selected:t=[],onFinished:n})=>{const i=e.client,[u,p]=Object(r.useState)(new Set(t)),[f,_]=Object(r.useState)(""),b=f.toLowerCase().trim(),[v,y]=Object(r.useMemo)(()=>[i.getVisibleRooms().filter(e=>"join"===e.getMyMembership()&&e.isSpaceRoom()).filter(t=>l.g.instance.getSpaceFilteredRoomIds(t).has(e.roomId)),t.map(e=>{const t=i.getRoom(e);return t?"join"===t.getMyMembership()&&t.isSpaceRoom()?void 0:t:{roomId:e,name:e}}).filter(Boolean)],[i,t,e.roomId]),[E,S]=Object(r.useMemo)(()=>[v.filter(e=>e.name.toLowerCase().includes(b)),y.filter(e=>e.name.toLowerCase().includes(b))],[v,y,b]),w=(e,t)=>{e?u.add(t.roomId):u.delete(t.roomId),p(new Set(u))};let C;return u.size<1&&(C=o.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_section_info"},Object(a.a)("You're removing all spaces. Access will default to invite only"))),o.a.createElement(s.a,{title:Object(a.a)("Select spaces"),className:"mx_ManageRestrictedJoinRuleDialog",onFinished:n,fixedWidth:!1},o.a.createElement("p",null,Object(a.a)("Decide which spaces can access this room. If a space is selected, its members can find and join <RoomName/>.",{},{RoomName:()=>o.a.createElement("b",null,e.name)})),o.a.createElement(m.a.Provider,{value:i},o.a.createElement(c.a,{className:"mx_textinput_icon mx_textinput_search",placeholder:Object(a.a)("Search spaces"),onSearch:_,autoComplete:!0,autoFocus:!0}),o.a.createElement(h.a,{className:"mx_ManageRestrictedJoinRuleDialog_content"},E.length>0?o.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_section"},o.a.createElement("h3",null,Object(a.a)("Spaces you know that contain this room")),E.map(e=>o.a.createElement(g,{key:e.roomId,room:e,checked:u.has(e.roomId),onChange:t=>{w(t,e)}}))):void 0,S.length>0?o.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_section"},o.a.createElement("h3",null,Object(a.a)("Other spaces or rooms you might not know")),o.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_section_info"},o.a.createElement("div",null,Object(a.a)("These are likely ones other room admins are a part of."))),S.map(e=>o.a.createElement(g,{key:e.roomId,room:e,checked:u.has(e.roomId),onChange:t=>{w(t,e)}}))):null,E.length+S.length<1?o.a.createElement("span",{className:"mx_ManageRestrictedJoinRuleDialog_noResults"},Object(a.a)("No results")):void 0),o.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_footer"},C,o.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_footer_buttons"},o.a.createElement(d.a,{kind:"primary_outline",onClick:()=>n()},Object(a.a)("Cancel")),o.a.createElement(d.a,{kind:"primary",onClick:()=>n(Array.from(u))},Object(a.a)("Confirm"))))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(82),m=n(85),g=n(235),f=n(84),_=n(98),b=n(81);let v=Object(b.a)("views.settings.tabs.room.NotificationsSettingsTab")((i=o=class extends l.a.Component{constructor(){super(),s()(this,"_soundUpload",Object(c.createRef)()),this.state={currentSound:"default",uploadedFile:null}}UNSAFE_componentWillMount(){const e=g.default.getSoundForRoom(this.props.roomId);e&&this.setState({currentSound:e.name||e.url})}async _triggerUploader(e){e.stopPropagation(),e.preventDefault(),this._soundUpload.current.click()}async _onSoundUploadChanged(e){if(!e.target.files||!e.target.files.length)return void this.setState({uploadedFile:null});const t=e.target.files[0];this.setState({uploadedFile:t})}async _onClickSaveSound(e){e.stopPropagation(),e.preventDefault();try{await this._saveSound()}catch(e){console.error("Unable to save notification sound for "+this.props.roomId),console.error(e)}}async _saveSound(){if(!this.state.uploadedFile)return;let e=this.state.uploadedFile.type;"video/ogg"===e&&(e="audio/ogg");const t=await p.a.get().uploadContent(this.state.uploadedFile,{type:e});await f.b.setValue("notificationSound",this.props.roomId,_.a.ROOM_ACCOUNT,{name:this.state.uploadedFile.name,type:e,size:this.state.uploadedFile.size,url:t}),this.setState({uploadedFile:null,currentSound:this.state.uploadedFile.name})}_clearSound(e){e.stopPropagation(),e.preventDefault(),f.b.setValue("notificationSound",this.props.roomId,_.a.ROOM_ACCOUNT,null),this.setState({currentSound:"default"})}render(){let e=null;return this.state.uploadedFile&&(e=l.a.createElement("div",null,l.a.createElement("span",null,Object(h.a)("Uploaded sound"),": ",l.a.createElement("code",null,this.state.uploadedFile.name)))),l.a.createElement("div",{className:"mx_SettingsTab"},l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(h.a)("Notifications")),l.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(h.a)("Sounds")),l.a.createElement("div",null,l.a.createElement("span",null,Object(h.a)("Notification sound"),": ",l.a.createElement("code",null,this.state.currentSound)),l.a.createElement("br",null),l.a.createElement(m.a,{className:"mx_NotificationSound_resetSound",disabled:"default"==this.state.currentSound,onClick:this._clearSound.bind(this),kind:"primary"},Object(h.a)("Reset"))),l.a.createElement("div",null,l.a.createElement("h3",null,Object(h.a)("Set a new custom sound")),l.a.createElement("form",{autoComplete:"off",noValidate:!0},l.a.createElement("input",{ref:this._soundUpload,className:"mx_NotificationSound_soundUpload",type:"file",onChange:this._onSoundUploadChanged.bind(this),accept:"audio/*"})),e,l.a.createElement(m.a,{className:"mx_NotificationSound_browse",onClick:this._triggerUploader.bind(this),kind:"primary"},Object(h.a)("Browse")),l.a.createElement(m.a,{className:"mx_NotificationSound_save",disabled:null==this.state.uploadedFile,onClick:this._onClickSaveSound.bind(this),kind:"primary"},Object(h.a)("Save")),l.a.createElement("br",null))))}},s()(o,"propTypes",{roomId:d.a.string.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r,o=n(78),i=n.n(o),a=n(80),s=n(82),c=n(775),l=n(81);const u=["uk.half-shot.bridge"];let d=Object(l.a)("views.settings.tabs.room.BridgeSettingsTab")(r=class e extends i.a.Component{renderBridgeCard(e,t){const n=e.getContent();return n&&n.channel&&n.protocol?i.a.createElement(c.a,{key:e.getId(),room:t,ev:e}):null}static getBridgeStateEvents(e){const t=s.a.get().getRoom(e).currentState;return u.map(e=>t.getStateEvents(e)).flat(1)}render(){const t=e.getBridgeStateEvents(this.props.roomId),n=s.a.get().getRoom(this.props.roomId);let r;return r=t.length>0?i.a.createElement("div",null,i.a.createElement("p",null,Object(a.a)("This room is bridging messages to the following platforms. <a>Learn more.</a>",{},{a:e=>i.a.createElement("a",{href:"https://matrix.org/bridges/",target:"_blank",rel:"noreferrer noopener"},e)})),i.a.createElement("ul",{className:"mx_RoomSettingsDialog_BridgeList"},t.map(e=>this.renderBridgeCard(e,n)))):i.a.createElement("p",null,Object(a.a)("This room isn’t bridging messages to any platforms. <a>Learn more.</a>",{},{a:e=>i.a.createElement("a",{href:"https://matrix.org/bridges/",target:"_blank",rel:"noreferrer noopener"},e)})),i.a.createElement("div",{className:"mx_SettingsTab"},i.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(a.a)("Bridges")),i.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},r))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(331),m=n(114),g=n(120),f=n(84),_=n(131),b=n(81),v=n(100);let y=Object(b.a)("views.settings.BridgeTile")((i=o=class extends l.a.PureComponent{render(){var e,t;const n=this.props.ev.getContent();if(null===(e=n.channel)||void 0===e||!e.id||null===(t=n.protocol)||void 0===t||!t.id)return console.warn(`Bridge info event ${this.props.ev.getId()} has missing content. Tile will not render`),null;n.bridgebot||(console.warn(`Bridge info event ${this.props.ev.getId()} does not provide a 'bridgebot' key whichis deprecated behaviour. Using sender for now.`),n.bridgebot=this.props.ev.getSender());const{channel:r,network:o,protocol:i}=n,a=i.displayname||i.id,s=r.displayname||r.id;let c=null;n.creator&&(c=l.a.createElement("li",null,Object(h.a)("This bridge was provisioned by <user />.",{},{user:()=>l.a.createElement(p.a,{type:p.a.TYPE_USER_MENTION,room:this.props.room,url:Object(m.h)(n.creator),shouldShowPillAvatar:f.b.getValue("Pill.shouldShowPillAvatar")})})));const u=l.a.createElement("li",null,Object(h.a)("This bridge is managed by <user />.",{},{user:()=>l.a.createElement(p.a,{type:p.a.TYPE_USER_MENTION,room:this.props.room,url:Object(m.h)(n.bridgebot),shouldShowPillAvatar:f.b.getValue("Pill.shouldShowPillAvatar")})}));let d;if(i.avatar_url){const e=Object(v.b)(i.avatar_url).getSquareThumbnailHttp(64);d=l.a.createElement(g.a,{className:"protocol-icon",width:48,height:48,resizeMethod:"crop",name:a,idName:a,url:e})}else d=l.a.createElement("div",{className:"noProtocolIcon"});let b=null;if(o){const e=o.displayname||o.id;let t=l.a.createElement("span",null,e);"string"==typeof o.external_url&&Object(_.e)(o.external_url)&&(t=l.a.createElement("a",{href:o.external_url,target:"_blank",rel:"noreferrer noopener"},e)),b=Object(h.a)("Workspace: <networkLink/>",{},{networkLink:()=>t})}let y=l.a.createElement("span",null,s);"string"==typeof r.external_url&&Object(_.e)(r.external_url)&&(y=l.a.createElement("a",{href:r.external_url,target:"_blank",rel:"noreferrer noopener"},s));const E=this.props.ev.getId();return l.a.createElement("li",{key:E},l.a.createElement("div",{className:"column-icon"},d),l.a.createElement("div",{className:"column-data"},l.a.createElement("h3",null,a),l.a.createElement("p",{className:"workspace-channel-details"},b,l.a.createElement("span",{className:"channel"},Object(h.a)("Channel: <channelLink/>",{},{channelLink:()=>y}))),l.a.createElement("ul",{className:"metadata"},c," ",u)))}},s()(o,"propTypes",{ev:d.a.object.isRequired,room:d.a.object.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return g}));var r=n(79),o=n.n(r),i=n(93),a=n(128),s=n(138),c=n(3),l=n(82),u=n(83);let d;!function(e){e.StateChanged="state_changed",e.SilencedChanged="silenced_changed"}(d||(d={}));const h=[a.e.Connecting,a.e.WaitLocalMedia,a.e.CreateOffer,a.e.CreateAnswer],p=[a.e.Connected,a.e.Ringing];let m;!function(e){e.Missed="missed"}(m||(m={}));class g extends c.EventEmitter{constructor(){super(),o()(this,"events",new Set),o()(this,"call",void 0),o()(this,"state",void 0),o()(this,"onSilencedCallsChanged",()=>{const e=s.d.sharedInstance().isCallSilenced(this.callId);this.emit(d.SilencedChanged,e)}),o()(this,"answerCall",()=>{var e;null===(e=this.call)||void 0===e||e.answer()}),o()(this,"rejectCall",()=>{var e;null===(e=this.call)||void 0===e||e.reject()}),o()(this,"callBack",()=>{var e;u.a.dispatch({action:"place_call",type:this.isVoice?a.f.Voice:a.f.Video,room_id:null===(e=[...this.events][0])||void 0===e?void 0:e.getRoomId()})}),o()(this,"toggleSilenced",()=>{s.d.sharedInstance().isCallSilenced(this.callId)?s.d.sharedInstance().unSilenceCall(this.callId):s.d.sharedInstance().silenceCall(this.callId)}),o()(this,"setState",()=>{var e,t;h.includes(null===(e=this.call)||void 0===e?void 0:e.state)?this.state=a.e.Connecting:p.includes(null===(t=this.call)||void 0===t?void 0:t.state)?this.state=this.call.state:this.callWasMissed?this.state=m.Missed:this.reject||this.hangup?this.state=a.e.Ended:this.invite&&this.call&&(this.state=a.e.Connecting),this.emit(d.StateChanged,this.state)}),o()(this,"setCall",()=>{this.call||(this.call=s.d.sharedInstance().getCallById(this.callId),this.setCallListeners(),this.setState())}),s.d.sharedInstance().addListener(s.a.CallsChanged,this.setCall),s.d.sharedInstance().addListener(s.a.SilencedCallsChanged,this.onSilencedCallsChanged)}get invite(){return[...this.events].find(e=>e.getType()===i.a.CallInvite)}get hangup(){return[...this.events].find(e=>e.getType()===i.a.CallHangup)}get reject(){return[...this.events].find(e=>e.getType()===i.a.CallReject)}get selectAnswer(){return[...this.events].find(e=>e.getType()===i.a.CallSelectAnswer)}get isVoice(){var e,t,n;const r=this.invite;if(r)return-1===(null===(e=r.getContent())||void 0===e||null===(t=e.offer)||void 0===t||null===(n=t.sdp)||void 0===n?void 0:n.indexOf("m=video"))}get hangupReason(){var e,t;return null===(e=this.hangup)||void 0===e||null===(t=e.getContent())||void 0===t?void 0:t.reason}get rejectParty(){var e;return null===(e=this.reject)||void 0===e?void 0:e.getSender()}get gotRejected(){return Boolean(this.reject)}get duration(){if(this.hangup&&this.selectAnswer)return new Date(this.hangup.getDate().getTime()-this.selectAnswer.getDate().getTime())}get callWasMissed(){return![...this.events].some(e=>{var t;return(null===(t=e.sender)||void 0===t?void 0:t.userId)===l.a.get().getUserId()})}get callId(){return[...this.events][0].getContent().call_id}setCallListeners(){this.call&&this.call.addListener(a.c.State,this.setState)}add(e){this.events.add(e),this.setCall()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(145),h=n(151),p=n(481),m=n(81),g=n(83),f=n(121),_=n(91),b=n(569),v=n(93),y=n(140);const E=()=>{g.a.dispatch({action:_.a.SetRightPanelPhase,phase:f.c.PinnedMessages,allowClose:!1})},S=[v.a.RoomServerAcl,v.a.RoomPinnedEvents];var w;!function(e){e.Joined="joined",e.Left="left",e.JoinedAndLeft="joined_and_left",e.LeftAndJoined="left_and_joined",e.InviteReject="invite_reject",e.InviteWithdrawal="invite_withdrawal",e.Invited="invited",e.Banned="banned",e.Unbanned="unbanned",e.Kicked="kicked",e.ChangedName="changed_name",e.ChangedAvatar="changed_avatar",e.NoChange="no_change",e.ServerAcl="server_acl",e.ChangedPins="pinned_messages"}(w||(w={}));let C=Object(m.a)("views.elements.MemberEventListSummary")((i=o=class e extends l.a.Component{shouldComponentUpdate(e){return e.events.length!==this.props.events.length||e.events.length<this.props.threshold}generateSummary(t,n){const r=n.map(n=>{const r=t[n],o=this.renderNameList(r),i=n.split(","),a=e.getCanonicalTransitions(i),s=e.coalesceRepeatedTransitions(a).map(t=>e.getDescriptionForTransition(t.transitionType,r.length,t.repeats)),c=Object(d.b)(s);return Object(u.a)("%(nameList)s %(transitionList)s",{nameList:o,transitionList:c})});return r?Object(b.a)(r,", "):null}renderNameList(e){return Object(d.b)(e,this.props.summaryLength)}static getCanonicalTransitions(e){const t={[w.Joined]:{after:w.Left,newTransition:w.JoinedAndLeft},[w.Left]:{after:w.Joined,newTransition:w.LeftAndJoined}},n=[];for(let r=0;r<e.length;r++){const o=e[r],i=e[r+1];let a=o;r<e.length-1&&t[o]&&t[o].after===i&&(a=t[o].newTransition,r++),n.push(a)}return n}static coalesceRepeatedTransitions(e){const t=[];for(let n=0;n<e.length;n++)t.length>0&&t[t.length-1].transitionType===e[n]?t[t.length-1].repeats+=1:t.push({transitionType:e[n],repeats:1});return t}static getDescriptionForTransition(e,t,n){let r=null;switch(e){case"joined":r=t>1?Object(u.a)("%(severalUsers)sjoined %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)sjoined %(count)s times",{oneUser:"",count:n});break;case"left":r=t>1?Object(u.a)("%(severalUsers)sleft %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)sleft %(count)s times",{oneUser:"",count:n});break;case"joined_and_left":r=t>1?Object(u.a)("%(severalUsers)sjoined and left %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)sjoined and left %(count)s times",{oneUser:"",count:n});break;case"left_and_joined":r=t>1?Object(u.a)("%(severalUsers)sleft and rejoined %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)sleft and rejoined %(count)s times",{oneUser:"",count:n});break;case"invite_reject":r=t>1?Object(u.a)("%(severalUsers)srejected their invitations %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)srejected their invitation %(count)s times",{oneUser:"",count:n});break;case"invite_withdrawal":r=t>1?Object(u.a)("%(severalUsers)shad their invitations withdrawn %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)shad their invitation withdrawn %(count)s times",{oneUser:"",count:n});break;case"invited":r=t>1?Object(u.a)("were invited %(count)s times",{count:n}):Object(u.a)("was invited %(count)s times",{count:n});break;case"banned":r=t>1?Object(u.a)("were banned %(count)s times",{count:n}):Object(u.a)("was banned %(count)s times",{count:n});break;case"unbanned":r=t>1?Object(u.a)("were unbanned %(count)s times",{count:n}):Object(u.a)("was unbanned %(count)s times",{count:n});break;case"kicked":r=t>1?Object(u.a)("were kicked %(count)s times",{count:n}):Object(u.a)("was kicked %(count)s times",{count:n});break;case"changed_name":r=t>1?Object(u.a)("%(severalUsers)schanged their name %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)schanged their name %(count)s times",{oneUser:"",count:n});break;case"changed_avatar":r=t>1?Object(u.a)("%(severalUsers)schanged their avatar %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)schanged their avatar %(count)s times",{oneUser:"",count:n});break;case"no_change":r=t>1?Object(u.a)("%(severalUsers)smade no changes %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)smade no changes %(count)s times",{oneUser:"",count:n});break;case"server_acl":r=t>1?Object(u.a)("%(severalUsers)schanged the server ACLs %(count)s times",{severalUsers:"",count:n}):Object(u.a)("%(oneUser)schanged the server ACLs %(count)s times",{oneUser:"",count:n});break;case"pinned_messages":r=t>1?Object(u.a)("%(severalUsers)schanged the <a>pinned messages</a> for the room %(count)s times.",{severalUsers:"",count:n},{a:e=>l.a.createElement("a",{onClick:E}," ",e," ")}):Object(u.a)("%(oneUser)schanged the <a>pinned messages</a> for the room %(count)s times.",{oneUser:"",count:n},{a:e=>l.a.createElement("a",{onClick:E}," ",e," ")})}return r}static getTransitionSequence(t){return t.map(e.getTransition)}static getTransition(e){const t=e.mxEvent.getType();if(t===v.a.RoomThirdPartyInvite)return Object(h.c)(e.mxEvent)?w.Invited:w.InviteWithdrawal;if(t===v.a.RoomServerAcl)return w.ServerAcl;if(t===v.a.RoomPinnedEvents)return w.ChangedPins;switch(e.mxEvent.getContent().membership){case"invite":return w.Invited;case"ban":return w.Banned;case"join":return"join"===e.mxEvent.getPrevContent().membership?e.mxEvent.getContent().displayname!==e.mxEvent.getPrevContent().displayname?w.ChangedName:e.mxEvent.getContent().avatar_url!==e.mxEvent.getPrevContent().avatar_url?w.ChangedAvatar:w.NoChange:w.Joined;case"leave":if(e.mxEvent.getSender()===e.mxEvent.getStateKey())switch(e.mxEvent.getPrevContent().membership){case"invite":return w.InviteReject;default:return w.Left}switch(e.mxEvent.getPrevContent().membership){case"invite":return w.InviteWithdrawal;case"ban":return w.Unbanned;default:return w.Kicked}default:return null}}getAggregate(t){const n={},r={};return Object.keys(t).forEach(o=>{const i=t[o][0],a=i.displayName,s=e.getTransitionSequence(t[o]).join(",");n[s]||(n[s]=[],r[s]=-1),n[s].push(a),(-1===r[s]||i.index<r[s])&&(r[s]=i.index)}),{names:n,indices:r}}render(){const e=this.props.events,t=new Map,n={};e.forEach((e,r)=>{const o=e.getType(),i=o===v.a.RoomServerAcl?e.getSender():e.getStateKey();n[i]||(n[i]=[]),S.includes(o)?t.set(i,e.sender):e.target&&t.set(i,e.target);let a=i;o===v.a.RoomThirdPartyInvite?a=e.getContent().display_name:S.includes(o)?a=e.sender.name:e.target&&(a=e.target.name),n[i].push({mxEvent:e,displayName:a,index:r})});const r=this.getAggregate(n),o=Object.keys(r.names).sort((e,t)=>r.indices[e]-r.indices[t]);return l.a.createElement(p.a,{events:this.props.events,threshold:this.props.threshold,onToggle:this.props.onToggle,startExpanded:this.props.startExpanded,children:this.props.children,summaryMembers:[...t.values()],layout:this.props.layout,summaryText:this.generateSummary(r.names,o)})}},s()(o,"defaultProps",{summaryLength:1,threshold:3,avatarsMaxLength:5,layout:y.a.Group}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(86),l=n.n(c),u=n(80),d=n(87),h=n(90),p=n(81),m=n(223);let g=Object(p.a)("views.messages.TileErrorBoundary")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onBugReport",()=>{d.a.createTrackedDialog("Bug Report Dialog","",m.a,{label:"react-soft-crash-tile"})}),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}render(){if(this.state.error){const{mxEvent:e}=this.props,t={mx_EventTile:!0,mx_EventTile_info:!0,mx_EventTile_content:!0,mx_EventTile_tileError:!0};let n;return h.a.get().bug_report_endpoint_url&&(n=s.a.createElement("a",{onClick:this.onBugReport,href:"#"},Object(u.a)("Submit logs"))),s.a.createElement("div",{className:l()(t)},s.a.createElement("div",{className:"mx_EventTile_line"},s.a.createElement("span",null,Object(u.a)("Can't load this message"),e&&` (${e.getType()})`,n)))}return this.props.children}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(89),p=n(82),m=n(83),g=n(86),f=n.n(g),_=n(80),b=n(90),v=n(195),y=n(176),E=n(115),S=n(81),w=n(780);const C=Object.freeze({NotLoggedIn:"NotLoggedIn",Joining:"Joining",Loading:"Loading",Rejecting:"Rejecting",Kicked:"Kicked",Banned:"Banned",OtherThreePIDError:"OtherThreePIDError",InvitedEmailNotFoundInAccount:"InvitedEmailNotFoundInAccount",InvitedEmailNoIdentityServer:"InvitedEmailNoIdentityServer",InvitedEmailMismatch:"InvitedEmailMismatch",Invite:"Invite",ViewingRoom:"ViewingRoom",RoomNotFound:"RoomNotFound",OtherError:"OtherError"});let T=Object(S.a)("views.rooms.RoomPreviewBar")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{busy:!1}),s()(this,"_onCommunityUpdate",e=>{this.props.room&&this.props.room.roomId!==e||this.forceUpdate()}),s()(this,"onLoginClick",()=>{m.a.dispatch({action:"start_login",screenAfterLogin:this._makeScreenAfterLogin()})}),s()(this,"onRegisterClick",()=>{m.a.dispatch({action:"start_registration",screenAfterLogin:this._makeScreenAfterLogin()})})}componentDidMount(){this._checkInvitedEmail(),y.a.instance.on(E.b,this._onCommunityUpdate)}componentDidUpdate(e,t){this.props.invitedEmail===e.invitedEmail&&this.props.inviterName===e.inviterName||this._checkInvitedEmail()}componentWillUnmount(){y.a.instance.off(E.b,this._onCommunityUpdate)}async _checkInvitedEmail(){if(this.props.inviterName&&this.props.invitedEmail){this.setState({busy:!0});try{const e=await p.a.get().getThreePids();if(this.setState({accountEmails:e.threepids.filter(e=>"email"===e.medium).map(e=>e.address)}),!p.a.get().getIdentityServerUrl())return void this.setState({busy:!1});const t=new v.a,n=await t.getAccessToken(),r=await p.a.get().lookupThreePid("email",this.props.invitedEmail,void 0,n);this.setState({invitedEmailMxid:r.mxid})}catch(e){this.setState({threePidFetchError:e})}this.setState({busy:!1})}}_getMessageCase(){if(p.a.get().isGuest())return C.NotLoggedIn;const e=this._getMyMember();if(e){if(e.isKicked())return C.Kicked;if("ban"===e.membership)return C.Banned}if(this.props.joining)return C.Joining;if(this.props.rejecting)return C.Rejecting;if(this.props.loading||this.state.busy)return C.Loading;if(this.props.inviterName){if(this.props.invitedEmail){if(this.state.threePidFetchError)return C.OtherThreePIDError;if(this.state.accountEmails&&!this.state.accountEmails.includes(this.props.invitedEmail))return C.InvitedEmailNotFoundInAccount;if(!p.a.get().getIdentityServerUrl())return C.InvitedEmailNoIdentityServer;if(this.state.invitedEmailMxid!=p.a.get().getUserId())return C.InvitedEmailMismatch}return C.Invite}return this.props.error?"M_NOT_FOUND"==this.props.error.errcode?C.RoomNotFound:C.OtherError:C.ViewingRoom}_getKickOrBanInfo(){const e=this._getMyMember();if(!e)return{};const t=this.props.room.currentState.getMember(e.events.member.getSender());return{memberName:t?t.name:e.events.member.getSender(),reason:e.events.member.getContent().reason}}_joinRule(){const e=this.props.room;if(e){const t=e.currentState.getStateEvents("m.room.join_rules","");if(t)return t.getContent().join_rule}}_communityProfile(){return this.props.room?y.a.instance.getInviteProfile(this.props.room.roomId):{displayName:null,avatarMxc:null}}_roomName(e=!1){let t=this.props.room?this.props.room.name:this.props.roomAlias;const n=this._communityProfile();return n.displayName&&(t=n.displayName),t||(e?Object(_.a)("This room"):Object(_.a)("this room"))}_getMyMember(){return this.props.room&&this.props.room.getMember(p.a.get().getUserId())}_getInviteMember(){const{room:e}=this.props;if(!e)return;const t=p.a.get().getUserId(),n=e.currentState.getMember(t);if(!n)return;const r=n.events.member.getSender();return e.currentState.getMember(r)}_isDMInvite(){const e=this._getMyMember();if(!e)return!1;const t=e.events.member.getContent();return"invite"===t.membership&&t.is_direct}_makeScreenAfterLogin(){return{screen:"room",params:{email:this.props.invitedEmail,signurl:this.props.signUrl,room_name:this.props.oobData?this.props.oobData.room_name:null,room_avatar_url:this.props.oobData?this.props.oobData.avatarUrl:null,inviter_name:this.props.oobData?this.props.oobData.inviterName:null}}}render(){const e=b.a.get().brand,t=h.getComponent("elements.Spinner"),n=h.getComponent("elements.AccessibleButton");let r,o,i,a,s,c,u,d,m=!1;const g=[],v=this._getMessageCase();switch(v){case C.Joining:r=Object(_.a)("Joining room …"),m=!0;break;case C.Loading:r=Object(_.a)("Loading …"),m=!0;break;case C.Rejecting:r=Object(_.a)("Rejecting invite …"),m=!0;break;case C.NotLoggedIn:r=Object(_.a)("Join the conversation with an account"),s=Object(_.a)("Sign Up"),a=this.onRegisterClick,u=Object(_.a)("Sign In"),c=this.onLoginClick,this.props.previewLoading&&(d=l.a.createElement("div",null,l.a.createElement(t,{w:20,h:20}),Object(_.a)("Loading room preview")));break;case C.Kicked:{const{memberName:e,reason:t}=this._getKickOrBanInfo();r=Object(_.a)("You were kicked from %(roomName)s by %(memberName)s",{memberName:e,roomName:this._roomName()}),o=t?Object(_.a)("Reason: %(reason)s",{reason:t}):null,"invite"===this._joinRule()?(s=Object(_.a)("Forget this room"),a=this.props.onForgetClick):(s=Object(_.a)("Re-join"),a=this.props.onJoinClick,u=Object(_.a)("Forget this room"),c=this.props.onForgetClick);break}case C.Banned:{const{memberName:e,reason:t}=this._getKickOrBanInfo();r=Object(_.a)("You were banned from %(roomName)s by %(memberName)s",{memberName:e,roomName:this._roomName()}),o=t?Object(_.a)("Reason: %(reason)s",{reason:t}):null,s=Object(_.a)("Forget this room"),a=this.props.onForgetClick;break}case C.OtherThreePIDError:{r=Object(_.a)("Something went wrong with your invite to %(roomName)s",{roomName:this._roomName()});const e=this._joinRule(),t=Object(_.a)("An error (%(errcode)s) was returned while trying to validate your invite. You could try to pass this information on to a room admin.",{errcode:this.state.threePidFetchError.errcode||Object(_.a)("unknown error code")});switch(e){case"invite":o=[Object(_.a)("You can only join it with a working invite."),t],s=Object(_.a)("Try to join anyway"),a=this.props.onJoinClick;break;case"public":o=Object(_.a)("You can still join it because this is a public room."),s=Object(_.a)("Join the discussion"),a=this.props.onJoinClick;break;default:o=t,s=Object(_.a)("Try to join anyway"),a=this.props.onJoinClick}break}case C.InvitedEmailNotFoundInAccount:r=Object(_.a)("This invite to %(roomName)s was sent to %(email)s which is not associated with your account",{roomName:this._roomName(),email:this.props.invitedEmail}),o=Object(_.a)("Link this email with your account in Settings to receive invites directly in %(brand)s.",{brand:e}),s=Object(_.a)("Join the discussion"),a=this.props.onJoinClick;break;case C.InvitedEmailNoIdentityServer:r=Object(_.a)("This invite to %(roomName)s was sent to %(email)s",{roomName:this._roomName(),email:this.props.invitedEmail}),o=Object(_.a)("Use an identity server in Settings to receive invites directly in %(brand)s.",{brand:e}),s=Object(_.a)("Join the discussion"),a=this.props.onJoinClick;break;case C.InvitedEmailMismatch:r=Object(_.a)("This invite to %(roomName)s was sent to %(email)s",{roomName:this._roomName(),email:this.props.invitedEmail}),o=Object(_.a)("Share this email in Settings to receive invites directly in %(brand)s.",{brand:e}),s=Object(_.a)("Join the discussion"),a=this.props.onJoinClick;break;case C.Invite:{const e=h.getComponent("views.avatars.RoomAvatar"),t=Object.assign({},this.props.oobData,{avatarUrl:this._communityProfile().avatarMxc}),d=l.a.createElement(e,{room:this.props.room,oobData:t}),m=this._getInviteMember();let f;f=m?l.a.createElement("span",null,l.a.createElement("span",{className:"mx_RoomPreviewBar_inviter"},m.rawDisplayName)," (",m.userId,")"):l.a.createElement("span",{className:"mx_RoomPreviewBar_inviter"},this.props.inviterName);this._isDMInvite()?(r=Object(_.a)("Do you want to chat with %(user)s?",{user:m.name}),o=[d,Object(_.a)("<userName/> wants to chat",{},{userName:()=>f})],s=Object(_.a)("Start chatting")):(r=Object(_.a)("Do you want to join %(roomName)s?",{roomName:this._roomName()}),o=[d,Object(_.a)("<userName/> invited you",{},{userName:()=>f})],s=Object(_.a)("Accept"));const b=p.a.get().getUserId(),v=this.props.room.currentState.getMember(b).events.member.event.content.reason;v&&(i=l.a.createElement(w.a,{reason:v})),a=this.props.onJoinClick,u=Object(_.a)("Reject"),c=this.props.onRejectClick,this.props.onRejectAndIgnoreClick&&g.push(l.a.createElement(n,{kind:"secondary",onClick:this.props.onRejectAndIgnoreClick,key:"ignore"},Object(_.a)("Reject & Ignore user")));break}case C.ViewingRoom:r=this.props.canPreview?Object(_.a)("You're previewing %(roomName)s. Want to join it?",{roomName:this._roomName()}):Object(_.a)("%(roomName)s can't be previewed. Do you want to join it?",{roomName:this._roomName(!0)}),s=Object(_.a)("Join the discussion"),a=this.props.onJoinClick;break;case C.RoomNotFound:r=Object(_.a)("%(roomName)s does not exist.",{roomName:this._roomName(!0)}),o=Object(_.a)("This room doesn't exist. Are you sure you're at the right place?");break;case C.OtherError:r=Object(_.a)("%(roomName)s is not accessible at this time.",{roomName:this._roomName(!0)}),o=[Object(_.a)("Try again later, or ask a room admin to check if you have access."),Object(_.a)("%(errcode)s was returned while trying to access the room. If you think you're seeing this message in error, please <issueLink>submit a bug report</issueLink>.",{errcode:this.props.error.errcode},{issueLink:e=>l.a.createElement("a",{href:"https://github.com/vector-im/element-web/issues/new/choose",target:"_blank",rel:"noreferrer noopener"},e)})]}let y,E,S,T;o&&(Array.isArray(o)||(o=[o]),y=o.map((e,t)=>l.a.createElement("p",{key:"subTitle"+t},e))),E=m?l.a.createElement("h3",{className:"mx_RoomPreviewBar_spinnerTitle"},l.a.createElement(t,null),r):l.a.createElement("h3",null,r),a&&(S=l.a.createElement(n,{kind:"primary",onClick:a},s)),c&&(T=l.a.createElement(n,{kind:"secondary",onClick:c},u));const x=f()("mx_RoomPreviewBar","dark-panel","mx_RoomPreviewBar_"+v,{mx_RoomPreviewBar_panel:this.props.canPreview,mx_RoomPreviewBar_dialog:!this.props.canPreview});return l.a.createElement("div",{className:x},l.a.createElement("div",{className:"mx_RoomPreviewBar_message"},E,y),i,l.a.createElement("div",{className:"mx_RoomPreviewBar_actions"},T,g,S),l.a.createElement("div",{className:"mx_RoomPreviewBar_footer"},d))}},s()(o,"propTypes",{onJoinClick:d.a.func,onRejectClick:d.a.func,onRejectAndIgnoreClick:d.a.func,onForgetClick:d.a.func,inviterName:d.a.string,invitedEmail:d.a.string,oobData:d.a.object,signUrl:d.a.string,error:d.a.object,canPreview:d.a.bool,previewLoading:d.a.bool,room:d.a.object,spinner:d.a.bool,spinnerState:d.a.oneOf(["joining"]),loading:d.a.bool,joining:d.a.bool,rejecting:d.a.bool,roomAlias:d.a.string}),s()(o,"defaultProps",{onJoinClick(){}}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o=n(79),i=n.n(o),a=n(86),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(81);let h=Object(d.a)("views.elements.InviteReason")(r=class extends l.a.PureComponent{constructor(e){super(e),i()(this,"onViewClick",()=>{this.setState({hidden:!1})}),this.state={hidden:!0}}render(){const e=s()({mx_InviteReason:!0,mx_InviteReason_hidden:this.state.hidden});return l.a.createElement("div",{className:e},l.a.createElement("div",{className:"mx_InviteReason_reason"},this.props.reason),l.a.createElement("div",{className:"mx_InviteReason_view",onClick:this.onViewClick},Object(u.a)("View message")))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return f}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(85),l=n(86),u=n.n(l),d=n(80),h=n(104),p=n(382),m=n(81);let g;!function(e){e.Room="Room",e.All="All"}(g||(g={}));let f=Object(m.a)("views.rooms.SearchBar")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"searchTerm",Object(a.createRef)()),i()(this,"onThisRoomClick",()=>{this.setState({scope:g.Room},()=>this.searchIfQuery())}),i()(this,"onAllRoomsClick",()=>{this.setState({scope:g.All},()=>this.searchIfQuery())}),i()(this,"onSearchChange",e=>{switch(e.key){case h.a.ENTER:this.onSearch();break;case h.a.ESCAPE:this.props.onCancelClick()}}),i()(this,"onSearch",()=>{this.props.onSearch(this.searchTerm.current.value,this.state.scope)}),this.state={scope:g.Room}}searchIfQuery(){this.searchTerm.current.value&&this.onSearch()}render(){const e=u()("mx_SearchBar_searchButton",{mx_SearchBar_searching:this.props.searchInProgress}),t=u()("mx_SearchBar_button",{mx_SearchBar_unselected:this.state.scope!==g.Room}),n=u()("mx_SearchBar_button",{mx_SearchBar_unselected:this.state.scope!==g.All});return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:"mx_SearchBar"},s.a.createElement("div",{className:"mx_SearchBar_buttons",role:"radiogroup"},s.a.createElement(c.a,{className:t,onClick:this.onThisRoomClick,"aria-checked":this.state.scope===g.Room,role:"radio"},Object(d.a)("This Room")),s.a.createElement(c.a,{className:n,onClick:this.onAllRoomsClick,"aria-checked":this.state.scope===g.All,role:"radio"},Object(d.a)("All Rooms"))),s.a.createElement("div",{className:"mx_SearchBar_input mx_textinput"},s.a.createElement("input",{ref:this.searchTerm,type:"text",autoFocus:!0,placeholder:Object(d.a)("Search…"),onKeyDown:this.onSearchChange}),s.a.createElement(c.a,{className:e,onClick:this.onSearch})),s.a.createElement(c.a,{className:"mx_SearchBar_cancel",onClick:this.props.onCancelClick})),s.a.createElement(p.b,{isRoomEncrypted:this.props.isRoomEncrypted,kind:p.a.Search}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(89),p=n(87),m=n(80),g=n(82),f=n(81);let _=Object(f.a)("views.rooms.RoomUpgradeWarningBar")((i=o=class extends l.a.PureComponent{constructor(e){super(e),s()(this,"_onStateEvents",(e,t)=>{if(!this.props.room||e.getRoomId()!==this.props.room.roomId)return;if("m.room.tombstone"!==e.getType())return;const n=this.props.room.currentState.getStateEvents("m.room.tombstone","");this.setState({upgraded:n&&n.getContent().replacement_room})}),s()(this,"onUpgradeClick",()=>{const e=h.getComponent("dialogs.RoomUpgradeDialog");p.a.createTrackedDialog("Upgrade Room Version","",e,{room:this.props.room})}),this.state={}}componentDidMount(){const e=this.props.room.currentState.getStateEvents("m.room.tombstone","");this.setState({upgraded:e&&e.getContent().replacement_room}),g.a.get().on("RoomState.events",this._onStateEvents)}componentWillUnmount(){const e=g.a.get();e&&e.removeListener("RoomState.events",this._onStateEvents)}render(){const e=h.getComponent("elements.AccessibleButton");let t=l.a.createElement("div",null,l.a.createElement("div",{className:"mx_RoomUpgradeWarningBar_body"},l.a.createElement("p",null,Object(m.a)("Upgrading this room will shut down the current instance of the room and create an upgraded room with the same name.")),l.a.createElement("p",null,Object(m.a)("<b>Warning</b>: Upgrading a room will <i>not automatically migrate room members to the new version of the room.</i> We'll post a link to the new room in the old version of the room - room members will have to click this link to join the new room.",{},{b:e=>l.a.createElement("b",null,e),i:e=>l.a.createElement("i",null,e)}))),l.a.createElement("p",{className:"mx_RoomUpgradeWarningBar_upgradelink"},l.a.createElement(e,{onClick:this.onUpgradeClick},Object(m.a)("Upgrade this room to the recommended room version"))));return this.state.upgraded&&(t=l.a.createElement("div",{className:"mx_RoomUpgradeWarningBar_body"},l.a.createElement("p",null,Object(m.a)("This room has already been upgraded.")))),l.a.createElement("div",{className:"mx_RoomUpgradeWarningBar"},l.a.createElement("div",{className:"mx_RoomUpgradeWarningBar_wrapped"},l.a.createElement("div",{className:"mx_RoomUpgradeWarningBar_header"},Object(m.a)("This room is running room version <roomVersion />, which this homeserver has marked as <i>unstable</i>.",{},{roomVersion:()=>l.a.createElement("code",null,this.props.room.getVersion()),i:e=>l.a.createElement("i",null,e)})),t,l.a.createElement("div",{className:"mx_RoomUpgradeWarningBar_small"},Object(m.a)("Only room administrators will see this warning"))))}},s()(o,"propTypes",{room:d.a.object.isRequired,recommendation:d.a.object.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(2),p=n(82),m=n(889),g=n(84),f=n(117),_=n(113),b=n(784),v=n(129),y=n(81),E=n(107);let S=Object(y.a)("views.rooms.AuxPanel")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"rateLimitedUpdate",Object(E.throttle)(()=>{this.setState({counters:this.computeCounters()})},500,{leading:!0,trailing:!0})),this.state={counters:this.computeCounters()}}componentDidMount(){const e=p.a.get();g.b.getValue("feature_state_counters")&&e.on("RoomState.events",this.rateLimitedUpdate)}componentWillUnmount(){const e=p.a.get();e&&g.b.getValue("feature_state_counters")&&e.removeListener("RoomState.events",this.rateLimitedUpdate)}shouldComponentUpdate(e,t){return Object(v.d)(this.props,e)||Object(v.d)(this.state,t)}componentDidUpdate(e,t){this.props.onResize&&this.props.onResize()}computeCounters(){const e=[];if(this.props.room&&g.b.getValue("feature_state_counters")){const t=this.props.room.currentState.getStateEvents("re.jki.counter");t.sort((e,t)=>Object(h.x)(e.getStateKey(),t.getStateKey()));for(const n of t){const t=n.getContent().title,r=n.getContent().value,o=n.getContent().link,i=n.getContent().severity||"normal",a=n.getStateKey();t&&void 0!==r&&e.push({title:t,value:r,link:o,severity:i,stateKey:a})}}return e}render(){const e=l.a.createElement(b.a,{roomId:this.props.room.roomId,maxVideoHeight:this.props.maxHeight,resizeNotifier:this.props.resizeNotifier});let t;g.b.getValue(_.a.Widgets)&&(t=l.a.createElement(m.a,{room:this.props.room,userId:this.props.userId,maxHeight:this.props.maxHeight,showApps:this.props.showApps,resizeNotifier:this.props.resizeNotifier}));let n=null;if(this.state.counters&&g.b.getValue("feature_state_counters")){const e=[];this.state.counters.forEach((t,n)=>{const r=t.title,o=t.value,i=t.link,a=t.severity,s=t.stateKey;let c=l.a.createElement("span",null,r,": ",o);i&&(c=l.a.createElement("a",{href:i,target:"_blank",rel:"noreferrer noopener"},c)),c=l.a.createElement("span",{className:"m_RoomView_auxPanel_stateViews_span","data-severity":a,key:"x-"+s},c),e.push(c),e.push(l.a.createElement("span",{className:"m_RoomView_auxPanel_stateViews_delim",key:"delim"+n}," ─ "))}),e.length>0&&(e.pop(),n=l.a.createElement("div",{className:"m_RoomView_auxPanel_stateViews"},e))}const r=d()({mx_RoomView_auxPanel:!0,mx_RoomView_auxPanel_fullHeight:this.props.fullHeight}),o={};return this.props.fullHeight||(o.maxHeight=this.props.maxHeight),l.a.createElement(f.a,{className:r,style:o},n,t,e,this.props.children)}},s()(o,"defaultProps",{showApps:!0}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o=n(79),i=n.n(o),a=n(128),s=n(78),c=n.n(s),l=n(138),u=n(471),d=n(83),h=n(283),p=n(81);let m=Object(p.a)("views.voip.CallViewForRoom")(r=class extends c.a.Component{constructor(e){super(e),i()(this,"dispatcherRef",void 0),i()(this,"onAction",e=>{switch(e.action){case"call_state":this.updateCall()}}),i()(this,"updateCall",()=>{const e=this.getCall();e!==this.state.call&&this.setState({call:e})}),i()(this,"onResizeStart",()=>{this.props.resizeNotifier.startResizing()}),i()(this,"onResize",()=>{this.props.resizeNotifier.notifyTimelineHeightChanged()}),i()(this,"onResizeStop",()=>{this.props.resizeNotifier.stopResizing()}),this.state={call:this.getCall()}}componentDidMount(){this.dispatcherRef=d.a.register(this.onAction),l.d.sharedInstance().addListener(l.a.CallChangeRoom,this.updateCall)}componentWillUnmount(){d.a.unregister(this.dispatcherRef),l.d.sharedInstance().removeListener(l.a.CallChangeRoom,this.updateCall)}getCall(){const e=l.d.sharedInstance().getCallForRoom(this.props.roomId);return e&&[a.e.Ended,a.e.Ringing].includes(e.state)?null:e}render(){if(!this.state.call)return null;const e=this.props.maxVideoHeight-8;return c.a.createElement("div",{className:"mx_CallViewForRoom"},c.a.createElement(h.Resizable,{minHeight:380,maxHeight:e,enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,className:"mx_CallViewForRoom_ResizeWrapper",handleClasses:{bottom:"mx_CallViewForRoom_ResizeHandle"}},c.a.createElement(u.a,{call:this.state.call,pipMode:!1})))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(80),p=n(82),m=n(84),g=n(786),f=n(200),_=n(255),b=n(106),v=n(333),y=n(184),E=n(138),S=n(81),w=n(87),C=n(166),T=n(107);let x=Object(S.a)("views.rooms.RoomHeader")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"onRoomStateEvents",(e,t)=>{this.props.room&&e.getRoomId()===this.props.room.roomId&&this.rateLimitedUpdate()}),s()(this,"rateLimitedUpdate",Object(T.throttle)(()=>{this.forceUpdate()},500,{leading:!0,trailing:!0}))}componentDidMount(){p.a.get().on("RoomState.events",this.onRoomStateEvents)}componentWillUnmount(){const e=p.a.get();e&&e.removeListener("RoomState.events",this.onRoomStateEvents)}displayInfoDialogAboutScreensharing(){w.a.createDialog(C.a,{title:Object(h.a)("Screen sharing is here!"),description:Object(h.a)('You can now share your screen by pressing the "screen share" button during a call. You can even do this in audio calls if both sides support it!')})}render(){let e=null;this.props.searchInfo&&void 0!==this.props.searchInfo.searchCount&&null!==this.props.searchInfo.searchCount&&(e=l.a.createElement("div",{className:"mx_RoomHeader_searchStatus"}," ",Object(h.a)("(~%(count)s results)",{count:this.props.searchInfo.searchCount})));let t=!1;const n=this.props.room?this.props.room.getJoinedMembers():void 0;if(n&&1===n.length&&n[0].userId===p.a.get().credentials.userId){const e=this.props.room.currentState.getStateEvents("m.room.name","");e&&e.getContent().name||(t=!0)}let r=Object(h.a)("Join Room");this.props.oobData&&this.props.oobData.name&&(r=this.props.oobData.name);const o=d()("mx_RoomHeader_nametext",{mx_RoomHeader_settingsHint:t}),i=l.a.createElement("div",{className:"mx_RoomHeader_name",onClick:this.props.onSettingsClick},l.a.createElement(y.a,{room:this.props.room},e=>{const t=e||r;return l.a.createElement("div",{dir:"auto",className:o,title:t},t)}),e),a=l.a.createElement(v.a,{room:this.props.room},(e,t)=>l.a.createElement("div",{className:"mx_RoomHeader_topic",ref:t,title:e,dir:"auto"},e));let s,c,u,S,w,C;this.props.room&&(s=l.a.createElement(_.a,{room:this.props.room,avatarSize:32,oobData:this.props.oobData,viewAvatarOnClick:!0})),this.props.onForgetClick&&(c=l.a.createElement(b.a,{className:"mx_RoomHeader_button mx_RoomHeader_forgetButton",onClick:this.props.onForgetClick,title:Object(h.a)("Forget room")})),this.props.onAppsClick&&(u=l.a.createElement(b.a,{className:d()("mx_RoomHeader_button mx_RoomHeader_appsButton",{mx_RoomHeader_appsButton_highlight:this.props.appsShown}),onClick:this.props.onAppsClick,title:this.props.appsShown?Object(h.a)("Hide Widgets"):Object(h.a)("Show Widgets")})),this.props.onSearchClick&&this.props.inRoom&&(S=l.a.createElement(b.a,{className:"mx_RoomHeader_button mx_RoomHeader_searchButton",onClick:this.props.onSearchClick,title:Object(h.a)("Search")})),this.props.inRoom&&m.b.getValue("showCallButtonsInComposer")&&(w=l.a.createElement(b.a,{className:"mx_RoomHeader_button mx_RoomHeader_voiceCallButton",onClick:()=>this.props.onCallPlaced(E.b.Voice),title:Object(h.a)("Voice call")}),C=l.a.createElement(b.a,{className:"mx_RoomHeader_button mx_RoomHeader_videoCallButton",onClick:e=>e.shiftKey?this.displayInfoDialogAboutScreensharing():this.props.onCallPlaced(E.b.Video),title:Object(h.a)("Video call")}));const T=l.a.createElement("div",{className:"mx_RoomHeader_buttons"},C,w,c,u,S),x=this.props.e2eStatus?l.a.createElement(f.b,{status:this.props.e2eStatus}):void 0;return l.a.createElement("div",{className:"mx_RoomHeader light-panel"},l.a.createElement("div",{className:"mx_RoomHeader_wrapper","aria-owns":"mx_RightPanel"},l.a.createElement("div",{className:"mx_RoomHeader_avatar"},s),l.a.createElement("div",{className:"mx_RoomHeader_e2eIcon"},x),i,a,T,l.a.createElement(g.a,{room:this.props.room})))}},s()(o,"defaultProps",{editing:!1,inRoom:!1}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(483),u=n(484),d=n(121),h=n(91),p=n(251),m=n(81),g=n(326),f=n(364);const _=[d.c.RoomSummary,d.c.Widget,d.c.FilePanel,d.c.RoomMemberList,d.c.RoomMemberInfo,d.c.EncryptionPanel,d.c.Room3pidMemberInfo],b=({room:e,isHighlighted:t,onClick:n})=>{const r=Object(g.b)("feature_pinning"),o=Object(f.c)(r&&e),i=Object(f.d)(r&&e);if(!r)return null;let a;return o.some(e=>!i.has(e))&&(a=s.a.createElement("div",{className:"mx_RightPanel_pinnedMessagesButton_unreadIndicator"})),s.a.createElement(l.a,{name:"pinnedMessagesButton",title:Object(c.a)("Pinned messages"),isHighlighted:t,onClick:n,analytics:["Right Panel","Pinned Messages Button","click"]},a)};let v=Object(m.a)("views.right_panel.RoomHeaderButtons")(r=class extends u.b{constructor(e){super(e,u.a.Room),i()(this,"onRoomSummaryClicked",()=>{const e=p.a.getSharedInstance().roomPanelPhase;_.includes(e)?this.state.phase===e?this.setPhase(e):this.setPhase(e,p.a.getSharedInstance().roomPanelPhaseParams):this.setPhase(d.c.RoomSummary)}),i()(this,"onNotificationsClicked",()=>{this.setPhase(d.c.NotificationPanel)}),i()(this,"onPinnedMessagesClicked",()=>{this.setPhase(d.c.PinnedMessages)})}onAction(e){e.action===h.a.ViewUser?e.member?this.setPhase(d.c.RoomMemberInfo,{member:e.member}):this.setPhase(d.c.RoomMemberList):"view_3pid_invite"===e.action&&(e.event?this.setPhase(d.c.Room3pidMemberInfo,{event:e.event}):this.setPhase(d.c.RoomMemberList))}renderButtons(){return s.a.createElement(s.a.Fragment,null,s.a.createElement(b,{room:this.props.room,isHighlighted:this.isPhase(d.c.PinnedMessages),onClick:this.onPinnedMessagesClicked}),s.a.createElement(l.a,{name:"notifsButton",title:Object(c.a)("Notifications"),isHighlighted:this.isPhase(d.c.NotificationPanel),onClick:this.onNotificationsClicked,analytics:["Right Panel","Notification List Button","click"]}),s.a.createElement(l.a,{name:"roomSummaryButton",title:Object(c.a)("Room Info"),isHighlighted:this.isPhase(_),onClick:this.onRoomSummaryClicked,analytics:["Right Panel","Room Summary Button","click"]}))}})||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(83),a=n(202),s=n(143);t.a=({roomWidth:e})=>{const t=Object(r.useRef)(null),c=Object(r.useRef)(new Map);return Object(r.useEffect)(()=>{const e=()=>{var e;t.current&&(null===(e=t.current)||void 0===e?void 0:e.height)!==s.b.instance.windowHeight&&(t.current.height=s.b.instance.windowHeight)},r=i.a.register(e=>{if(0===e.action.indexOf("effects.")){(async e=>{if(!e)return null;let t=c.current[e]||null;if(null===t){var r;const o=null===(r=a.CHAT_EFFECTS.find(t=>t.command===e))||void 0===r?void 0:r.options;try{const{default:r}=await n(1373)("./"+e);t=new r(o),c.current[e]=t}catch(t){console.warn(`Unable to load effect module at '../../../effects/${e}.`,t)}}return t})(e.action.substr("effects.".length)).then(e=>null==e?void 0:e.start(t.current))}});return t.current.height=s.b.instance.windowHeight,s.b.instance.on(s.a.Resize,e),()=>{i.a.unregister(r),s.b.instance.off(s.a.Resize,e);const t=c.current;for(const e in t){const n=t[e];n&&n.isRunning&&n.stop()}}},[]),o.a.createElement("canvas",{ref:t,width:e,style:{display:"block",zIndex:999999,pointerEvents:"none",position:"fixed",top:0,right:0}})}},function(e,t,n){"use strict";n.d(t,"c",(function(){return B})),n.d(t,"a",(function(){return V}));var r=n(79),o=n.n(r),i=n(92),a=n.n(i),s=n(78),c=n.n(s),l=n(93),u=n(86),d=n.n(u),h=n(107),p=n(82),m=n(83),g=n(80),f=n(85),_=n(95),b=n(97),v=n(216),y=n(119),E=n(184),S=n(325),w=n(315),C=n(137),T=n(117),x=n(120),k=n(100),F=n(341),O=n(174),R=n(336),D=n(102),I=n(106),A=n(131),N=n(186),M=n(442),P=n(91);function L(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}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const U=({room:e,suggested:t,selected:n,hasPermissions:r,onToggleClick:o,onViewRoomClick:i,numChildRooms:a,children:s})=>{var u,h,m,_,b;const v=p.a.get(),E="join"===(null===(u=v.getRoom(e.room_id))||void 0===u?void 0:u.getMyMembership())?v.getRoom(e.room_id):null,S=(null==E?void 0:E.name)||e.name||e.canonical_alias||(null===(h=e.aliases)||void 0===h?void 0:h[0])||(e.room_type===l.e.Space?Object(g.a)("Unnamed Space"):Object(g.a)("Unnamed Room")),[w,T]=Object(R.a)(!0),D=e=>{e.preventDefault(),e.stopPropagation(),i(!1)},I=e=>{e.preventDefault(),e.stopPropagation(),i(!0)};let N,M,P;E?N=c.a.createElement(f.a,{onClick:D,kind:"primary_outline"},Object(g.a)("View")):I&&(N=c.a.createElement(f.a,{onClick:I,kind:"primary"},Object(g.a)("Join"))),o&&(M=r?c.a.createElement(C.a,{checked:!!n,onChange:o}):c.a.createElement(O.a,{tooltip:Object(g.a)("You don't have permission"),onClick:e=>{e.stopPropagation()}},c.a.createElement(C.a,{disabled:!0}))),P=E?c.a.createElement(y.a,{room:E,width:20,height:20}):c.a.createElement(x.a,{name:S,idName:e.room_id,url:e.avatar_url?Object(k.b)(e.avatar_url).getSquareThumbnailHttp(20):null,width:20,height:20});let L=Object(g.a)("%(count)s members",{count:e.num_joined_members});void 0!==a&&(L+=" · "+Object(g.a)("%(count)s rooms",{count:a}));const j=(null==E||null===(m=E.currentState)||void 0===m||null===(_=m.getStateEvents(l.a.RoomTopic,""))||void 0===_||null===(b=_.getContent())||void 0===b?void 0:b.topic)||e.topic;let U;j&&(L+=" · "+j),t&&(U=c.a.createElement(F.b,{tooltip:Object(g.a)("This room is suggested as a good one to join")},Object(g.a)("Suggested")));const B=c.a.createElement(c.a.Fragment,null,P,c.a.createElement("div",{className:"mx_SpaceRoomDirectory_roomTile_name"},S,U),c.a.createElement("div",{className:"mx_SpaceRoomDirectory_roomTile_info",ref:e=>e&&Object(A.g)(e),onClick:e=>{"A"===e.target.tagName&&e.stopPropagation()}},L),c.a.createElement("div",{className:"mx_SpaceRoomDirectory_actions"},N,M));let G,V;return s&&(G=c.a.createElement("div",{className:d()("mx_SpaceRoomDirectory_subspace_toggle",{mx_SpaceRoomDirectory_subspace_toggle_shown:w}),onClick:e=>{e.stopPropagation(),T()}}),w&&(V=c.a.createElement("div",{className:"mx_SpaceRoomDirectory_subspace_children"},s))),c.a.createElement(c.a.Fragment,null,c.a.createElement(f.a,{className:d()("mx_SpaceRoomDirectory_roomTile",{mx_SpaceRoomDirectory_subspace:e.room_type===l.e.Space}),onClick:r&&o?o:D},B,G),V)},B=(e,t,n=!1)=>{if(p.a.get().isGuest()&&!e.world_readable&&!e.guest_can_join)return void m.a.dispatch({action:"require_registration"});const r=function(e){return Object(N.a)(e.canonical_alias,e.aliases)}(e)||void 0;m.a.dispatch({action:"view_room",auto_join:n,should_peek:!0,_type:"room_directory",room_alias:r,room_id:e.room_id,via_servers:t,oob_data:{avatarUrl:e.avatar_url,name:e.name||r||Object(g.a)("Unnamed room")}})},G=({spaceId:e,rooms:t,relations:n,parents:r,selectedMap:o,onViewRoomClick:i,onToggleClick:a})=>{var s;const u=p.a.get(),d=u.getRoom(e),m=null==d?void 0:d.currentState.maySendStateEvent(l.a.SpaceChild,u.getUserId()),g=Array.from((null===(s=n.get(e))||void 0===s?void 0:s.values())||[]),f=Object(h.sortBy)(g,e=>Object(D.h)(e.content.order,null,e.state_key)),[_,b]=f.reduce((e,n)=>{const r=n.state_key;return t.has(r)?(e[t.get(r).room_type===l.e.Space?0:1].push(r),e):e},[[],[]])||[[],[]],v=new Set(r).add(e);return c.a.createElement(c.a.Fragment,null,b.map(r=>{var s,l,u;return c.a.createElement(U,{key:r,room:t.get(r),suggested:null===(s=n.get(e))||void 0===s||null===(l=s.get(r))||void 0===l?void 0:l.content.suggested,selected:null==o||null===(u=o.get(e))||void 0===u?void 0:u.has(r),onViewRoomClick:e=>{i(r,e)},hasPermissions:m,onToggleClick:a?()=>a(e,r):void 0})}),_.filter(e=>!v.has(e)).map(r=>{var s,l,u,d;return c.a.createElement(U,{key:r,room:t.get(r),numChildRooms:Array.from((null===(s=n.get(r))||void 0===s?void 0:s.values())||[]).filter(e=>t.has(e.state_key)&&!t.get(e.state_key).room_type).length,suggested:null===(l=n.get(e))||void 0===l||null===(u=l.get(r))||void 0===u?void 0:u.content.suggested,selected:null==o||null===(d=o.get(e))||void 0===d?void 0:d.has(r),onViewRoomClick:e=>{i(r,e)},hasPermissions:m,onToggleClick:a?()=>a(e,r):void 0},c.a.createElement(G,{spaceId:r,rooms:t,relations:n,parents:v,selectedMap:o,onViewRoomClick:i,onToggleClick:a}))}))},V=({space:e,initialText:t="",showRoom:n,additionalButtons:r,children:o})=>{const i=p.a.get(),u=i.getUserId(),[d,h]=Object(s.useState)(t),[_,y]=Object(s.useState)(new Map),[E,C,x,k,F]=(e=>{const[t,n]=Object(s.useState)(0);return Object(M.a)(m.a,e=>{e.action===P.a.UpdateSpaceHierarchy&&n(e=>e+1)}),Object(S.a)(async()=>{try{const t=await e.client.getSpaceSummary(e.roomId),n=new w.a,r=new w.a,o=new w.a;return t.events.map(e=>{if(e.type===l.a.SpaceChild&&(n.getOrCreate(e.room_id,new Map).set(e.state_key,e),r.getOrCreate(e.state_key,new Set).add(e.room_id)),Array.isArray(e.content.via)){const t=o.getOrCreate(e.state_key,new Set);e.content.via.forEach(e=>t.add(e))}}),[null,t.rooms,n,o,r]}catch(e){return console.error(e),[e]}},[e,t],[void 0])})(e),O=Object(s.useMemo)(()=>{if(!C)return null;const e=d.toLowerCase().trim(),t=new Map(C.map(e=>[e.room_id,e]));if(!e)return t;const n=C.filter(t=>{var n,r;return(null===(n=t.name)||void 0===n?void 0:n.toLowerCase().includes(e))||(null===(r=t.topic)||void 0===r?void 0:r.toLowerCase().includes(e))}),r=new Set,o=[...n.map(e=>e.room_id)];for(;o.length;){var i;const e=o.pop();r.add(e),null===(i=F.get(e))||void 0===i||i.forEach(e=>{r.has(e)||o.push(e)})}return Array.from(t.keys()).forEach(e=>{r.has(e)||t.delete(e)}),t},[C,F,d]),[R,D]=Object(s.useState)(""),[A,N]=Object(s.useState)(!1),[L,U]=Object(s.useState)(!1);if(E)return c.a.createElement("p",null,Object(g.a)("Your server does not support showing space hierarchies."));let B;if(O){const t=Array.from(O.values()).filter(e=>!e.room_type).length,s=O.size-t-1;let d,h,p;if(d=s>1?Object(g.a)("%(count)s rooms and %(numSpaces)s spaces",{count:t,numSpaces:s}):s>0?Object(g.a)("%(count)s rooms and 1 space",{count:t,numSpaces:s}):Object(g.a)("%(count)s rooms",{count:t,numSpaces:s}),"join"===e.getMyMembership()&&e.currentState.maySendStateEvent(l.a.SpaceChild,u)){const e=Array.from(_.keys()).flatMap(e=>[..._.get(e).values()].map(t=>[e,t])),t=e.every(([e,t])=>{var n,r;return null===(n=x.get(e))||void 0===n||null===(r=n.get(t))||void 0===r?void 0:r.content.suggested}),n=!e.length||A||L;let r=f.a,o={};e.length||(r=I.a,o={tooltip:Object(g.a)("Select a room below first"),yOffset:-40}),h=c.a.createElement(c.a.Fragment,null,c.a.createElement(r,a()({},o,{onClick:async()=>{N(!0);try{for(const[t,n]of e)await i.sendStateEvent(t,l.a.SpaceChild,{},n),x.get(t).delete(n),x.get(t).size>0?x.set(t,new Map(x.get(t))):x.delete(t)}catch(e){D(Object(g.a)("Failed to remove some rooms. Try again later"))}N(!1)},kind:"danger_outline",disabled:n}),A?Object(g.a)("Removing..."):Object(g.a)("Remove")),c.a.createElement(r,a()({},o,{onClick:async()=>{U(!0);try{for(const[o,a]of e){var n,r;const e=!t,s=null===(n=x.get(o))||void 0===n||null===(r=n.get(a))||void 0===r?void 0:r.content;if(!s||s.suggested===e)continue;const c=j(j({},s),{},{suggested:!t});await i.sendStateEvent(o,l.a.SpaceChild,c,a),x.get(o).get(a).content=c,x.set(o,new Map(x.get(o)))}}catch(e){D("Failed to update some suggestions. Try again later")}U(!1),y(new Map)},kind:"primary_outline",disabled:n}),L?Object(g.a)("Saving..."):t?Object(g.a)("Mark as not suggested"):Object(g.a)("Mark as suggested")))}if(O.size){const t=null==e?void 0:e.currentState.maySendStateEvent(l.a.SpaceChild,i.getUserId());p=c.a.createElement(c.a.Fragment,null,c.a.createElement(G,{spaceId:e.roomId,rooms:O,relations:x,parents:new Set,selectedMap:_,onToggleClick:t?(e,t)=>{if(D(""),!_.has(e))return void y(new Map(_.set(e,new Set([t]))));const n=_.get(e);n.has(t)?(n.delete(t),y(new Map(_.set(e,new Set(n))))):y(new Map(_.set(e,new Set([...n,t]))))}:void 0,onViewRoomClick:(e,t)=>{n(O.get(e),Array.from(k.get(e)||[]),t)}}),o&&c.a.createElement("hr",null))}else p=c.a.createElement("div",{className:"mx_SpaceRoomDirectory_noResults"},c.a.createElement("h3",null,Object(g.a)("No results found")),c.a.createElement("div",null,Object(g.a)("You may want to try a different search or check for typos.")));B=c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"mx_SpaceRoomDirectory_listHeader"},d,c.a.createElement("span",null,r,h)),R&&c.a.createElement("div",{className:"mx_SpaceRoomDirectory_error"},R),c.a.createElement(T.a,{className:"mx_SpaceRoomDirectory_list"},p,o))}else B=c.a.createElement(b.a,null);return c.a.createElement(c.a.Fragment,null,c.a.createElement(v.a,{className:"mx_textinput_icon mx_textinput_search",placeholder:Object(g.a)("Search names and descriptions"),onSearch:h,autoFocus:!0,initialValue:t}),B)};t.b=({space:e,onFinished:t,initialText:n})=>{const r=()=>{m.a.dispatch({action:"view_create_room",public:!0}),t()},o=c.a.createElement(c.a.Fragment,null,c.a.createElement(y.a,{room:e,height:32,width:32}),c.a.createElement("div",null,c.a.createElement("h1",null,Object(g.a)("Explore rooms")),c.a.createElement("div",null,c.a.createElement(E.a,{room:e}))));return c.a.createElement(_.a,{className:"mx_SpaceRoomDirectory",hasCancel:!0,onFinished:t,title:o},c.a.createElement("div",{className:"mx_Dialog_content"},Object(g.a)("If you can't find the room you're looking for, ask for an invite or <a>create a new room</a>.",null,{a:e=>c.a.createElement(f.a,{kind:"link",onClick:r},e)}),c.a.createElement(V,{space:e,showRoom:(e,n,r=!1)=>{B(e,n,r),t()},initialText:n},c.a.createElement(f.a,{onClick:r,kind:"primary",className:"mx_SpaceRoomDirectory_createRoom"},Object(g.a)("Create room")))))}},function(e,t,n){"use strict";var r=n(92),o=n.n(r),i=n(99),a=n.n(i),s=n(78),c=n.n(s),l=n(107),u=n(132),d=n(80),h=n(122),p=n(174),m=n(477),g=n(94);const f=["room","onlyKnownUsers","numShown"],_=5,b=e=>{var t;return!(null===(t=h.a.shared().getDMRoomsForUserId(e.userId))||void 0===t||!t.length)};t.a=e=>{let{room:t,onlyKnownUsers:n=!0,numShown:r=_}=e,i=a()(e,f);const h=Object(s.useContext)(g.a);let v=Object(m.b)(t);const y=[e=>!!e.getMxcAvatarUrl()];n?v=v.filter(b):y.unshift(e=>b(e));const E=Object(l.sortBy)(v.filter(e=>e.userId!==h.getUserId()),y).slice(0,r);if(E.length<1)return null;const S=E.map(e=>e.rawDisplayName).reverse().join(", ");let w;return w=i.onClick?c.a.createElement("div",null,c.a.createElement("div",{className:"mx_Tooltip_title"},Object(d.a)("View all %(count)s members",{count:v.length})),c.a.createElement("div",{className:"mx_Tooltip_sub"},Object(d.a)("Including %(commaSeparatedMembers)s",{commaSeparatedMembers:S}))):Object(d.a)("%(count)s members including %(commaSeparatedMembers)s",{count:v.length,commaSeparatedMembers:S}),c.a.createElement("div",o()({},i,{className:"mx_FacePile"}),c.a.createElement(p.a,{class:"mx_FacePile_faces",tooltip:w,tooltipProps:{yOffset:32}},v.length>r?c.a.createElement("span",{className:"mx_FacePile_face mx_FacePile_more"}):null,E.map(e=>c.a.createElement(u.a,{key:e.userId,member:e,width:28,height:28,className:"mx_FacePile_face"}))),n&&c.a.createElement("span",{className:"mx_FacePile_summary"},Object(d.a)("%(count)s people you know have already joined",{count:v.length})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(164),d=n(84),h=n(113),p=n(81),m=n(482),g=n(144);let f=Object(p.a)("views.rooms.SearchResultTile")((i=o=class extends l.a.Component{render(){const e=this.props.searchResult,t=e.context.getEvent(),n=t.getId(),r=t.getTs(),o=[l.a.createElement(m.a,{key:r+"-search",ts:r})],i=d.b.getValue("layout"),a=d.b.getValue("showTwelveHourTimestamps"),s=d.b.getValue("alwaysShowTimestamps"),c=d.b.getValue(h.a.Flair),u=e.context.getTimeline();for(let t=0;t<u.length;t++){var p;const r=u[t];let d;const h=t!=e.context.getOurEventIndex();h||(d=this.props.searchHighlights),Object(g.d)(r,null===(p=this.context)||void 0===p?void 0:p.showHiddenEventsInTimeline)&&o.push(l.a.createElement(g.b,{key:`${n}+${t}`,mxEvent:r,layout:i,contextual:h,highlights:d,permalinkCreator:this.props.permalinkCreator,highlightLink:this.props.resultLink,onHeightChanged:this.props.onHeightChanged,isTwelveHour:a,alwaysShowTimestamps:s,enableFlair:c}))}return l.a.createElement("li",{"data-scroll-tokens":n},o)}},s()(o,"contextType",u.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(187),d=n(83),h=n(276),p=n.n(h),m=n(80),g=n(91),f=n(446),_=n(85),b=n(81),v=n(94);let y=Object(b.a)("structures.UploadBar")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"dispatcherRef",void 0),s()(this,"mounted",void 0),s()(this,"onAction",e=>{switch(e.action){case g.a.UploadStarted:case g.a.UploadProgress:case g.a.UploadFinished:case g.a.UploadCanceled:case g.a.UploadFailed:{if(!this.mounted)return;const e=this.getUploadsInRoom();this.setState({currentUpload:e[0],uploadsHere:e});break}}}),s()(this,"onCancelClick",e=>{e.preventDefault(),u.b.sharedInstance().cancelUpload(this.state.currentUpload.promise,this.context)});const t=this.getUploadsInRoom();this.state={currentUpload:t[0],uploadsHere:t}}componentDidMount(){this.dispatcherRef=d.a.register(this.onAction),this.mounted=!0}componentWillUnmount(){this.mounted=!1,d.a.unregister(this.dispatcherRef)}getUploadsInRoom(){return u.b.sharedInstance().getCurrentUploads().filter(e=>e.roomId===this.props.room.roomId)}render(){if(!this.state.currentUpload)return null;const e=Object(m.a)("Uploading %(filename)s and %(count)s others",{filename:this.state.currentUpload.fileName,count:this.state.uploadsHere.length-1}),t=p()(this.state.currentUpload.total);return l.a.createElement("div",{className:"mx_UploadBar"},l.a.createElement("div",{className:"mx_UploadBar_filename"},e," (",t,")"),l.a.createElement(_.a,{onClick:this.onCancelClick,className:"mx_UploadBar_cancel"}),l.a.createElement(f.a,{value:this.state.currentUpload.loaded,max:this.state.currentUpload.total}))}},s()(o,"contextType",v.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r,o=n(79),i=n.n(o),a=n(92),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(80),p=n(82),m=n(83),g=n(793),f=n(114),_=n(187),b=n(200),v=n(84),y=n(103),E=n(106),S=n(794),w=n(113),C=n(115),T=n(81),x=n(795),k=n(798),F=n(290),O=n(154),R=n(800),D=n(91),I=n(368),A=n(809);function N(e){return l.a.createElement("div",{className:"mx_MessageComposer_avatar"},l.a.createElement(A.a,{member:e.me,width:24,height:24}))}function M(e){var t;return l.a.createElement(E.a,{className:"mx_MessageComposer_sendMessage",onClick:e.onClick,title:null!==(t=e.title)&&void 0!==t?t:Object(h.a)("Send message")})}const P=({addEmoji:e})=>{const[t,n,r,o]=Object(y.q)();let i;if(t){const t=n.current.getBoundingClientRect();i=l.a.createElement(y.b,s()({},Object(y.k)(t),{onFinished:o,managed:!1}),l.a.createElement(I.d,{onChoose:e,showQuickReactions:!0}))}const a=d()("mx_MessageComposer_button","mx_MessageComposer_emoji",{mx_MessageComposer_button_highlight:t});return l.a.createElement(l.a.Fragment,null,l.a.createElement(y.d,{className:a,onClick:r,isExpanded:t,title:Object(h.a)("Emoji picker"),inputRef:n}),i)};class L extends l.a.Component{constructor(e){super(e),i()(this,"uploadInput",l.a.createRef()),i()(this,"dispatcherRef",void 0),i()(this,"onAction",e=>{"upload_file"===e.action&&this.onUploadClick()}),i()(this,"onUploadClick",()=>{p.a.get().isGuest()?m.a.dispatch({action:"require_registration"}):this.uploadInput.current.click()}),i()(this,"onUploadFileInputChange",e=>{if(0===e.target.files.length)return;const t=[];for(let n=0;n<e.target.files.length;++n)t.push(e.target.files[n]);_.b.sharedInstance().sendContentListToRoom(t,this.props.roomId,p.a.get()),e.target.value=""}),this.dispatcherRef=m.a.register(this.onAction)}componentWillUnmount(){m.a.unregister(this.dispatcherRef)}render(){return l.a.createElement(E.a,{className:"mx_MessageComposer_button mx_MessageComposer_upload",onClick:this.onUploadClick,title:Object(h.a)("Upload file")},l.a.createElement("input",{ref:this.uploadInput,type:"file",style:{display:"none"},multiple:!0,onChange:this.onUploadFileInputChange}))}}let j=Object(T.a)("views.rooms.MessageComposer")(r=class extends l.a.Component{constructor(e){super(e),i()(this,"dispatcherRef",void 0),i()(this,"messageComposerInput",void 0),i()(this,"voiceRecordingButton",void 0),i()(this,"onAction",e=>{"reply_to_event"===e.action&&setTimeout(()=>{this.props.resizeNotifier.notifyTimelineHeightChanged()},100)}),i()(this,"onRoomStateEvents",(e,t)=>{e.getRoomId()===this.props.room.roomId&&("m.room.tombstone"===e.getType()&&this.setState({tombstone:this.getRoomTombstone()}),"m.room.power_levels"===e.getType()&&this.setState({canSendMessages:this.props.room.maySendMessage()}))}),i()(this,"onTombstoneClick",e=>{e.preventDefault();const t=this.state.tombstone.getContent().replacement_room,n=p.a.get().getRoom(t);let r=null;if(n){const e=n.currentState.getStateEvents("m.room.create","");e&&e.getId()&&(r=e.getId())}const o=[this.state.tombstone.getSender().split(":").splice(1).join(":")];m.a.dispatch({action:"view_room",highlighted:!0,event_id:r,room_id:t,auto_join:!0,_type:"tombstone",via_servers:o,opts:{viaServers:o}})}),i()(this,"renderPlaceholderText",()=>this.props.replyToEvent?this.props.e2eStatus?Object(h.a)("Send an encrypted reply…"):Object(h.a)("Send a reply…"):this.props.e2eStatus?Object(h.a)("Send an encrypted message…"):Object(h.a)("Send a message…")),i()(this,"sendMessage",async()=>{this.state.haveRecording&&this.voiceRecordingButton?await this.voiceRecordingButton.send():this.messageComposerInput.sendMessage()}),i()(this,"onChange",e=>{this.setState({isComposerEmpty:e.isEmpty})}),i()(this,"onVoiceStoreUpdate",()=>{const e=k.a.instance.activeRecording;e?(e.on(F.b.Started,()=>{this.setState({haveRecording:!!k.a.instance.activeRecording})}),e.on(F.b.EndingSoon,({secondsLeft:e})=>{this.setState({recordingTimeLeftSeconds:e}),setTimeout(()=>this.setState({recordingTimeLeftSeconds:null}),3e3)})):this.setState({haveRecording:!1})}),k.a.instance.on(C.b,this.onVoiceStoreUpdate),this.state={tombstone:this.getRoomTombstone(),canSendMessages:this.props.room.maySendMessage(),isComposerEmpty:!0,haveRecording:!1,recordingTimeLeftSeconds:null}}componentDidMount(){this.dispatcherRef=m.a.register(this.onAction),p.a.get().on("RoomState.events",this.onRoomStateEvents),this.waitForOwnMember()}waitForOwnMember(){const e=this.props.room.getMember(p.a.get().getUserId());e?this.setState({me:e}):this.props.room.loadMembersIfNeeded().then(()=>{const e=this.props.room.getMember(p.a.get().getUserId());this.setState({me:e})})}componentWillUnmount(){p.a.get()&&p.a.get().removeListener("RoomState.events",this.onRoomStateEvents),k.a.instance.off(C.b,this.onVoiceStoreUpdate),m.a.unregister(this.dispatcherRef)}getRoomTombstone(){return this.props.room.currentState.getStateEvents("m.room.tombstone","")}addEmoji(e){m.a.dispatch({action:D.a.ComposerInsert,text:e})}render(){const e=[this.state.me?l.a.createElement(N,{key:"controls_avatar",me:this.state.me}):null,this.props.e2eStatus?l.a.createElement(b.b,{key:"e2eIcon",status:this.props.e2eStatus,className:"mx_MessageComposer_e2eIcon"}):null];if(!this.state.tombstone&&this.state.canSendMessages)e.push(l.a.createElement(R.a,{ref:e=>this.messageComposerInput=e,key:"controls_input",room:this.props.room,placeholder:this.renderPlaceholderText(),permalinkCreator:this.props.permalinkCreator,replyToEvent:this.props.replyToEvent,onChange:this.onChange,disabled:this.state.haveRecording})),this.state.haveRecording||e.push(l.a.createElement(L,{key:"controls_upload",roomId:this.props.room.roomId}),l.a.createElement(P,{key:"emoji_button",addEmoji:this.addEmoji})),v.b.getValue(w.a.Widgets)&&v.b.getValue("MessageComposerInput.showStickersButton")&&!this.state.haveRecording&&e.push(l.a.createElement(g.a,{key:"stickerpicker_controls_button",room:this.props.room})),e.push(l.a.createElement(x.a,{key:"controls_voice_record",ref:e=>this.voiceRecordingButton=e,room:this.props.room})),this.state.isComposerEmpty&&!this.state.haveRecording||e.push(l.a.createElement(M,{key:"controls_send",onClick:this.sendMessage,title:this.state.haveRecording?Object(h.a)("Send voice message"):void 0}));else if(this.state.tombstone){const t=this.state.tombstone.getContent().replacement_room,r=t?l.a.createElement("a",{href:Object(f.g)(t),className:"mx_MessageComposer_roomReplaced_link",onClick:this.onTombstoneClick},Object(h.a)("The conversation continues here.")):"";e.push(l.a.createElement("div",{className:"mx_MessageComposer_replaced_wrapper",key:"room_replaced"},l.a.createElement("div",{className:"mx_MessageComposer_replaced_valign"},l.a.createElement("img",{className:"mx_MessageComposer_roomReplaced_icon",src:n(1379)}),l.a.createElement("span",{className:"mx_MessageComposer_roomReplaced_header"},Object(h.a)("This room has been replaced and is no longer active.")),l.a.createElement("br",null),r)))}else e.push(l.a.createElement("div",{key:"controls_error",className:"mx_MessageComposer_noperm_error"},Object(h.a)("You do not have permission to post to this room")));let t;const r=Math.round(this.state.recordingTimeLeftSeconds);return r&&(t=l.a.createElement(O.b,{label:Object(h.a)("%(seconds)ss left",{seconds:r}),alignment:O.a.Top,yOffset:-50})),l.a.createElement("div",{className:"mx_MessageComposer mx_GroupLayout"},t,l.a.createElement("div",{className:"mx_MessageComposer_wrapper"},l.a.createElement(S.a,{permalinkCreator:this.props.permalinkCreator}),l.a.createElement("div",{className:"mx_MessageComposer_row"},e)))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return F}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(80),p=n(286),m=n(82),g=n(89),f=n(83),_=n(85),b=n(139),v=n(345),y=n(178),E=n(84),S=n(103),w=n(155),C=n(106),T=n(91),x=n(238),k=n(81);let F=Object(k.a)("views.rooms.Stickerpicker")((i=o=class e extends l.a.PureComponent{constructor(e){super(e),s()(this,"_launchManageIntegrations",()=>{E.b.getValue("feature_many_integration_managers")?y.a.sharedInstance().openAll(this.props.room,"type_"+w.a.STICKERPICKER.preferred,this.state.widgetId):y.a.sharedInstance().getPrimaryManager().open(this.props.room,"type_"+w.a.STICKERPICKER.preferred,this.state.widgetId)}),this._onShowStickersClick=this._onShowStickersClick.bind(this),this._onHideStickersClick=this._onHideStickersClick.bind(this),this._launchManageIntegrations=this._launchManageIntegrations.bind(this),this._removeStickerpickerWidgets=this._removeStickerpickerWidgets.bind(this),this._updateWidget=this._updateWidget.bind(this),this._onWidgetAction=this._onWidgetAction.bind(this),this._onResize=this._onResize.bind(this),this._onFinished=this._onFinished.bind(this),this.popoverWidth=300,this.popoverHeight=300,this.scalarClient=null,this.state={showStickers:!1,imError:null,stickerpickerX:null,stickerpickerY:null,stickerpickerWidget:null,widgetId:null}}_acquireScalarClient(){return this.scalarClient?Promise.resolve(this.scalarClient):y.a.sharedInstance().hasManager()?(this.scalarClient=y.a.sharedInstance().getPrimaryManager().getScalarClient(),this.scalarClient.connect().then(()=>(this.forceUpdate(),this.scalarClient)).catch(e=>{this._imError(Object(h.b)("Failed to connect to integration manager"),e)})):void y.a.sharedInstance().openNoManagerDialog()}async _removeStickerpickerWidgets(){const e=await this._acquireScalarClient();console.log("Removing Stickerpicker widgets"),this.state.widgetId?e?e.disableWidgetAssets(w.a.STICKERPICKER,this.state.widgetId).then(()=>{console.log("Assets disabled")}).catch(e=>{console.error("Failed to disable assets")}):console.error("Cannot disable assets: no scalar client"):console.warn("No widget ID specified, not disabling assets"),this.setState({showStickers:!1}),b.a.removeStickerpickerWidgets().then(()=>{this.forceUpdate()}).catch(e=>{console.error("Failed to remove sticker picker widget",e)})}componentDidMount(){window.addEventListener("resize",this._onResize),this.dispatcherRef=f.a.register(this._onWidgetAction),m.a.get().on("accountData",this._updateWidget),this._updateWidget()}componentWillUnmount(){const e=m.a.get();e&&e.removeListener("accountData",this._updateWidget),window.removeEventListener("resize",this._onResize),this.dispatcherRef&&f.a.unregister(this.dispatcherRef)}componentDidUpdate(e,t){this._sendVisibilityToWidget(this.state.showStickers)}_imError(e,t){console.error(e,t),this.setState({showStickers:!1,imError:Object(h.a)(e)})}_updateWidget(){const t=b.a.getStickerpickerWidgets()[0];if(!t)return e.currentWidget=null,void this.setState({stickerpickerWidget:null,widgetId:null});const n=e.currentWidget;let r=null;n&&n.content&&n.content.url&&(r=n.content.url);let o=null;t&&t.content&&t.content.url&&(o=t.content.url),o!==r&&v.a.destroyElement("stickerPicker"),e.currentWidget=t,this.setState({stickerpickerWidget:t,widgetId:t?t.id:null})}_onWidgetAction(e){switch(e.action){case"user_widget_updated":this.forceUpdate();break;case"stickerpicker_close":this.setState({showStickers:!1});break;case T.a.AfterRightPanelPhaseChange:case"show_left_panel":case"hide_left_panel":this.setState({showStickers:!1})}}_defaultStickerpickerContent(){return l.a.createElement(_.a,{onClick:this._launchManageIntegrations,className:"mx_Stickers_contentPlaceholder"},l.a.createElement("p",null,Object(h.a)("You don't currently have any stickerpacks enabled")),l.a.createElement("p",{className:"mx_Stickers_addLink"},Object(h.a)("Add some now")),l.a.createElement("img",{src:n(1375),alt:""}))}_errorStickerpickerContent(){return l.a.createElement("div",{style:{"text-align":"center"},className:"error"},l.a.createElement("p",null," ",this.state.imError," "))}_sendVisibilityToWidget(e){if(!this.state.stickerpickerWidget)return;const t=x.a.instance.getMessagingForId(this.state.stickerpickerWidget.id);t&&e!==this._prevSentVisibility&&(t.updateVisibility(e).catch(e=>{console.error("Error updating widget visibility: ",e)}),this._prevSentVisibility=e)}_getStickerpickerContent(){if(this.state._imError)return this._errorStickerpickerContent();const e=this.state.stickerpickerWidget;let t;const n=g.getComponent("elements.PersistedElement");if(e&&e.content&&e.content.url){e.content.name=e.name||Object(h.a)("Stickerpack");const r={id:e.id,url:e.content.url,name:e.content.name,type:e.content.type,data:e.content.data};t=l.a.createElement("div",{className:"mx_Stickers_content_container"},l.a.createElement("div",{id:"stickersContent",className:"mx_Stickers_content",style:{border:"none",height:this.popoverHeight,width:this.popoverWidth}},l.a.createElement(n,{persistKey:"stickerPicker",zIndex:3500},l.a.createElement(p.a,{app:r,room:this.props.room,fullWidth:!0,userId:m.a.get().credentials.userId,creatorUserId:e.sender||m.a.get().credentials.userId,waitForIframeLoad:!0,showMenubar:!0,onEditClick:this._launchManageIntegrations,onDeleteClick:this._removeStickerpickerWidgets,showTitle:!1,showCancel:!1,showPopout:!1,onMinimiseClick:this._onHideStickersClick,handleMinimisePointerEvents:!0,userWidget:!0}))))}else t=this._defaultStickerpickerContent();return t}_onShowStickersClick(e){if(!E.b.getValue("integrationProvisioning"))return y.a.sharedInstance().showDisabledDialog();const t=e.target.getBoundingClientRect();let n=t.right+window.pageXOffset-41;n=Math.min(n,document.body.clientWidth-312);const r=Math.max(10,2+window.pageXOffset+t.left-n),o=t.top+t.height/2+window.pageYOffset-19;this.setState({showStickers:!0,stickerPickerX:n,stickerPickerY:o,stickerPickerChevronOffset:r})}_onHideStickersClick(e){this.state.showStickers&&this.setState({showStickers:!1})}_onResize(){this.state.showStickers&&this.setState({showStickers:!1})}_onFinished(){this.state.showStickers&&this.setState({showStickers:!1})}render(){let e,t;const n=d()("mx_MessageComposer_button","mx_MessageComposer_stickers","mx_Stickers_hideStickers","mx_MessageComposer_button_highlight");if(this.state.showStickers){t=l.a.createElement(_.a,{id:"stickersButton",key:"controls_hide_stickers",className:n,onClick:this._onHideStickersClick,active:this.state.showStickers.toString(),title:Object(h.a)("Hide Stickers")});const r=g.getComponent("context_menus.GenericElementContextMenu");e=l.a.createElement(S.b,{chevronOffset:this.state.stickerPickerChevronOffset,chevronFace:"bottom",left:this.state.stickerPickerX,top:this.state.stickerPickerY,menuWidth:this.popoverWidth,menuHeight:this.popoverHeight,onFinished:this._onFinished,menuPaddingTop:0,menuPaddingLeft:0,menuPaddingRight:0,zIndex:3500},l.a.createElement(r,{element:this._getStickerpickerContent(),onResize:this._onFinished}))}else t=l.a.createElement(C.a,{id:"stickersButton",key:"controls_show_stickers",className:"mx_MessageComposer_button mx_MessageComposer_stickers",onClick:this._onShowStickersClick,title:Object(h.a)("Show Stickers")});return l.a.createElement(l.a.Fragment,null,t,e)}},s()(o,"currentWidget",void 0),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(83),l=n(80),u=n(126),d=n(81),h=n(418);function p(){c.a.dispatch({action:"reply_to_event",event:null})}let m=Object(d.a)("views.rooms.ReplyPreview")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"unmounted",!1),i()(this,"roomStoreToken",void 0),i()(this,"onRoomViewStoreUpdate",()=>{if(this.unmounted)return;const e=u.a.getQuotingEvent();this.state.event!==e&&this.setState({event:e})}),this.state={event:u.a.getQuotingEvent()},this.roomStoreToken=u.a.addListener(this.onRoomViewStoreUpdate)}componentWillUnmount(){this.unmounted=!0,this.roomStoreToken&&this.roomStoreToken.remove()}render(){return this.state.event?s.a.createElement("div",{className:"mx_ReplyPreview"},s.a.createElement("div",{className:"mx_ReplyPreview_section"},s.a.createElement("div",{className:"mx_ReplyPreview_header mx_ReplyPreview_title"},Object(l.a)("Replying")),s.a.createElement("div",{className:"mx_ReplyPreview_header mx_ReplyPreview_cancel"},s.a.createElement("img",{className:"mx_filterFlipColor",src:n(348),width:"18",height:"18",onClick:p})),s.a.createElement("div",{className:"mx_ReplyPreview_clear"}),s.a.createElement("div",{className:"mx_ReplyPreview_tile"},s.a.createElement(h.a,{mxEvent:this.state.event,permalinkCreator:this.props.permalinkCreator})))):null}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r,o=n(79),i=n.n(o),a=n(106),s=n(80),c=n(78),l=n.n(c),u=n(290),d=n(82),h=n(86),p=n.n(h),m=n(796),g=n(81),f=n(797),_=n(798),b=n(115),v=n(486),y=n(93),E=n(87),S=n(105),w=n(285),C=n(175),T=n(218),x=n(183),k=n(147),F=n(895);let O=Object(g.a)("views.rooms.VoiceRecordComposerTile")(r=class extends l.a.PureComponent{constructor(e){super(e),i()(this,"onCancel",async()=>{await this.disposeRecording()}),i()(this,"onRecordStartEndClick",async()=>{if(this.state.recorder)return void await this.state.recorder.stop();const e=()=>{E.a.createTrackedDialog("Microphone Access Error","",S.a,{title:Object(s.a)("Unable to access your microphone"),description:l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,Object(s.a)("We were unable to access your microphone. Please check your browser settings and try again.")))})};try{var t;const e=await w.c.getDevices();if(null==e||null===(t=e[w.b.AudioInput])||void 0===t||!t.length)return void E.a.createTrackedDialog("No Microphone Error","",S.a,{title:Object(s.a)("No microphone found"),description:l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,Object(s.a)("We didn't find a microphone on your device. Please check your settings and try again.")))})}catch(t){return console.error("Error getting devices: ",t),void e()}try{await F.a.instance.playOnly(null);const e=_.a.instance.startRecording();await e.start(),e.on(b.b,e=>{e!==u.b.EndingSoon&&this.setState({recordingPhase:e})}),this.setState({recorder:e,recordingPhase:u.b.Started})}catch(t){console.error("Error starting recording: ",t),e(),_.a.instance.disposeRecording()}}),this.state={recorder:null}}async componentWillUnmount(){await _.a.instance.disposeRecording()}async send(){if(!this.state.recorder)throw new Error("No recording started - cannot send anything");let e;await this.state.recorder.stop();try{e=await this.state.recorder.upload(this.props.room.roomId)}catch(e){return console.error("Error uploading voice message:",e),void this.setState({didUploadFail:!0})}try{d.a.get().sendMessage(this.props.room.roomId,{body:"Voice message",msgtype:y.b.Audio,url:e.mxc,file:e.encrypted,info:{duration:Math.round(1e3*this.state.recorder.durationSeconds),mimetype:this.state.recorder.contentType,size:this.state.recorder.contentLength},"org.matrix.msc1767.text":"Voice message","org.matrix.msc1767.file":{url:e.mxc,file:e.encrypted,name:"Voice message.ogg",mimetype:this.state.recorder.contentType,size:this.state.recorder.contentLength},"org.matrix.msc1767.audio":{duration:Math.round(1e3*this.state.recorder.durationSeconds),waveform:this.state.recorder.getPlayback().thumbnailWaveform.map(e=>Math.round(1024*e))},"org.matrix.msc3245.voice":{}})}catch(e){console.error("Error sending voice message:",e)}await this.disposeRecording()}async disposeRecording(){await _.a.instance.disposeRecording(),this.setState({recorder:null,recordingPhase:null,didUploadFail:!1})}renderWaveformArea(){return this.state.recorder?this.state.recordingPhase!==u.b.Started?l.a.createElement(v.a,{playback:this.state.recorder.getPlayback()}):l.a.createElement("div",{className:"mx_MediaBody mx_VoiceMessagePrimaryContainer mx_VoiceRecordComposerTile_recording"},l.a.createElement(f.a,{recorder:this.state.recorder}),l.a.createElement(m.a,{recorder:this.state.recorder})):null}render(){let e,t,n;if(!this.state.recordingPhase||this.state.recordingPhase===u.b.Started){var r,o;const t=p()({mx_MessageComposer_button:!this.state.recorder,mx_MessageComposer_voiceMessage:!this.state.recorder,mx_VoiceRecordComposerTile_stop:null===(r=this.state.recorder)||void 0===r?void 0:r.isRecording});let n=Object(s.a)("Send voice message");this.state.recorder&&(n=Object(s.a)("Stop recording")),e=l.a.createElement(a.a,{className:t,onClick:this.onRecordStartEndClick,title:n}),!this.state.recorder||null!==(o=this.state.recorder)&&void 0!==o&&o.isRecording||(e=null)}return this.state.recorder&&this.state.recordingPhase!==u.b.Uploading&&(t=l.a.createElement(a.a,{className:"mx_VoiceRecordComposerTile_delete",title:Object(s.a)("Delete"),onClick:this.onCancel})),this.state.recordingPhase===u.b.Uploading?n=l.a.createElement("span",{className:"mx_VoiceRecordComposerTile_uploadingState"},l.a.createElement(k.a,{w:16,h:16})):this.state.didUploadFail&&this.state.recordingPhase===u.b.Ended&&(n=l.a.createElement("span",{className:"mx_VoiceRecordComposerTile_failedState"},l.a.createElement("span",{className:"mx_VoiceRecordComposerTile_uploadState_badge"},l.a.createElement(C.a,{notification:T.a.forSymbol("!",x.a.Red)})),l.a.createElement("span",{className:"text-warning"},Object(s.a)("Failed to send")))),l.a.createElement(l.a.Fragment,null,n,t,e,this.renderWaveformArea())}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(290),d=n(81),h=n(109),p=n(485),m=n(281);let g=Object(d.a)("views.audio_messages.LiveRecordingWaveform")((i=o=class extends l.a.PureComponent{constructor(e){super(e),s()(this,"waveform",[]),s()(this,"scheduledUpdate",new m.a(()=>this.updateWaveform(),()=>requestAnimationFrame(()=>this.scheduledUpdate.trigger()))),this.state={waveform:Object(h.h)(0,u.a)}}componentDidMount(){this.props.recorder.liveData.onUpdate(e=>{this.waveform=Object(h.c)(Array.from(e.waveform),u.a),this.scheduledUpdate.mark()})}updateWaveform(){this.setState({waveform:this.waveform})}render(){return l.a.createElement(p.a,{relHeights:this.state.waveform})}},s()(o,"defaultProps",{progress:1}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(81),l=n(350),u=n(281);let d=Object(c.a)("views.audio_messages.LiveRecordingClock")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"seconds",0),i()(this,"scheduledUpdate",new u.a(()=>this.updateClock(),()=>requestAnimationFrame(()=>this.scheduledUpdate.trigger()))),this.state={seconds:0}}componentDidMount(){this.props.recorder.liveData.onUpdate(e=>{this.seconds=e.timeSeconds,this.scheduledUpdate.mark()})}updateClock(){this.setState({seconds:this.seconds})}render(){return s.a.createElement(l.a,{seconds:this.state.seconds})}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r),i=n(150),a=n(83),s=n(290);class c extends i.a{constructor(){super(a.a,{})}get activeRecording(){return this.state.recording}static get instance(){return c.internalInstance||(c.internalInstance=new c),c.internalInstance}async onAction(e){}startRecording(){if(!this.matrixClient)throw new Error("Cannot start a recording without a MatrixClient");if(this.state.recording)throw new Error("A recording is already in progress");const e=new s.d(this.matrixClient);return this.updateState({recording:e}),e}disposeRecording(){return this.state.recording&&this.state.recording.destroy(),this.updateState({recording:null})}}o()(c,"internalInstance",void 0),window.mxVoiceRecordingStore=c.instance},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(81),l=n(109),u=n(485),d=n(204),h=n(211);let p=Object(c.a)("views.audio_messages.PlaybackWaveform")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"onWaveformUpdate",e=>{this.setState({heights:this.toHeights(e)})}),i()(this,"onTimeUpdate",e=>{const t=Number(Object(h.c)(e[0],0,e[1]).toFixed(3));this.setState({progress:t})}),this.state={heights:this.toHeights(this.props.playback.waveform),progress:0},this.props.playback.waveformData.onUpdate(this.onWaveformUpdate),this.props.playback.clockInfo.liveData.onUpdate(this.onTimeUpdate)}toHeights(e){const t=Object(l.h)(0,d.b);return Object(l.j)(e,d.b,t)}render(){return s.a.createElement(u.a,{relHeights:this.state.heights,progress:this.state.progress})}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(596),d=n.n(u),h=n(107),p=n(93),m=n(83),g=n(880),f=n(802),_=n(506),b=n(505),v=n(240),y=n(198),E=n(808),S=n(293),w=n(87),C=n(80),T=n(187),x=n(94),k=n(91),F=n(287),O=n(202),R=n(112),D=n(82),I=n(179),A=n(81),N=n(84),M=n(105),P=n(110);function L(e,t,n){const r=v.a.makeReplyMixIn(t);Object.assign(e,r);const o=v.a.getNestedReplyText(t,n);o&&(e.formatted_body&&(e.formatted_body=o.html+e.formatted_body),e.body=o.body+e.body)}let j=Object(A.a)("views.rooms.SendMessageComposer")((i=o=class extends l.a.Component{constructor(e,t){super(e),s()(this,"context",void 0),s()(this,"prepareToEncrypt",void 0),s()(this,"editorRef",Object(c.createRef)()),s()(this,"model",null),s()(this,"currentlyComposedEditorState",null),s()(this,"dispatcherRef",void 0),s()(this,"sendHistoryManager",void 0),s()(this,"onKeyDown",e=>{var t,n,r;if(null!==(t=this.editorRef.current)&&void 0!==t&&t.isComposing(e))return;const o=Object(I.f)().getMessageComposerAction(e);switch(o){case I.b.Send:this.sendMessage(),e.preventDefault();break;case I.b.SelectPrevSendHistory:case I.b.SelectNextSendHistory:this.selectSendHistory(o===I.b.SelectPrevSendHistory)&&e.preventDefault();break;case I.b.EditPrevMessage:if(null!==(n=this.editorRef.current)&&void 0!==n&&n.isSelectionCollapsed()&&null!==(r=this.editorRef.current)&&void 0!==r&&r.isCaretAtStart()){const t=Object(y.b)(this.props.room,!1);t&&(e.preventDefault(),m.a.dispatch({action:"edit_event",event:t}))}break;case I.b.CancelEditing:m.a.dispatch({action:"reply_to_event",event:null});break;default:this.prepareToEncrypt&&this.prepareToEncrypt()}}),s()(this,"shouldSaveStoredEditorState",()=>!this.model.isEmpty||!!this.props.replyToEvent),s()(this,"saveStoredEditorState",()=>{if(this.shouldSaveStoredEditorState()){const e=E.a.createItem(this.model,this.props.replyToEvent);localStorage.setItem(this.editorStateKey,JSON.stringify(e))}else this.clearStoredEditorState()}),s()(this,"onAction",e=>{var t;if(!this.props.disabled)switch(e.action){case"reply_to_event":case k.a.FocusSendMessageComposer:null===(t=this.editorRef.current)||void 0===t||t.focus();break;case"send_composer_insert":var n;if(e.userId)null===(n=this.editorRef.current)||void 0===n||n.insertMention(e.userId);else if(e.event){var r;null===(r=this.editorRef.current)||void 0===r||r.insertQuotedMessage(e.event)}else if(e.text){var o;null===(o=this.editorRef.current)||void 0===o||o.insertPlaintext(e.text)}}}),s()(this,"onPaste",e=>{const{clipboardData:t}=e;if(t.files.length&&!t.types.includes("text/rtf"))return T.b.sharedInstance().sendContentListToRoom(Array.from(t.files),this.props.room.roomId,this.context),!0}),s()(this,"onChange",()=>{this.props.onChange&&this.props.onChange(this.model)}),s()(this,"focusComposer",()=>{var e;null===(e=this.editorRef.current)||void 0===e||e.focus()}),this.context=t,this.context.isCryptoEnabled()&&this.context.isRoomEncrypted(this.props.room.roomId)&&(this.prepareToEncrypt=Object(h.throttle)(()=>{this.context.prepareToEncrypt(this.props.room)},6e4,{leading:!0,trailing:!1})),window.addEventListener("beforeunload",this.saveStoredEditorState)}selectSendHistory(e){const t=e?-1:1;if(this.sendHistoryManager.currentIndex===this.sendHistoryManager.history.length){if(!e)return!1;this.currentlyComposedEditorState=this.model.serializeParts()}else if(this.sendHistoryManager.currentIndex+t===this.sendHistoryManager.history.length)return this.model.reset(this.currentlyComposedEditorState),this.sendHistoryManager.currentIndex=this.sendHistoryManager.history.length,!0;const{parts:n,replyEventId:r}=this.sendHistoryManager.getItem(t);var o;(m.a.dispatch({action:"reply_to_event",event:r?this.props.room.findEventById(r):null}),n)&&(this.model.reset(n),null===(o=this.editorRef.current)||void 0===o||o.focus());return!0}isSlashCommand(){const e=this.model.parts[0];if(e){if("command"===e.type&&e.text.startsWith("/")&&!e.text.startsWith("//"))return!0;if(e.text.startsWith("/")&&!e.text.startsWith("//")&&("plain"===e.type||"pill-candidate"===e.type))return!0}return!1}sendQuickReaction(){const e=this.props.room.getLiveTimeline().getEvents(),t=this.model.parts[1].text;for(let n=e.length-1;n>=0;n--)if(e[n].getType()===p.a.RoomMessage){let r=!0;const o=e[n],i=D.a.get().getUserId(),a=this.props.room.getUnfilteredTimelineSet().getRelationsForEvent(o.getId(),p.c.Annotation,p.a.Reaction);if(a){r=![...a.getAnnotationsBySender()[i]||[]].filter(e=>!e.isRedacted()).map(e=>e.getRelation().key).includes(t)}r&&(D.a.get().sendEvent(o.getRoomId(),p.a.Reaction,{"m.relates_to":{rel_type:p.c.Annotation,event_id:o.getId(),key:t}}),m.a.dispatch({action:"message_sent"}));break}}getSlashCommand(){const e=this.model.parts.reduce((e,t)=>"user-pill"===t.type?e+t.resourceId:e+t.text,""),{cmd:t,args:n}=Object(S.d)(e);return[t,n,e]}async runSlashCommand(e,t){const n=e.run(this.props.room.roomId,t);let r,o=n.error;if(n.promise)try{e.category===S.a.messages?r=await n.promise:await n.promise}catch(e){o=e}if(o){console.error("Command failure: %s",o);const e=!!n.promise?Object(C.b)("Server error"):Object(C.b)("Command error");let t;t="string"==typeof o?o:o.message?o.message:Object(C.a)("Server unavailable, overloaded, or something else went wrong."),w.a.createTrackedDialog(e,"",M.a,{title:Object(C.a)(e),description:t})}else if(console.log("Command success."),r)return r}async sendMessage(){var e,t;if(this.model.isEmpty)return;const n=this.props.replyToEvent;let r,o=!0;if(!Object(f.a)(this.model)&&this.isSlashCommand()){const[e,t,i]=this.getSlashCommand();if(e)e.category===S.a.messages?(r=await this.runSlashCommand(e,t),n&&L(r,n,this.props.permalinkCreator)):(this.runSlashCommand(e,t),o=!1);else{const{finished:e}=w.a.createTrackedDialog("Unknown command","",P.a,{title:Object(C.a)("Unknown Command"),description:l.a.createElement("div",null,l.a.createElement("p",null,Object(C.a)("Unrecognised command: %(commandText)s",{commandText:i})),l.a.createElement("p",null,Object(C.a)("You can use <code>/help</code> to list available commands. Did you mean to send this as a message?",{},{code:e=>l.a.createElement("code",null,e)})),l.a.createElement("p",null,Object(C.a)("Hint: Begin your message with <code>//</code> to start it with a slash.",{},{code:e=>l.a.createElement("code",null,e)}))),button:Object(C.a)("Send as message")}),[t]=await e;if(!t)return}}if(function(e){const t=e.parts;if(0==t.length)return!1;const n=Object(f.f)(e);if(t.length<=2){const e=n.startsWith("+")||n.startsWith("+ "),t=n.match(d.a);if(e&&t&&1==t.length)return t[0]===n.substring(1)||t[0]===n.substring(2)}return!1}(this.model)&&(o=!1,this.sendQuickReaction()),o){const e=R.a.getTimestamp(),{roomId:t}=this.props.room;if(r||(r=function(e,t,n){const r=Object(f.a)(e);r&&(e=Object(f.d)(e)),Object(f.c)(e,"//")&&(e=Object(f.e)(e,"/")),e=Object(f.g)(e);const o={msgtype:r?"m.emote":"m.text",body:Object(f.f)(e)},i=Object(f.b)(e,{forceHTML:!!n});return i&&(o.format="org.matrix.custom.html",o.formatted_body=i),n&&L(o,n,t),o}(this.model,this.props.permalinkCreator,n)),!r.body.trim())return;const o=this.context.sendMessage(t,r);n&&m.a.dispatch({action:"reply_to_event",event:null}),m.a.dispatch({action:"message_sent"}),O.CHAT_EFFECTS.forEach(e=>{Object(F.containsEmoji)(r,e.emojis)&&m.a.dispatch({action:"effects."+e.command})}),R.a.instance.trackSendMessage(e,o,t,!1,!!n,r)}this.sendHistoryManager.save(this.model,n),this.model.reset([]),null===(e=this.editorRef.current)||void 0===e||e.clearUndoHistory(),null===(t=this.editorRef.current)||void 0===t||t.focus(),this.clearStoredEditorState(),N.b.getValue("scrollToBottomOnMessageSent")&&m.a.dispatch({action:"scroll_to_bottom"})}componentWillUnmount(){m.a.unregister(this.dispatcherRef),window.removeEventListener("beforeunload",this.saveStoredEditorState),this.saveStoredEditorState()}UNSAFE_componentWillMount(){const e=new _.a(this.props.room,this.context),t=this.restoreStoredEditorState(e)||[];this.model=new g.a(t,e),this.dispatcherRef=m.a.register(this.onAction),this.sendHistoryManager=new E.a(this.props.room.roomId,"mx_cider_history_")}get editorStateKey(){return"mx_cider_state_"+this.props.room.roomId}clearStoredEditorState(){localStorage.removeItem(this.editorStateKey)}restoreStoredEditorState(e){const t=localStorage.getItem(this.editorStateKey);if(t)try{const{parts:n,replyEventId:r}=JSON.parse(t),o=n.map(t=>e.deserializePart(t));return r&&m.a.dispatch({action:"reply_to_event",event:this.props.room.findEventById(r)}),o}catch(e){console.error(e)}}render(){return l.a.createElement("div",{className:"mx_SendMessageComposer",onClick:this.focusComposer,onKeyDown:this.onKeyDown},l.a.createElement(b.a,{onChange:this.onChange,ref:this.editorRef,model:this.model,room:this.props.room,label:this.props.placeholder,placeholder:this.props.placeholder,onPaste:this.onPaste,disabled:this.props.disabled}))}},s()(o,"contextType",x.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(e,t){this.offset=e,this.atNodeEnd=t}asPosition(e){return e.positionForOffset(this.offset,this.atNodeEnd)}add(e,t=!1){return new r(this.offset+e,t)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"g",(function(){return f}));var r=n(621),o=n(114),i=n(407),a=n(84),s=n(90),c=n(570),l=n.n(c);function u(e,{forceHTML:t=!1}={}){let n=function(e){return e.parts.reduce((e,t)=>{switch(t.type){case"newline":return e+"\n";case"plain":case"command":case"pill-candidate":case"at-room-pill":return e+t.text;case"room-pill":return e+`[${t.resourceId.replace(/[[\\\]]/g,e=>"\\"+e)}](${Object(o.e)(t.resourceId)})`;case"user-pill":return e+`[${t.text.replace(/[[\\\]]/g,e=>"\\"+e)}](${Object(o.e)(t.resourceId)})`}},"")}(e);const c=n;if(a.b.getValue("feature_latex_maths")){const e=["display","inline"],t={tex:{display:"(^)\\$\\$(([^$]|\\\\\\$)+?)\\$\\$$",inline:"(^|\\s|[.,!?:;])(?!\\\\)\\$(?!\\s)(([^$\\n]|\\\\\\$)*([^\\\\\\s\\$]|\\\\\\$)(?:\\\\\\$)?)\\$"},latex:{display:"(^)\\\\\\[(?!\\\\\\])(.*?)\\\\\\]$",inline:"(^|[^\\\\])\\\\\\((?!\\\\\\))(.*?)\\\\\\)"}};["tex","latex"].forEach((function(r){e.forEach((function(e){const o=(((s.a.get().latex_maths_delims||{})[e]||{}).pattern||{})[r]||t[r][e];n=n.replace(RegExp(o,"gms"),(function(t,n,r){const o=i.AllHtmlEntities.encode(r);switch(e){case"display":return`${n}<div data-mx-maths="${o}">\n\n</div>\n\n`;case"inline":return`${n}<span data-mx-maths="${o}"></span>`}}))}))})),n=n.replace(/(.)<div/g,(function(e,t){return t+"\n<div"}))}const u=new r.a(n);if(!u.isPlainText()||t){const e=l.a.load(u.toHTML(),{_useHtmlParser2:!0,decodeEntities:!1});if(a.b.getValue("feature_latex_maths")){const t=new r.a(c),n=l.a.load(t.toHTML(),{_useHtmlParser2:!0,decodeEntities:!1});n("code").each((function(t){e("code").eq(t).text(n("code").eq(t).text())})),e("div, span").each((function(t,n){const r=e(n).attr("data-mx-maths");r&&e(n).html(`<code>${r}</code>`)}))}return e.html()}if(n.indexOf("\\")>-1)return u.toPlaintext()}function d(e){return e.parts.reduce((e,t)=>{switch(t.type){case"newline":return e+"\n";case"plain":case"command":case"pill-candidate":case"at-room-pill":return e+t.text;case"room-pill":return e+""+t.resourceId;case"user-pill":return e+""+t.text}},"")}function h(e){return p(e,"/me ",!1)}function p(e,t,n=!0){const r=e.parts[0];let o=r&&r.text;return n||(t=t.toLowerCase(),o=o.toLowerCase()),r&&("plain"===r.type||"command"===r.type)&&o.startsWith(t)}function m(e){return g(e,"/me ")}function g(e,t){return(e=e.clone()).removeText({index:0,offset:0},t.length),e}function f(e){const{parts:t}=e;if(t.length){const n=t[0];"plain"===n.type&&n.text.startsWith("\\/")&&(e=e.clone()).removeText({index:0,offset:0},1)}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(276),h=n.n(d),p=n(81),m=n(618),g=n(95),f=n(116);let _=Object(p.a)("views.dialogs.UploadConfirmDialog")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"objectUrl",void 0),s()(this,"mimeType",void 0),s()(this,"onCancelClick",()=>{this.props.onFinished(!1)}),s()(this,"onUploadClick",()=>{this.props.onFinished(!0)}),s()(this,"onUploadAllClick",()=>{this.props.onFinished(!0,!0)}),this.mimeType=Object(m.a)(e.file.type);const t=new Blob([e.file],{type:this.mimeType});this.objectUrl=URL.createObjectURL(t)}componentWillUnmount(){this.objectUrl&&URL.revokeObjectURL(this.objectUrl)}render(){let e,t,r;return e=this.props.totalFiles>1&&void 0!==this.props.currentIndex?Object(u.a)("Upload files (%(current)s of %(total)s)",{current:this.props.currentIndex+1,total:this.props.totalFiles}):Object(u.a)("Upload files"),t=this.mimeType.startsWith("image/")?l.a.createElement("div",{className:"mx_UploadConfirmDialog_previewOuter"},l.a.createElement("div",{className:"mx_UploadConfirmDialog_previewInner"},l.a.createElement("div",null,l.a.createElement("img",{className:"mx_UploadConfirmDialog_imagePreview",src:this.objectUrl})),l.a.createElement("div",null,this.props.file.name," (",h()(this.props.file.size),")"))):l.a.createElement("div",null,l.a.createElement("div",null,l.a.createElement("img",{className:"mx_UploadConfirmDialog_fileIcon",src:n(1378)}),this.props.file.name," (",h()(this.props.file.size),")")),this.props.currentIndex+1<this.props.totalFiles&&(r=l.a.createElement("button",{onClick:this.onUploadAllClick},Object(u.a)("Upload all"))),l.a.createElement(g.a,{className:"mx_UploadConfirmDialog",fixedWidth:!1,onFinished:this.onCancelClick,title:e,contentId:"mx_Dialog_content"},l.a.createElement("div",{id:"mx_Dialog_content"},t),l.a.createElement(f.a,{primaryButton:Object(u.a)("Upload"),hasCancel:!1,onPrimaryButtonClick:this.onUploadClick,focus:!0},r))}},s()(o,"defaultProps",{totalFiles:1}),r=i))||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(80),a=n(293),s=n(89);t.a=({onFinished:e})=>{const t=s.getComponent("dialogs.InfoDialog"),n={};a.c.forEach(e=>{e.isEnabled()&&(n[e.category]||(n[e.category]=[]),n[e.category].push(e))});const r=Object.values(a.a).filter(e=>n[e]).map(e=>{const t=[o.a.createElement("tr",{key:"_category_"+e,className:"mx_SlashCommandHelpDialog_headerRow"},o.a.createElement("td",{colSpan:3},o.a.createElement("h2",null,Object(i.a)(e))))];return n[e].forEach(e=>{t.push(o.a.createElement("tr",{key:e.command},o.a.createElement("td",null,o.a.createElement("strong",null,e.getCommand())),o.a.createElement("td",null,e.args),o.a.createElement("td",null,e.description)))}),t});return o.a.createElement(t,{className:"mx_SlashCommandHelpDialog",title:Object(i.a)("Command Help"),description:o.a.createElement("table",null,o.a.createElement("tbody",null,r)),hasCloseButton:!0,onFinished:e})}},function(e,t){e.exports=/[:=](?:\'(?:\-[\(\)DO\[\]o\{\}]|[\(\)DO\[\]o\{\}])|\{>|\-[#\$&\(-\*\/3<>-@B-EJLOPSXZ-\]cjlopsxz-\}]|[#\$&\(-\*\/3<>-@B-EJLOPSXZ-\]cjlopsxz\|\}])|[Oo][:=](?:\-[\)\]\}]|[\)\]\}])|>(?:[:=](?:\-[\(\)\/\[-\]\{\}]|[\(\)\/\[-\]\{\}])|0(?:\-[\)\]\}]|[\)\]\}]))|%(?:\-[\(\[\{]|[\(\[\{])|\\[Mm]\/|D(?:\-[:=Xx]|[:=Xx])|8(?:\-[#\)D\]\}]|[#\)D\]\}])|;(?:\-[\)P\]p\}]|[\)P\]p\}])|x(?:\-[\(D\[op\{]|[\(D\[op\{])|X(?:\-[\(DOP\[\{]|[\(DOP\[\{])|<\/?3|[:=]\{/},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(492),o=n(131),i=n(114),a=n(90);function s(e,t){const n=[];return e.split("@room").forEach((e,r,o)=>{e.length&&n.push(t.plain(e));r===o.length-1||n.push(t.atRoomPill("@room"))}),n}function c(e,t,n,r){switch(e.nodeName){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":return function(e,t){const n=parseInt(e.nodeName.substr(1),10);return t.plain("#".repeat(n)+" ")}(e,t);case"A":return function(e,t){const{href:n}=e,r=Object(i.c)(n);switch(r?r[0]:void 0){case"@":return t.userPill(e.textContent,r);case"#":return t.roomPill(r);default:return n===e.textContent?t.plain(e.textContent):t.plain(`[${e.textContent.replace(/[[\\\]]/g,e=>"\\"+e)}](${n})`)}}(e,t);case"IMG":return function(e,t){const{src:n}=e;return t.plain(`![${e.alt.replace(/[[\\\]]/g,e=>"\\"+e)}](${n})`)}(e,t);case"BR":return t.newline();case"EM":return t.plain(`_${e.textContent}_`);case"STRONG":return t.plain(`**${e.textContent}**`);case"PRE":return function(e,t){const n=[];let r="";if(e.firstChild&&"CODE"===e.firstChild.nodeName)for(const t of e.firstChild.classList)if(t.startsWith("language-")&&!t.startsWith("language-_")){r=t.substr("language-".length);break}const o=("```"+r+"\n"+e.textContent+"```").split("\n");return o.forEach((e,r)=>{n.push(t.plain(e)),r<o.length-1&&n.push(t.newline())}),n}(e,t);case"CODE":return t.plain(`\`${e.textContent}\``);case"DEL":return t.plain(`<del>${e.textContent}</del>`);case"SUB":return t.plain(`<sub>${e.textContent}</sub>`);case"SUP":return t.plain(`<sup>${e.textContent}</sup>`);case"U":return t.plain(`<u>${e.textContent}</u>`);case"LI":{const n=" ".repeat(r.listDepth-1);if("OL"===e.parentElement.nodeName){const e=r.listIndex[r.listIndex.length-1];return r.listIndex[r.listIndex.length-1]+=1,t.plain(`${n}${e}. `)}return t.plain(n+"- ")}case"P":if(n)return t.newline();break;case"DIV":case"SPAN":if(e.hasAttribute("data-mx-maths")){const n="SPAN"==e.nodeName?((a.a.get().latex_maths_delims||{}).inline||{}).left||"\\(":((a.a.get().latex_maths_delims||{}).display||{}).left||"\\[",r="SPAN"==e.nodeName?((a.a.get().latex_maths_delims||{}).inline||{}).right||"\\)":((a.a.get().latex_maths_delims||{}).display||{}).right||"\\]",o=e.getAttribute("data-mx-maths");return t.plain(n+o+r)}if(!l(e))return t.plain(e.textContent);break;case"OL":r.listIndex.push(e.start||1);case"UL":r.listDepth=(r.listDepth||0)+1;default:if(!l(e))return t.plain(e.textContent)}}function l(e){switch(e.nodeName){case"PRE":return!1;default:return Object(o.c)(e)}}function u(e){return e.nodeType===Node.TEXT_NODE?"\n"===e.nodeValue:e.nodeType!==Node.ELEMENT_NODE||"MX-REPLY"===e.nodeName}function d(e,t,n){const r=e.split(/\r\n|\r|\n/g);return r.reduce((e,o,i)=>{n&&e.push(t.plain("> ")),e.push(...s(o,t));return i===r.length-1||e.push(t.newline()),e},[])}function h(e,t,{isQuotedMessage:n=!1}={}){const i=e.getContent();let a;return a="org.matrix.custom.html"===i.format?function(e,t,n){const i=(new DOMParser).parseFromString(e,"text/html").body,a=[];let d,h=n;const p={listIndex:[]};return Object(r.c)(i,(function(e){if(u(e))return!1;"BLOCKQUOTE"===e.nodeName&&(h=!0);const n=[];if(d&&(Object(o.c)(d)||Object(o.c)(e))&&n.push(t.newline()),e.nodeType===Node.TEXT_NODE)n.push(...s(e.nodeValue,t));else if(e.nodeType===Node.ELEMENT_NODE){const r=c(e,t,d,p);r&&(Array.isArray(r)?n.push(...r):n.push(r))}if(n.length&&h){!function(e,t,n){e&&t.splice(0,0,n.plain("> "));for(let e=0;e<t.length;e+=1)"newline"===t[e].type&&(t.splice(e+1,0,n.plain("> ")),e+=1)}(0===a.length,n,t)}a.push(...n);const r=l(e);return d=r?null:e,r}),(function(e){if(!u(e)){switch(e.nodeName){case"BLOCKQUOTE":h=!1;break;case"OL":p.listIndex.pop();case"UL":p.listDepth-=1}d=e}})),a}(i.formatted_body||"",t,n):d(i.body||"",t,n),"m.emote"===i.msgtype&&a.unshift(t.plain("/me ")),a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(86),l=n.n(c),u=n(80),d=n(106),h=n(81);let p;!function(e){e.Bold="bold",e.Italics="italics",e.Strikethrough="strikethrough",e.Code="code",e.Quote="quote"}(p||(p={}));let m=Object(h.a)("views.rooms.MessageComposerFormatBar")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"formatBarRef",Object(a.createRef)()),this.state={visible:!1}}render(){const e=l()("mx_MessageComposerFormatBar",{mx_MessageComposerFormatBar_shown:this.state.visible});return s.a.createElement("div",{className:e,ref:this.formatBarRef},s.a.createElement(g,{label:Object(u.a)("Bold"),onClick:()=>this.props.onAction(p.Bold),icon:"Bold",shortcut:this.props.shortcuts.bold,visible:this.state.visible}),s.a.createElement(g,{label:Object(u.a)("Italics"),onClick:()=>this.props.onAction(p.Italics),icon:"Italic",shortcut:this.props.shortcuts.italics,visible:this.state.visible}),s.a.createElement(g,{label:Object(u.a)("Strikethrough"),onClick:()=>this.props.onAction(p.Strikethrough),icon:"Strikethrough",visible:this.state.visible}),s.a.createElement(g,{label:Object(u.a)("Code block"),onClick:()=>this.props.onAction(p.Code),icon:"Code",visible:this.state.visible}),s.a.createElement(g,{label:Object(u.a)("Quote"),onClick:()=>this.props.onAction(p.Quote),icon:"Quote",shortcut:this.props.shortcuts.quote,visible:this.state.visible}))}showAt(e){if(!this.formatBarRef.current)return;this.setState({visible:!0});const t=this.formatBarRef.current.parentElement.getBoundingClientRect();this.formatBarRef.current.style.left=e.left-t.left+"px",this.formatBarRef.current.style.top=e.top-t.top-16-12+"px"}hide(){this.setState({visible:!1})}})||r;class g extends s.a.PureComponent{render(){const e="mx_MessageComposerFormatBar_button mx_MessageComposerFormatBar_buttonIcon"+this.props.icon;let t;this.props.shortcut&&(t=s.a.createElement("div",{className:"mx_MessageComposerFormatBar_tooltipShortcut"},this.props.shortcut));const n=s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Tooltip_title"},this.props.label),s.a.createElement("div",{className:"mx_Tooltip_sub"},t));return s.a.createElement(d.a,{element:"button",type:"button",onClick:this.props.onClick,title:this.props.label,tooltip:n,className:e})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),o=n.n(r),i=n(107);class a{constructor(e,t){o()(this,"history",[]),o()(this,"prefix",void 0),o()(this,"lastIndex",0),o()(this,"currentIndex",0),this.prefix=t+e;let n,r=0;for(;n=sessionStorage.getItem(`${this.prefix}[${r}]`);){try{this.history.push(JSON.parse(n))}catch(e){console.warn("Throwing away unserialisable history",e);break}++r}this.lastIndex=this.history.length-1,this.currentIndex=this.lastIndex+1}static createItem(e,t){return{parts:e.serializeParts(),replyEventId:t?t.getId():void 0}}save(e,t){const n=a.createItem(e,t);this.history.push(n),this.currentIndex=this.history.length,this.lastIndex+=1,sessionStorage.setItem(`${this.prefix}[${this.lastIndex}]`,JSON.stringify(n))}getItem(e){return this.currentIndex=Object(i.clamp)(this.currentIndex+e,0,this.history.length-1),this.history[this.currentIndex]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(82),p=n(80),m=n(132),g=n(86),f=n.n(g),_=n(810),b=n(84),v=n(103),y=n(81);let E=Object(y.a)("views.avatars.MemberStatusMessageAvatar")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"_onStatusMessageCommitted",()=>{this.setState({hasStatus:this.hasStatus})}),s()(this,"openMenu",()=>{this.setState({menuDisplayed:!0})}),s()(this,"closeMenu",()=>{this.setState({menuDisplayed:!1})}),this.state={hasStatus:this.hasStatus,menuDisplayed:!1},this._button=Object(c.createRef)()}componentDidMount(){if(this.props.member.userId!==h.a.get().getUserId())throw new Error("Cannot use MemberStatusMessageAvatar on anyone but the logged in user");if(!b.b.getValue("feature_custom_status"))return;const{user:e}=this.props.member;e&&e.on("User._unstable_statusMessage",this._onStatusMessageCommitted)}componentWillUnmount(){const{user:e}=this.props.member;e&&e.removeListener("User._unstable_statusMessage",this._onStatusMessageCommitted)}get hasStatus(){const{user:e}=this.props.member;return!!e&&!!e._unstable_statusMessage}render(){const e=l.a.createElement(m.a,{member:this.props.member,width:this.props.width,height:this.props.height,resizeMethod:this.props.resizeMethod});if(!b.b.getValue("feature_custom_status"))return e;const t=f()({mx_MemberStatusMessageAvatar:!0,mx_MemberStatusMessageAvatar_hasStatus:this.state.hasStatus});let n;if(this.state.menuDisplayed){const e=this._button.current.getBoundingClientRect(),t=16,r=1;n=l.a.createElement(v.b,{chevronOffset:(e.width-t)/2,chevronFace:"bottom",left:e.left+window.pageXOffset,top:e.top+window.pageYOffset-r,menuWidth:226,onFinished:this.closeMenu},l.a.createElement(_.a,{user:this.props.member.user,onFinished:this.closeMenu}))}return l.a.createElement(l.a.Fragment,null,l.a.createElement(v.c,{className:t,inputRef:this._button,onClick:this.openMenu,isExpanded:this.state.menuDisplayed,label:Object(p.a)("User Status")},e),n)}},s()(o,"propTypes",{member:d.a.object.isRequired,width:d.a.number,height:d.a.number,resizeMethod:d.a.string}),s()(o,"defaultProps",{width:40,height:40,resizeMethod:"crop"}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(82),m=n(89),g=n(85),f=n(81);let _=Object(f.a)("views.context_menus.StatusMessageContextMenu")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"_onStatusMessageCommitted",()=>{this.setState({message:this.comittedStatusMessage,waiting:!1})}),s()(this,"_onClearClick",e=>{p.a.get()._unstable_setStatusMessage(""),this.setState({waiting:!0})}),s()(this,"_onSubmit",e=>{e.preventDefault(),p.a.get()._unstable_setStatusMessage(this.state.message),this.setState({waiting:!0})}),s()(this,"_onStatusChange",e=>{this.setState({message:e.target.value})}),this.state={message:this.comittedStatusMessage}}componentDidMount(){const{user:e}=this.props;e&&e.on("User._unstable_statusMessage",this._onStatusMessageCommitted)}componentWillUnmount(){const{user:e}=this.props;e&&e.removeListener("User._unstable_statusMessage",this._onStatusMessageCommitted)}get comittedStatusMessage(){return this.props.user?this.props.user._unstable_statusMessage:""}render(){const e=m.getComponent("views.elements.Spinner");let t;t=this.comittedStatusMessage?this.state.message===this.comittedStatusMessage?l.a.createElement(g.a,{className:"mx_StatusMessageContextMenu_clear",onClick:this._onClearClick},l.a.createElement("span",null,Object(h.a)("Clear status"))):l.a.createElement(g.a,{className:"mx_StatusMessageContextMenu_submit",onClick:this._onSubmit},l.a.createElement("span",null,Object(h.a)("Update status"))):l.a.createElement(g.a,{className:"mx_StatusMessageContextMenu_submit",disabled:!this.state.message,onClick:this._onSubmit},l.a.createElement("span",null,Object(h.a)("Set status")));let n=null;this.state.waiting&&(n=l.a.createElement(e,{w:"24",h:"24"}));const r=l.a.createElement("form",{className:"mx_StatusMessageContextMenu_form",autoComplete:"off",onSubmit:this._onSubmit},l.a.createElement("input",{type:"text",className:"mx_StatusMessageContextMenu_message",key:"message",placeholder:Object(h.a)("Set a new status..."),autoFocus:!0,maxLength:"60",value:this.state.message,onChange:this._onStatusChange}),l.a.createElement("div",{className:"mx_StatusMessageContextMenu_actionContainer"},t,n));return l.a.createElement("div",{className:"mx_StatusMessageContextMenu"},r)}},s()(o,"propTypes",{user:d.a.object}),r=i))||r},function(e,t,n){"use strict";var r=n(80),o=n(85),i=n(86),a=n.n(i);t.a=e=>{const t=a()({mx_JumpToBottomButton:!0,mx_JumpToBottomButton_highlight:e.highlight});let n;return e.numUnreadMessages&&(n=React.createElement("div",{className:"mx_JumpToBottomButton_badge"},e.numUnreadMessages)),React.createElement("div",{className:t},React.createElement(o.a,{className:"mx_JumpToBottomButton_scrollDown",title:Object(r.a)("Scroll to most recent messages"),onClick:e.onScrollToBottomClick}),n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(80),p=n(85),m=n(81);let g=Object(m.a)("views.rooms.TopUnreadMessagesBar")((i=o=class extends l.a.Component{render(){return l.a.createElement("div",{className:"mx_TopUnreadMessagesBar"},l.a.createElement(p.a,{className:"mx_TopUnreadMessagesBar_scrollUp",title:Object(h.a)("Jump to first unread message."),onClick:this.props.onScrollUpClick}),l.a.createElement(p.a,{className:"mx_TopUnreadMessagesBar_markAsRead",title:Object(h.a)("Mark all as read"),onClick:this.props.onCloseClick}))}},s()(o,"propTypes",{onScrollUpClick:d.a.func,onCloseClick:d.a.func}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r,o=n(79),i=n.n(o),a=n(78),s=n(133),c=n(86),l=n.n(c),u=n(81);let d=Object(u.a)("structures.ToastContainer")(r=class extends a.Component{constructor(e,t){super(e,t),i()(this,"onToastStoreUpdate",()=>{this.setState({toasts:s.a.sharedInstance().getToasts(),countSeen:s.a.sharedInstance().getCountSeen()})}),this.state={toasts:s.a.sharedInstance().getToasts(),countSeen:s.a.sharedInstance().getCountSeen()},s.a.sharedInstance().on("update",this.onToastStoreUpdate)}componentWillUnmount(){s.a.sharedInstance().removeListener("update",this.onToastStoreUpdate)}render(){const e=this.state.toasts.length,t=e>1;let n,r;if(0!==e){const o=this.state.toasts[0],{title:i,icon:s,key:c,component:u,className:d,bodyClassName:h,props:p}=o,m=l()("mx_Toast_body",h),g=l()("mx_Toast_toast",d,{mx_Toast_hasIcon:s,["mx_Toast_icon_"+s]:s}),f=Object.assign({},p,{key:c,toastKey:c}),_=a.createElement(u,f);let b,v;(i&&t||this.state.countSeen>0)&&(b=` (${this.state.countSeen+1}/${this.state.countSeen+e})`),i&&(v=a.createElement("div",{className:"mx_Toast_title"},a.createElement("h2",null,i),a.createElement("span",null,b))),n=a.createElement("div",{className:g},v,a.createElement("div",{className:m},_)),r=l()("mx_ToastContainer",{mx_ToastContainer_stacked:t})}return n?a.createElement("div",{className:r,role:"alert"},n):null}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(89),d=n(80),h=n(90),p=n(83),m=n(85),g=n(94),f=n(117),_=n(81),b=n(248);let v=Object(_.a)("structures.MyGroups")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{groups:null,error:null}),s()(this,"_onCreateGroupClick",()=>{p.a.dispatch({action:"view_create_group"})})}componentDidMount(){this._fetch()}_fetch(){this.context.getJoinedGroups().then(e=>{this.setState({groups:e.groups,error:null})},e=>{"M_GUEST_ACCESS_FORBIDDEN"!==e.errcode?this.setState({groups:null,error:e}):this.setState({groups:[],error:null})})}render(){const e=h.a.get().brand,t=u.getComponent("elements.Spinner"),r=u.getComponent("rooms.SimpleRoomHeader"),o=u.getComponent("groups.GroupTile");let i,a;if(this.state.groups){const t=[];this.state.groups.forEach(e=>{t.push(l.a.createElement(o,{key:e,groupId:e}))}),a=t.length>0?l.a.createElement("h3",null,Object(d.a)("Your Communities")):l.a.createElement("div",null),i=t.length>0?l.a.createElement(f.a,{className:"mx_MyGroups_scrollable"},l.a.createElement("div",{className:"mx_MyGroups_microcopy"},l.a.createElement("p",null,Object(d.a)("Did you know: you can use communities to filter your %(brand)s experience!",{brand:e})),l.a.createElement("p",null,Object(d.a)("You can click on an avatar in the filter panel at any time to see only the rooms and people associated with that community."))),l.a.createElement("div",{className:"mx_MyGroups_joinedGroups"},t)):l.a.createElement("div",{className:"mx_MyGroups_placeholder"},Object(d.a)("You're not currently a member of any communities."))}else i=this.state.error?l.a.createElement("div",{className:"mx_MyGroups_error"},Object(d.a)("Error whilst fetching joined communities")):l.a.createElement(t,null);return l.a.createElement("div",{className:"mx_MyGroups"},l.a.createElement(r,{title:Object(d.a)("Communities"),icon:n(1381)}),l.a.createElement("div",{className:"mx_MyGroups_header"},l.a.createElement("div",{className:"mx_MyGroups_headerCard"},l.a.createElement(m.a,{className:"mx_MyGroups_headerCard_button",onClick:this._onCreateGroupClick}),l.a.createElement("div",{className:"mx_MyGroups_headerCard_content"},l.a.createElement("div",{className:"mx_MyGroups_headerCard_header"},Object(d.a)("Create a new community")),Object(d.a)("Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.")))),l.a.createElement(b.b,{featureId:"feature_spaces",title:Object(d.a)("Communities are changing to Spaces")}),l.a.createElement("div",{className:"mx_MyGroups_content"},a,i))}},s()(o,"contextType",g.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o=n(78),i=n.n(o),a=n(88),s=n.n(a),c=n(82),l=n(89),u=n(87),d=n(80),h=n(465),p=n(81),m=n(108),g=n(160);let f=Object(p.a)("structures.UserView")(r=class extends i.a.Component{static get propTypes(){return{userId:s.a.string}}constructor(e){super(e),this.state={}}componentDidMount(){this.props.userId&&this._loadProfileInfo()}componentDidUpdate(e){e.userId!==this.props.userId&&this.props.userId&&this._loadProfileInfo()}async _loadProfileInfo(){const e=c.a.get();let t;this.setState({loading:!0});try{t=await e.getProfileInfo(this.props.userId)}catch(e){const t=l.getComponent("dialogs.ErrorDialog");return u.a.createTrackedDialog(Object(d.a)("Could not load user profile"),"",t,{title:Object(d.a)("Could not load user profile"),description:e&&e.message?e.message:Object(d.a)("Operation failed")}),void this.setState({loading:!1})}const n=new m.b({type:"m.room.member",content:t}),r=new g.a(null,this.props.userId);r.setMembershipEvent(n),this.setState({member:r,loading:!1})}render(){if(this.state.loading){const e=l.getComponent("elements.Spinner");return i.a.createElement(e,null)}if(this.state.member){const e=l.getComponent("structures.RightPanel"),t=l.getComponent("structures.MainSplit"),n=i.a.createElement(e,{user:this.state.member});return i.a.createElement(t,{panel:n,resizeNotifier:this.props.resizeNotifier},i.a.createElement(h.a,null))}return i.a.createElement("div",null)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return V}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(82),p=n(89),m=n(83),g=n(531),f=n(131),_=n(80),b=n(85),v=n(817),y=n(346),E=n(347),S=n(87),w=n(86),C=n.n(w),T=n(123),x=n(162),k=n(478),F=n(114),O=n(229),R=n(2),D=n(251),I=n(117),A=n(100),N=n(81);const M=Object(_.b)('<h1>HTML for your community\'s page</h1>\n<p>\n Use the long description to introduce new members to the community, or distribute\n some important <a href="foo">links</a>\n</p>\n<p>\n You can even add images with Matrix URLs <img src="mxc://url" />\n</p>\n'),P=d.a.shape({room_id:d.a.string.isRequired,profile:d.a.shape({name:d.a.string,avatar_url:d.a.string,canonical_alias:d.a.string}).isRequired}),L=d.a.shape({summaryInfo:d.a.shape({user_id:d.a.string.isRequired,role_id:d.a.string,avatar_url:d.a.string,displayname:d.a.string}).isRequired});class j extends l.a.Component{constructor(...e){super(...e),s()(this,"onAddRoomsToSummaryClicked",e=>{e.preventDefault();const t=p.getComponent("dialogs.AddressPickerDialog");S.a.createTrackedDialog("Add Rooms to Group Summary","",t,{title:Object(_.a)("Add rooms to the community summary"),description:Object(_.a)("Which rooms would you like to add to this summary?"),placeholder:Object(_.a)("Room name or address"),button:Object(_.a)("Add to summary"),pickerType:"room",validAddressTypes:["mx-room-id"],groupId:this.props.groupId,onFinished:(e,t)=>{if(!e)return;const n=[];Promise.allSettled(t.map(e=>T.a.addRoomToGroupSummary(this.props.groupId,e.address).catch(()=>{n.push(e.address)}))).then(()=>{if(0===n.length)return;const e=p.getComponent("dialogs.ErrorDialog");S.a.createTrackedDialog("Failed to add the following room to the group summary","",e,{title:Object(_.a)("Failed to add the following rooms to the summary of %(groupId)s:",{groupId:this.props.groupId}),description:n.join(", ")})})}},null,!1,!0)})}render(){const e=this.props.editing?l.a.createElement(b.a,{className:"mx_GroupView_featuredThings_addButton",onClick:this.onAddRoomsToSummaryClicked},l.a.createElement("img",{src:n(818),width:"64",height:"64"}),l.a.createElement("div",{className:"mx_GroupView_featuredThings_addButton_label"},Object(_.a)("Add a Room"))):l.a.createElement("div",null),t=this.props.rooms.map(e=>l.a.createElement(U,{key:e.room_id,groupId:this.props.groupId,editing:this.props.editing,summaryInfo:e}));let r=l.a.createElement("div",null);return this.props.category&&this.props.category.profile&&(r=l.a.createElement("div",{className:"mx_GroupView_featuredThings_category"},this.props.category.profile.name)),l.a.createElement("div",{className:"mx_GroupView_featuredThings_container"},r,t,e)}}s()(j,"propTypes",{rooms:d.a.arrayOf(P).isRequired,category:d.a.shape({profile:d.a.shape({name:d.a.string}).isRequired}),groupId:d.a.string.isRequired,editing:d.a.bool.isRequired});class U extends l.a.Component{constructor(...e){super(...e),s()(this,"onClick",e=>{e.preventDefault(),e.stopPropagation(),m.a.dispatch({action:"view_room",room_alias:this.props.summaryInfo.profile.canonical_alias,room_id:this.props.summaryInfo.room_id})}),s()(this,"onDeleteClicked",e=>{e.preventDefault(),e.stopPropagation(),T.a.removeRoomFromGroupSummary(this.props.groupId,this.props.summaryInfo.room_id).catch(e=>{console.error("Error whilst removing room from group summary",e);const t=this.props.summaryInfo.name||this.props.summaryInfo.canonical_alias||this.props.summaryInfo.room_id,n=p.getComponent("dialogs.ErrorDialog");S.a.createTrackedDialog("Failed to remove room from group summary","",n,{title:Object(_.a)("Failed to remove the room from the summary of %(groupId)s",{groupId:this.props.groupId}),description:Object(_.a)("The room '%(roomName)s' could not be removed from the summary.",{roomName:t})})})})}render(){const e=p.getComponent("avatars.RoomAvatar"),t=this.props.summaryInfo.profile.name||this.props.summaryInfo.profile.canonical_alias||Object(_.a)("Unnamed Room"),r={roomId:this.props.summaryInfo.room_id,avatarUrl:this.props.summaryInfo.profile.avatar_url,name:t};let o=null;this.props.summaryInfo.profile&&this.props.summaryInfo.profile.canonical_alias&&(o=Object(F.f)(this.props.summaryInfo.profile.canonical_alias));let i=null;i=o?l.a.createElement("a",{href:o,onClick:this.onClick},t):l.a.createElement("span",null,t);const a=this.props.editing?l.a.createElement("img",{className:"mx_GroupView_featuredThing_deleteButton",src:n(819),width:"14",height:"14",alt:"Delete",onClick:this.onDeleteClicked}):l.a.createElement("div",null);return l.a.createElement(b.a,{className:"mx_GroupView_featuredThing",onClick:this.onClick},l.a.createElement(e,{oobData:r,width:64,height:64}),l.a.createElement("div",{className:"mx_GroupView_featuredThing_name"},i),a)}}s()(U,"propTypes",{summaryInfo:P.isRequired,editing:d.a.bool.isRequired,groupId:d.a.string.isRequired});class B extends l.a.Component{constructor(...e){super(...e),s()(this,"onAddUsersClicked",e=>{e.preventDefault();const t=p.getComponent("dialogs.AddressPickerDialog");S.a.createTrackedDialog("Add Users to Group Summary","",t,{title:Object(_.a)("Add users to the community summary"),description:Object(_.a)("Who would you like to add to this summary?"),placeholder:Object(_.a)("Name or Matrix ID"),button:Object(_.a)("Add to summary"),validAddressTypes:["mx-user-id"],groupId:this.props.groupId,shouldOmitSelf:!1,onFinished:(e,t)=>{if(!e)return;const n=[];Promise.allSettled(t.map(e=>T.a.addUserToGroupSummary(e.address).catch(()=>{n.push(e.address)}))).then(()=>{if(0===n.length)return;const e=p.getComponent("dialogs.ErrorDialog");S.a.createTrackedDialog("Failed to add the following users to the community summary","",e,{title:Object(_.a)("Failed to add the following users to the summary of %(groupId)s:",{groupId:this.props.groupId}),description:n.join(", ")})})}},null,!1,!0)})}render(){const e=this.props.editing?l.a.createElement(b.a,{className:"mx_GroupView_featuredThings_addButton",onClick:this.onAddUsersClicked},l.a.createElement("img",{src:n(818),width:"64",height:"64"}),l.a.createElement("div",{className:"mx_GroupView_featuredThings_addButton_label"},Object(_.a)("Add a User"))):l.a.createElement("div",null),t=this.props.users.map(e=>l.a.createElement(G,{key:e.user_id,summaryInfo:e,editing:this.props.editing,groupId:this.props.groupId}));let r=l.a.createElement("div",null);return this.props.role&&this.props.role.profile&&(r=l.a.createElement("div",{className:"mx_GroupView_featuredThings_category"},this.props.role.profile.name)),l.a.createElement("div",{className:"mx_GroupView_featuredThings_container"},r,t,e)}}s()(B,"propTypes",{users:d.a.arrayOf(L).isRequired,role:d.a.shape({profile:d.a.shape({name:d.a.string}).isRequired}),groupId:d.a.string.isRequired,editing:d.a.bool.isRequired});class G extends l.a.Component{constructor(...e){super(...e),s()(this,"onClick",e=>{e.preventDefault(),e.stopPropagation(),m.a.dispatch({action:"view_start_chat_or_reuse",user_id:this.props.summaryInfo.user_id})}),s()(this,"onDeleteClicked",e=>{e.preventDefault(),e.stopPropagation(),T.a.removeUserFromGroupSummary(this.props.groupId,this.props.summaryInfo.user_id).catch(e=>{console.error("Error whilst removing user from group summary",e);const t=this.props.summaryInfo.displayname||this.props.summaryInfo.user_id,n=p.getComponent("dialogs.ErrorDialog");S.a.createTrackedDialog("Failed to remove user from community summary","",n,{title:Object(_.a)("Failed to remove a user from the summary of %(groupId)s",{groupId:this.props.groupId}),description:Object(_.a)("The user '%(displayName)s' could not be removed from the summary.",{displayName:t})})})})}render(){const e=p.getComponent("avatars.BaseAvatar"),t=this.props.summaryInfo.displayname||this.props.summaryInfo.user_id,r=Object(F.h)(this.props.summaryInfo.user_id),o=l.a.createElement("a",{href:r,onClick:this.onClick},t),i=Object(A.b)(this.props.summaryInfo.avatar_url).getSquareThumbnailHttp(64),a=this.props.editing?l.a.createElement("img",{className:"mx_GroupView_featuredThing_deleteButton",src:n(819),width:"14",height:"14",alt:"Delete",onClick:this.onDeleteClicked}):l.a.createElement("div",null);return l.a.createElement(b.a,{className:"mx_GroupView_featuredThing",onClick:this.onClick},l.a.createElement(e,{name:t,url:i,width:64,height:64}),l.a.createElement("div",{className:"mx_GroupView_featuredThing_name"},o),a)}}s()(G,"propTypes",{summaryInfo:L.isRequired,editing:d.a.bool.isRequired,groupId:d.a.string.isRequired});let V=Object(N.a)("structures.GroupView")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{summary:null,isGroupPublicised:null,isUserPrivileged:null,groupRooms:null,groupRoomsLoading:null,error:null,editing:!1,saving:!1,uploadingAvatar:!1,avatarChanged:!1,membershipBusy:!1,publicityBusy:!1,inviterProfile:null,showRightPanel:D.a.getSharedInstance().isOpenForGroup}),s()(this,"_onRightPanelStoreUpdate",()=>{this.setState({showRightPanel:D.a.getSharedInstance().isOpenForGroup})}),s()(this,"_onGroupMyMembership",e=>{this._unmounted||e.groupId!==this.props.groupId||("leave"===e.myMembership&&this._closeSettings(),this.setState({membershipBusy:!1}))}),s()(this,"onGroupStoreUpdated",e=>{if(this._unmounted)return;const t=T.a.getSummary(this.props.groupId);t.profile&&["avatar_url","long_description","name","short_description"].forEach(e=>{t.profile[e]=t.profile[e]||""}),this.setState({summary:t,summaryLoading:!T.a.isStateReady(this.props.groupId,T.a.STATE_KEY.Summary),isGroupPublicised:T.a.getGroupPublicity(this.props.groupId),isUserPrivileged:T.a.isUserPrivileged(this.props.groupId),groupRooms:T.a.getGroupRooms(this.props.groupId),groupRoomsLoading:!T.a.isStateReady(this.props.groupId,T.a.STATE_KEY.GroupRooms),isUserMember:T.a.getGroupMembers(this.props.groupId).some(e=>e.userId===this._matrixClient.credentials.userId)}),this.props.groupIsNew&&e&&this._onEditClick()}),s()(this,"_onEditClick",()=>{this.setState({editing:!0,profileForm:Object.assign({},this.state.summary.profile),joinableForm:{policyType:this.state.summary.profile.is_openly_joinable?"open":"invite"}})}),s()(this,"_onShareClick",()=>{const e=p.getComponent("dialogs.ShareDialog");S.a.createTrackedDialog("share community dialog","",e,{target:this._matrixClient.getGroup(this.props.groupId)||new O.a(this.props.groupId)})}),s()(this,"_onCancelClick",()=>{this._closeSettings()}),s()(this,"_onAction",e=>{switch(e.action){case"close_settings":this.setState({editing:!1,profileForm:null})}}),s()(this,"_closeSettings",()=>{m.a.dispatch({action:"close_settings"})}),s()(this,"_onNameChange",e=>{const t=Object.assign(this.state.profileForm,{name:e});this.setState({profileForm:t})}),s()(this,"_onShortDescChange",e=>{const t=Object.assign(this.state.profileForm,{short_description:e});this.setState({profileForm:t})}),s()(this,"_onLongDescChange",e=>{const t=Object.assign(this.state.profileForm,{long_description:e.target.value});this.setState({profileForm:t})}),s()(this,"_onAvatarSelected",e=>{const t=e.target.files[0];t&&(this.setState({uploadingAvatar:!0}),this._matrixClient.uploadContent(t).then(e=>{const t=Object.assign(this.state.profileForm,{avatar_url:e});this.setState({uploadingAvatar:!1,profileForm:t,avatarChanged:!0})}).catch(e=>{this.setState({uploadingAvatar:!1});const t=p.getComponent("dialogs.ErrorDialog");console.error("Failed to upload avatar image",e),S.a.createTrackedDialog("Failed to upload image","",t,{title:Object(_.a)("Error"),description:Object(_.a)("Failed to upload image")})}))}),s()(this,"_onJoinableChange",e=>{this.setState({joinableForm:{policyType:e.target.value}})}),s()(this,"_onSaveClick",()=>{this.setState({saving:!0});(this.state.isUserPrivileged?this._saveGroup():Promise.resolve()).then(e=>{this.setState({saving:!1,editing:!1,summary:null}),this._initGroupStore(this.props.groupId),this.state.avatarChanged&&x.a.refreshGroupProfile(this._matrixClient,this.props.groupId)}).catch(e=>{this.setState({saving:!1});const t=p.getComponent("dialogs.ErrorDialog");console.error("Failed to save community profile",e),S.a.createTrackedDialog("Failed to update group","",t,{title:Object(_.a)("Error"),description:Object(_.a)("Failed to update community")})}).finally(()=>{this.setState({avatarChanged:!1})})}),s()(this,"_onAcceptInviteClick",async()=>{this.setState({membershipBusy:!0}),await Object(R.H)(500),T.a.acceptGroupInvite(this.props.groupId).then(()=>{}).catch(e=>{this.setState({membershipBusy:!1});const t=p.getComponent("dialogs.ErrorDialog");S.a.createTrackedDialog("Error accepting invite","",t,{title:Object(_.a)("Error"),description:Object(_.a)("Unable to accept invite")})})}),s()(this,"_onRejectInviteClick",async()=>{this.setState({membershipBusy:!0}),await Object(R.H)(500),T.a.leaveGroup(this.props.groupId).then(()=>{}).catch(e=>{this.setState({membershipBusy:!1});const t=p.getComponent("dialogs.ErrorDialog");S.a.createTrackedDialog("Error rejecting invite","",t,{title:Object(_.a)("Error"),description:Object(_.a)("Unable to reject invite")})})}),s()(this,"_onJoinClick",async()=>{this._matrixClient.isGuest()?m.a.dispatch({action:"require_registration",screen_after:{screen:"group/"+this.props.groupId}}):(this.setState({membershipBusy:!0}),await Object(R.H)(500),T.a.joinGroup(this.props.groupId).then(()=>{}).catch(e=>{this.setState({membershipBusy:!1});const t=p.getComponent("dialogs.ErrorDialog");S.a.createTrackedDialog("Error joining room","",t,{title:Object(_.a)("Error"),description:Object(_.a)("Unable to join community")})}))}),s()(this,"_onLeaveClick",()=>{const e=p.getComponent("dialogs.QuestionDialog"),t=this._leaveGroupWarnings();S.a.createTrackedDialog("Leave Group","",e,{title:Object(_.a)("Leave Community"),description:l.a.createElement("span",null,Object(_.a)("Leave %(groupName)s?",{groupName:this.props.groupId}),t),button:Object(_.a)("Leave"),danger:this.state.isUserPrivileged,onFinished:async e=>{e&&(this.setState({membershipBusy:!0}),await Object(R.H)(500),T.a.leaveGroup(this.props.groupId).then(()=>{}).catch(e=>{this.setState({membershipBusy:!1});const t=p.getComponent("dialogs.ErrorDialog");S.a.createTrackedDialog("Error leaving community","",t,{title:Object(_.a)("Error"),description:Object(_.a)("Unable to leave community")})}))}})}),s()(this,"_onAddRoomsClick",()=>{Object(k.a)(this.props.groupId)})}componentDidMount(){this._unmounted=!1,this._matrixClient=h.a.get(),this._matrixClient.on("Group.myMembership",this._onGroupMyMembership),this._initGroupStore(this.props.groupId,!0),this._dispatcherRef=m.a.register(this._onAction),this._rightPanelStoreToken=D.a.getSharedInstance().addListener(this._onRightPanelStoreUpdate)}componentWillUnmount(){this._unmounted=!0,this._matrixClient.removeListener("Group.myMembership",this._onGroupMyMembership),m.a.unregister(this._dispatcherRef),this._rightPanelStoreToken&&this._rightPanelStoreToken.remove()}UNSAFE_componentWillReceiveProps(e){this.props.groupId!==e.groupId&&this.setState({summary:null,error:null},()=>{this._initGroupStore(e.groupId)})}_initGroupStore(e,t){const n=this._matrixClient.getGroup(e);n&&n.inviter&&n.inviter.userId&&this._fetchInviterProfile(n.inviter.userId),T.a.registerListener(e,this.onGroupStoreUpdated.bind(this,t));let r=!1;T.a.on("error",(t,n,o)=>{this._unmounted||e!==n||("M_GUEST_ACCESS_FORBIDDEN"!==t.errcode||r||(m.a.dispatch({action:"do_after_sync_prepared",deferred_action:{action:"view_group",group_id:e}}),m.a.dispatch({action:"require_registration",screen_after:{screen:"group/"+e}}),r=!0),o===T.a.STATE_KEY.Summary&&this.setState({summary:null,error:t,editing:!1}))})}_fetchInviterProfile(e){this.setState({inviterProfileBusy:!0}),this._matrixClient.getProfileInfo(e).then(e=>{this._unmounted||this.setState({inviterProfile:{avatarUrl:e.avatar_url,displayName:e.displayname}})}).catch(e=>{console.error("Error getting group inviter profile",e)}).finally(()=>{this._unmounted||this.setState({inviterProfileBusy:!1})})}async _saveGroup(){await this._matrixClient.setGroupProfile(this.props.groupId,this.state.profileForm),await this._matrixClient.setGroupJoinPolicy(this.props.groupId,{type:this.state.joinableForm.policyType})}_leaveGroupWarnings(){const e=[];return this.state.isUserPrivileged&&e.push(l.a.createElement("span",{className:"warning"}," ",Object(_.a)("You are an administrator of this community. You will not be able to rejoin without an invite from another administrator."))),e}_getGroupSection(){const e=C()({mx_GroupView_group:this.state.editing,mx_GroupView_group_disabled:this.state.editing&&!this.state.isUserPrivileged}),t=this.state.editing?l.a.createElement("h2",null," ",Object(_.a)("Community Settings")," "):l.a.createElement("div",null),r=Object(g.a)("community-settings");let o=null;r&&this.state.isUserPrivileged&&(o=l.a.createElement("div",{className:"mx_GroupView_hostingSignup"},Object(_.a)("Want more than a community? <a>Get your own server</a>",{},{a:e=>l.a.createElement("a",{href:r,target:"_blank",rel:"noreferrer noopener"},e)}),l.a.createElement("a",{href:r,target:"_blank",rel:"noreferrer noopener"},l.a.createElement("img",{src:n(545),width:"11",height:"10",alt:""}))));const i=this.state.editing&&this.state.isUserPrivileged?l.a.createElement("div",{className:"mx_GroupView_changeDelayWarning"},Object(_.a)("Changes made to your community <bold1>name</bold1> and <bold2>avatar</bold2> might not be seen by other users for up to 30 minutes.",{},{bold1:e=>l.a.createElement("b",null," ",e," "),bold2:e=>l.a.createElement("b",null," ",e," ")})):l.a.createElement("div",null);return l.a.createElement("div",{className:e},t,o,i,this._getJoinableNode(),this._getLongDescriptionNode(),this._getRoomsNode())}_getRoomsNode(){const e=p.getComponent("rooms.RoomDetailList"),t=p.getComponent("elements.AccessibleButton"),r=p.getComponent("elements.Spinner"),o=p.getComponent("elements.TooltipButton"),i=this.state.editing?l.a.createElement(o,{helpText:Object(_.a)("These rooms are displayed to community members on the community page. Community members can join the rooms by clicking on them.")}):l.a.createElement("div",null),a=this.state.editing?l.a.createElement(t,{className:"mx_GroupView_rooms_header_addRow",onClick:this._onAddRoomsClick},l.a.createElement("div",{className:"mx_GroupView_rooms_header_addRow_button"},l.a.createElement("img",{src:n(1382),width:"24",height:"24"})),l.a.createElement("div",{className:"mx_GroupView_rooms_header_addRow_label"},Object(_.a)("Add rooms to this community"))):l.a.createElement("div",null);return l.a.createElement("div",{className:"mx_GroupView_rooms"},l.a.createElement("div",{className:"mx_GroupView_rooms_header"},l.a.createElement("h3",null,Object(_.a)("Rooms"),i),a),this.state.groupRoomsLoading?l.a.createElement(r,null):l.a.createElement(e,{rooms:this.state.groupRooms}))}_getFeaturedRoomsNode(){const e=this.state.summary,t=[],n={};e.rooms_section.rooms.forEach(e=>{if(null===e.category_id)t.push(e);else{let t=n[e.category_id];void 0===t&&(t=[],n[e.category_id]=t),t.push(e)}});const r=l.a.createElement(j,{rooms:t,groupId:this.props.groupId,editing:this.state.editing}),o=Object.keys(n).map(t=>{const r=e.rooms_section.categories[t];return l.a.createElement(j,{key:t,rooms:n[t],category:r,groupId:this.props.groupId,editing:this.state.editing})});return l.a.createElement("div",{className:"mx_GroupView_featuredThings"},l.a.createElement("div",{className:"mx_GroupView_featuredThings_header"},Object(_.a)("Featured Rooms:")),r,o)}_getFeaturedUsersNode(){const e=this.state.summary,t=[],n={};e.users_section.users.forEach(e=>{if(null===e.role_id)t.push(e);else{let t=n[e.role_id];void 0===t&&(t=[],n[e.role_id]=t),t.push(e)}});const r=l.a.createElement(B,{users:t,groupId:this.props.groupId,editing:this.state.editing}),o=Object.keys(n).map(t=>{const r=e.users_section.roles[t];return l.a.createElement(B,{key:t,users:n[t],role:r,groupId:this.props.groupId,editing:this.state.editing})});return l.a.createElement("div",{className:"mx_GroupView_featuredThings"},l.a.createElement("div",{className:"mx_GroupView_featuredThings_header"},Object(_.a)("Featured Users:")),r,o)}_getMembershipSection(){const e=p.getComponent("elements.Spinner"),t=p.getComponent("avatars.BaseAvatar"),n=this._matrixClient.getGroup(this.props.groupId);if(n&&"invite"===n.myMembership){if(this.state.membershipBusy||this.state.inviterProfileBusy)return l.a.createElement("div",{className:"mx_GroupView_membershipSection"},l.a.createElement(e,null));const r=this.state.inviterProfile&&this.state.inviterProfile.avatarUrl?Object(A.b)(this.state.inviterProfile.avatarUrl).getSquareThumbnailHttp(36):null,o=n.inviter||{};let i=o.userId;return this.state.inviterProfile&&(i=this.state.inviterProfile.displayName||o.userId),l.a.createElement("div",{className:"mx_GroupView_membershipSection mx_GroupView_membershipSection_invited"},l.a.createElement("div",{className:"mx_GroupView_membershipSubSection"},l.a.createElement("div",{className:"mx_GroupView_membershipSection_description"},l.a.createElement(t,{url:r,name:i,width:36,height:36}),Object(_.a)("%(inviter)s has invited you to join this community",{inviter:i||Object(_.a)("Someone")})),l.a.createElement("div",{className:"mx_GroupView_membership_buttonContainer"},l.a.createElement(b.a,{className:"mx_GroupView_textButton mx_RoomHeader_textButton",onClick:this._onAcceptInviteClick},Object(_.a)("Accept")),l.a.createElement(b.a,{className:"mx_GroupView_textButton mx_RoomHeader_textButton",onClick:this._onRejectInviteClick},Object(_.a)("Decline")))))}let r,o,i,a,s;if((!n||"leave"===n.myMembership)&&this.state.summary&&this.state.summary.profile&&Boolean(this.state.summary.profile.is_openly_joinable))a=Object(_.a)("Join this community"),s=this._onJoinClick,o="mx_GroupView_joinButton",r="mx_GroupView_membershipSection_leave";else{if(!n||"join"!==n.myMembership||!this.state.editing)return null;a=Object(_.a)("Leave this community"),s=this._onLeaveClick,i=this.state.isUserPrivileged?Object(_.a)("You are an administrator of this community"):Object(_.a)("You are a member of this community"),o={mx_GroupView_leaveButton:!0,mx_RoomHeader_textButton_danger:this.state.isUserPrivileged},r="mx_GroupView_membershipSection_joined"}const c=C()(["mx_RoomHeader_textButton","mx_GroupView_textButton"],o),u=C()("mx_GroupView_membershipSection",r);return l.a.createElement("div",{className:u},l.a.createElement("div",{className:"mx_GroupView_membershipSubSection"},this.state.membershipBusy?l.a.createElement(e,null):l.a.createElement("div",null),l.a.createElement("div",{className:"mx_GroupView_membership_buttonContainer"},l.a.createElement(b.a,{className:c,onClick:s,title:i},a))))}_getJoinableNode(){const e=p.getComponent("elements.InlineSpinner");return this.state.editing?l.a.createElement("div",null,l.a.createElement("h3",null,Object(_.a)("Who can join this community?"),this.state.groupJoinableLoading?l.a.createElement(e,null):l.a.createElement("div",null)),l.a.createElement("div",null,l.a.createElement("label",null,l.a.createElement("input",{type:"radio",value:"invite",checked:"invite"===this.state.joinableForm.policyType,onChange:this._onJoinableChange}),l.a.createElement("div",{className:"mx_GroupView_label_text"},Object(_.a)("Only people who have been invited")))),l.a.createElement("div",null,l.a.createElement("label",null,l.a.createElement("input",{type:"radio",value:"open",checked:"open"===this.state.joinableForm.policyType,onChange:this._onJoinableChange}),l.a.createElement("div",{className:"mx_GroupView_label_text"},Object(_.a)("Everyone"))))):null}_getLongDescriptionNode(){const e=this.state.summary;let t=null;e.profile&&e.profile.long_description?t=Object(f.h)(e.profile.long_description):this.state.isUserPrivileged&&(t=l.a.createElement("div",{className:"mx_GroupView_groupDesc_placeholder",onClick:this._onEditClick},Object(_.a)("Your community hasn't got a Long Description, a HTML page to show to community members.<br />Click here to open settings and give it one!",{},{br:l.a.createElement("br",null)})));const n=C()({mx_GroupView_groupDesc:!0,mx_GroupView_groupDesc_disabled:!this.state.isUserPrivileged});return this.state.editing?l.a.createElement("div",{className:n},l.a.createElement("h3",null," ",Object(_.a)("Long Description (HTML)")," "),l.a.createElement("textarea",{value:this.state.profileForm.long_description,placeholder:Object(_.a)(M),onChange:this._onLongDescChange,tabIndex:"4",key:"editLongDesc"})):l.a.createElement("div",{className:"mx_GroupView_groupDesc"},t)}render(){const e=p.getComponent("avatars.GroupAvatar"),t=p.getComponent("elements.Spinner");if(this.state.summaryLoading&&null===this.state.error||this.state.saving)return l.a.createElement(t,null);if(this.state.summary&&!this.state.error){const r=this.state.summary;let o,i,a;const s=[];if(this.state.editing&&this.state.isUserPrivileged){let e;if(this.state.uploadingAvatar)e=l.a.createElement(t,null);else{const t=p.getComponent("avatars.GroupAvatar");e=l.a.createElement(t,{groupId:this.props.groupId,groupName:this.state.profileForm.name,groupAvatarUrl:this.state.profileForm.avatar_url,width:28,height:28,resizeMethod:"crop"})}o=l.a.createElement("div",{className:"mx_GroupView_avatarPicker"},l.a.createElement("label",{htmlFor:"avatarInput",className:"mx_GroupView_avatarPicker_label"},e),l.a.createElement("div",{className:"mx_GroupView_avatarPicker_edit"},l.a.createElement("label",{htmlFor:"avatarInput",className:"mx_GroupView_avatarPicker_label"},l.a.createElement("img",{src:n(1383),alt:Object(_.a)("Upload avatar"),title:Object(_.a)("Upload avatar"),width:"17",height:"15"})),l.a.createElement("input",{id:"avatarInput",className:"mx_GroupView_uploadInput",type:"file",onChange:this._onAvatarSelected})));const r=p.getComponent("elements.EditableText");i=l.a.createElement(r,{className:"mx_GroupView_editable",placeholderClassName:"mx_GroupView_placeholder",placeholder:Object(_.a)("Community Name"),blurToCancel:!1,initialValue:this.state.profileForm.name,onValueChanged:this._onNameChange,tabIndex:"0",dir:"auto"}),a=l.a.createElement(r,{className:"mx_GroupView_editable",placeholderClassName:"mx_GroupView_placeholder",placeholder:Object(_.a)("Description"),blurToCancel:!1,initialValue:this.state.profileForm.short_description,onValueChanged:this._onShortDescChange,tabIndex:"0",dir:"auto"})}else{const t=this.state.isUserMember?this._onEditClick:null,n=r.profile?r.profile.avatar_url:null,s=r.profile?r.profile.name:null;o=l.a.createElement(e,{groupId:this.props.groupId,groupAvatarUrl:n,groupName:s,onClick:t,width:28,height:28}),i=r.profile&&r.profile.name?l.a.createElement("div",{onClick:t},l.a.createElement("span",null,r.profile.name),l.a.createElement("span",{className:"mx_GroupView_header_groupid"},"(",this.props.groupId,")")):l.a.createElement("span",{onClick:t},this.props.groupId),r.profile&&r.profile.short_description&&(a=l.a.createElement("span",{onClick:t},r.profile.short_description))}this.state.editing?(s.push(l.a.createElement(b.a,{className:"mx_GroupView_textButton mx_RoomHeader_textButton",key:"_saveButton",onClick:this._onSaveClick},Object(_.a)("Save"))),s.push(l.a.createElement(b.a,{className:"mx_RoomHeader_cancelButton",key:"_cancelButton",onClick:this._onCancelClick},l.a.createElement("img",{src:n(348),className:"mx_filterFlipColor",width:"18",height:"18",alt:Object(_.a)("Cancel")})))):(r.user&&"join"===r.user.membership&&s.push(l.a.createElement(b.a,{className:"mx_GroupHeader_button mx_GroupHeader_editButton",key:"_editButton",onClick:this._onEditClick,title:Object(_.a)("Community Settings")})),s.push(l.a.createElement(b.a,{className:"mx_GroupHeader_button mx_GroupHeader_shareButton",key:"_shareButton",onClick:this._onShareClick,title:Object(_.a)("Share Community")})));const c=this.state.showRightPanel?l.a.createElement(E.a,{groupId:this.props.groupId}):void 0,u={mx_GroupView_header:!0,"light-panel":!0,mx_GroupView_header_view:!this.state.editing,mx_GroupView_header_isUserMember:this.state.isUserMember};return l.a.createElement("main",{className:"mx_GroupView"},l.a.createElement("div",{className:C()(u)},l.a.createElement("div",{className:"mx_GroupView_header_leftCol"},l.a.createElement("div",{className:"mx_GroupView_header_avatar"},o),l.a.createElement("div",{className:"mx_GroupView_header_info"},l.a.createElement("div",{className:"mx_GroupView_header_name"},i),l.a.createElement("div",{className:"mx_GroupView_header_shortDesc"},a))),l.a.createElement("div",{className:"mx_GroupView_header_rightCol"},s),l.a.createElement(v.a,null)),l.a.createElement(y.a,{panel:c,resizeNotifier:this.props.resizeNotifier},l.a.createElement(I.a,{className:"mx_GroupView_body"},this._getMembershipSection(),this._getGroupSection())))}if(this.state.error){if(404===this.state.error.httpStatus)return l.a.createElement("div",{className:"mx_GroupView_error"},Object(_.a)("Community %(groupId)s not found",{groupId:this.props.groupId}));{let e;return"M_UNRECOGNIZED"===this.state.error.errcode&&(e=l.a.createElement("div",null,Object(_.a)("This homeserver does not support communities"))),l.a.createElement("div",{className:"mx_GroupView_error"},Object(_.a)("Failed to load %(groupId)s",{groupId:this.props.groupId}),e)}}return console.error("Invalid state for GroupView"),l.a.createElement("div",null)}},s()(o,"propTypes",{groupId:d.a.string.isRequired,groupIsNew:d.a.bool}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(483),u=n(484),d=n(121),h=n(91),p=n(81);const m=[d.c.GroupMemberInfo,d.c.GroupMemberList],g=[d.c.GroupRoomList,d.c.GroupRoomInfo];let f=Object(p.a)("views.right_panel.GroupHeaderButtons")(r=class extends u.b{constructor(e){super(e,u.a.Group),i()(this,"onMembersClicked",()=>{this.state.phase===d.c.GroupMemberInfo?this.setPhase(d.c.GroupMemberInfo):this.setPhase(d.c.GroupMemberList)}),i()(this,"onRoomsClicked",()=>{this.setPhase(d.c.GroupRoomList)})}onAction(e){e.action===h.a.ViewUser?e.member?this.setPhase(d.c.RoomMemberInfo,{member:e.member}):this.setPhase(d.c.GroupMemberList):"view_group"===e.action?this.setPhase(d.c.GroupMemberList):"view_group_room"===e.action?this.setPhase(d.c.GroupRoomInfo,{groupRoomId:e.groupRoomId,groupId:e.groupId}):"view_group_room_list"===e.action?this.setPhase(d.c.GroupRoomList):"view_group_member_list"===e.action?this.setPhase(d.c.GroupMemberList):"view_group_user"===e.action&&this.setPhase(d.c.GroupMemberInfo,{member:e.member})}renderButtons(){return s.a.createElement(s.a.Fragment,null,s.a.createElement(l.a,{name:"groupMembersButton",title:Object(c.a)("Members"),isHighlighted:this.isPhase(m),onClick:this.onMembersClicked,analytics:["Right Panel","Group Member List Button","click"]}),s.a.createElement(l.a,{name:"roomsButton",title:Object(c.a)("Rooms"),isHighlighted:this.isPhase(g),onClick:this.onRoomsClicked,analytics:["Right Panel","Group Room List Button","click"]}))}})||r},function(e,t){e.exports="img/icons-create-room.817ede2.svg"},function(e,t){e.exports="img/cancel-small.495f44c.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o=n(78),i=n.n(o),a=n(86),s=n.n(a),c=n(89),l=n(90),u=n(226),d=n(80),h=n(84),p=n(113),m=n(112),g=n(81),f=n(493);Object(d.b)("Sign in with SSO");let _=Object(g.a)("views.auth.Welcome")(r=class extends i.a.PureComponent{constructor(e){super(e),m.a.instance.track("onboarding_welcome")}render(){const e=c.getComponent("structures.EmbeddedPage"),t=l.a.get().embeddedPages;let n=null;return t&&(n=t.welcomeUrl),n||(n="welcome.html"),i.a.createElement(u.a,null,i.a.createElement("div",{className:s()("mx_Welcome",{mx_WelcomePage_registrationDisabled:!h.b.getValue(p.a.Registration)})},i.a.createElement(e,{className:"mx_WelcomePage",url:n,replaceMap:{"$riot:ssoUrl":"#/start_sso","$riot:casUrl":"#/start_cas"}}),i.a.createElement(f.a,null)))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,o=n(80),i=n(78),a=n.n(i),s=n(81);let c=Object(s.a)("views.auth.AuthFooter")(r=class extends a.a.Component{render(){return a.a.createElement("div",{className:"mx_AuthFooter"},a.a.createElement("a",{href:"https://matrix.org",target:"_blank",rel:"noreferrer noopener"},Object(o.a)("powered by Matrix")))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(231),l=n(254),u=n(95),d=n(80),h=n(85),p=n(90),m=n(101),g=n(189),f=n(174),_=n(157),b=n(81);let v=Object(b.a)("views.dialogs.ServerPickerDialog")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"defaultServer",void 0),i()(this,"fieldRef",Object(a.createRef)()),i()(this,"validatedConf",void 0),i()(this,"onDefaultChosen",()=>{this.setState({defaultChosen:!0})}),i()(this,"onOtherChosen",()=>{this.setState({defaultChosen:!1})}),i()(this,"onHomeserverChange",e=>{this.setState({otherHomeserver:e.target.value})}),i()(this,"validate",Object(_.a)({deriveData:async({value:e})=>{let t=e.trim();if(!t.includes("://"))try{const e=await c.a.findClientConfig(t);return this.validatedConf=l.a.buildValidatedConfigFromDiscovery(t,e),{}}catch(e){console.error(`Attempted ${t} as a server_name but it failed`,e)}t.includes("://")||(t="https://"+t);try{return this.validatedConf=await l.a.validateServerConfigWithStaticUrls(t),{}}catch(e){console.error(e);if(l.a.authComponentStateForError(e).serverErrorIsFatal){let t=Object(d.a)("Unable to validate homeserver");return e.translatedMessage&&(t=e.translatedMessage),{error:t}}try{return this.validatedConf=await l.a.validateServerConfigWithStaticUrls(t,null,!0),{}}catch(e){return console.error(e),{error:Object(d.a)("Invalid URL")}}}},rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(d.a)("Specify a homeserver")},{key:"valid",test:async function({value:e},{error:t}){return!e||!t},invalid:function({error:e}){return e}}]})),i()(this,"onHomeserverValidate",e=>this.validate(e)),i()(this,"onSubmit",async e=>{e.preventDefault();if(!await this.fieldRef.current.validate({allowEmpty:!1})&&!this.state.defaultChosen)return this.fieldRef.current.focus(),void this.fieldRef.current.validate({allowEmpty:!1,focused:!0});this.props.onFinished(this.state.defaultChosen?this.defaultServer:this.validatedConf)});const t=p.a.get();this.defaultServer=t.validated_server_config;const{serverConfig:n}=this.props;let r="";n.isDefault||(r=n.isNameResolvable&&n.hsName?n.hsName:n.hsUrl),this.state={defaultChosen:n.isDefault,otherHomeserver:r}}render(){let e;"matrix.org"===this.defaultServer.hsName&&(e=Object(d.a)("Matrix.org is the biggest public homeserver in the world, so it’s a good place for many."));let t=this.defaultServer.hsName;return this.defaultServer.hsNameIsDifferent&&(t=s.a.createElement(f.a,{class:"mx_Login_underlinedServerName",tooltip:this.defaultServer.hsUrl},this.defaultServer.hsName)),s.a.createElement(u.a,{title:this.props.title||Object(d.a)("Sign into your homeserver"),className:"mx_ServerPickerDialog",contentId:"mx_ServerPickerDialog",onFinished:this.props.onFinished,fixedWidth:!1,hasCancel:!0},s.a.createElement("form",{className:"mx_Dialog_content",id:"mx_ServerPickerDialog",onSubmit:this.onSubmit},s.a.createElement("p",null,Object(d.a)("We call the places where you can host your account ‘homeservers’.")," ",e),s.a.createElement(g.a,{name:"defaultChosen",value:"true",checked:this.state.defaultChosen,onChange:this.onDefaultChosen},t),s.a.createElement(g.a,{name:"defaultChosen",value:"false",className:"mx_ServerPickerDialog_otherHomeserverRadio",checked:!this.state.defaultChosen,onChange:this.onOtherChosen,childrenInLabel:!1},s.a.createElement(m.a,{type:"text",className:"mx_ServerPickerDialog_otherHomeserver",label:Object(d.a)("Other homeserver"),onChange:this.onHomeserverChange,onFocus:this.onOtherChosen,ref:this.fieldRef,onValidate:this.onHomeserverValidate,value:this.state.otherHomeserver,validateOnChange:!1,validateOnFocus:!1,id:"mx_homeserverInput"})),s.a.createElement("p",null,Object(d.a)("Use your preferred Matrix homeserver if you have one, or host your own.")),s.a.createElement(h.a,{className:"mx_ServerPickerDialog_continue",kind:"primary",onClick:this.onSubmit},Object(d.a)("Continue")),s.a.createElement("h4",null,Object(d.a)("Learn more")),s.a.createElement("a",{href:"https://matrix.org/faq/#what-is-a-homeserver%3F",target:"_blank",rel:"noreferrer noopener"},Object(d.a)("About homeservers"))))}})||r},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(80);const o=/^[0-9 -.]+$/;function i(e){return o.test(e)}const a=127462-"A".charCodeAt(0),s=/^[A-Z]{2}$/,c=e=>s.test(e)?String.fromCodePoint(...e.split("").map(e=>a+e.charCodeAt(0))):"",l=[{iso2:"GB",name:Object(r.b)("United Kingdom"),prefix:"44"},{iso2:"US",name:Object(r.b)("United States"),prefix:"1"},{iso2:"AF",name:Object(r.b)("Afghanistan"),prefix:"93"},{iso2:"AX",name:Object(r.b)("Åland Islands"),prefix:"358"},{iso2:"AL",name:Object(r.b)("Albania"),prefix:"355"},{iso2:"DZ",name:Object(r.b)("Algeria"),prefix:"213"},{iso2:"AS",name:Object(r.b)("American Samoa"),prefix:"1"},{iso2:"AD",name:Object(r.b)("Andorra"),prefix:"376"},{iso2:"AO",name:Object(r.b)("Angola"),prefix:"244"},{iso2:"AI",name:Object(r.b)("Anguilla"),prefix:"1"},{iso2:"AQ",name:Object(r.b)("Antarctica"),prefix:"672"},{iso2:"AG",name:Object(r.b)("Antigua & Barbuda"),prefix:"1"},{iso2:"AR",name:Object(r.b)("Argentina"),prefix:"54"},{iso2:"AM",name:Object(r.b)("Armenia"),prefix:"374"},{iso2:"AW",name:Object(r.b)("Aruba"),prefix:"297"},{iso2:"AU",name:Object(r.b)("Australia"),prefix:"61"},{iso2:"AT",name:Object(r.b)("Austria"),prefix:"43"},{iso2:"AZ",name:Object(r.b)("Azerbaijan"),prefix:"994"},{iso2:"BS",name:Object(r.b)("Bahamas"),prefix:"1"},{iso2:"BH",name:Object(r.b)("Bahrain"),prefix:"973"},{iso2:"BD",name:Object(r.b)("Bangladesh"),prefix:"880"},{iso2:"BB",name:Object(r.b)("Barbados"),prefix:"1"},{iso2:"BY",name:Object(r.b)("Belarus"),prefix:"375"},{iso2:"BE",name:Object(r.b)("Belgium"),prefix:"32"},{iso2:"BZ",name:Object(r.b)("Belize"),prefix:"501"},{iso2:"BJ",name:Object(r.b)("Benin"),prefix:"229"},{iso2:"BM",name:Object(r.b)("Bermuda"),prefix:"1"},{iso2:"BT",name:Object(r.b)("Bhutan"),prefix:"975"},{iso2:"BO",name:Object(r.b)("Bolivia"),prefix:"591"},{iso2:"BA",name:Object(r.b)("Bosnia"),prefix:"387"},{iso2:"BW",name:Object(r.b)("Botswana"),prefix:"267"},{iso2:"BV",name:Object(r.b)("Bouvet Island"),prefix:"47"},{iso2:"BR",name:Object(r.b)("Brazil"),prefix:"55"},{iso2:"IO",name:Object(r.b)("British Indian Ocean Territory"),prefix:"246"},{iso2:"VG",name:Object(r.b)("British Virgin Islands"),prefix:"1"},{iso2:"BN",name:Object(r.b)("Brunei"),prefix:"673"},{iso2:"BG",name:Object(r.b)("Bulgaria"),prefix:"359"},{iso2:"BF",name:Object(r.b)("Burkina Faso"),prefix:"226"},{iso2:"BI",name:Object(r.b)("Burundi"),prefix:"257"},{iso2:"KH",name:Object(r.b)("Cambodia"),prefix:"855"},{iso2:"CM",name:Object(r.b)("Cameroon"),prefix:"237"},{iso2:"CA",name:Object(r.b)("Canada"),prefix:"1"},{iso2:"CV",name:Object(r.b)("Cape Verde"),prefix:"238"},{iso2:"BQ",name:Object(r.b)("Caribbean Netherlands"),prefix:"599"},{iso2:"KY",name:Object(r.b)("Cayman Islands"),prefix:"1"},{iso2:"CF",name:Object(r.b)("Central African Republic"),prefix:"236"},{iso2:"TD",name:Object(r.b)("Chad"),prefix:"235"},{iso2:"CL",name:Object(r.b)("Chile"),prefix:"56"},{iso2:"CN",name:Object(r.b)("China"),prefix:"86"},{iso2:"CX",name:Object(r.b)("Christmas Island"),prefix:"61"},{iso2:"CC",name:Object(r.b)("Cocos (Keeling) Islands"),prefix:"61"},{iso2:"CO",name:Object(r.b)("Colombia"),prefix:"57"},{iso2:"KM",name:Object(r.b)("Comoros"),prefix:"269"},{iso2:"CG",name:Object(r.b)("Congo - Brazzaville"),prefix:"242"},{iso2:"CD",name:Object(r.b)("Congo - Kinshasa"),prefix:"243"},{iso2:"CK",name:Object(r.b)("Cook Islands"),prefix:"682"},{iso2:"CR",name:Object(r.b)("Costa Rica"),prefix:"506"},{iso2:"HR",name:Object(r.b)("Croatia"),prefix:"385"},{iso2:"CU",name:Object(r.b)("Cuba"),prefix:"53"},{iso2:"CW",name:Object(r.b)("Curaçao"),prefix:"599"},{iso2:"CY",name:Object(r.b)("Cyprus"),prefix:"357"},{iso2:"CZ",name:Object(r.b)("Czech Republic"),prefix:"420"},{iso2:"CI",name:Object(r.b)("Côte d’Ivoire"),prefix:"225"},{iso2:"DK",name:Object(r.b)("Denmark"),prefix:"45"},{iso2:"DJ",name:Object(r.b)("Djibouti"),prefix:"253"},{iso2:"DM",name:Object(r.b)("Dominica"),prefix:"1"},{iso2:"DO",name:Object(r.b)("Dominican Republic"),prefix:"1"},{iso2:"EC",name:Object(r.b)("Ecuador"),prefix:"593"},{iso2:"EG",name:Object(r.b)("Egypt"),prefix:"20"},{iso2:"SV",name:Object(r.b)("El Salvador"),prefix:"503"},{iso2:"GQ",name:Object(r.b)("Equatorial Guinea"),prefix:"240"},{iso2:"ER",name:Object(r.b)("Eritrea"),prefix:"291"},{iso2:"EE",name:Object(r.b)("Estonia"),prefix:"372"},{iso2:"ET",name:Object(r.b)("Ethiopia"),prefix:"251"},{iso2:"FK",name:Object(r.b)("Falkland Islands"),prefix:"500"},{iso2:"FO",name:Object(r.b)("Faroe Islands"),prefix:"298"},{iso2:"FJ",name:Object(r.b)("Fiji"),prefix:"679"},{iso2:"FI",name:Object(r.b)("Finland"),prefix:"358"},{iso2:"FR",name:Object(r.b)("France"),prefix:"33"},{iso2:"GF",name:Object(r.b)("French Guiana"),prefix:"594"},{iso2:"PF",name:Object(r.b)("French Polynesia"),prefix:"689"},{iso2:"TF",name:Object(r.b)("French Southern Territories"),prefix:"262"},{iso2:"GA",name:Object(r.b)("Gabon"),prefix:"241"},{iso2:"GM",name:Object(r.b)("Gambia"),prefix:"220"},{iso2:"GE",name:Object(r.b)("Georgia"),prefix:"995"},{iso2:"DE",name:Object(r.b)("Germany"),prefix:"49"},{iso2:"GH",name:Object(r.b)("Ghana"),prefix:"233"},{iso2:"GI",name:Object(r.b)("Gibraltar"),prefix:"350"},{iso2:"GR",name:Object(r.b)("Greece"),prefix:"30"},{iso2:"GL",name:Object(r.b)("Greenland"),prefix:"299"},{iso2:"GD",name:Object(r.b)("Grenada"),prefix:"1"},{iso2:"GP",name:Object(r.b)("Guadeloupe"),prefix:"590"},{iso2:"GU",name:Object(r.b)("Guam"),prefix:"1"},{iso2:"GT",name:Object(r.b)("Guatemala"),prefix:"502"},{iso2:"GG",name:Object(r.b)("Guernsey"),prefix:"44"},{iso2:"GN",name:Object(r.b)("Guinea"),prefix:"224"},{iso2:"GW",name:Object(r.b)("Guinea-Bissau"),prefix:"245"},{iso2:"GY",name:Object(r.b)("Guyana"),prefix:"592"},{iso2:"HT",name:Object(r.b)("Haiti"),prefix:"509"},{iso2:"HM",name:Object(r.b)("Heard & McDonald Islands"),prefix:"672"},{iso2:"HN",name:Object(r.b)("Honduras"),prefix:"504"},{iso2:"HK",name:Object(r.b)("Hong Kong"),prefix:"852"},{iso2:"HU",name:Object(r.b)("Hungary"),prefix:"36"},{iso2:"IS",name:Object(r.b)("Iceland"),prefix:"354"},{iso2:"IN",name:Object(r.b)("India"),prefix:"91"},{iso2:"ID",name:Object(r.b)("Indonesia"),prefix:"62"},{iso2:"IR",name:Object(r.b)("Iran"),prefix:"98"},{iso2:"IQ",name:Object(r.b)("Iraq"),prefix:"964"},{iso2:"IE",name:Object(r.b)("Ireland"),prefix:"353"},{iso2:"IM",name:Object(r.b)("Isle of Man"),prefix:"44"},{iso2:"IL",name:Object(r.b)("Israel"),prefix:"972"},{iso2:"IT",name:Object(r.b)("Italy"),prefix:"39"},{iso2:"JM",name:Object(r.b)("Jamaica"),prefix:"1"},{iso2:"JP",name:Object(r.b)("Japan"),prefix:"81"},{iso2:"JE",name:Object(r.b)("Jersey"),prefix:"44"},{iso2:"JO",name:Object(r.b)("Jordan"),prefix:"962"},{iso2:"KZ",name:Object(r.b)("Kazakhstan"),prefix:"7"},{iso2:"KE",name:Object(r.b)("Kenya"),prefix:"254"},{iso2:"KI",name:Object(r.b)("Kiribati"),prefix:"686"},{iso2:"XK",name:Object(r.b)("Kosovo"),prefix:"383"},{iso2:"KW",name:Object(r.b)("Kuwait"),prefix:"965"},{iso2:"KG",name:Object(r.b)("Kyrgyzstan"),prefix:"996"},{iso2:"LA",name:Object(r.b)("Laos"),prefix:"856"},{iso2:"LV",name:Object(r.b)("Latvia"),prefix:"371"},{iso2:"LB",name:Object(r.b)("Lebanon"),prefix:"961"},{iso2:"LS",name:Object(r.b)("Lesotho"),prefix:"266"},{iso2:"LR",name:Object(r.b)("Liberia"),prefix:"231"},{iso2:"LY",name:Object(r.b)("Libya"),prefix:"218"},{iso2:"LI",name:Object(r.b)("Liechtenstein"),prefix:"423"},{iso2:"LT",name:Object(r.b)("Lithuania"),prefix:"370"},{iso2:"LU",name:Object(r.b)("Luxembourg"),prefix:"352"},{iso2:"MO",name:Object(r.b)("Macau"),prefix:"853"},{iso2:"MK",name:Object(r.b)("Macedonia"),prefix:"389"},{iso2:"MG",name:Object(r.b)("Madagascar"),prefix:"261"},{iso2:"MW",name:Object(r.b)("Malawi"),prefix:"265"},{iso2:"MY",name:Object(r.b)("Malaysia"),prefix:"60"},{iso2:"MV",name:Object(r.b)("Maldives"),prefix:"960"},{iso2:"ML",name:Object(r.b)("Mali"),prefix:"223"},{iso2:"MT",name:Object(r.b)("Malta"),prefix:"356"},{iso2:"MH",name:Object(r.b)("Marshall Islands"),prefix:"692"},{iso2:"MQ",name:Object(r.b)("Martinique"),prefix:"596"},{iso2:"MR",name:Object(r.b)("Mauritania"),prefix:"222"},{iso2:"MU",name:Object(r.b)("Mauritius"),prefix:"230"},{iso2:"YT",name:Object(r.b)("Mayotte"),prefix:"262"},{iso2:"MX",name:Object(r.b)("Mexico"),prefix:"52"},{iso2:"FM",name:Object(r.b)("Micronesia"),prefix:"691"},{iso2:"MD",name:Object(r.b)("Moldova"),prefix:"373"},{iso2:"MC",name:Object(r.b)("Monaco"),prefix:"377"},{iso2:"MN",name:Object(r.b)("Mongolia"),prefix:"976"},{iso2:"ME",name:Object(r.b)("Montenegro"),prefix:"382"},{iso2:"MS",name:Object(r.b)("Montserrat"),prefix:"1"},{iso2:"MA",name:Object(r.b)("Morocco"),prefix:"212"},{iso2:"MZ",name:Object(r.b)("Mozambique"),prefix:"258"},{iso2:"MM",name:Object(r.b)("Myanmar"),prefix:"95"},{iso2:"NA",name:Object(r.b)("Namibia"),prefix:"264"},{iso2:"NR",name:Object(r.b)("Nauru"),prefix:"674"},{iso2:"NP",name:Object(r.b)("Nepal"),prefix:"977"},{iso2:"NL",name:Object(r.b)("Netherlands"),prefix:"31"},{iso2:"NC",name:Object(r.b)("New Caledonia"),prefix:"687"},{iso2:"NZ",name:Object(r.b)("New Zealand"),prefix:"64"},{iso2:"NI",name:Object(r.b)("Nicaragua"),prefix:"505"},{iso2:"NE",name:Object(r.b)("Niger"),prefix:"227"},{iso2:"NG",name:Object(r.b)("Nigeria"),prefix:"234"},{iso2:"NU",name:Object(r.b)("Niue"),prefix:"683"},{iso2:"NF",name:Object(r.b)("Norfolk Island"),prefix:"672"},{iso2:"KP",name:Object(r.b)("North Korea"),prefix:"850"},{iso2:"MP",name:Object(r.b)("Northern Mariana Islands"),prefix:"1"},{iso2:"NO",name:Object(r.b)("Norway"),prefix:"47"},{iso2:"OM",name:Object(r.b)("Oman"),prefix:"968"},{iso2:"PK",name:Object(r.b)("Pakistan"),prefix:"92"},{iso2:"PW",name:Object(r.b)("Palau"),prefix:"680"},{iso2:"PS",name:Object(r.b)("Palestine"),prefix:"970"},{iso2:"PA",name:Object(r.b)("Panama"),prefix:"507"},{iso2:"PG",name:Object(r.b)("Papua New Guinea"),prefix:"675"},{iso2:"PY",name:Object(r.b)("Paraguay"),prefix:"595"},{iso2:"PE",name:Object(r.b)("Peru"),prefix:"51"},{iso2:"PH",name:Object(r.b)("Philippines"),prefix:"63"},{iso2:"PN",name:Object(r.b)("Pitcairn Islands"),prefix:"870"},{iso2:"PL",name:Object(r.b)("Poland"),prefix:"48"},{iso2:"PT",name:Object(r.b)("Portugal"),prefix:"351"},{iso2:"PR",name:Object(r.b)("Puerto Rico"),prefix:"1"},{iso2:"QA",name:Object(r.b)("Qatar"),prefix:"974"},{iso2:"RO",name:Object(r.b)("Romania"),prefix:"40"},{iso2:"RU",name:Object(r.b)("Russia"),prefix:"7"},{iso2:"RW",name:Object(r.b)("Rwanda"),prefix:"250"},{iso2:"RE",name:Object(r.b)("Réunion"),prefix:"262"},{iso2:"WS",name:Object(r.b)("Samoa"),prefix:"685"},{iso2:"SM",name:Object(r.b)("San Marino"),prefix:"378"},{iso2:"SA",name:Object(r.b)("Saudi Arabia"),prefix:"966"},{iso2:"SN",name:Object(r.b)("Senegal"),prefix:"221"},{iso2:"RS",name:Object(r.b)("Serbia"),prefix:"381 p"},{iso2:"SC",name:Object(r.b)("Seychelles"),prefix:"248"},{iso2:"SL",name:Object(r.b)("Sierra Leone"),prefix:"232"},{iso2:"SG",name:Object(r.b)("Singapore"),prefix:"65"},{iso2:"SX",name:Object(r.b)("Sint Maarten"),prefix:"1"},{iso2:"SK",name:Object(r.b)("Slovakia"),prefix:"421"},{iso2:"SI",name:Object(r.b)("Slovenia"),prefix:"386"},{iso2:"SB",name:Object(r.b)("Solomon Islands"),prefix:"677"},{iso2:"SO",name:Object(r.b)("Somalia"),prefix:"252"},{iso2:"ZA",name:Object(r.b)("South Africa"),prefix:"27"},{iso2:"GS",name:Object(r.b)("South Georgia & South Sandwich Islands"),prefix:"500"},{iso2:"KR",name:Object(r.b)("South Korea"),prefix:"82"},{iso2:"SS",name:Object(r.b)("South Sudan"),prefix:"211"},{iso2:"ES",name:Object(r.b)("Spain"),prefix:"34"},{iso2:"LK",name:Object(r.b)("Sri Lanka"),prefix:"94"},{iso2:"BL",name:Object(r.b)("St. Barthélemy"),prefix:"590"},{iso2:"SH",name:Object(r.b)("St. Helena"),prefix:"290 n"},{iso2:"KN",name:Object(r.b)("St. Kitts & Nevis"),prefix:"1"},{iso2:"LC",name:Object(r.b)("St. Lucia"),prefix:"1"},{iso2:"MF",name:Object(r.b)("St. Martin"),prefix:"590"},{iso2:"PM",name:Object(r.b)("St. Pierre & Miquelon"),prefix:"508"},{iso2:"VC",name:Object(r.b)("St. Vincent & Grenadines"),prefix:"1"},{iso2:"SD",name:Object(r.b)("Sudan"),prefix:"249"},{iso2:"SR",name:Object(r.b)("Suriname"),prefix:"597"},{iso2:"SJ",name:Object(r.b)("Svalbard & Jan Mayen"),prefix:"47"},{iso2:"SZ",name:Object(r.b)("Swaziland"),prefix:"268"},{iso2:"SE",name:Object(r.b)("Sweden"),prefix:"46"},{iso2:"CH",name:Object(r.b)("Switzerland"),prefix:"41"},{iso2:"SY",name:Object(r.b)("Syria"),prefix:"963"},{iso2:"ST",name:Object(r.b)("São Tomé & Príncipe"),prefix:"239"},{iso2:"TW",name:Object(r.b)("Taiwan"),prefix:"886"},{iso2:"TJ",name:Object(r.b)("Tajikistan"),prefix:"992"},{iso2:"TZ",name:Object(r.b)("Tanzania"),prefix:"255"},{iso2:"TH",name:Object(r.b)("Thailand"),prefix:"66"},{iso2:"TL",name:Object(r.b)("Timor-Leste"),prefix:"670"},{iso2:"TG",name:Object(r.b)("Togo"),prefix:"228"},{iso2:"TK",name:Object(r.b)("Tokelau"),prefix:"690"},{iso2:"TO",name:Object(r.b)("Tonga"),prefix:"676"},{iso2:"TT",name:Object(r.b)("Trinidad & Tobago"),prefix:"1"},{iso2:"TN",name:Object(r.b)("Tunisia"),prefix:"216"},{iso2:"TR",name:Object(r.b)("Turkey"),prefix:"90"},{iso2:"TM",name:Object(r.b)("Turkmenistan"),prefix:"993"},{iso2:"TC",name:Object(r.b)("Turks & Caicos Islands"),prefix:"1"},{iso2:"TV",name:Object(r.b)("Tuvalu"),prefix:"688"},{iso2:"VI",name:Object(r.b)("U.S. Virgin Islands"),prefix:"1"},{iso2:"UG",name:Object(r.b)("Uganda"),prefix:"256"},{iso2:"UA",name:Object(r.b)("Ukraine"),prefix:"380"},{iso2:"AE",name:Object(r.b)("United Arab Emirates"),prefix:"971"},{iso2:"UY",name:Object(r.b)("Uruguay"),prefix:"598"},{iso2:"UZ",name:Object(r.b)("Uzbekistan"),prefix:"998"},{iso2:"VU",name:Object(r.b)("Vanuatu"),prefix:"678"},{iso2:"VA",name:Object(r.b)("Vatican City"),prefix:"39"},{iso2:"VE",name:Object(r.b)("Venezuela"),prefix:"58"},{iso2:"VN",name:Object(r.b)("Vietnam"),prefix:"84"},{iso2:"WF",name:Object(r.b)("Wallis & Futuna"),prefix:"681"},{iso2:"EH",name:Object(r.b)("Western Sahara"),prefix:"212"},{iso2:"YE",name:Object(r.b)("Yemen"),prefix:"967"},{iso2:"ZM",name:Object(r.b)("Zambia"),prefix:"260"},{iso2:"ZW",name:Object(r.b)("Zimbabwe"),prefix:"263"}]},function(e,t,n){"use strict";var r=n(78),o=n(80),i=n(101),a=n(112),s=n(157),c=n(194),l=n(95),u=n(116);const d=Object(s.a)({rules:[{key:"email",test:({value:e})=>!e||c.a(e),invalid:()=>Object(o.a)("Doesn't look like a valid email address")}]});t.a=({onFinished:e})=>{const[t,n]=Object(r.useState)(""),s=Object(r.useRef)(),c=async n=>{if(n.preventDefault(),t){if(!await s.current.validate({allowEmpty:!1}))return s.current.focus(),void s.current.validate({allowEmpty:!1,focused:!0})}e(!0,t)};return r.createElement(l.a,{title:Object(o.a)("Continuing without email"),className:"mx_RegistrationEmailPromptDialog",contentId:"mx_RegistrationEmailPromptDialog",onFinished:()=>e(!1),fixedWidth:!1},r.createElement("div",{className:"mx_Dialog_content",id:"mx_RegistrationEmailPromptDialog"},r.createElement("p",null,Object(o.a)("Just a heads up, if you don't add an email and forget your password, you could <b>permanently lose access to your account</b>.",{},{b:e=>r.createElement("b",null,e)})),r.createElement("form",{onSubmit:c},r.createElement(i.a,{ref:s,autoFocus:!0,type:"text",label:Object(o.a)("Email (optional)"),value:t,onChange:e=>{n(e.target.value)},onValidate:async e=>await d(e),onFocus:()=>a.a.instance.track("onboarding_registration_email2_focus"),onBlur:()=>a.a.instance.track("onboarding_registration_email2_blur")}))),r.createElement(u.a,{primaryButton:Object(o.a)("Continue"),onPrimaryButtonClick:c,hasCancel:!1}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,o=n(78),i=n.n(o),a=n(226),s=n(826),c=n(827),l=n(81);let u=Object(l.a)("structures.auth.E2eSetup")(r=class extends i.a.Component{render(){return i.a.createElement(a.a,null,i.a.createElement(s.a,null,i.a.createElement(c.a,{onFinished:this.props.onFinished,accountPassword:this.props.accountPassword,tokenLogin:this.props.tokenLogin})))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,o=n(78),i=n.n(o),a=n(81);let s=Object(a.a)("views.auth.CompleteSecurityBody")(r=class extends i.a.PureComponent{render(){return i.a.createElement("div",{className:"mx_CompleteSecurityBody"},this.props.children)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(82),l=n(80),u=n(87),d=n(203),h=n(116),p=n(95),m=n(97),g=n(494),f=n(81);let _=Object(f.a)("views.dialogs.security.CreateCrossSigningDialog")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"doBootstrapUIAuth",async e=>{if(this.state.canUploadKeysWithPasswordOnly&&this.state.accountPassword)await e({type:"m.login.password",identifier:{type:"m.id.user",user:c.a.get().getUserId()},user:c.a.get().getUserId(),password:this.state.accountPassword});else if(this.props.tokenLogin)await e({});else{const t={[d.c.PHASE_PREAUTH]:{title:Object(l.a)("Use Single Sign On to continue"),body:Object(l.a)("To continue, use Single Sign On to prove your identity."),continueText:Object(l.a)("Single Sign On"),continueKind:"primary"},[d.c.PHASE_POSTAUTH]:{title:Object(l.a)("Confirm encryption setup"),body:Object(l.a)("Click the button below to confirm setting up encryption."),continueText:Object(l.a)("Confirm"),continueKind:"primary"}},{finished:n}=u.a.createTrackedDialog("Cross-signing keys dialog","",g.a,{title:Object(l.a)("Setting up keys"),matrixClient:c.a.get(),makeRequest:e,aestheticsForStagePhases:{[d.c.LOGIN_TYPE]:t,[d.c.UNSTABLE_LOGIN_TYPE]:t}}),[r]=await n;if(!r)throw new Error("Cross-signing key upload auth canceled")}}),i()(this,"bootstrapCrossSigning",async()=>{this.setState({error:null});const e=c.a.get();try{await e.bootstrapCrossSigning({authUploadDeviceSigningKeys:this.doBootstrapUIAuth}),this.props.onFinished(!0)}catch(e){if(this.props.tokenLogin)return void this.props.onFinished(!1);this.setState({error:e}),console.error("Error bootstrapping cross-signing",e)}}),i()(this,"onCancel",()=>{this.props.onFinished(!1)}),this.state={error:null,canUploadKeysWithPasswordOnly:!!e.accountPassword||null,accountPassword:e.accountPassword||""},this.state.accountPassword||this.queryKeyUploadAuth()}componentDidMount(){this.bootstrapCrossSigning()}async queryKeyUploadAuth(){try{await c.a.get().uploadDeviceSigningKeys(null,{}),console.log("uploadDeviceSigningKeys unexpectedly succeeded without UI auth!")}catch(e){if(!e.data||!e.data.flows)return void console.log("uploadDeviceSigningKeys advertised no flows!");const t=e.data.flows.some(e=>1===e.stages.length&&"m.login.password"===e.stages[0]);this.setState({canUploadKeysWithPasswordOnly:t})}}render(){let e;return e=this.state.error?s.a.createElement("div",null,s.a.createElement("p",null,Object(l.a)("Unable to set up keys")),s.a.createElement("div",{className:"mx_Dialog_buttons"},s.a.createElement(h.a,{primaryButton:Object(l.a)("Retry"),onPrimaryButtonClick:this.bootstrapCrossSigning,onCancel:this.onCancel}))):s.a.createElement("div",null,s.a.createElement(m.a,null)),s.a.createElement(p.a,{className:"mx_CreateCrossSigningDialog",onFinished:this.props.onFinished,title:Object(l.a)("Setting up keys"),hasCancel:!1,fixedWidth:!1},s.a.createElement("div",null,e))}})||r},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return p}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(112),h=n(81);let p=Object(h.a)("views.auth.CaptchaForm")((i=o=class extends l.a.Component{constructor(e){super(e),s()(this,"captchaWidgetId",void 0),s()(this,"recaptchaContainer",Object(c.createRef)()),this.state={errorText:void 0},d.a.instance.track("onboarding_grecaptcha_begin")}componentDidMount(){if(this.isRecaptchaReady())this.onCaptchaLoaded();else{console.log("Loading recaptcha script..."),window.mxOnRecaptchaLoaded=()=>{this.onCaptchaLoaded()};const e=document.createElement("script");e.setAttribute("src","https://www.recaptcha.net/recaptcha/api.js?onload=mxOnRecaptchaLoaded&render=explicit"),this.recaptchaContainer.current.appendChild(e)}}componentWillUnmount(){this.resetRecaptcha()}isRecaptchaReady(){return"undefined"!=typeof window&&void 0!==e.grecaptcha&&"function"==typeof e.grecaptcha.render}renderRecaptcha(t){if(!this.isRecaptchaReady())throw console.error("grecaptcha not loaded!"),new Error("Recaptcha did not load successfully");const n=this.props.sitePublicKey;if(!n)throw console.error("No public key for recaptcha!"),new Error("This server has not supplied enough information for Recaptcha authentication");console.info("Rendering to %s",t),this.captchaWidgetId=e.grecaptcha.render(t,{sitekey:n,callback:this.props.onCaptchaResponse})}resetRecaptcha(){var t,n;this.captchaWidgetId&&(null===(t=e)||void 0===t||null===(n=t.grecaptcha)||void 0===n||n.reset(this.captchaWidgetId))}onCaptchaLoaded(){console.log("Loaded recaptcha script.");try{this.renderRecaptcha("mx_recaptcha"),this.setState({errorText:null}),d.a.instance.track("onboarding_grecaptcha_loaded")}catch(e){this.setState({errorText:e.toString()}),d.a.instance.track("onboarding_grecaptcha_error",{error:e.toString()})}}render(){let e=null;return this.state.errorText&&(e=l.a.createElement("div",{className:"error"},this.state.errorText)),l.a.createElement("div",{ref:this.recaptchaContainer},l.a.createElement("p",null,Object(u.a)("This homeserver would like to make sure you are not a robot.")),l.a.createElement("div",{id:"mx_recaptcha"}),e)}},s()(o,"defaultProps",{onCaptchaResponse:()=>{}}),r=i))||r}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r,o=n(79),i=n.n(o),a=n(134),s=n(78),c=n.n(s),l=n(80),u=n(282),d=n(254),h=n(86),p=n.n(h),m=n(264),g=n(82),f=n(226),_=n(284),b=n(83),v=n(355),y=n(351),E=n(81),S=n(352),w=n(85),C=n(356),T=n(357),x=n(354),k=n(97);function F(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}let O=Object(E.a)("structures.auth.Registration")(r=class extends c.a.Component{constructor(e){super(e),i()(this,"loginLogic",void 0),i()(this,"onFormSubmit",async e=>{this.setState({errorText:"",busy:!0,formVals:e,doingUIAuth:!0})}),i()(this,"requestEmailToken",(e,t,n,r)=>this.state.matrixClient.requestRegisterEmailToken(e,t,n,this.props.makeRegistrationUrl({client_secret:t,hs_url:this.state.matrixClient.getHomeserverUrl(),is_url:this.state.matrixClient.getIdentityServerUrl(),session_id:r}))),i()(this,"onUIAuthFinished",async(e,t)=>{if(!e){let e=t.message||t.toString();if("M_RESOURCE_LIMIT_EXCEEDED"===t.errcode){const n=Object(u.a)(t.data.limit_type,t.data.admin_contact,{monthly_active_user:Object(l.b)("This homeserver has hit its Monthly Active User limit."),hs_blocked:Object(l.b)("This homeserver has been blocked by it's administrator."),"":Object(l.b)("This homeserver has exceeded one of its resource limits.")}),r=Object(u.a)(t.data.limit_type,t.data.admin_contact,{"":Object(l.b)("Please <a>contact your service administrator</a> to continue using this service.")});e=c.a.createElement("div",null,c.a.createElement("p",null,n),c.a.createElement("p",null,r))}else if(t.required_stages&&t.required_stages.indexOf("m.login.msisdn")>-1){let n=!1;for(const e of t.available_flows)n=n||e.stages.includes("m.login.msisdn");n||(e=Object(l.a)("This server does not support authentication with a phone number."))}else"M_USER_IN_USE"===t.errcode&&(e=Object(l.a)("That username already exists, please try another."));return void this.setState({busy:!1,doingUIAuth:!1,errorText:e})}g.a.setJustRegisteredUserId(t.user_id);const n={doingUIAuth:!1,registeredUsername:t.user_id,differentLoggedInUserId:null,completedNoSignin:!1,busy:!0},[r,o]=await m.b();r&&!o&&r!==t.userId&&(console.log(`Found a session for ${r} but ${t.userId} has just registered.`),n.differentLoggedInUserId=r),t.access_token?(await this.props.onLoggedIn({userId:t.user_id,deviceId:t.device_id,homeserverUrl:this.state.matrixClient.getHomeserverUrl(),identityServerUrl:this.state.matrixClient.getIdentityServerUrl(),accessToken:t.access_token},this.state.formVals.password),this.setupPushers()):(n.busy=!1,n.completedNoSignin=!0),this.setState(n)}),i()(this,"onLoginClick",e=>{e.preventDefault(),e.stopPropagation(),this.props.onLoginClick()}),i()(this,"onGoToFormClicked",e=>{e.preventDefault(),e.stopPropagation(),this.replaceClient(this.props.serverConfig),this.setState({busy:!1,doingUIAuth:!1})}),i()(this,"makeRegisterRequest",e=>{let t=Boolean(this.state.formVals.email);this.state.formVals.password||(t=null);const n={username:this.state.formVals.username,password:this.state.formVals.password,initial_device_display_name:this.props.defaultDeviceDisplayName,auth:void 0,inhibit_login:void 0};return e&&(n.auth=e),null!=t&&(n.inhibit_login=t),this.state.matrixClient.registerRequest(n)}),i()(this,"onLoginClickWithCheck",async e=>{e.preventDefault();const t=await m.h({ignoreGuest:!0});return t||this.props.onLoginClick(),t}),this.state={busy:!1,errorText:null,formVals:{email:this.props.email},doingUIAuth:Boolean(this.props.sessionId),flows:null,completedNoSignin:!1,serverIsAlive:!0,serverErrorIsFatal:!1,serverDeadError:""};const{hsUrl:t,isUrl:n}=this.props.serverConfig;this.loginLogic=new _.b(t,n,null,{defaultDeviceDisplayName:"Element login check"})}componentDidMount(){this.replaceClient(this.props.serverConfig)}UNSAFE_componentWillReceiveProps(e){e.serverConfig.hsUrl===this.props.serverConfig.hsUrl&&e.serverConfig.isUrl===this.props.serverConfig.isUrl||this.replaceClient(e.serverConfig)}async replaceClient(e){this.setState({errorText:null,serverDeadError:null,serverErrorIsFatal:!1,busy:!0});try{await d.a.validateServerConfigWithStaticUrls(e.hsUrl,e.isUrl),this.setState({serverIsAlive:!0,serverErrorIsFatal:!1})}catch(e){if(this.setState(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({busy:!1},d.a.authComponentStateForError(e,"register"))),this.state.serverErrorIsFatal)return}const{hsUrl:t,isUrl:n}=e,r=Object(a.createClient)({baseUrl:t,idBaseUrl:n});let o;this.loginLogic.setHomeserverUrl(t),this.loginLogic.setIdentityServerUrl(n);try{o=(await this.loginLogic.getFlows()).find(e=>"m.login.sso"===e.type||"m.login.cas"===e.type)}catch(e){console.error("Failed to get login flows to check for SSO support",e)}this.setState({matrixClient:r,ssoFlow:o,busy:!1});const s=e=>{this.setState({errorText:Object(l.a)("Unable to query for supported registration methods."),flows:[]})};try{this.state.doingUIAuth||(await this.makeRegisterRequest(null),console.log("Expecting 401 from register request but got success!"))}catch(e){401===e.httpStatus?this.setState({flows:e.data.flows}):403===e.httpStatus||"M_FORBIDDEN"===e.errcode?o?b.a.dispatch({action:"start_login"}):this.setState({serverErrorIsFatal:!0,errorText:Object(l.a)("Registration has been disabled on this homeserver."),flows:[]}):(console.log("Unable to query for supported registration methods.",e),s())}}setupPushers(){if(!this.props.brand)return Promise.resolve();const e=g.a.get();return e.getPushers().then(t=>{const n=t.pushers;for(let t=0;t<n.length;++t)if("email"===n[t].kind){const r=n[t];r.data={brand:this.props.brand},e.setPusher(r).then(()=>{console.log("Set email branding to "+this.props.brand)},e=>{console.error("Couldn't set email branding: "+e)})}},e=>{console.error("Couldn't get pushers: "+e)})}getUIAuthInputs(){return{emailAddress:this.state.formVals.email,phoneCountry:this.state.formVals.phoneCountry,phoneNumber:this.state.formVals.phoneNumber}}renderRegisterComponent(){if(this.state.matrixClient&&this.state.doingUIAuth)return c.a.createElement(x.b,{matrixClient:this.state.matrixClient,makeRequest:this.makeRegisterRequest,onAuthFinished:this.onUIAuthFinished,inputs:this.getUIAuthInputs(),requestEmailToken:this.requestEmailToken,sessionId:this.props.sessionId,clientSecret:this.props.clientSecret,emailSid:this.props.idSid,poll:!0});if(!this.state.matrixClient&&!this.state.busy)return null;if(this.state.busy||!this.state.flows)return c.a.createElement("div",{className:"mx_AuthBody_spinner"},c.a.createElement(k.a,null));if(this.state.flows.length){let e;if(this.state.ssoFlow){let t;(this.state.ssoFlow.identity_providers||[]).length>1&&(t=c.a.createElement("h3",{className:"mx_AuthBody_centered"},Object(l.a)("Continue with %(ssoButtons)s",{ssoButtons:""}).trim())),e=c.a.createElement(c.a.Fragment,null,t,c.a.createElement(v.a,{matrixClient:this.loginLogic.createTemporaryClient(),flow:this.state.ssoFlow,loginType:"m.login.sso"===this.state.ssoFlow.type?"sso":"cas",fragmentAfterLogin:this.props.fragmentAfterLogin}),c.a.createElement("h3",{className:"mx_AuthBody_centered"},Object(l.a)("%(ssoButtons)s Or %(usernamePassword)s",{ssoButtons:"",usernamePassword:""}).trim()))}return c.a.createElement(c.a.Fragment,null,e,c.a.createElement(S.b,{defaultUsername:this.state.formVals.username,defaultEmail:this.state.formVals.email,defaultPhoneCountry:this.state.formVals.phoneCountry,defaultPhoneNumber:this.state.formVals.phoneNumber,defaultPassword:this.state.formVals.password,onRegisterClick:this.onFormSubmit,flows:this.state.flows,serverConfig:this.props.serverConfig,canSubmit:!this.state.serverErrorIsFatal}))}}render(){let e;const t=this.state.errorText;let n;if(t&&(e=c.a.createElement("div",{className:"mx_Login_error"},t)),!this.state.serverIsAlive){const e=p()({mx_Login_error:!0,mx_Login_serverError:!0,mx_Login_serverErrorNonFatal:!this.state.serverErrorIsFatal});n=c.a.createElement("div",{className:e},this.state.serverDeadError)}const r=c.a.createElement("span",{className:"mx_AuthBody_changeFlow"},Object(l.a)("Already have an account? <a>Sign in here</a>",{},{a:e=>c.a.createElement("a",{onClick:this.onLoginClick,href:"#"},e)}));let o,i;if(this.state.doingUIAuth&&(o=c.a.createElement("a",{className:"mx_AuthBody_changeFlow",onClick:this.onGoToFormClicked,href:"#"},Object(l.a)("Go back"))),this.state.completedNoSignin){let e;e=this.state.differentLoggedInUserId?c.a.createElement("div",null,c.a.createElement("p",null,Object(l.a)("Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).",{newAccountId:this.state.registeredUsername,loggedInUserId:this.state.differentLoggedInUserId})),c.a.createElement("p",null,c.a.createElement(w.a,{element:"span",className:"mx_linkButton",onClick:async e=>{await this.onLoginClickWithCheck(e)&&b.a.dispatch({action:"view_welcome_page"})}},Object(l.a)("Continue with previous account")))):this.state.formVals.password?c.a.createElement("h3",null,Object(l.a)("<a>Log in</a> to your new account.",{},{a:e=>c.a.createElement("a",{href:"#/login",onClick:this.onLoginClickWithCheck},e)})):c.a.createElement("h3",null,Object(l.a)("You can now close this window or <a>log in</a> to your new account.",{},{a:e=>c.a.createElement("a",{href:"#/login",onClick:this.onLoginClickWithCheck},e)})),i=c.a.createElement("div",null,c.a.createElement("h2",null,Object(l.a)("Registration Successful")),e)}else i=c.a.createElement("div",null,c.a.createElement("h2",null,Object(l.a)("Create account")),e,n,c.a.createElement(y.a,{title:Object(l.a)("Host account on"),dialogTitle:Object(l.a)("Decide where your account is hosted"),serverConfig:this.props.serverConfig,onServerConfigChange:this.state.doingUIAuth?void 0:this.props.onServerConfigChange}),this.renderRegisterComponent(),o,r);return c.a.createElement(f.a,null,c.a.createElement(T.a,null),c.a.createElement(C.a,null,i))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,o=n(78),i=n.n(o),a=n(81);let s=Object(a.a)("views.auth.AuthHeaderLogo")(r=class extends i.a.PureComponent{render(){return i.a.createElement("div",{className:"mx_AuthHeaderLogo"},"Matrix")}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(284),u=n(90),d=n(282),h=n(254),p=n(86),m=n.n(p),g=n(226),f=n(111),_=n(84),b=n(113),v=n(112),y=n(832),E=n(147),S=n(97),w=n(355),C=n(351),T=n(81),x=n(356),k=n(357);function F(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}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(c.b)("Invalid homeserver discovery response"),Object(c.b)("Failed to get autodiscovery configuration from server"),Object(c.b)("Invalid base_url for m.homeserver"),Object(c.b)("Homeserver URL does not appear to be a valid Matrix homeserver"),Object(c.b)("Invalid identity server discovery response"),Object(c.b)("Invalid base_url for m.identity_server"),Object(c.b)("Identity server URL does not appear to be a valid identity server"),Object(c.b)("General failure");let R=Object(T.a)("structures.auth.LoginComponent")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"unmounted",!1),i()(this,"loginLogic",void 0),i()(this,"stepRendererMap",void 0),i()(this,"isBusy",()=>this.state.busy||this.props.busy),i()(this,"onPasswordLogin",async(e,t,n,r)=>{if(!this.state.serverIsAlive){this.setState({busy:!0});let e=!0;try{await h.a.validateServerConfigWithStaticUrls(this.props.serverConfig.hsUrl,this.props.serverConfig.isUrl),this.setState({serverIsAlive:!0,errorText:""})}catch(t){const n=h.a.authComponentStateForError(t);this.setState(O({busy:!1,busyLoggingIn:!1},n)),e=!n.serverErrorIsFatal}if(!e)return}this.setState({busy:!0,busyLoggingIn:!0,errorText:null,loginIncorrect:!1}),this.loginLogic.loginViaPassword(e,t,n,r).then(e=>{this.setState({serverIsAlive:!0}),this.props.onLoggedIn(e,r)},t=>{if(this.unmounted)return;let n;const r=e.indexOf("@")>0;if(400===t.httpStatus&&r)n=Object(c.a)("This homeserver does not support login using email address.");else if("M_RESOURCE_LIMIT_EXCEEDED"===t.errcode){const e=Object(d.a)(t.data.limit_type,t.data.admin_contact,{monthly_active_user:Object(c.b)("This homeserver has hit its Monthly Active User limit."),hs_blocked:Object(c.b)("This homeserver has been blocked by it's administrator."),"":Object(c.b)("This homeserver has exceeded one of its resource limits.")}),r=Object(d.a)(t.data.limit_type,t.data.admin_contact,{"":Object(c.b)("Please <a>contact your service administrator</a> to continue using this service.")});n=s.a.createElement("div",null,s.a.createElement("div",null,e),s.a.createElement("div",{className:"mx_Login_smallError"},r))}else n=401===t.httpStatus||403===t.httpStatus?"M_USER_DEACTIVATED"===t.errcode?Object(c.a)("This account has been deactivated."):u.a.get().disable_custom_urls?s.a.createElement("div",null,s.a.createElement("div",null,Object(c.a)("Incorrect username and/or password.")),s.a.createElement("div",{className:"mx_Login_smallError"},Object(c.a)("Please note you are logging into the %(hs)s server, not matrix.org.",{hs:this.props.serverConfig.hsName}))):Object(c.a)("Incorrect username and/or password."):this.errorTextFromError(t);this.setState({busy:!1,busyLoggingIn:!1,errorText:n,loginIncorrect:401===t.httpStatus||403===t.httpStatus})})}),i()(this,"onUsernameChanged",e=>{this.setState({username:e})}),i()(this,"onUsernameBlur",async e=>{const t="@"===e[0];if(this.setState({username:e,busy:t,errorText:null,canTryLogin:!0}),t){const t=e.split(":").slice(1).join(":");try{const e=await h.a.validateServerName(t);this.props.onServerConfigChange(e),this.setState({busy:!1})}catch(e){console.error("Problem parsing URL or unhandled error doing .well-known discovery:",e);let t=Object(c.a)("Failed to perform homeserver discovery");e.translatedMessage&&(t=e.translatedMessage);let n=t,r={};h.a.isLivelinessError(e)&&(n=this.state.errorText,r=h.a.authComponentStateForError(e)),this.setState(O({busy:!1,errorText:n},r))}}}),i()(this,"onPhoneCountryChanged",e=>{this.setState({phoneCountry:e})}),i()(this,"onPhoneNumberChanged",e=>{this.setState({phoneNumber:e})}),i()(this,"onRegisterClick",e=>{e.preventDefault(),e.stopPropagation(),this.props.onRegisterClick()}),i()(this,"onTryRegisterClick",e=>{var t,n;const r=null===(t=this.state.flows)||void 0===t?void 0:t.find(e=>"m.login.password"===e.type),o=null===(n=this.state.flows)||void 0===n?void 0:n.find(e=>"m.login.sso"===e.type||"m.login.cas"===e.type);if(o&&!r){e.preventDefault(),e.stopPropagation();const t="m.login.sso"===o.type?"sso":"cas";f.a.get().startSingleSignOn(this.loginLogic.createTemporaryClient(),t,this.props.fragmentAfterLogin)}else this.onRegisterClick(e)}),i()(this,"isSupportedFlow",e=>!!this.stepRendererMap[e.type]||(console.log("Skipping flow",e,"due to unsupported login type",e.type),!1)),i()(this,"renderPasswordStep",()=>s.a.createElement(y.a,{onSubmit:this.onPasswordLogin,username:this.state.username,phoneCountry:this.state.phoneCountry,phoneNumber:this.state.phoneNumber,onUsernameChanged:this.onUsernameChanged,onUsernameBlur:this.onUsernameBlur,onPhoneCountryChanged:this.onPhoneCountryChanged,onPhoneNumberChanged:this.onPhoneNumberChanged,onForgotPasswordClick:this.props.onForgotPasswordClick,loginIncorrect:this.state.loginIncorrect,serverConfig:this.props.serverConfig,disableSubmit:this.isBusy(),busy:this.props.isSyncing||this.state.busyLoggingIn})),i()(this,"renderSsoStep",e=>{const t=this.state.flows.find(t=>t.type==="m.login."+e);return s.a.createElement(w.a,{matrixClient:this.loginLogic.createTemporaryClient(),flow:t,loginType:e,fragmentAfterLogin:this.props.fragmentAfterLogin,primary:!this.state.flows.find(e=>"m.login.password"===e.type)})}),this.state={busy:!1,busyLoggingIn:null,errorText:null,loginIncorrect:!1,canTryLogin:!0,flows:null,username:e.defaultUsername?e.defaultUsername:"",phoneCountry:null,phoneNumber:"",serverIsAlive:!0,serverErrorIsFatal:!1,serverDeadError:""},this.stepRendererMap={"m.login.password":this.renderPasswordStep,"m.login.cas":()=>this.renderSsoStep("cas"),"m.login.sso":()=>this.renderSsoStep("sso")},v.a.instance.track("onboarding_login_begin")}UNSAFE_componentWillMount(){this.initLoginLogic(this.props.serverConfig)}componentWillUnmount(){this.unmounted=!0}UNSAFE_componentWillReceiveProps(e){e.serverConfig.hsUrl===this.props.serverConfig.hsUrl&&e.serverConfig.isUrl===this.props.serverConfig.isUrl||this.initLoginLogic(e.serverConfig)}async initLoginLogic({hsUrl:e,isUrl:t}){let n=!1;this.props.serverConfig.isDefault&&e===this.props.serverConfig.hsUrl&&t===this.props.serverConfig.isUrl&&(n=!0);const r=n?this.props.fallbackHsUrl:null,o=new l.b(e,t,r,{defaultDeviceDisplayName:this.props.defaultDeviceDisplayName});this.loginLogic=o,this.setState({busy:!0,loginIncorrect:!1});try{const{warning:n}=await h.a.validateServerConfigWithStaticUrls(e,t);n?this.setState(O(O({},h.a.authComponentStateForError(n)),{},{errorText:""})):this.setState({serverIsAlive:!0,errorText:""})}catch(e){this.setState(O({busy:!1},h.a.authComponentStateForError(e)))}o.getFlows().then(e=>{const t=e.filter(this.isSupportedFlow);t.length>0?this.setState({flows:t}):this.setState({errorText:Object(c.a)("This homeserver doesn't offer any login flows which are supported by this client.")})},e=>{this.setState({errorText:this.errorTextFromError(e),loginIncorrect:!1,canTryLogin:!1})}).finally(()=>{this.setState({busy:!1})})}errorTextFromError(e){let t=e.errcode;!t&&e.httpStatus&&(t="HTTP "+e.httpStatus);let n=Object(c.a)("There was a problem communicating with the homeserver, please try again later.")+(t?" ("+t+")":"");return"rejected"===e.cors&&(n="https:"!==window.location.protocol||!this.props.serverConfig.hsUrl.startsWith("http:")&&this.props.serverConfig.hsUrl.startsWith("http")?s.a.createElement("span",null,Object(c.a)("Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.",{},{a:e=>s.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:this.props.serverConfig.hsUrl},e)})):s.a.createElement("span",null,Object(c.a)("Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.",{},{a:e=>s.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://www.google.com/search?&q=enable%20unsafe%20scripts"},e)}))),n}renderLoginComponentForFlows(){if(!this.state.flows)return null;const e=["m.login.password","m.login.sso"].map(e=>this.state.flows.find(t=>t.type===e)).filter(Boolean);return s.a.createElement(s.a.Fragment,null,e.map(e=>{const t=this.stepRendererMap[e.type];return s.a.createElement(s.a.Fragment,{key:e.type},t())}))}render(){const e=this.isBusy()&&!this.state.busyLoggingIn?s.a.createElement("div",{className:"mx_Login_loader"},s.a.createElement(S.a,null)):null,t=this.state.errorText;let n,r,o;if(t&&(n=s.a.createElement("div",{className:"mx_Login_error"},t)),!this.state.serverIsAlive){const e=m()({mx_Login_error:!0,mx_Login_serverError:!0,mx_Login_serverErrorNonFatal:!this.state.serverErrorIsFatal});r=s.a.createElement("div",{className:e},this.state.serverDeadError)}return this.props.isSyncing||this.state.busyLoggingIn?o=s.a.createElement("div",{className:"mx_AuthBody_paddedFooter"},s.a.createElement("div",{className:"mx_AuthBody_paddedFooter_title"},s.a.createElement(E.a,{w:20,h:20}),this.props.isSyncing?Object(c.a)("Syncing..."):Object(c.a)("Signing In...")),this.props.isSyncing&&s.a.createElement("div",{className:"mx_AuthBody_paddedFooter_subtitle"},Object(c.a)("If you've joined lots of rooms, this might take a while"))):_.b.getValue(b.a.Registration)&&(o=s.a.createElement("span",{className:"mx_AuthBody_changeFlow"},Object(c.a)("New? <a>Create account</a>",{},{a:e=>s.a.createElement("a",{onClick:this.onTryRegisterClick,href:"#"},e)}))),s.a.createElement(g.a,null,s.a.createElement(k.a,{disableLanguageSelector:this.props.isSyncing||this.state.busyLoggingIn}),s.a.createElement(x.a,null,s.a.createElement("h2",null,Object(c.a)("Sign in"),e),n,r,s.a.createElement(C.a,{serverConfig:this.props.serverConfig,onServerConfigChange:this.props.onServerConfigChange}),this.renderLoginComponentForFlows(),o))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(80),p=n(90),m=n(85),g=n(112),f=n(157),_=n(194),b=n(101),v=n(353),y=n(81);const E=/^[0-9()\-\s]*$/;var S;!function(e){e.Email="login_field_email",e.MatrixId="login_field_mxid",e.Phone="login_field_phone",e.Password="login_field_phone"}(S||(S={}));let w=Object(y.a)("views.auth.PasswordLogin")((i=o=class extends l.a.PureComponent{constructor(e){super(e),s()(this,"onForgotPasswordClick",e=>{e.preventDefault(),e.stopPropagation(),this.props.onForgotPasswordClick()}),s()(this,"onSubmitForm",async e=>{e.preventDefault();if(!await this.verifyFieldsBeforeSubmit())return void g.a.instance.track("onboarding_registration_submit_failed");let t="",n=null,r=null;switch(this.state.loginType){case S.Email:case S.MatrixId:t=this.props.username;break;case S.Phone:n=this.props.phoneCountry,r=this.props.phoneNumber}this.props.onSubmit(t,n,r,this.state.password)}),s()(this,"onUsernameChanged",e=>{this.props.onUsernameChanged(e.target.value)}),s()(this,"onUsernameFocus",()=>{this.state.loginType===S.MatrixId?g.a.instance.track("onboarding_login_mxid_focus"):g.a.instance.track("onboarding_login_email_focus")}),s()(this,"onUsernameBlur",e=>{this.state.loginType===S.MatrixId?g.a.instance.track("onboarding_login_mxid_blur"):g.a.instance.track("onboarding_login_email_blur"),this.props.onUsernameBlur(e.target.value)}),s()(this,"onLoginTypeChange",e=>{const t=e.target.value;this.setState({loginType:t}),this.props.onUsernameChanged(""),g.a.instance.track("onboarding_login_type_changed",{loginType:t})}),s()(this,"onPhoneCountryChanged",e=>{this.props.onPhoneCountryChanged(e.iso2)}),s()(this,"onPhoneNumberChanged",e=>{this.props.onPhoneNumberChanged(e.target.value)}),s()(this,"onPhoneNumberFocus",()=>{g.a.instance.track("onboarding_login_phone_number_focus")}),s()(this,"onPhoneNumberBlur",e=>{g.a.instance.track("onboarding_login_phone_number_blur")}),s()(this,"onPasswordChanged",e=>{this.setState({password:e.target.value})}),s()(this,"validateUsernameRules",Object(f.a)({rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(h.a)("Enter username")}]})),s()(this,"onUsernameValidate",async e=>{const t=await this.validateUsernameRules(e);return this.markFieldValid(S.MatrixId,t.valid),t}),s()(this,"validateEmailRules",Object(f.a)({rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(h.a)("Enter email address")},{key:"email",test:({value:e})=>!e||_.a(e),invalid:()=>Object(h.a)("Doesn't look like a valid email address")}]})),s()(this,"onEmailValidate",async e=>{const t=await this.validateEmailRules(e);return this.markFieldValid(S.Email,t.valid),t}),s()(this,"validatePhoneNumberRules",Object(f.a)({rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(h.a)("Enter phone number")},{key:"number",test:({value:e})=>!e||E.test(e),invalid:()=>Object(h.a)("That phone number doesn't look quite right, please check and try again")}]})),s()(this,"onPhoneNumberValidate",async e=>{const t=await this.validatePhoneNumberRules(e);return this.markFieldValid(S.Password,t.valid),t}),s()(this,"validatePasswordRules",Object(f.a)({rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(h.a)("Enter password")}]})),s()(this,"onPasswordValidate",async e=>{const t=await this.validatePasswordRules(e);return this.markFieldValid(S.Password,t.valid),t}),this.state={fieldValid:{},loginType:S.MatrixId,password:""}}async verifyFieldsBeforeSubmit(){const e=document.activeElement;e&&e.blur();const t=[this.state.loginType,S.Password];for(const e of t){const t=this[e];t&&await t.validate({allowEmpty:!1})}if(await new Promise(e=>this.setState({},e)),this.allFieldsValid())return!0;const n=this.findFirstInvalidField(t);return!n||(n.focus(),n.validate({allowEmpty:!1,focused:!0}),!1)}allFieldsValid(){const e=Object.keys(this.state.fieldValid);for(let t=0;t<e.length;++t)if(!this.state.fieldValid[e[t]])return!1;return!0}findFirstInvalidField(e){for(const t of e)if(!this.state.fieldValid[t]&&this[t])return this[t];return null}markFieldValid(e,t){const{fieldValid:n}=this.state;n[e]=t,this.setState({fieldValid:n})}renderLoginField(e,t){const n={error:!1};switch(e){case S.Email:return n.error=this.props.loginIncorrect&&!this.props.username,l.a.createElement(b.a,{className:d()(n),name:"username",key:"email_input",type:"text",label:Object(h.a)("Email"),placeholder:"joe@example.com",value:this.props.username,onChange:this.onUsernameChanged,onFocus:this.onUsernameFocus,onBlur:this.onUsernameBlur,disabled:this.props.disableSubmit,autoFocus:t,onValidate:this.onEmailValidate,ref:e=>this[S.Email]=e});case S.MatrixId:return n.error=this.props.loginIncorrect&&!this.props.username,l.a.createElement(b.a,{className:d()(n),name:"username",key:"username_input",type:"text",label:Object(h.a)("Username"),placeholder:Object(h.a)("Username").toLocaleLowerCase(),value:this.props.username,onChange:this.onUsernameChanged,onFocus:this.onUsernameFocus,onBlur:this.onUsernameBlur,disabled:this.props.disableSubmit,autoFocus:t,onValidate:this.onUsernameValidate,ref:e=>this[S.MatrixId]=e});case S.Phone:{n.error=this.props.loginIncorrect&&!this.props.phoneNumber;const e=l.a.createElement(v.a,{value:this.props.phoneCountry,isSmall:!0,showPrefix:!0,onOptionChange:this.onPhoneCountryChanged});return l.a.createElement(b.a,{className:d()(n),name:"phoneNumber",key:"phone_input",type:"text",label:Object(h.a)("Phone"),value:this.props.phoneNumber,prefixComponent:e,onChange:this.onPhoneNumberChanged,onFocus:this.onPhoneNumberFocus,onBlur:this.onPhoneNumberBlur,disabled:this.props.disableSubmit,autoFocus:t,onValidate:this.onPhoneNumberValidate,ref:e=>this[S.Password]=e})}}}isLoginEmpty(){switch(this.state.loginType){case S.Email:case S.MatrixId:return!this.props.username;case S.Phone:return!this.props.phoneCountry||!this.props.phoneNumber}}render(){let e;this.props.onForgotPasswordClick&&(e=l.a.createElement(m.a,{className:"mx_Login_forgot",disabled:this.props.busy,kind:"link",onClick:this.onForgotPasswordClick},Object(h.a)("Forgot password?")));const t=d()({error:this.props.loginIncorrect&&!this.isLoginEmpty()}),n=!this.isLoginEmpty(),r=this.renderLoginField(this.state.loginType,!n);let o;return p.a.get().disable_3pid_login||(o=l.a.createElement("div",{className:"mx_Login_type_container"},l.a.createElement("label",{className:"mx_Login_type_label"},Object(h.a)("Sign in with")),l.a.createElement(b.a,{element:"select",value:this.state.loginType,onChange:this.onLoginTypeChange,disabled:this.props.disableSubmit},l.a.createElement("option",{key:S.MatrixId,value:S.MatrixId},Object(h.a)("Username")),l.a.createElement("option",{key:S.Email,value:S.Email},Object(h.a)("Email address")),l.a.createElement("option",{key:S.Password,value:S.Password},Object(h.a)("Phone"))))),l.a.createElement("div",null,l.a.createElement("form",{onSubmit:this.onSubmitForm},o,r,l.a.createElement(b.a,{className:t,type:"password",name:"password",label:Object(h.a)("Password"),value:this.state.password,onChange:this.onPasswordChanged,disabled:this.props.disableSubmit,autoFocus:n,onValidate:this.onPasswordValidate,ref:e=>this[S.Password]=e}),e,!this.props.busy&&l.a.createElement("input",{className:"mx_Login_submit",type:"submit",value:Object(h.a)("Sign in"),disabled:this.props.disableSubmit})))}},s()(o,"defaultProps",{onUsernameChanged:function(){},onUsernameBlur:function(){},onPhoneCountryChanged:function(){},onPhoneNumberChanged:function(){},loginIncorrect:!1,disableSubmit:!1}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(82),u=n(121),d=n(495),h=n(83),p=n(133),m=n(87),g=n(158),f=n(91),_=n(81),b=n(458);let v=Object(_.a)("views.toasts.VerificationRequestToast")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"intervalHandle",void 0),i()(this,"checkRequestIsPending",()=>{const{request:e}=this.props;e.canAccept||p.a.sharedInstance().dismissToast(this.props.toastKey)}),i()(this,"cancel",()=>{p.a.sharedInstance().dismissToast(this.props.toastKey);try{this.props.request.cancel()}catch(e){console.error("Error while cancelling verification request",e)}}),i()(this,"accept",async()=>{p.a.sharedInstance().dismissToast(this.props.toastKey);const{request:e}=this.props,t=l.a.get();try{e.channel.roomId?(h.a.dispatch({action:"view_room",room_id:e.channel.roomId,should_peek:!1}),h.a.dispatch({action:f.a.SetRightPanelPhase,phase:u.c.EncryptionPanel,refireParams:{verificationRequest:e,member:t.getUser(e.otherUserId)}})):m.a.createTrackedDialog("Incoming Verification","",b.a,{verificationRequest:e,onFinished:()=>{e.cancel()}},null,!1,!0),await e.accept()}catch(e){console.error(e.message)}}),this.state={counter:Math.ceil(e.request.timeout/1e3)}}async componentDidMount(){const{request:e}=this.props;if(e.timeout&&e.timeout>0&&(this.intervalHandle=setInterval(()=>{let{counter:e}=this.state;e=Math.max(0,e-1),this.setState({counter:e})},1e3)),e.on("change",this.checkRequestIsPending),this.checkRequestIsPending(),e.isSelfVerification){const t=l.a.get(),n=(await t.getDevice(e.channel.deviceId)).last_seen_ip;this.setState({device:t.getStoredDevice(t.getUserId(),e.channel.deviceId),ip:n})}}componentWillUnmount(){clearInterval(this.intervalHandle);const{request:e}=this.props;e.off("change",this.checkRequestIsPending)}render(){const{request:e}=this.props;let t,n;if(e.isSelfVerification)this.state.device&&(t=this.state.device.getDisplayName(),n=Object(c.a)("%(deviceId)s from %(ip)s",{deviceId:this.state.device.deviceId,ip:this.state.ip}));else{const n=e.otherUserId,r=e.channel.roomId;if(t=r?Object(d.b)(n,r):n,t===n){const e=l.a.get().getUser(n);e&&e.displayName&&(t=Object(c.a)("%(name)s (%(userId)s)",{name:e.displayName,userId:n}))}}const r=0===this.state.counter?Object(c.a)("Decline"):Object(c.a)("Decline (%(counter)s)",{counter:this.state.counter});return s.a.createElement(g.a,{description:t,detail:n,acceptLabel:Object(c.a)("Accept"),onAccept:this.accept,rejectLabel:r,onReject:this.cancel})}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(83),u=n(264),d=n(87),h=n(82),p=n(284),m=n(226),g=n(253),f=n(355),_=n(81),b=n(836),v=n(101),y=n(85),E=n(97),S=n(357),w=n(356);const C=1,T=2,x=3,k=4,F=5,O={"m.login.password":T,"m.login.cas":x,"m.login.sso":k};let R=Object(_.a)("structures.auth.SoftLogout")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onClearAll",()=>{d.a.createTrackedDialog("Clear Data","Soft Logout",b.a,{onFinished:e=>{e&&(console.log("Clearing data from soft-logged-out session"),u.i())}})}),i()(this,"onPasswordChange",e=>{this.setState({password:e.target.value})}),i()(this,"onForgotPassword",()=>{l.a.dispatch({action:"start_password_recovery"})}),i()(this,"onPasswordLogin",async e=>{e.preventDefault(),e.stopPropagation(),this.setState({busy:!0});const t=h.a.get().getHomeserverUrl(),n=h.a.get().getIdentityServerUrl(),r={identifier:{type:"m.id.user",user:h.a.get().getUserId()},password:this.state.password,device_id:h.a.get().getDeviceId()};let o=null;try{o=await Object(p.c)(t,n,"m.login.password",r)}catch(e){let t=Object(c.a)("Failed to re-authenticate due to a homeserver problem");return"M_FORBIDDEN"!==e.errcode||401!==e.httpStatus&&403!==e.httpStatus||(t=Object(c.a)("Incorrect password")),void this.setState({busy:!1,errorText:t})}u.e(o).catch(e=>{console.error(e),this.setState({busy:!1,errorText:Object(c.a)("Failed to re-authenticate")})})}),this.state={loginView:C,keyBackupNeeded:!0,busy:!1,password:"",errorText:"",flows:[]}}componentDidMount(){if(!u.g())return void l.a.dispatch({action:"start_login"});this.initLogin();const e=h.a.get();e.isCryptoEnabled()&&e.countSessionsNeedingBackup().then(e=>{this.setState({keyBackupNeeded:e>0})})}async initLogin(){const e=this.props.realQueryParams;if(e&&e.loginToken)return this.setState({loginView:C}),void this.trySsoLogin();const t=h.a.get(),n=(await t.loginFlows()).flows,r=n.map(e=>O[e.type]).filter(e=>!!e)[0]||F;this.setState({flows:n,loginView:r})}async trySsoLogin(){this.setState({busy:!0});const e=localStorage.getItem(g.a),t=localStorage.getItem(g.c)||h.a.get().getIdentityServerUrl(),n={token:this.props.realQueryParams.loginToken,device_id:h.a.get().getDeviceId()};let r=null;try{r=await Object(p.c)(e,t,"m.login.token",n)}catch(e){return console.error(e),void this.setState({busy:!1,loginView:F})}u.e(r).then(()=>{this.props.onTokenLoginCompleted&&this.props.onTokenLoginCompleted()}).catch(e=>{console.error(e),this.setState({busy:!1,loginView:F})})}renderSignInSection(){if(this.state.loginView===C)return s.a.createElement(E.a,null);let e=null;if(this.state.keyBackupNeeded&&(e=Object(c.a)("Regain access to your account and recover encryption keys stored in this session. Without them, you won’t be able to read all of your secure messages in any session.")),this.state.loginView===T){let t=null;return this.state.errorText&&(t=s.a.createElement("span",{className:"mx_Login_error"},this.state.errorText)),e||(e=Object(c.a)("Enter your password to sign in and regain access to your account.")),s.a.createElement("form",{onSubmit:this.onPasswordLogin},s.a.createElement("p",null,e),t,s.a.createElement(v.a,{type:"password",label:Object(c.a)("Password"),onChange:this.onPasswordChange,value:this.state.password,disabled:this.state.busy}),s.a.createElement(y.a,{onClick:this.onPasswordLogin,kind:"primary",type:"submit",disabled:this.state.busy},Object(c.a)("Sign In")),s.a.createElement(y.a,{onClick:this.onForgotPassword,kind:"link"},Object(c.a)("Forgotten your password?")))}if(this.state.loginView===k||this.state.loginView===x){e||(e=Object(c.a)("Sign in and regain access to your account."));const t=this.state.loginView===x?"cas":"sso",n=this.state.flows.find(e=>e.type==="m.login."+t);return s.a.createElement("div",null,s.a.createElement("p",null,e),s.a.createElement(f.a,{matrixClient:h.a.get(),flow:n,loginType:t,fragmentAfterLogin:this.props.fragmentAfterLogin,primary:!this.state.flows.find(e=>"m.login.password"===e.type)}))}return s.a.createElement("p",null,Object(c.a)("You cannot sign in to your account. Please contact your homeserver admin for more information."))}render(){return s.a.createElement(m.a,null,s.a.createElement(S.a,null),s.a.createElement(w.a,null,s.a.createElement("h2",null,Object(c.a)("You're signed out")),s.a.createElement("h3",null,Object(c.a)("Sign in")),s.a.createElement("div",null,this.renderSignInSection()),s.a.createElement("h3",null,Object(c.a)("Clear personal data")),s.a.createElement("p",null,Object(c.a)("Warning: Your personal data (including encryption keys) is still stored in this session. Clear it if you're finished using this session, or want to sign in to another account.")),s.a.createElement("div",null,s.a.createElement(y.a,{onClick:this.onClearAll,kind:"danger"},Object(c.a)("Clear all data")))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(78),o=n.n(r),i=n(10),a=n.n(i),s=n(80),c=n(110),l=n(97);const u=["vector-im/element-web","matrix-org/matrix-react-sdk","matrix-org/matrix-js-sdk"];class d extends o.a.Component{constructor(e){super(e),this.state={}}componentDidMount(){const e=this.props.newVersion.split("-"),t=this.props.version.split("-");if(null!=e&&null!=t)for(let n=0;n<u.length;n++){const r=t[2*n],o=e[2*n],i=`https://riot.im/github/repos/${u[n]}/compare/${r}...${o}`;a()(i,(e,t,r)=>{t.statusCode<200||t.statusCode>=300?this.setState({[u[n]]:t.statusText}):this.setState({[u[n]]:JSON.parse(r).commits})})}}elementsForCommit(e){return o.a.createElement("li",{key:e.sha,className:"mx_ChangelogDialog_li"},o.a.createElement("a",{href:e.html_url,target:"_blank",rel:"noreferrer noopener"},e.commit.message.split("\n")[0]))}render(){const e=u.map(e=>{let t;return t=null==this.state[e]?o.a.createElement(l.a,{key:e}):"string"==typeof this.state[e]?Object(s.a)("Unable to load commit detail: %(msg)s",{msg:this.state[e]}):this.state[e].map(this.elementsForCommit),o.a.createElement("div",{key:e},o.a.createElement("h2",null,e),o.a.createElement("ul",null,t))}),t=o.a.createElement("div",{className:"mx_ChangelogDialog_content"},null==this.props.version||null==this.props.newVersion?o.a.createElement("h2",null,Object(s.a)("Unavailable")):e);return o.a.createElement(c.a,{title:Object(s.a)("Changelog"),description:t,button:Object(s.a)("Update"),onFinished:this.props.onFinished})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(81),u=n(95),d=n(116);let h=Object(l.a)("views.dialogs.ConfirmWipeDeviceDialog")(r=class extends s.a.Component{constructor(...e){super(...e),i()(this,"onConfirm",()=>{this.props.onFinished(!0)}),i()(this,"onDecline",()=>{this.props.onFinished(!1)})}render(){return s.a.createElement(u.a,{className:"mx_ConfirmWipeDeviceDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(c.a)("Clear all data in this session?")},s.a.createElement("div",{className:"mx_ConfirmWipeDeviceDialog_content"},s.a.createElement("p",null,Object(c.a)("Clearing all data from this session is permanent. Encrypted messages will be lost unless their keys have been backed up."))),s.a.createElement(d.a,{primaryButton:Object(c.a)("Clear all data"),onPrimaryButtonClick:this.onConfirm,primaryButtonClass:"danger",cancelButton:Object(c.a)("Cancel"),onCancel:this.onDecline}))}})||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(110),a=n(80),s=n(90);t.a=e=>{const t=s.a.get().brand,n=Object(a.a)("%(brand)s now uses 3-5x less memory, by only loading information about other users when needed. Please wait whilst we resynchronise with the server!",{brand:t});return o.a.createElement(i.a,{hasCancelButton:!1,title:Object(a.a)("Updating %(brand)s",{brand:t}),description:o.a.createElement("div",null,n),button:Object(a.a)("OK"),onFinished:e.onFinished})}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(110),a=n(80),s=n(90);t.a=e=>{const t=s.a.get().brand,n=Object(a.a)("You've previously used %(brand)s on %(host)s with lazy loading of members enabled. In this version lazy loading is disabled. As the local cache is not compatible between these two settings, %(brand)s needs to resync your account.",{brand:t,host:e.host}),r=Object(a.a)("If the other version of %(brand)s is still open in another tab, please close it as using %(brand)s on the same host with both lazy loading enabled and disabled simultaneously will cause issues.",{brand:t});return o.a.createElement(i.a,{hasCancelButton:!1,title:Object(a.a)("Incompatible local cache"),description:o.a.createElement("div",null,o.a.createElement("p",null,n),o.a.createElement("p",null,r)),button:Object(a.a)("Clear cache and resync"),onFinished:e.onFinished})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(89),p=n(90),m=n(87),g=n(80),f=n(81);let _=Object(f.a)("views.dialogs.SessionRestoreErrorDialog")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"_sendBugReport",()=>{const e=h.getComponent("dialogs.BugReportDialog");m.a.createTrackedDialog("Session Restore Error","Send Bug Report Dialog",e,{})}),s()(this,"_onClearStorageClick",()=>{const e=h.getComponent("dialogs.QuestionDialog");m.a.createTrackedDialog("Session Restore Confirm Logout","",e,{title:Object(g.a)("Sign out"),description:l.a.createElement("div",null,Object(g.a)("Sign out and remove encryption keys?")),button:Object(g.a)("Sign out"),danger:!0,onFinished:this.props.onFinished})}),s()(this,"_onRefreshClick",()=>{window.location.reload(!0)})}render(){const e=p.a.get().brand,t=h.getComponent("views.dialogs.BaseDialog"),n=h.getComponent("views.elements.DialogButtons"),r=l.a.createElement("button",{onClick:this._onClearStorageClick,className:"danger"},Object(g.a)("Clear Storage and Sign Out"));let o;return o=p.a.get().bug_report_endpoint_url?l.a.createElement(n,{primaryButton:Object(g.a)("Send Logs"),onPrimaryButtonClick:this._sendBugReport,focus:!0,hasCancel:!1},r):l.a.createElement(n,{primaryButton:Object(g.a)("Refresh"),onPrimaryButtonClick:this._onRefreshClick,focus:!0,hasCancel:!1},r),l.a.createElement(t,{className:"mx_ErrorDialog",onFinished:this.props.onFinished,title:Object(g.a)("Unable to restore session"),contentId:"mx_Dialog_content",hasCancel:!1},l.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},l.a.createElement("p",null,Object(g.a)("We encountered an error trying to restore your previous session.")),l.a.createElement("p",null,Object(g.a)("If you have previously used a more recent version of %(brand)s, your session may be incompatible with this version. Close this window and return to the more recent version.",{brand:e})),l.a.createElement("p",null,Object(g.a)("Clearing your browser's storage may fix the problem, but will sign you out and cause any encrypted chat history to become unreadable."))),o)}},s()(o,"propTypes",{error:d.a.string.isRequired,onFinished:d.a.func.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(89),p=n(90),m=n(87),g=n(80),f=n(81);let _=Object(f.a)("views.dialogs.StorageEvictedDialog")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"_sendBugReport",e=>{e.preventDefault();const t=h.getComponent("dialogs.BugReportDialog");m.a.createTrackedDialog("Storage evicted","Send Bug Report Dialog",t,{})}),s()(this,"_onSignOutClick",()=>{this.props.onFinished(!0)})}render(){const e=h.getComponent("views.dialogs.BaseDialog"),t=h.getComponent("views.elements.DialogButtons");let n;return p.a.get().bug_report_endpoint_url&&(n=Object(g.a)("To help us prevent this in future, please <a>send us logs</a>.",{},{a:e=>l.a.createElement("a",{href:"#",onClick:this._sendBugReport},e)})),l.a.createElement(e,{className:"mx_ErrorDialog",onFinished:this.props.onFinished,title:Object(g.a)("Missing session data"),contentId:"mx_Dialog_content",hasCancel:!1},l.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},l.a.createElement("p",null,Object(g.a)("Some session data, including encrypted message keys, is missing. Sign out and sign in to fix this, restoring keys from backup.")),l.a.createElement("p",null,Object(g.a)("Your browser likely removed this data when running low on disk space.")," ",n)),l.a.createElement(t,{primaryButton:Object(g.a)("Sign out"),onPrimaryButtonClick:this._onSignOutClick,focus:!0,hasCancel:!1}))}},s()(o,"propTypes",{onFinished:d.a.func.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(195);async function o(e,t){const n=e.getUserId();let{threepids:o}=await e.getThreePids();if(t&&(o=o.filter(e=>e.medium===t)),o.length>0&&e.getIdentityServerUrl())try{const i=new r.a,a=await i.getAccessToken({check:!1}),s=o.map(({medium:e,address:t})=>[e,t]),c=await e.bulkLookupThreePids(s,a);for(const[e,r,i]of c.threepids){if(i!==n)continue;if(t&&e!==t)continue;const a=o.find(t=>t.medium===e&&t.address===r);a&&(a.bound=!0)}}catch(e){if("M_TERMS_NOT_SIGNED"!==e.errcode)throw e}return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(88),u=n.n(l),d=n(84),h=n(165),p=n(98),m=n(81),g=n(90),f=n(248),_=n(201),b=n(82);class v extends s.a.Component{constructor(...e){super(...e),i()(this,"_onChange",async e=>{await d.b.setValue(this.props.featureId,null,p.a.DEVICE,e),this.forceUpdate()})}render(){const e=d.b.getDisplayName(this.props.featureId),t=d.b.getValue(this.props.featureId),n=d.b.canSetValue(this.props.featureId,null,p.a.DEVICE);return s.a.createElement(h.a,{value:t,label:e,onChange:this._onChange,disabled:!n})}}i()(v,"propTypes",{featureId:u.a.string.isRequired});let y=Object(m.a)("views.settings.tabs.user.LabsUserSettingsTab")(r=class extends s.a.Component{constructor(){super(),b.a.get().doesServerSupportUnstableFeature("org.matrix.msc2285").then(e=>{this.setState({showHiddenReadReceipts:e})}),this.state={showHiddenReadReceipts:!1}}render(){const e=d.b.getFeatureSettingNames(),[t,n]=e.reduce((e,t)=>(e[d.b.getBetaInfo(t)?1:0].push(t),e),[[],[]]);let r,o;if(n.length&&(r=s.a.createElement("div",{className:"mx_SettingsTab_section"},n.map(e=>s.a.createElement(f.b,{key:e,featureId:e})))),g.a.get().showLabsSettings){const e=t.map(e=>s.a.createElement(v,{featureId:e,key:e}));let n;this.state.showHiddenReadReceipts&&(n=s.a.createElement(_.a,{name:"feature_hidden_read_receipts",level:p.a.DEVICE})),o=s.a.createElement("div",{className:"mx_SettingsTab_section"},e,s.a.createElement(_.a,{name:"enableWidgetScreenshots",level:p.a.ACCOUNT}),s.a.createElement(_.a,{name:"showHiddenEventsInTimeline",level:p.a.DEVICE}),s.a.createElement(_.a,{name:"lowBandwidth",level:p.a.DEVICE}),s.a.createElement(_.a,{name:"advancedRoomListLogging",level:p.a.DEVICE}),n)}return s.a.createElement("div",{className:"mx_SettingsTab mx_LabsUserSettingsTab"},s.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Labs")),s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(c.a)("Feeling experimental? Labs are the best way to get things early, test out new features and help shape them before they actually launch. <a>Learn more</a>.",{},{a:e=>s.a.createElement("a",{href:"https://github.com/vector-im/element-web/blob/develop/docs/labs.md",rel:"noreferrer noopener",target:"_blank"},e)})),r,o)}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(90),u=n(82),d=n(84),h=n(243),p=n(328),m=n(844),g=n(85),f=n(83),_=n(688),b=n(91),v=n(137),y=n(201),E=n(101),S=n(497),w=n(246),C=n(98),T=n(113),x=n(140),k=n(81),F=n(130),O=n(845);function R(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}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let I=Object(k.a)("views.settings.tabs.user.AppearanceUserSettingsTab")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"MESSAGE_PREVIEW_TEXT",Object(c.a)("Hey you. You're the best!")),i()(this,"themeTimer",void 0),i()(this,"unmounted",!1),i()(this,"onThemeChange",e=>{if(this.state.theme===e)return;const t=d.b.getValue("theme");d.b.setValue("theme",null,C.a.DEVICE,e).catch(()=>{f.a.dispatch({action:b.a.RecheckTheme}),this.setState({theme:t})}),this.setState({theme:e}),f.a.dispatch({action:b.a.RecheckTheme,forceTheme:e})}),i()(this,"onUseSystemThemeChanged",e=>{this.setState({useSystemTheme:e}),d.b.setValue("use_system_theme",null,C.a.DEVICE,e),f.a.dispatch({action:b.a.RecheckTheme})}),i()(this,"onFontSizeChanged",e=>{this.setState({fontSize:e.toString()}),d.b.setValue("baseFontSize",null,C.a.DEVICE,e-_.a.SIZE_DIFF)}),i()(this,"onValidateFontSize",async({value:e})=>{const t=parseFloat(e),n=_.a.MIN_SIZE+_.a.SIZE_DIFF,r=_.a.MAX_SIZE+_.a.SIZE_DIFF;return isNaN(t)?{valid:!1,feedback:Object(c.a)("Size must be a number")}:n<=t&&t<=r?(d.b.setValue("baseFontSize",null,C.a.DEVICE,parseInt(e,10)-_.a.SIZE_DIFF),{valid:!0,feedback:Object(c.a)("Use between %(min)s pt and %(max)s pt",{min:n,max:r})}):{valid:!1,feedback:Object(c.a)("Custom font size can only be between %(min)s pt and %(max)s pt",{min:n,max:r})}}),i()(this,"onAddCustomTheme",async()=>{let e=d.b.getValue("custom_themes");e||(e=[]),e=e.map(e=>e),this.themeTimer&&clearTimeout(this.themeTimer);try{const t=await fetch(this.state.customThemeUrl),n=await t.json();if(!n||"string"!=typeof n.name||"object"!=typeof n.colors)return void this.setState({customThemeMessage:{text:Object(c.a)("Invalid theme schema."),isError:!0}});e.push(n)}catch(e){return console.error(e),void this.setState({customThemeMessage:{text:Object(c.a)("Error downloading theme information."),isError:!0}})}await d.b.setValue("custom_themes",null,C.a.ACCOUNT,e),this.setState({customThemeUrl:"",customThemeMessage:{text:Object(c.a)("Theme added!"),isError:!1}}),this.themeTimer=setTimeout(()=>{this.setState({customThemeMessage:{text:"",isError:!1}})},3e3)}),i()(this,"onCustomThemeChange",e=>{this.setState({customThemeUrl:e.target.value})}),i()(this,"onLayoutChanged",e=>{this.setState({layout:e})}),i()(this,"onIRCLayoutChange",e=>{e?(this.setState({layout:x.a.IRC}),d.b.setValue("layout",null,C.a.DEVICE,x.a.IRC)):(this.setState({layout:x.a.Group}),d.b.setValue("layout",null,C.a.DEVICE,x.a.Group))}),this.state=D(D({fontSize:(d.b.getValue("baseFontSize",null)+_.a.SIZE_DIFF).toString()},this.calculateThemeState()),{},{customThemeUrl:"",customThemeMessage:{isError:!1,text:""},useCustomFontSize:d.b.getValue("useCustomFontSize"),useSystemFont:d.b.getValue("useSystemFont"),systemFont:d.b.getValue("systemFont"),showAdvanced:!1,layout:d.b.getValue("layout"),userId:"@erim:fink.fink",displayName:"Erimayas Fink",avatarUrl:null})}async componentDidMount(){const e=u.a.get(),t=e.getUserId(),n=await e.getProfileInfo(t);this.unmounted||this.setState({userId:t,displayName:n.displayname,avatarUrl:n.avatar_url})}componentWillUnmount(){this.unmounted=!0}calculateThemeState(){const e=d.b.getValue("theme"),t=d.b.getValueAt(C.a.DEVICE,"use_system_theme",null,!1,!0),n=d.b.getValueAt(C.a.DEVICE,"theme",null,!1,!0);return t?{theme:e,useSystemTheme:!0}:n?{theme:e,useSystemTheme:!1}:{theme:e,useSystemTheme:d.b.getValueAt(C.a.DEVICE,"use_system_theme")}}renderThemeSection(){let e,t;if((new p.a).isSystemThemeSupported()&&(e=s.a.createElement("div",null,s.a.createElement(v.a,{checked:this.state.useSystemTheme,onChange:e=>this.onUseSystemThemeChanged(e.target.checked)},d.b.getDisplayName("use_system_theme")))),d.b.getValue("feature_custom_themes")){let e=null;this.state.customThemeMessage.text&&(e=this.state.customThemeMessage.isError?s.a.createElement("div",{className:"text-error"},this.state.customThemeMessage.text):s.a.createElement("div",{className:"text-success"},this.state.customThemeMessage.text)),t=s.a.createElement("div",{className:"mx_SettingsTab_section"},s.a.createElement("form",{onSubmit:this.onAddCustomTheme},s.a.createElement(E.a,{label:Object(c.a)("Custom theme URL"),type:"text",id:"mx_GeneralUserSettingsTab_customThemeInput",autoComplete:"off",onChange:this.onCustomThemeChange,value:this.state.customThemeUrl}),s.a.createElement(g.a,{onClick:this.onAddCustomTheme,type:"submit",kind:"primary_sm",disabled:!this.state.customThemeUrl.trim()},Object(c.a)("Add theme")),e))}const n=Object.entries(Object(h.b)()).map(e=>({id:e[0],name:e[1]})),r=n.filter(e=>!e.id.startsWith("custom-")),o=n.filter(e=>!r.includes(e)).sort((e,t)=>Object(F.a)(e.name,t.name)),i=[...r,...o];return s.a.createElement("div",{className:"mx_SettingsTab_section mx_AppearanceUserSettingsTab_themeSection"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(c.a)("Theme")),e,s.a.createElement("div",{className:"mx_ThemeSelectors"},s.a.createElement(w.a,{name:"theme",definitions:i.map(e=>({value:e.id,label:e.name,disabled:this.state.useSystemTheme,className:"mx_ThemeSelector_"+e.id})),onChange:this.onThemeChange,value:this.state.useSystemTheme?void 0:this.state.theme,outlined:!0})),t)}renderFontSection(){return s.a.createElement("div",{className:"mx_SettingsTab_section mx_AppearanceUserSettingsTab_fontScaling"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(c.a)("Font size")),s.a.createElement(S.a,{className:"mx_AppearanceUserSettingsTab_fontSlider_preview",message:this.MESSAGE_PREVIEW_TEXT,layout:this.state.layout,userId:this.state.userId,displayName:this.state.displayName,avatarUrl:this.state.avatarUrl}),s.a.createElement("div",{className:"mx_AppearanceUserSettingsTab_fontSlider"},s.a.createElement("div",{className:"mx_AppearanceUserSettingsTab_fontSlider_smallText"},"Aa"),s.a.createElement(m.a,{values:[13,14,15,16,18],value:parseInt(this.state.fontSize,10),onSelectionChange:this.onFontSizeChanged,displayFunc:e=>"",disabled:this.state.useCustomFontSize}),s.a.createElement("div",{className:"mx_AppearanceUserSettingsTab_fontSlider_largeText"},"Aa")),s.a.createElement(y.a,{name:"useCustomFontSize",level:C.a.ACCOUNT,onChange:e=>this.setState({useCustomFontSize:e}),useCheckbox:!0}),s.a.createElement(E.a,{type:"number",label:Object(c.a)("Font size"),autoComplete:"off",placeholder:this.state.fontSize.toString(),value:this.state.fontSize.toString(),id:"font_size_field",onValidate:this.onValidateFontSize,onChange:e=>this.setState({fontSize:e.target.value}),disabled:!this.state.useCustomFontSize,className:"mx_SettingsTab_customFontSizeField"}))}renderAdvancedSection(){if(!d.b.getValue(T.a.AdvancedSettings))return null;const e=l.a.get().brand,t=s.a.createElement("div",{className:"mx_AppearanceUserSettingsTab_AdvancedToggle",onClick:()=>this.setState({showAdvanced:!this.state.showAdvanced})},this.state.showAdvanced?Object(c.a)("Hide advanced"):Object(c.a)("Show advanced"));let n;if(this.state.showAdvanced){const t=Object(c.a)("Set the name of a font installed on your system & %(brand)s will attempt to use it.",{brand:e});n=s.a.createElement(s.a.Fragment,null,s.a.createElement(y.a,{name:"useCompactLayout",level:C.a.DEVICE,useCheckbox:!0,disabled:this.state.layout!==x.a.Group}),d.b.getValue("feature_new_layout_switcher")?null:s.a.createElement(v.a,{checked:this.state.layout==x.a.IRC,onChange:e=>this.onIRCLayoutChange(e.target.checked)},Object(c.a)("Enable experimental, compact IRC style layout")),s.a.createElement(y.a,{name:"useSystemFont",level:C.a.DEVICE,useCheckbox:!0,onChange:e=>this.setState({useSystemFont:e})}),s.a.createElement(E.a,{className:"mx_AppearanceUserSettingsTab_systemFont",label:d.b.getDisplayName("systemFont"),onChange:e=>{this.setState({systemFont:e.target.value}),d.b.setValue("systemFont",null,C.a.DEVICE,e.target.value)},tooltipContent:t,forceTooltipVisible:!0,disabled:!this.state.useSystemFont,value:this.state.systemFont}))}return s.a.createElement("div",{className:"mx_SettingsTab_section mx_AppearanceUserSettingsTab_Advanced"},t,n)}render(){const e=l.a.get().brand;let t;return d.b.getValue("feature_new_layout_switcher")&&(t=s.a.createElement(O.a,{userId:this.state.userId,displayName:this.state.displayName,avatarUrl:this.state.avatarUrl,messagePreviewText:this.MESSAGE_PREVIEW_TEXT,onLayoutChanged:this.onLayoutChanged})),s.a.createElement("div",{className:"mx_SettingsTab mx_AppearanceUserSettingsTab"},s.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Customise your appearance")),s.a.createElement("div",{className:"mx_SettingsTab_SubHeading"},Object(c.a)("Appearance Settings only affect this %(brand)s session.",{brand:e})),this.renderThemeSection(),t,this.renderFontSection(),this.renderAdvancedSection())}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,o=n(78),i=n(81);let a=Object(i.a)("views.elements.Slider")(r=class extends o.Component{offset(e,t){const n=e.reduce((e,n)=>t>n?e+1:e,0);if(0===n)return 0;if(n===e.length)return 100;const r=e[n-1],o=e[n],i=1/(e.length-1);return 100*(n-1+(t-r)/(o-r))*i}render(){const e=this.props.values.map(e=>o.createElement(s,{active:e<=this.props.value,label:this.props.displayFunc(e),onClick:this.props.disabled?()=>{}:()=>this.props.onSelectionChange(e),key:e,disabled:this.props.disabled}));let t=null;if(!this.props.disabled){const e=this.offset(this.props.values,this.props.value);t=o.createElement("div",{className:"mx_Slider_selection"},o.createElement("div",{className:"mx_Slider_selectionDot",style:{left:"calc(-0.55em + "+e+"%)"}}),o.createElement("hr",{style:{width:e+"%"}}))}return o.createElement("div",{className:"mx_Slider"},o.createElement("div",null,o.createElement("div",{className:"mx_Slider_bar"},o.createElement("hr",{onClick:this.props.disabled?()=>{}:this.onClick.bind(this)}),t),o.createElement("div",{className:"mx_Slider_dotContainer"},e)))}onClick(e){const t=e.target.clientWidth,n=e.nativeEvent.offsetX/t,r=this.props.values[Math.round(n*(this.props.values.length-1))];this.props.onSelectionChange(r)}})||r;class s extends o.PureComponent{render(){let e="mx_Slider_dot";return!this.props.disabled&&this.props.active&&(e+=" mx_Slider_dotActive"),o.createElement("span",{onClick:this.props.onClick,className:"mx_Slider_dotValue"},o.createElement("div",{className:e}),o.createElement("div",{className:"mx_Slider_labelContainer"},o.createElement("div",{className:"mx_Slider_label"},this.props.label)))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(86),c=n.n(s),l=n(84),u=n(497),d=n(189),h=n(80),p=n(140),m=n(98);class g extends a.a.Component{constructor(e){super(e),o()(this,"onLayoutChange",e=>{const t=e.target.value;this.setState({layout:t}),l.b.setValue("layout",null,m.a.DEVICE,t),this.props.onLayoutChanged(t)}),this.state={layout:l.b.getValue("layout")}}render(){const e=c()("mx_LayoutSwitcher_RadioButton",{mx_LayoutSwitcher_RadioButton_selected:this.state.layout==p.a.IRC}),t=c()("mx_LayoutSwitcher_RadioButton",{mx_LayoutSwitcher_RadioButton_selected:this.state.layout==p.a.Group}),n=c()("mx_LayoutSwitcher_RadioButton",{mx_LayoutSwitcher_RadioButton_selected:this.state.layout===p.a.Bubble});return a.a.createElement("div",{className:"mx_SettingsTab_section mx_LayoutSwitcher"},a.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(h.a)("Message layout")),a.a.createElement("div",{className:"mx_LayoutSwitcher_RadioButtons"},a.a.createElement("label",{className:e},a.a.createElement(u.a,{className:"mx_LayoutSwitcher_RadioButton_preview",message:this.props.messagePreviewText,layout:p.a.IRC,userId:this.props.userId,displayName:this.props.displayName,avatarUrl:this.props.avatarUrl}),a.a.createElement(d.a,{name:"layout",value:p.a.IRC,checked:this.state.layout===p.a.IRC,onChange:this.onLayoutChange},Object(h.a)("IRC"))),a.a.createElement("label",{className:t},a.a.createElement(u.a,{className:"mx_LayoutSwitcher_RadioButton_preview",message:this.props.messagePreviewText,layout:p.a.Group,userId:this.props.userId,displayName:this.props.displayName,avatarUrl:this.props.avatarUrl}),a.a.createElement(d.a,{name:"layout",value:p.a.Group,checked:this.state.layout==p.a.Group,onChange:this.onLayoutChange},Object(h.a)("Modern"))),a.a.createElement("label",{className:n},a.a.createElement(u.a,{className:"mx_LayoutSwitcher_RadioButton_preview",message:this.props.messagePreviewText,layout:p.a.Bubble,userId:this.props.userId,displayName:this.props.displayName,avatarUrl:this.props.avatarUrl}),a.a.createElement(d.a,{name:"layout",value:p.a.Bubble,checked:this.state.layout==p.a.Bubble,onChange:this.onLayoutChange},Object(h.a)("Message bubbles")))))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(2),p=n(80),m=n(90),g=n(82),f=n(145),_=n(85),b=n(124),v=n(87),y=n(89),E=n(83),S=n(125),w=n(98),C=n(847),T=n(84),x=n(113),k=n(848),F=n(112),O=n(81),R=n(329);class D extends l.a.Component{constructor(...e){super(...e),s()(this,"_onUnignoreClicked",e=>{this.props.onUnignored(this.props.userId)})}render(){const e="mx_SecurityUserSettingsTab_ignoredUser_"+this.props.userId;return l.a.createElement("div",{className:"mx_SecurityUserSettingsTab_ignoredUser"},l.a.createElement(_.a,{onClick:this._onUnignoreClicked,kind:"primary_sm","aria-describedby":e,disabled:this.props.inProgress},Object(p.a)("Unignore")),l.a.createElement("span",{id:e},this.props.userId))}}s()(D,"propTypes",{userId:d.a.string.isRequired,onUnignored:d.a.func.isRequired,inProgress:d.a.bool.isRequired});let I=Object(O.a)("views.settings.tabs.user.SecurityUserSettingsTab")((i=o=class extends l.a.Component{constructor(){super(),s()(this,"_updateBlacklistDevicesFlag",e=>{g.a.get().setGlobalBlacklistUnverifiedDevices(e)}),s()(this,"_updateAnalytics",e=>{e?b.a.enable():b.a.disable(),F.a.instance.enable(!e),R.a.instance.updateAnonymityFromSettings(g.a.get().getUserId())}),s()(this,"_onExportE2eKeysClicked",()=>{v.a.createTrackedDialogAsync("Export E2E Keys","",n.e(4).then(n.bind(null,866)),{matrixClient:g.a.get()})}),s()(this,"_onImportE2eKeysClicked",()=>{v.a.createTrackedDialogAsync("Import E2E Keys","",n.e(26).then(n.bind(null,1422)),{matrixClient:g.a.get()})}),s()(this,"_onGoToUserProfileClick",()=>{E.a.dispatch({action:"view_user_info",userId:g.a.get().getUserId()}),this.props.closeSettingsFn()}),s()(this,"_onUserUnignored",async e=>{const{ignoredUserIds:t,waitingUnignored:n}=this.state,r=t.filter(e=>!n.includes(e)),o=r.indexOf(e);-1!==o&&(r.splice(o,1),this.setState(({waitingUnignored:t})=>({waitingUnignored:[...t,e]})),g.a.get().setIgnoredUsers(r))}),s()(this,"_getInvitedRooms",()=>g.a.get().getRooms().filter(e=>e.hasMembershipState(g.a.get().getUserId(),"invite"))),s()(this,"_manageInvites",async e=>{this.setState({managingInvites:!0});const t=this._getInvitedRooms().map(e=>e.roomId),n=this,r=g.a.get(),o=e?r.joinRoom.bind(r):r.leave.bind(r);for(let e=0;e<t.length;e++){const r=t[e];await o(r).then(()=>{this.setState({invitedRoomAmt:n.state.invitedRoomAmt-1})},async t=>{"M_LIMIT_EXCEEDED"===t.errcode?(await Object(h.H)(t.retry_after_ms||2500),e--):console.warn(t)})}this.setState({managingInvites:!1})}),s()(this,"_onAcceptAllInvitesClicked",e=>{this._manageInvites(!0)}),s()(this,"_onRejectAllInvitesClicked",e=>{this._manageInvites(!1)});const e=this._getInvitedRooms();this.state={ignoredUserIds:g.a.get().getIgnoredUsers(),waitingUnignored:[],managingInvites:!1,invitedRoomAmt:e.length},this._onAction=this._onAction.bind(this)}_onAction({action:e}){if("ignore_state_changed"===e){const e=g.a.get().getIgnoredUsers(),t=this.state.waitingUnignored.filter(t=>e.includes(t));this.setState({ignoredUserIds:e,waitingUnignored:t})}}componentDidMount(){this.dispatcherRef=E.a.register(this._onAction)}componentWillUnmount(){E.a.unregister(this.dispatcherRef)}_renderCurrentDeviceInfo(){const e=y.getComponent("views.elements.SettingsFlag"),t=g.a.get(),n=t.deviceId;let r=t.getDeviceEd25519Key();r=r?f.e(r):Object(p.a)("<not supported>");let o,i=null;return t.isCryptoEnabled()&&(i=l.a.createElement("div",{className:"mx_SecurityUserSettingsTab_importExportButtons"},l.a.createElement(_.a,{kind:"primary",onClick:this._onExportE2eKeysClicked},Object(p.a)("Export E2E room keys")),l.a.createElement(_.a,{kind:"primary",onClick:this._onImportE2eKeysClicked},Object(p.a)("Import E2E room keys")))),T.b.isEnabled("blacklistUnverifiedDevices")&&(o=l.a.createElement(e,{name:"blacklistUnverifiedDevices",level:w.a.DEVICE,onChange:this._updateBlacklistDevicesFlag})),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(p.a)("Cryptography")),l.a.createElement("ul",{className:"mx_SettingsTab_subsectionText mx_SecurityUserSettingsTab_deviceInfo"},l.a.createElement("li",null,l.a.createElement("label",null,Object(p.a)("Session ID:")),l.a.createElement("span",null,l.a.createElement("code",null,n))),l.a.createElement("li",null,l.a.createElement("label",null,Object(p.a)("Session key:")),l.a.createElement("span",null,l.a.createElement("code",null,l.a.createElement("b",null,r))))),i,o)}_renderIgnoredUsers(){const{waitingUnignored:e,ignoredUserIds:t}=this.state,n=null!=t&&t.length?t.map(t=>l.a.createElement(D,{userId:t,onUnignored:this._onUserUnignored,key:t,inProgress:e.includes(t)})):Object(p.a)("You have no ignored users.");return l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(p.a)("Ignored users")),l.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},n))}_renderManageInvites(){if(0===this.state.invitedRoomAmt)return null;const e=this._getInvitedRooms(),t=y.getComponent("elements.InlineSpinner"),n=this._onAcceptAllInvitesClicked.bind(this,e),r=this._onRejectAllInvitesClicked.bind(this,e);return l.a.createElement("div",{className:"mx_SettingsTab_section mx_SecurityUserSettingsTab_bulkOptions"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(p.a)("Bulk options")),l.a.createElement(_.a,{onClick:n,kind:"primary",disabled:this.state.managingInvites},Object(p.a)("Accept all %(invitedRooms)s invites",{invitedRooms:this.state.invitedRoomAmt})),l.a.createElement(_.a,{onClick:r,kind:"danger",disabled:this.state.managingInvites},Object(p.a)("Reject all %(invitedRooms)s invites",{invitedRooms:this.state.invitedRoomAmt})),this.state.managingInvites?l.a.createElement(t,null):l.a.createElement("div",null))}render(){const e=m.a.get().brand,t=y.getComponent("views.settings.DevicesPanel"),n=y.getComponent("views.elements.SettingsFlag"),r=y.getComponent("views.settings.EventIndexPanel"),o=l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(p.a)("Secure Backup")),l.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},l.a.createElement(C.a,null))),i=l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(p.a)("Message search")),l.a.createElement(r,null)),a=y.getComponent("views.settings.CrossSigningPanel"),s=l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(p.a)("Cross-signing")),l.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},l.a.createElement(a,null)));let c,u;Object(S.f)()||(c=l.a.createElement("div",{className:"mx_SecurityUserSettingsTab_warning"},Object(p.a)("Your server admin has disabled end-to-end encryption by default in private rooms & Direct Messages."))),(b.a.canEnable()||F.a.instance.canEnable())&&(u=l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(p.a)("Privacy")),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(p.a)("Analytics")),l.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(p.a)("%(brand)s collects anonymous analytics to allow us to improve the application.",{brand:e})," ",Object(p.a)("Privacy is important to us, so we don't collect any personal or identifiable data for our analytics."),l.a.createElement(_.a,{className:"mx_SettingsTab_linkBtn",onClick:b.a.showDetailsModal},Object(p.a)("Learn more about how we use analytics."))),l.a.createElement(n,{name:"analyticsOptIn",level:w.a.DEVICE,onChange:this._updateAnalytics}))));const d=y.getComponent("views.settings.E2eAdvancedPanel");let h;if(T.b.getValue(x.a.AdvancedSettings)){const e=this._renderIgnoredUsers(),t=this._renderManageInvites(),n=Object(k.b)()?l.a.createElement(d,null):null;(e||t||n)&&(h=l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(p.a)("Advanced")),l.a.createElement("div",{className:"mx_SettingsTab_section"},e,t,n)))}return l.a.createElement("div",{className:"mx_SettingsTab mx_SecurityUserSettingsTab"},c,l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(p.a)("Where you’re logged in")),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",null,Object(p.a)("Manage the names of and sign out of your sessions below or <a>verify them in your User Profile</a>.",{},{a:e=>l.a.createElement(_.a,{kind:"link",onClick:this._onGoToUserProfileClick},e)})),l.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(p.a)("A session's public name is visible to people you communicate with"),l.a.createElement(t,null))),l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(p.a)("Encryption")),l.a.createElement("div",{className:"mx_SettingsTab_section"},o,i,s,this._renderCurrentDeviceInfo()),u,h)}},s()(o,"propTypes",{closeSettingsFn:d.a.func.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(82),l=n(80),u=n(87),d=n(237),h=n(97),p=n(85),m=n(110),g=n(250),f=n(177),_=n(81);let b=Object(_.a)("views.settings.SecureBackupPanel")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"_onKeyBackupSessionsRemaining",e=>{this.setState({sessionsRemaining:e})}),i()(this,"_onKeyBackupStatus",()=>{this._loadBackupStatus()}),i()(this,"_startNewBackup",()=>{u.a.createTrackedDialogAsync("Key Backup","Key Backup",n.e(5).then(n.bind(null,503)),{onFinished:()=>{this._loadBackupStatus()}},null,!1,!0)}),i()(this,"_deleteBackup",()=>{u.a.createTrackedDialog("Delete Backup","",m.a,{title:Object(l.a)("Delete Backup"),description:Object(l.a)("Are you sure? You will lose your encrypted messages if your keys are not backed up properly."),button:Object(l.a)("Delete Backup"),danger:!0,onFinished:e=>{e&&(this.setState({loading:!0}),c.a.get().deleteKeyBackupVersion(this.state.backupInfo.version).then(()=>{this._loadBackupStatus()}))}})}),i()(this,"_restoreBackup",async()=>{u.a.createTrackedDialog("Restore Backup","",g.a,null,null,!1,!0)}),i()(this,"_resetSecretStorage",async()=>{this.setState({error:null});try{await Object(f.b)(()=>{},!0)}catch(e){if(console.error("Error resetting secret storage",e),this._unmounted)return;this.setState({error:e})}this._unmounted||this._loadBackupStatus()}),this._unmounted=!1,this.state={loading:!0,error:null,backupKeyStored:null,backupKeyCached:null,backupKeyWellFormed:null,secretStorageKeyInAccount:null,secretStorageReady:null,backupInfo:null,backupSigStatus:null,sessionsRemaining:0}}componentDidMount(){this._checkKeyBackupStatus(),c.a.get().on("crypto.keyBackupStatus",this._onKeyBackupStatus),c.a.get().on("crypto.keyBackupSessionsRemaining",this._onKeyBackupSessionsRemaining)}componentWillUnmount(){this._unmounted=!0,c.a.get()&&(c.a.get().removeListener("crypto.keyBackupStatus",this._onKeyBackupStatus),c.a.get().removeListener("crypto.keyBackupSessionsRemaining",this._onKeyBackupSessionsRemaining))}async _checkKeyBackupStatus(){this._getUpdatedDiagnostics();try{const{backupInfo:e,trustInfo:t}=await c.a.get().checkKeyBackup();this.setState({loading:!1,error:null,backupInfo:e,backupSigStatus:t})}catch(e){if(console.log("Unable to fetch check backup status",e),this._unmounted)return;this.setState({loading:!1,error:e,backupInfo:null,backupSigStatus:null})}}async _loadBackupStatus(){this.setState({loading:!0}),this._getUpdatedDiagnostics();try{const e=await c.a.get().getKeyBackupVersion(),t=await c.a.get().isKeyBackupTrusted(e);if(this._unmounted)return;this.setState({loading:!1,error:null,backupInfo:e,backupSigStatus:t})}catch(e){if(console.log("Unable to fetch key backup status",e),this._unmounted)return;this.setState({loading:!1,error:e,backupInfo:null,backupSigStatus:null})}}async _getUpdatedDiagnostics(){const e=c.a.get(),t=e.crypto.secretStorage,n=!!await e.isKeyBackupKeyStored(),r=await e.crypto.getSessionBackupPrivateKey(),o=!!r,i=r instanceof Uint8Array,a=await t.hasKey(),s=await e.isSecretStorageReady();this._unmounted||this.setState({backupKeyStored:n,backupKeyCached:o,backupKeyWellFormed:i,secretStorageKeyInAccount:a,secretStorageReady:s})}render(){const{loading:e,error:t,backupKeyStored:n,backupKeyCached:r,backupKeyWellFormed:o,secretStorageKeyInAccount:i,secretStorageReady:a,backupInfo:u,backupSigStatus:m,sessionsRemaining:g}=this.state;let f,_,b;const v=[];if(t)f=s.a.createElement("div",{className:"error"},Object(l.a)("Unable to load key backup status"));else if(e)f=s.a.createElement(h.a,null);else if(u){let e,t=Object(l.a)("Restore from Backup");c.a.get().getKeyBackupEnabled()?f=s.a.createElement("p",null,"✅ ",Object(l.a)("This session is backing up your keys. ")):(f=s.a.createElement(s.a.Fragment,null,s.a.createElement("p",null,Object(l.a)("This session is <b>not backing up your keys</b>, but you do have an existing backup you can restore from and add to going forward.",{},{b:e=>s.a.createElement("b",null,e)})),s.a.createElement("p",null,Object(l.a)("Connect this session to key backup before signing out to avoid losing any keys that may only be on this session."))),t=Object(l.a)("Connect this session to Key Backup")),e=c.a.get().getKeyBackupEnabled()?g>0?s.a.createElement("div",null,Object(l.a)("Backing up %(sessionsRemaining)s keys...",{sessionsRemaining:g})," ",s.a.createElement("br",null)):s.a.createElement("div",null,Object(l.a)("All keys backed up")," ",s.a.createElement("br",null)):"";let n,r=m.sigs.map((e,t)=>{const n=e.device?e.device.getDisplayName()||e.device.deviceId:null,r=t=>s.a.createElement("span",{className:e.valid?"mx_SecureBackupPanel_sigValid":"mx_SecureBackupPanel_sigInvalid"},t),o=t=>s.a.createElement("span",{className:e.device&&e.deviceTrust.isVerified()?"mx_SecureBackupPanel_deviceVerified":"mx_SecureBackupPanel_deviceNotVerified"},t),i=e=>s.a.createElement("span",{className:"mx_SecureBackupPanel_deviceName"},n),a=e.device&&e.device.getFingerprint()===c.a.get().getDeviceEd25519Key(),u=e.crossSigningId&&e.deviceId===c.a.get().getCrossSigningId();let d;return e.valid&&u?d=Object(l.a)("Backup has a <validity>valid</validity> signature from this user",{},{validity:r}):!e.valid&&u?d=Object(l.a)("Backup has a <validity>invalid</validity> signature from this user",{},{validity:r}):e.crossSigningId?d=Object(l.a)("Backup has a signature from <verify>unknown</verify> user with ID %(deviceId)s",{deviceId:e.deviceId},{verify:o}):e.device?e.valid&&a?d=Object(l.a)("Backup has a <validity>valid</validity> signature from this session",{},{validity:r}):!e.valid&&a?d=Object(l.a)("Backup has an <validity>invalid</validity> signature from this session",{},{validity:r}):e.valid&&e.deviceTrust.isVerified()?d=Object(l.a)("Backup has a <validity>valid</validity> signature from <verify>verified</verify> session <device></device>",{},{validity:r,verify:o,device:i}):e.valid&&!e.deviceTrust.isVerified()?d=Object(l.a)("Backup has a <validity>valid</validity> signature from <verify>unverified</verify> session <device></device>",{},{validity:r,verify:o,device:i}):!e.valid&&e.deviceTrust.isVerified()?d=Object(l.a)("Backup has an <validity>invalid</validity> signature from <verify>verified</verify> session <device></device>",{},{validity:r,verify:o,device:i}):e.valid||e.deviceTrust.isVerified()||(d=Object(l.a)("Backup has an <validity>invalid</validity> signature from <verify>unverified</verify> session <device></device>",{},{validity:r,verify:o,device:i})):d=Object(l.a)("Backup has a signature from <verify>unknown</verify> session with ID %(deviceId)s",{deviceId:e.deviceId},{verify:o}),s.a.createElement("div",{key:t},d)});0===m.sigs.length&&(r=Object(l.a)("Backup is not signed by any of your sessions")),m.trusted_locally&&(n=Object(l.a)("This backup is trusted because it has been restored on this session")),_=s.a.createElement(s.a.Fragment,null,s.a.createElement("tr",null,s.a.createElement("td",null,Object(l.a)("Backup version:")),s.a.createElement("td",null,u.version)),s.a.createElement("tr",null,s.a.createElement("td",null,Object(l.a)("Algorithm:")),s.a.createElement("td",null,u.algorithm))),b=s.a.createElement(s.a.Fragment,null,e,s.a.createElement("div",null,r),s.a.createElement("div",null,n)),v.push(s.a.createElement(p.a,{key:"restore",kind:"primary",onClick:this._restoreBackup},t)),Object(d.d)()||v.push(s.a.createElement(p.a,{key:"delete",kind:"danger",onClick:this._deleteBackup},Object(l.a)("Delete Backup")))}else f=s.a.createElement(s.a.Fragment,null,s.a.createElement("p",null,Object(l.a)("Your keys are <b>not being backed up from this session</b>.",{},{b:e=>s.a.createElement("b",null,e)})),s.a.createElement("p",null,Object(l.a)("Back up your keys before signing out to avoid losing them."))),v.push(s.a.createElement(p.a,{key:"setup",kind:"primary",onClick:this._startNewBackup},Object(l.a)("Set up")));i&&v.push(s.a.createElement(p.a,{key:"reset",kind:"danger",onClick:this._resetSecretStorage},Object(l.a)("Reset")));let y,E="";return r&&(E=", ",E+=o?Object(l.a)("well formed"):Object(l.a)("unexpected type")),v.length&&(y=s.a.createElement("div",{className:"mx_SecureBackupPanel_buttonRow"},v)),s.a.createElement("div",null,s.a.createElement("p",null,Object(l.a)("Back up your encryption keys with your account data in case you lose access to your sessions. Your keys will be secured with a unique Security Key.")),f,s.a.createElement("details",null,s.a.createElement("summary",null,Object(l.a)("Advanced")),s.a.createElement("table",{className:"mx_SecureBackupPanel_statusList"},s.a.createElement("tbody",null,s.a.createElement("tr",null,s.a.createElement("td",null,Object(l.a)("Backup key stored:")),s.a.createElement("td",null,!0===n?Object(l.a)("in secret storage"):Object(l.a)("not stored"))),s.a.createElement("tr",null,s.a.createElement("td",null,Object(l.a)("Backup key cached:")),s.a.createElement("td",null,r?Object(l.a)("cached locally"):Object(l.a)("not found locally"),E)),s.a.createElement("tr",null,s.a.createElement("td",null,Object(l.a)("Secret storage public key:")),s.a.createElement("td",null,i?Object(l.a)("in account data"):Object(l.a)("not found"))),s.a.createElement("tr",null,s.a.createElement("td",null,Object(l.a)("Secret storage:")),s.a.createElement("td",null,a?Object(l.a)("ready"):Object(l.a)("not ready"))),_)),b),y)}})||r},function(e,t,n){"use strict";n.d(t,"b",(function(){return l}));var r=n(78),o=n.n(r),i=n(80),a=n(98),s=n(84),c=n(201);function l(){return s.b.isEnabled("e2ee.manuallyVerifyAllSessions")}t.a=e=>o.a.createElement("div",{className:"mx_SettingsTab_section"},o.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(i.a)("Encryption")),o.a.createElement(c.a,{name:"e2ee.manuallyVerifyAllSessions",level:a.a.DEVICE}),o.a.createElement("div",{className:"mx_E2eAdvancedPanel_settingLongDescription"},Object(i.a)("Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.")))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r,o=n(78),i=n.n(o),a=n(80),s=n(81),c=n(872);let l=Object(s.a)("views.settings.tabs.user.NotificationUserSettingsTab")(r=class extends i.a.Component{render(){return i.a.createElement("div",{className:"mx_SettingsTab mx_NotificationUserSettingsTab"},i.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(a.a)("Notifications")),i.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},i.a.createElement(c.a,null)))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(81),l=n(101),u=n(80),d=n(85);let h=Object(c.a)("views.elements.TagComposer")(r=class extends s.a.PureComponent{constructor(e){super(e),i()(this,"onInputChange",e=>{this.setState({newTag:e.target.value})}),i()(this,"onAdd",e=>{e.preventDefault(),this.state.newTag&&(this.props.onAdd(this.state.newTag),this.setState({newTag:""}))}),this.state={newTag:""}}onRemove(e){this.props.onRemove(e)}render(){return s.a.createElement("div",{className:"mx_TagComposer"},s.a.createElement("form",{className:"mx_TagComposer_input",onSubmit:this.onAdd},s.a.createElement(l.a,{value:this.state.newTag,onChange:this.onInputChange,label:this.props.label||Object(u.a)("Keyword"),placeholder:this.props.placeholder||Object(u.a)("New keyword"),disabled:this.props.disabled,autoComplete:"off"}),s.a.createElement(d.a,{onClick:this.onAdd,kind:"primary",disabled:this.props.disabled},Object(u.a)("Add"))),s.a.createElement("div",{className:"mx_TagComposer_tags"},this.props.tags.map((e,t)=>s.a.createElement("div",{className:"mx_TagComposer_tag",key:t},s.a.createElement("span",null,e),s.a.createElement(d.a,{onClick:this.onRemove.bind(this,e),disabled:this.props.disabled})))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(80),d=n(165),h=n(84),p=n(101),m=n(111),g=n(98),f=n(81),_=n(201),b=n(344),v=n(85),y=n(102);let E=Object(f.a)("views.settings.tabs.user.PreferencesUserSettingsTab")((i=o=class e extends l.a.Component{constructor(e){super(e),s()(this,"onAutoLaunchChange",e=>{m.a.get().setAutoLaunchEnabled(e).then(()=>this.setState({autoLaunch:e}))}),s()(this,"onWarnBeforeExitChange",e=>{m.a.get().setWarnBeforeExit(e).then(()=>this.setState({warnBeforeExit:e}))}),s()(this,"onAlwaysShowMenuBarChange",e=>{m.a.get().setAutoHideMenuBarEnabled(!e).then(()=>this.setState({alwaysShowMenuBar:e}))}),s()(this,"onMinimizeToTrayChange",e=>{m.a.get().setMinimizeToTrayEnabled(e).then(()=>this.setState({minimizeToTray:e}))}),s()(this,"onAutocompleteDelayChange",e=>{this.setState({autocompleteDelay:e.target.value}),h.b.setValue("autocompleteDelay",null,g.a.DEVICE,e.target.value)}),s()(this,"onReadMarkerInViewThresholdMs",e=>{this.setState({readMarkerInViewThresholdMs:e.target.value}),h.b.setValue("readMarkerInViewThresholdMs",null,g.a.DEVICE,e.target.value)}),s()(this,"onReadMarkerOutOfViewThresholdMs",e=>{this.setState({readMarkerOutOfViewThresholdMs:e.target.value}),h.b.setValue("readMarkerOutOfViewThresholdMs",null,g.a.DEVICE,e.target.value)}),this.state={autoLaunch:!1,autoLaunchSupported:!1,warnBeforeExit:!0,warnBeforeExitSupported:!1,alwaysShowMenuBar:!0,alwaysShowMenuBarSupported:!1,minimizeToTray:!0,minimizeToTraySupported:!1,autocompleteDelay:h.b.getValueAt(g.a.DEVICE,"autocompleteDelay").toString(10),readMarkerInViewThresholdMs:h.b.getValueAt(g.a.DEVICE,"readMarkerInViewThresholdMs").toString(10),readMarkerOutOfViewThresholdMs:h.b.getValueAt(g.a.DEVICE,"readMarkerOutOfViewThresholdMs").toString(10)}}async componentDidMount(){const e=m.a.get(),t=await e.supportsAutoLaunch();let n=!1;t&&(n=await e.getAutoLaunchEnabled());const r=await e.supportsWarnBeforeExit();let o=!1;r&&(o=await e.shouldWarnBeforeExit());const i=await e.supportsAutoHideMenuBar();let a=!0;i&&(a=!await e.getAutoHideMenuBarEnabled());const s=await e.supportsMinimizeToTray();let c=!0;s&&(c=await e.getMinimizeToTrayEnabled()),this.setState({autoLaunch:n,autoLaunchSupported:t,warnBeforeExit:o,warnBeforeExitSupported:r,alwaysShowMenuBarSupported:i,alwaysShowMenuBar:a,minimizeToTraySupported:s,minimizeToTray:c})}renderGroup(e){return e.filter(h.b.isEnabled).map(e=>l.a.createElement(_.a,{key:e,name:e,level:g.a.ACCOUNT}))}render(){let t=null;this.state.autoLaunchSupported&&(t=l.a.createElement(d.a,{value:this.state.autoLaunch,onChange:this.onAutoLaunchChange,label:Object(u.a)("Start automatically after system login")}));let n=null;this.state.warnBeforeExitSupported&&(n=l.a.createElement(d.a,{value:this.state.warnBeforeExit,onChange:this.onWarnBeforeExitChange,label:Object(u.a)("Warn before quitting")}));let r=null;this.state.alwaysShowMenuBarSupported&&(r=l.a.createElement(d.a,{value:this.state.alwaysShowMenuBar,onChange:this.onAlwaysShowMenuBarChange,label:Object(u.a)("Always show the window menu bar")}));let o=null;return this.state.minimizeToTraySupported&&(o=l.a.createElement(d.a,{value:this.state.minimizeToTray,onChange:this.onMinimizeToTrayChange,label:Object(u.a)("Show tray icon and minimize window to it on close")})),l.a.createElement("div",{className:"mx_SettingsTab mx_PreferencesUserSettingsTab"},l.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(u.a)("Preferences")),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Room list")),this.renderGroup(e.ROOM_LIST_SETTINGS)),y.g.spacesEnabled&&l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Spaces")),this.renderGroup(e.SPACES_SETTINGS)),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Keyboard shortcuts")),l.a.createElement(v.a,{className:"mx_SettingsFlag",onClick:b.f},Object(u.a)("To view all keyboard shortcuts, click here.")),this.renderGroup(e.KEYBINDINGS_SETTINGS)),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Displaying time")),this.renderGroup(e.TIME_SETTINGS)),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Composer")),this.renderGroup(e.COMPOSER_SETTINGS)),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Code blocks")),this.renderGroup(e.CODE_BLOCKS_SETTINGS)),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Images, GIFs and videos")),this.renderGroup(e.IMAGES_AND_VIDEOS_SETTINGS)),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("Timeline")),this.renderGroup(e.TIMELINE_SETTINGS)),l.a.createElement("div",{className:"mx_SettingsTab_section"},l.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(u.a)("General")),this.renderGroup(e.GENERAL_SETTINGS),o,r,t,n,l.a.createElement(p.a,{label:Object(u.a)("Autocomplete delay (ms)"),type:"number",value:this.state.autocompleteDelay,onChange:this.onAutocompleteDelayChange}),l.a.createElement(p.a,{label:Object(u.a)("Read Marker lifetime (ms)"),type:"number",value:this.state.readMarkerInViewThresholdMs,onChange:this.onReadMarkerInViewThresholdMs}),l.a.createElement(p.a,{label:Object(u.a)("Read Marker off-screen lifetime (ms)"),type:"number",value:this.state.readMarkerOutOfViewThresholdMs,onChange:this.onReadMarkerOutOfViewThresholdMs})))}},s()(o,"ROOM_LIST_SETTINGS",["breadcrumbs"]),s()(o,"SPACES_SETTINGS",["Spaces.allRoomsInHome"]),s()(o,"KEYBINDINGS_SETTINGS",["ctrlFForSearch"]),s()(o,"COMPOSER_SETTINGS",["MessageComposerInput.autoReplaceEmoji","MessageComposerInput.suggestEmoji","sendTypingNotifications","MessageComposerInput.ctrlEnterToSend","MessageComposerInput.surroundWith","MessageComposerInput.showStickersButton"]),s()(o,"TIME_SETTINGS",["showTwelveHourTimestamps","alwaysShowTimestamps"]),s()(o,"CODE_BLOCKS_SETTINGS",["enableSyntaxHighlightLanguageDetection","expandCodeByDefault","showCodeLineNumbers"]),s()(o,"IMAGES_AND_VIDEOS_SETTINGS",["urlPreviewsEnabled","autoplayGifsAndVideos","showImages"]),s()(o,"TIMELINE_SETTINGS",["showTypingNotifications","showRedactions","showReadReceipts","showJoinLeaves","showDisplaynameChanges","showChatEffects","showAvatarChanges","Pill.shouldShowPillAvatar","TextualBody.enableBigEmoji","scrollToBottomOnMessageSent"]),s()(o,"GENERAL_SETTINGS",["TagPanel.enableTagPanel","promptBeforeInviteUnknownUsers"]),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(90),u=n(285),d=n(101),h=n(85),p=n(82),m=n(87),g=n(98),f=n(81),_=n(201),b=n(105);let v=Object(f.a)("views.settings.tabs.user.VoiceUserSettingsTab")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"refreshMediaDevices",async e=>{this.setState({mediaDevices:await u.c.getDevices(),[u.b.AudioOutput]:u.c.getAudioOutput(),[u.b.AudioInput]:u.c.getAudioInput(),[u.b.VideoInput]:u.c.getVideoInput()}),e&&e.getTracks().forEach(e=>e.stop())}),i()(this,"requestMediaPermissions",async()=>{let e,t,n;try{e={video:!0,audio:!0},t=await navigator.mediaDevices.getUserMedia(e)}catch(r){if("NotFoundError"===r.name){e={audio:!0};try{t=await navigator.mediaDevices.getUserMedia(e)}catch(e){n=e}}else n=r}if(n){console.log("Failed to list userMedia devices",n);const e=l.a.get().brand;m.a.createTrackedDialog("No media permissions","",b.a,{title:Object(c.a)("No media permissions"),description:Object(c.a)("You may need to manually permit %(brand)s to access your microphone/webcam",{brand:e})})}else this.refreshMediaDevices(t)}),i()(this,"setDevice",(e,t)=>{u.c.instance.setDevice(e,t),this.setState({[t]:e})}),i()(this,"changeWebRtcMethod",e=>{p.a.get().setForceTURN(!e)}),i()(this,"changeFallbackICEServerAllowed",e=>{p.a.get().setFallbackICEServerAllowed(e)}),this.state={mediaDevices:null,[u.b.AudioOutput]:null,[u.b.AudioInput]:null,[u.b.VideoInput]:null}}async componentDidMount(){await u.c.hasAnyLabeledDevices()&&this.refreshMediaDevices()}renderDeviceOptions(e,t){return e.map(e=>s.a.createElement("option",{key:`${t}-${e.deviceId}`,value:e.deviceId},e.label))}renderDropdown(e,t){const n=this.state.mediaDevices[e].slice(0);if(0===n.length)return null;const r=(e=>e.some(e=>"default"===e.deviceId)?"default":(e.unshift({deviceId:"",label:Object(c.a)("Default Device")}),""))(n);return s.a.createElement(d.a,{element:"select",label:t,value:this.state[e]||r,onChange:t=>this.setDevice(t.target.value,e)},this.renderDeviceOptions(n,e))}render(){let e=null,t=null,n=null,r=null;return this.state.mediaDevices?this.state.mediaDevices&&(t=this.renderDropdown(u.b.AudioOutput,Object(c.a)("Audio Output"))||s.a.createElement("p",null,Object(c.a)("No Audio Outputs detected")),n=this.renderDropdown(u.b.AudioInput,Object(c.a)("Microphone"))||s.a.createElement("p",null,Object(c.a)("No Microphones detected")),r=this.renderDropdown(u.b.VideoInput,Object(c.a)("Camera"))||s.a.createElement("p",null,Object(c.a)("No Webcams detected"))):e=s.a.createElement("div",{className:"mx_VoiceUserSettingsTab_missingMediaPermissions"},s.a.createElement("p",null,Object(c.a)("Missing media permissions, click the button below to request.")),s.a.createElement(h.a,{onClick:this.requestMediaPermissions,kind:"primary"},Object(c.a)("Request media permissions"))),s.a.createElement("div",{className:"mx_SettingsTab mx_VoiceUserSettingsTab"},s.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Voice & Video")),s.a.createElement("div",{className:"mx_SettingsTab_section"},e,t,n,r,s.a.createElement(_.a,{name:"VideoView.flipVideoHorizontally",level:g.a.ACCOUNT}),s.a.createElement(_.a,{name:"webRtcAllowPeerToPeer",level:g.a.DEVICE,onChange:this.changeWebRtcMethod}),s.a.createElement(_.a,{name:"fallbackICEServerAllowed",level:g.a.DEVICE,onChange:this.changeFallbackICEServerAllowed})))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(85),l=n(80),u=n(82),d=n(106),h=n(90),p=n(125),m=n(87),g=n(111),f=n(344),_=n(854),b=n(81),v=n(130),y=n(103),E=n(223),S=n(280);function w(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}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let T=Object(b.a)("views.settings.tabs.user.HelpUserSettingsTab")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"closeCopiedTooltip",void 0),i()(this,"onClearCacheAndReload",e=>{g.a.get()&&(console.log("Clear cache & reload clicked"),u.a.get().stopClient(),u.a.get().store.deleteAllData().then(()=>{g.a.get().reload()}))}),i()(this,"onBugReport",e=>{m.a.createTrackedDialog("Bug Report Dialog","",E.a,{})}),i()(this,"onStartBotChat",e=>{this.props.closeSettingsFn(),Object(p.b)({dmUserId:h.a.get().welcomeUserId,andView:!0})}),i()(this,"showSpoiler",e=>{const t=e.target;t.innerHTML=t.getAttribute("data-spoiler");const n=document.createRange();n.selectNodeContents(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n)}),i()(this,"onAccessTokenCopyClick",e=>{this.copy(u.a.get().getAccessToken(),e)}),i()(this,"onCopyVersionClicked",e=>{const{appVersion:t,olmVersion:n}=this.getVersionInfo();this.copy(`${t}\n${n}`,e)}),this.state={appVersion:null,canUpdate:!1}}componentDidMount(){g.a.get().getAppVersion().then(e=>this.setState({appVersion:e})).catch(e=>{console.error("Error getting vector version: ",e)}),g.a.get().canSelfUpdate().then(e=>this.setState({canUpdate:e})).catch(e=>{console.error("Error getting self updatability: ",e)})}componentWillUnmount(){this.closeCopiedTooltip&&this.closeCopiedTooltip()}getVersionInfo(){const e=h.a.get().brand,t=this.state.appVersion||"unknown";let n=u.a.get().olmVersion;return n=n?`${n[0]}.${n[1]}.${n[2]}`:"<not-enabled>",{appVersion:`${Object(l.a)("%(brand)s version:",{brand:e})} ${t}`,olmVersion:`${Object(l.a)("Olm version:")} ${n}`}}renderLegal(){if(!h.a.get().terms_and_conditions_links)return null;const e=[];for(const t of h.a.get().terms_and_conditions_links)e.push(s.a.createElement("div",{key:t.url},s.a.createElement("a",{href:t.url,rel:"noreferrer noopener",target:"_blank"},t.text)));return s.a.createElement("div",{className:"mx_SettingsTab_section mx_HelpUserSettingsTab_versions"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(l.a)("Legal")),s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},e))}renderCredits(){return s.a.createElement("div",{className:"mx_SettingsTab_section"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(l.a)("Credits")),s.a.createElement("ul",null,s.a.createElement("li",null,"The ",s.a.createElement("a",{href:"themes/element/img/backgrounds/lake.jpg",rel:"noreferrer noopener",target:"_blank"},"default cover photo")," is © ",s.a.createElement("a",{href:"https://www.flickr.com/golan",rel:"noreferrer noopener",target:"_blank"},"Jesús Roncero")," used under the terms of ",s.a.createElement("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",rel:"noreferrer noopener",target:"_blank"},"CC-BY-SA 4.0"),"."),s.a.createElement("li",null,"The ",s.a.createElement("a",{href:"https://github.com/matrix-org/twemoji-colr",rel:"noreferrer noopener",target:"_blank"},"twemoji-colr")," font is © ",s.a.createElement("a",{href:"https://mozilla.org",rel:"noreferrer noopener",target:"_blank"},"Mozilla Foundation")," used under the terms of ",s.a.createElement("a",{href:"http://www.apache.org/licenses/LICENSE-2.0",rel:"noreferrer noopener",target:"_blank"},"Apache 2.0"),"."),s.a.createElement("li",null,"The ",s.a.createElement("a",{href:"https://twemoji.twitter.com/",rel:"noreferrer noopener",target:"_blank"},"Twemoji")," emoji art is © ",s.a.createElement("a",{href:"https://twemoji.twitter.com/",rel:"noreferrer noopener",target:"_blank"},"Twitter, Inc and other contributors")," used under the terms of ",s.a.createElement("a",{href:"https://creativecommons.org/licenses/by/4.0/",rel:"noreferrer noopener",target:"_blank"},"CC-BY 4.0"),".")))}async copy(e,t){t.preventDefault();const n=t.target,r=await Object(v.c)(e),o=n.getBoundingClientRect(),{close:i}=y.n(S.a,C(C({},Object(y.p)(o,2)),{},{message:r?Object(l.a)("Copied!"):Object(l.a)("Failed to copy")}));this.closeCopiedTooltip=n.onmouseleave=i}render(){const e=h.a.get().brand;let t=Object(l.a)("For help with using %(brand)s, click <a>here</a>.",{brand:e},{a:e=>s.a.createElement("a",{href:"https://element.io/help",rel:"noreferrer noopener",target:"_blank"},e)});h.a.get().welcomeUserId&&Object(l.d)().startsWith("en")&&(t=s.a.createElement("div",null,Object(l.a)("For help with using %(brand)s, click <a>here</a> or start a chat with our bot using the button below.",{brand:e},{a:e=>s.a.createElement("a",{href:"https://element.io/help",rel:"noreferrer noopener",target:"_blank"},e)}),s.a.createElement("div",null,s.a.createElement(c.a,{onClick:this.onStartBotChat,kind:"primary"},Object(l.a)("Chat with %(brand)s Bot",{brand:e})))));let n,r=null;this.state.canUpdate&&(r=s.a.createElement(_.a,null)),h.a.get().bug_report_endpoint_url&&(n=s.a.createElement("div",{className:"mx_SettingsTab_section"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(l.a)("Bug reporting")),s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(l.a)("If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages."),s.a.createElement("div",{className:"mx_HelpUserSettingsTab_debugButton"},s.a.createElement(c.a,{onClick:this.onBugReport,kind:"primary"},Object(l.a)("Submit debug logs"))),Object(l.a)("To report a Matrix-related security issue, please read the Matrix.org <a>Security Disclosure Policy</a>.",{},{a:e=>s.a.createElement("a",{href:"https://matrix.org/security-disclosure-policy/",rel:"noreferrer noopener",target:"_blank"},e)}))));const{appVersion:o,olmVersion:i}=this.getVersionInfo();return s.a.createElement("div",{className:"mx_SettingsTab mx_HelpUserSettingsTab"},s.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(l.a)("Help & About")),n,s.a.createElement("div",{className:"mx_SettingsTab_section"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(l.a)("FAQ")),s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},t),s.a.createElement(c.a,{kind:"primary",onClick:f.f},Object(l.a)("Keyboard Shortcuts"))),s.a.createElement("div",{className:"mx_SettingsTab_section mx_HelpUserSettingsTab_versions"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(l.a)("Versions")),s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},s.a.createElement("div",{className:"mx_HelpUserSettingsTab_copy"},o,s.a.createElement("br",null),i,s.a.createElement("br",null),s.a.createElement(d.a,{title:Object(l.a)("Copy"),onClick:this.onCopyVersionClicked,className:"mx_HelpUserSettingsTab_copyButton"})),r)),this.renderLegal(),this.renderCredits(),s.a.createElement("div",{className:"mx_SettingsTab_section mx_HelpUserSettingsTab_versions"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(l.a)("Advanced")),s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(l.a)("Homeserver is")," ",s.a.createElement("code",null,u.a.get().getHomeserverUrl()),s.a.createElement("br",null),Object(l.a)("Identity server is")," ",s.a.createElement("code",null,u.a.get().getIdentityServerUrl()),s.a.createElement("br",null),s.a.createElement("br",null),s.a.createElement("details",null,s.a.createElement("summary",null,Object(l.a)("Access Token")),s.a.createElement("br",null),s.a.createElement("b",null,Object(l.a)("Your access token gives full access to your account. Do not share it with anyone.")),s.a.createElement("div",{className:"mx_HelpUserSettingsTab_copy"},s.a.createElement("code",null,u.a.get().getAccessToken()),s.a.createElement(d.a,{title:Object(l.a)("Copy"),onClick:this.onAccessTokenCopyClick,className:"mx_HelpUserSettingsTab_copyButton"}))),s.a.createElement("br",null),s.a.createElement("div",{className:"mx_HelpUserSettingsTab_debugButton"},s.a.createElement(c.a,{onClick:this.onClearCacheAndReload,kind:"danger"},Object(l.a)("Clear cache and reload"))))))}})||r},function(e,t,n){"use strict";var r=n(99),o=n.n(r),i=n(78),a=n.n(i),s=n(253),c=n(111),l=n(442),u=n(83),d=n(91),h=n(80),p=n(147),m=n(85);const g=["action"];function f(){c.a.get().installUpdate()}const _=[s.d.Ready,s.d.Error,s.d.NotAvailable];t.a=()=>{const[e,t]=Object(i.useState)(null);Object(l.a)(u.a,e=>{let{action:n}=e,r=o()(e,g);n===d.a.CheckUpdates&&t(r)});const n=e&&!_.includes(e.status);let r;return e&&(r=a.a.createElement("span",{className:"mx_UpdateCheckButton_summary"},function(e,t){switch(e){case s.d.Error:return Object(h.a)("Error encountered (%(errorDetail)s).",{errorDetail:t});case s.d.Checking:return Object(h.a)("Checking for an update...");case s.d.NotAvailable:return Object(h.a)("No update available.");case s.d.Downloading:return Object(h.a)("Downloading update...");case s.d.Ready:return Object(h.a)("New version available. <a>Update now.</a>",{},{a:e=>a.a.createElement(m.a,{kind:"link",onClick:f},e)})}}(e.status,e.detail),n&&a.a.createElement(p.a,null))),a.a.createElement(a.a.Fragment,null,a.a.createElement(m.a,{onClick:()=>{t(null),c.a.get().startUpdateCheck()},kind:"primary",disabled:n},Object(h.a)("Check for update")),r)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r,o=n(78),i=n.n(o),a=n(80),s=n(856),c=n(81);let l=Object(c.a)("views.settings.tabs.user.FlairUserSettingsTab")(r=class extends i.a.Component{render(){return i.a.createElement("div",{className:"mx_SettingsTab"},i.a.createElement("span",{className:"mx_SettingsTab_heading"},Object(a.a)("Flair")),i.a.createElement("div",{className:"mx_SettingsTab_section"},i.a.createElement(s.a,null)))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(89),d=n(80),h=n(94),p=n(81);let m=Object(p.a)("views.groups.GroupUserSettings")((i=o=class extends l.a.Component{constructor(...e){super(...e),s()(this,"state",{error:null,groups:null})}componentDidMount(){this.context.getJoinedGroups().then(e=>{this.setState({groups:e.groups||[],error:null})},e=>{console.error(e),this.setState({groups:null,error:e})})}render(){let e="",t=null;const n=this.state.groups;if(this.state.error)e=Object(d.a)("Something went wrong when trying to get your communities.");else if(null===n)e=Object(d.a)("Loading...");else if(n.length>0){const r=u.getComponent("groups.GroupPublicityToggle");t=n.map((e,t)=>l.a.createElement(r,{key:t,groupId:e})),e=Object(d.a)("Display your community flair in rooms configured to show it.")}else e=Object(d.a)("You're not currently a member of any communities.");return l.a.createElement("div",null,l.a.createElement("p",{className:"mx_SettingsTab_subsectionText"},e),l.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},t))}},s()(o,"contextType",h.a),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(80),l=n(90),u=n(423),d=n(365),h=n(87),p=n(82),m=n(81),g=n(105),f=n(110),_=n(85),b=n(101);let v=Object(m.a)("views.settings.tabs.user.MjolnirUserSettingsTab")(r=class extends s.a.Component{constructor(e){super(e),i()(this,"onPersonalRuleChanged",e=>{this.setState({newPersonalRule:e.target.value})}),i()(this,"onNewListChanged",e=>{this.setState({newList:e.target.value})}),i()(this,"onAddPersonalRule",async e=>{e.preventDefault(),e.stopPropagation();let t=d.d;this.state.newPersonalRule.startsWith("@")&&(t=d.e),this.setState({busy:!0});try{const e=await u.a.sharedInstance().getOrCreatePersonalList();await e.banEntity(t,this.state.newPersonalRule,Object(c.a)("Ignored/Blocked")),this.setState({newPersonalRule:""})}catch(e){console.error(e),h.a.createTrackedDialog("Failed to add Mjolnir rule","",g.a,{title:Object(c.a)("Error adding ignored user/server"),description:Object(c.a)("Something went wrong. Please try again or view your console for hints.")})}finally{this.setState({busy:!1})}}),i()(this,"onSubscribeList",async e=>{e.preventDefault(),e.stopPropagation(),this.setState({busy:!0});try{const e=await p.a.get().joinRoom(this.state.newList);await u.a.sharedInstance().subscribeToList(e.roomId),this.setState({newList:""})}catch(e){console.error(e),h.a.createTrackedDialog("Failed to subscribe to Mjolnir list","",g.a,{title:Object(c.a)("Error subscribing to list"),description:Object(c.a)("Please verify the room ID or address and try again.")})}finally{this.setState({busy:!1})}}),this.state={busy:!1,newPersonalRule:"",newList:""}}async removePersonalRule(e){this.setState({busy:!0});try{const t=u.a.sharedInstance().getPersonalList();await t.unbanEntity(e.kind,e.entity)}catch(e){console.error(e),h.a.createTrackedDialog("Failed to remove Mjolnir rule","",g.a,{title:Object(c.a)("Error removing ignored user/server"),description:Object(c.a)("Something went wrong. Please try again or view your console for hints.")})}finally{this.setState({busy:!1})}}async unsubscribeFromList(e){this.setState({busy:!0});try{await u.a.sharedInstance().unsubscribeFromList(e.roomId),await p.a.get().leave(e.roomId)}catch(e){console.error(e),h.a.createTrackedDialog("Failed to unsubscribe from Mjolnir list","",g.a,{title:Object(c.a)("Error unsubscribing from list"),description:Object(c.a)("Please try again or view your console for hints.")})}finally{this.setState({busy:!1})}}viewListRules(e){const t=p.a.get().getRoom(e.roomId),n=t?t.name:e.roomId,r=e=>{if(0===e.length)return s.a.createElement("i",null,Object(c.a)("None"));const t=[];for(const n of e)t.push(s.a.createElement("li",{key:n.kind+n.entity},s.a.createElement("code",null,n.entity)));return s.a.createElement("ul",null,t)};h.a.createTrackedDialog("View Mjolnir list rules","",f.a,{title:Object(c.a)("Ban list rules - %(roomName)s",{roomName:n}),description:s.a.createElement("div",null,s.a.createElement("h3",null,Object(c.a)("Server rules")),r(e.serverRules),s.a.createElement("h3",null,Object(c.a)("User rules")),r(e.userRules)),button:Object(c.a)("Close"),hasCancelButton:!1})}renderPersonalBanListRules(){const e=u.a.sharedInstance().getPersonalList(),t=e?[...e.userRules,...e.serverRules]:[];if(!e||t.length<=0)return s.a.createElement("i",null,Object(c.a)("You have not ignored anyone."));const n=[];for(const e of t)n.push(s.a.createElement("li",{key:e.entity,className:"mx_MjolnirUserSettingsTab_listItem"},s.a.createElement(_.a,{kind:"danger_sm",onClick:()=>this.removePersonalRule(e),disabled:this.state.busy},Object(c.a)("Remove"))," ",s.a.createElement("code",null,e.entity)));return s.a.createElement("div",null,s.a.createElement("p",null,Object(c.a)("You are currently ignoring:")),s.a.createElement("ul",null,n))}renderSubscribedBanLists(){const e=u.a.sharedInstance().getPersonalList(),t=u.a.sharedInstance().lists.filter(t=>!e||e.roomId!==t.roomId);if(!t||t.length<=0)return s.a.createElement("i",null,Object(c.a)("You are not subscribed to any lists"));const n=[];for(const e of t){const t=p.a.get().getRoom(e.roomId),r=t?s.a.createElement("span",null,t.name," (",s.a.createElement("code",null,e.roomId),")"):s.a.createElement("code",null,"list.roomId");n.push(s.a.createElement("li",{key:e.roomId,className:"mx_MjolnirUserSettingsTab_listItem"},s.a.createElement(_.a,{kind:"danger_sm",onClick:()=>this.unsubscribeFromList(e),disabled:this.state.busy},Object(c.a)("Unsubscribe"))," ",s.a.createElement(_.a,{kind:"primary_sm",onClick:()=>this.viewListRules(e),disabled:this.state.busy},Object(c.a)("View rules"))," ",r))}return s.a.createElement("div",null,s.a.createElement("p",null,Object(c.a)("You are currently subscribed to:")),s.a.createElement("ul",null,n))}render(){const e=l.a.get().brand;return s.a.createElement("div",{className:"mx_SettingsTab mx_MjolnirUserSettingsTab"},s.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Ignored users")),s.a.createElement("div",{className:"mx_SettingsTab_section"},s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},s.a.createElement("span",{className:"warning"},Object(c.a)("⚠ These settings are meant for advanced users.")),s.a.createElement("br",null),s.a.createElement("br",null),Object(c.a)("Add users and servers you want to ignore here. Use asterisks to have %(brand)s match any characters. For example, <code>@bot:*</code> would ignore all users that have the name 'bot' on any server.",{brand:e},{code:e=>s.a.createElement("code",null,e)}),s.a.createElement("br",null),s.a.createElement("br",null),Object(c.a)("Ignoring people is done through ban lists which contain rules for who to ban. Subscribing to a ban list means the users/servers blocked by that list will be hidden from you."))),s.a.createElement("div",{className:"mx_SettingsTab_section"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(c.a)("Personal ban list")),s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(c.a)("Your personal ban list holds all the users/servers you personally don't want to see messages from. After ignoring your first user/server, a new room will show up in your room list named 'My Ban List' - stay in this room to keep the ban list in effect.")),s.a.createElement("div",null,this.renderPersonalBanListRules()),s.a.createElement("div",null,s.a.createElement("form",{onSubmit:this.onAddPersonalRule,autoComplete:"off"},s.a.createElement(b.a,{type:"text",label:Object(c.a)("Server or user ID to ignore"),placeholder:Object(c.a)("eg: @bot:* or example.org"),value:this.state.newPersonalRule,onChange:this.onPersonalRuleChanged}),s.a.createElement(_.a,{type:"submit",kind:"primary",onClick:this.onAddPersonalRule,disabled:this.state.busy},Object(c.a)("Ignore"))))),s.a.createElement("div",{className:"mx_SettingsTab_section"},s.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(c.a)("Subscribed lists")),s.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},s.a.createElement("span",{className:"warning"},Object(c.a)("Subscribing to a ban list will cause you to join it!"))," ",s.a.createElement("span",null,Object(c.a)("If this isn't what you want, please use a different tool to ignore users."))),s.a.createElement("div",null,this.renderSubscribedBanLists()),s.a.createElement("div",null,s.a.createElement("form",{onSubmit:this.onSubscribeList,autoComplete:"off"},s.a.createElement(b.a,{type:"text",label:Object(c.a)("Room ID or address of ban list"),value:this.state.newList,onChange:this.onNewListChanged}),s.a.createElement(_.a,{type:"submit",kind:"primary",onClick:this.onSubscribeList,disabled:this.state.busy},Object(c.a)("Subscribe"))))))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return p}));var r=n(78),o=n.n(r),i=n(142),a=n.n(i),s=n(230),c=n(82),l=n(84),u=n(331),d=n(114);function h(e,t,n){const r=c.a.get().getRoom(t.getRoomId()),i=l.b.getValue("Pill.shouldShowPillAvatar");let p=e[0];for(;p;){let e=!1;if("A"===p.tagName&&p.getAttribute("href")){const t=p.getAttribute("href"),s=Object(d.i)(t);if(s&&!s.eventId){const s=document.createElement("span"),c=o.a.createElement(u.a,{url:t,inMessage:!0,room:r,shouldShowPillAvatar:i});a.a.render(c,s),p.parentNode.replaceChild(s,p),n.push(s),e=!0,p=s}}else if(p.nodeType===Node.TEXT_NODE&&!p.parentElement.classList.contains("mx_AtRoomPill")){let e=p;const l=[];for(;null!==e;){const t=u.a.roomNotifPos(e.textContent);let n=null;if(t>-1){let r=e;t>0&&(r=r.splitText(t)),r.textContent.length>u.a.roomNotifLen()&&(n=r.splitText(u.a.roomNotifLen())),l.push(r)}e=n}if(l.length>0){const e=new s.a(c.a.get()),d=e.getPushRuleById(".m.rule.roomnotif");if(d&&e.ruleMatchesEvent(d,t)){for(const e of l){p=e.nextSibling;const t=document.createElement("span"),s=o.a.createElement(u.a,{type:u.a.TYPE_AT_ROOM_MENTION,inMessage:!0,room:r,shouldShowPillAvatar:i});a.a.render(s,t),e.parentNode.replaceChild(t,e),n.push(t)}continue}}}p.childNodes&&p.childNodes.length&&!e&&h(p.childNodes,t,n),p=p.nextSibling}}function p(e){for(const t of e)a.a.unmountComponentAtNode(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,o=n(78),i=n.n(o),a=n(81);let s=Object(a.a)("views.elements.Spoiler")(r=class extends i.a.Component{constructor(e){super(e),this.state={visible:!1}}toggleVisible(e){this.state.visible||(e.preventDefault(),e.stopPropagation()),this.setState({visible:!this.state.visible})}render(){const e=this.props.reason?i.a.createElement("span",{className:"mx_EventTile_spoiler_reason"},"("+this.props.reason+")"):null;return i.a.createElement("span",{className:"mx_EventTile_spoiler"+(this.state.visible?" visible":""),onClick:this.toggleVisible.bind(this)},e," ",i.a.createElement("span",{className:"mx_EventTile_spoiler_content",dangerouslySetInnerHTML:{__html:this.props.contentHtml}}))}})||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(88),d=n.n(u),h=n(82),p=n(80),m=n(89),g=n(148),f=n(84),_=n(81);let b=Object(_.a)("views.dialogs.MessageEditHistoryDialog")((i=o=class extends l.a.PureComponent{constructor(e){super(e),s()(this,"loadMoreEdits",async e=>{if(e||!this.state.nextBatch&&!this.state.isLoading)return!1;const t={from:this.state.nextBatch},n=this.props.mxEvent.getRoomId(),r=this.props.mxEvent.getId(),o=h.a.get();let i,a,s;const c=new Promise((e,t)=>{a=e,s=t});try{i=await o.relations(n,r,"m.replace","m.room.message",t)}catch(e){return e.errcode&&console.error("fetching /relations failed with error",e),this.setState({error:e},()=>s(e)),c}const l=i.events;return this._locallyRedactEventsIfNeeded(l),this.setState({originalEvent:this.state.originalEvent||i.originalEvent,events:this.state.events.concat(l),nextBatch:i.nextBatch,isLoading:!1},()=>{const e=!!this.state.nextBatch;a(e)}),c}),this.state={originalEvent:null,error:null,events:[],nextBatch:null,isLoading:!0,isTwelveHour:f.b.getValue("showTwelveHourTimestamps")}}_locallyRedactEventsIfNeeded(e){const t=this.props.mxEvent.getRoomId(),n=h.a.get().getRoom(t).getPendingEvents();for(const t of e){const e=n.find(e=>"m.room.redaction"===e.getType()&&e.getAssociatedId()===t.getId());e&&t.markLocallyRedacted(e)}}componentDidMount(){this.loadMoreEdits()}_renderEdits(){const e=m.getComponent("messages.EditHistoryMessage"),t=m.getComponent("messages.DateSeparator"),n=[];let r,o=this.state.events;this.state.originalEvent&&!this.state.nextBatch&&(o=o.concat(this.state.originalEvent));const i=this.props.mxEvent.getId();return o.forEach((a,s)=>{r&&!Object(g.g)(r.getDate(),a.getDate())||n.push(l.a.createElement("li",{key:a.getTs()+"~"},l.a.createElement(t,{ts:a.getTs()})));const c=a.getId()===i;n.push(l.a.createElement(e,{key:a.getId(),previousEdit:c?null:o[s+1],isBaseEvent:c,mxEvent:a,isTwelveHour:this.state.isTwelveHour})),r=a}),n}render(){let e;if(this.state.error){const{error:t}=this.state;e="M_UNRECOGNIZED"===t.errcode?l.a.createElement("p",{className:"mx_MessageEditHistoryDialog_error"},Object(p.a)("Your homeserver doesn't seem to support this feature.")):t.errcode?l.a.createElement("p",{className:"mx_MessageEditHistoryDialog_error"},Object(p.a)("Something went wrong!")):l.a.createElement("p",{className:"mx_MessageEditHistoryDialog_error"},Object(p.a)("Cannot reach homeserver"),l.a.createElement("br",null),Object(p.a)("Ensure you have a stable internet connection, or get in touch with the server admin"))}else if(this.state.isLoading){const t=m.getComponent("elements.Spinner");e=l.a.createElement(t,null)}else{const t=m.getComponent("structures.ScrollPanel");e=l.a.createElement(t,{className:"mx_MessageEditHistoryDialog_scrollPanel",onFillRequest:this.loadMoreEdits,stickyBottom:!1,startAtBottom:!1},l.a.createElement("ul",{className:"mx_MessageEditHistoryDialog_edits"},this._renderEdits()))}const t=m.getComponent("views.dialogs.BaseDialog");return l.a.createElement(t,{className:"mx_MessageEditHistoryDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(p.a)("Message edits")},e)}},s()(o,"propTypes",{mxEvent:d.a.object.isRequired}),r=i))||r},function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));var r,o,i,a=n(79),s=n.n(a),c=n(78),l=n.n(c),u=n(86),d=n.n(u),h=n(108),p=n(80),m=n(83),g=n(880),f=n(492),_=n(802),b=n(198),v=n(806),y=n(506),E=n(505),S=n(94),w=n(293),C=n(91),T=n(112),x=n(179),k=n(81),F=n(808),O=n(87),R=n(93),D=n(105),I=n(110),A=n(85);function N(e,t){const n=Object(_.a)(e);n&&(e=Object(_.d)(e));const r=function(e){const t=e.getContent()["m.relates_to"];return!(!t||!t["m.in_reply_to"])}(t);let o="",i="";r&&(o=function(e){const t=e.getContent().body.split("\n").map(e=>e.trim());return t.length>2&&t[0].startsWith("> ")&&0===t[1].length?t[0]+"\n\n":""}(t),i=function(e){const t=e.getContent().formatted_body;if(!t)return"";const n=(new DOMParser).parseFromString(t,"text/html").body.querySelector("mx-reply");return n&&n.outerHTML||""}(t));const a=Object(_.f)(e),s={msgtype:n?R.b.Emote:R.b.Text,body:a},c={msgtype:s.msgtype,body:`${o} * ${a}`},l=Object(_.b)(e,{forceHTML:r});return l&&(s.format="org.matrix.custom.html",s.formatted_body=l,c.format=s.format,c.formatted_body=`${i} * ${l}`),Object.assign({"m.new_content":s,"m.relates_to":{rel_type:"m.replace",event_id:t.getId()}},c)}let M=Object(k.a)("views.rooms.EditMessageComposer")((i=o=class extends l.a.Component{constructor(e,t){super(e),s()(this,"context",void 0),s()(this,"editorRef",Object(c.createRef)()),s()(this,"dispatcherRef",void 0),s()(this,"model",null),s()(this,"onKeyDown",e=>{var t;if(null!==(t=this.editorRef.current)&&void 0!==t&&t.isComposing(e))return;switch(Object(x.f)().getMessageComposerAction(e)){case x.b.Send:this.sendEdit(),e.preventDefault();break;case x.b.CancelEditing:this.cancelEdit();break;case x.b.EditPrevMessage:{var n,r;if(null!==(n=this.editorRef.current)&&void 0!==n&&n.isModified()||null===(r=this.editorRef.current)||void 0===r||!r.isCaretAtStart())return;const t=Object(b.b)(this.getRoom(),!1,this.props.editState.getEvent().getId());t&&(m.a.dispatch({action:"edit_event",event:t}),e.preventDefault());break}case x.b.EditNextMessage:{var o,i;if(null!==(o=this.editorRef.current)&&void 0!==o&&o.isModified()||null===(i=this.editorRef.current)||void 0===i||!i.isCaretAtEnd())return;const t=Object(b.b)(this.getRoom(),!0,this.props.editState.getEvent().getId());t?m.a.dispatch({action:"edit_event",event:t}):(this.clearStoredEditorState(),m.a.dispatch({action:"edit_event",event:null}),m.a.fire(C.a.FocusSendMessageComposer)),e.preventDefault();break}}}),s()(this,"cancelEdit",()=>{this.clearStoredEditorState(),m.a.dispatch({action:"edit_event",event:null}),m.a.fire(C.a.FocusSendMessageComposer)}),s()(this,"saveStoredEditorState",()=>{const e=F.a.createItem(this.model);this.clearPreviousEdit(),localStorage.setItem(this.editorRoomKey,this.props.editState.getEvent().getId()),localStorage.setItem(this.editorStateKey,JSON.stringify(e))}),s()(this,"sendEdit",async()=>{const e=T.a.getTimestamp(),t=this.props.editState.getEvent(),n=N(this.model,t),r=n["m.new_content"];let o=!0;if(this.isContentModified(r)){const r=t.getRoomId();if(!Object(_.a)(this.model)&&this.isSlashCommand()){const[e,t,i]=this.getSlashCommand();if(e)e.category===w.a.messages?n["m.new_content"]=await this.runSlashCommand(e,t,r):(this.runSlashCommand(e,t,r),o=!1);else{const{finished:e}=O.a.createTrackedDialog("Unknown command","",I.a,{title:Object(p.a)("Unknown Command"),description:l.a.createElement("div",null,l.a.createElement("p",null,Object(p.a)("Unrecognised command: %(commandText)s",{commandText:i})),l.a.createElement("p",null,Object(p.a)("You can use <code>/help</code> to list available commands. Did you mean to send this as a message?",{},{code:e=>l.a.createElement("code",null,e)})),l.a.createElement("p",null,Object(p.a)("Hint: Begin your message with <code>//</code> to start it with a slash.",{},{code:e=>l.a.createElement("code",null,e)}))),button:Object(p.a)("Send as message")}),[t]=await e;if(!t)return}}if(o){this.cancelPreviousPendingEdit();const t=this.context.sendMessage(r,n);this.clearStoredEditorState(),m.a.dispatch({action:"message_sent"}),T.a.instance.trackSendMessage(e,t,r,!0,!1,n)}}m.a.dispatch({action:"edit_event",event:null}),m.a.fire(C.a.FocusSendMessageComposer)}),s()(this,"onChange",()=>{var e;this.state.saveDisabled&&null!==(e=this.editorRef.current)&&void 0!==e&&e.isModified()&&this.setState({saveDisabled:!1})}),s()(this,"onAction",e=>{var t;if("edit_composer_insert"===e.action&&this.editorRef.current){if(e.userId)null===(t=this.editorRef.current)||void 0===t||t.insertMention(e.userId);else if(e.event){var n;null===(n=this.editorRef.current)||void 0===n||n.insertQuotedMessage(e.event)}else if(e.text){var r;null===(r=this.editorRef.current)||void 0===r||r.insertPlaintext(e.text)}}else e.action===C.a.FocusEditMessageComposer&&this.editorRef.current&&this.editorRef.current.focus()}),this.context=t;const n=this.createEditorModel(),r=this.props.editState.getEvent();this.state={saveDisabled:!n||!this.isContentModified(N(this.model,r)["m.new_content"])},window.addEventListener("beforeunload",this.saveStoredEditorState),this.dispatcherRef=m.a.register(this.onAction)}getRoom(){return this.context.getRoom(this.props.editState.getEvent().getRoomId())}get editorRoomKey(){return"mx_edit_room_"+this.getRoom().roomId}get editorStateKey(){return"mx_edit_state_"+this.props.editState.getEvent().getId()}get shouldSaveStoredEditorState(){return null!==localStorage.getItem(this.editorRoomKey)}restoreStoredEditorState(e){const t=localStorage.getItem(this.editorStateKey);if(t)try{const{parts:n}=JSON.parse(t);return n.map(t=>e.deserializePart(t))}catch(e){console.error("Error parsing editing state: ",e)}}clearStoredEditorState(){localStorage.removeItem(this.editorRoomKey),localStorage.removeItem(this.editorStateKey)}clearPreviousEdit(){localStorage.getItem(this.editorRoomKey)&&localStorage.removeItem("mx_edit_state_"+localStorage.getItem(this.editorRoomKey))}isSlashCommand(){const e=this.model.parts[0];if(e){if("command"===e.type&&e.text.startsWith("/")&&!e.text.startsWith("//"))return!0;if(e.text.startsWith("/")&&!e.text.startsWith("//")&&("plain"===e.type||"pill-candidate"===e.type))return!0}return!1}isContentModified(e){const t=this.props.editState.getEvent().getContent();return t.msgtype!==e.msgtype||t.body!==e.body||t.format!==e.format||t.formatted_body!==e.formatted_body}getSlashCommand(){const e=this.model.parts.reduce((e,t)=>"user-pill"===t.type?e+t.resourceId:e+t.text,""),{cmd:t,args:n}=Object(w.d)(e);return[t,n,e]}async runSlashCommand(e,t,n){const r=e.run(n,t);let o,i=r.error;if(r.promise)try{e.category===w.a.messages?o=await r.promise:await r.promise}catch(e){i=e}if(i){console.error("Command failure: %s",i);const e=!!r.promise?Object(p.b)("Server error"):Object(p.b)("Command error");let t;t="string"==typeof i?i:i.message?i.message:Object(p.a)("Server unavailable, overloaded, or something else went wrong."),O.a.createTrackedDialog(e,"",D.a,{title:Object(p.a)(e),description:t})}else if(console.log("Command success."),o)return o}cancelPreviousPendingEdit(){const e=this.props.editState.getEvent().replacingEvent();!e||e.status!==h.a.QUEUED&&e.status!==h.a.NOT_SENT||this.context.cancelPendingEvent(e)}componentWillUnmount(){const e=document.getSelection();let t;var n;e.focusNode&&(t=Object(f.a)(null===(n=this.editorRef.current)||void 0===n?void 0:n.editorRef.current,e).caret);const r=this.model.serializeParts();this.props.editState.setEditorState(t,r),window.removeEventListener("beforeunload",this.saveStoredEditorState),this.shouldSaveStoredEditorState&&this.saveStoredEditorState(),m.a.unregister(this.dispatcherRef)}createEditorModel(){const{editState:e}=this.props,t=this.getRoom(),n=new y.a(t,this.context);let r,o=!1;if(e.hasEditorState())r=e.getSerializedParts().map(e=>n.deserializePart(e));else{const t=this.restoreStoredEditorState(n);r=t||Object(v.a)(e.getEvent(),n),o=!!t}return this.model=new g.a(r,n),this.saveStoredEditorState(),o}render(){return l.a.createElement("div",{className:d()("mx_EditMessageComposer",this.props.className),onKeyDown:this.onKeyDown},l.a.createElement(E.a,{ref:this.editorRef,model:this.model,room:this.getRoom(),initialCaret:this.props.editState.getCaret(),label:Object(p.a)("Edit message"),onChange:this.onChange}),l.a.createElement("div",{className:"mx_EditMessageComposer_buttons"},l.a.createElement(A.a,{kind:"secondary",onClick:this.cancelEdit},Object(p.a)("Cancel")),l.a.createElement(A.a,{kind:"primary",onClick:this.sendEdit,disabled:this.state.saveDisabled},Object(p.a)("Save"))))}},s()(o,"contextType",S.a),r=i))||r},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(336),a=n(892),s=n(85),c=n(80),l=n(94),u=n(325);t.a=({links:e,mxEvent:t,onCancelClick:d,onHeightChanged:h})=>{const p=Object(r.useContext)(l.a),[m,g]=Object(i.a)(),f=t.getTs(),_=Object(u.a)(async()=>Promise.all(e.map(async e=>{try{return[e,await p.getUrlPreview(e,f)]}catch(e){console.error("Failed to get URL preview: "+e)}})).then(e=>e.filter(Boolean)),[e,f],[]);Object(r.useEffect)(()=>{h()},[h,m,_]);const b=m?_:_.slice(0,2);let v;return _.length>2&&(v=o.a.createElement(s.a,{onClick:g},m?Object(c.a)("Collapse"):Object(c.a)("Show %(count)s other previews",{count:_.length-b.length}))),o.a.createElement("div",{className:"mx_LinkPreviewGroup"},b.map(([e,r],i)=>o.a.createElement(a.a,{key:e,link:e,preview:r,mxEvent:t},0===i?o.a.createElement(s.a,{className:"mx_LinkPreviewGroup_hide",onClick:d,"aria-label":Object(c.a)("Close preview")},o.a.createElement("img",{className:"mx_filterFlipColor",alt:"",role:"presentation",src:n(348),width:"18",height:"18"})):void 0)),v)}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(133),a=n(158),s=n(702);t.a=({description:e,acceptLabel:t,dismissLabel:n,onAccept:r,onDismiss:c,toastKey:l,numSeconds:u})=>{const d=()=>{c&&c(),i.a.sharedInstance().dismissToast(l)},h=Object(s.a)(d,1e3,u);let p=n;return h>0&&(p+=` (${h})`),o.a.createElement(a.a,{description:e,acceptLabel:t,onAccept:r,rejectLabel:p,onReject:d})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(88),c=n.n(s),l=n(10),u=n.n(l),d=n(80),h=n(320),p=n.n(h),m=n(83),g=n(82),f=n(86),_=n.n(f),b=n(94),v=n(117);class y extends a.a.PureComponent{constructor(e,t){super(e,t),o()(this,"onAction",e=>{"client_started"===e.action&&this.forceUpdate()}),this._dispatcherRef=null,this.state={page:""}}translate(e){return p()(Object(d.a)(e))}componentDidMount(){this._unmounted=!1,this.props.url&&(u()({method:"GET",url:this.props.url},(e,t,n)=>{if(!this._unmounted){if(e||t.status<200||t.status>=300)return console.warn("Error loading page: "+e),void this.setState({page:Object(d.a)("Couldn't load page")});n=n.replace(/_t\(['"]([\s\S]*?)['"]\)/gm,(e,t)=>this.translate(t)),this.props.replaceMap&&Object.keys(this.props.replaceMap).forEach(e=>{n=n.split(e).join(this.props.replaceMap[e])}),this.setState({page:n})}}),this._dispatcherRef=m.a.register(this.onAction))}componentWillUnmount(){this._unmounted=!0,null!==this._dispatcherRef&&m.a.unregister(this._dispatcherRef)}render(){const e=this.context||g.a.get(),t=!e||e.isGuest(),n=this.props.className,r=_()({[n]:!0,[n+"_guest"]:t,[n+"_loggedIn"]:!!e}),o=a.a.createElement("div",{className:n+"_body",dangerouslySetInnerHTML:{__html:this.state.page}});return this.props.scrollbar?a.a.createElement(v.a,{className:r},o):a.a.createElement("div",{className:r},o)}}o()(y,"propTypes",{url:c.a.string,className:c.a.string,scrollbar:c.a.bool,replaceMap:c.a.object}),o()(y,"contextType",b.a)},function(e,t,n){"use strict";var r=n(500),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var c="",l=0;l<s.length;++l){var u=s.charCodeAt(l);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===r.RFC1738&&(40===u||41===u)?c+=s.charAt(l):u<128?c+=a[u]:u<2048?c+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?c+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(l)),c+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return i(t)&&!i(n)&&(a=s(t,r)),i(t)&&i(n)?(n.forEach((function(n,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var a=n[i];return o.call(t,i)?t[i]=e(t[i],a,r):t[i]=a,t}),a)}}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return V}));var r=n(168),o=n(78),i=n.n(o),a=n(80),s=n(624),c=n(149),l=n(83);class u extends c.a{onChange(e,t,n){l.a.dispatch({action:"feature_custom_status_changed"})}}var d=n(427),h=n(82);class p extends c.a{constructor(e,t){super(),this.setter=e,this.inverse=t}onChange(e,t,n){this.setter.call(h.a.get(),this.inverse?!n:n)}}var m=n(111);class g extends c.a{onChange(e,t,n){m.a.get().reload()}}var f=n(91);class _ extends c.a{constructor(){super()}onChange(e,t,n){l.a.dispatch({action:f.a.UpdateFontSize,size:n})}}var b=n(84);class v extends c.a{constructor(){super()}onChange(e,t,n){l.a.dispatch({action:f.a.UpdateSystemFont,useSystemFont:b.b.getValue("useSystemFont"),font:n})}}class y extends c.a{constructor(){super()}onChange(e,t,n){l.a.dispatch({action:f.a.UpdateSystemFont,useSystemFont:n,font:b.b.getValue("systemFont")})}}var E=n(98),S=n(121),w=n(104);class C extends c.a{constructor(e,t=!1){super(),this.uiFeatureName=e,this.forcedValue=t}getValueOverride(e,t,n,r){return this.settingDisabled?this.forcedValue:null}get settingDisabled(){return!b.b.getValue(this.uiFeatureName)}}var T=n(113);class x extends c.a{constructor(e){super(),this.controllers=e}getValueOverride(e,t,n,r){for(const o of this.controllers){const i=o.getValueOverride(e,t,n,r);if(null!=i)return i}return null}onChange(e,t,n){for(const r of this.controllers)r.onChange(e,t,n)}get settingDisabled(){for(const e of this.controllers)if(e.settingDisabled)return!0;return!1}}var k=n(140);class F extends c.a{getValueOverride(e,t,n,r){return!this.prefersReducedMotion()&&null}get settingDisabled(){return this.prefersReducedMotion()}prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}}class O extends c.a{constructor(e,t=!1){super(),this.settingName=e,this.forcedValue=t}getValueOverride(e,t,n,r){return this.incompatibleSettingEnabled?this.forcedValue:null}get incompatibleSettingEnabled(){return b.b.getValue(this.settingName)}}var R=n(90),D=n(329);class I extends c.a{onChange(e,t,n){D.a.instance.updateAnonymityFromSettings(h.a.get().getUserId())}}class A extends c.a{onChange(e,t,n){n||b.b.getValue("layout")!=k.a.Bubble||b.b.setValue("layout",null,E.a.DEVICE,k.a.Group)}}const N=[E.a.DEVICE,E.a.ROOM_DEVICE,E.a.ROOM_ACCOUNT,E.a.ACCOUNT,E.a.CONFIG],M=[E.a.ROOM_ACCOUNT,E.a.ACCOUNT],P=[E.a.DEVICE,E.a.ROOM_DEVICE,E.a.ROOM_ACCOUNT,E.a.ACCOUNT,E.a.CONFIG,E.a.ROOM],L=[E.a.DEVICE,E.a.ACCOUNT,E.a.CONFIG],j=[E.a.DEVICE,E.a.CONFIG],U=[E.a.DEVICE],B=[E.a.DEVICE,E.a.CONFIG],G=[E.a.CONFIG],V={feature_report_to_moderators:{isFeature:!0,displayName:Object(a.b)("Report to moderators prototype. In rooms that support moderation, the `report` button will let you report abuse to room moderators"),supportedLevels:j,default:!1},feature_spaces:{isFeature:!0,displayName:Object(a.b)("Spaces prototype. Incompatible with Communities, Communities v2 and Custom Tags. Requires compatible homeserver for some features."),supportedLevels:j,default:!1,controller:new g,betaInfo:{title:Object(a.b)("Spaces"),caption:Object(a.b)("Spaces are a new way to group rooms and people."),disclaimer:e=>e?i.a.createElement(i.a.Fragment,null,i.a.createElement("p",null,Object(a.a)("If you leave, %(brand)s will reload with Spaces disabled. Communities and custom tags will be visible again.",{brand:R.a.get().brand})),i.a.createElement("p",null,Object(a.a)("Beta available for web, desktop and Android. Thank you for trying the beta."))):i.a.createElement(i.a.Fragment,null,i.a.createElement("p",null,Object(a.a)("%(brand)s will reload with Spaces enabled. Communities and custom tags will be hidden.",{brand:R.a.get().brand})),i.a.createElement("b",null,Object(a.a)("You can leave the beta any time from settings or tapping on a beta badge, like the one above.")),i.a.createElement("p",null,Object(a.a)("Beta available for web, desktop and Android. Some features may be unavailable on your homeserver."))),image:n(1283),feedbackSubheading:Object(a.b)("Your feedback will help make spaces better. The more detail you can go into, the better."),feedbackLabel:"spaces-feedback"}},feature_dnd:{isFeature:!0,displayName:Object(a.b)("Show options to enable 'Do not disturb' mode"),supportedLevels:j,default:!1},feature_latex_maths:{isFeature:!0,displayName:Object(a.b)("Render LaTeX maths in messages"),supportedLevels:j,default:!1},feature_communities_v2_prototypes:{isFeature:!0,displayName:Object(a.b)("Communities v2 prototypes. Requires compatible homeserver. Highly experimental - use with caution."),supportedLevels:j,default:!1,controller:new O("feature_spaces")},feature_pinning:{isFeature:!0,displayName:Object(a.b)("Message Pinning"),supportedLevels:j,default:!1},feature_custom_status:{isFeature:!0,displayName:Object(a.b)("Custom user status messages"),supportedLevels:j,default:!1,controller:new u},feature_custom_tags:{isFeature:!0,displayName:Object(a.b)("Group & filter rooms by custom tags (refresh to apply changes)"),supportedLevels:j,default:!1,controller:new O("feature_spaces")},feature_state_counters:{isFeature:!0,displayName:Object(a.b)("Render simple counters in room header"),supportedLevels:j,default:!1},feature_many_integration_managers:{isFeature:!0,displayName:Object(a.b)("Multiple integration managers"),supportedLevels:j,default:!1},feature_mjolnir:{isFeature:!0,displayName:Object(a.b)("Try out new ways to ignore people (experimental)"),supportedLevels:j,default:!1},feature_custom_themes:{isFeature:!0,displayName:Object(a.b)("Support adding custom themes"),supportedLevels:j,default:!1},feature_roomlist_preview_reactions_dms:{isFeature:!0,displayName:Object(a.b)("Show message previews for reactions in DMs"),supportedLevels:j,default:!1,controller:new O("feature_roomlist_preview_reactions_all")},feature_roomlist_preview_reactions_all:{isFeature:!0,displayName:Object(a.b)("Show message previews for reactions in all rooms"),supportedLevels:j,default:!1},feature_dehydration:{isFeature:!0,displayName:Object(a.b)("Offline encrypted messaging using dehydrated devices"),supportedLevels:j,default:!1},feature_pseudonymous_analytics_opt_in:{isFeature:!0,supportedLevels:j,displayName:Object(a.b)("Send pseudonymous analytics data"),default:!1,controller:new I},advancedRoomListLogging:{displayName:Object(a.b)("Enable advanced debugging for the room list"),supportedLevels:U,default:!1},doNotDisturb:{supportedLevels:[E.a.DEVICE],default:!1},mjolnirRooms:{supportedLevels:[E.a.ACCOUNT],default:[]},mjolnirPersonalRoom:{supportedLevels:[E.a.ACCOUNT],default:null},feature_bridge_state:{isFeature:!0,supportedLevels:j,displayName:Object(a.b)("Show info about bridges in room settings"),default:!1},feature_new_layout_switcher:{isFeature:!0,supportedLevels:j,displayName:Object(a.b)("New layout switcher (with message bubbles)"),default:!1,controller:new A},"RoomList.backgroundImage":{supportedLevels:L,default:null},feature_hidden_read_receipts:{supportedLevels:j,displayName:Object(a.b)("Don't send read receipts"),default:!1},baseFontSize:{displayName:Object(a.b)("Font size"),supportedLevels:L,default:10,controller:new _},useCustomFontSize:{displayName:Object(a.b)("Use custom size"),supportedLevels:L,default:!1},"MessageComposerInput.suggestEmoji":{supportedLevels:L,displayName:Object(a.b)("Enable Emoji suggestions while typing"),default:!0,invertedSettingName:"MessageComposerInput.dontSuggestEmoji"},"MessageComposerInput.showStickersButton":{supportedLevels:L,displayName:Object(a.b)("Show stickers button"),default:!0},"Notifications.alwaysShowBadgeCounts":{supportedLevels:M,default:!1},useCompactLayout:{supportedLevels:U,displayName:Object(a.b)("Use a more compact ‘Modern’ layout"),default:!1},showRedactions:{supportedLevels:P,displayName:Object(a.b)("Show a placeholder for removed messages"),default:!0,invertedSettingName:"hideRedactions"},showJoinLeaves:{supportedLevels:P,displayName:Object(a.b)("Show join/leave messages (invites/kicks/bans unaffected)"),default:!0,invertedSettingName:"hideJoinLeaves"},showAvatarChanges:{supportedLevels:P,displayName:Object(a.b)("Show avatar changes"),default:!0,invertedSettingName:"hideAvatarChanges"},showDisplaynameChanges:{supportedLevels:P,displayName:Object(a.b)("Show display name changes"),default:!0,invertedSettingName:"hideDisplaynameChanges"},showReadReceipts:{supportedLevels:N,displayName:Object(a.b)("Show read receipts sent by other users"),default:!0,invertedSettingName:"hideReadReceipts"},showTwelveHourTimestamps:{supportedLevels:L,displayName:Object(a.b)("Show timestamps in 12 hour format (e.g. 2:30pm)"),default:!1},alwaysShowTimestamps:{supportedLevels:L,displayName:Object(a.b)("Always show message timestamps"),default:!1},autoplayGifsAndVideos:{supportedLevels:L,displayName:Object(a.b)("Autoplay GIFs and videos"),default:!1},enableSyntaxHighlightLanguageDetection:{supportedLevels:L,displayName:Object(a.b)("Enable automatic language detection for syntax highlighting"),default:!1},expandCodeByDefault:{supportedLevels:L,displayName:Object(a.b)("Expand code blocks by default"),default:!1},showCodeLineNumbers:{supportedLevels:L,displayName:Object(a.b)("Show line numbers in code blocks"),default:!0},scrollToBottomOnMessageSent:{supportedLevels:L,displayName:Object(a.b)("Jump to the bottom of the timeline when you send a message"),default:!0},"Pill.shouldShowPillAvatar":{supportedLevels:L,displayName:Object(a.b)("Show avatars in user and room mentions"),default:!0,invertedSettingName:"Pill.shouldHidePillAvatar"},"TextualBody.enableBigEmoji":{supportedLevels:L,displayName:Object(a.b)("Enable big emoji in chat"),default:!0,invertedSettingName:"TextualBody.disableBigEmoji"},"MessageComposerInput.isRichTextEnabled":{supportedLevels:L,default:!1},"MessageComposer.showFormatting":{supportedLevels:L,default:!1},sendTypingNotifications:{supportedLevels:L,displayName:Object(a.b)("Send typing notifications"),default:!0,invertedSettingName:"dontSendTypingNotifications"},showTypingNotifications:{supportedLevels:L,displayName:Object(a.b)("Show typing notifications"),default:!0},ctrlFForSearch:{supportedLevels:L,displayName:w.b?Object(a.b)("Use Command + F to search timeline"):Object(a.b)("Use Ctrl + F to search timeline"),default:!1},"MessageComposerInput.ctrlEnterToSend":{supportedLevels:L,displayName:w.b?Object(a.b)("Use Command + Enter to send a message"):Object(a.b)("Use Ctrl + Enter to send a message"),default:!1},"MessageComposerInput.surroundWith":{supportedLevels:L,displayName:Object(a.b)("Surround selected text when typing special characters"),default:!1},"MessageComposerInput.autoReplaceEmoji":{supportedLevels:L,displayName:Object(a.b)("Automatically replace plain text Emoji"),default:!1},"VideoView.flipVideoHorizontally":{supportedLevels:L,displayName:Object(a.b)("Mirror local video feed"),default:!1},"TagPanel.enableTagPanel":{supportedLevels:L,displayName:Object(a.b)("Enable Community Filter Panel"),default:!0,invertedSettingName:"TagPanel.disableTagPanel",controller:new C(T.a.Communities,!0)},theme:{supportedLevels:L,default:"light",controller:new d.a},custom_themes:{supportedLevels:L,default:[]},use_system_theme:{supportedLevels:U,default:!0,displayName:Object(a.b)("Match system theme")},useSystemFont:{supportedLevels:U,default:!1,displayName:Object(a.b)("Use a system font"),controller:new y},systemFont:{supportedLevels:U,default:"",displayName:Object(a.b)("System font name"),controller:new v},webRtcAllowPeerToPeer:{supportedLevels:B,displayName:Object(a.b)("Allow Peer-to-Peer for 1:1 calls (if you enable this, the other party might be able to see your IP address)"),default:!0,invertedSettingName:"webRtcForceTURN"},webrtc_audiooutput:{supportedLevels:U,default:null},webrtc_audioinput:{supportedLevels:U,default:null},webrtc_videoinput:{supportedLevels:U,default:null},language:{supportedLevels:B,default:"en"},breadcrumb_rooms:{supportedLevels:[E.a.ACCOUNT],default:[]},recent_emoji:{supportedLevels:[E.a.ACCOUNT],default:[]},room_directory_servers:{supportedLevels:[E.a.ACCOUNT],default:[]},integrationProvisioning:{supportedLevels:[E.a.ACCOUNT],default:!0},allowedWidgets:{supportedLevels:[E.a.ROOM_ACCOUNT,E.a.ROOM_DEVICE],supportedLevelsAreOrdered:!0,default:{}},analyticsOptIn:{supportedLevels:B,displayName:Object(a.b)("Send analytics data"),default:!1},showCookieBar:{supportedLevels:B,default:!0},autocompleteDelay:{supportedLevels:B,default:200},readMarkerInViewThresholdMs:{supportedLevels:B,default:3e3},readMarkerOutOfViewThresholdMs:{supportedLevels:B,default:3e4},blacklistUnverifiedDevices:{supportedLevels:[E.a.ROOM_DEVICE,E.a.DEVICE],supportedLevelsAreOrdered:!0,displayName:{default:Object(a.b)("Never send encrypted messages to unverified sessions from this session"),"room-device":Object(a.b)("Never send encrypted messages to unverified sessions in this room from this session")},default:!1,controller:new C(T.a.AdvancedEncryption)},urlPreviewsEnabled:{supportedLevels:P,displayName:{default:Object(a.b)("Enable inline URL previews by default"),"room-account":Object(a.b)("Enable URL previews for this room (only affects you)"),room:Object(a.b)("Enable URL previews by default for participants in this room")},default:!0,controller:new C(T.a.URLPreviews)},urlPreviewsEnabled_e2ee:{supportedLevels:[E.a.ROOM_DEVICE,E.a.ROOM_ACCOUNT],displayName:{"room-account":Object(a.b)("Enable URL previews for this room (only affects you)")},default:!1,controller:new C(T.a.URLPreviews)},notificationsEnabled:{supportedLevels:U,default:!1,controller:new s.b},notificationSound:{supportedLevels:M,default:!1},notificationBodyEnabled:{supportedLevels:U,default:!0,controller:new s.a},audioNotificationsEnabled:{supportedLevels:U,default:!0},enableWidgetScreenshots:{supportedLevels:L,displayName:Object(a.b)("Enable widget screenshots on supported widgets"),default:!1},promptBeforeInviteUnknownUsers:{supportedLevels:L,displayName:Object(a.b)("Prompt before sending invites to potentially invalid matrix IDs"),default:!0},showDeveloperTools:{supportedLevels:L,displayName:Object(a.b)("Show developer tools"),default:!1},widgetOpenIDPermissions:{supportedLevels:U,default:{allow:[],deny:[]}},"RoomList.orderAlphabetically":{supportedLevels:L,displayName:Object(a.b)("Order rooms by name"),default:!1},"RoomList.orderByImportance":{supportedLevels:L,displayName:Object(a.b)("Show rooms with unread notifications first"),default:!0},breadcrumbs:{supportedLevels:L,displayName:Object(a.b)("Show shortcuts to recently viewed rooms above the room list"),default:!0},showHiddenEventsInTimeline:{displayName:Object(a.b)("Show hidden events in timeline"),supportedLevels:U,default:!1},lowBandwidth:{supportedLevels:B,displayName:Object(a.b)("Low bandwidth mode"),default:!1,controller:new g},fallbackICEServerAllowed:{supportedLevels:U,displayName:Object(a.b)("Allow fallback call assist server turn.matrix.org when your homeserver does not offer one (your IP address would be shared during a call)"),default:null},showImages:{supportedLevels:L,displayName:Object(a.b)("Show previews/thumbnails for images"),default:!0},showRightPanelInRoom:{supportedLevels:U,default:!1},showRightPanelInGroup:{supportedLevels:U,default:!1},lastRightPanelPhaseForRoom:{supportedLevels:U,default:S.c.RoomSummary},lastRightPanelPhaseForGroup:{supportedLevels:U,default:S.c.GroupMemberList},enableEventIndexing:{supportedLevels:U,displayName:Object(a.b)("Enable message search in encrypted rooms"),default:!0},crawlerSleepTime:{supportedLevels:U,displayName:Object(a.b)("How fast should messages be downloaded."),default:3e3},showCallButtonsInComposer:{supportedLevels:B,default:!0,controller:new C(T.a.Voip)},"e2ee.manuallyVerifyAllSessions":{supportedLevels:U,displayName:Object(a.b)("Manually verify all remote sessions"),default:!1,controller:new x([new C(T.a.AdvancedEncryption),new p(r.b.prototype.setCryptoTrustCrossSignedDevices,!0)])},ircDisplayNameWidth:{supportedLevels:[E.a.ROOM_DEVICE,E.a.DEVICE],supportedLevelsAreOrdered:!0,displayName:Object(a.b)("IRC display name width"),default:80},layout:{supportedLevels:L,default:k.a.Group},showChatEffects:{supportedLevels:P,displayName:Object(a.b)("Show chat effects (animations when receiving e.g. confetti)"),default:!0,controller:new F},"Widgets.pinned":{supportedLevels:M,default:{}},"Widgets.layout":{supportedLevels:M,default:{}},"Widgets.leftPanel":{supportedLevels:L,default:null},"Spaces.allRoomsInHome":{displayName:Object(a.b)("Show all rooms in Home"),description:Object(a.b)("All rooms you're in will appear in Home."),supportedLevels:L,default:!1},[T.a.RoomHistorySettings]:{supportedLevels:G,default:!0},[T.a.AdvancedEncryption]:{supportedLevels:G,default:!0},[T.a.URLPreviews]:{supportedLevels:G,default:!0},[T.a.Widgets]:{supportedLevels:G,default:!0},[T.a.Voip]:{supportedLevels:G,default:!0},[T.a.Feedback]:{supportedLevels:G,default:!0},[T.a.Registration]:{supportedLevels:G,default:!0},[T.a.PasswordReset]:{supportedLevels:G,default:!0},[T.a.Deactivate]:{supportedLevels:G,default:!0},[T.a.ShareQRCode]:{supportedLevels:G,default:!0},[T.a.ShareSocial]:{supportedLevels:G,default:!0},[T.a.IdentityServer]:{supportedLevels:G,default:!0,controller:new C(T.a.ThirdPartyID)},[T.a.ThirdPartyID]:{supportedLevels:G,default:!0},[T.a.Flair]:{supportedLevels:G,default:!0,controller:new C(T.a.Communities)},[T.a.Communities]:{supportedLevels:G,default:!0,controller:new O("feature_spaces")},[T.a.AdvancedSettings]:{supportedLevels:G,default:!0}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return Z})),n.d(t,"a",(function(){return ee}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(86),c=n.n(s),l=n(107),u=n(80);class d{constructor(e,t){if(o()(this,"commandRegex",void 0),o()(this,"forcedCommandRegex",void 0),e){if(!e.global)throw new Error("commandRegex must have global flag set");this.commandRegex=e}if(t){if(!t.global)throw new Error("forcedCommandRegex must have global flag set");this.forcedCommandRegex=t}}destroy(){}getCurrentCommand(e,t,n=!1){let r,o=this.commandRegex;if(n&&this.shouldForceComplete()&&(o=this.forcedCommandRegex||/\S+/g),!o)return null;for(o.lastIndex=0;null!==(r=o.exec(e));){const e=r.index,n=e+r[0].length;if(t.start<=n&&t.end>=e)return{command:r,range:{start:e,end:n}}}return{command:null,range:{start:-1,end:-1}}}async getCompletions(e,t,n=!1,r=-1){return[]}getName(){return"Default Provider"}renderCompletions(e){return console.error("stub; should be implemented in subclasses"),null}shouldForceComplete(){return!1}}var h=n(199),p=n(92),m=n.n(p),g=n(99),f=n.n(g);const _=["title","subtitle","description","className"],b=["title","subtitle","description","className","children"],v=Object(i.forwardRef)((e,t)=>{const{title:n,subtitle:r,description:o,className:i}=e,s=f()(e,_);return a.a.createElement("div",m()({},s,{className:c()("mx_Autocomplete_Completion_block",i),role:"option",ref:t}),a.a.createElement("span",{className:"mx_Autocomplete_Completion_title"},n),a.a.createElement("span",{className:"mx_Autocomplete_Completion_subtitle"},r),a.a.createElement("span",{className:"mx_Autocomplete_Completion_description"},o))}),y=Object(i.forwardRef)((e,t)=>{const{title:n,subtitle:r,description:o,className:i,children:s}=e,l=f()(e,b);return a.a.createElement("div",m()({},l,{className:c()("mx_Autocomplete_Completion_pill",i),role:"option",ref:t}),s,a.a.createElement("span",{className:"mx_Autocomplete_Completion_title"},n),a.a.createElement("span",{className:"mx_Autocomplete_Completion_subtitle"},r),a.a.createElement("span",{className:"mx_Autocomplete_Completion_description"},o))});var E=n(293);const S=/(^\/\w*)(?: .*)?/g;var w=n(82),C=n(114),T=n(162),x=n(100),k=n(120);const F=/\B\+\S*/g;class O extends d{constructor(){super(F),o()(this,"matcher",void 0),this.matcher=new h.a([],{keys:["groupId","name","shortDescription"]})}async getCompletions(e,t,n=!1,r=-1){if(/^(\/join|\/leave)/.test(e))return[];const o=w.a.get();let i=[];const{command:s,range:c}=this.getCurrentCommand(e,t,n);if(s){const e=o.getGroups().filter(({myMembership:e})=>"join"===e),t=await Promise.all(e.map(async({groupId:e})=>{try{return T.a.getGroupProfileCached(o,e)}catch(t){return Promise.resolve({name:"",groupId:e,avatarUrl:"",shortDescription:""})}}));this.matcher.setObjects(t);const n=s[0];i=this.matcher.match(n,r),i=Object(l.sortBy)(i,[e=>function(e,t){const n=t.indexOf(e);return-1===n?1/0:n}(n,e.groupId),e=>e.groupId.length]).map(({avatarUrl:e,groupId:t,name:n})=>({completion:t,suffix:" ",type:"community",href:Object(C.f)(t),component:a.a.createElement(y,{title:n,description:t},a.a.createElement(k.a,{name:n||t,width:24,height:24,url:e?Object(x.b)(e).getSquareThumbnailHttp(24):null})),range:c})).slice(0,4)}return i}getName(){return"💬 "+Object(u.a)("Communities")}renderCompletions(e){return a.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill mx_Autocomplete_Completion_container_truncate",role:"listbox","aria-label":Object(u.a)("Community Autocomplete")},e)}}const R=/\/ddg\s+(.+)$/g;class D extends d{constructor(){super(R)}static getQueryUri(e){return"https://api.duckduckgo.com/?q="+encodeURIComponent(e)+"&format=json&no_redirect=1&no_html=1&t="+encodeURIComponent("vector")}async getCompletions(e,t,n=!1,r=-1){const{command:o,range:i}=this.getCurrentCommand(e,t);if(!e||!o)return[];const s=await fetch(D.getQueryUri(o[1]),{method:"GET"}),c=await s.json(),l=r>-1?r:c.Results.length,u=c.Results.slice(0,l).map(e=>({completion:e.Text,component:a.a.createElement(v,{title:e.Text,description:e.Result}),range:i}));return c.Answer&&u.unshift({completion:c.Answer,component:a.a.createElement(v,{title:c.Answer,description:c.AnswerType}),range:i}),c.RelatedTopics&&c.RelatedTopics.length>0&&u.unshift({completion:c.RelatedTopics[0].Text,component:a.a.createElement(v,{title:c.RelatedTopics[0].Text}),range:i}),c.AbstractText&&u.unshift({completion:c.AbstractText,component:a.a.createElement(v,{title:c.AbstractText}),range:i}),u}getName(){return"🔍 "+Object(u.a)("Results from DuckDuckGo")}renderCompletions(e){return a.a.createElement("div",{className:"mx_Autocomplete_Completion_container_block",role:"listbox","aria-label":Object(u.a)("DuckDuckGo Results")},e)}}var I=n(119),A=n(102);const N=/\B#\S*/g;function M(e,t,n=""){return{room:e,matchName:n,displayedAlias:t}}class P extends d{constructor(){super(N),o()(this,"matcher",void 0),this.matcher=new h.a([],{keys:["displayedAlias","matchName"]})}getRooms(){let e=w.a.get().getVisibleRooms();return A.g.spacesEnabled&&(e=e.filter(e=>!e.isSpaceRoom())),e}async getCompletions(e,t,n=!1,r=-1){let o=[];const{command:i,range:s}=this.getCurrentCommand(e,t,n);if(i){let e=this.getRooms().reduce((e,t)=>{if(t.getCanonicalAlias()&&(e=e.concat(M(t,t.getCanonicalAlias(),t.name))),t.getAltAliases().length){const n=t.getAltAliases().map(e=>M(t,e));e=e.concat(n)}return e},[]);e=e.filter(t=>{const n=t.room.currentState.getStateEvents("m.room.tombstone","");if(n&&n.getContent()&&n.getContent().replacement_room){return!e.some(e=>e.room.roomId===n.getContent().replacement_room)}return!0}),this.matcher.setObjects(e);const t=i[0];o=this.matcher.match(t,r),o=Object(l.sortBy)(o,[e=>{return t=e.displayedAlias,n=e.room,t===n.getCanonicalAlias()?0:1;var t,n},e=>e.displayedAlias.length]),o=Object(l.uniqBy)(o,e=>e.room),o=o.map(e=>({completion:e.displayedAlias,completionId:e.room.roomId,type:"room",suffix:" ",href:Object(C.g)(e.displayedAlias),component:a.a.createElement(y,{title:e.room.name,description:e.displayedAlias},a.a.createElement(I.a,{width:24,height:24,room:e.room})),range:s})).filter(e=>!!e.completion&&e.completion.length>0)}return o}getName(){return Object(u.a)("Rooms")}renderCompletions(e){return a.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill mx_Autocomplete_Completion_container_truncate",role:"listbox","aria-label":Object(u.a)("Room Autocomplete")},e)}}var L=n(132);const j=/\B@\S*/g,U=/[^/,:; \t\n]\S*/g;var B=n(84),G=n(274),V=n(805);const q=new RegExp("("+n.n(V).a.source+"|(?:^|\\s):[+-\\w]*:?)$","g"),H=G.b.sort((e,t)=>e.group===t.group?e.order-t.order:e.group-t.group).map((e,t)=>({emoji:e,_orderBy:t}));function z(e,t){const n=t.indexOf(e);return-1===n?1/0:n}const W=/@\S*/g;var K=n(314);class Y extends P{getRooms(){return w.a.get().getVisibleRooms().filter(e=>e.isSpaceRoom())}getName(){return Object(u.a)("Spaces")}renderCompletions(e){return a.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill mx_Autocomplete_Completion_container_truncate",role:"listbox","aria-label":Object(u.a)("Space Autocomplete")},e)}}const $=[class extends d{constructor(e){super(j,U),o()(this,"matcher",void 0),o()(this,"users",void 0),o()(this,"room",void 0),o()(this,"onRoomTimeline",(e,t,n,r,o)=>{t&&(r||t.roomId===this.room.roomId&&o.timeline.getTimelineSet()===t.getUnfilteredTimelineSet()&&!n&&o&&o.liveEvent&&this.onUserSpoke(e.sender))}),o()(this,"onRoomStateMember",(e,t,n)=>{n.roomId===this.room.roomId&&(this.users=null)}),this.room=e,this.matcher=new h.a([],{keys:["name"],funcs:[e=>e.userId.slice(1)],shouldMatchWordsOnly:!1}),w.a.get().on("Room.timeline",this.onRoomTimeline),w.a.get().on("RoomState.members",this.onRoomStateMember)}destroy(){w.a.get()&&(w.a.get().removeListener("Room.timeline",this.onRoomTimeline),w.a.get().removeListener("RoomState.members",this.onRoomStateMember))}async getCompletions(e,t,n=!1,r=-1){this.users||this.makeUsers();let o=[];const{command:i,range:s}=this.getCurrentCommand(e,t,n);if(!i)return o;const c=i[0];if(c&&"@"!==c){const e=c.startsWith("@")?c.substring(1):c;o=this.matcher.match(e,r).map(e=>{const n=e.name||e.userId||"";return{completion:e.rawDisplayName,completionId:e.userId,type:"user",suffix:t.beginning&&0===s.start?": ":" ",href:Object(C.h)(e.userId),component:a.a.createElement(y,{title:n,description:e.userId},a.a.createElement(L.a,{member:e,width:24,height:24})),range:s}})}return o}getName(){return Object(u.a)("Users")}makeUsers(){const e=this.room.getLiveTimeline().getEvents(),t={};for(const n of e)t[n.getSender()]=n.getTs();const n=w.a.get().credentials.userId;this.users=this.room.getJoinedMembers().filter(({userId:e})=>e!==n),this.users=this.users.concat(this.room.getMembersWithMembership("invite")),this.users=Object(l.sortBy)(this.users,e=>1e20-t[e.userId]||1e20),this.matcher.setObjects(this.users)}onUserSpoke(e){this.users&&e&&e.userId!==w.a.get().credentials.userId&&(this.users.splice(this.users.findIndex(t=>t.userId===e.userId),1),this.users=[e,...this.users],this.matcher.setObjects(this.users))}renderCompletions(e){return a.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill",role:"listbox","aria-label":Object(u.a)("User Autocomplete")},e)}shouldForceComplete(){return!0}},P,class extends d{constructor(){super(q),o()(this,"matcher",void 0),o()(this,"nameMatcher",void 0),this.matcher=new h.a(H,{keys:["emoji.emoticon"],funcs:[e=>e.emoji.shortcodes.map(e=>`:${e}:`)],shouldMatchWordsOnly:!1}),this.nameMatcher=new h.a(H,{keys:["emoji.annotation"],shouldMatchWordsOnly:!0})}async getCompletions(e,t,n,r=-1){if(!B.b.getValue("MessageComposerInput.suggestEmoji"))return[];let o=[];const{command:i,range:s}=this.getCurrentCommand(e,t);if(i){const e=i[0];o=this.matcher.match(e,r),o=o.concat(this.nameMatcher.match(e));const t=[];t.push(t=>z(e,t.emoji.emoticon||"")),t.push(t=>z(e,t.emoji.shortcodes[0])),t.push(t=>Math.min(...t.emoji.shortcodes.map(t=>z(e.substring(1),t)))),e.length>1&&t.push(e=>e.emoji.shortcodes[0].length),t.push(e=>e._orderBy),o=Object(l.sortBy)(Object(l.uniq)(o),t),o=o.map(e=>({completion:e.emoji.unicode,component:a.a.createElement(y,{title:`:${e.emoji.shortcodes[0]}:`,"aria-label":e.emoji.unicode},a.a.createElement("span",null,e.emoji.unicode)),range:s})).slice(0,20)}return o}getName(){return"😃 "+Object(u.a)("Emoji")}renderCompletions(e){return a.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill",role:"listbox","aria-label":Object(u.a)("Emoji Autocomplete")},e)}},class extends d{constructor(e){super(W),o()(this,"room",void 0),this.room=e}async getCompletions(e,t,n=!1,r=-1){const o=w.a.get();if(!this.room.currentState.mayTriggerNotifOfType("room",o.credentials.userId))return[];const{command:i,range:s}=this.getCurrentCommand(e,t,n);return i&&i[0]&&"@room".startsWith(i[0])&&i[0].length>1?[{completion:"@room",completionId:"@room",type:"at-room",suffix:" ",component:a.a.createElement(y,{title:"@room",description:Object(u.a)("Notify the whole room")},a.a.createElement(I.a,{width:24,height:24,room:this.room})),range:s}]:[]}getName(){return"❗️ "+Object(u.a)("Room Notification")}renderCompletions(e){return a.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill mx_Autocomplete_Completion_container_truncate",role:"listbox","aria-label":Object(u.a)("Notification Autocomplete")},e)}},class extends d{constructor(){super(S),o()(this,"matcher",void 0),this.matcher=new h.a(E.c,{keys:["command","args","description"],funcs:[({aliases:e})=>e.join(" ")]})}async getCompletions(e,t,n,r=-1){const{command:o,range:i}=this.getCurrentCommand(e,t);if(!o)return[];let s=[];if(o[0]!==o[1]){const e=o[1].substr(1);if(E.b.has(e)&&E.b.get(e).isEnabled()){if(E.b.get(e).hideCompletionAfterSpace)return[];s=[E.b.get(e)]}}else s="/"===e?E.c:this.matcher.match(o[1],r);return s.filter(e=>e.isEnabled()).map(e=>{let t=e.getCommand()+" ";const n=e.aliases.find(e=>"/"+e===o[1]);return(n||e.getCommand()===o[1])&&(t=o[0]),{completion:t,type:"command",component:a.a.createElement(v,{title:"/"+(n||e.command),subtitle:e.args,description:Object(u.a)(e.description)}),range:i}})}getName(){return"*️⃣ "+Object(u.a)("Commands")}renderCompletions(e){return a.a.createElement("div",{className:"mx_Autocomplete_Completion_container_block",role:"listbox","aria-label":Object(u.a)("Command Autocomplete")},e)}},D];A.g.spacesEnabled?$.push(Y):$.push(O);class Q{constructor(e){o()(this,"room",void 0),o()(this,"providers",void 0),this.room=e,this.providers=$.map(t=>new t(e))}destroy(){this.providers.forEach(e=>{e.destroy()})}async getCompletions(e,t,n=!1,r=-1){return(await Promise.all(this.providers.map(async o=>await Object(K.b)(o.getCompletions(e,t,n,r),null,3e3)))).map((r,o)=>{if(r&&r.length)return{completions:r,provider:this.providers[o],command:this.providers[o].getCurrentCommand(e,t,n)}}).filter(Boolean)}}var J,X=n(81);const Z=e=>"mx_Autocomplete_Completion_"+e;let ee=Object(X.a)("views.rooms.Autocomplete")(J=class extends a.a.PureComponent{constructor(e){super(e),o()(this,"autocompleter",void 0),o()(this,"queryRequested",void 0),o()(this,"debounceCompletionsRequest",void 0),o()(this,"containerRef",Object(i.createRef)()),o()(this,"hide",()=>{this.setState({hide:!0,selectionOffset:0,completions:[],completionList:[]})}),o()(this,"onCompletionClicked",e=>0!==this.countCompletions()&&0!==e&&(this.props.onConfirm(this.state.completionList[e-1]),this.hide(),!0)),this.autocompleter=new Q(e.room),this.state={completions:[],completionList:[],selectionOffset:0,shouldShowCompletions:!0,hide:!1,forceComplete:!1}}componentDidMount(){this.applyNewProps()}applyNewProps(e,t){t&&this.props.room.roomId!==t.roomId&&(this.autocompleter.destroy(),this.autocompleter=new Q(this.props.room)),e!==this.props.query&&this.complete(this.props.query,this.props.selection)}componentWillUnmount(){this.autocompleter.destroy()}complete(e,t){if(this.queryRequested=e,this.debounceCompletionsRequest&&clearTimeout(this.debounceCompletionsRequest),""===e)return this.setState({completions:[],completionList:[],selectionOffset:0,hide:!0}),Promise.resolve(null);let n=B.b.getValue("autocompleteDelay");return(this.state.completions.length>0||this.state.forceComplete)&&(n=0),new Promise(r=>{this.debounceCompletionsRequest=setTimeout(()=>{r(this.processQuery(e,t))},n)})}processQuery(e,t){return this.autocompleter.getCompletions(e,t,this.state.forceComplete,20).then(t=>{e===this.queryRequested&&this.processCompletions(t)})}processCompletions(e){const t=Object(l.flatMap)(e,e=>e.completions);let n=0;if(t.length>0){const e=0===this.state.selectionOffset?null:this.state.completionList[this.state.selectionOffset-1].completion;n=t.findIndex(t=>t.completion===e),-1===n?n=0:n++}let r=this.state.hide;r=!e.some(e=>!!e.command.command),this.setState({completions:e,completionList:t,selectionOffset:n,hide:r,forceComplete:!1})}hasSelection(){return this.countCompletions()>0&&0!==this.state.selectionOffset}countCompletions(){return this.state.completionList.length}moveSelection(e){const t=this.countCompletions();if(0===t)return;const n=(this.state.selectionOffset+e+t+1)%(t+1);this.setSelection(n)}onEscape(e){0!==this.countCompletions()&&(e.preventDefault(),this.hide())}forceComplete(){return new Promise(e=>{this.setState({forceComplete:!0,hide:!1},()=>{this.complete(this.props.query,this.props.selection).then(()=>{e(this.countCompletions())})})})}setSelection(e){this.setState({selectionOffset:e,hide:!1}),this.props.onSelectionChange&&this.props.onSelectionChange(this.state.completionList[e-1],e-1)}componentDidUpdate(e){this.applyNewProps(e.query,e.room);const t=this.refs["completion"+this.state.selectionOffset];t?t.scrollIntoView({behavior:"auto",block:"nearest"}):this.containerRef.current&&this.containerRef.current.scrollTo({top:0})}render(){let e=1;const t=this.state.completions.map((t,n)=>{const r=t.completions.map((t,n)=>{const r=e===this.state.selectionOffset,o=c()("mx_Autocomplete_Completion",{selected:r}),i=e;e++;return a.a.cloneElement(t.component,{key:n,ref:"completion"+i,id:Z(i-1),className:o,onClick:()=>{this.onCompletionClicked(i)},"aria-selected":r})});return r.length>0?a.a.createElement("div",{key:n,className:"mx_Autocomplete_ProviderSection"},a.a.createElement("div",{className:"mx_Autocomplete_provider_name"},t.provider.getName()),t.provider.renderCompletions(r)):null}).filter(e=>!!e);return!this.state.hide&&t.length>0?a.a.createElement("div",{className:"mx_Autocomplete",ref:this.containerRef},t):null}})||J},function(e,t,n){"use strict";n.d(t,"a",(function(){return L}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(97),c=n(82),l=n(233);class u{static encodeActions(e){const t=e.notify,n=e.sound,r=e.highlight;if(t){const e=[l.a.Notify];return n&&e.push({set_tweak:"sound",value:n}),r?e.push({set_tweak:"highlight"}):e.push({set_tweak:"highlight",value:!1}),e}return[l.a.DontNotify]}static decodeActions(e){let t=!1,n=null,r=!1;for(let o=0;o<e.length;++o){const i=e[o];if(i===l.a.Notify)t=!0;else if(i===l.a.DontNotify)t=!1;else{if("object"!=typeof i)return null;if("sound"===i.set_tweak)n=i.value;else{if("highlight"!==i.set_tweak)return null;r=i.value}}}void 0===r&&(r=!0);const o={notify:t,highlight:r};return null!==n&&(o.sound=n),o}}const d=u.encodeActions;class h{}let p;o()(h,"ACTION_NOTIFY",d({notify:!0})),o()(h,"ACTION_NOTIFY_DEFAULT_SOUND",d({notify:!0,sound:"default"})),o()(h,"ACTION_NOTIFY_RING_SOUND",d({notify:!0,sound:"ring"})),o()(h,"ACTION_HIGHLIGHT",d({notify:!0,highlight:!0})),o()(h,"ACTION_HIGHLIGHT_DEFAULT_SOUND",d({notify:!0,sound:"default",highlight:!0})),o()(h,"ACTION_DONT_NOTIFY",d({notify:!1})),o()(h,"ACTION_DISABLED",null),function(e){e.Off="off",e.On="on",e.Loud="loud"}(p||(p={}));class m{static actionsFor(e){return e===p.On?h.ACTION_NOTIFY:e===p.Loud?h.ACTION_HIGHLIGHT_DEFAULT_SOUND:void 0}static contentRuleVectorStateKind(e){const t=u.decodeActions(e.actions);if(!t)return null;let n=0;t.sound&&n++,t.highlight&&n++;let r=null;switch(n){case 0:r=p.On;break;case 2:r=p.Loud}return r}}o()(m,"OFF",p.Off),o()(m,"ON",p.On),o()(m,"LOUD",p.Loud),o()(m,"states",p);var g=n(80);class f{constructor(e){o()(this,"kind",void 0),o()(this,"description",void 0),o()(this,"vectorStateToActions",void 0),this.kind=e.kind,this.description=e.description,this.vectorStateToActions=e.vectorStateToActions}ruleToVectorState(e){let t=!1;e&&(t=e.enabled);for(const n in m.states){const r=m.states[n],o=this.vectorStateToActions[r];if(o){if(t&&JSON.stringify(u.decodeActions(e.actions))===JSON.stringify(u.decodeActions(o)))return r}else if(!t)return r}console.error(`Cannot translate rule actions into Vector rule state. Rule: ${JSON.stringify(e)}, Expected: `+JSON.stringify(this.vectorStateToActions))}}const _={".m.rule.contains_display_name":new f({kind:l.b.Override,description:Object(g.b)("Messages containing my display name"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_HIGHLIGHT_DEFAULT_SOUND,[p.Off]:h.ACTION_DISABLED}}),".m.rule.contains_user_name":new f({kind:l.b.Override,description:Object(g.b)("Messages containing my username"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_HIGHLIGHT_DEFAULT_SOUND,[p.Off]:h.ACTION_DISABLED}}),".m.rule.roomnotif":new f({kind:l.b.Override,description:Object(g.b)("Messages containing @room"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_HIGHLIGHT,[p.Off]:h.ACTION_DISABLED}}),".m.rule.room_one_to_one":new f({kind:l.b.Underride,description:Object(g.b)("Messages in one-to-one chats"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_NOTIFY_DEFAULT_SOUND,[p.Off]:h.ACTION_DONT_NOTIFY}}),".m.rule.encrypted_room_one_to_one":new f({kind:l.b.Underride,description:Object(g.b)("Encrypted messages in one-to-one chats"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_NOTIFY_DEFAULT_SOUND,[p.Off]:h.ACTION_DONT_NOTIFY}}),".m.rule.message":new f({kind:l.b.Underride,description:Object(g.b)("Messages in group chats"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_NOTIFY_DEFAULT_SOUND,[p.Off]:h.ACTION_DONT_NOTIFY}}),".m.rule.encrypted":new f({kind:l.b.Underride,description:Object(g.b)("Encrypted messages in group chats"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_NOTIFY_DEFAULT_SOUND,[p.Off]:h.ACTION_DONT_NOTIFY}}),".m.rule.invite_for_me":new f({kind:l.b.Underride,description:Object(g.b)("When I'm invited to a room"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_NOTIFY_DEFAULT_SOUND,[p.Off]:h.ACTION_DISABLED}}),".m.rule.call":new f({kind:l.b.Underride,description:Object(g.b)("Call invitation"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_NOTIFY_RING_SOUND,[p.Off]:h.ACTION_DISABLED}}),".m.rule.suppress_notices":new f({kind:l.b.Override,description:Object(g.b)("Messages sent by bot"),vectorStateToActions:{[p.On]:h.ACTION_DISABLED,[p.Loud]:h.ACTION_NOTIFY_DEFAULT_SOUND,[p.Off]:h.ACTION_DONT_NOTIFY}}),".m.rule.tombstone":new f({kind:l.b.Override,description:Object(g.b)("When rooms are upgraded"),vectorStateToActions:{[p.On]:h.ACTION_NOTIFY,[p.Loud]:h.ACTION_HIGHLIGHT,[p.Off]:h.ACTION_DISABLED}})};class b{static parseContentRules(e){const t=b.categoriseContentRules(e);return t.loud.length?{vectorState:p.Loud,rules:t.loud,externalRules:[...t.loud_but_disabled,...t.on,...t.on_but_disabled,...t.other]}:t.loud_but_disabled.length?{vectorState:p.Off,rules:t.loud_but_disabled,externalRules:[...t.on,...t.on_but_disabled,...t.other]}:t.on.length?{vectorState:p.On,rules:t.on,externalRules:[...t.on_but_disabled,...t.other]}:t.on_but_disabled.length?{vectorState:p.Off,rules:t.on_but_disabled,externalRules:t.other}:{vectorState:p.On,rules:[],externalRules:t.other}}static categoriseContentRules(e){const t={on:[],on_but_disabled:[],loud:[],loud_but_disabled:[],other:[]};for(const n in e.global)for(let r=0;r<Object.keys(e.global[n]).length;++r){const o=e.global[n][r];if("."!==o.rule_id[0]&&n===l.b.ContentSpecific)switch(o.kind=n,m.contentRuleVectorStateKind(o)){case p.On:o.enabled?t.on.push(o):t.on_but_disabled.push(o);break;case p.Loud:o.enabled?t.loud.push(o):t.loud_but_disabled.push(o);break;default:t.other.push(o)}}return t}}let v;!function(e){e.Email="email",e.Phone="msisdn"}(v||(v={}));var y,E,S=n(165),w=n(84),C=n(189),T=n(98),x=n(87),k=n(105),F=n(90),O=n(85),R=n(850),D=n(129),I=n(109);function A(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}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}!function(e){e.Loading="loading",e.Ready="ready",e.Persisting="persisting",e.Error="error"}(y||(y={})),function(e){e.Master="master",e.VectorGlobal="vector_global",e.VectorMentions="vector_mentions",e.VectorOther="vector_other",e.Other="other"}(E||(E={}));const M=E.VectorMentions,P=[l.c.DM,l.c.EncryptedDM,l.c.Message,l.c.EncryptedMessage,l.c.ContainsDisplayName,l.c.ContainsUserName,l.c.AtRoomNotification,l.c.InviteToSelf,l.c.IncomingCall,l.c.SuppressNotices,l.c.Tombstone];class L extends a.a.PureComponent{constructor(e){super(e),o()(this,"onMasterRuleChanged",async e=>{this.setState({phase:y.Persisting});try{const t=this.state.masterPushRule;await c.a.get().setPushRuleEnabled("global",t.kind,t.rule_id,!e),await this.refreshFromServer()}catch(e){this.setState({phase:y.Error}),console.error("Error updating master push rule:",e),this.showSaveError()}}),o()(this,"onEmailNotificationsChanged",async(e,t)=>{this.setState({phase:y.Persisting});try{if(t)await c.a.get().setPusher({kind:"email",app_id:"m.email",pushkey:e,app_display_name:"Email Notifications",device_display_name:e,lang:navigator.language,data:{brand:F.a.get().brand},append:!0});else{const t=this.state.pushers.find(t=>"email"===t.kind&&t.pushkey===e);t.kind=null,await c.a.get().setPusher(t)}await this.refreshFromServer()}catch(e){this.setState({phase:y.Error}),console.error("Error updating email pusher:",e),this.showSaveError()}}),o()(this,"onDesktopNotificationsChanged",async e=>{await w.b.setValue("notificationsEnabled",null,T.a.DEVICE,e),this.forceUpdate()}),o()(this,"onDesktopShowBodyChanged",async e=>{await w.b.setValue("notificationBodyEnabled",null,T.a.DEVICE,e),this.forceUpdate()}),o()(this,"onAudioNotificationsChanged",async e=>{await w.b.setValue("audioNotificationsEnabled",null,T.a.DEVICE,e),this.forceUpdate()}),o()(this,"onRadioChecked",async(e,t)=>{this.setState({phase:y.Persisting});try{const n=c.a.get();if("_keywords"===e.ruleId)for(const e of this.state.vectorKeywordRuleInfo.rules){let r,o;t===p.On?(1!==e.actions.length&&(o=m.actionsFor(t)),this.state.vectorKeywordRuleInfo.vectorState===p.Off&&(r=!0)):t===p.Loud?(3!==e.actions.length&&(o=m.actionsFor(t)),this.state.vectorKeywordRuleInfo.vectorState===p.Off&&(r=!0)):r=!1,o&&await n.setPushRuleActions("global",e.kind,e.rule_id,o),void 0!==r&&await n.setPushRuleEnabled("global",e.kind,e.rule_id,r)}else{const r=_[e.ruleId].vectorStateToActions[t];r?(await n.setPushRuleActions("global",e.rule.kind,e.rule.rule_id,r),await n.setPushRuleEnabled("global",e.rule.kind,e.rule.rule_id,!0)):await n.setPushRuleEnabled("global",e.rule.kind,e.rule.rule_id,!1)}await this.refreshFromServer()}catch(e){this.setState({phase:y.Error}),console.error("Error updating push rule:",e),this.showSaveError()}}),o()(this,"onClearNotificationsClicked",()=>{c.a.get().getRooms().forEach(e=>{if(e.getUnreadNotificationCount()>0){const t=e.getLiveTimeline().getEvents();t.length&&c.a.get().sendReadReceipt(t[t.length-1])}})}),o()(this,"onKeywordAdd",e=>{const t=Object(D.a)(this.state.vectorKeywordRuleInfo.rules);this.setState({phase:y.Persisting,vectorKeywordRuleInfo:N(N({},this.state.vectorKeywordRuleInfo),{},{rules:[...this.state.vectorKeywordRuleInfo.rules,{pattern:e}]})},async()=>{await this.setKeywords(this.state.vectorKeywordRuleInfo.rules.map(e=>e.pattern),t)})}),o()(this,"onKeywordRemove",e=>{const t=Object(D.a)(this.state.vectorKeywordRuleInfo.rules);this.setState({phase:y.Persisting,vectorKeywordRuleInfo:N(N({},this.state.vectorKeywordRuleInfo),{},{rules:this.state.vectorKeywordRuleInfo.rules.filter(t=>t.pattern!==e)})},async()=>{await this.setKeywords(this.state.vectorKeywordRuleInfo.rules.map(e=>e.pattern),t)})}),this.state={phase:y.Loading}}get isInhibited(){var e;return null===(e=this.state.masterPushRule)||void 0===e?void 0:e.enabled}componentDidMount(){this.refreshFromServer()}async refreshFromServer(){try{const e=(await Promise.all([this.refreshRules(),this.refreshPushers(),this.refreshThreepids()])).reduce((e,t)=>Object.assign(t,e),{});this.setState(N(N({},e),{},{phase:y.Ready}))}catch(e){console.error("Error setting up notifications for settings: ",e),this.setState({phase:y.Error})}}async refreshRules(){const e=await c.a.get().getPushRules(),t={[l.c.Master]:E.Master,[l.c.DM]:E.VectorGlobal,[l.c.EncryptedDM]:E.VectorGlobal,[l.c.Message]:E.VectorGlobal,[l.c.EncryptedMessage]:E.VectorGlobal,[l.c.ContainsDisplayName]:E.VectorMentions,[l.c.ContainsUserName]:E.VectorMentions,[l.c.AtRoomNotification]:E.VectorMentions,[l.c.InviteToSelf]:E.VectorOther,[l.c.IncomingCall]:E.VectorOther,[l.c.SuppressNotices]:E.VectorOther,[l.c.Tombstone]:E.VectorOther},n={[E.Master]:[],[E.VectorGlobal]:[],[E.VectorMentions]:[],[E.VectorOther]:[],[E.Other]:[]};for(const o in e.global){const i=o;for(const o of e.global[i]){var r;const e=Object.assign(o,{kind:i}),a=null!==(r=t[e.rule_id])&&void 0!==r?r:E.Other;"."===e.rule_id[0]&&n[a].push(e)}}const o={};if(!(n.master.length>0))throw new Error("Failed to locate a master push rule");o.masterPushRule=n.master[0],o.vectorKeywordRuleInfo=b.parseContentRules(e),o.vectorPushRules={};const i=[E.VectorGlobal,E.VectorMentions,E.VectorOther];for(const e of i){o.vectorPushRules[e]=[];for(const t of n[e]){const n=_[t.rule_id],r=n.ruleToVectorState(t);o.vectorPushRules[e].push({ruleId:t.rule_id,rule:t,vectorState:r,description:Object(g.a)(n.description)})}o.vectorPushRules[e].sort((e,t)=>{let n=P.indexOf(e.ruleId),r=P.indexOf(t.ruleId);return n<0&&(n=P.length),r<0&&(r=P.length),n-r}),e===M&&o.vectorPushRules[e].push({ruleId:"_keywords",description:Object(g.a)("Messages containing keywords"),vectorState:o.vectorKeywordRuleInfo.vectorState})}return o}refreshPushers(){return c.a.get().getPushers()}refreshThreepids(){return c.a.get().getThreePids()}showSaveError(){x.a.createTrackedDialog("Error saving notification preferences","",k.a,{title:Object(g.a)("Error saving notification preferences"),description:Object(g.a)("An error occurred whilst saving your notification preferences.")})}async setKeywords(e,t){try{e=Array.from(new Set(e)).filter(e=>!!e);const n=Array.from(new Set(t.map(e=>e.pattern))).filter(e=>!!e),r=Object(I.a)(n,e);for(const e of r.removed)for(const n of t.filter(t=>t.pattern===e))await c.a.get().deletePushRule("global",n.kind,n.rule_id);let o=this.state.vectorKeywordRuleInfo.vectorState;o===p.Off&&(o=t.length?m.contentRuleVectorStateKind(t[0]):p.On);const i=l.b.ContentSpecific;for(const e of r.added)await c.a.get().addPushRule("global",i,e,{actions:m.actionsFor(o),pattern:e}),o===p.Off&&await c.a.get().setPushRuleEnabled("global",i,e,!1);await this.refreshFromServer()}catch(e){this.setState({phase:y.Error}),console.error("Error updating keyword push rules:",e),this.showSaveError()}}renderTopSection(){const e=a.a.createElement(S.a,{value:!this.isInhibited,label:Object(g.a)("Enable for this account"),onChange:this.onMasterRuleChanged,disabled:this.state.phase===y.Persisting});if(this.isInhibited)return e;const t=this.state.threepids.filter(e=>e.medium===v.Email).map(e=>a.a.createElement(S.a,{key:e.address,value:this.state.pushers.some(t=>"email"===t.kind&&t.pushkey===e.address),label:Object(g.a)("Enable email notifications for %(email)s",{email:e.address}),onChange:this.onEmailNotificationsChanged.bind(this,e.address),disabled:this.state.phase===y.Persisting}));return a.a.createElement(a.a.Fragment,null,e,a.a.createElement(S.a,{value:w.b.getValue("notificationsEnabled"),onChange:this.onDesktopNotificationsChanged,label:Object(g.a)("Enable desktop notifications for this session"),disabled:this.state.phase===y.Persisting}),a.a.createElement(S.a,{value:w.b.getValue("notificationBodyEnabled"),onChange:this.onDesktopShowBodyChanged,label:Object(g.a)("Show message in desktop notification"),disabled:this.state.phase===y.Persisting}),a.a.createElement(S.a,{value:w.b.getValue("audioNotificationsEnabled"),onChange:this.onAudioNotificationsChanged,label:Object(g.a)("Enable audible notifications for this session"),disabled:this.state.phase===y.Persisting}),t)}renderCategory(e){if(e!==E.VectorOther&&this.isInhibited)return null;let t,n;if(e===E.VectorOther&&c.a.get().getRooms().some(e=>e.getUnreadNotificationCount()>0)&&(t=a.a.createElement(O.a,{onClick:this.onClearNotificationsClicked,kind:"danger",className:"mx_UserNotifSettings_clearNotifsButton"},Object(g.a)("Clear notifications"))),e===E.VectorOther&&this.isInhibited)return t?a.a.createElement("div",{className:"mx_UserNotifSettings_floatingSection"},a.a.createElement("div",null,Object(g.a)("Other")),t):null;var r;e===E.VectorMentions&&(n=a.a.createElement(R.a,{tags:null===(r=this.state.vectorKeywordRuleInfo)||void 0===r?void 0:r.rules.map(e=>e.pattern),onAdd:this.onKeywordAdd,onRemove:this.onKeywordRemove,disabled:this.state.phase===y.Persisting,label:Object(g.a)("Keyword"),placeholder:Object(g.a)("New keyword")}));const o=(e,t)=>a.a.createElement(C.a,{key:e.ruleId,name:e.ruleId,checked:e.vectorState===t,onChange:this.onRadioChecked.bind(this,e,t),disabled:this.state.phase===y.Persisting}),i=this.state.vectorPushRules[e].map(t=>a.a.createElement("tr",{key:e+t.ruleId},a.a.createElement("td",null,t.description),a.a.createElement("td",null,o(t,p.Off)),a.a.createElement("td",null,o(t,p.On)),a.a.createElement("td",null,o(t,p.Loud))));let s;switch(e){case E.VectorGlobal:s=Object(g.a)("Global");break;case E.VectorMentions:s=Object(g.a)("Mentions & keywords");break;case E.VectorOther:s=Object(g.a)("Other");break;default:throw new Error("Developer error: Unnamed notifications section: "+e)}return a.a.createElement(a.a.Fragment,null,a.a.createElement("table",{className:"mx_UserNotifSettings_pushRulesTable"},a.a.createElement("thead",null,a.a.createElement("tr",null,a.a.createElement("th",null,s),a.a.createElement("th",null,Object(g.a)("Off")),a.a.createElement("th",null,Object(g.a)("On")),a.a.createElement("th",null,Object(g.a)("Noisy")))),a.a.createElement("tbody",null,i)),t,n)}renderTargets(){if(this.isInhibited)return null;const e=this.state.pushers.map(e=>a.a.createElement("tr",{key:e.kind+e.pushkey},a.a.createElement("td",null,e.app_display_name),a.a.createElement("td",null,e.device_display_name)));return e.length?a.a.createElement("div",{className:"mx_UserNotifSettings_floatingSection"},a.a.createElement("div",null,Object(g.a)("Notification targets")),a.a.createElement("table",null,a.a.createElement("tbody",null,e))):null}render(){return this.state.phase===y.Loading?a.a.createElement(s.a,null):this.state.phase===y.Error?a.a.createElement("p",null,Object(g.a)("There was an error loading your notification settings.")):a.a.createElement("div",{className:"mx_UserNotifSettings"},this.renderTopSection(),this.renderCategory(E.VectorGlobal),this.renderCategory(E.VectorMentions),this.renderCategory(E.VectorOther),this.renderTargets())}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Je})),n.d(t,"b",(function(){return Xe}));var r=n(92),o=n.n(r),i=n(79),a=n.n(i),s=n(78),c=n.n(s),l=n(134),u=n(206),d=n(160),h=n(2),p=(n(1333),n(1334),n(124)),m=n(112);function g(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}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class _{constructor(e,t){this.failedEventId=e,this.errorCode=t,a()(this,"ts",void 0),this.ts=Date.now()}}class b{constructor(e,t){if(this.fn=e,this.errorCodeMapFn=t,a()(this,"failures",[]),a()(this,"failureCounts",{}),a()(this,"trackedEventHashMap",{}),a()(this,"checkInterval",null),a()(this,"trackInterval",null),!e||"function"!=typeof e)throw new Error("DecryptionFailureTracker requires tracking function");if(t&&"function"!=typeof t)throw new Error("DecryptionFailureTracker second constructor argument should be a function")}eventDecrypted(e,t){t?this.addDecryptionFailure(new _(e.getId(),t.code)):this.removeDecryptionFailuresForEvent(e)}addDecryptionFailure(e){this.failures.push(e)}removeDecryptionFailuresForEvent(e){this.failures=this.failures.filter(t=>t.failedEventId!==e.getId())}start(){this.checkInterval=setInterval(()=>this.checkFailures(Date.now()),b.CHECK_INTERVAL_MS),this.trackInterval=setInterval(()=>this.trackFailures(),b.TRACK_INTERVAL_MS)}stop(){clearInterval(this.checkInterval),clearInterval(this.trackInterval),this.failures=[],this.failureCounts={}}checkFailures(e){const t=[],n=[];for(;this.failures.length>0;){const r=this.failures.shift();e>r.ts+b.GRACE_PERIOD_MS?t.push(r):n.push(r)}this.failures=n;const r=t.reduce((e,t)=>this.trackedEventHashMap[t.failedEventId]?e:e.set(t.failedEventId,t),new Map),o=[...r.keys()];this.trackedEventHashMap=o.reduce((e,t)=>f(f({},e),{},{[t]:!0}),this.trackedEventHashMap);const i=r.values();this.aggregateFailures(i)}aggregateFailures(e){for(const t of e){const e=t.errorCode;this.failureCounts[e]=(this.failureCounts[e]||0)+1}}trackFailures(){for(const e of Object.keys(this.failureCounts))if(this.failureCounts[e]>0){const t=this.errorCodeMapFn?this.errorCodeMapFn(e):e;this.fn(this.failureCounts[e],t),this.failureCounts[e]=0}}}a()(b,"TRACK_INTERVAL_MS",6e4),a()(b,"CHECK_INTERVAL_MS",5e3),a()(b,"GRACE_PERIOD_MS",6e4);var v=n(82),y=n(111),E=n(90),S=n(83),w=n(235),C=n(87),T=n(151),x=n(186),k=n(390),F=n(264),O=n(313);const R={deferredAction:null};class D extends O.Store{constructor(){super(S.a),a()(this,"state",R)}setState(e){this.state=Object.assign(this.state,e),this.__emitChange()}__onDispatch(e){switch(e.action){case"do_after_sync_prepared":this.setState({deferredAction:e.deferred_action});break;case"cancel_after_sync_prepared":this.setState({deferredAction:null});break;case"sync_state":{if("PREPARED"!==e.state)break;if(!this.state.deferredAction)break;const t=Object.assign({},this.state.deferredAction);this.setState({deferredAction:null}),S.a.dispatch(t);break}case"on_client_not_viable":case"on_logged_out":this.reset()}}reset(){this.state=Object.assign({},R)}}let I=null;I||(I=new D);var A=n(685),N=n(125),M=n(80),P=n(84),L=n(427),j=n(686),U=n(282),B=n(687),G=n(254),V=n(122),q=n(328),H=n(688),z=n(558),W=n(133),K=n(339),Y=n(91),$=n(85),Q=n(158);const J=()=>{S.a.dispatch({action:"accept_cookies"})},X=()=>{S.a.dispatch({action:"reject_cookies"})},Z=()=>{p.a.showDetailsModal()},ee=()=>{W.a.sharedInstance().dismissToast("analytics")};var te=n(455),ne=n(105),re=n(167),oe=n(98),ie=n(171),ae=n(689),se=n(690),ce=n(113),le=n(176),ue=n(691);const de=()=>{window.location.href="mobile_guide/"},he=()=>{document.cookie="element_mobile_redirect_to_guide=false;path=/;max-age=14400",pe()},pe=()=>{W.a.sharedInstance().dismissToast("mobileguide")};var me=n(461),ge=n(102),fe=n(81),_e=n(156),be=n(141),ve=n(210),ye=n(97),Ee=n(110),Se=n(192),we=n(692),Ce=n(447),Te=n(693),xe=n(697),ke=n(698),Fe=n(699),Oe=n(874),Re=n(820),De=n(891),Ie=n(825),Ae=n(829),Ne=n(831),Me=n(288),Pe=n(833);let Le;!function(e){e.APP_STARTUP="mx_AppStartup",e.PAGE_CHANGE="mx_PageChange",e.RESEND_EVENT="mx_ResendEvent",e.SEND_E2EE_EVENT="mx_SendE2EEEvent",e.SEND_ATTACHMENT="mx_SendAttachment",e.SWITCH_ROOM="mx_SwithRoom",e.JUMP_TO_ROOM="mx_JumpToRoom",e.JOIN_ROOM="mx_JoinRoom",e.CREATE_DM="mx_CreateDM",e.PEEK_ROOM="mx_PeekRoom",e.VERIFY_E2EE_USER="mx_VerifyE2EEUser",e.LOGIN="mx_Login",e.REGISTER="mx_Register",e.SETUP_VOIP_CALL="mx_SetupVoIPCall"}(Le||(Le={}));class je{constructor(){a()(this,"START_PREFIX","start:"),a()(this,"STOP_PREFIX","stop:"),a()(this,"listeners",[]),a()(this,"entries",[])}static get instance(){return je._instance||(je._instance=new je),je._instance}start(e,t){if(!this.supportsPerformanceApi())return;const n=this.buildKey(e,t);performance.getEntriesByName(this.START_PREFIX+n).length>0?console.warn("Recording already started for: "+e):performance.mark(this.START_PREFIX+n)}stop(e,t){if(!this.supportsPerformanceApi())return;const n=this.buildKey(e,t);if(0===performance.getEntriesByName(this.START_PREFIX+n).length)return void console.warn("No recording started for: "+e);performance.mark(this.STOP_PREFIX+n),performance.measure(n,this.START_PREFIX+n,this.STOP_PREFIX+n),this.clear(e,t);const r=performance.getEntriesByName(n).pop();return this.entries.push(r),this.listeners.forEach(e=>{this.shouldEmit(e,r)&&e.callback([r])}),r}clear(e,t){if(!this.supportsPerformanceApi())return;const n=this.buildKey(e,t);performance.clearMarks(this.START_PREFIX+n),performance.clearMarks(this.STOP_PREFIX+n)}getEntries({name:e,type:t}={}){return this.entries.filter(n=>{const r=!e||n.name===e,o=!t||n.entryType===t;return r&&o})}addPerformanceDataCallback(e,t=!1){if(this.listeners.push(e),t){const t=this.entries.filter(t=>this.shouldEmit(e,t));t.length>0&&e.callback(t)}}removePerformanceDataCallback(e){e?this.listeners.splice(this.listeners.findIndex(t=>t.callback===e),1):this.listeners=[]}supportsPerformanceApi(){return void 0!==performance&&void 0!==performance.mark}shouldEmit(e,t){return!e.entryNames||e.entryNames.includes(t.name)}buildKey(e,t){return`${e}${t?":"+t:""}`}}a()(je,"_instance",void 0),window.mxPerformanceMonitor=je.instance,window.mxPerformanceEntryNames=Le;var Ue,Be,Ge,Ve=n(143),qe=n(834),He=n(114),ze=n(130),We=n(329);function Ke(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}let Ye;!function(e){e[e.LOADING=0]="LOADING",e[e.WELCOME=1]="WELCOME",e[e.LOGIN=2]="LOGIN",e[e.REGISTER=3]="REGISTER",e[e.FORGOT_PASSWORD=4]="FORGOT_PASSWORD",e[e.COMPLETE_SECURITY=5]="COMPLETE_SECURITY",e[e.E2E_SETUP=6]="E2E_SETUP",e[e.LOGGED_IN=7]="LOGGED_IN",e[e.SOFT_LOGOUT=8]="SOFT_LOGOUT"}(Ye||(Ye={}));const $e=["register","login","forgot_password","start_sso","start_cas"],Qe=[Y.a.ViewUserSettings,"view_create_chat","view_create_room","view_create_group"];let Je=Object(fe.a)("structures.MatrixChat")((Ge=Be=class extends c.a.PureComponent{constructor(e,t){if(super(e,t),a()(this,"firstSyncComplete",void 0),a()(this,"firstSyncPromise",void 0),a()(this,"screenAfterLogin",void 0),a()(this,"pageChanging",void 0),a()(this,"tokenLogin",void 0),a()(this,"accountPassword",void 0),a()(this,"accountPasswordTimer",void 0),a()(this,"focusComposer",void 0),a()(this,"subTitleStatus",void 0),a()(this,"prevWindowWidth",void 0),a()(this,"loggedInView",void 0),a()(this,"dispatcherRef",void 0),a()(this,"themeWatcher",void 0),a()(this,"fontWatcher",void 0),a()(this,"onAction",e=>{if(v.a.get()&&v.a.get().isGuest()&&Qe.includes(e.action))return S.a.dispatch({action:"do_after_sync_prepared",deferred_action:e}),void S.a.dispatch({action:"require_registration"});switch(e.action){case"MatrixActions.accountData":if("m.identity_server"===e.event_type){const t=e.event_content?e.event_content.base_url:null;t?(v.a.get().setIdentityServerUrl(t),localStorage.removeItem("mx_is_access_token"),localStorage.setItem("mx_is_url",t)):(v.a.get().setIdentityServerUrl(null),localStorage.removeItem("mx_is_access_token"),localStorage.removeItem("mx_is_url")),S.a.dispatch({action:"id_server_changed"})}break;case"logout":S.a.dispatch({action:"hangup_all"}),F.i();break;case"require_registration":Object(j.b)(e);break;case"start_registration":if(F.g()){this.onSoftLogout();break}e.screenAfterLogin&&(this.screenAfterLogin=e.screenAfterLogin),this.startRegistration(e.params||{});break;case"start_login":if(F.g()){this.onSoftLogout();break}e.screenAfterLogin&&(this.screenAfterLogin=e.screenAfterLogin),this.viewLogin();break;case"start_password_recovery":this.setStateForNewView({view:Ye.FORGOT_PASSWORD}),this.notifyNewScreen("forgot_password");break;case"start_chat":Object(N.b)({dmUserId:e.user_id});break;case"leave_room":this.leaveRoom(e.room_id);break;case"forget_room":this.forgetRoom(e.room_id);break;case"copy_room":this.copyRoom(e.room_id);break;case"reject_invite":C.a.createTrackedDialog("Reject invitation","",Ee.a,{title:Object(M.a)("Reject invitation"),description:Object(M.a)("Are you sure you want to reject the invitation?"),onFinished:t=>{if(t){const t=C.a.createDialog(ye.a,null,"mx_Dialog_spinner");v.a.get().leave(e.room_id).then(()=>{t.close(),this.state.currentRoomId===e.room_id&&S.a.dispatch({action:"view_home_page"})},e=>{t.close(),C.a.createTrackedDialog("Failed to reject invitation","",ne.a,{title:Object(M.a)("Failed to reject invitation"),description:e.toString()})})}}});break;case"view_user_info":this.viewUser(e.userId,e.subAction);break;case"view_room":{const t=this.viewRoom(e);e.deferred_action&&t.then(()=>{S.a.dispatch(e.deferred_action)});break}case Y.a.ViewUserSettings:{const t=e;C.a.createTrackedDialog("User settings","",Se.b,{initialTabId:t.initialTabId},null,!1,!0),this.viewSomethingBehindModal();break}case"view_create_room":this.createRoom(e.public,e.defaultName);break;case"view_create_group":{const e=P.b.getValue("feature_communities_v2_prototypes");C.a.createTrackedDialog("Create Community","",e?ae.a:we.a);break}case Y.a.ViewRoomDirectory:ge.g.instance.activeSpace?S.a.dispatch({action:"view_room",room_id:ge.g.instance.activeSpace.roomId}):C.a.createTrackedDialog("Room directory","",Te.a,{initialText:e.initialText},"mx_RoomDirectory_dialogWrapper",!1,!0),this.viewSomethingBehindModal();break;case"view_my_groups":this.setPage(A.a.MyGroups),this.notifyNewScreen("groups");break;case"view_group":this.viewGroup(e);break;case"view_welcome_page":this.viewWelcome();break;case"view_home_page":this.viewHome(e.justRegistered);break;case"view_start_chat_or_reuse":this.chatCreateOrReuse(e.user_id);break;case"view_create_chat":Object(T.h)(e.initialText||"");break;case"view_invite":Object(T.g)(e.roomId);break;case"view_last_screen":this.showScreenAfterLogin();break;case"toggle_my_groups":localStorage.setItem("mx_seenSpacesBeta","1"),this.state.page_type===A.a.MyGroups?S.a.dispatch({action:"view_last_screen"}):S.a.dispatch({action:"view_my_groups"});break;case"hide_left_panel":this.setState({collapseLhs:!0},()=>{this.state.resizeNotifier.notifyLeftHandleResized()});break;case"focus_room_filter":case"show_left_panel":this.setState({collapseLhs:!1},()=>{this.state.resizeNotifier.notifyLeftHandleResized()});break;case Y.a.OpenDialPad:C.a.createTrackedDialog("Dial pad","",ue.a,{},"mx_Dialog_dialPadWrapper");break;case"on_logged_in":this.tokenLogin||F.g()||this.state.view===Ye.LOGIN||this.state.view===Ye.REGISTER||this.state.view===Ye.COMPLETE_SECURITY||this.state.view===Ye.E2E_SETUP||this.onLoggedIn();break;case"on_client_not_viable":this.onSoftLogout();break;case"on_logged_out":this.onLoggedOut();break;case"will_start_client":this.setState({ready:!1},()=>{this.onWillStartClient()});break;case"client_started":this.onClientStarted();break;case"send_event":this.onSendEvent(e.room_id,e.event);break;case"aria_hide_main_app":this.setState({hideToSRUsers:!0});break;case"aria_unhide_main_app":this.setState({hideToSRUsers:!1});break;case"accept_cookies":P.b.setValue("analyticsOptIn",null,oe.a.DEVICE,!0),P.b.setValue("showCookieBar",null,oe.a.DEVICE,!1),ee(),p.a.canEnable()&&p.a.enable(),m.a.instance.canEnable()&&m.a.instance.enable(!1);break;case"reject_cookies":P.b.setValue("analyticsOptIn",null,oe.a.DEVICE,!1),P.b.setValue("showCookieBar",null,oe.a.DEVICE,!1),ee()}}),a()(this,"handleResize",()=>{const e=Ve.b.instance.windowWidth;this.prevWindowWidth<1e3&&e>=1e3&&S.a.dispatch({action:"show_left_panel"}),this.prevWindowWidth>=1e3&&e<1e3&&S.a.dispatch({action:"hide_left_panel"}),this.prevWindowWidth=e,this.state.resizeNotifier.notifyWindowResized()}),a()(this,"onRegisterClick",()=>{this.showScreen("register")}),a()(this,"onLoginClick",()=>{this.showScreen("login")}),a()(this,"onForgotPasswordClick",()=>{this.showScreen("forgot_password")}),a()(this,"onRegisterFlowComplete",(e,t)=>this.onUserCompletedLoginFlow(e,t)),a()(this,"onServerConfigChange",e=>{this.setState({serverConfig:e})}),a()(this,"makeRegistrationUrl",e=>(this.props.startingFragmentQueryParams.referrer&&(e.referrer=this.props.startingFragmentQueryParams.referrer),this.props.makeRegistrationUrl(e))),a()(this,"onUserCompletedLoginFlow",async(e,t)=>{this.accountPassword=t,null!==this.accountPasswordTimer&&clearTimeout(this.accountPasswordTimer),this.accountPasswordTimer=setTimeout(()=>{this.accountPassword=null,this.accountPasswordTimer=null},3e5),await F.l(e),await this.postLoginSetup(),je.instance.stop(Le.LOGIN),je.instance.stop(Le.REGISTER)}),a()(this,"onCompleteSecurityE2eSetupFinished",()=>{this.onLoggedIn()}),this.state={view:Ye.LOADING,collapseLhs:!1,hideToSRUsers:!1,syncError:null,resizeNotifier:new B.a,ready:!1},this.loggedInView=Object(s.createRef)(),E.a.put(this.props.config),this.firstSyncComplete=!1,this.firstSyncPromise=Object(h.l)(),this.props.config.sync_timeline_limit&&(v.a.opts.initialSyncLimit=this.props.config.sync_timeline_limit),this.screenAfterLogin=this.props.initialScreenAfterLogin,this.screenAfterLogin){const e=this.screenAfterLogin.params||{};if(this.screenAfterLogin.screen.startsWith("room/")&&e.signurl&&e.email){const t=this.screenAfterLogin.screen.substring("room/".length);se.a.instance.storeInvite(t,e)}}this.prevWindowWidth=Ve.b.instance.windowWidth||1e3,Ve.b.instance.on(Ve.a.Resize,this.handleResize),this.pageChanging=!1,this.state.resizeNotifier.on("middlePanelResized",this.dispatchTimelineResize),F.g()&&F.h(),this.accountPassword=null,this.accountPasswordTimer=null,this.dispatcherRef=S.a.register(this.onAction),this.themeWatcher=new q.a,this.fontWatcher=new H.a,this.themeWatcher.start(),this.fontWatcher.start(),this.focusComposer=!1,this.subTitleStatus="",this.onAliasClick&&(k.a.onAliasClick=this.onAliasClick),this.onUserClick&&(k.a.onUserClick=this.onUserClick),this.onGroupClick&&(k.a.onGroupClick=this.onGroupClick),F.g()||F.a(this.props.realQueryParams,this.props.defaultDeviceDisplayName,this.getFragmentAfterLogin()).then(async e=>{var t;if(null!==(t=this.props.realQueryParams)&&void 0!==t&&t.loginToken&&this.props.onTokenLoginCompleted(),e)return this.tokenLogin=!0,await F.k({ignoreGuest:!0}),this.postLoginSetup();const n=this.screenAfterLogin?this.screenAfterLogin.screen:null;if("login"!==n&&"register"!==n&&"forgot_password"!==n)return this.loadSession();this.showScreenAfterLogin()}),P.b.getValue("analyticsOptIn")&&p.a.enable(),We.a.instance.updateAnonymityFromSettings(),We.a.instance.updatePlatformSuperProperties(),m.a.instance.enable(!0)}async postLoginSetup(){const e=v.a.get(),t=e.isCryptoEnabled();t||this.onLoggedIn();const n=[this.firstSyncPromise.promise];if(t&&n.push(e.downloadKeys([e.getUserId()])),this.setState({pendingInitialSync:!0}),await Promise.all(n),!t)return void this.setState({pendingInitialSync:!1});e.getStoredCrossSigningForUser(e.getUserId())?!1===ve.a.SHOW_ENCRYPTION_SETUP_UI?this.onLoggedIn():this.setStateForNewView({view:Ye.COMPLETE_SECURITY}):await e.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing")?this.setStateForNewView({view:Ye.E2E_SETUP}):this.onLoggedIn(),this.setState({pendingInitialSync:!1})}UNSAFE_componentWillUpdate(e,t){this.shouldTrackPageChange(this.state,t)&&this.startPageChangeTimer()}componentDidUpdate(e,t){if(this.shouldTrackPageChange(t,this.state)){const e=this.stopPageChangeTimer();p.a.trackPageChange(e),m.a.instance.trackPageChange(e),We.a.instance.trackPageView(e)}this.focusComposer&&(S.a.fire(Y.a.FocusSendMessageComposer),this.focusComposer=!1)}componentWillUnmount(){F.n(),S.a.unregister(this.dispatcherRef),this.themeWatcher.stop(),this.fontWatcher.stop(),Ve.b.destroy(),this.state.resizeNotifier.removeListener("middlePanelResized",this.dispatchTimelineResize),null!==this.accountPasswordTimer&&clearTimeout(this.accountPasswordTimer)}getFallbackHsUrl(){return this.props.serverConfig&&this.props.serverConfig.isDefault?this.props.config.fallback_hs_url:null}getServerProperties(){let e=this.state.serverConfig;return e||(e=this.props.serverConfig),e||(e=E.a.get().validated_server_config),{serverConfig:e}}loadSession(){return Promise.resolve().then(()=>F.h({fragmentQueryParams:this.props.startingFragmentQueryParams,enableGuest:this.props.enableGuest,guestHsUrl:this.getServerProperties().serverConfig.hsUrl,guestIsUrl:this.getServerProperties().serverConfig.isUrl,defaultDeviceDisplayName:this.props.defaultDeviceDisplayName})).then(e=>{e?P.b.getValue("analyticsOptIn")&&m.a.instance.enable(!1):se.a.instance.pickBestInvite()?S.a.dispatch({action:"start_registration"}):S.a.dispatch({action:"view_welcome_page"})})}startPageChangeTimer(){je.instance.start(Le.PAGE_CHANGE)}stopPageChangeTimer(){const e=je.instance;e.stop(Le.PAGE_CHANGE);const t=e.getEntries({name:Le.PAGE_CHANGE}).pop();return t?t.duration:null}shouldTrackPageChange(e,t){return e.currentRoomId!==t.currentRoomId||e.view!==t.view||e.page_type!==t.page_type}setStateForNewView(e){if(void 0===e.view)throw new Error("setStateForNewView with no view!");const t={currentUserId:null,justRegistered:!1};Object.assign(t,e),this.setState(t)}setPage(e){this.setState({page_type:e})}async startRegistration(e){const t={view:Ye.REGISTER};e.client_secret&&e.session_id&&e.hs_url&&e.is_url&&e.sid&&(t.serverConfig=await G.a.validateServerConfigWithStaticUrls(e.hs_url,e.is_url),t.register_client_secret=e.client_secret,t.register_session_id=e.session_id,t.register_id_sid=e.sid),this.setStateForNewView(t),L.a.isLogin=!0,this.themeWatcher.recheck(),this.notifyNewScreen("register")}viewRoom(e){this.focusComposer=!0,e.room_alias?console.log(`Switching to room alias ${e.room_alias} at event `+e.event_id):console.log(`Switching to room id ${e.room_id} at event `+e.event_id);let t=Promise.resolve(null);if(!this.firstSyncComplete){if(!this.firstSyncPromise)return void console.warn("Cannot view a room before first sync. room_id:",e.room_id);t=this.firstSyncPromise.promise}return t.then(()=>{let t=e.room_alias||e.room_id;const n=v.a.get().getRoom(e.room_id);if(n){n.decryptAllEvents();const e=x.b(n);e&&(t=e,Object(z.b)(e,n.roomId)),localStorage&&localStorage.setItem("mx_last_room_id",n.roomId)}const r="#"===t[0]&&e.room_id===this.state.currentRoomId;e.event_id&&e.highlighted&&(t+="/"+e.event_id),this.setState({view:Ye.LOGGED_IN,currentRoomId:e.room_id||null,page_type:A.a.RoomView,threepidInvite:e.threepid_invite,roomOobData:e.oob_data,ready:!0,roomJustCreatedOpts:e.justCreatedOpts},()=>{this.notifyNewScreen("room/"+t,r)})})}async viewGroup(e){const t=e.group_id;if(!this.firstSyncComplete){if(!this.firstSyncPromise)return void console.warn("Cannot view a group before first sync. group_id:",t);await this.firstSyncPromise.promise}this.setState({view:Ye.LOGGED_IN,currentGroupId:t,currentGroupIsNew:e.group_is_new}),this.setPage(A.a.GroupView),this.notifyNewScreen("group/"+t)}viewSomethingBehindModal(){this.state.view===Ye.LOGGED_IN?this.state.currentGroupId||this.state.currentRoomId||this.viewHome():this.viewWelcome()}viewWelcome(){if(Object(me.b)(E.a.get()))return this.viewLogin();this.setStateForNewView({view:Ye.WELCOME}),this.notifyNewScreen("welcome"),L.a.isLogin=!0,this.themeWatcher.recheck()}viewLogin(e){this.setStateForNewView(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({view:Ye.LOGIN},e)),this.notifyNewScreen("login"),L.a.isLogin=!0,this.themeWatcher.recheck()}viewHome(e=!1){this.setStateForNewView({view:Ye.LOGGED_IN,justRegistered:e}),this.setPage(A.a.HomePage),this.notifyNewScreen("home"),L.a.isLogin=!1,this.themeWatcher.recheck()}viewUser(e,t){(this.firstSyncPromise?this.firstSyncPromise.promise:Promise.resolve()).then(()=>{"chat"!==t?(this.notifyNewScreen("user/"+e),this.setState({currentUserId:e}),this.setPage(A.a.UserView)):this.chatCreateOrReuse(e)})}async createRoom(e=!1,t){const n=le.a.instance.getSelectedCommunityId();if(n&&!le.a.instance.isAdminOf(n))return void C.a.createTrackedDialog("Pre-failure to create room","",ne.a,{title:Object(M.a)("Cannot create rooms in this community"),description:Object(M.a)("You do not have permission to create rooms in this community.")});const r=C.a.createTrackedDialog("Create Room","",Ce.a,{defaultPublic:e,defaultName:t}),[o,i]=await r.finished;o&&Object(N.b)(i)}chatCreateOrReuse(e){if(v.a.get().isGuest())return e!==this.props.config.welcomeUserId&&S.a.dispatch({action:"do_after_sync_prepared",deferred_action:{action:"view_start_chat_or_reuse",user_id:e}}),void S.a.dispatch({action:"require_registration",go_welcome_on_cancel:!0,screen_after:{screen:"user/"+this.props.config.welcomeUserId,params:{action:"chat"}}});const t=v.a.get(),n=new V.a(t).getDMRoomsForUserId(e);n.length>0?S.a.dispatch({action:"view_room",room_id:n[0]}):S.a.dispatch({action:"start_chat",user_id:e})}leaveRoomWarnings(e){const t=v.a.get().getRoom(e),n=ge.g.spacesEnabled&&(null==t?void 0:t.isSpaceRoom()),r=[];if(1===t.currentState.getJoinedMemberCount())return r.push(c.a.createElement("span",{className:"warning",key:"only_member_warning"}," ",Object(M.a)("You are the only person here. If you leave, no one will be able to join in the future, including you."))),r;const o=t.currentState.getStateEvents("m.room.join_rules","");if(o){"public"!==o.getContent().join_rule&&r.push(c.a.createElement("span",{className:"warning",key:"non_public_warning"}," ",n?Object(M.a)("This space is not public. You will not be able to rejoin without an invite."):Object(M.a)("This room is not public. You will not be able to rejoin without an invite.")))}return r}leaveRoom(e){const t=v.a.get().getRoom(e),n=this.leaveRoomWarnings(e),r=ge.g.spacesEnabled&&(null==t?void 0:t.isSpaceRoom());C.a.createTrackedDialog(r?"Leave space":"Leave room","",Ee.a,{title:r?Object(M.a)("Leave space"):Object(M.a)("Leave room"),description:c.a.createElement("span",null,r?Object(M.a)("Are you sure you want to leave the space '%(spaceName)s'?",{spaceName:t.name}):Object(M.a)("Are you sure you want to leave the room '%(roomName)s'?",{roomName:t.name}),n),button:Object(M.a)("Leave"),onFinished:t=>{if(t){const t=Object(ie.d)(e),n=C.a.createDialog(ye.a,null,"mx_Dialog_spinner");t.finally(()=>n.close()),S.a.dispatch({action:"after_leave_room",room_id:e})}}})}forgetRoom(e){const t=v.a.get().getRoom(e);v.a.get().forget(e).then(()=>{this.state.currentRoomId===e&&S.a.dispatch({action:"view_home_page"}),_e.b.instance.manualRoomUpdate(t,be.c.RoomRemoved)}).catch(e=>{const t=e.errcode||Object(M.b)("unknown error code");C.a.createTrackedDialog("Failed to forget room","",ne.a,{title:Object(M.a)("Failed to forget room %(errCode)s",{errCode:t}),description:e&&e.message?e.message:Object(M.a)("Operation failed")})})}async copyRoom(e){const t=Object(He.g)(e);await Object(ze.c)(t)||C.a.createTrackedDialog("Unable to copy room link","",ne.a,{title:Object(M.a)("Unable to copy room link"),description:Object(M.a)("Unable to copy a link to the room to the clipboard.")})}async startWelcomeUserChat(){let e;e=this.firstSyncComplete?Promise.resolve():this.firstSyncPromise.promise,await e;if(0===V.a.shared().getDMRoomsForUserId(this.props.config.welcomeUserId).length){const e=await Object(N.b)({dmUserId:this.props.config.welcomeUserId,andView:!this.state.currentRoomId,spinner:!1}),t=e=>{"m.direct"===e.getType()&&e.getContent()&&e.getContent()[this.props.config.welcomeUserId]&&(v.a.get().store.save(!0),v.a.get().removeListener("accountData",t))};return v.a.get().on("accountData",t),e}return null}async onLoggedIn(){if(L.a.isLogin=!1,this.themeWatcher.recheck(),this.setStateForNewView({view:Ye.LOGGED_IN}),this.screenAfterLogin&&this.screenAfterLogin.screen)this.showScreen(this.screenAfterLogin.screen,this.screenAfterLogin.params),this.screenAfterLogin=null;else if(v.a.currentUserIsJustRegistered())if(v.a.setJustRegisteredUserId(null),this.props.config.welcomeUserId&&Object(M.d)().startsWith("en")){null===await this.startWelcomeUserChat()&&S.a.dispatch({action:"view_home_page",justRegistered:!0})}else if(se.a.instance.pickBestInvite()){const e=se.a.instance.pickBestInvite(),t=se.a.instance.translateToWireFormat(e);this.showScreen("room/"+e.roomId,t)}else S.a.dispatch({action:"view_home_page",justRegistered:!0});else this.showScreenAfterLogin();var e;(K.g(),await Object(h.H)(30),P.b.getValue("showCookieBar")&&(p.a.canEnable()||m.a.instance.canEnable()))&&(e=>{const t=E.a.get().brand;W.a.sharedInstance().addOrReplaceToast({key:"analytics",title:Object(M.a)("Help us improve %(brand)s",{brand:t}),props:{description:Object(M.a)("Send <UsageDataLink>anonymous usage data</UsageDataLink> which helps us improve %(brand)s. This will use a <PolicyLink>cookie</PolicyLink>.",{brand:t},{UsageDataLink:e=>c.a.createElement($.a,{kind:"link",onClick:Z},e),PolicyLink:t=>e?c.a.createElement("a",{target:"_blank",href:e},t):t}),acceptLabel:Object(M.a)("Yes"),onAccept:J,rejectLabel:Object(M.a)("No"),onReject:X},component:Q.a,className:"mx_AnalyticsToast",priority:10})})(null===(e=this.props.config.piwik)||void 0===e?void 0:e.policyUrl);E.a.get().mobileGuideToast&&(()=>{const e=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,t=/Android/.test(navigator.userAgent);(e||t)&&(document.cookie.includes("element_mobile_redirect_to_guide=false")||W.a.sharedInstance().addOrReplaceToast({key:"mobileguide",title:Object(M.a)("Use app for a better experience"),props:{description:Object(M.a)("Element Web is experimental on mobile. For a better experience and the latest features, use our free native app."),acceptLabel:Object(M.a)("Use app"),onAccept:de,rejectLabel:Object(M.a)("Dismiss"),onReject:he},component:Q.a,priority:99}))})()}showScreenAfterLogin(){this.screenAfterLogin&&this.screenAfterLogin.screen?(this.showScreen(this.screenAfterLogin.screen,this.screenAfterLogin.params),this.screenAfterLogin=null):localStorage&&localStorage.getItem("mx_last_room_id")?this.viewLastRoom():v.a.get().isGuest()?S.a.dispatch({action:"view_welcome_page"}):S.a.dispatch({action:"view_home_page"})}viewLastRoom(){S.a.dispatch({action:"view_room",room_id:localStorage.getItem("mx_last_room_id")})}onLoggedOut(){this.viewLogin({ready:!1,collapseLhs:!1,currentRoomId:null}),this.subTitleStatus="",this.setPageSubtitle()}onSoftLogout(){this.notifyNewScreen("soft_logout"),this.setStateForNewView({view:Ye.SOFT_LOGOUT,ready:!1,collapseLhs:!1,currentRoomId:null}),this.subTitleStatus="",this.setPageSubtitle()}onWillStartClient(){this.firstSyncComplete=!1,this.firstSyncPromise=Object(h.l)();const e=v.a.get();e.setCanResetTimelineCallback(e=>(console.log("Request to reset timeline in room ",e," viewing:",this.state.currentRoomId),e!==this.state.currentRoomId||(!this.loggedInView.current||this.loggedInView.current.canResetTimelineInRoom(e)))),e.on("sync",(e,t,n)=>{S.a.dispatch({action:"sync_state",prevState:t,state:e}),"ERROR"===e||"RECONNECTING"===e?(n.error instanceof u.b&&F.d(n.error),this.setState({syncError:n.error||!0})):this.state.syncError&&this.setState({syncError:null}),this.updateStatusIndicator(e,t),"SYNCING"===e&&"SYNCING"===t||(console.info("MatrixClient sync state => %s",e),"PREPARED"===e&&(this.firstSyncComplete=!0,this.firstSyncPromise.resolve(),w.default.shouldShowPrompt()&&!v.a.userRegisteredWithinLastHours(24)&&Object(te.b)(!1),S.a.fire(Y.a.FocusSendMessageComposer),this.setState({ready:!0})))}),e.on("Session.logged_out",(function(e){if(!F.f()){if(C.a.closeCurrentModal("Session.logged_out"),401===e.httpStatus&&e.data&&e.data.soft_logout)return console.warn("Soft logout issued by server - avoiding data deletion"),void F.m();C.a.createTrackedDialog("Signed out","",ne.a,{title:Object(M.a)("Signed Out"),description:Object(M.a)("For security, this session has been signed out. Please sign in again.")}),S.a.dispatch({action:"logout"})}})),e.on("no_consent",(function(t,n){C.a.createTrackedDialog("No Consent Dialog","",Ee.a,{title:Object(M.a)("Terms and Conditions"),description:c.a.createElement("div",null,c.a.createElement("p",null," ",Object(M.a)("To continue using the %(homeserverDomain)s homeserver you must review and agree to our terms and conditions.",{homeserverDomain:e.getDomain()}))),button:Object(M.a)("Review terms and conditions"),cancelButton:Object(M.a)("Dismiss"),onFinished:e=>{if(e){window.open(n,"_blank").opener=null}}},null,!0)}));const t=new b((e,t)=>{p.a.trackEvent("E2E","Decryption failure",t,String(e)),m.a.instance.track("decryption_failure",{errorCode:t},null,{sum:e})},e=>{switch(e){case"MEGOLM_UNKNOWN_INBOUND_SESSION_ID":return"olm_keys_not_sent_error";case"OLM_UNKNOWN_MESSAGE_INDEX":return"olm_index_error";case void 0:return"unexpected_error";default:return"unspecified_error"}});t.start(),e.on("Session.logged_out",()=>t.stop()),e.on("Event.decrypted",(e,n)=>t.eventDecrypted(e,n)),e.on("Room",e=>{if(v.a.get().isCryptoEnabled()){const t=P.b.getValueAt(oe.a.ROOM_DEVICE,"blacklistUnverifiedDevices",e.roomId,!0);e.setBlacklistUnverifiedDevices(t)}}),e.on("crypto.warning",e=>{switch(e){case"CRYPTO_WARNING_OLD_VERSION_DETECTED":C.a.createTrackedDialog("Crypto migrated","",ne.a,{title:Object(M.a)("Old cryptography data detected"),description:Object(M.a)("Data from an older version of %(brand)s has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.",{brand:E.a.get().brand})})}}),e.on("crypto.keyBackupFailed",async e=>{let t,r;if(v.a.get().getKeyBackupEnabled())t=!0;else try{r=await v.a.get().getKeyBackupVersion(),null!==r&&(t=!0)}catch(e){return void console.error("Saw key backup error but failed to check backup version!",e)}t?C.a.createTrackedDialogAsync("New Recovery Method","New Recovery Method",n.e(29).then(n.bind(null,1434)),{newVersionInfo:r}):C.a.createTrackedDialogAsync("Recovery Method Removed","Recovery Method Removed",n.e(30).then(n.bind(null,1435)))}),e.on("crypto.keySignatureUploadFailure",(e,t,n)=>{C.a.createTrackedDialog("Failed to upload key signatures","Failed to upload key signatures",xe.a,{failures:e,source:t,continuation:n})}),e.on("crypto.verification.request",e=>{e.verifier?C.a.createTrackedDialog("Incoming Verification","",ke.a,{verifier:e.verifier},null,!1,!0):e.pending&&W.a.sharedInstance().addOrReplaceToast({key:"verifreq_"+e.channel.transactionId,title:Object(M.a)("Verification requested"),icon:"verification",props:{request:e},component:Pe.a,priority:90})})}onClientStarted(){const e=v.a.get();if(e.isCryptoEnabled()){const t=P.b.getValueAt(oe.a.DEVICE,"blacklistUnverifiedDevices");e.setGlobalBlacklistUnverifiedDevices(t),e.setGlobalErrorOnUnknownDevices(!1)}}showScreen(e,t){const n=v.a.get();if(!n||n.isGuest()||!$e.includes(e))if("register"===e)S.a.dispatch({action:"start_registration",params:t}),je.instance.start(Le.REGISTER);else if("login"===e)S.a.dispatch({action:"start_login",params:t}),je.instance.start(Le.LOGIN);else if("forgot_password"===e)S.a.dispatch({action:"start_password_recovery",params:t});else if("soft_logout"===e)n.getUserId()&&!F.g()?this.viewLastRoom():S.a.dispatch({action:"start_login",params:t});else if("new"===e)S.a.dispatch({action:"view_create_room"});else if("settings"===e)S.a.fire(Y.a.ViewUserSettings);else if("welcome"===e)S.a.dispatch({action:"view_welcome_page"});else if("home"===e)S.a.dispatch({action:"view_home_page"});else if("start"===e)this.showScreen("home"),S.a.dispatch({action:"require_registration"});else if("directory"===e)this.state.view===Ye.WELCOME&&m.a.instance.track("onboarding_room_directory"),S.a.fire(Y.a.ViewRoomDirectory);else if("start_sso"===e||"start_cas"===e){let t=v.a.get();if(!t){const{hsUrl:e,isUrl:n}=this.props.serverConfig;t=Object(l.createClient)({baseUrl:e,idBaseUrl:n})}const n="start_sso"===e?"sso":"cas";y.a.get().startSingleSignOn(t,n,this.getFragmentAfterLogin())}else if("groups"===e){if(ge.g.spacesEnabled)return void S.a.dispatch({action:"view_home_page"});S.a.dispatch({action:"view_my_groups"})}else if(0===e.indexOf("room/")){var r,o,i;const n=e.substring(5),a=n.indexOf(":")+1;let s=n.length;n.substring(a).indexOf("/")>-1&&(s=a+n.substring(a).indexOf("/"));const c=n.substring(0,s);let l,u=n.substring(s+1);if(u||(u=void 0),t.signurl&&t.email&&(l=se.a.instance.storeInvite(c,t)),!l){l=se.a.instance.getInvites().find(e=>e.roomId===c)}let d=[];t.via&&(d="string"==typeof t.via?[t.via]:t.via);const h={action:"view_room",event_id:u,via_servers:d,highlighted:Boolean(u),threepid_invite:l,oob_data:{name:null===(r=l)||void 0===r?void 0:r.roomName,avatarUrl:null===(o=l)||void 0===o?void 0:o.roomAvatarUrl,inviterName:null===(i=l)||void 0===i?void 0:i.inviterName},room_alias:void 0,room_id:void 0};"#"===c[0]?h.room_alias=c:h.room_id=c,S.a.dispatch(h)}else if(0===e.indexOf("user/")){const n=e.substring(5);S.a.dispatch({action:"view_user_info",userId:n,subAction:t.action})}else if(0===e.indexOf("group/")){if(ge.g.spacesEnabled)return void S.a.dispatch({action:"view_home_page"});const t=e.substring(6);S.a.dispatch({action:"view_group",group_id:t})}else console.info("Ignoring showScreen for '%s'",e);else S.a.dispatch({action:"view_home_page"})}notifyNewScreen(e,t=!1){this.props.onNewScreen&&this.props.onNewScreen(e,t),this.setPageSubtitle()}onAliasClick(e,t){e.preventDefault(),S.a.dispatch({action:"view_room",room_alias:t})}onUserClick(e,t){e.preventDefault();const n=new d.a(null,t);n&&S.a.dispatch({action:Y.a.ViewUser,member:n})}onGroupClick(e,t){e.preventDefault(),S.a.dispatch({action:"view_group",group_id:t})}onLogoutClick(e){S.a.dispatch({action:"logout"}),e.stopPropagation(),e.preventDefault()}dispatchTimelineResize(){S.a.dispatch({action:"timeline_resize"})}onRegistered(e){return F.l(e)}onSendEvent(e,t){const n=v.a.get();n?n.sendEvent(e,t.getType(),t.getContent()).then(()=>{S.a.dispatch({action:"message_sent"})},e=>{S.a.dispatch({action:"message_send_failed"})}):S.a.dispatch({action:"message_send_failed"})}setPageSubtitle(e=""){if(this.state.currentRoomId){const t=v.a.get(),n=t&&t.getRoom(this.state.currentRoomId);n&&(e=`${this.subTitleStatus} | ${n.name} ${e}`)}else e=`${this.subTitleStatus} ${e}`;const t=`${E.a.get().brand} ${e}`;document.title!==t&&(document.title=t)}updateStatusIndicator(e,t){const n=re.a.instance.globalState.numUnreadStates;y.a.get()&&(y.a.get().setErrorStatus("ERROR"===e),y.a.get().setNotificationCount(n)),this.subTitleStatus="","ERROR"===e&&(this.subTitleStatus+=`[${Object(M.a)("Offline")}] `),n>0&&(this.subTitleStatus+=`[${n}]`),this.setPageSubtitle()}onCloseAllSettings(){S.a.dispatch({action:"close_settings"})}getFragmentAfterLogin(){let e="";const t=this.props.initialScreenAfterLogin;return t&&!["welcome","login","register","start_sso","start_cas"].includes(t.screen)&&(e="/"+t.screen),e}render(){const e=this.getFragmentAfterLogin();let t=null;if(this.state.view===Ye.LOADING)t=c.a.createElement("div",{className:"mx_MatrixChat_splash"},c.a.createElement(ye.a,null));else if(this.state.view===Ye.COMPLETE_SECURITY)t=c.a.createElement(Fe.a,{onFinished:this.onCompleteSecurityE2eSetupFinished});else if(this.state.view===Ye.E2E_SETUP)t=c.a.createElement(Ie.a,{onFinished:this.onCompleteSecurityE2eSetupFinished,accountPassword:this.accountPassword,tokenLogin:!!this.tokenLogin});else if(this.state.view===Ye.LOGGED_IN){const e=this.state.syncError&&this.state.syncError instanceof u.b;if(this.state.ready&&this.state.page_type&&!e)t=c.a.createElement(Oe.a,o()({},this.props,this.state,{ref:this.loggedInView,matrixClient:v.a.get(),onRegistered:this.onRegistered,currentRoomId:this.state.currentRoomId}));else{let n;this.state.syncError&&!e&&(n=c.a.createElement("div",{className:"mx_MatrixChat_syncError"},Object(U.b)(this.state.syncError))),t=c.a.createElement("div",{className:"mx_MatrixChat_splash"},n,c.a.createElement(ye.a,null),c.a.createElement("a",{href:"#",className:"mx_MatrixChat_splashButtons",onClick:this.onLogoutClick},Object(M.a)("Logout")))}}else if(this.state.view===Ye.WELCOME)t=c.a.createElement(Re.a,null);else if(this.state.view===Ye.REGISTER&&P.b.getValue(ce.a.Registration)){var n;const r=null===(n=se.a.instance.pickBestInvite())||void 0===n?void 0:n.toEmail;t=c.a.createElement(Ae.a,o()({clientSecret:this.state.register_client_secret,sessionId:this.state.register_session_id,idSid:this.state.register_id_sid,email:r,brand:this.props.config.brand,makeRegistrationUrl:this.makeRegistrationUrl,onLoggedIn:this.onRegisterFlowComplete,onLoginClick:this.onLoginClick,onServerConfigChange:this.onServerConfigChange,defaultDeviceDisplayName:this.props.defaultDeviceDisplayName,fragmentAfterLogin:e},this.getServerProperties()))}else if(this.state.view===Ye.FORGOT_PASSWORD&&P.b.getValue(ce.a.PasswordReset))t=c.a.createElement(De.a,o()({onComplete:this.onLoginClick,onLoginClick:this.onLoginClick,onServerConfigChange:this.onServerConfigChange},this.getServerProperties()));else if(this.state.view===Ye.LOGIN){const n=P.b.getValue(ce.a.PasswordReset);t=c.a.createElement(Ne.a,o()({isSyncing:this.state.pendingInitialSync,onLoggedIn:this.onUserCompletedLoginFlow,onRegisterClick:this.onRegisterClick,fallbackHsUrl:this.getFallbackHsUrl(),defaultDeviceDisplayName:this.props.defaultDeviceDisplayName,onForgotPasswordClick:n?this.onForgotPasswordClick:void 0,onServerConfigChange:this.onServerConfigChange,fragmentAfterLogin:e,defaultUsername:this.props.startingFragmentQueryParams.defaultUsername},this.getServerProperties()))}else this.state.view===Ye.SOFT_LOGOUT?t=c.a.createElement(qe.a,{realQueryParams:this.props.realQueryParams,onTokenLoginCompleted:this.props.onTokenLoginCompleted,fragmentAfterLogin:e}):console.error("Unknown view "+this.state.view);return c.a.createElement(Me.a,null,t)}},a()(Be,"displayName","MatrixChat"),a()(Be,"defaultProps",{realQueryParams:{},startingFragmentQueryParams:{},config:{},onTokenLoginCompleted:()=>{}}),Ue=Ge))||Ue;function Xe(){const e=window.matrixChat;return e&&e.state.view===Ye.LOGGED_IN}},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(104),c=n(685),l=n(285),u=n(682),d=n(83),h=n(84),p=n(462),m=n(343),g=(n(463),n(700));class f extends g.a{notifyCollapsed(e){const t=this.resizer.config.onCollapsed;t&&t(e,this.id,this.domNode)}get isCollapsed(){return(0,this.resizer.config.isItemCollapsed)(this.domNode)}}class _ extends m.a{static createItem(e,t,n){return new f(e,t,n)}constructor(e){var t,n;super(e),o()(this,"toggleSize",void 0),o()(this,"isCollapsed",void 0),this.toggleSize=null===(t=e.resizer)||void 0===t||null===(n=t.config)||void 0===n?void 0:n.toggleSize,this.isCollapsed=e.isCollapsed}resize(e){const t=e<this.toggleSize;t&&!this.isCollapsed?(this.isCollapsed=!0,this.item.notifyCollapsed(!0)):!t&&this.isCollapsed&&(this.item.notifyCollapsed(!1),this.isCollapsed=!1),t||super.resize(e)}}var b=n(464),v=n(94),y=n(344),E=n(465),S=n(111),w=n(141),C=n(80),T=n(158),x=n(133),k=n(282);const F=()=>{x.a.sharedInstance().dismissToast("serverlimit")};var O,R,D,I=n(91),A=n(703),N=n(726),M=n(156),P=n(734),L=n(87),j=n(735),U=n(179),B=n(736),G=n(81),V=n(138),q=n(746),H=n(748),z=n(813),W=n(814),K=n(815),Y=n(816),$=n(102);function Q(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||!!e.getAttribute("contenteditable")}let J=Object(G.a)("structures.LoggedInView")((D=R=class extends i.Component{constructor(e,t){super(e,t),o()(this,"_matrixClient",void 0),o()(this,"_roomView",void 0),o()(this,"_resizeContainer",void 0),o()(this,"compactLayoutWatcherRef",void 0),o()(this,"resizer",void 0),o()(this,"onCallsChanged",()=>{this.setState({activeCalls:V.d.sharedInstance().getAllActiveCalls()})}),o()(this,"canResetTimelineInRoom",e=>!this._roomView.current||this._roomView.current.canResetTimeline()),o()(this,"onAccountData",e=>{"m.ignored_user_list"===e.getType()&&d.a.dispatch({action:"ignore_state_changed"})}),o()(this,"onCompactLayoutChanged",(e,t,n,r,o)=>{this.setState({useCompactLayout:r})}),o()(this,"onSync",(e,t,n)=>{const r=this.state.syncErrorData&&this.state.syncErrorData.error&&this.state.syncErrorData.error.errcode,o=n&&n.error&&n.error.errcode;e===t&&r===o||("ERROR"===e?this.setState({syncErrorData:n}):this.setState({syncErrorData:null}),"PREPARED"===t&&"SYNCING"===e?this.updateServerNoticeEvents():this.calculateServerLimitToast(this.state.syncErrorData,this.state.usageLimitEventContent))}),o()(this,"onRoomStateEvents",(e,t)=>{const n=M.b.instance.orderedLists[w.a.ServerNotice];n&&n.some(t=>t.roomId===e.getRoomId())&&this.updateServerNoticeEvents()}),o()(this,"onUsageLimitDismissed",()=>{this.setState({usageLimitDismissed:!0})}),o()(this,"updateServerNoticeEvents",async()=>{const e=M.b.instance.orderedLists[w.a.ServerNotice];if(!e)return[];const t=[];let n=0;for(const r of e){const e=r.currentState.getStateEvents("m.room.pinned_events","");if(!e||!e.getContent().pinned)continue;n=e.getTs();const o=e.getContent().pinned.slice(0,2);for(const e of o){const n=(await this._matrixClient.getEventTimeline(r.getUnfilteredTimelineSet(),e)).getEvents().find(t=>t.getId()===e);n&&t.push(n)}}if(n&&this.state.usageLimitEventTs>n)return;const r=t.find(e=>e&&"m.room.message"===e.getType()&&"m.server_notice.usage_limit_reached"===e.getContent().server_notice_type),o=r&&r.getContent();this.calculateServerLimitToast(this.state.syncErrorData,o),this.setState({usageLimitEventContent:o,usageLimitEventTs:n,usageLimitDismissed:!1})}),o()(this,"onPaste",e=>{let t=!1,n=e.target;for(;!t&&n;)t=Q(n),n=n.parentElement;t||d.a.fire(I.a.FocusSendMessageComposer,!0)}),o()(this,"onReactKeyDown",e=>{this.onKeyDown(e)}),o()(this,"onNativeKeyDown",e=>{e.target===document.body&&this.onKeyDown(e)}),o()(this,"onKeyDown",e=>{let t=!1;switch(Object(U.f)().getRoomAction(e)){case U.d.ScrollUp:case U.d.RoomScrollDown:case U.d.JumpToFirstMessage:case U.d.JumpToLatestMessage:this.onScrollKeyPressed(e),t=!0;break;case U.d.FocusSearch:d.a.dispatch({action:"focus_search"}),t=!0}if(t)return e.stopPropagation(),void e.preventDefault();switch(Object(U.f)().getNavigationAction(e)){case U.c.FocusRoomSearch:d.a.dispatch({action:"focus_room_filter"}),t=!0;break;case U.c.ToggleUserMenu:d.a.fire(I.a.ToggleUserMenu),t=!0;break;case U.c.ToggleShortCutDialog:y.f(),t=!0;break;case U.c.GoToHome:d.a.dispatch({action:"view_home_page"}),L.a.closeCurrentModal("homeKeyboardShortcut"),t=!0;break;case U.c.ToggleRoomSidePanel:"room_view"!==this.props.page_type&&"group_view"!==this.props.page_type||(d.a.dispatch({action:I.a.ToggleRightPanel,type:"room_view"===this.props.page_type?"room":"group"}),t=!0);break;case U.c.SelectPrevRoom:d.a.dispatch({action:I.a.ViewRoomDelta,delta:-1,unread:!1}),t=!0;break;case U.c.SelectNextRoom:d.a.dispatch({action:I.a.ViewRoomDelta,delta:1,unread:!1}),t=!0;break;case U.c.SelectPrevUnreadRoom:d.a.dispatch({action:I.a.ViewRoomDelta,delta:-1,unread:!0});break;case U.c.SelectNextUnreadRoom:d.a.dispatch({action:I.a.ViewRoomDelta,delta:1,unread:!0});break;default:t=S.a.get().onKeyDown(e)}if(t)return e.stopPropagation(),void e.preventDefault();if(!(e.key===s.a.ALT||e.key===s.a.CONTROL||e.key===s.a.META||e.key===s.a.SHIFT||e.altKey||e.ctrlKey||e.metaKey)){const t=e.target!==document.body&&(e.key===s.a.SPACE||e.key===s.a.ENTER);if(e.key===s.a.CONTEXT_MENU)return;t||e.key===s.a.TAB||Q(e.target)||(d.a.fire(I.a.FocusSendMessageComposer,!0),e.stopPropagation())}}),o()(this,"onScrollKeyPressed",e=>{this._roomView.current&&this._roomView.current.handleScrollKey(e)}),this.state={syncErrorData:void 0,useCompactLayout:h.b.getValue("useCompactLayout"),usageLimitDismissed:!1,activeCalls:[]},this._matrixClient=this.props.matrixClient,l.c.loadDevices(),Object(u.a)(),this._roomView=i.createRef(),this._resizeContainer=i.createRef()}componentDidMount(){document.addEventListener("keydown",this.onNativeKeyDown,!1),V.d.sharedInstance().addListener(V.a.CallsChanged,this.onCallsChanged),this.updateServerNoticeEvents(),this._matrixClient.on("accountData",this.onAccountData),this._matrixClient.on("sync",this.onSync),this.onSync(this._matrixClient.getSyncState(),null,this._matrixClient.getSyncStateData()),this._matrixClient.on("RoomState.events",this.onRoomStateEvents),this.compactLayoutWatcherRef=h.b.watchSetting("useCompactLayout",null,this.onCompactLayoutChanged),this.resizer=this.createResizer(),this.resizer.attach(),this.loadResizerPreferences()}componentWillUnmount(){document.removeEventListener("keydown",this.onNativeKeyDown,!1),V.d.sharedInstance().removeListener(V.a.CallsChanged,this.onCallsChanged),this._matrixClient.removeListener("accountData",this.onAccountData),this._matrixClient.removeListener("sync",this.onSync),this._matrixClient.removeListener("RoomState.events",this.onRoomStateEvents),h.b.unwatchSetting(this.compactLayoutWatcherRef),this.resizer.detach()}createResizer(){let e,t;const n={toggleSize:156,onCollapsed:e=>{t=e,e?(d.a.dispatch({action:"hide_left_panel"}),window.localStorage.setItem("mx_lhs_size","0")):d.a.dispatch({action:"show_left_panel"})},onResized:t=>{e=t,this.props.resizeNotifier.notifyLeftHandleResized()},onResizeStart:()=>{this.props.resizeNotifier.startResizing()},onResizeStop:()=>{t||window.localStorage.setItem("mx_lhs_size",""+e),this.props.resizeNotifier.stopResizing()},isItemCollapsed:e=>e.classList.contains("mx_LeftPanel_minimized")},r=new b.a(this._resizeContainer.current,_,n);return r.setClassNames({handle:"mx_ResizeHandle",vertical:"mx_ResizeHandle_vertical",reverse:"mx_ResizeHandle_reverse"}),r}loadResizerPreferences(){let e=parseInt(window.localStorage.getItem("mx_lhs_size"),10);isNaN(e)&&(e=350),this.resizer.forHandleAt(0).resize(e)}calculateServerLimitToast(e,t){const n=e&&e.error&&"M_RESOURCE_LIMIT_EXCEEDED"===e.error.errcode;n&&(t=e.error.data),t&&this.state.usageLimitDismissed?((e,t,n,r)=>{const o=Object(k.a)(e,n,{monthly_active_user:Object(C.b)("Your homeserver has exceeded its user limit."),hs_blocked:Object(C.b)("This homeserver has been blocked by it's administrator."),"":Object(C.b)("Your homeserver has exceeded one of its resource limits.")}),i=Object(k.a)(e,n,{"":Object(C.b)("Contact your <a>server admin</a>.")});x.a.sharedInstance().addOrReplaceToast({key:"serverlimit",title:Object(C.a)("Warning"),props:{description:a.a.createElement(a.a.Fragment,null,o," ",i),acceptLabel:Object(C.a)("Ok"),onAccept:()=>{F(),t&&t()}},component:T.a,priority:70})})(t.limit_type,this.onUsageLimitDismissed,t.admin_contact):F()}render(){let e;switch(this.props.page_type){case c.a.RoomView:e=i.createElement(H.a,{ref:this._roomView,onRegistered:this.props.onRegistered,threepidInvite:this.props.threepidInvite,oobData:this.props.roomOobData,key:this.props.currentRoomId||"roomview",resizeNotifier:this.props.resizeNotifier,justCreatedOpts:this.props.roomJustCreatedOpts});break;case c.a.MyGroups:e=i.createElement(W.a,null);break;case c.a.RoomDirectory:break;case c.a.HomePage:e=i.createElement(E.a,{justRegistered:this.props.justRegistered});break;case c.a.UserView:e=i.createElement(K.a,{userId:this.props.currentUserId,resizeNotifier:this.props.resizeNotifier});break;case c.a.GroupView:e=i.createElement(Y.a,{groupId:this.props.currentGroupId,isNew:this.props.currentGroupIsNew,resizeNotifier:this.props.resizeNotifier})}let t="mx_MatrixChat";this.state.useCompactLayout&&(t+=" mx_MatrixChat_useCompactLayout");const n=this.state.activeCalls.map(e=>i.createElement(q.a,{call:e,key:e.callId}));return i.createElement(v.a.Provider,{value:this._matrixClient},i.createElement("div",{onPaste:this.onPaste,onKeyDown:this.onReactKeyDown,className:"mx_MatrixChat_wrapper","aria-hidden":this.props.hideToSRUsers},i.createElement(z.a,null),i.createElement("div",{ref:this._resizeContainer,className:t},$.g.spacesEnabled?i.createElement(B.a,null):null,i.createElement(A.a,{isMinimized:this.props.collapseLhs||!1,resizeNotifier:this.props.resizeNotifier}),i.createElement(p.a,null),e)),i.createElement(N.a,null),i.createElement(P.a,null),i.createElement(j.a,null),n)}},o()(R,"displayName","LoggedInView"),O=D))||O;t.a=J},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(290),o=n.p+"decoderWorker.min.1325b88.wasm",i=n.p+"wave-encoderWorker.min.945cec9.js",a=n.p+"opus-decoderWorker.min.6fe2ced.js";function s(e){if(window.AudioContext)return new AudioContext(e);if(window.webkitAudioContext)return new window.webkitAudioContext(e);throw new Error("Unsupported browser")}function c(e){return new Promise(t=>{console.log("Decoder WASM path: "+o);const n=new Uint8Array(e),s=new Worker(a),c=new Worker(i);s.postMessage({command:"init",decoderSampleRate:r.c,outputBufferSampleRate:r.c}),c.postMessage({command:"init",wavBitDepth:24,wavSampleRate:r.c}),s.onmessage=e=>{null!==e.data?c.postMessage({command:"encode",buffers:e.data},e.data.map(e=>e.buffer)):c.postMessage({command:"done"})},c.onmessage=e=>{"page"===e.data.message&&t(new Blob([e.data.page],{type:"audio/wav"}).arrayBuffer())},s.postMessage({command:"decode",pages:n},[n.buffer])})}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(283),a=n(86),s=n.n(a),c=n(85),l=n(159),u=n(104);const d=(e,t)=>{try{const n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return t}},h=(e,t)=>{const n="mx_"+e,[o,i]=Object(r.useState)(d(n,t));Object(r.useEffect)(()=>{i(d(n,t))},[n,t]);return[o,Object(r.useCallback)(e=>{window.localStorage.setItem(n,JSON.stringify(e)),i(e)},[n])]};var p=n(94),m=n(139),g=n(127);const f=e=>e?e.getContent():void 0;var _=n(286),b=n(326),v=n(143);t.a=()=>{const e=Object(r.useContext)(p.a),t=((e,t)=>{const[n,o]=Object(r.useState)(()=>f(e.getAccountData(t))),i=Object(r.useCallback)(e=>{e.getType()===t&&o(e.getContent())},[t]);return Object(g.a)(e,"accountData",i),n||{}})(e,"m.widgets"),n=Object(b.b)("Widgets.leftPanel"),a=Object(r.useMemo)(()=>{if(!t||!n)return null;const e=Object.values(t).find(e=>e.id===n);return e?m.a.makeAppConfig(e.state_key,e.content,e.sender,null,e.id):null},[t,n]),[d,y]=h("left-panel-widget-height",280),[E,S]=h("left-panel-widget-expanded",!0),[w,C,T]=Object(l.e)(),x=C?0:-1;if(!a)return null;let k;return E&&(k=o.a.createElement(i.Resizable,{size:{height:d},minHeight:100,maxHeight:Math.min(v.b.instance.windowHeight/2,500),onResizeStop:(e,t,n,r)=>{y(d+r.height)},handleWrapperClass:"mx_LeftPanelWidget_resizerHandles",handleClasses:{top:"mx_LeftPanelWidget_resizerHandle"},className:"mx_LeftPanelWidget_resizeBox",enable:{top:!0}},o.a.createElement(_.a,{app:a,fullWidth:!0,show:!0,showMenubar:!1,userWidget:!0,userId:e.getUserId(),creatorUserId:a.creatorUserId,widgetPageTitle:m.a.getWidgetDataTitle(a),waitForIframeLoad:a.waitForIframeLoad}))),o.a.createElement("div",{className:"mx_LeftPanelWidget"},o.a.createElement("div",{onFocus:w,className:"mx_LeftPanelWidget_headerContainer",onKeyDown:e=>{switch(e.key){case u.a.ARROW_LEFT:e.stopPropagation(),S(!1);break;case u.a.ARROW_RIGHT:e.stopPropagation(),S(!0)}}},o.a.createElement("div",{className:"mx_LeftPanelWidget_stickable"},o.a.createElement(c.a,{onFocus:w,inputRef:T,tabIndex:x,className:"mx_LeftPanelWidget_headerText",role:"treeitem","aria-expanded":E,"aria-level":1,onClick:()=>{S(e=>!e)}},o.a.createElement("span",{className:s()({mx_LeftPanelWidget_collapseBtn:!0,mx_LeftPanelWidget_collapseBtn_collapsed:!E})}),o.a.createElement("span",null,m.a.getWidgetName(a))))),k)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(79),o=n.n(r);class i{constructor(e){this.getFn=e,o()(this,"val",void 0),o()(this,"prom",void 0),o()(this,"done",!1)}get present(){return this.done}get cachedValue(){return this.val}get value(){return this.prom||(this.prom=this.getFn(),this.prom.then(e=>{this.val=e,this.done=!0})),this.prom}}var a=n(100),s=n(614),c=n.n(s),l=n(618);function u(e,t){return Object(a.a)({file:e}).downloadSource().then(e=>e.arrayBuffer()).then(t=>c.a.decryptAttachment(t,e)).then(e=>{let n=null!=t&&t.mimetype?t.mimetype.split(";")[0].trim():"";return n=Object(l.a)(n),new Blob([e],{type:n})})}var d=n(93);class h{constructor(e){this.event=e,o()(this,"sourceUrl",void 0),o()(this,"thumbnailUrl",void 0),o()(this,"sourceBlob",void 0),o()(this,"thumbnailBlob",void 0),o()(this,"media",void 0),o()(this,"prepareSourceUrl",async()=>{if(this.media.isEncrypted){const e=await this.sourceBlob.value;return URL.createObjectURL(e)}return this.media.srcHttp}),o()(this,"prepareThumbnailUrl",async()=>{if(this.media.isEncrypted){const e=await this.thumbnailBlob.value;return null===e?null:URL.createObjectURL(e)}return this.media.thumbnailHttp}),o()(this,"fetchSource",()=>{if(this.media.isEncrypted){const e=this.event.getContent();return u(e.file,e.info)}return this.media.downloadSource().then(e=>e.blob())}),o()(this,"fetchThumbnail",()=>{if(!this.media.hasThumbnail)return Promise.resolve(null);if(this.media.isEncrypted){var e;const t=this.event.getContent();return null!==(e=t.info)&&void 0!==e&&e.thumbnail_file?u(t.info.thumbnail_file,t.info.thumbnail_info):(console.warn("Media claims to have thumbnail and is encrypted, but no thumbnail_file found"),Promise.resolve(null))}return fetch(this.media.thumbnailHttp).then(e=>e.blob())}),this.sourceUrl=new i(this.prepareSourceUrl),this.thumbnailUrl=new i(this.prepareThumbnailUrl),this.sourceBlob=new i(this.fetchSource),this.thumbnailBlob=new i(this.fetchThumbnail),this.media=Object(a.a)(this.event.getContent())}get fileName(){return this.event.getContent().body||"download"}destroy(){this.media.isEncrypted&&(this.sourceUrl.present&&URL.revokeObjectURL(this.sourceUrl.cachedValue),this.thumbnailUrl.present&&URL.revokeObjectURL(this.thumbnailUrl.cachedValue))}static isEligible(e){if(!e)return!1;if(e.isRedacted())return!1;if(e.getType()===d.a.Sticker)return!0;if(e.getType()!==d.a.RoomMessage)return!1;const t=e.getContent();return!![d.b.Video,d.b.Audio,d.b.Image,d.b.File].includes(t.msgtype)||"string"==typeof t.url}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return M})),n.d(t,"b",(function(){return P}));var r=n(79),o=n.n(r),i=n(0),a=n(879),s=n(3),c=n(238),l=n(126),u=n(82),d=n(208),h=n(139),p=n(178),m=n(84),g=n(155),f=n(269),_=n(129),b=n(83),v=n(1),y=n(150),E=n(87),S=n(724);function w(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}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class T extends y.a{constructor(){super(b.a,{}),o()(this,"modalInstance",null),o()(this,"openSourceWidgetId",null),o()(this,"canOpenModalWidget",()=>!this.modalInstance),o()(this,"openModalWidget",(e,t,n)=>{this.modalInstance||(this.openSourceWidgetId=t.id,this.modalInstance=E.a.createTrackedDialog("Modal Widget","",S.a,{widgetDefinition:C({},e),widgetRoomId:n,sourceWidgetId:t.id,onFinished:(e,n)=>{e?this.closeModalWidget(t,n):this.closeModalWidget(t,{"m.exited":!0}),this.openSourceWidgetId=null,this.modalInstance=null}},null,!1,!0))}),o()(this,"closeModalWidget",(e,t)=>{if(this.modalInstance&&this.openSourceWidgetId===e.id){this.openSourceWidgetId=null,this.modalInstance.close(),this.modalInstance=null;const n=c.a.instance.getMessaging(e);if(!n)return void console.error("No source widget messaging for modal widget");n.notifyModalWidgetClose(t)}})}static get instance(){return T.internalInstance}async onAction(e){}}o()(T,"internalInstance",new T),window.mxModalWidgetStore=T.instance;var x=n(328),k=n(243),F=n(112),O=n(723),R=n(725),D=n(80);const I={};function A(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}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class M extends i.Widget{constructor(e){super(e),this.rawDefinition=e}get templateUrl(){var e;return g.a.JITSI.matches(this.type)?h.a.getLocalJitsiWrapperUrl({forLocalRender:!0,auth:null===(e=super.rawData)||void 0===e?void 0:e.auth}):super.templateUrl}get popoutTemplateUrl(){var e;return g.a.JITSI.matches(this.type)?h.a.getLocalJitsiWrapperUrl({forLocalRender:!1,auth:null===(e=super.rawData)||void 0===e?void 0:e.auth}):this.templateUrl}get rawData(){let e=super.rawData.conferenceId;if(void 0===e){e=new URL(super.templateUrl).searchParams.get("confId")}let t=super.rawData.domain;void 0===t&&(t="jitsi.riot.im");let n=(new x.a).getEffectiveTheme();if(n.startsWith("custom-")){const e=Object(k.c)(n.substr(7));n=e.is_dark?"dark":"light"}return n=n.includes("light")?"light":"dark",N(N({},super.rawData),{},{theme:n,conferenceId:e,domain:t})}getCompleteUrl(e,t=!1){return Object(i.runTemplate)(t?this.popoutTemplateUrl:this.templateUrl,N(N({},this.rawDefinition),{},{data:this.rawData}),e)}}class P extends s.EventEmitter{constructor(e){var t;super(),this.appTileProps=e,o()(this,"messaging",void 0),o()(this,"mockWidget",void 0),o()(this,"scalarToken",void 0),o()(this,"roomId",void 0),o()(this,"kind",void 0),o()(this,"onOpenModal",async e=>{e.preventDefault(),T.instance.canOpenModalWidget()?(T.instance.openModalWidget(e.detail.data,this.mockWidget),this.messaging.transport.reply(e.detail,{})):this.messaging.transport.reply(e.detail,{error:{message:"Unable to open modal at this time"}})}),o()(this,"onEvent",e=>{u.a.get().decryptEventIfNeeded(e),e.isBeingDecrypted()||e.isDecryptionFailure()||e.getRoomId()===this.eventListenerRoomId&&this.feedEvent(e)}),o()(this,"onEventDecrypted",e=>{e.isDecryptionFailure()||e.getRoomId()===this.eventListenerRoomId&&this.feedEvent(e)});let n=e.app;n.creatorUserId||(n=Object(_.f)(n),n.creatorUserId=u.a.get().getUserId()),this.mockWidget=new M(n),this.roomId=null===(t=e.room)||void 0===t?void 0:t.roomId,this.kind=e.userWidget?i.WidgetKind.Account:i.WidgetKind.Room}get eventListenerRoomId(){return this.roomId?this.roomId:l.a.getRoomId()}get widgetApi(){return this.messaging}get embedUrl(){return this.runUrlTemplate({asPopout:!1})}get popoutUrl(){return this.runUrlTemplate({asPopout:!0})}runUrlTemplate(e={asPopout:!1}){var t,n;const r=null!==(t=null==I||null===(n=I.provideVariables)||void 0===n?void 0:n.call(I))&&void 0!==t?t:{},o={widgetRoomId:this.roomId,currentUserId:u.a.get().getUserId(),userDisplayName:d.a.instance.displayName,userHttpAvatarUrl:d.a.instance.getHttpAvatarUrl(),clientId:R.a,clientTheme:m.b.getValue("theme"),clientLanguage:Object(D.g)()},i=this.mockWidget.getCompleteUrl(Object.assign(o,r),null==e?void 0:e.asPopout),a=new URL(i);return null!=e&&e.asPopout||(a.searchParams.set("widgetId",this.mockWidget.id),a.searchParams.set("parentUrl",window.location.href.split("#",2)[0]),this.scalarToken&&a.searchParams.set("scalar_token",this.scalarToken)),a.toString().replace(/%24/g,"$")}get isManagedByManager(){return!!this.scalarToken}get started(){return!!this.messaging}get widgetId(){return this.messaging.widget.id}start(e){if(this.started)return;const t=this.appTileProps.whitelistCapabilities||[],n=new a.a(t,this.mockWidget,this.kind,this.roomId);this.messaging=new i.ClientWidgetApi(this.mockWidget,e,n),this.messaging.on("preparing",()=>this.emit("preparing")),this.messaging.on("ready",()=>this.emit("ready")),this.messaging.on("action:"+i.WidgetApiFromWidgetAction.OpenModalWidget,this.onOpenModal),c.a.instance.storeMessaging(this.mockWidget,this.messaging),!this.appTileProps.userWidget&&this.appTileProps.room&&f.a.setRoomId(this.mockWidget.id,this.appTileProps.room.roomId),this.messaging.on("action:"+v.a.ViewRoom,e=>{e.preventDefault();const t=(e.detail.data||{}).room_id;return t?this.messaging.hasCapability(O.a.CanChangeViewedRoom)?(b.a.dispatch({action:"view_room",room_id:t}),void this.messaging.transport.reply(e.detail,{})):this.messaging.transport.reply(e.detail,{error:{message:"This widget does not have permission for this action (denied)."}}):this.messaging.transport.reply(e.detail,{error:{message:"Room ID not supplied."}})}),u.a.get().on("event",this.onEvent),u.a.get().on("Event.decrypted",this.onEventDecrypted),this.messaging.on("action:"+i.WidgetApiFromWidgetAction.UpdateAlwaysOnScreen,e=>{this.messaging.hasCapability(i.MatrixCapabilities.AlwaysOnScreen)&&(g.a.JITSI.matches(this.mockWidget.type)&&F.a.instance.trackJoinCall(this.appTileProps.room.roomId,!0,!0),f.a.setWidgetPersistence(this.mockWidget.id,e.detail.data.value),e.preventDefault(),this.messaging.transport.reply(e.detail,{}))}),this.messaging.on("action:"+i.WidgetApiFromWidgetAction.SendSticker,e=>{this.messaging.hasCapability(i.MatrixCapabilities.StickerSending)&&(e.preventDefault(),this.messaging.transport.reply(e.detail,{}),b.a.dispatch({action:"m.sticker",data:e.detail.data,widgetId:this.mockWidget.id}))}),g.a.STICKERPICKER.matches(this.mockWidget.type)&&this.messaging.on("action:"+v.a.OpenIntegrationManager,e=>{e.preventDefault(),this.messaging.transport.reply(e.detail,{}),b.a.dispatch({action:"stickerpicker_close"});const t=e.detail.data,n=null==t?void 0:t.integType,r=null==t?void 0:t.integId;m.b.getValue("feature_many_integration_managers")?p.a.sharedInstance().openAll(u.a.get().getRoom(l.a.getRoomId()),"type_"+n,r):p.a.sharedInstance().getPrimaryManager().open(u.a.get().getRoom(l.a.getRoomId()),"type_"+n,r)})}async prepare(){var e,t;if(await(null!==(e=null==I||null===(t=I.isReady)||void 0===t?void 0:t.call(I))&&void 0!==e?e:Promise.resolve()),this.scalarToken)return;const n=c.a.instance.getMessaging(this.mockWidget);n&&(this.messaging=n);try{if(h.a.isScalarUrl(this.mockWidget.templateUrl)){const e=p.a.sharedInstance();if(e.hasManager()){const t=e.getPrimaryManager();if(h.a.isScalarUrl(t.apiUrl)){const e=t.getScalarClient();this.scalarToken=await e.getScalarToken()}}}}catch(e){console.error("Error preparing widget communications: ",e)}}stop(e={forceDestroy:!1}){null!=e&&e.forceDestroy||f.a.getPersistentWidgetId()!==this.mockWidget.id?this.started&&(c.a.instance.stopMessaging(this.mockWidget),f.a.delRoomId(this.mockWidget.id),u.a.get()&&(u.a.get().off("event",this.onEvent),u.a.get().off("Event.decrypted",this.onEventDecrypted))):console.log("Skipping destroy - persistent widget")}feedEvent(e){if(!this.messaging)return;const t=e.getEffectiveEvent();this.messaging.feedEvent(t).catch(e=>{console.error("Error sending event to widget: ",e)})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(79),o=n.n(r),i=n(0),a=n(109);var s=n(82),c=n(644),l=n(87),u=n(721),d=n(884);const h={};var p=n(722),m=n(155),g=n(93),f=n(202),_=n(287),b=n(83),v=n(114);class y extends i.WidgetDriver{constructor(e,t,n,r){if(super(),this.forWidget=t,this.forWidgetKind=n,this.inRoomId=r,o()(this,"allowedCapabilities",void 0),this.allowedCapabilities=new Set([...e,i.MatrixCapabilities.Screenshots]),m.a.JITSI.matches(this.forWidget.type)&&n===i.WidgetKind.Room)this.allowedCapabilities.add(i.MatrixCapabilities.AlwaysOnScreen);else if(m.a.STICKERPICKER.matches(this.forWidget.type)&&n===i.WidgetKind.Account){const e=i.WidgetEventCapability.forRoomEvent(i.EventDirection.Send,g.a.Sticker).raw;this.allowedCapabilities.add(i.MatrixCapabilities.StickerSending),this.allowedCapabilities.add(e),this.allowedCapabilities.add("visibility")}}async validateCapabilities(e){const t=(n=e,r=this.allowedCapabilities,Object(a.a)(Array.from(n),Array.from(r)));var n,r;const o=new Set(t.removed),i=new Set(this.allowedCapabilities);if(Object(d.b)(this.forWidget).forEach(e=>{i.add(e),o.delete(e)}),h.preapproveCapabilities){const t=await h.preapproveCapabilities(this.forWidget,e);t&&t.forEach(e=>{i.add(e),o.delete(e)})}if(o.size>0)try{const[e]=await l.a.createTrackedDialog("Approve Widget Caps","",d.a,{requestedCapabilities:o,widget:this.forWidget,widgetKind:this.forWidgetKind}).finished;(e.approved||[]).forEach(e=>i.add(e))}catch(e){console.error("Non-fatal error getting capabilities: ",e)}return new Set(function(e,t){return Object(a.k)(Array.from(e),Array.from(t))}(i,e))}async sendEvent(e,t,n=null){const r=s.a.get(),o=c.a.activeRoomId;if(!r||!o)throw new Error("Not in a room or not attached to a client");let i=null;return null!==n?i=await r.sendStateEvent(o,e,t,n):(i=await r.sendEvent(o,e,t),e===g.a.RoomMessage&&f.CHAT_EFFECTS.forEach(e=>{Object(_.containsEmoji)(t,e.emojis)&&b.a.dispatch({action:"effects."+e.command})})),{roomId:o,eventId:i.event_id}}async readRoomEvents(e,t,n){n=n>0?Math.min(n,25):25;const r=s.a.get(),o=c.a.activeRoomId,i=r.getRoom(o);if(!r||!o||!i)throw new Error("Not in a room or not attached to a client");const a=[],l=i.getLiveTimeline().getEvents();for(let r=l.length-1;r>0&&!(a.length>=n);r--){const n=l[r];n.getType()!==e||n.isState()||e===g.a.RoomMessage&&t&&t!==n.getContent().msgtype||a.push(n)}return a.map(e=>e.getEffectiveEvent())}async readStateEvents(e,t,n){n=n>0?Math.min(n,100):100;const r=s.a.get(),o=c.a.activeRoomId,i=r.getRoom(o);if(!r||!o||!i)throw new Error("Not in a room or not attached to a client");const a=[],l=i.currentState.events.get(e);if(l)if(""===t||t){const e=l.get(t);e&&a.push(e)}else a.push(...Array.from(l.values()));return a.slice(0,n).map(e=>e.event)}async askOpenID(e){const t=p.b.instance.getOIDCState(this.forWidget,this.forWidgetKind,this.inRoomId),n=()=>s.a.get().getOpenIdToken();return t===p.a.Denied?e.update({state:i.OpenIDRequestState.Blocked}):t===p.a.Allowed?e.update({state:i.OpenIDRequestState.Allowed,token:await n()}):(e.update({state:i.OpenIDRequestState.PendingUserConfirmation}),void l.a.createTrackedDialog("OpenID widget permissions","",u.a,{widget:this.forWidget,widgetKind:this.forWidgetKind,inRoomId:this.inRoomId,onFinished:async t=>t?e.update({state:i.OpenIDRequestState.Allowed,token:await n()}):e.update({state:i.OpenIDRequestState.Blocked})}))}async navigate(e){const t=Object(v.l)(e);if(!t||t===e)throw new Error("Failed to transform URI");window.location.hash=t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(79),o=n.n(r);function i(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;++r)if(e[r]!==t[r])return r;return n}function a(e,t,n){const r=n-(t.length-e.length);return function(e,t){const n=Math.min(e.length,t.length),r=e.substr(0,n)===t.substr(0,n);if(r&&e.length>t.length)return{removed:e.substr(n),at:n};if(r&&e.length<t.length)return{added:t.substr(n),at:n};{const n=i(e,t);return{removed:e.substr(n),added:t.substr(n),at:n}}}(e.substr(0,r),t.substr(0,n))}var s=n(801);class c{constructor(e,t){this.index=e,this.offset=t}compare(e){return this.index===e.index?this.offset-e.offset:this.index-e.index}iteratePartsBetween(e,t,n){if(-1===this.index||-1===e.index)return;const[r,o]=this.compare(e)<0?[this,e]:[e,this];if(r.index===o.index)n(t.parts[this.index],r.offset,o.offset);else{const e=t.parts[r.index];n(e,r.offset,e.text.length);for(let e=r.index+1;e<o.index;++e){const r=t.parts[e];n(r,0,r.text.length)}n(t.parts[o.index],0,o.offset)}}forwardsWhile(e,t){if(-1===this.index)return this;let{index:n,offset:r}=this;const{parts:o}=e;for(;n<o.length;){const e=o[n];for(;r<e.text.length;){if(!t(n,r,e))return new c(n,r);r+=1}if(n===o.length-1)return new c(n,r);n+=1,r=0}}backwardsWhile(e,t){if(-1===this.index)return this;let{index:n,offset:r}=this;const o=e.parts;for(;n>=0;){const e=o[n];for(;r>0;){if(!t(n,r-1,e))return new c(n,r);r-=1}if(0===n)return new c(n,r);n-=1,r=o[n].text.length}}asOffset(e){if(-1===this.index)return new s.a(0,!0);let t=0;for(let n=0;n<this.index;++n)t+=e.parts[n].text.length;t+=this.offset;const n=e.parts[this.index],r=!n||t>=n.text.length;return new s.a(t,r)}isAtEnd(e){if(0===e.parts.length)return!0;const t=e.parts.length-1,n=e.parts[t];return this.index===t&&this.offset===n.text.length}isAtStart(){return 0===this.index&&0===this.offset}}var l=n(490);class u{constructor(e,t,n=null){this.updateCallback=n,o()(this,"_parts",void 0),o()(this,"_partCreator",void 0),o()(this,"activePartIdx",null),o()(this,"_autoComplete",null),o()(this,"autoCompletePartIdx",null),o()(this,"autoCompletePartCount",0),o()(this,"transformCallback",null),o()(this,"onAutoComplete",({replaceParts:e,close:t})=>{let n;if(e){this._parts.splice(this.autoCompletePartIdx,this.autoCompletePartCount,...e),this.autoCompletePartCount=e.length;const t=e[e.length-1],r=this.autoCompletePartIdx+e.length-1;n=new c(r,t.text.length)}t&&(this._autoComplete=null,this.autoCompletePartIdx=null,this.autoCompletePartCount=0),this.updateCallback(n)}),this._parts=e,this._partCreator=t,this.transformCallback=null}setTransformCallback(e){this.transformCallback=e}setUpdateCallback(e){this.updateCallback=e}get partCreator(){return this._partCreator}get isEmpty(){return 0===this._parts.reduce((e,t)=>e+t.text.length,0)}clone(){return new u(this._parts,this._partCreator,this.updateCallback)}insertPart(e,t){this._parts.splice(e,0,t),this.activePartIdx>=e&&++this.activePartIdx,this.autoCompletePartIdx>=e&&++this.autoCompletePartIdx}removePart(e){this._parts.splice(e,1),e===this.activePartIdx?this.activePartIdx=null:this.activePartIdx>e&&--this.activePartIdx,e===this.autoCompletePartIdx?this.autoCompletePartIdx=null:this.autoCompletePartIdx>e&&--this.autoCompletePartIdx}replacePart(e,t){this._parts.splice(e,1,t)}get parts(){return this._parts}get autoComplete(){return this.activePartIdx===this.autoCompletePartIdx?this._autoComplete:null}getPositionAtEnd(){if(this._parts.length){const e=this._parts.length-1,t=this._parts[e];return new c(e,t.text.length)}return new c(-1,0)}serializeParts(){return this._parts.map(e=>e.serialize())}diff(e,t,n){const r=this.parts.reduce((e,t)=>e+t.text,"");return"deleteByDrag"===t?function(e,t){if(e===t)return{};const n=i(e,t),r=e.length-t.length;return{at:n,removed:e.substr(n,r)}}(r,e):a(r,e,n.offset)}reset(e,t,n){this._parts=e.map(e=>this._partCreator.deserializePart(e)),t||(t=this.getPositionAtEnd()),this._autoComplete&&(this._autoComplete=null,this.autoCompletePartIdx=null),this.updateCallback(t,n)}insert(e,t){const n=this.splitAt(t);let r=0;for(let t=0;t<e.length;++t){const o=e[t];r+=o.text.length,this.insertPart(n+t,o)}return r}update(e,t,n){const r=this.diff(e,t,n),o=this.positionForOffset(r.at,n.atNodeEnd);let i=0;r.removed&&(i=this.removeText(o,r.removed.length));let a=0;r.added&&(a=this.addText(o,r.added,t)),this.mergeAdjacentParts();const s=r.at-i+a;let c=this.positionForOffset(s,!0);const l="insertFromPaste"!==t&&"insertFromDrop"!==t,u=this.setActivePart(c,l);if(this.transformCallback){const e=this.getTransformAddedLen(c,t,r);c=this.positionForOffset(s+e,!0)}return this.updateCallback(c,t,r),u}getTransformAddedLen(e,t,n){const r=this.transformCallback(e,t,n);return Number.isFinite(r)?r:0}setActivePart(e,t){const{index:n}=e,r=this._parts[n];if(r){if(n!==this.activePartIdx&&(this.activePartIdx=n,t&&this.activePartIdx!==this.autoCompletePartIdx)){const e=r.createAutoComplete(this.onAutoComplete);e&&(this._autoComplete=e,this.autoCompletePartIdx=n,this.autoCompletePartCount=1)}if(this.autoComplete)return this.autoComplete.onPartUpdate(r,e)}else this.activePartIdx=null,this._autoComplete=null,this.autoCompletePartIdx=null,this.autoCompletePartCount=0;return Promise.resolve()}mergeAdjacentParts(){let e;for(let t=0;t<this._parts.length;++t){let n=this._parts[t];const r=!n.text.length,o=!r&&e&&e.merge(n);(r||o)&&(n=e,this.removePart(t),--t),e=n}}removeText(e,t){let{index:n,offset:r}=e,o=0;for(;t>0;){let e=this._parts[n];const i=Math.min(t,e.text.length-r);if(i)if(e.canEdit){const t=e.remove(r,i);"string"==typeof t&&this.replacePart(n,this._partCreator.createDefaultPart(t)),e=this._parts[n],e.text.length?n+=1:this.removePart(n)}else o+=r,this.removePart(n);else n+=1;t-=i,r=0}return o}splitAt(e){if(-1===e.index)return 0;if(0===e.offset)return e.index;const t=this._parts[e.index];if(e.offset>=t.text.length)return e.index+1;const n=t.split(e.offset);return this.insertPart(e.index+1,n),e.index+1}addText(e,t,n){let{index:r}=e;const{offset:o}=e;let i=t.length;const a=this._parts[r];if(a)if(a.canEdit)if(a.validateAndInsert(o,t,n))t=null;else{const e=a.split(o);r+=1,this.insertPart(r,e)}else 0!==o&&(i+=a.text.length-o,r+=1);else r<0&&(r=0);for(;t;){const e=this._partCreator.createPartForInput(t,r,n);t=e.appendUntilRejected(t,n),this.insertPart(r,e),r+=1}return i}positionForOffset(e,t=!1){let n=0;const r=this._parts.findIndex(r=>{const o=r.text.length;return!!(t&&n+o>=e||!t&&n+o>e)||(n+=o,!1)});return-1===r?this.getPositionAtEnd():new c(r,e-n)}startRange(e,t=e){return new l.a(this,e,t)}replaceRange(e,t,n){const r=t.asOffset(this),o=this.splitAt(e);t=r.asPosition(this);for(let e=this.splitAt(t)-1;e>=o;--e)this.removePart(e);let i=o;for(const e of n)this.insertPart(i,e),i+=1;this.mergeAdjacentParts()}transform(e){const t=e();let n=null;return n=t instanceof l.a?Promise.resolve():this.setActivePart(t,!0),this.updateCallback(t),n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(88),c=n.n(s),l=n(80),u=n(148),d=n(142),h=n.n(d);class p extends a.a.Component{constructor(e){super(e),this.nodes={},this._updateChildren(this.props.children)}componentDidUpdate(){this._updateChildren(this.props.children)}_applyStyles(e,t){Object.entries(t).forEach(([t,n])=>{e.style[t]=n})}_updateChildren(e){const t=this.children||{};this.children={},a.a.Children.toArray(e).forEach(e=>{if(t[e.key]){const n=t[e.key],r=h.a.findDOMNode(this.nodes[n.key]);r&&r.style.left!==e.props.style.left&&this._applyStyles(r,{left:e.props.style.left}),this.children[e.key]=a.a.cloneElement(n,e.props,e.props.children)}else{const t={},n=e.props.style,r=this.props.startStyles;if(r.length>0){const e=r[0];t.style=e}t.ref=t=>this._collectNode(e.key,t,n),this.children[e.key]=a.a.cloneElement(e,t)}})}_collectNode(e,t,n){if(t&&void 0===this.nodes[e]&&this.props.startStyles.length>0){const e=this.props.startStyles,r=h.a.findDOMNode(t);for(let t=1;t<e.length;++t)this._applyStyles(r,e[t]);setTimeout(()=>{this._applyStyles(r,n)},0)}this.nodes[e]=t}render(){return a.a.createElement(a.a.Fragment,null,Object.values(this.children))}}o()(p,"propTypes",{children:c.a.any,transition:c.a.object,startStyles:c.a.array}),o()(p,"defaultProps",{startStyles:[]});var m,g,f,_=n(89),b=n(332),v=n(81);let y=Object(v.a)("views.rooms.ReadReceiptMarker")((f=g=class extends a.a.PureComponent{constructor(e){super(e),this._avatar=Object(i.createRef)(),this.state={suppressDisplay:!this.props.suppressAnimation}}componentWillUnmount(){const e=this.props.readReceiptInfo;if(!e)return;if(this.props.checkUnmounting&&this.props.checkUnmounting())return;const t=this._avatar.current;e.top=t.offsetTop,e.left=t.offsetLeft,e.parent=t.offsetParent}componentDidMount(){this.state.suppressDisplay&&this._animateMarker()}componentDidUpdate(e){const t=e.leftOffset!==this.props.leftOffset,n=e.hidden!==this.props.hidden;(t||n)&&this._animateMarker()}_animateMarker(){let e=-15;const t=this.props.readReceiptInfo;t&&t.parent&&(e=t.top+t.parent.getBoundingClientRect().top);const n=this._avatar.current;let r;n.offsetParent?r=e-n.offsetParent.getBoundingClientRect().top:(console.warn(`ReadReceiptMarker for ${this.props.fallbackUserId} in has no offsetParent`),r=0);const o=[];t&&t.left&&o.push({top:r+"px",left:Object(b.a)(t.left)}),o.push({top:r+"px",left:"0"}),this.setState({suppressDisplay:!1,startStyles:o})}render(){const e=_.getComponent("avatars.MemberAvatar");if(this.state.suppressDisplay)return a.a.createElement("div",{ref:this._avatar});const t={left:Object(b.a)(this.props.leftOffset),top:"0px"};let n;if(this.props.timestamp){const e=Object(u.b)(new Date(this.props.timestamp),this.props.showTwelveHour);n=this.props.member&&this.props.fallbackUserId!==this.props.member.rawDisplayName?Object(l.a)("Seen by %(displayName)s (%(userName)s) at %(dateTime)s",{displayName:this.props.member.rawDisplayName,userName:this.props.fallbackUserId,dateTime:e}):Object(l.a)("Seen by %(userName)s at %(dateTime)s",{userName:this.props.fallbackUserId,dateTime:e})}return a.a.createElement(p,{startStyles:this.state.startStyles},a.a.createElement(e,{member:this.props.member,fallbackUserId:this.props.fallbackUserId,"aria-hidden":"true",width:14,height:14,resizeMethod:"crop",style:t,title:n,onClick:this.props.onClick,inputRef:this._avatar}))}},o()(g,"propTypes",{member:c.a.object,fallbackUserId:c.a.string.isRequired,leftOffset:c.a.number,hidden:c.a.bool,suppressAnimation:c.a.bool,readReceiptInfo:c.a.object,checkUnmounting:c.a.func,onClick:c.a.func,timestamp:c.a.number,showTwelveHour:c.a.bool}),o()(g,"defaultProps",{leftOffset:0}),m=f))||m},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(136),c=n(165),l=n(80),u=n(82),d=n(81);var h,p={};let m=Object(d.a)("views.room_settings.RoomPublishSetting")(h=class extends a.a.PureComponent{constructor(e,t){super(e,t),o()(this,"onRoomPublishChange",e=>{const t=this.state.isRoomPublished,n=!t;this.setState({isRoomPublished:n});u.a.get().setRoomDirectoryVisibility(this.props.roomId,n?s.f.Public:s.f.Private).catch(()=>{this.setState({isRoomPublished:t})})}),this.state={isRoomPublished:!1}}componentDidMount(){u.a.get().getRoomDirectoryVisibility(this.props.roomId).then(e=>{this.setState({isRoomPublished:"public"===e.visibility})})}render(){var e;const t=u.a.get(),n=!1===(null===(e=p.requireCanonicalAliasAccessToPublish)||void 0===e?void 0:e.call(p))||this.props.canSetCanonicalAlias;return a.a.createElement(c.a,{value:this.state.isRoomPublished,onChange:this.onRoomPublishChange,disabled:!n,label:Object(l.a)("Publish this room to the public in %(domain)s's room directory?",{domain:t.getDomain()})})}})||h},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(173),c=n(439);class l{static fetchJoinedGroups(e){return Object(c.a)("GroupActions.fetchJoinedGroups",()=>e.getJoinedGroups(),null)}}var u,d,h,p=n(89),m=n(83),g=n(80),f=n(86),_=n.n(f),b=n(94),v=n(117),y=n(84),E=n(704),S=n(81);let w=Object(S.a)("structures.GroupFilterPanel")((h=d=class extends a.a.Component{constructor(...e){super(...e),o()(this,"state",{orderedTags:[],selectedTags:[]}),o()(this,"_onGroupMyMembership",()=>{this.unmounted||m.a.dispatch(l.fetchJoinedGroups(this.context))}),o()(this,"_onClientSync",(e,t)=>{"ERROR"!==e&&t!==e&&m.a.dispatch(l.fetchJoinedGroups(this.context))}),o()(this,"onClick",e=>{this.state.selectedTags.length>0&&m.a.dispatch({action:"deselect_tags"})}),o()(this,"onClearFilterClick",e=>{m.a.dispatch({action:"deselect_tags"})})}componentDidMount(){this.unmounted=!1,this.context.on("Group.myMembership",this._onGroupMyMembership),this.context.on("sync",this._onClientSync),this._groupFilterOrderStoreToken=s.a.addListener(()=>{this.unmounted||this.setState({orderedTags:s.a.getOrderedTags()||[],selectedTags:s.a.getSelectedTags()})}),m.a.dispatch(l.fetchJoinedGroups(this.context))}componentWillUnmount(){this.unmounted=!0,this.context.removeListener("Group.myMembership",this._onGroupMyMembership),this.context.removeListener("sync",this._onClientSync),this._groupFilterOrderStoreToken&&this._groupFilterOrderStoreToken.remove()}renderGlobalIcon(){return y.b.getValue("feature_communities_v2_prototypes")?a.a.createElement("div",null,a.a.createElement(E.a,null),a.a.createElement("hr",{className:"mx_GroupFilterPanel_divider"})):null}render(){const e=p.getComponent("elements.DNDTagTile"),t=p.getComponent("elements.ActionButton"),n=this.state.orderedTags.map((t,n)=>a.a.createElement(e,{key:t,tag:t,index:n,selected:this.state.selectedTags.includes(t)})),r=this.state.selectedTags.length>0,o=_()("mx_GroupFilterPanel",{mx_GroupFilterPanel_items_selected:r});let i;y.b.getBetaInfo("feature_spaces")&&!localStorage.getItem("mx_seenSpacesBeta")&&(i=a.a.createElement("div",{className:"mx_BetaDot"}));let s=a.a.createElement(t,{tooltip:!0,label:Object(g.a)("Communities"),action:"toggle_my_groups",className:"mx_TagTile mx_TagTile_plus"},i);return y.b.getValue("feature_communities_v2_prototypes")&&(s=a.a.createElement(t,{tooltip:!0,label:Object(g.a)("Create community"),action:"view_create_group",className:"mx_TagTile mx_TagTile_plus"})),a.a.createElement("div",{className:o,onClick:this.onClearFilterClick},a.a.createElement(v.a,{className:"mx_GroupFilterPanel_scroller",onClick:this.onClick},a.a.createElement("div",{className:"mx_GroupFilterPanel_tagTileContainer"},this.renderGlobalIcon(),n,a.a.createElement("div",null,s))))}},o()(d,"contextType",b.a),u=h))||u;t.a=w},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return y}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(95),c=n(80),l=n(0),u=n(129),d=n(137),h=n(116),p=n(165),m=n(93),g=n(723);class f{static bylineFor(e){return e.isState?e.keyStr?Object(c.a)("with state key %(stateKey)s",{stateKey:e.keyStr}):Object(c.a)("with an empty state key"):null}static for(e,t){if(f.simpleCaps[e]){const n=f.simpleCaps[e];if(n[t])return{primary:Object(c.a)(n[t])};if(n.generic)return{primary:Object(c.a)(n.generic)}}const[n]=l.WidgetEventCapability.findEventCapabilities([e]);if(n){if(!n.isState&&n.eventType===m.a.RoomMessage)return f.forRoomMessageCap(n,t);const e=n.isState?f.stateSendRecvCaps:f.nonStateSendRecvCaps;if(e[n.eventType]){const r=e[n.eventType],o=r[t]||r.generic;if(o&&o[n.direction])return{primary:Object(c.a)(o[n.direction])}}return t===l.WidgetKind.Room?n.direction===l.EventDirection.Send?{primary:Object(c.a)("Send <b>%(eventType)s</b> events as you in this room",{eventType:n.eventType},{b:e=>a.a.createElement("b",null,e)}),byline:f.bylineFor(n)}:{primary:Object(c.a)("See <b>%(eventType)s</b> events posted to this room",{eventType:n.eventType},{b:e=>a.a.createElement("b",null,e)}),byline:f.bylineFor(n)}:n.direction===l.EventDirection.Send?{primary:Object(c.a)("Send <b>%(eventType)s</b> events as you in your active room",{eventType:n.eventType},{b:e=>a.a.createElement("b",null,e)}),byline:f.bylineFor(n)}:{primary:Object(c.a)("See <b>%(eventType)s</b> events posted to your active room",{eventType:n.eventType},{b:e=>a.a.createElement("b",null,e)}),byline:f.bylineFor(n)}}return{primary:Object(c.a)("The <b>%(capability)s</b> capability",{capability:e},{b:e=>a.a.createElement("b",null,e)})}}static forRoomMessageCap(e,t){if(!e.keyStr)return e.direction===l.EventDirection.Send?{primary:t===l.WidgetKind.Room?Object(c.a)("Send messages as you in this room"):Object(c.a)("Send messages as you in your active room")}:{primary:t===l.WidgetKind.Room?Object(c.a)("See messages posted to this room"):Object(c.a)("See messages posted to your active room")};switch(e.keyStr){case m.b.Text:return e.direction===l.EventDirection.Send?{primary:t===l.WidgetKind.Room?Object(c.a)("Send text messages as you in this room"):Object(c.a)("Send text messages as you in your active room")}:{primary:t===l.WidgetKind.Room?Object(c.a)("See text messages posted to this room"):Object(c.a)("See text messages posted to your active room")};case m.b.Emote:return e.direction===l.EventDirection.Send?{primary:t===l.WidgetKind.Room?Object(c.a)("Send emotes as you in this room"):Object(c.a)("Send emotes as you in your active room")}:{primary:t===l.WidgetKind.Room?Object(c.a)("See emotes posted to this room"):Object(c.a)("See emotes posted to your active room")};case m.b.Image:return e.direction===l.EventDirection.Send?{primary:t===l.WidgetKind.Room?Object(c.a)("Send images as you in this room"):Object(c.a)("Send images as you in your active room")}:{primary:t===l.WidgetKind.Room?Object(c.a)("See images posted to this room"):Object(c.a)("See images posted to your active room")};case m.b.Video:return e.direction===l.EventDirection.Send?{primary:t===l.WidgetKind.Room?Object(c.a)("Send videos as you in this room"):Object(c.a)("Send videos as you in your active room")}:{primary:t===l.WidgetKind.Room?Object(c.a)("See videos posted to this room"):Object(c.a)("See videos posted to your active room")};case m.b.File:return e.direction===l.EventDirection.Send?{primary:t===l.WidgetKind.Room?Object(c.a)("Send general files as you in this room"):Object(c.a)("Send general files as you in your active room")}:{primary:t===l.WidgetKind.Room?Object(c.a)("See general files posted to this room"):Object(c.a)("See general files posted to your active room")};default:{let n;return n=e.direction===l.EventDirection.Send?t===l.WidgetKind.Room?Object(c.a)("Send <b>%(msgtype)s</b> messages as you in this room",{msgtype:e.keyStr},{b:e=>a.a.createElement("b",null,e)}):Object(c.a)("Send <b>%(msgtype)s</b> messages as you in your active room",{msgtype:e.keyStr},{b:e=>a.a.createElement("b",null,e)}):t===l.WidgetKind.Room?Object(c.a)("See <b>%(msgtype)s</b> messages posted to this room",{msgtype:e.keyStr},{b:e=>a.a.createElement("b",null,e)}):Object(c.a)("See <b>%(msgtype)s</b> messages posted to your active room",{msgtype:e.keyStr},{b:e=>a.a.createElement("b",null,e)}),{primary:n}}}}}o()(f,"simpleCaps",{[l.MatrixCapabilities.AlwaysOnScreen]:{[l.WidgetKind.Room]:Object(c.b)("Remain on your screen when viewing another room, when running"),generic:Object(c.b)("Remain on your screen while running")},[l.MatrixCapabilities.StickerSending]:{[l.WidgetKind.Room]:Object(c.b)("Send stickers into this room"),generic:Object(c.b)("Send stickers into your active room")},[g.a.CanChangeViewedRoom]:{generic:Object(c.b)("Change which room you're viewing")},[l.MatrixCapabilities.MSC2931Navigate]:{generic:Object(c.b)("Change which room, message, or user you're viewing")}}),o()(f,"stateSendRecvCaps",{[m.a.RoomTopic]:{[l.WidgetKind.Room]:{[l.EventDirection.Send]:Object(c.b)("Change the topic of this room"),[l.EventDirection.Receive]:Object(c.b)("See when the topic changes in this room")},generic:{[l.EventDirection.Send]:Object(c.b)("Change the topic of your active room"),[l.EventDirection.Receive]:Object(c.b)("See when the topic changes in your active room")}},[m.a.RoomName]:{[l.WidgetKind.Room]:{[l.EventDirection.Send]:Object(c.b)("Change the name of this room"),[l.EventDirection.Receive]:Object(c.b)("See when the name changes in this room")},generic:{[l.EventDirection.Send]:Object(c.b)("Change the name of your active room"),[l.EventDirection.Receive]:Object(c.b)("See when the name changes in your active room")}},[m.a.RoomAvatar]:{[l.WidgetKind.Room]:{[l.EventDirection.Send]:Object(c.b)("Change the avatar of this room"),[l.EventDirection.Receive]:Object(c.b)("See when the avatar changes in this room")},generic:{[l.EventDirection.Send]:Object(c.b)("Change the avatar of your active room"),[l.EventDirection.Receive]:Object(c.b)("See when the avatar changes in your active room")}},[m.a.RoomMember]:{[l.WidgetKind.Room]:{[l.EventDirection.Send]:Object(c.b)("Kick, ban, or invite people to this room, and make you leave"),[l.EventDirection.Receive]:Object(c.b)("See when people join, leave, or are invited to this room")},generic:{[l.EventDirection.Send]:Object(c.b)("Kick, ban, or invite people to your active room, and make you leave"),[l.EventDirection.Receive]:Object(c.b)("See when people join, leave, or are invited to your active room")}}}),o()(f,"nonStateSendRecvCaps",{[m.a.Sticker]:{[l.WidgetKind.Room]:{[l.EventDirection.Send]:Object(c.b)("Send stickers to this room as you"),[l.EventDirection.Receive]:Object(c.b)("See when a sticker is posted in this room")},generic:{[l.EventDirection.Send]:Object(c.b)("Send stickers to your active room as you"),[l.EventDirection.Receive]:Object(c.b)("See when anyone posts a sticker to your active room")}}});var _,b=n(81);function v(e){return JSON.parse(localStorage.getItem(`widget_${e.id}_approved_caps`)||"[]")}let y=Object(b.a)("views.dialogs.WidgetCapabilitiesPromptDialog")(_=class extends a.a.PureComponent{constructor(e){super(e),o()(this,"eventPermissionsMap",new Map),o()(this,"onToggle",e=>{const t=Object(u.f)(this.state.booleanStates);t[e]=!t[e],this.setState({booleanStates:t})}),o()(this,"onRememberSelectionChange",e=>{this.setState({rememberSelection:e})}),o()(this,"onSubmit",async e=>{this.closeAndTryRemember(Object.entries(this.state.booleanStates).filter(([e,t])=>t).map(([e])=>e))}),o()(this,"onReject",async e=>{this.closeAndTryRemember([])});l.WidgetEventCapability.findEventCapabilities(this.props.requestedCapabilities).forEach(e=>this.eventPermissionsMap.set(e.raw,e));const t={};this.props.requestedCapabilities.forEach(e=>t[e]=!0),this.state={booleanStates:t,rememberSelection:!0}}closeAndTryRemember(e){var t,n;this.state.rememberSelection&&(t=this.props.widget,n=e,localStorage.setItem(`widget_${t.id}_approved_caps`,JSON.stringify(n))),this.props.onFinished({approved:e})}render(){const e=Object.entries(this.state.booleanStates).map(([e,t],n)=>{const r=f.for(e,this.props.widgetKind),o=r.byline?a.a.createElement("span",{className:"mx_WidgetCapabilitiesPromptDialog_byline"},r.byline):null;return a.a.createElement("div",{className:"mx_WidgetCapabilitiesPromptDialog_cap",key:e+n},a.a.createElement(d.a,{checked:t,onChange:()=>this.onToggle(e)},r.primary),o)});return a.a.createElement(s.a,{className:"mx_WidgetCapabilitiesPromptDialog",onFinished:this.props.onFinished,title:Object(c.a)("Approve widget permissions")},a.a.createElement("form",{onSubmit:this.onSubmit},a.a.createElement("div",{className:"mx_Dialog_content"},a.a.createElement("div",{className:"text-muted"},Object(c.a)("This widget would like to:")),e,a.a.createElement(h.a,{primaryButton:Object(c.a)("Approve"),cancelButton:Object(c.a)("Decline All"),onPrimaryButtonClick:this.onSubmit,onCancel:this.onReject,additive:a.a.createElement(p.a,{value:this.state.rememberSelection,toggleInFront:!0,onChange:this.onRememberSelectionChange,label:Object(c.a)("Remember my selection for this widget")})}))))}})||_},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(143),c=n(107);function l(e,t,n){return(1-(n=Object(c.clamp)(n,0,1)))*e+n*t}var u,d=n(281),h=n(81);const p=58,m=58,g=76,f=8;let _=Object(h.a)("views.voip.PictureInPictureDragger")(u=class extends a.a.Component{constructor(e){super(e),o()(this,"callViewWrapper",Object(i.createRef)()),o()(this,"initX",0),o()(this,"initY",0),o()(this,"desiredTranslationX",s.b.instance.windowWidth-f-336),o()(this,"desiredTranslationY",s.b.instance.windowHeight-m-232),o()(this,"moving",!1),o()(this,"scheduledUpdate",new d.a(()=>this.animationCallback(),()=>requestAnimationFrame(()=>this.scheduledUpdate.trigger()))),o()(this,"animationCallback",()=>{if(!this.moving&&Math.abs(this.state.translationX-this.desiredTranslationX)<=1&&Math.abs(this.state.translationY-this.desiredTranslationY)<=1)return;const e=this.moving?.2:.1;this.setState({translationX:l(this.state.translationX,this.desiredTranslationX,e),translationY:l(this.state.translationY,this.desiredTranslationY,e)}),this.scheduledUpdate.mark()}),o()(this,"onResize",()=>{this.snap(!1)}),o()(this,"snap",(e=!1)=>{var t,n;const r=this.desiredTranslationX,o=this.desiredTranslationY,i=s.b.instance.windowWidth-((null===(t=this.callViewWrapper.current)||void 0===t?void 0:t.clientWidth)||336),a=s.b.instance.windowHeight-((null===(n=this.callViewWrapper.current)||void 0===n?void 0:n.clientHeight)||232);r>=i/2&&o>=a/2?(this.desiredTranslationX=i-f,this.desiredTranslationY=a-m):r>=i/2&&o<=a/2?(this.desiredTranslationX=i-f,this.desiredTranslationY=p):r<=i/2&&o>=a/2?(this.desiredTranslationX=g,this.desiredTranslationY=a-m):(this.desiredTranslationX=g,this.desiredTranslationY=p),this.scheduledUpdate.mark(),e?this.scheduledUpdate.mark():this.setState({translationX:this.desiredTranslationX,translationY:this.desiredTranslationY})}),o()(this,"onStartMoving",e=>{e.preventDefault(),e.stopPropagation(),this.moving=!0,this.initX=e.pageX-this.desiredTranslationX,this.initY=e.pageY-this.desiredTranslationY,this.scheduledUpdate.mark()}),o()(this,"onMoving",e=>{this.moving&&(e.preventDefault(),e.stopPropagation(),this.setTranslation(e.pageX-this.initX,e.pageY-this.initY))}),o()(this,"onEndMoving",()=>{this.moving=!1,this.snap(!0)}),this.state={translationX:s.b.instance.windowWidth-f-336,translationY:s.b.instance.windowHeight-m-232}}componentDidMount(){document.addEventListener("mousemove",this.onMoving),document.addEventListener("mouseup",this.onEndMoving),window.addEventListener("resize",this.onResize)}componentWillUnmount(){document.removeEventListener("mousemove",this.onMoving),document.removeEventListener("mouseup",this.onEndMoving),window.removeEventListener("resize",this.onResize)}setTranslation(e,t){var n,r;const o=(null===(n=this.callViewWrapper.current)||void 0===n?void 0:n.clientWidth)||336,i=(null===(r=this.callViewWrapper.current)||void 0===r?void 0:r.clientHeight)||232;e+o>=s.b.instance.windowWidth?this.desiredTranslationX=s.b.instance.windowWidth-o:this.desiredTranslationX=e<=0?0:e,t+i>=s.b.instance.windowHeight?this.desiredTranslationY=s.b.instance.windowHeight-i:this.desiredTranslationY=t<=0?0:t}render(){const e={transform:`translateX(${this.state.translationX+"px"})\n translateY(${this.state.translationY+"px"})`};return a.a.createElement("div",{className:this.props.className,style:this.props.draggable?e:void 0,ref:this.callViewWrapper},a.a.createElement(a.a.Fragment,null,this.props.children({onStartMoving:this.onStartMoving,onResize:this.onResize})))}})||u},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(85),c=n(87),l=n(345),u=n(110),d=n(90),h=n(86),p=n.n(h),m=n(80),g=n(82),f=n(467),_=n(208);let b;!function(e){e.CloseDialog="close_dialog",e.HostSignupAccountDetails="host_signup_account_details",e.HostSignupAccountDetailsRequest="host_signup_account_details_request",e.Minimize="host_signup_minimize",e.Maximize="host_signup_maximize",e.SetupComplete="setup_complete"}(b||(b={}));var v,y=n(81);let E=Object(y.a)("views.dialogs.HostSignupDialog")(v=class extends a.a.PureComponent{constructor(e){super(e),o()(this,"iframeRef",a.a.createRef()),o()(this,"config",void 0),o()(this,"messageHandler",async e=>{if(this.config.url.startsWith(e.origin))switch(e.data.action){case b.HostSignupAccountDetailsRequest:this.onAccountDetailsRequest();break;case b.Maximize:this.setState({minimized:!1});break;case b.Minimize:this.setState({minimized:!0});break;case b.SetupComplete:this.setState({completed:!0});break;case b.CloseDialog:return this.closeDialog()}}),o()(this,"maximizeDialog",()=>{this.setState({minimized:!1}),this.sendMessage({action:b.Maximize})}),o()(this,"minimizeDialog",()=>{this.setState({minimized:!0}),this.sendMessage({action:b.Minimize})}),o()(this,"closeDialog",async()=>(window.removeEventListener("message",this.messageHandler),l.a.destroyElement("host_signup"),f.a.instance.setHostSignupActive(!1))),o()(this,"onCloseClick",async()=>{if(this.state.completed)return this.closeDialog();c.a.createDialog(u.a,{title:Object(m.a)("Confirm abort of host creation"),description:Object(m.a)("Are you sure you wish to abort creation of the host? The process cannot be continued."),button:Object(m.a)("Abort"),onFinished:e=>{if(e)return this.closeDialog()}})}),o()(this,"sendMessage",e=>{this.iframeRef.current.contentWindow.postMessage(e,this.config.url)}),o()(this,"onAccountDetailsDialogFinished",async e=>e?this.sendAccountDetails():this.closeDialog()),o()(this,"onAccountDetailsRequest",()=>{const e=a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,Object(m.a)("Continuing temporarily allows the %(hostSignupBrand)s setup process to access your account to fetch verified email addresses. This data is not stored.",{hostSignupBrand:this.config.brand})),a.a.createElement("p",null,Object(m.a)("Learn more in our <privacyPolicyLink />, <termsOfServiceLink /> and <cookiePolicyLink />.",{},{cookiePolicyLink:()=>a.a.createElement("a",{href:this.config.cookiePolicyUrl,target:"_blank",rel:"noreferrer noopener"},Object(m.a)("Cookie Policy")),privacyPolicyLink:()=>a.a.createElement("a",{href:this.config.privacyPolicyUrl,target:"_blank",rel:"noreferrer noopener"},Object(m.a)("Privacy Policy")),termsOfServiceLink:()=>a.a.createElement("a",{href:this.config.termsOfServiceUrl,target:"_blank",rel:"noreferrer noopener"},Object(m.a)("Terms of Service"))})));c.a.createDialog(u.a,{title:Object(m.a)("You should know"),description:e,button:Object(m.a)("Continue"),onFinished:this.onAccountDetailsDialogFinished})}),this.state={completed:!1,error:null,minimized:!1},this.config=d.a.get().hostSignup}async sendAccountDetails(){const e=await g.a.get().getOpenIdToken();if(!e||!e.access_token)return console.warn("Failed to connect to homeserver for OpenID token."),void this.setState({completed:!0,error:Object(m.a)("Failed to connect to your homeserver. Please close this dialog and try again.")});this.sendMessage({action:b.HostSignupAccountDetails,account:{accessToken:await g.a.get().getAccessToken(),name:_.a.instance.displayName,openIdToken:e.access_token,serverName:await g.a.get().getDomain(),userLocalpart:await g.a.get().getUserIdLocalpart(),termsAccepted:!0}})}componentDidMount(){window.addEventListener("message",this.messageHandler)}componentWillUnmount(){if(f.a.instance.isHostSignupActive)return this.closeDialog()}render(){return a.a.createElement("div",{className:"mx_HostSignup_persisted"},a.a.createElement(l.a,{key:"host_signup",persistKey:"host_signup"},a.a.createElement("div",{className:p()({mx_Dialog_wrapper:!this.state.minimized})},a.a.createElement("div",{className:p()("mx_Dialog",{mx_HostSignupDialog_minimized:this.state.minimized,mx_HostSignupDialog:!this.state.minimized})},this.state.minimized&&a.a.createElement("div",{className:"mx_Dialog_header mx_Dialog_headerWithButton"},a.a.createElement("div",{className:"mx_Dialog_title"},Object(m.a)("%(hostSignupBrand)s Setup",{hostSignupBrand:this.config.brand})),a.a.createElement(s.a,{className:"mx_HostSignup_maximize_button",onClick:this.maximizeDialog,"aria-label":Object(m.a)("Maximize dialog"),title:Object(m.a)("Maximize dialog")})),!this.state.minimized&&a.a.createElement("div",{className:"mx_Dialog_header mx_Dialog_headerWithCancel"},a.a.createElement(s.a,{onClick:this.minimizeDialog,className:"mx_HostSignup_minimize_button","aria-label":Object(m.a)("Minimize dialog"),title:Object(m.a)("Minimize dialog")}),a.a.createElement(s.a,{onClick:this.onCloseClick,className:"mx_Dialog_cancelButton","aria-label":Object(m.a)("Close dialog"),title:Object(m.a)("Close dialog")})),this.state.error&&a.a.createElement("div",null,this.state.error),!this.state.error&&a.a.createElement("iframe",{src:this.config.url,ref:this.iframeRef,sandbox:"allow-forms allow-scripts allow-same-origin allow-popups"})))))}})||v},function(e,t,n){"use strict";n.d(t,"a",(function(){return R})),n.d(t,"b",(function(){return D}));var r=n(79),o=n.n(r),i=n(92),a=n.n(i),s=n(99),c=n.n(s),l=n(78),u=n.n(l),d=n(86),h=n.n(d),p=n(119),m=n(102);const g=(e,t)=>{let n="";if(t)for(const e of t.entries())n+=e+"/";return"mx_space_collapsed_"+(n+e)};class f{static get instance(){return f.internalInstance||(f.internalInstance=new f),f.internalInstance}setSpaceCollapsedState(e,t,n){localStorage.setItem(g(e,t),n.toString())}getSpaceCollapsedState(e,t,n){const r=localStorage.getItem(g(e,t));return r?"true"===r:n}}o()(f,"internalInstance",void 0);var _=n(175),b=n(435),v=n(80),y=n(261),E=n(103),S=n(94),w=n(85),C=n(218),T=n(183),x=n(179),k=n(737);const F=["space","className","selected","onClick","label","contextMenuTooltip","notificationState","avatarSize","isNarrow","children","ContextMenuComponent"],O=["space","activeSpaces","isNested","isPanelCollapsed","onExpand","parents","innerRef"],R=e=>{let{space:t,className:n,selected:r,onClick:o,label:i,contextMenuTooltip:s,notificationState:l,avatarSize:d,isNarrow:g,children:f,ContextMenuComponent:v}=e,S=c()(e,F);const[w,C,T,x]=Object(E.q)();let k,O,R=u.a.createElement("div",{className:"mx_SpaceButton_avatarPlaceholder"},u.a.createElement("div",{className:"mx_SpaceButton_icon"}));var D;(t&&(R=u.a.createElement(p.a,{width:d,height:d,room:t})),l&&(k=u.a.createElement("div",{className:"mx_SpacePanel_badgeContainer"},u.a.createElement(_.a,{onClick:()=>m.g.instance.setActiveRoomInSpace(t||null),forceCount:!1,notification:l}))),w&&v)&&(O=u.a.createElement(v,a()({},Object(E.p)(null===(D=C.current)||void 0===D?void 0:D.getBoundingClientRect(),0),{space:t,onFinished:x})));return u.a.createElement(b.a,a()({},S,{className:h()("mx_SpaceButton",n,{mx_SpaceButton_active:r,mx_SpaceButton_hasMenuOpen:w,mx_SpaceButton_narrow:g}),title:i,onClick:o,onContextMenu:T,forceHide:!g||w,role:"treeitem",inputRef:C}),f,u.a.createElement("div",{className:"mx_SpaceButton_selectionWrapper"},R,!g&&u.a.createElement("span",{className:"mx_SpaceButton_name"},i),k,v&&u.a.createElement(y.a,{className:"mx_SpaceButton_menuButton",onClick:T,title:s,isExpanded:w}),O))};class D extends u.a.PureComponent{constructor(e){super(e),o()(this,"buttonRef",Object(l.createRef)()),o()(this,"onSpaceUpdate",()=>{this.setState({childSpaces:this.childSpaces})}),o()(this,"toggleCollapse",e=>{this.props.onExpand&&this.isCollapsed&&this.props.onExpand();const t=!this.isCollapsed;f.instance.setSpaceCollapsedState(this.props.space.roomId,this.props.parents,t),this.setState({collapsed:t}),e.stopPropagation()}),o()(this,"onKeyDown",e=>{var t;let n=!0;const r=Object(x.f)().getRoomListAction(e),o=null===(t=this.state.childSpaces)||void 0===t?void 0:t.length;switch(r){case x.e.CollapseSection:if(o&&!this.isCollapsed)this.toggleCollapse(e);else{var i,a,s;const e=null===(i=this.buttonRef)||void 0===i||null===(a=i.current)||void 0===a||null===(s=a.parentElement)||void 0===s?void 0:s.parentElement,t=null==e?void 0:e.previousElementSibling;null==t||t.focus()}break;case x.e.ExpandSection:if(o)if(this.isCollapsed)this.toggleCollapse(e);else{var c,l,u;const e=null===(c=this.buttonRef)||void 0===c||null===(l=c.current)||void 0===l?void 0:l.nextElementSibling,t=null==e?void 0:e.querySelector(".mx_SpaceItem");null==t||null===(u=t.querySelector(".mx_SpaceButton"))||void 0===u||u.focus()}break;default:n=!1}n&&(e.stopPropagation(),e.preventDefault())}),o()(this,"onClick",e=>{e.preventDefault(),e.stopPropagation(),m.g.instance.setActiveSpace(this.props.space)});const t=f.instance.getSpaceCollapsedState(e.space.roomId,this.props.parents,!e.isNested);this.state={collapsed:t,childSpaces:this.childSpaces},m.g.instance.on(this.props.space.roomId,this.onSpaceUpdate)}componentWillUnmount(){m.g.instance.off(this.props.space.roomId,this.onSpaceUpdate)}get childSpaces(){return m.g.instance.getChildSpaces(this.props.space.roomId).filter(e=>{var t;return!(null!==(t=this.props.parents)&&void 0!==t&&t.has(e.roomId))})}get isCollapsed(){return this.state.collapsed||this.props.isPanelCollapsed}render(){var e,t,n;const r=this.props,{space:o,activeSpaces:i,isNested:s,isPanelCollapsed:l,onExpand:d,parents:p,innerRef:g}=r,f=c()(r,O),_=this.isCollapsed,b=h()(this.props.className,{mx_SpaceItem:!0,mx_SpaceItem_narrow:l,collapsed:_,hasSubSpaces:null===(e=this.state.childSpaces)||void 0===e?void 0:e.length}),y="invite"===o.getMyMembership(),E=y?C.a.forSymbol("!",T.a.Red):m.g.instance.getNotificationState(o.roomId);let S;null!==(t=this.state.childSpaces)&&void 0!==t&&t.length&&!_&&(S=u.a.createElement(I,{spaces:this.state.childSpaces,activeSpaces:i,isNested:!0,parents:new Set(p).add(o.roomId)}));const x=null!==(n=this.state.childSpaces)&&void 0!==n&&n.length?u.a.createElement(w.a,{className:"mx_SpaceButton_toggleCollapse",onClick:this.toggleCollapse,tabIndex:-1,"aria-label":_?Object(v.a)("Expand"):Object(v.a)("Collapse")}):null;return u.a.createElement("li",a()({},f,{className:b,ref:g}),u.a.createElement(R,{space:o,className:y?"mx_SpaceButton_invite":void 0,selected:i.includes(o),label:o.name,contextMenuTooltip:Object(v.a)("Space options"),notificationState:E,isNarrow:l,avatarSize:s?24:32,onClick:this.onClick,onKeyDown:this.onKeyDown,"aria-expanded":!_,ContextMenuComponent:"join"===this.props.space.getMyMembership()?k.a:void 0},x),S)}}o()(D,"contextType",S.a);const I=({spaces:e,activeSpaces:t,isNested:n,parents:r})=>u.a.createElement("ul",{className:"mx_SpaceTreeLevel"},e.map(e=>u.a.createElement(D,{key:e.roomId,activeSpaces:t,space:e,isNested:n,parents:r})));t.c=I},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(82),c=n(80);function l(e,t=[]){const n=[],r=Object.keys(e.currentState.members);for(let o=0;o<r.length;++o){const i=r[o];e.currentState.members[i].typing&&-1===t.indexOf(i)&&n.push(e.currentState.members[i])}return n}var u,d,h,p=n(249),m=n(132),g=n(81),f=n(130);let _=Object(g.a)("views.rooms.WhoIsTypingTile")((h=d=class e extends a.a.Component{constructor(...t){var n;super(...t),o()(this,"state",{usersTyping:(n=this.props.room,l(n,[s.a.get().getUserId()])),delayedStopTypingTimers:{}}),o()(this,"isVisible",()=>e.isVisible(this.state)),o()(this,"onRoomTimeline",(e,t)=>{var n;if((null==t?void 0:t.roomId)===(null===(n=this.props.room)||void 0===n?void 0:n.roomId)){const t=e.getSender(),n=this.state.usersTyping.filter(e=>e.userId!==t);n.length!==this.state.usersTyping.length&&this.setState({usersTyping:n}),this.abortUserTimer(t)}}),o()(this,"onRoomMemberTyping",()=>{const e=function(e){return l(e,[s.a.get().getUserId()].concat(s.a.get().getIgnoredUsers()))}(this.props.room);this.setState({delayedStopTypingTimers:this.updateDelayedStopTypingTimers(e),usersTyping:e})})}componentDidMount(){s.a.get().on("RoomMember.typing",this.onRoomMemberTyping),s.a.get().on("Room.timeline",this.onRoomTimeline)}componentDidUpdate(t,n){const r=e.isVisible(n),o=e.isVisible(this.state);this.props.onShown&&!r&&o?this.props.onShown():this.props.onHidden&&r&&!o&&this.props.onHidden()}componentWillUnmount(){const e=s.a.get();e&&(e.removeListener("RoomMember.typing",this.onRoomMemberTyping),e.removeListener("Room.timeline",this.onRoomTimeline)),Object.values(this.state.delayedStopTypingTimers).forEach(e=>e.abort())}static isVisible(e){return 0!==e.usersTyping.length||0!==Object.keys(e.delayedStopTypingTimers).length}updateDelayedStopTypingTimers(e){const t=this.state.usersTyping.filter(t=>!e.some(e=>t.userId===e.userId)),n=e.filter(e=>!this.state.usersTyping.some(t=>e.userId===t.userId));n.forEach(e=>{const t=this.state.delayedStopTypingTimers[e.userId];t&&t.abort()});let r=Object.assign({},this.state.delayedStopTypingTimers);return r=n.reduce((e,t)=>(delete e[t.userId],e),r),r=t.reduce((e,t)=>{if(!e[t.userId]){const n=new p.a(5e3);e[t.userId]=n,n.start(),n.finished().then(()=>this.removeUserTimer(t.userId),()=>{})}return e},r),r}abortUserTimer(e){const t=this.state.delayedStopTypingTimers[e];t&&(t.abort(),this.removeUserTimer(e))}removeUserTimer(e){if(this.state.delayedStopTypingTimers[e]){const t=Object.assign({},this.state.delayedStopTypingTimers);delete t[e],this.setState({delayedStopTypingTimers:t})}}renderTypingIndicatorAvatars(e,t){let n=0;e.length>t&&(n=e.length-t+1,e=e.slice(0,t-1));const r=e.map(e=>a.a.createElement(m.a,{key:e.userId,member:e,width:24,height:24,resizeMethod:"crop",viewUserOnClick:!0}));return n>0&&r.push(a.a.createElement("span",{className:"mx_WhoIsTypingTile_remainingAvatarPlaceholder",key:"others"},"+",n)),r}render(){let e=this.state.usersTyping;const t=Object.keys(this.state.delayedStopTypingTimers).map(e=>this.props.room.getMember(e));e=e.concat(t),e.sort((e,t)=>Object(f.a)(e.name,t.name));const n=function(e,t){let n=0;if(e.length>t&&(n=e.length-t+1),0===e.length)return"";if(1===e.length)return Object(c.a)("%(displayName)s is typing …",{displayName:e[0].name});const r=e.map(e=>e.name);if(n>=1)return Object(c.a)("%(names)s and %(count)s others are typing …",{names:r.slice(0,t-1).join(", "),count:n});{const e=r.pop();return Object(c.a)("%(names)s and %(lastPerson)s are typing …",{names:r.join(", "),lastPerson:e})}}(e,this.props.whoIsTypingLimit);return n?a.a.createElement("li",{className:"mx_WhoIsTypingTile","aria-atomic":"true"},a.a.createElement("div",{className:"mx_WhoIsTypingTile_avatars"},this.renderTypingIndicatorAvatars(e,this.props.whoIsTypingLimit)),a.a.createElement("div",{className:"mx_WhoIsTypingTile_label"},n)):null}},o()(d,"defaultProps",{whoIsTypingLimit:3}),u=h))||u},function(e,t,n){"use strict";n.d(t,"a",(function(){return D}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(88),c=n.n(s),l=n(86),u=n.n(l),d=n(283),h=n(286),p=n(83),m=n(89),g=n(562),f=n(139),_=n(268),b=n(178),v=n(84),y=n(687),E=n(462),S=n(464),w=n(463),C=n(172),T=n(211);var x,k,F,O=n(81),R=n(143);let D=Object(O.a)("views.rooms.AppsDrawer")((F=k=class extends a.a.Component{constructor(e){super(e),o()(this,"onIsResizing",e=>{this.setState({resizingVertical:e}),e||this._relaxResizer()}),o()(this,"_collectResizer",e=>{this._resizeContainer&&this.resizer.detach(),e&&(this.resizer.container=e,this.resizer.attach()),this._resizeContainer=e,this._loadResizerPreferences()}),o()(this,"_getAppsHash",e=>e.map(e=>e.id).join("~")),o()(this,"_relaxResizer",()=>{const e=this.resizer.getDistributors();e.forEach(e=>e.start()),e.forEach(e=>e.finish())}),o()(this,"_loadResizerPreferences",()=>{const e=C.d.instance.getResizerDistributions(this.props.room,C.a.Top);if(this.state.apps&&this.state.apps.length-1===e.length)e.forEach((e,t)=>{const n=this.resizer.forHandleAt(t);n&&(n.size=e,n.finish())});else if(this.state.apps){const e=this.resizer.getDistributors();e.forEach(e=>e.item.clearSize()),e.forEach(e=>e.start()),e.forEach(e=>e.finish())}}),o()(this,"onAction",e=>{const t=this.props.room.roomId+"_hide_widget_drawer";switch(e.action){case"appsDrawer":e.show?localStorage.setItem(t,"false"):localStorage.setItem(t,"true")}}),o()(this,"_getApps",()=>C.d.instance.getContainerWidgets(this.props.room,C.a.Top)),o()(this,"_updateApps",()=>{this.setState({apps:this._getApps()})}),this.state={apps:this._getApps(),resizingVertical:!1,resizingHorizontal:!1},this._resizeContainer=null,this.resizer=this._createResizer(),this.props.resizeNotifier.on("isResizing",this.onIsResizing)}componentDidMount(){g.b(),C.d.instance.on(C.d.emissionForRoom(this.props.room),this._updateApps),this.dispatcherRef=p.a.register(this.onAction)}componentWillUnmount(){g.c(),C.d.instance.off(C.d.emissionForRoom(this.props.room),this._updateApps),this.dispatcherRef&&p.a.unregister(this.dispatcherRef),this._resizeContainer&&this.resizer.detach(),this.props.resizeNotifier.off("isResizing",this.onIsResizing)}_createResizer(){const e={onResizeStart:()=>{this._resizeContainer.classList.add("mx_AppsDrawer_resizing"),this.setState({resizingHorizontal:!0})},onResizeStop:()=>{this._resizeContainer.classList.remove("mx_AppsDrawer_resizing"),C.d.instance.setResizerDistributions(this.props.room,C.a.Top,this.state.apps.slice(1).map((e,t)=>this.resizer.forHandleAt(t).size)),this.setState({resizingHorizontal:!1})}},t=new S.a({},w.a,e);return t.setClassNames({handle:"mx_ResizeHandle",vertical:"mx_ResizeHandle_vertical",reverse:"mx_ResizeHandle_reverse"}),t}componentDidUpdate(e,t){e.userId!==this.props.userId||e.room!==this.props.room?this._updateApps():this._getAppsHash(this.state.apps)!==this._getAppsHash(t.apps)&&this._loadResizerPreferences()}isResizing(){return this.state.resizingVertical||this.state.resizingHorizontal}_launchManageIntegrations(){v.b.getValue("feature_many_integration_managers")?b.a.sharedInstance().openAll():b.a.sharedInstance().getPrimaryManager().open(this.props.room,"add_integ")}render(){if(!this.props.showApps)return a.a.createElement("div",null);const e=this.state.apps.map((e,t,n)=>a.a.createElement(h.a,{key:e.id,app:e,fullWidth:n.length<2,room:this.props.room,userId:this.props.userId,creatorUserId:e.creatorUserId,widgetPageTitle:f.a.getWidgetDataTitle(e),waitForIframeLoad:e.waitForIframeLoad,pointerEvents:this.isResizing()?"none":void 0}));if(0===e.length)return a.a.createElement("div",null);let t;if(0===e.length&&_.a.roomHasPendingWidgets(this.props.room.roomId,f.a.getRoomWidgets(this.props.room))){const e=m.getComponent("elements.Spinner");t=a.a.createElement(e,null)}const n=u()({mx_AppsDrawer:!0,mx_AppsDrawer_fullWidth:e.length<2,mx_AppsDrawer_resizing:this.state.resizing,mx_AppsDrawer_2apps:2===e.length,mx_AppsDrawer_3apps:3===e.length});return a.a.createElement("div",{className:n},a.a.createElement(I,{room:this.props.room,minHeight:100,maxHeight:this.props.maxHeight?this.props.maxHeight-50:void 0,handleClass:"mx_AppsContainer_resizerHandle",handleWrapperClass:"mx_AppsContainer_resizerHandleContainer",className:"mx_AppsContainer_resizer",resizeNotifier:this.props.resizeNotifier},a.a.createElement("div",{className:"mx_AppsContainer",ref:this._collectResizer},e.map((t,n)=>n<1?t:a.a.createElement(a.a.Fragment,{key:t.key},a.a.createElement(E.a,{reverse:n>e.length/2}),t)))),t)}},o()(k,"propTypes",{userId:c.a.string.isRequired,room:c.a.object.isRequired,resizeNotifier:c.a.instanceOf(y.a).isRequired,showApps:c.a.bool}),o()(k,"defaultProps",{showApps:!0}),x=F))||x;const I=({room:e,minHeight:t,maxHeight:n,className:r,handleWrapperClass:o,handleClass:s,resizeNotifier:c,children:l})=>{let u=C.d.instance.getContainerHeight(e,C.a.Top);t||(t=100),n||(n=R.b.instance.windowHeight/4*3),u?(u=Object(T.a)(u,0,100),u=Object(T.d)(u/100,t,n)):u=280;const[h,p]=((e,t)=>{const[n,r]=Object(i.useState)(e);return[n,e=>{r(e),t(e)}]})(u,r=>{r=100*Object(T.c)(r,t,n),C.d.instance.setContainerHeight(e,C.a.Top,r)});return a.a.createElement(d.Resizable,{size:{height:Math.min(h,n)},minHeight:t,maxHeight:n,onResizeStart:()=>{c.startResizing()},onResize:()=>{c.notifyTimelineHeightChanged()},onResizeStop:(e,t,n,r)=>{p(h+r.height),c.stopResizing()},handleWrapperClass:o,handleClasses:{bottom:s},className:r,enable:{bottom:!0}},l)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ie}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(93),c=n(136),l=n(94),u=n(119),d=n(80),h=n(85),p=n(184),m=n(333),g=n(147),f=n(151),_=n(477),b=n(125),v=n(101),y=n(127),E=n(157),S=n(194),w=n(83),C=n(91),T=n(346),x=n(288),k=n(347),F=n(251),O=n(121);const R=(e,t)=>{const[n,r]=Object(i.useState)(()=>Array.isArray(t)?t:new Array(e).fill(t));return[n,(e,t)=>r(n=>{const r=[...n];return r[e]=t,r})]};var D,I=n(449),A=n(221),N=n(788),M=n(132),P=n(102),L=n(789),j=n(247),U=n(103),B=n(163),G=n(106),V=n(248),q=n(192),H=n(171),z=n(337);!function(e){e[e.Landing=0]="Landing",e[e.PublicCreateRooms=1]="PublicCreateRooms",e[e.PublicShare=2]="PublicShare",e[e.PrivateScope=3]="PrivateScope",e[e.PrivateInvite=4]="PrivateInvite",e[e.PrivateCreateRooms=5]="PrivateCreateRooms",e[e.PrivateExistingRooms=6]="PrivateExistingRooms"}(D||(D={}));const W=({room:e,children:t})=>{const n=Object(_.b)(e).length;return t?t(n):n},K=e=>{const[t,n]=Object(i.useState)(e.getMyMembership());return Object(y.a)(e,"Room.myMembership",()=>{n(e.getMyMembership())}),t},Y=({space:e})=>{const t=e.getJoinRule();let n;return n="public"===t?a.a.createElement("span",{className:"mx_SpaceRoomView_info_public"},Object(d.a)("Public space")):a.a.createElement("span",{className:"mx_SpaceRoomView_info_private"},Object(d.a)("Private space")),a.a.createElement("div",{className:"mx_SpaceRoomView_info"},n,"public"===t&&a.a.createElement(W,{room:e},t=>t>0?a.a.createElement(h.a,{kind:"link",onClick:()=>{w.a.dispatch({action:C.a.SetRightPanelPhase,phase:O.c.RoomMemberList,refireParams:{space:e}})}},Object(d.a)("%(count)s members",{count:t})):null))},$=()=>{w.a.dispatch({action:C.a.ViewUserSettings,initialTabId:q.a.Labs})},Q=({space:e,onJoinButtonClicked:t,onRejectButtonClicked:n})=>{const r=Object(i.useContext)(l.a),o=K(e),[s,f]=Object(i.useState)(!1),_=P.g.spacesEnabled,b=Object(H.b)(o)===H.a.Leave&&e.getJoinRule()!==c.c.Public;let v,y,E;if("join"===o)y=a.a.createElement(h.a,{kind:"danger_outline",onClick:()=>{w.a.dispatch({action:"leave_room",room_id:e.roomId})}},Object(d.a)("Leave"));else if("invite"===o){var S,C;const o=null===(S=e.getMember(r.getUserId()))||void 0===S||null===(C=S.events.member)||void 0===C?void 0:C.getSender(),i=o&&e.getMember(o);o&&(v=a.a.createElement("div",{className:"mx_SpaceRoomView_preview_inviter"},a.a.createElement(M.a,{member:i,fallbackUserId:o,width:32,height:32}),a.a.createElement("div",null,a.a.createElement("div",{className:"mx_SpaceRoomView_preview_inviter_name"},Object(d.a)("<inviter/> invites you",{},{inviter:()=>a.a.createElement("b",null,(null==i?void 0:i.name)||o)})),i?a.a.createElement("div",{className:"mx_SpaceRoomView_preview_inviter_mxid"},o):null))),y=a.a.createElement(a.a.Fragment,null,a.a.createElement(h.a,{kind:"secondary",onClick:()=>{f(!0),n()}},Object(d.a)("Reject")),a.a.createElement(h.a,{kind:"primary",onClick:()=>{f(!0),t()},disabled:!_},Object(d.a)("Accept")))}else y=a.a.createElement(h.a,{kind:"primary",onClick:()=>{f(!0),t()},disabled:!_||b},Object(d.a)("Join"));return s&&(y=a.a.createElement(g.a,null)),_?b&&(E=a.a.createElement("div",{className:"mx_SpaceRoomView_preview_spaceBetaPrompt"},Object(d.a)("To view %(spaceName)s, you need an invite",{spaceName:e.name}))):E=a.a.createElement("div",{className:"mx_SpaceRoomView_preview_spaceBetaPrompt"},"join"===o?Object(d.a)("To view %(spaceName)s, turn on the <a>Spaces beta</a>",{spaceName:e.name},{a:e=>a.a.createElement(h.a,{onClick:$,kind:"link"},e)}):Object(d.a)("To join %(spaceName)s, turn on the <a>Spaces beta</a>",{spaceName:e.name},{a:e=>a.a.createElement(h.a,{onClick:$,kind:"link"},e)})),a.a.createElement("div",{className:"mx_SpaceRoomView_preview"},a.a.createElement(V.a,{onClick:$}),v,a.a.createElement(u.a,{room:e,height:80,width:80,viewAvatarOnClick:!0}),a.a.createElement("h1",{className:"mx_SpaceRoomView_preview_name"},a.a.createElement(p.a,{room:e})),a.a.createElement(Y,{space:e}),a.a.createElement(m.a,{room:e},(e,t)=>a.a.createElement("div",{className:"mx_SpaceRoomView_preview_topic",ref:t},e)),"public"===e.getJoinRule()&&a.a.createElement(L.a,{room:e}),a.a.createElement("div",{className:"mx_SpaceRoomView_preview_joinButtons"},y),E)},J=({space:e})=>{const[t,n,r,o]=Object(U.q)();let i;if(t){const t=n.current.getBoundingClientRect();i=a.a.createElement(B.e,{left:t.left+window.pageXOffset+0,top:t.bottom+window.pageYOffset+8,chevronFace:U.a.None,onFinished:o,className:"mx_RoomTile_contextMenu",compact:!0},a.a.createElement(B.c,{first:!0},a.a.createElement(B.b,{label:Object(d.a)("Create new room"),iconClassName:"mx_RoomList_iconPlus",onClick:async t=>{t.preventDefault(),t.stopPropagation(),o(),await Object(A.e)(e)&&w.a.fire(C.a.UpdateSpaceHierarchy)}}),a.a.createElement(B.b,{label:Object(d.a)("Add existing room"),iconClassName:"mx_RoomList_iconHash",onClick:t=>{t.preventDefault(),t.stopPropagation(),o(),Object(A.d)(e)}}),a.a.createElement(B.b,{label:Object(d.a)("Add space"),iconClassName:"mx_RoomList_iconPlus",onClick:t=>{t.preventDefault(),t.stopPropagation(),o(),Object(A.f)(e)}},a.a.createElement(V.a,null))))}return a.a.createElement(a.a.Fragment,null,a.a.createElement(U.c,{kind:"primary",inputRef:n,onClick:r,isExpanded:t,label:Object(d.a)("Add")},Object(d.a)("Add")),i)},X=({space:e})=>{const t=Object(i.useContext)(l.a),n=K(e),r=t.getUserId();let o;"join"===n&&e.canInvite(r)&&(o=a.a.createElement(h.a,{kind:"primary",className:"mx_SpaceRoomView_landing_inviteButton",onClick:()=>{Object(f.g)(e.roomId)}},Object(d.a)("Invite")));let c,g;"join"===n&&e.currentState.maySendStateEvent(s.a.SpaceChild,r)&&(c=a.a.createElement(J,{space:e})),Object(A.c)(e)&&(g=a.a.createElement(G.a,{className:"mx_SpaceRoomView_landing_settingsButton",onClick:()=>{Object(A.h)(e)},title:Object(d.a)("Settings")}));return a.a.createElement("div",{className:"mx_SpaceRoomView_landing"},a.a.createElement(z.b,null),a.a.createElement(u.a,{room:e,height:80,width:80,viewAvatarOnClick:!0}),a.a.createElement("div",{className:"mx_SpaceRoomView_landing_name"},a.a.createElement(p.a,{room:e},e=>{const t={name:()=>a.a.createElement("div",{className:"mx_SpaceRoomView_landing_nameRow"},a.a.createElement("h1",null,e))};return Object(d.a)("Welcome to <name/>",{},t)})),a.a.createElement("div",{className:"mx_SpaceRoomView_landing_info"},a.a.createElement(Y,{space:e}),a.a.createElement(L.a,{room:e,onlyKnownUsers:!1,numShown:7,onClick:()=>{w.a.dispatch({action:C.a.SetRightPanelPhase,phase:O.c.RoomMemberList,refireParams:{space:e}})}}),o,g),a.a.createElement(m.a,{room:e},(e,t)=>a.a.createElement("div",{className:"mx_SpaceRoomView_landing_topic",ref:t},e)),a.a.createElement(N.a,{space:e,showRoom:N.c,additionalButtons:c}))},Z=({space:e,title:t,description:n,onFinished:r})=>{const[o,s]=Object(i.useState)(!1),[l,u]=Object(i.useState)(""),p=[Object(d.a)("General"),Object(d.a)("Random"),Object(d.a)("Support")],[m,g]=R(3,[Object(d.a)("General"),Object(d.a)("Random"),""]),f=new Array(3).fill(0).map((e,t)=>{const n="roomName"+t;return a.a.createElement(v.a,{key:n,name:n,type:"text",label:Object(d.a)("Room name"),placeholder:p[t],value:m[t],onChange:e=>g(t,e.target.value),autoFocus:2===t,disabled:o})}),_=async t=>{if(t.preventDefault(),!o){u(""),s(!0);try{const t=m.map(e=>e.trim()).filter(Boolean);await Promise.all(t.map(t=>Object(b.b)({createOpts:{preset:"public"===e.getJoinRule()?c.d.PublicChat:c.d.PrivateChat,name:t},spinner:!1,encryption:!1,andView:!1,inlineErrors:!0,parentSpace:e}))),r(t.length>0)}catch(e){console.error("Failed to create initial space rooms",e),u(Object(d.a)("Failed to create initial space rooms"))}s(!1)}};let y=e=>{e.preventDefault(),r(!1)},E=Object(d.a)("Skip for now");return m.some(e=>e.trim())&&(y=_,E=o?Object(d.a)("Creating rooms..."):Object(d.a)("Continue")),a.a.createElement("div",null,a.a.createElement("h1",null,t),a.a.createElement("div",{className:"mx_SpaceRoomView_description"},n),l&&a.a.createElement("div",{className:"mx_SpaceRoomView_errorText"},l),a.a.createElement("form",{onSubmit:y,id:"mx_SpaceSetupFirstRooms"},f),a.a.createElement("div",{className:"mx_SpaceRoomView_buttons"},a.a.createElement(h.a,{kind:"primary",disabled:o,onClick:y,element:"input",type:"submit",form:"mx_SpaceSetupFirstRooms",value:E})))},ee=({space:e,onFinished:t})=>a.a.createElement("div",null,a.a.createElement("h1",null,Object(d.a)("What do you want to organise?")),a.a.createElement("div",{className:"mx_SpaceRoomView_description"},Object(d.a)("Pick rooms or conversations to add. This is just a space for you, no one will be informed. You can add more later.")),a.a.createElement(j.a,{space:e,emptySelectionButton:a.a.createElement(h.a,{kind:"primary",onClick:t},Object(d.a)("Skip for now")),filterPlaceholder:Object(d.a)("Search for rooms or spaces"),onFinished:t,roomsRenderer:j.f,spacesRenderer:j.g,dmsRenderer:j.e})),te=({justCreatedOpts:e,space:t,onFinished:n,createdRooms:r})=>{var o;return a.a.createElement("div",{className:"mx_SpaceRoomView_publicShare"},a.a.createElement("h1",null,Object(d.a)("Share %(name)s",{name:(null==e||null===(o=e.createOpts)||void 0===o?void 0:o.name)||t.name})),a.a.createElement("div",{className:"mx_SpaceRoomView_description"},Object(d.a)("It's just you at the moment, it will be even better with others.")),a.a.createElement(I.a,{space:t}),a.a.createElement("div",{className:"mx_SpaceRoomView_buttons"},a.a.createElement(h.a,{kind:"primary",onClick:n},r?Object(d.a)("Go to my first room"):Object(d.a)("Go to my space"))))},ne=({space:e,justCreatedOpts:t,onFinished:n})=>{var r;return a.a.createElement("div",{className:"mx_SpaceRoomView_privateScope"},a.a.createElement("h1",null,Object(d.a)("Who are you working with?")),a.a.createElement("div",{className:"mx_SpaceRoomView_description"},Object(d.a)("Make sure the right people have access to %(name)s",{name:(null==t||null===(r=t.createOpts)||void 0===r?void 0:r.name)||e.name})),a.a.createElement(h.a,{className:"mx_SpaceRoomView_privateScope_justMeButton",onClick:()=>{n(!1)}},a.a.createElement("h3",null,Object(d.a)("Just me")),a.a.createElement("div",null,Object(d.a)("A private space to organise your rooms"))),a.a.createElement(h.a,{className:"mx_SpaceRoomView_privateScope_meAndMyTeammatesButton",onClick:()=>{n(!0)}},a.a.createElement("h3",null,Object(d.a)("Me and my teammates")),a.a.createElement("div",null,Object(d.a)("A private space for you and your teammates"))),a.a.createElement("div",{className:"mx_SpaceRoomView_betaWarning"},a.a.createElement("h3",null,Object(d.a)("Teammates might not be able to view or join any private rooms you make.")),a.a.createElement("p",null,Object(d.a)("We're working on this, but just want to let you know."))))},re=Object(E.a)({rules:[{key:"email",test:({value:e})=>!e||S.a(e),invalid:()=>Object(d.a)("Doesn't look like a valid email address")}]}),oe=({space:e,onFinished:t})=>{const[n,r]=Object(i.useState)(!1),[o,s]=Object(i.useState)(""),c=[Object(i.useRef)(),Object(i.useRef)(),Object(i.useRef)()],[l,u]=R(3,""),p=new Array(3).fill(0).map((e,t)=>{const r="emailAddress"+t;return a.a.createElement(v.a,{key:r,name:r,type:"text",label:Object(d.a)("Email address"),placeholder:Object(d.a)("Email"),value:l[t],onChange:e=>u(t,e.target.value),ref:c[t],onValidate:re,autoFocus:0===t,disabled:n})}),m=async o=>{if(o.preventDefault(),n)return;s("");for(let e=0;e<c.length;e++){const t=c[e];if(!1===await t.current.validate({allowEmpty:!0}))return t.current.focus(),void t.current.validate({allowEmpty:!0,focused:!0})}r(!0);const i=l.map(e=>e.trim()).filter(Boolean);try{const n=await Object(f.a)(e.roomId,i),r=Object.keys(n.states).filter(e=>"error"===n.states[e]);r.length>0?(console.log("Failed to invite users to space: ",n),s(Object(d.a)("Failed to invite the following users to your space: %(csvUsers)s",{csvUsers:r.join(", ")}))):t()}catch(e){console.error("Failed to invite users to space: ",e),s(Object(d.a)("We couldn't invite those users. Please check the users you want to invite and try again."))}r(!1)};let g=e=>{e.preventDefault(),t()},_=Object(d.a)("Skip for now");return l.some(e=>e.trim())&&(g=m,_=n?Object(d.a)("Inviting..."):Object(d.a)("Continue")),a.a.createElement("div",{className:"mx_SpaceRoomView_inviteTeammates"},a.a.createElement("h1",null,Object(d.a)("Invite your teammates")),a.a.createElement("div",{className:"mx_SpaceRoomView_description"},Object(d.a)("Make sure the right people have access. You can invite more later.")),a.a.createElement("div",{className:"mx_SpaceRoomView_inviteTeammates_betaDisclaimer"},a.a.createElement(V.a,{onClick:$}),Object(d.a)("<b>This is an experimental feature.</b> For now, new users receiving an invite will have to open the invite on <link/> to actually join.",{},{b:e=>a.a.createElement("b",null,e),link:()=>a.a.createElement("a",{href:"https://app.element.io/",rel:"noreferrer noopener",target:"_blank"},"app.element.io")})),o&&a.a.createElement("div",{className:"mx_SpaceRoomView_errorText"},o),a.a.createElement("form",{onSubmit:g,id:"mx_SpaceSetupPrivateInvite"},p),a.a.createElement("div",{className:"mx_SpaceRoomView_inviteTeammates_buttons"},a.a.createElement(h.a,{className:"mx_SpaceRoomView_inviteTeammates_inviteDialogButton",onClick:()=>Object(f.g)(e.roomId)},Object(d.a)("Invite by username"))),a.a.createElement("div",{className:"mx_SpaceRoomView_buttons"},a.a.createElement(h.a,{kind:"primary",disabled:n,onClick:g,element:"input",type:"submit",form:"mx_SpaceSetupPrivateInvite",value:_})))};class ie extends a.a.PureComponent{constructor(e,t){var n;super(e,t),o()(this,"creator",void 0),o()(this,"dispatcherRef",void 0),o()(this,"rightPanelStoreToken",void 0),o()(this,"onMyMembership",(e,t)=>{e.roomId===this.props.space.roomId&&this.setState({myMembership:t})}),o()(this,"onRightPanelStoreUpdate",()=>{this.setState({showRightPanel:F.a.getSharedInstance().isOpenForRoom})}),o()(this,"onAction",e=>{e.action!==C.a.ViewUser&&"view_3pid_invite"!==e.action||(e.action===C.a.ViewUser&&e.member?w.a.dispatch({action:C.a.SetRightPanelPhase,phase:O.c.SpaceMemberInfo,refireParams:{space:this.props.space,member:e.member}}):"view_3pid_invite"===e.action&&e.event?w.a.dispatch({action:C.a.SetRightPanelPhase,phase:O.c.Space3pidMemberInfo,refireParams:{space:this.props.space,event:e.event}}):w.a.dispatch({action:C.a.SetRightPanelPhase,phase:O.c.SpaceMemberList,refireParams:{space:this.props.space}}))}),o()(this,"goToFirstRoom",async()=>{const e=P.g.instance.getChildRooms(this.props.space.roomId);if(e.length){const t=e[0];return void w.a.dispatch({action:"view_room",room_id:t.roomId})}let t=P.g.instance.suggestedRooms;if(P.g.instance.activeSpace!==this.props.space&&(t=await P.g.instance.fetchSuggestedRooms(this.props.space,1)),t.length){var n,r;const e=t[0];w.a.dispatch({action:"view_room",room_id:e.room_id,room_alias:e.canonical_alias||(null===(n=e.aliases)||void 0===n?void 0:n[0]),via_servers:e.viaServers,oobData:{avatarUrl:e.avatar_url,name:e.name||e.canonical_alias||(null===(r=e.aliases)||void 0===r?void 0:r[0])||Object(d.a)("Empty room")}})}else this.setState({phase:D.Landing})});let r=D.Landing;this.creator=null===(n=this.props.space.currentState.getStateEvents(s.a.RoomCreate,""))||void 0===n?void 0:n.getSender();this.props.justCreatedOpts&&this.context.getUserId()===this.creator&&(r=this.props.justCreatedOpts.createOpts.preset===c.d.PublicChat?D.PublicCreateRooms:D.PrivateScope),this.state={phase:r,showRightPanel:F.a.getSharedInstance().isOpenForRoom,myMembership:this.props.space.getMyMembership()},this.dispatcherRef=w.a.register(this.onAction),this.rightPanelStoreToken=F.a.getSharedInstance().addListener(this.onRightPanelStoreUpdate),this.context.on("Room.myMembership",this.onMyMembership)}componentWillUnmount(){w.a.unregister(this.dispatcherRef),this.rightPanelStoreToken.remove(),this.context.off("Room.myMembership",this.onMyMembership)}renderBody(){var e,t;switch(this.state.phase){case D.Landing:return"join"===this.state.myMembership&&P.g.spacesEnabled?a.a.createElement(X,{space:this.props.space}):a.a.createElement(Q,{space:this.props.space,onJoinButtonClicked:this.props.onJoinButtonClicked,onRejectButtonClicked:this.props.onRejectButtonClicked});case D.PublicCreateRooms:return a.a.createElement(Z,{space:this.props.space,title:Object(d.a)("What are some things you want to discuss in %(spaceName)s?",{spaceName:(null===(e=this.props.justCreatedOpts)||void 0===e||null===(t=e.createOpts)||void 0===t?void 0:t.name)||this.props.space.name}),description:Object(d.a)("Let's create a room for each of them.")+"\n"+Object(d.a)("You can add more later too, including already existing ones."),onFinished:e=>this.setState({phase:D.PublicShare,createdRooms:e})});case D.PublicShare:return a.a.createElement(te,{justCreatedOpts:this.props.justCreatedOpts,space:this.props.space,onFinished:this.goToFirstRoom,createdRooms:this.state.createdRooms});case D.PrivateScope:return a.a.createElement(ne,{space:this.props.space,justCreatedOpts:this.props.justCreatedOpts,onFinished:e=>{this.setState({phase:e?D.PrivateInvite:D.PrivateExistingRooms})}});case D.PrivateInvite:return a.a.createElement(oe,{space:this.props.space,onFinished:()=>this.setState({phase:D.PrivateCreateRooms})});case D.PrivateCreateRooms:return a.a.createElement(Z,{space:this.props.space,title:Object(d.a)("What projects are you working on?"),description:Object(d.a)("We'll create rooms for each of them. You can add more later too, including already existing ones."),onFinished:e=>this.setState({phase:D.Landing,createdRooms:e})});case D.PrivateExistingRooms:return a.a.createElement(ee,{space:this.props.space,onFinished:()=>this.setState({phase:D.Landing})})}}render(){const e=this.state.showRightPanel&&this.state.phase===D.Landing?a.a.createElement(k.a,{room:this.props.space,resizeNotifier:this.props.resizeNotifier}):null;return a.a.createElement("main",{className:"mx_SpaceRoomView"},a.a.createElement(x.a,null,a.a.createElement(T.a,{panel:e,resizeNotifier:this.props.resizeNotifier},this.renderBody())))}}o()(ie,"contextType",l.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(80),c=n(89),l=n(87),u=n(134);class d{constructor(e,t){this.client=Object(u.createClient)({baseUrl:e,idBaseUrl:t}),this.clientSecret=this.client.generateClientSecret(),this.identityServerDomain=t?t.split("://")[1]:null}resetPassword(e,t){return this.password=t,this.client.requestPasswordEmailToken(e,this.clientSecret,1).then(e=>(this.sessionId=e.sid,e),(function(e){throw"M_THREEPID_NOT_FOUND"===e.errcode?e.message=Object(s.a)("This email address was not found"):e.httpStatus&&(e.message=e.message+` (Status ${e.httpStatus})`),e}))}async checkEmailLinkClicked(){const e={sid:this.sessionId,client_secret:this.clientSecret};try{await this.client.setPassword({type:"m.login.email.identity",threepid_creds:e,threepidCreds:e},this.password)}catch(e){throw 401===e.httpStatus?e.message=Object(s.a)("Failed to verify email address: make sure you clicked the link in the email"):404===e.httpStatus?e.message=Object(s.a)("Your email address does not appear to be associated with a Matrix ID on this Homeserver."):e.httpStatus&&(e.message+=` (Status ${e.httpStatus})`),e}}}var h,p,m=n(254),g=n(86),f=n.n(g),_=n(226),b=n(112),v=n(351),y=n(252),E=n(81),S=n(352);!function(e){e[e.Forgot=1]="Forgot",e[e.SendingEmail=2]="SendingEmail",e[e.EmailSent=3]="EmailSent",e[e.Done=4]="Done"}(p||(p={}));let w=Object(E.a)("structures.auth.ForgotPassword")(h=class extends a.a.Component{constructor(e){super(e),o()(this,"reset",void 0),o()(this,"state",{phase:p.Forgot,email:"",password:"",password2:"",errorText:null,serverIsAlive:!0,serverErrorIsFatal:!1,serverDeadError:"",passwordFieldValid:!1}),o()(this,"onVerify",async e=>{if(e.preventDefault(),this.reset)try{await this.reset.checkEmailLinkClicked(),this.setState({phase:p.Done})}catch(e){this.showErrorDialog(e.message)}else console.error("onVerify called before submitPasswordReset!")}),o()(this,"onSubmitForm",async e=>{if(e.preventDefault(),await this.checkServerLiveliness(this.props.serverConfig),await this.password_field.validate({allowEmpty:!1}),this.state.email)if(this.state.password&&this.state.password2)if(this.state.passwordFieldValid)if(this.state.password!==this.state.password2)this.showErrorDialog(Object(s.a)("New passwords must match each other."));else{const e=c.getComponent("dialogs.QuestionDialog");l.a.createTrackedDialog("Forgot Password Warning","",e,{title:Object(s.a)("Warning!"),description:a.a.createElement("div",null,Object(s.a)("Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password.")),button:Object(s.a)("Continue"),onFinished:e=>{e&&this.submitPasswordReset(this.state.email,this.state.password)}})}else this.showErrorDialog(Object(s.a)("Please choose a strong password"));else this.showErrorDialog(Object(s.a)("A new password must be entered."));else this.showErrorDialog(Object(s.a)("The email address linked to your account must be entered."))}),o()(this,"onInputChanged",(e,t)=>{this.setState({[e]:t.currentTarget.value})}),o()(this,"onLoginClick",e=>{e.preventDefault(),e.stopPropagation(),this.props.onLoginClick()}),b.a.instance.track("onboarding_forgot_password_begin")}componentDidMount(){this.reset=null,this.checkServerLiveliness(this.props.serverConfig)}UNSAFE_componentWillReceiveProps(e){e.serverConfig.hsUrl===this.props.serverConfig.hsUrl&&e.serverConfig.isUrl===this.props.serverConfig.isUrl||this.checkServerLiveliness(e.serverConfig)}async checkServerLiveliness(e){try{await m.a.validateServerConfigWithStaticUrls(e.hsUrl,e.isUrl),this.setState({serverIsAlive:!0})}catch(e){this.setState(m.a.authComponentStateForError(e,"forgot_password"))}}submitPasswordReset(e,t){this.setState({phase:p.SendingEmail}),this.reset=new d(this.props.serverConfig.hsUrl,this.props.serverConfig.isUrl),this.reset.resetPassword(e,t).then(()=>{this.setState({phase:p.EmailSent})},e=>{this.showErrorDialog(Object(s.a)("Failed to send email")+": "+e.message),this.setState({phase:p.Forgot})})}showErrorDialog(e,t){const n=c.getComponent("dialogs.ErrorDialog");l.a.createTrackedDialog("Forgot Password Error","",n,{title:t,description:e})}onPasswordValidate(e){this.setState({passwordFieldValid:e.valid})}renderForgot(){const e=c.getComponent("elements.Field");let t=null;const n=this.state.errorText;let r;if(n&&(t=a.a.createElement("div",{className:"mx_Login_error"},n)),!this.state.serverIsAlive){const e=f()({mx_Login_error:!0,mx_Login_serverError:!0,mx_Login_serverErrorNonFatal:!this.state.serverErrorIsFatal});r=a.a.createElement("div",{className:e},this.state.serverDeadError)}return a.a.createElement("div",null,t,r,a.a.createElement(v.a,{serverConfig:this.props.serverConfig,onServerConfigChange:this.props.onServerConfigChange}),a.a.createElement("form",{onSubmit:this.onSubmitForm},a.a.createElement("div",{className:"mx_AuthBody_fieldRow"},a.a.createElement(e,{name:"reset_email",type:"text",label:Object(s.a)("Email"),value:this.state.email,onChange:this.onInputChanged.bind(this,"email"),autoFocus:!0,onFocus:()=>b.a.instance.track("onboarding_forgot_password_email_focus"),onBlur:()=>b.a.instance.track("onboarding_forgot_password_email_blur")})),a.a.createElement("div",{className:"mx_AuthBody_fieldRow"},a.a.createElement(y.a,{name:"reset_password",type:"password",label:Object(s.b)("New Password"),value:this.state.password,minScore:S.a,onChange:this.onInputChanged.bind(this,"password"),fieldRef:e=>this.password_field=e,onValidate:e=>this.onPasswordValidate(e),onFocus:()=>b.a.instance.track("onboarding_forgot_password_newPassword_focus"),onBlur:()=>b.a.instance.track("onboarding_forgot_password_newPassword_blur"),autoComplete:"new-password"}),a.a.createElement(e,{name:"reset_password_confirm",type:"password",label:Object(s.a)("Confirm"),value:this.state.password2,onChange:this.onInputChanged.bind(this,"password2"),onFocus:()=>b.a.instance.track("onboarding_forgot_password_newPassword2_focus"),onBlur:()=>b.a.instance.track("onboarding_forgot_password_newPassword2_blur"),autoComplete:"new-password"})),a.a.createElement("span",null,Object(s.a)("A verification email will be sent to your inbox to confirm setting your new password.")),a.a.createElement("input",{className:"mx_Login_submit",type:"submit",value:Object(s.a)("Send Reset Email")})),a.a.createElement("a",{className:"mx_AuthBody_changeFlow",onClick:this.onLoginClick,href:"#"},Object(s.a)("Sign in instead")))}renderSendingEmail(){const e=c.getComponent("elements.Spinner");return a.a.createElement(e,null)}renderEmailSent(){return a.a.createElement("div",null,Object(s.a)("An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.",{emailAddress:this.state.email}),a.a.createElement("br",null),a.a.createElement("input",{className:"mx_Login_submit",type:"button",onClick:this.onVerify,value:Object(s.a)("I have verified my email address")}))}renderDone(){return a.a.createElement("div",null,a.a.createElement("p",null,Object(s.a)("Your password has been reset.")),a.a.createElement("p",null,Object(s.a)("You have been logged out of all sessions and will no longer receive push notifications. To re-enable notifications, sign in again on each device.")),a.a.createElement("input",{className:"mx_Login_submit",type:"button",onClick:this.props.onComplete,value:Object(s.a)("Return to login screen")}))}render(){const e=c.getComponent("auth.AuthHeader"),t=c.getComponent("auth.AuthBody");let n;switch(this.state.phase){case p.Forgot:n=this.renderForgot();break;case p.SendingEmail:n=this.renderSendingEmail();break;case p.EmailSent:n=this.renderEmailSent();break;case p.Done:n=this.renderDone()}return a.a.createElement(_.a,null,a.a.createElement(e,null),a.a.createElement(t,null,a.a.createElement("h2",null," ",Object(s.a)("Set a new password")," "),n))}})||h},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(407),c=n(131),l=n(84),u=n(87);var d,h=n(81),p=n(100),m=n(292);let g=Object(h.a)("views.rooms.LinkPreviewWidget")(d=class extends a.a.Component{constructor(...e){super(...e),o()(this,"description",Object(i.createRef)()),o()(this,"onImageClick",e=>{const t=this.props.preview;if(0!=e.button||e.metaKey)return;e.preventDefault();let n=t["og:image"];n&&n.startsWith("mxc://")&&(n=Object(p.b)(n).srcHttp);const r={src:n,width:t["og:image:width"],height:t["og:image:height"],name:t["og:title"]||t["og:description"]||this.props.link,fileSize:t["matrix:image:size"],link:this.props.link};u.a.createDialog(m.a,r,"mx_Dialog_lightbox",null,!0)})}componentDidMount(){this.description.current&&Object(c.g)(this.description.current)}componentDidUpdate(){this.description.current&&Object(c.g)(this.description.current)}render(){const e=this.props.preview;if(!e||0===Object.keys(e).length)return a.a.createElement("div",null);let t=e["og:image"];l.b.getValue("showImages")||(t=null);t&&t.startsWith("mxc://")&&(t=Object(p.b)(t).getThumbnailOfSourceHttp(100,100,"scale"));let n,r=100;e["og:image:width"]&&e["og:image:height"]&&(r=function(e,t,n,r){if(!e||!t)return null;if(e<n&&t<r)return t;const o=n/e,i=r/t;return o<i?Math.floor(o*t):Math.floor(i*t)}(e["og:image:width"],e["og:image:height"],100,100)),t&&(n=a.a.createElement("div",{className:"mx_LinkPreviewWidget_image",style:{height:r}},a.a.createElement("img",{style:{maxWidth:100,maxHeight:100},src:t,onClick:this.onImageClick})));const o=s.AllHtmlEntities.decode(e["og:description"]||"");return a.a.createElement("div",{className:"mx_LinkPreviewWidget"},n,a.a.createElement("div",{className:"mx_LinkPreviewWidget_caption"},a.a.createElement("div",{className:"mx_LinkPreviewWidget_title"},a.a.createElement("a",{href:this.props.link,target:"_blank",rel:"noreferrer noopener"},e["og:title"]),e["og:site_name"]&&a.a.createElement("span",{className:"mx_LinkPreviewWidget_siteName"}," - "+e["og:site_name"])),a.a.createElement("div",{className:"mx_LinkPreviewWidget_description",ref:this.description},o)),this.props.children)}})||d},function(e,t,n){"use strict";n.d(t,"c",(function(){return c.d})),n.d(t,"a",(function(){return c.a})),n.d(t,"b",(function(){return c.c}));var r=n(79),o=n.n(r),i=n(96),a=n(135),s=n(297),c=n(298);const l=s.a.DeviceVerification;class u extends c.e{constructor(...e){super(...e),o()(this,"sessionPrepared",!1),o()(this,"prepPromise",null)}ensureSession(e){return this.prepPromise?this.prepPromise:this.sessionPrepared?Promise.resolve():(this.prepPromise=this.crypto.downloadKeys(e).then(t=>this.crypto.ensureOlmSessionsForUsers(e)).then(()=>{this.sessionPrepared=!0}).finally(()=>{this.prepPromise=null}),this.prepPromise)}async encryptMessage(e,t,n){const r=(await e.getEncryptionTargetMembers()).map((function(e){return e.userId}));await this.ensureSession(r);const o={room_id:e.roomId,type:t,content:n},i={algorithm:a.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{}},s=[];for(let e=0;e<r.length;++e){const t=r[e],n=this.crypto.getStoredDevicesForUser(t);for(let e=0;e<n.length;++e){const r=n[e];r.getIdentityKey()!=this.olmDevice.deviceCurve25519Key&&(r.verified!=l.BLOCKED&&s.push(a.encryptMessageForDevice(i.ciphertext,this.userId,this.deviceId,this.olmDevice,t,r,o)))}}return await Promise.all(s).then(()=>i)}}class d extends c.b{async decryptEvent(e){const t=e.getWireContent(),n=t.sender_key,r=t.ciphertext;if(!r)throw new c.c("OLM_MISSING_CIPHERTEXT","Missing ciphertext");if(!(this.olmDevice.deviceCurve25519Key in r))throw new c.c("OLM_NOT_INCLUDED_IN_RECIPIENTS","Not included in recipients");const o=r[this.olmDevice.deviceCurve25519Key];let i;try{i=await this.decryptMessage(n,o)}catch(e){throw new c.c("OLM_BAD_ENCRYPTED_MESSAGE","Bad Encrypted Message",{sender:n,err:e})}const a=JSON.parse(i);if(a.recipient!=this.userId)throw new c.c("OLM_BAD_RECIPIENT","Message was intented for "+a.recipient);if(a.recipient_keys.ed25519!=this.olmDevice.deviceEd25519Key)throw new c.c("OLM_BAD_RECIPIENT_KEY","Message not intended for this device",{intended:a.recipient_keys.ed25519,our_key:this.olmDevice.deviceEd25519Key});if(a.sender!=e.getSender())throw new c.c("OLM_FORWARDED_MESSAGE","Message forwarded from "+a.sender,{reported_sender:e.getSender()});if(a.room_id!==e.getRoomId())throw new c.c("OLM_BAD_ROOM","Message intended for room "+a.room_id,{reported_room:e.getRoomId()});return{clearEvent:a,senderCurve25519Key:n,claimedEd25519Key:(a.keys||{}).ed25519||null}}async decryptMessage(e,t){if(0!==t.type)return this.reallyDecryptMessage(e,t);{const n=this.olmDevice._olmPrekeyPromise.then(()=>this.reallyDecryptMessage(e,t));return this.olmDevice._olmPrekeyPromise=n.catch(()=>{}),await n}}async reallyDecryptMessage(e,t){const n=await this.olmDevice.getSessionIdsForDevice(e),r={};for(let o=0;o<n.length;o++){const a=n[o];try{const n=await this.olmDevice.decryptMessage(e,a,t.type,t.body);return i.a.log("Decrypted Olm message from "+e+" with session "+a),n}catch(n){if(await this.olmDevice.matchesSession(e,a,t.type,t.body))throw new Error("Error decrypting prekey message with existing session id "+a+": "+n.message);r[a]=n.message}}if(0!==t.type){if(0===n.length)throw new Error("No existing sessions");throw new Error("Error decrypting non-prekey message with existing sessions: "+JSON.stringify(r))}let o;try{o=await this.olmDevice.createInboundSession(e,t.type,t.body)}catch(e){throw r["(new)"]=e.message,new Error("Error decrypting prekey message: "+JSON.stringify(r))}return i.a.log("created new inbound Olm session ID "+o.session_id+" with "+e),o.payload}}Object(c.g)(a.OLM_ALGORITHM,u,d);n(516)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r);class i{constructor(e){this.tagId=e,o()(this,"_n",0),o()(this,"_previews",!1),o()(this,"_collapsed",!1);const t=localStorage.getItem(this.key);if(t){const e=JSON.parse(t);this._n=e.numTiles,this._previews=e.showPreviews,this._collapsed=e.collapsed}}get isCollapsed(){return this._collapsed}set isCollapsed(e){this._collapsed=e,this.save()}get showPreviews(){return this._previews}set showPreviews(e){this._previews=e,this.save()}get tileHeight(){return 44}get key(){return`mx_sublist_layout_${this.tagId}_boxed`}get visibleTiles(){return 0===this._n?this.defaultVisibleTiles:Math.max(this._n,this.minVisibleTiles)}set visibleTiles(e){this._n=e,this.save()}get minVisibleTiles(){return 1}get defaultVisibleTiles(){return 8}tilesWithPadding(e,t){return this.pixelsToTiles(this.tilesToPixelsWithPadding(e,t))}tilesToPixelsWithPadding(e,t){return this.tilesToPixels(e)+t}tilesToPixels(e){return e*this.tileHeight}pixelsToTiles(e){return e/this.tileHeight}reset(){localStorage.removeItem(this.key)}save(){localStorage.setItem(this.key,JSON.stringify(this.serialize()))}serialize(){return{numTiles:this.visibleTiles,showPreviews:this.showPreviews,collapsed:this.isCollapsed}}}var a=n(150),s=n(83);class c extends a.a{constructor(){super(s.a),o()(this,"layoutMap",new Map)}static get instance(){return c.internalInstance||(c.internalInstance=new c),c.internalInstance}ensureLayoutExists(e){this.layoutMap.has(e)||this.layoutMap.set(e,new i(e))}getLayoutFor(e){return this.layoutMap.has(e)||this.layoutMap.set(e,new i(e)),this.layoutMap.get(e)}async resetLayouts(){console.warn("Resetting layouts for room list");for(const e of this.layoutMap.values())e.reset()}async onNotReady(){this.layoutMap.clear()}async onAction(e){return Promise.resolve()}}o()(c,"internalInstance",void 0),window.mxRoomListLayoutStore=c.instance},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(204);class a extends i.c{constructor(e,t,n=i.a){super(t,n),this.manager=e}async play(){return this.manager.playOnly(this),super.play()}destroy(){this.manager.destroyPlaybackInstance(this),super.destroy()}}class s{constructor(){o()(this,"instances",[])}static get instance(){return s.internalInstance||(s.internalInstance=new s),s.internalInstance}playOnly(e){this.instances.filter(t=>t!==e).forEach(e=>e.stop())}destroyPlaybackInstance(e){this.instances=this.instances.filter(t=>t!==e)}createPlaybackInstance(e,t=i.a){const n=new a(this,e,t);return this.instances.push(n),n}}o()(s,"internalInstance",void 0)},function(e,t,n){"use strict";t.a=n.p+"olm.91fced0.wasm"},function(e,t){var n,r,o,i,a,s,c=(a={},o="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(o=o||__filename),s=function(t){var i,s,c;if(t=t||{},i||(i=void 0!==t?t:{}),i.ready=new Promise((function(e){s=e})),"undefined"!=typeof window)c=function(e){window.crypto.getRandomValues(e)};else{if(!e.exports)throw Error("Cannot find global to attach library to");var l=require("crypto");c=function(e){var t=l.randomBytes(e.length);e.set(t)},process=global.process}if("undefined"!=typeof OLM_OPTIONS)for(var u in OLM_OPTIONS)OLM_OPTIONS.hasOwnProperty(u)&&(i[u]=OLM_OPTIONS[u]);i.onRuntimeInitialized=function(){ke=i._olm_error(),a.PRIVATE_KEY_LENGTH=i._olm_pk_private_key_length(),n&&n()},i.onAbort=function(e){r&&r(e)};var d,h,p,m,g,f={};for(d in i)i.hasOwnProperty(d)&&(f[d]=i[d]);h="object"==typeof window,p="function"==typeof importScripts,m="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,g=!h&&!m&&!p;var _,b,v,y,E="";m?(E=p?require("path").dirname(E)+"/":__dirname+"/",_=function(e,t){return v||(v=require("fs")),y||(y=require("path")),e=y.normalize(e),v.readFileSync(e,t?null:"utf8")},b=function(e){return(e=_(e,!0)).buffer||(e=new Uint8Array(e)),e.buffer||te("Assertion failed: undefined"),e},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",(function(e){throw e})),process.on("unhandledRejection",te),i.inspect=function(){return"[Emscripten Module object]"}):g?("undefined"!=typeof read&&(_=function(e){return read(e)}),b=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):("object"==typeof(e=read(e,"binary"))||te("Assertion failed: undefined"),e)},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(h||p)&&(p?E=self.location.href:document.currentScript&&(E=document.currentScript.src),o&&(E=o),E=0!==E.indexOf("blob:")?E.substr(0,E.lastIndexOf("/")+1):"",_=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},p&&(b=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var S,w=i.print||console.log.bind(console),C=i.printErr||console.warn.bind(console);for(d in f)f.hasOwnProperty(d)&&(i[d]=f[d]);function T(e){var t="i8";switch("*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":P[e>>0]=0;break;case"i16":j[e>>1]=0;break;case"i32":U[e>>2]=0;break;case"i64":oe=[0,1<=+Q(0)?~~+J(0)>>>0:0],U[e>>2]=oe[0],U[e+4>>2]=oe[1];break;case"float":B[e>>2]=0;break;case"double":G[e>>3]=0;break;default:te("invalid type for setValue: "+t)}}function x(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return P[e>>0];case"i16":return j[e>>1];case"i32":case"i64":return U[e>>2];case"float":return B[e>>2];case"double":return G[e>>3];default:te("invalid type for getValue: "+t)}return null}f=null,i.wasmBinary&&(S=i.wasmBinary),i.noExitRuntime&&i.noExitRuntime,"object"!=typeof WebAssembly&&te("no native wasm support detected");var k,F=new WebAssembly.Table({initial:9,maximum:9,element:"anyfunc"}),O=!1,R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function D(e,t){if(e){var n=L,r=e+t;for(t=e;n[t]&&!(t>=r);)++t;if(16<t-e&&n.subarray&&R)e=R.decode(n.subarray(e,t));else{for(r="";e<t;){var o=n[e++];if(128&o){var i=63&n[e++];if(192==(224&o))r+=String.fromCharCode((31&o)<<6|i);else{var a=63&n[e++];65536>(o=224==(240&o)?(15&o)<<12|i<<6|a:(7&o)<<18|i<<12|a<<6|63&n[e++])?r+=String.fromCharCode(o):(o-=65536,r+=String.fromCharCode(55296|o>>10,56320|1023&o))}}else r+=String.fromCharCode(o)}e=r}}else e="";return e}function I(e,t,n,r){if(!(0<r))return 0;var o=n;r=n+r-1;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),127>=a){if(n>=r)break;t[n++]=a}else{if(2047>=a){if(n+1>=r)break;t[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;t[n++]=224|a>>12}else{if(n+3>=r)break;t[n++]=240|a>>18,t[n++]=128|a>>12&63}t[n++]=128|a>>6&63}t[n++]=128|63&a}}return t[n]=0,n-o}function A(e){for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),127>=r?++t:t=2047>=r?t+2:65535>=r?t+3:t+4}return t}function N(e,t){for(var n=0;n<e.length;++n)P[t++>>0]=e.charCodeAt(n)}var M,P,L,j,U,B,G,V=i.INITIAL_MEMORY||262144;(k=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:V/65536,maximum:V/65536}))&&(M=k.buffer),V=M.byteLength;var q=M;function H(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(i);else{var n=t.Pb;"number"==typeof n?void 0===t.Ob?i.dynCall_v(n):i.dynCall_vi(n,t.Ob):n(void 0===t.Ob?null:t.Ob)}}}M=q,i.HEAP8=P=new Int8Array(q),i.HEAP16=j=new Int16Array(q),i.HEAP32=U=new Int32Array(q),i.HEAPU8=L=new Uint8Array(q),i.HEAPU16=new Uint16Array(q),i.HEAPU32=new Uint32Array(q),i.HEAPF32=B=new Float32Array(q),i.HEAPF64=G=new Float64Array(q),U[9592]=104064;var z=[],W=[],K=[],Y=[];function $(){var e=i.preRun.shift();z.unshift(e)}var Q=Math.abs,J=Math.ceil,X=(Math.floor,Math.min,0),Z=null,ee=null;function te(e){throw i.onAbort&&i.onAbort(e),w(e),C(e),O=!0,new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info.")}function ne(e){var t=ie;return String.prototype.startsWith?t.startsWith(e):0===t.indexOf(e)}function re(){return ne("data:application/octet-stream;base64,")}i.preloadedImages={},i.preloadedAudios={};var oe,ie="olm.wasm";if(!re()){var ae=ie;ie=i.locateFile?i.locateFile(ae,E):E+ae}function se(){try{if(S)return new Uint8Array(S);if(b)return b(ie);throw"both async and sync fetching of the wasm failed"}catch(e){te(e)}}W.push({Pb:function(){le()}});var ce={c:function(e,t,n,r){te("Assertion failed: "+D(e)+", at: "+[t?D(t):"unknown filename",n,r?D(r):"unknown function"])},a:function(e,t,n){L.copyWithin(e,t,t+n)},b:function(){te("OOM")},memory:k,table:F};!function(){function e(e){i.asm=e.exports,X--,i.monitorRunDependencies&&i.monitorRunDependencies(X),0==X&&(null!==Z&&(clearInterval(Z),Z=null),ee&&(e=ee,ee=null,e()))}function t(t){e(t.instance)}function n(e){return(S||!h&&!p||"function"!=typeof fetch||ne("file://")?new Promise((function(e){e(se())})):fetch(ie,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ie+"'";return e.arrayBuffer()})).catch((function(){return se()}))).then((function(e){return WebAssembly.instantiate(e,r)})).then(e,(function(e){C("failed to asynchronously prepare wasm: "+e),te(e)}))}var r={a:ce};if(X++,i.monitorRunDependencies&&i.monitorRunDependencies(X),i.instantiateWasm)try{return i.instantiateWasm(r,e)}catch(e){return C("Module.instantiateWasm callback failed with error: "+e),!1}!function(){if(S||"function"!=typeof WebAssembly.instantiateStreaming||re()||ne("file://")||"function"!=typeof fetch)return n(t);fetch(ie,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(e){return C("wasm streaming compile failed: "+e),C("falling back to ArrayBuffer instantiation"),n(t)}))}))}()}();var le=i.___wasm_call_ctors=function(){return(le=i.___wasm_call_ctors=i.asm.d).apply(null,arguments)};i._olm_get_library_version=function(){return(i._olm_get_library_version=i.asm.e).apply(null,arguments)},i._olm_error=function(){return(i._olm_error=i.asm.f).apply(null,arguments)},i._olm_account_last_error=function(){return(i._olm_account_last_error=i.asm.g).apply(null,arguments)},i._olm_session_last_error=function(){return(i._olm_session_last_error=i.asm.h).apply(null,arguments)},i._olm_utility_last_error=function(){return(i._olm_utility_last_error=i.asm.i).apply(null,arguments)},i._olm_account_size=function(){return(i._olm_account_size=i.asm.j).apply(null,arguments)},i._olm_session_size=function(){return(i._olm_session_size=i.asm.k).apply(null,arguments)},i._olm_utility_size=function(){return(i._olm_utility_size=i.asm.l).apply(null,arguments)},i._olm_account=function(){return(i._olm_account=i.asm.m).apply(null,arguments)},i._olm_session=function(){return(i._olm_session=i.asm.n).apply(null,arguments)},i._olm_utility=function(){return(i._olm_utility=i.asm.o).apply(null,arguments)},i._olm_clear_account=function(){return(i._olm_clear_account=i.asm.p).apply(null,arguments)},i._olm_clear_session=function(){return(i._olm_clear_session=i.asm.q).apply(null,arguments)},i._olm_clear_utility=function(){return(i._olm_clear_utility=i.asm.r).apply(null,arguments)},i._olm_pickle_account_length=function(){return(i._olm_pickle_account_length=i.asm.s).apply(null,arguments)},i._olm_pickle_session_length=function(){return(i._olm_pickle_session_length=i.asm.t).apply(null,arguments)},i._olm_pickle_account=function(){return(i._olm_pickle_account=i.asm.u).apply(null,arguments)},i._olm_pickle_session=function(){return(i._olm_pickle_session=i.asm.v).apply(null,arguments)},i._olm_unpickle_account=function(){return(i._olm_unpickle_account=i.asm.w).apply(null,arguments)},i._olm_unpickle_session=function(){return(i._olm_unpickle_session=i.asm.x).apply(null,arguments)},i._olm_create_account_random_length=function(){return(i._olm_create_account_random_length=i.asm.y).apply(null,arguments)},i._olm_create_account=function(){return(i._olm_create_account=i.asm.z).apply(null,arguments)},i._olm_account_identity_keys_length=function(){return(i._olm_account_identity_keys_length=i.asm.A).apply(null,arguments)},i._olm_account_identity_keys=function(){return(i._olm_account_identity_keys=i.asm.B).apply(null,arguments)},i._olm_account_signature_length=function(){return(i._olm_account_signature_length=i.asm.C).apply(null,arguments)},i._olm_account_sign=function(){return(i._olm_account_sign=i.asm.D).apply(null,arguments)},i._olm_account_one_time_keys_length=function(){return(i._olm_account_one_time_keys_length=i.asm.E).apply(null,arguments)},i._olm_account_one_time_keys=function(){return(i._olm_account_one_time_keys=i.asm.F).apply(null,arguments)},i._olm_account_mark_keys_as_published=function(){return(i._olm_account_mark_keys_as_published=i.asm.G).apply(null,arguments)},i._olm_account_max_number_of_one_time_keys=function(){return(i._olm_account_max_number_of_one_time_keys=i.asm.H).apply(null,arguments)},i._olm_account_generate_one_time_keys_random_length=function(){return(i._olm_account_generate_one_time_keys_random_length=i.asm.I).apply(null,arguments)},i._olm_account_generate_one_time_keys=function(){return(i._olm_account_generate_one_time_keys=i.asm.J).apply(null,arguments)},i._olm_account_generate_fallback_key_random_length=function(){return(i._olm_account_generate_fallback_key_random_length=i.asm.K).apply(null,arguments)},i._olm_account_generate_fallback_key=function(){return(i._olm_account_generate_fallback_key=i.asm.L).apply(null,arguments)},i._olm_account_fallback_key_length=function(){return(i._olm_account_fallback_key_length=i.asm.M).apply(null,arguments)},i._olm_account_fallback_key=function(){return(i._olm_account_fallback_key=i.asm.N).apply(null,arguments)},i._olm_create_outbound_session_random_length=function(){return(i._olm_create_outbound_session_random_length=i.asm.O).apply(null,arguments)},i._olm_create_outbound_session=function(){return(i._olm_create_outbound_session=i.asm.P).apply(null,arguments)},i._olm_create_inbound_session=function(){return(i._olm_create_inbound_session=i.asm.Q).apply(null,arguments)},i._olm_create_inbound_session_from=function(){return(i._olm_create_inbound_session_from=i.asm.R).apply(null,arguments)},i._olm_session_id_length=function(){return(i._olm_session_id_length=i.asm.S).apply(null,arguments)},i._olm_session_id=function(){return(i._olm_session_id=i.asm.T).apply(null,arguments)},i._olm_session_has_received_message=function(){return(i._olm_session_has_received_message=i.asm.U).apply(null,arguments)},i._olm_session_describe=function(){return(i._olm_session_describe=i.asm.V).apply(null,arguments)},i._olm_matches_inbound_session=function(){return(i._olm_matches_inbound_session=i.asm.W).apply(null,arguments)},i._olm_matches_inbound_session_from=function(){return(i._olm_matches_inbound_session_from=i.asm.X).apply(null,arguments)},i._olm_remove_one_time_keys=function(){return(i._olm_remove_one_time_keys=i.asm.Y).apply(null,arguments)},i._olm_encrypt_message_type=function(){return(i._olm_encrypt_message_type=i.asm.Z).apply(null,arguments)},i._olm_encrypt_random_length=function(){return(i._olm_encrypt_random_length=i.asm._).apply(null,arguments)},i._olm_encrypt_message_length=function(){return(i._olm_encrypt_message_length=i.asm.$).apply(null,arguments)},i._olm_encrypt=function(){return(i._olm_encrypt=i.asm.aa).apply(null,arguments)},i._olm_decrypt_max_plaintext_length=function(){return(i._olm_decrypt_max_plaintext_length=i.asm.ba).apply(null,arguments)},i._olm_decrypt=function(){return(i._olm_decrypt=i.asm.ca).apply(null,arguments)},i._olm_sha256_length=function(){return(i._olm_sha256_length=i.asm.da).apply(null,arguments)},i._olm_sha256=function(){return(i._olm_sha256=i.asm.ea).apply(null,arguments)},i._olm_ed25519_verify=function(){return(i._olm_ed25519_verify=i.asm.fa).apply(null,arguments)},i._olm_pk_encryption_last_error=function(){return(i._olm_pk_encryption_last_error=i.asm.ga).apply(null,arguments)},i._olm_pk_encryption_size=function(){return(i._olm_pk_encryption_size=i.asm.ha).apply(null,arguments)},i._olm_pk_encryption=function(){return(i._olm_pk_encryption=i.asm.ia).apply(null,arguments)},i._olm_clear_pk_encryption=function(){return(i._olm_clear_pk_encryption=i.asm.ja).apply(null,arguments)},i._olm_pk_encryption_set_recipient_key=function(){return(i._olm_pk_encryption_set_recipient_key=i.asm.ka).apply(null,arguments)},i._olm_pk_key_length=function(){return(i._olm_pk_key_length=i.asm.la).apply(null,arguments)},i._olm_pk_ciphertext_length=function(){return(i._olm_pk_ciphertext_length=i.asm.ma).apply(null,arguments)},i._olm_pk_mac_length=function(){return(i._olm_pk_mac_length=i.asm.na).apply(null,arguments)},i._olm_pk_encrypt_random_length=function(){return(i._olm_pk_encrypt_random_length=i.asm.oa).apply(null,arguments)},i._olm_pk_encrypt=function(){return(i._olm_pk_encrypt=i.asm.pa).apply(null,arguments)},i._olm_pk_decryption_last_error=function(){return(i._olm_pk_decryption_last_error=i.asm.qa).apply(null,arguments)},i._olm_pk_decryption_size=function(){return(i._olm_pk_decryption_size=i.asm.ra).apply(null,arguments)},i._olm_pk_decryption=function(){return(i._olm_pk_decryption=i.asm.sa).apply(null,arguments)},i._olm_clear_pk_decryption=function(){return(i._olm_clear_pk_decryption=i.asm.ta).apply(null,arguments)},i._olm_pk_private_key_length=function(){return(i._olm_pk_private_key_length=i.asm.ua).apply(null,arguments)},i._olm_pk_generate_key_random_length=function(){return(i._olm_pk_generate_key_random_length=i.asm.va).apply(null,arguments)},i._olm_pk_key_from_private=function(){return(i._olm_pk_key_from_private=i.asm.wa).apply(null,arguments)},i._olm_pk_generate_key=function(){return(i._olm_pk_generate_key=i.asm.xa).apply(null,arguments)},i._olm_pickle_pk_decryption_length=function(){return(i._olm_pickle_pk_decryption_length=i.asm.ya).apply(null,arguments)},i._olm_pickle_pk_decryption=function(){return(i._olm_pickle_pk_decryption=i.asm.za).apply(null,arguments)},i._olm_unpickle_pk_decryption=function(){return(i._olm_unpickle_pk_decryption=i.asm.Aa).apply(null,arguments)},i._olm_pk_max_plaintext_length=function(){return(i._olm_pk_max_plaintext_length=i.asm.Ba).apply(null,arguments)},i._olm_pk_decrypt=function(){return(i._olm_pk_decrypt=i.asm.Ca).apply(null,arguments)},i._olm_pk_get_private_key=function(){return(i._olm_pk_get_private_key=i.asm.Da).apply(null,arguments)},i._olm_pk_signing_size=function(){return(i._olm_pk_signing_size=i.asm.Ea).apply(null,arguments)},i._olm_pk_signing=function(){return(i._olm_pk_signing=i.asm.Fa).apply(null,arguments)},i._olm_pk_signing_last_error=function(){return(i._olm_pk_signing_last_error=i.asm.Ga).apply(null,arguments)},i._olm_clear_pk_signing=function(){return(i._olm_clear_pk_signing=i.asm.Ha).apply(null,arguments)},i._olm_pk_signing_seed_length=function(){return(i._olm_pk_signing_seed_length=i.asm.Ia).apply(null,arguments)},i._olm_pk_signing_public_key_length=function(){return(i._olm_pk_signing_public_key_length=i.asm.Ja).apply(null,arguments)},i._olm_pk_signing_key_from_seed=function(){return(i._olm_pk_signing_key_from_seed=i.asm.Ka).apply(null,arguments)},i._olm_pk_signature_length=function(){return(i._olm_pk_signature_length=i.asm.La).apply(null,arguments)},i._olm_pk_sign=function(){return(i._olm_pk_sign=i.asm.Ma).apply(null,arguments)},i._olm_inbound_group_session_size=function(){return(i._olm_inbound_group_session_size=i.asm.Na).apply(null,arguments)},i._olm_inbound_group_session=function(){return(i._olm_inbound_group_session=i.asm.Oa).apply(null,arguments)},i._olm_clear_inbound_group_session=function(){return(i._olm_clear_inbound_group_session=i.asm.Pa).apply(null,arguments)},i._olm_inbound_group_session_last_error=function(){return(i._olm_inbound_group_session_last_error=i.asm.Qa).apply(null,arguments)},i._olm_init_inbound_group_session=function(){return(i._olm_init_inbound_group_session=i.asm.Ra).apply(null,arguments)},i._olm_import_inbound_group_session=function(){return(i._olm_import_inbound_group_session=i.asm.Sa).apply(null,arguments)},i._olm_pickle_inbound_group_session_length=function(){return(i._olm_pickle_inbound_group_session_length=i.asm.Ta).apply(null,arguments)},i._olm_pickle_inbound_group_session=function(){return(i._olm_pickle_inbound_group_session=i.asm.Ua).apply(null,arguments)},i._olm_unpickle_inbound_group_session=function(){return(i._olm_unpickle_inbound_group_session=i.asm.Va).apply(null,arguments)},i._olm_group_decrypt_max_plaintext_length=function(){return(i._olm_group_decrypt_max_plaintext_length=i.asm.Wa).apply(null,arguments)},i._olm_group_decrypt=function(){return(i._olm_group_decrypt=i.asm.Xa).apply(null,arguments)},i._olm_inbound_group_session_id_length=function(){return(i._olm_inbound_group_session_id_length=i.asm.Ya).apply(null,arguments)},i._olm_inbound_group_session_id=function(){return(i._olm_inbound_group_session_id=i.asm.Za).apply(null,arguments)},i._olm_inbound_group_session_first_known_index=function(){return(i._olm_inbound_group_session_first_known_index=i.asm._a).apply(null,arguments)},i._olm_inbound_group_session_is_verified=function(){return(i._olm_inbound_group_session_is_verified=i.asm.$a).apply(null,arguments)},i._olm_export_inbound_group_session_length=function(){return(i._olm_export_inbound_group_session_length=i.asm.ab).apply(null,arguments)},i._olm_export_inbound_group_session=function(){return(i._olm_export_inbound_group_session=i.asm.bb).apply(null,arguments)},i._olm_sas_last_error=function(){return(i._olm_sas_last_error=i.asm.cb).apply(null,arguments)},i._olm_sas_size=function(){return(i._olm_sas_size=i.asm.db).apply(null,arguments)},i._olm_sas=function(){return(i._olm_sas=i.asm.eb).apply(null,arguments)},i._olm_clear_sas=function(){return(i._olm_clear_sas=i.asm.fb).apply(null,arguments)},i._olm_create_sas_random_length=function(){return(i._olm_create_sas_random_length=i.asm.gb).apply(null,arguments)},i._olm_create_sas=function(){return(i._olm_create_sas=i.asm.hb).apply(null,arguments)},i._olm_sas_pubkey_length=function(){return(i._olm_sas_pubkey_length=i.asm.ib).apply(null,arguments)},i._olm_sas_get_pubkey=function(){return(i._olm_sas_get_pubkey=i.asm.jb).apply(null,arguments)},i._olm_sas_set_their_key=function(){return(i._olm_sas_set_their_key=i.asm.kb).apply(null,arguments)},i._olm_sas_is_their_key_set=function(){return(i._olm_sas_is_their_key_set=i.asm.lb).apply(null,arguments)},i._olm_sas_generate_bytes=function(){return(i._olm_sas_generate_bytes=i.asm.mb).apply(null,arguments)},i._olm_sas_mac_length=function(){return(i._olm_sas_mac_length=i.asm.nb).apply(null,arguments)},i._olm_sas_calculate_mac_fixed_base64=function(){return(i._olm_sas_calculate_mac_fixed_base64=i.asm.ob).apply(null,arguments)},i._olm_sas_calculate_mac=function(){return(i._olm_sas_calculate_mac=i.asm.pb).apply(null,arguments)},i._olm_sas_calculate_mac_long_kdf=function(){return(i._olm_sas_calculate_mac_long_kdf=i.asm.qb).apply(null,arguments)},i._olm_outbound_group_session_size=function(){return(i._olm_outbound_group_session_size=i.asm.rb).apply(null,arguments)},i._olm_outbound_group_session=function(){return(i._olm_outbound_group_session=i.asm.sb).apply(null,arguments)},i._olm_clear_outbound_group_session=function(){return(i._olm_clear_outbound_group_session=i.asm.tb).apply(null,arguments)},i._olm_outbound_group_session_last_error=function(){return(i._olm_outbound_group_session_last_error=i.asm.ub).apply(null,arguments)},i._olm_pickle_outbound_group_session_length=function(){return(i._olm_pickle_outbound_group_session_length=i.asm.vb).apply(null,arguments)},i._olm_pickle_outbound_group_session=function(){return(i._olm_pickle_outbound_group_session=i.asm.wb).apply(null,arguments)},i._olm_unpickle_outbound_group_session=function(){return(i._olm_unpickle_outbound_group_session=i.asm.xb).apply(null,arguments)},i._olm_init_outbound_group_session_random_length=function(){return(i._olm_init_outbound_group_session_random_length=i.asm.yb).apply(null,arguments)},i._olm_init_outbound_group_session=function(){return(i._olm_init_outbound_group_session=i.asm.zb).apply(null,arguments)},i._olm_group_encrypt_message_length=function(){return(i._olm_group_encrypt_message_length=i.asm.Ab).apply(null,arguments)},i._olm_group_encrypt=function(){return(i._olm_group_encrypt=i.asm.Bb).apply(null,arguments)},i._olm_outbound_group_session_id_length=function(){return(i._olm_outbound_group_session_id_length=i.asm.Cb).apply(null,arguments)},i._olm_outbound_group_session_id=function(){return(i._olm_outbound_group_session_id=i.asm.Db).apply(null,arguments)},i._olm_outbound_group_session_message_index=function(){return(i._olm_outbound_group_session_message_index=i.asm.Eb).apply(null,arguments)},i._olm_outbound_group_session_key_length=function(){return(i._olm_outbound_group_session_key_length=i.asm.Fb).apply(null,arguments)},i._olm_outbound_group_session_key=function(){return(i._olm_outbound_group_session_key=i.asm.Gb).apply(null,arguments)},i._malloc=function(){return(i._malloc=i.asm.Hb).apply(null,arguments)},i._free=function(){return(i._free=i.asm.Ib).apply(null,arguments)};var ue,de=i.stackSave=function(){return(de=i.stackSave=i.asm.Jb).apply(null,arguments)},he=i.stackRestore=function(){return(he=i.stackRestore=i.asm.Kb).apply(null,arguments)},pe=i.stackAlloc=function(){return(pe=i.stackAlloc=i.asm.Lb).apply(null,arguments)};function me(){function e(){if(!ue&&(ue=!0,i.calledRun=!0,!O)){if(H(W),H(K),s(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var e=i.postRun.shift();Y.unshift(e)}H(Y)}}if(!(0<X)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)$();H(z),0<X||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e())}}if(i.ALLOC_STACK=1,ee=function e(){ue||me(),ue||(ee=e)},i.run=me,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0<i.preInit.length;)i.preInit.pop()();function ge(){var e=i._olm_outbound_group_session_size();this.Nb=Fe(e),this.Mb=i._olm_outbound_group_session(this.Nb)}function fe(e){return function(){var t=e.apply(this,arguments);if(t===ke)throw t=D(i._olm_outbound_group_session_last_error(arguments[0])),Error("OLM."+t);return t}}function _e(){var e=i._olm_inbound_group_session_size();this.Nb=Fe(e),this.Mb=i._olm_inbound_group_session(this.Nb)}function be(e){return function(){var t=e.apply(this,arguments);if(t===ke)throw t=D(i._olm_inbound_group_session_last_error(arguments[0])),Error("OLM."+t);return t}}function ve(){var e=i._olm_pk_encryption_size();this.Nb=Fe(e),this.Mb=i._olm_pk_encryption(this.Nb)}function ye(e){return function(){var t=e.apply(this,arguments);if(t===ke)throw t=D(i._olm_pk_encryption_last_error(arguments[0])),Error("OLM."+t);return t}}function Ee(){var e=i._olm_pk_decryption_size();this.Nb=Fe(e),this.Mb=i._olm_pk_decryption(this.Nb)}function Se(e){return function(){var t=e.apply(this,arguments);if(t===ke)throw t=D(i._olm_pk_decryption_last_error(arguments[0])),Error("OLM."+t);return t}}function we(){var e=i._olm_pk_signing_size();this.Nb=Fe(e),this.Mb=i._olm_pk_signing(this.Nb)}function Ce(e){return function(){var t=e.apply(this,arguments);if(t===ke)throw t=D(i._olm_pk_signing_last_error(arguments[0])),Error("OLM."+t);return t}}function Te(){var e=i._olm_sas_size(),t=i._olm_create_sas_random_length(),n=Re(t,c);this.Nb=Fe(e),this.Mb=i._olm_sas(this.Nb),i._olm_create_sas(this.Mb,n,t),Ne(n,t)}function xe(e){return function(){var t=e.apply(this,arguments);if(t===ke)throw t=D(i._olm_sas_last_error(arguments[0])),Error("OLM."+t);return t}}me(),ge.prototype.free=function(){i._olm_clear_outbound_group_session(this.Mb),Oe(this.Mb)},ge.prototype.pickle=Ae((function(e){e=Ie(e);var t=fe(i._olm_pickle_outbound_group_session_length)(this.Mb),n=De(e),r=De(t+1);try{fe(i._olm_pickle_outbound_group_session)(this.Mb,n,e.length,r,t)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}return D(r,t)})),ge.prototype.unpickle=Ae((function(e,t){var n=De(e=Ie(e)),r=De(t=Ie(t));try{fe(i._olm_unpickle_outbound_group_session)(this.Mb,n,e.length,r,t.length)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}})),ge.prototype.create=Ae((function(){var e=fe(i._olm_init_outbound_group_session_random_length)(this.Mb),t=Re(e,c);fe(i._olm_init_outbound_group_session)(this.Mb,t,e)})),ge.prototype.encrypt=function(e){try{var t=A(e),n=fe(i._olm_group_encrypt_message_length)(this.Mb,t),r=Fe(t+1);I(e,L,r,t+1);var o=Fe(n+1);return fe(i._olm_group_encrypt)(this.Mb,r,t,o,n),T(o+n),D(o,n)}finally{void 0!==r&&(Ne(r,t+1),Oe(r)),void 0!==o&&Oe(o)}},ge.prototype.session_id=Ae((function(){var e=fe(i._olm_outbound_group_session_id_length)(this.Mb),t=De(e+1);return fe(i._olm_outbound_group_session_id)(this.Mb,t,e),D(t,e)})),ge.prototype.session_key=Ae((function(){var e=fe(i._olm_outbound_group_session_key_length)(this.Mb),t=De(e+1);fe(i._olm_outbound_group_session_key)(this.Mb,t,e);var n=D(t,e);return Ne(t,e),n})),ge.prototype.message_index=function(){return fe(i._olm_outbound_group_session_message_index)(this.Mb)},a.OutboundGroupSession=ge,_e.prototype.free=function(){i._olm_clear_inbound_group_session(this.Mb),Oe(this.Mb)},_e.prototype.pickle=Ae((function(e){e=Ie(e);var t=be(i._olm_pickle_inbound_group_session_length)(this.Mb),n=De(e),r=De(t+1);try{be(i._olm_pickle_inbound_group_session)(this.Mb,n,e.length,r,t)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}return D(r,t)})),_e.prototype.unpickle=Ae((function(e,t){var n=De(e=Ie(e)),r=De(t=Ie(t));try{be(i._olm_unpickle_inbound_group_session)(this.Mb,n,e.length,r,t.length)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}})),_e.prototype.create=Ae((function(e){var t=De(e=Ie(e));try{be(i._olm_init_inbound_group_session)(this.Mb,t,e.length)}finally{for(Ne(t,e.length),t=0;t<e.length;t++)e[t]=0}})),_e.prototype.import_session=Ae((function(e){var t=De(e=Ie(e));try{be(i._olm_import_inbound_group_session)(this.Mb,t,e.length)}finally{for(Ne(t,e.length),t=0;t<e.length;t++)e[t]=0}})),_e.prototype.decrypt=Ae((function(e){try{var t=Fe(e.length);N(e,t);var n=be(i._olm_group_decrypt_max_plaintext_length)(this.Mb,t,e.length);N(e,t);var r=Fe(n+1),o=De(4),a=be(i._olm_group_decrypt)(this.Mb,t,e.length,r,n,o);return T(r+a),{plaintext:D(r,a),message_index:x(o,"i32")}}finally{void 0!==t&&Oe(t),void 0!==r&&(Ne(r,a),Oe(r))}})),_e.prototype.session_id=Ae((function(){var e=be(i._olm_inbound_group_session_id_length)(this.Mb),t=De(e+1);return be(i._olm_inbound_group_session_id)(this.Mb,t,e),D(t,e)})),_e.prototype.first_known_index=Ae((function(){return be(i._olm_inbound_group_session_first_known_index)(this.Mb)})),_e.prototype.export_session=Ae((function(e){var t=be(i._olm_export_inbound_group_session_length)(this.Mb),n=De(t+1);return fe(i._olm_export_inbound_group_session)(this.Mb,n,t,e),e=D(n,t),Ne(n,t),e})),a.InboundGroupSession=_e,ve.prototype.free=function(){i._olm_clear_pk_encryption(this.Mb),Oe(this.Mb)},ve.prototype.set_recipient_key=Ae((function(e){var t=De(e=Ie(e));ye(i._olm_pk_encryption_set_recipient_key)(this.Mb,t,e.length)})),ve.prototype.encrypt=Ae((function(e){try{var t=A(e),n=Fe(t+1);I(e,L,n,t+1);var r=ye(i._olm_pk_encrypt_random_length)(),o=Re(r,c),a=ye(i._olm_pk_ciphertext_length)(this.Mb,t),s=Fe(a+1),l=ye(i._olm_pk_mac_length)(this.Mb),u=De(l+1);T(u+l);var d=ye(i._olm_pk_key_length)(),h=De(d+1);return T(h+d),ye(i._olm_pk_encrypt)(this.Mb,n,t,s,a,u,l,h,d,o,r),T(s+a),{ciphertext:D(s,a),mac:D(u,l),ephemeral:D(h,d)}}finally{void 0!==o&&Ne(o,r),void 0!==n&&(Ne(n,t+1),Oe(n)),void 0!==s&&Oe(s)}})),Ee.prototype.free=function(){i._olm_clear_pk_decryption(this.Mb),Oe(this.Mb)},Ee.prototype.init_with_private_key=Ae((function(e){var t=De(e.length);i.HEAPU8.set(e,t);var n=Se(i._olm_pk_key_length)(),r=De(n+1);try{Se(i._olm_pk_key_from_private)(this.Mb,r,n,t,e.length)}finally{Ne(t,e.length)}return D(r,n)})),Ee.prototype.generate_key=Ae((function(){var e=Se(i._olm_pk_private_key_length)(),t=Re(e,c),n=Se(i._olm_pk_key_length)(),r=De(n+1);try{Se(i._olm_pk_key_from_private)(this.Mb,r,n,t,e)}finally{Ne(t,e)}return D(r,n)})),Ee.prototype.get_private_key=Ae((function(){var e=ye(i._olm_pk_private_key_length)(),t=De(e);Se(i._olm_pk_get_private_key)(this.Mb,t,e);var n=new Uint8Array(new Uint8Array(i.HEAPU8.buffer,t,e));return Ne(t,e),n})),Ee.prototype.pickle=Ae((function(e){e=Ie(e);var t=Se(i._olm_pickle_pk_decryption_length)(this.Mb),n=De(e),r=De(t+1);try{Se(i._olm_pickle_pk_decryption)(this.Mb,n,e.length,r,t)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}return D(r,t)})),Ee.prototype.unpickle=Ae((function(e,t){var n=De(e=Ie(e)),r=Ie(t),o=De(r),a=De((t=Se(i._olm_pk_key_length)())+1);try{Se(i._olm_unpickle_pk_decryption)(this.Mb,n,e.length,o,r.length,a,t)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}return D(a,t)})),Ee.prototype.decrypt=Ae((function(e,t,n){try{var r=A(n),o=Fe(r+1);I(n,L,o,r+1);var a=Ie(e),s=De(a),c=Ie(t),l=De(c),u=Se(i._olm_pk_max_plaintext_length)(this.Mb,r),d=Fe(u+1),h=Se(i._olm_pk_decrypt)(this.Mb,s,a.length,l,c.length,o,r,d,u);return T(d+h),D(d,h)}finally{void 0!==d&&(Ne(d,h+1),Oe(d)),void 0!==o&&Oe(o)}})),we.prototype.free=function(){i._olm_clear_pk_signing(this.Mb),Oe(this.Mb)},we.prototype.init_with_seed=Ae((function(e){var t=De(e.length);i.HEAPU8.set(e,t);var n=Ce(i._olm_pk_signing_public_key_length)(),r=De(n+1);try{Ce(i._olm_pk_signing_key_from_seed)(this.Mb,r,n,t,e.length)}finally{Ne(t,e.length)}return D(r,n)})),we.prototype.generate_seed=Ae((function(){var e=Ce(i._olm_pk_signing_seed_length)(),t=Re(e,c),n=new Uint8Array(new Uint8Array(i.HEAPU8.buffer,t,e));return Ne(t,e),n})),we.prototype.sign=Ae((function(e){try{var t=A(e),n=Fe(t+1);I(e,L,n,t+1);var r=Ce(i._olm_pk_signature_length)(),o=De(r+1);return Ce(i._olm_pk_sign)(this.Mb,n,t,o,r),D(o,r)}finally{void 0!==n&&(Ne(n,t+1),Oe(n))}})),Te.prototype.free=function(){i._olm_clear_sas(this.Mb),Oe(this.Mb)},Te.prototype.get_pubkey=Ae((function(){var e=xe(i._olm_sas_pubkey_length)(this.Mb),t=De(e+1);return xe(i._olm_sas_get_pubkey)(this.Mb,t,e),D(t,e)})),Te.prototype.set_their_key=Ae((function(e){var t=De(e=Ie(e));xe(i._olm_sas_set_their_key)(this.Mb,t,e.length)})),Te.prototype.is_their_key_set=Ae((function(){return!!xe(i._olm_sas_is_their_key_set)(this.Mb)})),Te.prototype.generate_bytes=Ae((function(e,t){var n=De(e=Ie(e)),r=De(t);return xe(i._olm_sas_generate_bytes)(this.Mb,n,e.length,r,t),new Uint8Array(new Uint8Array(i.HEAPU8.buffer,r,t))})),Te.prototype.calculate_mac=Ae((function(e,t){var n=De(e=Ie(e)),r=De(t=Ie(t)),o=xe(i._olm_sas_mac_length)(this.Mb),a=De(o+1);return xe(i._olm_sas_calculate_mac)(this.Mb,n,e.length,r,t.length,a,o),D(a,o)})),Te.prototype.calculate_mac_long_kdf=Ae((function(e,t){var n=De(e=Ie(e)),r=De(t=Ie(t)),o=xe(i._olm_sas_mac_length)(this.Mb),a=De(o+1);return xe(i._olm_sas_calculate_mac_long_kdf)(this.Mb,n,e.length,r,t.length,a,o),D(a,o)}));var ke,Fe=i._malloc,Oe=i._free;function Re(e,t){var n=pe(e);return t(new Uint8Array(i.HEAPU8.buffer,n,e)),n}function De(e){return"number"==typeof e?Re(e,(function(e){e.fill(0)})):Re(e.length,(function(t){t.set(e)}))}function Ie(e){if(e instanceof Uint8Array)var t=e;else e=I(e,t=Array(A(e)+1),0,t.length),t.length=e;return t}function Ae(e){return function(){var t=de();try{return e.apply(this,arguments)}finally{he(t)}}}function Ne(e,t){for(;0<t--;)i.HEAP8[e++]=0}function Me(){var e=i._olm_account_size();this.Nb=Fe(e),this.Mb=i._olm_account(this.Nb)}function Pe(e){return function(){var t=e.apply(this,arguments);if(t===ke)throw t=D(i._olm_account_last_error(arguments[0])),Error("OLM."+t);return t}}function Le(){var e=i._olm_session_size();this.Nb=Fe(e),this.Mb=i._olm_session(this.Nb)}function je(e){return function(){var t=e.apply(this,arguments);if(t===ke)throw t=D(i._olm_session_last_error(arguments[0])),Error("OLM."+t);return t}}function Ue(){var e=i._olm_utility_size();this.Nb=Fe(e),this.Mb=i._olm_utility(this.Nb)}function Be(e){return function(){var t=e.apply(this,arguments);if(t===ke)throw t=D(i._olm_utility_last_error(arguments[0])),Error("OLM."+t);return t}}return Me.prototype.free=function(){i._olm_clear_account(this.Mb),Oe(this.Mb)},Me.prototype.create=Ae((function(){var e=Pe(i._olm_create_account_random_length)(this.Mb),t=Re(e,c);Pe(i._olm_create_account)(this.Mb,t,e)})),Me.prototype.identity_keys=Ae((function(){var e=Pe(i._olm_account_identity_keys_length)(this.Mb),t=De(e+1);return Pe(i._olm_account_identity_keys)(this.Mb,t,e),D(t,e)})),Me.prototype.sign=Ae((function(e){var t=Pe(i._olm_account_signature_length)(this.Mb),n=De(e=Ie(e)),r=De(t+1);try{Pe(i._olm_account_sign)(this.Mb,n,e.length,r,t)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}return D(r,t)})),Me.prototype.one_time_keys=Ae((function(){var e=Pe(i._olm_account_one_time_keys_length)(this.Mb),t=De(e+1);return Pe(i._olm_account_one_time_keys)(this.Mb,t,e),D(t,e)})),Me.prototype.mark_keys_as_published=Ae((function(){Pe(i._olm_account_mark_keys_as_published)(this.Mb)})),Me.prototype.max_number_of_one_time_keys=Ae((function(){return Pe(i._olm_account_max_number_of_one_time_keys)(this.Mb)})),Me.prototype.generate_one_time_keys=Ae((function(e){var t=Pe(i._olm_account_generate_one_time_keys_random_length)(this.Mb,e),n=Re(t,c);Pe(i._olm_account_generate_one_time_keys)(this.Mb,e,n,t)})),Me.prototype.remove_one_time_keys=Ae((function(e){Pe(i._olm_remove_one_time_keys)(this.Mb,e.Mb)})),Me.prototype.generate_fallback_key=Ae((function(){var e=Pe(i._olm_account_generate_fallback_key_random_length)(this.Mb),t=Re(e,c);Pe(i._olm_account_generate_fallback_key)(this.Mb,t,e)})),Me.prototype.fallback_key=Ae((function(){var e=Pe(i._olm_account_fallback_key_length)(this.Mb),t=De(e+1);return Pe(i._olm_account_fallback_key)(this.Mb,t,e),D(t,e)})),Me.prototype.pickle=Ae((function(e){e=Ie(e);var t=Pe(i._olm_pickle_account_length)(this.Mb),n=De(e),r=De(t+1);try{Pe(i._olm_pickle_account)(this.Mb,n,e.length,r,t)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}return D(r,t)})),Me.prototype.unpickle=Ae((function(e,t){var n=De(e=Ie(e)),r=De(t=Ie(t));try{Pe(i._olm_unpickle_account)(this.Mb,n,e.length,r,t.length)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}})),Le.prototype.free=function(){i._olm_clear_session(this.Mb),Oe(this.Mb)},Le.prototype.pickle=Ae((function(e){e=Ie(e);var t=je(i._olm_pickle_session_length)(this.Mb),n=De(e),r=De(t+1);try{je(i._olm_pickle_session)(this.Mb,n,e.length,r,t)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}return D(r,t)})),Le.prototype.unpickle=Ae((function(e,t){var n=De(e=Ie(e)),r=De(t=Ie(t));try{je(i._olm_unpickle_session)(this.Mb,n,e.length,r,t.length)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}})),Le.prototype.create_outbound=Ae((function(e,t,n){var r=je(i._olm_create_outbound_session_random_length)(this.Mb),o=Re(r,c);t=Ie(t),n=Ie(n);var a=De(t),s=De(n);try{je(i._olm_create_outbound_session)(this.Mb,e.Mb,a,t.length,s,n.length,o,r)}finally{Ne(o,r)}})),Le.prototype.create_inbound=Ae((function(e,t){var n=De(t=Ie(t));try{je(i._olm_create_inbound_session)(this.Mb,e.Mb,n,t.length)}finally{for(Ne(n,t.length),e=0;e<t.length;e++)t[e]=0}})),Le.prototype.create_inbound_from=Ae((function(e,t,n){var r=De(t=Ie(t)),o=De(n=Ie(n));try{je(i._olm_create_inbound_session_from)(this.Mb,e.Mb,r,t.length,o,n.length)}finally{for(Ne(o,n.length),e=0;e<n.length;e++)n[e]=0}})),Le.prototype.session_id=Ae((function(){var e=je(i._olm_session_id_length)(this.Mb),t=De(e+1);return je(i._olm_session_id)(this.Mb,t,e),D(t,e)})),Le.prototype.has_received_message=function(){return!!je(i._olm_session_has_received_message)(this.Mb)},Le.prototype.matches_inbound=Ae((function(e){var t=De(e=Ie(e));return!!je(i._olm_matches_inbound_session)(this.Mb,t,e.length)})),Le.prototype.matches_inbound_from=Ae((function(e,t){var n=De(e=Ie(e)),r=De(t=Ie(t));return!!je(i._olm_matches_inbound_session_from)(this.Mb,n,e.length,r,t.length)})),Le.prototype.encrypt=Ae((function(e){try{var t=je(i._olm_encrypt_random_length)(this.Mb),n=je(i._olm_encrypt_message_type)(this.Mb),r=A(e),o=je(i._olm_encrypt_message_length)(this.Mb,r),a=Re(t,c),s=Fe(r+1);I(e,L,s,r+1);var l=Fe(o+1);return je(i._olm_encrypt)(this.Mb,s,r,a,t,l,o),T(l+o),{type:n,body:D(l,o)}}finally{void 0!==a&&Ne(a,t),void 0!==s&&(Ne(s,r+1),Oe(s)),void 0!==l&&Oe(l)}})),Le.prototype.decrypt=Ae((function(e,t){try{var n=Fe(t.length);N(t,n);var r=je(i._olm_decrypt_max_plaintext_length)(this.Mb,e,n,t.length);N(t,n);var o=Fe(r+1),a=je(i._olm_decrypt)(this.Mb,e,n,t.length,o,r);return T(o+a),D(o,a)}finally{void 0!==n&&Oe(n),void 0!==o&&(Ne(o,r),Oe(o))}})),Le.prototype.describe=Ae((function(){try{var e=Fe(256);return je(i._olm_session_describe)(this.Mb,e,256),D(e)}finally{void 0!==e&&Oe(e)}})),Ue.prototype.free=function(){i._olm_clear_utility(this.Mb),Oe(this.Mb)},Ue.prototype.sha256=Ae((function(e){var t=Be(i._olm_sha256_length)(this.Mb),n=De(e=Ie(e)),r=De(t+1);try{Be(i._olm_sha256)(this.Mb,n,e.length,r,t)}finally{for(Ne(n,e.length),n=0;n<e.length;n++)e[n]=0}return D(r,t)})),Ue.prototype.ed25519_verify=Ae((function(e,t,n){var r=De(e=Ie(e)),o=De(t=Ie(t)),a=De(n=Ie(n));try{Be(i._olm_ed25519_verify)(this.Mb,r,e.length,o,t.length,a,n.length)}finally{for(Ne(o,t.length),e=0;e<t.length;e++)t[e]=0}})),a.Account=Me,a.Session=Le,a.Utility=Ue,a.PkEncryption=ve,a.PkDecryption=Ee,a.PkSigning=we,a.SAS=Te,a.get_library_version=Ae((function(){var e=De(3);return i._olm_get_library_version(e,e+1,e+2),[x(e,"i8"),x(e+1,"i8"),x(e+2,"i8")]})),t.ready},"object"==typeof t&&"object"==typeof e?e.exports=s:"function"==typeof define&&define.amd?define([],(function(){return s})):"object"==typeof t&&(t.Module=s),a.init=function(e){return i||(e&&(OLM_OPTIONS=e),i=new Promise((function(e,t){n=function(){e()},r=function(e){t(e)},s()})))},a);"undefined"!=typeof window&&(window.Olm=c),"object"==typeof e&&(e.exports=c)},function(e,t,n){"use strict";(function(){var e=n(78),r=n(370),o=n(900),i=n(902),a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function s(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];l("warn",e,n)}function c(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];l("error",e,n)}function l(e,t,n){var r=a.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return""+e}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}if(!e)throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");var u=new Set,d={},h={};function p(e,t){m(e,t),m(e+"Capture",t)}function m(e,t){d[e]&&c("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),d[e]=t;var n=e.toLowerCase();h[n]=e,"onDoubleClick"===e&&(h.ondblclick=e);for(var r=0;r<t.length;r++)u.add(t[r])}var g=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),f=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",_=f+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",b=new RegExp("^["+f+"]["+_+"]*$"),v=Object.prototype.hasOwnProperty,y={},E={};function S(e){return!!v.call(E,e)||!v.call(y,e)&&(b.test(e)?(E[e]=!0,!0):(y[e]=!0,c("Invalid attribute name: `%s`",e),!1))}function w(e,t,n){return null!==t?0===t.type:!n&&(e.length>2&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1]))}function C(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":if(r)return!1;if(null!==n)return!n.acceptsBooleans;var o=e.toLowerCase().slice(0,5);return"data-"!==o&&"aria-"!==o;default:return!1}}function T(e,t,n,r){if(null==t)return!0;if(C(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||t<1}return!1}function x(e){return F.hasOwnProperty(e)?F[e]:null}function k(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var F={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){F[e]=new k(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0],n=e[1];F[t]=new k(t,1,!1,n,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){F[e]=new k(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){F[e]=new k(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((function(e){F[e]=new k(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){F[e]=new k(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){F[e]=new k(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){F[e]=new k(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){F[e]=new k(e,5,!1,e.toLowerCase(),null,!1,!1)}));var O=/[\-\:]([a-z])/g,R=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((function(e){var t=e.replace(O,R);F[t]=new k(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(O,R);F[t]=new k(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(O,R);F[t]=new k(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){F[e]=new k(e,1,!1,e.toLowerCase(),null,!1,!1)}));F.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){F[e]=new k(e,1,!1,e.toLowerCase(),null,!0,!0)}));var D=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,I=!1;function A(e){!I&&D.test(e)&&(I=!0,c("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function N(e,t,n,r){if(r.mustUseProperty)return e[r.propertyName];r.sanitizeURL&&A(""+n);var o=r.attributeName,i=null;if(4===r.type){if(e.hasAttribute(o)){var a=e.getAttribute(o);return""===a||(T(t,n,r,!1)?a:a===""+n?n:a)}}else if(e.hasAttribute(o)){if(T(t,n,r,!1))return e.getAttribute(o);if(3===r.type)return n;i=e.getAttribute(o)}return T(t,n,r,!1)?null===i?n:i:i===""+n?n:i}function M(e,t,n){if(S(t)){if(function(e){return null!==e&&"object"==typeof e&&e.$$typeof===J}(n))return n;if(!e.hasAttribute(t))return void 0===n?void 0:null;var r=e.getAttribute(t);return r===""+n?n:r}}function P(e,t,n,r){var o=x(t);if(!w(t,o,r))if(T(t,n,o,r)&&(n=null),r||null===o){if(S(t)){var i=t;null===n?e.removeAttribute(i):e.setAttribute(i,""+n)}}else if(o.mustUseProperty){var a=o.propertyName;if(null===n){var s=o.type;e[a]=3!==s&&""}else e[a]=n}else{var c=o.attributeName,l=o.attributeNamespace;if(null===n)e.removeAttribute(c);else{var u,d=o.type;3===d||4===d&&!0===n?u="":(u=""+n,o.sanitizeURL&&A(u.toString())),l?e.setAttributeNS(l,c,u):e.setAttribute(c,u)}}}var L=60103,j=60106,U=60107,B=60108,G=60114,V=60109,q=60110,H=60112,z=60113,W=60120,K=60115,Y=60116,$=60121,Q=60119,J=60128,X=60129,Z=60130,ee=60131;if("function"==typeof Symbol&&Symbol.for){var te=Symbol.for;L=te("react.element"),j=te("react.portal"),U=te("react.fragment"),B=te("react.strict_mode"),G=te("react.profiler"),V=te("react.provider"),q=te("react.context"),H=te("react.forward_ref"),z=te("react.suspense"),W=te("react.suspense_list"),K=te("react.memo"),Y=te("react.lazy"),$=te("react.block"),te("react.server.block"),te("react.fundamental"),Q=te("react.scope"),J=te("react.opaque.id"),X=te("react.debug_trace_mode"),Z=te("react.offscreen"),ee=te("react.legacy_hidden")}var ne="function"==typeof Symbol&&Symbol.iterator;function re(e){if(null===e||"object"!=typeof e)return null;var t=ne&&e[ne]||e["@@iterator"];return"function"==typeof t?t:null}var oe,ie,ae,se,ce,le,ue,de=0;function he(){}function pe(){if(0===de){oe=console.log,ie=console.info,ae=console.warn,se=console.error,ce=console.group,le=console.groupCollapsed,ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}de++}function me(){if(0===--de){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:r({},e,{value:oe}),info:r({},e,{value:ie}),warn:r({},e,{value:ae}),error:r({},e,{value:se}),group:r({},e,{value:ce}),groupCollapsed:r({},e,{value:le}),groupEnd:r({},e,{value:ue})})}de<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}he.__reactDisabledLog=!0;var ge,fe=a.ReactCurrentDispatcher;function _e(e,t,n){if(void 0===ge)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);ge=r&&r[1]||""}return"\n"+ge+e}var be,ve=!1,ye="function"==typeof WeakMap?WeakMap:Map;function Ee(e,t){if(!e||ve)return"";var n,r=be.get(e);if(void 0!==r)return r;ve=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=fe.current,fe.current=null,pe();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){n=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){n=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var s=t.stack.split("\n"),c=n.stack.split("\n"),l=s.length-1,u=c.length-1;l>=1&&u>=0&&s[l]!==c[u];)u--;for(;l>=1&&u>=0;l--,u--)if(s[l]!==c[u]){if(1!==l||1!==u)do{if(l--,--u<0||s[l]!==c[u]){var d="\n"+s[l].replace(" at new "," at ");return"function"==typeof e&&be.set(e,d),d}}while(l>=1&&u>=0);break}}}finally{ve=!1,fe.current=o,me(),Error.prepareStackTrace=i}var h=e?e.displayName||e.name:"",p=h?_e(h):"";return"function"==typeof e&&be.set(e,p),p}function Se(e,t,n){return Ee(e,!1)}function we(e){e._debugOwner&&e._debugOwner.type,e._debugSource;switch(e.tag){case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return _e("Suspense");case 19:return _e("SuspenseList");case 0:case 2:case 15:return Se(e.type);case 11:return Se(e.type.render);case 22:return Se(e.type._render);case 1:return Ee(e.type,!0);default:return""}}function Ce(e){try{var t="",n=e;do{t+=we(n),n=n.return}while(n);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function Te(e){return e.displayName||"Context"}function xe(e){if(null==e)return null;if("number"==typeof e.tag&&c("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case U:return"Fragment";case j:return"Portal";case G:return"Profiler";case B:return"StrictMode";case z:return"Suspense";case W:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case q:return Te(e)+".Consumer";case V:return Te(e._context)+".Provider";case H:return o=e,i=e.render,a="ForwardRef",s=i.displayName||i.name||"",o.displayName||(""!==s?a+"("+s+")":a);case K:return xe(e.type);case $:return xe(e._render);case Y:var t=e,n=t._payload,r=t._init;try{return xe(r(n))}catch(e){return null}}var o,i,a,s;return null}be=new ye;var ke=a.ReactDebugCurrentFrame,Fe=null,Oe=!1;function Re(){if(null===Fe)return null;var e=Fe._debugOwner;return null!=e?xe(e.type):null}function De(){return null===Fe?"":Ce(Fe)}function Ie(){ke.getCurrentStack=null,Fe=null,Oe=!1}function Ae(e){ke.getCurrentStack=De,Fe=e,Oe=!1}function Ne(e){Oe=e}function Me(e){return""+e}function Pe(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}var Le={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function je(e,t){Le[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||null==t.value||c("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||null==t.checked||c("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Ue(e){var t=e.type,n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===t||"radio"===t)}function Be(e){return e._valueTracker}function Ge(e){Be(e)||(e._valueTracker=function(e){var t=Ue(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){!function(e){e._valueTracker=null}(e),delete e[t]}}}}(e))}function Ve(e){if(!e)return!1;var t=Be(e);if(!t)return!0;var n=t.getValue(),r=function(e){var t="";return e?t=Ue(e)?e.checked?"true":"false":e.value:t}(e);return r!==n&&(t.setValue(r),!0)}function qe(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var He=!1,ze=!1,We=!1,Ke=!1;function Ye(e){return"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}function $e(e,t){var n=e,o=t.checked;return r({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=o?o:n._wrapperState.initialChecked})}function Qe(e,t){je(0,t),void 0===t.checked||void 0===t.defaultChecked||ze||(c("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Re()||"A component",t.type),ze=!0),void 0===t.value||void 0===t.defaultValue||He||(c("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Re()||"A component",t.type),He=!0);var n=e,r=null==t.defaultValue?"":t.defaultValue;n._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:Pe(null!=t.value?t.value:r),controlled:Ye(t)}}function Je(e,t){var n=e,r=t.checked;null!=r&&P(n,"checked",r,!1)}function Xe(e,t){var n=e,r=Ye(t);n._wrapperState.controlled||!r||Ke||(c("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Ke=!0),!n._wrapperState.controlled||r||We||(c("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),We=!0),Je(e,t);var o=Pe(t.value),i=t.type;if(null!=o)"number"===i?(0===o&&""===n.value||n.value!=o)&&(n.value=Me(o)):n.value!==Me(o)&&(n.value=Me(o));else if("submit"===i||"reset"===i)return void n.removeAttribute("value");t.hasOwnProperty("value")?tt(n,t.type,o):t.hasOwnProperty("defaultValue")&&tt(n,t.type,Pe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(n.defaultChecked=!!t.defaultChecked)}function Ze(e,t,n){var r=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(("submit"===o||"reset"===o)&&(void 0===t.value||null===t.value))return;var i=Me(r._wrapperState.initialValue);n||i!==r.value&&(r.value=i),r.defaultValue=i}var a=r.name;""!==a&&(r.name=""),r.defaultChecked=!r.defaultChecked,r.defaultChecked=!!r._wrapperState.initialChecked,""!==a&&(r.name=a)}function et(e,t){var n=e;Xe(n,t),function(e,t){var n=t.name;if("radio"===t.type&&null!=n){for(var r=e;r.parentNode;)r=r.parentNode;for(var o=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),i=0;i<o.length;i++){var a=o[i];if(a!==e&&a.form===e.form){var s=Cs(a);if(!s)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Ve(a),Xe(a,s)}}}}(n,t)}function tt(e,t,n){"number"===t&&qe(e.ownerDocument)===e||(null==n?e.defaultValue=Me(e._wrapperState.initialValue):e.defaultValue!==Me(n)&&(e.defaultValue=Me(n)))}var nt,rt=!1,ot=!1;function it(t,n){"object"==typeof n.children&&null!==n.children&&e.Children.forEach(n.children,(function(e){null!=e&&"string"!=typeof e&&"number"!=typeof e&&"string"==typeof e.type&&(ot||(ot=!0,c("Only strings and numbers are supported as <option> children.")))})),null==n.selected||rt||(c("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),rt=!0)}function at(t,n){var o=r({children:void 0},n),i=function(t){var n="";return e.Children.forEach(t,(function(e){null!=e&&(n+=e)})),n}(n.children);return i&&(o.children=i),o}function st(){var e=Re();return e?"\n\nCheck the render method of `"+e+"`.":""}nt=!1;var ct=["value","defaultValue"];function lt(e,t,n,r){var o=e.options;if(t){for(var i=n,a={},s=0;s<i.length;s++)a["$"+i[s]]=!0;for(var c=0;c<o.length;c++){var l=a.hasOwnProperty("$"+o[c].value);o[c].selected!==l&&(o[c].selected=l),l&&r&&(o[c].defaultSelected=!0)}}else{for(var u=Me(Pe(n)),d=null,h=0;h<o.length;h++){if(o[h].value===u)return o[h].selected=!0,void(r&&(o[h].defaultSelected=!0));null!==d||o[h].disabled||(d=o[h])}null!==d&&(d.selected=!0)}}function ut(e,t){return r({},t,{value:void 0})}function dt(e,t){var n=e;!function(e){je(0,e);for(var t=0;t<ct.length;t++){var n=ct[t];if(null!=e[n]){var r=Array.isArray(e[n]);e.multiple&&!r?c("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,st()):!e.multiple&&r&&c("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,st())}}}(t),n._wrapperState={wasMultiple:!!t.multiple},void 0===t.value||void 0===t.defaultValue||nt||(c("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),nt=!0)}var ht=!1;function pt(e,t){var n=e;if(null!=t.dangerouslySetInnerHTML)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");return r({},t,{value:void 0,defaultValue:void 0,children:Me(n._wrapperState.initialValue)})}function mt(e,t){var n=e;je(0,t),void 0===t.value||void 0===t.defaultValue||ht||(c("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",Re()||"A component"),ht=!0);var r=t.value;if(null==r){var o=t.children,i=t.defaultValue;if(null!=o){if(c("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),null!=i)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Array.isArray(o)){if(!(o.length<=1))throw Error("<textarea> can only have at most one child.");o=o[0]}i=o}null==i&&(i=""),r=i}n._wrapperState={initialValue:Pe(r)}}function gt(e,t){var n=e,r=Pe(t.value),o=Pe(t.defaultValue);if(null!=r){var i=Me(r);i!==n.value&&(n.value=i),null==t.defaultValue&&n.defaultValue!==i&&(n.defaultValue=i)}null!=o&&(n.defaultValue=Me(o))}function ft(e,t){var n=e,r=n.textContent;r===n._wrapperState.initialValue&&""!==r&&null!==r&&(n.value=r)}var _t="http://www.w3.org/1999/xhtml",bt="http://www.w3.org/2000/svg",vt=_t,yt=bt;function Et(e){switch(e){case"svg":return bt;case"math":return"http://www.w3.org/1998/Math/MathML";default:return _t}}function St(e,t){return null==e||e===_t?Et(t):e===bt&&"foreignObject"===t?_t:e}var wt,Ct,Tt=(Ct=function(e,t){if(e.namespaceURI!==yt||"innerHTML"in e)e.innerHTML=t;else{(wt=wt||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var n=wt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return Ct(e,t,n,r)}))}:Ct),xt=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t},kt={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},Ft={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};var Ot=["Webkit","ms","Moz","O"];function Rt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Ft.hasOwnProperty(e)&&Ft[e]?(""+t).trim():t+"px"}Object.keys(Ft).forEach((function(e){Ot.forEach((function(t){Ft[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=Ft[e]}))}));var Dt=/([A-Z])/g,It=/^ms-/;var At=/^(?:webkit|moz|o)[A-Z]/,Nt=/^-ms-/,Mt=/-(.)/g,Pt=/;\s*$/,Lt={},jt={},Ut=!1,Bt=!1,Gt=function(e){Lt.hasOwnProperty(e)&&Lt[e]||(Lt[e]=!0,c("Unsupported style property %s. Did you mean %s?",e,e.replace(Nt,"ms-").replace(Mt,(function(e,t){return t.toUpperCase()}))))},Vt=function(e,t){e.indexOf("-")>-1?Gt(e):At.test(e)?function(e){Lt.hasOwnProperty(e)&&Lt[e]||(Lt[e]=!0,c("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))}(e):Pt.test(t)&&function(e,t){jt.hasOwnProperty(t)&&jt[t]||(jt[t]=!0,c('Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,t.replace(Pt,"")))}(e,t),"number"==typeof t&&(isNaN(t)?function(e,t){Ut||(Ut=!0,c("`NaN` is an invalid value for the `%s` css style property.",e))}(e):isFinite(t)||function(e,t){Bt||(Bt=!0,c("`Infinity` is an invalid value for the `%s` css style property.",e))}(e))};function qt(e){var t="",n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];if(null!=o){var i=0===r.indexOf("--");t+=n+(i?r:r.replace(Dt,"-$1").toLowerCase().replace(It,"-ms-"))+":",t+=Rt(r,o,i),n=";"}}return t||null}function Ht(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=0===r.indexOf("--");o||Vt(r,t[r]);var i=Rt(r,t[r],o);"float"===r&&(r="cssFloat"),o?n.setProperty(r,i):n[r]=i}}function zt(e){var t={};for(var n in e)for(var r=kt[n]||[n],o=0;o<r.length;o++)t[r[o]]=n;return t}var Wt=r({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Kt(e,t){if(t){if(Wt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(e+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!t.suppressContentEditableWarning&&t.contentEditable&&null!=t.children&&c("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),null!=t.style&&"object"!=typeof t.style)throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function Yt(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $t={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Qt={"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Jt={},Xt=new RegExp("^(aria)-["+_+"]*$"),Zt=new RegExp("^(aria)[A-Z]["+_+"]*$"),en=Object.prototype.hasOwnProperty;function tn(e,t){if(en.call(Jt,t)&&Jt[t])return!0;if(Zt.test(t)){var n="aria-"+t.slice(4).toLowerCase(),r=Qt.hasOwnProperty(n)?n:null;if(null==r)return c("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Jt[t]=!0,!0;if(t!==r)return c("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,r),Jt[t]=!0,!0}if(Xt.test(t)){var o=t.toLowerCase(),i=Qt.hasOwnProperty(o)?o:null;if(null==i)return Jt[t]=!0,!1;if(t!==i)return c("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,i),Jt[t]=!0,!0}return!0}function nn(e,t){Yt(e,t)||function(e,t){var n=[];for(var r in t){tn(0,r)||n.push(r)}var o=n.map((function(e){return"`"+e+"`"})).join(", ");1===n.length?c("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",o,e):n.length>1&&c("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",o,e)}(e,t)}var rn=!1;var on,an={},sn=Object.prototype.hasOwnProperty,cn=/^on./,ln=/^on[^A-Z]/,un=new RegExp("^(aria)-["+_+"]*$"),dn=new RegExp("^(aria)[A-Z]["+_+"]*$");on=function(e,t,n,r){if(sn.call(an,t)&&an[t])return!0;var o=t.toLowerCase();if("onfocusin"===o||"onfocusout"===o)return c("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),an[t]=!0,!0;if(null!=r){var i=r.registrationNameDependencies,a=r.possibleRegistrationNames;if(i.hasOwnProperty(t))return!0;var s=a.hasOwnProperty(o)?a[o]:null;if(null!=s)return c("Invalid event handler property `%s`. Did you mean `%s`?",t,s),an[t]=!0,!0;if(cn.test(t))return c("Unknown event handler property `%s`. It will be ignored.",t),an[t]=!0,!0}else if(cn.test(t))return ln.test(t)&&c("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),an[t]=!0,!0;if(un.test(t)||dn.test(t))return!0;if("innerhtml"===o)return c("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),an[t]=!0,!0;if("aria"===o)return c("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),an[t]=!0,!0;if("is"===o&&null!=n&&"string"!=typeof n)return c("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),an[t]=!0,!0;if("number"==typeof n&&isNaN(n))return c("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),an[t]=!0,!0;var l=x(t),u=null!==l&&0===l.type;if($t.hasOwnProperty(o)){var d=$t[o];if(d!==t)return c("Invalid DOM property `%s`. Did you mean `%s`?",t,d),an[t]=!0,!0}else if(!u&&t!==o)return c("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,o),an[t]=!0,!0;return"boolean"==typeof n&&C(t,n,l,!1)?(n?c('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):c('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),an[t]=!0,!0):!!u||(C(t,n,l,!1)?(an[t]=!0,!1):("false"!==n&&"true"!==n||null===l||3!==l.type||(c("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,"false"===n?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),an[t]=!0),!0))};function hn(e,t,n){Yt(e,t)||function(e,t,n){var r=[];for(var o in t){on(0,o,t[o],n)||r.push(o)}var i=r.map((function(e){return"`"+e+"`"})).join(", ");1===r.length?c("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",i,e):r.length>1&&c("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",i,e)}(e,t,n)}function pn(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var mn=null,gn=null,fn=null;function _n(e){var t=Ss(e);if(t){if("function"!=typeof mn)throw Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var n=t.stateNode;if(n){var r=Cs(n);mn(t.stateNode,t.type,r)}}}function bn(e){gn?fn?fn.push(e):fn=[e]:gn=e}function vn(){if(gn){var e=gn,t=fn;if(gn=null,fn=null,_n(e),t)for(var n=0;n<t.length;n++)_n(t[n])}}var yn=function(e,t){return e(t)},En=function(e,t,n,r,o){return e(t,n,r,o)},Sn=function(){},wn=yn,Cn=!1,Tn=!1;function xn(){(null!==gn||null!==fn)&&(Sn(),vn())}function kn(e,t){var n=e.stateNode;if(null===n)return null;var r=Cs(n);if(null===r)return null;var o=r[t];if(function(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!(!n.disabled||(r=t,"button"!==r&&"input"!==r&&"select"!==r&&"textarea"!==r));default:return!1}var r}(t,e.type,r))return null;if(o&&"function"!=typeof o)throw Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof o+"` type.");return o}var Fn=!1;if(g)try{var On={};Object.defineProperty(On,"passive",{get:function(){Fn=!0}}),window.addEventListener("test",On,On),window.removeEventListener("test",On,On)}catch(e){Fn=!1}function Rn(e,t,n,r,o,i,a,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Dn=Rn;if("undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"undefined"!=typeof document&&"function"==typeof document.createEvent){var In=document.createElement("react");Dn=function(e,t,n,r,o,i,a,s,c){if("undefined"==typeof document)throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var l=document.createEvent("Event"),u=!1,d=!0,h=window.event,p=Object.getOwnPropertyDescriptor(window,"event");function m(){In.removeEventListener(E,_,!1),void 0!==window.event&&window.hasOwnProperty("event")&&(window.event=h)}var g,f=Array.prototype.slice.call(arguments,3);function _(){u=!0,m(),t.apply(n,f),d=!1}var b=!1,v=!1;function y(e){if(g=e.error,b=!0,null===g&&0===e.colno&&0===e.lineno&&(v=!0),e.defaultPrevented&&null!=g&&"object"==typeof g)try{g._suppressLogging=!0}catch(e){}}var E="react-"+(e||"invokeguardedcallback");if(window.addEventListener("error",y),In.addEventListener(E,_,!1),l.initEvent(E,!1,!1),In.dispatchEvent(l),p&&Object.defineProperty(window,"event",p),u&&d&&(b?v&&(g=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):g=new Error("An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the \"Pause on exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue."),this.onError(g)),window.removeEventListener("error",y),!u)return m(),Rn.apply(this,arguments)}}var An=Dn,Nn=!1,Mn=null,Pn=!1,Ln=null,jn={onError:function(e){Nn=!0,Mn=e}};function Un(e,t,n,r,o,i,a,s,c){Nn=!1,Mn=null,An.apply(jn,arguments)}function Bn(){return Nn}function Gn(){if(Nn){var e=Mn;return Nn=!1,Mn=null,e}throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function Vn(e){return e._reactInternals}var qn,Hn,zn,Wn,Kn=a.ReactCurrentOwner;function Yn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var r=t;do{0!=(1026&(t=r).flags)&&(n=t.return),r=t.return}while(r)}return 3===t.tag?n:null}function $n(e){if(13===e.tag){var t=e.memoizedState;if(null===t){var n=e.alternate;null!==n&&(t=n.memoizedState)}if(null!==t)return t.dehydrated}return null}function Qn(e){return 3===e.tag?e.stateNode.containerInfo:null}function Jn(e){if(Yn(e)!==e)throw Error("Unable to find node on an unmounted component.")}function Xn(e){var t=e.alternate;if(!t){var n=Yn(e);if(null===n)throw Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var r=e,o=t;;){var i=r.return;if(null===i)break;var a=i.alternate;if(null===a){var s=i.return;if(null!==s){r=o=s;continue}break}if(i.child===a.child){for(var c=i.child;c;){if(c===r)return Jn(i),e;if(c===o)return Jn(i),t;c=c.sibling}throw Error("Unable to find node on an unmounted component.")}if(r.return!==o.return)r=i,o=a;else{for(var l=!1,u=i.child;u;){if(u===r){l=!0,r=i,o=a;break}if(u===o){l=!0,o=i,r=a;break}u=u.sibling}if(!l){for(u=a.child;u;){if(u===r){l=!0,r=a,o=i;break}if(u===o){l=!0,o=a,r=i;break}u=u.sibling}if(!l)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(r.alternate!==o)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(3!==r.tag)throw Error("Unable to find node on an unmounted component.");return r.stateNode.current===r?e:t}function Zn(e){var t=Xn(e);if(!t)return null;for(var n=t;;){if(5===n.tag||6===n.tag)return n;if(n.child)n.child.return=n,n=n.child;else{if(n===t)return null;for(;!n.sibling;){if(!n.return||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}function er(e,t){for(var n=t,r=e.alternate;null!==n;){if(n===e||n===r)return!0;n=n.return}return!1}var tr=!1,nr=[],rr=null,or=null,ir=null,ar=new Map,sr=new Map,cr=[];var lr=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"];function ur(e){return lr.indexOf(e)>-1}function dr(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function hr(e,t,n,r,o){var i=dr(e,t,n,r,o);nr.push(i)}function pr(e,t){switch(e){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":or=null;break;case"mouseover":case"mouseout":ir=null;break;case"pointerover":case"pointerout":var n=t.pointerId;ar.delete(n);break;case"gotpointercapture":case"lostpointercapture":var r=t.pointerId;sr.delete(r)}}function mr(e,t,n,r,o,i){if(null===e||e.nativeEvent!==i){var a=dr(t,n,r,o,i);if(null!==t){var s=Ss(t);null!==s&&Hn(s)}return a}e.eventSystemFlags|=r;var c=e.targetContainers;return null!==o&&-1===c.indexOf(o)&&c.push(o),e}function gr(e){var t=Es(e.target);if(null!==t){var n=Yn(t);if(null!==n){var r=n.tag;if(13===r){var i=$n(n);if(null!==i)return e.blockedOn=i,void Wn(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){zn(n)}))}))}else if(3===r){if(n.stateNode.hydrate)return void(e.blockedOn=Qn(n))}}}e.blockedOn=null}function fr(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;t.length>0;){var n=t[0],r=mo(e.domEventName,e.eventSystemFlags,n,e.nativeEvent);if(null!==r){var o=Ss(r);return null!==o&&Hn(o),e.blockedOn=r,!1}t.shift()}return!0}function _r(e,t,n){fr(e)&&n.delete(t)}function br(){for(tr=!1;nr.length>0;){var e=nr[0];if(null!==e.blockedOn){var t=Ss(e.blockedOn);null!==t&&qn(t);break}for(var n=e.targetContainers;n.length>0;){var r=n[0],o=mo(e.domEventName,e.eventSystemFlags,r,e.nativeEvent);if(null!==o){e.blockedOn=o;break}n.shift()}null===e.blockedOn&&nr.shift()}null!==rr&&fr(rr)&&(rr=null),null!==or&&fr(or)&&(or=null),null!==ir&&fr(ir)&&(ir=null),ar.forEach(_r),sr.forEach(_r)}function vr(e,t){e.blockedOn===t&&(e.blockedOn=null,tr||(tr=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,br)))}function yr(e){if(nr.length>0){vr(nr[0],e);for(var t=1;t<nr.length;t++){var n=nr[t];n.blockedOn===e&&(n.blockedOn=null)}}null!==rr&&vr(rr,e),null!==or&&vr(or,e),null!==ir&&vr(ir,e);var r=function(t){return vr(t,e)};ar.forEach(r),sr.forEach(r);for(var o=0;o<cr.length;o++){var i=cr[o];i.blockedOn===e&&(i.blockedOn=null)}for(;cr.length>0;){var a=cr[0];if(null!==a.blockedOn)break;gr(a),null===a.blockedOn&&cr.shift()}}function Er(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:Er("Animation","AnimationEnd"),animationiteration:Er("Animation","AnimationIteration"),animationstart:Er("Animation","AnimationStart"),transitionend:Er("Transition","TransitionEnd")},wr={},Cr={};function Tr(e){if(wr[e])return wr[e];if(!Sr[e])return e;var t=Sr[e];for(var n in t)if(t.hasOwnProperty(n)&&n in Cr)return wr[e]=t[n];return e}g&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var xr=Tr("animationend"),kr=Tr("animationiteration"),Fr=Tr("animationstart"),Or=Tr("transitionend"),Rr=new Map,Dr=new Map,Ir=["cancel","cancel","click","click","close","close","contextmenu","contextMenu","copy","copy","cut","cut","auxclick","auxClick","dblclick","doubleClick","dragend","dragEnd","dragstart","dragStart","drop","drop","focusin","focus","focusout","blur","input","input","invalid","invalid","keydown","keyDown","keypress","keyPress","keyup","keyUp","mousedown","mouseDown","mouseup","mouseUp","paste","paste","pause","pause","play","play","pointercancel","pointerCancel","pointerdown","pointerDown","pointerup","pointerUp","ratechange","rateChange","reset","reset","seeked","seeked","submit","submit","touchcancel","touchCancel","touchend","touchEnd","touchstart","touchStart","volumechange","volumeChange"],Ar=["change","selectionchange","textInput","compositionstart","compositionend","compositionupdate"],Nr=["drag","drag","dragenter","dragEnter","dragexit","dragExit","dragleave","dragLeave","dragover","dragOver","mousemove","mouseMove","mouseout","mouseOut","mouseover","mouseOver","pointermove","pointerMove","pointerout","pointerOut","pointerover","pointerOver","scroll","scroll","toggle","toggle","touchmove","touchMove","wheel","wheel"],Mr=["abort","abort",xr,"animationEnd",kr,"animationIteration",Fr,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Or,"transitionEnd","waiting","waiting"];function Pr(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));Dr.set(r,t),Rr.set(r,i),p(i,[r])}}var Lr=o.unstable_now;if(null==i.__interactionsRef||null==i.__interactionsRef.current)throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");Lr();var jr=8;function Ur(e){if(0!=(1&e))return jr=15,1;if(0!=(2&e))return jr=14,2;if(0!=(4&e))return jr=13,4;var t=24&e;if(0!==t)return jr=12,t;if(0!=(32&e))return jr=11,32;var n=192&e;if(0!==n)return jr=10,n;if(0!=(256&e))return jr=9,256;var r=3584&e;if(0!==r)return jr=8,r;if(0!=(4096&e))return jr=7,4096;var o=4186112&e;if(0!==o)return jr=6,o;var i=62914560&e;if(0!==i)return jr=5,i;if(67108864&e)return jr=4,67108864;if(0!=(134217728&e))return jr=3,134217728;var a=805306368&e;return 0!==a?(jr=2,a):0!=(1073741824&e)?(jr=1,1073741824):(c("Should have found matching lanes. This is a bug in React."),jr=8,e)}function Br(e,t){var n=e.pendingLanes;if(0===n)return jr=0,0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=jr=15;else{var c=134217727&n;if(0!==c){var l=c&~a;if(0!==l)r=Ur(l),o=jr;else{var u=c&s;0!==u&&(r=Ur(u),o=jr)}}else{var d=n&~a;0!==d?(r=Ur(d),o=jr):0!==s&&(r=Ur(s),o=jr)}}if(0===r)return 0;if(r=n&function(e){return(function(e){var t=31-no(e);return t<0?0:1<<t}(e)<<1)-1}(r),0!==t&&t!==r&&0==(t&a)){if(Ur(t),o<=jr)return t;jr=o}var h=e.entangledLanes;if(0!==h)for(var p=e.entanglements,m=r&h;m>0;){var g=Kr(m),f=1<<g;r|=p[g],m&=~f}return r}function Gr(e,t){Ur(e);return jr>=10?t+250:jr>=6?t+5e3:-1}function Vr(e){var t=-1073741825&e.pendingLanes;return 0!==t?t:1073741824&t?1073741824:0}function qr(e){return 0!=(134217727&e)}function Hr(e){return(62914560&e)===e}function zr(e,t){switch(e){case 0:break;case 15:return 1;case 14:return 2;case 12:var n=Wr(24&~t);return 0===n?zr(10,t):n;case 10:var r=Wr(192&~t);return 0===r?zr(8,t):r;case 8:var o=Wr(3584&~t);return 0===o&&0===(o=Wr(4186112&~t))&&(o=Wr(3584)),o;case 6:case 5:break;case 2:var i=Wr(805306368&~t);return 0===i&&(i=Wr(805306368)),i}throw Error("Invalid update priority: "+e+". This is a bug in React.")}function Wr(e){return function(e){return e&-e}(e)}function Kr(e){return 31-no(e)}function Yr(e,t){return 0!=(e&t)}function $r(e,t){return(e&t)===t}function Qr(e,t){return e|t}function Jr(e,t){return e&~t}function Xr(e){for(var t=[],n=0;n<31;n++)t.push(e);return t}function Zr(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e.eventTimes[Kr(t)]=n}function eo(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function to(e,t){e.mutableReadLanes|=t&e.pendingLanes}var no=Math.clz32?Math.clz32:function(e){if(0===e)return 32;return 31-(ro(e)/oo|0)|0},ro=Math.log,oo=Math.LN2;var io=o.unstable_UserBlockingPriority,ao=o.unstable_runWithPriority,so=!0;function co(e){so=!!e}function lo(e,t,n){var r;switch(function(e){var t=Dr.get(e);return void 0===t?2:t}(t)){case 0:r=uo;break;case 1:r=ho;break;case 2:default:r=po}return r.bind(null,t,n,e)}function uo(e,t,n,r){r.timeStamp,Cn||Sn(),function(e,t,n,r,o){var i=Cn;Cn=!0;try{En(e,t,n,r,o)}finally{(Cn=i)||xn()}}(po,e,t,n,r)}function ho(e,t,n,r){ao(io,po.bind(null,e,t,n,r))}function po(e,t,n,r){if(so){var o;if((o=0==(4&t))&&nr.length>0&&ur(e))hr(null,e,t,n,r);else{var i=mo(e,t,n,r);if(null!==i){if(o){if(ur(e))return void hr(i,e,t,n,r);if(function(e,t,n,r,o){switch(t){case"focusin":return rr=mr(rr,e,t,n,r,o),!0;case"dragenter":return or=mr(or,e,t,n,r,o),!0;case"mouseover":return ir=mr(ir,e,t,n,r,o),!0;case"pointerover":var i=o,a=i.pointerId;return ar.set(a,mr(ar.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":var s=o,c=s.pointerId;return sr.set(c,mr(sr.get(c)||null,e,t,n,r,s)),!0}return!1}(i,e,t,n,r))return;pr(e,r)}ia(e,t,r,null,n)}else o&&pr(e,r)}}}function mo(e,t,n,r){var o=Es(pn(r));if(null!==o){var i=Yn(o);if(null===i)o=null;else{var a=i.tag;if(13===a){var s=$n(i);if(null!==s)return s;o=null}else if(3===a){if(i.stateNode.hydrate)return Qn(i);o=null}else i!==o&&(o=null)}}return ia(e,t,r,o,n),null}var go=null,fo=null,_o=null;function bo(){if(_o)return _o;var e,t,n=fo,r=n.length,o=vo(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);var s=t>1?1-t:void 0;return _o=o.slice(e,s)}function vo(){return"value"in go?go.value:go.textContent}function yo(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,10===t&&(t=13),t>=32||13===t?t:0}function Eo(){return!0}function So(){return!1}function wo(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)if(e.hasOwnProperty(a)){var s=e[a];this[a]=s?s(o):o[a]}var c=null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue;return this.isDefaultPrevented=c?Eo:So,this.isPropagationStopped=So,this}return r(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Eo)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Eo)},persist:function(){},isPersistent:Eo}),t}var Co,To,xo,ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fo=wo(ko),Oo=r({},ko,{view:0,detail:0}),Ro=wo(Oo);var Do=r({},Oo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qo,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(function(e){e!==xo&&(xo&&"mousemove"===e.type?(Co=e.screenX-xo.screenX,To=e.screenY-xo.screenY):(Co=0,To=0),xo=e)}(e),Co)},movementY:function(e){return"movementY"in e?e.movementY:To}}),Io=wo(Do),Ao=wo(r({},Do,{dataTransfer:0})),No=wo(r({},Oo,{relatedTarget:0})),Mo=wo(r({},ko,{animationName:0,elapsedTime:0,pseudoElement:0})),Po=wo(r({},ko,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),Lo=wo(r({},ko,{data:0})),jo=Lo,Uo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bo={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};var Go={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vo(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=Go[e];return!!n&&!!t[n]}function qo(e){return Vo}var Ho=wo(r({},Oo,{key:function(e){if(e.key){var t=Uo[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=yo(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?Bo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qo,charCode:function(e){return"keypress"===e.type?yo(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?yo(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),zo=wo(r({},Do,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Wo=wo(r({},Oo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qo})),Ko=wo(r({},ko,{propertyName:0,elapsedTime:0,pseudoElement:0})),Yo=wo(r({},Do,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),$o=[9,13,27,32],Qo=g&&"CompositionEvent"in window,Jo=null;g&&"documentMode"in document&&(Jo=document.documentMode);var Xo=g&&"TextEvent"in window&&!Jo,Zo=g&&(!Qo||Jo&&Jo>8&&Jo<=11),ei=String.fromCharCode(32);var ti=!1;function ni(e,t){switch(e){case"keyup":return-1!==$o.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ri(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function oi(e){return"ko"===e.locale}var ii=!1;function ai(e,t,n,r,o){var i,a;if(Qo?i=function(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}(t):ii?ni(t,r)&&(i="onCompositionEnd"):function(e,t){return"keydown"===e&&229===t.keyCode}(t,r)&&(i="onCompositionStart"),!i)return null;Zo&&!oi(r)&&(ii||"onCompositionStart"!==i?"onCompositionEnd"===i&&ii&&(a=bo()):ii=function(e){return go=e,fo=vo(),!0}(o));var s=sa(n,i);if(s.length>0){var c=new Lo(i,t,null,r,o);if(e.push({event:c,listeners:s}),a)c.data=a;else{var l=ri(r);null!==l&&(c.data=l)}}}function si(e,t){if(ii){if("compositionend"===e||!Qo&&ni(e,t)){var n=bo();return go=null,fo=null,_o=null,ii=!1,n}return null}switch(e){case"paste":return null;case"keypress":if(!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zo&&!oi(t)?null:t.data;default:return null}}function ci(e,t,n,r,o){var i;if(!(i=Xo?function(e,t){switch(e){case"compositionend":return ri(t);case"keypress":return 32!==t.which?null:(ti=!0,ei);case"textInput":var n=t.data;return n===ei&&ti?null:n;default:return null}}(t,r):si(t,r)))return null;var a=sa(n,"onBeforeInput");if(a.length>0){var s=new jo("onBeforeInput","beforeinput",null,r,o);e.push({event:s,listeners:a}),s.data=i}}var li={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ui(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!li[e.type]:"textarea"===t}function di(e,t,n,r){bn(r);var o=sa(t,"onChange");if(o.length>0){var i=new Fo("onChange","change",null,n,r);e.push({event:i,listeners:o})}}var hi=null,pi=null;function mi(e){var t=[];di(t,pi,e,pn(e)),function(e,t){if(Cn)return e(t);Cn=!0;try{yn(e,t)}finally{Cn=!1,xn()}}(gi,t)}function gi(e){Xi(e,0)}function fi(e){if(Ve(ws(e)))return e}function _i(e,t){if("change"===e)return t}var bi=!1;function vi(){hi&&(hi.detachEvent("onpropertychange",yi),hi=null,pi=null)}function yi(e){"value"===e.propertyName&&fi(pi)&&mi(e)}function Ei(e,t,n){"focusin"===e?(vi(),function(e,t){pi=t,(hi=e).attachEvent("onpropertychange",yi)}(t,n)):"focusout"===e&&vi()}function Si(e,t){if("selectionchange"===e||"keyup"===e||"keydown"===e)return fi(pi)}function wi(e,t){if("click"===e)return fi(t)}function Ci(e,t){if("input"===e||"change"===e)return fi(t)}function Ti(e,t,n,r,o,i,a){var s,c,l,u,d,h,p=n?ws(n):window;if("select"===(u=(l=p).nodeName&&l.nodeName.toLowerCase())||"input"===u&&"file"===l.type?s=_i:ui(p)?bi?s=Ci:(s=Si,c=Ei):function(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}(p)&&(s=wi),s){var m=s(t,n);if(m)return void di(e,m,r,o)}c&&c(t,p,n),"focusout"===t&&(h=(d=p)._wrapperState)&&h.controlled&&"number"===d.type&&tt(d,"number",d.value)}function xi(e,t,n,r,o,i,a){var s="mouseover"===t||"pointerover"===t,c="mouseout"===t||"pointerout"===t;if(s&&0==(16&i)){var l=r.relatedTarget||r.fromElement;if(l&&(Es(l)||ys(l)))return}if(c||s){var u,d,h;if(o.window===o)u=o;else{var p=o.ownerDocument;u=p?p.defaultView||p.parentWindow:window}if(c){var m=r.relatedTarget||r.toElement;if(d=n,null!==(h=m?Es(m):null))(h!==Yn(h)||5!==h.tag&&6!==h.tag)&&(h=null)}else d=null,h=n;if(d!==h){var g=Io,f="onMouseLeave",_="onMouseEnter",b="mouse";"pointerout"!==t&&"pointerover"!==t||(g=zo,f="onPointerLeave",_="onPointerEnter",b="pointer");var v=null==d?u:ws(d),y=null==h?u:ws(h),E=new g(f,b+"leave",d,r,o);E.target=v,E.relatedTarget=y;var S=null;if(Es(o)===n){var w=new g(_,b+"enter",h,r,o);w.target=y,w.relatedTarget=v,S=w}!function(e,t,n,r,o){var i=r&&o?function(e,t){for(var n=e,r=t,o=0,i=n;i;i=ca(i))o++;for(var a=0,s=r;s;s=ca(s))a++;for(;o-a>0;)n=ca(n),o--;for(;a-o>0;)r=ca(r),a--;var c=o;for(;c--;){if(n===r||null!==r&&n===r.alternate)return n;n=ca(n),r=ca(r)}return null}(r,o):null;null!==r&&la(e,t,r,i,!1);null!==o&&null!==n&&la(e,n,o,i,!0)}(e,E,S,d,h)}}}g&&(bi=function(e){if(!g)return!1;var t="on"+e,n=t in document;if(!n){var r=document.createElement("div");r.setAttribute(t,"return;"),n="function"==typeof r[t]}return n}("input")&&(!document.documentMode||document.documentMode>9));var ki="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Fi=Object.prototype.hasOwnProperty;function Oi(e,t){if(ki(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Fi.call(t,n[o])||!ki(e[n[o]],t[n[o]]))return!1;return!0}function Ri(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Di(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function Ii(e,t){for(var n=Ri(e),r=0,o=0;n;){if(3===n.nodeType){if(o=r+n.textContent.length,r<=t&&o>=t)return{node:n,offset:t-r};r=o}n=Ri(Di(n))}}function Ai(e){var t=e.ownerDocument,n=t&&t.defaultView||window,r=n.getSelection&&n.getSelection();if(!r||0===r.rangeCount)return null;var o=r.anchorNode,i=r.anchorOffset,a=r.focusNode,s=r.focusOffset;try{o.nodeType,a.nodeType}catch(e){return null}return function(e,t,n,r,o){var i=0,a=-1,s=-1,c=0,l=0,u=e,d=null;e:for(;;){for(var h=null;u!==t||0!==n&&3!==u.nodeType||(a=i+n),u!==r||0!==o&&3!==u.nodeType||(s=i+o),3===u.nodeType&&(i+=u.nodeValue.length),null!==(h=u.firstChild);)d=u,u=h;for(;;){if(u===e)break e;if(d===t&&++c===n&&(a=i),d===r&&++l===o&&(s=i),null!==(h=u.nextSibling))break;d=(u=d).parentNode}u=h}if(-1===a||-1===s)return null;return{start:a,end:s}}(e,o,i,a,s)}function Ni(e){return e&&3===e.nodeType}function Mi(e){return e&&e.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||!Ni(t)&&(Ni(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(e.ownerDocument.documentElement,e)}function Pi(e){try{return"string"==typeof e.contentWindow.location.href}catch(e){return!1}}function Li(){for(var e=window,t=qe();t instanceof e.HTMLIFrameElement;){if(!Pi(t))return t;t=qe((e=t.contentWindow).document)}return t}function ji(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Ui(e){var t=Li(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&Mi(n)){null!==r&&ji(n)&&function(e,t){var n=t.start,r=t.end;void 0===r&&(r=n);"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length)):function(e,t){var n=e.ownerDocument||document,r=n&&n.defaultView||window;if(r.getSelection){var o=r.getSelection(),i=e.textContent.length,a=Math.min(t.start,i),s=void 0===t.end?a:Math.min(t.end,i);if(!o.extend&&a>s){var c=s;s=a,a=c}var l=Ii(e,a),u=Ii(e,s);if(l&&u){if(1===o.rangeCount&&o.anchorNode===l.node&&o.anchorOffset===l.offset&&o.focusNode===u.node&&o.focusOffset===u.offset)return;var d=n.createRange();d.setStart(l.node,l.offset),o.removeAllRanges(),a>s?(o.addRange(d),o.extend(u.node,u.offset)):(d.setEnd(u.node,u.offset),o.addRange(d))}}}(e,t)}(n,r);for(var o=[],i=n;i=i.parentNode;)1===i.nodeType&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});"function"==typeof n.focus&&n.focus();for(var a=0;a<o.length;a++){var s=o[a];s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}}var Bi=g&&"documentMode"in document&&document.documentMode<=11;var Gi=null,Vi=null,qi=null,Hi=!1;function zi(e,t,n){var r,o=(r=n).window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!Hi&&null!=Gi&&Gi===qe(o)){var i=function(e){if("selectionStart"in e&&ji(e))return{start:e.selectionStart,end:e.selectionEnd};var t=(e.ownerDocument&&e.ownerDocument.defaultView||window).getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}(Gi);if(!qi||!Oi(qi,i)){qi=i;var a=sa(Vi,"onSelect");if(a.length>0){var s=new Fo("onSelect","select",null,t,n);e.push({event:s,listeners:a}),s.target=Gi}}}}function Wi(e,t,n,r,o,i,a){var s=Rr.get(t);if(void 0!==s){var c=Fo,l=t;switch(t){case"keypress":if(0===yo(r))return;case"keydown":case"keyup":c=Ho;break;case"focusin":l="focus",c=No;break;case"focusout":l="blur",c=No;break;case"beforeblur":case"afterblur":c=No;break;case"click":if(2===r.button)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=Io;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=Ao;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=Wo;break;case xr:case kr:case Fr:c=Mo;break;case Or:c=Ko;break;case"scroll":c=Ro;break;case"wheel":c=Yo;break;case"copy":case"cut":case"paste":c=Po;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=zo}var u=0!=(4&i),d=!u&&"scroll"===t,h=function(e,t,n,r,o){var i=null!==t?t+"Capture":null,a=r?i:t,s=[],c=e,l=null;for(;null!==c;){var u=c,d=u.stateNode;if(5===u.tag&&null!==d&&(l=d,null!==a)){var h=kn(c,a);null!=h&&s.push(aa(c,h,l))}if(o)break;c=c.return}return s}(n,s,r.type,u,d);if(h.length>0){var p=new c(s,l,null,r,o);e.push({event:p,listeners:h})}}}function Ki(e,t,n,r,o,i,a){Wi(e,t,n,r,o,i),0==(7&i)&&(xi(e,t,n,r,o,i),Ti(e,t,n,r,o),function(e,t,n,r,o,i,a){var s=n?ws(n):window;switch(t){case"focusin":(ui(s)||"true"===s.contentEditable)&&(Gi=s,Vi=n,qi=null);break;case"focusout":Gi=null,Vi=null,qi=null;break;case"mousedown":Hi=!0;break;case"contextmenu":case"mouseup":case"dragend":Hi=!1,zi(e,r,o);break;case"selectionchange":if(Bi)break;case"keydown":case"keyup":zi(e,r,o)}}(e,t,n,r,o),function(e,t,n,r,o,i,a){ai(e,t,n,r,o),ci(e,t,n,r,o)}(e,t,n,r,o))}Pr(Ir,0),Pr(Nr,1),Pr(Mr,2),function(e,t){for(var n=0;n<e.length;n++)Dr.set(e[n],t)}(Ar,0),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),p("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"]),p("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"]),p("onBeforeInput",["compositionend","keypress","textInput","paste"]),p("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),p("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),p("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"]);var Yi=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],$i=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Yi));function Qi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,a,s,c){if(Un.apply(this,arguments),Nn){var l=Gn();Pn||(Pn=!0,Ln=l)}}(r,t,void 0,e),e.currentTarget=null}function Ji(e,t,n){var r;if(n)for(var o=t.length-1;o>=0;o--){var i=t[o],a=i.instance,s=i.currentTarget,c=i.listener;if(a!==r&&e.isPropagationStopped())return;Qi(e,c,s),r=a}else for(var l=0;l<t.length;l++){var u=t[l],d=u.instance,h=u.currentTarget,p=u.listener;if(d!==r&&e.isPropagationStopped())return;Qi(e,p,h),r=d}}function Xi(e,t){for(var n=0!=(4&t),r=0;r<e.length;r++){var o=e[r];Ji(o.event,o.listeners,n)}!function(){if(Pn){var e=Ln;throw Pn=!1,Ln=null,e}}()}function Zi(e,t){var n=xs(t),r=ua(e,!1);n.has(r)||(ra(t,e,2,!1),n.add(r))}var ea="_reactListening"+Math.random().toString(36).slice(2);function ta(e){e[ea]||(e[ea]=!0,u.forEach((function(t){$i.has(t)||na(t,!1,e,null),na(t,!0,e,null)})))}function na(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&$i.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=xs(i),s=ua(e,t);a.has(s)||(t&&(o|=4),ra(i,e,o,t),a.add(s))}function ra(e,t,n,r,o){var i=lo(e,t,n),a=void 0;Fn&&("touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0)),e=e,r?void 0!==a?function(e,t,n,r){e.addEventListener(t,n,{capture:!0,passive:r})}(e,t,i,a):function(e,t,n){e.addEventListener(t,n,!0)}(e,t,i):void 0!==a?function(e,t,n,r){e.addEventListener(t,n,{passive:r})}(e,t,i,a):function(e,t,n){e.addEventListener(t,n,!1)}(e,t,i)}function oa(e,t){return e===t||8===e.nodeType&&e.parentNode===t}function ia(e,t,n,r,o){var i=r;if(0==(1&t)&&0==(2&t)){var a=o;if(null!==r){var s=r;e:for(;;){if(null===s)return;var c=s.tag;if(3===c||4===c){var l=s.stateNode.containerInfo;if(oa(l,a))break;if(4===c)for(var u=s.return;null!==u;){var d=u.tag;if(3===d||4===d)if(oa(u.stateNode.containerInfo,a))return;u=u.return}for(;null!==l;){var h=Es(l);if(null===h)return;var p=h.tag;if(5===p||6===p){s=i=h;continue e}l=l.parentNode}}s=s.return}}}!function(e,t,n){if(Tn)return e(t,n);Tn=!0;try{wn(e,t,n)}finally{Tn=!1,xn()}}((function(){return function(e,t,n,r,o){var i=[];Ki(i,e,r,n,pn(n),t),Xi(i,t)}(e,t,n,i)}))}function aa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function sa(e,t){for(var n=t+"Capture",r=[],o=e;null!==o;){var i=o,a=i.stateNode;if(5===i.tag&&null!==a){var s=a,c=kn(o,n);null!=c&&r.unshift(aa(o,c,s));var l=kn(o,t);null!=l&&r.push(aa(o,l,s))}o=o.return}return r}function ca(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function la(e,t,n,r,o){for(var i=t._reactName,a=[],s=n;null!==s&&s!==r;){var c=s,l=c.alternate,u=c.stateNode,d=c.tag;if(null!==l&&l===r)break;if(5===d&&null!==u){var h=u;if(o){var p=kn(s,i);null!=p&&a.unshift(aa(s,p,h))}else if(!o){var m=kn(s,i);null!=m&&a.push(aa(s,m,h))}}s=s.return}0!==a.length&&e.push({event:t,listeners:a})}function ua(e,t){return e+"__"+(t?"capture":"bubble")}var da,ha,pa,ma,ga,fa,_a,ba,va,ya,Ea=!1,Sa=vt;da={dialog:!0,webview:!0},pa=function(e,t){nn(e,t),function(e,t){"input"!==e&&"textarea"!==e&&"select"!==e||null==t||null!==t.value||rn||(rn=!0,"select"===e&&t.multiple?c("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):c("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}(e,t),hn(e,t,{registrationNameDependencies:d,possibleRegistrationNames:h})},ba=g&&!document.documentMode;var wa=/\r\n?/g,Ca=/\u0000|\uFFFD/g;function Ta(e){return 9===e.nodeType?e:e.ownerDocument}function xa(){}function ka(e){e.onclick=xa}function Fa(e,t,n,r){var o,i=Yt(t,n);switch(pa(t,n),t){case"dialog":Zi("cancel",e),Zi("close",e),o=n;break;case"iframe":case"object":case"embed":Zi("load",e),o=n;break;case"video":case"audio":for(var a=0;a<Yi.length;a++)Zi(Yi[a],e);o=n;break;case"source":Zi("error",e),o=n;break;case"img":case"image":case"link":Zi("error",e),Zi("load",e),o=n;break;case"details":Zi("toggle",e),o=n;break;case"input":Qe(e,n),o=$e(e,n),Zi("invalid",e);break;case"option":it(0,n),o=at(0,n);break;case"select":dt(e,n),o=ut(0,n),Zi("invalid",e);break;case"textarea":mt(e,n),o=pt(e,n),Zi("invalid",e);break;default:o=n}switch(Kt(t,o),function(e,t,n,r,o){for(var i in r)if(r.hasOwnProperty(i)){var a=r[i];if("style"===i)a&&Object.freeze(a),Ht(t,a);else if("dangerouslySetInnerHTML"===i){var s=a?a.__html:void 0;null!=s&&Tt(t,s)}else if("children"===i){if("string"==typeof a)("textarea"!==e||""!==a)&&xt(t,a);else"number"==typeof a&&xt(t,""+a)}else"suppressContentEditableWarning"===i||"suppressHydrationWarning"===i||"autoFocus"===i||(d.hasOwnProperty(i)?null!=a&&("function"!=typeof a&&_a(i,a),"onScroll"===i&&Zi("scroll",t)):null!=a&&P(t,i,a,o))}}(t,e,0,o,i),t){case"input":Ge(e),Ze(e,n,!1);break;case"textarea":Ge(e),ft(e);break;case"option":!function(e,t){null!=t.value&&e.setAttribute("value",Me(Pe(t.value)))}(e,n);break;case"select":!function(e,t){var n=e;n.multiple=!!t.multiple;var r=t.value;null!=r?lt(n,!!t.multiple,r,!1):null!=t.defaultValue&<(n,!!t.multiple,t.defaultValue,!0)}(e,n);break;default:"function"==typeof o.onClick&&ka(e)}}function Oa(e,t,n,r,o){pa(t,r);var i,a,s,l,u=null;switch(t){case"input":i=$e(e,n),a=$e(e,r),u=[];break;case"option":i=at(0,n),a=at(0,r),u=[];break;case"select":i=ut(0,n),a=ut(0,r),u=[];break;case"textarea":i=pt(e,n),a=pt(e,r),u=[];break;default:a=r,"function"!=typeof(i=n).onClick&&"function"==typeof a.onClick&&ka(e)}Kt(t,a);var h=null;for(s in i)if(!a.hasOwnProperty(s)&&i.hasOwnProperty(s)&&null!=i[s])if("style"===s){var p=i[s];for(l in p)p.hasOwnProperty(l)&&(h||(h={}),h[l]="")}else"dangerouslySetInnerHTML"===s||"children"===s||"suppressContentEditableWarning"===s||"suppressHydrationWarning"===s||"autoFocus"===s||(d.hasOwnProperty(s)?u||(u=[]):(u=u||[]).push(s,null));for(s in a){var m=a[s],g=null!=i?i[s]:void 0;if(a.hasOwnProperty(s)&&m!==g&&(null!=m||null!=g))if("style"===s)if(m&&Object.freeze(m),g){for(l in g)!g.hasOwnProperty(l)||m&&m.hasOwnProperty(l)||(h||(h={}),h[l]="");for(l in m)m.hasOwnProperty(l)&&g[l]!==m[l]&&(h||(h={}),h[l]=m[l])}else h||(u||(u=[]),u.push(s,h)),h=m;else if("dangerouslySetInnerHTML"===s){var f=m?m.__html:void 0,_=g?g.__html:void 0;null!=f&&_!==f&&(u=u||[]).push(s,f)}else"children"===s?"string"!=typeof m&&"number"!=typeof m||(u=u||[]).push(s,""+m):"suppressContentEditableWarning"===s||"suppressHydrationWarning"===s||(d.hasOwnProperty(s)?(null!=m&&("function"!=typeof m&&_a(s,m),"onScroll"===s&&Zi("scroll",e)),u||g===m||(u=[])):"object"==typeof m&&null!==m&&m.$$typeof===J?m.toString():(u=u||[]).push(s,m))}return h&&(!function(e,t){if(t){var n,r=zt(e),o=zt(t),i={};for(var a in r){var s=r[a],l=o[a];if(l&&s!==l){var u=s+","+l;if(i[u])continue;i[u]=!0,c("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",null==(n=e[s])||"boolean"==typeof n||""===n?"Removing":"Updating",s,l)}}}}(h,a.style),(u=u||[]).push("style",h)),u}function Ra(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&Je(e,o);Yt(n,r);switch(function(e,t,n,r){for(var o=0;o<t.length;o+=2){var i=t[o],a=t[o+1];"style"===i?Ht(e,a):"dangerouslySetInnerHTML"===i?Tt(e,a):"children"===i?xt(e,a):P(e,i,a,r)}}(e,t,0,Yt(n,o)),n){case"input":Xe(e,o);break;case"textarea":gt(e,o);break;case"select":!function(e,t){var n=e,r=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var o=t.value;null!=o?lt(n,!!t.multiple,o,!1):r!==!!t.multiple&&(null!=t.defaultValue?lt(n,!!t.multiple,t.defaultValue,!0):lt(n,!!t.multiple,t.multiple?[]:"",!1))}(e,o)}}function Da(e,t){ma(e.nodeValue,t)}function Ia(e,t){Ea||(Ea=!0,c("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase()))}function Aa(e,t){Ea||(Ea=!0,c('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase()))}function Na(e,t,n){Ea||(Ea=!0,c("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase()))}function Ma(e,t){""!==t&&(Ea||(Ea=!0,c('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())))}va=function(e){return("string"==typeof e?e:""+e).replace(wa,"\n").replace(Ca,"")},ma=function(e,t){if(!Ea){var n=va(t),r=va(e);r!==n&&(Ea=!0,c('Text content did not match. Server: "%s" Client: "%s"',r,n))}},ga=function(e,t,n){if(!Ea){var r=va(n),o=va(t);o!==r&&(Ea=!0,c("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(o),JSON.stringify(r)))}},fa=function(e){if(!Ea){Ea=!0;var t=[];e.forEach((function(e){t.push(e)})),c("Extra attributes from the server: %s",t)}},_a=function(e,t){!1===t?c("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):c("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},ya=function(e,t){var n=e.namespaceURI===Sa?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var Pa,La,ja=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Ua=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],Ba=Ua.concat(["button"]),Ga=["dd","dt","li","option","optgroup","p","rp","rt"],Va={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};La=function(e,t){var n=r({},e||Va),o={tag:t};return-1!==Ua.indexOf(t)&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),-1!==Ba.indexOf(t)&&(n.pTagInButtonScope=null),-1!==ja.indexOf(t)&&"address"!==t&&"div"!==t&&"p"!==t&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=o,"form"===t&&(n.formTag=o),"a"===t&&(n.aTagInScope=o),"button"===t&&(n.buttonTagInScope=o),"nobr"===t&&(n.nobrTagInScope=o),"p"===t&&(n.pTagInButtonScope=o),"li"===t&&(n.listItemTagAutoclosing=o),"dd"!==t&&"dt"!==t||(n.dlItemTagAutoclosing=o),n};var qa={};Pa=function(e,t,n){var r=(n=n||Va).current,o=r&&r.tag;null!=t&&(null!=e&&c("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var i=function(e,t){switch(t){case"select":return"option"===e||"optgroup"===e||"#text"===e;case"optgroup":return"option"===e||"#text"===e;case"option":return"#text"===e;case"tr":return"th"===e||"td"===e||"style"===e||"script"===e||"template"===e;case"tbody":case"thead":case"tfoot":return"tr"===e||"style"===e||"script"===e||"template"===e;case"colgroup":return"col"===e||"template"===e;case"table":return"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e;case"head":return"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e;case"html":return"head"===e||"body"===e||"frameset"===e;case"frameset":return"frame"===e;case"#document":return"html"===e}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t;case"rp":case"rt":return-1===Ga.indexOf(t);case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==t}return!0}(e,o)?null:r,a=i?null:function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}(e,n),s=i||a;if(s){var l=s.tag,u=!!i+"|"+e+"|"+l;if(!qa[u]){qa[u]=!0;var d=e,h="";if("#text"===e?/\S/.test(t)?d="Text nodes":(d="Whitespace text nodes",h=" Make sure you don't have any extra whitespace between tags on each line of your source code."):d="<"+e+">",i){var p="";"table"===l&&"tr"===e&&(p+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),c("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",d,l,h,p)}else c("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",d,l)}}};var Ha=null,za=null;function Wa(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Ka(e){var t,n;Ha=so,n=Li(),za={focusedElem:n,selectionRange:ji(n)?(t=n,("selectionStart"in t?{start:t.selectionStart,end:t.selectionEnd}:Ai(t))||{start:0,end:0}):null};return co(!1),null}function Ya(e,t,n,r,o){var i=r;if(Pa(e,null,i.ancestorInfo),"string"==typeof t.children||"number"==typeof t.children){var a=""+t.children,s=La(i.ancestorInfo,e);Pa(null,a,s)}var l=function(e,t,n,r){var o,i,a=Ta(n),s=r;if(s===Sa&&(s=Et(e)),s===Sa){if((o=Yt(e,t))||e===e.toLowerCase()||c("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),"script"===e){var l=a.createElement("div");l.innerHTML="<script><\/script>";var u=l.firstChild;i=l.removeChild(u)}else if("string"==typeof t.is)i=a.createElement(e,{is:t.is});else if(i=a.createElement(e),"select"===e){var d=i;t.multiple?d.multiple=!0:t.size&&(d.size=t.size)}}else i=a.createElementNS(s,e);return s===Sa&&(o||"[object HTMLUnknownElement]"!==Object.prototype.toString.call(i)||Object.prototype.hasOwnProperty.call(da,e)||(da[e]=!0,c("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e))),i}(e,t,n,i.namespace);return bs(o,l),Ts(l,t),l}function $a(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}function Qa(e,t,n,r){Pa(null,e,n.ancestorInfo);var o=function(e,t){return Ta(t).createTextNode(e)}(e,t);return bs(r,o),o}var Ja="function"==typeof setTimeout?setTimeout:void 0,Xa="function"==typeof clearTimeout?clearTimeout:void 0;function Za(e){xt(e,"")}function es(e,t){e.removeChild(t)}function ts(e){var t=(e=e).style;"function"==typeof t.setProperty?t.setProperty("display","none","important"):t.display="none"}function ns(e,t){e=e;var n=t.style,r=null!=n&&n.hasOwnProperty("display")?n.display:null;e.style.display=Rt("display",r)}function rs(e,t){e.nodeValue=t}function os(e){if(1===e.nodeType)e.textContent="";else if(9===e.nodeType){var t=e.body;null!=t&&(t.textContent="")}}function is(e){return"$!"===e.data}function as(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function ss(e){return as(e.nextSibling)}function cs(e){return as(e.firstChild)}function ls(e,t,n,r,o,i){return bs(i,e),Ts(e,n),function(e,t,n,r,o){var i,a;switch(ha=!0===n.suppressHydrationWarning,i=Yt(t,n),pa(t,n),t){case"dialog":Zi("cancel",e),Zi("close",e);break;case"iframe":case"object":case"embed":Zi("load",e);break;case"video":case"audio":for(var s=0;s<Yi.length;s++)Zi(Yi[s],e);break;case"source":Zi("error",e);break;case"img":case"image":case"link":Zi("error",e),Zi("load",e);break;case"details":Zi("toggle",e);break;case"input":Qe(e,n),Zi("invalid",e);break;case"option":it(0,n);break;case"select":dt(e,n),Zi("invalid",e);break;case"textarea":mt(e,n),Zi("invalid",e)}Kt(t,n),a=new Set;for(var c=e.attributes,l=0;l<c.length;l++){switch(c[l].name.toLowerCase()){case"data-reactroot":case"value":case"checked":case"selected":break;default:a.add(c[l].name)}}var u,h=null;for(var p in n)if(n.hasOwnProperty(p)){var m=n[p];if("children"===p)"string"==typeof m?e.textContent!==m&&(ha||ma(e.textContent,m),h=["children",m]):"number"==typeof m&&e.textContent!==""+m&&(ha||ma(e.textContent,m),h=["children",""+m]);else if(d.hasOwnProperty(p))null!=m&&("function"!=typeof m&&_a(p,m),"onScroll"===p&&Zi("scroll",e));else if("boolean"==typeof i){var g=void 0,f=x(p);if(ha);else if("suppressContentEditableWarning"===p||"suppressHydrationWarning"===p||"value"===p||"checked"===p||"selected"===p);else if("dangerouslySetInnerHTML"===p){var _=e.innerHTML,b=m?m.__html:void 0;if(null!=b){var v=ya(e,b);v!==_&&ga(p,_,v)}}else if("style"===p){if(a.delete(p),ba){var y=qt(m);y!==(g=e.getAttribute("style"))&&ga(p,g,y)}}else if(i)a.delete(p.toLowerCase()),m!==(g=M(e,p,m))&&ga(p,g,m);else if(!w(p,f,i)&&!T(p,m,f,i)){var E=!1;if(null!==f)a.delete(f.attributeName),g=N(e,p,m,f);else{var S=r;if(S===Sa&&(S=Et(t)),S===Sa)a.delete(p.toLowerCase());else{var C=(u=void 0,u=p.toLowerCase(),$t.hasOwnProperty(u)&&$t[u]||null);null!==C&&C!==p&&(E=!0,a.delete(C)),a.delete(p)}g=M(e,p,m)}m===g||E||ga(p,g,m)}}}switch(a.size>0&&!ha&&fa(a),t){case"input":Ge(e),Ze(e,n,!0);break;case"textarea":Ge(e),ft(e);break;case"select":case"option":break;default:"function"==typeof n.onClick&&ka(e)}return h}(e,t,n,o.namespace)}function us(e){for(var t=e.previousSibling,n=0;t;){if(8===t.nodeType){var r=t.data;if("$"===r||"$!"===r||"$?"===r){if(0===n)return t;n--}else"/$"===r&&n++}t=t.previousSibling}return null}var ds=0;function hs(e){var t="r:"+(ds++).toString(36);return{toString:function(){return e(),t},valueOf:function(){return e(),t}}}var ps=Math.random().toString(36).slice(2),ms="__reactFiber$"+ps,gs="__reactProps$"+ps,fs="__reactContainer$"+ps,_s="__reactEvents$"+ps;function bs(e,t){t[ms]=e}function vs(e){e[fs]=null}function ys(e){return!!e[fs]}function Es(e){var t=e[ms];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fs]||n[ms]){var r=t.alternate;if(null!==t.child||null!==r&&null!==r.child)for(var o=us(e);null!==o;){var i=o[ms];if(i)return i;o=us(o)}return t}n=(e=n).parentNode}return null}function Ss(e){var t=e[ms]||e[fs];return t&&(5===t.tag||6===t.tag||13===t.tag||3===t.tag)?t:null}function ws(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function Cs(e){return e[gs]||null}function Ts(e,t){e[gs]=t}function xs(e){var t=e[_s];return void 0===t&&(t=e[_s]=new Set),t}var ks={},Fs=a.ReactDebugCurrentFrame;function Os(e){if(e){var t=e._owner,n=function e(t,n,r){if(null==t)return"";if("function"==typeof t)return Ee(t,!(!(o=t.prototype)||!o.isReactComponent));var o;if("string"==typeof t)return _e(t);switch(t){case z:return _e("Suspense");case W:return _e("SuspenseList")}if("object"==typeof t)switch(t.$$typeof){case H:return Se(t.render);case K:return e(t.type,n,r);case $:return Se(t._render);case Y:var i=t,a=i._payload,s=i._init;try{return e(s(a),n,r)}catch(e){}}return""}(e.type,e._source,t?t.type:null);Fs.setExtraStackFrame(n)}else Fs.setExtraStackFrame(null)}function Rs(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var a in e)if(i(e,a)){var s=void 0;try{if("function"!=typeof e[a]){var l=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}!s||s instanceof Error||(Os(o),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof s),Os(null)),s instanceof Error&&!(s.message in ks)&&(ks[s.message]=!0,Os(o),c("Failed %s type: %s",n,s.message),Os(null))}}var Ds,Is=[];Ds=[];var As,Ns=-1;function Ms(e){return{current:e}}function Ps(e,t){Ns<0?c("Unexpected pop."):(t!==Ds[Ns]&&c("Unexpected Fiber popped."),e.current=Is[Ns],Is[Ns]=null,Ds[Ns]=null,Ns--)}function Ls(e,t,n){Ns++,Is[Ns]=e.current,Ds[Ns]=n,e.current=t}As={};var js={};Object.freeze(js);var Us=Ms(js),Bs=Ms(!1),Gs=js;function Vs(e,t,n){return n&&Ws(t)?Gs:Us.current}function qs(e,t,n){var r=e.stateNode;r.__reactInternalMemoizedUnmaskedChildContext=t,r.__reactInternalMemoizedMaskedChildContext=n}function Hs(e,t){var n=e.type,r=n.contextTypes;if(!r)return js;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var i={};for(var a in r)i[a]=t[a];return Rs(r,i,"context",xe(n)||"Unknown"),o&&qs(e,t,i),i}function zs(){return Bs.current}function Ws(e){var t=e.childContextTypes;return null!=t}function Ks(e){Ps(Bs,e),Ps(Us,e)}function Ys(e){Ps(Bs,e),Ps(Us,e)}function $s(e,t,n){if(Us.current!==js)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Ls(Us,t,e),Ls(Bs,n,e)}function Qs(e,t,n){var o=e.stateNode,i=t.childContextTypes;if("function"!=typeof o.getChildContext){var a=xe(t)||"Unknown";return As[a]||(As[a]=!0,c("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",a,a)),n}var s=o.getChildContext();for(var l in s)if(!(l in i))throw Error((xe(t)||"Unknown")+'.getChildContext(): key "'+l+'" is not defined in childContextTypes.');return Rs(i,s,"child context",xe(t)||"Unknown"),r({},n,s)}function Js(e){var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||js;return Gs=Us.current,Ls(Us,n,e),Ls(Bs,Bs.current,e),!0}function Xs(e,t,n){var r=e.stateNode;if(!r)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(n){var o=Qs(e,t,Gs);r.__reactInternalMemoizedMergedChildContext=o,Ps(Bs,e),Ps(Us,e),Ls(Us,o,e),Ls(Bs,n,e)}else Ps(Bs,e),Ls(Bs,n,e)}function Zs(e){if(!function(e){return Yn(e)===e}(e)||1!==e.tag)throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case 3:return t.stateNode.context;case 1:if(Ws(t.type))return t.stateNode.__reactInternalMemoizedMergedChildContext}t=t.return}while(null!==t);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}var ec=null,tc=null,nc=!1,rc="undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;function oc(e,t){if(tc&&"function"==typeof tc.onCommitFiberRoot)try{var n=64==(64&e.current.flags);tc.onCommitFiberRoot(ec,e,t,n)}catch(e){nc||(nc=!0,c("React instrumentation encountered an error: %s",e))}}var ic=o.unstable_runWithPriority,ac=o.unstable_scheduleCallback,sc=o.unstable_cancelCallback,cc=o.unstable_shouldYield,lc=o.unstable_requestPaint,uc=o.unstable_now,dc=o.unstable_getCurrentPriorityLevel,hc=o.unstable_ImmediatePriority,pc=o.unstable_UserBlockingPriority,mc=o.unstable_NormalPriority,gc=o.unstable_LowPriority,fc=o.unstable_IdlePriority;if(null==i.__interactionsRef||null==i.__interactionsRef.current)throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");var _c={},bc=cc,vc=void 0!==lc?lc:function(){},yc=null,Ec=null,Sc=!1,wc=uc(),Cc=wc<1e4?uc:function(){return uc()-wc};function Tc(){switch(dc()){case hc:return 99;case pc:return 98;case mc:return 97;case gc:return 96;case fc:return 95;default:throw Error("Unknown priority level.")}}function xc(e){switch(e){case 99:return hc;case 98:return pc;case 97:return mc;case 96:return gc;case 95:return fc;default:throw Error("Unknown priority level.")}}function kc(e,t){var n=xc(e);return ic(n,t)}function Fc(e,t,n){var r=xc(e);return ac(r,t,n)}function Oc(e){e!==_c&&sc(e)}function Rc(){if(null!==Ec){var e=Ec;Ec=null,sc(e)}Dc()}function Dc(){if(!Sc&&null!==yc){Sc=!0;var e=0;try{var t=yc;kc(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),yc=null}catch(t){throw null!==yc&&(yc=yc.slice(e+1)),ac(hc,Rc),t}finally{Sc=!1}}}var Ic=a.ReactCurrentBatchConfig;var Ac={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},Nc=function(e){var t=[];return e.forEach((function(e){t.push(e)})),t.sort().join(", ")},Mc=[],Pc=[],Lc=[],jc=[],Uc=[],Bc=[],Gc=new Set;Ac.recordUnsafeLifecycleWarnings=function(e,t){Gc.has(e.type)||("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning&&Mc.push(e),1&e.mode&&"function"==typeof t.UNSAFE_componentWillMount&&Pc.push(e),"function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning&&Lc.push(e),1&e.mode&&"function"==typeof t.UNSAFE_componentWillReceiveProps&&jc.push(e),"function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning&&Uc.push(e),1&e.mode&&"function"==typeof t.UNSAFE_componentWillUpdate&&Bc.push(e))},Ac.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;Mc.length>0&&(Mc.forEach((function(t){e.add(xe(t.type)||"Component"),Gc.add(t.type)})),Mc=[]);var t=new Set;Pc.length>0&&(Pc.forEach((function(e){t.add(xe(e.type)||"Component"),Gc.add(e.type)})),Pc=[]);var n=new Set;Lc.length>0&&(Lc.forEach((function(e){n.add(xe(e.type)||"Component"),Gc.add(e.type)})),Lc=[]);var r=new Set;jc.length>0&&(jc.forEach((function(e){r.add(xe(e.type)||"Component"),Gc.add(e.type)})),jc=[]);var o=new Set;Uc.length>0&&(Uc.forEach((function(e){o.add(xe(e.type)||"Component"),Gc.add(e.type)})),Uc=[]);var i=new Set;(Bc.length>0&&(Bc.forEach((function(e){i.add(xe(e.type)||"Component"),Gc.add(e.type)})),Bc=[]),t.size>0)&&c("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",Nc(t));r.size>0&&c("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s",Nc(r));i.size>0&&c("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",Nc(i));e.size>0&&s("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",Nc(e));n.size>0&&s("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",Nc(n));o.size>0&&s("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",Nc(o))};var Vc=new Map,qc=new Set;function Hc(e,t){if(e&&e.defaultProps){var n=r({},t),o=e.defaultProps;for(var i in o)void 0===n[i]&&(n[i]=o[i]);return n}return t}Ac.recordLegacyContextWarning=function(e,t){var n=function(e){for(var t=null,n=e;null!==n;)1&n.mode&&(t=n),n=n.return;return t}(e);if(null!==n){if(!qc.has(e.type)){var r=Vc.get(n);(null!=e.type.contextTypes||null!=e.type.childContextTypes||null!==t&&"function"==typeof t.getChildContext)&&(void 0===r&&(r=[],Vc.set(n,r)),r.push(e))}}else c("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},Ac.flushLegacyContextWarning=function(){Vc.forEach((function(e,t){if(0!==e.length){var n=e[0],r=new Set;e.forEach((function(e){r.add(xe(e.type)||"Component"),qc.add(e.type)}));var o=Nc(r);try{Ae(n),c("Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context",o)}finally{Ie()}}}))},Ac.discardPendingWarnings=function(){Mc=[],Pc=[],Lc=[],jc=[],Uc=[],Bc=[],Vc=new Map};var zc,Wc=Ms(null);zc={};var Kc=null,Yc=null,$c=null,Qc=!1;function Jc(){Kc=null,Yc=null,$c=null,Qc=!1}function Xc(){Qc=!0}function Zc(){Qc=!1}function el(e,t){var n=e.type._context;Ls(Wc,n._currentValue,e),n._currentValue=t,void 0!==n._currentRenderer&&null!==n._currentRenderer&&n._currentRenderer!==zc&&c("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=zc}function tl(e){var t=Wc.current;Ps(Wc,e),e.type._context._currentValue=t}function nl(e,t){for(var n=e;null!==n;){var r=n.alternate;if($r(n.childLanes,t)){if(null===r||$r(r.childLanes,t))break;r.childLanes=Qr(r.childLanes,t)}else n.childLanes=Qr(n.childLanes,t),null!==r&&(r.childLanes=Qr(r.childLanes,t));n=n.return}}function rl(e,t){Kc=e,Yc=null,$c=null;var n=e.dependencies;null!==n&&(null!==n.firstContext&&(Yr(n.lanes,t)&&rp(),n.firstContext=null))}function ol(e,t){if(Qc&&c("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),$c===e);else if(!1===t||0===t);else{var n;"number"!=typeof t||1073741823===t?($c=e,n=1073741823):n=t;var r={context:e,observedBits:n,next:null};if(null===Yc){if(null===Kc)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Yc=r,Kc.dependencies={lanes:0,firstContext:r,responders:null}}else Yc=Yc.next=r}return e._currentValue}var il,al,sl=2,cl=!1;function ll(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null};e.updateQueue=t}function ul(e,t){var n=t.updateQueue,r=e.updateQueue;if(n===r){var o={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects};t.updateQueue=o}}function dl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function hl(e,t){var n=e.updateQueue;if(null!==n){var r=n.shared,o=r.pending;null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,al!==r||il||(c("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),il=!0)}}function pl(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r){var o=r.updateQueue;if(n===o){var i=null,a=null,s=n.firstBaseUpdate;if(null!==s){var c=s;do{var l={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===a?i=a=l:(a.next=l,a=l),c=c.next}while(null!==c);null===a?i=a=t:(a.next=t,a=t)}else i=a=t;return n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:o.shared,effects:o.effects},void(e.updateQueue=n)}}var u=n.lastBaseUpdate;null===u?n.firstBaseUpdate=t:u.next=t,n.lastBaseUpdate=t}function ml(e,t,n,o,i,a){switch(n.tag){case 1:var s=n.payload;if("function"==typeof s){Xc();var c=s.call(a,o,i);if(1&e.mode){pe();try{s.call(a,o,i)}finally{me()}}return Zc(),c}return s;case 3:e.flags=-4097&e.flags|64;case 0:var l,u=n.payload;if("function"==typeof u){if(Xc(),l=u.call(a,o,i),1&e.mode){pe();try{u.call(a,o,i)}finally{me()}}Zc()}else l=u;return null==l?o:r({},o,l);case sl:return cl=!0,o}return o}function gl(e,t,n,r){var o=e.updateQueue;cl=!1,al=o.shared;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var c=s,l=c.next;c.next=null,null===a?i=l:a.next=l,a=c;var u=e.alternate;if(null!==u){var d=u.updateQueue,h=d.lastBaseUpdate;h!==a&&(null===h?d.firstBaseUpdate=l:h.next=l,d.lastBaseUpdate=c)}}if(null!==i){for(var p=o.baseState,m=0,g=null,f=null,_=null,b=i;;){var v=b.lane,y=b.eventTime;if($r(r,v)){if(null!==_){var E={eventTime:y,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null};_=_.next=E}if(p=ml(e,0,b,p,t,n),null!==b.callback){e.flags|=32;var S=o.effects;null===S?o.effects=[b]:S.push(b)}}else{var w={eventTime:y,lane:v,tag:b.tag,payload:b.payload,callback:b.callback,next:null};null===_?(f=_=w,g=p):_=_.next=w,m=Qr(m,v)}if(null===(b=b.next)){if(null===(s=o.shared.pending))break;var C=s,T=C.next;C.next=null,b=T,o.lastBaseUpdate=C,o.shared.pending=null}}null===_&&(g=p),o.baseState=g,o.firstBaseUpdate=f,o.lastBaseUpdate=_,Qm(m),e.lanes=m,e.memoizedState=p}al=null}function fl(e,t){if("function"!=typeof e)throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function _l(){cl=!1}function bl(){return cl}function vl(e,t,n){var r=t.effects;if(t.effects=null,null!==r)for(var o=0;o<r.length;o++){var i=r[o],a=i.callback;null!==a&&(i.callback=null,fl(a,n))}}il=!1,al=null;var yl,El,Sl,wl,Cl,Tl,xl,kl,Fl,Ol,Rl={},Dl=Array.isArray,Il=(new e.Component).refs;yl=new Set,El=new Set,Sl=new Set,wl=new Set,kl=new Set,Cl=new Set,Fl=new Set,Ol=new Set;var Al=new Set;function Nl(e,t,n,o){var i=e.memoizedState;if(1&e.mode){pe();try{n(o,i)}finally{me()}}var a=n(o,i);Tl(t,a);var s=null==a?i:r({},i,a);(e.memoizedState=s,0===e.lanes)&&(e.updateQueue.baseState=s)}xl=function(e,t){if(null!==e&&"function"!=typeof e){var n=t+"_"+e;Al.has(n)||(Al.add(n),c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},Tl=function(e,t){if(void 0===t){var n=xe(e)||"Component";Cl.has(n)||(Cl.add(n),c("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(Rl,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(Rl);var Ml,Pl,Ll,jl,Ul,Bl={isMounted:function(e){var t=Kn.current;if(null!==t&&1===t.tag){var n=t,r=n.stateNode;r._warnedAboutRefsInRender||c("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",xe(n.type)||"A component"),r._warnedAboutRefsInRender=!0}var o=Vn(e);return!!o&&Yn(o)===o},enqueueSetState:function(e,t,n){var r=Vn(e),o=Rm(),i=Dm(r),a=dl(o,i);a.payload=t,null!=n&&(xl(n,"setState"),a.callback=n),hl(r,a),Am(r,i,o)},enqueueReplaceState:function(e,t,n){var r=Vn(e),o=Rm(),i=Dm(r),a=dl(o,i);a.tag=1,a.payload=t,null!=n&&(xl(n,"replaceState"),a.callback=n),hl(r,a),Am(r,i,o)},enqueueForceUpdate:function(e,t){var n=Vn(e),r=Rm(),o=Dm(n),i=dl(r,o);i.tag=sl,null!=t&&(xl(t,"forceUpdate"),i.callback=t),hl(n,i),Am(n,o,r)}};function Gl(e,t,n,r,o,i,a){var s=e.stateNode;if("function"==typeof s.shouldComponentUpdate){if(1&e.mode){pe();try{s.shouldComponentUpdate(r,i,a)}finally{me()}}var l=s.shouldComponentUpdate(r,i,a);return void 0===l&&c("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",xe(t)||"Component"),l}return!t.prototype||!t.prototype.isPureReactComponent||(!Oi(n,r)||!Oi(o,i))}function Vl(e,t){var n;t.updater=Bl,e.stateNode=t,n=e,t._reactInternals=n,t._reactInternalInstance=Rl}function ql(e,t,n){var r=!1,o=js,i=js,a=t.contextType;if("contextType"in t&&(!(null===a||void 0!==a&&a.$$typeof===q&&void 0===a._context)&&!Ol.has(t))){Ol.add(t);var s="";s=void 0===a?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":"object"!=typeof a?" However, it is set to a "+typeof a+".":a.$$typeof===V?" Did you accidentally pass the Context.Provider instead?":void 0!==a._context?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(a).join(", ")+"}.",c("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",xe(t)||"Component",s)}if("object"==typeof a&&null!==a)i=ol(a);else{o=Vs(0,t,!0);var l=t.contextTypes;i=(r=null!=l)?Hs(e,o):js}if(1&e.mode){pe();try{new t(n,i)}finally{me()}}var u=new t(n,i),d=e.memoizedState=null!==u.state&&void 0!==u.state?u.state:null;if(Vl(e,u),"function"==typeof t.getDerivedStateFromProps&&null===d){var h=xe(t)||"Component";El.has(h)||(El.add(h),c("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",h,null===u.state?"null":"undefined",h))}if("function"==typeof t.getDerivedStateFromProps||"function"==typeof u.getSnapshotBeforeUpdate){var p=null,m=null,g=null;if("function"==typeof u.componentWillMount&&!0!==u.componentWillMount.__suppressDeprecationWarning?p="componentWillMount":"function"==typeof u.UNSAFE_componentWillMount&&(p="UNSAFE_componentWillMount"),"function"==typeof u.componentWillReceiveProps&&!0!==u.componentWillReceiveProps.__suppressDeprecationWarning?m="componentWillReceiveProps":"function"==typeof u.UNSAFE_componentWillReceiveProps&&(m="UNSAFE_componentWillReceiveProps"),"function"==typeof u.componentWillUpdate&&!0!==u.componentWillUpdate.__suppressDeprecationWarning?g="componentWillUpdate":"function"==typeof u.UNSAFE_componentWillUpdate&&(g="UNSAFE_componentWillUpdate"),null!==p||null!==m||null!==g){var f=xe(t)||"Component",_="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";wl.has(f)||(wl.add(f),c("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://reactjs.org/link/unsafe-component-lifecycles",f,_,null!==p?"\n "+p:"",null!==m?"\n "+m:"",null!==g?"\n "+g:""))}}return r&&qs(e,o,i),u}function Hl(e,t,n,r){var o=t.state;if("function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==o){var i=xe(e.type)||"Component";yl.has(i)||(yl.add(i),c("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",i)),Bl.enqueueReplaceState(t,t.state,null)}}function zl(e,t,n,r){!function(e,t,n){var r=e.stateNode,o=xe(t)||"Component";r.render||(t.prototype&&"function"==typeof t.prototype.render?c("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",o):c("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",o)),!r.getInitialState||r.getInitialState.isReactClassApproved||r.state||c("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",o),r.getDefaultProps&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",o),r.propTypes&&c("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",o),r.contextType&&c("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",o),r.contextTypes&&c("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",o),t.contextType&&t.contextTypes&&!Fl.has(t)&&(Fl.add(t),c("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",o)),"function"==typeof r.componentShouldUpdate&&c("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",o),t.prototype&&t.prototype.isPureReactComponent&&void 0!==r.shouldComponentUpdate&&c("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",xe(t)||"A pure component"),"function"==typeof r.componentDidUnmount&&c("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",o),"function"==typeof r.componentDidReceiveProps&&c("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",o),"function"==typeof r.componentWillRecieveProps&&c("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",o),"function"==typeof r.UNSAFE_componentWillRecieveProps&&c("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",o);var i=r.props!==n;void 0!==r.props&&i&&c("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",o,o),r.defaultProps&&c("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",o,o),"function"!=typeof r.getSnapshotBeforeUpdate||"function"==typeof r.componentDidUpdate||Sl.has(t)||(Sl.add(t),c("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",xe(t))),"function"==typeof r.getDerivedStateFromProps&&c("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",o),"function"==typeof r.getDerivedStateFromError&&c("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",o),"function"==typeof t.getSnapshotBeforeUpdate&&c("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",o);var a=r.state;a&&("object"!=typeof a||Dl(a))&&c("%s.state: must be set to an object or null",o),"function"==typeof r.getChildContext&&"object"!=typeof t.childContextTypes&&c("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",o)}(e,t,n);var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Il,ll(e);var i=t.contextType;if("object"==typeof i&&null!==i)o.context=ol(i);else{var a=Vs(0,t,!0);o.context=Hs(e,a)}if(o.state===n){var s=xe(t)||"Component";kl.has(s)||(kl.add(s),c("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",s))}1&e.mode&&Ac.recordLegacyContextWarning(e,o),Ac.recordUnsafeLifecycleWarnings(e,o),gl(e,n,o,r),o.state=e.memoizedState;var l=t.getDerivedStateFromProps;"function"==typeof l&&(Nl(e,t,l,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(!function(e,t){var n=t.state;"function"==typeof t.componentWillMount&&t.componentWillMount(),"function"==typeof t.UNSAFE_componentWillMount&&t.UNSAFE_componentWillMount(),n!==t.state&&(c("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",xe(e.type)||"Component"),Bl.enqueueReplaceState(t,t.state,null))}(e,o),gl(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4)}var Wl;Ml=!1,Pl=!1,Ll={},jl={},Ul={},Wl=function(e,t){if(null!==e&&"object"==typeof e&&e._store&&!e._store.validated&&null==e.key){if("object"!=typeof e._store)throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var n=xe(t.type)||"Component";jl[n]||(jl[n]=!0,c('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};var Kl=Array.isArray;function Yl(e,t,n){var r=n.ref;if(null!==r&&"function"!=typeof r&&"object"!=typeof r){if(1&e.mode&&(!n._owner||!n._self||n._owner.stateNode===n._self)){var o=xe(e.type)||"Component";Ll[o]||(c('A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',r),Ll[o]=!0)}if(n._owner){var i,a=n._owner;if(a){var s=a;if(1!==s.tag)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");i=s.stateNode}if(!i)throw Error("Missing owner for string ref "+r+". This error is likely caused by a bug in React. Please file an issue.");var l=""+r;if(null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===l)return t.ref;var u=function(e){var t=i.refs;t===Il&&(t=i.refs={}),null===e?delete t[l]:t[l]=e};return u._stringRef=l,u}if("string"!=typeof r)throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!n._owner)throw Error("Element ref was specified as a string ("+r+") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information.")}return r}function $l(e,t){if("textarea"!==e.type)throw Error("Objects are not valid as a React child (found: "+("[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}function Ql(e){var t=xe(e.type)||"Component";Ul[t]||(Ul[t]=!0,c("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."))}function Jl(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(var o=r;null!==o;)t(n,o),o=o.sibling;return null}function r(e,t){for(var n=new Map,r=t;null!==r;)null!==r.key?n.set(r.key,r):n.set(r.index,r),r=r.sibling;return n}function o(e,t){var n=of(e,t);return n.index=0,n.sibling=null,n}function i(t,n,r){if(t.index=r,!e)return n;var o=t.alternate;if(null!==o){var i=o.index;return i<n?(t.flags=2,n):i}return t.flags=2,n}function a(t){return e&&null===t.alternate&&(t.flags=2),t}function s(e,t,n,r){if(null===t||6!==t.tag){var i=df(n,e.mode,r);return i.return=e,i}var a=o(t,n);return a.return=e,a}function l(e,t,n,r){if(null!==t&&(t.elementType===n.type||zg(t,n))){var i=o(t,n.props);return i.ref=Yl(e,t,n),i.return=e,i._debugSource=n._source,i._debugOwner=n._owner,i}var a=cf(n,e.mode,r);return a.ref=Yl(e,t,n),a.return=e,a}function u(e,t,n,r){if(null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation){var i=hf(n,e.mode,r);return i.return=e,i}var a=o(t,n.children||[]);return a.return=e,a}function d(e,t,n,r,i){if(null===t||7!==t.tag){var a=lf(n,e.mode,r,i);return a.return=e,a}var s=o(t,n);return s.return=e,s}function h(e,t,n){if("string"==typeof t||"number"==typeof t){var r=df(""+t,e.mode,n);return r.return=e,r}if("object"==typeof t&&null!==t){switch(t.$$typeof){case L:var o=cf(t,e.mode,n);return o.ref=Yl(e,null,t),o.return=e,o;case j:var i=hf(t,e.mode,n);return i.return=e,i}if(Kl(t)||re(t)){var a=lf(t,e.mode,n,null);return a.return=e,a}$l(e,t)}return"function"==typeof t&&Ql(e),null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case L:return n.key===o?n.type===U?d(e,t,n.props.children,r,o):l(e,t,n,r):null;case j:return n.key===o?u(e,t,n,r):null}if(Kl(n)||re(n))return null!==o?null:d(e,t,n,r,null);$l(e,n)}return"function"==typeof n&&Ql(e),null}function m(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return s(t,e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case L:var i=e.get(null===r.key?n:r.key)||null;return r.type===U?d(t,i,r.props.children,o,r.key):l(t,i,r,o);case j:return u(t,e.get(null===r.key?n:r.key)||null,r,o)}if(Kl(r)||re(r))return d(t,e.get(n)||null,r,o,null);$l(t,r)}return"function"==typeof r&&Ql(t),null}function g(e,t,n){if("object"!=typeof e||null===e)return t;switch(e.$$typeof){case L:case j:Wl(e,n);var r=e.key;if("string"!=typeof r)break;if(null===t){(t=new Set).add(r);break}if(!t.has(r)){t.add(r);break}c("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",r)}return t}return function(s,l,u,d){var f="object"==typeof u&&null!==u&&u.type===U&&null===u.key;f&&(u=u.props.children);var _="object"==typeof u&&null!==u;if(_)switch(u.$$typeof){case L:return a(function(e,r,i,a){for(var s=i.key,c=r;null!==c;){if(c.key===s){switch(c.tag){case 7:if(i.type===U){n(e,c.sibling);var l=o(c,i.props.children);return l.return=e,l._debugSource=i._source,l._debugOwner=i._owner,l}break;case 22:default:if(c.elementType===i.type||zg(c,i)){n(e,c.sibling);var u=o(c,i.props);return u.ref=Yl(e,c,i),u.return=e,u._debugSource=i._source,u._debugOwner=i._owner,u}}n(e,c);break}t(e,c),c=c.sibling}if(i.type===U){var d=lf(i.props.children,e.mode,a,i.key);return d.return=e,d}var h=cf(i,e.mode,a);return h.ref=Yl(e,r,i),h.return=e,h}(s,l,u,d));case j:return a(function(e,r,i,a){for(var s=i.key,c=r;null!==c;){if(c.key===s){if(4===c.tag&&c.stateNode.containerInfo===i.containerInfo&&c.stateNode.implementation===i.implementation){n(e,c.sibling);var l=o(c,i.children||[]);return l.return=e,l}n(e,c);break}t(e,c),c=c.sibling}var u=hf(i,e.mode,a);return u.return=e,u}(s,l,u,d))}if("string"==typeof u||"number"==typeof u)return a(function(e,t,r,i){if(null!==t&&6===t.tag){n(e,t.sibling);var a=o(t,r);return a.return=e,a}n(e,t);var s=df(r,e.mode,i);return s.return=e,s}(s,l,""+u,d));if(Kl(u))return function(o,a,s,c){for(var l=null,u=0;u<s.length;u++){l=g(s[u],l,o)}for(var d=null,f=null,_=a,b=0,v=0,y=null;null!==_&&v<s.length;v++){_.index>v?(y=_,_=null):y=_.sibling;var E=p(o,_,s[v],c);if(null===E){null===_&&(_=y);break}e&&_&&null===E.alternate&&t(o,_),b=i(E,b,v),null===f?d=E:f.sibling=E,f=E,_=y}if(v===s.length)return n(o,_),d;if(null===_){for(;v<s.length;v++){var S=h(o,s[v],c);null!==S&&(b=i(S,b,v),null===f?d=S:f.sibling=S,f=S)}return d}for(var w=r(0,_);v<s.length;v++){var C=m(w,o,v,s[v],c);null!==C&&(e&&null!==C.alternate&&w.delete(null===C.key?v:C.key),b=i(C,b,v),null===f?d=C:f.sibling=C,f=C)}return e&&w.forEach((function(e){return t(o,e)})),d}(s,l,u,d);if(re(u))return function(o,a,s,l){var u=re(s);if("function"!=typeof u)throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");"function"==typeof Symbol&&"Generator"===s[Symbol.toStringTag]&&(Pl||c("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Pl=!0),s.entries===u&&(Ml||c("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ml=!0);var d=u.call(s);if(d)for(var f=null,_=d.next();!_.done;_=d.next()){f=g(_.value,f,o)}var b=u.call(s);if(null==b)throw Error("An iterable object provided no iterator.");for(var v=null,y=null,E=a,S=0,w=0,C=null,T=b.next();null!==E&&!T.done;w++,T=b.next()){E.index>w?(C=E,E=null):C=E.sibling;var x=p(o,E,T.value,l);if(null===x){null===E&&(E=C);break}e&&E&&null===x.alternate&&t(o,E),S=i(x,S,w),null===y?v=x:y.sibling=x,y=x,E=C}if(T.done)return n(o,E),v;if(null===E){for(;!T.done;w++,T=b.next()){var k=h(o,T.value,l);null!==k&&(S=i(k,S,w),null===y?v=k:y.sibling=k,y=k)}return v}for(var F=r(0,E);!T.done;w++,T=b.next()){var O=m(F,o,w,T.value,l);null!==O&&(e&&null!==O.alternate&&F.delete(null===O.key?w:O.key),S=i(O,S,w),null===y?v=O:y.sibling=O,y=O)}return e&&F.forEach((function(e){return t(o,e)})),v}(s,l,u,d);if(_&&$l(s,u),"function"==typeof u&&Ql(s),void 0===u&&!f)switch(s.tag){case 1:if(s.stateNode.render._isMockFunction)break;case 22:case 0:case 11:case 15:throw Error((xe(s.type)||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}return n(s,l)}}var Xl=Jl(!0),Zl=Jl(!1);function eu(e,t){for(var n=e.child;null!==n;)af(n,t),n=n.sibling}var tu={},nu=Ms(tu),ru=Ms(tu),ou=Ms(tu);function iu(e){if(e===tu)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function au(){return iu(ou.current)}function su(e,t){Ls(ou,t,e),Ls(ru,e,e),Ls(nu,tu,e);var n=function(e){var t,n,r=e.nodeType;switch(r){case 9:case 11:t=9===r?"#document":"#fragment";var o=e.documentElement;n=o?o.namespaceURI:St(null,"");break;default:var i=8===r?e.parentNode:e;n=St(i.namespaceURI||null,t=i.tagName)}var a=t.toLowerCase();return{namespace:n,ancestorInfo:La(null,a)}}(t);Ps(nu,e),Ls(nu,n,e)}function cu(e){Ps(nu,e),Ps(ru,e),Ps(ou,e)}function lu(){return iu(nu.current)}function uu(e){iu(ou.current);var t,n,r,o=iu(nu.current),i=(t=o,n=e.type,{namespace:St((r=t).namespace,n),ancestorInfo:La(r.ancestorInfo,n)});o!==i&&(Ls(ru,e,e),Ls(nu,i,e))}function du(e){ru.current===e&&(Ps(nu,e),Ps(ru,e))}var hu=Ms(0);function pu(e,t){return 0!=(e&t)}function mu(e){return 1&e}function gu(e,t){return 1&e|t}function fu(e,t){Ls(hu,t,e)}function _u(e){Ps(hu,e)}function bu(e,t){var n=e.memoizedState;if(null!==n)return null!==n.dehydrated;var r=e.memoizedProps;return void 0!==r.fallback&&(!0!==r.unstable_avoidThisFallback||!t)}function vu(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n){var r=n.dehydrated;if(null===r||"$?"===r.data||is(r))return t}}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)return null;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yu=null,Eu=null,Su=!1;function wu(e,t){switch(e.tag){case 3:!function(e,t){1===t.nodeType?Ia(e,t):8===t.nodeType||Aa(e,t)}(e.stateNode.containerInfo,t);break;case 5:!function(e,t,n,r){!0!==t.suppressHydrationWarning&&(1===r.nodeType?Ia(n,r):8===r.nodeType||Aa(n,r))}(e.type,e.memoizedProps,e.stateNode,t)}var n,r=((n=nf(5,null,null,0)).elementType="DELETED",n.type="DELETED",n);r.stateNode=t,r.return=e,r.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function Cu(e,t){switch(t.flags=-1025&t.flags|2,e.tag){case 3:var n=e.stateNode.containerInfo;switch(t.tag){case 5:var r=t.type;t.pendingProps;!function(e,t,n){Na(e,t)}(n,r);break;case 6:!function(e,t){Ma(e,t)}(n,t.pendingProps)}break;case 5:e.type;var o=e.memoizedProps,i=e.stateNode;switch(t.tag){case 5:var a=t.type;t.pendingProps;!function(e,t,n,r,o){!0!==t.suppressHydrationWarning&&Na(n,r)}(0,o,i,a);break;case 6:!function(e,t,n,r){!0!==t.suppressHydrationWarning&&Ma(n,r)}(0,o,i,t.pendingProps);break;case 13:!function(e,t,n){t.suppressHydrationWarning}(0,o)}break;default:return}}function Tu(e,t){switch(e.tag){case 5:var n=e.type,r=(e.pendingProps,function(e,t,n){return 1!==e.nodeType||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}(t,n));return null!==r&&(e.stateNode=r,!0);case 6:var o=function(e,t){return""===t||3!==e.nodeType?null:e}(t,e.pendingProps);return null!==o&&(e.stateNode=o,!0);case 13:default:return!1}}function xu(e){if(Su){var t=Eu;if(!t)return Cu(yu,e),Su=!1,void(yu=e);var n=t;if(!Tu(e,t)){if(!(t=ss(n))||!Tu(e,t))return Cu(yu,e),Su=!1,void(yu=e);wu(yu,n)}yu=e,Eu=cs(t)}}function ku(e){var t=e.stateNode,n=e.memoizedProps,r=function(e,t,n){return bs(n,e),function(e,t){return e.nodeValue!==t}(e,t)}(t,n,e);if(r){var o=yu;if(null!==o)switch(o.tag){case 3:o.stateNode.containerInfo;!function(e,t,n){Da(t,n)}(0,t,n);break;case 5:o.type;var i=o.memoizedProps;o.stateNode;!function(e,t,n,r,o){!0!==t.suppressHydrationWarning&&Da(r,o)}(0,i,0,t,n)}}return r}function Fu(e){var t=e.memoizedState,n=null!==t?t.dehydrated:null;if(!n)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return function(e){for(var t=e.nextSibling,n=0;t;){if(8===t.nodeType){var r=t.data;if("/$"===r){if(0===n)return ss(t);n--}else"$"!==r&&"$!"!==r&&"$?"!==r||n++}t=t.nextSibling}return null}(n)}function Ou(e){for(var t=e.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;yu=t}function Ru(e){if(e!==yu)return!1;if(!Su)return Ou(e),Su=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!$a(t,e.memoizedProps))for(var n=Eu;n;)wu(e,n),n=ss(n);return Ou(e),Eu=13===e.tag?Fu(e):yu?ss(e.stateNode):null,!0}function Du(){yu=null,Eu=null,Su=!1}function Iu(){return Su}var Au,Nu=[];function Mu(){for(var e=0;e<Nu.length;e++){Nu[e]._workInProgressVersionPrimary=null}Nu.length=0}function Pu(e,t){e._workInProgressVersionPrimary=t,Nu.push(e)}Au={};var Lu,ju,Uu=a.ReactCurrentDispatcher,Bu=a.ReactCurrentBatchConfig;ju={},Lu=new Set;var Gu=0,Vu=null,qu=null,Hu=null,zu=!1,Wu=!1,Ku=null,Yu=null,$u=-1,Qu=!1;function Ju(){var e=Ku;null===Yu?Yu=[e]:Yu.push(e)}function Xu(){var e=Ku;null!==Yu&&($u++,Yu[$u]!==e&&function(e){var t=xe(Vu.type);if(!Lu.has(t)&&(Lu.add(t),null!==Yu)){for(var n="",r=0;r<=$u;r++){for(var o=Yu[r],i=r===$u?e:o,a=r+1+". "+o;a.length<30;)a+=" ";n+=a+=i+"\n"}c("React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",t,n)}}(e))}function Zu(e){null==e||Array.isArray(e)||c("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Ku,typeof e)}function ed(){throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.")}function td(e,t){if(Qu)return!1;if(null===t)return c("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Ku),!1;e.length!==t.length&&c("The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",Ku,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!ki(e[n],t[n]))return!1;return!0}function nd(e,t,n,r,o,i){Gu=i,Vu=t,Yu=null!==e?e._debugHookTypes:null,$u=-1,Qu=null!==e&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=0,null!==e&&null!==e.memoizedState?Uu.current=Xd:Uu.current=null!==Yu?Jd:Qd;var a=n(r,o);if(Wu){var s=0;do{if(Wu=!1,!(s<25))throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");s+=1,Qu=!1,qu=null,Hu=null,t.updateQueue=null,$u=-1,Uu.current=Zd,a=n(r,o)}while(Wu)}Uu.current=$d,t._debugHookTypes=Yu;var c=null!==qu&&null!==qu.next;if(Gu=0,Vu=null,qu=null,Hu=null,Ku=null,Yu=null,$u=-1,zu=!1,c)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return a}function rd(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes=Jr(e.lanes,n)}function od(){if(Uu.current=$d,zu){for(var e=Vu.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}zu=!1}Gu=0,Vu=null,qu=null,Hu=null,Yu=null,$u=-1,Ku=null,qd=!1,Wu=!1}function id(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Hu?Vu.memoizedState=Hu=e:Hu=Hu.next=e,Hu}function ad(){var e,t;if(null===qu){var n=Vu.alternate;e=null!==n?n.memoizedState:null}else e=qu.next;if(null!==(t=null===Hu?Vu.memoizedState:Hu.next))t=(Hu=t).next,qu=e;else{if(null===e)throw Error("Rendered more hooks than during the previous render.");var r={memoizedState:(qu=e).memoizedState,baseState:qu.baseState,baseQueue:qu.baseQueue,queue:qu.queue,next:null};null===Hu?Vu.memoizedState=Hu=r:Hu=Hu.next=r}return Hu}function sd(e,t){return"function"==typeof t?t(e):t}function cd(e,t,n){var r,o=id();r=void 0!==n?n(t):t,o.memoizedState=o.baseState=r;var i=o.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a=i.dispatch=Yd.bind(null,Vu,i);return[o.memoizedState,a]}function ld(e,t,n){var r=ad(),o=r.queue;if(null===o)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");o.lastRenderedReducer=e;var i=qu,a=i.baseQueue,s=o.pending;if(null!==s){if(null!==a){var l=a.next,u=s.next;a.next=u,s.next=l}i.baseQueue!==a&&c("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),i.baseQueue=a=s,o.pending=null}if(null!==a){var d=a.next,h=i.baseState,p=null,m=null,g=null,f=d;do{var _=f.lane;if($r(Gu,_)){if(null!==g){var b={lane:0,action:f.action,eagerReducer:f.eagerReducer,eagerState:f.eagerState,next:null};g=g.next=b}if(f.eagerReducer===e)h=f.eagerState;else h=e(h,f.action)}else{var v={lane:_,action:f.action,eagerReducer:f.eagerReducer,eagerState:f.eagerState,next:null};null===g?(m=g=v,p=h):g=g.next=v,Vu.lanes=Qr(Vu.lanes,_),Qm(_)}f=f.next}while(null!==f&&f!==d);null===g?p=h:g.next=m,ki(h,r.memoizedState)||rp(),r.memoizedState=h,r.baseState=p,r.baseQueue=g,o.lastRenderedState=h}var y=o.dispatch;return[r.memoizedState,y]}function ud(e,t,n){var r=ad(),o=r.queue;if(null===o)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");o.lastRenderedReducer=e;var i=o.dispatch,a=o.pending,s=r.memoizedState;if(null!==a){o.pending=null;var c=a.next,l=c;do{s=e(s,l.action),l=l.next}while(l!==c);ki(s,r.memoizedState)||rp(),r.memoizedState=s,null===r.baseQueue&&(r.baseState=s),o.lastRenderedState=s}return[s,i]}function dd(e,t,n){var r;null==(r=t)._currentPrimaryRenderer?r._currentPrimaryRenderer=Au:r._currentPrimaryRenderer!==Au&&c("Detected multiple renderers concurrently rendering the same mutable source. This is currently unsupported.");var o=(0,t._getVersion)(t._source),i=!1,a=function(e){return e._workInProgressVersionPrimary}(t);if(null!==a?i=a===o:(i=$r(Gu,e.mutableReadLanes))&&Pu(t,o),i){var s=n(t._source);return"function"==typeof s&&c("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),s}throw function(e){Nu.push(e)}(t),Error("Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.")}function hd(e,t,n,r){var o=Kp;if(null===o)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");var i=t._getVersion,a=i(t._source),s=Uu.current,l=s.useState((function(){return dd(o,t,n)})),u=l[0],d=l[1],h=u,p=Hu,m=e.memoizedState,g=m.refs,f=g.getSnapshot,_=m.source,b=m.subscribe,v=Vu;if(e.memoizedState={refs:g,source:t,subscribe:r},s.useEffect((function(){g.getSnapshot=n,g.setSnapshot=d;var e=i(t._source);if(!ki(a,e)){var r=n(t._source);if("function"==typeof r&&c("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),!ki(h,r)){d(r);var s=Dm(v);to(o,s)}!function(e,t){e.entangledLanes|=t;for(var n=e.entanglements,r=t;r>0;){var o=Kr(r),i=1<<o;n[o]|=t,r&=~i}}(o,o.mutableReadLanes)}}),[n,t,r]),s.useEffect((function(){var e=r(t._source,(function(){var e=g.getSnapshot,n=g.setSnapshot;try{n(e(t._source));var r=Dm(v);to(o,r)}catch(e){n((function(){throw e}))}}));return"function"!=typeof e&&c("Mutable source subscribe function must return an unsubscribe function."),e}),[t,r]),!ki(f,n)||!ki(_,t)||!ki(b,r)){var y={pending:null,dispatch:null,lastRenderedReducer:sd,lastRenderedState:h};y.dispatch=d=Yd.bind(null,Vu,y),p.queue=y,p.baseQueue=null,h=dd(o,t,n),p.memoizedState=p.baseState=h}return h}function pd(e,t,n){var r=id();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},hd(r,e,t,n)}function md(e,t,n){return hd(ad(),e,t,n)}function gd(e){var t=id();"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e;var n=t.queue={pending:null,dispatch:null,lastRenderedReducer:sd,lastRenderedState:e},r=n.dispatch=Yd.bind(null,Vu,n);return[t.memoizedState,r]}function fd(e){return ld(sd)}function _d(e){return ud(sd)}function bd(e,t,n,r){var o={tag:e,create:t,destroy:n,deps:r,next:null},i=Vu.updateQueue;if(null===i)i={lastEffect:null},Vu.updateQueue=i,i.lastEffect=o.next=o;else{var a=i.lastEffect;if(null===a)i.lastEffect=o.next=o;else{var s=a.next;a.next=o,o.next=s,i.lastEffect=o}}return o}function vd(e){var t=id(),n={current:e};return Object.seal(n),t.memoizedState=n,n}function yd(e){return ad().memoizedState}function Ed(e,t,n,r){var o=id(),i=void 0===r?null:r;Vu.flags|=e,o.memoizedState=bd(1|t,n,void 0,i)}function Sd(e,t,n,r){var o=ad(),i=void 0===r?null:r,a=void 0;if(null!==qu){var s=qu.memoizedState;if(a=s.destroy,null!==i)if(td(i,s.deps))return void bd(t,n,a,i)}Vu.flags|=e,o.memoizedState=bd(1|t,n,a,i)}function wd(e,t){return"undefined"!=typeof jest&&kg(Vu),Ed(516,4,e,t)}function Cd(e,t){return"undefined"!=typeof jest&&kg(Vu),Sd(516,4,e,t)}function Td(e,t){return Ed(4,2,e,t)}function xd(e,t){return Sd(4,2,e,t)}function kd(e,t){if("function"==typeof t){var n=t,r=e();return n(r),function(){n(null)}}if(null!=t){var o=t;o.hasOwnProperty("current")||c("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(o).join(", ")+"}");var i=e();return o.current=i,function(){o.current=null}}}function Fd(e,t,n){"function"!=typeof t&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null!==t?typeof t:"null");var r=null!=n?n.concat([e]):null;return Ed(4,2,kd.bind(null,t,e),r)}function Od(e,t,n){"function"!=typeof t&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null!==t?typeof t:"null");var r=null!=n?n.concat([e]):null;return Sd(4,2,kd.bind(null,t,e),r)}function Rd(e,t){}var Dd=Rd;function Id(e,t){var n=void 0===t?null:t;return id().memoizedState=[e,n],e}function Ad(e,t){var n=ad(),r=void 0===t?null:t,o=n.memoizedState;if(null!==o&&(null!==r&&td(r,o[1])))return o[0];return n.memoizedState=[e,r],e}function Nd(e,t){var n=id(),r=void 0===t?null:t,o=e();return n.memoizedState=[o,r],o}function Md(e,t){var n=ad(),r=void 0===t?null:t,o=n.memoizedState;if(null!==o&&(null!==r&&td(r,o[1])))return o[0];var i=e();return n.memoizedState=[i,r],i}function Pd(e){var t=gd(e),n=t[0],r=t[1];return wd((function(){var t=Bu.transition;Bu.transition=1;try{r(e)}finally{Bu.transition=t}}),[e]),n}function Ld(e){var t=fd(),n=t[0],r=t[1];return Cd((function(){var t=Bu.transition;Bu.transition=1;try{r(e)}finally{Bu.transition=t}}),[e]),n}function jd(e){var t=_d(),n=t[0],r=t[1];return Cd((function(){var t=Bu.transition;Bu.transition=1;try{r(e)}finally{Bu.transition=t}}),[e]),n}function Ud(e,t){var n=Tc();kc(n<98?98:n,(function(){e(!0)})),kc(n>97?97:n,(function(){var n=Bu.transition;Bu.transition=1;try{e(!1),t()}finally{Bu.transition=n}}))}function Bd(){var e=gd(!1),t=e[0],n=e[1],r=Ud.bind(null,n);return vd(r),[r,t]}function Gd(){var e=fd()[0];return[yd().current,e]}function Vd(){var e=_d()[0];return[yd().current,e]}var qd=!1;function Hd(e){var t=xe(e.type)||"Unknown";Oe&&!ju[t]&&(c("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly."),ju[t]=!0)}function zd(){var e=hs.bind(null,Hd.bind(null,Vu));if(Iu()){var t=!1,n=Vu,r={$$typeof:J,toString:i=function(){throw t||(t=!0,qd=!0,o(e()),qd=!1,Hd(n)),Error("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.")},valueOf:i},o=gd(r)[1];return 0==(2&Vu.mode)&&(Vu.flags|=516,bd(5,(function(){o(e())}),void 0,null)),r}var i,a=e();return gd(a),a}function Wd(){return fd()[0]}function Kd(){return _d()[0]}function Yd(e,t,n){"function"==typeof arguments[3]&&c("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var r=Rm(),o=Dm(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i;var s=e.alternate;if(e===Vu||null!==s&&s===Vu)Wu=zu=!0;else{if(0===e.lanes&&(null===s||0===s.lanes)){var l=t.lastRenderedReducer;if(null!==l){var u;u=Uu.current,Uu.current=th;try{var d=t.lastRenderedState,h=l(d,n);if(i.eagerReducer=l,i.eagerState=h,ki(h,d))return}catch(e){}finally{Uu.current=u}}}"undefined"!=typeof jest&&(xg(e),Fg(e)),Am(e,o,r)}}var $d={readContext:ol,useCallback:ed,useContext:ed,useEffect:ed,useImperativeHandle:ed,useLayoutEffect:ed,useMemo:ed,useReducer:ed,useRef:ed,useState:ed,useDebugValue:ed,useDeferredValue:ed,useTransition:ed,useMutableSource:ed,useOpaqueIdentifier:ed,unstable_isNewReconciler:!1},Qd=null,Jd=null,Xd=null,Zd=null,eh=null,th=null,nh=null,rh=function(){c("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},oh=function(){c("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};Qd={readContext:function(e,t){return ol(e,t)},useCallback:function(e,t){return Ku="useCallback",Ju(),Zu(t),Id(e,t)},useContext:function(e,t){return Ku="useContext",Ju(),ol(e,t)},useEffect:function(e,t){return Ku="useEffect",Ju(),Zu(t),wd(e,t)},useImperativeHandle:function(e,t,n){return Ku="useImperativeHandle",Ju(),Zu(n),Fd(e,t,n)},useLayoutEffect:function(e,t){return Ku="useLayoutEffect",Ju(),Zu(t),Td(e,t)},useMemo:function(e,t){Ku="useMemo",Ju(),Zu(t);var n=Uu.current;Uu.current=eh;try{return Nd(e,t)}finally{Uu.current=n}},useReducer:function(e,t,n){Ku="useReducer",Ju();var r=Uu.current;Uu.current=eh;try{return cd(e,t,n)}finally{Uu.current=r}},useRef:function(e){return Ku="useRef",Ju(),vd(e)},useState:function(e){Ku="useState",Ju();var t=Uu.current;Uu.current=eh;try{return gd(e)}finally{Uu.current=t}},useDebugValue:function(e,t){Ku="useDebugValue",Ju()},useDeferredValue:function(e){return Ku="useDeferredValue",Ju(),Pd(e)},useTransition:function(){return Ku="useTransition",Ju(),Bd()},useMutableSource:function(e,t,n){return Ku="useMutableSource",Ju(),pd(e,t,n)},useOpaqueIdentifier:function(){return Ku="useOpaqueIdentifier",Ju(),zd()},unstable_isNewReconciler:!1},Jd={readContext:function(e,t){return ol(e,t)},useCallback:function(e,t){return Ku="useCallback",Xu(),Id(e,t)},useContext:function(e,t){return Ku="useContext",Xu(),ol(e,t)},useEffect:function(e,t){return Ku="useEffect",Xu(),wd(e,t)},useImperativeHandle:function(e,t,n){return Ku="useImperativeHandle",Xu(),Fd(e,t,n)},useLayoutEffect:function(e,t){return Ku="useLayoutEffect",Xu(),Td(e,t)},useMemo:function(e,t){Ku="useMemo",Xu();var n=Uu.current;Uu.current=eh;try{return Nd(e,t)}finally{Uu.current=n}},useReducer:function(e,t,n){Ku="useReducer",Xu();var r=Uu.current;Uu.current=eh;try{return cd(e,t,n)}finally{Uu.current=r}},useRef:function(e){return Ku="useRef",Xu(),vd(e)},useState:function(e){Ku="useState",Xu();var t=Uu.current;Uu.current=eh;try{return gd(e)}finally{Uu.current=t}},useDebugValue:function(e,t){Ku="useDebugValue",Xu()},useDeferredValue:function(e){return Ku="useDeferredValue",Xu(),Pd(e)},useTransition:function(){return Ku="useTransition",Xu(),Bd()},useMutableSource:function(e,t,n){return Ku="useMutableSource",Xu(),pd(e,t,n)},useOpaqueIdentifier:function(){return Ku="useOpaqueIdentifier",Xu(),zd()},unstable_isNewReconciler:!1},Xd={readContext:function(e,t){return ol(e,t)},useCallback:function(e,t){return Ku="useCallback",Xu(),Ad(e,t)},useContext:function(e,t){return Ku="useContext",Xu(),ol(e,t)},useEffect:function(e,t){return Ku="useEffect",Xu(),Cd(e,t)},useImperativeHandle:function(e,t,n){return Ku="useImperativeHandle",Xu(),Od(e,t,n)},useLayoutEffect:function(e,t){return Ku="useLayoutEffect",Xu(),xd(e,t)},useMemo:function(e,t){Ku="useMemo",Xu();var n=Uu.current;Uu.current=th;try{return Md(e,t)}finally{Uu.current=n}},useReducer:function(e,t,n){Ku="useReducer",Xu();var r=Uu.current;Uu.current=th;try{return ld(e)}finally{Uu.current=r}},useRef:function(e){return Ku="useRef",Xu(),yd()},useState:function(e){Ku="useState",Xu();var t=Uu.current;Uu.current=th;try{return fd()}finally{Uu.current=t}},useDebugValue:function(e,t){return Ku="useDebugValue",Xu(),Dd()},useDeferredValue:function(e){return Ku="useDeferredValue",Xu(),Ld(e)},useTransition:function(){return Ku="useTransition",Xu(),Gd()},useMutableSource:function(e,t,n){return Ku="useMutableSource",Xu(),md(e,t,n)},useOpaqueIdentifier:function(){return Ku="useOpaqueIdentifier",Xu(),Wd()},unstable_isNewReconciler:!1},Zd={readContext:function(e,t){return ol(e,t)},useCallback:function(e,t){return Ku="useCallback",Xu(),Ad(e,t)},useContext:function(e,t){return Ku="useContext",Xu(),ol(e,t)},useEffect:function(e,t){return Ku="useEffect",Xu(),Cd(e,t)},useImperativeHandle:function(e,t,n){return Ku="useImperativeHandle",Xu(),Od(e,t,n)},useLayoutEffect:function(e,t){return Ku="useLayoutEffect",Xu(),xd(e,t)},useMemo:function(e,t){Ku="useMemo",Xu();var n=Uu.current;Uu.current=nh;try{return Md(e,t)}finally{Uu.current=n}},useReducer:function(e,t,n){Ku="useReducer",Xu();var r=Uu.current;Uu.current=nh;try{return ud(e)}finally{Uu.current=r}},useRef:function(e){return Ku="useRef",Xu(),yd()},useState:function(e){Ku="useState",Xu();var t=Uu.current;Uu.current=nh;try{return _d()}finally{Uu.current=t}},useDebugValue:function(e,t){return Ku="useDebugValue",Xu(),Dd()},useDeferredValue:function(e){return Ku="useDeferredValue",Xu(),jd(e)},useTransition:function(){return Ku="useTransition",Xu(),Vd()},useMutableSource:function(e,t,n){return Ku="useMutableSource",Xu(),md(e,t,n)},useOpaqueIdentifier:function(){return Ku="useOpaqueIdentifier",Xu(),Kd()},unstable_isNewReconciler:!1},eh={readContext:function(e,t){return rh(),ol(e,t)},useCallback:function(e,t){return Ku="useCallback",oh(),Ju(),Id(e,t)},useContext:function(e,t){return Ku="useContext",oh(),Ju(),ol(e,t)},useEffect:function(e,t){return Ku="useEffect",oh(),Ju(),wd(e,t)},useImperativeHandle:function(e,t,n){return Ku="useImperativeHandle",oh(),Ju(),Fd(e,t,n)},useLayoutEffect:function(e,t){return Ku="useLayoutEffect",oh(),Ju(),Td(e,t)},useMemo:function(e,t){Ku="useMemo",oh(),Ju();var n=Uu.current;Uu.current=eh;try{return Nd(e,t)}finally{Uu.current=n}},useReducer:function(e,t,n){Ku="useReducer",oh(),Ju();var r=Uu.current;Uu.current=eh;try{return cd(e,t,n)}finally{Uu.current=r}},useRef:function(e){return Ku="useRef",oh(),Ju(),vd(e)},useState:function(e){Ku="useState",oh(),Ju();var t=Uu.current;Uu.current=eh;try{return gd(e)}finally{Uu.current=t}},useDebugValue:function(e,t){Ku="useDebugValue",oh(),Ju()},useDeferredValue:function(e){return Ku="useDeferredValue",oh(),Ju(),Pd(e)},useTransition:function(){return Ku="useTransition",oh(),Ju(),Bd()},useMutableSource:function(e,t,n){return Ku="useMutableSource",oh(),Ju(),pd(e,t,n)},useOpaqueIdentifier:function(){return Ku="useOpaqueIdentifier",oh(),Ju(),zd()},unstable_isNewReconciler:!1},th={readContext:function(e,t){return rh(),ol(e,t)},useCallback:function(e,t){return Ku="useCallback",oh(),Xu(),Ad(e,t)},useContext:function(e,t){return Ku="useContext",oh(),Xu(),ol(e,t)},useEffect:function(e,t){return Ku="useEffect",oh(),Xu(),Cd(e,t)},useImperativeHandle:function(e,t,n){return Ku="useImperativeHandle",oh(),Xu(),Od(e,t,n)},useLayoutEffect:function(e,t){return Ku="useLayoutEffect",oh(),Xu(),xd(e,t)},useMemo:function(e,t){Ku="useMemo",oh(),Xu();var n=Uu.current;Uu.current=th;try{return Md(e,t)}finally{Uu.current=n}},useReducer:function(e,t,n){Ku="useReducer",oh(),Xu();var r=Uu.current;Uu.current=th;try{return ld(e)}finally{Uu.current=r}},useRef:function(e){return Ku="useRef",oh(),Xu(),yd()},useState:function(e){Ku="useState",oh(),Xu();var t=Uu.current;Uu.current=th;try{return fd()}finally{Uu.current=t}},useDebugValue:function(e,t){return Ku="useDebugValue",oh(),Xu(),Dd()},useDeferredValue:function(e){return Ku="useDeferredValue",oh(),Xu(),Ld(e)},useTransition:function(){return Ku="useTransition",oh(),Xu(),Gd()},useMutableSource:function(e,t,n){return Ku="useMutableSource",oh(),Xu(),md(e,t,n)},useOpaqueIdentifier:function(){return Ku="useOpaqueIdentifier",oh(),Xu(),Wd()},unstable_isNewReconciler:!1},nh={readContext:function(e,t){return rh(),ol(e,t)},useCallback:function(e,t){return Ku="useCallback",oh(),Xu(),Ad(e,t)},useContext:function(e,t){return Ku="useContext",oh(),Xu(),ol(e,t)},useEffect:function(e,t){return Ku="useEffect",oh(),Xu(),Cd(e,t)},useImperativeHandle:function(e,t,n){return Ku="useImperativeHandle",oh(),Xu(),Od(e,t,n)},useLayoutEffect:function(e,t){return Ku="useLayoutEffect",oh(),Xu(),xd(e,t)},useMemo:function(e,t){Ku="useMemo",oh(),Xu();var n=Uu.current;Uu.current=th;try{return Md(e,t)}finally{Uu.current=n}},useReducer:function(e,t,n){Ku="useReducer",oh(),Xu();var r=Uu.current;Uu.current=th;try{return ud(e)}finally{Uu.current=r}},useRef:function(e){return Ku="useRef",oh(),Xu(),yd()},useState:function(e){Ku="useState",oh(),Xu();var t=Uu.current;Uu.current=th;try{return _d()}finally{Uu.current=t}},useDebugValue:function(e,t){return Ku="useDebugValue",oh(),Xu(),Dd()},useDeferredValue:function(e){return Ku="useDeferredValue",oh(),Xu(),jd(e)},useTransition:function(){return Ku="useTransition",oh(),Xu(),Vd()},useMutableSource:function(e,t,n){return Ku="useMutableSource",oh(),Xu(),md(e,t,n)},useOpaqueIdentifier:function(){return Ku="useOpaqueIdentifier",oh(),Xu(),Kd()},unstable_isNewReconciler:!1};var ih=o.unstable_now,ah=0,sh=-1;function ch(){return ah}function lh(){ah=ih()}function uh(e){sh=ih(),e.actualStartTime<0&&(e.actualStartTime=ih())}function dh(e){sh=-1}function hh(e,t){if(sh>=0){var n=ih()-sh;e.actualDuration+=n,t&&(e.selfBaseDuration=n),sh=-1}}function ph(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}var mh,gh,fh,_h,bh,vh,yh,Eh,Sh=a.ReactCurrentOwner,wh=!1;function Ch(e,t,n,r){t.child=null===e?Zl(t,null,n,r):Xl(t,e.child,n,r)}function Th(e,t,n,r,o){if(t.type!==t.elementType){var i=n.propTypes;i&&Rs(i,r,"prop",xe(n))}var a,s=n.render,c=t.ref;if(rl(t,o),Sh.current=t,Ne(!0),a=nd(e,t,s,r,c,o),1&t.mode){pe();try{a=nd(e,t,s,r,c,o)}finally{me()}}return Ne(!1),null===e||wh?(t.flags|=1,Ch(e,t,a,o),t.child):(rd(e,t,o),op(e,t,o))}function xh(e,t,n,r,o,i){if(null===e){var a=n.type;if(function(e){return"function"==typeof e&&!rf(e)&&void 0===e.defaultProps}(a)&&null===n.compare&&void 0===n.defaultProps){var s;return s=Vg(a),t.tag=15,t.type=s,Lh(t,a),kh(e,t,s,r,o,i)}var c=a.propTypes;c&&Rs(c,r,"prop",xe(a));var l=sf(n.type,null,r,t,t.mode,i);return l.ref=t.ref,l.return=t,t.child=l,l}var u=n.type,d=u.propTypes;d&&Rs(d,r,"prop",xe(u));var h=e.child;if(!Yr(o,i)){var p=h.memoizedProps,m=n.compare;if((m=null!==m?m:Oi)(p,r)&&e.ref===t.ref)return op(e,t,i)}t.flags|=1;var g=of(h,r);return g.ref=t.ref,g.return=t,t.child=g,g}function kh(e,t,n,r,o,i){if(t.type!==t.elementType){var a=t.elementType;if(a.$$typeof===Y){var s=a,c=s._payload,l=s._init;try{a=l(c)}catch(e){a=null}var u=a&&a.propTypes;u&&Rs(u,r,"prop",xe(a))}}if(null!==e&&(Oi(e.memoizedProps,r)&&e.ref===t.ref&&t.type===e.type)){if(wh=!1,!Yr(i,o))return t.lanes=e.lanes,op(e,t,i);0!=(16384&e.flags)&&(wh=!0)}return Dh(e,t,n,r,i)}function Fh(e,t,n){var r,o=t.pendingProps,i=o.children,a=null!==e?e.memoizedState:null;if("hidden"===o.mode||"unstable-defer-without-hiding"===o.mode)if(0==(4&t.mode)){var s={baseLanes:0};t.memoizedState=s,Vm(t,n)}else{if(!Yr(n,1073741824)){var c;if(null!==a)c=Qr(a.baseLanes,n);else c=n;Dg(1073741824),t.lanes=t.childLanes=1073741824;var l={baseLanes:c};return t.memoizedState=l,Vm(t,c),null}var u={baseLanes:0};t.memoizedState=u,Vm(t,null!==a?a.baseLanes:n)}else null!==a?(r=Qr(a.baseLanes,n),t.memoizedState=null):r=n,Vm(t,r);return Ch(e,t,i,n),t.child}mh={},gh={},fh={},_h={},bh={},vh=!1,yh={},Eh={};var Oh=Fh;function Rh(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Dh(e,t,n,r,o){if(t.type!==t.elementType){var i=n.propTypes;i&&Rs(i,r,"prop",xe(n))}var a,s;if(a=Hs(t,Vs(0,n,!0)),rl(t,o),Sh.current=t,Ne(!0),s=nd(e,t,n,r,a,o),1&t.mode){pe();try{s=nd(e,t,n,r,a,o)}finally{me()}}return Ne(!1),null===e||wh?(t.flags|=1,Ch(e,t,s,o),t.child):(rd(e,t,o),op(e,t,o))}function Ih(e,t,n,r,o){if(t.type!==t.elementType){var i=n.propTypes;i&&Rs(i,r,"prop",xe(n))}var a,s;Ws(n)?(a=!0,Js(t)):a=!1,rl(t,o),null===t.stateNode?(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ql(t,n,r),zl(t,n,r,o),s=!0):s=null===e?function(e,t,n,r){var o=e.stateNode,i=e.memoizedProps;o.props=i;var a=o.context,s=t.contextType,c=js;c="object"==typeof s&&null!==s?ol(s):Hs(e,Vs(0,t,!0));var l=t.getDerivedStateFromProps,u="function"==typeof l||"function"==typeof o.getSnapshotBeforeUpdate;u||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||i===n&&a===c||Hl(e,o,n,c),_l();var d=e.memoizedState,h=o.state=d;if(gl(e,n,o,r),h=e.memoizedState,i===n&&d===h&&!zs()&&!bl())return"function"==typeof o.componentDidMount&&(e.flags|=4),!1;"function"==typeof l&&(Nl(e,t,l,n),h=e.memoizedState);var p=bl()||Gl(e,t,i,n,d,h,c);return p?(u||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(e.flags|=4)):("function"==typeof o.componentDidMount&&(e.flags|=4),e.memoizedProps=n,e.memoizedState=h),o.props=n,o.state=h,o.context=c,p}(t,n,r,o):function(e,t,n,r,o){var i=t.stateNode;ul(e,t);var a=t.memoizedProps,s=t.type===t.elementType?a:Hc(t.type,a);i.props=s;var c=t.pendingProps,l=i.context,u=n.contextType,d=js;d="object"==typeof u&&null!==u?ol(u):Hs(t,Vs(0,n,!0));var h=n.getDerivedStateFromProps,p="function"==typeof h||"function"==typeof i.getSnapshotBeforeUpdate;p||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||a===c&&l===d||Hl(t,i,r,d),_l();var m=t.memoizedState,g=i.state=m;if(gl(t,r,i,o),g=t.memoizedState,a===c&&m===g&&!zs()&&!bl())return"function"==typeof i.componentDidUpdate&&(a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4)),"function"==typeof i.getSnapshotBeforeUpdate&&(a===e.memoizedProps&&m===e.memoizedState||(t.flags|=256)),!1;"function"==typeof h&&(Nl(t,n,h,r),g=t.memoizedState);var f=bl()||Gl(t,n,s,r,m,g,d);return f?(p||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,g,d),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,g,d)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"==typeof i.componentDidUpdate&&(a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4)),"function"==typeof i.getSnapshotBeforeUpdate&&(a===e.memoizedProps&&m===e.memoizedState||(t.flags|=256)),t.memoizedProps=r,t.memoizedState=g),i.props=r,i.state=g,i.context=d,f}(e,t,n,r,o);var l=Ah(e,t,n,s,a,o),u=t.stateNode;return s&&u.props!==r&&(vh||c("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",xe(t.type)||"a component"),vh=!0),l}function Ah(e,t,n,r,o,i){Rh(e,t);var a=0!=(64&t.flags);if(!r&&!a)return o&&Xs(t,n,!1),op(e,t,i);var s,c=t.stateNode;if(Sh.current=t,a&&"function"!=typeof n.getDerivedStateFromError)s=null,dh();else{if(Ne(!0),s=c.render(),1&t.mode){pe();try{c.render()}finally{me()}}Ne(!1)}return t.flags|=1,null!==e&&a?function(e,t,n,r){t.child=Xl(t,e.child,null,r),t.child=Xl(t,null,n,r)}(e,t,s,i):Ch(e,t,s,i),t.memoizedState=c.state,o&&Xs(t,n,!0),t.child}function Nh(e){var t=e.stateNode;t.pendingContext?$s(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$s(e,t.context,!1),su(e,t.containerInfo)}function Mh(e,t,n){Nh(t);var r=t.updateQueue;if(null===e||null===r)throw Error("If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.");var o=t.pendingProps,i=t.memoizedState,a=null!==i?i.element:null;ul(e,t),gl(t,o,null,n);var s=t.memoizedState.element;if(s===a)return Du(),op(e,t,n);var c,l,u=t.stateNode;if(u.hydrate&&(l=(c=t).stateNode.containerInfo,Eu=cs(l),yu=c,Su=!0,1)){var d=u.mutableSourceEagerHydrationData;if(null!=d)for(var h=0;h<d.length;h+=2){Pu(d[h],d[h+1])}var p=Zl(t,null,s,n);t.child=p;for(var m=p;m;)m.flags=-3&m.flags|1024,m=m.sibling}else Ch(e,t,s,n),Du();return t.child}function Ph(e,t,n,r,o){null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2);var i=t.pendingProps,a=n,s=a._payload,c=(0,a._init)(s);t.type=c;var l=t.tag=function(e){if("function"==typeof e)return rf(e)?1:0;if(null!=e){var t=e.$$typeof;if(t===H)return 11;if(t===K)return 14}return 2}(c),u=Hc(c,i);switch(l){case 0:return Lh(t,c),t.type=c=Vg(c),Dh(null,t,c,u,o);case 1:return t.type=c=qg(c),Ih(null,t,c,u,o);case 11:return t.type=c=Hg(c),Th(null,t,c,u,o);case 14:if(t.type!==t.elementType){var d=c.propTypes;d&&Rs(d,u,"prop",xe(c))}return xh(null,t,c,Hc(c.type,u),r,o)}var h="";throw null!==c&&"object"==typeof c&&c.$$typeof===Y&&(h=" Did you wrap a component in React.lazy() more than once?"),Error("Element type is invalid. Received a promise that resolves to: "+c+". Lazy element type must resolve to a class or function."+h)}function Lh(e,t){if(t&&t.childContextTypes&&c("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),null!==e.ref){var n="",r=Re();r&&(n+="\n\nCheck the render method of `"+r+"`.");var o=r||e._debugID||"",i=e._debugSource;i&&(o=i.fileName+":"+i.lineNumber),bh[o]||(bh[o]=!0,c("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",n))}if("function"==typeof t.getDerivedStateFromProps){var a=xe(t)||"Unknown";_h[a]||(c("%s: Function components do not support getDerivedStateFromProps.",a),_h[a]=!0)}if("object"==typeof t.contextType&&null!==t.contextType){var s=xe(t)||"Unknown";fh[s]||(c("%s: Function components do not support contextType.",s),fh[s]=!0)}}var jh={dehydrated:null,retryLane:0};function Uh(e){return{baseLanes:e}}function Bh(e,t){return{baseLanes:Qr(e.baseLanes,t)}}function Gh(e,t){return Jr(e.childLanes,t)}function Vh(e,t,n){var r=t.pendingProps;wf(t)&&(t.flags|=64);var o=hu.current,i=!1;if(0!=(64&t.flags)||function(e,t,n,r){return(null===t||null!==t.memoizedState)&&pu(e,2)}(o,e)?(i=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0!==r.fallback&&!0!==r.unstable_avoidThisFallback&&(o=o|1),fu(t,o=mu(o)),null===e){void 0!==r.fallback&&xu(t);var a=r.children,s=r.fallback;if(i){var c=qh(t,a,s,n);return t.child.memoizedState=Uh(n),t.memoizedState=jh,c}if("number"==typeof r.unstable_expectedLoadTime){var l=qh(t,a,s,n);return t.child.memoizedState=Uh(n),t.memoizedState=jh,t.lanes=33554432,Dg(33554432),l}return function(e,t,n){var r=e.mode,o=uf({mode:"visible",children:t},r,n,null);return o.return=e,e.child=o,o}(t,a,n)}if(null!==e.memoizedState){if(i){var u=r.fallback,d=Wh(e,t,r.children,u,n),h=t.child,p=e.child.memoizedState;return h.memoizedState=null===p?Uh(n):Bh(p,n),h.childLanes=Gh(e,n),t.memoizedState=jh,d}var m=zh(e,t,r.children,n);return t.memoizedState=null,m}if(i){var g=r.fallback,f=Wh(e,t,r.children,g,n),_=t.child,b=e.child.memoizedState;return _.memoizedState=null===b?Uh(n):Bh(b,n),_.childLanes=Gh(e,n),t.memoizedState=jh,f}var v=zh(e,t,r.children,n);return t.memoizedState=null,v}function qh(e,t,n,r){var o,i,a=e.mode,s=e.child,c={mode:"hidden",children:t};return 0==(2&a)&&null!==s?((o=s).childLanes=0,o.pendingProps=c,8&e.mode&&(o.actualDuration=0,o.actualStartTime=-1,o.selfBaseDuration=0,o.treeBaseDuration=0),i=lf(n,a,r,null)):(o=uf(c,a,0,null),i=lf(n,a,r,null)),o.return=e,i.return=e,o.sibling=i,e.child=o,i}function Hh(e,t){return of(e,t)}function zh(e,t,n,r){var o=e.child,i=o.sibling,a=Hh(o,{mode:"visible",children:n});return 0==(2&t.mode)&&(a.lanes=r),a.return=t,a.sibling=null,null!==i&&(i.nextEffect=null,i.flags=8,t.firstEffect=t.lastEffect=i),t.child=a,a}function Wh(e,t,n,r,o){var i,a,s=t.mode,c=e.child,l=c.sibling,u={mode:"hidden",children:n};if(0==(2&s)&&t.child!==c){(i=t.child).childLanes=0,i.pendingProps=u,8&t.mode&&(i.actualDuration=0,i.actualStartTime=-1,i.selfBaseDuration=c.selfBaseDuration,i.treeBaseDuration=c.treeBaseDuration);var d=i.lastEffect;null!==d?(t.firstEffect=i.firstEffect,t.lastEffect=d,d.nextEffect=null):t.firstEffect=t.lastEffect=null}else i=Hh(c,u);return null!==l?a=of(l,r):(a=lf(r,s,o,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,a}function Kh(e,t){e.lanes=Qr(e.lanes,t);var n=e.alternate;null!==n&&(n.lanes=Qr(n.lanes,t)),nl(e.return,t)}function Yh(e,t){var n=Array.isArray(e),r=!n&&"function"==typeof re(e);if(n||r){var o=n?"array":"iterable";return c("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",o,t,o),!1}return!0}function $h(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function Qh(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail,a=r.children;!function(e){if(void 0!==e&&"forwards"!==e&&"backwards"!==e&&"together"!==e&&!yh[e])if(yh[e]=!0,"string"==typeof e)switch(e.toLowerCase()){case"together":case"forwards":case"backwards":c('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break;case"forward":case"backward":c('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break;default:c('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}else c('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}(o),function(e,t){void 0===e||Eh[e]||("collapsed"!==e&&"hidden"!==e?(Eh[e]=!0,c('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):"forwards"!==t&&"backwards"!==t&&(Eh[e]=!0,c('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}(i,o),function(e,t){if(("forwards"===t||"backwards"===t)&&null!=e&&!1!==e)if(Array.isArray(e)){for(var n=0;n<e.length;n++)if(!Yh(e[n],n))return}else{var r=re(e);if("function"==typeof r){var o=r.call(e);if(o)for(var i=o.next(),a=0;!i.done;i=o.next()){if(!Yh(i.value,a))return;a++}}else c('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}(a,o),Ch(e,t,a,n);var s=hu.current;pu(s,2)?(s=gu(s,2),t.flags|=64):(null!==e&&0!=(64&e.flags)&&function(e,t,n){for(var r=t;null!==r;){if(13===r.tag)null!==r.memoizedState&&Kh(r,n);else if(19===r.tag)Kh(r,n);else if(null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)return;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}(t,t.child,n),s=mu(s));if(fu(t,s),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":var l,u=function(e){for(var t=e,n=null;null!==t;){var r=t.alternate;null!==r&&null===vu(r)&&(n=t),t=t.sibling}return n}(t.child);null===u?(l=t.child,t.child=null):(l=u.sibling,u.sibling=null),$h(t,!1,l,u,i,t.lastEffect);break;case"backwards":var d=null,h=t.child;for(t.child=null;null!==h;){var p=h.alternate;if(null!==p&&null===vu(p)){t.child=h;break}var m=h.sibling;h.sibling=d,d=h,h=m}$h(t,!0,d,null,i,t.lastEffect);break;case"together":$h(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}var Jh=!1;function Xh(e,t,n){var r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value;"value"in o||Jh||(Jh=!0,c("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var s=t.type.propTypes;if(s&&Rs(s,o,"prop","Context.Provider"),el(t,a),null!==i){var l=function(e,t,n){if(ki(n,t))return 0;var r="function"==typeof e._calculateChangedBits?e._calculateChangedBits(n,t):1073741823;return(1073741823&r)!==r&&c("calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",r),0|r}(r,a,i.value);if(0===l){if(i.children===o.children&&!zs())return op(e,t,n)}else!function(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){var i=void 0,a=o.dependencies;if(null!==a){i=o.child;for(var s=a.firstContext;null!==s;){if(s.context===t&&0!=(s.observedBits&n)){if(1===o.tag){var c=dl(-1,Wr(r));c.tag=sl,hl(o,c)}o.lanes=Qr(o.lanes,r);var l=o.alternate;null!==l&&(l.lanes=Qr(l.lanes,r)),nl(o.return,r),a.lanes=Qr(a.lanes,r);break}s=s.next}}else i=10===o.tag&&o.type===e.type?null:o.child;if(null!==i)i.return=o;else for(i=o;null!==i;){if(i===e){i=null;break}var u=i.sibling;if(null!==u){u.return=i.return,i=u;break}i=i.return}o=i}}(t,r,l,n)}return Ch(e,t,o.children,n),t.child}var Zh,ep,tp,np=!1;function rp(){wh=!0}function op(e,t,n){return null!==e&&(t.dependencies=e.dependencies),dh(),Qm(t.lanes),Yr(n,t.childLanes)?(function(e,t){if(null!==e&&t.child!==e.child)throw Error("Resuming work not yet implemented.");if(null!==t.child){var n=t.child,r=of(n,n.pendingProps);for(t.child=r,r.return=t;null!==n.sibling;)n=n.sibling,(r=r.sibling=of(n,n.pendingProps)).return=t;r.sibling=null}}(e,t),t.child):null}function ip(e,t,n){var r=t.lanes;if(t._debugNeedsRemount&&null!==e)return function(e,t,n){var r=t.return;if(null===r)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,t===r.child)r.child=n;else{var o=r.child;if(null===o)throw new Error("Expected parent to have a child.");for(;o.sibling!==t;)if(null===(o=o.sibling))throw new Error("Expected to find the previous sibling.");o.sibling=n}var i=r.lastEffect;return null!==i?(i.nextEffect=e,r.lastEffect=e):r.firstEffect=r.lastEffect=e,e.nextEffect=null,e.flags=8,n.flags|=2,n}(e,t,sf(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(null!==e)if(e.memoizedProps!==t.pendingProps||zs()||t.type!==e.type)wh=!0;else{if(!Yr(n,r)){switch(wh=!1,t.tag){case 3:Nh(t),Du();break;case 5:uu(t);break;case 1:Ws(t.type)&&Js(t);break;case 4:su(t,t.stateNode.containerInfo);break;case 10:el(t,t.memoizedProps.value);break;case 12:Yr(n,t.childLanes)&&(t.flags|=4);var o=t.stateNode;o.effectDuration=0,o.passiveEffectDuration=0;break;case 13:if(null!==t.memoizedState){if(Yr(n,t.child.childLanes))return Vh(e,t,n);fu(t,mu(hu.current));var i=op(e,t,n);return null!==i?i.sibling:null}fu(t,mu(hu.current));break;case 19:var a=0!=(64&e.flags),s=Yr(n,t.childLanes);if(a){if(s)return Qh(e,t,n);t.flags|=64}var l=t.memoizedState;if(null!==l&&(l.rendering=null,l.tail=null,l.lastEffect=null),fu(t,hu.current),s)break;return null;case 23:case 24:return t.lanes=0,Fh(e,t,n)}return op(e,t,n)}wh=0!=(16384&e.flags)}else wh=!1;switch(t.lanes=0,t.tag){case 2:return function(e,t,n,r){null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2);var o,i,a=t.pendingProps;if(o=Hs(t,Vs(0,n,!1)),rl(t,r),n.prototype&&"function"==typeof n.prototype.render){var s=xe(n)||"Unknown";mh[s]||(c("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",s,s),mh[s]=!0)}if(1&t.mode&&Ac.recordLegacyContextWarning(t,null),Ne(!0),Sh.current=t,i=nd(null,t,n,a,o,r),Ne(!1),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){var l=xe(n)||"Unknown";gh[l]||(c("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",l,l,l),gh[l]=!0)}if("object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){var u=xe(n)||"Unknown";gh[u]||(c("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",u,u,u),gh[u]=!0),t.tag=1,t.memoizedState=null,t.updateQueue=null;var d=!1;Ws(n)?(d=!0,Js(t)):d=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ll(t);var h=n.getDerivedStateFromProps;return"function"==typeof h&&Nl(t,n,h,a),Vl(t,i),zl(t,n,a,r),Ah(null,t,n,!0,d,r)}if(t.tag=0,1&t.mode){pe();try{i=nd(null,t,n,a,o,r)}finally{me()}}return Ch(null,t,i,r),Lh(t,n),t.child}(e,t,t.type,n);case 16:return Ph(e,t,t.elementType,r,n);case 0:var u=t.type,d=t.pendingProps;return Dh(e,t,u,t.elementType===u?d:Hc(u,d),n);case 1:var h=t.type,p=t.pendingProps;return Ih(e,t,h,t.elementType===h?p:Hc(h,p),n);case 3:return Mh(e,t,n);case 5:return function(e,t,n){uu(t),null===e&&xu(t);var r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,a=o.children;return $a(r,o)?a=null:null!==i&&$a(r,i)&&(t.flags|=16),Rh(e,t),Ch(e,t,a,n),t.child}(e,t,n);case 6:return function(e,t){return null===e&&xu(t),null}(e,t);case 13:return Vh(e,t,n);case 4:return function(e,t,n){su(t,t.stateNode.containerInfo);var r=t.pendingProps;return null===e?t.child=Xl(t,null,r,n):Ch(e,t,r,n),t.child}(e,t,n);case 11:var m=t.type,g=t.pendingProps;return Th(e,t,m,t.elementType===m?g:Hc(m,g),n);case 7:return function(e,t,n){return Ch(e,t,t.pendingProps,n),t.child}(e,t,n);case 8:return function(e,t,n){return Ch(e,t,t.pendingProps.children,n),t.child}(e,t,n);case 12:return function(e,t,n){t.flags|=4;var r=t.stateNode;return r.effectDuration=0,r.passiveEffectDuration=0,Ch(e,t,t.pendingProps.children,n),t.child}(e,t,n);case 10:return Xh(e,t,n);case 9:return function(e,t,n){var r=t.type;void 0===r._context?r!==r.Consumer&&(np||(np=!0,c("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):r=r._context;var o=t.pendingProps,i=o.children;"function"!=typeof i&&c("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),rl(t,n);var a,s=ol(r,o.unstable_observedBits);return Sh.current=t,Ne(!0),a=i(s),Ne(!1),t.flags|=1,Ch(e,t,a,n),t.child}(e,t,n);case 14:var f=t.type,_=Hc(f,t.pendingProps);if(t.type!==t.elementType){var b=f.propTypes;b&&Rs(b,_,"prop",xe(f))}return xh(e,t,f,_=Hc(f.type,_),r,n);case 15:return kh(e,t,t.type,t.pendingProps,r,n);case 17:var v=t.type,y=t.pendingProps;return function(e,t,n,r,o){var i;return null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ws(n)?(i=!0,Js(t)):i=!1,rl(t,o),ql(t,n,r),zl(t,n,r,o),Ah(null,t,n,!0,i,o)}(e,t,v,t.elementType===v?y:Hc(v,y),n);case 19:return Qh(e,t,n);case 20:case 21:case 22:break;case 23:return Fh(e,t,n);case 24:return Oh(e,t,n)}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function ap(e){e.flags|=4}function sp(e){e.flags|=128}function cp(e,t){if(!Iu())switch(e.tailMode){case"hidden":for(var n=e.tail,r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":for(var o=e.tail,i=null;null!==o;)null!==o.alternate&&(i=o),o=o.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function lp(e,t,n){var r,o,i,a=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ws(t.type)&&Ks(t),null;case 3:cu(t),Ys(t),Mu();var s=t.stateNode;if(s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),null===e||null===e.child)Ru(t)?ap(t):s.hydrate||(t.flags|=256);return null;case 5:du(t);var c=au(),l=t.type;if(null!==e&&null!=t.stateNode)ep(e,t,l,a),e.ref!==t.ref&&sp(t);else{if(!a){if(null===t.stateNode)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return null}var u=lu();if(Ru(t))o=u,i=ls((r=t).stateNode,r.type,r.memoizedProps,0,o,r),r.updateQueue=i,null!==i&&ap(t);else{var d=Ya(l,a,c,u,t);Zh(d,t),t.stateNode=d,function(e,t,n,r,o){return Fa(e,t,n),Wa(t,n)}(d,l,a)&&ap(t)}null!==t.ref&&sp(t)}return null;case 6:var h=a;if(e&&null!=t.stateNode){var p=e.memoizedProps;tp(0,t,p,h)}else{if("string"!=typeof h&&null===t.stateNode)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var m=au(),g=lu();Ru(t)?ku(t)&&ap(t):t.stateNode=Qa(h,m,g,t)}return null;case 13:_u(t);var f=t.memoizedState;if(0!=(64&t.flags))return t.lanes=n,0!=(8&t.mode)&&ph(t),t;var _=null!==f,b=!1;if(null===e)void 0!==t.memoizedProps.fallback&&Ru(t);else b=null!==e.memoizedState;if(_&&!b)if(0!=(2&t.mode))null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||pu(hu.current,1)?0===Xp&&(Xp=3):function(){0!==Xp&&3!==Xp||(Xp=4);null!==Kp&&(qr(tm)||qr(nm))&&Lm(Kp,$p)}();return(_||b)&&(t.flags|=4),null;case 4:return cu(t),null===e&&ta(t.stateNode.containerInfo),null;case 10:return tl(t),null;case 17:return Ws(t.type)&&Ks(t),null;case 19:_u(t);var v=t.memoizedState;if(null===v)return null;var y=0!=(64&t.flags),E=v.rendering;if(null===E)if(y)cp(v,!1);else{if(!(0===Xp&&(null===e||0==(64&e.flags))))for(var S=t.child;null!==S;){var w=vu(S);if(null!==w){y=!0,t.flags|=64,cp(v,!1);var C=w.updateQueue;return null!==C&&(t.updateQueue=C,t.flags|=4),null===v.lastEffect&&(t.firstEffect=null),t.lastEffect=v.lastEffect,eu(t,n),fu(t,gu(hu.current,2)),t.child}S=S.sibling}null!==v.tail&&Cc()>cm()&&(t.flags|=64,y=!0,cp(v,!1),t.lanes=33554432,Dg(33554432))}else{if(!y){var T=vu(E);if(null!==T){t.flags|=64,y=!0;var x=T.updateQueue;if(null!==x&&(t.updateQueue=x,t.flags|=4),cp(v,!0),null===v.tail&&"hidden"===v.tailMode&&!E.alternate&&!Iu()){var k=t.lastEffect=v.lastEffect;return null!==k&&(k.nextEffect=null),null}}else 2*Cc()-v.renderingStartTime>cm()&&1073741824!==n&&(t.flags|=64,y=!0,cp(v,!1),t.lanes=33554432,Dg(33554432))}if(v.isBackwards)E.sibling=t.child,t.child=E;else{var F=v.last;null!==F?F.sibling=E:t.child=E,v.last=E}}if(null!==v.tail){var O=v.tail;v.rendering=O,v.tail=O.sibling,v.lastEffect=t.lastEffect,v.renderingStartTime=Cc(),O.sibling=null;var R=hu.current;return fu(t,R=y?gu(R,2):mu(R)),O}return null;case 20:case 21:case 22:break;case 23:case 24:if(qm(t),null!==e){var D=t.memoizedState;null!==e.memoizedState!==(null!==D)&&"unstable-defer-without-hiding"!==a.mode&&(t.flags|=4)}return null}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function up(e,t){switch(e.tag){case 1:Ws(e.type)&&Ks(e);var n=e.flags;return 4096&n?(e.flags=-4097&n|64,0!=(8&e.mode)&&ph(e),e):null;case 3:cu(e),Ys(e),Mu();var r=e.flags;if(0!=(64&r))throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return e.flags=-4097&r|64,e;case 5:return du(e),null;case 13:_u(e);var o=e.flags;return 4096&o?(e.flags=-4097&o|64,0!=(8&e.mode)&&ph(e),e):null;case 19:return _u(e),null;case 4:return cu(e),null;case 10:return tl(e),null;case 23:case 24:return qm(e),null;default:return null}}function dp(e){switch(e.tag){case 1:var t=e.type.childContextTypes;null!=t&&Ks(e);break;case 3:cu(e),Ys(e),Mu();break;case 5:du(e);break;case 4:cu(e);break;case 13:case 19:_u(e);break;case 10:tl(e);break;case 23:case 24:qm(e)}}function hp(e,t){return{value:e,source:t,stack:Ce(t)}}function pp(e,t){try{0;var n=t.value,r=t.source,o=t.stack,i=null!==o?o:"";if(null!=n&&n._suppressLogging){if(1===e.tag)return;console.error(n)}var a=r?xe(r.type):null,s=a?"The above error occurred in the <"+a+"> component:":"The above error occurred in one of your React components:",c=xe(e.type),l=s+"\n"+i+"\n\n"+(c?"React will try to recreate this component tree from scratch using the error boundary you provided, "+c+".":"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://reactjs.org/link/error-boundaries to learn more about error boundaries.");console.error(l)}catch(e){setTimeout((function(){throw e}))}}Zh=function(e,t,n,r){for(var o,i,a=t.child;null!==a;){if(5===a.tag||6===a.tag)o=e,i=a.stateNode,o.appendChild(i);else if(4===a.tag);else if(null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)return;for(;null===a.sibling;){if(null===a.return||a.return===t)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},ep=function(e,t,n,r,o){var i=e.memoizedProps;if(i!==r){var a=function(e,t,n,r,o,i){var a=i;if(typeof r.children!=typeof n.children&&("string"==typeof r.children||"number"==typeof r.children)){var s=""+r.children,c=La(a.ancestorInfo,t);Pa(null,s,c)}return Oa(e,t,n,r)}(t.stateNode,n,i,r,0,lu());t.updateQueue=a,a&&ap(t)}},tp=function(e,t,n,r){n!==r&&ap(t)};var mp="function"==typeof WeakMap?WeakMap:Map;function gp(e,t,n){var r=dl(-1,n);r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){mg(o),pp(e,t)},r}function fp(e,t,n){var r=dl(-1,n);r.tag=3;var o=e.type.getDerivedStateFromError;if("function"==typeof o){var i=t.value;r.payload=function(){return pp(e,t),o(i)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch?r.callback=function(){var n;Wg(e),"function"!=typeof o&&(n=this,null===hm?hm=new Set([n]):hm.add(n),pp(e,t));var r=t.value,i=t.stack;this.componentDidCatch(r,{componentStack:null!==i?i:""}),"function"!=typeof o&&(Yr(e.lanes,1)||c("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",xe(e.type)||"Unknown"))}:r.callback=function(){Wg(e)},r}function _p(e,t,n){var r,o=e.pingCache;if(null===o?(o=e.pingCache=new mp,r=new Set,o.set(t,r)):void 0===(r=o.get(t))&&(r=new Set,o.set(t,r)),!r.has(n)){r.add(n);var i=_g.bind(null,e,t,n);t.then(i,i)}}function bp(e,t,n,r,o){if(n.flags|=2048,n.firstEffect=n.lastEffect=null,null!==r&&"object"==typeof r&&"function"==typeof r.then){var i=r;if(0==(2&n.mode)){var a=n.alternate;a?(n.updateQueue=a.updateQueue,n.memoizedState=a.memoizedState,n.lanes=a.lanes):(n.updateQueue=null,n.memoizedState=null)}var s=pu(hu.current,1),c=t;do{if(13===c.tag&&bu(c,s)){var l=c.updateQueue;if(null===l){var u=new Set;u.add(i),c.updateQueue=u}else l.add(i);if(0==(2&c.mode)){if(c.flags|=64,n.flags|=16384,n.flags&=-2981,1===n.tag)if(null===n.alternate)n.tag=17;else{var d=dl(-1,1);d.tag=sl,hl(n,d)}return void(n.lanes=Qr(n.lanes,1))}return _p(e,i,o),c.flags|=4096,void(c.lanes=o)}c=c.return}while(null!==c);r=new Error((xe(n.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Xp&&(Xp=2),r=hp(r,n);var h=t;do{switch(h.tag){case 3:var p=r;h.flags|=4096;var m=Wr(o);return h.lanes=Qr(h.lanes,m),void pl(h,gp(h,p,m));case 1:var g=r,f=h.type,_=h.stateNode;if(0==(64&h.flags)&&("function"==typeof f.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&!pg(_))){h.flags|=4096;var b=Wr(o);return h.lanes=Qr(h.lanes,b),void pl(h,fp(h,g,b))}}h=h.return}while(null!==h)}var vp;vp=new Set;var yp="function"==typeof WeakSet?WeakSet:Set,Ep=function(e,t){t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()};function Sp(e){var t=e.ref;null!==t&&("function"==typeof t?(Un(null,t,null,null),Bn()&&fg(e,Gn())):t.current=null)}function wp(e,t){(Un(null,t,null),Bn())&&fg(e,Gn())}function Cp(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState,o=t.stateNode;t.type!==t.elementType||vh||(o.props!==t.memoizedProps&&c("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",xe(t.type)||"instance"),o.state!==t.memoizedState&&c("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",xe(t.type)||"instance"));var i=o.getSnapshotBeforeUpdate(t.elementType===t.type?n:Hc(t.type,n),r),a=vp;void 0!==i||a.has(t.type)||(a.add(t.type),c("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",xe(t.type))),o.__reactInternalSnapshotBeforeUpdate=i}return;case 3:if(256&t.flags)os(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function Tp(e,t,n,r){switch(n.tag){case 0:case 11:case 15:case 22:return function(e,t){var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next,i=o;do{if((i.tag&e)===e){var a=i.create;i.destroy=a();var s=i.destroy;if(void 0!==s&&"function"!=typeof s){c("An effect function must not return anything besides a function, which is used for clean-up.%s",null===s?" You returned null. If your effect does not require clean up, return undefined (or nothing).":"function"==typeof s.then?"\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\nuseEffect(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching":" You returned: "+s)}}i=i.next}while(i!==o)}}(3,n),void function(e){var t=e.updateQueue,n=null!==t?t.lastEffect:null;if(null!==n){var r=n.next,o=r;do{var i=o,a=i.next,s=i.tag;0!=(4&s)&&0!=(1&s)&&(ug(e,o),lg(e,o)),o=a}while(o!==r)}}(n);case 1:var o=n.stateNode;if(4&n.flags)if(null===t)n.type!==n.elementType||vh||(o.props!==n.memoizedProps&&c("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",xe(n.type)||"instance"),o.state!==n.memoizedState&&c("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",xe(n.type)||"instance")),o.componentDidMount();else{var i=n.elementType===n.type?t.memoizedProps:Hc(n.type,t.memoizedProps),a=t.memoizedState;n.type!==n.elementType||vh||(o.props!==n.memoizedProps&&c("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",xe(n.type)||"instance"),o.state!==n.memoizedState&&c("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",xe(n.type)||"instance")),o.componentDidUpdate(i,a,o.__reactInternalSnapshotBeforeUpdate)}var s=n.updateQueue;return void(null!==s&&(n.type!==n.elementType||vh||(o.props!==n.memoizedProps&&c("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",xe(n.type)||"instance"),o.state!==n.memoizedState&&c("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",xe(n.type)||"instance")),vl(0,s,o)));case 3:var l=n.updateQueue;if(null!==l){var u=null;if(null!==n.child)switch(n.child.tag){case 5:case 1:u=n.child.stateNode}vl(0,l,u)}return;case 5:var d=n.stateNode;if(null===t&&4&n.flags)!function(e,t,n,r){Wa(t,n)&&e.focus()}(d,n.type,n.memoizedProps);return;case 6:case 4:return;case 12:var h=n.memoizedProps,p=(h.onCommit,h.onRender),m=(n.stateNode.effectDuration,ch());return void("function"==typeof p&&p(n.memoizedProps.id,null===t?"mount":"update",n.actualDuration,n.treeBaseDuration,n.actualStartTime,m,e.memoizedInteractions));case 13:return void function(e,t){if(null===t.memoizedState){var n=t.alternate;if(null!==n){var r=n.memoizedState;if(null!==r){var o=r.dehydrated;null!==o&&function(e){yr(e)}(o)}}}}(0,n);case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function xp(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;t?ts(r):ns(n.stateNode,n.memoizedProps)}else if(6===n.tag){var o=n.stateNode;t?o.nodeValue="":rs(o,n.memoizedProps)}else if(23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e){if(null!==n.child){n.child.return=n,n=n.child;continue}}else;if(n===e)return;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function kp(e){var t=e.ref;if(null!==t){var n,r=e.stateNode;switch(e.tag){case 5:n=r;break;default:n=r}"function"==typeof t?t(n):(t.hasOwnProperty("current")||c("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",xe(e.type)),t.current=n)}}function Fp(e){var t=e.ref;null!==t&&("function"==typeof t?t(null):t.current=null)}function Op(e,t,n){switch(function(e){if(tc&&"function"==typeof tc.onCommitFiberUnmount)try{tc.onCommitFiberUnmount(ec,e)}catch(e){nc||(nc=!0,c("React instrumentation encountered an error: %s",e))}}(t),t.tag){case 0:case 11:case 14:case 15:case 22:var r=t.updateQueue;if(null!==r){var o=r.lastEffect;if(null!==o){var i=o.next,a=i;do{var s=a,l=s.destroy,u=s.tag;void 0!==l&&(0!=(4&u)?ug(t,a):wp(t,l)),a=a.next}while(a!==i)}}return;case 1:Sp(t);var d=t.stateNode;return void("function"==typeof d.componentWillUnmount&&function(e,t){Un(null,Ep,null,e,t),Bn()&&fg(e,Gn())}(t,d));case 5:return void Sp(t);case 4:return void Np(e,t);case 20:case 18:case 21:return}}function Rp(e,t,n){for(var r=t;;)if(Op(e,r),null===r.child||4===r.tag){if(r===t)return;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}else r.child.return=r,r=r.child}function Dp(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null,e._debugOwner=null}function Ip(e){return 5===e.tag||3===e.tag||4===e.tag}function Ap(e){var t,n,r=function(e){for(var t=e.return;null!==t;){if(Ip(t))return t;t=t.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}(e),o=r.stateNode;switch(r.tag){case 5:t=o,n=!1;break;case 3:case 4:t=o.containerInfo,n=!0;break;case 20:default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}16&r.flags&&(Za(t),r.flags&=-17);var i=function(e){var t=e;e:for(;;){for(;null===t.sibling;){if(null===t.return||Ip(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue e;if(null===t.child||4===t.tag)continue e;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}(e);n?function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i){var a=i?t.stateNode:t.stateNode.instance;n?function(e,t,n){8===e.nodeType?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)}(r,a,n):function(e,t){var n;8===e.nodeType?(n=e.parentNode).insertBefore(t,e):(n=e).appendChild(t);var r=e._reactRootContainer;null==r&&null===n.onclick&&ka(n)}(r,a)}else if(4===o);else{var s=t.child;if(null!==s){e(s,n,r);for(var c=s.sibling;null!==c;)e(c,n,r),c=c.sibling}}}(e,i,t):function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i){var a=i?t.stateNode:t.stateNode.instance;n?function(e,t,n){e.insertBefore(t,n)}(r,a,n):function(e,t){e.appendChild(t)}(r,a)}else if(4===o);else{var s=t.child;if(null!==s){e(s,n,r);for(var c=s.sibling;null!==c;)e(c,n,r),c=c.sibling}}}(e,i,t)}function Np(e,t,n){for(var r,o,i,a,s=t,c=!1;;){if(!c){var l=s.return;e:for(;;){if(null===l)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");var u=l.stateNode;switch(l.tag){case 5:r=u,o=!1;break e;case 3:case 4:r=u.containerInfo,o=!0;break e}l=l.return}c=!0}if(5===s.tag||6===s.tag)Rp(e,s),o?(i=r,a=s.stateNode,8===i.nodeType?i.parentNode.removeChild(a):i.removeChild(a)):es(r,s.stateNode);else if(4===s.tag){if(null!==s.child){r=s.stateNode.containerInfo,o=!0,s.child.return=s,s=s.child;continue}}else if(Op(e,s),null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)return;for(;null===s.sibling;){if(null===s.return||s.return===t)return;4===(s=s.return).tag&&(c=!1)}s.sibling.return=s.return,s=s.sibling}}function Mp(e,t,n){Np(e,t);var r=t.alternate;Dp(t),null!==r&&Dp(r)}function Pp(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void function(e,t){var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next,i=o;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&a()}i=i.next}while(i!==o)}}(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r,i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&function(e,t,n,r,o,i){Ts(e,o),Ra(e,t,n,r,o)}(n,a,i,o,r)}return;case 6:if(null===t.stateNode)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var s=t.stateNode,c=t.memoizedProps;null!==e&&e.memoizedProps;return void function(e,t,n){e.nodeValue=n}(s,0,c);case 3:var l=t.stateNode;return void(l.hydrate&&(l.hydrate=!1,yr(l.containerInfo)));case 12:return;case 13:return function(e){if(null!==e.memoizedState){im=Cc(),xp(e.child,!0)}}(t),void Lp(t);case 19:return void Lp(t);case 17:return;case 20:case 21:break;case 23:case 24:return void xp(t,null!==t.memoizedState)}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function Lp(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new yp),t.forEach((function(t){var r=bg.bind(null,e,t);n.has(t)||(!0!==t.__reactDoNotTraceInteractions&&(r=i.unstable_wrap(r)),n.add(t),t.then(r,r))}))}}function jp(e,t){if(null!==e){var n=e.memoizedState;if(null===n||null!==n.dehydrated){var r=t.memoizedState;return null!==r&&null===r.dehydrated}}return!1}function Up(e){Za(e.stateNode)}if("function"==typeof Symbol&&Symbol.for){var Bp=Symbol.for;Bp("selector.component"),Bp("selector.has_pseudo_class"),Bp("selector.role"),Bp("selector.test_id"),Bp("selector.text")}var Gp=[];var Vp=Math.ceil,qp=a.ReactCurrentDispatcher,Hp=a.ReactCurrentOwner,zp=a.IsSomeRendererActing,Wp=0,Kp=null,Yp=null,$p=0,Qp=0,Jp=Ms(0),Xp=0,Zp=null,em=0,tm=0,nm=0,rm=0,om=null,im=0,am=1/0;function sm(){am=Cc()+500}function cm(){return am}var lm=null,um=!1,dm=null,hm=null,pm=!1,mm=null,gm=90,fm=0,_m=[],bm=[],vm=null,ym=0,Em=null,Sm=0,wm=null,Cm=-1,Tm=0,xm=0,km=!1,Fm=null,Om=!1;function Rm(){return 0!=(48&Wp)?Cc():-1!==Cm?Cm:Cm=Cc()}function Dm(e){var t=e.mode;if(0==(2&t))return 1;if(0==(4&t))return 99===Tc()?1:2;if(0===Tm&&(Tm=em),0!==Ic.transition)return 0!==xm&&(xm=null!==om?om.pendingLanes:0),function(e,t){var n=Wr(4186112&~t);return 0===n&&0===(n=Wr(4186112&~e))&&(n=Wr(4186112)),n}(Tm,xm);var n,r=Tc();0!=(4&Wp)&&98===r?n=zr(12,Tm):n=zr(function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(r),Tm);return n}function Im(e){var t,n=e.mode;return 0==(2&n)?1:0==(4&n)?99===Tc()?1:2:(0===Tm&&(Tm=em),0===(t=Wr(62914560&~Tm))&&(t=Wr(62914560)),t)}function Am(e,t,n){!function(){if(ym>50)throw ym=0,Em=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Sm>50&&(Sm=0,c("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}(),function(e){if(Oe&&0!=(16&Wp)&&!qd)switch(e.tag){case 0:case 11:case 15:var t=Yp&&xe(Yp.type)||"Unknown",n=t;if(!wg.has(n))wg.add(n),c("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",xe(e.type)||"Unknown",t,t);break;case 1:Cg||(c("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Cg=!0)}}(e);var r=Nm(e,t);if(null===r)return function(e){var t=e.tag;if(3!==t&&1!==t&&0!==t&&11!==t&&14!==t&&15!==t&&22!==t)return;if(0!=(8192&e.flags))return;var n=xe(e.type)||"ReactComponent";if(null!==Sg){if(Sg.has(n))return;Sg.add(n)}else Sg=new Set([n]);if(km);else{var r=Fe;try{Ae(e),c("Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.",1===t?"the componentWillUnmount method":"a useEffect cleanup function")}finally{r?Ae(e):Ie()}}}(e),null;Zr(r,t,n),r===Kp&&(nm=Qr(nm,t),4===Xp&&Lm(r,$p));var o=Tc();1===t?0!=(8&Wp)&&0==(48&Wp)?(Ag(r,t),jm(r)):(Mm(r,n),Ag(r,t),0===Wp&&(sm(),Rc())):(0==(4&Wp)||98!==o&&99!==o||(null===vm?vm=new Set([r]):vm.add(r)),Mm(r,n),Ag(r,t)),om=r}function Nm(e,t){e.lanes=Qr(e.lanes,t);var n=e.alternate;null!==n&&(n.lanes=Qr(n.lanes,t)),null===n&&0!=(1026&e.flags)&&yg(e);for(var r=e,o=e.return;null!==o;)o.childLanes=Qr(o.childLanes,t),null!==(n=o.alternate)?n.childLanes=Qr(n.childLanes,t):0!=(1026&o.flags)&&yg(e),r=o,o=o.return;return 3===r.tag?r.stateNode:null}function Mm(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.pendingLanes,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=n;a>0;){var s=Kr(a),c=1<<s,l=i[s];-1===l?0!=(c&r)&&0==(c&o)||(i[s]=Gr(c,t)):l<=t&&(e.expiredLanes|=c),a&=~c}}(e,t);var r=Br(e,e===Kp?$p:0),o=jr;if(0!==r){if(null!==n){if(e.callbackPriority===o)return;Oc(n)}var i,a;if(15===o)a=jm.bind(null,e),null===yc?(yc=[a],Ec=ac(hc,Dc)):yc.push(a),i=_c;else if(14===o)i=Fc(99,jm.bind(null,e));else{i=Fc(function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error("Invalid update priority: "+e+". This is a bug in React.")}}(o),Pm.bind(null,e))}e.callbackPriority=o,e.callbackNode=i}else null!==n&&(Oc(n),e.callbackNode=null,e.callbackPriority=0)}function Pm(e){if(Cm=-1,Tm=0,xm=0,0!=(48&Wp))throw Error("Should not already be working.");var t=e.callbackNode;if(cg()&&e.callbackNode!==t)return null;var n=Br(e,e===Kp?$p:0);if(0===n)return null;var r=function(e,t){var n=Wp;Wp|=16;var r=Wm();Kp===e&&$p===t||(sm(),Hm(e,t),Ng(e,t));var o=Ym(e);for(;;)try{Zm();break}catch(t){zm(e,t)}return Jc(),$m(o),Km(r),Wp=n,null!==Yp?0:(Kp=null,$p=0,Xp)}(e,n);if(Yr(em,nm))Hm(e,0);else if(0!==r){if(2===r&&(Wp|=64,e.hydrate&&(e.hydrate=!1,os(e.containerInfo)),0!==(n=Vr(e))&&(r=Jm(e,n))),1===r){var o=Zp;throw Hm(e,0),Lm(e,n),Mm(e,Cc()),o}var i=e.current.alternate;e.finishedWork=i,e.finishedLanes=n,function(e,t,n){switch(t){case 0:case 1:throw Error("Root did not complete. This is a bug in React.");case 2:rg(e);break;case 3:if(Lm(e,n),Hr(n)&&!Pg()){var r=im+500-Cc();if(r>10){if(0!==Br(e,0))break;var o=e.suspendedLanes;if(!$r(o,n)){Rm();eo(e,o);break}e.timeoutHandle=Ja(rg.bind(null,e),r);break}}rg(e);break;case 4:if(Lm(e,n),function(e){return(4186112&e)===e}(n))break;if(!Pg()){var i=function(e,t){for(var n=e.eventTimes,r=-1;t>0;){var o=Kr(t),i=1<<o,a=n[o];a>r&&(r=a),t&=~i}return r}(e,n),a=Cc()-i,s=((c=a)<120?120:c<480?480:c<1080?1080:c<1920?1920:c<3e3?3e3:c<4320?4320:1960*Vp(c/1960))-a;if(s>10){e.timeoutHandle=Ja(rg.bind(null,e),s);break}}rg(e);break;case 5:rg(e);break;default:throw Error("Unknown root exit status.")}var c}(e,r,n)}return Mm(e,Cc()),e.callbackNode===t?Pm.bind(null,e):null}function Lm(e,t){t=Jr(t,rm),function(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,r=t;r>0;){var o=Kr(r),i=1<<o;n[o]=-1,r&=~i}}(e,t=Jr(t,nm))}function jm(e){if(0!=(48&Wp))throw Error("Should not already be working.");var t,n;if(cg(),e===Kp&&Yr(e.expiredLanes,$p)?(n=Jm(e,t=$p),Yr(em,nm)&&(n=Jm(e,t=Br(e,t)))):n=Jm(e,t=Br(e,0)),0!==e.tag&&2===n&&(Wp|=64,e.hydrate&&(e.hydrate=!1,os(e.containerInfo)),0!==(t=Vr(e))&&(n=Jm(e,t))),1===n){var r=Zp;throw Hm(e,0),Lm(e,t),Mm(e,Cc()),r}var o=e.current.alternate;return e.finishedWork=o,e.finishedLanes=t,rg(e),Mm(e,Cc()),null}function Um(e,t){var n=Wp;Wp|=1;try{return e(t)}finally{0===(Wp=n)&&(sm(),Rc())}}function Bm(e,t){var n=Wp;Wp&=-2,Wp|=8;try{return e(t)}finally{0===(Wp=n)&&(sm(),Rc())}}function Gm(e,t){var n=Wp;if(0!=(48&n))return c("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),e(t);Wp|=1;try{return e?kc(99,e.bind(null,t)):void 0}finally{Wp=n,Rc()}}function Vm(e,t){Ls(Jp,Qp,e),Qp=Qr(Qp,t),em=Qr(em,t)}function qm(e){Qp=Jp.current,Ps(Jp,e)}function Hm(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Xa(n)),null!==Yp)for(var r=Yp.return;null!==r;)dp(r),r=r.return;Kp=e,Yp=of(e.current,null),$p=Qp=em=t,Xp=0,Zp=null,tm=0,nm=0,rm=0,wm=null,Ac.discardPendingWarnings()}function zm(e,t){for(;;){var n=Yp;try{if(Jc(),od(),Ie(),Hp.current=null,null===n||null===n.return)return Xp=1,Zp=t,void(Yp=null);8&n.mode&&hh(n,!0),bp(e,n.return,n,t,$p),tg(n)}catch(e){t=e,Yp===n&&null!==n?(n=n.return,Yp=n):n=Yp;continue}return}}function Wm(){var e=qp.current;return qp.current=$d,null===e?$d:e}function Km(e){qp.current=e}function Ym(e){var t=i.__interactionsRef.current;return i.__interactionsRef.current=e.memoizedInteractions,t}function $m(e){i.__interactionsRef.current=e}function Qm(e){tm=Qr(e,tm)}function Jm(e,t){var n=Wp;Wp|=16;var r=Wm();Kp===e&&$p===t||(Hm(e,t),Ng(e,t));for(var o=Ym(e);;)try{Xm();break}catch(t){zm(e,t)}if(Jc(),$m(o),Wp=n,Km(r),null!==Yp)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Kp=null,$p=0,Xp}function Xm(){for(;null!==Yp;)eg(Yp)}function Zm(){for(;null!==Yp&&!bc();)eg(Yp)}function eg(e){var t,n=e.alternate;Ae(e),0!=(8&e.mode)?(uh(e),t=Eg(n,e,Qp),hh(e,!0)):t=Eg(n,e,Qp),Ie(),e.memoizedProps=e.pendingProps,null===t?tg(e):Yp=t,Hp.current=null}function tg(e){var t=e;do{var n=t.alternate,r=t.return;if(0==(2048&t.flags)){Ae(t);var o=void 0;if(0==(8&t.mode)?o=lp(n,t,Qp):(uh(t),o=lp(n,t,Qp),hh(t,!1)),Ie(),null!==o)return void(Yp=o);if(ng(t),null!==r&&0==(2048&r.flags))null===r.firstEffect&&(r.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==r.lastEffect&&(r.lastEffect.nextEffect=t.firstEffect),r.lastEffect=t.lastEffect),t.flags>1&&(null!==r.lastEffect?r.lastEffect.nextEffect=t:r.firstEffect=t,r.lastEffect=t)}else{var i=up(t);if(null!==i)return i.flags&=2047,void(Yp=i);if(0!=(8&t.mode)){hh(t,!1);for(var a=t.actualDuration,s=t.child;null!==s;)a+=s.actualDuration,s=s.sibling;t.actualDuration=a}null!==r&&(r.firstEffect=r.lastEffect=null,r.flags|=2048)}var c=t.sibling;if(null!==c)return void(Yp=c);Yp=t=r}while(null!==t);0===Xp&&(Xp=5)}function ng(e){if(24!==e.tag&&23!==e.tag||null===e.memoizedState||Yr(Qp,1073741824)||0==(4&e.mode)){var t=0;if(0!=(8&e.mode)){for(var n=e.actualDuration,r=e.selfBaseDuration,o=null===e.alternate||e.child!==e.alternate.child,i=e.child;null!==i;)t=Qr(t,Qr(i.lanes,i.childLanes)),o&&(n+=i.actualDuration),r+=i.treeBaseDuration,i=i.sibling;if(13===e.tag&&null!==e.memoizedState){var a=e.child;null!==a&&(r-=a.treeBaseDuration)}e.actualDuration=n,e.treeBaseDuration=r}else for(var s=e.child;null!==s;)t=Qr(t,Qr(s.lanes,s.childLanes)),s=s.sibling;e.childLanes=t}}function rg(e){var t=Tc();return kc(99,og.bind(null,e,t)),null}function og(e,t){do{cg()}while(null!==mm);if(Ac.flushLegacyContextWarning(),Ac.flushPendingUnsafeLifecycleWarnings(),0!=(48&Wp))throw Error("Should not already be working.");var n=e.finishedWork,r=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null;var o,i=Qr(n.lanes,n.childLanes);if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var r=e.entanglements,o=e.eventTimes,i=e.expirationTimes,a=n;a>0;){var s=Kr(a),c=1<<s;r[s]=0,o[s]=-1,i[s]=-1,a&=~c}}(e,i),null!==vm&&!function(e){return 0!=(24&e)}(i)&&vm.has(e)&&vm.delete(e),e===Kp&&(Kp=null,Yp=null,$p=0),n.flags>1?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var a=Wp;Wp|=32;var s=Ym(e);Hp.current=null,Fm=Ka(e.containerInfo),Om=!1,lm=o;do{if(Un(null,ig,null),Bn()){if(null===lm)throw Error("Should be working on an effect.");var c=Gn();fg(lm,c),lm=lm.nextEffect}}while(null!==lm);Fm=null,lh(),lm=o;do{if(Un(null,ag,null,e,t),Bn()){if(null===lm)throw Error("Should be working on an effect.");var l=Gn();fg(lm,l),lm=lm.nextEffect}}while(null!==lm);e.containerInfo,Ui(za),co(Ha),Ha=null,za=null,e.current=n,lm=o;do{if(Un(null,sg,null,e,r),Bn()){if(null===lm)throw Error("Should be working on an effect.");var u=Gn();fg(lm,u),lm=lm.nextEffect}}while(null!==lm);lm=null,vc(),$m(s),Wp=a}else e.current=n,lh();var d=pm;if(pm)pm=!1,mm=e,fm=r,gm=t;else for(lm=o;null!==lm;){var h=lm.nextEffect;lm.nextEffect=null,8&lm.flags&&jg(lm),lm=h}if(0!==(i=e.pendingLanes)){if(null!==wm){var p=wm;wm=null;for(var m=0;m<p.length;m++)Ig(e,p[m],e.memoizedInteractions)}Ag(e,i)}else hm=null;if(d||Mg(e,r),1===i?e===Em?ym++:(ym=0,Em=e):ym=0,oc(n.stateNode,t),Gp.forEach((function(e){return e()})),Mm(e,Cc()),um){um=!1;var g=dm;throw dm=null,g}return 0!=(8&Wp)||Rc(),null}function ig(){for(;null!==lm;){var e=lm.alternate;Om||null===Fm||(0!=(8&lm.flags)?er(lm,Fm)&&(Om=!0):13===lm.tag&&jp(e,lm)&&er(lm,Fm)&&(Om=!0));var t=lm.flags;0!=(256&t)&&(Ae(lm),Cp(e,lm),Ie()),0!=(512&t)&&(pm||(pm=!0,Fc(97,(function(){return cg(),null})))),lm=lm.nextEffect}}function ag(e,t){for(;null!==lm;){Ae(lm);var n=lm.flags;if(16&n&&Up(lm),128&n){var r=lm.alternate;null!==r&&Fp(r)}switch(1038&n){case 2:Ap(lm),lm.flags&=-3;break;case 6:Ap(lm),lm.flags&=-3,Pp(lm.alternate,lm);break;case 1024:lm.flags&=-1025;break;case 1028:lm.flags&=-1025,Pp(lm.alternate,lm);break;case 4:Pp(lm.alternate,lm);break;case 8:Mp(e,lm)}Ie(),lm=lm.nextEffect}}function sg(e,t){for(;null!==lm;){Ae(lm);var n=lm.flags;if(36&n)Tp(e,lm.alternate,lm);128&n&&kp(lm),Ie(),lm=lm.nextEffect}}function cg(){if(90!==gm){var e=gm>97?97:gm;return gm=90,kc(e,hg)}return!1}function lg(e,t){_m.push(t,e),pm||(pm=!0,Fc(97,(function(){return cg(),null})))}function ug(e,t){bm.push(t,e),e.flags|=8192;var n=e.alternate;null!==n&&(n.flags|=8192),pm||(pm=!0,Fc(97,(function(){return cg(),null})))}function dg(e){var t=e.create;e.destroy=t()}function hg(){if(null===mm)return!1;var e=mm,t=fm;if(mm=null,fm=0,0!=(48&Wp))throw Error("Cannot flush passive effects while already rendering.");km=!0;var n=Wp;Wp|=32;var r=Ym(e),o=bm;bm=[];for(var i=0;i<o.length;i+=2){var a=o[i],s=o[i+1],c=a.destroy;a.destroy=void 0,s.flags&=-8193;var l=s.alternate;if(null!==l&&(l.flags&=-8193),"function"==typeof c){if(Ae(s),Un(null,c,null),Bn()){if(null===s)throw Error("Should be working on an effect.");fg(s,Gn())}Ie()}}var u=_m;_m=[];for(var d=0;d<u.length;d+=2){var h=u[d],p=u[d+1];if(Ae(p),Un(null,dg,null,h),Bn()){if(null===p)throw Error("Should be working on an effect.");fg(p,Gn())}Ie()}for(var m=e.current.firstEffect;null!==m;){var g=m.nextEffect;m.nextEffect=null,8&m.flags&&jg(m),m=g}return $m(r),Mg(e,t),km=!1,Wp=n,Rc(),Sm=null===mm?0:Sm+1,!0}function pg(e){return null!==hm&&hm.has(e)}var mg=function(e){um||(um=!0,dm=e)};function gg(e,t,n){hl(e,gp(e,hp(n,t),1));var r=Rm(),o=Nm(e,1);null!==o&&(Zr(o,1,r),Mm(o,r),Ag(o,1))}function fg(e,t){if(3!==e.tag)for(var n=e.return;null!==n;){if(3===n.tag)return void gg(n,e,t);if(1===n.tag){var r=n.type,o=n.stateNode;if("function"==typeof r.getDerivedStateFromError||"function"==typeof o.componentDidCatch&&!pg(o)){var i=hp(t,e);hl(n,fp(n,i,1));var a=Rm(),s=Nm(n,1);if(null!==s)Zr(s,1,a),Mm(s,a),Ag(s,1);else if("function"==typeof o.componentDidCatch&&!pg(o))try{o.componentDidCatch(t,i)}catch(e){}return}}n=n.return}else gg(e,e,t)}function _g(e,t,n){var r=e.pingCache;null!==r&&r.delete(t);var o=Rm();eo(e,n),Kp===e&&$r($p,n)&&(4===Xp||3===Xp&&Hr($p)&&Cc()-im<500?Hm(e,0):rm=Qr(rm,n)),Mm(e,o),Ag(e,n)}function bg(e,t){var n;null!==(n=e.stateNode)&&n.delete(t),function(e,t){0===t&&(t=Im(e));var n=Rm(),r=Nm(e,t);null!==r&&(Zr(r,t,n),Mm(r,n),Ag(r,t))}(e,0)}var vg=null;function yg(e){if(0==(16&Wp)&&6&e.mode){var t=e.tag;if(2===t||3===t||1===t||0===t||11===t||14===t||15===t||22===t){var n=xe(e.type)||"ReactComponent";if(null!==vg){if(vg.has(n))return;vg.add(n)}else vg=new Set([n]);var r=Fe;try{Ae(e),c("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{r?Ae(e):Ie()}}}}var Eg,Sg=null;Eg=function(e,t,n){var r=pf(null,t);try{return ip(e,t,n)}catch(o){if(null!==o&&"object"==typeof o&&"function"==typeof o.then)throw o;if(Jc(),od(),dp(t),pf(t,r),8&t.mode&&uh(t),Un(null,ip,null,e,t,n),Bn())throw Gn();throw o}};var wg,Cg=!1;wg=new Set;var Tg={current:!1};function xg(e){if(!0===zp.current&&!0!==Tg.current){var t=Fe;try{Ae(e),c("It looks like you're using the wrong act() around your test interactions.\nBe sure to use the matching version of act() corresponding to your renderer:\n\n// for react-dom:\nimport {act} from 'react-dom/test-utils';\n// ...\nact(() => ...);\n\n// for react-test-renderer:\nimport TestRenderer from react-test-renderer';\nconst {act} = TestRenderer;\n// ...\nact(() => ...);")}finally{t?Ae(e):Ie()}}}function kg(e){0!=(1&e.mode)&&!1===zp.current&&!1===Tg.current&&c("An update to %s ran an effect, but was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",xe(e.type))}var Fg=function(e){if(0===Wp&&!1===zp.current&&!1===Tg.current){var t=Fe;try{Ae(e),c("An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",xe(e.type))}finally{t?Ae(e):Ie()}}},Og=!1;function Rg(e,t){return 1e3*t+e.interactionThreadID}function Dg(e){null===wm?wm=[e]:wm.push(e)}function Ig(e,t,n){if(n.size>0){var r=e.pendingInteractionMap,o=r.get(t);null!=o?n.forEach((function(e){o.has(e)||e.__count++,o.add(e)})):(r.set(t,new Set(n)),n.forEach((function(e){e.__count++})));var a=i.__subscriberRef.current;if(null!==a){var s=Rg(e,t);a.onWorkScheduled(n,s)}}}function Ag(e,t){Ig(e,t,i.__interactionsRef.current)}function Ng(e,t){var n=new Set;if(e.pendingInteractionMap.forEach((function(e,r){Yr(t,r)&&e.forEach((function(e){return n.add(e)}))})),e.memoizedInteractions=n,n.size>0){var r=i.__subscriberRef.current;if(null!==r){var o=Rg(e,t);try{r.onWorkStarted(n,o)}catch(e){Fc(99,(function(){throw e}))}}}}function Mg(e,t){var n,r=e.pendingLanes;try{if(null!==(n=i.__subscriberRef.current)&&e.memoizedInteractions.size>0){var o=Rg(e,t);n.onWorkStopped(e.memoizedInteractions,o)}}catch(e){Fc(99,(function(){throw e}))}finally{var a=e.pendingInteractionMap;a.forEach((function(e,t){Yr(r,t)||(a.delete(t),e.forEach((function(e){if(e.__count--,null!==n&&0===e.__count)try{n.onInteractionScheduledWorkCompleted(e)}catch(e){Fc(99,(function(){throw e}))}})))}))}}function Pg(){return Lg>0}var Lg=0;function jg(e){e.sibling=null,e.stateNode=null}var Ug=null,Bg=null,Gg=function(e){Ug=e};function Vg(e){if(null===Ug)return e;var t=Ug(e);return void 0===t?e:t.current}function qg(e){return Vg(e)}function Hg(e){if(null===Ug)return e;var t=Ug(e);if(void 0===t){if(null!=e&&"function"==typeof e.render){var n=Vg(e.render);if(e.render!==n){var r={$$typeof:H,render:n};return void 0!==e.displayName&&(r.displayName=e.displayName),r}}return e}return t.current}function zg(e,t){if(null===Ug)return!1;var n=e.elementType,r=t.type,o=!1,i="object"==typeof r&&null!==r?r.$$typeof:null;switch(e.tag){case 1:"function"==typeof r&&(o=!0);break;case 0:("function"==typeof r||i===Y)&&(o=!0);break;case 11:(i===H||i===Y)&&(o=!0);break;case 14:case 15:(i===K||i===Y)&&(o=!0);break;default:return!1}if(o){var a=Ug(n);if(void 0!==a&&a===Ug(r))return!0}return!1}function Wg(e){null!==Ug&&"function"==typeof WeakSet&&(null===Bg&&(Bg=new WeakSet),Bg.add(e))}var Kg=function(e,t){if(null!==Ug){var n=t.staleFamilies,r=t.updatedFamilies;cg(),Gm((function(){!function e(t,n,r){var o=t.alternate,i=t.child,a=t.sibling,s=t.tag,c=t.type,l=null;switch(s){case 0:case 15:case 1:l=c;break;case 11:l=c.render}if(null===Ug)throw new Error("Expected resolveFamily to be set during hot reload.");var u=!1,d=!1;if(null!==l){var h=Ug(l);void 0!==h&&(r.has(h)?d=!0:n.has(h)&&(1===s?d=!0:u=!0))}null!==Bg&&(Bg.has(t)||null!==o&&Bg.has(o))&&(d=!0);d&&(t._debugNeedsRemount=!0);(d||u)&&Am(t,1,-1);null===i||d||e(i,n,r);null!==a&&e(a,n,r)}(e.current,r,n)}))}},Yg=function(e,t){e.context===js&&(cg(),Gm((function(){bf(t,e,null,null)})))};var $g,Qg=function(e,t){var n=new Set,r=new Set(t.map((function(e){return e.current})));return function e(t,n,r){var o=t.child,i=t.sibling,a=t.tag,s=t.type,c=null;switch(a){case 0:case 15:case 1:c=s;break;case 11:c=s.render}var l=!1;null!==c&&n.has(c)&&(l=!0);l?function(e,t){if(function(e,t){var n=e,r=!1;for(;;){if(5===n.tag)r=!0,t.add(n.stateNode);else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)return r;for(;null===n.sibling;){if(null===n.return||n.return===e)return r;n=n.return}n.sibling.return=n.return,n=n.sibling}return!1}(e,t))return;var n=e;for(;;){switch(n.tag){case 5:return void t.add(n.stateNode);case 4:case 3:return void t.add(n.stateNode.containerInfo)}if(null===n.return)throw new Error("Expected to reach root first.");n=n.return}}(t,r):null!==o&&e(o,n,r);null!==i&&e(i,n,r)}(e.current,r,n),n};$g=!1;try{var Jg=Object.preventExtensions({});new Map([[Jg,null]]),new Set([Jg])}catch(e){$g=!0}var Xg=1;function Zg(e,t,n,r){this.tag=e,this.key=n,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=r,this.flags=0,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.lanes=0,this.childLanes=0,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugID=Xg++,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,$g||"function"!=typeof Object.preventExtensions||Object.preventExtensions(this)}var ef,tf,nf=function(e,t,n,r){return new Zg(e,t,n,r)};function rf(e){var t=e.prototype;return!(!t||!t.isReactComponent)}function of(e,t){var n=e.alternate;null===n?((n=nf(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugID=e._debugID,n._debugSource=e._debugSource,n._debugOwner=e._debugOwner,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null,n.actualDuration=0,n.actualStartTime=-1),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue;var r=e.dependencies;switch(n.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case 2:case 0:case 15:n.type=Vg(e.type);break;case 1:n.type=qg(e.type);break;case 11:n.type=Hg(e.type)}return n}function af(e,t){e.flags&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null;var n=e.alternate;if(null===n)e.childLanes=0,e.lanes=t,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type;var r=n.dependencies;e.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration}return e}function sf(e,t,n,r,o,i){var a=2,s=e;if("function"==typeof e)rf(e)?(a=1,s=qg(s)):s=Vg(s);else if("string"==typeof e)a=5;else e:switch(e){case U:return lf(n.children,o,i,t);case X:a=8,o|=16;break;case B:a=8,o|=1;break;case G:return function(e,t,n,r){"string"!=typeof e.id&&c('Profiler must specify an "id" as a prop');var o=nf(12,e,r,8|t);return o.elementType=G,o.type=G,o.lanes=n,o.stateNode={effectDuration:0,passiveEffectDuration:0},o}(n,o,i,t);case z:return function(e,t,n,r){var o=nf(13,e,r,t);return o.type=z,o.elementType=z,o.lanes=n,o}(n,o,i,t);case W:return function(e,t,n,r){var o=nf(19,e,r,t);return o.type=W,o.elementType=W,o.lanes=n,o}(n,o,i,t);case Z:return uf(n,o,i,t);case ee:return function(e,t,n,r){var o=nf(24,e,r,t);return o.type=ee,o.elementType=ee,o.lanes=n,o}(n,o,i,t);case Q:default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case V:a=10;break e;case q:a=9;break e;case H:a=11,s=Hg(s);break e;case K:a=14;break e;case Y:a=16,s=null;break e;case $:a=22;break e}var l="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var u=r?xe(r.type):null;throw u&&(l+="\n\nCheck the render method of `"+u+"`."),Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(null==e?e:typeof e)+"."+l)}var d=nf(a,n,t,o);return d.elementType=e,d.type=s,d.lanes=i,d._debugOwner=r,d}function cf(e,t,n){var r;r=e._owner;var o=sf(e.type,e.key,e.props,r,t,n);return o._debugSource=e._source,o._debugOwner=e._owner,o}function lf(e,t,n,r){var o=nf(7,e,r,t);return o.lanes=n,o}function uf(e,t,n,r){var o=nf(23,e,r,t);return o.type=Z,o.elementType=Z,o.lanes=n,o}function df(e,t,n){var r=nf(6,e,null,t);return r.lanes=n,r}function hf(e,t,n){var r=null!==e.children?e.children:[],o=nf(4,r,e.key,t);return o.lanes=n,o.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},o}function pf(e,t){return null===e&&(e=nf(2,null,null,0)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.nextEffect=t.nextEffect,e.firstEffect=t.firstEffect,e.lastEffect=t.lastEffect,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugID=t._debugID,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function mf(e,t,n){switch(this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=-1,this.context=null,this.pendingContext=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Xr(0),this.expirationTimes=Xr(-1),this.pendingLanes=0,this.suspendedLanes=0,this.pingedLanes=0,this.expiredLanes=0,this.mutableReadLanes=0,this.finishedLanes=0,this.entangledLanes=0,this.entanglements=Xr(0),this.mutableSourceEagerHydrationData=null,this.interactionThreadID=i.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map,t){case 1:this._debugRootType="createBlockingRoot()";break;case 2:this._debugRootType="createRoot()";break;case 0:this._debugRootType="createLegacyRoot()"}}function gf(e,t,n,r){var o=new mf(e,t,n),i=function(e){var t;return t=2===e?7:1===e?3:0,rc&&(t|=8),nf(3,null,null,t)}(t);return o.current=i,i.stateNode=o,ll(i),o}function ff(e,t){var n=(0,t._getVersion)(t._source);null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)}function _f(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:j,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function bf(e,t,n,r){!function(e,t){if(tc&&"function"==typeof tc.onScheduleFiberRoot)try{tc.onScheduleFiberRoot(ec,e,t)}catch(e){nc||(nc=!0,c("React instrumentation encountered an error: %s",e))}}(t,e);var i,a=t.current,s=Rm();"undefined"!=typeof jest&&(i=a,!1===Og&&void 0===o.unstable_flushAllWithoutAsserting&&(2&i.mode||4&i.mode)&&(Og=!0,c("In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: \njest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\nFor more info, visit https://reactjs.org/link/mock-scheduler")),xg(a));var l=Dm(a),u=function(e){if(!e)return js;var t=Vn(e),n=Zs(t);if(1===t.tag){var r=t.type;if(Ws(r))return Qs(t,r,n)}return n}(n);null===t.context?t.context=u:t.pendingContext=u,Oe&&null!==Fe&&!ef&&(ef=!0,c("Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",xe(Fe.type)||"Unknown"));var d=dl(s,l);return d.payload={element:e},null!==(r=void 0===r?null:r)&&("function"!=typeof r&&c("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",r),d.callback=r),hl(a,d),Am(a,l,s),l}function vf(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function yf(e,t){var n,r,o=e.memoizedState;null!==o&&null!==o.dehydrated&&(o.retryLane=(n=o.retryLane,r=t,0!==n&&n<r?n:r))}function Ef(e,t){yf(e,t);var n=e.alternate;n&&yf(n,t)}function Sf(e){var t=function(e){var t=Xn(e);if(!t)return null;for(var n=t;;){if(5===n.tag||6===n.tag)return n;if(n.child&&4!==n.tag)n.child.return=n,n=n.child;else{if(n===t)return null;for(;!n.sibling;){if(!n.return||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}(e);return null===t?null:20===t.tag?t.stateNode.instance:t.stateNode}ef=!1,tf={};var wf=function(e){return!1};var Cf,Tf,xf,kf,Ff,Of,Rf,Df,If=function(e,t,n){var o=t[n],i=Array.isArray(e)?e.slice():r({},e);return n+1===t.length?(Array.isArray(i)?i.splice(o,1):delete i[o],i):(i[o]=If(e[o],t,n+1),i)},Af=function(e,t){return If(e,t,0)},Nf=function(e,t,n,o){var i=t[o],a=Array.isArray(e)?e.slice():r({},e);o+1===t.length?(a[n[o]]=a[i],Array.isArray(a)?a.splice(i,1):delete a[i]):a[i]=Nf(e[i],t,n,o+1);return a},Mf=function(e,t,n){if(t.length===n.length){for(var r=0;r<n.length-1;r++)if(t[r]!==n[r])return void s("copyWithRename() expects paths to be the same except for the deepest key");return Nf(e,t,n,0)}s("copyWithRename() expects paths of the same length")},Pf=function(e,t,n,o){if(n>=t.length)return o;var i=t[n],a=Array.isArray(e)?e.slice():r({},e);return a[i]=Pf(e[i],t,n+1,o),a},Lf=function(e,t,n){return Pf(e,t,0,n)},jf=function(e,t){for(var n=e.memoizedState;null!==n&&t>0;)n=n.next,t--;return n};function Uf(e){var t=Zn(e);return null===t?null:t.stateNode}function Bf(e){return null}function Gf(){return Fe}function Vf(e,t){this._internalRoot=Hf(e,2,t)}function qf(e,t,n){this._internalRoot=Hf(e,t,n)}function Hf(e,t,n){var r,o=null!=n&&!0===n.hydrate,i=(null!=n&&n.hydrationOptions,null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null),a=function(e,t,n,r){return gf(e,t,n)}(e,t,o);r=a.current,e[fs]=r;e.nodeType;if(ta(8===e.nodeType?e.parentNode:e),i)for(var s=0;s<i.length;s++){ff(a,i[s])}return a}function zf(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}Cf=function(e,t,n,o){var i=jf(e,t);if(null!==i){var a=Lf(i.memoizedState,n,o);i.memoizedState=a,i.baseState=a,e.memoizedProps=r({},e.memoizedProps),Am(e,1,-1)}},Tf=function(e,t,n){var o=jf(e,t);if(null!==o){var i=Af(o.memoizedState,n);o.memoizedState=i,o.baseState=i,e.memoizedProps=r({},e.memoizedProps),Am(e,1,-1)}},xf=function(e,t,n,o){var i=jf(e,t);if(null!==i){var a=Mf(i.memoizedState,n,o);i.memoizedState=a,i.baseState=a,e.memoizedProps=r({},e.memoizedProps),Am(e,1,-1)}},kf=function(e,t,n){e.pendingProps=Lf(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),Am(e,1,-1)},Ff=function(e,t){e.pendingProps=Af(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps),Am(e,1,-1)},Of=function(e,t,n){e.pendingProps=Mf(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),Am(e,1,-1)},Rf=function(e){Am(e,1,-1)},Df=function(e){wf=e},Vf.prototype.render=qf.prototype.render=function(e){var t=this._internalRoot;"function"==typeof arguments[1]&&c("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var n=t.containerInfo;if(8!==n.nodeType){var r=Sf(t.current);r&&r.parentNode!==n&&c("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}bf(e,t,null,null)},Vf.prototype.unmount=qf.prototype.unmount=function(){"function"==typeof arguments[0]&&c("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot,t=e.containerInfo;bf(null,e,null,(function(){vs(t)}))};var Wf,Kf=a.ReactCurrentOwner,Yf=!1;function $f(e){return e?9===e.nodeType?e.documentElement:e.firstChild:null}function Qf(e,t){var n=t||function(e){var t=$f(e);return!(!t||1!==t.nodeType||!t.hasAttribute("data-reactroot"))}(e);if(!n)for(var r,o=!1;r=e.lastChild;)!o&&1===r.nodeType&&r.hasAttribute("data-reactroot")&&(o=!0,c("render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup.")),e.removeChild(r);return!n||t||Yf||(Yf=!0,s("render(): Calling ReactDOM.render() to hydrate server-rendered markup will stop working in React v18. Replace the ReactDOM.render() call with ReactDOM.hydrate() if you want React to attach to the server HTML.")),function(e,t){return new qf(e,0,t)}(e,n?{hydrate:!0}:void 0)}function Jf(e,t,n,r,o){Wf(n),function(e,t){null!==e&&"function"!=typeof e&&c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}(void 0===o?null:o,"render");var i,a=n._reactRootContainer;if(a){if(i=a._internalRoot,"function"==typeof o){var s=o;o=function(){var e=vf(i);s.call(e)}}bf(t,i,e,o)}else{if(a=n._reactRootContainer=Qf(n,r),i=a._internalRoot,"function"==typeof o){var l=o;o=function(){var e=vf(i);l.call(e)}}Bm((function(){bf(t,i,e,o)}))}return vf(i)}Wf=function(e){if(e._reactRootContainer&&8!==e.nodeType){var t=Sf(e._reactRootContainer._internalRoot.current);t&&t.parentNode!==e&&c("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var n=!!e._reactRootContainer,r=$f(e);!(!r||!Ss(r))&&!n&&c("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),1===e.nodeType&&e.tagName&&"BODY"===e.tagName.toUpperCase()&&c("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")},qn=function(e){13===e.tag&&(Am(e,4,Rm()),Ef(e,4))},function(e){Hn=e}((function(e){if(13===e.tag){Am(e,67108864,Rm()),Ef(e,67108864)}})),function(e){zn=e}((function(e){if(13===e.tag){var t=Rm(),n=Dm(e);Am(e,n,t),Ef(e,n)}})),function(e){Wn=e}((function(e,t){try{return t()}finally{}}));var Xf=!1;function Zf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!zf(t))throw Error("Target container is not a DOM element.");return _f(e,t,null,n)}"function"==typeof Map&&null!=Map.prototype&&"function"==typeof Map.prototype.forEach&&"function"==typeof Set&&null!=Set.prototype&&"function"==typeof Set.prototype.clear&&"function"==typeof Set.prototype.forEach||c("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),mn=function(e,t,n){switch(t){case"input":return void et(e,n);case"textarea":return void function(e,t){gt(e,t)}(e,n);case"select":return void function(e,t){var n=e,r=t.value;null!=r&<(n,!!t.multiple,r,!1)}(e,n)}},yn=Um,En=function(e,t,n,r,o){var i=Wp;Wp|=4;try{return kc(98,e.bind(null,t,n,r,o))}finally{0===(Wp=i)&&(sm(),Rc())}},Sn=function(){0==(49&Wp)?(function(){if(null!==vm){var e=vm;vm=null,e.forEach((function(e){!function(e){e.expiredLanes|=24&e.pendingLanes}(e),Mm(e,Cc())}))}Rc()}(),cg()):0!=(16&Wp)&&c("unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.")},wn=function(e,t){var n=Wp;Wp|=2;try{return e(t)}finally{0===(Wp=n)&&(sm(),Rc())}};var e_={Events:[Ss,ws,Cs,bn,vn,cg,Tg]};if(!function(e){var t=e.findFiberByHostInstance,n=a.ReactCurrentDispatcher;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return c("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{ec=t.inject(e),tc=t}catch(e){c("React instrumentation encountered an error: %s.",e)}return!0}({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:Cf,overrideHookStateDeletePath:Tf,overrideHookStateRenamePath:xf,overrideProps:kf,overridePropsDeletePath:Ff,overridePropsRenamePath:Of,setSuspenseHandler:Df,scheduleUpdate:Rf,currentDispatcherRef:n,findHostInstanceByFiber:Uf,findFiberByHostInstance:t||Bf,findHostInstancesForRefresh:Qg,scheduleRefresh:Kg,scheduleRoot:Yg,setRefreshHandler:Gg,getCurrentFiber:Gf})}({findFiberByHostInstance:Es,bundleType:1,version:"17.0.2",rendererPackageName:"react-dom"})&&g&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&-1===navigator.userAgent.indexOf("Edge")||navigator.userAgent.indexOf("Firefox")>-1)){var t_=window.location.protocol;/^(https?|file):$/.test(t_)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+("file:"===t_?"\nYou might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq":""),"font-weight:bold")}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=e_,t.createPortal=Zf,t.findDOMNode=function(e){var t=Kf.current;return null!==t&&null!==t.stateNode&&(t.stateNode._warnedAboutRefsInRender||c("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",xe(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0),null==e?null:1===e.nodeType?e:function(e,t){var n=Vn(e);if(void 0===n)throw"function"==typeof e.render?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(e));var r=Zn(n);if(null===r)return null;if(1&r.mode){var o=xe(n.type)||"Component";if(!tf[o]){tf[o]=!0;var i=Fe;try{Ae(r),1&n.mode?c("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,o):c("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,o)}finally{i?Ae(i):Ie()}}}return r.stateNode}(e,"findDOMNode")},t.flushSync=Gm,t.hydrate=function(e,t,n){if(!zf(t))throw Error("Target container is not a DOM element.");return ys(t)&&void 0===t._reactRootContainer&&c("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOM.createRoot(). This is not supported. Did you mean to call createRoot(container, {hydrate: true}).render(element)?"),Jf(null,e,t,!0,n)},t.render=function(e,t,n){if(!zf(t))throw Error("Target container is not a DOM element.");return ys(t)&&void 0===t._reactRootContainer&&c("You are calling ReactDOM.render() on a container that was previously passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.render(element)?"),Jf(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!zf(e))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");if(ys(e)&&void 0===e._reactRootContainer&&c("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?"),e._reactRootContainer){var t=$f(e);return t&&!Ss(t)&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React."),Bm((function(){Jf(null,null,e,!1,(function(){e._reactRootContainer=null,vs(e)}))})),!0}var n=$f(e),r=!(!n||!Ss(n)),o=1===e.nodeType&&zf(e.parentNode)&&!!e.parentNode._reactRootContainer;return r&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",o?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component."),!1},t.unstable_batchedUpdates=Um,t.unstable_createPortal=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Xf||(Xf=!0,s('The ReactDOM.unstable_createPortal() alias has been deprecated, and will be removed in React 18+. Update your code to use ReactDOM.createPortal() instead. It has the exact same API, but without the "unstable_" prefix.')),Zf(e,t,n)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){return function(e,t,n,r){if(!zf(n))throw Error("Target container is not a DOM element.");if(null==e||void 0===e._reactInternals)throw Error("parentComponent must be a valid React Component");return Jf(e,t,n,!1,r)}(e,t,n,r)},t.version="17.0.2"})()},function(e,t,n){"use strict";(function(){var e=n(370),r=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var i=60109,a=60110,s=60112;t.Suspense=60113;var c=60120,l=60115,u=60116,d=60121,h=60122,p=60117,m=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;r=f("react.element"),o=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),i=f("react.provider"),a=f("react.context"),s=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.suspense_list"),l=f("react.memo"),u=f("react.lazy"),d=f("react.block"),h=f("react.server.block"),p=f("react.fundamental"),f("react.scope"),f("react.opaque.id"),m=f("react.debug_trace_mode"),f("react.offscreen"),g=f("react.legacy_hidden")}var _="function"==typeof Symbol&&Symbol.iterator;function b(e){if(null===e||"object"!=typeof e)return null;var t=_&&e[_]||e["@@iterator"];return"function"==typeof t?t:null}var v={current:null},y={current:null},E={},S=null;function w(e){S=e}E.setExtraStackFrame=function(e){S=e},E.getCurrentStack=null,E.getStackAddendum=function(){var e="";S&&(e+=S);var t=E.getCurrentStack;return t&&(e+=t()||""),e};var C={ReactCurrentDispatcher:v,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:y,IsSomeRendererActing:{current:!1},assign:e};function T(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];k("warn",e,n)}function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];k("error",e,n)}function k(e,t,n){var r=C.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return""+e}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}C.ReactDebugCurrentFrame=E;var F={};function O(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",o=r+"."+t;F[o]||(x("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),F[o]=!0)}var R={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){O(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){O(e,"replaceState")},enqueueSetState:function(e,t,n,r){O(e,"setState")}},D={};function I(e,t,n){this.props=e,this.context=t,this.refs=D,this.updater=n||R}Object.freeze(D),I.prototype.isReactComponent={},I.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},I.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var A={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},N=function(e,t){Object.defineProperty(I.prototype,e,{get:function(){T("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var M in A)A.hasOwnProperty(M)&&N(M,A[M]);function P(){}function L(e,t,n){this.props=e,this.context=t,this.refs=D,this.updater=n||R}P.prototype=I.prototype;var j=L.prototype=new P;function U(e){return e.displayName||"Context"}function B(e){if(null==e)return null;if("number"==typeof e.tag&&x("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case t.Fragment:return"Fragment";case o:return"Portal";case t.Profiler:return"Profiler";case t.StrictMode:return"StrictMode";case t.Suspense:return"Suspense";case c:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return U(e)+".Consumer";case i:return U(e._context)+".Provider";case s:return p=e,m=e.render,g="ForwardRef",f=m.displayName||m.name||"",p.displayName||(""!==f?g+"("+f+")":g);case l:return B(e.type);case d:return B(e._render);case u:var n=e,r=n._payload,h=n._init;try{return B(h(r))}catch(e){return null}}var p,m,g,f;return null}j.constructor=L,e(j,I.prototype),j.isPureReactComponent=!0;var G,V,q,H=Object.prototype.hasOwnProperty,z={key:!0,ref:!0,__self:!0,__source:!0};function W(e){if(H.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function K(e){if(H.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}function Y(e,t){var n=function(){G||(G=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function $(e,t){var n=function(){V||(V=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}function Q(e){if("string"==typeof e.ref&&y.current&&e.__self&&y.current.stateNode!==e.__self){var t=B(y.current.type);q[t]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',t,e.ref),q[t]=!0)}}q={};var J=function(e,t,n,o,i,a,s){var c={$$typeof:r,type:e,key:t,ref:n,props:s,_owner:a,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function X(e,t,n){var r,o={},i=null,a=null,s=null,c=null;if(null!=t)for(r in W(t)&&(a=t.ref,Q(t)),K(t)&&(i=""+t.key),s=void 0===t.__self?null:t.__self,c=void 0===t.__source?null:t.__source,t)H.call(t,r)&&!z.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(l>1){for(var u=Array(l),d=0;d<l;d++)u[d]=arguments[d+2];Object.freeze&&Object.freeze(u),o.children=u}if(e&&e.defaultProps){var h=e.defaultProps;for(r in h)void 0===o[r]&&(o[r]=h[r])}if(i||a){var p="function"==typeof e?e.displayName||e.name||"Unknown":e;i&&Y(o,p),a&&$(o,p)}return J(e,i,a,s,c,y.current,o)}function Z(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o,i,a=e({},t.props),s=t.key,c=t.ref,l=t._self,u=t._source,d=t._owner;if(null!=n)for(o in W(n)&&(c=n.ref,d=y.current),K(n)&&(s=""+n.key),t.type&&t.type.defaultProps&&(i=t.type.defaultProps),n)H.call(n,o)&&!z.hasOwnProperty(o)&&(void 0===n[o]&&void 0!==i?a[o]=i[o]:a[o]=n[o]);var h=arguments.length-2;if(1===h)a.children=r;else if(h>1){for(var p=Array(h),m=0;m<h;m++)p[m]=arguments[m+2];a.children=p}return J(t.type,s,c,l,u,d,a)}function ee(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var te=!1,ne=/\/+/g;function re(e){return e.replace(ne,"$&/")}function oe(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function ie(e,t,n,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var c,l,u,d=!1;if(null===e)d=!0;else switch(s){case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case r:case o:d=!0}}if(d){var h=e,p=a(h),m=""===i?"."+oe(h,0):i;if(Array.isArray(p)){var g="";null!=m&&(g=re(m)+"/"),ie(p,t,g,"",(function(e){return e}))}else null!=p&&(ee(p)&&(c=p,l=n+(!p.key||h&&h.key===p.key?"":re(""+p.key)+"/")+m,p=J(c.type,l,c.ref,c._self,c._source,c._owner,c.props)),t.push(p));return 1}var f=0,_=""===i?".":i+":";if(Array.isArray(e))for(var v=0;v<e.length;v++)f+=ie(u=e[v],t,n,_+oe(u,v),a);else{var y=b(e);if("function"==typeof y){var E=e;y===E.entries&&(te||T("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),te=!0);for(var S,w=y.call(E),C=0;!(S=w.next()).done;)f+=ie(u=S.value,t,n,_+oe(u,C++),a)}else if("object"===s){var x=""+e;throw Error("Objects are not valid as a React child (found: "+("[object Object]"===x?"object with keys {"+Object.keys(e).join(", ")+"}":x)+"). If you meant to render a collection of children, use an array instead.")}}return f}function ae(e,t,n){if(null==e)return e;var r=[],o=0;return ie(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function se(e){if(-1===e._status){var t=(0,e._result)(),n=e;n._status=0,n._result=t,t.then((function(t){if(0===e._status){var n=t.default;void 0===n&&x("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",t);var r=e;r._status=1,r._result=n}}),(function(t){if(0===e._status){var n=e;n._status=2,n._result=t}}))}if(1===e._status)return e._result;throw e._result}function ce(e){return"string"==typeof e||"function"==typeof e||(e===t.Fragment||e===t.Profiler||e===m||e===t.StrictMode||e===t.Suspense||e===c||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===i||e.$$typeof===a||e.$$typeof===s||e.$$typeof===p||e.$$typeof===d||e[0]===h))}function le(){var e=v.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return e}var ue,de,he,pe,me,ge,fe,_e=0;function be(){}be.__reactDisabledLog=!0;var ve,ye=C.ReactCurrentDispatcher;function Ee(e,t,n){if(void 0===ve)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);ve=r&&r[1]||""}return"\n"+ve+e}var Se,we=!1,Ce="function"==typeof WeakMap?WeakMap:Map;function Te(t,n){if(!t||we)return"";var r,o=Se.get(t);if(void 0!==o)return o;we=!0;var i,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=ye.current,ye.current=null,function(){if(0===_e){ue=console.log,de=console.info,he=console.warn,pe=console.error,me=console.group,ge=console.groupCollapsed,fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}_e++}();try{if(n){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(s,[])}catch(e){r=e}Reflect.construct(t,[],s)}else{try{s.call()}catch(e){r=e}t.call(s.prototype)}}else{try{throw Error()}catch(e){r=e}t()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var c=e.stack.split("\n"),l=r.stack.split("\n"),u=c.length-1,d=l.length-1;u>=1&&d>=0&&c[u]!==l[d];)d--;for(;u>=1&&d>=0;u--,d--)if(c[u]!==l[d]){if(1!==u||1!==d)do{if(u--,--d<0||c[u]!==l[d]){var h="\n"+c[u].replace(" at new "," at ");return"function"==typeof t&&Se.set(t,h),h}}while(u>=1&&d>=0);break}}}finally{we=!1,ye.current=i,function(){if(0===--_e){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:e({},t,{value:ue}),info:e({},t,{value:de}),warn:e({},t,{value:he}),error:e({},t,{value:pe}),group:e({},t,{value:me}),groupCollapsed:e({},t,{value:ge}),groupEnd:e({},t,{value:fe})})}_e<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var p=t?t.displayName||t.name:"",m=p?Ee(p):"";return"function"==typeof t&&Se.set(t,m),m}function xe(e,t,n){return Te(e,!1)}function ke(e,n,r){if(null==e)return"";if("function"==typeof e)return Te(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return Ee(e);switch(e){case t.Suspense:return Ee("Suspense");case c:return Ee("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case s:return xe(e.render);case l:return ke(e.type,n,r);case d:return xe(e._render);case u:var o=e,i=o._payload,a=o._init;try{return ke(a(i),n,r)}catch(e){}}return""}Se=new Ce;var Fe,Oe={},Re=C.ReactDebugCurrentFrame;function De(e){if(e){var t=e._owner,n=ke(e.type,e._source,t?t.type:null);Re.setExtraStackFrame(n)}else Re.setExtraStackFrame(null)}function Ie(e){if(e){var t=e._owner;w(ke(e.type,e._source,t?t.type:null))}else w(null)}function Ae(){if(y.current){var e=B(y.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}function Ne(e){return null!=e&&void 0!==(t=e.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"";var t}Fe=!1;var Me={};function Pe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=Ae();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!Me[n]){Me[n]=!0;var r="";e&&e._owner&&e._owner!==y.current&&(r=" It was passed a child from "+B(e._owner.type)+"."),Ie(e),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),Ie(null)}}}function Le(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];ee(r)&&Pe(r,t)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var o=b(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)ee(i.value)&&Pe(i.value,t)}}function je(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==s&&n.$$typeof!==l)return;t=n.propTypes}if(t){var r=B(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var a in e)if(i(e,a)){var s=void 0;try{if("function"!=typeof e[a]){var c=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}s=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}!s||s instanceof Error||(De(o),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof s),De(null)),s instanceof Error&&!(s.message in Oe)&&(Oe[s.message]=!0,De(o),x("Failed %s type: %s",n,s.message),De(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!Fe){Fe=!0,x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ue(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){Ie(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),Ie(null);break}}null!==e.ref&&(Ie(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),Ie(null))}function Be(e,n,o){var i=ce(e);if(!i){var a="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var s,c=Ne(n);a+=c||Ae(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===r?(s="<"+(B(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,x("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var l=X.apply(this,arguments);if(null==l)return l;if(i)for(var u=2;u<arguments.length;u++)Le(arguments[u],e);return e===t.Fragment?Ue(l):je(l),l}var Ge=!1;try{var Ve=Object.freeze({});new Map([[Ve,null]]),new Set([Ve])}catch(e){}var qe=Be,He=function(e,t,n){for(var r=Z.apply(this,arguments),o=2;o<arguments.length;o++)Le(arguments[o],r.type);return je(r),r},ze=function(e){var t=Be.bind(null,e);return t.type=e,Ge||(Ge=!0,T("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return T("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},We={map:ae,forEach:function(e,t,n){ae(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return ae(e,(function(){t++})),t},toArray:function(e){return ae(e,(function(e){return e}))||[]},only:function(e){if(!ee(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Children=We,t.Component=I,t.PureComponent=L,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C,t.cloneElement=He,t.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&x("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var n={$$typeof:a,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null};n.Provider={$$typeof:i,_context:n};var r=!1,o=!1,s=!1,c={$$typeof:a,_context:n,_calculateChangedBits:n._calculateChangedBits};return Object.defineProperties(c,{Provider:{get:function(){return o||(o=!0,x("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),n.Provider},set:function(e){n.Provider=e}},_currentValue:{get:function(){return n._currentValue},set:function(e){n._currentValue=e}},_currentValue2:{get:function(){return n._currentValue2},set:function(e){n._currentValue2=e}},_threadCount:{get:function(){return n._threadCount},set:function(e){n._threadCount=e}},Consumer:{get:function(){return r||(r=!0,x("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),n.Consumer}},displayName:{get:function(){return n.displayName},set:function(e){s||(T("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),s=!0)}}}),n.Consumer=c,n._currentRenderer=null,n._currentRenderer2=null,n},t.createElement=qe,t.createFactory=ze,t.createRef=function(){var e={current:null};return Object.seal(e),e},t.forwardRef=function(e){null!=e&&e.$$typeof===l?x("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?x("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&x("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||x("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,n={$$typeof:s,render:e};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n,null==e.displayName&&(e.displayName=n)}}),n},t.isValidElement=ee,t.lazy=function(e){var t,n,r={$$typeof:u,_payload:{_status:-1,_result:e},_init:se};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){x("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){x("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},t.memo=function(e,t){ce(e)||x("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var n,r={$$typeof:l,type:e,compare:void 0===t?null:t};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,null==e.displayName&&(e.displayName=t)}}),r},t.useCallback=function(e,t){return le().useCallback(e,t)},t.useContext=function(e,t){var n=le();if(void 0!==t&&x("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://reactjs.org/link/rules-of-hooks":""),void 0!==e._context){var r=e._context;r.Consumer===e?x("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&x("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return n.useContext(e,t)},t.useDebugValue=function(e,t){return le().useDebugValue(e,t)},t.useEffect=function(e,t){return le().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return le().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return le().useLayoutEffect(e,t)},t.useMemo=function(e,t){return le().useMemo(e,t)},t.useReducer=function(e,t,n){return le().useReducer(e,t,n)},t.useRef=function(e){return le().useRef(e)},t.useState=function(e){return le().useState(e)},t.version="17.0.2"})()},function(e,t,n){"use strict";e.exports=n(901)},function(e,t,n){"use strict";(function(){var e,n,r,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();t.unstable_now=function(){return a.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,l=null,u=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(u,0),e}};e=function(t){null!==c?setTimeout(e,0,t):(c=t,setTimeout(u,0))},n=function(e,t){l=setTimeout(e,t)},r=function(){clearTimeout(l)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.requestAnimationFrame,m=window.cancelAnimationFrame;"function"!=typeof p&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,f=null,_=-1,b=5,v=0;t.unstable_shouldYield=function(){return t.unstable_now()>=v},o=function(){},t.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=e>0?Math.floor(1e3/e):5};var y=new MessageChannel,E=y.port2;y.port1.onmessage=function(){if(null!==f){var e=t.unstable_now();v=e+b;try{f(!0,e)?E.postMessage(null):(g=!1,f=null)}catch(e){throw E.postMessage(null),e}}else g=!1},e=function(e){f=e,g||(g=!0,E.postMessage(null))},n=function(e,n){_=d((function(){e(t.unstable_now())}),n)},r=function(){h(_),_=-1}}function S(e,t){var n=e.length;e.push(t),function(e,t,n){var r=n;for(;;){var o=r-1>>>1,i=e[o];if(!(void 0!==i&&T(i,t)>0))return;e[o]=t,e[r]=i,r=o}}(e,t,n)}function w(e){var t=e[0];return void 0===t?null:t}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){var r=n,o=e.length;for(;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,c=e[s];if(void 0!==a&&T(a,t)<0)void 0!==c&&T(c,a)<0?(e[r]=c,e[s]=t,r=s):(e[r]=a,e[i]=t,r=i);else{if(!(void 0!==c&&T(c,t)<0))return;e[r]=c,e[s]=t,r=s}}}(e,n,0)),t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var x=[],k=[],F=1,O=null,R=3,D=!1,I=!1,A=!1;function N(e){for(var t=w(k);null!==t;){if(null===t.callback)C(k);else{if(!(t.startTime<=e))return;C(k),t.sortIndex=t.expirationTime,S(x,t)}t=w(k)}}function M(t){if(A=!1,N(t),!I)if(null!==w(x))I=!0,e(P);else{var r=w(k);null!==r&&n(M,r.startTime-t)}}function P(e,t){I=!1,A&&(A=!1,r()),D=!0;var n=R;try{return L(e,t)}finally{O=null,R=n,D=!1}}function L(e,r){var o=r;for(N(o),O=w(x);null!==O&&(!(O.expirationTime>o)||e&&!t.unstable_shouldYield());){var i=O.callback;if("function"==typeof i){O.callback=null,R=O.priorityLevel;var a=i(O.expirationTime<=o);o=t.unstable_now(),"function"==typeof a?O.callback=a:O===w(x)&&C(x),N(o)}else C(x);O=w(x)}if(null!==O)return!0;var s=w(k);return null!==s&&n(M,s.startTime-o),!1}var j=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){I||D||(I=!0,e(P))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return w(x)},t.unstable_next=function(e){var t;switch(R){case 1:case 2:case 3:t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=j,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(o,i,a){var s,c,l=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;s="number"==typeof u&&u>0?l+u:l}else s=l;switch(o){case 1:c=-1;break;case 2:c=250;break;case 5:c=1073741823;break;case 4:c=1e4;break;case 3:default:c=5e3}var d=s+c,h={id:F++,callback:i,priorityLevel:o,startTime:s,expirationTime:d,sortIndex:-1};return s>l?(h.sortIndex=s,S(k,h),null===w(x)&&h===w(k)&&(A?r():A=!0,n(M,s-l))):(h.sortIndex=d,S(x,h),I||D||(I=!0,e(P))),h},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}})()},function(e,t,n){"use strict";e.exports=n(903)},function(e,t,n){"use strict";(function(){var e=0,n=0;t.__interactionsRef=null,t.__subscriberRef=null,t.__interactionsRef={current:new Set},t.__subscriberRef={current:null};var r=null;function o(e){var t=!1,n=null;if(r.forEach((function(r){try{r.onInteractionTraced(e)}catch(e){t||(t=!0,n=e)}})),t)throw n}function i(e){var t=!1,n=null;if(r.forEach((function(r){try{r.onInteractionScheduledWorkCompleted(e)}catch(e){t||(t=!0,n=e)}})),t)throw n}function a(e,t){var n=!1,o=null;if(r.forEach((function(r){try{r.onWorkScheduled(e,t)}catch(e){n||(n=!0,o=e)}})),n)throw o}function s(e,t){var n=!1,o=null;if(r.forEach((function(r){try{r.onWorkStarted(e,t)}catch(e){n||(n=!0,o=e)}})),n)throw o}function c(e,t){var n=!1,o=null;if(r.forEach((function(r){try{r.onWorkStopped(e,t)}catch(e){n||(n=!0,o=e)}})),n)throw o}function l(e,t){var n=!1,o=null;if(r.forEach((function(r){try{r.onWorkCanceled(e,t)}catch(e){n||(n=!0,o=e)}})),n)throw o}r=new Set,t.unstable_clear=function(e){var n=t.__interactionsRef.current;t.__interactionsRef.current=new Set;try{return e()}finally{t.__interactionsRef.current=n}},t.unstable_getCurrent=function(){return t.__interactionsRef.current},t.unstable_getThreadID=function(){return++n},t.unstable_subscribe=function(e){r.add(e),1===r.size&&(t.__subscriberRef.current={onInteractionScheduledWorkCompleted:i,onInteractionTraced:o,onWorkCanceled:l,onWorkScheduled:a,onWorkStarted:s,onWorkStopped:c})},t.unstable_trace=function(n,r,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a={__count:1,id:e++,name:n,timestamp:r},s=t.__interactionsRef.current,c=new Set(s);c.add(a),t.__interactionsRef.current=c;var l,u=t.__subscriberRef.current;try{null!==u&&u.onInteractionTraced(a)}finally{try{null!==u&&u.onWorkStarted(c,i)}finally{try{l=o()}finally{t.__interactionsRef.current=s;try{null!==u&&u.onWorkStopped(c,i)}finally{a.__count--,null!==u&&0===a.__count&&u.onInteractionScheduledWorkCompleted(a)}}}}return l},t.unstable_unsubscribe=function(e){r.delete(e),0===r.size&&(t.__subscriberRef.current=null)},t.unstable_wrap=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.__interactionsRef.current,o=t.__subscriberRef.current;null!==o&&o.onWorkScheduled(r,n),r.forEach((function(e){e.__count++}));var i=!1;function a(){var a=t.__interactionsRef.current;t.__interactionsRef.current=r,o=t.__subscriberRef.current;try{var s;try{null!==o&&o.onWorkStarted(r,n)}finally{try{s=e.apply(void 0,arguments)}finally{t.__interactionsRef.current=a,null!==o&&o.onWorkStopped(r,n)}}return s}finally{i||(i=!0,r.forEach((function(e){e.__count--,null!==o&&0===e.__count&&o.onInteractionScheduledWorkCompleted(e)})))}}return a.cancel=function(){o=t.__subscriberRef.current;try{null!==o&&o.onWorkCanceled(r,n)}finally{r.forEach((function(e){e.__count--,o&&0===e.__count&&o.onInteractionScheduledWorkCompleted(e)}))}},a}})()},function(e,t,n){"use strict";var r=n(905),o=n(508).isArray,i=n(508).isDate,a=n(908).sprintf,s=n(3),c=n(909),l=n(911);function u(e){return"string"==typeof e||"[object String]"===Object.prototype.toString.call(e)}function d(e){return u(e)&&":"===e[0]}function h(e,t){return t.reduce((function(e,t){return null!==(n=e)&&"[object Object]"===Object.prototype.toString.call(n)&&function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)?e[t]:null;var n}),e)}function p(){s.EventEmitter.apply(this),this._registry={locale:"en",interpolate:!0,fallbackLocales:[],scope:null,translations:{},interpolations:{},normalizedKeys:{},separator:".",keepTrailingDot:!1,keyTransformer:function(e){return e},generateMissingEntry:function(e){return"missing translation: "+e}},this.registerTranslations("en",n(913)),this.setMaxListeners(0)}p.prototype=s.EventEmitter.prototype,p.prototype.constructor=s.EventEmitter,p.prototype.getLocale=function(){return this._registry.locale},p.prototype.setLocale=function(e){var t=this._registry.locale;return t!=e&&(this._registry.locale=e,this.emit("localechange",e,t)),t},p.prototype.getFallbackLocale=function(){return this._registry.fallbackLocales},p.prototype.setFallbackLocale=function(e){var t=this._registry.fallbackLocales;return this._registry.fallbackLocales=[].concat(e||[]),t},p.prototype.getAvailableLocales=function(){return this._registry.availableLocales||Object.keys(this._registry.translations)},p.prototype.setAvailableLocales=function(e){var t=this.getAvailableLocales();return this._registry.availableLocales=e,t},p.prototype.getSeparator=function(){return this._registry.separator},p.prototype.setSeparator=function(e){var t=this._registry.separator;return this._registry.separator=e,t},p.prototype.setInterpolate=function(e){var t=this._registry.interpolate;return this._registry.interpolate=e,t},p.prototype.getInterpolate=function(){return this._registry.interpolate},p.prototype.setKeyTransformer=function(e){var t=this._registry.keyTransformer;return this._registry.keyTransformer=e,t},p.prototype.getKeyTransformer=function(){return this._registry.keyTransformer},p.prototype.setMissingEntryGenerator=function(e){var t=this._registry.generateMissingEntry;return this._registry.generateMissingEntry=e,t},p.prototype.getMissingEntryGenerator=function(){return this._registry.generateMissingEntry},p.prototype.registerTranslations=function(e,t){var n={};return n[e]=t,r(!0,this._registry.translations,n),n},p.prototype.registerInterpolations=function(e){return r(!0,this._registry.interpolations,e)},p.prototype.onLocaleChange=p.prototype.addLocaleChangeListener=function(e){this.addListener("localechange",e)},p.prototype.offLocaleChange=p.prototype.removeLocaleChangeListener=function(e){this.removeListener("localechange",e)},p.prototype.onTranslationNotFound=p.prototype.addTranslationNotFoundListener=function(e){this.addListener("translationnotfound",e)},p.prototype.offTranslationNotFound=p.prototype.removeTranslationNotFoundListener=function(e){this.removeListener("translationnotfound",e)},p.prototype.onError=p.prototype.addErrorListener=function(e){this.addListener("error",e)},p.prototype.offError=p.prototype.removeErrorListener=function(e){this.removeListener("error",e)},p.prototype.translate=function(e,t){if(!o(e)&&!u(e)||!e.length)throw new Error("invalid argument: key");d(e)&&(e=e.substr(1)),e=this._registry.keyTransformer(e,t);var n=(t=r(!0,{},t)).locale||this._registry.locale;delete t.locale;var i=t.scope||this._registry.scope;delete t.scope;var a=t.separator||this._registry.separator;delete t.separator;var s=[].concat(t.fallbackLocale||this._registry.fallbackLocales);delete t.fallbackLocale;var c=this._normalizeKeys(n,i,e,a),l=h(this._registry.translations,c);if(null===l&&(this.emit("translationnotfound",n,e,t.fallback,i),t.fallback&&(l=this._fallback(n,i,e,t.fallback,t))),null===l&&s.length>0&&-1===s.indexOf(n))for(var p=0,m=s.length;p<m;p++){var g=s[p],f=this._normalizeKeys(g,i,e,a);if(l=h(this._registry.translations,f)){n=g;break}}return null===l&&(l=this._registry.generateMissingEntry(c.join(a))),l=this._pluralize(n,l,t.count),!1!==this._registry.interpolate&&!1!==t.interpolate&&(l=this._interpolate(l,t)),l},p.prototype.localize=function(e,t){if(!i(e))throw new Error("invalid argument: object must be a date");var n=(t=r(!0,{},t)).locale||this._registry.locale,o=t.scope||"counterpart",a=t.type||"datetime",s=t.format||"default";return t={locale:n,scope:o,interpolate:!1},s=this.translate(["formats",a,s],r(!0,{},t)),l(e,s,this.translate("names",t))},p.prototype._pluralize=function(e,t,n){if("object"!=typeof t||null===t||"number"!=typeof n)return t;var r=this.translate("pluralize",{locale:e,scope:"counterpart"});return"[object Function]"!==Object.prototype.toString.call(r)?r:r(t,n)},p.prototype.withLocale=function(e,t,n){var r=this._registry.locale;this._registry.locale=e;var o=t.call(n);return this._registry.locale=r,o},p.prototype.withScope=function(e,t,n){var r=this._registry.scope;this._registry.scope=e;var o=t.call(n);return this._registry.scope=r,o},p.prototype.withSeparator=function(e,t,n){var r=this.setSeparator(e),o=t.call(n);return this.setSeparator(r),o},p.prototype._normalizeKeys=function(e,t,n,r){var o=[];return o=(o=(o=o.concat(this._normalizeKey(e,r))).concat(this._normalizeKey(t,r))).concat(this._normalizeKey(n,r))},p.prototype._normalizeKey=function(e,t){return this._registry.normalizedKeys[t]=this._registry.normalizedKeys[t]||{},this._registry.normalizedKeys[t][e]=this._registry.normalizedKeys[t][e]||function(e){if(o(e)){var n=e.map(function(e){return this._normalizeKey(e,t)}.bind(this));return[].concat.apply([],n)}if(null==e)return[];for(var r=e.split(t),i=r.length-1;i>=0;i--)""===r[i]&&(r.splice(i,1),!0===this._registry.keepTrailingDot&&i==r.length&&(r[r.length-1]+=""+t));return r}.bind(this)(e),this._registry.normalizedKeys[t][e]},p.prototype._interpolate=function(e,t){if("string"!=typeof e)return e;try{return a(e,r({},this._registry.interpolations,t))}catch(n){if(!(this.listenerCount("error")>0))throw n;return this.emit("error",n,e,t),null}},p.prototype._resolve=function(e,t,n,o,i){if(!1===(i=i||{}).resolve)return o;var a,s;if(d(o))a=this.translate(o,r({},i,{locale:e,scope:t}));else if("function"==typeof(s=o)||"[object Function]"===Object.prototype.toString.call(s)){var c;i.object?(c=i.object,delete i.object):c=n,a=this._resolve(e,t,n,o(c,i))}else a=o;return/^missing translation:/.test(a)?null:a},p.prototype._fallback=function(e,t,n,r,i){if(i=c(i,"fallback"),o(r)){for(var a=0,s=r.length;a<s;a++){var l=this._resolve(e,t,n,r[a],i);if(l)return l}return null}return this._resolve(e,t,n,r,i)};var m=new p;function g(){return m.translate.apply(m,arguments)}r(g,m,{Instance:p,Translator:p}),e.exports=g},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},c=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,a,d=arguments[0],h=1,p=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=u(d,n),d!==(o=u(t,n))&&(m&&o&&(c(o)||(i=s(o)))?(i?(i=!1,a=r&&s(r)?r:[]):a=r&&c(r)?r:{},l(d,{name:n,newValue:e(m,a,o)})):void 0!==o&&l(d,{name:n,newValue:o}));return d}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return s(l(e),arguments)}function a(e,t){return i.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,c,l,u,d,h,p=1,m=e.length,g="";for(r=0;r<m;r++)if("string"==typeof e[r])g+=e[r];else if("object"==typeof e[r]){if((s=e[r]).keys)for(n=t[p],a=0;a<s.keys.length;a++){if(null==n)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));n=n[s.keys[a]]}else n=s.param_no?t[s.param_no]:t[p++];if(o.not_type.test(s.type)&&o.not_primitive.test(s.type)&&n instanceof Function&&(n=n()),o.numeric_arg.test(s.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(i("[sprintf] expecting number but found %T",n));switch(o.number.test(s.type)&&(d=n>=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}o.json.test(s.type)?g+=n:(!o.number.test(s.type)||d&&!s.sign?h="":(h=d?"+":"-",n=n.toString().replace(o.sign,"")),l=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(h+n).length,c=s.width&&u>0?l.repeat(u):"",g+=s.align?h+n+c:"0"===l?h+c+n:c+h+n)}return g}var c=Object.create(null);function l(e){if(c[e])return c[e];for(var t,n=e,r=[],i=0;n;){if(null!==(t=o.text.exec(n)))r.push(t[0]);else if(null!==(t=o.modulo.exec(n)))r.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var a=[],s=t[2],l=[];if(null===(l=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(l[1]);""!==(s=s.substring(l[0].length));)if(null!==(l=o.key_access.exec(s)))a.push(l[1]);else{if(null===(l=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(l[1])}t[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return c[e]=r}t.sprintf=i,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=a,void 0===(r=function(){return{sprintf:i,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t,n){"use strict";var r=Array.prototype,o=r.concat,i=r.slice,a=n(910);e.exports=function(e){var t={},n=o.apply(r,i.call(arguments,1));for(var s in e)-1===a(n,s)&&(t[s]=e[s]);return t}},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){"use strict";var r=n(912);function o(e,t,n){"number"==typeof t&&(n=t,t="0"),null===t&&(t="0"),n=n||2;var r=String(e);if(t)for(;r.length<n;)r=t+r;return r}function i(e){var t=e.getHours();return 0===t?t=12:t>12&&(t-=12),t}function a(e,t){t=t||"sunday";var n=e.getDay();"monday"==t&&(0===n?n=6:n--);var r=new Date(e.getFullYear(),0,1),o=((e-r)/864e5+7-n)/7;return Math.floor(o)}e.exports=function e(t,n,s){var c=t.getTime();return s=s||r,n.replace(/%([-_0]?.)/g,(function(n,r){var l=null;if(2==r.length){switch(r[0]){case"-":l="";break;case"_":l=" ";break;case"0":l="0";break;default:return n}r=r[1]}switch(r){case"A":return s.days[t.getDay()];case"a":return s.abbreviated_days[t.getDay()];case"B":return s.months[t.getMonth()];case"b":return s.abbreviated_months[t.getMonth()];case"C":return o(Math.floor(t.getFullYear()/100),l);case"D":return e(t,"%m/%d/%y");case"d":return o(t.getDate(),l);case"e":return t.getDate();case"F":return e(t,"%Y-%m-%d");case"H":return o(t.getHours(),l);case"h":return s.abbreviated_months[t.getMonth()];case"I":return o(i(t),l);case"j":return o(Math.ceil((t.getTime()-new Date(t.getFullYear(),0,1).getTime())/864e5),3);case"k":return o(t.getHours(),null===l?" ":l);case"L":return o(Math.floor(c%1e3),3);case"l":return o(i(t),null===l?" ":l);case"M":return o(t.getMinutes(),l);case"m":return o(t.getMonth()+1,l);case"n":return"\n";case"o":return String(t.getDate())+function(e){var t=e%10,n=e%100;if(n>=11&&n<=13||0===t||t>=4)return"th";switch(t){case 1:return"st";case 2:return"nd";case 3:return"rd"}}(t.getDate());case"P":return t.getHours()<12?s.am.toLowerCase():s.pm.toLowerCase();case"p":return t.getHours()<12?s.am.toUpperCase():s.pm.toUpperCase();case"R":return e(t,"%H:%M");case"r":return e(t,"%I:%M:%S %p");case"S":return o(t.getSeconds(),l);case"s":return Math.floor(c/1e3);case"T":return e(t,"%H:%M:%S");case"t":return"\t";case"U":return o(a(t,"sunday"),l);case"u":return 0===t.getDay()?7:t.getDay();case"v":return e(t,"%e-%b-%Y");case"W":return o(a(t,"monday"),l);case"w":return t.getDay();case"Y":return t.getFullYear();case"y":var u=String(t.getFullYear());return u.slice(u.length-2);case"Z":var d=t.toString().match(/\((\w+)\)/);return d&&d[1]||"";case"z":var h=t.getTimezoneOffset();return(h>0?"-":"+")+o(Math.round(Math.abs(h/60)),2)+":"+o(h%60,2);default:return r}}))}},function(e,t,n){"use strict";e.exports=n(509)},function(e,t,n){"use strict";e.exports={counterpart:{names:n(509),pluralize:n(914),formats:{date:{default:"%a, %e %b %Y",long:"%A, %B %o, %Y",short:"%b %e"},time:{default:"%H:%M",long:"%H:%M:%S %z",short:"%H:%M"},datetime:{default:"%a, %e %b %Y %H:%M",long:"%A, %B %o, %Y %H:%M:%S %z",short:"%e %b %H:%M"}}}}},function(e,t,n){"use strict";e.exports=function(e,t){var n;return 0===t&&"zero"in e&&(n="zero"),e[n=n||(1===t?"one":"other")]}},function(e,t,n){var r,o;!function(i,a){"use strict";void 0===(o="function"==typeof(r=function(){var e=function(){},t="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function r(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function i(n){return"debug"===n&&(n="log"),"undefined"!=typeof console&&("trace"===n&&t?o:void 0!==console[n]?r(console,n):void 0!==console.log?r(console,"log"):e)}function a(t,r){for(var o=0;o<n.length;o++){var i=n[o];this[i]=o<t?e:this.methodFactory(i,t,r)}this.log=this.debug}function s(e,t,n){return function(){"undefined"!=typeof console&&(a.call(this,t,n),this[e].apply(this,arguments))}}function c(e,t,n){return i(e)||s.apply(this,arguments)}function l(e,t,r){var o,i=this,s="loglevel";function l(){var e;if("undefined"!=typeof window&&s){try{e=window.localStorage[s]}catch(e){}if(void 0===e)try{var t=window.document.cookie,n=t.indexOf(encodeURIComponent(s)+"=");-1!==n&&(e=/^([^;]+)/.exec(t.slice(n))[1])}catch(e){}return void 0===i.levels[e]&&(e=void 0),e}}"string"==typeof e?s+=":"+e:"symbol"==typeof e&&(s=void 0),i.name=e,i.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},i.methodFactory=r||c,i.getLevel=function(){return o},i.setLevel=function(t,r){if("string"==typeof t&&void 0!==i.levels[t.toUpperCase()]&&(t=i.levels[t.toUpperCase()]),!("number"==typeof t&&t>=0&&t<=i.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(o=t,!1!==r&&function(e){var t=(n[e]||"silent").toUpperCase();if("undefined"!=typeof window&&s){try{return void(window.localStorage[s]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(s)+"="+t+";"}catch(e){}}}(t),a.call(i,t,e),"undefined"==typeof console&&t<i.levels.SILENT)return"No console available for logging"},i.setDefaultLevel=function(e){l()||i.setLevel(e,!1)},i.enableAll=function(e){i.setLevel(i.levels.TRACE,e)},i.disableAll=function(e){i.setLevel(i.levels.SILENT,e)};var u=l();null==u&&(u=null==t?"WARN":t),i.setLevel(u,!1)}var u=new l,d={};u.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new l(e,u.getLevel(),u.methodFactory)),t};var h="undefined"!=typeof window?window.log:void 0;return u.noConflict=function(){return"undefined"!=typeof window&&window.log===u&&(window.log=h),u},u.getLoggers=function(){return d},u.default=u,u})?r.call(t,n,t,e):r)||(e.exports=o)}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return v}));var r=n(79),o=n.n(r),i=n(205),a=n(185),s=n(229),c=n(2),l=n(291),u=n(152),d=n(230),h=n(96),p=n(206),m=n(168),g=n(511),f=n(294);function _(e,t){return"FILTER_SYNC_"+e+(t?"_"+t:"")}function b(...e){h.a.log(...e)}class v{constructor(e,t={}){var n;this.client=e,this.opts=t,o()(this,"_peekRoom",null),o()(this,"currentSyncRequest",null),o()(this,"syncState",null),o()(this,"syncStateData",null),o()(this,"catchingUp",!1),o()(this,"running",!1),o()(this,"keepAliveTimer",null),o()(this,"connectionReturnedDefer",null),o()(this,"notifEvents",[]),o()(this,"failedSyncCount",0),o()(this,"storeIsInvalid",!1),o()(this,"onOnline",()=>{b("Browser thinks we are back online"),this.startKeepAlives(0)}),this.opts.initialSyncLimit=null!==(n=this.opts.initialSyncLimit)&&void 0!==n?n:8,this.opts.resolveInvitesToProfiles=this.opts.resolveInvitesToProfiles||!1,this.opts.pollTimeout=this.opts.pollTimeout||3e4,this.opts.pendingEventOrdering=this.opts.pendingEventOrdering||m.c.Chronological,t.canResetEntireTimeline||(t.canResetEntireTimeline=e=>!1),e.getNotifTimelineSet()&&e.reEmitter.reEmit(e.getNotifTimelineSet(),["Room.timeline","Room.timelineReset"])}createRoom(e){const t=this.client,{timelineSupport:n,unstableClientRelationAggregation:r}=t,o=new a.b(e,t,t.getUserId(),{lazyLoadMembers:this.opts.lazyLoadMembers,pendingEventOrdering:this.opts.pendingEventOrdering,timelineSupport:n,unstableClientRelationAggregation:r});return t.reEmitter.reEmit(o,["Room.name","Room.timeline","Room.redaction","Room.redactionCancelled","Room.receipt","Room.tags","Room.timelineReset","Room.localEchoUpdated","Room.accountData","Room.myMembership","Room.replaceEvent"]),this.registerStateListeners(o),o}createGroup(e){const t=this.client,n=new s.a(e);return t.reEmitter.reEmit(n,["Group.profile","Group.myMembership"]),t.store.storeGroup(n),n}registerStateListeners(e){const t=this.client;t.reEmitter.reEmit(e.currentState,["RoomState.events","RoomState.members","RoomState.newMember"]),e.currentState.on("RoomState.newMember",(function(e,n,r){r.user=t.getUser(r.userId),t.reEmitter.reEmit(r,["RoomMember.name","RoomMember.typing","RoomMember.powerLevel","RoomMember.membership"])}))}deregisterStateListeners(e){e.currentState.removeAllListeners("RoomState.events"),e.currentState.removeAllListeners("RoomState.members"),e.currentState.removeAllListeners("RoomState.newMember")}syncLeftRooms(){const e=this.client,t=new l.a(this.client.credentials.userId);t.setTimelineLimit(1),t.setIncludeLeaveRooms(!0);const n=this.opts.pollTimeout+8e4,r={timeout:0};return e.getOrCreateFilter(_(e.credentials.userId,"LEFT_ROOMS"),t).then((function(t){return r.filter=t,e.http.authedRequest(void 0,"GET","/sync",r,void 0,n)})).then(t=>{let n=[];t.rooms&&t.rooms.leave&&(n=this.mapSyncResponseToRoomArray(t.rooms.leave));const r=[];return n.forEach(t=>{const n=t.room;if(r.push(n),!t.isBrandNewRoom)return;t.timeline=t.timeline||{};const o=this.mapSyncEventsFormat(t.timeline,n),i=this.mapSyncEventsFormat(t.state,n);n.getLiveTimeline().setPaginationToken(t.timeline.prev_batch,u.b.BACKWARDS),this.processRoomEvents(n,i,o),n.recalculate(),e.store.storeRoom(n),e.emit("Room",n),this.processEventsForNotifs(n,o)}),r})}peek(e){if(this._peekRoom&&this._peekRoom.roomId===e)return Promise.resolve(this._peekRoom);const t=this.client;return this._peekRoom=this.createRoom(e),this.client.roomInitialSync(e,20).then(e=>{e.messages=e.messages||{chunk:[]},e.messages.chunk=e.messages.chunk||[],e.state=e.state||[];const n=c.j(e.state).map(t.getEventMapper()),r=e.state.map(t.getEventMapper()),o=e.messages.chunk.map(t.getEventMapper());return e.presence&&Array.isArray(e.presence)&&e.presence.map(t.getEventMapper()).forEach((function(e){let n=t.store.getUser(e.getContent().user_id);n?n.setPresenceEvent(e):(n=y(t,e.getContent().user_id),n.setPresenceEvent(e),t.store.storeUser(n)),t.emit("event",e)})),e.messages.start&&(this._peekRoom.oldState.paginationToken=e.messages.start),this._peekRoom.oldState.setStateEvents(n),this._peekRoom.currentState.setStateEvents(r),this.resolveInvites(this._peekRoom),this._peekRoom.recalculate(),this._peekRoom.addEventsToTimeline(o.reverse(),!0,this._peekRoom.getLiveTimeline(),e.messages.start),t.store.storeRoom(this._peekRoom),t.emit("Room",this._peekRoom),this.peekPoll(this._peekRoom),this._peekRoom})}stopPeeking(){this._peekRoom=null}peekPoll(e,t){this._peekRoom===e?this.client.http.authedRequest(void 0,"GET","/events",{room_id:e.roomId,timeout:3e4,from:t},void 0,5e4).then(t=>{if(this._peekRoom!==e)return void b("Stopped peeking in room %s",e.roomId);t.chunk.filter((function(e){return"m.presence"===e.type})).map(this.client.getEventMapper()).forEach(e=>{let t=this.client.store.getUser(e.getContent().user_id);t?t.setPresenceEvent(e):(t=y(this.client,e.getContent().user_id),t.setPresenceEvent(e),this.client.store.storeUser(t)),this.client.emit("event",e)});const n=t.chunk.filter((function(t){return t.room_id===e.roomId&&t.event_id})).map(this.client.getEventMapper());e.addLiveEvents(n),this.peekPoll(e,t.end)},n=>{h.a.error("[%s] Peek poll failed: %s",e.roomId,n),setTimeout(()=>{this.peekPoll(e,t)},3e4)}):b("Stopped peeking in room %s",e.roomId)}getSyncState(){return this.syncState}getSyncStateData(){return this.syncStateData}async recoverFromSyncStartupError(e,t){await e;const n=this.startKeepAlives();this.updateSyncState(g.a.Error,{error:t}),await n}async wasLazyLoadingToggled(e=!1){let t=!1;if(!await this.client.store.isNewlyCreated()){const n=await this.client.store.getClientOptions();return n&&(t=!!n.lazyLoadMembers),t!==e}return!1}shouldAbortSync(e){return"M_UNKNOWN_TOKEN"===e.errcode&&(h.a.warn("Token no longer valid - assuming logout"),this.stop(),!0)}sync(){const t=this.client;this.running=!0,e.window&&e.window.addEventListener&&e.window.addEventListener("online",this.onOnline,!1);let n=Promise.resolve(),r=null;const o=async()=>{try{b("Getting push rules...");const e=await t.getPushRules();b("Got push rules"),t.pushRules=e}catch(e){if(h.a.error("Getting push rules failed",e),this.shouldAbortSync(e))return;return b("Waiting for saved sync before retrying push rules..."),await this.recoverFromSyncStartupError(n,e),void o()}a()},i=()=>{const e=new l.a(t.credentials.userId);return e.setTimelineLimit(this.opts.initialSyncLimit),e},a=async()=>{if(b("Checking lazy load status..."),this.opts.lazyLoadMembers&&t.isGuest()&&(this.opts.lazyLoadMembers=!1),this.opts.lazyLoadMembers){b("Checking server lazy load support...");await t.doesServerSupportLazyLoading()?(b("Enabling lazy load on sync filter..."),this.opts.filter||(this.opts.filter=i()),this.opts.filter.setLazyLoadMembers(!0)):(b("LL: lazy loading requested but not supported by server, so disabling"),this.opts.lazyLoadMembers=!1)}b("Checking whether lazy loading has changed in store...");if(await this.wasLazyLoadingToggled(this.opts.lazyLoadMembers)){this.storeIsInvalid=!0;const e=p.b.TOGGLED_LAZY_LOADING,t=new p.b(e,!!this.opts.lazyLoadMembers);return this.updateSyncState(g.a.Error,{error:t}),void h.a.warn("InvalidStoreError: store is not usable: stopping sync.")}this.opts.lazyLoadMembers&&this.opts.crypto&&this.opts.crypto.enableLazyLoading();try{b("Storing client options..."),await this.client.storeClientOptions(),b("Stored client options")}catch(e){throw h.a.error("Storing client options failed",e),e}s()},s=async()=>{let e,o;b("Getting filter..."),e=this.opts.filter?this.opts.filter:i();try{o=await t.getOrCreateFilter(_(t.credentials.userId),e)}catch(e){if(h.a.error("Getting filter failed",e),this.shouldAbortSync(e))return;return b("Waiting for saved sync before retrying filter..."),await this.recoverFromSyncStartupError(n,e),void s()}t.resetNotifTimelineSet(),null===this.currentSyncRequest&&(b("Sending first sync request..."),this.currentSyncRequest=this.doSyncRequest({filterId:o},r)),b("Waiting for saved sync before starting sync processing..."),await n,this.doSync({filterId:o})};t.isGuest()?this.doSync({}):(b("Getting saved sync token..."),n=t.store.getSavedSyncToken().then(e=>(b("Got saved sync token"),r=e,b("Getting saved sync..."),t.store.getSavedSync())).then(e=>{if(b("Got reply from saved sync, exists? "+!!e),e)return this.syncFromCache(e)}).catch(e=>{h.a.error("Getting saved sync failed",e)}),o())}stop(){b("SyncApi.stop"),e.window&&e.window.removeEventListener("online",this.onOnline,!1),this.running=!1,this.currentSyncRequest&&this.currentSyncRequest.abort(),this.keepAliveTimer&&(clearTimeout(this.keepAliveTimer),this.keepAliveTimer=null)}retryImmediately(){return!!this.connectionReturnedDefer&&(this.startKeepAlives(0),!0)}async syncFromCache(e){b("sync(): not doing HTTP hit, instead returning stored /sync data");const t=e.nextBatch;this.client.store.setSyncToken(t);const n={oldSyncToken:null,nextSyncToken:t,catchingUp:!1,fromCache:!0},r={next_batch:t,rooms:e.roomsData,groups:e.groupsData,account_data:{events:e.accountData}};try{await this.processSyncResponse(n,r)}catch(e){h.a.error("Error processing cached sync",e.stack||e)}this.storeIsInvalid||this.updateSyncState(g.a.Prepared,n)}async doSync(e){const t=this.client;if(!this.running)return b("Sync no longer running: exiting."),this.connectionReturnedDefer&&(this.connectionReturnedDefer.reject(),this.connectionReturnedDefer=null),void this.updateSyncState(g.a.Stopped);const n=t.store.getSyncToken();let r;try{null===this.currentSyncRequest&&(this.currentSyncRequest=this.doSyncRequest(e,n)),r=await this.currentSyncRequest}catch(t){return void this.onSyncError(t,e)}finally{this.currentSyncRequest=null}t.store.setSyncToken(r.next_batch),this.failedSyncCount=0,await t.store.setSyncData(r);const o={oldSyncToken:n,nextSyncToken:r.next_batch,catchingUp:this.catchingUp};this.opts.crypto&&await this.opts.crypto.onSyncWillProcess(o);try{await this.processSyncResponse(o,r)}catch(e){h.a.error("Caught /sync error",e.stack||e),this.client.emit("sync.unexpectedError",e)}o.catchingUp=this.catchingUp,e.hasSyncedBefore||(this.updateSyncState(g.a.Prepared,o),e.hasSyncedBefore=!0),this.opts.crypto&&await this.opts.crypto.onSyncCompleted(o),this.updateSyncState(g.a.Syncing,o),t.store.wantsSave()&&(this.opts.crypto&&await this.opts.crypto.saveDeviceList(0),t.store.save()),this.doSync(e)}doSyncRequest(e,t){const n=this.getSyncParams(e,t);return this.client.http.authedRequest(void 0,"GET","/sync",n,void 0,n.timeout+8e4)}getSyncParams(e,t){let n=this.opts.pollTimeout;("SYNCING"!==this.getSyncState()||this.catchingUp)&&(this.catchingUp=!0,n=0);let r=e.filterId;this.client.isGuest()&&!r&&(r=this.getGuestFilter());const o={filter:r,timeout:n};return this.opts.disablePresence&&(o.set_presence="offline"),t?o.since=t:o._cacheBuster=Date.now(),"ERROR"!=this.getSyncState()&&"RECONNECTING"!=this.getSyncState()||(o.timeout=0),o}onSyncError(e,t){if(!this.running)return b("Sync no longer running: exiting"),this.connectionReturnedDefer&&(this.connectionReturnedDefer.reject(),this.connectionReturnedDefer=null),void this.updateSyncState(g.a.Stopped);h.a.error("/sync error %s",e),h.a.error(e),this.shouldAbortSync(e)||(this.failedSyncCount++,h.a.log("Number of consecutive failed sync requests:",this.failedSyncCount),b("Starting keep-alive"),this.startKeepAlives().then(e=>{e&&this.getSyncState()===g.a.Error&&this.updateSyncState(g.a.Catchup,{oldSyncToken:null,nextSyncToken:null,catchingUp:!0}),this.doSync(t)}),this.currentSyncRequest=null,this.updateSyncState(this.failedSyncCount>=3?g.a.Error:g.a.Reconnecting,{error:e}))}async processSyncResponse(e,t){const n=this.client;if(t.presence&&Array.isArray(t.presence.events)&&t.presence.events.map(n.getEventMapper()).forEach((function(e){let t=n.store.getUser(e.getSender());t?t.setPresenceEvent(e):(t=y(n,e.getSender()),t.setPresenceEvent(e),n.store.storeUser(t)),n.emit("event",e)})),t.account_data&&Array.isArray(t.account_data.events)){const e=t.account_data.events.map(n.getEventMapper()),r=e.reduce((e,t)=>(e[t.getId()]=n.store.getAccountData(t.getType()),e),{});n.store.storeAccountDataEvents(e),e.forEach((function(e){if("m.push_rules"===e.getType()){const t=e.getContent();n.pushRules=d.a.rewriteDefaultRules(t)}const t=r[e.getId()];return n.emit("accountData",e,t),e}))}if(t.to_device&&Array.isArray(t.to_device.events)&&t.to_device.events.length>0){const e=[];t.to_device.events.map(n.getEventMapper()).map(t=>{if("m.key.verification.cancel"===t.getType()){const n=t.getContent().transaction_id;n&&e.push(n)}return t}).forEach((function(t){const r=t.getContent();if("m.room.message"!=t.getType()||"m.bad.encrypted"!=r.msgtype){if("m.key.verification.start"===t.getType()||"m.key.verification.request"===t.getType()){const n=r.transaction_id;e.includes(n)&&t.flagCancelled()}n.emit("toDeviceEvent",t)}else h.a.log("Ignoring undecryptable to-device event from "+t.getSender())}))}else this.catchingUp=!1;t.groups&&(t.groups.invite&&this.processGroupSyncEntry(t.groups.invite,f.a.Invite),t.groups.join&&this.processGroupSyncEntry(t.groups.join,f.a.Join),t.groups.leave&&this.processGroupSyncEntry(t.groups.leave,f.a.Leave));let r=[],o=[],i=[];if(t.rooms&&(t.rooms.invite&&(r=this.mapSyncResponseToRoomArray(t.rooms.invite)),t.rooms.join&&(o=this.mapSyncResponseToRoomArray(t.rooms.join)),t.rooms.leave&&(i=this.mapSyncResponseToRoomArray(t.rooms.leave))),this.notifEvents=[],r.forEach(e=>{const t=e.room,r=this.mapSyncEventsFormat(e.invite_state,t);this.processRoomEvents(t,r),e.isBrandNewRoom&&(t.recalculate(),n.store.storeRoom(t),n.emit("Room",t)),r.forEach((function(e){n.emit("event",e)})),t.updateMyMembership("invite")}),await c.B(o,async t=>{const r=t.room,o=this.mapSyncEventsFormat(t.state,r),i=this.mapSyncEventsFormat(t.timeline,r,!1),s=this.mapSyncEventsFormat(t.ephemeral),l=this.mapSyncEventsFormat(t.account_data),d=n.isRoomEncrypted(r.roomId);if(t.unread_notifications&&(r.setUnreadNotificationCount(a.a.Total,t.unread_notifications.notification_count),(!d||d&&r.getUnreadNotificationCount(a.a.Highlight)<=0)&&r.setUnreadNotificationCount(a.a.Highlight,t.unread_notifications.highlight_count)),t.timeline=t.timeline||{},t.isBrandNewRoom)r.getLiveTimeline().setPaginationToken(t.timeline.prev_batch,u.b.BACKWARDS);else if(t.timeline.limited){let o=!0;for(let e=i.length-1;e>=0;e--){const t=i[e].getId();if(r.getTimelineForEvent(t)){b("Already have event "+t+" in limited sync - not resetting"),o=!1,i.splice(0,e);break}}o&&(this.deregisterStateListeners(r),r.resetLiveTimeline(t.timeline.prev_batch,this.opts.canResetEntireTimeline(r.roomId)?null:e.oldSyncToken),n.resetNotifTimelineSet(),this.registerStateListeners(r))}this.processRoomEvents(r,o,i,e.fromCache),t.summary&&r.setSummary(t.summary),r.addEphemeralEvents(s),r.addAccountData(l),r.recalculate(),t.isBrandNewRoom&&(n.store.storeRoom(r),n.emit("Room",r)),this.processEventsForNotifs(r,i);const h=async e=>{if(n.emit("event",e),e.isState()&&"m.room.encryption"==e.getType()&&this.opts.crypto&&await this.opts.crypto.onCryptoEvent(e),e.isState()&&"im.vector.user_status"===e.getType()){let t=n.store.getUser(e.getStateKey());t?t.unstable_updateStatusMessage(e):(t=y(n,e.getStateKey()),t.unstable_updateStatusMessage(e),n.store.storeUser(t))}};await c.B(o,h),await c.B(i,h),s.forEach((function(e){n.emit("event",e)})),l.forEach((function(e){n.emit("event",e)})),r.updateMyMembership("join"),r.decryptCriticalEvents()}),i.forEach(e=>{const t=e.room,r=this.mapSyncEventsFormat(e.state,t),o=this.mapSyncEventsFormat(e.timeline,t),i=this.mapSyncEventsFormat(e.account_data);this.processRoomEvents(t,r,o),t.addAccountData(i),t.recalculate(),e.isBrandNewRoom&&(n.store.storeRoom(t),n.emit("Room",t)),this.processEventsForNotifs(t,o),r.forEach((function(e){n.emit("event",e)})),o.forEach((function(e){n.emit("event",e)})),i.forEach((function(e){n.emit("event",e)})),t.updateMyMembership("leave")}),e.oldSyncToken&&this.notifEvents.length&&(this.notifEvents.sort((function(e,t){return e.getTs()-t.getTs()})),this.notifEvents.forEach((function(e){n.getNotifTimelineSet().addLiveEvent(e)}))),t.device_lists&&this.opts.crypto&&await this.opts.crypto.handleDeviceListChanges(e,t.device_lists),this.opts.crypto&&t.device_one_time_keys_count){const e=t.device_one_time_keys_count.signed_curve25519||0;this.opts.crypto.updateOneTimeKeyCount(e)}if(this.opts.crypto&&t["org.matrix.msc2732.device_unused_fallback_key_types"]){const e=t["org.matrix.msc2732.device_unused_fallback_key_types"];this.opts.crypto.setNeedsNewFallback(e instanceof Array&&!e.includes("signed_curve25519"))}}startKeepAlives(e){return void 0===e&&(e=2e3+Math.floor(5e3*Math.random())),null!==this.keepAliveTimer&&clearTimeout(this.keepAliveTimer),e>0?this.keepAliveTimer=setTimeout(this.pokeKeepAlive.bind(this),e):this.pokeKeepAlive(),this.connectionReturnedDefer||(this.connectionReturnedDefer=c.l()),this.connectionReturnedDefer.promise}pokeKeepAlive(e=!1){const t=()=>{clearTimeout(this.keepAliveTimer),this.connectionReturnedDefer&&(this.connectionReturnedDefer.resolve(e),this.connectionReturnedDefer=null)};this.client.http.request(void 0,"GET","/_matrix/client/versions",void 0,void 0,{prefix:"",localTimeoutMs:15e3}).then(()=>{t()},n=>{400==n.httpStatus||404==n.httpStatus?this.keepAliveTimer=setTimeout(t,2e3):(e=!0,this.keepAliveTimer=setTimeout(this.pokeKeepAlive.bind(this,e),5e3+Math.floor(5e3*Math.random())),this.updateSyncState(g.a.Error,{error:n}))})}processGroupSyncEntry(e,t){for(const n of Object.keys(e)){const r=e[n];let o=this.client.store.getGroup(n);const i=null===o;null===o&&(o=this.createGroup(n)),r.profile&&o.setProfile(r.profile.name,r.profile.avatar_url),r.inviter&&o.setInviter({userId:r.inviter}),o.setMyMembership(t),i&&this.client.emit("Group",o)}}mapSyncResponseToRoomArray(e){const t=this.client;return Object.keys(e).map(n=>{const r=e[n];let o=t.store.getRoom(n),i=!1;return o||(o=this.createRoom(n),i=!0),r.room=o,r.isBrandNewRoom=i,r})}mapSyncEventsFormat(e,t,n=!0){if(!e||!Array.isArray(e.events))return[];const r=this.client.getEventMapper({decrypt:n});return e.events.map((function(e){return t&&(e.room_id=t.roomId),r(e)}))}resolveInvites(e){if(!e||!this.opts.resolveInvitesToProfiles)return;const t=this.client;e.getMembersWithMembership("invite").forEach((function(n){if(n._requestedProfileInfo)return;n._requestedProfileInfo=!0;const r=t.getUser(n.userId);let o;o=r?Promise.resolve({avatar_url:r.avatarUrl,displayname:r.displayName}):t.getProfileInfo(n.userId),o.then((function(t){const r=n.events.member;"invite"===r.getContent().membership&&(r.getContent().avatar_url=t.avatar_url,r.getContent().displayname=t.displayname,n.setMembershipEvent(r,e.currentState))}),(function(e){}))}))}processRoomEvents(e,t,n,r=!1){const o=e.getLiveTimeline(),i=0==o.getEvents().length;if(i){for(const e of t)this.client.getPushActionsForEvent(e);o.initialiseState(t)}this.resolveInvites(e),e.recalculate(),i||(e.oldState.setStateEvents(t||[]),e.currentState.setStateEvents(t||[])),e.addLiveEvents(n||[],null,r)}processEventsForNotifs(e,t){if(this.client.getNotifTimelineSet())for(let e=0;e<t.length;e++){const n=this.client.getPushActionsForEvent(t[e]);n&&n.notify&&n.tweaks&&n.tweaks.highlight&&this.notifEvents.push(t[e])}}getGuestFilter(){return"{}"}updateSyncState(e,t){const n=this.syncState;this.syncState=e,this.syncStateData=t,this.client.emit("sync",this.syncState,n,t)}}function y(e,t){const n=new i.a(t);return e.reEmitter.reEmit(n,["User.avatarUrl","User.displayName","User.presence","User.currentlyActive","User.lastPresenceTs"]),n}}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79),o=n.n(r);class i{constructor(){o()(this,"accountData",{}),o()(this,"fromToken",null)}isNewlyCreated(){return Promise.resolve(!0)}getSyncToken(){return this.fromToken}setSyncToken(e){this.fromToken=e}storeGroup(e){}getGroup(e){return null}getGroups(){return[]}storeRoom(e){}getRoom(e){return null}getRooms(){return[]}removeRoom(e){}getRoomSummaries(){return[]}storeUser(e){}getUser(e){return null}getUsers(){return[]}scrollback(e,t){return[]}storeEvents(e,t,n,r){}storeFilter(e){}getFilter(e,t){return null}getFilterIdByName(e){return null}setFilterIdByName(e,t){}storeAccountDataEvents(e){}getAccountData(e){}setSyncData(e){return Promise.resolve()}wantsSave(){return!1}save(){}startup(){return Promise.resolve()}getSavedSync(){return Promise.resolve(null)}getSavedSyncToken(){return Promise.resolve(null)}deleteAllData(){return Promise.resolve()}getOutOfBandMembers(){return Promise.resolve(null)}setOutOfBandMembers(e,t){return Promise.resolve()}clearOutOfBandMembers(){return Promise.resolve()}getClientOptions(){return Promise.resolve({})}storeClientOptions(e){return Promise.resolve()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r),i=n(96),a=n(128),s=n(93);class c{constructor(e){o()(this,"client",void 0),o()(this,"calls",void 0),o()(this,"callEventBuffer",void 0),o()(this,"candidateEventsByCall",void 0),o()(this,"evaluateEventBuffer",async()=>{if("SYNCING"===this.client.getSyncState()){await Promise.all(this.callEventBuffer.map(e=>{this.client.decryptEventIfNeeded(e)}));const e=new Set;for(const t of this.callEventBuffer)t.getType()!==s.a.CallAnswer&&t.getType()!==s.a.CallHangup||e.add(t.getContent().call_id);for(const t of this.callEventBuffer)if(t.getType()!==s.a.CallInvite||!e.has(t.getContent().call_id))try{this.handleCallEvent(t)}catch(e){i.a.error("Caught exception handling call event",e)}this.callEventBuffer=[]}}),o()(this,"onRoomTimeline",e=>{this.client.decryptEventIfNeeded(e),(this.eventIsACall(e)||e.isBeingDecrypted())&&this.callEventBuffer.push(e),(e.isBeingDecrypted()||e.isDecryptionFailure())&&e.once("Event.decrypted",()=>{if(this.eventIsACall(e))if(this.callEventBuffer.includes(e))this.evaluateEventBuffer();else try{this.handleCallEvent(e)}catch(e){i.a.error("Caught exception handling call event",e)}})}),this.client=e,this.calls=new Map,this.callEventBuffer=[],this.candidateEventsByCall=new Map}start(){this.client.on("sync",this.evaluateEventBuffer),this.client.on("Room.timeline",this.onRoomTimeline)}stop(){this.client.removeListener("sync",this.evaluateEventBuffer),this.client.removeListener("Room.timeline",this.onRoomTimeline)}eventIsACall(e){const t=e.getType();return t.startsWith("m.call.")||t.startsWith("org.matrix.call.")}async handleCallEvent(e){const t=e.getContent(),n=e.getType(),r=e.getSender()===this.client.credentials.userId;let o=t.call_id?this.calls.get(t.call_id):void 0;if(n===s.a.CallInvite){if(r)return;if(e.getLocalAge()>t.lifetime-3e3)return;if(o&&o.state===a.e.Ended)return;o&&i.a.log(`WARN: Already have a MatrixCall with id ${t.call_id} but got an invite. Clobbering.`);const n=this.client.getTurnServersExpiry()-Date.now();if(i.a.info("Current turn creds expire in "+n+" ms"),o=Object(a.g)(this.client,e.getRoomId(),{forceTURN:this.client.forceTURN}),!o)return void i.a.log("Incoming call ID "+t.call_id+" but this client doesn't support WebRTC");o.callId=t.call_id;const s=o.initWithInvite(e);if(this.calls.set(o.callId,o),this.candidateEventsByCall.get(o.callId))for(const e of this.candidateEventsByCall.get(o.callId))o.onRemoteIceCandidatesReceived(e);let c;for(const e of this.calls.values()){const t=[a.e.WaitLocalMedia,a.e.CreateOffer,a.e.InviteSent].includes(e.state);if(o.roomId===e.roomId&&e.direction===a.a.Outbound&&t){c=e;break}}c?c.state===a.e.WaitLocalMedia||c.state===a.e.CreateOffer||c.callId>o.callId?(i.a.log("Glare detected: answering incoming call "+o.callId+" and canceling outgoing call "+c.callId),await s,c.replacedBy(o),o.answer()):(i.a.log("Glare detected: rejecting incoming call "+o.callId+" and keeping outgoing call "+c.callId),o.hangup(a.b.Replaced,!0)):this.client.emit("Call.incoming",o)}else if(n===s.a.CallCandidates){if(r)return;o?o.onRemoteIceCandidatesReceived(e):(this.candidateEventsByCall.has(t.call_id)||this.candidateEventsByCall.set(t.call_id,[]),this.candidateEventsByCall.get(t.call_id).push(e))}else[s.a.CallHangup,s.a.CallReject].includes(n)&&(o?o.state!==a.e.Ended&&(n===s.a.CallHangup?o.onHangupReceived(t):o.onRejectReceived(t),this.calls.delete(t.call_id)):(o=Object(a.g)(this.client,e.getRoomId()),o&&(o.callId=t.call_id,o.initWithHangup(e),this.calls.set(t.call_id,o))));if(o&&e.getContent().party_id!==o.ourPartyId)switch(n){case s.a.CallAnswer:r?o.state===a.e.Ringing&&o.onAnsweredElsewhere(t):o.onAnswerReceived(e);break;case s.a.CallSelectAnswer:o.onSelectAnswerReceived(e);break;case s.a.CallNegotiate:o.onNegotiateReceived(e);break;case s.a.CallAssertedIdentity:case s.a.CallAssertedIdentityPrefix:o.onAssertedIdentityReceived(e);break;case s.a.CallSDPStreamMetadataChanged:case s.a.CallSDPStreamMetadataChangedPrefix:o.onSDPStreamMetadataChangedReceived(e)}}}},function(e,t,n){(function(e,r){var o;!function(i){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,c=2147483647,l=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(h[e])}function f(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function _(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+f((e=e.replace(d,".")).split("."),t).join(".")}function b(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 v(e){return f(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function y(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function S(e){var t,n,r,o,i,a,s,l,u,d,h,m=[],f=e.length,_=0,b=128,y=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&g("not-basic"),m.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<f;){for(i=_,a=1,s=36;o>=f&&g("invalid-input"),((l=(h=e.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||l>p((c-_)/a))&&g("overflow"),_+=l*a,!(l<(u=s<=y?1:s>=y+26?26:s-y));s+=36)a>p(c/(d=36-u))&&g("overflow"),a*=d;y=E(_-i,t=m.length+1,0==i),p(_/t)>c-b&&g("overflow"),b+=p(_/t),_%=t,m.splice(_++,0,b)}return v(m)}function w(e){var t,n,r,o,i,a,s,l,u,d,h,f,_,v,S,w=[];for(f=(e=b(e)).length,t=128,n=0,i=72,a=0;a<f;++a)(h=e[a])<128&&w.push(m(h));for(r=o=w.length,o&&w.push("-");r<f;){for(s=c,a=0;a<f;++a)(h=e[a])>=t&&h<s&&(s=h);for(s-t>p((c-n)/(_=r+1))&&g("overflow"),n+=(s-t)*_,t=s,a=0;a<f;++a)if((h=e[a])<t&&++n>c&&g("overflow"),h==t){for(l=n,u=36;!(l<(d=u<=i?1:u>=i+26?26:u-i));u+=36)S=l-d,v=36-d,w.push(m(y(d+S%v,0))),l=p(S/v);w.push(m(y(l,0))),i=E(n,_,r==o),n=0,++r}++n,++t}return w.join("")}s={version:"1.4.1",ucs2:{decode:b,encode:v},decode:S,encode:w,toASCII:function(e){return _(e,(function(e){return u.test(e)?"xn--"+w(e):e}))},toUnicode:function(e){return _(e,(function(e){return l.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return s}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(512)(e),n(23))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(922),t.encode=t.stringify=n(923)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var u=0;u<l;++u){var d,h,p,m,g=e[u].replace(s,"%20"),f=g.indexOf(n);f>=0?(d=g.substr(0,f),h=g.substr(f+1)):(d=g,h=""),p=decodeURIComponent(d),m=decodeURIComponent(h),r(a,p)?o(a[p])?a[p].push(m):a[p]=[a[p],m]:a[p]=m}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return o(e[a])?i(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),o=n.n(r),i=n(153);class a{constructor(e){this.cryptoStore=e,o()(this,"roomEncryption",{})}async init(){await this.cryptoStore.doTxn("readwrite",[i.a.STORE_ROOMS],e=>{this.cryptoStore.getEndToEndRooms(e,e=>{this.roomEncryption=e})})}getRoomEncryption(e){return this.roomEncryption[e]||null}isRoomEncrypted(e){return Boolean(this.getRoomEncryption(e))}async setRoomEncryption(e,t){this.roomEncryption[e]=t,await this.cryptoStore.doTxn("readwrite",[i.a.STORE_ROOMS],n=>{this.cryptoStore.storeEndToEndRoom(e,t,n)})}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(79),o=n.n(r),i=n(96),a=n(2);const s=10;class c{constructor(e){this.db=e,o()(this,"nextTxnId",0),e.onversionchange=()=>{i.a.log(`versionchange for indexeddb ${this.db.name}: closing`),e.close()}}async startup(){return this}async deleteAllData(){throw Error("This is not implemented, call IDBFactory::deleteDatabase(dbName) instead.")}getOrAddOutgoingRoomKeyRequest(e){const t=e.requestBody;return new Promise((n,r)=>{const o=this.db.transaction("outgoingRoomKeyRequests","readwrite");o.onerror=r,this._getOutgoingRoomKeyRequest(o,t,r=>{if(r)return i.a.log(`already have key request outstanding for ${t.room_id} / ${t.session_id}: not sending another`),void n(r);i.a.log(`enqueueing key request for ${t.room_id} / `+t.session_id),o.oncomplete=()=>{n(e)};o.objectStore("outgoingRoomKeyRequests").add(e)})})}getOutgoingRoomKeyRequest(e){return new Promise((t,n)=>{const r=this.db.transaction("outgoingRoomKeyRequests","readonly");r.onerror=n,this._getOutgoingRoomKeyRequest(r,e,e=>{t(e)})})}_getOutgoingRoomKeyRequest(e,t,n){const r=e.objectStore("outgoingRoomKeyRequests").index("session").openCursor([t.room_id,t.session_id]);r.onsuccess=()=>{const e=r.result;if(!e)return void n(null);const o=e.value;a.i(o.requestBody,t)?n(o):e.continue()}}getOutgoingRoomKeyRequestByState(e){if(0===e.length)return Promise.resolve(null);let t,n=0;const r=this.db.transaction("outgoingRoomKeyRequests","readonly"),o=r.objectStore("outgoingRoomKeyRequests"),i=e[n];return o.index("state").openCursor(i).onsuccess=function r(o){const i=o.target.result;if(i)return void(t=i.value);if(n++,n>=e.length)return;const a=e[n];o.target.source.openCursor(a).onsuccess=r},d(r).then(()=>t)}getAllOutgoingRoomKeyRequestsByState(e){return new Promise((t,n)=>{const r=this.db.transaction("outgoingRoomKeyRequests","readonly").objectStore("outgoingRoomKeyRequests").index("state").getAll(e);r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error)})}getOutgoingRoomKeyRequestsByTarget(e,t,n){let r=0;const o=[];const i=this.db.transaction("outgoingRoomKeyRequests","readonly"),a=i.objectStore("outgoingRoomKeyRequests"),s=n[r];return a.index("state").openCursor(s).onsuccess=function i(a){const s=a.target.result;if(s){const n=s.value;n.recipients.includes({userId:e,deviceId:t})&&o.push(n),s.continue()}else{if(r++,r>=n.length)return;const e=n[r];a.target.source.openCursor(e).onsuccess=i}},d(i).then(()=>o)}updateOutgoingRoomKeyRequest(e,t,n){let r=null;const o=this.db.transaction("outgoingRoomKeyRequests","readwrite");return o.objectStore("outgoingRoomKeyRequests").openCursor(e).onsuccess=function(e){const o=e.target.result;if(!o)return;const a=o.value;a.state==t?(Object.assign(a,n),o.update(a),r=a):i.a.warn(`Cannot update room key request from ${t} as it was already updated to `+a.state)},d(o).then(()=>r)}deleteOutgoingRoomKeyRequest(e,t){const n=this.db.transaction("outgoingRoomKeyRequests","readwrite"),r=n.objectStore("outgoingRoomKeyRequests").openCursor(e);return r.onsuccess=()=>{const e=r.result;if(!e)return;const n=e.value;n.state==t?e.delete():i.a.warn(`Cannot delete room key request in state ${n.state} (expected ${t})`)},d(n)}getAccount(e,t){const n=e.objectStore("account").get("-");n.onsuccess=function(){try{t(n.result||null)}catch(t){u(e,t)}}}storeAccount(e,t){e.objectStore("account").put(t,"-")}getCrossSigningKeys(e,t){const n=e.objectStore("account").get("crossSigningKeys");n.onsuccess=function(){try{t(n.result||null)}catch(t){u(e,t)}}}getSecretStorePrivateKey(e,t,n){const r=e.objectStore("account").get("ssss_cache:"+n);r.onsuccess=function(){try{t(r.result||null)}catch(t){u(e,t)}}}storeCrossSigningKeys(e,t){e.objectStore("account").put(t,"crossSigningKeys")}storeSecretStorePrivateKey(e,t,n){e.objectStore("account").put(n,"ssss_cache:"+t)}countEndToEndSessions(e,t){const n=e.objectStore("sessions").count();n.onsuccess=function(){try{t(n.result)}catch(t){u(e,t)}}}getEndToEndSessions(e,t,n){const r=t.objectStore("sessions").index("deviceKey").openCursor(e),o={};r.onsuccess=function(){const e=r.result;if(e)o[e.value.sessionId]={session:e.value.session,lastReceivedMessageTs:e.value.lastReceivedMessageTs},e.continue();else try{n(o)}catch(e){u(t,e)}}}getEndToEndSession(e,t,n,r){const o=n.objectStore("sessions").get([e,t]);o.onsuccess=function(){try{o.result?r({session:o.result.session,lastReceivedMessageTs:o.result.lastReceivedMessageTs}):r(null)}catch(e){u(n,e)}}}getAllEndToEndSessions(e,t){const n=e.objectStore("sessions").openCursor();n.onsuccess=function(){try{const e=n.result;e?(t(e.value),e.continue()):t(null)}catch(t){u(e,t)}}}storeEndToEndSession(e,t,n,r){r.objectStore("sessions").put({deviceKey:e,sessionId:t,session:n.session,lastReceivedMessageTs:n.lastReceivedMessageTs})}async storeEndToEndSessionProblem(e,t,n){const r=this.db.transaction("session_problems","readwrite");return r.objectStore("session_problems").put({deviceKey:e,type:t,fixed:n,time:Date.now()}),d(r)}async getEndToEndSessionProblem(e,t){let n;const r=this.db.transaction("session_problems","readwrite"),o=r.objectStore("session_problems").index("deviceKey").getAll(e);return o.onsuccess=()=>{const e=o.result;if(!e.length)return void(n=null);e.sort((e,t)=>e.time-t.time);const r=e[e.length-1];for(const o of e)if(o.time>t)return void(n=Object.assign({},o,{fixed:r.fixed}));n=r.fixed?null:r},await d(r),n}async filterOutNotifiedErrorDevices(e){const t=this.db.transaction("notified_error_devices","readwrite").objectStore("notified_error_devices"),n=[];return await Promise.all(e.map(e=>new Promise(r=>{const{userId:o,deviceInfo:i}=e,a=t.get([o,i.deviceId]);a.onsuccess=function(){a.result||(t.put({userId:o,deviceId:i.deviceId}),n.push(e)),r()}}))),n}getEndToEndInboundGroupSession(e,t,n,r){let o=!1,i=!1;const a=n.objectStore("inbound_group_sessions").get([e,t]);a.onsuccess=function(){try{o=a.result?a.result.session:null,!1!==i&&r(o,i)}catch(e){u(n,e)}};const s=n.objectStore("inbound_group_sessions_withheld").get([e,t]);s.onsuccess=function(){try{i=s.result?s.result.session:null,!1!==o&&r(o,i)}catch(e){u(n,e)}}}getAllEndToEndInboundGroupSessions(e,t){const n=e.objectStore("inbound_group_sessions").openCursor();n.onsuccess=function(){const r=n.result;if(r){try{t({senderKey:r.value.senderCurve25519Key,sessionId:r.value.sessionId,sessionData:r.value.session})}catch(t){u(e,t)}r.continue()}else try{t(null)}catch(t){u(e,t)}}}addEndToEndInboundGroupSession(e,t,n,r){const o=r.objectStore("inbound_group_sessions").add({senderCurve25519Key:e,sessionId:t,session:n});o.onerror=n=>{"ConstraintError"===o.error.name?(n.stopPropagation(),n.preventDefault(),i.a.log("Ignoring duplicate inbound group session: "+e+" / "+t)):u(r,new Error("Failed to add inbound group session: "+o.error))}}storeEndToEndInboundGroupSession(e,t,n,r){r.objectStore("inbound_group_sessions").put({senderCurve25519Key:e,sessionId:t,session:n})}storeEndToEndInboundGroupSessionWithheld(e,t,n,r){r.objectStore("inbound_group_sessions_withheld").put({senderCurve25519Key:e,sessionId:t,session:n})}getEndToEndDeviceData(e,t){const n=e.objectStore("device_data").get("-");n.onsuccess=function(){try{t(n.result||null)}catch(t){u(e,t)}}}storeEndToEndDeviceData(e,t){t.objectStore("device_data").put(e,"-")}storeEndToEndRoom(e,t,n){n.objectStore("rooms").put(t,e)}getEndToEndRooms(e,t){const n={},r=e.objectStore("rooms").openCursor();r.onsuccess=function(){const o=r.result;if(o)n[o.key]=o.value,o.continue();else try{t(n)}catch(t){u(e,t)}}}getSessionsNeedingBackup(e){return new Promise((t,n)=>{const r=[],o=this.db.transaction(["sessions_needing_backup","inbound_group_sessions"],"readonly");o.onerror=n,o.oncomplete=function(){t(r)};const i=o.objectStore("sessions_needing_backup"),a=o.objectStore("inbound_group_sessions"),s=i.openCursor();s.onsuccess=function(){const t=s.result;if(t){const n=a.get(t.key);n.onsuccess=function(){r.push({senderKey:n.result.senderCurve25519Key,sessionId:n.result.sessionId,sessionData:n.result.session})},(!e||r.length<e)&&t.continue()}}})}countSessionsNeedingBackup(e){e||(e=this.db.transaction("sessions_needing_backup","readonly"));const t=e.objectStore("sessions_needing_backup");return new Promise((e,n)=>{const r=t.count();r.onerror=n,r.onsuccess=()=>e(r.result)})}async unmarkSessionsNeedingBackup(e,t){t||(t=this.db.transaction("sessions_needing_backup","readwrite"));const n=t.objectStore("sessions_needing_backup");await Promise.all(e.map(e=>new Promise((t,r)=>{const o=n.delete([e.senderKey,e.sessionId]);o.onsuccess=t,o.onerror=r})))}async markSessionsNeedingBackup(e,t){t||(t=this.db.transaction("sessions_needing_backup","readwrite"));const n=t.objectStore("sessions_needing_backup");await Promise.all(e.map(e=>new Promise((t,r)=>{const o=n.put({senderCurve25519Key:e.senderKey,sessionId:e.sessionId});o.onsuccess=t,o.onerror=r})))}addSharedHistoryInboundGroupSession(e,t,n,r){r||(r=this.db.transaction("shared_history_inbound_group_sessions","readwrite"));const o=r.objectStore("shared_history_inbound_group_sessions"),i=o.get([e]);i.onsuccess=()=>{const{sessions:r}=i.result||{sessions:[]};r.push([t,n]),o.put({roomId:e,sessions:r})}}getSharedHistoryInboundGroupSessions(e,t){t||(t=this.db.transaction("shared_history_inbound_group_sessions","readonly"));const n=t.objectStore("shared_history_inbound_group_sessions").get([e]);return new Promise((e,t)=>{n.onsuccess=()=>{const{sessions:t}=n.result||{sessions:[]};e(t)},n.onerror=t})}doTxn(e,t,n,r=i.a){const o=this.db.transaction(t,e),a=d(o),s=n(o);return a.then(()=>s)}}function l(e,t){if(i.a.log("Upgrading IndexedDBCryptoStore from version "+t+" to "+s),t<1&&function(e){const t=e.createObjectStore("outgoingRoomKeyRequests",{keyPath:"requestId"});t.createIndex("session",["requestBody.room_id","requestBody.session_id"]),t.createIndex("state","state")}(e),t<2&&e.createObjectStore("account"),t<3){e.createObjectStore("sessions",{keyPath:["deviceKey","sessionId"]}).createIndex("deviceKey","deviceKey")}if(t<4&&e.createObjectStore("inbound_group_sessions",{keyPath:["senderCurve25519Key","sessionId"]}),t<5&&e.createObjectStore("device_data"),t<6&&e.createObjectStore("rooms"),t<7&&e.createObjectStore("sessions_needing_backup",{keyPath:["senderCurve25519Key","sessionId"]}),t<8&&e.createObjectStore("inbound_group_sessions_withheld",{keyPath:["senderCurve25519Key","sessionId"]}),t<9){e.createObjectStore("session_problems",{keyPath:["deviceKey","time"]}).createIndex("deviceKey","deviceKey"),e.createObjectStore("notified_error_devices",{keyPath:["userId","deviceId"]})}t<10&&e.createObjectStore("shared_history_inbound_group_sessions",{keyPath:["roomId"]})}function u(e,t){e._mx_abortexception=t;try{e.abort()}catch(t){}}function d(e){return new Promise((t,n)=>{e.oncomplete=()=>{void 0!==e._mx_abortexception&&n(e._mx_abortexception),t(null)},e.onerror=t=>{void 0!==e._mx_abortexception?n(e._mx_abortexception):(i.a.log("Error performing indexeddb txn",t),n(e.error))},e.onabort=t=>{void 0!==e._mx_abortexception?n(e._mx_abortexception):(i.a.log("Error performing indexeddb txn",t),n(e.error))}})}},function(e,t,n){"use strict";var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,o=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,a=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,c=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function l(e){var t=String(e);if(i.test(t))return t;if(t.length>0&&!o.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(s,"\\$1")+'"'}function u(e){this.parameters=Object.create(null),this.type=e}t.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,n=e.type;if(!n||!c.test(n))throw new TypeError("invalid type");var r=n;if(t&&"object"==typeof t)for(var o,a=Object.keys(t).sort(),s=0;s<a.length;s++){if(o=a[s],!i.test(o))throw new TypeError("invalid parameter name");r+="; "+o+"="+l(t[o])}return r},t.parse=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),o=-1!==n?t.substr(0,n).trim():t.trim();if(!c.test(o))throw new TypeError("invalid media type");var i=new u(o.toLowerCase());if(-1!==n){var s,l,d;for(r.lastIndex=n;l=r.exec(t);){if(l.index!==n)throw new TypeError("invalid parameter format");n+=l[0].length,s=l[1].toLowerCase(),'"'===(d=l[2])[0]&&(d=d.substr(1,d.length-2).replace(a,"$1")),i.parameters[s]=d}if(n!==t.length)throw new TypeError("invalid parameter format")}return i}},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(96);let o,i=0;const a=[];let s=Date.now;function c(e,t){(t=t||0)<0&&(t=0);const n=Array.prototype.slice.call(arguments,2),r=s()+t,o=i++,c={runAt:r,func:e,params:n,key:o},l=h(a,(function(e){return e.runAt-r}));return a.splice(l,0,c),u(),o}function l(e){if(0===a.length)return;let t;for(t=0;t<a.length;t++){if(a[t].key==e){a.splice(t,1);break}}0===t&&u()}function u(){o&&e.clearTimeout(o);const t=a[0];if(!t)return;const n=s(),r=Math.min(t.runAt-n,1e3);o=e.setTimeout(d,r)}function d(){let t;const n=s(),o=[];for(;;){const e=a[0];if(!e||e.runAt>n)break;t=a.shift(),t.key,o.push(t)}u();for(let n=0;n<o.length;n++){t=o[n];try{t.func.apply(e,t.params)}catch(e){r.a.error("Uncaught exception in callback function",e.stack||e)}}}function h(e,t){let n=0,r=e.length;for(;n<r;){const o=n+r>>1;t(e[o])>0?r=o:n=o+1}return n}}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(79),o=n.n(r),i=n(3),a=n(96),s=n(297),c=n(299),l=n(135),u=n(153),d=n(2);let h;!function(e){e[e.NotTracked=0]="NotTracked",e[e.PendingDownload=1]="PendingDownload",e[e.DownloadInProgress=2]="DownloadInProgress",e[e.UpToDate=3]="UpToDate"}(h||(h={}));class p extends i.EventEmitter{constructor(e,t,n,r=250){super(),this.cryptoStore=t,this.keyDownloadChunkSize=r,o()(this,"devices",{}),o()(this,"crossSigningInfo",{}),o()(this,"userByIdentityKey",{}),o()(this,"deviceTrackingStatus",{}),o()(this,"syncToken",null),o()(this,"keyDownloadsInProgressByUser",{}),o()(this,"dirty",!1),o()(this,"savePromise",null),o()(this,"resolveSavePromise",null),o()(this,"savePromiseTime",null),o()(this,"saveTimer",null),o()(this,"hasFetched",null),o()(this,"serialiser",void 0),this.serialiser=new m(e,n,this)}async load(){await this.cryptoStore.doTxn("readonly",[u.a.STORE_DEVICE_DATA],e=>{this.cryptoStore.getEndToEndDeviceData(e,e=>{this.hasFetched=Boolean(e&&e.devices),this.devices=e?e.devices:{},this.crossSigningInfo=e&&e.crossSigningInfo||{},this.deviceTrackingStatus=e?e.trackingStatus:{},this.syncToken=e?e.syncToken:null,this.userByIdentityKey={};for(const e of Object.keys(this.devices)){const t=this.devices[e];for(const n of Object.keys(t)){const r=t[n].keys["curve25519:"+n];void 0!==r&&(this.userByIdentityKey[r]=e)}}})});for(const e of Object.keys(this.deviceTrackingStatus))this.deviceTrackingStatus[e]==h.DownloadInProgress&&(this.deviceTrackingStatus[e]=h.PendingDownload)}stop(){null!==this.saveTimer&&clearTimeout(this.saveTimer)}async saveIfDirty(e=500){if(!this.dirty)return Promise.resolve(!1);const t=Date.now()+e;this.savePromiseTime&&t<this.savePromiseTime&&(clearTimeout(this.saveTimer),this.saveTimer=null,this.savePromiseTime=null);let n=this.savePromise;if(null===n&&(n=new Promise((e,t)=>{this.resolveSavePromise=e}),this.savePromise=n),null===this.saveTimer){const n=this.resolveSavePromise;this.savePromiseTime=t,this.saveTimer=setTimeout(()=>{a.a.log("Saving device tracking data",this.syncToken),this.savePromiseTime=null,this.saveTimer=null,this.savePromise=null,this.resolveSavePromise=null,this.cryptoStore.doTxn("readwrite",[u.a.STORE_DEVICE_DATA],e=>{this.cryptoStore.storeEndToEndDeviceData({devices:this.devices,crossSigningInfo:this.crossSigningInfo,trackingStatus:this.deviceTrackingStatus,syncToken:this.syncToken},e)}).then(()=>{this.dirty=!1,n(!0)},e=>{a.a.error("Failed to save device tracking data",this.syncToken),a.a.error(e)})},e)}return n}getSyncToken(){return this.syncToken}setSyncToken(e){this.syncToken=e}downloadKeys(e,t){const n=[],r=[];if(e.forEach(e=>{const o=this.deviceTrackingStatus[e];this.keyDownloadsInProgressByUser[e]?(a.a.log("downloadKeys: already have a download in progress for "+e+": awaiting its result"),r.push(this.keyDownloadsInProgressByUser[e])):(t||o!=h.UpToDate)&&n.push(e)}),0!=n.length){a.a.log("downloadKeys: downloading for",n);const e=this.doKeyDownload(n);r.push(e)}return 0===r.length&&a.a.log("downloadKeys: already have all necessary keys"),Promise.all(r).then(()=>this.getDevicesFromStore(e))}getDevicesFromStore(e){const t={};return e.map(e=>{t[e]={};(this.getStoredDevicesForUser(e)||[]).map((function(n){t[e][n.deviceId]=n}))}),t}getKnownUserIds(){return Object.keys(this.devices)}getStoredDevicesForUser(e){const t=this.devices[e];if(!t)return null;const n=[];for(const e in t)t.hasOwnProperty(e)&&n.push(s.a.fromStorage(t[e],e));return n}getRawStoredDevicesForUser(e){return this.devices[e]}getStoredCrossSigningForUser(e){return this.crossSigningInfo[e]?c.a.fromStorage(this.crossSigningInfo[e],e):null}storeCrossSigningForUser(e,t){this.crossSigningInfo[e]=t,this.dirty=!0}getStoredDevice(e,t){const n=this.devices[e];if(n&&n[t])return s.a.fromStorage(n[t],t)}getUserByIdentityKey(e,t){return e!==l.OLM_ALGORITHM&&e!==l.MEGOLM_ALGORITHM?null:this.userByIdentityKey[t]}getDeviceByIdentityKey(e,t){const n=this.getUserByIdentityKey(e,t);if(!n)return null;const r=this.devices[n];if(!r)return null;for(const e in r){if(!r.hasOwnProperty(e))continue;const n=r[e];for(const r in n.keys){if(!n.keys.hasOwnProperty(r))continue;if(0!==r.indexOf("curve25519:"))continue;if(n.keys[r]==t)return s.a.fromStorage(n,e)}}return null}storeDevicesForUser(e,t){this.setRawStoredDevicesForUser(e,t),this.dirty=!0}startTrackingDeviceList(e){if("string"!=typeof e)throw new Error("userId must be a string; was "+e);this.deviceTrackingStatus[e]||(a.a.log("Now tracking device list for "+e),this.deviceTrackingStatus[e]=h.PendingDownload,this.dirty=!0)}stopTrackingDeviceList(e){this.deviceTrackingStatus[e]&&(a.a.log("No longer tracking device list for "+e),this.deviceTrackingStatus[e]=h.NotTracked,this.dirty=!0)}stopTrackingAllDeviceLists(){for(const e of Object.keys(this.deviceTrackingStatus))this.deviceTrackingStatus[e]=h.NotTracked;this.dirty=!0}invalidateUserDeviceList(e){this.deviceTrackingStatus[e]&&(a.a.log("Marking device list outdated for",e),this.deviceTrackingStatus[e]=h.PendingDownload,this.dirty=!0)}refreshOutdatedDeviceLists(){this.saveIfDirty();const e=[];for(const t of Object.keys(this.deviceTrackingStatus)){this.deviceTrackingStatus[t]==h.PendingDownload&&e.push(t)}return this.doKeyDownload(e)}setRawStoredDevicesForUser(e,t){if(void 0!==this.devices[e])for(const[t,n]of Object.entries(this.devices[e])){const e=n.keys["curve25519:"+t];delete this.userByIdentityKey[e]}this.devices[e]=t;for(const[n,r]of Object.entries(t)){const t=r.keys["curve25519:"+n];this.userByIdentityKey[t]=e}}setRawStoredCrossSigningForUser(e,t){this.crossSigningInfo[e]=t}doKeyDownload(e){if(0===e.length)return Promise.resolve();const t=this.serialiser.updateDevicesForUsers(e,this.syncToken).then(()=>{n(!0)},t=>{throw a.a.error("Error downloading keys for "+e+":",t),n(!1),t});e.forEach(e=>{this.keyDownloadsInProgressByUser[e]=t;this.deviceTrackingStatus[e]==h.PendingDownload&&(this.deviceTrackingStatus[e]=h.DownloadInProgress)});const n=n=>{this.emit("crypto.willUpdateDevices",e,!this.hasFetched),e.forEach(e=>{if(this.dirty=!0,this.keyDownloadsInProgressByUser[e]!==t)return void a.a.log("Another update in the queue for",e,"- not marking up-to-date");delete this.keyDownloadsInProgressByUser[e];this.deviceTrackingStatus[e]==h.DownloadInProgress&&(n?(this.deviceTrackingStatus[e]=h.UpToDate,a.a.log("Device list for",e,"now up to date")):this.deviceTrackingStatus[e]=h.PendingDownload)}),this.saveIfDirty(),this.emit("crypto.devicesUpdated",e,!this.hasFetched),this.hasFetched=!0};return t}}class m{constructor(e,t,n){this.baseApis=e,this.olmDevice=t,this.deviceList=n,o()(this,"downloadInProgress",!1),o()(this,"keyDownloadsQueuedByUser",{}),o()(this,"queuedQueryDeferred",null),o()(this,"syncToken",null)}updateDevicesForUsers(e,t){return e.forEach(e=>{this.keyDownloadsQueuedByUser[e]=!0}),this.queuedQueryDeferred||(this.queuedQueryDeferred=Object(d.l)()),this.syncToken=t,this.downloadInProgress?(a.a.log("Queued key download for",e),this.queuedQueryDeferred.promise):this.doQueuedQueries()}doQueuedQueries(){if(this.downloadInProgress)throw new Error("DeviceListUpdateSerialiser.doQueuedQueries called with request active");const e=Object.keys(this.keyDownloadsQueuedByUser);this.keyDownloadsQueuedByUser={};const t=this.queuedQueryDeferred;this.queuedQueryDeferred=null,a.a.log("Starting key download for",e),this.downloadInProgress=!0;const n={};this.syncToken&&(n.token=this.syncToken);const r=[];for(let t=0;t<e.length;t+=this.deviceList.keyDownloadChunkSize){const o=e.slice(t,t+this.deviceList.keyDownloadChunkSize);r.push(()=>this.baseApis.downloadKeysForUsers(o,n))}return Object(d.f)(r,3).then(async t=>{const n=Object.assign({},...t.map(e=>e.device_keys||{})),r=Object.assign({},...t.map(e=>e.master_keys||{})),o=Object.assign({},...t.map(e=>e.self_signing_keys||{})),i=Object.assign({},...t.map(e=>e.user_signing_keys||{}));for(const t of e){await Object(d.H)(5);try{await this.processQueryResponseForUser(t,n[t],{master:r[t],self_signing:o[t],user_signing:i[t]})}catch(e){a.a.error(`Error processing keys for ${t}:`,e)}}}).then(()=>{a.a.log("Completed key download for "+e),this.downloadInProgress=!1,t.resolve(),this.queuedQueryDeferred&&this.doQueuedQueries()},n=>{a.a.warn("Error downloading keys for "+e+":",n),this.downloadInProgress=!1,t.reject(n)}),t.promise}async processQueryResponseForUser(e,t,n){a.a.log("got device keys for "+e+":",t),a.a.log("got cross-signing keys for "+e+":",n);{const n={},r=this.deviceList.getRawStoredDevicesForUser(e);r&&Object.keys(r).forEach(e=>{const t=s.a.fromStorage(r[e],e);n[e]=t}),await async function(e,t,n,r,o,i){let s=!1;for(const e in n)if(n.hasOwnProperty(e)&&!(e in r)){if(t===o&&e===i){a.a.warn(`Local device ${e} missing from sync, skipping removal`);continue}a.a.log("Device "+t+":"+e+" has been removed"),delete n[e],s=!0}for(const o in r){if(!r.hasOwnProperty(o))continue;const i=r[o];i.user_id===t?i.device_id===o?await g(e,n,i)&&(s=!0):a.a.warn("Mismatched device_id "+i.device_id+" in keys from "+t+":"+o):a.a.warn("Mismatched user_id "+i.user_id+" in keys from "+t+":"+o)}return s}(this.olmDevice,e,n,t||{},this.baseApis.getUserId(),this.baseApis.deviceId);const o={};Object.keys(n).forEach(e=>{o[e]=n[e].toStorage()}),this.deviceList.setRawStoredDevicesForUser(e,o)}if(n&&(n.master||n.self_signing||n.user_signing)){const t=this.deviceList.getStoredCrossSigningForUser(e)||new c.a(e);t.setKeys(n),this.deviceList.setRawStoredCrossSigningForUser(e,t.toStorage()),this.deviceList.emit("userCrossSigningUpdated",e)}}}async function g(e,t,n){if(!n.keys)return!1;const r=n.device_id,o=n.user_id,i="ed25519:"+r,c=n.keys[i];if(!c)return a.a.warn("Device "+o+":"+r+" has no ed25519 key"),!1;const u=n.unsigned||{},d=n.signatures||{};try{await l.verifySignature(e,n,o,r,c)}catch(e){return a.a.warn("Unable to verify signature on device "+o+":"+r+":"+e),!1}let h;if(r in t){if(h=t[r],h.getFingerprint()!=c)return a.a.warn("Ed25519 key for device "+o+":"+r+" has changed"),!1}else t[r]=h=new s.a(r);return h.keys=n.keys||{},h.algorithms=n.algorithms||[],h.unsigned=u,h.signatures=d,!0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(79),o=n.n(r),i=n(96),a=n(108),s=n(3),c=n(299),l=n(153),u=n(259);class d{constructor(e,t){o()(this,"accountDataClientAdapter",void 0),o()(this,"crossSigningCallbacks",void 0),o()(this,"ssssCryptoCallbacks",void 0),o()(this,"crossSigningKeys",null),o()(this,"keySignatures",null),o()(this,"keyBackupInfo",null),o()(this,"sessionBackupPrivateKey",void 0),this.accountDataClientAdapter=new p(e),this.crossSigningCallbacks=new m,this.ssssCryptoCallbacks=new g(t)}addCrossSigningKeys(e,t){this.crossSigningKeys={authUpload:e,keys:t}}addSessionBackup(e){this.keyBackupInfo=e}addSessionBackupPrivateKeyToCache(e){this.sessionBackupPrivateKey=e}addKeySignature(e,t,n){this.keySignatures||(this.keySignatures={});const r=this.keySignatures[e]||{};this.keySignatures[e]=r,r[t]=n}async setAccountData(e,t){await this.accountDataClientAdapter.setAccountData(e,t)}buildOperation(){const e=this.accountDataClientAdapter.values;return new h(e,this.crossSigningKeys,this.keyBackupInfo,this.keySignatures)}async persist(e){if(this.crossSigningKeys){const t=Object(c.d)(e.cryptoStore,e.olmDevice);for(const e of["master","self_signing","user_signing"]){i.a.log(`Cache ${e} cross-signing private key locally`);const n=this.crossSigningCallbacks.privateKeys.get(e);await t.storeCrossSigningKeyCache(e,n)}await e.cryptoStore.doTxn("readwrite",[l.a.STORE_ACCOUNT],t=>{e.cryptoStore.storeCrossSigningKeys(t,this.crossSigningKeys.keys)})}this.sessionBackupPrivateKey&&await e.storeSessionBackupPrivateKey(this.sessionBackupPrivateKey)}}class h{constructor(e,t,n,r){this.accountData=e,this.crossSigningKeys=t,this.keyBackupInfo=n,this.keySignatures=r}async apply(e){const t=e.baseApis;if(this.crossSigningKeys){const n={};for(const[e,t]of Object.entries(this.crossSigningKeys.keys))n[e+"_key"]=t;await this.crossSigningKeys.authUpload(e=>t.uploadDeviceSigningKeys(e,n)),e.crossSigningInfo.setKeys(this.crossSigningKeys.keys)}if(this.accountData)for(const[e,n]of this.accountData)await t.setAccountData(e,n);this.keySignatures&&await t.uploadKeySignatures(this.keySignatures),this.keyBackupInfo&&(this.keyBackupInfo.version?await t.http.authedRequest(void 0,"PUT","/room_keys/version/"+this.keyBackupInfo.version,void 0,{algorithm:this.keyBackupInfo.algorithm,auth_data:this.keyBackupInfo.auth_data},{prefix:u.i}):await t.http.authedRequest(void 0,"POST","/room_keys/version",void 0,this.keyBackupInfo,{prefix:u.i}))}}class p extends s.EventEmitter{constructor(e){super(),this.existingValues=e,o()(this,"values",new Map)}getAccountDataFromServer(e){return Promise.resolve(this.getAccountData(e))}getAccountData(e){const t=this.values.get(e);if(t)return t;const n=this.existingValues[e];return n?n.getContent():null}setAccountData(e,t){const n=this.values.get(e);return this.values.set(e,t),Promise.resolve().then(()=>{const r=new a.b({type:e,content:t});return this.emit("accountData",r,n),{}})}}class m{constructor(){o()(this,"privateKeys",new Map)}getCrossSigningKeyCache(e,t){return this.getCrossSigningKey(e,t)}storeCrossSigningKeyCache(e,t){return this.privateKeys.set(e,t),Promise.resolve()}getCrossSigningKey(e,t){return Promise.resolve(this.privateKeys.get(e))}saveCrossSigningKeys(e){for(const[t,n]of Object.entries(e))this.privateKeys.set(t,n)}}class g{constructor(e){this.delegateCryptoCallbacks=e,o()(this,"privateKeys",new Map)}async getSecretStorageKey({keys:e},t){for(const t of Object.keys(e)){const e=this.privateKeys.get(t);if(e)return[t,e]}if(this.delegateCryptoCallbacks){const n=await this.delegateCryptoCallbacks.getSecretStorageKey({keys:e},t);if(n){const[e,t]=n;this.privateKeys.set(e,t)}return n}}addPrivateKey(e,t,n){var r,o;this.privateKeys.set(e,n),null===(r=this.delegateCryptoCallbacks)||void 0===r||null===(o=r.cacheSecretStorageKey)||void 0===o||o.call(r,e,t,n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(79),o=n.n(r),i=n(96),a=n(135),s=n(180),c=n(232);const l="m.secret_storage.v1.aes-hmac-sha2";class u{constructor(e,t,n){this.accountDataAdapter=e,this.cryptoCallbacks=t,this.baseApis=n,o()(this,"requests",new Map)}async getDefaultKeyId(){const e=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.default_key");return e?e.key:null}setDefaultKeyId(e){return new Promise((t,n)=>{const r=n=>{"m.secret_storage.default_key"===n.getType()&&n.getContent().key===e&&(this.accountDataAdapter.removeListener("accountData",r),t())};this.accountDataAdapter.on("accountData",r),this.accountDataAdapter.setAccountData("m.secret_storage.default_key",{key:e}).catch(e=>{this.accountDataAdapter.removeListener("accountData",r),n(e)})})}async addKey(e,t,n){const r={algorithm:e};if(t||(t={}),t.name&&(r.name=t.name),e!==l)throw new Error("Unknown key algorithm "+e);if(t.passphrase&&(r.passphrase=t.passphrase),t.key){const{iv:e,mac:n}=await Object(c.a)(t.key);r.iv=e,r.mac=n}if(!n)do{n=Object(s.b)(32)}while(await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.key."+n));return await this.accountDataAdapter.setAccountData("m.secret_storage.key."+n,r),{keyId:n,keyInfo:r}}async getKey(e){if(e||(e=await this.getDefaultKeyId()),!e)return null;const t=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.key."+e);return t?[e,t]:null}async hasKey(e){return Boolean(await this.getKey(e))}async checkKey(e,t){if(t.algorithm===l){if(t.mac){const{mac:n}=await Object(c.a)(e,t.iv);return t.mac.replace(/=+$/g,"")===n.replace(/=+$/g,"")}return!0}throw new Error("Unknown algorithm")}async store(e,t,n){const r={};if(!n){const e=await this.getDefaultKeyId();if(!e)throw new Error("No keys specified and no default key present");n=[e]}if(0===n.length)throw new Error("Zero keys given to encrypt with!");for(const o of n){const n=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.key."+o);if(!n)throw new Error("Unknown key: "+o);if(n.algorithm===l){const i={[o]:n},[,a]=await this.getSecretStorageKey(i,e);r[o]=await a.encrypt(t)}else i.a.warn("unknown algorithm for secret storage key "+o+": "+n.algorithm)}await this.accountDataAdapter.setAccountData(e,{encrypted:r})}async get(e){const t=await this.accountDataAdapter.getAccountDataFromServer(e);if(!t)return;if(!t.encrypted)throw new Error("Content is not encrypted!");const n={};for(const e of Object.keys(t.encrypted)){const r=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.key."+e),o=t.encrypted[e];r.algorithm===l&&o.iv&&o.ciphertext&&o.mac&&(n[e]=r)}if(0===Object.keys(n).length)throw new Error(`Could not decrypt ${e} because none of the keys it is encrypted with are for a supported algorithm`);let r,o;try{[r,o]=await this.getSecretStorageKey(n,e);const i=t.encrypted[r];return i.passthrough?Object(a.encodeBase64)(o.get_private_key()):await o.decrypt(i)}finally{o&&o.free&&o.free()}}async isStored(e,t){const n=await this.accountDataAdapter.getAccountDataFromServer(e);if(!n)return null;if(!n.encrypted)return null;void 0===t&&(t=!0);const r={};for(const e of Object.keys(n.encrypted)){const t=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.key."+e);if(!t)continue;const o=n.encrypted[e];t.algorithm===l&&o.iv&&o.ciphertext&&o.mac&&(r[e]=t)}return Object.keys(r).length?r:null}request(e,t){const n=this.baseApis.makeTxnId();let r,o;const a=new Promise((e,t)=>{r=e,o=t});this.requests.set(n,{name:e,devices:t,resolve:r,reject:o});const s={name:e,action:"request",requesting_device_id:this.baseApis.deviceId,request_id:n},c={};for(const e of t)c[e]=s;return i.a.info(`Request secret ${e} from ${t}, id ${n}`),this.baseApis.sendToDevice("m.secret.request",{[this.baseApis.getUserId()]:c}),{requestId:n,promise:a,cancel:e=>{const r={action:"request_cancellation",requesting_device_id:this.baseApis.deviceId,request_id:n},i={};for(const e of t)i[e]=r;this.baseApis.sendToDevice("m.secret.request",{[this.baseApis.getUserId()]:i}),o(new Error(e||"Cancelled"))}}}async onRequestReceived(e){const t=e.getSender(),n=e.getContent();if(t!==this.baseApis.getUserId()||!(n.name&&n.action&&n.requesting_device_id&&n.request_id))return;const r=n.requesting_device_id;if("request_cancellation"===n.action);else if("request"===n.action){if(r===this.baseApis.deviceId)return;if(i.a.info("received request for secret ("+t+", "+r+", "+n.request_id+")"),!this.cryptoCallbacks.onSecretRequested)return;const e=await this.cryptoCallbacks.onSecretRequested(t,r,n.request_id,n.name,this.baseApis.checkDeviceTrust(t,r));if(e){i.a.info(`Preparing ${n.name} secret for ${r}`);const o={type:"m.secret.send",content:{request_id:n.request_id,secret:e}},s={algorithm:a.OLM_ALGORITHM,sender_key:this.baseApis.crypto.olmDevice.deviceCurve25519Key,ciphertext:{}};await a.ensureOlmSessionsForDevices(this.baseApis.crypto.olmDevice,this.baseApis,{[t]:[this.baseApis.getStoredDevice(t,r)]}),await a.encryptMessageForDevice(s.ciphertext,this.baseApis.getUserId(),this.baseApis.deviceId,this.baseApis.crypto.olmDevice,t,this.baseApis.getStoredDevice(t,r),o);const c={[t]:{[r]:s}};i.a.info(`Sending ${n.name} secret for ${r}`),this.baseApis.sendToDevice("m.room.encrypted",c)}else i.a.info(`Request denied for ${n.name} secret for ${r}`)}}onSecretReceived(e){if(e.getSender()!==this.baseApis.getUserId())return;const t=e.getContent();i.a.log("got secret share for request",t.request_id);const n=this.requests.get(t.request_id);if(n){const r=this.baseApis.crypto.deviceList.getDeviceByIdentityKey(a.OLM_ALGORITHM,e.getSenderKey());if(!r)return void i.a.log("secret share from unknown device with key",e.getSenderKey());if(!n.devices.includes(r.deviceId))return void i.a.log("unsolicited secret share from device",r.deviceId);i.a.log(`Successfully received secret ${n.name} from `+r.deviceId),n.resolve(t.secret)}}async getSecretStorageKey(e,t){if(!this.cryptoCallbacks.getSecretStorageKey)throw new Error("No getSecretStorageKey callback supplied");const n=await this.cryptoCallbacks.getSecretStorageKey({keys:e},t);if(!n)throw new Error("getSecretStorageKey callback returned falsey");if(n.length<2)throw new Error("getSecretStorageKey callback returned invalid data");const[r,o]=n;if(!e[r])throw new Error("App returned unknown key from getSecretStorageKey!");if(e[r].algorithm===l){return[r,{encrypt:async function(e){return await Object(c.c)(e,o,t)},decrypt:async function(e){return await Object(c.b)(e,o,t)}}]}throw new Error("Unknown key type: "+e[r].algorithm)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(79),o=n.n(r),i=n(96),a=n(93);let s;!function(e){e[e.Unsent=0]="Unsent",e[e.Sent=1]="Sent",e[e.CancellationPending=2]="CancellationPending",e[e.CancellationPendingAndWillResend=3]="CancellationPendingAndWillResend"}(s||(s={}));class c{constructor(e,t,n){this.baseApis=e,this.deviceId=t,this.cryptoStore=n,o()(this,"sendOutgoingRoomKeyRequestsTimer",null),o()(this,"sendOutgoingRoomKeyRequestsRunning",!1),o()(this,"clientRunning",!1)}start(){this.clientRunning=!0}stop(){i.a.log("stopping OutgoingRoomKeyRequestManager"),this.clientRunning=!1}sendQueuedRequests(){this.startTimer()}async queueRoomKeyRequest(e,t,n=!1){const r=await this.cryptoStore.getOutgoingRoomKeyRequest(e);if(r)switch(r.state){case s.CancellationPendingAndWillResend:case s.Unsent:return;case s.CancellationPending:{const e=n?s.CancellationPendingAndWillResend:s.Sent;await this.cryptoStore.updateOutgoingRoomKeyRequest(r.requestId,s.CancellationPending,{state:e,cancellationTxnId:this.baseApis.makeTxnId()});break}case s.Sent:if(n){const o=s.CancellationPendingAndWillResend,a=await this.cryptoStore.updateOutgoingRoomKeyRequest(r.requestId,s.Sent,{state:o,cancellationTxnId:this.baseApis.makeTxnId(),requestTxnId:this.baseApis.makeTxnId()});if(!a)return await this.queueRoomKeyRequest(e,t,n);try{await this.sendOutgoingRoomKeyRequestCancellation(a,!0)}catch(e){i.a.error("Error sending room key request cancellation; will retry later.",e)}}break;default:throw new Error("unhandled state: "+r.state)}else await this.cryptoStore.getOrAddOutgoingRoomKeyRequest({requestBody:e,recipients:t,requestId:this.baseApis.makeTxnId(),state:s.Unsent})}cancelRoomKeyRequest(e){return this.cryptoStore.getOutgoingRoomKeyRequest(e).then(t=>{if(t)switch(t.state){case s.CancellationPending:case s.CancellationPendingAndWillResend:return;case s.Unsent:return i.a.log("deleting unnecessary room key request for "+l(e)),this.cryptoStore.deleteOutgoingRoomKeyRequest(t.requestId,s.Unsent);case s.Sent:return this.cryptoStore.updateOutgoingRoomKeyRequest(t.requestId,s.Sent,{state:s.CancellationPending,cancellationTxnId:this.baseApis.makeTxnId()}).then(t=>{t?this.sendOutgoingRoomKeyRequestCancellation(t).catch(e=>{i.a.error("Error sending room key request cancellation; will retry later.",e),this.startTimer()}):i.a.log("Tried to cancel room key request for "+l(e)+" but it was already cancelled in another tab")});default:throw new Error("unhandled state: "+t.state)}})}getOutgoingSentRoomKeyRequest(e,t){return this.cryptoStore.getOutgoingRoomKeyRequestsByTarget(e,t,[s.Sent])}async cancelAndResendAllOutgoingRequests(){const e=await this.cryptoStore.getAllOutgoingRoomKeyRequestsByState(s.Sent);return Promise.all(e.map(({requestBody:e,recipients:t})=>this.queueRoomKeyRequest(e,t,!0)))}startTimer(){if(this.sendOutgoingRoomKeyRequestsTimer)return;this.sendOutgoingRoomKeyRequestsTimer=setTimeout(()=>{if(this.sendOutgoingRoomKeyRequestsRunning)throw new Error("RoomKeyRequestSend already in progress!");this.sendOutgoingRoomKeyRequestsRunning=!0,this.sendOutgoingRoomKeyRequests().finally(()=>{this.sendOutgoingRoomKeyRequestsRunning=!1}).catch(e=>{i.a.warn("error in OutgoingRoomKeyRequestManager: "+e)})},500)}sendOutgoingRoomKeyRequests(){return this.clientRunning?this.cryptoStore.getOutgoingRoomKeyRequestByState([s.CancellationPending,s.CancellationPendingAndWillResend,s.Unsent]).then(e=>{if(!e)return void(this.sendOutgoingRoomKeyRequestsTimer=null);let t;switch(e.state){case s.Unsent:t=this.sendOutgoingRoomKeyRequest(e);break;case s.CancellationPending:t=this.sendOutgoingRoomKeyRequestCancellation(e);break;case s.CancellationPendingAndWillResend:t=this.sendOutgoingRoomKeyRequestCancellation(e,!0)}return t.then(()=>this.sendOutgoingRoomKeyRequests()).catch(e=>{i.a.error("Error sending room key request; will retry later.",e),this.sendOutgoingRoomKeyRequestsTimer=null})}):(this.sendOutgoingRoomKeyRequestsTimer=null,Promise.resolve())}sendOutgoingRoomKeyRequest(e){i.a.log("Requesting keys for "+l(e.requestBody)+" from "+u(e.recipients)+`(id ${e.requestId})`);const t={action:"request",requesting_device_id:this.deviceId,request_id:e.requestId,body:e.requestBody};return this.sendMessageToDevices(t,e.recipients,e.requestTxnId||e.requestId).then(()=>this.cryptoStore.updateOutgoingRoomKeyRequest(e.requestId,s.Unsent,{state:s.Sent}))}sendOutgoingRoomKeyRequestCancellation(e,t=!1){i.a.log("Sending cancellation for key request for "+l(e.requestBody)+" to "+u(e.recipients)+" "+`(cancellation id ${e.cancellationTxnId})`);const n={action:"request_cancellation",requesting_device_id:this.deviceId,request_id:e.requestId};return this.sendMessageToDevices(n,e.recipients,e.cancellationTxnId).then(()=>t?this.cryptoStore.updateOutgoingRoomKeyRequest(e.requestId,s.CancellationPendingAndWillResend,{state:s.Unsent}):this.cryptoStore.deleteOutgoingRoomKeyRequest(e.requestId,s.CancellationPending))}sendMessageToDevices(e,t,n){const r={};for(const n of t)r[n.userId]||(r[n.userId]={}),r[n.userId][n.deviceId]=e;return this.baseApis.sendToDevice(a.a.RoomKeyRequest,r,n)}}function l(e){return e.room_id+" / "+e.session_id}function u(e){return"["+e.map(e=>`${e.userId}:${e.deviceId}`).join(",")+"]"}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return F}));var r=n(377),o=n(295),i=n.n(o),a=n(260),s=n(96);const c="m.key.verification.start",l=["m.key.verification.accept","m.key.verification.key","m.key.verification.mac"];let u;const d=Object(a.a)("m.mismatched_sas","Mismatched short authentication string"),h=Object(a.a)("m.mismatched_commitment","Mismatched commitment");const p=[["🐶","dog"],["🐱","cat"],["🦁","lion"],["🐎","horse"],["🦄","unicorn"],["🐷","pig"],["🐘","elephant"],["🐰","rabbit"],["🐼","panda"],["🐓","rooster"],["🐧","penguin"],["🐢","turtle"],["🐟","fish"],["🐙","octopus"],["🦋","butterfly"],["🌷","flower"],["🌳","tree"],["🌵","cactus"],["🍄","mushroom"],["🌏","globe"],["🌙","moon"],["☁️","cloud"],["🔥","fire"],["🍌","banana"],["🍎","apple"],["🍓","strawberry"],["🌽","corn"],["🍕","pizza"],["🎂","cake"],["❤️","heart"],["🙂","smiley"],["🤖","robot"],["🎩","hat"],["👓","glasses"],["🔧","spanner"],["🎅","santa"],["👍","thumbs up"],["☂️","umbrella"],["⌛","hourglass"],["⏰","clock"],["🎁","gift"],["💡","light bulb"],["📕","book"],["✏️","pencil"],["📎","paperclip"],["✂️","scissors"],["🔒","lock"],["🔑","key"],["🔨","hammer"],["☎️","telephone"],["🏁","flag"],["🚂","train"],["🚲","bicycle"],["✈️","aeroplane"],["🚀","rocket"],["🏆","trophy"],["⚽","ball"],["🎸","guitar"],["🎺","trumpet"],["🔔","bell"],["⚓️","anchor"],["🎧","headphones"],["📁","folder"],["📌","pin"]];const m={decimal:function(e){return[1e3+(e[0]<<5|e[1]>>3),1e3+((7&e[1])<<10|e[2]<<2|e[3]>>6),1e3+((63&e[3])<<7|e[4]>>1)]},emoji:function(e){return[e[0]>>2,(3&e[0])<<4|e[1]>>4,(15&e[1])<<2|e[2]>>6,63&e[2],e[3]>>2,(3&e[3])<<4|e[4]>>4,(15&e[4])<<2|e[5]>>6].map(e=>p[e])}};function g(e,t){const n={};for(const r of t)r in m&&(n[r]=m[r](e));return n}const f={"hkdf-hmac-sha256":"calculate_mac","hmac-sha256":"calculate_mac_long_kdf"};function _(e,t){return function(...n){const r=e[f[t]].apply(e,n);return s.a.log("SAS calculateMAC:",t,n,r),r}}const b={"curve25519-hkdf-sha256":function(e,t,n){const r=`${e._baseApis.getUserId()}|${e._baseApis.deviceId}|`+e.ourSASPubKey+"|",o=`${e.userId}|${e.deviceId}|${e.theirSASPubKey}|`,i="MATRIX_KEY_VERIFICATION_SAS|"+(e.initiatedByMe?r+o:o+r)+e._channel.transactionId;return t.generate_bytes(i,n)},curve25519:function(e,t,n){const r=`${e._baseApis.getUserId()}${e._baseApis.deviceId}`,o=`${e.userId}${e.deviceId}`,i="MATRIX_KEY_VERIFICATION_SAS"+(e.initiatedByMe?r+o:o+r)+e._channel.transactionId;return t.generate_bytes(i,n)}},v=["curve25519-hkdf-sha256","curve25519"],y=["sha256"],E=["hkdf-hmac-sha256","hmac-sha256"],S=Object.keys(m),w=new Set(v),C=new Set(y),T=new Set(E),x=new Set(S);function k(e,t){return e instanceof Array?e.filter(e=>t.has(e)):[]}class F extends r.b{static get NAME(){return"m.sas.v1"}get events(){return l}async _doVerification(){await e.Olm.init(),u=u||new e.Olm.Utility,await this._baseApis.downloadKeys([this.userId]);let t=!1;do{try{return this.initiatedByMe?await this._doSendVerification():await this._doRespondVerification()}catch(e){if(!(e instanceof r.a))throw e;this.startEvent=e.startEvent,t=!0}}while(t)}canSwitchStartEvent(e){if(e.getType()!==c)return!1;const t=e.getContent();return t&&t.method===F.NAME&&this._waitingForAccept}async _sendStart(){const e=this._channel.completeContent(c,{method:F.NAME,from_device:this._baseApis.deviceId,key_agreement_protocols:v,hashes:y,message_authentication_codes:E,short_authentication_string:S});return await this._channel.sendCompleted(c,e),e}async _doSendVerification(){let t,n;if(this._waitingForAccept=!0,t=this.startEvent?this._channel.completedContentFromEvent(this.startEvent):await this._sendStart(),!this.initiatedByMe)throw new r.a(this.startEvent);try{n=await this._waitForEvent("m.key.verification.accept")}finally{this._waitingForAccept=!1}let o=n.getContent();const s=k(o.short_authentication_string,x);if(!(w.has(o.key_agreement_protocol)&&C.has(o.hash)&&T.has(o.message_authentication_code)&&s.length))throw Object(a.g)();if("string"!=typeof o.commitment)throw Object(a.c)();const c=o.key_agreement_protocol,l=o.message_authentication_code,p=o.commitment,m=new e.Olm.SAS;try{this.ourSASPubKey=m.get_pubkey(),await this._send("m.key.verification.key",{key:this.ourSASPubKey}),n=await this._waitForEvent("m.key.verification.key"),o=n.getContent();const e=o.key+i.a.stringify(t);if(u.sha256(e)!==p)throw h();this.theirSASPubKey=o.key,m.set_their_key(o.key);const r=b[c](this,m,6),f=new Promise((e,t)=>{this.sasEvent={sas:g(r,s),confirm:async()=>{try{await this._sendMAC(m,l),e()}catch(e){t(e)}},cancel:()=>t(Object(a.h)()),mismatch:()=>t(d())},this.emit("show_sas",this.sasEvent)});[n]=await Promise.all([this._waitForEvent("m.key.verification.mac").then(e=>(this._expectedEvent="m.key.verification.done",e)),f]),o=n.getContent(),await this._checkMAC(m,o,l)}finally{m.free()}}async _doRespondVerification(){let t=this._channel.completedContentFromEvent(this.startEvent);const n=k(v,new Set(t.key_agreement_protocols))[0],r=k(y,new Set(t.hashes))[0],o=k(E,new Set(t.message_authentication_codes))[0],s=k(t.short_authentication_string,x);if(void 0===n||void 0===r||void 0===o||!s.length)throw Object(a.g)();const c=new e.Olm.SAS;try{const e=c.get_pubkey()+i.a.stringify(t);await this._send("m.key.verification.accept",{key_agreement_protocol:n,hash:r,message_authentication_code:o,short_authentication_string:s,commitment:u.sha256(e)});let l=await this._waitForEvent("m.key.verification.key");t=l.getContent(),this.theirSASPubKey=t.key,c.set_their_key(t.key),this.ourSASPubKey=c.get_pubkey(),await this._send("m.key.verification.key",{key:this.ourSASPubKey});const h=b[n](this,c,6),p=new Promise((e,t)=>{this.sasEvent={sas:g(h,s),confirm:async()=>{try{await this._sendMAC(c,o),e()}catch(e){t(e)}},cancel:()=>t(Object(a.h)()),mismatch:()=>t(d())},this.emit("show_sas",this.sasEvent)});[l]=await Promise.all([this._waitForEvent("m.key.verification.mac").then(e=>(this._expectedEvent="m.key.verification.done",e)),p]),t=l.getContent(),await this._checkMAC(c,t,o)}finally{c.free()}}_sendMAC(e,t){const n={},r=[],o="MATRIX_KEY_VERIFICATION_MAC"+this._baseApis.getUserId()+this._baseApis.deviceId+this.userId+this.deviceId+this._channel.transactionId,i="ed25519:"+this._baseApis.deviceId;n[i]=_(e,t)(this._baseApis.getDeviceEd25519Key(),o+i),r.push(i);const a=this._baseApis.getCrossSigningId();if(a){const i="ed25519:"+a;n[i]=_(e,t)(a,o+i),r.push(i)}const s=_(e,t)(r.sort().join(","),o+"KEY_IDS");return this._send("m.key.verification.mac",{mac:n,keys:s})}async _checkMAC(e,t,n){const r="MATRIX_KEY_VERIFICATION_MAC"+this.userId+this.deviceId+this._baseApis.getUserId()+this._baseApis.deviceId+this._channel.transactionId;if(t.keys!==_(e,n)(Object.keys(t.mac).sort().join(","),r+"KEY_IDS"))throw Object(a.d)();await this._verifyKeys(this.userId,t.mac,(t,o,i)=>{if(i!==_(e,n)(o.keys[t],r+t))throw Object(a.d)()})}}}).call(this,n(23))},function(e,t,n){var r=n(934);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t,n){"use strict";var r=n(935).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),a=i.charCodeAt(0);if(255!==t[a])throw new TypeError(i+" is ambiguous");t[a]=o}var s=e.length,c=e.charAt(0),l=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return r.alloc(0);var n=0;if(" "!==e[n]){for(var o=0,i=0;e[n]===c;)o++,n++;for(var a=(e.length-n)*l+1>>>0,u=new Uint8Array(a);e[n];){var d=t[e.charCodeAt(n)];if(255===d)return;for(var h=0,p=a-1;(0!==d||h<i)&&-1!==p;p--,h++)d+=s*u[p]>>>0,u[p]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");i=h,n++}if(" "!==e[n]){for(var m=a-i;m!==a&&0===u[m];)m++;var g=r.allocUnsafe(o+(a-m));g.fill(0,0,o);for(var f=o;m!==a;)g[f++]=u[m++];return g}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var n=0,o=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var l=(a-i)*u+1>>>0,d=new Uint8Array(l);i!==a;){for(var h=t[i],p=0,m=l-1;(0!==h||p<o)&&-1!==m;m--,p++)h+=256*d[m]>>>0,d[m]=h%s>>>0,h=h/s>>>0;if(0!==h)throw new Error("Non-zero carry");o=p,i++}for(var g=l-o;g!==l&&0===d[g];)g++;for(var f=c.repeat(n);g<l;++g)f+=e.charAt(d[g]);return f},decodeUnsafe:d,decode:function(e){var t=d(e);if(t)return t;throw new Error("Non-base"+s+" character")}}}},function(e,t,n){var r=n(24),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(207),o=n(96);class i{constructor(e,t,n=null){this._client=e,this._roomId=t,this.userId=n,this._requestEventId=null}get receiveStartFromOtherDevices(){return!0}get roomId(){return this._roomId}get transactionId(){return this._requestEventId}static getOtherPartyUserId(e,t){if(i.getEventType(e)!==r.i)return;const n=t.getUserId(),o=e.getSender(),a=e.getContent().to;return o===n?a:a===n?o:void 0}getTimestamp(e){return e.getTs()}static canCreateRequest(e){return e===r.i}static getTransactionId(e){if(i.getEventType(e)===r.i)return e.getId();{const t=e.getRelation();if(t&&"m.reference"===t.rel_type)return t.event_id}}static validateEvent(e,t){const n=i.getTransactionId(e);if("string"!=typeof n||0===n.length)return!1;const a=i.getEventType(e),s=e.getContent();if(a===r.i){if(!s||"string"!=typeof s.to||!s.to.length)return o.a.log("InRoomChannel: validateEvent: no valid to "+(s&&s.to)),!1;if(!i.getOtherPartyUserId(e,t))return o.a.log("InRoomChannel: validateEvent: not directed to or sent by me: "+e.getSender()+", "+(s&&s.to)),!1}return r.k.validateEvent(a,e,t)}static getEventType(e){const t=e.getType();if("m.room.message"===t){const t=e.getContent();if(t){const{msgtype:e}=t;if(e===r.i)return r.i}}return t&&t!==r.i?t:""}async handleEvent(e,t,n){if(t.hasEventId(e.getId()))return;const r=i.getEventType(e);if(e.getRoomId()!==this._roomId)return;if(null===this.userId){const t=i.getOtherPartyUserId(e,this._client);t&&(this.userId=t)}const a=this._client.getUserId(),s=e.getSender();if(null!==this.userId&&s!==a&&s!==this.userId)return void o.a.log("InRoomChannel: ignoring verification event from non-participating sender "+s);null===this._requestEventId&&(this._requestEventId=i.getTransactionId(e));const c=!!e.getUnsigned().transaction_id,l=e.getSender()===this._client.getUserId();return await t.handleEvent(r,e,n,c,l)}completedContentFromEvent(e){const t=Object.assign({},e.getContent());return t["m.relates_to"]=e.getRelation(),t}completeContent(e,t){return t=Object.assign({},t),e!==r.i&&e!==r.h&&e!==r.j||(t.from_device=this._client.getDeviceId()),e===r.i?t={body:this._client.getUserId()+" is requesting to verify your key, but your client does not support in-chat key verification. You will need to use legacy key verification to verify keys.",msgtype:r.i,to:this.userId,from_device:t.from_device,methods:t.methods}:t["m.relates_to"]={rel_type:"m.reference",event_id:this.transactionId},t}send(e,t){const n=this.completeContent(e,t);return this.sendCompleted(e,n)}async sendCompleted(e,t){let n=e;e===r.i&&(n="m.room.message");const o=await this._client.sendEvent(this._roomId,n,t);e===r.i&&(this._requestEventId=o.event_id)}}class a{constructor(){this._requestsByRoomId=new Map}getRequest(e){const t=e.getRoomId(),n=i.getTransactionId(e);return this._getRequestByTxnId(t,n)}getRequestByChannel(e){return this._getRequestByTxnId(e.roomId,e.transactionId)}_getRequestByTxnId(e,t){const n=this._requestsByRoomId.get(e);if(n)return n.get(t)}setRequest(e,t){this._setRequest(e.getRoomId(),i.getTransactionId(e),t)}setRequestByChannel(e,t){this._setRequest(e.roomId,e.transactionId,t)}_setRequest(e,t,n){let r=this._requestsByRoomId.get(e);r||(r=new Map,this._requestsByRoomId.set(e,r)),r.set(t,n)}removeRequest(e){const t=e.getRoomId(),n=this._requestsByRoomId.get(t);n&&(n.delete(i.getTransactionId(e)),0===n.size&&this._requestsByRoomId.delete(t))}findRequestInProgress(e){const t=this._requestsByRoomId.get(e);if(t)for(const e of t.values())if(e.pending)return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(180),o=n(96),i=n(207),a=n(260),s=n(108);class c{constructor(e,t,n,r=null,o=null){this._client=e,this.userId=t,this._devices=n,this.transactionId=r,this._deviceId=o}isToDevices(e){if(e.length===this._devices.length){for(const t of e){if(!this._devices.find(e=>e.deviceId===t.deviceId))return!1}return!0}return!1}get deviceId(){return this._deviceId}static getEventType(e){return e.getType()}static getTransactionId(e){const t=e.getContent();return t&&t.transaction_id}static canCreateRequest(e){return e===i.i||e===i.j}static validateEvent(e,t){if(e.isCancelled())return o.a.warn("Ignoring flagged verification request from "+e.getSender()),!1;const n=e.getContent();if(!n)return o.a.warn("ToDeviceChannel.validateEvent: invalid: no content"),!1;if(!n.transaction_id)return o.a.warn("ToDeviceChannel.validateEvent: invalid: no transaction_id"),!1;const r=e.getType();if(r===i.i){if(!Number.isFinite(n.timestamp))return o.a.warn("ToDeviceChannel.validateEvent: invalid: no timestamp"),!1;if(e.getSender()===t.getUserId()&&n.from_device==t.getDeviceId())return o.a.warn("ToDeviceChannel.validateEvent: invalid: from own device"),!1}return i.k.validateEvent(r,e,t)}getTimestamp(e){const t=e.getContent();return t&&t.timestamp}async handleEvent(e,t,n){const r=e.getType(),o=e.getContent();if(r===i.i||r===i.h||r===i.j){this.transactionId||(this.transactionId=o.transaction_id);const e=o.from_device;if(!this._deviceId&&this._devices.includes(e)&&(this._deviceId=e),!this._deviceId||this._deviceId!==e){const t=this.completeContent(Object(a.b)(Object(a.f)()));return this._sendToDevices(i.a,t,[e])}}const s=t.phase===i.f||t.phase===i.d;await t.handleEvent(e.getType(),e,n,!1,!1);const c=t.phase===i.f||t.phase===i.d;if((r===i.j||r===i.h)&&!s&&c&&this._deviceId){const e=this._devices.filter(e=>e!==this._deviceId&&e!==this._client.getDeviceId());if(e.length){const t=this.completeContent({code:"m.accepted",reason:"Verification request accepted by another device"});await this._sendToDevices(i.a,t,e)}}}completedContentFromEvent(e){return e.getContent()}completeContent(e,t){return t=Object.assign({},t),this.transactionId&&(t.transaction_id=this.transactionId),e!==i.i&&e!==i.h&&e!==i.j||(t.from_device=this._client.getDeviceId()),e===i.i&&(t.timestamp=Date.now()),t}send(e,t={}){e!==i.i&&e!==i.j||this.transactionId||(this.transactionId=c.makeTransactionId());const n=this.completeContent(e,t);return this.sendCompleted(e,n)}async sendCompleted(e,t){let n;n=e===i.i?await this._sendToDevices(e,t,this._devices):await this._sendToDevices(e,t,[this._deviceId]);const r=new s.b({sender:this._client.getUserId(),content:t,type:e});return await this._request.handleEvent(e,r,!0,!0,!0),n}_sendToDevices(e,t,n){if(n.length){const r={};for(const e of n)r[e]=t;return this._client.sendToDevice(e,{[this.userId]:r})}return Promise.resolve()}static makeTransactionId(){return Object(r.b)(32)}}class l{constructor(){this._requestsByUserId=new Map}getRequest(e){return this.getRequestBySenderAndTxnId(e.getSender(),c.getTransactionId(e))}getRequestByChannel(e){return this.getRequestBySenderAndTxnId(e.userId,e.transactionId)}getRequestBySenderAndTxnId(e,t){const n=this._requestsByUserId.get(e);if(n)return n.get(t)}setRequest(e,t){this.setRequestBySenderAndTxnId(e.getSender(),c.getTransactionId(e),t)}setRequestByChannel(e,t){this.setRequestBySenderAndTxnId(e.userId,e.transactionId,t)}setRequestBySenderAndTxnId(e,t,n){let r=this._requestsByUserId.get(e);r||(r=new Map,this._requestsByUserId.set(e,r)),r.set(t,n)}removeRequest(e){const t=e.getSender(),n=this._requestsByUserId.get(t);n&&(n.delete(c.getTransactionId(e)),0===n.size&&this._requestsByUserId.delete(t))}findRequestInProgress(e,t){const n=this._requestsByUserId.get(e);if(n)for(const e of n.values())if(e.pending&&e.channel.isToDevices(t))return e}getRequestsInProgress(e){const t=this._requestsByUserId.get(e);return t?Array.from(t.values()).filter(e=>e.pending):[]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(377);class o extends r.b{static factory(...e){return new o(...e)}static get NAME(){return"org.matrix.illegal_method"}async _doVerification(){throw new Error("Verification is not possible with this method")}}},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.Master="master",e.SelfSigning="self_signing",e.UserSigning="user_signing"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(108);function o(e,t){const n=Boolean(t.preventReEmit),o=!1!==t.decrypt;return function(t){const i=new r.b(t);return i.isEncrypted()&&(n||e.reEmitter.reEmit(i,["Event.decrypted"]),o&&e.decryptEventIfNeeded(i)),n||e.reEmitter.reEmit(i,["Event.replaced"]),i}}},function(e,t,n){"use strict";(function(e){class r{constructor(){this.components=null}getComponent(e){if(!e)throw new Error("Invalid component name: "+e);if(null===this.components)throw new Error(`Attempted to get a component (${e}) before a skin has been loaded. This is probably because either: a) Your app has not called sdk.loadSkin(), or b) A component has called getComponent at the root level`);const t=(t=>{if(!t)return null;let n=t[e];return n||(n=t["views."+e]),n})(this.components);if(!t)return null;if(!("function"==typeof t||t.render))throw new Error(`Not a valid component: ${e} (type = ${typeof t}).`);return t}load(e){if(null!==this.components)throw new Error("Attempted to load a skin while a skin is already loadedIf you want to change the active skin, call resetSkin first");this.components={};const t=Object.keys(e.components);for(let n=0;n<t.length;++n){const r=e.components[t[n]];this.addComponent(t[n],r)}const r=n(1424);if(!r||!r.components)throw new Error("Invalid react-sdk component index");for(const e in r.components)this.components[e]||(this.components[e]=r.components[e])}addComponent(e,t){let n=e;void 0!==t.replaces&&(n=t.replaces.indexOf(".")>-1?t.replaces:e.substr(0,e.lastIndexOf(".")+1)+t.replaces.split(".").pop()),this.components[n]=t}reset(){this.components=null}}void 0===e.mxSkinner&&(e.mxSkinner=new r),t.a=e.mxSkinner}).call(this,n(23))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,l={},u=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){m(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){m(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(m,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&m(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return l[c]=o,r(c),c++},h.clearImmediate=p}function p(e){delete l[e]}function m(e){if(u)setTimeout(m,0,e);else{var t=l[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(23),n(371))},function(e,t){e.exports="img/feather-customised/check.5745b4e.svg"},function(e,t,n){e.exports.Dispatcher=n(945)},function(e,t,n){"use strict";t.__esModule=!0;var r=n(191),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}return e.prototype.register=function(e){var t="ID_"+this._lastID++;return this._callbacks[t]=e,t},e.prototype.unregister=function(e){this._callbacks[e]||r(!1,"Dispatcher.unregister(...): `%s` does not map to a registered callback.",e),delete this._callbacks[e]},e.prototype.waitFor=function(e){this._isDispatching||r(!1,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var t=0;t<e.length;t++){var n=e[t];this._isPending[n]?this._isHandled[n]||r(!1,"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",n):(this._callbacks[n]||r(!1,"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",n),this._invokeCallback(n))}},e.prototype.dispatch=function(e){this._isDispatching&&r(!1,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this._startDispatching(e);try{for(var t in this._callbacks)this._isPending[t]||this._invokeCallback(t)}finally{this._stopDispatching()}},e.prototype.isDispatching=function(){return this._isDispatching},e.prototype._invokeCallback=function(e){this._isPending[e]=!0,this._callbacks[e](this._pendingPayload),this._isHandled[e]=!0},e.prototype._startDispatching=function(e){for(var t in this._callbacks)this._isPending[t]=!1,this._isHandled[t]=!1;this._pendingPayload=e,this._isDispatching=!0},e.prototype._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},e}();e.exports=o},function(e,t){e.exports="img/element-desktop-logo.93fc5eb.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this._acquired=!1,this._waitingResolvers=[]}get acquired(){return this._acquired}acquireAsync(){return this._acquired?new Promise(e=>{this._waitingResolvers.push(e)}):(this._acquired=!0,Promise.resolve())}tryAcquire(){return!this._acquired&&(this._acquired=!0,!0)}release(){if(!this._acquired)throw new Error("Cannot release an unacquired lock");if(this._waitingResolvers.length>0){this._waitingResolvers.shift()()}else this._acquired=!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(78),a=n.n(i),s=n(89),c=n(80);class l extends a.a.Component{constructor(...e){super(...e),o()(this,"unmounted",!1),o()(this,"state",{component:null,error:null}),o()(this,"onWrapperCancelClick",()=>{this.props.onFinished(!1)})}componentDidMount(){console.log("Starting load of AsyncWrapper for modal"),this.props.prom.then(e=>{if(this.unmounted)return;const t=e.default?e.default:e;this.setState({component:t})}).catch(e=>{console.warn("AsyncWrapper promise failed",e),this.setState({error:e})})}componentWillUnmount(){this.unmounted=!0}render(){if(this.state.component){const e=this.state.component;return a.a.createElement(e,this.props)}if(this.state.error){const e=s.getComponent("views.dialogs.BaseDialog"),t=s.getComponent("views.elements.DialogButtons");return a.a.createElement(e,{onFinished:this.props.onFinished,title:Object(c.a)("Error")},Object(c.a)("Unable to load! Check your network connectivity and try again."),a.a.createElement(t,{primaryButton:Object(c.a)("Dismiss"),onPrimaryButtonClick:this.onWrapperCancelClick,hasCancel:!1}))}{const e=s.getComponent("elements.Spinner");return a.a.createElement(e,null)}}}},function(e,t,n){"use strict";(function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case o:case a:case i:case h:return p;default:var f=p&&p.$$typeof;switch(f){case c:case d:case g:case m:case s:return f;default:return t}}case r:return t}}}var E=l,S=u,w=c,C=s,T=n,x=d,k=o,F=g,O=m,R=r,D=a,I=i,A=h,N=!1;function M(e){return y(e)===u}t.AsyncMode=E,t.ConcurrentMode=S,t.ContextConsumer=w,t.ContextProvider=C,t.Element=T,t.ForwardRef=x,t.Fragment=k,t.Lazy=F,t.Memo=O,t.Portal=R,t.Profiler=D,t.StrictMode=I,t.Suspense=A,t.isAsyncMode=function(e){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(e)||y(e)===l},t.isConcurrentMode=M,t.isContextConsumer=function(e){return y(e)===c},t.isContextProvider=function(e){return y(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return y(e)===d},t.isFragment=function(e){return y(e)===o},t.isLazy=function(e){return y(e)===g},t.isMemo=function(e){return y(e)===m},t.isPortal=function(e){return y(e)===r},t.isProfiler=function(e){return y(e)===a},t.isStrictMode=function(e){return y(e)===i},t.isSuspense=function(e){return y(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===a||e===i||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===b||e.$$typeof===v||e.$$typeof===f)},t.typeOf=y})()},function(e,t,n){"use strict";var r=n(305),o=n(370),i=n(533),a=n(951),s=Function.call.bind(Object.prototype.hasOwnProperty),c=function(){};function l(){return null}c=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},e.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator;var u={array:m("array"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:p(l),arrayOf:function(e){return p((function(t,n,r,o,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new h("Invalid "+o+" `"+a+"` of type `"+f(s)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<s.length;c++){var l=e(s,c,r,o,a+"["+c+"]",i);if(l instanceof Error)return l}return null}))},element:p((function(t,n,r,o,i){var a=t[n];return e(a)?null:new h("Invalid "+o+" `"+i+"` of type `"+f(a)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:p((function(e,t,n,o,i){var a=e[t];return r.isValidElementType(a)?null:new h("Invalid "+o+" `"+i+"` of type `"+f(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return p((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||"<<anonymous>>";return new h("Invalid "+o+" `"+i+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}))},node:p((function(e,t,n,r,o){return g(e[t])?null:new h("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,n,r,o,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=f(c);if("object"!==l)return new h("Invalid "+o+" `"+a+"` of type `"+l+"` supplied to `"+r+"`, expected an object.");for(var u in c)if(s(c,u)){var d=e(c,u,r,o,a+"."+u,i);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return c(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),l;function t(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(d(a,e[s]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===_(t)?String(t):t}));return new h("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+c+".")}return p(t)},oneOfType:function(e){if(!Array.isArray(e))return c("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return c("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(n)+" at index "+t+"."),l}return p((function(t,n,r,o,a){for(var s=0;s<e.length;s++){if(null==(0,e[s])(t,n,r,o,a,i))return null}return new h("Invalid "+o+" `"+a+"` supplied to `"+r+"`.")}))},shape:function(e){return p((function(t,n,r,o,a){var s=t[n],c=f(s);if("object"!==c)return new h("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var u=e[l];if(u){var d=u(s,l,r,o,a+"."+l,i);if(d)return d}}return null}))},exact:function(e){return p((function(t,n,r,a,s){var c=t[n],l=f(c);if("object"!==l)return new h("Invalid "+a+" `"+s+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");var u=o({},t[n],e);for(var d in u){var p=e[d];if(!p)return new h("Invalid "+a+" `"+s+"` key `"+d+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(c,d,r,a,s+"."+d,i);if(m)return m}return null}))}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){this.message=e,this.stack=""}function p(e){var n={},r=0;function o(o,a,s,l,u,d,p){if(l=l||"<<anonymous>>",d=d||s,p!==i){if(t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("undefined"!=typeof console){var g=l+":"+s;!n[g]&&r<3&&(c("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return null==a[s]?o?null===a[s]?new h("The "+u+" `"+d+"` is marked as required in `"+l+"`, but its value is `null`."):new h("The "+u+" `"+d+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(a,s,l,u,d)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function m(e){return p((function(t,n,r,o,i,a){var s=t[n];return f(s)!==e?new h("Invalid "+o+" `"+i+"` of type `"+_(s)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function g(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(g);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!g(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!g(a[1]))return!1}return!0;default:return!1}}function f(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function _(e){if(null==e)return""+e;var t=f(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){var t=_(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=a,u.resetWarningCache=a.resetWarningCache,u.PropTypes=u,u}},function(e,t,n){"use strict";var r=function(){},o=n(533),i={},a=Function.call.bind(Object.prototype.hasOwnProperty);function s(e,t,n,s,c){for(var l in e)if(a(e,l)){var u;try{if("function"!=typeof e[l]){var d=Error((s||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.");throw d.name="Invariant Violation",d}u=e[l](t,l,s,n,null,o)}catch(e){u=e}if(!u||u instanceof Error||r((s||"React class")+": type specification of "+n+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var h=c?c():"";r("Failed "+n+" type: "+u.message+(null!=h?h:""))}}}r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},s.resetWarningCache=function(){i={}},e.exports=s},function(e,t,n){"use strict";var r=n(170),o=n(118);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(99)),a=o(n(92)),s=r(n(78)),c=o(n(535)),l=o(n(971)),u=s.forwardRef((function(e,t){return s.createElement(c.default,(0,a.default)({sideCar:l.default,ref:t},e))})),d=c.default.propTypes||{},h=(d.sideCar,(0,i.default)(d,["sideCar"]));u.propTypes=h;var p=u;t.default=p},function(e,t,n){var r=n(954),o=n(955),i=n(536),a=n(956);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(262);t.assignRef=r.assignRef;var o=n(384);t.useCallbackRef=o.useCallbackRef;var i=n(385);t.createCallbackRef=i.createCallbackRef;var a=n(958);t.mergeRefs=a.mergeRefs;var s=n(959);t.useMergeRefs=s.useMergeRefs;var c=n(960);t.useTransformRef=c.useTransformRef;var l=n(961);t.transformRef=l.transformRef;var u=n(962);t.refToCallback=u.refToCallback,t.useRefToCallback=u.useRefToCallback},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(385),o=n(262);t.mergeRefs=function(e){return r.createCallbackRef((function(t){return e.forEach((function(e){return o.assignRef(e,t)}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(384),o=n(262);t.useMergeRefs=function(e,t){return r.useCallbackRef(t,(function(t){return e.forEach((function(e){return o.assignRef(e,t)}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(384),o=n(262);t.useTransformRef=function(e,t){return r.useCallbackRef(void 0,(function(n){return o.assignRef(e,t(n))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(262),o=n(385);t.transformRef=function(e,t){return o.createCallbackRef((function(n){return r.assignRef(e,t(n))}))}},function(e,t,n){"use strict";function r(e){return function(t){"function"==typeof e?e(t):e&&(e.current=t)}}Object.defineProperty(t,"__esModule",{value:!0}),t.refToCallback=r;var o=function(){return null},i=new WeakMap;t.useRefToCallback=function(e){return function(e){var t=e||o;if(i.has(t))return i.get(t);var n=r(t);return i.set(t,n),n}(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(964);t.sidecar=r.sidecar;var o=n(539);t.useSidecar=o.useSidecar;var i=n(967);t.setConfig=i.setConfig;var a=n(968);t.createMedium=a.createMedium,t.createSidecarMedium=a.createSidecarMedium;var s=n(969);t.renderCar=s.renderCar;var c=n(970);t.exportSidecar=c.exportSidecar},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(306),o=n(78),i=n(539);t.sidecar=function(e,t){var n=function(){return t};return function(a){var s=i.useSidecar(e,a.sideCar),c=s[0];return s[1]&&t?n:c?o.createElement(c,r.__assign({},a)):null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(966);t.env={isNode:r.isNode,forceCache:!1}},function(e,t){e.exports.isNode=!1},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config={onError:function(e){return console.error(e)}},t.setConfig=function(e){Object.assign(t.config,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(306);function o(e){return e}function i(e,t){void 0===t&&(t=o);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}t.createMedium=function(e,t){return void 0===t&&(t=o),i(e,t)},t.createSidecarMedium=function(e){void 0===e&&(e={});var t=i(null);return t.options=r.__assign({async:!0,ssr:!1},e),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(306),o=n(78),i=n(78);t.renderCar=function(e,t,n){function a(t){var n=t.stateRef,a=t.props,s=i.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.useLayoutEffect((function(){n.current(e)})),null}),[]);return o.createElement(e,r.__assign({},a,{children:s}))}void 0===n&&(n={});var s=o.memo((function(e){var t=e.stateRef,n=e.defaultState,r=e.children,a=i.useState(n.current),s=a[0],c=a[1];return o.useEffect((function(){t.current=c}),[]),r.apply(void 0,s)}),(function(){return!0}));return function(e){var n=o.useRef(t(e)),r=o.useRef((function(e){return n.current=e}));return o.createElement(o.Fragment,null,o.createElement(a,{stateRef:r,props:e}),o.createElement(s,{stateRef:r,defaultState:n,children:e.children}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(306),o=n(78),i=function(e){var t=e.sideCar,n=r.__rest(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return o.createElement(i,r.__assign({},n))};i.isSideCarExport=!0,t.exportSidecar=function(e,t){return e.useMedium(t),i}},function(e,t,n){"use strict";var r=n(170),o=n(118);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(972)),a=(r(n(78)),o(n(88))),s=o(n(976)),c=r(n(978)),l=n(310),u=n(386),d=function(){return document&&document.activeElement===document.body||(0,c.focusIsHidden)()},h=null,p=null,m=null,g=!1,f=function(){return!0};function _(e,t,n,r){var o=null,i=e;do{var a=r[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=n)!==t);o&&(o.node.tabIndex=0)}var b=function(e){return e&&"current"in e?e.current:e},v=function(){var e,t=!1;if(h){var n=h,r=n.observed,o=n.persistentFocus,a=n.autoFocus,s=n.shards,l=n.crossFrame,u=r||m&&m.portaledElement,v=document&&document.activeElement;if(u){var y=[u].concat((0,i.default)(s.map(b).filter(Boolean)));if(v&&!function(e){return(h.whiteList||f)(e)}(v)||(o||(l?Boolean(g):"meanwhile"===g)||!d()||!p&&a)&&(!u||(0,c.focusInside)(y)||(e=v,m&&m.portaledElement===e)||(document&&!p&&v&&!a?(v.blur&&v.blur(),document.body.focus()):(t=(0,c.default)(y,p),m={})),g=!1,p=document&&document.activeElement),document){var E=document&&document.activeElement,S=(0,c.getFocusabledIn)(y),w=S.map((function(e){return e.node})).indexOf(E);w>-1&&(S.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),_(w,S.length,1,S),_(w,-1,-1,S))}}}return t},y=function(e){v()&&e&&(e.stopPropagation(),e.preventDefault())},E=function(){return(0,l.deferAction)(v)},S=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(m={observerNode:n,portaledElement:t})};a.default.node.isRequired;var w=function(){g="just",setTimeout((function(){g="meanwhile"}),0)};u.mediumFocus.assignSyncMedium(S),u.mediumBlur.assignMedium(E),u.mediumEffect.assignMedium((function(e){return e({moveFocusInside:c.default,focusInside:c.focusInside})}));var C=(0,s.default)((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!h&&(document.addEventListener("focusin",y,!0),document.addEventListener("focusout",E),window.addEventListener("blur",w));var n=h,r=n&&t&&t.id===n.id;h=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(p=null,r&&n.observed===t.observed||t.onActivation(),v(),(0,l.deferAction)(v)):(document.removeEventListener("focusin",y,!0),document.removeEventListener("focusout",E),window.removeEventListener("blur",w),p=null)}))((function(){return null}));t.default=C},function(e,t,n){var r=n(973),o=n(974),i=n(536),a=n(975);e.exports=function(e){return r(e)||o(e)||i(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(537);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=r(n(540)),i=r(n(79)),a=n(78),s=r(a);e.exports=function(e,t){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");return function(n){if("function"!=typeof n)throw new Error("Expected WrappedComponent to be a React component.");var r,c=[];function l(){r=e(c.map((function(e){return e.props}))),t(r)}var u=function(e){function t(){return e.apply(this,arguments)||this}o(t,e),t.peek=function(){return r};var i=t.prototype;return i.componentDidMount=function(){c.push(this),l()},i.componentDidUpdate=function(){l()},i.componentWillUnmount=function(){var e=c.indexOf(this);c.splice(e,1),l()},i.render=function(){return s.createElement(n,this.props)},t}(a.PureComponent);return i(u,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(n)+")"),u}}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(181),o=r.__importStar(n(193));t.constants=o;var i=n(979);t.getFocusabledIn=i.getFocusabledIn;var a=n(983);t.focusInside=a.focusInside;var s=n(984);t.focusIsHidden=s.focusIsHidden;var c=n(542);t.focusMerge=c.getFocusMerge;var l=n(986),u=n(987);t.focusNextElement=u.focusNextElement,t.focusPrevElement=u.focusPrevElement;var d=r.__importDefault(n(988));t.tabHook=d.default;var h=n(307);t.getAllAffectedNodes=h.getAllAffectedNodes,t.default=l.setFocus},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(307),o=n(308),i=n(309),a=n(541);t.getFocusabledIn=function(e){var t=r.getAllAffectedNodes(e).filter(i.isNotAGuard),n=a.getTopCommonParent(e,e,t),s=new Map,c=o.getTabbableNodes([n],s,!0),l=o.getTabbableNodes(t,s).filter((function(e){var t=e.node;return i.isNotAGuard(t)})).map((function(e){return e.node}));return c.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:l.indexOf(t)>=0,guard:i.isGuard(t)}}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(209);t.tabSort=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},t.orderByTabIndex=function(e,n,o){return r.toArray(e).map((function(e,t){return{node:e,index:t,tabIndex:o&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(t.tabSort)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(193),o=n(209),i=n(982).tabbables.join(","),a=i+", [data-focus-guard]";t.getFocusables=function(e,t){return e.reduce((function(e,n){return e.concat(o.toArray(n.querySelectorAll(t?a:i)),n.parentNode?o.toArray(n.parentNode.querySelectorAll(i)).filter((function(e){return e===n})):[])}),[])},t.getParentAutofocusables=function(e){var n=e.querySelectorAll("["+r.FOCUS_AUTO+"]");return o.toArray(n).map((function(e){return t.getFocusables([e])})).reduce((function(e,t){return e.concat(t)}),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tabbables=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(307),o=n(209),i=function(e){return Boolean(o.toArray(e.querySelectorAll("iframe")).some((function(e){return e===document.activeElement})))};t.focusInside=function(e){var t=document&&document.activeElement;return!(!t||t.dataset&&t.dataset.focusGuard)&&r.getAllAffectedNodes(e).reduce((function(e,n){return e||n.contains(t)||i(n)}),!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(193),o=n(209);t.focusIsHidden=function(){return document&&o.toArray(document.querySelectorAll("["+r.FOCUS_ALLOW+"]")).some((function(e){return e.contains(document.activeElement)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(543),o=n(544),i=n(309);t.NEW_FOCUS="NEW_FOCUS",t.newFocus=function(e,n,a,s){var c=e.length,l=e[0],u=e[c-1],d=i.isGuard(a);if(!(e.indexOf(a)>=0)){var h=n.indexOf(a),p=s?n.indexOf(s):h,m=s?e.indexOf(s):-1,g=h-p,f=n.indexOf(l),_=n.indexOf(u),b=r.correctNodes(n),v=b.indexOf(a)-(s?b.indexOf(s):h),y=o.pickFocusable(e,0),E=o.pickFocusable(e,c-1);return-1===h||-1===m?t.NEW_FOCUS:!g&&m>=0?m:h<=f&&d&&Math.abs(g)>1?E:h>=_&&d&&Math.abs(g)>1?y:g&&Math.abs(v)>1?m:h<=f?E:h>_?y:g?Math.abs(g)>1?m:(c+m+g)%c:void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(542);t.focusOn=function(e){e.focus(),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()};var o=0,i=!1;t.setFocus=function(e,n){var a=r.getFocusMerge(e,n);if(!i&&a){if(o>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),i=!0,void setTimeout((function(){i=!1}),1);o++,t.focusOn(a.node),o--}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(308),o=function(e,t){if(!e||!t||!t.contains(e))return{};var n=r.getTabbableNodes([t],new Map),o=n.findIndex((function(t){return t.node===e}));return-1===o?{}:{prev:n[o-1],next:n[o+1],first:n[0],last:n[n.length-1]}},i=function(e){return Object.assign({scope:document.body,cycle:!0},e)};t.focusNextElement=function(e,t){void 0===t&&(t={});var n=i(t),r=n.scope,a=n.cycle,s=o(e,r),c=s.next,l=s.first,u=c||a&&l;u&&u.node.focus(t.focusOptions)},t.focusPrevElement=function(e,t){void 0===t&&(t={});var n=i(t),r=n.scope,a=n.cycle,s=o(e,r),c=s.prev,l=s.last,u=c||a&&l;u&&u.node.focus(t.focusOptions)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={attach:function(){},detach:function(){}}},function(e,t,n){"use strict";var r=n(170),o=n(118);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"FocusLockUI",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"AutoFocusInside",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"MoveFocusInside",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"useFocusInside",{enumerable:!0,get:function(){return s.useFocusInside}}),Object.defineProperty(t,"FreeFocusInside",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"InFocusGuard",{enumerable:!0,get:function(){return l.default}}),t.default=void 0;var i=o(n(535)),a=o(n(990)),s=r(n(991)),c=o(n(992)),l=o(n(538)),u=i.default;t.default=u},function(e,t,n){"use strict";var r=n(170),o=n(118);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(92)),a=r(n(78)),s=o(n(88)),c=r(n(193)),l=n(310),u=function(e){var t=e.disabled,n=e.children,r=e.className;return a.createElement("div",(0,i.default)({},(0,l.inlineProp)(c.FOCUS_AUTO,!t),{className:r}),n)};u.propTypes={children:s.default.node.isRequired,disabled:s.default.bool,className:s.default.string},u.defaultProps={disabled:!1,className:void 0};var d=u;t.default=d},function(e,t,n){"use strict";var r=n(170),o=n(118);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.useFocusInside=void 0;var i=o(n(92)),a=r(n(78)),s=o(n(88)),c=r(n(193)),l=n(310),u=n(386),d=function(e){a.useEffect((function(){var t=!0;return u.mediumEffect.useMedium((function(n){var r=e&&e.current;t&&r&&(n.focusInside(r)||n.moveFocusInside(r,null))})),function(){t=!1}}),[e])};function h(e){var t=e.disabled,n=e.className,r=e.children,o=a.useRef(null);return d(t?void 0:o),a.createElement("div",(0,i.default)({},(0,l.inlineProp)(c.FOCUS_AUTO,!t),{ref:o,className:n}),r)}t.useFocusInside=d,h.propTypes={children:s.default.node.isRequired,disabled:s.default.bool,className:s.default.string},h.defaultProps={disabled:!1,className:void 0};var p=h;t.default=p},function(e,t,n){"use strict";var r=n(170),o=n(118);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(92)),a=r(n(78)),s=o(n(88)),c=r(n(193)),l=n(310),u=function(e){var t=e.children,n=e.className;return a.createElement("div",(0,i.default)({},(0,l.inlineProp)(c.FOCUS_ALLOW,!0),{className:n}),t)};u.propTypes={children:s.default.node.isRequired,className:s.default.string},u.defaultProps={className:void 0};var d=u;t.default=d},function(e,t,n){e.exports=function(){return new Worker(n.p+"8e3ab70aa1f93ebcc0d1.worker.js")}},function(e,t,n){"use strict";const r=n(995),o=e=>r({exact:!0}).test(e);o.v4=e=>r.v4({exact:!0}).test(e),o.v6=e=>r.v6({exact:!0}).test(e),o.version=e=>o(e)?o.v4(e)?4:6:void 0,e.exports=o},function(e,t,n){"use strict";const r=e=>e&&e.includeBoundaries?"(?:(?<=\\s|^)(?=[a-fA-F\\d:])|(?<=[a-fA-F\\d:])(?=\\s|$))":"",o="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",i="[a-fA-F\\d]{1,4}",a=`\n(?:\n(?:${i}:){7}(?:${i}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${i}:){6}(?:${o}|:${i}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${i}:){5}(?::${o}|(?::${i}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${i}:){4}(?:(?::${i}){0,1}:${o}|(?::${i}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${i}:){3}(?:(?::${i}){0,2}:${o}|(?::${i}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${i}:){2}(?:(?::${i}){0,3}:${o}|(?::${i}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${i}:){1}(?:(?::${i}){0,4}:${o}|(?::${i}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${i}){0,5}:${o}|(?::${i}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=new RegExp(`(?:^${o}$)|(?:^${a}$)`),c=new RegExp(`^${o}$`),l=new RegExp(`^${a}$`),u=e=>e&&e.exact?s:new RegExp(`(?:${r(e)}${o}${r(e)})|(?:${r(e)}${a}${r(e)})`,"g");u.v4=e=>e&&e.exact?c:new RegExp(`${r(e)}${o}${r(e)}`,"g"),u.v6=e=>e&&e.exact?l:new RegExp(`${r(e)}${a}${r(e)}`,"g"),e.exports=u},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(553),s=n(191),c=n(997),l={pure:!0,withProps:!1};e.exports={create:function(e,t){var n;(n=e).getStores||s(!1,"Components that use FluxContainer must implement `static getStores()`"),n.calculateState||s(!1,"Components that use FluxContainer must implement `static calculateState()`");var u=r({},l,t||{}),d=function(t){function n(r){o(this,n),t.call(this,r),this.state=u.withProps?e.calculateState(null,r):e.calculateState(null,void 0)}return i(n,t),n.prototype.componentDidMount=function(){var n=this;t.prototype.componentDidMount&&t.prototype.componentDidMount.call(this);var r=e.getStores(),o=!1,i=function(){o=!0};this._fluxContainerSubscriptions=r.map((function(e){return e.addListener(i)}));this._fluxContainerStoreGroup=new a(r,(function(){o&&n.setState((function(t){return u.withProps?e.calculateState(t,n.props):e.calculateState(t,void 0)})),o=!1}))},n.prototype.componentWillReceiveProps=function(n,r){t.prototype.componentWillReceiveProps&&t.prototype.componentWillReceiveProps.call(this,n,r),u.withProps&&(u.pure&&c(this.props,n)||this.setState((function(t){return e.calculateState(t,n)})))},n.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount&&t.prototype.componentWillUnmount.call(this),this._fluxContainerStoreGroup.release();var e=this._fluxContainerSubscriptions,n=Array.isArray(e),r=0;for(e=n?e:e[Symbol.iterator]();;){var o;if(n){if(r>=e.length)break;o=e[r++]}else{if((r=e.next()).done)break;o=r.value}o.remove()}this._fluxContainerSubscriptions=[]},n}(e),h=u.pure?function(e){function t(){o(this,t),e.apply(this,arguments)}return i(t,e),t.prototype.shouldComponentUpdate=function(e,t){return!c(this.props,e)||!c(this.state,t)},t}(d):d,p=e.displayName||e.name;return h.displayName="FluxContainer("+p+")",h}}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;e.exports=function(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var i=r.bind(t),a=0;a<n.length;a++)if(!i(n[a])||e[n[a]]!==t[n[a]])return!1;return!0}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(554),i=n(1005),a=n(191),s=function(e){function t(){r(this,t),e.apply(this,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getInitialState=function(){return i.Map()},t.prototype.at=function(e){return this.has(e)||a(!1,"Expected store to have key %s",e),this.get(e)},t.prototype.has=function(e){return this.getState().has(e)},t.prototype.get=function(e){return this.getState().get(e)},t.prototype.getAll=function(e,t){var n=this,r=i.Set(e),o=t||i.Map();return o.withMutations((function(e){var t=o,i=Array.isArray(t),a=0;for(t=i?t:t[Symbol.iterator]();;){var s;if(i){if(a>=t.length)break;s=t[a++]}else{if((a=t.next()).done)break;s=a.value}var c=s[0];r.has(c)&&n.has(c)||e.delete(c)}var l=r,u=Array.isArray(l),d=0;for(l=u?l:l[Symbol.iterator]();;){var h;if(u){if(d>=l.length)break;h=l[d++]}else{if((d=l.next()).done)break;h=d.value}var p=h;n.has(p)&&e.set(p,n.at(p))}}))},t}(o);e.exports=s},function(e,t,n){var r={EventEmitter:n(1e3),EmitterSubscription:n(556)};e.exports=r},function(e,t,n){"use strict";var r=n(556),o=n(1002),i=n(1003),a=n(557),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._subscriber=new o,this._currentSubscription=null}return e.prototype.addListener=function(e,t,n){return this._subscriber.addSubscription(e,new r(this._subscriber,t,n))},e.prototype.once=function(e,t,n){var r=this;return this.addListener(e,(function(){r.removeCurrentListener(),t.apply(n,arguments)}))},e.prototype.removeAllListeners=function(e){this._subscriber.removeAllSubscriptions(e)},e.prototype.removeCurrentListener=function(){this._currentSubscription||a(!1,"Not in an emitting cycle; there is no current subscription"),this._subscriber.removeSubscription(this._currentSubscription)},e.prototype.listeners=function(e){var t=this._subscriber.getSubscriptionsForType(e);return t?t.filter(i.thatReturnsTrue).map((function(e){return e.listener})):[]},e.prototype.emit=function(e){var t=this._subscriber.getSubscriptionsForType(e);if(t){for(var n=Object.keys(t),r=0;r<n.length;r++){var o=n[r],i=t[o];i&&(this._currentSubscription=i,this.__emitToSubscription.apply(this,[i].concat(Array.prototype.slice.call(arguments))))}this._currentSubscription=null}},e.prototype.__emitToSubscription=function(e,t){var n=Array.prototype.slice.call(arguments,2);e.listener.apply(e.context,n)},e}();e.exports=s},function(e,t,n){"use strict";var r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.subscriber=t}return e.prototype.remove=function(){this.subscriber&&(this.subscriber.removeSubscription(this),this.subscriber=null)},e}();e.exports=r},function(e,t,n){"use strict";var r=n(557),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._subscriptionsForType={},this._currentSubscription=null}return e.prototype.addSubscription=function(e,t){t.subscriber!==this&&r(!1,"The subscriber of the subscription is incorrectly set."),this._subscriptionsForType[e]||(this._subscriptionsForType[e]=[]);var n=this._subscriptionsForType[e].length;return this._subscriptionsForType[e].push(t),t.eventType=e,t.key=n,t},e.prototype.removeAllSubscriptions=function(e){void 0===e?this._subscriptionsForType={}:delete this._subscriptionsForType[e]},e.prototype.removeSubscription=function(e){var t=e.eventType,n=e.key,r=this._subscriptionsForType[t];r&&delete r[n]},e.prototype.getSubscriptionsForType=function(e){return this._subscriptionsForType[e]},e}();e.exports=o},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=n(191);e.exports=function(e,t){r(!1,"Subclasses of %s must override %s() with their own implementation.",e,t)}},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:V(e)}function r(e){return s(e)?e:q(e)}function o(e){return c(e)?e:H(e)}function i(e){return a(e)&&!l(e)?e:z(e)}function a(e){return!(!e||!e[d])}function s(e){return!(!e||!e[h])}function c(e){return!(!e||!e[p])}function l(e){return s(e)||c(e)}function u(e){return!(!e||!e[m])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=c,n.isAssociative=l,n.isOrdered=u,n.Keyed=r,n.Indexed=o,n.Set=i;var d="@@__IMMUTABLE_ITERABLE__@@",h="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",m="@@__IMMUTABLE_ORDERED__@@",g={},f={value:!1},_={value:!1};function b(e){return e.value=!1,e}function v(e){e&&(e.value=!0)}function y(){}function E(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function S(e){return void 0===e.size&&(e.size=e.__iterate(C)),e.size}function w(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?S(e)+t:t}function C(){return!0}function T(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function x(e,t){return F(e,t,0)}function k(e,t){return F(e,t,t)}function F(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var O,R,D,I="function"==typeof Symbol&&Symbol.iterator,A=I||"@@iterator";function N(e){this.next=e}function M(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function P(){return{value:void 0,done:!0}}function L(e){return!!B(e)}function j(e){return e&&"function"==typeof e.next}function U(e){var t=B(e);return t&&t.call(e)}function B(e){var t=e&&(I&&e[I]||e["@@iterator"]);if("function"==typeof t)return t}function G(e){return e&&"number"==typeof e.length}function V(e){return null==e?J():a(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new K(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function q(e){return null==e?J().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():X(e)}function H(e){return null==e?J():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():Z(e)}function z(e){return(null==e?J():a(e)?s(e)?e.entrySeq():e:Z(e)).toSetSeq()}function W(e){this._array=e,this.size=e.length}function K(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function Y(e){this._iterable=e,this.size=e.length||e.size}function $(e){this._iterator=e,this._iteratorCache=[]}function Q(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function J(){return O||(O=new W([]))}function X(e){var t=Array.isArray(e)?new W(e).fromEntrySeq():j(e)?new $(e).fromEntrySeq():L(e)?new Y(e).fromEntrySeq():"object"==typeof e?new K(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function Z(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return G(e)?new W(e):j(e)?new $(e):L(e)?new Y(e):void 0}function te(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function ne(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new N((function(){var e=o[n?i-a:a];return a++>i?{value:void 0,done:!0}:M(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function re(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,H(n).map((function(r,o){return e(t,r,o,n)}))):ie(n)?t.call(o,r,q(n).map((function(r,o){return e(t,r,o,n)}))):n}(t,e,"",{"":e}):oe(e)}function oe(e){return Array.isArray(e)?H(e).map(oe).toList():ie(e)?q(e).map(oe).toMap():e}function ie(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function se(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||c(e)!==c(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!l(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ae(o[1],e)&&(n||ae(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var d=!0,h=t.__iterate((function(t,r){if(n?!e.has(t):o?!ae(t,e.get(r,g)):!ae(e.get(r,g),t))return d=!1,!1}));return d&&e.size===h}function ce(e,t){if(!(this instanceof ce))return new ce(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(R)return R;R=this}}function le(e,t){if(!e)throw new Error(t)}function ue(e,t,n){if(!(this instanceof ue))return new ue(e,t,n);if(le(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(D)return D;D=this}}function de(){throw TypeError("Abstract")}function he(){}function pe(){}function me(){}N.prototype.toString=function(){return"[Iterator]"},N.KEYS=0,N.VALUES=1,N.ENTRIES=2,N.prototype.inspect=N.prototype.toSource=function(){return this.toString()},N.prototype[A]=function(){return this},t(V,n),V.of=function(){return V(arguments)},V.prototype.toSeq=function(){return this},V.prototype.toString=function(){return this.__toString("Seq {","}")},V.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},V.prototype.__iterate=function(e,t){return te(this,e,t,!0)},V.prototype.__iterator=function(e,t){return ne(this,e,t,!0)},t(q,V),q.prototype.toKeyedSeq=function(){return this},t(H,V),H.of=function(){return H(arguments)},H.prototype.toIndexedSeq=function(){return this},H.prototype.toString=function(){return this.__toString("Seq [","]")},H.prototype.__iterate=function(e,t){return te(this,e,t,!1)},H.prototype.__iterator=function(e,t){return ne(this,e,t,!1)},t(z,V),z.of=function(){return z(arguments)},z.prototype.toSetSeq=function(){return this},V.isSeq=Q,V.Keyed=q,V.Set=z,V.Indexed=H,V.prototype["@@__IMMUTABLE_SEQ__@@"]=!0,t(W,H),W.prototype.get=function(e,t){return this.has(e)?this._array[w(this,e)]:t},W.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},W.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new N((function(){return o>r?{value:void 0,done:!0}:M(e,o,n[t?r-o++:o++])}))},t(K,q),K.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},K.prototype.has=function(e){return this._object.hasOwnProperty(e)},K.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},K.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new N((function(){var a=r[t?o-i:i];return i++>o?{value:void 0,done:!0}:M(e,a,n[a])}))},K.prototype[m]=!0,t(Y,H),Y.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=U(this._iterable),r=0;if(j(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},Y.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=U(this._iterable);if(!j(n))return new N(P);var r=0;return new N((function(){var t=n.next();return t.done?t:M(e,r++,t.value)}))},t($,H),$.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,i=0;i<o.length;)if(!1===e(o[i],i++,this))return i;for(;!(n=r.next()).done;){var a=n.value;if(o[i]=a,!1===e(a,i++,this))break}return i},$.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,o=0;return new N((function(){if(o>=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return M(e,o,r[o++])}))},t(ce,H),ce.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ce.prototype.get=function(e,t){return this.has(e)?this._value:t},ce.prototype.includes=function(e){return ae(this._value,e)},ce.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:new ce(this._value,k(t,n)-x(e,n))},ce.prototype.reverse=function(){return this},ce.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},ce.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},ce.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ce.prototype.__iterator=function(e,t){var n=this,r=0;return new N((function(){return r<n.size?M(e,r++,n._value):{value:void 0,done:!0}}))},ce.prototype.equals=function(e){return e instanceof ce?ae(this._value,e._value):se(e)},t(ue,H),ue.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},ue.prototype.get=function(e,t){return this.has(e)?this._start+w(this,e)*this._step:t},ue.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},ue.prototype.slice=function(e,t){return T(e,t,this.size)?this:(e=x(e,this.size),(t=k(t,this.size))<=e?new ue(0,0):new ue(this.get(e,this._end),this.get(t,this._end),this._step))},ue.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},ue.prototype.lastIndexOf=function(e){return this.indexOf(e)},ue.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;i<=n;i++){if(!1===e(o,i,this))return i+1;o+=t?-r:r}return i},ue.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;return new N((function(){var a=o;return o+=t?-r:r,i>n?{value:void 0,done:!0}:M(e,i++,a)}))},ue.prototype.equals=function(e){return e instanceof ue?this._start===e._start&&this._end===e._end&&this._step===e._step:se(this,e)},t(de,n),t(he,de),t(pe,de),t(me,de),de.Keyed=he,de.Indexed=pe,de.Set=me;var ge="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function fe(e){return e>>>1&1073741824|3221225471&e}function _e(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return fe(n)}if("string"===t)return e.length>Te?function(e){var t=Fe[e];return void 0===t&&(t=be(e),ke===xe&&(ke=0,Fe={}),ke++,Fe[e]=t),t}(e):be(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(Se&&void 0!==(t=ve.get(e)))return t;if(void 0!==(t=e[Ce]))return t;if(!Ee){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ce]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++we,1073741824&we&&(we=0),Se)ve.set(e,t);else{if(void 0!==ye&&!1===ye(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Ee)Object.defineProperty(e,Ce,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ce]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ce]=t}}return t}(e);if("function"==typeof e.toString)return be(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function be(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return fe(t)}var ve,ye=Object.isExtensible,Ee=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Se="function"==typeof WeakMap;Se&&(ve=new WeakMap);var we=0,Ce="__immutablehash__";"function"==typeof Symbol&&(Ce=Symbol(Ce));var Te=16,xe=255,ke=0,Fe={};function Oe(e){le(e!==1/0,"Cannot perform this action with an infinite size.")}function Re(e){return null==e?He():De(e)&&!u(e)?e:He().withMutations((function(t){var n=r(e);Oe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function De(e){return!(!e||!e[Ae])}t(Re,he),Re.of=function(){var t=e.call(arguments,0);return He().withMutations((function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},Re.prototype.toString=function(){return this.__toString("Map {","}")},Re.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Re.prototype.set=function(e,t){return ze(this,e,t)},Re.prototype.setIn=function(e,t){return this.updateIn(e,g,(function(){return t}))},Re.prototype.remove=function(e){return ze(this,e,g)},Re.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return g}))},Re.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Re.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,o){var i=t===g,a=n.next();if(a.done){var s=i?r:t,c=o(s);return c===s?t:c}le(i||t&&t.set,"invalid keyPath");var l=a.value,u=i?g:t.get(l,g),d=e(u,n,r,o);return d===u?t:d===g?t.remove(l):(i?He():t).set(l,d)}(this,$t(e),t,n);return r===g?void 0:r},Re.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):He()},Re.prototype.merge=function(){return $e(this,void 0,arguments)},Re.prototype.mergeWith=function(t){var n=e.call(arguments,1);return $e(this,t,n)},Re.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,He(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Re.prototype.mergeDeep=function(){return $e(this,Qe,arguments)},Re.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return $e(this,Je(t),n)},Re.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,He(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Re.prototype.sort=function(e){return Et(jt(this,e))},Re.prototype.sortBy=function(e,t){return Et(jt(this,t,e))},Re.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Re.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new y)},Re.prototype.asImmutable=function(){return this.__ensureOwner()},Re.prototype.wasAltered=function(){return this.__altered},Re.prototype.__iterator=function(e,t){return new Be(this,e,t)},Re.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Re.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?qe(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Re.isMap=De;var Ie,Ae="@@__IMMUTABLE_MAP__@@",Ne=Re.prototype;function Me(e,t){this.ownerID=e,this.entries=t}function Pe(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Le(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Ue(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Be(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&Ve(e._root)}function Ge(e,t){return M(e,t[0],t[1])}function Ve(e,t){return{node:e,index:0,__prev:t}}function qe(e,t,n,r){var o=Object.create(Ne);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function He(){return Ie||(Ie=qe(0))}function ze(e,t,n){var r,o;if(e._root){var i=b(f),a=b(_);if(r=We(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===g?-1:1:0)}else{if(n===g)return e;o=1,r=new Me(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?qe(o,r):He()}function We(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===g?e:(v(s),v(a),new Ue(t,r,[o,i]))}function Ke(e){return e.constructor===Ue||e.constructor===je}function Ye(e,t,n,r,o){if(e.keyHash===r)return new je(t,r,[e.entry,o]);var i,a=31&(0===n?e.keyHash:e.keyHash>>>n),s=31&(0===n?r:r>>>n);return new Pe(t,1<<a|1<<s,a===s?[Ye(e,t,n+5,r,o)]:(i=new Ue(t,r,o),a<s?[e,i]:[i,e]))}function $e(e,t,n){for(var o=[],i=0;i<n.length;i++){var s=n[i],c=r(s);a(s)||(c=c.map((function(e){return re(e)}))),o.push(c)}return Xe(e,t,o)}function Qe(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ae(e,t)?e:t}function Je(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var o=e(t,n,r);return ae(t,o)?t:o}}function Xe(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,g,(function(e){return e===g?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},o=0;o<n.length;o++)n[o].forEach(r)})):e.constructor(n[0])}function Ze(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,n,r){var o=r?e:E(e);return o[t]=n,o}Ne[Ae]=!0,Ne.delete=Ne.remove,Ne.removeIn=Ne.deleteIn,Me.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ae(n,o[i][0]))return o[i][1];return r},Me.prototype.update=function(e,t,n,r,o,i,a){for(var s=o===g,c=this.entries,l=0,u=c.length;l<u&&!ae(r,c[l][0]);l++);var d=l<u;if(d?c[l][1]===o:s)return this;if(v(a),(s||!d)&&v(i),!s||1!==c.length){if(!d&&!s&&c.length>=tt)return function(e,t,n,r){e||(e=new y);for(var o=new Ue(e,_e(n),[n,r]),i=0;i<t.length;i++){var a=t[i];o=o.update(e,0,void 0,a[0],a[1])}return o}(e,c,r,o);var h=e&&e===this.ownerID,p=h?c:E(c);return d?s?l===u-1?p.pop():p[l]=p.pop():p[l]=[r,o]:p.push([r,o]),h?(this.entries=p,this):new Me(e,p)}},Pe.prototype.get=function(e,t,n,r){void 0===t&&(t=_e(n));var o=1<<(31&(0===e?t:t>>>e)),i=this.bitmap;return 0==(i&o)?r:this.nodes[Ze(i&o-1)].get(e+5,t,n,r)},Pe.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=_e(r));var s=31&(0===t?n:n>>>t),c=1<<s,l=this.bitmap,u=0!=(l&c);if(!u&&o===g)return this;var d=Ze(l&c-1),h=this.nodes,p=u?h[d]:void 0,m=We(p,e,t+5,n,r,o,i,a);if(m===p)return this;if(!u&&m&&h.length>=nt)return function(e,t,n,r,o){for(var i=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[i++]:void 0;return a[r]=o,new Le(e,i+1,a)}(e,h,l,s,m);if(u&&!m&&2===h.length&&Ke(h[1^d]))return h[1^d];if(u&&m&&1===h.length&&Ke(m))return m;var f=e&&e===this.ownerID,_=u?m?l:l^c:l|c,b=u?m?et(h,d,m,f):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a<r;a++)a===t&&(i=1),o[a]=e[a+i];return o}(h,d,f):function(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,s=0;s<o;s++)s===t?(i[s]=n,a=-1):i[s]=e[s+a];return i}(h,d,m,f);return f?(this.bitmap=_,this.nodes=b,this):new Pe(e,_,b)},Le.prototype.get=function(e,t,n,r){void 0===t&&(t=_e(n));var o=31&(0===e?t:t>>>e),i=this.nodes[o];return i?i.get(e+5,t,n,r):r},Le.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=_e(r));var s=31&(0===t?n:n>>>t),c=o===g,l=this.nodes,u=l[s];if(c&&!u)return this;var d=We(u,e,t+5,n,r,o,i,a);if(d===u)return this;var h=this.count;if(u){if(!d&&--h<rt)return function(e,t,n,r){for(var o=0,i=0,a=new Array(n),s=0,c=1,l=t.length;s<l;s++,c<<=1){var u=t[s];void 0!==u&&s!==r&&(o|=c,a[i++]=u)}return new Pe(e,o,a)}(e,l,h,s)}else h++;var p=e&&e===this.ownerID,m=et(l,s,d,p);return p?(this.count=h,this.nodes=m,this):new Le(e,h,m)},je.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(ae(n,o[i][0]))return o[i][1];return r},je.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=_e(r));var s=o===g;if(n!==this.keyHash)return s?this:(v(a),v(i),Ye(this,e,t,n,[r,o]));for(var c=this.entries,l=0,u=c.length;l<u&&!ae(r,c[l][0]);l++);var d=l<u;if(d?c[l][1]===o:s)return this;if(v(a),(s||!d)&&v(i),s&&2===u)return new Ue(e,this.keyHash,c[1^l]);var h=e&&e===this.ownerID,p=h?c:E(c);return d?s?l===u-1?p.pop():p[l]=p.pop():p[l]=[r,o]:p.push([r,o]),h?(this.entries=p,this):new je(e,this.keyHash,p)},Ue.prototype.get=function(e,t,n,r){return ae(n,this.entry[0])?this.entry[1]:r},Ue.prototype.update=function(e,t,n,r,o,i,a){var s=o===g,c=ae(r,this.entry[0]);return(c?o===this.entry[1]:s)?this:(v(a),s?void v(i):c?e&&e===this.ownerID?(this.entry[1]=o,this):new Ue(e,this.keyHash,[r,o]):(v(i),Ye(this,e,t,_e(r),[r,o])))},Me.prototype.iterate=je.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Pe.prototype.iterate=Le.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},Ue.prototype.iterate=function(e,t){return e(this.entry)},t(Be,N),Be.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0===o)return Ge(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return Ge(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){var i=r.nodes[this._reverse?n-o:o];if(i){if(i.entry)return Ge(e,i.entry);t=this._stack=Ve(i,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var tt=8,nt=16,rt=8;function ot(e){var t=mt();if(null==e)return t;if(it(e))return e;var n=o(e),r=n.size;return 0===r?t:(Oe(r),r>0&&r<32?pt(0,r,5,null,new ct(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function it(e){return!(!e||!e[at])}t(ot,pe),ot.of=function(){return this(arguments)},ot.prototype.toString=function(){return this.__toString("List [","]")},ot.prototype.get=function(e,t){if((e=w(this,e))>=0&&e<this.size){var n=_t(this,e+=this._origin);return n&&n.array[31&e]}return t},ot.prototype.set=function(e,t){return function(e,t,n){if((t=w(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?bt(e,t).set(0,n):bt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,i=b(_);return t>=yt(e._capacity)?r=gt(r,e.__ownerID,0,t,n,i):o=gt(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):pt(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},ot.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},ot.prototype.insert=function(e,t){return this.splice(e,0,t)},ot.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):mt()},ot.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){bt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},ot.prototype.pop=function(){return bt(this,0,-1)},ot.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){bt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},ot.prototype.shift=function(){return bt(this,1)},ot.prototype.merge=function(){return vt(this,void 0,arguments)},ot.prototype.mergeWith=function(t){var n=e.call(arguments,1);return vt(this,t,n)},ot.prototype.mergeDeep=function(){return vt(this,Qe,arguments)},ot.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return vt(this,Je(t),n)},ot.prototype.setSize=function(e){return bt(this,0,e)},ot.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:bt(this,x(e,n),k(t,n))},ot.prototype.__iterator=function(e,t){var n=0,r=ht(this,t);return new N((function(){var t=r();return t===dt?{value:void 0,done:!0}:M(e,n++,t)}))},ot.prototype.__iterate=function(e,t){for(var n,r=0,o=ht(this,t);(n=o())!==dt&&!1!==e(n,r++,this););return r},ot.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?pt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},ot.isList=it;var at="@@__IMMUTABLE_LIST__@@",st=ot.prototype;function ct(e,t){this.array=e,this.ownerID=t}st[at]=!0,st.delete=st.remove,st.setIn=Ne.setIn,st.deleteIn=st.removeIn=Ne.removeIn,st.update=Ne.update,st.updateIn=Ne.updateIn,st.mergeIn=Ne.mergeIn,st.mergeDeepIn=Ne.mergeDeepIn,st.withMutations=Ne.withMutations,st.asMutable=Ne.asMutable,st.asImmutable=Ne.asImmutable,st.wasAltered=Ne.wasAltered,ct.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&31;if(r>=this.array.length)return new ct([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-5,n))===a&&i)return this}if(i&&!o)return this;var s=ft(this,e);if(!i)for(var c=0;c<r;c++)s.array[c]=void 0;return o&&(s.array[r]=o),s},ct.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&31;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-5,n))===i&&o===this.array.length-1)return this}var a=ft(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var lt,ut,dt={};function ht(e,t){var n=e._origin,r=e._capacity,o=yt(r),i=e._tail;return a(e._root,e._level,0);function a(e,s,c){return 0===s?function(e,a){var s=a===o?i&&i.array:e&&e.array,c=a>n?0:n-a,l=r-a;return l>32&&(l=32),function(){if(c===l)return dt;var e=t?--l:c++;return s&&s[e]}}(e,c):function(e,o,i){var s,c=e&&e.array,l=i>n?0:n-i>>o,u=1+(r-i>>o);return u>32&&(u=32),function(){for(;;){if(s){var e=s();if(e!==dt)return e;s=null}if(l===u)return dt;var n=t?--u:l++;s=a(c&&c[n],o-5,i+(n<<o))}}}(e,s,c)}}function pt(e,t,n,r,o,i,a){var s=Object.create(st);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function mt(){return lt||(lt=pt(0,0,5))}function gt(e,t,n,r,o,i){var a,s=r>>>n&31,c=e&&s<e.array.length;if(!c&&void 0===o)return e;if(n>0){var l=e&&e.array[s],u=gt(l,t,n-5,r,o,i);return u===l?e:((a=ft(e,t)).array[s]=u,a)}return c&&e.array[s]===o?e:(v(i),a=ft(e,t),void 0===o&&s===a.array.length-1?a.array.pop():a.array[s]=o,a)}function ft(e,t){return t&&e&&t===e.ownerID?e:new ct(e?e.array.slice():[],t)}function _t(e,t){if(t>=yt(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&31],r-=5;return n}}function bt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new y,o=e._origin,i=e._capacity,a=o+t,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return e;if(a>=s)return e.clear();for(var c=e._level,l=e._root,u=0;a+u<0;)l=new ct(l&&l.array.length?[void 0,l]:[],r),u+=1<<(c+=5);u&&(a+=u,o+=u,s+=u,i+=u);for(var d=yt(i),h=yt(s);h>=1<<c+5;)l=new ct(l&&l.array.length?[l]:[],r),c+=5;var p=e._tail,m=h<d?_t(e,s-1):h>d?new ct([],r):p;if(p&&h>d&&a<i&&p.array.length){for(var g=l=ft(l,r),f=c;f>5;f-=5){var _=d>>>f&31;g=g.array[_]=ft(g.array[_],r)}g.array[d>>>5&31]=p}if(s<i&&(m=m&&m.removeAfter(r,0,s)),a>=h)a-=h,s-=h,c=5,l=null,m=m&&m.removeBefore(r,0,a);else if(a>o||h<d){for(u=0;l;){var b=a>>>c&31;if(b!==h>>>c&31)break;b&&(u+=(1<<c)*b),c-=5,l=l.array[b]}l&&a>o&&(l=l.removeBefore(r,c,a-u)),l&&h<d&&(l=l.removeAfter(r,c,h-u)),u&&(a-=u,s-=u)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=c,e._root=l,e._tail=m,e.__hash=void 0,e.__altered=!0,e):pt(a,s,c,l,m)}function vt(e,t,n){for(var r=[],i=0,s=0;s<n.length;s++){var c=n[s],l=o(c);l.size>i&&(i=l.size),a(c)||(l=l.map((function(e){return re(e)}))),r.push(l)}return i>e.size&&(e=e.setSize(i)),Xe(e,t,r)}function yt(e){return e<32?0:e-1>>>5<<5}function Et(e){return null==e?Ct():St(e)?e:Ct().withMutations((function(t){var n=r(e);Oe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function St(e){return De(e)&&u(e)}function wt(e,t,n,r){var o=Object.create(Et.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Ct(){return ut||(ut=wt(He(),mt()))}function Tt(e,t,n){var r,o,i=e._map,a=e._list,s=i.get(t),c=void 0!==s;if(n===g){if(!c)return e;a.size>=32&&a.size>=2*i.size?(r=(o=a.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(c){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):wt(r,o)}function xt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function kt(e){this._iter=e,this.size=e.size}function Ft(e){this._iter=e,this.size=e.size}function Ot(e){this._iter=e,this.size=e.size}function Rt(e){var t=Wt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Kt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new N((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function Dt(e,t,n){var r=Wt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,g);return i===g?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate((function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)}),o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(2,o);return new N((function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return M(r,s,t.call(n,a[1],s,e),o)}))},r}function It(e,t){var n=Wt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Rt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Kt,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function At(e,t,n,r){var o=Wt(e);return r&&(o.has=function(r){var o=e.get(r,g);return o!==g&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,g);return i!==g&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return e.__iterate((function(e,i,c){if(t.call(n,e,i,c))return s++,o(e,r?i:s-1,a)}),i),s},o.__iteratorUncached=function(o,i){var a=e.__iterator(2,i),s=0;return new N((function(){for(;;){var i=a.next();if(i.done)return i;var c=i.value,l=c[0],u=c[1];if(t.call(n,u,l,e))return M(o,r?l:s++,u,i)}}))},o}function Nt(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),T(t,n,o))return e;var i=x(t,o),a=k(n,o);if(i!=i||a!=a)return Nt(e.toSeq().cacheResult(),t,n,r);var s,c=a-i;c==c&&(s=c<0?0:c);var l=Wt(e);return l.size=0===s?s:e.size&&s||void 0,!r&&Q(e)&&s>=0&&(l.get=function(t,n){return(t=w(this,t))>=0&&t<s?e.get(t+i,n):n}),l.__iterateUncached=function(t,n){var o=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,c=!0,l=0;return e.__iterate((function(e,n){if(!c||!(c=a++<i))return l++,!1!==t(e,r?n:l-1,o)&&l!==s})),l},l.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var o=0!==s&&e.__iterator(t,n),a=0,c=0;return new N((function(){for(;a++<i;)o.next();if(++c>s)return{value:void 0,done:!0};var e=o.next();return r||1===t?e:M(t,c-1,0===t?void 0:e.value[1],e)}))},l}function Mt(e,t,n,r){var o=Wt(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,c=0;return e.__iterate((function(e,i,l){if(!s||!(s=t.call(n,e,i,l)))return c++,o(e,r?i:c-1,a)})),c},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=e.__iterator(2,i),c=!0,l=0;return new N((function(){var e,i,u;do{if((e=s.next()).done)return r||1===o?e:M(o,l++,0===o?void 0:e.value[1],e);var d=e.value;i=d[0],u=d[1],c&&(c=t.call(n,u,i,a))}while(c);return 2===o?e:M(o,i,u,e)}))},o}function Pt(e,t){var n=s(e),o=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?X(e):Z(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&s(i)||c(e)&&c(i))return i}var l=new W(o);return n?l=l.toKeyedSeq():c(e)||(l=l.toSetSeq()),(l=l.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),l}function Lt(e,t,n){var r=Wt(e);return r.__iterateUncached=function(r,o){var i=0,s=!1;return function e(c,l){var u=this;c.__iterate((function(o,c){return(!t||l<t)&&a(o)?e(o,l+1):!1===r(o,n?c:i++,u)&&(s=!0),!s}),o)}(e,0),i},r.__iteratorUncached=function(r,o){var i=e.__iterator(r,o),s=[],c=0;return new N((function(){for(;i;){var e=i.next();if(!1===e.done){var l=e.value;if(2===r&&(l=l[1]),t&&!(s.length<t)||!a(l))return n?e:M(r,c++,l,e);s.push(i),i=l.__iterator(r,o)}else i=s.pop()}return{value:void 0,done:!0}}))},r}function jt(e,t,n){t||(t=Yt);var r=s(e),o=0,i=e.toSeq().map((function(t,r){return[r,t,o++,n?n(t,r,e):t]})).toArray();return i.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),r?q(i):c(e)?H(i):z(i)}function Ut(e,t,n){if(t||(t=Yt),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return Bt(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return Bt(t,e,n)?n:e}))}function Bt(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function Gt(e,t,r){var o=Wt(e);return o.size=new W(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map((function(e){return e=n(e),U(o?e.reverse():e)})),a=0,s=!1;return new N((function(){var n;return s||(n=i.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?{value:void 0,done:!0}:M(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function Vt(e,t){return Q(e)?t:e.constructor(t)}function qt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ht(e){return Oe(e.size),S(e)}function zt(e){return s(e)?r:c(e)?o:i}function Wt(e){return Object.create((s(e)?q:c(e)?H:z).prototype)}function Kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):V.prototype.cacheResult.call(this)}function Yt(e,t){return e>t?1:e<t?-1:0}function $t(e){var t=U(e);if(!t){if(!G(e))throw new TypeError("Expected iterable or array-like: "+e);t=U(n(e))}return t}function Qt(e,t){var n,r=function(i){if(i instanceof r)return i;if(!(this instanceof r))return new r(i);if(!n){n=!0;var a=Object.keys(e);!function(e,t){try{t.forEach(en.bind(void 0,e))}catch(e){}}(o,a),o.size=a.length,o._name=t,o._keys=a,o._defaultValues=e}this._map=Re(i)},o=r.prototype=Object.create(Jt);return o.constructor=r,r}t(Et,Re),Et.of=function(){return this(arguments)},Et.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Et.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Et.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ct()},Et.prototype.set=function(e,t){return Tt(this,e,t)},Et.prototype.remove=function(e){return Tt(this,e,g)},Et.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Et.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},Et.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Et.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?wt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Et.isOrderedMap=St,Et.prototype[m]=!0,Et.prototype.delete=Et.prototype.remove,t(xt,q),xt.prototype.get=function(e,t){return this._iter.get(e,t)},xt.prototype.has=function(e){return this._iter.has(e)},xt.prototype.valueSeq=function(){return this._iter.valueSeq()},xt.prototype.reverse=function(){var e=this,t=It(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},xt.prototype.map=function(e,t){var n=this,r=Dt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},xt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ht(this):0,function(o){return e(o,t?--n:n++,r)}),t)},xt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(1,t),r=t?Ht(this):0;return new N((function(){var o=n.next();return o.done?o:M(e,t?--r:r++,o.value,o)}))},xt.prototype[m]=!0,t(kt,H),kt.prototype.includes=function(e){return this._iter.includes(e)},kt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t),r=0;return new N((function(){var t=n.next();return t.done?t:M(e,r++,t.value,t)}))},t(Ft,z),Ft.prototype.has=function(e){return this._iter.includes(e)},Ft.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Ft.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new N((function(){var t=n.next();return t.done?t:M(e,t.value,t.value,t)}))},t(Ot,q),Ot.prototype.entrySeq=function(){return this._iter.toSeq()},Ot.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){qt(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new N((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){qt(r);var o=a(r);return M(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}}))},kt.prototype.cacheResult=xt.prototype.cacheResult=Ft.prototype.cacheResult=Ot.prototype.cacheResult=Kt,t(Qt,he),Qt.prototype.toString=function(){return this.__toString(Zt(this)+" {","}")},Qt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Qt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Qt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Xt(this,He()))},Qt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Zt(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Xt(this,n)},Qt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Xt(this,t)},Qt.prototype.wasAltered=function(){return this._map.wasAltered()},Qt.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},Qt.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},Qt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Xt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Jt=Qt.prototype;function Xt(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Zt(e){return e._name||e.constructor.name||"Record"}function en(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){le(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function tn(e){return null==e?ln():nn(e)&&!u(e)?e:ln().withMutations((function(t){var n=i(e);Oe(n.size),n.forEach((function(e){return t.add(e)}))}))}function nn(e){return!(!e||!e[on])}Jt.delete=Jt.remove,Jt.deleteIn=Jt.removeIn=Ne.removeIn,Jt.merge=Ne.merge,Jt.mergeWith=Ne.mergeWith,Jt.mergeIn=Ne.mergeIn,Jt.mergeDeep=Ne.mergeDeep,Jt.mergeDeepWith=Ne.mergeDeepWith,Jt.mergeDeepIn=Ne.mergeDeepIn,Jt.setIn=Ne.setIn,Jt.update=Ne.update,Jt.updateIn=Ne.updateIn,Jt.withMutations=Ne.withMutations,Jt.asMutable=Ne.asMutable,Jt.asImmutable=Ne.asImmutable,t(tn,me),tn.of=function(){return this(arguments)},tn.fromKeys=function(e){return this(r(e).keySeq())},tn.prototype.toString=function(){return this.__toString("Set {","}")},tn.prototype.has=function(e){return this._map.has(e)},tn.prototype.add=function(e){return sn(this,this._map.set(e,!0))},tn.prototype.remove=function(e){return sn(this,this._map.remove(e))},tn.prototype.clear=function(){return sn(this,this._map.clear())},tn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)i(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},tn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},tn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return i(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},tn.prototype.merge=function(){return this.union.apply(this,arguments)},tn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},tn.prototype.sort=function(e){return un(jt(this,e))},tn.prototype.sortBy=function(e,t){return un(jt(this,t,e))},tn.prototype.wasAltered=function(){return this._map.wasAltered()},tn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},tn.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},tn.isSet=nn;var rn,on="@@__IMMUTABLE_SET__@@",an=tn.prototype;function sn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function cn(e,t){var n=Object.create(an);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function ln(){return rn||(rn=cn(He()))}function un(e){return null==e?gn():dn(e)?e:gn().withMutations((function(t){var n=i(e);Oe(n.size),n.forEach((function(e){return t.add(e)}))}))}function dn(e){return nn(e)&&u(e)}an[on]=!0,an.delete=an.remove,an.mergeDeep=an.merge,an.mergeDeepWith=an.mergeWith,an.withMutations=Ne.withMutations,an.asMutable=Ne.asMutable,an.asImmutable=Ne.asImmutable,an.__empty=ln,an.__make=cn,t(un,tn),un.of=function(){return this(arguments)},un.fromKeys=function(e){return this(r(e).keySeq())},un.prototype.toString=function(){return this.__toString("OrderedSet {","}")},un.isOrderedSet=dn;var hn,pn=un.prototype;function mn(e,t){var n=Object.create(pn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function gn(){return hn||(hn=mn(Ct()))}function fn(e){return null==e?Sn():_n(e)?e:Sn().unshiftAll(e)}function _n(e){return!(!e||!e[vn])}pn[m]=!0,pn.__empty=gn,pn.__make=mn,t(fn,pe),fn.of=function(){return this(arguments)},fn.prototype.toString=function(){return this.__toString("Stack [","]")},fn.prototype.get=function(e,t){var n=this._head;for(e=w(this,e);n&&e--;)n=n.next;return n?n.value:t},fn.prototype.peek=function(){return this._head&&this._head.value},fn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):En(e,t)},fn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Oe(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):En(t,n)},fn.prototype.pop=function(){return this.slice(1)},fn.prototype.unshift=function(){return this.push.apply(this,arguments)},fn.prototype.unshiftAll=function(e){return this.pushAll(e)},fn.prototype.shift=function(){return this.pop.apply(this,arguments)},fn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Sn()},fn.prototype.slice=function(e,t){if(T(e,t,this.size))return this;var n=x(e,this.size);if(k(t,this.size)!==this.size)return pe.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):En(r,o)},fn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?En(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},fn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},fn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new N((function(){if(r){var t=r.value;return r=r.next,M(e,n++,t)}return{value:void 0,done:!0}}))},fn.isStack=_n;var bn,vn="@@__IMMUTABLE_STACK__@@",yn=fn.prototype;function En(e,t,n,r){var o=Object.create(yn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Sn(){return bn||(bn=En(0))}function wn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}yn[vn]=!0,yn.withMutations=Ne.withMutations,yn.asMutable=Ne.asMutable,yn.asImmutable=Ne.asImmutable,yn.wasAltered=Ne.wasAltered,n.Iterator=N,wn(n,{toArray:function(){Oe(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new xt(this,!0)},toMap:function(){return Re(this.toKeyedSeq())},toObject:function(){Oe(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Et(this.toKeyedSeq())},toOrderedSet:function(){return un(s(this)?this.valueSeq():this)},toSet:function(){return tn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Ft(this)},toSeq:function(){return c(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return fn(s(this)?this.valueSeq():this)},toList:function(){return ot(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Vt(this,Pt(this,t))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Oe(this.size);var n=!0;return this.__iterate((function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1})),n},filter:function(e,t){return Vt(this,At(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Oe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Oe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return Vt(this,Dt(this,e,t))},reduce:function(e,t,n){var r,o;return Oe(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Vt(this,It(this,!0))},slice:function(e,t){return Vt(this,Nt(this,e,t,!0))},some:function(e,t){return!this.every(Fn(e),t)},sort:function(e){return Vt(this,jt(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return S(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Re().asMutable();return e.__iterate((function(o,i){r.update(t.call(n,o,i,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return se(this,e)},entrySeq:function(){var e=this;if(e._cache)return new W(e._cache);var t=e.toSeq().map(kn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Fn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,o,i){if(e.call(t,n,o,i))return r=[o,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(C)},flatMap:function(e,t){return Vt(this,function(e,t,n){var r=zt(e);return e.toSeq().map((function(o,i){return r(t.call(n,o,i,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return Vt(this,Lt(this,e,!0))},fromEntrySeq:function(){return new Ot(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=$t(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,g):g)===g)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=s(e),o=(u(e)?Et():Re()).asMutable();e.__iterate((function(i,a){o.update(t.call(n,i,a,e),(function(e){return(e=e||[]).push(r?[a,i]:i),e}))}));var i=zt(e);return o.map((function(t){return Vt(e,i(t))}))}(this,e,t)},has:function(e){return this.get(e,g)!==g},hasIn:function(e){return this.getIn(e,g)!==g},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},keySeq:function(){return this.toSeq().map(xn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Ut(this,e)},maxBy:function(e,t){return Ut(this,t,e)},min:function(e){return Ut(this,e?On(e):In)},minBy:function(e,t){return Ut(this,t?On(t):In,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Vt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Vt(this,Mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Fn(e),t)},sortBy:function(e,t){return Vt(this,jt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Vt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Vt(this,function(e,t,n){var r=Wt(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++a&&r(e,o,i)})),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(2,o),s=!0;return new N((function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var o=e.value,c=o[0],l=o[1];return t.call(n,l,c,i)?2===r?e:M(r,c,l,e):(s=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Fn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0;return function(e,t){return t=ge(t,3432918353),t=ge(t<<15|t>>>-15,461845907),t=ge(t<<13|t>>>-13,5),t=ge((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=fe((t=ge(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+An(_e(e),_e(t))|0}:function(e,t){r=r+An(_e(e),_e(t))|0}:t?function(e){r=31*r+_e(e)|0}:function(e){r=r+_e(e)|0}),r)}(this))}});var Cn=n.prototype;Cn[d]=!0,Cn[A]=Cn.values,Cn.__toJS=Cn.toArray,Cn.__toStringMapper=Rn,Cn.inspect=Cn.toSource=function(){return this.toString()},Cn.chain=Cn.flatMap,Cn.contains=Cn.includes,wn(r,{flip:function(){return Vt(this,Rt(this))},mapEntries:function(e,t){var n=this,r=0;return Vt(this,this.toSeq().map((function(o,i){return e.call(t,[i,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Vt(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Tn=r.prototype;function xn(e,t){return t}function kn(e,t){return[t,e]}function Fn(e){return function(){return!e.apply(this,arguments)}}function On(e){return function(){return-e.apply(this,arguments)}}function Rn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Dn(){return E(arguments)}function In(e,t){return e<t?1:e>t?-1:0}function An(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Tn[h]=!0,Tn[A]=Cn.entries,Tn.__toJS=Cn.toObject,Tn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Rn(e)},wn(o,{toKeyedSeq:function(){return new xt(this,!1)},filter:function(e,t){return Vt(this,At(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Vt(this,It(this,!1))},slice:function(e,t){return Vt(this,Nt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=x(e,e<0?this.count():this.size);var r=this.slice(0,e);return Vt(this,1===n?r:r.concat(E(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return Vt(this,Lt(this,e,!1))},get:function(e,t){return(e=w(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=w(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return Vt(this,function(e,t){var n=Wt(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var o=this,i=0;return e.__iterate((function(e,r){return(!i||!1!==n(t,i++,o))&&!1!==n(e,i++,o)}),r),i},n.__iteratorUncached=function(n,r){var o,i=e.__iterator(1,r),a=0;return new N((function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?M(n,a++,t):M(n,a++,o.value,o)}))},n}(this,e))},interleave:function(){var e=[this].concat(E(arguments)),t=Gt(this.toSeq(),H.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),Vt(this,n)},keySeq:function(){return ue(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return Vt(this,Mt(this,e,t,!1))},zip:function(){var e=[this].concat(E(arguments));return Vt(this,Gt(this,Dn,e))},zipWith:function(e){var t=E(arguments);return t[0]=this,Vt(this,Gt(this,e,t))}}),o.prototype[p]=!0,o.prototype[m]=!0,wn(i,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=Cn.includes,i.prototype.contains=i.prototype.includes,wn(q,r.prototype),wn(H,o.prototype),wn(z,i.prototype),wn(he,r.prototype),wn(pe,o.prototype),wn(me,i.prototype),{Iterable:n,Seq:V,Collection:de,Map:Re,OrderedMap:Et,List:ot,Stack:fn,Set:tn,OrderedSet:un,Record:Qt,Range:ue,Repeat:ce,is:ae,fromJS:re}}()},function(e,t,n){"use strict";var r=n(553),o=n(191);e.exports=function(e){return{getInitialState:function(){return this.constructor.calculateState||o(!1,"Components that use FluxMixinLegacy must implement `calculateState()` on the statics object"),this.constructor.calculateState(null)},componentDidMount:function(){var t=this,n=!1,o=function(){n=!0};this._fluxMixinSubscriptions=e.map((function(e){return e.addListener(o)}));this._fluxMixinStoreGroup=new r(e,(function(){n&&t.setState((function(e){return t.constructor.calculateState(t.state)})),n=!1}))},componentWillUnmount:function(){this._fluxMixinStoreGroup.release();var e=this._fluxMixinSubscriptions,t=Array.isArray(e),n=0;for(e=t?e:e[Symbol.iterator]();;){var r;if(t){if(n>=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}r.remove()}this._fluxMixinSubscriptions=[]}}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(82),o=n(237),i=n(139),a=n(172),s=n(268),c=n(212),l=n(90);function u(){var e;return l.a.get().widget_build_url?l.a.get().widget_build_url:null===(e=Object(o.a)())||void 0===e?void 0:e.widget_build_url}function d(){return!!u()}async function h(e){const t=r.a.get().getRoom(e);if(!t)return;if(!i.a.canUserModifyWidgets(e))return void console.error("User not allowed to modify widgets in "+e);const n=u();if(!n)return;let o;try{const t=await fetch(`${n}?roomId=${e}`);o=await t.json()}catch(t){return void console.error("Managed hybrid widget builder failed for room "+e,t)}if(!o)return;const{widget_id:l,widget:d,layout:h}=o;let p=c.a.instance.getApps(e);if(p.some(e=>e.id===l)||s.a.roomHasPendingWidgets(e,[]))return void console.error("Managed hybrid widget already present in room "+e);try{await i.a.setRoomWidgetContent(e,l,d)}catch(t){return void console.error("Unable to add managed hybrid widget in room "+e,t)}if(!a.d.instance.canCopyLayoutToRoom(t))return;p=c.a.instance.getApps(e);const m=p.find(e=>e.id===l);m&&(a.d.instance.moveToContainer(t,m,h.container),a.d.instance.setContainerHeight(t,h.container,h.height),a.d.instance.copyLayoutToRoom(t))}},function(e,t,n){"use strict";var r=/["'&<>]/;e.exports=function(e){var t,n=""+e,o=r.exec(n);if(!o)return n;var i="",a=0,s=0;for(a=o.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}s!==a&&(i+=n.substring(s,a)),s=a+1,i+=t}return s!==a?i+n.substring(s,a):i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var o={equals:"",element:"~",start:"^",end:"$",any:"*",not:"!",hyphen:"|"},i=new Set(r(r([],Object.keys(o).map((function(e){return o[e]})).filter(Boolean)),[":","[","]"," ","\\","(",")","'"]));function a(e){return e.map(s).join(", ")}function s(e){return e.map(c).join("")}function c(e){switch(e.type){case"child":return" > ";case"parent":return" < ";case"sibling":return" ~ ";case"adjacent":return" + ";case"descendant":return" ";case"universal":return u(e.namespace)+"*";case"tag":return l(e);case"pseudo-element":return"::"+d(e.name);case"pseudo":return null===e.data?":"+d(e.name):"string"==typeof e.data?":"+d(e.name)+"("+d(e.data)+")":":"+d(e.name)+"("+a(e.data)+")";case"attribute":if("id"===e.name&&"equals"===e.action&&!e.ignoreCase&&!e.namespace)return"#"+d(e.value);if("class"===e.name&&"element"===e.action&&!e.ignoreCase&&!e.namespace)return"."+d(e.value);var t=l(e);return"exists"===e.action?"["+t+"]":"["+t+o[e.action]+"='"+d(e.value)+"'"+(e.ignoreCase?"i":!1===e.ignoreCase?"s":"")+"]"}}function l(e){return""+u(e.namespace)+d(e.name)}function u(e){return null!==e?("*"===e?"*":d(e))+"|":""}function d(e){return e.split("").map((function(e){return i.has(e)?"\\"+e:e})).join("")}t.default=a},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var o=n(146),i=r(n(576)),a=n(273);function s(e,t){return i.default(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return o.hasChildren(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):o.isTag(t)?"br"===t.name?"\n":e(t.children):o.isCDATA(t)?e(t.children):o.isText(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):o.isTag(t)||o.isCDATA(t)?e(t.children):o.isText(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):o.hasChildren(t)&&t.type===a.ElementType.Tag||o.isCDATA(t)?e(t.children):o.isText(t)?t.data:""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var r=n(577),o=n(580);t.decode=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?o.encodeXML:o.encodeHTML)(e)};var i=n(580);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return i.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return i.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return i.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return i.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return i.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return i.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return i.encodeHTML}});var a=n(577);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return a.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return a.decodeXML}})},function(e){e.exports=JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),t.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var r=n(146),o=[];function i(e){var t;return null!==(t=e.children)&&void 0!==t?t:o}function a(e){return e.parent||null}t.getChildren=i,t.getParent=a,t.getSiblings=function(e){var t=a(e);if(null!=t)return i(t);for(var n=[e],r=e.prev,o=e.next;null!=r;)n.unshift(r),r=r.prev;for(;null!=o;)n.push(o),o=o.next;return n},t.getAttributeValue=function(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!r.isTag(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!r.isTag(t);)t=t.prev;return t}},function(e,t,n){"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var o=t.parent=e.parent;if(o){var i=o.children;i[i.lastIndexOf(e)]=t}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,o=e.next;if(t.next=o,t.prev=e,e.next=t,t.parent=n,o){if(o.prev=t,n){var i=n.children;i.splice(i.lastIndexOf(o),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var o=n.children;o.splice(o.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var r=n(146),o=n(581),i={tag_name:function(e){return"function"==typeof e?function(t){return r.isTag(t)&&e(t.name)}:"*"===e?r.isTag:function(t){return r.isTag(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return r.isText(t)&&e(t.data)}:function(t){return r.isText(t)&&t.data===e}}};function a(e,t){return"function"==typeof t?function(n){return r.isTag(n)&&t(n.attribs[e])}:function(n){return r.isTag(n)&&n.attribs[e]===t}}function s(e,t){return function(n){return e(n)||t(n)}}function c(e){var t=Object.keys(e).map((function(t){var n=e[t];return t in i?i[t](n):a(t,n)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var n=c(e);return!n||n(t)},t.getElements=function(e,t,n,r){void 0===r&&(r=1/0);var i=c(e);return i?o.filter(i,t,n,r):[]},t.getElementById=function(e,t,n){return void 0===n&&(n=!0),Array.isArray(t)||(t=[t]),o.findOne(a("id",e),t,n)},t.getElementsByTagName=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),o.filter(i.tag_name(e),t,n,r)},t.getElementsByTagType=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),o.filter(i.tag_type(e),t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var r=n(146);function o(e,t){var n=[],o=[];if(e===t)return 0;for(var i=r.hasChildren(e)?e:e.parent;i;)n.unshift(i),i=i.parent;for(i=r.hasChildren(t)?t:t.parent;i;)o.unshift(i),i=i.parent;for(var a=Math.min(n.length,o.length),s=0;s<a&&n[s]===o[s];)s++;if(0===s)return 1;var c=n[s-1],l=c.children,u=n[s],d=o[s];return l.indexOf(u)>l.indexOf(d)?c===t?20:4:c===e?10:2}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(var r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e},t.compareDocumentPosition=o,t.uniqueSort=function(e){return(e=e.filter((function(e,t,n){return!n.includes(e,t+1)}))).sort((function(e,t){var n=o(e,t);return 2&n?-1:4&n?1:0})),e}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compileToken=t.compileUnsafe=t.compile=void 0;var o=n(395),i=n(213),a=r(n(1020)),s=n(398),c=n(1021),l=n(399);function u(e,t,n){return g("string"==typeof e?o.parse(e,t):e,t,n)}function d(e){return"pseudo"===e.type&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((function(e){return e.some(d)})))}t.compile=function(e,t,n){var r=u(e,t,n);return l.ensureIsTag(r,t.adapter)},t.compileUnsafe=u;var h={type:"descendant"},p={type:"_flexibleDescendant"},m={type:"pseudo",name:"scope",data:null};function g(e,t,n){var r;(e=e.filter((function(e){return e.length>0}))).forEach(a.default),n=null!==(r=t.context)&&void 0!==r?r:n;var o=Array.isArray(n),u=n&&(Array.isArray(n)?n:[n]);!function(e,t,n){for(var r=t.adapter,o=!!(null==n?void 0:n.every((function(e){var t=r.isTag(e)&&r.getParent(e);return e===l.PLACEHOLDER_ELEMENT||t&&r.isTag(t)}))),i=0,a=e;i<a.length;i++){var c=a[i];if(c.length>0&&s.isTraversal(c[0])&&"descendant"!==c[0].type);else{if(!o||c.some(d))continue;c.unshift(h)}c.unshift(m)}}(e,t,u);var _=!1,b=e.map((function(e){if(e.length>=2){var n=e[0],r=e[1];"pseudo"!==n.type||"scope"!==n.name||(o&&"descendant"===r.type?e[1]=p:"adjacent"!==r.type&&"sibling"!==r.type||(_=!0))}return function(e,t,n){var r;return e.reduce((function(e,r){return e===i.falseFunc?i.falseFunc:c.compileGeneralSelector(e,r,t,n,g)}),null!==(r=t.rootFunc)&&void 0!==r?r:i.trueFunc)}(e,t,u)})).reduce(f,i.falseFunc);return b.shouldTestNextSiblings=_,b}function f(e,t){return t===i.falseFunc||e===i.trueFunc?e:e===i.falseFunc||t===i.trueFunc?t:function(n){return e(n)||t(n)}}t.compileToken=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(398),o={exists:10,equals:8,not:7,start:6,end:6,any:5,hyphen:4,element:4};function i(e){var t=r.procedure[e.type];if("attribute"===e.type)(t=o[e.action])===o.equals&&"id"===e.name&&(t=9),e.ignoreCase&&(t>>=1);else if("pseudo"===e.type)if(e.data)if("has"===e.name||"contains"===e.name)t=0;else if(Array.isArray(e.data)){t=0;for(var n=0;n<e.data.length;n++)if(1===e.data[n].length){var a=i(e.data[n][0]);if(0===a){t=0;break}a>t&&(t=a)}e.data.length>1&&t>0&&(t-=1)}else t=1;else t=3;return t}t.default=function(e){for(var t=e.map(i),n=1;n<e.length;n++){var r=t[n];if(!(r<0))for(var o=n-1;o>=0&&r<t[o];o--){var a=e[o+1];e[o+1]=e[o],e[o]=a,t[o+1]=t[o],t[o]=r}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileGeneralSelector=void 0;var r=n(1022),o=n(582);t.compileGeneralSelector=function(e,t,n,i,a){var s=n.adapter,c=n.equals;switch(t.type){case"pseudo-element":throw new Error("Pseudo-elements are not supported by css-select");case"attribute":return r.attributeRules[t.action](e,t,n);case"pseudo":return o.compilePseudoSelector(e,t,n,i,a);case"tag":return function(n){return s.getName(n)===t.name&&e(n)};case"descendant":if(!1===n.cacheResults||"undefined"==typeof WeakSet)return function(t){for(var n=t;n=s.getParent(n);)if(s.isTag(n)&&e(n))return!0;return!1};var l=new WeakSet;return function(t){for(var n=t;n=s.getParent(n);)if(!l.has(n)){if(s.isTag(n)&&e(n))return!0;l.add(n)}return!1};case"_flexibleDescendant":return function(t){var n=t;do{if(s.isTag(n)&&e(n))return!0}while(n=s.getParent(n));return!1};case"parent":return function(t){return s.getChildren(t).some((function(t){return s.isTag(t)&&e(t)}))};case"child":return function(t){var n=s.getParent(t);return null!=n&&s.isTag(n)&&e(n)};case"sibling":return function(t){for(var n=s.getSiblings(t),r=0;r<n.length;r++){var o=n[r];if(c(t,o))break;if(s.isTag(o)&&e(o))return!0}return!1};case"adjacent":return function(t){for(var n,r=s.getSiblings(t),o=0;o<r.length;o++){var i=r[o];if(c(t,i))break;s.isTag(i)&&(n=i)}return!!n&&e(n)};case"universal":return e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeRules=void 0;var r=n(213),o=/[-[\]{}()*+?.,\\^$|#\s]/g;function i(e){return e.replace(o,"\\$&")}t.attributeRules={equals:function(e,t,n){var r=n.adapter,o=t.name,i=t.value;return t.ignoreCase?(i=i.toLowerCase(),function(t){var n=r.getAttributeValue(t,o);return null!=n&&n.length===i.length&&n.toLowerCase()===i&&e(t)}):function(t){return r.getAttributeValue(t,o)===i&&e(t)}},hyphen:function(e,t,n){var r=n.adapter,o=t.name,i=t.value,a=i.length;return t.ignoreCase?(i=i.toLowerCase(),function(t){var n=r.getAttributeValue(t,o);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a).toLowerCase()===i&&e(t)}):function(t){var n=r.getAttributeValue(t,o);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a)===i&&e(t)}},element:function(e,t,n){var o=t.name,a=t.value,s=t.ignoreCase,c=n.adapter;if(/\s/.test(a))return r.falseFunc;var l=new RegExp("(?:^|\\s)"+i(a)+"(?:$|\\s)",s?"i":"");return function(t){var n=c.getAttributeValue(t,o);return null!=n&&n.length>=a.length&&l.test(n)&&e(t)}},exists:function(e,t,n){var r=t.name,o=n.adapter;return function(t){return o.hasAttrib(t,r)&&e(t)}},start:function(e,t,n){var o=n.adapter,i=t.name,a=t.value,s=a.length;return 0===s?r.falseFunc:t.ignoreCase?(a=a.toLowerCase(),function(t){var n=o.getAttributeValue(t,i);return null!=n&&n.length>=s&&n.substr(0,s).toLowerCase()===a&&e(t)}):function(t){var n;return!!(null===(n=o.getAttributeValue(t,i))||void 0===n?void 0:n.startsWith(a))&&e(t)}},end:function(e,t,n){var o=n.adapter,i=t.name,a=t.value,s=-a.length;return 0===s?r.falseFunc:t.ignoreCase?(a=a.toLowerCase(),function(t){var n;return(null===(n=o.getAttributeValue(t,i))||void 0===n?void 0:n.substr(s).toLowerCase())===a&&e(t)}):function(t){var n;return!!(null===(n=o.getAttributeValue(t,i))||void 0===n?void 0:n.endsWith(a))&&e(t)}},any:function(e,t,n){var o=n.adapter,a=t.name,s=t.value;if(""===s)return r.falseFunc;if(t.ignoreCase){var c=new RegExp(i(s),"i");return function(t){var n=o.getAttributeValue(t,a);return null!=n&&n.length>=s.length&&c.test(n)&&e(t)}}return function(t){var n;return!!(null===(n=o.getAttributeValue(t,a))||void 0===n?void 0:n.includes(s))&&e(t)}},not:function(e,t,n){var r=n.adapter,o=t.name,i=t.value;return""===i?function(t){return!!r.getAttributeValue(t,o)&&e(t)}:t.ignoreCase?(i=i.toLowerCase(),function(t){var n=r.getAttributeValue(t,o);return(null==n||n.length!==i.length||n.toLowerCase()!==i)&&e(t)}):function(t){return r.getAttributeValue(t,o)!==i&&e(t)}}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;var o=r(n(1024)),i=n(213);function a(e,t){return function(n){var r=t.getParent(n);return null!=r&&t.isTag(r)&&e(n)}}function s(e){return function(t,n,r){var o=r.adapter[e];return"function"!=typeof o?i.falseFunc:function(e){return o(e)&&t(e)}}}t.filters={contains:function(e,t,n){var r=n.adapter;return function(n){return e(n)&&r.getText(n).includes(t)}},icontains:function(e,t,n){var r=n.adapter,o=t.toLowerCase();return function(t){return e(t)&&r.getText(t).toLowerCase().includes(o)}},"nth-child":function(e,t,n){var r=n.adapter,s=n.equals,c=o.default(t);return c===i.falseFunc?i.falseFunc:c===i.trueFunc?a(e,r):function(t){for(var n=r.getSiblings(t),o=0,i=0;i<n.length&&!s(t,n[i]);i++)r.isTag(n[i])&&o++;return c(o)&&e(t)}},"nth-last-child":function(e,t,n){var r=n.adapter,s=n.equals,c=o.default(t);return c===i.falseFunc?i.falseFunc:c===i.trueFunc?a(e,r):function(t){for(var n=r.getSiblings(t),o=0,i=n.length-1;i>=0&&!s(t,n[i]);i--)r.isTag(n[i])&&o++;return c(o)&&e(t)}},"nth-of-type":function(e,t,n){var r=n.adapter,s=n.equals,c=o.default(t);return c===i.falseFunc?i.falseFunc:c===i.trueFunc?a(e,r):function(t){for(var n=r.getSiblings(t),o=0,i=0;i<n.length;i++){var a=n[i];if(s(t,a))break;r.isTag(a)&&r.getName(a)===r.getName(t)&&o++}return c(o)&&e(t)}},"nth-last-of-type":function(e,t,n){var r=n.adapter,s=n.equals,c=o.default(t);return c===i.falseFunc?i.falseFunc:c===i.trueFunc?a(e,r):function(t){for(var n=r.getSiblings(t),o=0,i=n.length-1;i>=0;i--){var a=n[i];if(s(t,a))break;r.isTag(a)&&r.getName(a)===r.getName(t)&&o++}return c(o)&&e(t)}},root:function(e,t,n){var r=n.adapter;return function(t){var n=r.getParent(t);return(null==n||!r.isTag(n))&&e(t)}},scope:function(e,n,r,o){var i=r.equals;return o&&0!==o.length?1===o.length?function(t){return i(o[0],t)&&e(t)}:function(t){return o.includes(t)&&e(t)}:t.filters.root(e,n,r)},hover:s("isHovered"),visited:s("isVisited"),active:s("isActive")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compile=t.parse=void 0;var r=n(1025);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return r.parse}});var o=n(1026);Object.defineProperty(t,"compile",{enumerable:!0,get:function(){return o.compile}}),t.default=function(e){return o.compile(r.parse(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var r=/^([+-]?\d*n)?\s*(?:([+-]?)\s*(\d+))?$/;t.parse=function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];var t,n=e.match(r);if(!n)throw new Error("n-th rule couldn't be parsed ('"+e+"')");return n[1]?(t=parseInt(n[1],10),isNaN(t)&&(t=n[1].startsWith("-")?-1:1)):t=0,[t,("-"===n[2]?-1:1)*(n[3]?parseInt(n[3],10):0)]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compile=void 0;var r=n(213);t.compile=function(e){var t=e[0],n=e[1]-1;if(n<0&&t<=0)return r.falseFunc;if(-1===t)return function(e){return e<=n};if(0===t)return function(e){return e===n};if(1===t)return n<0?r.trueFunc:function(e){return e>=n};var o=Math.abs(t),i=(n%o+o)%o;return t>1?function(e){return e>=n&&e%o===i}:function(e){return e<=n&&e%o===i}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyPseudoArgs=t.pseudos=void 0,t.pseudos={empty:function(e,t){var n=t.adapter;return!n.getChildren(e).some((function(e){return n.isTag(e)||""!==n.getText(e)}))},"first-child":function(e,t){var n=t.adapter,r=t.equals,o=n.getSiblings(e).find((function(e){return n.isTag(e)}));return null!=o&&r(e,o)},"last-child":function(e,t){for(var n=t.adapter,r=t.equals,o=n.getSiblings(e),i=o.length-1;i>=0;i--){if(r(e,o[i]))return!0;if(n.isTag(o[i]))break}return!1},"first-of-type":function(e,t){for(var n=t.adapter,r=t.equals,o=n.getSiblings(e),i=n.getName(e),a=0;a<o.length;a++){var s=o[a];if(r(e,s))return!0;if(n.isTag(s)&&n.getName(s)===i)break}return!1},"last-of-type":function(e,t){for(var n=t.adapter,r=t.equals,o=n.getSiblings(e),i=n.getName(e),a=o.length-1;a>=0;a--){var s=o[a];if(r(e,s))return!0;if(n.isTag(s)&&n.getName(s)===i)break}return!1},"only-of-type":function(e,t){var n=t.adapter,r=t.equals,o=n.getName(e);return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)||n.getName(t)!==o}))},"only-child":function(e,t){var n=t.adapter,r=t.equals;return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)}))}},t.verifyPseudoArgs=function(e,t,n){if(null===n){if(e.length>2)throw new Error("pseudo-selector :"+t+" requires an argument")}else if(2===e.length)throw new Error("pseudo-selector :"+t+" doesn't have any arguments")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=void 0,t.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupSelectors=t.getDocumentRoot=void 0;var r=n(583);t.getDocumentRoot=function(e){for(;e.parent;)e=e.parent;return e},t.groupSelectors=function(e){for(var t=[],n=[],o=0,i=e;o<i.length;o++){var a=i[o];a.some(r.isFilter)?t.push(a):n.push(a)}return[n,t]}},function(e,t,n){"use strict";const r=n(318),o=n(1033),i=n(1034),a=n(1035),s=n(1037),c=n(182),l=n(591),u=n(592),d=n(403),h=n(1040),p=n(401),m=n(400),g=n(197),f=g.TAG_NAMES,_=g.NAMESPACES,b=g.ATTRS,v={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:l},y="IN_TABLE_MODE",E={[f.TR]:"IN_ROW_MODE",[f.TBODY]:"IN_TABLE_BODY_MODE",[f.THEAD]:"IN_TABLE_BODY_MODE",[f.TFOOT]:"IN_TABLE_BODY_MODE",[f.CAPTION]:"IN_CAPTION_MODE",[f.COLGROUP]:"IN_COLUMN_GROUP_MODE",[f.TABLE]:y,[f.BODY]:"IN_BODY_MODE",[f.FRAMESET]:"IN_FRAMESET_MODE"},S={[f.CAPTION]:y,[f.COLGROUP]:y,[f.TBODY]:y,[f.TFOOT]:y,[f.THEAD]:y,[f.COL]:"IN_COLUMN_GROUP_MODE",[f.TR]:"IN_TABLE_BODY_MODE",[f.TD]:"IN_ROW_MODE",[f.TH]:"IN_ROW_MODE"},w={INITIAL_MODE:{[r.CHARACTER_TOKEN]:L,[r.NULL_CHARACTER_TOKEN]:L,[r.WHITESPACE_CHARACTER_TOKEN]:D,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:function(e,t){e._setDocumentType(t);const n=t.forceQuirks?g.DOCUMENT_MODE.QUIRKS:d.getDocumentMode(t);d.isConforming(t)||e._err(p.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode="BEFORE_HTML_MODE"},[r.START_TAG_TOKEN]:L,[r.END_TAG_TOKEN]:L,[r.EOF_TOKEN]:L},BEFORE_HTML_MODE:{[r.CHARACTER_TOKEN]:j,[r.NULL_CHARACTER_TOKEN]:j,[r.WHITESPACE_CHARACTER_TOKEN]:D,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?(e._insertElement(t,_.HTML),e.insertionMode="BEFORE_HEAD_MODE"):j(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n!==f.HTML&&n!==f.HEAD&&n!==f.BODY&&n!==f.BR||j(e,t)},[r.EOF_TOKEN]:j},BEFORE_HEAD_MODE:{[r.CHARACTER_TOKEN]:U,[r.NULL_CHARACTER_TOKEN]:U,[r.WHITESPACE_CHARACTER_TOKEN]:D,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:I,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?re(e,t):n===f.HEAD?(e._insertElement(t,_.HTML),e.headElement=e.openElements.current,e.insertionMode="IN_HEAD_MODE"):U(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?U(e,t):e._err(p.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:U},IN_HEAD_MODE:{[r.CHARACTER_TOKEN]:V,[r.NULL_CHARACTER_TOKEN]:V,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:I,[r.START_TAG_TOKEN]:B,[r.END_TAG_TOKEN]:G,[r.EOF_TOKEN]:V},IN_HEAD_NO_SCRIPT_MODE:{[r.CHARACTER_TOKEN]:q,[r.NULL_CHARACTER_TOKEN]:q,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:I,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?re(e,t):n===f.BASEFONT||n===f.BGSOUND||n===f.HEAD||n===f.LINK||n===f.META||n===f.NOFRAMES||n===f.STYLE?B(e,t):n===f.NOSCRIPT?e._err(p.nestedNoscriptInHead):q(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.NOSCRIPT?(e.openElements.pop(),e.insertionMode="IN_HEAD_MODE"):n===f.BR?q(e,t):e._err(p.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:q},AFTER_HEAD_MODE:{[r.CHARACTER_TOKEN]:H,[r.NULL_CHARACTER_TOKEN]:H,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:I,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?re(e,t):n===f.BODY?(e._insertElement(t,_.HTML),e.framesetOk=!1,e.insertionMode="IN_BODY_MODE"):n===f.FRAMESET?(e._insertElement(t,_.HTML),e.insertionMode="IN_FRAMESET_MODE"):n===f.BASE||n===f.BASEFONT||n===f.BGSOUND||n===f.LINK||n===f.META||n===f.NOFRAMES||n===f.SCRIPT||n===f.STYLE||n===f.TEMPLATE||n===f.TITLE?(e._err(p.abandonedHeadElementChild),e.openElements.push(e.headElement),B(e,t),e.openElements.remove(e.headElement)):n===f.HEAD?e._err(p.misplacedStartTagForHeadElement):H(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.BODY||n===f.HTML||n===f.BR?H(e,t):n===f.TEMPLATE?G(e,t):e._err(p.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:H},IN_BODY_MODE:{[r.CHARACTER_TOKEN]:W,[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:z,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:re,[r.END_TAG_TOKEN]:se,[r.EOF_TOKEN]:ce},TEXT_MODE:{[r.CHARACTER_TOKEN]:M,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:D,[r.END_TAG_TOKEN]:function(e,t){t.tagName===f.SCRIPT&&(e.pendingScript=e.openElements.current);e.openElements.pop(),e.insertionMode=e.originalInsertionMode},[r.EOF_TOKEN]:function(e,t){e._err(p.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}},[y]:{[r.CHARACTER_TOKEN]:le,[r.NULL_CHARACTER_TOKEN]:le,[r.WHITESPACE_CHARACTER_TOKEN]:le,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:ue,[r.END_TAG_TOKEN]:de,[r.EOF_TOKEN]:ce},IN_TABLE_TEXT_MODE:{[r.CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0},[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t)},[r.COMMENT_TOKEN]:pe,[r.DOCTYPE_TOKEN]:pe,[r.START_TAG_TOKEN]:pe,[r.END_TAG_TOKEN]:pe,[r.EOF_TOKEN]:pe},IN_CAPTION_MODE:{[r.CHARACTER_TOKEN]:W,[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:z,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.COL||n===f.COLGROUP||n===f.TBODY||n===f.TD||n===f.TFOOT||n===f.TH||n===f.THEAD||n===f.TR?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y,e._processToken(t)):re(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.TABLE?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y,n===f.TABLE&&e._processToken(t)):n!==f.BODY&&n!==f.COL&&n!==f.COLGROUP&&n!==f.HTML&&n!==f.TBODY&&n!==f.TD&&n!==f.TFOOT&&n!==f.TH&&n!==f.THEAD&&n!==f.TR&&se(e,t)},[r.EOF_TOKEN]:ce},IN_COLUMN_GROUP_MODE:{[r.CHARACTER_TOKEN]:me,[r.NULL_CHARACTER_TOKEN]:me,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?re(e,t):n===f.COL?(e._appendElement(t,_.HTML),t.ackSelfClosing=!0):n===f.TEMPLATE?B(e,t):me(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.COLGROUP?e.openElements.currentTagName===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=y):n===f.TEMPLATE?G(e,t):n!==f.COL&&me(e,t)},[r.EOF_TOKEN]:ce},IN_TABLE_BODY_MODE:{[r.CHARACTER_TOKEN]:le,[r.NULL_CHARACTER_TOKEN]:le,[r.WHITESPACE_CHARACTER_TOKEN]:le,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,_.HTML),e.insertionMode="IN_ROW_MODE"):n===f.TH||n===f.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(f.TR),e.insertionMode="IN_ROW_MODE",e._processToken(t)):n===f.CAPTION||n===f.COL||n===f.COLGROUP||n===f.TBODY||n===f.TFOOT||n===f.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y,e._processToken(t)):ue(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TBODY||n===f.TFOOT||n===f.THEAD?e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y):n===f.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y,e._processToken(t)):(n!==f.BODY&&n!==f.CAPTION&&n!==f.COL&&n!==f.COLGROUP||n!==f.HTML&&n!==f.TD&&n!==f.TH&&n!==f.TR)&&de(e,t)},[r.EOF_TOKEN]:ce},IN_ROW_MODE:{[r.CHARACTER_TOKEN]:le,[r.NULL_CHARACTER_TOKEN]:le,[r.WHITESPACE_CHARACTER_TOKEN]:le,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TH||n===f.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,_.HTML),e.insertionMode="IN_CELL_MODE",e.activeFormattingElements.insertMarker()):n===f.CAPTION||n===f.COL||n===f.COLGROUP||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR?e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)):ue(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TR?e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE"):n===f.TABLE?e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)):n===f.TBODY||n===f.TFOOT||n===f.THEAD?(e.openElements.hasInTableScope(n)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)):(n!==f.BODY&&n!==f.CAPTION&&n!==f.COL&&n!==f.COLGROUP||n!==f.HTML&&n!==f.TD&&n!==f.TH)&&de(e,t)},[r.EOF_TOKEN]:ce},IN_CELL_MODE:{[r.CHARACTER_TOKEN]:W,[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:z,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.COL||n===f.COLGROUP||n===f.TBODY||n===f.TD||n===f.TFOOT||n===f.TH||n===f.THEAD||n===f.TR?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),e._processToken(t)):re(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode="IN_ROW_MODE"):n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR?e.openElements.hasInTableScope(n)&&(e._closeTableCell(),e._processToken(t)):n!==f.BODY&&n!==f.CAPTION&&n!==f.COL&&n!==f.COLGROUP&&n!==f.HTML&&se(e,t)},[r.EOF_TOKEN]:ce},IN_SELECT_MODE:{[r.CHARACTER_TOKEN]:M,[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:ge,[r.END_TAG_TOKEN]:fe,[r.EOF_TOKEN]:ce},IN_SELECT_IN_TABLE_MODE:{[r.CHARACTER_TOKEN]:M,[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processToken(t)):ge(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processToken(t)):fe(e,t)},[r.EOF_TOKEN]:ce},IN_TEMPLATE_MODE:{[r.CHARACTER_TOKEN]:W,[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:z,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;if(n===f.BASE||n===f.BASEFONT||n===f.BGSOUND||n===f.LINK||n===f.META||n===f.NOFRAMES||n===f.SCRIPT||n===f.STYLE||n===f.TEMPLATE||n===f.TITLE)B(e,t);else{const r=S[n]||"IN_BODY_MODE";e._popTmplInsertionMode(),e._pushTmplInsertionMode(r),e.insertionMode=r,e._processToken(t)}},[r.END_TAG_TOKEN]:function(e,t){t.tagName===f.TEMPLATE&&G(e,t)},[r.EOF_TOKEN]:_e},AFTER_BODY_MODE:{[r.CHARACTER_TOKEN]:be,[r.NULL_CHARACTER_TOKEN]:be,[r.WHITESPACE_CHARACTER_TOKEN]:z,[r.COMMENT_TOKEN]:function(e,t){e._appendCommentNode(t,e.openElements.items[0])},[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?re(e,t):be(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?e.fragmentContext||(e.insertionMode="AFTER_AFTER_BODY_MODE"):be(e,t)},[r.EOF_TOKEN]:P},IN_FRAMESET_MODE:{[r.CHARACTER_TOKEN]:D,[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?re(e,t):n===f.FRAMESET?e._insertElement(t,_.HTML):n===f.FRAME?(e._appendElement(t,_.HTML),t.ackSelfClosing=!0):n===f.NOFRAMES&&B(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName!==f.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagName===f.FRAMESET||(e.insertionMode="AFTER_FRAMESET_MODE"))},[r.EOF_TOKEN]:P},AFTER_FRAMESET_MODE:{[r.CHARACTER_TOKEN]:D,[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:A,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?re(e,t):n===f.NOFRAMES&&B(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName===f.HTML&&(e.insertionMode="AFTER_AFTER_FRAMESET_MODE")},[r.EOF_TOKEN]:P},AFTER_AFTER_BODY_MODE:{[r.CHARACTER_TOKEN]:ve,[r.NULL_CHARACTER_TOKEN]:ve,[r.WHITESPACE_CHARACTER_TOKEN]:z,[r.COMMENT_TOKEN]:N,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?re(e,t):ve(e,t)},[r.END_TAG_TOKEN]:ve,[r.EOF_TOKEN]:P},AFTER_AFTER_FRAMESET_MODE:{[r.CHARACTER_TOKEN]:D,[r.NULL_CHARACTER_TOKEN]:D,[r.WHITESPACE_CHARACTER_TOKEN]:z,[r.COMMENT_TOKEN]:N,[r.DOCTYPE_TOKEN]:D,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?re(e,t):n===f.NOFRAMES&&B(e,t)},[r.END_TAG_TOKEN]:D,[r.EOF_TOKEN]:P}};function C(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):ae(e,t),n}function T(e,t){let n=null;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o)&&(n=o)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function x(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let i=0,a=o;a!==n;i++,a=o){o=e.openElements.getCommonAncestor(a);const n=e.activeFormattingElements.getElementEntry(a),s=n&&i>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=k(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function k(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function F(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{const r=e.treeAdapter.getTagName(t),o=e.treeAdapter.getNamespaceURI(t);r===f.TEMPLATE&&o===_.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function O(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),o=n.token,i=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i)}function R(e,t){let n;for(let r=0;r<8&&(n=C(e,t),n);r++){const t=T(e,n);if(!t)break;e.activeFormattingElements.bookmark=n;const r=x(e,t,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(r),F(e,o,r),O(e,t,n)}}function D(){}function I(e){e._err(p.misplacedDoctype)}function A(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function N(e,t){e._appendCommentNode(t,e.document)}function M(e,t){e._insertCharacters(t)}function P(e){e.stopped=!0}function L(e,t){e._err(p.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,g.DOCUMENT_MODE.QUIRKS),e.insertionMode="BEFORE_HTML_MODE",e._processToken(t)}function j(e,t){e._insertFakeRootElement(),e.insertionMode="BEFORE_HEAD_MODE",e._processToken(t)}function U(e,t){e._insertFakeElement(f.HEAD),e.headElement=e.openElements.current,e.insertionMode="IN_HEAD_MODE",e._processToken(t)}function B(e,t){const n=t.tagName;n===f.HTML?re(e,t):n===f.BASE||n===f.BASEFONT||n===f.BGSOUND||n===f.LINK||n===f.META?(e._appendElement(t,_.HTML),t.ackSelfClosing=!0):n===f.TITLE?e._switchToTextParsing(t,r.MODE.RCDATA):n===f.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,r.MODE.RAWTEXT):(e._insertElement(t,_.HTML),e.insertionMode="IN_HEAD_NO_SCRIPT_MODE"):n===f.NOFRAMES||n===f.STYLE?e._switchToTextParsing(t,r.MODE.RAWTEXT):n===f.SCRIPT?e._switchToTextParsing(t,r.MODE.SCRIPT_DATA):n===f.TEMPLATE?(e._insertTemplate(t,_.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode="IN_TEMPLATE_MODE",e._pushTmplInsertionMode("IN_TEMPLATE_MODE")):n===f.HEAD?e._err(p.misplacedStartTagForHeadElement):V(e,t)}function G(e,t){const n=t.tagName;n===f.HEAD?(e.openElements.pop(),e.insertionMode="AFTER_HEAD_MODE"):n===f.BODY||n===f.BR||n===f.HTML?V(e,t):n===f.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==f.TEMPLATE&&e._err(p.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(p.endTagWithoutMatchingOpenElement)}function V(e,t){e.openElements.pop(),e.insertionMode="AFTER_HEAD_MODE",e._processToken(t)}function q(e,t){const n=t.type===r.EOF_TOKEN?p.openElementsLeftAfterEof:p.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode="IN_HEAD_MODE",e._processToken(t)}function H(e,t){e._insertFakeElement(f.BODY),e.insertionMode="IN_BODY_MODE",e._processToken(t)}function z(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function W(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function K(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML)}function Y(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function $(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Q(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function J(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,_.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function X(e,t){e._appendElement(t,_.HTML),t.ackSelfClosing=!0}function Z(e,t){e._switchToTextParsing(t,r.MODE.RAWTEXT)}function ee(e,t){e.openElements.currentTagName===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML)}function te(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,_.HTML)}function ne(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML)}function re(e,t){const n=t.tagName;switch(n.length){case 1:n===f.I||n===f.S||n===f.B||n===f.U?$(e,t):n===f.P?K(e,t):n===f.A?function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(f.A);n&&(R(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):ne(e,t);break;case 2:n===f.DL||n===f.OL||n===f.UL?K(e,t):n===f.H1||n===f.H2||n===f.H3||n===f.H4||n===f.H5||n===f.H6?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement();const n=e.openElements.currentTagName;n!==f.H1&&n!==f.H2&&n!==f.H3&&n!==f.H4&&n!==f.H5&&n!==f.H6||e.openElements.pop(),e._insertElement(t,_.HTML)}(e,t):n===f.LI||n===f.DD||n===f.DT?function(e,t){e.framesetOk=!1;const n=t.tagName;for(let t=e.openElements.stackTop;t>=0;t--){const r=e.openElements.items[t],o=e.treeAdapter.getTagName(r);let i=null;if(n===f.LI&&o===f.LI?i=f.LI:n!==f.DD&&n!==f.DT||o!==f.DD&&o!==f.DT||(i=o),i){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(o!==f.ADDRESS&&o!==f.DIV&&o!==f.P&&e._isSpecialElement(r))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML)}(e,t):n===f.EM||n===f.TT?$(e,t):n===f.BR?J(e,t):n===f.HR?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,_.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t):n===f.RB?te(e,t):n===f.RT||n===f.RP?function(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,_.HTML)}(e,t):n!==f.TH&&n!==f.TD&&n!==f.TR&&ne(e,t);break;case 3:n===f.DIV||n===f.DIR||n===f.NAV?K(e,t):n===f.PRE?Y(e,t):n===f.BIG?$(e,t):n===f.IMG||n===f.WBR?J(e,t):n===f.XMP?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===f.SVG?function(e,t){e._reconstructActiveFormattingElements(),h.adjustTokenSVGAttrs(t),h.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,_.SVG):e._insertElement(t,_.SVG),t.ackSelfClosing=!0}(e,t):n===f.RTC?te(e,t):n!==f.COL&&ne(e,t);break;case 4:n===f.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t):n===f.BASE||n===f.LINK||n===f.META?B(e,t):n===f.BODY?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t):n===f.MAIN||n===f.MENU?K(e,t):n===f.FORM?function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),n||(e.formElement=e.openElements.current))}(e,t):n===f.CODE||n===f.FONT?$(e,t):n===f.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(R(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,_.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):n===f.AREA?J(e,t):n===f.MATH?function(e,t){e._reconstructActiveFormattingElements(),h.adjustTokenMathMLAttrs(t),h.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,_.MATHML):e._insertElement(t,_.MATHML),t.ackSelfClosing=!0}(e,t):n===f.MENU?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML)}(e,t):n!==f.HEAD&&ne(e,t);break;case 5:n===f.STYLE||n===f.TITLE?B(e,t):n===f.ASIDE?K(e,t):n===f.SMALL?$(e,t):n===f.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==g.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),e.framesetOk=!1,e.insertionMode=y}(e,t):n===f.EMBED?J(e,t):n===f.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,_.HTML);const n=r.getTokenAttr(t,b.TYPE);n&&"hidden"===n.toLowerCase()||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t):n===f.PARAM||n===f.TRACK?X(e,t):n===f.IMAGE?function(e,t){t.tagName=f.IMG,J(e,t)}(e,t):n!==f.FRAME&&n!==f.TBODY&&n!==f.TFOOT&&n!==f.THEAD&&ne(e,t);break;case 6:n===f.SCRIPT?B(e,t):n===f.CENTER||n===f.FIGURE||n===f.FOOTER||n===f.HEADER||n===f.HGROUP||n===f.DIALOG?K(e,t):n===f.BUTTON?function(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.framesetOk=!1}(e,t):n===f.STRIKE||n===f.STRONG?$(e,t):n===f.APPLET||n===f.OBJECT?Q(e,t):n===f.KEYGEN?J(e,t):n===f.SOURCE?X(e,t):n===f.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===f.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.framesetOk=!1,e.insertionMode===y||"IN_CAPTION_MODE"===e.insertionMode||"IN_TABLE_BODY_MODE"===e.insertionMode||"IN_ROW_MODE"===e.insertionMode||"IN_CELL_MODE"===e.insertionMode?e.insertionMode="IN_SELECT_IN_TABLE_MODE":e.insertionMode="IN_SELECT_MODE"}(e,t):n===f.OPTION?ee(e,t):ne(e,t);break;case 7:n===f.BGSOUND?B(e,t):n===f.DETAILS||n===f.ADDRESS||n===f.ARTICLE||n===f.SECTION||n===f.SUMMARY?K(e,t):n===f.LISTING?Y(e,t):n===f.MARQUEE?Q(e,t):n===f.NOEMBED?Z(e,t):n!==f.CAPTION&&ne(e,t);break;case 8:n===f.BASEFONT?B(e,t):n===f.FRAMESET?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,_.HTML),e.insertionMode="IN_FRAMESET_MODE")}(e,t):n===f.FIELDSET?K(e,t):n===f.TEXTAREA?function(e,t){e._insertElement(t,_.HTML),e.skipNextNewLine=!0,e.tokenizer.state=r.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode="TEXT_MODE"}(e,t):n===f.TEMPLATE?B(e,t):n===f.NOSCRIPT?e.options.scriptingEnabled?Z(e,t):ne(e,t):n===f.OPTGROUP?ee(e,t):n!==f.COLGROUP&&ne(e,t);break;case 9:n===f.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),e.tokenizer.state=r.MODE.PLAINTEXT}(e,t):ne(e,t);break;case 10:n===f.BLOCKQUOTE||n===f.FIGCAPTION?K(e,t):ne(e,t);break;default:ne(e,t)}}function oe(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ie(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function ae(e,t){const n=t.tagName;for(let t=e.openElements.stackTop;t>0;t--){const r=e.openElements.items[t];if(e.treeAdapter.getTagName(r)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(r);break}if(e._isSpecialElement(r))break}}function se(e,t){const n=t.tagName;switch(n.length){case 1:n===f.A||n===f.B||n===f.I||n===f.S||n===f.U?R(e,t):n===f.P?function(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(f.P),e._closePElement()}(e):ae(e,t);break;case 2:n===f.DL||n===f.UL||n===f.OL?oe(e,t):n===f.LI?function(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}(e):n===f.DD||n===f.DT?function(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t):n===f.H1||n===f.H2||n===f.H3||n===f.H4||n===f.H5||n===f.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):n===f.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(f.BR),e.openElements.pop(),e.framesetOk=!1}(e):n===f.EM||n===f.TT?R(e,t):ae(e,t);break;case 3:n===f.BIG?R(e,t):n===f.DIR||n===f.DIV||n===f.NAV||n===f.PRE?oe(e,t):ae(e,t);break;case 4:n===f.BODY?function(e){e.openElements.hasInScope(f.BODY)&&(e.insertionMode="AFTER_BODY_MODE")}(e):n===f.HTML?function(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode="AFTER_BODY_MODE",e._processToken(t))}(e,t):n===f.FORM?function(e){const t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):e.openElements.remove(n))}(e):n===f.CODE||n===f.FONT||n===f.NOBR?R(e,t):n===f.MAIN||n===f.MENU?oe(e,t):ae(e,t);break;case 5:n===f.ASIDE?oe(e,t):n===f.SMALL?R(e,t):ae(e,t);break;case 6:n===f.CENTER||n===f.FIGURE||n===f.FOOTER||n===f.HEADER||n===f.HGROUP||n===f.DIALOG?oe(e,t):n===f.APPLET||n===f.OBJECT?ie(e,t):n===f.STRIKE||n===f.STRONG?R(e,t):ae(e,t);break;case 7:n===f.ADDRESS||n===f.ARTICLE||n===f.DETAILS||n===f.SECTION||n===f.SUMMARY||n===f.LISTING?oe(e,t):n===f.MARQUEE?ie(e,t):ae(e,t);break;case 8:n===f.FIELDSET?oe(e,t):n===f.TEMPLATE?G(e,t):ae(e,t);break;case 10:n===f.BLOCKQUOTE||n===f.FIGCAPTION?oe(e,t):ae(e,t);break;default:ae(e,t)}}function ce(e,t){e.tmplInsertionModeStackTop>-1?_e(e,t):e.stopped=!0}function le(e,t){const n=e.openElements.currentTagName;n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode="IN_TABLE_TEXT_MODE",e._processToken(t)):he(e,t)}function ue(e,t){const n=t.tagName;switch(n.length){case 2:n===f.TD||n===f.TH||n===f.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(f.TBODY),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)}(e,t):he(e,t);break;case 3:n===f.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(f.COLGROUP),e.insertionMode="IN_COLUMN_GROUP_MODE",e._processToken(t)}(e,t):he(e,t);break;case 4:n===f.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,_.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t):he(e,t);break;case 5:n===f.TABLE?function(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processToken(t))}(e,t):n===f.STYLE?B(e,t):n===f.TBODY||n===f.TFOOT||n===f.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,_.HTML),e.insertionMode="IN_TABLE_BODY_MODE"}(e,t):n===f.INPUT?function(e,t){const n=r.getTokenAttr(t,b.TYPE);n&&"hidden"===n.toLowerCase()?e._appendElement(t,_.HTML):he(e,t),t.ackSelfClosing=!0}(e,t):he(e,t);break;case 6:n===f.SCRIPT?B(e,t):he(e,t);break;case 7:n===f.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,_.HTML),e.insertionMode="IN_CAPTION_MODE"}(e,t):he(e,t);break;case 8:n===f.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,_.HTML),e.insertionMode="IN_COLUMN_GROUP_MODE"}(e,t):n===f.TEMPLATE?B(e,t):he(e,t);break;default:he(e,t)}}function de(e,t){const n=t.tagName;n===f.TABLE?e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode()):n===f.TEMPLATE?G(e,t):n!==f.BODY&&n!==f.CAPTION&&n!==f.COL&&n!==f.COLGROUP&&n!==f.HTML&&n!==f.TBODY&&n!==f.TD&&n!==f.TFOOT&&n!==f.TH&&n!==f.THEAD&&n!==f.TR&&he(e,t)}function he(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function pe(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)he(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}function me(e,t){e.openElements.currentTagName===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=y,e._processToken(t))}function ge(e,t){const n=t.tagName;n===f.HTML?re(e,t):n===f.OPTION?(e.openElements.currentTagName===f.OPTION&&e.openElements.pop(),e._insertElement(t,_.HTML)):n===f.OPTGROUP?(e.openElements.currentTagName===f.OPTION&&e.openElements.pop(),e.openElements.currentTagName===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,_.HTML)):n===f.INPUT||n===f.KEYGEN||n===f.TEXTAREA||n===f.SELECT?e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),n!==f.SELECT&&e._processToken(t)):n!==f.SCRIPT&&n!==f.TEMPLATE||B(e,t)}function fe(e,t){const n=t.tagName;if(n===f.OPTGROUP){const t=e.openElements.items[e.openElements.stackTop-1],n=t&&e.treeAdapter.getTagName(t);e.openElements.currentTagName===f.OPTION&&n===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagName===f.OPTGROUP&&e.openElements.pop()}else n===f.OPTION?e.openElements.currentTagName===f.OPTION&&e.openElements.pop():n===f.SELECT&&e.openElements.hasInSelectScope(f.SELECT)?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode()):n===f.TEMPLATE&&G(e,t)}function _e(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function be(e,t){e.insertionMode="IN_BODY_MODE",e._processToken(t)}function ve(e,t){e.insertionMode="IN_BODY_MODE",e._processToken(t)}e.exports=class{constructor(e){this.options=u(v,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&c.install(this,a),this.options.onParseError&&c.install(this,s,{onParseError:this.options.onParseError})}parse(e){const t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(f.TEMPLATE,_.HTML,[]));const n=this.treeAdapter.createElement("documentmock",_.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===f.TEMPLATE&&this._pushTmplInsertionMode("IN_TEMPLATE_MODE"),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);const r=this.treeAdapter.getFirstChild(n),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,o),o}_bootstrap(e,t){this.tokenizer=new r(this.options),this.stopped=!1,this.insertionMode="INITIAL_MODE",this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new o(this.document,this.treeAdapter),this.activeFormattingElements=new i(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();const t=this.tokenizer.getNextToken();if(t.type===r.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===r.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){const e=this.pendingScript;return this.pendingScript=null,void t(e)}e&&e()}_setupTokenizerCDATAMode(){const e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==_.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,_.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode="TEXT_MODE"}switchToPlaintextParsing(){this.insertionMode="TEXT_MODE",this.originalInsertionMode="IN_BODY_MODE",this.tokenizer.state=r.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===f.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===_.HTML){const e=this.treeAdapter.getTagName(this.fragmentContext);e===f.TITLE||e===f.TEXTAREA?this.tokenizer.state=r.MODE.RCDATA:e===f.STYLE||e===f.XMP||e===f.IFRAME||e===f.NOEMBED||e===f.NOFRAMES||e===f.NOSCRIPT?this.tokenizer.state=r.MODE.RAWTEXT:e===f.SCRIPT?this.tokenizer.state=r.MODE.SCRIPT_DATA:e===f.PLAINTEXT&&(this.tokenizer.state=r.MODE.PLAINTEXT)}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,r)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(e){const t=this.treeAdapter.createElement(e,_.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,_.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(f.HTML,_.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_shouldProcessTokenInForeignContent(e){const t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;const n=this.treeAdapter.getNamespaceURI(t);if(n===_.HTML)return!1;if(this.treeAdapter.getTagName(t)===f.ANNOTATION_XML&&n===_.MATHML&&e.type===r.START_TAG_TOKEN&&e.tagName===f.SVG)return!1;const o=e.type===r.CHARACTER_TOKEN||e.type===r.NULL_CHARACTER_TOKEN||e.type===r.WHITESPACE_CHARACTER_TOKEN;return(!(e.type===r.START_TAG_TOKEN&&e.tagName!==f.MGLYPH&&e.tagName!==f.MALIGNMARK)&&!o||!this._isIntegrationPoint(t,_.MATHML))&&((e.type!==r.START_TAG_TOKEN&&!o||!this._isIntegrationPoint(t,_.HTML))&&e.type!==r.EOF_TOKEN)}_processToken(e){w[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){w.IN_BODY_MODE[e.type](this,e)}_processTokenInForeignContent(e){e.type===r.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e):e.type===r.NULL_CHARACTER_TOKEN?function(e,t){t.chars=m.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e):e.type===r.WHITESPACE_CHARACTER_TOKEN?M(this,e):e.type===r.COMMENT_TOKEN?A(this,e):e.type===r.START_TAG_TOKEN?function(e,t){if(h.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==_.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===_.MATHML?h.adjustTokenMathMLAttrs(t):r===_.SVG&&(h.adjustTokenSVGTagName(t),h.adjustTokenSVGAttrs(t)),h.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):e.type===r.END_TAG_TOKEN&&function(e,t){for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===_.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===r.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(p.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){const n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),o=this.treeAdapter.getAttrList(e);return h.isIntegrationPoint(n,r,o,t)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.length;if(e){let t=e,n=null;do{if(t--,n=this.activeFormattingElements.entries[t],n.type===i.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(let r=t;r<e;r++)n=this.activeFormattingElements.entries[r],this._insertElement(n.token,this.treeAdapter.getNamespaceURI(n.element)),n.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode="IN_ROW_MODE"}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop,t=!1;e>=0;e--){let n=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));const r=this.treeAdapter.getTagName(n),o=E[r];if(o){this.insertionMode=o;break}if(!(t||r!==f.TD&&r!==f.TH)){this.insertionMode="IN_CELL_MODE";break}if(!t&&r===f.HEAD){this.insertionMode="IN_HEAD_MODE";break}if(r===f.SELECT){this._resetInsertionModeForSelect(e);break}if(r===f.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(r===f.HTML){this.insertionMode=this.headElement?"AFTER_HEAD_MODE":"BEFORE_HEAD_MODE";break}if(t){this.insertionMode="IN_BODY_MODE";break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.items[t],n=this.treeAdapter.getTagName(e);if(n===f.TEMPLATE)break;if(n===f.TABLE)return void(this.insertionMode="IN_SELECT_IN_TABLE_MODE")}this.insertionMode="IN_SELECT_MODE"}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){const t=this.treeAdapter.getTagName(e);return t===f.TABLE||t===f.TBODY||t===f.TFOOT||t===f.THEAD||t===f.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),o=this.treeAdapter.getNamespaceURI(n);if(r===f.TEMPLATE&&o===_.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(r===f.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){const t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return g.SPECIAL_ELEMENTS[n][t]}}},function(e,t,n){"use strict";const r=n(400),o=n(401),i=r.CODE_POINTS;e.exports=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){const t=this.html.charCodeAt(this.pos+1);if(r.isSurrogatePair(t))return this.pos++,this._addGap(),r.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,i.EOF;return this._err(o.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,i.EOF;let e=this.html.charCodeAt(this.pos);if(this.skipNextNewLine&&e===i.LINE_FEED)return this.skipNextNewLine=!1,this._addGap(),this.advance();if(e===i.CARRIAGE_RETURN)return this.skipNextNewLine=!0,i.LINE_FEED;this.skipNextNewLine=!1,r.isSurrogate(e)&&(e=this._processSurrogate(e));return e>31&&e<127||e===i.LINE_FEED||e===i.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){r.isControlCodePoint(e)?this._err(o.controlCharacterInInputStream):r.isUndefinedCodePoint(e)&&this._err(o.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}},function(e,t,n){"use strict";e.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},function(e,t,n){"use strict";const r=n(197),o=r.TAG_NAMES,i=r.NAMESPACES;function a(e){switch(e.length){case 1:return e===o.P;case 2:return e===o.RB||e===o.RP||e===o.RT||e===o.DD||e===o.DT||e===o.LI;case 3:return e===o.RTC;case 6:return e===o.OPTION;case 8:return e===o.OPTGROUP}return!1}function s(e){switch(e.length){case 1:return e===o.P;case 2:return e===o.RB||e===o.RP||e===o.RT||e===o.DD||e===o.DT||e===o.LI||e===o.TD||e===o.TH||e===o.TR;case 3:return e===o.RTC;case 5:return e===o.TBODY||e===o.TFOOT||e===o.THEAD;case 6:return e===o.OPTION;case 7:return e===o.CAPTION;case 8:return e===o.OPTGROUP||e===o.COLGROUP}return!1}function c(e,t){switch(e.length){case 2:if(e===o.TD||e===o.TH)return t===i.HTML;if(e===o.MI||e===o.MO||e===o.MN||e===o.MS)return t===i.MATHML;break;case 4:if(e===o.HTML)return t===i.HTML;if(e===o.DESC)return t===i.SVG;break;case 5:if(e===o.TABLE)return t===i.HTML;if(e===o.MTEXT)return t===i.MATHML;if(e===o.TITLE)return t===i.SVG;break;case 6:return(e===o.APPLET||e===o.OBJECT)&&t===i.HTML;case 7:return(e===o.CAPTION||e===o.MARQUEE)&&t===i.HTML;case 8:return e===o.TEMPLATE&&t===i.HTML;case 13:return e===o.FOREIGN_OBJECT&&t===i.SVG;case 14:return e===o.ANNOTATION_XML&&t===i.MATHML}return!1}e.exports=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===i.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){const n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===i.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){const t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===o.H1||e===o.H2||e===o.H3||e===o.H4||e===o.H5||e===o.H6&&t===i.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===o.TD||e===o.TH&&t===i.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==o.TABLE&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==i.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==o.TBODY&&this.currentTagName!==o.TFOOT&&this.currentTagName!==o.THEAD&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==i.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==o.TR&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==i.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const e=this.items[1];return e&&this.treeAdapter.getTagName(e)===o.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.currentTagName===o.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===i.HTML)return!0;if(c(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===o.H1||t===o.H2||t===o.H3||t===o.H4||t===o.H5||t===o.H6)&&n===i.HTML)return!0;if(c(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===i.HTML)return!0;if((n===o.UL||n===o.OL)&&r===i.HTML||c(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===i.HTML)return!0;if(n===o.BUTTON&&r===i.HTML||c(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===i.HTML){if(n===e)return!0;if(n===o.TABLE||n===o.TEMPLATE||n===o.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===i.HTML){if(t===o.TBODY||t===o.THEAD||t===o.TFOOT)return!0;if(t===o.TABLE||t===o.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===i.HTML){if(n===e)return!0;if(n!==o.OPTION&&n!==o.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;a(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;s(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;a(this.currentTagName)&&this.currentTagName!==e;)this.pop()}}},function(e,t,n){"use strict";class r{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){const t=[];if(this.length>=3){const n=this.treeAdapter.getAttrList(e).length,o=this.treeAdapter.getTagName(e),i=this.treeAdapter.getNamespaceURI(e);for(let e=this.length-1;e>=0;e--){const a=this.entries[e];if(a.type===r.MARKER_ENTRY)break;const s=a.element,c=this.treeAdapter.getAttrList(s);this.treeAdapter.getTagName(s)===o&&this.treeAdapter.getNamespaceURI(s)===i&&c.length===n&&t.push({idx:e,attrs:c})}}return t.length<3?[]:t}_ensureNoahArkCondition(e){const t=this._getNoahArkConditionCandidates(e);let n=t.length;if(n){const r=this.treeAdapter.getAttrList(e),o=r.length,i=Object.create(null);for(let e=0;e<o;e++){const t=r[e];i[t.name]=t.value}for(let e=0;e<o;e++)for(let r=0;r<n;r++){const o=t[r].attrs[e];if(i[o.name]!==o.value&&(t.splice(r,1),n--),t.length<3)return}for(let e=n-1;e>=2;e--)this.entries.splice(t[e].idx,1),this.length--}}insertMarker(){this.entries.push({type:r.MARKER_ENTRY}),this.length++}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:r.ELEMENT_ENTRY,element:e,token:t}),this.length++}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:r.ELEMENT_ENTRY,element:e,token:t}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const e=this.entries.pop();if(this.length--,e.type===r.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===r.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===r.ELEMENT_ENTRY&&n.element===e)return n}return null}}r.MARKER_ENTRY="MARKER_ENTRY",r.ELEMENT_ENTRY="ELEMENT_ENTRY",e.exports=r},function(e,t,n){"use strict";const r=n(182),o=n(318),i=n(589),a=n(1036),s=n(197).TAG_NAMES;e.exports=class extends r{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i={};t.type===o.END_TAG_TOKEN&&r===t.tagName?(i.endTag=Object.assign({},n),i.endLine=n.endLine,i.endCol=n.endCol,i.endOffset=n.endOffset):(i.endLine=n.startLine,i.endCol=n.startCol,i.endOffset=n.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}_getOverriddenMethods(e,t){return{_bootstrap(n,o){t._bootstrap.call(this,n,o),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const s=r.install(this.tokenizer,i);e.posTracker=s.posTracker,r.install(this.openElements,a,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let t=this.openElements.stackTop;t>=0;t--)e._setEndLocation(this.openElements.items[t],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){e.currentToken=n,t._processToken.call(this,n);if(n.type===o.END_TAG_TOKEN&&(n.tagName===s.HTML||n.tagName===s.BODY&&this.openElements.hasInScope(s.BODY)))for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];if(this.treeAdapter.getTagName(r)===n.tagName){e._setEndLocation(r,n);break}}},_setDocumentType(e){t._setDocumentType.call(this,e);const n=this.treeAdapter.getChildNodes(this.document),r=n.length;for(let t=0;t<r;t++){const r=n[t];if(this.treeAdapter.isDocumentTypeNode(r)){this.treeAdapter.setNodeSourceCodeLocation(r,e.location);break}}},_attachElementToTree(n){e._setStartLocation(n),e.lastStartTagToken=null,t._attachElementToTree.call(this,n)},_appendElement(n,r){e.lastStartTagToken=n,t._appendElement.call(this,n,r)},_insertElement(n,r){e.lastStartTagToken=n,t._insertElement.call(this,n,r)},_insertTemplate(n){e.lastStartTagToken=n,t._insertTemplate.call(this,n);const r=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(r,null)},_insertFakeRootElement(){t._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(e,n){t._appendCommentNode.call(this,e,n);const r=this.treeAdapter.getChildNodes(n),o=r[r.length-1];this.treeAdapter.setNodeSourceCodeLocation(o,e.location)},_findFosterParentingLocation(){return e.lastFosterParentingLocation=t._findFosterParentingLocation.call(this),e.lastFosterParentingLocation},_insertCharacters(n){t._insertCharacters.call(this,n);const r=this._shouldFosterParentOnInsertion(),o=r&&e.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,i=this.treeAdapter.getChildNodes(o),a=r&&e.lastFosterParentingLocation.beforeElement?i.indexOf(e.lastFosterParentingLocation.beforeElement)-1:i.length-1,s=i[a];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:e,endCol:t,endOffset:r}=n.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:e,endCol:t,endOffset:r})}else this.treeAdapter.setNodeSourceCodeLocation(s,n.location)}}}}},function(e,t,n){"use strict";const r=n(182);e.exports=class extends r{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let t=this.stackTop;t>0;t--)e.onItemPop(this.items[t]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}}},function(e,t,n){"use strict";const r=n(402),o=n(1038),i=n(589),a=n(182);e.exports=class extends r{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),a.install(this.tokenizer,o,e.opts),a.install(this.tokenizer,i)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(t,n){e.locBeforeToken=n&&n.beforeToken,e._reportError(t)}}}}},function(e,t,n){"use strict";const r=n(402),o=n(1039),i=n(182);e.exports=class extends r{constructor(e,t){super(e,t);const n=i.install(e.preprocessor,o,t);this.posTracker=n.posTracker}}},function(e,t,n){"use strict";const r=n(402),o=n(590),i=n(182);e.exports=class extends r{constructor(e,t){super(e,t),this.posTracker=i.install(e,o),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}}},function(e,t,n){"use strict";const r=n(318),o=n(197),i=o.TAG_NAMES,a=o.NAMESPACES,s=o.ATTRS,c="text/html",l="application/xhtml+xml",u={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},d={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:a.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:a.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:a.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:a.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:a.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:a.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:a.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:a.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:a.XML},"xml:space":{prefix:"xml",name:"space",namespace:a.XML},xmlns:{prefix:"",name:"xmlns",namespace:a.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:a.XMLNS}},h=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},p={[i.B]:!0,[i.BIG]:!0,[i.BLOCKQUOTE]:!0,[i.BODY]:!0,[i.BR]:!0,[i.CENTER]:!0,[i.CODE]:!0,[i.DD]:!0,[i.DIV]:!0,[i.DL]:!0,[i.DT]:!0,[i.EM]:!0,[i.EMBED]:!0,[i.H1]:!0,[i.H2]:!0,[i.H3]:!0,[i.H4]:!0,[i.H5]:!0,[i.H6]:!0,[i.HEAD]:!0,[i.HR]:!0,[i.I]:!0,[i.IMG]:!0,[i.LI]:!0,[i.LISTING]:!0,[i.MENU]:!0,[i.META]:!0,[i.NOBR]:!0,[i.OL]:!0,[i.P]:!0,[i.PRE]:!0,[i.RUBY]:!0,[i.S]:!0,[i.SMALL]:!0,[i.SPAN]:!0,[i.STRONG]:!0,[i.STRIKE]:!0,[i.SUB]:!0,[i.SUP]:!0,[i.TABLE]:!0,[i.TT]:!0,[i.U]:!0,[i.UL]:!0,[i.VAR]:!0};t.causesExit=function(e){const t=e.tagName;return!!(t===i.FONT&&(null!==r.getTokenAttr(e,s.COLOR)||null!==r.getTokenAttr(e,s.SIZE)||null!==r.getTokenAttr(e,s.FACE)))||p[t]},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}},t.adjustTokenSVGAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=u[e.attrs[t].name];n&&(e.attrs[t].name=n)}},t.adjustTokenXMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=d[e.attrs[t].name];n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}},t.adjustTokenSVGTagName=function(e){const t=h[e.tagName];t&&(e.tagName=t)},t.isIntegrationPoint=function(e,t,n,r){return!(r&&r!==a.HTML||!function(e,t,n){if(t===a.MATHML&&e===i.ANNOTATION_XML)for(let e=0;e<n.length;e++)if(n[e].name===s.ENCODING){const t=n[e].value.toLowerCase();return t===c||t===l}return t===a.SVG&&(e===i.FOREIGN_OBJECT||e===i.DESC||e===i.TITLE)}(e,t,n))||!(r&&r!==a.MATHML||!function(e,t){return t===a.MATHML&&(e===i.MI||e===i.MO||e===i.MN||e===i.MS||e===i.MTEXT)}(e,t))}},function(e,t,n){"use strict";const r=n(591),o=n(592),i=n(403),a=n(197),s=a.TAG_NAMES,c=a.NAMESPACES,l={treeAdapter:r},u=/&/g,d=/\u00a0/g,h=/"/g,p=/</g,m=/>/g;class g{constructor(e,t){this.options=o(l,t),this.treeAdapter=this.options.treeAdapter,this.html="",this.startNode=e}serialize(){return this._serializeChildNodes(this.startNode),this.html}_serializeChildNodes(e){const t=this.treeAdapter.getChildNodes(e);if(t)for(let e=0,n=t.length;e<n;e++){const n=t[e];this.treeAdapter.isElementNode(n)?this._serializeElement(n):this.treeAdapter.isTextNode(n)?this._serializeTextNode(n):this.treeAdapter.isCommentNode(n)?this._serializeCommentNode(n):this.treeAdapter.isDocumentTypeNode(n)&&this._serializeDocumentTypeNode(n)}}_serializeElement(e){const t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);if(this.html+="<"+t,this._serializeAttributes(e),this.html+=">",t!==s.AREA&&t!==s.BASE&&t!==s.BASEFONT&&t!==s.BGSOUND&&t!==s.BR&&t!==s.COL&&t!==s.EMBED&&t!==s.FRAME&&t!==s.HR&&t!==s.IMG&&t!==s.INPUT&&t!==s.KEYGEN&&t!==s.LINK&&t!==s.META&&t!==s.PARAM&&t!==s.SOURCE&&t!==s.TRACK&&t!==s.WBR){const r=t===s.TEMPLATE&&n===c.HTML?this.treeAdapter.getTemplateContent(e):e;this._serializeChildNodes(r),this.html+="</"+t+">"}}_serializeAttributes(e){const t=this.treeAdapter.getAttrList(e);for(let e=0,n=t.length;e<n;e++){const n=t[e],r=g.escapeString(n.value,!0);this.html+=" ",n.namespace?n.namespace===c.XML?this.html+="xml:"+n.name:n.namespace===c.XMLNS?("xmlns"!==n.name&&(this.html+="xmlns:"),this.html+=n.name):n.namespace===c.XLINK?this.html+="xlink:"+n.name:this.html+=n.prefix+":"+n.name:this.html+=n.name,this.html+='="'+r+'"'}}_serializeTextNode(e){const t=this.treeAdapter.getTextNodeContent(e),n=this.treeAdapter.getParentNode(e);let r=void 0;n&&this.treeAdapter.isElementNode(n)&&(r=this.treeAdapter.getTagName(n)),r===s.STYLE||r===s.SCRIPT||r===s.XMP||r===s.IFRAME||r===s.NOEMBED||r===s.NOFRAMES||r===s.PLAINTEXT||r===s.NOSCRIPT?this.html+=t:this.html+=g.escapeString(t,!1)}_serializeCommentNode(e){this.html+="\x3c!--"+this.treeAdapter.getCommentNodeContent(e)+"--\x3e"}_serializeDocumentTypeNode(e){const t=this.treeAdapter.getDocumentTypeNodeName(e);this.html+="<"+i.serializeContent(t,null,null)+">"}}g.escapeString=function(e,t){return e=e.replace(u,"&").replace(d," "),e=t?e.replace(h,"""):e.replace(p,"<").replace(m,">")},e.exports=g},function(e,t,n){"use strict";const r=n(403),{DOCUMENT_MODE:o}=n(197),i={element:1,text:3,cdata:4,comment:8},a={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};class s{constructor(e){for(const t of Object.keys(e))this[t]=e[t]}get firstChild(){const e=this.children;return e&&e[0]||null}get lastChild(){const e=this.children;return e&&e[e.length-1]||null}get nodeType(){return i[this.type]||i.element}}Object.keys(a).forEach(e=>{const t=a[e];Object.defineProperty(s.prototype,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})}),t.createDocument=function(){return new s({type:"root",name:"root",parent:null,prev:null,next:null,children:[],"x-mode":o.NO_QUIRKS})},t.createDocumentFragment=function(){return new s({type:"root",name:"root",parent:null,prev:null,next:null,children:[]})},t.createElement=function(e,t,n){const r=Object.create(null),o=Object.create(null),i=Object.create(null);for(let e=0;e<n.length;e++){const t=n[e].name;r[t]=n[e].value,o[t]=n[e].namespace,i[t]=n[e].prefix}return new s({type:"script"===e||"style"===e?e:"tag",name:e,namespace:t,attribs:r,"x-attribsNamespace":o,"x-attribsPrefix":i,children:[],parent:null,prev:null,next:null})},t.createCommentNode=function(e){return new s({type:"comment",data:e,parent:null,prev:null,next:null})};const c=function(e){return new s({type:"text",data:e,parent:null,prev:null,next:null})},l=t.appendChild=function(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},u=t.insertBefore=function(e,t,n){const r=e.children.indexOf(n),o=n.prev;o&&(o.next=t,t.prev=o),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e};t.setTemplateContent=function(e,t){l(e,t)},t.getTemplateContent=function(e){return e.children[0]},t.setDocumentType=function(e,t,n,o){const i=r.serializeContent(t,n,o);let a=null;for(let t=0;t<e.children.length;t++)if("directive"===e.children[t].type&&"!doctype"===e.children[t].name){a=e.children[t];break}a?(a.data=i,a["x-name"]=t,a["x-publicId"]=n,a["x-systemId"]=o):l(e,new s({type:"directive",name:"!doctype",data:i,"x-name":t,"x-publicId":n,"x-systemId":o}))},t.setDocumentMode=function(e,t){e["x-mode"]=t},t.getDocumentMode=function(e){return e["x-mode"]},t.detachNode=function(e){if(e.parent){const t=e.parent.children.indexOf(e),n=e.prev,r=e.next;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},t.insertText=function(e,t){const n=e.children[e.children.length-1];n&&"text"===n.type?n.data+=t:l(e,c(t))},t.insertTextBefore=function(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&"text"===r.type?r.data+=t:u(e,c(t),n)},t.adoptAttributes=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].name;void 0===e.attribs[r]&&(e.attribs[r]=t[n].value,e["x-attribsNamespace"][r]=t[n].namespace,e["x-attribsPrefix"][r]=t[n].prefix)}},t.getFirstChild=function(e){return e.children[0]},t.getChildNodes=function(e){return e.children},t.getParentNode=function(e){return e.parent},t.getAttrList=function(e){const t=[];for(const n in e.attribs)t.push({name:n,value:e.attribs[n],namespace:e["x-attribsNamespace"][n],prefix:e["x-attribsPrefix"][n]});return t},t.getTagName=function(e){return e.name},t.getNamespaceURI=function(e){return e.namespace},t.getTextNodeContent=function(e){return e.data},t.getCommentNodeContent=function(e){return e.data},t.getDocumentTypeNodeName=function(e){return e["x-name"]},t.getDocumentTypeNodePublicId=function(e){return e["x-publicId"]},t.getDocumentTypeNodeSystemId=function(e){return e["x-systemId"]},t.isTextNode=function(e){return"text"===e.type},t.isCommentNode=function(e){return"comment"===e.type},t.isDocumentTypeNode=function(e){return"directive"===e.type&&"!doctype"===e.name},t.isElementNode=function(e){return!!e.attribs},t.setNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=t},t.getNodeSourceCodeLocation=function(e){return e.sourceCodeLocation},t.updateNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=Object.assign(e.sourceCodeLocation,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cheerio=void 0;var r=n(181),o=r.__importDefault(n(404)),i=r.__importDefault(n(394)),a=n(241),s=r.__importStar(n(1044)),c=r.__importStar(n(1045)),l=r.__importStar(n(1046)),u=r.__importStar(n(1047)),d=r.__importStar(n(1048)),h=function(){function e(e,t,n,r){var s=this;if(void 0===r&&(r=i.default),this.length=0,this.options=r,!e)return this;if(n&&("string"==typeof n&&(n=o.default(n,this.options,!1)),this._root=new this.constructor(n,null,null,this.options),this._root._root=this._root),a.isCheerio(e))return e;var c,l="string"==typeof e&&a.isHtml(e)?o.default(e,this.options,!1).children:(c=e).name||"root"===c.type||"text"===c.type||"comment"===c.type?[e]:Array.isArray(e)?e:null;if(l)return l.forEach((function(e,t){s[t]=e})),this.length=l.length,this;var u=e,d=t?"string"==typeof t?a.isHtml(t)?this._make(o.default(t,this.options,!1)):(u=t+" "+u,this._root):a.isCheerio(t)?t:this._make(t):this._root;return d?d.find(u):this}return e.prototype._make=function(e,t){var n=new this.constructor(e,t,this._root,this.options);return n.prevObject=this,n},e}();t.Cheerio=h,h.prototype.cheerio="[cheerio object]",h.prototype.splice=Array.prototype.splice,h.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(h.prototype,s,c,l,u,d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toggleClass=t.removeClass=t.addClass=t.hasClass=t.removeAttr=t.val=t.data=t.prop=t.attr=void 0;var r=n(272),o=n(241),i=Object.prototype.hasOwnProperty,a=/\s+/,s={null:null,true:!0,false:!1},c=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,l=/^{[^]*}$|^\[[^]*]$/;function u(e,t,n){var a;if(e&&o.isTag(e))return null!==(a=e.attribs)&&void 0!==a||(e.attribs={}),t?i.call(e.attribs,t)?!n&&c.test(t)?t:e.attribs[t]:"option"===e.name&&"value"===t?r.text(e.children):"input"!==e.name||"radio"!==e.attribs.type&&"checkbox"!==e.attribs.type||"value"!==t?void 0:"on":e.attribs}function d(e,t,n){null===n?f(e,t):e.attribs[t]=""+n}function h(e,t,n){if(e&&o.isTag(e))return t in e?e[t]:!n&&c.test(t)?void 0!==u(e,t,!1):u(e,t,n)}function p(e,t,n,r){t in e?e[t]=n:d(e,t,!r&&c.test(t)?n?"":null:""+n)}function m(e,t,n){var r,o=e;null!==(r=o.data)&&void 0!==r||(o.data={}),"object"==typeof t?Object.assign(o.data,t):"string"==typeof t&&void 0!==n&&(o.data[t]=n)}function g(e,t){var n,r,a;null==t?r=(n=Object.keys(e.attribs).filter((function(e){return e.startsWith("data-")}))).map((function(e){return o.camelCase(e.slice("data-".length))})):(n=["data-"+o.cssCase(t)],r=[t]);for(var c=0;c<n.length;++c){var u=n[c],d=r[c];if(i.call(e.attribs,u)&&!i.call(e.data,d)){if(a=e.attribs[u],i.call(s,a))a=s[a];else if(a===String(Number(a)))a=Number(a);else if(l.test(a))try{a=JSON.parse(a)}catch(e){}e.data[d]=a}}return null==t?e.data:a}function f(e,t){e.attribs&&i.call(e.attribs,t)&&delete e.attribs[t]}function _(e){return e?e.trim().split(a):[]}t.attr=function(e,t){if("object"==typeof e||void 0!==t){if("function"==typeof t){if("string"!=typeof e)throw new Error("Bad combination of arguments.");return o.domEach(this,(function(n,r){o.isTag(n)&&d(n,e,t.call(n,r,n.attribs[e]))}))}return o.domEach(this,(function(n){o.isTag(n)&&("object"==typeof e?Object.keys(e).forEach((function(t){var r=e[t];d(n,t,r)})):d(n,e,t))}))}return arguments.length>1?this:u(this[0],e,this.options.xmlMode)},t.prop=function(e,t){var n=this;if("string"==typeof e&&void 0===t)switch(e){case"style":var r=this.css(),i=Object.keys(r);return i.forEach((function(e,t){r[t]=e})),r.length=i.length,r;case"tagName":case"nodeName":var a=this[0];return o.isTag(a)?a.name.toUpperCase():void 0;case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return h(this[0],e,this.options.xmlMode)}if("object"==typeof e||void 0!==t){if("function"==typeof t){if("object"==typeof e)throw new Error("Bad combination of arguments.");return o.domEach(this,(function(r,i){o.isTag(r)&&p(r,e,t.call(r,i,h(r,e,n.options.xmlMode)),n.options.xmlMode)}))}return o.domEach(this,(function(r){o.isTag(r)&&("object"==typeof e?Object.keys(e).forEach((function(t){var o=e[t];p(r,t,o,n.options.xmlMode)})):p(r,e,t,n.options.xmlMode))}))}},t.data=function(e,t){var n,r=this[0];if(r&&o.isTag(r)){var a=r;return null!==(n=a.data)&&void 0!==n||(a.data={}),e?"object"==typeof e||void 0!==t?(o.domEach(this,(function(n){o.isTag(n)&&("object"==typeof e?m(n,e):m(n,e,t))})),this):i.call(a.data,e)?a.data[e]:g(a,e):g(a)}},t.val=function(e){var t=0===arguments.length,n=this[0];if(!n||!o.isTag(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":var i=this.find("option:selected");if(!t){if(null==this.attr("multiple")&&"object"==typeof e)return this;this.find("option").removeAttr("selected");for(var a="object"!=typeof e?[e]:e,s=0;s<a.length;s++)this.find('option[value="'+a[s]+'"]').attr("selected","");return this}return this.attr("multiple")?i.toArray().map((function(e){return r.text(e.children)})):i.attr("value");case"input":case"option":return t?this.attr("value"):this.attr("value",e)}},t.removeAttr=function(e){for(var t=_(e),n=function(e){o.domEach(r,(function(n){o.isTag(n)&&f(n,t[e])}))},r=this,i=0;i<t.length;i++)n(i);return this},t.hasClass=function(e){return this.toArray().some((function(t){var n=o.isTag(t)&&t.attribs.class,r=-1;if(n&&e.length)for(;(r=n.indexOf(e,r+1))>-1;){var i=r+e.length;if((0===r||a.test(n[r-1]))&&(i===n.length||a.test(n[i])))return!0}return!1}))},t.addClass=function e(t){if("function"==typeof t)return o.domEach(this,(function(n,r){if(o.isTag(n)){var i=n.attribs.class||"";e.call([n],t.call(n,r,i))}}));if(!t||"string"!=typeof t)return this;for(var n=t.split(a),r=this.length,i=0;i<r;i++){var s=this[i];if(o.isTag(s)){var c=u(s,"class",!1);if(c){for(var l=" "+c+" ",h=0;h<n.length;h++){var p=n[h]+" ";l.includes(" "+p)||(l+=p)}d(s,"class",l.trim())}else d(s,"class",n.join(" ").trim())}}return this},t.removeClass=function e(t){if("function"==typeof t)return o.domEach(this,(function(n,r){o.isTag(n)&&e.call([n],t.call(n,r,n.attribs.class||""))}));var n=_(t),r=n.length,i=0===arguments.length;return o.domEach(this,(function(e){if(o.isTag(e))if(i)e.attribs.class="";else{for(var t=_(e.attribs.class),a=!1,s=0;s<r;s++){var c=t.indexOf(n[s]);c>=0&&(t.splice(c,1),a=!0,s--)}a&&(e.attribs.class=t.join(" "))}}))},t.toggleClass=function e(t,n){if("function"==typeof t)return o.domEach(this,(function(r,i){o.isTag(r)&&e.call([r],t.call(r,i,r.attribs.class||"",n),n)}));if(!t||"string"!=typeof t)return this;for(var r=t.split(a),i=r.length,s="boolean"==typeof n?n?1:-1:0,c=this.length,l=0;l<c;l++){var u=this[l];if(o.isTag(u)){for(var d=_(u.attribs.class),h=0;h<i;h++){var p=d.indexOf(r[h]);s>=0&&p<0?d.push(r[h]):s<=0&&p>=0&&d.splice(p,1)}u.attribs.class=d.join(" ")}}return this}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addBack=t.add=t.end=t.slice=t.index=t.toArray=t.get=t.eq=t.last=t.first=t.has=t.not=t.is=t.filterArray=t.filter=t.map=t.each=t.contents=t.children=t.siblings=t.prevUntil=t.prevAll=t.prev=t.nextUntil=t.nextAll=t.next=t.closest=t.parentsUntil=t.parents=t.parent=t.find=void 0;var r=n(181),o=n(146),i=r.__importStar(n(572)),a=n(241),s=n(272),c=n(214),l=c.DomUtils.uniqueSort,u=/^\s*[~+]/;function d(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return function(r){var o,i=e(t,this);return r&&(i=_(i,r,this.options.xmlMode,null===(o=this._root)||void 0===o?void 0:o[0])),this._make(this.length>1&&i.length>1?n.reduce((function(e,t){return t(e)}),i):i)}}}t.find=function(e){var t;if(!e)return this._make([]);var n=this.toArray();if("string"!=typeof e){var r=a.isCheerio(e)?e.toArray():[e];return this._make(r.filter((function(e){return n.some((function(t){return s.contains(t,e)}))})))}var o=u.test(e)?n:this.children().toArray(),c={context:n,root:null===(t=this._root)||void 0===t?void 0:t[0],xmlMode:this.options.xmlMode};return this._make(i.select(e,o,c))};var h=d((function(e,t){for(var n,r=[],o=0;o<t.length;o++){var i=e(t[o]);r.push(i)}return(n=new Array).concat.apply(n,r)})),p=d((function(e,t){for(var n=[],r=0;r<t.length;r++){var o=e(t[r]);null!==o&&n.push(o)}return n}));function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=null,s=d((function(e,t){var n=[];return a.domEach(t,(function(t){for(var r;(r=e(t))&&!(null==o?void 0:o(r,n.length));t=r)n.push(r)})),n})).apply(void 0,r.__spreadArray([e],t));return function(e,t){var n=this;o="string"==typeof e?function(t){return i.is(t,e,n.options)}:e?f(e):null;var r=s.call(this,t);return o=null,r}}function g(e){return Array.from(new Set(e))}function f(e){return"function"==typeof e?function(t,n){return e.call(t,n,t)}:a.isCheerio(e)?function(t){return Array.prototype.includes.call(e,t)}:function(t){return e===t}}function _(e,t,n,r){return"string"==typeof t?i.filter(t,e,{xmlMode:n,root:r}):e.filter(f(t))}t.parent=p((function(e){var t=e.parent;return t&&!o.isDocument(t)?t:null}),g),t.parents=h((function(e){for(var t=[];e.parent&&!o.isDocument(e.parent);)t.push(e.parent),e=e.parent;return t}),l,(function(e){return e.reverse()})),t.parentsUntil=m((function(e){var t=e.parent;return t&&!o.isDocument(t)?t:null}),l,(function(e){return e.reverse()})),t.closest=function(e){var t=this,n=[];return e?(a.domEach(this,(function(r){for(var o;r&&"root"!==r.type;){if(!e||_([r],e,t.options.xmlMode,null===(o=t._root)||void 0===o?void 0:o[0]).length){r&&!n.includes(r)&&n.push(r);break}r=r.parent}})),this._make(n)):this._make(n)},t.next=p((function(e){return c.DomUtils.nextElementSibling(e)})),t.nextAll=h((function(e){for(var t=[];e.next;)e=e.next,a.isTag(e)&&t.push(e);return t}),g),t.nextUntil=m((function(e){return c.DomUtils.nextElementSibling(e)}),g),t.prev=p((function(e){return c.DomUtils.prevElementSibling(e)})),t.prevAll=h((function(e){for(var t=[];e.prev;)e=e.prev,a.isTag(e)&&t.push(e);return t}),g),t.prevUntil=m((function(e){return c.DomUtils.prevElementSibling(e)}),g),t.siblings=h((function(e){return c.DomUtils.getSiblings(e).filter((function(t){return a.isTag(t)&&t!==e}))}),l),t.children=h((function(e){return c.DomUtils.getChildren(e).filter(a.isTag)}),g),t.contents=function(){var e=this.toArray().reduce((function(e,t){return o.hasChildren(t)?e.concat(t.children):e}),[]);return this._make(e)},t.each=function(e){for(var t=0,n=this.length;t<n&&!1!==e.call(this[t],t,this[t]);)++t;return this},t.map=function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n],o=e.call(r,n,r);null!=o&&(t=t.concat(o))}return this._make(t)},t.filter=function(e){var t;return this._make(_(this.toArray(),e,this.options.xmlMode,null===(t=this._root)||void 0===t?void 0:t[0]))},t.filterArray=_,t.is=function(e){var t=this.toArray();return"string"==typeof e?i.some(t.filter(a.isTag),e,this.options):!!e&&t.some(f(e))},t.not=function(e){var t=this.toArray();if("string"==typeof e){var n=new Set(i.filter(e,t,this.options));t=t.filter((function(e){return!n.has(e)}))}else{var r=f(e);t=t.filter((function(e,t){return!r(e,t)}))}return this._make(t)},t.has=function(e){var t=this;return this.filter("string"==typeof e?":has("+e+")":function(n,r){return t._make(r).find(e).length>0})},t.first=function(){return this.length>1?this._make(this[0]):this},t.last=function(){return this.length>0?this._make(this[this.length-1]):this},t.eq=function(e){var t;return 0===(e=+e)&&this.length<=1?this:(e<0&&(e=this.length+e),this._make(null!==(t=this[e])&&void 0!==t?t:[]))},t.get=function(e){return null==e?this.toArray():this[e<0?this.length+e:e]},t.toArray=function(){return Array.prototype.slice.call(this)},t.index=function(e){var t,n;return null==e?(t=this.parent().children(),n=this[0]):"string"==typeof e?(t=this._make(e),n=this[0]):(t=this,n=a.isCheerio(e)?e[0]:e),Array.prototype.indexOf.call(t,n)},t.slice=function(e,t){return this._make(Array.prototype.slice.call(this,e,t))},t.end=function(){var e;return null!==(e=this.prevObject)&&void 0!==e?e:this._make([])},t.add=function(e,t){var n=this._make(e,t),o=l(r.__spreadArray(r.__spreadArray([],this.get()),n.get()));return this._make(o)},t.addBack=function(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.text=t.toString=t.html=t.empty=t.replaceWith=t.remove=t.insertBefore=t.before=t.insertAfter=t.after=t.wrapAll=t.unwrap=t.wrapInner=t.wrap=t.prepend=t.append=t.prependTo=t.appendTo=t._makeDomArray=void 0;var r=n(181),o=n(146),i=n(146),a=r.__importStar(n(404)),s=n(272),c=n(241),l=n(214);function u(e){return function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this.length-1;return c.domEach(this,(function(r,a){if(o.hasChildren(r)){var c="function"==typeof n[0]?n[0].call(r,a,s.html(r.children)):n,l=t._makeDomArray(c,a<i);e(l,r.children,r)}}))}}function d(e,t,n,o,i){for(var a,s,c=r.__spreadArray([t,n],o),l=e[t-1]||null,u=e[t+n]||null,d=0;d<o.length;++d){var h=o[d],p=h.parent;if(p){var m=p.children.indexOf(o[d]);m>-1&&(p.children.splice(m,1),i===p&&t>m&&c[0]--)}h.parent=i,h.prev&&(h.prev.next=null!==(a=h.next)&&void 0!==a?a:null),h.next&&(h.next.prev=null!==(s=h.prev)&&void 0!==s?s:null),h.prev=o[d-1]||l,h.next=o[d+1]||u}return l&&(l.next=o[0]),u&&(u.prev=o[o.length-1]),e.splice.apply(e,c)}function h(e){return function(t){for(var n=this.length-1,r=this.parents().last(),o=0;o<this.length;o++){var i=this[o],a="function"==typeof t?t.call(i,o,i):"string"!=typeof t||c.isHtml(t)?t:r.find(t).clone(),s=this._makeDomArray(a,o<n)[0];if(s&&l.DomUtils.hasChildren(s)){for(var u=s,d=0;d<u.children.length;){var h=u.children[d];c.isTag(h)?(u=h,d=0):d++}e(i,u,[s])}}return this}}t._makeDomArray=function(e,t){var n=this;return null==e?[]:c.isCheerio(e)?t?c.cloneDom(e.get()):e.get():Array.isArray(e)?e.reduce((function(e,r){return e.concat(n._makeDomArray(r,t))}),[]):"string"==typeof e?a.default(e,this.options,!1).children:t?c.cloneDom([e]):[e]},t.appendTo=function(e){return(c.isCheerio(e)?e:this._make(e)).append(this),this},t.prependTo=function(e){return(c.isCheerio(e)?e:this._make(e)).prepend(this),this},t.append=u((function(e,t,n){d(t,t.length,0,e,n)})),t.prepend=u((function(e,t,n){d(t,0,0,e,n)})),t.wrap=h((function(e,t,n){var r=e.parent;if(r){var o=r.children,i=o.indexOf(e);a.update([e],t),d(o,i,0,n,r)}})),t.wrapInner=h((function(e,t,n){o.hasChildren(e)&&(a.update(e.children,t),a.update(n,e))})),t.unwrap=function(e){var t=this;return this.parent(e).not("body").each((function(e,n){t._make(n).replaceWith(n.children)})),this},t.wrapAll=function(e){var t=this[0];if(t){for(var n=this._make("function"==typeof e?e.call(t,0,t):e).insertBefore(t),r=void 0,o=0;o<n.length;o++)"tag"===n[o].type&&(r=n[o]);for(var i=0;r&&i<r.children.length;){var a=r.children[i];"tag"===a.type?(r=a,i=0):i++}r&&this._make(r).append(this)}return this},t.after=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.length-1;return c.domEach(this,(function(n,o){var i=n.parent;if(l.DomUtils.hasChildren(n)&&i){var a=i.children,c=a.indexOf(n);if(!(c<0)){var u="function"==typeof t[0]?t[0].call(n,o,s.html(n.children)):t;d(a,c+1,0,e._makeDomArray(u,o<r),i)}}}))},t.insertAfter=function(e){var t=this;"string"==typeof e&&(e=this._make(e)),this.remove();var n=[];return this._makeDomArray(e).forEach((function(e){var r=t.clone().toArray(),o=e.parent;if(o){var i=o.children,a=i.indexOf(e);a<0||(d(i,a+1,0,r,o),n.push.apply(n,r))}})),this._make(n)},t.before=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.length-1;return c.domEach(this,(function(n,o){var i=n.parent;if(l.DomUtils.hasChildren(n)&&i){var a=i.children,c=a.indexOf(n);if(!(c<0)){var u="function"==typeof t[0]?t[0].call(n,o,s.html(n.children)):t;d(a,c,0,e._makeDomArray(u,o<r),i)}}}))},t.insertBefore=function(e){var t=this,n=this._make(e);this.remove();var r=[];return c.domEach(n,(function(e){var n=t.clone().toArray(),o=e.parent;if(o){var i=o.children,a=i.indexOf(e);a<0||(d(i,a,0,n,o),r.push.apply(r,n))}})),this._make(r)},t.remove=function(e){var t=e?this.filter(e):this;return c.domEach(t,(function(e){l.DomUtils.removeElement(e),e.prev=e.next=e.parent=null})),this},t.replaceWith=function(e){var t=this;return c.domEach(this,(function(n,r){var o=n.parent;if(o){var i=o.children,s="function"==typeof e?e.call(n,r,n):e,c=t._makeDomArray(s);a.update(c,null);var l=i.indexOf(n);d(i,l,1,c,o),c.includes(n)||(n.parent=n.prev=n.next=null)}}))},t.empty=function(){return c.domEach(this,(function(e){l.DomUtils.hasChildren(e)&&(e.children.forEach((function(e){e.next=e.prev=e.parent=null})),e.children.length=0)}))},t.html=function(e){if(void 0===e){var t=this[0];return t&&l.DomUtils.hasChildren(t)?s.html(t.children,this.options):null}var n=r.__assign(r.__assign({},this.options),{context:null});return c.domEach(this,(function(t){if(l.DomUtils.hasChildren(t)){t.children.forEach((function(e){e.next=e.prev=e.parent=null})),n.context=t;var r=c.isCheerio(e)?e.toArray():a.default(""+e,n,!1).children;a.update(r,t)}}))},t.toString=function(){return s.html(this,this.options)},t.text=function e(t){var n=this;return void 0===t?s.text(this):"function"==typeof t?c.domEach(this,(function(r,o){e.call(n._make(r),t.call(r,o,s.text([r])))})):c.domEach(this,(function(e){if(l.DomUtils.hasChildren(e)){e.children.forEach((function(e){e.next=e.prev=e.parent=null}));var n=new i.Text(t);a.update(n,e)}}))},t.clone=function(){return this._make(c.cloneDom(this.get()))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.css=void 0;var r=n(241);function o(e,t){if(e&&r.isTag(e)){var n=function(e){return(e=(e||"").trim())?e.split(";").reduce((function(e,t){var n=t.indexOf(":");return n<1||n===t.length-1||(e[t.slice(0,n).trim()]=t.slice(n+1).trim()),e}),{}):{}}(e.attribs.style);if("string"==typeof t)return n[t];if(Array.isArray(t)){var o={};return t.forEach((function(e){null!=n[e]&&(o[e]=n[e])})),o}return n}}t.css=function(e,t){return null!=e&&null!=t||"object"==typeof e&&!Array.isArray(e)?r.domEach(this,(function(n,i){r.isTag(n)&&function e(t,n,r,i){if("string"==typeof n){var a=o(t),s="function"==typeof r?r.call(t,i,a[n]):r;""===s?delete a[n]:null!=s&&(a[n]=s),t.attribs.style=(c=a,Object.keys(c).reduce((function(e,t){return e+(e?" ":"")+t+": "+c[t]+";"}),""))}else"object"==typeof n&&Object.keys(n).forEach((function(r,o){e(t,r,n[r],o)}));var c}(n,e,t,i)})):o(this[0],e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeArray=t.serialize=void 0;var r=n(241),o=/%20/g,i=/\r?\n/g;t.serialize=function(){return this.serializeArray().map((function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)})).join("&").replace(o,"+")},t.serializeArray=function(){var e=this;return this.map((function(t,n){var o=e._make(n);return r.isTag(n)&&"form"===n.name?o.find("input,select,textarea,keygen").toArray():o.filter("input,select,textarea,keygen").toArray()})).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function(t,n){var r,o=e._make(n),a=o.attr("name"),s=null!==(r=o.val())&&void 0!==r?r:"";return Array.isArray(s)?s.map((function(e){return{name:a,value:e.replace(i,"\r\n")}})):{name:a,value:s.replace(i,"\r\n")}})).toArray()}},function(e,t,n){e.exports=n(405)},function(e,t,n){"use strict";t.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o={defaultProtocol:"http",events:null,format:a,formatHref:a,nl2br:!1,tagName:"a",target:function(e,t){return"url"===t?"_blank":null},validate:!0,ignoreTags:[],attributes:null,className:"linkified"};function i(e){e=e||{},this.defaultProtocol=e.hasOwnProperty("defaultProtocol")?e.defaultProtocol:o.defaultProtocol,this.events=e.hasOwnProperty("events")?e.events:o.events,this.format=e.hasOwnProperty("format")?e.format:o.format,this.formatHref=e.hasOwnProperty("formatHref")?e.formatHref:o.formatHref,this.nl2br=e.hasOwnProperty("nl2br")?e.nl2br:o.nl2br,this.tagName=e.hasOwnProperty("tagName")?e.tagName:o.tagName,this.target=e.hasOwnProperty("target")?e.target:o.target,this.validate=e.hasOwnProperty("validate")?e.validate:o.validate,this.ignoreTags=[],this.attributes=e.attributes||e.linkAttributes||o.attributes,this.className=e.hasOwnProperty("className")?e.className:e.linkClass||o.className;for(var t=e.hasOwnProperty("ignoreTags")?e.ignoreTags:o.ignoreTags,n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function a(e){return e}t.defaults=o,t.Options=i,t.contains=function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1},i.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var i=void 0,a=this[e];if(!a)return a;switch(void 0===a?"undefined":r(a)){case"function":return a(t,n.type);case"object":return"function"==typeof(i=a.hasOwnProperty(n.type)?a[n.type]:o[e])?i(t,n.type):i}return a},getObject:function(e,t,n){var r=this[e];return"function"==typeof r?r(t,n.type):r}}},function(e,t,n){"use strict";t.__esModule=!0,t.start=t.run=t.TOKENS=t.State=void 0;var r=n(594),o=n(406),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(o);var a="aaa|aarp|abarth|abb|abbott|abbvie|abc|able|abogado|abudhabi|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|aetna|af|afamilycompany|afl|africa|ag|agakhan|agency|ai|aig|aigo|airbus|airforce|airtel|akdn|al|alfaromeo|alibaba|alipay|allfinanz|allstate|ally|alsace|alstom|am|americanexpress|americanfamily|amex|amfam|amica|amsterdam|analytics|android|anquan|anz|ao|aol|apartments|app|apple|aq|aquarelle|ar|arab|aramco|archi|army|arpa|art|arte|as|asda|asia|associates|at|athleta|attorney|au|auction|audi|audible|audio|auspost|author|auto|autos|avianca|aw|aws|ax|axa|az|azure|ba|baby|baidu|banamex|bananarepublic|band|bank|bar|barcelona|barclaycard|barclays|barefoot|bargains|baseball|basketball|bauhaus|bayern|bb|bbc|bbt|bbva|bcg|bcn|bd|be|beats|beauty|beer|bentley|berlin|best|bestbuy|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|blanco|blockbuster|blog|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bofa|bom|bond|boo|book|booking|boots|bosch|bostik|boston|bot|boutique|box|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|calvinklein|cam|camera|camp|cancerresearch|canon|capetown|capital|capitalone|car|caravan|cards|care|career|careers|cars|cartier|casa|case|caseih|cash|casino|cat|catering|catholic|cba|cbn|cbre|cbs|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chintai|chloe|christmas|chrome|chrysler|church|ci|cipriani|circle|cisco|citadel|citi|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|comcast|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cookingchannel|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruise|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|data|date|dating|datsun|day|dclk|dds|de|deal|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|dhl|diamonds|diet|digital|direct|directory|discount|discover|dish|diy|dj|dk|dm|dnp|do|docs|doctor|dodge|dog|doha|domains|dot|download|drive|dtv|dubai|duck|dunlop|duns|dupont|durban|dvag|dvr|dz|earth|eat|ec|eco|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epost|epson|equipment|er|ericsson|erni|es|esq|estate|esurance|et|etisalat|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|extraspace|fage|fail|fairwinds|faith|family|fan|fans|farm|farmers|fashion|fast|fedex|feedback|ferrari|ferrero|fi|fiat|fidelity|fido|film|final|finance|financial|fire|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|flir|florist|flowers|fly|fm|fo|foo|food|foodnetwork|football|ford|forex|forsale|forum|foundation|fox|fr|free|fresenius|frl|frogans|frontdoor|frontier|ftr|fujitsu|fujixerox|fun|fund|furniture|futbol|fyi|ga|gal|gallery|gallo|gallup|game|games|gap|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|george|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glade|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|godaddy|gold|goldpoint|golf|goo|goodhands|goodyear|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|grocery|group|gs|gt|gu|guardian|gucci|guge|guide|guitars|guru|gw|gy|hair|hamburg|hangout|haus|hbo|hdfc|hdfcbank|health|healthcare|help|helsinki|here|hermes|hgtv|hiphop|hisamitsu|hitachi|hiv|hk|hkt|hm|hn|hockey|holdings|holiday|homedepot|homegoods|homes|homesense|honda|honeywell|horse|hospital|host|hosting|hot|hoteles|hotels|hotmail|house|how|hr|hsbc|ht|htc|hu|hughes|hyatt|hyundai|ibm|icbc|ice|icu|id|ie|ieee|ifm|ikano|il|im|imamat|imdb|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|intel|international|intuit|investments|io|ipiranga|iq|ir|irish|is|iselect|ismaili|ist|istanbul|it|itau|itv|iveco|iwc|jaguar|java|jcb|jcp|je|jeep|jetzt|jewelry|jio|jlc|jll|jm|jmp|jnj|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|juniper|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kindle|kitchen|kiwi|km|kn|koeln|komatsu|kosher|kp|kpmg|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|ladbrokes|lamborghini|lamer|lancaster|lancia|lancome|land|landrover|lanxess|lasalle|lat|latino|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|lefrak|legal|lego|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|lilly|limited|limo|lincoln|linde|link|lipsy|live|living|lixil|lk|loan|loans|locker|locus|loft|lol|london|lotte|lotto|love|lpl|lplfinancial|lr|ls|lt|ltd|ltda|lu|lundbeck|lupin|luxe|luxury|lv|ly|ma|macys|madrid|maif|maison|makeup|man|management|mango|map|market|marketing|markets|marriott|marshalls|maserati|mattel|mba|mc|mckinsey|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|merckmsd|metlife|mg|mh|miami|microsoft|mil|mini|mint|mit|mitsubishi|mk|ml|mlb|mls|mm|mma|mn|mo|mobi|mobile|mobily|moda|moe|moi|mom|monash|money|monster|mopar|mormon|mortgage|moscow|moto|motorcycles|mov|movie|movistar|mp|mq|mr|ms|msd|mt|mtn|mtr|mu|museum|mutual|mv|mw|mx|my|mz|na|nab|nadex|nagoya|name|nationwide|natura|navy|nba|nc|ne|nec|net|netbank|netflix|network|neustar|new|newholland|news|next|nextdirect|nexus|nf|nfl|ng|ngo|nhk|ni|nico|nike|nikon|ninja|nissan|nissay|nl|no|nokia|northwesternmutual|norton|now|nowruz|nowtv|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|observer|off|office|okinawa|olayan|olayangroup|oldnavy|ollo|om|omega|one|ong|onl|online|onyourside|ooo|open|oracle|orange|org|organic|origins|osaka|otsuka|ott|ovh|pa|page|panasonic|panerai|paris|pars|partners|parts|party|passagens|pay|pccw|pe|pet|pf|pfizer|pg|ph|pharmacy|phd|philips|phone|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pioneer|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pnc|pohl|poker|politie|porn|post|pr|pramerica|praxi|press|prime|pro|prod|productions|prof|progressive|promo|properties|property|protection|pru|prudential|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|qvc|racing|radio|raid|re|read|realestate|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|reliance|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|richardli|ricoh|rightathome|ril|rio|rip|rmit|ro|rocher|rocks|rodeo|rogers|room|rs|rsvp|ru|rugby|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsclub|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|save|saxo|sb|sbi|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scjohnson|scor|scot|sd|se|search|seat|secure|security|seek|select|sener|services|ses|seven|sew|sex|sexy|sfr|sg|sh|shangrila|sharp|shaw|shell|shia|shiksha|shoes|shop|shopping|shouji|show|showtime|shriram|si|silk|sina|singles|site|sj|sk|ski|skin|sky|skype|sl|sling|sm|smart|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|srt|st|stada|staples|star|starhub|statebank|statefarm|statoil|stc|stcgroup|stockholm|storage|store|stream|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiftcover|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|talk|taobao|target|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|tdk|team|tech|technology|tel|telecity|telefonica|temasek|tennis|teva|tf|tg|th|thd|theater|theatre|tiaa|tickets|tienda|tiffany|tips|tires|tirol|tj|tjmaxx|tjx|tk|tkmaxx|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tr|trade|trading|training|travel|travelchannel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubank|ubs|uconnect|ug|uk|unicom|university|uno|uol|ups|us|uy|uz|va|vacations|vana|vanguard|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|vig|viking|villas|vin|vip|virgin|visa|vision|vista|vistaprint|viva|vivo|vlaanderen|vn|vodka|volkswagen|volvo|vote|voting|voto|voyage|vu|vuelos|wales|walmart|walter|wang|wanggou|warman|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weibo|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|winners|wme|wolterskluwer|woodside|work|works|world|wow|ws|wtc|wtf|xbox|xerox|xfinity|xihuan|xin|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--3hcrj9c|xn--3oq18vl8pn36a|xn--3pxu8k|xn--42c2d9a|xn--45br5cyl|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--54b7fta0cc|xn--55qw42g|xn--55qx5d|xn--5su34j936bgsg|xn--5tzm5g|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80aqecdr1a|xn--80asehdb|xn--80aswg|xn--8y0a063a|xn--90a3ac|xn--90ae|xn--90ais|xn--9dbq2a|xn--9et52u|xn--9krt00a|xn--b4w605ferd|xn--bck1b9a5dre4c|xn--c1avg|xn--c2br7g|xn--cck2b3b|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--e1a4c|xn--eckvdtc9d|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fhbei|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--fzys8d69uvgm|xn--g2xx48c|xn--gckr3f0f|xn--gecrj9c|xn--gk3at1e|xn--h2breg3eve|xn--h2brj9c|xn--h2brj9c8c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1aef|xn--j1amh|xn--j6w193g|xn--jlq61u9w7b|xn--jvr189m|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a3ejt|xn--mgba3a4f16a|xn--mgba7c0bbn0a|xn--mgbaakc7dvf|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbai9azgqp6j|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgbca7dzdo|xn--mgberp4a5d4ar|xn--mgbgu82a|xn--mgbi4ecexp|xn--mgbpl2fh|xn--mgbt3dhd|xn--mgbtx2b|xn--mgbx4cd0ab|xn--mix891f|xn--mk1bu44c|xn--mxtq1m|xn--ngbc5azd|xn--ngbe9e0a|xn--ngbrx|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pbt977c|xn--pgbs0dh|xn--pssy2u|xn--q9jyb4c|xn--qcka1pmc|xn--qxam|xn--rhqv96g|xn--rovu88b|xn--rvc1e0am3e|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--tckwe|xn--tiq49xqyj|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--w4r85el8fhu5dnra|xn--w4rs40l|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|you|youtube|yt|yun|za|zappos|zara|zero|zip|zippo|zm|zone|zuerich|zw".split("|"),s="0123456789".split(""),c="0123456789abcdefghijklmnopqrstuvwxyz".split(""),l=[" ","\f","\r","\t","\v"," "," ",""],u=[],d=function(e){return new r.CharacterState(e)},h=d(),p=d(o.NUM),m=d(o.DOMAIN),g=d(),f=d(o.WS);h.on("@",d(o.AT)).on(".",d(o.DOT)).on("+",d(o.PLUS)).on("#",d(o.POUND)).on("?",d(o.QUERY)).on("/",d(o.SLASH)).on("_",d(o.UNDERSCORE)).on(":",d(o.COLON)).on("{",d(o.OPENBRACE)).on("[",d(o.OPENBRACKET)).on("<",d(o.OPENANGLEBRACKET)).on("(",d(o.OPENPAREN)).on("}",d(o.CLOSEBRACE)).on("]",d(o.CLOSEBRACKET)).on(">",d(o.CLOSEANGLEBRACKET)).on(")",d(o.CLOSEPAREN)).on("&",d(o.AMPERSAND)).on([",",";","!",'"',"'"],d(o.PUNCTUATION)),h.on("\n",d(o.NL)).on(l,f),f.on(l,f);for(var _=0;_<a.length;_++){var b=(0,r.stateify)(a[_],h,o.TLD,o.DOMAIN);u.push.apply(u,b)}var v=(0,r.stateify)("file",h,o.DOMAIN,o.DOMAIN),y=(0,r.stateify)("ftp",h,o.DOMAIN,o.DOMAIN),E=(0,r.stateify)("http",h,o.DOMAIN,o.DOMAIN),S=(0,r.stateify)("mailto",h,o.DOMAIN,o.DOMAIN);u.push.apply(u,v),u.push.apply(u,y),u.push.apply(u,E),u.push.apply(u,S);var w=v.pop(),C=y.pop(),T=E.pop(),x=S.pop(),k=d(o.DOMAIN),F=d(o.PROTOCOL),O=d(o.MAILTO);C.on("s",k).on(":",F),T.on("s",k).on(":",F),u.push(k),w.on(":",F),k.on(":",F),x.on(":",O);var R=(0,r.stateify)("localhost",h,o.LOCALHOST,o.DOMAIN);u.push.apply(u,R),h.on(s,p),p.on("-",g).on(s,p).on(c,m),m.on("-",g).on(c,m);for(var D=0;D<u.length;D++)u[D].on("-",g).on(c,m);g.on("-",g).on(s,m).on(c,m),h.defaultTransition=d(o.SYM);var I=h;t.State=r.CharacterState,t.TOKENS=i,t.run=function(e){for(var t=e.replace(/[A-Z]/g,(function(e){return e.toLowerCase()})),n=e.length,r=[],o=0;o<n;){for(var i=h,a=null,s=0,c=null,l=-1;o<n&&(a=i.next(t[o]));)(i=a).accepts()?(l=0,c=i):l>=0&&l++,s++,o++;if(!(l<0)){o-=l,s-=l;var u=c.emit();r.push(new u(e.substr(o-s,s)))}}return r},t.start=I},function(e,t,n){"use strict";t.__esModule=!0,t.start=t.run=t.TOKENS=t.State=void 0;var r=n(594),o=n(1053),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(o),a=n(406);var s=function(e){return new r.TokenState(e)},c=s(),l=s(),u=s(),d=s(),h=s(),p=s(),m=s(),g=s(o.URL),f=s(),_=s(o.URL),b=s(o.URL),v=s(),y=s(),E=s(),S=s(),w=s(),C=s(o.URL),T=s(o.URL),x=s(o.URL),k=s(o.URL),F=s(),O=s(),R=s(),D=s(),I=s(),A=s(),N=s(o.EMAIL),M=s(),P=s(o.EMAIL),L=s(o.MAILTOEMAIL),j=s(),U=s(),B=s(),G=s(),V=s(o.NL);c.on(a.NL,V).on(a.PROTOCOL,l).on(a.MAILTO,u).on(a.SLASH,d),l.on(a.SLASH,d),d.on(a.SLASH,h),c.on(a.TLD,p).on(a.DOMAIN,p).on(a.LOCALHOST,g).on(a.NUM,p),h.on(a.TLD,b).on(a.DOMAIN,b).on(a.NUM,b).on(a.LOCALHOST,b),p.on(a.DOT,m),I.on(a.DOT,A),m.on(a.TLD,g).on(a.DOMAIN,p).on(a.NUM,p).on(a.LOCALHOST,p),A.on(a.TLD,N).on(a.DOMAIN,I).on(a.NUM,I).on(a.LOCALHOST,I),g.on(a.DOT,m),N.on(a.DOT,A),g.on(a.COLON,f).on(a.SLASH,b),f.on(a.NUM,_),_.on(a.SLASH,b),N.on(a.COLON,M),M.on(a.NUM,P);var q=[a.DOMAIN,a.AT,a.LOCALHOST,a.NUM,a.PLUS,a.POUND,a.PROTOCOL,a.SLASH,a.TLD,a.UNDERSCORE,a.SYM,a.AMPERSAND],H=[a.COLON,a.DOT,a.QUERY,a.PUNCTUATION,a.CLOSEBRACE,a.CLOSEBRACKET,a.CLOSEANGLEBRACKET,a.CLOSEPAREN,a.OPENBRACE,a.OPENBRACKET,a.OPENANGLEBRACKET,a.OPENPAREN];b.on(a.OPENBRACE,y).on(a.OPENBRACKET,E).on(a.OPENANGLEBRACKET,S).on(a.OPENPAREN,w),v.on(a.OPENBRACE,y).on(a.OPENBRACKET,E).on(a.OPENANGLEBRACKET,S).on(a.OPENPAREN,w),y.on(a.CLOSEBRACE,b),E.on(a.CLOSEBRACKET,b),S.on(a.CLOSEANGLEBRACKET,b),w.on(a.CLOSEPAREN,b),C.on(a.CLOSEBRACE,b),T.on(a.CLOSEBRACKET,b),x.on(a.CLOSEANGLEBRACKET,b),k.on(a.CLOSEPAREN,b),F.on(a.CLOSEBRACE,b),O.on(a.CLOSEBRACKET,b),R.on(a.CLOSEANGLEBRACKET,b),D.on(a.CLOSEPAREN,b),y.on(q,C),E.on(q,T),S.on(q,x),w.on(q,k),y.on(H,F),E.on(H,O),S.on(H,R),w.on(H,D),C.on(q,C),T.on(q,T),x.on(q,x),k.on(q,k),C.on(H,C),T.on(H,T),x.on(H,x),k.on(H,k),F.on(q,C),O.on(q,T),R.on(q,x),D.on(q,k),F.on(H,F),O.on(H,O),R.on(H,R),D.on(H,D),b.on(q,b),v.on(q,b),b.on(H,v),v.on(H,v),u.on(a.TLD,L).on(a.DOMAIN,L).on(a.NUM,L).on(a.LOCALHOST,L),L.on(q,L).on(H,j),j.on(q,L).on(H,j);var z=[a.DOMAIN,a.NUM,a.PLUS,a.POUND,a.QUERY,a.UNDERSCORE,a.SYM,a.AMPERSAND,a.TLD];p.on(z,U).on(a.AT,B),g.on(z,U).on(a.AT,B),m.on(z,U),U.on(z,U).on(a.AT,B).on(a.DOT,G),G.on(z,U),B.on(a.TLD,I).on(a.DOMAIN,I).on(a.LOCALHOST,N);t.State=r.TokenState,t.TOKENS=i,t.run=function(e){for(var t=e.length,n=0,r=[],i=[];n<t;){for(var a=c,s=null,l=null,u=0,d=null,h=-1;n<t&&!(s=a.next(e[n]));)i.push(e[n++]);for(;n<t&&(l=s||a.next(e[n]));)s=null,(a=l).accepts()?(h=0,d=a):h>=0&&h++,n++,u++;if(h<0)for(var p=n-u;p<n;p++)i.push(e[p]);else{i.length>0&&(r.push(new o.TEXT(i)),i=[]),n-=h,u-=h;var m=d.emit();r.push(new m(e.slice(n-u,n)))}}return i.length>0&&r.push(new o.TEXT(i)),r},t.start=c},function(e,t,n){"use strict";t.__esModule=!0,t.URL=t.TEXT=t.NL=t.EMAIL=t.MAILTOEMAIL=t.Base=void 0;var r=n(595),o=n(319),i=n(406);function a(e){return e instanceof i.DOMAIN||e instanceof i.TLD}var s=(0,r.createTokenClass)();s.prototype={type:"token",isLink:!1,toString:function(){for(var e=[],t=0;t<this.v.length;t++)e.push(this.v[t].toString());return e.join("")},toHref:function(){return this.toString()},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http";return{type:this.type,value:this.toString(),href:this.toHref(e)}}};var c=(0,o.inherits)(s,(0,r.createTokenClass)(),{type:"email",isLink:!0}),l=(0,o.inherits)(s,(0,r.createTokenClass)(),{type:"email",isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),u=(0,o.inherits)(s,(0,r.createTokenClass)(),{type:"text"}),d=(0,o.inherits)(s,(0,r.createTokenClass)(),{type:"nl"}),h=(0,o.inherits)(s,(0,r.createTokenClass)(),{type:"url",isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http",t=!1,n=!1,r=this.v,o=[],s=0;r[s]instanceof i.PROTOCOL;)t=!0,o.push(r[s].toString().toLowerCase()),s++;for(;r[s]instanceof i.SLASH;)n=!0,o.push(r[s].toString()),s++;for(;a(r[s]);)o.push(r[s].toString().toLowerCase()),s++;for(;s<r.length;s++)o.push(r[s].toString());return o=o.join(""),t||n||(o=e+"://"+o),o},hasProtocol:function(){return this.v[0]instanceof i.PROTOCOL}});t.Base=s,t.MAILTOEMAIL=c,t.EMAIL=l,t.NL=d,t.TEXT=u,t.URL=h},function(e,t,n){e.exports=n(1055).default},function(e,t,n){"use strict";(function(e){t.__esModule=!0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(405));var o=r.tokenize,i=r.options,a=i.Options,s=r.parser.TOKENS.TEXT;function c(e,t,n){var r=n[n.length-1];e.replaceChild(r,t);for(var o=n.length-2;o>=0;o--)e.insertBefore(n[o],r),r=n[o]}function l(e,t,n){var r=[],o=e,i=Array.isArray(o),a=0;for(o=i?o:o[Symbol.iterator]();;){var s;if(i){if(a>=o.length)break;s=o[a++]}else{if((a=o.next()).done)break;s=a.value}var c=s;if("nl"===c.type&&t.nl2br)r.push(n.createElement("br"));else if(c.isLink&&t.check(c)){var l=t.resolve(c),u=l.formatted,d=l.formattedHref,h=l.tagName,p=l.className,m=l.target,g=l.events,f=l.attributes,_=n.createElement(h);if(_.setAttribute("href",d),p&&_.setAttribute("class",p),m&&_.setAttribute("target",m),f)for(var b in f)_.setAttribute(b,f[b]);if(g)for(var v in g)_.addEventListener?_.addEventListener(v,g[v]):_.attachEvent&&_.attachEvent("on"+v,g[v]);_.appendChild(n.createTextNode(u)),r.push(_)}else r.push(n.createTextNode(c.toString()))}return r}function u(e,t,n){if(!e||1!==e.nodeType)throw new Error("Cannot linkify "+e+" - Invalid DOM Node type");var r=t.ignoreTags;if("A"===e.tagName||i.contains(r,e.tagName))return e;for(var a=e.firstChild;a;){var d=void 0,h=void 0,p=void 0;switch(a.nodeType){case 1:u(a,t,n);break;case 3:if(d=a.nodeValue,0===(h=o(d)).length||1===h.length&&h[0]instanceof s)break;c(e,a,p=l(h,t,n)),a=p[p.length-1]}a=a.nextSibling}return e}function d(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{r=r||document||window&&window.document||e&&e.document}catch(e){}if(!r)throw new Error("Cannot find document implementation. If you are in a non-browser environment like Node.js, pass the document implementation as the third argument to linkifyElement.");return u(t,n=new a(n),r)}d.helper=u,d.normalize=function(e){return new a(e)},t.default=d}).call(this,n(23))},function(e,t,n){e.exports=n(1057).default},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(405));var o=r.tokenize,i=r.options.Options;function a(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function s(e){return e.replace(/"/g,""")}function c(e){if(!e)return"";var t=[];for(var n in e){var r=e[n]+"";t.push(n+'="'+s(r)+'"')}return t.join(" ")}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=new i(t);for(var n=o(e),r=[],l=0;l<n.length;l++){var u=n[l];if("nl"===u.type&&t.nl2br)r.push("<br>\n");else if(u.isLink&&t.check(u)){var d=t.resolve(u),h=d.formatted,p=d.formattedHref,m=d.tagName,g=d.className,f=d.target,_=d.attributes,b="<"+m+' href="'+s(p)+'"';g&&(b+=' class="'+s(g)+'"'),f&&(b+=' target="'+s(f)+'"'),_&&(b+=" "+c(_)),b+=">"+a(h)+"</"+m+">",r.push(b)}else r.push(a(u.toString()))}return r.join("")}if(!String.prototype.linkify)try{Object.defineProperty(String.prototype,"linkify",{set:function(){},get:function(){return function(e){return l(this,e)}}})}catch(e){String.prototype.linkify||(String.prototype.linkify=function(e){return l(this,e)})}t.default=l},function(e,t,n){var r;"undefined"!=typeof self&&self,r=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=1)}([function(e,t,n){},function(e,t,n){"use strict";n.r(t),n(0);var r=function(){function e(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}return e.range=function(t,n){return n?t&&t.loc&&n.loc&&t.loc.lexer===n.loc.lexer?new e(t.loc.lexer,t.loc.start,n.loc.end):null:t&&t.loc},e}(),o=function(){function e(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}return e.prototype.range=function(t,n){return new e(n,r.range(this,t))},e}(),i=function e(t,n){this.position=void 0;var r,o="KaTeX parse error: "+t,i=n&&n.loc;if(i&&i.start<=i.end){var a=i.lexer.input;r=i.start;var s=i.end;r===a.length?o+=" at end of input: ":o+=" at position "+(r+1)+": ";var c=a.slice(r,s).replace(/[^]/g,"$&̲");o+=(r>15?"…"+a.slice(r-15,r):a.slice(0,r))+c+(s+15<a.length?a.slice(s,s+15)+"…":a.slice(s))}var l=new Error(o);return l.name="ParseError",l.__proto__=e.prototype,l.position=r,l};i.prototype.__proto__=Error.prototype;var a=i,s=/([A-Z])/g,c={"&":"&",">":">","<":"<",'"':""","'":"'"},l=/[&><"']/g,u=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},d={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(l,(function(e){return c[e]}))},hyphenate:function(e){return e.replace(s,"-$1").toLowerCase()},getBaseElem:u,isCharacterBox:function(e){var t=u(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"}},h=function(){function e(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},this.displayMode=d.deflt(e.displayMode,!1),this.output=d.deflt(e.output,"htmlAndMathml"),this.leqno=d.deflt(e.leqno,!1),this.fleqn=d.deflt(e.fleqn,!1),this.throwOnError=d.deflt(e.throwOnError,!0),this.errorColor=d.deflt(e.errorColor,"#cc0000"),this.macros=e.macros||{},this.minRuleThickness=Math.max(0,d.deflt(e.minRuleThickness,0)),this.colorIsTextColor=d.deflt(e.colorIsTextColor,!1),this.strict=d.deflt(e.strict,"warn"),this.trust=d.deflt(e.trust,!1),this.maxSize=Math.max(0,d.deflt(e.maxSize,1/0)),this.maxExpand=Math.max(0,d.deflt(e.maxExpand,1e3)),this.globalGroup=d.deflt(e.globalGroup,!1)}var t=e.prototype;return t.reportNonstrict=function(e,t,n){var r=this.strict;if("function"==typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(e){r="error"}return!(!r||"ignore"===r||!0!==r&&"error"!==r&&("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=d.protocolFromUrl(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),p=function(){function e(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}var t=e.prototype;return t.sup=function(){return m[g[this.id]]},t.sub=function(){return m[f[this.id]]},t.fracNum=function(){return m[_[this.id]]},t.fracDen=function(){return m[b[this.id]]},t.cramp=function(){return m[v[this.id]]},t.text=function(){return m[y[this.id]]},t.isTight=function(){return this.size>=2},e}(),m=[new p(0,0,!1),new p(1,0,!0),new p(2,1,!1),new p(3,1,!0),new p(4,2,!1),new p(5,2,!0),new p(6,3,!1),new p(7,3,!0)],g=[4,5,4,5,6,7,6,7],f=[5,5,5,5,7,7,7,7],_=[2,3,4,5,6,7,6,7],b=[3,3,5,5,7,7,7,7],v=[1,1,3,3,5,5,7,7],y=[0,1,2,3,2,3,2,3],E={DISPLAY:m[0],TEXT:m[2],SCRIPT:m[4],SCRIPTSCRIPT:m[6]},S=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],w=[];function C(e){for(var t=0;t<w.length;t+=2)if(e>=w[t]&&e<=w[t+1])return!0;return!1}S.forEach((function(e){return e.blocks.forEach((function(e){return w.push.apply(w,e)}))}));var T={leftParenInner:"M291 0 H417 V300 H291 z",rightParenInner:"M457 0 H583 V300 H457 z",doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},x=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return d.contains(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e},t.toMarkup=function(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e},t.toText=function(){var e=function(e){return e.toText()};return this.children.map(e).join("")},e}(),k=function(e){return e.filter((function(e){return e})).join(" ")},F=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},O=function(e){var t=document.createElement(e);for(var n in t.className=k(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)t.appendChild(this.children[o].toNode());return t},R=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+d.escape(k(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=d.hyphenate(r)+":"+this.style[r]+";");for(var o in n&&(t+=' style="'+d.escape(n)+'"'),this.attributes)this.attributes.hasOwnProperty(o)&&(t+=" "+o+'="'+d.escape(this.attributes[o])+'"');t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+="</"+e+">"},D=function(){function e(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,F.call(this,e,n,r),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return d.contains(this.classes,e)},t.toNode=function(){return O.call(this,"span")},t.toMarkup=function(){return R.call(this,"span")},e}(),I=function(){function e(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,F.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return d.contains(this.classes,e)},t.toNode=function(){return O.call(this,"a")},t.toMarkup=function(){return R.call(this,"a")},e}(),A=function(){function e(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}var t=e.prototype;return t.hasClass=function(e){return d.contains(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=d.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+d.escape(t)+'"'),e+="'/>"},e}(),N={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},M=function(){function e(e,t,n,r,o,i,a,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=o||0,this.width=i||0,this.classes=a||[],this.style=s||{},this.maxFontSize=0;var c=function(e){for(var t=0;t<S.length;t++)for(var n=S[t],r=0;r<n.blocks.length;r++){var o=n.blocks[r];if(e>=o[0]&&e<=o[1])return n.name}return null}(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=N[this.text])}var t=e.prototype;return t.hasClass=function(e){return d.contains(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=this.italic+"em"),this.classes.length>0&&((t=t||document.createElement("span")).className=k(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=d.escape(k(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=d.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+d.escape(n)+'"');var o=d.escape(this.text);return e?(t+=">",t+=o,t+="</span>"):o},e}(),P=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e},t.toMarkup=function(){var e="<svg";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"},e}(),L=function(){function e(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",T[this.pathName]),e},t.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+T[this.pathName]+"'/>"},e}(),j=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>"},e}();function U(e){if(e instanceof M)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var B={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},G={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},V={"Å":"A","Ç":"C","Ð":"D","Þ":"o","å":"a","ç":"c","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function q(e,t,n){if(!B[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),o=B[t][r];if(!o&&e[0]in V&&(r=V[e[0]].charCodeAt(0),o=B[t][r]),o||"text"!==n||C(r)&&(o=B[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var H={},z={bin:1,close:1,inner:1,open:1,punct:1,rel:1},W={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},K={math:{},text:{}},Y=K;function $(e,t,n,r,o,i){K[e][o]={font:t,group:n,replace:r},i&&r&&(K[e][r]=K[e][o])}var Q="main",J="ams",X="bin",Z="mathord",ee="op-token",te="rel";$("math",Q,te,"≡","\\equiv",!0),$("math",Q,te,"≺","\\prec",!0),$("math",Q,te,"≻","\\succ",!0),$("math",Q,te,"∼","\\sim",!0),$("math",Q,te,"⊥","\\perp"),$("math",Q,te,"⪯","\\preceq",!0),$("math",Q,te,"⪰","\\succeq",!0),$("math",Q,te,"≃","\\simeq",!0),$("math",Q,te,"∣","\\mid",!0),$("math",Q,te,"≪","\\ll",!0),$("math",Q,te,"≫","\\gg",!0),$("math",Q,te,"≍","\\asymp",!0),$("math",Q,te,"∥","\\parallel"),$("math",Q,te,"⋈","\\bowtie",!0),$("math",Q,te,"⌣","\\smile",!0),$("math",Q,te,"⊑","\\sqsubseteq",!0),$("math",Q,te,"⊒","\\sqsupseteq",!0),$("math",Q,te,"≐","\\doteq",!0),$("math",Q,te,"⌢","\\frown",!0),$("math",Q,te,"∋","\\ni",!0),$("math",Q,te,"∝","\\propto",!0),$("math",Q,te,"⊢","\\vdash",!0),$("math",Q,te,"⊣","\\dashv",!0),$("math",Q,te,"∋","\\owns"),$("math",Q,"punct",".","\\ldotp"),$("math",Q,"punct","⋅","\\cdotp"),$("math",Q,"textord","#","\\#"),$("text",Q,"textord","#","\\#"),$("math",Q,"textord","&","\\&"),$("text",Q,"textord","&","\\&"),$("math",Q,"textord","ℵ","\\aleph",!0),$("math",Q,"textord","∀","\\forall",!0),$("math",Q,"textord","ℏ","\\hbar",!0),$("math",Q,"textord","∃","\\exists",!0),$("math",Q,"textord","∇","\\nabla",!0),$("math",Q,"textord","♭","\\flat",!0),$("math",Q,"textord","ℓ","\\ell",!0),$("math",Q,"textord","♮","\\natural",!0),$("math",Q,"textord","♣","\\clubsuit",!0),$("math",Q,"textord","℘","\\wp",!0),$("math",Q,"textord","♯","\\sharp",!0),$("math",Q,"textord","♢","\\diamondsuit",!0),$("math",Q,"textord","ℜ","\\Re",!0),$("math",Q,"textord","♡","\\heartsuit",!0),$("math",Q,"textord","ℑ","\\Im",!0),$("math",Q,"textord","♠","\\spadesuit",!0),$("text",Q,"textord","§","\\S",!0),$("text",Q,"textord","¶","\\P",!0),$("math",Q,"textord","†","\\dag"),$("text",Q,"textord","†","\\dag"),$("text",Q,"textord","†","\\textdagger"),$("math",Q,"textord","‡","\\ddag"),$("text",Q,"textord","‡","\\ddag"),$("text",Q,"textord","‡","\\textdaggerdbl"),$("math",Q,"close","⎱","\\rmoustache",!0),$("math",Q,"open","⎰","\\lmoustache",!0),$("math",Q,"close","⟯","\\rgroup",!0),$("math",Q,"open","⟮","\\lgroup",!0),$("math",Q,X,"∓","\\mp",!0),$("math",Q,X,"⊖","\\ominus",!0),$("math",Q,X,"⊎","\\uplus",!0),$("math",Q,X,"⊓","\\sqcap",!0),$("math",Q,X,"∗","\\ast"),$("math",Q,X,"⊔","\\sqcup",!0),$("math",Q,X,"◯","\\bigcirc"),$("math",Q,X,"∙","\\bullet"),$("math",Q,X,"‡","\\ddagger"),$("math",Q,X,"≀","\\wr",!0),$("math",Q,X,"⨿","\\amalg"),$("math",Q,X,"&","\\And"),$("math",Q,te,"⟵","\\longleftarrow",!0),$("math",Q,te,"⇐","\\Leftarrow",!0),$("math",Q,te,"⟸","\\Longleftarrow",!0),$("math",Q,te,"⟶","\\longrightarrow",!0),$("math",Q,te,"⇒","\\Rightarrow",!0),$("math",Q,te,"⟹","\\Longrightarrow",!0),$("math",Q,te,"↔","\\leftrightarrow",!0),$("math",Q,te,"⟷","\\longleftrightarrow",!0),$("math",Q,te,"⇔","\\Leftrightarrow",!0),$("math",Q,te,"⟺","\\Longleftrightarrow",!0),$("math",Q,te,"↦","\\mapsto",!0),$("math",Q,te,"⟼","\\longmapsto",!0),$("math",Q,te,"↗","\\nearrow",!0),$("math",Q,te,"↩","\\hookleftarrow",!0),$("math",Q,te,"↪","\\hookrightarrow",!0),$("math",Q,te,"↘","\\searrow",!0),$("math",Q,te,"↼","\\leftharpoonup",!0),$("math",Q,te,"⇀","\\rightharpoonup",!0),$("math",Q,te,"↙","\\swarrow",!0),$("math",Q,te,"↽","\\leftharpoondown",!0),$("math",Q,te,"⇁","\\rightharpoondown",!0),$("math",Q,te,"↖","\\nwarrow",!0),$("math",Q,te,"⇌","\\rightleftharpoons",!0),$("math",J,te,"≮","\\nless",!0),$("math",J,te,"","\\@nleqslant"),$("math",J,te,"","\\@nleqq"),$("math",J,te,"⪇","\\lneq",!0),$("math",J,te,"≨","\\lneqq",!0),$("math",J,te,"","\\@lvertneqq"),$("math",J,te,"⋦","\\lnsim",!0),$("math",J,te,"⪉","\\lnapprox",!0),$("math",J,te,"⊀","\\nprec",!0),$("math",J,te,"⋠","\\npreceq",!0),$("math",J,te,"⋨","\\precnsim",!0),$("math",J,te,"⪹","\\precnapprox",!0),$("math",J,te,"≁","\\nsim",!0),$("math",J,te,"","\\@nshortmid"),$("math",J,te,"∤","\\nmid",!0),$("math",J,te,"⊬","\\nvdash",!0),$("math",J,te,"⊭","\\nvDash",!0),$("math",J,te,"⋪","\\ntriangleleft"),$("math",J,te,"⋬","\\ntrianglelefteq",!0),$("math",J,te,"⊊","\\subsetneq",!0),$("math",J,te,"","\\@varsubsetneq"),$("math",J,te,"⫋","\\subsetneqq",!0),$("math",J,te,"","\\@varsubsetneqq"),$("math",J,te,"≯","\\ngtr",!0),$("math",J,te,"","\\@ngeqslant"),$("math",J,te,"","\\@ngeqq"),$("math",J,te,"⪈","\\gneq",!0),$("math",J,te,"≩","\\gneqq",!0),$("math",J,te,"","\\@gvertneqq"),$("math",J,te,"⋧","\\gnsim",!0),$("math",J,te,"⪊","\\gnapprox",!0),$("math",J,te,"⊁","\\nsucc",!0),$("math",J,te,"⋡","\\nsucceq",!0),$("math",J,te,"⋩","\\succnsim",!0),$("math",J,te,"⪺","\\succnapprox",!0),$("math",J,te,"≆","\\ncong",!0),$("math",J,te,"","\\@nshortparallel"),$("math",J,te,"∦","\\nparallel",!0),$("math",J,te,"⊯","\\nVDash",!0),$("math",J,te,"⋫","\\ntriangleright"),$("math",J,te,"⋭","\\ntrianglerighteq",!0),$("math",J,te,"","\\@nsupseteqq"),$("math",J,te,"⊋","\\supsetneq",!0),$("math",J,te,"","\\@varsupsetneq"),$("math",J,te,"⫌","\\supsetneqq",!0),$("math",J,te,"","\\@varsupsetneqq"),$("math",J,te,"⊮","\\nVdash",!0),$("math",J,te,"⪵","\\precneqq",!0),$("math",J,te,"⪶","\\succneqq",!0),$("math",J,te,"","\\@nsubseteqq"),$("math",J,X,"⊴","\\unlhd"),$("math",J,X,"⊵","\\unrhd"),$("math",J,te,"↚","\\nleftarrow",!0),$("math",J,te,"↛","\\nrightarrow",!0),$("math",J,te,"⇍","\\nLeftarrow",!0),$("math",J,te,"⇏","\\nRightarrow",!0),$("math",J,te,"↮","\\nleftrightarrow",!0),$("math",J,te,"⇎","\\nLeftrightarrow",!0),$("math",J,te,"△","\\vartriangle"),$("math",J,"textord","ℏ","\\hslash"),$("math",J,"textord","▽","\\triangledown"),$("math",J,"textord","◊","\\lozenge"),$("math",J,"textord","Ⓢ","\\circledS"),$("math",J,"textord","®","\\circledR"),$("text",J,"textord","®","\\circledR"),$("math",J,"textord","∡","\\measuredangle",!0),$("math",J,"textord","∄","\\nexists"),$("math",J,"textord","℧","\\mho"),$("math",J,"textord","Ⅎ","\\Finv",!0),$("math",J,"textord","⅁","\\Game",!0),$("math",J,"textord","‵","\\backprime"),$("math",J,"textord","▲","\\blacktriangle"),$("math",J,"textord","▼","\\blacktriangledown"),$("math",J,"textord","■","\\blacksquare"),$("math",J,"textord","⧫","\\blacklozenge"),$("math",J,"textord","★","\\bigstar"),$("math",J,"textord","∢","\\sphericalangle",!0),$("math",J,"textord","∁","\\complement",!0),$("math",J,"textord","ð","\\eth",!0),$("text",Q,"textord","ð","ð"),$("math",J,"textord","╱","\\diagup"),$("math",J,"textord","╲","\\diagdown"),$("math",J,"textord","□","\\square"),$("math",J,"textord","□","\\Box"),$("math",J,"textord","◊","\\Diamond"),$("math",J,"textord","¥","\\yen",!0),$("text",J,"textord","¥","\\yen",!0),$("math",J,"textord","✓","\\checkmark",!0),$("text",J,"textord","✓","\\checkmark"),$("math",J,"textord","ℶ","\\beth",!0),$("math",J,"textord","ℸ","\\daleth",!0),$("math",J,"textord","ℷ","\\gimel",!0),$("math",J,"textord","ϝ","\\digamma",!0),$("math",J,"textord","ϰ","\\varkappa"),$("math",J,"open","┌","\\@ulcorner",!0),$("math",J,"close","┐","\\@urcorner",!0),$("math",J,"open","└","\\@llcorner",!0),$("math",J,"close","┘","\\@lrcorner",!0),$("math",J,te,"≦","\\leqq",!0),$("math",J,te,"⩽","\\leqslant",!0),$("math",J,te,"⪕","\\eqslantless",!0),$("math",J,te,"≲","\\lesssim",!0),$("math",J,te,"⪅","\\lessapprox",!0),$("math",J,te,"≊","\\approxeq",!0),$("math",J,X,"⋖","\\lessdot"),$("math",J,te,"⋘","\\lll",!0),$("math",J,te,"≶","\\lessgtr",!0),$("math",J,te,"⋚","\\lesseqgtr",!0),$("math",J,te,"⪋","\\lesseqqgtr",!0),$("math",J,te,"≑","\\doteqdot"),$("math",J,te,"≓","\\risingdotseq",!0),$("math",J,te,"≒","\\fallingdotseq",!0),$("math",J,te,"∽","\\backsim",!0),$("math",J,te,"⋍","\\backsimeq",!0),$("math",J,te,"⫅","\\subseteqq",!0),$("math",J,te,"⋐","\\Subset",!0),$("math",J,te,"⊏","\\sqsubset",!0),$("math",J,te,"≼","\\preccurlyeq",!0),$("math",J,te,"⋞","\\curlyeqprec",!0),$("math",J,te,"≾","\\precsim",!0),$("math",J,te,"⪷","\\precapprox",!0),$("math",J,te,"⊲","\\vartriangleleft"),$("math",J,te,"⊴","\\trianglelefteq"),$("math",J,te,"⊨","\\vDash",!0),$("math",J,te,"⊪","\\Vvdash",!0),$("math",J,te,"⌣","\\smallsmile"),$("math",J,te,"⌢","\\smallfrown"),$("math",J,te,"≏","\\bumpeq",!0),$("math",J,te,"≎","\\Bumpeq",!0),$("math",J,te,"≧","\\geqq",!0),$("math",J,te,"⩾","\\geqslant",!0),$("math",J,te,"⪖","\\eqslantgtr",!0),$("math",J,te,"≳","\\gtrsim",!0),$("math",J,te,"⪆","\\gtrapprox",!0),$("math",J,X,"⋗","\\gtrdot"),$("math",J,te,"⋙","\\ggg",!0),$("math",J,te,"≷","\\gtrless",!0),$("math",J,te,"⋛","\\gtreqless",!0),$("math",J,te,"⪌","\\gtreqqless",!0),$("math",J,te,"≖","\\eqcirc",!0),$("math",J,te,"≗","\\circeq",!0),$("math",J,te,"≜","\\triangleq",!0),$("math",J,te,"∼","\\thicksim"),$("math",J,te,"≈","\\thickapprox"),$("math",J,te,"⫆","\\supseteqq",!0),$("math",J,te,"⋑","\\Supset",!0),$("math",J,te,"⊐","\\sqsupset",!0),$("math",J,te,"≽","\\succcurlyeq",!0),$("math",J,te,"⋟","\\curlyeqsucc",!0),$("math",J,te,"≿","\\succsim",!0),$("math",J,te,"⪸","\\succapprox",!0),$("math",J,te,"⊳","\\vartriangleright"),$("math",J,te,"⊵","\\trianglerighteq"),$("math",J,te,"⊩","\\Vdash",!0),$("math",J,te,"∣","\\shortmid"),$("math",J,te,"∥","\\shortparallel"),$("math",J,te,"≬","\\between",!0),$("math",J,te,"⋔","\\pitchfork",!0),$("math",J,te,"∝","\\varpropto"),$("math",J,te,"◀","\\blacktriangleleft"),$("math",J,te,"∴","\\therefore",!0),$("math",J,te,"∍","\\backepsilon"),$("math",J,te,"▶","\\blacktriangleright"),$("math",J,te,"∵","\\because",!0),$("math",J,te,"⋘","\\llless"),$("math",J,te,"⋙","\\gggtr"),$("math",J,X,"⊲","\\lhd"),$("math",J,X,"⊳","\\rhd"),$("math",J,te,"≂","\\eqsim",!0),$("math",Q,te,"⋈","\\Join"),$("math",J,te,"≑","\\Doteq",!0),$("math",J,X,"∔","\\dotplus",!0),$("math",J,X,"∖","\\smallsetminus"),$("math",J,X,"⋒","\\Cap",!0),$("math",J,X,"⋓","\\Cup",!0),$("math",J,X,"⩞","\\doublebarwedge",!0),$("math",J,X,"⊟","\\boxminus",!0),$("math",J,X,"⊞","\\boxplus",!0),$("math",J,X,"⋇","\\divideontimes",!0),$("math",J,X,"⋉","\\ltimes",!0),$("math",J,X,"⋊","\\rtimes",!0),$("math",J,X,"⋋","\\leftthreetimes",!0),$("math",J,X,"⋌","\\rightthreetimes",!0),$("math",J,X,"⋏","\\curlywedge",!0),$("math",J,X,"⋎","\\curlyvee",!0),$("math",J,X,"⊝","\\circleddash",!0),$("math",J,X,"⊛","\\circledast",!0),$("math",J,X,"⋅","\\centerdot"),$("math",J,X,"⊺","\\intercal",!0),$("math",J,X,"⋒","\\doublecap"),$("math",J,X,"⋓","\\doublecup"),$("math",J,X,"⊠","\\boxtimes",!0),$("math",J,te,"⇢","\\dashrightarrow",!0),$("math",J,te,"⇠","\\dashleftarrow",!0),$("math",J,te,"⇇","\\leftleftarrows",!0),$("math",J,te,"⇆","\\leftrightarrows",!0),$("math",J,te,"⇚","\\Lleftarrow",!0),$("math",J,te,"↞","\\twoheadleftarrow",!0),$("math",J,te,"↢","\\leftarrowtail",!0),$("math",J,te,"↫","\\looparrowleft",!0),$("math",J,te,"⇋","\\leftrightharpoons",!0),$("math",J,te,"↶","\\curvearrowleft",!0),$("math",J,te,"↺","\\circlearrowleft",!0),$("math",J,te,"↰","\\Lsh",!0),$("math",J,te,"⇈","\\upuparrows",!0),$("math",J,te,"↿","\\upharpoonleft",!0),$("math",J,te,"⇃","\\downharpoonleft",!0),$("math",J,te,"⊸","\\multimap",!0),$("math",J,te,"↭","\\leftrightsquigarrow",!0),$("math",J,te,"⇉","\\rightrightarrows",!0),$("math",J,te,"⇄","\\rightleftarrows",!0),$("math",J,te,"↠","\\twoheadrightarrow",!0),$("math",J,te,"↣","\\rightarrowtail",!0),$("math",J,te,"↬","\\looparrowright",!0),$("math",J,te,"↷","\\curvearrowright",!0),$("math",J,te,"↻","\\circlearrowright",!0),$("math",J,te,"↱","\\Rsh",!0),$("math",J,te,"⇊","\\downdownarrows",!0),$("math",J,te,"↾","\\upharpoonright",!0),$("math",J,te,"⇂","\\downharpoonright",!0),$("math",J,te,"⇝","\\rightsquigarrow",!0),$("math",J,te,"⇝","\\leadsto"),$("math",J,te,"⇛","\\Rrightarrow",!0),$("math",J,te,"↾","\\restriction"),$("math",Q,"textord","‘","`"),$("math",Q,"textord","$","\\$"),$("text",Q,"textord","$","\\$"),$("text",Q,"textord","$","\\textdollar"),$("math",Q,"textord","%","\\%"),$("text",Q,"textord","%","\\%"),$("math",Q,"textord","_","\\_"),$("text",Q,"textord","_","\\_"),$("text",Q,"textord","_","\\textunderscore"),$("math",Q,"textord","∠","\\angle",!0),$("math",Q,"textord","∞","\\infty",!0),$("math",Q,"textord","′","\\prime"),$("math",Q,"textord","△","\\triangle"),$("math",Q,"textord","Γ","\\Gamma",!0),$("math",Q,"textord","Δ","\\Delta",!0),$("math",Q,"textord","Θ","\\Theta",!0),$("math",Q,"textord","Λ","\\Lambda",!0),$("math",Q,"textord","Ξ","\\Xi",!0),$("math",Q,"textord","Π","\\Pi",!0),$("math",Q,"textord","Σ","\\Sigma",!0),$("math",Q,"textord","Υ","\\Upsilon",!0),$("math",Q,"textord","Φ","\\Phi",!0),$("math",Q,"textord","Ψ","\\Psi",!0),$("math",Q,"textord","Ω","\\Omega",!0),$("math",Q,"textord","A","Α"),$("math",Q,"textord","B","Β"),$("math",Q,"textord","E","Ε"),$("math",Q,"textord","Z","Ζ"),$("math",Q,"textord","H","Η"),$("math",Q,"textord","I","Ι"),$("math",Q,"textord","K","Κ"),$("math",Q,"textord","M","Μ"),$("math",Q,"textord","N","Ν"),$("math",Q,"textord","O","Ο"),$("math",Q,"textord","P","Ρ"),$("math",Q,"textord","T","Τ"),$("math",Q,"textord","X","Χ"),$("math",Q,"textord","¬","\\neg",!0),$("math",Q,"textord","¬","\\lnot"),$("math",Q,"textord","⊤","\\top"),$("math",Q,"textord","⊥","\\bot"),$("math",Q,"textord","∅","\\emptyset"),$("math",J,"textord","∅","\\varnothing"),$("math",Q,Z,"α","\\alpha",!0),$("math",Q,Z,"β","\\beta",!0),$("math",Q,Z,"γ","\\gamma",!0),$("math",Q,Z,"δ","\\delta",!0),$("math",Q,Z,"ϵ","\\epsilon",!0),$("math",Q,Z,"ζ","\\zeta",!0),$("math",Q,Z,"η","\\eta",!0),$("math",Q,Z,"θ","\\theta",!0),$("math",Q,Z,"ι","\\iota",!0),$("math",Q,Z,"κ","\\kappa",!0),$("math",Q,Z,"λ","\\lambda",!0),$("math",Q,Z,"μ","\\mu",!0),$("math",Q,Z,"ν","\\nu",!0),$("math",Q,Z,"ξ","\\xi",!0),$("math",Q,Z,"ο","\\omicron",!0),$("math",Q,Z,"π","\\pi",!0),$("math",Q,Z,"ρ","\\rho",!0),$("math",Q,Z,"σ","\\sigma",!0),$("math",Q,Z,"τ","\\tau",!0),$("math",Q,Z,"υ","\\upsilon",!0),$("math",Q,Z,"ϕ","\\phi",!0),$("math",Q,Z,"χ","\\chi",!0),$("math",Q,Z,"ψ","\\psi",!0),$("math",Q,Z,"ω","\\omega",!0),$("math",Q,Z,"ε","\\varepsilon",!0),$("math",Q,Z,"ϑ","\\vartheta",!0),$("math",Q,Z,"ϖ","\\varpi",!0),$("math",Q,Z,"ϱ","\\varrho",!0),$("math",Q,Z,"ς","\\varsigma",!0),$("math",Q,Z,"φ","\\varphi",!0),$("math",Q,X,"∗","*"),$("math",Q,X,"+","+"),$("math",Q,X,"−","-"),$("math",Q,X,"⋅","\\cdot",!0),$("math",Q,X,"∘","\\circ"),$("math",Q,X,"÷","\\div",!0),$("math",Q,X,"±","\\pm",!0),$("math",Q,X,"×","\\times",!0),$("math",Q,X,"∩","\\cap",!0),$("math",Q,X,"∪","\\cup",!0),$("math",Q,X,"∖","\\setminus"),$("math",Q,X,"∧","\\land"),$("math",Q,X,"∨","\\lor"),$("math",Q,X,"∧","\\wedge",!0),$("math",Q,X,"∨","\\vee",!0),$("math",Q,"textord","√","\\surd"),$("math",Q,"open","⟨","\\langle",!0),$("math",Q,"open","∣","\\lvert"),$("math",Q,"open","∥","\\lVert"),$("math",Q,"close","?","?"),$("math",Q,"close","!","!"),$("math",Q,"close","⟩","\\rangle",!0),$("math",Q,"close","∣","\\rvert"),$("math",Q,"close","∥","\\rVert"),$("math",Q,te,"=","="),$("math",Q,te,":",":"),$("math",Q,te,"≈","\\approx",!0),$("math",Q,te,"≅","\\cong",!0),$("math",Q,te,"≥","\\ge"),$("math",Q,te,"≥","\\geq",!0),$("math",Q,te,"←","\\gets"),$("math",Q,te,">","\\gt",!0),$("math",Q,te,"∈","\\in",!0),$("math",Q,te,"","\\@not"),$("math",Q,te,"⊂","\\subset",!0),$("math",Q,te,"⊃","\\supset",!0),$("math",Q,te,"⊆","\\subseteq",!0),$("math",Q,te,"⊇","\\supseteq",!0),$("math",J,te,"⊈","\\nsubseteq",!0),$("math",J,te,"⊉","\\nsupseteq",!0),$("math",Q,te,"⊨","\\models"),$("math",Q,te,"←","\\leftarrow",!0),$("math",Q,te,"≤","\\le"),$("math",Q,te,"≤","\\leq",!0),$("math",Q,te,"<","\\lt",!0),$("math",Q,te,"→","\\rightarrow",!0),$("math",Q,te,"→","\\to"),$("math",J,te,"≱","\\ngeq",!0),$("math",J,te,"≰","\\nleq",!0),$("math",Q,"spacing"," ","\\ "),$("math",Q,"spacing"," ","~"),$("math",Q,"spacing"," ","\\space"),$("math",Q,"spacing"," ","\\nobreakspace"),$("text",Q,"spacing"," ","\\ "),$("text",Q,"spacing"," "," "),$("text",Q,"spacing"," ","~"),$("text",Q,"spacing"," ","\\space"),$("text",Q,"spacing"," ","\\nobreakspace"),$("math",Q,"spacing",null,"\\nobreak"),$("math",Q,"spacing",null,"\\allowbreak"),$("math",Q,"punct",",",","),$("math",Q,"punct",";",";"),$("math",J,X,"⊼","\\barwedge",!0),$("math",J,X,"⊻","\\veebar",!0),$("math",Q,X,"⊙","\\odot",!0),$("math",Q,X,"⊕","\\oplus",!0),$("math",Q,X,"⊗","\\otimes",!0),$("math",Q,"textord","∂","\\partial",!0),$("math",Q,X,"⊘","\\oslash",!0),$("math",J,X,"⊚","\\circledcirc",!0),$("math",J,X,"⊡","\\boxdot",!0),$("math",Q,X,"△","\\bigtriangleup"),$("math",Q,X,"▽","\\bigtriangledown"),$("math",Q,X,"†","\\dagger"),$("math",Q,X,"⋄","\\diamond"),$("math",Q,X,"⋆","\\star"),$("math",Q,X,"◃","\\triangleleft"),$("math",Q,X,"▹","\\triangleright"),$("math",Q,"open","{","\\{"),$("text",Q,"textord","{","\\{"),$("text",Q,"textord","{","\\textbraceleft"),$("math",Q,"close","}","\\}"),$("text",Q,"textord","}","\\}"),$("text",Q,"textord","}","\\textbraceright"),$("math",Q,"open","{","\\lbrace"),$("math",Q,"close","}","\\rbrace"),$("math",Q,"open","[","\\lbrack",!0),$("text",Q,"textord","[","\\lbrack",!0),$("math",Q,"close","]","\\rbrack",!0),$("text",Q,"textord","]","\\rbrack",!0),$("math",Q,"open","(","\\lparen",!0),$("math",Q,"close",")","\\rparen",!0),$("text",Q,"textord","<","\\textless",!0),$("text",Q,"textord",">","\\textgreater",!0),$("math",Q,"open","⌊","\\lfloor",!0),$("math",Q,"close","⌋","\\rfloor",!0),$("math",Q,"open","⌈","\\lceil",!0),$("math",Q,"close","⌉","\\rceil",!0),$("math",Q,"textord","\\","\\backslash"),$("math",Q,"textord","∣","|"),$("math",Q,"textord","∣","\\vert"),$("text",Q,"textord","|","\\textbar",!0),$("math",Q,"textord","∥","\\|"),$("math",Q,"textord","∥","\\Vert"),$("text",Q,"textord","∥","\\textbardbl"),$("text",Q,"textord","~","\\textasciitilde"),$("text",Q,"textord","\\","\\textbackslash"),$("text",Q,"textord","^","\\textasciicircum"),$("math",Q,te,"↑","\\uparrow",!0),$("math",Q,te,"⇑","\\Uparrow",!0),$("math",Q,te,"↓","\\downarrow",!0),$("math",Q,te,"⇓","\\Downarrow",!0),$("math",Q,te,"↕","\\updownarrow",!0),$("math",Q,te,"⇕","\\Updownarrow",!0),$("math",Q,ee,"∐","\\coprod"),$("math",Q,ee,"⋁","\\bigvee"),$("math",Q,ee,"⋀","\\bigwedge"),$("math",Q,ee,"⨄","\\biguplus"),$("math",Q,ee,"⋂","\\bigcap"),$("math",Q,ee,"⋃","\\bigcup"),$("math",Q,ee,"∫","\\int"),$("math",Q,ee,"∫","\\intop"),$("math",Q,ee,"∬","\\iint"),$("math",Q,ee,"∭","\\iiint"),$("math",Q,ee,"∏","\\prod"),$("math",Q,ee,"∑","\\sum"),$("math",Q,ee,"⨂","\\bigotimes"),$("math",Q,ee,"⨁","\\bigoplus"),$("math",Q,ee,"⨀","\\bigodot"),$("math",Q,ee,"∮","\\oint"),$("math",Q,ee,"⨆","\\bigsqcup"),$("math",Q,ee,"∫","\\smallint"),$("text",Q,"inner","…","\\textellipsis"),$("math",Q,"inner","…","\\mathellipsis"),$("text",Q,"inner","…","\\ldots",!0),$("math",Q,"inner","…","\\ldots",!0),$("math",Q,"inner","⋯","\\@cdots",!0),$("math",Q,"inner","⋱","\\ddots",!0),$("math",Q,"textord","⋮","\\varvdots"),$("math",Q,"accent-token","ˊ","\\acute"),$("math",Q,"accent-token","ˋ","\\grave"),$("math",Q,"accent-token","¨","\\ddot"),$("math",Q,"accent-token","~","\\tilde"),$("math",Q,"accent-token","ˉ","\\bar"),$("math",Q,"accent-token","˘","\\breve"),$("math",Q,"accent-token","ˇ","\\check"),$("math",Q,"accent-token","^","\\hat"),$("math",Q,"accent-token","⃗","\\vec"),$("math",Q,"accent-token","˙","\\dot"),$("math",Q,"accent-token","˚","\\mathring"),$("math",Q,Z,"","\\@imath"),$("math",Q,Z,"","\\@jmath"),$("math",Q,"textord","ı","ı"),$("math",Q,"textord","ȷ","ȷ"),$("text",Q,"textord","ı","\\i",!0),$("text",Q,"textord","ȷ","\\j",!0),$("text",Q,"textord","ß","\\ss",!0),$("text",Q,"textord","æ","\\ae",!0),$("text",Q,"textord","œ","\\oe",!0),$("text",Q,"textord","ø","\\o",!0),$("text",Q,"textord","Æ","\\AE",!0),$("text",Q,"textord","Œ","\\OE",!0),$("text",Q,"textord","Ø","\\O",!0),$("text",Q,"accent-token","ˊ","\\'"),$("text",Q,"accent-token","ˋ","\\`"),$("text",Q,"accent-token","ˆ","\\^"),$("text",Q,"accent-token","˜","\\~"),$("text",Q,"accent-token","ˉ","\\="),$("text",Q,"accent-token","˘","\\u"),$("text",Q,"accent-token","˙","\\."),$("text",Q,"accent-token","˚","\\r"),$("text",Q,"accent-token","ˇ","\\v"),$("text",Q,"accent-token","¨",'\\"'),$("text",Q,"accent-token","˝","\\H"),$("text",Q,"accent-token","◯","\\textcircled");var ne={"--":!0,"---":!0,"``":!0,"''":!0};$("text",Q,"textord","–","--",!0),$("text",Q,"textord","–","\\textendash"),$("text",Q,"textord","—","---",!0),$("text",Q,"textord","—","\\textemdash"),$("text",Q,"textord","‘","`",!0),$("text",Q,"textord","‘","\\textquoteleft"),$("text",Q,"textord","’","'",!0),$("text",Q,"textord","’","\\textquoteright"),$("text",Q,"textord","“","``",!0),$("text",Q,"textord","“","\\textquotedblleft"),$("text",Q,"textord","”","''",!0),$("text",Q,"textord","”","\\textquotedblright"),$("math",Q,"textord","°","\\degree",!0),$("text",Q,"textord","°","\\degree"),$("text",Q,"textord","°","\\textdegree",!0),$("math",Q,"textord","£","\\pounds"),$("math",Q,"textord","£","\\mathsterling",!0),$("text",Q,"textord","£","\\pounds"),$("text",Q,"textord","£","\\textsterling",!0),$("math",J,"textord","✠","\\maltese"),$("text",J,"textord","✠","\\maltese");for(var re=0;re<'0123456789/@."'.length;re++){var oe='0123456789/@."'.charAt(re);$("math",Q,"textord",oe,oe)}for(var ie=0;ie<'0123456789!@*()-=+";:?/.,'.length;ie++){var ae='0123456789!@*()-=+";:?/.,'.charAt(ie);$("text",Q,"textord",ae,ae)}for(var se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ce=0;ce<se.length;ce++){var le=se.charAt(ce);$("math",Q,Z,le,le),$("text",Q,"textord",le,le)}$("math",J,"textord","C","ℂ"),$("text",J,"textord","C","ℂ"),$("math",J,"textord","H","ℍ"),$("text",J,"textord","H","ℍ"),$("math",J,"textord","N","ℕ"),$("text",J,"textord","N","ℕ"),$("math",J,"textord","P","ℙ"),$("text",J,"textord","P","ℙ"),$("math",J,"textord","Q","ℚ"),$("text",J,"textord","Q","ℚ"),$("math",J,"textord","R","ℝ"),$("text",J,"textord","R","ℝ"),$("math",J,"textord","Z","ℤ"),$("text",J,"textord","Z","ℤ"),$("math",Q,Z,"h","ℎ"),$("text",Q,Z,"h","ℎ");for(var ue="",de=0;de<se.length;de++){var he=se.charAt(de);$("math",Q,Z,he,ue=String.fromCharCode(55349,56320+de)),$("text",Q,"textord",he,ue),$("math",Q,Z,he,ue=String.fromCharCode(55349,56372+de)),$("text",Q,"textord",he,ue),$("math",Q,Z,he,ue=String.fromCharCode(55349,56424+de)),$("text",Q,"textord",he,ue),$("math",Q,Z,he,ue=String.fromCharCode(55349,56580+de)),$("text",Q,"textord",he,ue),$("math",Q,Z,he,ue=String.fromCharCode(55349,56736+de)),$("text",Q,"textord",he,ue),$("math",Q,Z,he,ue=String.fromCharCode(55349,56788+de)),$("text",Q,"textord",he,ue),$("math",Q,Z,he,ue=String.fromCharCode(55349,56840+de)),$("text",Q,"textord",he,ue),$("math",Q,Z,he,ue=String.fromCharCode(55349,56944+de)),$("text",Q,"textord",he,ue),de<26&&($("math",Q,Z,he,ue=String.fromCharCode(55349,56632+de)),$("text",Q,"textord",he,ue),$("math",Q,Z,he,ue=String.fromCharCode(55349,56476+de)),$("text",Q,"textord",he,ue))}$("math",Q,Z,"k",ue=String.fromCharCode(55349,56668)),$("text",Q,"textord","k",ue);for(var pe=0;pe<10;pe++){var me=pe.toString();$("math",Q,Z,me,ue=String.fromCharCode(55349,57294+pe)),$("text",Q,"textord",me,ue),$("math",Q,Z,me,ue=String.fromCharCode(55349,57314+pe)),$("text",Q,"textord",me,ue),$("math",Q,Z,me,ue=String.fromCharCode(55349,57324+pe)),$("text",Q,"textord",me,ue),$("math",Q,Z,me,ue=String.fromCharCode(55349,57334+pe)),$("text",Q,"textord",me,ue)}for(var ge=0;ge<"ÇÐÞçþ".length;ge++){var fe="ÇÐÞçþ".charAt(ge);$("math",Q,Z,fe,fe),$("text",Q,"textord",fe,fe)}var _e=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],be=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ve=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],ye=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ee=function(e,t){return t.size<2?e:ve[e-1][t.size-1]},Se=function(){function e(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=ye[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}var t=e.prototype;return t.extend=function(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new e(n)},t.havingStyle=function(e){return this.style===e?this:this.extend({style:e,size:Ee(this.textSize,e)})},t.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},t.havingSize=function(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:ye[e-1]})},t.havingBaseStyle=function(t){t=t||this.style.text();var n=Ee(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})},t.havingBaseSizing=function(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})},t.withColor=function(e){return this.extend({color:e})},t.withPhantom=function(){return this.extend({phantom:!0})},t.withFont=function(e){return this.extend({font:e})},t.withTextFontFamily=function(e){return this.extend({fontFamily:e,font:""})},t.withTextFontWeight=function(e){return this.extend({fontWeight:e,font:""})},t.withTextFontShape=function(e){return this.extend({fontShape:e,font:""})},t.sizingClasses=function(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]},t.baseSizingClasses=function(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]},t.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!H[t=e>=5?0:e>=3?1:2]){var n=H[t]={cssEmPerMu:G.quad[t]/18};for(var r in G)G.hasOwnProperty(r)&&(n[r]=G[r][t])}return H[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();Se.BASESIZE=6;var we=Se,Ce={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Te={ex:!0,em:!0,mu:!0},xe=function(e){return"string"!=typeof e&&(e=e.unit),e in Ce||e in Te||"ex"===e},ke=function(e,t){var n;if(e.unit in Ce)n=Ce[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new a("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},Fe=function(e,t,n){return Y[n][e]&&Y[n][e].replace&&(e=Y[n][e].replace),{value:e,metrics:q(e,t,n)}},Oe=function(e,t,n,r,o){var i,a=Fe(e,t,n),s=a.metrics;if(e=a.value,s){var c=s.italic;("text"===n||r&&"mathit"===r.font)&&(c=0),i=new M(e,s.height,s.depth,c,s.skew,s.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),i=new M(e,0,0,0,0,0,o);if(r){i.maxFontSize=r.sizeMultiplier,r.style.isTight()&&i.classes.push("mtight");var l=r.getColor();l&&(i.style.color=l)}return i},Re=function(e,t){if(k(e.classes)!==k(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var r in t.style)if(t.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;return!0},De=function(e){for(var t=0,n=0,r=0,o=0;o<e.children.length;o++){var i=e.children[o];i.height>t&&(t=i.height),i.depth>n&&(n=i.depth),i.maxFontSize>r&&(r=i.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Ie=function(e,t,n,r){var o=new D(e,t,n,r);return De(o),o},Ae=function(e,t,n,r){return new D(e,t,n,r)},Ne=function(e){var t=new x(e);return De(t),t},Me=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Pe={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Le={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659],leftParenInner:["leftParenInner",.875,.3],rightParenInner:["rightParenInner",.875,.3]},je={fontMap:Pe,makeSymbol:Oe,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&Fe(e,"Main-Bold",t).metrics?Oe(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===Y[t][e].font?Oe(e,"Main-Regular",t,n,r):Oe(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:Ie,makeSvgSpan:Ae,makeLineSpan:function(e,t,n){var r=Ie([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=r.height+"em",r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var o=new I(e,t,n,r);return De(o),o},makeFragment:Ne,wrapFragment:function(e,t){return e instanceof x?Ie([],[e],t):e},makeVList:function(e,t){for(var n=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,o=r,i=1;i<t.length;i++){var a=-t[i].shift-o-t[i].elem.depth,s=a-(t[i-1].elem.height+t[i-1].elem.depth);o+=a,n.push({type:"kern",size:s}),n.push(t[i])}return{children:n,depth:r}}var c;if("top"===e.positionType){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-="kern"===d.type?d.size:d.elem.height+d.elem.depth}c=l}else if("bottom"===e.positionType)c=-e.positionData;else{var h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)c=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");c=-h.elem.depth}}return{children:e.children,depth:c}}(e),r=n.children,o=n.depth,i=0,a=0;a<r.length;a++){var s=r[a];if("elem"===s.type){var c=s.elem;i=Math.max(i,c.maxFontSize,c.height)}}i+=2;var l=Ie(["pstrut"],[]);l.style.height=i+"em";for(var u=[],d=o,h=o,p=o,m=0;m<r.length;m++){var g=r[m];if("kern"===g.type)p+=g.size;else{var f=g.elem,_=g.wrapperClasses||[],b=g.wrapperStyle||{},v=Ie(_,[l,f],void 0,b);v.style.top=-i-p-f.depth+"em",g.marginLeft&&(v.style.marginLeft=g.marginLeft),g.marginRight&&(v.style.marginRight=g.marginRight),u.push(v),p+=f.height+f.depth}d=Math.min(d,p),h=Math.max(h,p)}var y,E=Ie(["vlist"],u);if(E.style.height=h+"em",d<0){var S=Ie([],[]),w=Ie(["vlist"],[S]);w.style.height=-d+"em";var C=Ie(["vlist-s"],[new M("")]);y=[Ie(["vlist-r"],[E,C]),Ie(["vlist-r"],[w])]}else y=[Ie(["vlist-r"],[E])];var T=Ie(["vlist-t"],y);return 2===y.length&&T.classes.push("vlist-t2"),T.height=h,T.depth=-d,T},makeOrd:function(e,t,n){var r=e.mode,o=e.text,i=["mord"],s="math"===r||"text"===r&&t.font,c=s?t.font:t.fontFamily;if(55349===o.charCodeAt(0)){var l=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,r="math"===t?0:1;if(119808<=n&&n<120484){var o=Math.floor((n-119808)/26);return[_e[o][2],_e[o][r]]}if(120782<=n&&n<=120831){var i=Math.floor((n-120782)/10);return[be[i][2],be[i][r]]}if(120485===n||120486===n)return[_e[0][2],_e[0][r]];if(120486<n&&n<120782)return["",""];throw new a("Unsupported character: "+e)}(o,r),u=l[0],d=l[1];return Oe(o,u,r,t,i.concat(d))}if(c){var h,p;if("boldsymbol"===c){var m=function(e,t,n,r,o){return"textord"!==o&&Fe(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,r,0,0,n);h=m.fontName,p=[m.fontClass]}else s?(h=Pe[c].fontName,p=[c]):(h=Me(c,t.fontWeight,t.fontShape),p=[c,t.fontWeight,t.fontShape]);if(Fe(o,h,r).metrics)return Oe(o,h,r,t,i.concat(p));if(ne.hasOwnProperty(o)&&"Typewriter"===h.substr(0,10)){for(var g=[],f=0;f<o.length;f++)g.push(Oe(o[f],h,r,t,i.concat(p)));return Ne(g)}}if("mathord"===n)return Oe(o,"Math-Italic",r,t,i.concat(["mathnormal"]));if("textord"===n){var _=Y[r][o]&&Y[r][o].font;if("ams"===_){var b=Me("amsrm",t.fontWeight,t.fontShape);return Oe(o,b,r,t,i.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==_&&_){var v=Me(_,t.fontWeight,t.fontShape);return Oe(o,v,r,t,i.concat(v,t.fontWeight,t.fontShape))}var y=Me("textrm",t.fontWeight,t.fontShape);return Oe(o,y,r,t,i.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},makeGlue:function(e,t){var n=Ie(["mspace"],[],t),r=ke(e,t);return n.style.marginRight=r+"em",n},staticSvg:function(e,t){var n=Le[e],r=n[0],o=n[1],i=n[2],a=new L(r),s=new P([a],{width:o+"em",height:i+"em",style:"width:"+o+"em",viewBox:"0 0 "+1e3*o+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=Ae(["overlay"],[s],t);return c.height=i,c.style.height=i+"em",c.style.width=o+"em",c},svgData:Le,tryCombineChars:function(e){for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof M&&r instanceof M&&Re(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e}},Ue={number:3,unit:"mu"},Be={number:4,unit:"mu"},Ge={number:5,unit:"mu"},Ve={mord:{mop:Ue,mbin:Be,mrel:Ge,minner:Ue},mop:{mord:Ue,mop:Ue,mrel:Ge,minner:Ue},mbin:{mord:Be,mop:Be,mopen:Be,minner:Be},mrel:{mord:Ge,mop:Ge,mopen:Ge,minner:Ge},mopen:{},mclose:{mop:Ue,mbin:Be,mrel:Ge,minner:Ue},mpunct:{mord:Ue,mop:Ue,mrel:Ge,mopen:Ue,mclose:Ue,mpunct:Ue,minner:Ue},minner:{mord:Ue,mop:Ue,mbin:Be,mrel:Ge,mopen:Ue,mpunct:Ue,minner:Ue}},qe={mord:{mop:Ue},mop:{mord:Ue,mop:Ue},mbin:{},mrel:{},mopen:{},mclose:{mop:Ue},mpunct:{},minner:{mop:Ue}},He={},ze={},We={};function Ke(e){for(var t=e.type,n=e.names,r=e.props,o=e.handler,i=e.htmlBuilder,a=e.mathmlBuilder,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,greediness:void 0===r.greediness?1:r.greediness,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,handler:o},c=0;c<n.length;++c)He[n[c]]=s;t&&(i&&(ze[t]=i),a&&(We[t]=a))}function Ye(e){Ke({type:e.type,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:e.htmlBuilder,mathmlBuilder:e.mathmlBuilder})}var $e=function(e){return"ordgroup"===e.type?e.body:[e]},Qe=je.makeSpan,Je=["leftmost","mbin","mopen","mrel","mop","mpunct"],Xe=["rightmost","mrel","mclose","mpunct"],Ze={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.SCRIPTSCRIPT},et={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},tt=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var o=[],i=0;i<e.length;i++){var a=at(e[i],t);if(a instanceof x){var s=a.children;o.push.apply(o,s)}else o.push(a)}if(!n)return o;var c=t;if(1===e.length){var l=e[0];"sizing"===l.type?c=t.havingSize(l.size):"styling"===l.type&&(c=t.havingStyle(Ze[l.style]))}var u=Qe([r[0]||"leftmost"],[],t),h=Qe([r[1]||"rightmost"],[],t),p="root"===n;return nt(o,(function(e,t){var n=t.classes[0],r=e.classes[0];"mbin"===n&&d.contains(Xe,r)?t.classes[0]="mord":"mbin"===r&&d.contains(Je,n)&&(e.classes[0]="mord")}),{node:u},h,p),nt(o,(function(e,t){var n=ot(t),r=ot(e),o=n&&r?e.hasClass("mtight")?qe[n][r]:Ve[n][r]:null;if(o)return je.makeGlue(o,c)}),{node:u},h,p),o},nt=function e(t,n,r,o,i){o&&t.push(o);for(var a=0;a<t.length;a++){var s=t[a],c=rt(s);if(c)e(c.children,n,r,null,i);else{var l=!s.hasClass("mspace");if(l){var u=n(s,r.node);u&&(r.insertAfter?r.insertAfter(u):(t.unshift(u),a++))}l?r.node=s:i&&s.hasClass("newline")&&(r.node=Qe(["leftmost"])),r.insertAfter=function(e){return function(n){t.splice(e+1,0,n),a++}}(a)}}o&&t.pop()},rt=function(e){return e instanceof x||e instanceof I||e instanceof D&&e.hasClass("enclosing")?e:null},ot=function(e,t){return e?(t&&(e=function e(t,n){var r=rt(t);if(r){var o=r.children;if(o.length){if("right"===n)return e(o[o.length-1],"right");if("left"===n)return e(o[0],"left")}}return t}(e,t)),et[e.classes[0]]||null):null},it=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Qe(t.concat(n))},at=function(e,t,n){if(!e)return Qe();if(ze[e.type]){var r=ze[e.type](e,t);if(n&&t.size!==n.size){r=Qe(t.sizingClasses(n),[r],t);var o=t.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}throw new a("Got group of unknown type: '"+e.type+"'")};function st(e,t){var n=Qe(["base"],e,t),r=Qe(["strut"]);return r.style.height=n.height+n.depth+"em",r.style.verticalAlign=-n.depth+"em",n.children.unshift(r),n}function ct(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);for(var r,o=tt(e,t,"root"),i=[],a=[],s=0;s<o.length;s++)if(a.push(o[s]),o[s].hasClass("mbin")||o[s].hasClass("mrel")||o[s].hasClass("allowbreak")){for(var c=!1;s<o.length-1&&o[s+1].hasClass("mspace")&&!o[s+1].hasClass("newline");)s++,a.push(o[s]),o[s].hasClass("nobreak")&&(c=!0);c||(i.push(st(a,t)),a=[])}else o[s].hasClass("newline")&&(a.pop(),a.length>0&&(i.push(st(a,t)),a=[]),i.push(o[s]));a.length>0&&i.push(st(a,t)),n&&((r=st(tt(n,t,!0))).classes=["tag"],i.push(r));var l=Qe(["katex-html"],i);if(l.setAttribute("aria-hidden","true"),r){var u=r.children[0];u.style.height=l.height+l.depth+"em",u.style.verticalAlign=-l.depth+"em"}return l}function lt(e){return new x(e)}var ut=function(){function e(e,t){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=e,this.attributes={},this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e},t.toMarkup=function(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=d.escape(this.attributes[t]),e+='"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),dt=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return d.escape(this.toText())},t.toText=function(){return this.text},e}(),ht={MathNode:ut,TextNode:dt,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",this.width+"em"),e},t.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:lt},pt=function(e,t,n){return!Y[t][e]||!Y[t][e].replace||55349===e.charCodeAt(0)||ne.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.substr(4,2)||n.font&&"tt"===n.font.substr(4,2))||(e=Y[t][e].replace),new ht.TextNode(e)},mt=function(e){return 1===e.length?e[0]:new ht.MathNode("mrow",e)},gt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var o=e.text;return d.contains(["\\imath","\\jmath"],o)?null:(Y[r][o]&&Y[r][o].replace&&(o=Y[r][o].replace),q(o,je.fontMap[n].fontName,r)?je.fontMap[n].variant:null)},ft=function(e,t,n){if(1===e.length){var r=bt(e[0],t);return n&&r instanceof ut&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o,i=[],a=0;a<e.length;a++){var s=bt(e[a],t);if(s instanceof ut&&o instanceof ut){if("mtext"===s.type&&"mtext"===o.type&&s.getAttribute("mathvariant")===o.getAttribute("mathvariant")){var c;(c=o.children).push.apply(c,s.children);continue}if("mn"===s.type&&"mn"===o.type){var l;(l=o.children).push.apply(l,s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===o.type){var u=s.children[0];if(u instanceof dt&&"."===u.text){var d;(d=o.children).push.apply(d,s.children);continue}}else if("mi"===o.type&&1===o.children.length){var h=o.children[0];if(h instanceof dt&&"̸"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var p=s.children[0];p instanceof dt&&p.text.length>0&&(p.text=p.text.slice(0,1)+"̸"+p.text.slice(1),i.pop())}}}i.push(s),o=s}return i},_t=function(e,t,n){return mt(ft(e,t,n))},bt=function(e,t){if(!e)return new ht.MathNode("mrow");if(We[e.type])return We[e.type](e,t);throw new a("Got group of unknown type: '"+e.type+"'")};function vt(e,t,n,r,o){var i,a=ft(e,n);i=1===a.length&&a[0]instanceof ut&&d.contains(["mrow","mtable"],a[0].type)?a[0]:new ht.MathNode("mrow",a);var s=new ht.MathNode("annotation",[new ht.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var c=new ht.MathNode("semantics",[i,s]),l=new ht.MathNode("math",[c]);l.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&l.setAttribute("display","block");var u=o?"katex":"katex-mathml";return je.makeSpan([u],[l])}var yt=function(e){return new we({style:e.displayMode?E.DISPLAY:E.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Et=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=je.makeSpan(n,[e])}return e},St=function(e,t,n){var r,o=yt(n);if("mathml"===n.output)return vt(e,t,o,n.displayMode,!0);if("html"===n.output){var i=ct(e,o);r=je.makeSpan(["katex"],[i])}else{var a=vt(e,t,o,n.displayMode,!1),s=ct(e,o);r=je.makeSpan(["katex"],[a,s])}return Et(r,n)},wt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋"},Ct={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Tt=function(e,t,n,r){var o,i=e.height+e.depth+2*n;if(/fbox|color/.test(t)){if(o=je.makeSpan(["stretchy",t],[],r),"fbox"===t){var a=r.color&&r.getColor();a&&(o.style.borderColor=a)}}else{var s=[];/^[bx]cancel$/.test(t)&&s.push(new j({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&s.push(new j({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new P(s,{width:"100%",height:i+"em"});o=je.makeSvgSpan([],[c],r)}return o.height=i,o.style.height=i+"em",o},xt=function(e){var t=new ht.MathNode("mo",[new ht.TextNode(wt[e.substr(1)])]);return t.setAttribute("stretchy","true"),t},kt=function(e,t){var n=function(){var n=4e5,r=e.label.substr(1);if(d.contains(["widehat","widecheck","widetilde","utilde"],r)){var o,i,a,s="ordgroup"===(m=e.base).type?m.body.length:1;if(s>5)"widehat"===r||"widecheck"===r?(o=420,n=2364,a=.42,i=r+"4"):(o=312,n=2340,a=.34,i="tilde4");else{var c=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][c],o=[0,239,300,360,420][c],a=[0,.24,.3,.3,.36,.42][c],i=r+c):(n=[0,600,1033,2339,2340][c],o=[0,260,286,306,312][c],a=[0,.26,.286,.3,.306,.34][c],i="tilde"+c)}var l=new L(i),u=new P([l],{width:"100%",height:a+"em",viewBox:"0 0 "+n+" "+o,preserveAspectRatio:"none"});return{span:je.makeSvgSpan([],[u],t),minWidth:0,height:a}}var h,p,m,g=[],f=Ct[r],_=f[0],b=f[1],v=f[2],y=v/1e3,E=_.length;if(1===E)h=["hide-tail"],p=[f[3]];else if(2===E)h=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==E)throw new Error("Correct katexImagesData or update code here to support\n "+E+" children.");h=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var S=0;S<E;S++){var w=new L(_[S]),C=new P([w],{width:"400em",height:y+"em",viewBox:"0 0 "+n+" "+v,preserveAspectRatio:p[S]+" slice"}),T=je.makeSvgSpan([h[S]],[C],t);if(1===E)return{span:T,minWidth:b,height:y};T.style.height=y+"em",g.push(T)}return{span:je.makeSpan(["stretchy"],g,t),minWidth:b,height:y}}(),r=n.span,o=n.minWidth,i=n.height;return r.height=i,r.style.height=i+"em",o>0&&(r.style.minWidth=o+"em"),r};function Ft(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ot(e){var t=Rt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Rt(e){return e&&("atom"===e.type||W.hasOwnProperty(e.type))?e:null}var Dt=function(e,t){var n,r,o;e&&"supsub"===e.type?(n=(r=Ft(e.base,"accent")).base,e.base=n,o=function(e){if(e instanceof D)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(at(e,t)),e.base=r):n=(r=Ft(e,"accent")).base;var i=at(n,t.havingCrampedStyle()),a=0;if(r.isShifty&&d.isCharacterBox(n)){var s=d.getBaseElem(n);a=U(at(s,t.havingCrampedStyle())).skew}var c,l=Math.min(i.height,t.fontMetrics().xHeight);if(r.isStretchy)c=kt(r,t),c=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+2*a+"em)",marginLeft:2*a+"em"}:void 0}]},t);else{var u,h;"\\vec"===r.label?(u=je.staticSvg("vec",t),h=je.svgData.vec[1]):((u=U(u=je.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,h=u.width),c=je.makeSpan(["accent-body"],[u]);var p="\\textcircled"===r.label;p&&(c.classes.push("accent-full"),l=i.height);var m=a;p||(m-=h/2),c.style.left=m+"em","\\textcircled"===r.label&&(c.style.top=".2em"),c=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-l},{type:"elem",elem:c}]},t)}var g=je.makeSpan(["mord","accent"],[c],t);return o?(o.children[0]=g,o.height=Math.max(g.height,o.height),o.classes[0]="mord",o):g},It=function(e,t){var n=e.isStretchy?xt(e.label):new ht.MathNode("mo",[pt(e.label,e.mode)]),r=new ht.MathNode("mover",[bt(e.base,t),n]);return r.setAttribute("accent","true"),r},At=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));Ke({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var n=t[0],r=!At.test(e.funcName),o=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:Dt,mathmlBuilder:It}),Ke({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var n=t[0];return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Dt,mathmlBuilder:It}),Ke({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,o=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:o}},htmlBuilder:function(e,t){var n=at(e.base,t),r=kt(e,t),o="\\utilde"===e.label?.12:0,i=je.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:n}]},t);return je.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:function(e,t){var n=xt(e.label),r=new ht.MathNode("munder",[bt(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Nt=function(e){var t=new ht.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ke({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,n){var r=e.parser,o=e.funcName;return{type:"xArrow",mode:r.mode,label:o,body:t[0],below:n[0]}},htmlBuilder:function(e,t){var n,r=t.style,o=t.havingStyle(r.sup()),i=je.wrapFragment(at(e.body,o,t),t);i.classes.push("x-arrow-pad"),e.below&&(o=t.havingStyle(r.sub()),(n=je.wrapFragment(at(e.below,o,t),t)).classes.push("x-arrow-pad"));var a,s=kt(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(l-=i.depth),n){var u=-t.fontMetrics().axisHeight+n.height+.5*s.height+.111;a=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:l},{type:"elem",elem:s,shift:c},{type:"elem",elem:n,shift:u}]},t)}else a=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:l},{type:"elem",elem:s,shift:c}]},t);return a.children[0].children[0].children[1].classes.push("svg-align"),je.makeSpan(["mrel","x-arrow"],[a],t)},mathmlBuilder:function(e,t){var n,r=xt(e.label);if(e.body){var o=Nt(bt(e.body,t));if(e.below){var i=Nt(bt(e.below,t));n=new ht.MathNode("munderover",[r,i,o])}else n=new ht.MathNode("mover",[r,o])}else if(e.below){var a=Nt(bt(e.below,t));n=new ht.MathNode("munder",[r,a])}else n=Nt(),n=new ht.MathNode("mover",[r,n]);return n}}),Ke({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var n=e.parser,r=Ft(t[0],"ordgroup").body,o="",i=0;i<r.length;i++)o+=Ft(r[i],"textord").text;var s=parseInt(o);if(isNaN(s))throw new a("\\@char has non-numeric argument "+o);return{type:"textord",mode:n.mode,text:String.fromCharCode(s)}}});var Mt=function(e,t){var n=tt(e.body,t.withColor(e.color),!1);return je.makeFragment(n)},Pt=function(e,t){var n=ft(e.body,t.withColor(e.color)),r=new ht.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Ke({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(e,t){var n=e.parser,r=Ft(t[0],"color-token").color,o=t[1];return{type:"color",mode:n.mode,color:r,body:$e(o)}},htmlBuilder:Mt,mathmlBuilder:Pt}),Ke({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(e,t){var n=e.parser,r=e.breakOnTokenText,o=Ft(t[0],"color-token").color;n.gullet.macros.set("\\current@color",o);var i=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:o,body:i}},htmlBuilder:Mt,mathmlBuilder:Pt}),Ke({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t,n){var r=e.parser,o=e.funcName,i=n[0],a="\\cr"===o,s=!1;return a||(s=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")),{type:"cr",mode:r.mode,newLine:s,newRow:a,size:i&&Ft(i,"size").value}},htmlBuilder:function(e,t){if(e.newRow)throw new a("\\cr valid only within a tabular/array environment");var n=je.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=ke(e.size,t)+"em")),n},mathmlBuilder:function(e,t){var n=new ht.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",ke(e.size,t)+"em")),n}});var Lt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},jt=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new a("Expected a control sequence",e);return t},Ut=function(e,t,n,r){var o=e.gullet.macros.get(n.text);null==o&&(n.noexpand=!0,o={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,o,r)};Ke({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var r=t.fetch();if(Lt[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=Lt[r.text]),Ft(t.parseFunction(),"internal");throw new a("Invalid token after macro prefix",r)}}),Ke({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,n=e.funcName,r=t.gullet.consumeArgs(1)[0];if(1!==r.length)throw new a("\\gdef's first argument must be a macro name");var o=r[0].text,i=0;for(r=t.gullet.consumeArgs(1)[0];1===r.length&&"#"===r[0].text;){if(1!==(r=t.gullet.consumeArgs(1)[0]).length)throw new a('Invalid argument number length "'+r.length+'"');if(!/^[1-9]$/.test(r[0].text))throw new a('Invalid argument number "'+r[0].text+'"');if(i++,parseInt(r[0].text)!==i)throw new a('Argument number "'+r[0].text+'" out of order');r=t.gullet.consumeArgs(1)[0]}return"\\edef"!==n&&"\\xdef"!==n||(r=t.gullet.expandTokens(r)).reverse(),t.gullet.macros.set(o,{tokens:r,numArgs:i},n===Lt[n]),{type:"internal",mode:t.mode}}}),Ke({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,n=e.funcName,r=jt(t.gullet.popToken());t.gullet.consumeSpaces();var o=function(e){var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t}(t);return Ut(t,r,o,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),Ke({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,n=e.funcName,r=jt(t.gullet.popToken()),o=t.gullet.popToken(),i=t.gullet.popToken();return Ut(t,r,i,"\\\\globalfuture"===n),t.gullet.pushToken(i),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});var Bt=function(e,t,n){var r=q(Y.math[e]&&Y.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},Gt=function(e,t,n,r){var o=n.havingBaseStyle(t),i=je.makeSpan(r.concat(o.sizingClasses(n)),[e],n),a=o.sizeMultiplier/n.sizeMultiplier;return i.height*=a,i.depth*=a,i.maxFontSize=o.sizeMultiplier,i},Vt=function(e,t,n){var r=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=o+"em",e.height-=o,e.depth+=o},qt=function(e,t,n,r,o,i){var a=function(e,t,n,r){return je.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,o,r),s=Gt(je.makeSpan(["delimsizing","size"+t],[a],r),E.TEXT,r,i);return n&&Vt(s,r,E.TEXT),s},Ht=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:je.makeSpan(["delimsizinginner",r],[je.makeSpan([],[je.makeSymbol(e,t,n)])])}},zt={type:"kern",size:-.005},Wt=function(e,t,n,r,o,i){var a,s,c,l;a=c=l=e,s=null;var u="Size1-Regular";"\\uparrow"===e?c=l="⏐":"\\Uparrow"===e?c=l="‖":"\\downarrow"===e?a=c="⏐":"\\Downarrow"===e?a=c="‖":"\\updownarrow"===e?(a="\\uparrow",c="⏐",l="\\downarrow"):"\\Updownarrow"===e?(a="\\Uparrow",c="‖",l="\\Downarrow"):"["===e||"\\lbrack"===e?(a="⎡",c="⎢",l="⎣",u="Size4-Regular"):"]"===e||"\\rbrack"===e?(a="⎤",c="⎥",l="⎦",u="Size4-Regular"):"\\lfloor"===e||"⌊"===e?(c=a="⎢",l="⎣",u="Size4-Regular"):"\\lceil"===e||"⌈"===e?(a="⎡",c=l="⎢",u="Size4-Regular"):"\\rfloor"===e||"⌋"===e?(c=a="⎥",l="⎦",u="Size4-Regular"):"\\rceil"===e||"⌉"===e?(a="⎤",c=l="⎥",u="Size4-Regular"):"("===e||"\\lparen"===e?(a="⎛",c="⎜",l="⎝",u="Size4-Regular"):")"===e||"\\rparen"===e?(a="⎞",c="⎟",l="⎠",u="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(a="⎧",s="⎨",l="⎩",c="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(a="⎫",s="⎬",l="⎭",c="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(a="⎧",l="⎩",c="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(a="⎫",l="⎭",c="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(a="⎧",l="⎭",c="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(a="⎫",l="⎩",c="⎪",u="Size4-Regular");var d=Bt(a,u,o),h=d.height+d.depth,p=Bt(c,u,o),m=p.height+p.depth,g=Bt(l,u,o),f=g.height+g.depth,_=0,b=1;if(null!==s){var v=Bt(s,u,o);_=v.height+v.depth,b=2}var y=h+f+_,S=Math.max(0,Math.ceil((t-y)/(b*m))),w=y+S*b*m,C=r.fontMetrics().axisHeight;n&&(C*=r.sizeMultiplier);var T=w/2-C,x=.005*(S+1)-m,k=[];if(k.push(Ht(l,u,o)),null===s)for(var F=0;F<S;F++)k.push(zt),k.push(Ht(c,u,o));else{for(var O=0;O<S;O++)k.push(zt),k.push(Ht(c,u,o));k.push({type:"kern",size:x}),k.push(Ht(c,u,o)),k.push(zt),k.push(Ht(s,u,o));for(var R=0;R<S;R++)k.push(zt),k.push(Ht(c,u,o))}if("⎜"!==c&&"⎟"!==c||0!==S)k.push({type:"kern",size:x}),k.push(Ht(c,u,o)),k.push(zt);else{var D=je.svgData.leftParenInner[2]/2;k.push({type:"kern",size:-D});var I="⎜"===c?"leftParenInner":"rightParenInner",A=je.staticSvg(I,r);k.push({type:"elem",elem:A}),k.push({type:"kern",size:-D})}k.push(Ht(a,u,o));var N=r.havingBaseStyle(E.TEXT),M=je.makeVList({positionType:"bottom",positionData:T,children:k},N);return Gt(je.makeSpan(["delimsizing","mult"],[M],N),E.TEXT,r,i)},Kt=function(e,t,n,r,o){var i=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,80);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,80,n)}return r}(e,r,n),a=new L(e,i),s=new P([a],{width:"400em",height:t+"em",viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return je.makeSvgSpan(["hide-tail"],[s],o)},Yt=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],$t=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Qt=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Jt=[0,1.2,1.8,2.4,3],Xt=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Zt=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"stack"}],en=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],tn=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},nn=function(e,t,n,r){for(var o=Math.min(2,3-r.style.size);o<n.length&&"stack"!==n[o].type;o++){var i=Bt(e,tn(n[o]),"math"),a=i.height+i.depth;if("small"===n[o].type&&(a*=r.havingBaseStyle(n[o].style).sizeMultiplier),a>t)return n[o]}return n[n.length-1]},rn=function(e,t,n,r,o,i){var a;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),a=d.contains(Qt,e)?Xt:d.contains(Yt,e)?en:Zt;var s=nn(e,t,a,r);return"small"===s.type?function(e,t,n,r,o,i){var a=je.makeSymbol(e,"Main-Regular",o,r),s=Gt(a,t,r,i);return n&&Vt(s,r,t),s}(e,s.style,n,r,o,i):"large"===s.type?qt(e,s.size,n,r,o,i):Wt(e,t,n,r,o,i)},on=function(e,t){var n,r,o=t.havingBaseSizing(),i=nn("\\surd",e*o.sizeMultiplier,en,o),a=o.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),c=0,l=0,u=0;return"small"===i.type?(e<1?a=1:e<1.4&&(a=.7),l=(1+s)/a,(n=Kt("sqrtMain",c=(1+s+.08)/a,u=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",r=.833/a):"large"===i.type?(u=1080*Jt[i.size],l=(Jt[i.size]+s)/a,c=(Jt[i.size]+s+.08)/a,(n=Kt("sqrtSize"+i.size,c,u,s,t)).style.minWidth="1.02em",r=1/a):(c=e+s+.08,l=e+s,u=Math.floor(1e3*e+s)+80,(n=Kt("sqrtTall",c,u,s,t)).style.minWidth="0.742em",r=1.056),n.height=l,n.style.height=c+"em",{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*a}},an=function(e,t,n,r,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),d.contains(Yt,e)||d.contains(Qt,e))return qt(e,t,!1,n,r,o);if(d.contains($t,e))return Wt(e,Jt[t],!1,n,r,o);throw new a("Illegal delimiter: '"+e+"'")},sn=rn,cn=function(e,t,n,r,o,i){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,c=Math.max(t-a,n+a),l=Math.max(c/500*901,2*c-s);return rn(e,l,!0,r,o,i)},ln={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},un=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function dn(e,t){var n=Rt(e);if(n&&d.contains(un,n.text))return n;throw new a(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function hn(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ke({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(e,t){var n=dn(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:ln[e.funcName].size,mclass:ln[e.funcName].mclass,delim:n.text}},htmlBuilder:function(e,t){return"."===e.delim?je.makeSpan([e.mclass]):an(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(pt(e.delim,e.mode));var n=new ht.MathNode("mo",t);return"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n}}),Ke({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(e,t){var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:dn(t[0],e).text,color:n}}}),Ke({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(e,t){var n=dn(t[0],e),r=e.parser;++r.leftrightDepth;var o=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=Ft(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:o,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:function(e,t){hn(e);for(var n,r,o=tt(e.body,t,!0,["mopen","mclose"]),i=0,a=0,s=!1,c=0;c<o.length;c++)o[c].isMiddle?s=!0:(i=Math.max(o[c].height,i),a=Math.max(o[c].depth,a));if(i*=t.sizeMultiplier,a*=t.sizeMultiplier,n="."===e.left?it(t,["mopen"]):cn(e.left,i,a,t,e.mode,["mopen"]),o.unshift(n),s)for(var l=1;l<o.length;l++){var u=o[l].isMiddle;u&&(o[l]=cn(u.delim,i,a,u.options,e.mode,[]))}if("."===e.right)r=it(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;r=cn(e.right,i,a,d,e.mode,["mclose"])}return o.push(r),je.makeSpan(["minner"],o,t)},mathmlBuilder:function(e,t){hn(e);var n=ft(e.body,t);if("."!==e.left){var r=new ht.MathNode("mo",[pt(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var o=new ht.MathNode("mo",[pt(e.right,e.mode)]);o.setAttribute("fence","true"),e.rightColor&&o.setAttribute("mathcolor",e.rightColor),n.push(o)}return mt(n)}}),Ke({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(e,t){var n=dn(t[0],e);if(!e.parser.leftrightDepth)throw new a("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:function(e,t){var n;if("."===e.delim)n=it(t,[]);else{n=an(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:function(e,t){var n="\\vert"===e.delim||"|"===e.delim?pt("|","text"):pt(e.delim,e.mode),r=new ht.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var pn=function(e,t){var n,r,o=je.wrapFragment(at(e.body,t),t),i=e.label.substr(1),a=t.sizeMultiplier,s=0,c=d.isCharacterBox(e.body);if("sout"===i)(n=je.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/a,s=-.5*t.fontMetrics().xHeight;else{/cancel/.test(i)?c||o.classes.push("cancel-pad"):o.classes.push("boxpad");var l=0,u=0;/box/.test(i)?(u=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),l=t.fontMetrics().fboxsep+("colorbox"===i?0:u)):l=c?.2:0,n=Tt(o,i,l,t),/fbox|boxed|fcolorbox/.test(i)&&(n.style.borderStyle="solid",n.style.borderWidth=u+"em"),s=o.depth+l,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}return r=e.backgroundColor?je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:s},{type:"elem",elem:o,shift:0}]},t):je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:s,wrapperClasses:/cancel/.test(i)?["svg-align"]:[]}]},t),/cancel/.test(i)&&(r.height=o.height,r.depth=o.depth),/cancel/.test(i)&&!c?je.makeSpan(["mord","cancel-lap"],[r],t):je.makeSpan(["mord"],[r],t)},mn=function(e,t){var n=0,r=new ht.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[bt(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+o+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};Ke({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(e,t,n){var r=e.parser,o=e.funcName,i=Ft(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:o,backgroundColor:i,body:a}},htmlBuilder:pn,mathmlBuilder:mn}),Ke({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(e,t,n){var r=e.parser,o=e.funcName,i=Ft(t[0],"color-token").color,a=Ft(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:o,backgroundColor:a,borderColor:i,body:s}},htmlBuilder:pn,mathmlBuilder:mn}),Ke({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),Ke({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(e,t,n){var r=e.parser,o=e.funcName,i=t[0];return{type:"enclose",mode:r.mode,label:o,body:i}},htmlBuilder:pn,mathmlBuilder:mn});var gn={};function fn(e){for(var t=e.type,n=e.names,r=e.props,o=e.handler,i=e.htmlBuilder,a=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:o},c=0;c<n.length;++c)gn[n[c]]=s;i&&(ze[t]=i),a&&(We[t]=a)}function _n(e){var t=[];e.consumeSpaces();for(var n=e.fetch().text;"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}function bn(e,t,n){var r=t.hskipBeforeAndAfter,o=t.addJot,i=t.cols,s=t.arraystretch,c=t.colSeparationType;if(e.gullet.beginGroup(),e.gullet.macros.set("\\\\","\\cr"),!s){var l=e.gullet.expandMacroAsText("\\arraystretch");if(null==l)s=1;else if(!(s=parseFloat(l))||s<0)throw new a("Invalid \\arraystretch: "+l)}e.gullet.beginGroup();var u=[],d=[u],h=[],p=[];for(p.push(_n(e));;){var m=e.parseExpression(!1,"\\cr");e.gullet.endGroup(),e.gullet.beginGroup(),m={type:"ordgroup",mode:e.mode,body:m},n&&(m={type:"styling",mode:e.mode,style:n,body:[m]}),u.push(m);var g=e.fetch().text;if("&"===g)e.consume();else{if("\\end"===g){1===u.length&&"styling"===m.type&&0===m.body[0].body.length&&d.pop(),p.length<d.length+1&&p.push([]);break}if("\\cr"!==g)throw new a("Expected & or \\\\ or \\cr or \\end",e.nextToken);var f=Ft(e.parseFunction(),"cr");h.push(f.size),p.push(_n(e)),u=[],d.push(u)}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:s,body:d,cols:i,rowGaps:h,hskipBeforeAndAfter:r,hLinesBeforeRow:p,colSeparationType:c}}function vn(e){return"d"===e.substr(0,1)?"display":"text"}var yn=function(e,t){var n,r,o=e.body.length,i=e.hLinesBeforeRow,s=0,c=new Array(o),l=[],u=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),h=1/t.fontMetrics().ptPerEm,p=5*h;e.colSeparationType&&"small"===e.colSeparationType&&(p=t.havingStyle(E.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var m=12*h,g=3*h,f=e.arraystretch*m,_=.7*f,b=.3*f,v=0;function y(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(y(i[0]),n=0;n<e.body.length;++n){var S=e.body[n],w=_,C=b;s<S.length&&(s=S.length);var T=new Array(S.length);for(r=0;r<S.length;++r){var x=at(S[r],t);C<x.depth&&(C=x.depth),w<x.height&&(w=x.height),T[r]=x}var k=e.rowGaps[n],F=0;k&&(F=ke(k,t))>0&&(C<(F+=b)&&(C=F),F=0),e.addJot&&(C+=g),T.height=w,T.depth=C,v+=w,T.pos=v,v+=C+F,c[n]=T,y(i[n+1])}var O,R,D=v/2+t.fontMetrics().axisHeight,I=e.cols||[],A=[];for(r=0,R=0;r<s||R<I.length;++r,++R){for(var N=I[R]||{},M=!0;"separator"===N.type;){if(M||((O=je.makeSpan(["arraycolsep"],[])).style.width=t.fontMetrics().doubleRuleSep+"em",A.push(O)),"|"!==N.separator&&":"!==N.separator)throw new a("Invalid separator type: "+N.separator);var P="|"===N.separator?"solid":"dashed",L=je.makeSpan(["vertical-separator"],[],t);L.style.height=v+"em",L.style.borderRightWidth=u+"em",L.style.borderRightStyle=P,L.style.margin="0 -"+u/2+"em",L.style.verticalAlign=-(v-D)+"em",A.push(L),N=I[++R]||{},M=!1}if(!(r>=s)){var j=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(j=d.deflt(N.pregap,p))&&((O=je.makeSpan(["arraycolsep"],[])).style.width=j+"em",A.push(O));var U=[];for(n=0;n<o;++n){var B=c[n],G=B[r];if(G){var V=B.pos-D;G.depth=B.depth,G.height=B.height,U.push({type:"elem",elem:G,shift:V})}}U=je.makeVList({positionType:"individualShift",children:U},t),U=je.makeSpan(["col-align-"+(N.align||"c")],[U]),A.push(U),(r<s-1||e.hskipBeforeAndAfter)&&0!==(j=d.deflt(N.postgap,p))&&((O=je.makeSpan(["arraycolsep"],[])).style.width=j+"em",A.push(O))}}if(c=je.makeSpan(["mtable"],A),l.length>0){for(var q=je.makeLineSpan("hline",t,u),H=je.makeLineSpan("hdashline",t,u),z=[{type:"elem",elem:c,shift:0}];l.length>0;){var W=l.pop(),K=W.pos-D;W.isDashed?z.push({type:"elem",elem:H,shift:K}):z.push({type:"elem",elem:q,shift:K})}c=je.makeVList({positionType:"individualShift",children:z},t)}return je.makeSpan(["mord"],[c],t)},En={c:"center ",l:"left ",r:"right "},Sn=function(e,t){var n=new ht.MathNode("mtable",e.body.map((function(e){return new ht.MathNode("mtr",e.map((function(e){return new ht.MathNode("mtd",[bt(e,t)])})))}))),r=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);n.setAttribute("rowspacing",r+"em");var o="",i="";if(e.cols&&e.cols.length>0){var a=e.cols,s="",c=!1,l=0,u=a.length;"separator"===a[0].type&&(o+="top ",l=1),"separator"===a[a.length-1].type&&(o+="bottom ",u-=1);for(var d=l;d<u;d++)"align"===a[d].type?(i+=En[a[d].align],c&&(s+="none "),c=!0):"separator"===a[d].type&&c&&(s+="|"===a[d].separator?"solid ":"dashed ",c=!1);n.setAttribute("columnalign",i.trim()),/[sd]/.test(s)&&n.setAttribute("columnlines",s.trim())}if("align"===e.colSeparationType){for(var h=e.cols||[],p="",m=1;m<h.length;m++)p+=m%2?"0em ":"1em ";n.setAttribute("columnspacing",p.trim())}else"alignat"===e.colSeparationType?n.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?n.setAttribute("columnspacing","0.2778em"):n.setAttribute("columnspacing","1em");var g="",f=e.hLinesBeforeRow;o+=f[0].length>0?"left ":"",o+=f[f.length-1].length>0?"right ":"";for(var _=1;_<f.length-1;_++)g+=0===f[_].length?"none ":f[_][0]?"dashed ":"solid ";return/[sd]/.test(g)&&n.setAttribute("rowlines",g.trim()),""!==o&&(n=new ht.MathNode("menclose",[n])).setAttribute("notation",o.trim()),e.arraystretch&&e.arraystretch<1&&(n=new ht.MathNode("mstyle",[n])).setAttribute("scriptlevel","1"),n},wn=function(e,t){var n,r=[],o=bn(e.parser,{cols:r,addJot:!0},"display"),i=0,s={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",l=0;l<t[0].body.length;l++)c+=Ft(t[0].body[l],"textord").text;n=Number(c),i=2*n}var u=!i;o.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var r=Ft(e[t],"styling");Ft(r.body[0],"ordgroup").body.unshift(s)}if(u)i<e.length&&(i=e.length);else{var o=e.length/2;if(n<o)throw new a("Too many math in a row: expected "+n+", but got "+o,e[0])}}));for(var d=0;d<i;++d){var h="r",p=0;d%2==1?h="l":d>0&&u&&(p=1),r[d]={type:"align",align:h,pregap:p,postgap:0}}return o.colSeparationType=u?"align":"alignat",o};fn({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var n={cols:(Rt(t[0])?[t[0]]:Ft(t[0],"ordgroup").body).map((function(e){var t=Ot(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+t,e)})),hskipBeforeAndAfter:!0};return bn(e.parser,n,vn(e.envName))},htmlBuilder:yn,mathmlBuilder:Sn}),fn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName],n=bn(e.parser,{hskipBeforeAndAfter:!1},vn(e.envName));return t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:yn,mathmlBuilder:Sn}),fn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=bn(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:yn,mathmlBuilder:Sn}),fn({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var n=(Rt(t[0])?[t[0]]:Ft(t[0],"ordgroup").body).map((function(e){var t=Ot(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new a("Unknown column alignment: "+t,e)}));if(n.length>1)throw new a("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=bn(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new a("{subarray} can contain only one column");return r},htmlBuilder:yn,mathmlBuilder:Sn}),fn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=bn(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},vn(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:yn,mathmlBuilder:Sn}),fn({type:"array",names:["aligned"],props:{numArgs:0},handler:wn,htmlBuilder:yn,mathmlBuilder:Sn}),fn({type:"array",names:["gathered"],props:{numArgs:0},handler:function(e){return bn(e.parser,{cols:[{type:"align",align:"c"}],addJot:!0},"display")},htmlBuilder:yn,mathmlBuilder:Sn}),fn({type:"array",names:["alignedat"],props:{numArgs:1},handler:wn,htmlBuilder:yn,mathmlBuilder:Sn}),Ke({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(e,t){throw new a(e.funcName+" valid only within array environment")}});var Cn=gn;Ke({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(e,t){var n=e.parser,r=e.funcName,o=t[0];if("ordgroup"!==o.type)throw new a("Invalid environment name",o);for(var i="",s=0;s<o.body.length;++s)i+=Ft(o.body[s],"textord").text;if("\\begin"===r){if(!Cn.hasOwnProperty(i))throw new a("No such environment: "+i,o);var c=Cn[i],l=n.parseArguments("\\begin{"+i+"}",c),u=l.args,d=l.optArgs,h={mode:n.mode,envName:i,parser:n},p=c.handler(h,u,d);n.expect("\\end",!1);var m=n.nextToken,g=Ft(n.parseFunction(),"environment");if(g.name!==i)throw new a("Mismatch: \\begin{"+i+"} matched by \\end{"+g.name+"}",m);return p}return{type:"environment",mode:n.mode,name:i,nameGroup:o}}});var Tn=je.makeSpan;function xn(e,t){var n=tt(e.body,t,!0);return Tn([e.mclass],n,t)}function kn(e,t){var n,r=ft(e.body,t);return"minner"===e.mclass?ht.newDocumentFragment(r):("mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new ht.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new ht.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"!==e.mclass&&"mclose"!==e.mclass||(n.attributes.lspace="0em",n.attributes.rspace="0em")),n)}Ke({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,o=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.substr(5),body:$e(o),isCharacterBox:d.isCharacterBox(o)}},htmlBuilder:xn,mathmlBuilder:kn});var Fn=function(e){var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};Ke({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(e,t){return{type:"mclass",mode:e.parser.mode,mclass:Fn(t[0]),body:[t[1]],isCharacterBox:d.isCharacterBox(t[1])}}}),Ke({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(e,t){var n,r=e.parser,o=e.funcName,i=t[1],a=t[0];n="\\stackrel"!==o?Fn(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==o,body:$e(i)},c={type:"supsub",mode:a.mode,base:s,sup:"\\underset"===o?null:a,sub:"\\underset"===o?a:null};return{type:"mclass",mode:r.mode,mclass:n,body:[c],isCharacterBox:d.isCharacterBox(c)}},htmlBuilder:xn,mathmlBuilder:kn});var On=function(e,t){var n=e.font,r=t.withFont(n);return at(e.body,r)},Rn=function(e,t){var n=e.font,r=t.withFont(n);return bt(e.body,r)},Dn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ke({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(e,t){var n=e.parser,r=e.funcName,o=t[0],i=r;return i in Dn&&(i=Dn[i]),{type:"font",mode:n.mode,font:i.slice(1),body:o}},htmlBuilder:On,mathmlBuilder:Rn}),Ke({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(e,t){var n=e.parser,r=t[0],o=d.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Fn(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:o}}}),Ke({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,o=e.breakOnTokenText,i=n.mode,a=n.parseExpression(!0,o);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:a}}},htmlBuilder:On,mathmlBuilder:Rn});var In=function(e,t){var n=t;return"display"===e?n=n.id>=E.SCRIPT.id?n.text():E.DISPLAY:"text"===e&&n.size===E.DISPLAY.size?n=E.TEXT:"script"===e?n=E.SCRIPT:"scriptscript"===e&&(n=E.SCRIPTSCRIPT),n},An=function(e,t){var n,r=In(e.size,t.style),o=r.fracNum(),i=r.fracDen();n=t.havingStyle(o);var a=at(e.numer,n,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;a.height=a.height<s?s:a.height,a.depth=a.depth<c?c:a.depth}n=t.havingStyle(i);var l,u,d,h,p,m,g,f,_,b,v=at(e.denom,n,t);if(e.hasBarLine?(e.barSize?(u=ke(e.barSize,t),l=je.makeLineSpan("frac-line",t,u)):l=je.makeLineSpan("frac-line",t),u=l.height,d=l.height):(l=null,u=0,d=t.fontMetrics().defaultRuleThickness),r.size===E.DISPLAY.size||"display"===e.size?(h=t.fontMetrics().num1,p=u>0?3*d:7*d,m=t.fontMetrics().denom1):(u>0?(h=t.fontMetrics().num2,p=d):(h=t.fontMetrics().num3,p=3*d),m=t.fontMetrics().denom2),l){var y=t.fontMetrics().axisHeight;h-a.depth-(y+.5*u)<p&&(h+=p-(h-a.depth-(y+.5*u))),y-.5*u-(v.height-m)<p&&(m+=p-(y-.5*u-(v.height-m)));var S=-(y-.5*u);g=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:m},{type:"elem",elem:l,shift:S},{type:"elem",elem:a,shift:-h}]},t)}else{var w=h-a.depth-(v.height-m);w<p&&(h+=.5*(p-w),m+=.5*(p-w)),g=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:m},{type:"elem",elem:a,shift:-h}]},t)}return n=t.havingStyle(r),g.height*=n.sizeMultiplier/t.sizeMultiplier,g.depth*=n.sizeMultiplier/t.sizeMultiplier,f=r.size===E.DISPLAY.size?t.fontMetrics().delim1:t.fontMetrics().delim2,_=null==e.leftDelim?it(t,["mopen"]):sn(e.leftDelim,f,!0,t.havingStyle(r),e.mode,["mopen"]),b=e.continued?je.makeSpan([]):null==e.rightDelim?it(t,["mclose"]):sn(e.rightDelim,f,!0,t.havingStyle(r),e.mode,["mclose"]),je.makeSpan(["mord"].concat(n.sizingClasses(t)),[_,je.makeSpan(["mfrac"],[g]),b],t)},Nn=function(e,t){var n=new ht.MathNode("mfrac",[bt(e.numer,t),bt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=ke(e.barSize,t);n.setAttribute("linethickness",r+"em")}}else n.setAttribute("linethickness","0px");var o=In(e.size,t.style);if(o.size!==t.style.size){n=new ht.MathNode("mstyle",[n]);var i=o.size===E.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",i),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var s=new ht.MathNode("mo",[new ht.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),a.push(s)}if(a.push(n),null!=e.rightDelim){var c=new ht.MathNode("mo",[new ht.TextNode(e.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),a.push(c)}return mt(a)}return n};Ke({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(e,t){var n,r=e.parser,o=e.funcName,i=t[0],a=t[1],s=null,c=null,l="auto";switch(o){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",c=")";break;case"\\\\bracefrac":n=!1,s="\\{",c="\\}";break;case"\\\\brackfrac":n=!1,s="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(o){case"\\cfrac":case"\\dfrac":case"\\dbinom":l="display";break;case"\\tfrac":case"\\tbinom":l="text"}return{type:"genfrac",mode:r.mode,continued:"\\cfrac"===o,numer:i,denom:a,hasBarLine:n,leftDelim:s,rightDelim:c,size:l,barSize:null}},htmlBuilder:An,mathmlBuilder:Nn}),Ke({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(e){var t,n=e.parser,r=e.funcName,o=e.token;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:o}}});var Mn=["display","text","script","scriptscript"],Pn=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};Ke({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var n,r=e.parser,o=t[4],i=t[5],a="atom"===t[0].type&&"open"===t[0].family?Pn(t[0].text):null,s="atom"===t[1].type&&"close"===t[1].family?Pn(t[1].text):null,c=Ft(t[2],"size"),l=null;n=!!c.isBlank||(l=c.value).number>0;var u="auto",d=t[3];if("ordgroup"===d.type){if(d.body.length>0){var h=Ft(d.body[0],"textord");u=Mn[Number(h.text)]}}else d=Ft(d,"textord"),u=Mn[Number(d.text)];return{type:"genfrac",mode:r.mode,numer:o,denom:i,continued:!1,hasBarLine:n,barSize:l,leftDelim:a,rightDelim:s,size:u}},htmlBuilder:An,mathmlBuilder:Nn}),Ke({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var n=e.parser,r=(e.funcName,e.token);return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ft(t[0],"size").value,token:r}}}),Ke({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var n=e.parser,r=(e.funcName,t[0]),o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ft(t[1],"infix").size),i=t[2],a=o.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:a,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:An,mathmlBuilder:Nn});var Ln=function(e,t){var n,r,o=t.style;"supsub"===e.type?(n=e.sup?at(e.sup,t.havingStyle(o.sup()),t):at(e.sub,t.havingStyle(o.sub()),t),r=Ft(e.base,"horizBrace")):r=Ft(e,"horizBrace");var i,a=at(r.base,t.havingBaseStyle(E.DISPLAY)),s=kt(r,t);if(r.isOver?(i=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=je.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var c=je.makeSpan(["mord",r.isOver?"mover":"munder"],[i],t);i=r.isOver?je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:n}]},t):je.makeVList({positionType:"bottom",positionData:c.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:c}]},t)}return je.makeSpan(["mord",r.isOver?"mover":"munder"],[i],t)};Ke({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Ln,mathmlBuilder:function(e,t){var n=xt(e.label);return new ht.MathNode(e.isOver?"mover":"munder",[bt(e.base,t),n])}}),Ke({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[1],o=Ft(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:n.mode,href:o,body:$e(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var n=tt(e.body,t,!1);return je.makeAnchor(e.href,[],n,t)},mathmlBuilder:function(e,t){var n=_t(e.body,t);return n instanceof ut||(n=new ut("mrow",[n])),n.setAttribute("href",e.href),n}}),Ke({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=Ft(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var o=[],i=0;i<r.length;i++){var a=r[i];"~"===a&&(a="\\textasciitilde"),o.push({type:"textord",mode:"text",text:a})}var s={type:"text",mode:n.mode,font:"\\texttt",body:o};return{type:"href",mode:n.mode,href:r,body:$e(s)}}}),Ke({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:function(e,t){var n,r=e.parser,o=e.funcName,i=(e.token,Ft(t[0],"raw").string),s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c={};switch(o){case"\\htmlClass":c.class=i,n={command:"\\htmlClass",class:i};break;case"\\htmlId":c.id=i,n={command:"\\htmlId",id:i};break;case"\\htmlStyle":c.style=i,n={command:"\\htmlStyle",style:i};break;case"\\htmlData":for(var l=i.split(","),u=0;u<l.length;u++){var d=l[u].split("=");if(2!==d.length)throw new a("Error parsing key-value for \\htmlData");c["data-"+d[0].trim()]=d[1].trim()}n={command:"\\htmlData",attributes:c};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:c,body:$e(s)}:r.formatUnsupportedCmd(o)},htmlBuilder:function(e,t){var n=tt(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push.apply(r,e.attributes.class.trim().split(/\s+/));var o=je.makeSpan(r,n,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&o.setAttribute(i,e.attributes[i]);return o},mathmlBuilder:function(e,t){return _t(e.body,t)}}),Ke({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(e,t){return{type:"htmlmathml",mode:e.parser.mode,html:$e(t[0]),mathml:$e(t[1])}},htmlBuilder:function(e,t){var n=tt(e.html,t,!1);return je.makeFragment(n)},mathmlBuilder:function(e,t){return _t(e.mathml,t)}});var jn=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new a("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!xe(n))throw new a("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Ke({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(e,t,n){var r=e.parser,o={number:0,unit:"em"},i={number:.9,unit:"em"},s={number:0,unit:"em"},c="";if(n[0])for(var l=Ft(n[0],"raw").string.split(","),u=0;u<l.length;u++){var d=l[u].split("=");if(2===d.length){var h=d[1].trim();switch(d[0].trim()){case"alt":c=h;break;case"width":o=jn(h);break;case"height":i=jn(h);break;case"totalheight":s=jn(h);break;default:throw new a("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var p=Ft(t[0],"url").url;return""===c&&(c=(c=(c=p).replace(/^.*[\\/]/,"")).substring(0,c.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:r.mode,alt:c,width:o,height:i,totalheight:s,src:p}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(e,t){var n=ke(e.height,t),r=0;e.totalheight.number>0&&(r=ke(e.totalheight,t)-n,r=Number(r.toFixed(2)));var o=0;e.width.number>0&&(o=ke(e.width,t));var i={height:n+r+"em"};o>0&&(i.width=o+"em"),r>0&&(i.verticalAlign=-r+"em");var a=new A(e.src,e.alt,i);return a.height=n,a.depth=r,a},mathmlBuilder:function(e,t){var n=new ht.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=ke(e.height,t),o=0;if(e.totalheight.number>0&&(o=(o=ke(e.totalheight,t)-r).toFixed(2),n.setAttribute("valign","-"+o+"em")),n.setAttribute("height",r+o+"em"),e.width.number>0){var i=ke(e.width,t);n.setAttribute("width",i+"em")}return n.setAttribute("src",e.src),n}}),Ke({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,o=Ft(t[0],"size");if(n.settings.strict){var i="m"===r[1],a="mu"===o.value.unit;i?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+o.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:o.value}},htmlBuilder:function(e,t){return je.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var n=ke(e.dimension,t);return new ht.SpaceNode(n)}}),Ke({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,o=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:o}},htmlBuilder:function(e,t){var n;"clap"===e.alignment?(n=je.makeSpan([],[at(e.body,t)]),n=je.makeSpan(["inner"],[n],t)):n=je.makeSpan(["inner"],[at(e.body,t)]);var r=je.makeSpan(["fix"],[]),o=je.makeSpan([e.alignment],[n,r],t),i=je.makeSpan(["strut"]);return i.style.height=o.height+o.depth+"em",i.style.verticalAlign=-o.depth+"em",o.children.unshift(i),o=je.makeSpan(["thinbox"],[o],t),je.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:function(e,t){var n=new ht.MathNode("mpadded",[bt(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),Ke({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var n=e.funcName,r=e.parser,o=r.mode;r.switchMode("math");var i="\\("===n?"\\)":"$",a=r.parseExpression(!1,i);return r.expect(i),r.switchMode(o),{type:"styling",mode:r.mode,style:"text",body:a}}}),Ke({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new a("Mismatched "+e.funcName)}});var Un=function(e,t){switch(t.style.size){case E.DISPLAY.size:return e.display;case E.TEXT.size:return e.text;case E.SCRIPT.size:return e.script;case E.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ke({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:$e(t[0]),text:$e(t[1]),script:$e(t[2]),scriptscript:$e(t[3])}},htmlBuilder:function(e,t){var n=Un(e,t),r=tt(n,t,!1);return je.makeFragment(r)},mathmlBuilder:function(e,t){var n=Un(e,t);return _t(n,t)}});var Bn=function(e,t,n,r,o,i,a){var s,c,l;if(e=je.makeSpan([],[e]),t){var u=at(t,r.havingStyle(o.sup()),r);c={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=at(n,r.havingStyle(o.sub()),r);s={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(c&&s){var h=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+a;l=je.makeVList({positionType:"bottom",positionData:h,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:-i+"em"},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:i+"em"},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var p=e.height-a;l=je.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:-i+"em"},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!c)return e;var m=e.depth+a;l=je.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:i+"em"},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}return je.makeSpan(["mop","op-limits"],[l],r)},Gn=["\\smallint"],Vn=function(e,t){var n,r,o,i=!1;"supsub"===e.type?(n=e.sup,r=e.sub,o=Ft(e.base,"op"),i=!0):o=Ft(e,"op");var a,s=t.style,c=!1;if(s.size===E.DISPLAY.size&&o.symbol&&!d.contains(Gn,o.name)&&(c=!0),o.symbol){var l=c?"Size2-Regular":"Size1-Regular",u="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(u=o.name.substr(1),o.name="oiint"===u?"\\iint":"\\iiint"),a=je.makeSymbol(o.name,l,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),u.length>0){var h=a.italic,p=je.staticSvg(u+"Size"+(c?"2":"1"),t);a=je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:p,shift:c?.08:0}]},t),o.name="\\"+u,a.classes.unshift("mop"),a.italic=h}}else if(o.body){var m=tt(o.body,t,!0);1===m.length&&m[0]instanceof M?(a=m[0]).classes[0]="mop":a=je.makeSpan(["mop"],je.tryCombineChars(m),t)}else{for(var g=[],f=1;f<o.name.length;f++)g.push(je.mathsym(o.name[f],o.mode,t));a=je.makeSpan(["mop"],g,t)}var _=0,b=0;return(a instanceof M||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(_=(a.height-a.depth)/2-t.fontMetrics().axisHeight,b=a.italic),i?Bn(a,n,r,t,s,b,_):(_&&(a.style.position="relative",a.style.top=_+"em"),a)},qn=function(e,t){var n;if(e.symbol)n=new ut("mo",[pt(e.name,e.mode)]),d.contains(Gn,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new ut("mo",ft(e.body,t));else{n=new ut("mi",[new dt(e.name.slice(1))]);var r=new ut("mo",[pt("","text")]);n=e.parentIsSupSub?new ut("mo",[n,r]):lt([n,r])}return n},Hn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ke({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:function(e,t){var n=e.parser,r=e.funcName;return 1===r.length&&(r=Hn[r]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Vn,mathmlBuilder:qn}),Ke({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:$e(r)}},htmlBuilder:Vn,mathmlBuilder:qn});var zn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ke({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(e){var t=e.parser,n=e.funcName;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Vn,mathmlBuilder:qn}),Ke({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(e){var t=e.parser,n=e.funcName;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Vn,mathmlBuilder:qn}),Ke({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler:function(e){var t=e.parser,n=e.funcName;return 1===n.length&&(n=zn[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Vn,mathmlBuilder:qn});var Wn=function(e,t){var n,r,o,i,a=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,o=Ft(e.base,"operatorname"),a=!0):o=Ft(e,"operatorname"),o.body.length>0){for(var s=o.body.map((function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),c=tt(s,t.withFont("mathrm"),!0),l=0;l<c.length;l++){var u=c[l];u instanceof M&&(u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=je.makeSpan(["mop"],c,t)}else i=je.makeSpan(["mop"],[],t);return a?Bn(i,n,r,t,t.style,0,0):i};function Kn(e,t,n){for(var r=tt(e,t,!1),o=t.sizeMultiplier/n.sizeMultiplier,i=0;i<r.length;i++){var a=r[i].classes.indexOf("sizing");a<0?Array.prototype.push.apply(r[i].classes,t.sizingClasses(n)):r[i].classes[a+1]==="reset-size"+t.size&&(r[i].classes[a+1]="reset-size"+n.size),r[i].height*=o,r[i].depth*=o}return je.makeFragment(r)}Ke({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,o=t[0];return{type:"operatorname",mode:n.mode,body:$e(o),alwaysHandleSupSub:"\\operatorname*"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Wn,mathmlBuilder:function(e,t){for(var n=ft(e.body,t.withFont("mathrm")),r=!0,o=0;o<n.length;o++){var i=n[o];if(i instanceof ht.SpaceNode);else if(i instanceof ht.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var a=i.children[0];1===i.children.length&&a instanceof ht.TextNode?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var s=n.map((function(e){return e.toText()})).join("");n=[new ht.TextNode(s)]}var c=new ht.MathNode("mi",n);c.setAttribute("mathvariant","normal");var l=new ht.MathNode("mo",[pt("","text")]);return e.parentIsSupSub?new ht.MathNode("mo",[c,l]):ht.newDocumentFragment([c,l])}}),Ye({type:"ordgroup",htmlBuilder:function(e,t){return e.semisimple?je.makeFragment(tt(e.body,t,!1)):je.makeSpan(["mord"],tt(e.body,t,!0),t)},mathmlBuilder:function(e,t){return _t(e.body,t,!0)}}),Ke({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder:function(e,t){var n=at(e.body,t.havingCrampedStyle()),r=je.makeLineSpan("overline-line",t),o=t.fontMetrics().defaultRuleThickness,i=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r},{type:"kern",size:o}]},t);return je.makeSpan(["mord","overline"],[i],t)},mathmlBuilder:function(e,t){var n=new ht.MathNode("mo",[new ht.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new ht.MathNode("mover",[bt(e.body,t),n]);return r.setAttribute("accent","true"),r}}),Ke({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"phantom",mode:n.mode,body:$e(r)}},htmlBuilder:function(e,t){var n=tt(e.body,t.withPhantom(),!1);return je.makeFragment(n)},mathmlBuilder:function(e,t){var n=ft(e.body,t);return new ht.MathNode("mphantom",n)}}),Ke({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:function(e,t){var n=je.makeSpan([],[at(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),je.makeSpan(["mord"],[n],t)},mathmlBuilder:function(e,t){var n=ft($e(e.body),t),r=new ht.MathNode("mphantom",n),o=new ht.MathNode("mpadded",[r]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),Ke({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:function(e,t){var n=je.makeSpan(["inner"],[at(e.body,t.withPhantom())]),r=je.makeSpan(["fix"],[]);return je.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:function(e,t){var n=ft($e(e.body),t),r=new ht.MathNode("mphantom",n),o=new ht.MathNode("mpadded",[r]);return o.setAttribute("width","0px"),o}}),Ke({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=Ft(t[0],"size").value,o=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:o}},htmlBuilder:function(e,t){var n=at(e.body,t),r=ke(e.dy,t);return je.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:function(e,t){var n=new ht.MathNode("mpadded",[bt(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),Ke({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(e,t,n){var r=e.parser,o=n[0],i=Ft(t[0],"size"),a=Ft(t[1],"size");return{type:"rule",mode:r.mode,shift:o&&Ft(o,"size").value,width:i.value,height:a.value}},htmlBuilder:function(e,t){var n=je.makeSpan(["mord","rule"],[],t),r=ke(e.width,t),o=ke(e.height,t),i=e.shift?ke(e.shift,t):0;return n.style.borderRightWidth=r+"em",n.style.borderTopWidth=o+"em",n.style.bottom=i+"em",n.width=r,n.height=o+i,n.depth=-i,n.maxFontSize=1.125*o*t.sizeMultiplier,n},mathmlBuilder:function(e,t){var n=ke(e.width,t),r=ke(e.height,t),o=e.shift?ke(e.shift,t):0,i=t.color&&t.getColor()||"black",a=new ht.MathNode("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",n+"em"),a.setAttribute("height",r+"em");var s=new ht.MathNode("mpadded",[a]);return o>=0?s.setAttribute("height","+"+o+"em"):(s.setAttribute("height",o+"em"),s.setAttribute("depth","+"+-o+"em")),s.setAttribute("voffset",o+"em"),s}});var Yn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Ke({type:"sizing",names:Yn,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var n=e.breakOnTokenText,r=e.funcName,o=e.parser,i=o.parseExpression(!1,n);return{type:"sizing",mode:o.mode,size:Yn.indexOf(r)+1,body:i}},htmlBuilder:function(e,t){var n=t.havingSize(e.size);return Kn(e.body,n,t)},mathmlBuilder:function(e,t){var n=t.havingSize(e.size),r=ft(e.body,n),o=new ht.MathNode("mstyle",r);return o.setAttribute("mathsize",n.sizeMultiplier+"em"),o}}),Ke({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,n){var r=e.parser,o=!1,i=!1,a=n[0]&&Ft(n[0],"ordgroup");if(a)for(var s="",c=0;c<a.body.length;++c)if("t"===(s=a.body[c].text))o=!0;else{if("b"!==s){o=!1,i=!1;break}i=!0}else o=!0,i=!0;var l=t[0];return{type:"smash",mode:r.mode,body:l,smashHeight:o,smashDepth:i}},htmlBuilder:function(e,t){var n=je.makeSpan([],[at(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var o=0;o<n.children.length;o++)n.children[o].depth=0;var i=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return je.makeSpan(["mord"],[i],t)},mathmlBuilder:function(e,t){var n=new ht.MathNode("mpadded",[bt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),Ke({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,n){var r=e.parser,o=n[0],i=t[0];return{type:"sqrt",mode:r.mode,body:i,index:o}},htmlBuilder:function(e,t){var n=at(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=je.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,o=r;t.style.id<E.TEXT.id&&(o=t.fontMetrics().xHeight);var i=r+o/4,a=n.height+n.depth+i+r,s=on(a,t),c=s.span,l=s.ruleWidth,u=s.advanceWidth,d=c.height-l;d>n.height+n.depth+i&&(i=(i+d-n.height-n.depth)/2);var h=c.height-n.height-i-l;n.style.paddingLeft=u+"em";var p=je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+h)},{type:"elem",elem:c},{type:"kern",size:l}]},t);if(e.index){var m=t.havingStyle(E.SCRIPTSCRIPT),g=at(e.index,m,t),f=.6*(p.height-p.depth),_=je.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:g}]},t),b=je.makeSpan(["root"],[_]);return je.makeSpan(["mord","sqrt"],[b,p],t)}return je.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder:function(e,t){var n=e.body,r=e.index;return r?new ht.MathNode("mroot",[bt(n,t),bt(r,t)]):new ht.MathNode("msqrt",[bt(n,t)])}});var $n={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.SCRIPTSCRIPT};Ke({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(e,t){var n=e.breakOnTokenText,r=e.funcName,o=e.parser,i=o.parseExpression(!0,n),a=r.slice(1,r.length-5);return{type:"styling",mode:o.mode,style:a,body:i}},htmlBuilder:function(e,t){var n=$n[e.style],r=t.havingStyle(n).withFont("");return Kn(e.body,r,t)},mathmlBuilder:function(e,t){var n=$n[e.style],r=t.havingStyle(n),o=ft(e.body,r),i=new ht.MathNode("mstyle",o),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",a[0]),i.setAttribute("displaystyle",a[1]),i}}),Ye({type:"supsub",htmlBuilder:function(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===E.DISPLAY.size||n.alwaysHandleSupSub)?Vn:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===E.DISPLAY.size||n.limits)?Wn:null:"accent"===n.type?d.isCharacterBox(n.base)?Dt:null:"horizBrace"===n.type&&!e.sub===n.isOver?Ln:null:null}(e,t);if(n)return n(e,t);var r,o,i,a=e.base,s=e.sup,c=e.sub,l=at(a,t),u=t.fontMetrics(),h=0,p=0,m=a&&d.isCharacterBox(a);if(s){var g=t.havingStyle(t.style.sup());r=at(s,g,t),m||(h=l.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(c){var f=t.havingStyle(t.style.sub());o=at(c,f,t),m||(p=l.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===E.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2;var _,b=t.sizeMultiplier,v=.5/u.ptPerEm/b+"em",y=null;if(o){var S=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(l instanceof M||S)&&(y=-l.italic+"em")}if(r&&o){h=Math.max(h,i,r.depth+.25*u.xHeight),p=Math.max(p,u.sub2);var w=4*u.defaultRuleThickness;if(h-r.depth-(o.height-p)<w){p=w-(h-r.depth)+o.height;var C=.8*u.xHeight-(h-r.depth);C>0&&(h+=C,p-=C)}var T=[{type:"elem",elem:o,shift:p,marginRight:v,marginLeft:y},{type:"elem",elem:r,shift:-h,marginRight:v}];_=je.makeVList({positionType:"individualShift",children:T},t)}else if(o){p=Math.max(p,u.sub1,o.height-.8*u.xHeight);var x=[{type:"elem",elem:o,marginLeft:y,marginRight:v}];_=je.makeVList({positionType:"shift",positionData:p,children:x},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,i,r.depth+.25*u.xHeight),_=je.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:v}]},t)}var k=ot(l,"right")||"mord";return je.makeSpan([k],[l,je.makeSpan(["msupsub"],[_])],t)},mathmlBuilder:function(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,i=[bt(e.base,t)];if(e.sub&&i.push(bt(e.sub,t)),e.sup&&i.push(bt(e.sup,t)),r)o=n?"mover":"munder";else if(e.sub)if(e.sup){var a=e.base;o=a&&"op"===a.type&&a.limits&&t.style===E.DISPLAY||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(t.style===E.DISPLAY||a.limits)?"munderover":"msubsup"}else{var s=e.base;o=s&&"op"===s.type&&s.limits&&(t.style===E.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===E.DISPLAY)?"munder":"msub"}else{var c=e.base;o=c&&"op"===c.type&&c.limits&&(t.style===E.DISPLAY||c.alwaysHandleSupSub)||c&&"operatorname"===c.type&&c.alwaysHandleSupSub&&(c.limits||t.style===E.DISPLAY)?"mover":"msup"}return new ht.MathNode(o,i)}}),Ye({type:"atom",htmlBuilder:function(e,t){return je.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var n=new ht.MathNode("mo",[pt(e.text,e.mode)]);if("bin"===e.family){var r=gt(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var Qn={mi:"italic",mn:"normal",mtext:"normal"};Ye({type:"mathord",htmlBuilder:function(e,t){return je.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var n=new ht.MathNode("mi",[pt(e.text,e.mode,t)]),r=gt(e,t)||"italic";return r!==Qn[n.type]&&n.setAttribute("mathvariant",r),n}}),Ye({type:"textord",htmlBuilder:function(e,t){return je.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var n,r=pt(e.text,e.mode,t),o=gt(e,t)||"normal";return n="text"===e.mode?new ht.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new ht.MathNode("mn",[r]):"\\prime"===e.text?new ht.MathNode("mo",[r]):new ht.MathNode("mi",[r]),o!==Qn[n.type]&&n.setAttribute("mathvariant",o),n}});var Jn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Xn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ye({type:"spacing",htmlBuilder:function(e,t){if(Xn.hasOwnProperty(e.text)){var n=Xn[e.text].className||"";if("text"===e.mode){var r=je.makeOrd(e,t,"textord");return r.classes.push(n),r}return je.makeSpan(["mspace",n],[je.mathsym(e.text,e.mode,t)],t)}if(Jn.hasOwnProperty(e.text))return je.makeSpan(["mspace",Jn[e.text]],[],t);throw new a('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!Xn.hasOwnProperty(e.text)){if(Jn.hasOwnProperty(e.text))return new ht.MathNode("mspace");throw new a('Unknown type of space "'+e.text+'"')}return new ht.MathNode("mtext",[new ht.TextNode(" ")])}});var Zn=function(){var e=new ht.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ye({type:"tag",mathmlBuilder:function(e,t){var n=new ht.MathNode("mtable",[new ht.MathNode("mtr",[Zn(),new ht.MathNode("mtd",[_t(e.body,t)]),Zn(),new ht.MathNode("mtd",[_t(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var er={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},tr={"\\textbf":"textbf","\\textmd":"textmd"},nr={"\\textit":"textit","\\textup":"textup"},rr=function(e,t){var n=e.font;return n?er[n]?t.withTextFontFamily(er[n]):tr[n]?t.withTextFontWeight(tr[n]):t.withTextFontShape(nr[n]):t};Ke({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,o=t[0];return{type:"text",mode:n.mode,body:$e(o),font:r}},htmlBuilder:function(e,t){var n=rr(e,t),r=tt(e.body,n,!0);return je.makeSpan(["mord","text"],je.tryCombineChars(r),n)},mathmlBuilder:function(e,t){var n=rr(e,t);return _t(e.body,n)}}),Ke({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var n=at(e.body,t),r=je.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,i=je.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:o},{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n}]},t);return je.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var n=new ht.MathNode("mo",[new ht.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new ht.MathNode("munder",[bt(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),Ke({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,n){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var n=or(e),r=[],o=t.havingStyle(t.style.text()),i=0;i<n.length;i++){var a=n[i];"~"===a&&(a="\\textasciitilde"),r.push(je.makeSymbol(a,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return je.makeSpan(["mord","text"].concat(o.sizingClasses(t)),je.tryCombineChars(r),o)},mathmlBuilder:function(e,t){var n=new ht.TextNode(or(e)),r=new ht.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var or=function(e){return e.body.replace(/ /g,e.star?"␣":" ")},ir=He,ar=new RegExp("^(\\\\[a-zA-Z@]+)[ \r\n\t]*$"),sr=new RegExp("[̀-ͯ]+$"),cr=function(){function e(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|([!-\\[\\]-‧-豈-][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*|\\\\[a-zA-Z@]+[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14}}var t=e.prototype;return t.setCatcode=function(e,t){this.catcodes[e]=t},t.lex=function(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new o("EOF",new r(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new a("Unexpected character: '"+e[t]+"'",new o(e[t],new r(this,t,t+1)));var i=n[2]||" ";if(14===this.catcodes[i]){var s=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===s?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}var c=i.match(ar);return c&&(i=c[1]),new o(i,new r(this,t,this.tokenRegex.lastIndex))},e}(),lr=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}var t=e.prototype;return t.beginGroup=function(){this.undefStack.push({})},t.endGroup=function(){if(0===this.undefStack.length)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(void 0===e[t]?delete this.current[t]:this.current[t]=e[t])},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}this.current[e]=t},e}(),ur={},dr=ur;function hr(e,t){ur[e]=t}hr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),hr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),hr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),hr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),hr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),hr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),hr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var pr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};hr("\\char",(function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new a("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=pr[n.text])||r>=t)throw new a("Invalid base-"+t+" digit "+n.text);for(var o;null!=(o=pr[e.future().text])&&o<t;)r*=t,r+=o,e.popToken()}return"\\@char{"+r+"}"}));var mr=function(e,t,n){var r=e.consumeArgs(1)[0];if(1!==r.length)throw new a("\\newcommand's first argument must be a macro name");var o=r[0].text,i=e.isDefined(o);if(i&&!t)throw new a("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!i&&!n)throw new a("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var s=0;if(1===(r=e.consumeArgs(1)[0]).length&&"["===r[0].text){for(var c="",l=e.expandNextToken();"]"!==l.text&&"EOF"!==l.text;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+c);s=parseInt(c),r=e.consumeArgs(1)[0]}return e.macros.set(o,{tokens:r,numArgs:s}),""};hr("\\newcommand",(function(e){return mr(e,!1,!0)})),hr("\\renewcommand",(function(e){return mr(e,!0,!1)})),hr("\\providecommand",(function(e){return mr(e,!0,!0)})),hr("\\message",(function(e){var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((function(e){return e.text})).join("")),""})),hr("\\errmessage",(function(e){var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((function(e){return e.text})).join("")),""})),hr("\\show",(function(e){var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),ir[n],Y.math[n],Y.text[n]),""})),hr("\\bgroup","{"),hr("\\egroup","}"),hr("\\lq","`"),hr("\\rq","'"),hr("\\aa","\\r a"),hr("\\AA","\\r A"),hr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),hr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),hr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),hr("ℬ","\\mathscr{B}"),hr("ℰ","\\mathscr{E}"),hr("ℱ","\\mathscr{F}"),hr("ℋ","\\mathscr{H}"),hr("ℐ","\\mathscr{I}"),hr("ℒ","\\mathscr{L}"),hr("ℳ","\\mathscr{M}"),hr("ℛ","\\mathscr{R}"),hr("ℭ","\\mathfrak{C}"),hr("ℌ","\\mathfrak{H}"),hr("ℨ","\\mathfrak{Z}"),hr("\\Bbbk","\\Bbb{k}"),hr("·","\\cdotp"),hr("\\llap","\\mathllap{\\textrm{#1}}"),hr("\\rlap","\\mathrlap{\\textrm{#1}}"),hr("\\clap","\\mathclap{\\textrm{#1}}"),hr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),hr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),hr("\\ne","\\neq"),hr("≠","\\neq"),hr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),hr("∉","\\notin"),hr("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),hr("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),hr("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),hr("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),hr("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),hr("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),hr("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),hr("⟂","\\perp"),hr("‼","\\mathclose{!\\mkern-0.8mu!}"),hr("∌","\\notni"),hr("⌜","\\ulcorner"),hr("⌝","\\urcorner"),hr("⌞","\\llcorner"),hr("⌟","\\lrcorner"),hr("©","\\copyright"),hr("®","\\textregistered"),hr("️","\\textregistered"),hr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),hr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),hr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),hr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),hr("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),hr("⋮","\\vdots"),hr("\\varGamma","\\mathit{\\Gamma}"),hr("\\varDelta","\\mathit{\\Delta}"),hr("\\varTheta","\\mathit{\\Theta}"),hr("\\varLambda","\\mathit{\\Lambda}"),hr("\\varXi","\\mathit{\\Xi}"),hr("\\varPi","\\mathit{\\Pi}"),hr("\\varSigma","\\mathit{\\Sigma}"),hr("\\varUpsilon","\\mathit{\\Upsilon}"),hr("\\varPhi","\\mathit{\\Phi}"),hr("\\varPsi","\\mathit{\\Psi}"),hr("\\varOmega","\\mathit{\\Omega}"),hr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),hr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),hr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),hr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),hr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),hr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var gr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};hr("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in gr?t=gr[n]:("\\not"===n.substr(0,4)||n in Y.math&&d.contains(["bin","rel"],Y.math[n].group))&&(t="\\dotsb"),t}));var fr={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};hr("\\dotso",(function(e){return e.future().text in fr?"\\ldots\\,":"\\ldots"})),hr("\\dotsc",(function(e){var t=e.future().text;return t in fr&&","!==t?"\\ldots\\,":"\\ldots"})),hr("\\cdots",(function(e){return e.future().text in fr?"\\@cdots\\,":"\\@cdots"})),hr("\\dotsb","\\cdots"),hr("\\dotsm","\\cdots"),hr("\\dotsi","\\!\\cdots"),hr("\\dotsx","\\ldots\\,"),hr("\\DOTSI","\\relax"),hr("\\DOTSB","\\relax"),hr("\\DOTSX","\\relax"),hr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),hr("\\,","\\tmspace+{3mu}{.1667em}"),hr("\\thinspace","\\,"),hr("\\>","\\mskip{4mu}"),hr("\\:","\\tmspace+{4mu}{.2222em}"),hr("\\medspace","\\:"),hr("\\;","\\tmspace+{5mu}{.2777em}"),hr("\\thickspace","\\;"),hr("\\!","\\tmspace-{3mu}{.1667em}"),hr("\\negthinspace","\\!"),hr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),hr("\\negthickspace","\\tmspace-{5mu}{.277em}"),hr("\\enspace","\\kern.5em "),hr("\\enskip","\\hskip.5em\\relax"),hr("\\quad","\\hskip1em\\relax"),hr("\\qquad","\\hskip2em\\relax"),hr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),hr("\\tag@paren","\\tag@literal{({#1})}"),hr("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),hr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),hr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),hr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),hr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),hr("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),hr("\\\\","\\newline"),hr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var _r=B["Main-Regular"]["T".charCodeAt(0)][1]-.7*B["Main-Regular"]["A".charCodeAt(0)][1]+"em";hr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+_r+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),hr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+_r+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),hr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),hr("\\@hspace","\\hskip #1\\relax"),hr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),hr("\\ordinarycolon",":"),hr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),hr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),hr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),hr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),hr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),hr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),hr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),hr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),hr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),hr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),hr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),hr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),hr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),hr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),hr("∷","\\dblcolon"),hr("∹","\\eqcolon"),hr("≔","\\coloneqq"),hr("≕","\\eqqcolon"),hr("⩴","\\Coloneqq"),hr("\\ratio","\\vcentcolon"),hr("\\coloncolon","\\dblcolon"),hr("\\colonequals","\\coloneqq"),hr("\\coloncolonequals","\\Coloneqq"),hr("\\equalscolon","\\eqqcolon"),hr("\\equalscoloncolon","\\Eqqcolon"),hr("\\colonminus","\\coloneq"),hr("\\coloncolonminus","\\Coloneq"),hr("\\minuscolon","\\eqcolon"),hr("\\minuscoloncolon","\\Eqcolon"),hr("\\coloncolonapprox","\\Colonapprox"),hr("\\coloncolonsim","\\Colonsim"),hr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),hr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),hr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),hr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),hr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),hr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),hr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),hr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),hr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),hr("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),hr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),hr("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),hr("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),hr("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),hr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),hr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),hr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),hr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),hr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),hr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),hr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),hr("\\imath","\\html@mathml{\\@imath}{ı}"),hr("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),hr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),hr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),hr("⟦","\\llbracket"),hr("⟧","\\rrbracket"),hr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),hr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),hr("⦃","\\lBrace"),hr("⦄","\\rBrace"),hr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),hr("⦵","\\minuso"),hr("\\darr","\\downarrow"),hr("\\dArr","\\Downarrow"),hr("\\Darr","\\Downarrow"),hr("\\lang","\\langle"),hr("\\rang","\\rangle"),hr("\\uarr","\\uparrow"),hr("\\uArr","\\Uparrow"),hr("\\Uarr","\\Uparrow"),hr("\\N","\\mathbb{N}"),hr("\\R","\\mathbb{R}"),hr("\\Z","\\mathbb{Z}"),hr("\\alef","\\aleph"),hr("\\alefsym","\\aleph"),hr("\\Alpha","\\mathrm{A}"),hr("\\Beta","\\mathrm{B}"),hr("\\bull","\\bullet"),hr("\\Chi","\\mathrm{X}"),hr("\\clubs","\\clubsuit"),hr("\\cnums","\\mathbb{C}"),hr("\\Complex","\\mathbb{C}"),hr("\\Dagger","\\ddagger"),hr("\\diamonds","\\diamondsuit"),hr("\\empty","\\emptyset"),hr("\\Epsilon","\\mathrm{E}"),hr("\\Eta","\\mathrm{H}"),hr("\\exist","\\exists"),hr("\\harr","\\leftrightarrow"),hr("\\hArr","\\Leftrightarrow"),hr("\\Harr","\\Leftrightarrow"),hr("\\hearts","\\heartsuit"),hr("\\image","\\Im"),hr("\\infin","\\infty"),hr("\\Iota","\\mathrm{I}"),hr("\\isin","\\in"),hr("\\Kappa","\\mathrm{K}"),hr("\\larr","\\leftarrow"),hr("\\lArr","\\Leftarrow"),hr("\\Larr","\\Leftarrow"),hr("\\lrarr","\\leftrightarrow"),hr("\\lrArr","\\Leftrightarrow"),hr("\\Lrarr","\\Leftrightarrow"),hr("\\Mu","\\mathrm{M}"),hr("\\natnums","\\mathbb{N}"),hr("\\Nu","\\mathrm{N}"),hr("\\Omicron","\\mathrm{O}"),hr("\\plusmn","\\pm"),hr("\\rarr","\\rightarrow"),hr("\\rArr","\\Rightarrow"),hr("\\Rarr","\\Rightarrow"),hr("\\real","\\Re"),hr("\\reals","\\mathbb{R}"),hr("\\Reals","\\mathbb{R}"),hr("\\Rho","\\mathrm{P}"),hr("\\sdot","\\cdot"),hr("\\sect","\\S"),hr("\\spades","\\spadesuit"),hr("\\sub","\\subset"),hr("\\sube","\\subseteq"),hr("\\supe","\\supseteq"),hr("\\Tau","\\mathrm{T}"),hr("\\thetasym","\\vartheta"),hr("\\weierp","\\wp"),hr("\\Zeta","\\mathrm{Z}"),hr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),hr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),hr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),hr("\\bra","\\mathinner{\\langle{#1}|}"),hr("\\ket","\\mathinner{|{#1}\\rangle}"),hr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),hr("\\Bra","\\left\\langle#1\\right|"),hr("\\Ket","\\left|#1\\right\\rangle"),hr("\\blue","\\textcolor{##6495ed}{#1}"),hr("\\orange","\\textcolor{##ffa500}{#1}"),hr("\\pink","\\textcolor{##ff00af}{#1}"),hr("\\red","\\textcolor{##df0030}{#1}"),hr("\\green","\\textcolor{##28ae7b}{#1}"),hr("\\gray","\\textcolor{gray}{#1}"),hr("\\purple","\\textcolor{##9d38bd}{#1}"),hr("\\blueA","\\textcolor{##ccfaff}{#1}"),hr("\\blueB","\\textcolor{##80f6ff}{#1}"),hr("\\blueC","\\textcolor{##63d9ea}{#1}"),hr("\\blueD","\\textcolor{##11accd}{#1}"),hr("\\blueE","\\textcolor{##0c7f99}{#1}"),hr("\\tealA","\\textcolor{##94fff5}{#1}"),hr("\\tealB","\\textcolor{##26edd5}{#1}"),hr("\\tealC","\\textcolor{##01d1c1}{#1}"),hr("\\tealD","\\textcolor{##01a995}{#1}"),hr("\\tealE","\\textcolor{##208170}{#1}"),hr("\\greenA","\\textcolor{##b6ffb0}{#1}"),hr("\\greenB","\\textcolor{##8af281}{#1}"),hr("\\greenC","\\textcolor{##74cf70}{#1}"),hr("\\greenD","\\textcolor{##1fab54}{#1}"),hr("\\greenE","\\textcolor{##0d923f}{#1}"),hr("\\goldA","\\textcolor{##ffd0a9}{#1}"),hr("\\goldB","\\textcolor{##ffbb71}{#1}"),hr("\\goldC","\\textcolor{##ff9c39}{#1}"),hr("\\goldD","\\textcolor{##e07d10}{#1}"),hr("\\goldE","\\textcolor{##a75a05}{#1}"),hr("\\redA","\\textcolor{##fca9a9}{#1}"),hr("\\redB","\\textcolor{##ff8482}{#1}"),hr("\\redC","\\textcolor{##f9685d}{#1}"),hr("\\redD","\\textcolor{##e84d39}{#1}"),hr("\\redE","\\textcolor{##bc2612}{#1}"),hr("\\maroonA","\\textcolor{##ffbde0}{#1}"),hr("\\maroonB","\\textcolor{##ff92c6}{#1}"),hr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),hr("\\maroonD","\\textcolor{##ca337c}{#1}"),hr("\\maroonE","\\textcolor{##9e034e}{#1}"),hr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),hr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),hr("\\purpleC","\\textcolor{##aa87ff}{#1}"),hr("\\purpleD","\\textcolor{##7854ab}{#1}"),hr("\\purpleE","\\textcolor{##543b78}{#1}"),hr("\\mintA","\\textcolor{##f5f9e8}{#1}"),hr("\\mintB","\\textcolor{##edf2df}{#1}"),hr("\\mintC","\\textcolor{##e0e5cc}{#1}"),hr("\\grayA","\\textcolor{##f6f7f7}{#1}"),hr("\\grayB","\\textcolor{##f0f1f2}{#1}"),hr("\\grayC","\\textcolor{##e3e5e6}{#1}"),hr("\\grayD","\\textcolor{##d6d8da}{#1}"),hr("\\grayE","\\textcolor{##babec2}{#1}"),hr("\\grayF","\\textcolor{##888d93}{#1}"),hr("\\grayG","\\textcolor{##626569}{#1}"),hr("\\grayH","\\textcolor{##3b3e40}{#1}"),hr("\\grayI","\\textcolor{##21242c}{#1}"),hr("\\kaBlue","\\textcolor{##314453}{#1}"),hr("\\kaGreen","\\textcolor{##71B307}{#1}");var br={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},vr=function(){function e(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new lr(dr,t.macros),this.mode=n,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new cr(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},t.consumeArgs=function(e){for(var t=[],n=0;n<e;++n){this.consumeSpaces();var r=this.popToken();if("{"===r.text){for(var o=[],i=1;0!==i;){var s=this.popToken();if(o.push(s),"{"===s.text)++i;else if("}"===s.text)--i;else if("EOF"===s.text)throw new a("End of input in macro argument",r)}o.pop(),o.reverse(),t[n]=o}else{if("EOF"===r.text)throw new a("End of input expecting macro argument");t[n]=[r]}}return t},t.expandOnce=function(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new a("Undefined control sequence: "+n);return this.pushToken(t),t}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting");var o=r.tokens;if(r.numArgs)for(var i=this.consumeArgs(r.numArgs),s=(o=o.slice()).length-1;s>=0;--s){var c=o[s];if("#"===c.text){if(0===s)throw new a("Incomplete placeholder at end of macro body",c);if("#"===(c=o[--s]).text)o.splice(s+1,1);else{if(!/^[1-9]$/.test(c.text))throw new a("Not a valid argument number",c);var l;(l=o).splice.apply(l,[s,2].concat(i[+c.text-1]))}}}return this.pushTokens(o),o},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof o){if("\\relax"!==e.text&&!e.treatAsRelax)return this.stack.pop();this.stack.pop()}}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new o(e)]):void 0},t.expandTokens=function(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;){var r=this.expandOnce(!0);r instanceof o&&(r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;var n="function"==typeof t?t(this):t;if("string"==typeof n){var r=0;if(-1!==n.indexOf("#"))for(var o=n.replace(/##/g,"");-1!==o.indexOf("#"+(r+1));)++r;for(var i=new cr(n,this.settings),a=[],s=i.lex();"EOF"!==s.text;)a.push(s),s=i.lex();return a.reverse(),{tokens:a,numArgs:r}}return n},t.isDefined=function(e){return this.macros.has(e)||ir.hasOwnProperty(e)||Y.math.hasOwnProperty(e)||Y.text.hasOwnProperty(e)||br.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:ir.hasOwnProperty(e)},e}(),yr={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"}},Er={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","č":"č","ĉ":"ĉ","ċ":"ċ","ď":"ď","ḋ":"ḋ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ĺ":"ĺ","ľ":"ľ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ď":"Ď","Ḋ":"Ḋ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ĺ":"Ĺ","Ľ":"Ľ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ť":"Ť","Ṫ":"Ṫ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},Sr=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new vr(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new a("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e},t.parseExpression=function(t,n){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var o=this.fetch();if(-1!==e.endOfExpression.indexOf(o.text))break;if(n&&o.text===n)break;if(t&&ir[o.text]&&ir[o.text].infix)break;var i=this.parseAtom(n);if(!i)break;"internal"!==i.type&&r.push(i)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)},t.handleInfixNodes=function(e){for(var t,n=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==n)throw new a("only one infix operator per group",e[r].token);n=r,t=e[r].replaceWith}if(-1!==n&&t){var o,i,s=e.slice(0,n),c=e.slice(n+1);return o=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},i=1===c.length&&"ordgroup"===c[0].type?c[0]:{type:"ordgroup",mode:this.mode,body:c},["\\\\abovefrac"===t?this.callFunction(t,[o,e[n],i],[]):this.callFunction(t,[o,i],[])]}return e},t.handleSupSubscript=function(t){var n=this.fetch(),r=n.text;this.consume();var o=this.parseGroup(t,!1,e.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!o)throw new a("Expected group after '"+r+"'",n);return o},t.formatUnsupportedCmd=function(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}},t.parseAtom=function(e){var t,n,r=this.parseGroup("atom",!1,null,e);if("text"===this.mode)return r;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(r&&"op"===r.type){var i="\\limits"===o.text;r.limits=i,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type||!r.alwaysHandleSupSub)throw new a("Limit controls must follow a math operator",o);var s="\\limits"===o.text;r.limits=s}this.consume()}else if("^"===o.text){if(t)throw new a("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(n)throw new a("Double subscript",o);n=this.handleSupSubscript("subscript")}else{if("'"!==o.text)break;if(t)throw new a("Double superscript",o);var c={type:"textord",mode:this.mode,text:"\\prime"},l=[c];for(this.consume();"'"===this.fetch().text;)l.push(c),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:l}}}return t||n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:r},t.parseFunction=function(e,t,n){var r=this.fetch(),o=r.text,i=ir[o];if(!i)return null;if(this.consume(),null!=n&&i.greediness<=n)throw new a("Got function '"+o+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!i.allowedInText)throw new a("Can't use function '"+o+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new a("Can't use function '"+o+"' in math mode",r);var s=this.parseArguments(o,i),c=s.args,l=s.optArgs;return this.callFunction(o,c,l,r,e)},t.callFunction=function(e,t,n,r,o){var i={funcName:e,parser:this,token:r,breakOnTokenText:o},s=ir[e];if(s&&s.handler)return s.handler(i,t,n);throw new a("No function handler for "+e)},t.parseArguments=function(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var r=t.greediness,o=[],i=[],s=0;s<n;s++){var c=t.argTypes&&t.argTypes[s],l=s<t.numOptionalArgs,u=s>0&&!l||0===s&&!l&&"math"===this.mode,d=this.parseGroupOfType("argument to '"+e+"'",c,l,r,u);if(!d){if(l){i.push(null);continue}throw new a("Expected group after '"+e+"'",this.fetch())}(l?i:o).push(d)}return{args:o,optArgs:i}},t.parseGroupOfType=function(e,t,n,r,o){switch(t){case"color":return o&&this.consumeSpaces(),this.parseColorGroup(n);case"size":return o&&this.consumeSpaces(),this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n,o);case"math":case"text":return this.parseGroup(e,n,r,void 0,t,o);case"hbox":var i=this.parseGroup(e,n,r,void 0,"text",o);return i?{type:"styling",mode:i.mode,body:[i],style:"text"}:i;case"raw":if(o&&this.consumeSpaces(),n&&"{"===this.fetch().text)return null;var s=this.parseStringGroup("raw",n,!0);if(s)return{type:"raw",mode:"text",string:s.text};throw new a("Expected raw group",this.fetch());case"original":case null:case void 0:return this.parseGroup(e,n,r,void 0,void 0,o);default:throw new a("Unknown group type as "+e,this.fetch())}},t.consumeSpaces=function(){for(;" "===this.fetch().text;)this.consume()},t.parseStringGroup=function(e,t,n){var r=t?"[":"{",o=t?"]":"}",i=this.fetch();if(i.text!==r){if(t)return null;if(n&&"EOF"!==i.text&&/[^{}[\]]/.test(i.text))return this.consume(),i}var s=this.mode;this.mode="text",this.expect(r);for(var c,l="",u=this.fetch(),d=0,h=u;(c=this.fetch()).text!==o||n&&d>0;){switch(c.text){case"EOF":throw new a("Unexpected end of input in "+e,u.range(h,l));case r:d++;break;case o:d--}l+=(h=c).text,this.consume()}return this.expect(o),this.mode=s,u.range(h,l)},t.parseRegexGroup=function(e,t){var n=this.mode;this.mode="text";for(var r,o=this.fetch(),i=o,s="";"EOF"!==(r=this.fetch()).text&&e.test(s+r.text);)s+=(i=r).text,this.consume();if(""===s)throw new a("Invalid "+t+": '"+o.text+"'",o);return this.mode=n,o.range(i,s)},t.parseColorGroup=function(e){var t=this.parseStringGroup("color",e);if(!t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new a("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}},t.parseSizeGroup=function(e){var t,n=!1;if(!(t=e||"{"===this.fetch().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new a("Invalid size: '"+t.text+"'",t);var o={number:+(r[1]+r[2]),unit:r[3]};if(!xe(o))throw new a("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:n}},t.parseUrlGroup=function(e,t){this.gullet.lexer.setCatcode("%",13);var n=this.parseStringGroup("url",e,!0);if(this.gullet.lexer.setCatcode("%",14),!n)return null;var r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}},t.parseGroup=function(t,n,o,i,s,c){var l=this.mode;s&&this.switchMode(s),c&&this.consumeSpaces();var u,d=this.fetch(),h=d.text;if(n?"["===h:"{"===h||"\\begingroup"===h){this.consume();var p=e.endOfGroup[h];this.gullet.beginGroup();var m=this.parseExpression(!1,p),g=this.fetch();this.expect(p),this.gullet.endGroup(),u={type:"ordgroup",mode:this.mode,loc:r.range(d,g),body:m,semisimple:"\\begingroup"===h||void 0}}else if(n)u=null;else if(null==(u=this.parseFunction(i,t,o)||this.parseSymbol())&&"\\"===h[0]&&!br.hasOwnProperty(h)){if(this.settings.throwOnError)throw new a("Undefined control sequence: "+h,d);u=this.formatUnsupportedCmd(h),this.consume()}return s&&this.switchMode(l),u},t.formLigatures=function(e){for(var t=e.length-1,n=0;n<t;++n){var o=e[n],i=o.text;"-"===i&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:r.range(o,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:r.range(o,e[n+1]),text:"--"}),t-=1)),"'"!==i&&"`"!==i||e[n+1].text!==i||(e.splice(n,2,{type:"textord",mode:"text",loc:r.range(o,e[n+1]),text:i+i}),t-=1)}},t.parseSymbol=function(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),o="*"===n.charAt(0);if(o&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new a("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:o}}Er.hasOwnProperty(t[0])&&!Y[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Er[t[0]]+t.substr(1));var i,s=sr.exec(t);if(s&&("i"===(t=t.substring(0,s.index))?t="ı":"j"===t&&(t="ȷ")),Y[this.mode][t]){this.settings.strict&&"math"===this.mode&&"ÇÐÞçþ".indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var c,l=Y[this.mode][t].group,u=r.range(e);if(z.hasOwnProperty(l)){var d=l;c={type:"atom",mode:this.mode,family:d,loc:u,text:t}}else c={type:l,mode:this.mode,loc:u,text:t};i=c}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(C(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:r.range(e),text:t}}if(this.consume(),s)for(var h=0;h<s[0].length;h++){var p=s[0][h];if(!yr[p])throw new a("Unknown accent ' "+p+"'",e);var m=yr[p][this.mode];if(!m)throw new a("Accent "+p+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:r.range(e),label:m,isStretchy:!1,isShifty:!0,base:i}}return i},e}();Sr.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Sr.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Sr.SUPSUB_GREEDINESS=1;var wr=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Sr(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new a("\\tag works only in display equations");n.gullet.feed("\\df@tag"),r=[{type:"tag",mode:"text",body:r,tag:n.parse()}]}return r},Cr=function(e,t,n){t.textContent="";var r=xr(e,n).toNode();t.appendChild(r)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Cr=function(){throw new a("KaTeX doesn't work in quirks mode.")});var Tr=function(e,t,n){if(n.throwOnError||!(e instanceof a))throw e;var r=je.makeSpan(["katex-error"],[new M(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},xr=function(e,t){var n=new h(t);try{var r=wr(e,n);return St(r,e,n)}catch(t){return Tr(t,e,n)}},kr={version:"0.12.0",render:Cr,renderToString:function(e,t){return xr(e,t).toMarkup()},ParseError:a,__parse:function(e,t){var n=new h(t);return wr(e,n)},__renderToDomTree:xr,__renderToHTMLTree:function(e,t){var n=new h(t);try{return function(e,t,n){var r=ct(e,yt(n)),o=je.makeSpan(["katex"],[r]);return Et(o,n)}(wr(e,n),0,n)}catch(t){return Tr(t,e,n)}},__setFontMetrics:function(e,t){B[e]=t},__defineSymbol:$,__defineMacro:hr,__domTree:{Span:D,Anchor:I,SymbolNode:M,SvgNode:P,PathNode:L,LineNode:j}};t.default=kr}]).default},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(408),o={"<":"<",">":">",""":'"',"&apos":"'","&":"&","<":"<",">":">",""":'"',"'":"'","&":"&"},i={60:"lt",62:"gt",34:"quot",39:"apos",38:"amp"},a={"<":"<",">":">",'"':""","'":"'","&":"&"},s=function(){function e(){}return e.prototype.encode=function(e){return e&&e.length?e.replace(/[<>"'&]/g,(function(e){return a[e]})):""},e.encode=function(t){return(new e).encode(t)},e.prototype.decode=function(e){return e&&e.length?e.replace(/&#?[0-9a-zA-Z]+;?/g,(function(e){if("#"===e.charAt(1)){var t="x"===e.charAt(2).toLowerCase()?parseInt(e.substr(3),16):parseInt(e.substr(2));return!isNaN(t)||t>=-32768?t<=65535?String.fromCharCode(t):r.fromCodePoint(t):""}return o[e]||e})):""},e.decode=function(t){return(new e).decode(t)},e.prototype.encodeNonUTF=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",o=0;o<t;){var a=e.charCodeAt(o),s=i[a];s?(n+="&"+s+";",o++):(a<32||a>126?a>=r.highSurrogateFrom&&a<=r.highSurrogateTo?(n+="&#"+r.getCodePoint(e,o)+";",o++):n+="&#"+a+";":n+=e.charAt(o),o++)}return n},e.encodeNonUTF=function(t){return(new e).encodeNonUTF(t)},e.prototype.encodeNonASCII=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",o=0;o<t;){var i=e.charCodeAt(o);i<=255?n+=e[o++]:(i>=r.highSurrogateFrom&&i<=r.highSurrogateTo?(n+="&#"+r.getCodePoint(e,o)+";",o++):n+="&#"+i+";",o++)}return n},e.encodeNonASCII=function(t){return(new e).encodeNonASCII(t)},e}();t.XmlEntities=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(408),o=["apos","nbsp","iexcl","cent","pound","curren","yen","brvbar","sect","uml","copy","ordf","laquo","not","shy","reg","macr","deg","plusmn","sup2","sup3","acute","micro","para","middot","cedil","sup1","ordm","raquo","frac14","frac12","frac34","iquest","Agrave","Aacute","Acirc","Atilde","Auml","Aring","AElig","Ccedil","Egrave","Eacute","Ecirc","Euml","Igrave","Iacute","Icirc","Iuml","ETH","Ntilde","Ograve","Oacute","Ocirc","Otilde","Ouml","times","Oslash","Ugrave","Uacute","Ucirc","Uuml","Yacute","THORN","szlig","agrave","aacute","acirc","atilde","auml","aring","aelig","ccedil","egrave","eacute","ecirc","euml","igrave","iacute","icirc","iuml","eth","ntilde","ograve","oacute","ocirc","otilde","ouml","divide","oslash","ugrave","uacute","ucirc","uuml","yacute","thorn","yuml","quot","amp","lt","gt","OElig","oelig","Scaron","scaron","Yuml","circ","tilde","ensp","emsp","thinsp","zwnj","zwj","lrm","rlm","ndash","mdash","lsquo","rsquo","sbquo","ldquo","rdquo","bdquo","dagger","Dagger","permil","lsaquo","rsaquo","euro","fnof","Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","alpha","beta","gamma","delta","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigmaf","sigma","tau","upsilon","phi","chi","psi","omega","thetasym","upsih","piv","bull","hellip","prime","Prime","oline","frasl","weierp","image","real","trade","alefsym","larr","uarr","rarr","darr","harr","crarr","lArr","uArr","rArr","dArr","hArr","forall","part","exist","empty","nabla","isin","notin","ni","prod","sum","minus","lowast","radic","prop","infin","ang","and","or","cap","cup","int","there4","sim","cong","asymp","ne","equiv","le","ge","sub","sup","nsub","sube","supe","oplus","otimes","perp","sdot","lceil","rceil","lfloor","rfloor","lang","rang","loz","spades","clubs","hearts","diams"],i=[39,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,34,38,60,62,338,339,352,353,376,710,732,8194,8195,8201,8204,8205,8206,8207,8211,8212,8216,8217,8218,8220,8221,8222,8224,8225,8240,8249,8250,8364,402,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,977,978,982,8226,8230,8242,8243,8254,8260,8472,8465,8476,8482,8501,8592,8593,8594,8595,8596,8629,8656,8657,8658,8659,8660,8704,8706,8707,8709,8711,8712,8713,8715,8719,8721,8722,8727,8730,8733,8734,8736,8743,8744,8745,8746,8747,8756,8764,8773,8776,8800,8801,8804,8805,8834,8835,8836,8838,8839,8853,8855,8869,8901,8968,8969,8970,8971,9001,9002,9674,9824,9827,9829,9830],a={},s={};!function(){for(var e=0,t=o.length;e<t;){var n=o[e],r=i[e];a[n]=String.fromCharCode(r),s[r]=n,e++}}();var c=function(){function e(){}return e.prototype.decode=function(e){return e&&e.length?e.replace(/&(#?[\w\d]+);?/g,(function(e,t){var n;if("#"===t.charAt(0)){var o="x"===t.charAt(1).toLowerCase()?parseInt(t.substr(2),16):parseInt(t.substr(1));(!isNaN(o)||o>=-32768)&&(n=o<=65535?String.fromCharCode(o):r.fromCodePoint(o))}else n=a[t];return n||e})):""},e.decode=function(t){return(new e).decode(t)},e.prototype.encode=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",r=0;r<t;){var o=s[e.charCodeAt(r)];n+=o?"&"+o+";":e.charAt(r),r++}return n},e.encode=function(t){return(new e).encode(t)},e.prototype.encodeNonUTF=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",o=0;o<t;){var i=e.charCodeAt(o),a=s[i];a?n+="&"+a+";":i<32||i>126?i>=r.highSurrogateFrom&&i<=r.highSurrogateTo?(n+="&#"+r.getCodePoint(e,o)+";",o++):n+="&#"+i+";":n+=e.charAt(o),o++}return n},e.encodeNonUTF=function(t){return(new e).encodeNonUTF(t)},e.prototype.encodeNonASCII=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",o=0;o<t;){var i=e.charCodeAt(o);i<=255?n+=e[o++]:(i>=r.highSurrogateFrom&&i<=r.highSurrogateTo?(n+="&#"+r.getCodePoint(e,o)+";",o++):n+="&#"+i+";",o++)}return n},e.encodeNonASCII=function(t){return(new e).encodeNonASCII(t)},e}();t.Html4Entities=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(408),o=[["Aacute",[193]],["aacute",[225]],["Abreve",[258]],["abreve",[259]],["ac",[8766]],["acd",[8767]],["acE",[8766,819]],["Acirc",[194]],["acirc",[226]],["acute",[180]],["Acy",[1040]],["acy",[1072]],["AElig",[198]],["aelig",[230]],["af",[8289]],["Afr",[120068]],["afr",[120094]],["Agrave",[192]],["agrave",[224]],["alefsym",[8501]],["aleph",[8501]],["Alpha",[913]],["alpha",[945]],["Amacr",[256]],["amacr",[257]],["amalg",[10815]],["amp",[38]],["AMP",[38]],["andand",[10837]],["And",[10835]],["and",[8743]],["andd",[10844]],["andslope",[10840]],["andv",[10842]],["ang",[8736]],["ange",[10660]],["angle",[8736]],["angmsdaa",[10664]],["angmsdab",[10665]],["angmsdac",[10666]],["angmsdad",[10667]],["angmsdae",[10668]],["angmsdaf",[10669]],["angmsdag",[10670]],["angmsdah",[10671]],["angmsd",[8737]],["angrt",[8735]],["angrtvb",[8894]],["angrtvbd",[10653]],["angsph",[8738]],["angst",[197]],["angzarr",[9084]],["Aogon",[260]],["aogon",[261]],["Aopf",[120120]],["aopf",[120146]],["apacir",[10863]],["ap",[8776]],["apE",[10864]],["ape",[8778]],["apid",[8779]],["apos",[39]],["ApplyFunction",[8289]],["approx",[8776]],["approxeq",[8778]],["Aring",[197]],["aring",[229]],["Ascr",[119964]],["ascr",[119990]],["Assign",[8788]],["ast",[42]],["asymp",[8776]],["asympeq",[8781]],["Atilde",[195]],["atilde",[227]],["Auml",[196]],["auml",[228]],["awconint",[8755]],["awint",[10769]],["backcong",[8780]],["backepsilon",[1014]],["backprime",[8245]],["backsim",[8765]],["backsimeq",[8909]],["Backslash",[8726]],["Barv",[10983]],["barvee",[8893]],["barwed",[8965]],["Barwed",[8966]],["barwedge",[8965]],["bbrk",[9141]],["bbrktbrk",[9142]],["bcong",[8780]],["Bcy",[1041]],["bcy",[1073]],["bdquo",[8222]],["becaus",[8757]],["because",[8757]],["Because",[8757]],["bemptyv",[10672]],["bepsi",[1014]],["bernou",[8492]],["Bernoullis",[8492]],["Beta",[914]],["beta",[946]],["beth",[8502]],["between",[8812]],["Bfr",[120069]],["bfr",[120095]],["bigcap",[8898]],["bigcirc",[9711]],["bigcup",[8899]],["bigodot",[10752]],["bigoplus",[10753]],["bigotimes",[10754]],["bigsqcup",[10758]],["bigstar",[9733]],["bigtriangledown",[9661]],["bigtriangleup",[9651]],["biguplus",[10756]],["bigvee",[8897]],["bigwedge",[8896]],["bkarow",[10509]],["blacklozenge",[10731]],["blacksquare",[9642]],["blacktriangle",[9652]],["blacktriangledown",[9662]],["blacktriangleleft",[9666]],["blacktriangleright",[9656]],["blank",[9251]],["blk12",[9618]],["blk14",[9617]],["blk34",[9619]],["block",[9608]],["bne",[61,8421]],["bnequiv",[8801,8421]],["bNot",[10989]],["bnot",[8976]],["Bopf",[120121]],["bopf",[120147]],["bot",[8869]],["bottom",[8869]],["bowtie",[8904]],["boxbox",[10697]],["boxdl",[9488]],["boxdL",[9557]],["boxDl",[9558]],["boxDL",[9559]],["boxdr",[9484]],["boxdR",[9554]],["boxDr",[9555]],["boxDR",[9556]],["boxh",[9472]],["boxH",[9552]],["boxhd",[9516]],["boxHd",[9572]],["boxhD",[9573]],["boxHD",[9574]],["boxhu",[9524]],["boxHu",[9575]],["boxhU",[9576]],["boxHU",[9577]],["boxminus",[8863]],["boxplus",[8862]],["boxtimes",[8864]],["boxul",[9496]],["boxuL",[9563]],["boxUl",[9564]],["boxUL",[9565]],["boxur",[9492]],["boxuR",[9560]],["boxUr",[9561]],["boxUR",[9562]],["boxv",[9474]],["boxV",[9553]],["boxvh",[9532]],["boxvH",[9578]],["boxVh",[9579]],["boxVH",[9580]],["boxvl",[9508]],["boxvL",[9569]],["boxVl",[9570]],["boxVL",[9571]],["boxvr",[9500]],["boxvR",[9566]],["boxVr",[9567]],["boxVR",[9568]],["bprime",[8245]],["breve",[728]],["Breve",[728]],["brvbar",[166]],["bscr",[119991]],["Bscr",[8492]],["bsemi",[8271]],["bsim",[8765]],["bsime",[8909]],["bsolb",[10693]],["bsol",[92]],["bsolhsub",[10184]],["bull",[8226]],["bullet",[8226]],["bump",[8782]],["bumpE",[10926]],["bumpe",[8783]],["Bumpeq",[8782]],["bumpeq",[8783]],["Cacute",[262]],["cacute",[263]],["capand",[10820]],["capbrcup",[10825]],["capcap",[10827]],["cap",[8745]],["Cap",[8914]],["capcup",[10823]],["capdot",[10816]],["CapitalDifferentialD",[8517]],["caps",[8745,65024]],["caret",[8257]],["caron",[711]],["Cayleys",[8493]],["ccaps",[10829]],["Ccaron",[268]],["ccaron",[269]],["Ccedil",[199]],["ccedil",[231]],["Ccirc",[264]],["ccirc",[265]],["Cconint",[8752]],["ccups",[10828]],["ccupssm",[10832]],["Cdot",[266]],["cdot",[267]],["cedil",[184]],["Cedilla",[184]],["cemptyv",[10674]],["cent",[162]],["centerdot",[183]],["CenterDot",[183]],["cfr",[120096]],["Cfr",[8493]],["CHcy",[1063]],["chcy",[1095]],["check",[10003]],["checkmark",[10003]],["Chi",[935]],["chi",[967]],["circ",[710]],["circeq",[8791]],["circlearrowleft",[8634]],["circlearrowright",[8635]],["circledast",[8859]],["circledcirc",[8858]],["circleddash",[8861]],["CircleDot",[8857]],["circledR",[174]],["circledS",[9416]],["CircleMinus",[8854]],["CirclePlus",[8853]],["CircleTimes",[8855]],["cir",[9675]],["cirE",[10691]],["cire",[8791]],["cirfnint",[10768]],["cirmid",[10991]],["cirscir",[10690]],["ClockwiseContourIntegral",[8754]],["clubs",[9827]],["clubsuit",[9827]],["colon",[58]],["Colon",[8759]],["Colone",[10868]],["colone",[8788]],["coloneq",[8788]],["comma",[44]],["commat",[64]],["comp",[8705]],["compfn",[8728]],["complement",[8705]],["complexes",[8450]],["cong",[8773]],["congdot",[10861]],["Congruent",[8801]],["conint",[8750]],["Conint",[8751]],["ContourIntegral",[8750]],["copf",[120148]],["Copf",[8450]],["coprod",[8720]],["Coproduct",[8720]],["copy",[169]],["COPY",[169]],["copysr",[8471]],["CounterClockwiseContourIntegral",[8755]],["crarr",[8629]],["cross",[10007]],["Cross",[10799]],["Cscr",[119966]],["cscr",[119992]],["csub",[10959]],["csube",[10961]],["csup",[10960]],["csupe",[10962]],["ctdot",[8943]],["cudarrl",[10552]],["cudarrr",[10549]],["cuepr",[8926]],["cuesc",[8927]],["cularr",[8630]],["cularrp",[10557]],["cupbrcap",[10824]],["cupcap",[10822]],["CupCap",[8781]],["cup",[8746]],["Cup",[8915]],["cupcup",[10826]],["cupdot",[8845]],["cupor",[10821]],["cups",[8746,65024]],["curarr",[8631]],["curarrm",[10556]],["curlyeqprec",[8926]],["curlyeqsucc",[8927]],["curlyvee",[8910]],["curlywedge",[8911]],["curren",[164]],["curvearrowleft",[8630]],["curvearrowright",[8631]],["cuvee",[8910]],["cuwed",[8911]],["cwconint",[8754]],["cwint",[8753]],["cylcty",[9005]],["dagger",[8224]],["Dagger",[8225]],["daleth",[8504]],["darr",[8595]],["Darr",[8609]],["dArr",[8659]],["dash",[8208]],["Dashv",[10980]],["dashv",[8867]],["dbkarow",[10511]],["dblac",[733]],["Dcaron",[270]],["dcaron",[271]],["Dcy",[1044]],["dcy",[1076]],["ddagger",[8225]],["ddarr",[8650]],["DD",[8517]],["dd",[8518]],["DDotrahd",[10513]],["ddotseq",[10871]],["deg",[176]],["Del",[8711]],["Delta",[916]],["delta",[948]],["demptyv",[10673]],["dfisht",[10623]],["Dfr",[120071]],["dfr",[120097]],["dHar",[10597]],["dharl",[8643]],["dharr",[8642]],["DiacriticalAcute",[180]],["DiacriticalDot",[729]],["DiacriticalDoubleAcute",[733]],["DiacriticalGrave",[96]],["DiacriticalTilde",[732]],["diam",[8900]],["diamond",[8900]],["Diamond",[8900]],["diamondsuit",[9830]],["diams",[9830]],["die",[168]],["DifferentialD",[8518]],["digamma",[989]],["disin",[8946]],["div",[247]],["divide",[247]],["divideontimes",[8903]],["divonx",[8903]],["DJcy",[1026]],["djcy",[1106]],["dlcorn",[8990]],["dlcrop",[8973]],["dollar",[36]],["Dopf",[120123]],["dopf",[120149]],["Dot",[168]],["dot",[729]],["DotDot",[8412]],["doteq",[8784]],["doteqdot",[8785]],["DotEqual",[8784]],["dotminus",[8760]],["dotplus",[8724]],["dotsquare",[8865]],["doublebarwedge",[8966]],["DoubleContourIntegral",[8751]],["DoubleDot",[168]],["DoubleDownArrow",[8659]],["DoubleLeftArrow",[8656]],["DoubleLeftRightArrow",[8660]],["DoubleLeftTee",[10980]],["DoubleLongLeftArrow",[10232]],["DoubleLongLeftRightArrow",[10234]],["DoubleLongRightArrow",[10233]],["DoubleRightArrow",[8658]],["DoubleRightTee",[8872]],["DoubleUpArrow",[8657]],["DoubleUpDownArrow",[8661]],["DoubleVerticalBar",[8741]],["DownArrowBar",[10515]],["downarrow",[8595]],["DownArrow",[8595]],["Downarrow",[8659]],["DownArrowUpArrow",[8693]],["DownBreve",[785]],["downdownarrows",[8650]],["downharpoonleft",[8643]],["downharpoonright",[8642]],["DownLeftRightVector",[10576]],["DownLeftTeeVector",[10590]],["DownLeftVectorBar",[10582]],["DownLeftVector",[8637]],["DownRightTeeVector",[10591]],["DownRightVectorBar",[10583]],["DownRightVector",[8641]],["DownTeeArrow",[8615]],["DownTee",[8868]],["drbkarow",[10512]],["drcorn",[8991]],["drcrop",[8972]],["Dscr",[119967]],["dscr",[119993]],["DScy",[1029]],["dscy",[1109]],["dsol",[10742]],["Dstrok",[272]],["dstrok",[273]],["dtdot",[8945]],["dtri",[9663]],["dtrif",[9662]],["duarr",[8693]],["duhar",[10607]],["dwangle",[10662]],["DZcy",[1039]],["dzcy",[1119]],["dzigrarr",[10239]],["Eacute",[201]],["eacute",[233]],["easter",[10862]],["Ecaron",[282]],["ecaron",[283]],["Ecirc",[202]],["ecirc",[234]],["ecir",[8790]],["ecolon",[8789]],["Ecy",[1069]],["ecy",[1101]],["eDDot",[10871]],["Edot",[278]],["edot",[279]],["eDot",[8785]],["ee",[8519]],["efDot",[8786]],["Efr",[120072]],["efr",[120098]],["eg",[10906]],["Egrave",[200]],["egrave",[232]],["egs",[10902]],["egsdot",[10904]],["el",[10905]],["Element",[8712]],["elinters",[9191]],["ell",[8467]],["els",[10901]],["elsdot",[10903]],["Emacr",[274]],["emacr",[275]],["empty",[8709]],["emptyset",[8709]],["EmptySmallSquare",[9723]],["emptyv",[8709]],["EmptyVerySmallSquare",[9643]],["emsp13",[8196]],["emsp14",[8197]],["emsp",[8195]],["ENG",[330]],["eng",[331]],["ensp",[8194]],["Eogon",[280]],["eogon",[281]],["Eopf",[120124]],["eopf",[120150]],["epar",[8917]],["eparsl",[10723]],["eplus",[10865]],["epsi",[949]],["Epsilon",[917]],["epsilon",[949]],["epsiv",[1013]],["eqcirc",[8790]],["eqcolon",[8789]],["eqsim",[8770]],["eqslantgtr",[10902]],["eqslantless",[10901]],["Equal",[10869]],["equals",[61]],["EqualTilde",[8770]],["equest",[8799]],["Equilibrium",[8652]],["equiv",[8801]],["equivDD",[10872]],["eqvparsl",[10725]],["erarr",[10609]],["erDot",[8787]],["escr",[8495]],["Escr",[8496]],["esdot",[8784]],["Esim",[10867]],["esim",[8770]],["Eta",[919]],["eta",[951]],["ETH",[208]],["eth",[240]],["Euml",[203]],["euml",[235]],["euro",[8364]],["excl",[33]],["exist",[8707]],["Exists",[8707]],["expectation",[8496]],["exponentiale",[8519]],["ExponentialE",[8519]],["fallingdotseq",[8786]],["Fcy",[1060]],["fcy",[1092]],["female",[9792]],["ffilig",[64259]],["fflig",[64256]],["ffllig",[64260]],["Ffr",[120073]],["ffr",[120099]],["filig",[64257]],["FilledSmallSquare",[9724]],["FilledVerySmallSquare",[9642]],["fjlig",[102,106]],["flat",[9837]],["fllig",[64258]],["fltns",[9649]],["fnof",[402]],["Fopf",[120125]],["fopf",[120151]],["forall",[8704]],["ForAll",[8704]],["fork",[8916]],["forkv",[10969]],["Fouriertrf",[8497]],["fpartint",[10765]],["frac12",[189]],["frac13",[8531]],["frac14",[188]],["frac15",[8533]],["frac16",[8537]],["frac18",[8539]],["frac23",[8532]],["frac25",[8534]],["frac34",[190]],["frac35",[8535]],["frac38",[8540]],["frac45",[8536]],["frac56",[8538]],["frac58",[8541]],["frac78",[8542]],["frasl",[8260]],["frown",[8994]],["fscr",[119995]],["Fscr",[8497]],["gacute",[501]],["Gamma",[915]],["gamma",[947]],["Gammad",[988]],["gammad",[989]],["gap",[10886]],["Gbreve",[286]],["gbreve",[287]],["Gcedil",[290]],["Gcirc",[284]],["gcirc",[285]],["Gcy",[1043]],["gcy",[1075]],["Gdot",[288]],["gdot",[289]],["ge",[8805]],["gE",[8807]],["gEl",[10892]],["gel",[8923]],["geq",[8805]],["geqq",[8807]],["geqslant",[10878]],["gescc",[10921]],["ges",[10878]],["gesdot",[10880]],["gesdoto",[10882]],["gesdotol",[10884]],["gesl",[8923,65024]],["gesles",[10900]],["Gfr",[120074]],["gfr",[120100]],["gg",[8811]],["Gg",[8921]],["ggg",[8921]],["gimel",[8503]],["GJcy",[1027]],["gjcy",[1107]],["gla",[10917]],["gl",[8823]],["glE",[10898]],["glj",[10916]],["gnap",[10890]],["gnapprox",[10890]],["gne",[10888]],["gnE",[8809]],["gneq",[10888]],["gneqq",[8809]],["gnsim",[8935]],["Gopf",[120126]],["gopf",[120152]],["grave",[96]],["GreaterEqual",[8805]],["GreaterEqualLess",[8923]],["GreaterFullEqual",[8807]],["GreaterGreater",[10914]],["GreaterLess",[8823]],["GreaterSlantEqual",[10878]],["GreaterTilde",[8819]],["Gscr",[119970]],["gscr",[8458]],["gsim",[8819]],["gsime",[10894]],["gsiml",[10896]],["gtcc",[10919]],["gtcir",[10874]],["gt",[62]],["GT",[62]],["Gt",[8811]],["gtdot",[8919]],["gtlPar",[10645]],["gtquest",[10876]],["gtrapprox",[10886]],["gtrarr",[10616]],["gtrdot",[8919]],["gtreqless",[8923]],["gtreqqless",[10892]],["gtrless",[8823]],["gtrsim",[8819]],["gvertneqq",[8809,65024]],["gvnE",[8809,65024]],["Hacek",[711]],["hairsp",[8202]],["half",[189]],["hamilt",[8459]],["HARDcy",[1066]],["hardcy",[1098]],["harrcir",[10568]],["harr",[8596]],["hArr",[8660]],["harrw",[8621]],["Hat",[94]],["hbar",[8463]],["Hcirc",[292]],["hcirc",[293]],["hearts",[9829]],["heartsuit",[9829]],["hellip",[8230]],["hercon",[8889]],["hfr",[120101]],["Hfr",[8460]],["HilbertSpace",[8459]],["hksearow",[10533]],["hkswarow",[10534]],["hoarr",[8703]],["homtht",[8763]],["hookleftarrow",[8617]],["hookrightarrow",[8618]],["hopf",[120153]],["Hopf",[8461]],["horbar",[8213]],["HorizontalLine",[9472]],["hscr",[119997]],["Hscr",[8459]],["hslash",[8463]],["Hstrok",[294]],["hstrok",[295]],["HumpDownHump",[8782]],["HumpEqual",[8783]],["hybull",[8259]],["hyphen",[8208]],["Iacute",[205]],["iacute",[237]],["ic",[8291]],["Icirc",[206]],["icirc",[238]],["Icy",[1048]],["icy",[1080]],["Idot",[304]],["IEcy",[1045]],["iecy",[1077]],["iexcl",[161]],["iff",[8660]],["ifr",[120102]],["Ifr",[8465]],["Igrave",[204]],["igrave",[236]],["ii",[8520]],["iiiint",[10764]],["iiint",[8749]],["iinfin",[10716]],["iiota",[8489]],["IJlig",[306]],["ijlig",[307]],["Imacr",[298]],["imacr",[299]],["image",[8465]],["ImaginaryI",[8520]],["imagline",[8464]],["imagpart",[8465]],["imath",[305]],["Im",[8465]],["imof",[8887]],["imped",[437]],["Implies",[8658]],["incare",[8453]],["in",[8712]],["infin",[8734]],["infintie",[10717]],["inodot",[305]],["intcal",[8890]],["int",[8747]],["Int",[8748]],["integers",[8484]],["Integral",[8747]],["intercal",[8890]],["Intersection",[8898]],["intlarhk",[10775]],["intprod",[10812]],["InvisibleComma",[8291]],["InvisibleTimes",[8290]],["IOcy",[1025]],["iocy",[1105]],["Iogon",[302]],["iogon",[303]],["Iopf",[120128]],["iopf",[120154]],["Iota",[921]],["iota",[953]],["iprod",[10812]],["iquest",[191]],["iscr",[119998]],["Iscr",[8464]],["isin",[8712]],["isindot",[8949]],["isinE",[8953]],["isins",[8948]],["isinsv",[8947]],["isinv",[8712]],["it",[8290]],["Itilde",[296]],["itilde",[297]],["Iukcy",[1030]],["iukcy",[1110]],["Iuml",[207]],["iuml",[239]],["Jcirc",[308]],["jcirc",[309]],["Jcy",[1049]],["jcy",[1081]],["Jfr",[120077]],["jfr",[120103]],["jmath",[567]],["Jopf",[120129]],["jopf",[120155]],["Jscr",[119973]],["jscr",[119999]],["Jsercy",[1032]],["jsercy",[1112]],["Jukcy",[1028]],["jukcy",[1108]],["Kappa",[922]],["kappa",[954]],["kappav",[1008]],["Kcedil",[310]],["kcedil",[311]],["Kcy",[1050]],["kcy",[1082]],["Kfr",[120078]],["kfr",[120104]],["kgreen",[312]],["KHcy",[1061]],["khcy",[1093]],["KJcy",[1036]],["kjcy",[1116]],["Kopf",[120130]],["kopf",[120156]],["Kscr",[119974]],["kscr",[12e4]],["lAarr",[8666]],["Lacute",[313]],["lacute",[314]],["laemptyv",[10676]],["lagran",[8466]],["Lambda",[923]],["lambda",[955]],["lang",[10216]],["Lang",[10218]],["langd",[10641]],["langle",[10216]],["lap",[10885]],["Laplacetrf",[8466]],["laquo",[171]],["larrb",[8676]],["larrbfs",[10527]],["larr",[8592]],["Larr",[8606]],["lArr",[8656]],["larrfs",[10525]],["larrhk",[8617]],["larrlp",[8619]],["larrpl",[10553]],["larrsim",[10611]],["larrtl",[8610]],["latail",[10521]],["lAtail",[10523]],["lat",[10923]],["late",[10925]],["lates",[10925,65024]],["lbarr",[10508]],["lBarr",[10510]],["lbbrk",[10098]],["lbrace",[123]],["lbrack",[91]],["lbrke",[10635]],["lbrksld",[10639]],["lbrkslu",[10637]],["Lcaron",[317]],["lcaron",[318]],["Lcedil",[315]],["lcedil",[316]],["lceil",[8968]],["lcub",[123]],["Lcy",[1051]],["lcy",[1083]],["ldca",[10550]],["ldquo",[8220]],["ldquor",[8222]],["ldrdhar",[10599]],["ldrushar",[10571]],["ldsh",[8626]],["le",[8804]],["lE",[8806]],["LeftAngleBracket",[10216]],["LeftArrowBar",[8676]],["leftarrow",[8592]],["LeftArrow",[8592]],["Leftarrow",[8656]],["LeftArrowRightArrow",[8646]],["leftarrowtail",[8610]],["LeftCeiling",[8968]],["LeftDoubleBracket",[10214]],["LeftDownTeeVector",[10593]],["LeftDownVectorBar",[10585]],["LeftDownVector",[8643]],["LeftFloor",[8970]],["leftharpoondown",[8637]],["leftharpoonup",[8636]],["leftleftarrows",[8647]],["leftrightarrow",[8596]],["LeftRightArrow",[8596]],["Leftrightarrow",[8660]],["leftrightarrows",[8646]],["leftrightharpoons",[8651]],["leftrightsquigarrow",[8621]],["LeftRightVector",[10574]],["LeftTeeArrow",[8612]],["LeftTee",[8867]],["LeftTeeVector",[10586]],["leftthreetimes",[8907]],["LeftTriangleBar",[10703]],["LeftTriangle",[8882]],["LeftTriangleEqual",[8884]],["LeftUpDownVector",[10577]],["LeftUpTeeVector",[10592]],["LeftUpVectorBar",[10584]],["LeftUpVector",[8639]],["LeftVectorBar",[10578]],["LeftVector",[8636]],["lEg",[10891]],["leg",[8922]],["leq",[8804]],["leqq",[8806]],["leqslant",[10877]],["lescc",[10920]],["les",[10877]],["lesdot",[10879]],["lesdoto",[10881]],["lesdotor",[10883]],["lesg",[8922,65024]],["lesges",[10899]],["lessapprox",[10885]],["lessdot",[8918]],["lesseqgtr",[8922]],["lesseqqgtr",[10891]],["LessEqualGreater",[8922]],["LessFullEqual",[8806]],["LessGreater",[8822]],["lessgtr",[8822]],["LessLess",[10913]],["lesssim",[8818]],["LessSlantEqual",[10877]],["LessTilde",[8818]],["lfisht",[10620]],["lfloor",[8970]],["Lfr",[120079]],["lfr",[120105]],["lg",[8822]],["lgE",[10897]],["lHar",[10594]],["lhard",[8637]],["lharu",[8636]],["lharul",[10602]],["lhblk",[9604]],["LJcy",[1033]],["ljcy",[1113]],["llarr",[8647]],["ll",[8810]],["Ll",[8920]],["llcorner",[8990]],["Lleftarrow",[8666]],["llhard",[10603]],["lltri",[9722]],["Lmidot",[319]],["lmidot",[320]],["lmoustache",[9136]],["lmoust",[9136]],["lnap",[10889]],["lnapprox",[10889]],["lne",[10887]],["lnE",[8808]],["lneq",[10887]],["lneqq",[8808]],["lnsim",[8934]],["loang",[10220]],["loarr",[8701]],["lobrk",[10214]],["longleftarrow",[10229]],["LongLeftArrow",[10229]],["Longleftarrow",[10232]],["longleftrightarrow",[10231]],["LongLeftRightArrow",[10231]],["Longleftrightarrow",[10234]],["longmapsto",[10236]],["longrightarrow",[10230]],["LongRightArrow",[10230]],["Longrightarrow",[10233]],["looparrowleft",[8619]],["looparrowright",[8620]],["lopar",[10629]],["Lopf",[120131]],["lopf",[120157]],["loplus",[10797]],["lotimes",[10804]],["lowast",[8727]],["lowbar",[95]],["LowerLeftArrow",[8601]],["LowerRightArrow",[8600]],["loz",[9674]],["lozenge",[9674]],["lozf",[10731]],["lpar",[40]],["lparlt",[10643]],["lrarr",[8646]],["lrcorner",[8991]],["lrhar",[8651]],["lrhard",[10605]],["lrm",[8206]],["lrtri",[8895]],["lsaquo",[8249]],["lscr",[120001]],["Lscr",[8466]],["lsh",[8624]],["Lsh",[8624]],["lsim",[8818]],["lsime",[10893]],["lsimg",[10895]],["lsqb",[91]],["lsquo",[8216]],["lsquor",[8218]],["Lstrok",[321]],["lstrok",[322]],["ltcc",[10918]],["ltcir",[10873]],["lt",[60]],["LT",[60]],["Lt",[8810]],["ltdot",[8918]],["lthree",[8907]],["ltimes",[8905]],["ltlarr",[10614]],["ltquest",[10875]],["ltri",[9667]],["ltrie",[8884]],["ltrif",[9666]],["ltrPar",[10646]],["lurdshar",[10570]],["luruhar",[10598]],["lvertneqq",[8808,65024]],["lvnE",[8808,65024]],["macr",[175]],["male",[9794]],["malt",[10016]],["maltese",[10016]],["Map",[10501]],["map",[8614]],["mapsto",[8614]],["mapstodown",[8615]],["mapstoleft",[8612]],["mapstoup",[8613]],["marker",[9646]],["mcomma",[10793]],["Mcy",[1052]],["mcy",[1084]],["mdash",[8212]],["mDDot",[8762]],["measuredangle",[8737]],["MediumSpace",[8287]],["Mellintrf",[8499]],["Mfr",[120080]],["mfr",[120106]],["mho",[8487]],["micro",[181]],["midast",[42]],["midcir",[10992]],["mid",[8739]],["middot",[183]],["minusb",[8863]],["minus",[8722]],["minusd",[8760]],["minusdu",[10794]],["MinusPlus",[8723]],["mlcp",[10971]],["mldr",[8230]],["mnplus",[8723]],["models",[8871]],["Mopf",[120132]],["mopf",[120158]],["mp",[8723]],["mscr",[120002]],["Mscr",[8499]],["mstpos",[8766]],["Mu",[924]],["mu",[956]],["multimap",[8888]],["mumap",[8888]],["nabla",[8711]],["Nacute",[323]],["nacute",[324]],["nang",[8736,8402]],["nap",[8777]],["napE",[10864,824]],["napid",[8779,824]],["napos",[329]],["napprox",[8777]],["natural",[9838]],["naturals",[8469]],["natur",[9838]],["nbsp",[160]],["nbump",[8782,824]],["nbumpe",[8783,824]],["ncap",[10819]],["Ncaron",[327]],["ncaron",[328]],["Ncedil",[325]],["ncedil",[326]],["ncong",[8775]],["ncongdot",[10861,824]],["ncup",[10818]],["Ncy",[1053]],["ncy",[1085]],["ndash",[8211]],["nearhk",[10532]],["nearr",[8599]],["neArr",[8663]],["nearrow",[8599]],["ne",[8800]],["nedot",[8784,824]],["NegativeMediumSpace",[8203]],["NegativeThickSpace",[8203]],["NegativeThinSpace",[8203]],["NegativeVeryThinSpace",[8203]],["nequiv",[8802]],["nesear",[10536]],["nesim",[8770,824]],["NestedGreaterGreater",[8811]],["NestedLessLess",[8810]],["nexist",[8708]],["nexists",[8708]],["Nfr",[120081]],["nfr",[120107]],["ngE",[8807,824]],["nge",[8817]],["ngeq",[8817]],["ngeqq",[8807,824]],["ngeqslant",[10878,824]],["nges",[10878,824]],["nGg",[8921,824]],["ngsim",[8821]],["nGt",[8811,8402]],["ngt",[8815]],["ngtr",[8815]],["nGtv",[8811,824]],["nharr",[8622]],["nhArr",[8654]],["nhpar",[10994]],["ni",[8715]],["nis",[8956]],["nisd",[8954]],["niv",[8715]],["NJcy",[1034]],["njcy",[1114]],["nlarr",[8602]],["nlArr",[8653]],["nldr",[8229]],["nlE",[8806,824]],["nle",[8816]],["nleftarrow",[8602]],["nLeftarrow",[8653]],["nleftrightarrow",[8622]],["nLeftrightarrow",[8654]],["nleq",[8816]],["nleqq",[8806,824]],["nleqslant",[10877,824]],["nles",[10877,824]],["nless",[8814]],["nLl",[8920,824]],["nlsim",[8820]],["nLt",[8810,8402]],["nlt",[8814]],["nltri",[8938]],["nltrie",[8940]],["nLtv",[8810,824]],["nmid",[8740]],["NoBreak",[8288]],["NonBreakingSpace",[160]],["nopf",[120159]],["Nopf",[8469]],["Not",[10988]],["not",[172]],["NotCongruent",[8802]],["NotCupCap",[8813]],["NotDoubleVerticalBar",[8742]],["NotElement",[8713]],["NotEqual",[8800]],["NotEqualTilde",[8770,824]],["NotExists",[8708]],["NotGreater",[8815]],["NotGreaterEqual",[8817]],["NotGreaterFullEqual",[8807,824]],["NotGreaterGreater",[8811,824]],["NotGreaterLess",[8825]],["NotGreaterSlantEqual",[10878,824]],["NotGreaterTilde",[8821]],["NotHumpDownHump",[8782,824]],["NotHumpEqual",[8783,824]],["notin",[8713]],["notindot",[8949,824]],["notinE",[8953,824]],["notinva",[8713]],["notinvb",[8951]],["notinvc",[8950]],["NotLeftTriangleBar",[10703,824]],["NotLeftTriangle",[8938]],["NotLeftTriangleEqual",[8940]],["NotLess",[8814]],["NotLessEqual",[8816]],["NotLessGreater",[8824]],["NotLessLess",[8810,824]],["NotLessSlantEqual",[10877,824]],["NotLessTilde",[8820]],["NotNestedGreaterGreater",[10914,824]],["NotNestedLessLess",[10913,824]],["notni",[8716]],["notniva",[8716]],["notnivb",[8958]],["notnivc",[8957]],["NotPrecedes",[8832]],["NotPrecedesEqual",[10927,824]],["NotPrecedesSlantEqual",[8928]],["NotReverseElement",[8716]],["NotRightTriangleBar",[10704,824]],["NotRightTriangle",[8939]],["NotRightTriangleEqual",[8941]],["NotSquareSubset",[8847,824]],["NotSquareSubsetEqual",[8930]],["NotSquareSuperset",[8848,824]],["NotSquareSupersetEqual",[8931]],["NotSubset",[8834,8402]],["NotSubsetEqual",[8840]],["NotSucceeds",[8833]],["NotSucceedsEqual",[10928,824]],["NotSucceedsSlantEqual",[8929]],["NotSucceedsTilde",[8831,824]],["NotSuperset",[8835,8402]],["NotSupersetEqual",[8841]],["NotTilde",[8769]],["NotTildeEqual",[8772]],["NotTildeFullEqual",[8775]],["NotTildeTilde",[8777]],["NotVerticalBar",[8740]],["nparallel",[8742]],["npar",[8742]],["nparsl",[11005,8421]],["npart",[8706,824]],["npolint",[10772]],["npr",[8832]],["nprcue",[8928]],["nprec",[8832]],["npreceq",[10927,824]],["npre",[10927,824]],["nrarrc",[10547,824]],["nrarr",[8603]],["nrArr",[8655]],["nrarrw",[8605,824]],["nrightarrow",[8603]],["nRightarrow",[8655]],["nrtri",[8939]],["nrtrie",[8941]],["nsc",[8833]],["nsccue",[8929]],["nsce",[10928,824]],["Nscr",[119977]],["nscr",[120003]],["nshortmid",[8740]],["nshortparallel",[8742]],["nsim",[8769]],["nsime",[8772]],["nsimeq",[8772]],["nsmid",[8740]],["nspar",[8742]],["nsqsube",[8930]],["nsqsupe",[8931]],["nsub",[8836]],["nsubE",[10949,824]],["nsube",[8840]],["nsubset",[8834,8402]],["nsubseteq",[8840]],["nsubseteqq",[10949,824]],["nsucc",[8833]],["nsucceq",[10928,824]],["nsup",[8837]],["nsupE",[10950,824]],["nsupe",[8841]],["nsupset",[8835,8402]],["nsupseteq",[8841]],["nsupseteqq",[10950,824]],["ntgl",[8825]],["Ntilde",[209]],["ntilde",[241]],["ntlg",[8824]],["ntriangleleft",[8938]],["ntrianglelefteq",[8940]],["ntriangleright",[8939]],["ntrianglerighteq",[8941]],["Nu",[925]],["nu",[957]],["num",[35]],["numero",[8470]],["numsp",[8199]],["nvap",[8781,8402]],["nvdash",[8876]],["nvDash",[8877]],["nVdash",[8878]],["nVDash",[8879]],["nvge",[8805,8402]],["nvgt",[62,8402]],["nvHarr",[10500]],["nvinfin",[10718]],["nvlArr",[10498]],["nvle",[8804,8402]],["nvlt",[60,8402]],["nvltrie",[8884,8402]],["nvrArr",[10499]],["nvrtrie",[8885,8402]],["nvsim",[8764,8402]],["nwarhk",[10531]],["nwarr",[8598]],["nwArr",[8662]],["nwarrow",[8598]],["nwnear",[10535]],["Oacute",[211]],["oacute",[243]],["oast",[8859]],["Ocirc",[212]],["ocirc",[244]],["ocir",[8858]],["Ocy",[1054]],["ocy",[1086]],["odash",[8861]],["Odblac",[336]],["odblac",[337]],["odiv",[10808]],["odot",[8857]],["odsold",[10684]],["OElig",[338]],["oelig",[339]],["ofcir",[10687]],["Ofr",[120082]],["ofr",[120108]],["ogon",[731]],["Ograve",[210]],["ograve",[242]],["ogt",[10689]],["ohbar",[10677]],["ohm",[937]],["oint",[8750]],["olarr",[8634]],["olcir",[10686]],["olcross",[10683]],["oline",[8254]],["olt",[10688]],["Omacr",[332]],["omacr",[333]],["Omega",[937]],["omega",[969]],["Omicron",[927]],["omicron",[959]],["omid",[10678]],["ominus",[8854]],["Oopf",[120134]],["oopf",[120160]],["opar",[10679]],["OpenCurlyDoubleQuote",[8220]],["OpenCurlyQuote",[8216]],["operp",[10681]],["oplus",[8853]],["orarr",[8635]],["Or",[10836]],["or",[8744]],["ord",[10845]],["order",[8500]],["orderof",[8500]],["ordf",[170]],["ordm",[186]],["origof",[8886]],["oror",[10838]],["orslope",[10839]],["orv",[10843]],["oS",[9416]],["Oscr",[119978]],["oscr",[8500]],["Oslash",[216]],["oslash",[248]],["osol",[8856]],["Otilde",[213]],["otilde",[245]],["otimesas",[10806]],["Otimes",[10807]],["otimes",[8855]],["Ouml",[214]],["ouml",[246]],["ovbar",[9021]],["OverBar",[8254]],["OverBrace",[9182]],["OverBracket",[9140]],["OverParenthesis",[9180]],["para",[182]],["parallel",[8741]],["par",[8741]],["parsim",[10995]],["parsl",[11005]],["part",[8706]],["PartialD",[8706]],["Pcy",[1055]],["pcy",[1087]],["percnt",[37]],["period",[46]],["permil",[8240]],["perp",[8869]],["pertenk",[8241]],["Pfr",[120083]],["pfr",[120109]],["Phi",[934]],["phi",[966]],["phiv",[981]],["phmmat",[8499]],["phone",[9742]],["Pi",[928]],["pi",[960]],["pitchfork",[8916]],["piv",[982]],["planck",[8463]],["planckh",[8462]],["plankv",[8463]],["plusacir",[10787]],["plusb",[8862]],["pluscir",[10786]],["plus",[43]],["plusdo",[8724]],["plusdu",[10789]],["pluse",[10866]],["PlusMinus",[177]],["plusmn",[177]],["plussim",[10790]],["plustwo",[10791]],["pm",[177]],["Poincareplane",[8460]],["pointint",[10773]],["popf",[120161]],["Popf",[8473]],["pound",[163]],["prap",[10935]],["Pr",[10939]],["pr",[8826]],["prcue",[8828]],["precapprox",[10935]],["prec",[8826]],["preccurlyeq",[8828]],["Precedes",[8826]],["PrecedesEqual",[10927]],["PrecedesSlantEqual",[8828]],["PrecedesTilde",[8830]],["preceq",[10927]],["precnapprox",[10937]],["precneqq",[10933]],["precnsim",[8936]],["pre",[10927]],["prE",[10931]],["precsim",[8830]],["prime",[8242]],["Prime",[8243]],["primes",[8473]],["prnap",[10937]],["prnE",[10933]],["prnsim",[8936]],["prod",[8719]],["Product",[8719]],["profalar",[9006]],["profline",[8978]],["profsurf",[8979]],["prop",[8733]],["Proportional",[8733]],["Proportion",[8759]],["propto",[8733]],["prsim",[8830]],["prurel",[8880]],["Pscr",[119979]],["pscr",[120005]],["Psi",[936]],["psi",[968]],["puncsp",[8200]],["Qfr",[120084]],["qfr",[120110]],["qint",[10764]],["qopf",[120162]],["Qopf",[8474]],["qprime",[8279]],["Qscr",[119980]],["qscr",[120006]],["quaternions",[8461]],["quatint",[10774]],["quest",[63]],["questeq",[8799]],["quot",[34]],["QUOT",[34]],["rAarr",[8667]],["race",[8765,817]],["Racute",[340]],["racute",[341]],["radic",[8730]],["raemptyv",[10675]],["rang",[10217]],["Rang",[10219]],["rangd",[10642]],["range",[10661]],["rangle",[10217]],["raquo",[187]],["rarrap",[10613]],["rarrb",[8677]],["rarrbfs",[10528]],["rarrc",[10547]],["rarr",[8594]],["Rarr",[8608]],["rArr",[8658]],["rarrfs",[10526]],["rarrhk",[8618]],["rarrlp",[8620]],["rarrpl",[10565]],["rarrsim",[10612]],["Rarrtl",[10518]],["rarrtl",[8611]],["rarrw",[8605]],["ratail",[10522]],["rAtail",[10524]],["ratio",[8758]],["rationals",[8474]],["rbarr",[10509]],["rBarr",[10511]],["RBarr",[10512]],["rbbrk",[10099]],["rbrace",[125]],["rbrack",[93]],["rbrke",[10636]],["rbrksld",[10638]],["rbrkslu",[10640]],["Rcaron",[344]],["rcaron",[345]],["Rcedil",[342]],["rcedil",[343]],["rceil",[8969]],["rcub",[125]],["Rcy",[1056]],["rcy",[1088]],["rdca",[10551]],["rdldhar",[10601]],["rdquo",[8221]],["rdquor",[8221]],["CloseCurlyDoubleQuote",[8221]],["rdsh",[8627]],["real",[8476]],["realine",[8475]],["realpart",[8476]],["reals",[8477]],["Re",[8476]],["rect",[9645]],["reg",[174]],["REG",[174]],["ReverseElement",[8715]],["ReverseEquilibrium",[8651]],["ReverseUpEquilibrium",[10607]],["rfisht",[10621]],["rfloor",[8971]],["rfr",[120111]],["Rfr",[8476]],["rHar",[10596]],["rhard",[8641]],["rharu",[8640]],["rharul",[10604]],["Rho",[929]],["rho",[961]],["rhov",[1009]],["RightAngleBracket",[10217]],["RightArrowBar",[8677]],["rightarrow",[8594]],["RightArrow",[8594]],["Rightarrow",[8658]],["RightArrowLeftArrow",[8644]],["rightarrowtail",[8611]],["RightCeiling",[8969]],["RightDoubleBracket",[10215]],["RightDownTeeVector",[10589]],["RightDownVectorBar",[10581]],["RightDownVector",[8642]],["RightFloor",[8971]],["rightharpoondown",[8641]],["rightharpoonup",[8640]],["rightleftarrows",[8644]],["rightleftharpoons",[8652]],["rightrightarrows",[8649]],["rightsquigarrow",[8605]],["RightTeeArrow",[8614]],["RightTee",[8866]],["RightTeeVector",[10587]],["rightthreetimes",[8908]],["RightTriangleBar",[10704]],["RightTriangle",[8883]],["RightTriangleEqual",[8885]],["RightUpDownVector",[10575]],["RightUpTeeVector",[10588]],["RightUpVectorBar",[10580]],["RightUpVector",[8638]],["RightVectorBar",[10579]],["RightVector",[8640]],["ring",[730]],["risingdotseq",[8787]],["rlarr",[8644]],["rlhar",[8652]],["rlm",[8207]],["rmoustache",[9137]],["rmoust",[9137]],["rnmid",[10990]],["roang",[10221]],["roarr",[8702]],["robrk",[10215]],["ropar",[10630]],["ropf",[120163]],["Ropf",[8477]],["roplus",[10798]],["rotimes",[10805]],["RoundImplies",[10608]],["rpar",[41]],["rpargt",[10644]],["rppolint",[10770]],["rrarr",[8649]],["Rrightarrow",[8667]],["rsaquo",[8250]],["rscr",[120007]],["Rscr",[8475]],["rsh",[8625]],["Rsh",[8625]],["rsqb",[93]],["rsquo",[8217]],["rsquor",[8217]],["CloseCurlyQuote",[8217]],["rthree",[8908]],["rtimes",[8906]],["rtri",[9657]],["rtrie",[8885]],["rtrif",[9656]],["rtriltri",[10702]],["RuleDelayed",[10740]],["ruluhar",[10600]],["rx",[8478]],["Sacute",[346]],["sacute",[347]],["sbquo",[8218]],["scap",[10936]],["Scaron",[352]],["scaron",[353]],["Sc",[10940]],["sc",[8827]],["sccue",[8829]],["sce",[10928]],["scE",[10932]],["Scedil",[350]],["scedil",[351]],["Scirc",[348]],["scirc",[349]],["scnap",[10938]],["scnE",[10934]],["scnsim",[8937]],["scpolint",[10771]],["scsim",[8831]],["Scy",[1057]],["scy",[1089]],["sdotb",[8865]],["sdot",[8901]],["sdote",[10854]],["searhk",[10533]],["searr",[8600]],["seArr",[8664]],["searrow",[8600]],["sect",[167]],["semi",[59]],["seswar",[10537]],["setminus",[8726]],["setmn",[8726]],["sext",[10038]],["Sfr",[120086]],["sfr",[120112]],["sfrown",[8994]],["sharp",[9839]],["SHCHcy",[1065]],["shchcy",[1097]],["SHcy",[1064]],["shcy",[1096]],["ShortDownArrow",[8595]],["ShortLeftArrow",[8592]],["shortmid",[8739]],["shortparallel",[8741]],["ShortRightArrow",[8594]],["ShortUpArrow",[8593]],["shy",[173]],["Sigma",[931]],["sigma",[963]],["sigmaf",[962]],["sigmav",[962]],["sim",[8764]],["simdot",[10858]],["sime",[8771]],["simeq",[8771]],["simg",[10910]],["simgE",[10912]],["siml",[10909]],["simlE",[10911]],["simne",[8774]],["simplus",[10788]],["simrarr",[10610]],["slarr",[8592]],["SmallCircle",[8728]],["smallsetminus",[8726]],["smashp",[10803]],["smeparsl",[10724]],["smid",[8739]],["smile",[8995]],["smt",[10922]],["smte",[10924]],["smtes",[10924,65024]],["SOFTcy",[1068]],["softcy",[1100]],["solbar",[9023]],["solb",[10692]],["sol",[47]],["Sopf",[120138]],["sopf",[120164]],["spades",[9824]],["spadesuit",[9824]],["spar",[8741]],["sqcap",[8851]],["sqcaps",[8851,65024]],["sqcup",[8852]],["sqcups",[8852,65024]],["Sqrt",[8730]],["sqsub",[8847]],["sqsube",[8849]],["sqsubset",[8847]],["sqsubseteq",[8849]],["sqsup",[8848]],["sqsupe",[8850]],["sqsupset",[8848]],["sqsupseteq",[8850]],["square",[9633]],["Square",[9633]],["SquareIntersection",[8851]],["SquareSubset",[8847]],["SquareSubsetEqual",[8849]],["SquareSuperset",[8848]],["SquareSupersetEqual",[8850]],["SquareUnion",[8852]],["squarf",[9642]],["squ",[9633]],["squf",[9642]],["srarr",[8594]],["Sscr",[119982]],["sscr",[120008]],["ssetmn",[8726]],["ssmile",[8995]],["sstarf",[8902]],["Star",[8902]],["star",[9734]],["starf",[9733]],["straightepsilon",[1013]],["straightphi",[981]],["strns",[175]],["sub",[8834]],["Sub",[8912]],["subdot",[10941]],["subE",[10949]],["sube",[8838]],["subedot",[10947]],["submult",[10945]],["subnE",[10955]],["subne",[8842]],["subplus",[10943]],["subrarr",[10617]],["subset",[8834]],["Subset",[8912]],["subseteq",[8838]],["subseteqq",[10949]],["SubsetEqual",[8838]],["subsetneq",[8842]],["subsetneqq",[10955]],["subsim",[10951]],["subsub",[10965]],["subsup",[10963]],["succapprox",[10936]],["succ",[8827]],["succcurlyeq",[8829]],["Succeeds",[8827]],["SucceedsEqual",[10928]],["SucceedsSlantEqual",[8829]],["SucceedsTilde",[8831]],["succeq",[10928]],["succnapprox",[10938]],["succneqq",[10934]],["succnsim",[8937]],["succsim",[8831]],["SuchThat",[8715]],["sum",[8721]],["Sum",[8721]],["sung",[9834]],["sup1",[185]],["sup2",[178]],["sup3",[179]],["sup",[8835]],["Sup",[8913]],["supdot",[10942]],["supdsub",[10968]],["supE",[10950]],["supe",[8839]],["supedot",[10948]],["Superset",[8835]],["SupersetEqual",[8839]],["suphsol",[10185]],["suphsub",[10967]],["suplarr",[10619]],["supmult",[10946]],["supnE",[10956]],["supne",[8843]],["supplus",[10944]],["supset",[8835]],["Supset",[8913]],["supseteq",[8839]],["supseteqq",[10950]],["supsetneq",[8843]],["supsetneqq",[10956]],["supsim",[10952]],["supsub",[10964]],["supsup",[10966]],["swarhk",[10534]],["swarr",[8601]],["swArr",[8665]],["swarrow",[8601]],["swnwar",[10538]],["szlig",[223]],["Tab",[9]],["target",[8982]],["Tau",[932]],["tau",[964]],["tbrk",[9140]],["Tcaron",[356]],["tcaron",[357]],["Tcedil",[354]],["tcedil",[355]],["Tcy",[1058]],["tcy",[1090]],["tdot",[8411]],["telrec",[8981]],["Tfr",[120087]],["tfr",[120113]],["there4",[8756]],["therefore",[8756]],["Therefore",[8756]],["Theta",[920]],["theta",[952]],["thetasym",[977]],["thetav",[977]],["thickapprox",[8776]],["thicksim",[8764]],["ThickSpace",[8287,8202]],["ThinSpace",[8201]],["thinsp",[8201]],["thkap",[8776]],["thksim",[8764]],["THORN",[222]],["thorn",[254]],["tilde",[732]],["Tilde",[8764]],["TildeEqual",[8771]],["TildeFullEqual",[8773]],["TildeTilde",[8776]],["timesbar",[10801]],["timesb",[8864]],["times",[215]],["timesd",[10800]],["tint",[8749]],["toea",[10536]],["topbot",[9014]],["topcir",[10993]],["top",[8868]],["Topf",[120139]],["topf",[120165]],["topfork",[10970]],["tosa",[10537]],["tprime",[8244]],["trade",[8482]],["TRADE",[8482]],["triangle",[9653]],["triangledown",[9663]],["triangleleft",[9667]],["trianglelefteq",[8884]],["triangleq",[8796]],["triangleright",[9657]],["trianglerighteq",[8885]],["tridot",[9708]],["trie",[8796]],["triminus",[10810]],["TripleDot",[8411]],["triplus",[10809]],["trisb",[10701]],["tritime",[10811]],["trpezium",[9186]],["Tscr",[119983]],["tscr",[120009]],["TScy",[1062]],["tscy",[1094]],["TSHcy",[1035]],["tshcy",[1115]],["Tstrok",[358]],["tstrok",[359]],["twixt",[8812]],["twoheadleftarrow",[8606]],["twoheadrightarrow",[8608]],["Uacute",[218]],["uacute",[250]],["uarr",[8593]],["Uarr",[8607]],["uArr",[8657]],["Uarrocir",[10569]],["Ubrcy",[1038]],["ubrcy",[1118]],["Ubreve",[364]],["ubreve",[365]],["Ucirc",[219]],["ucirc",[251]],["Ucy",[1059]],["ucy",[1091]],["udarr",[8645]],["Udblac",[368]],["udblac",[369]],["udhar",[10606]],["ufisht",[10622]],["Ufr",[120088]],["ufr",[120114]],["Ugrave",[217]],["ugrave",[249]],["uHar",[10595]],["uharl",[8639]],["uharr",[8638]],["uhblk",[9600]],["ulcorn",[8988]],["ulcorner",[8988]],["ulcrop",[8975]],["ultri",[9720]],["Umacr",[362]],["umacr",[363]],["uml",[168]],["UnderBar",[95]],["UnderBrace",[9183]],["UnderBracket",[9141]],["UnderParenthesis",[9181]],["Union",[8899]],["UnionPlus",[8846]],["Uogon",[370]],["uogon",[371]],["Uopf",[120140]],["uopf",[120166]],["UpArrowBar",[10514]],["uparrow",[8593]],["UpArrow",[8593]],["Uparrow",[8657]],["UpArrowDownArrow",[8645]],["updownarrow",[8597]],["UpDownArrow",[8597]],["Updownarrow",[8661]],["UpEquilibrium",[10606]],["upharpoonleft",[8639]],["upharpoonright",[8638]],["uplus",[8846]],["UpperLeftArrow",[8598]],["UpperRightArrow",[8599]],["upsi",[965]],["Upsi",[978]],["upsih",[978]],["Upsilon",[933]],["upsilon",[965]],["UpTeeArrow",[8613]],["UpTee",[8869]],["upuparrows",[8648]],["urcorn",[8989]],["urcorner",[8989]],["urcrop",[8974]],["Uring",[366]],["uring",[367]],["urtri",[9721]],["Uscr",[119984]],["uscr",[120010]],["utdot",[8944]],["Utilde",[360]],["utilde",[361]],["utri",[9653]],["utrif",[9652]],["uuarr",[8648]],["Uuml",[220]],["uuml",[252]],["uwangle",[10663]],["vangrt",[10652]],["varepsilon",[1013]],["varkappa",[1008]],["varnothing",[8709]],["varphi",[981]],["varpi",[982]],["varpropto",[8733]],["varr",[8597]],["vArr",[8661]],["varrho",[1009]],["varsigma",[962]],["varsubsetneq",[8842,65024]],["varsubsetneqq",[10955,65024]],["varsupsetneq",[8843,65024]],["varsupsetneqq",[10956,65024]],["vartheta",[977]],["vartriangleleft",[8882]],["vartriangleright",[8883]],["vBar",[10984]],["Vbar",[10987]],["vBarv",[10985]],["Vcy",[1042]],["vcy",[1074]],["vdash",[8866]],["vDash",[8872]],["Vdash",[8873]],["VDash",[8875]],["Vdashl",[10982]],["veebar",[8891]],["vee",[8744]],["Vee",[8897]],["veeeq",[8794]],["vellip",[8942]],["verbar",[124]],["Verbar",[8214]],["vert",[124]],["Vert",[8214]],["VerticalBar",[8739]],["VerticalLine",[124]],["VerticalSeparator",[10072]],["VerticalTilde",[8768]],["VeryThinSpace",[8202]],["Vfr",[120089]],["vfr",[120115]],["vltri",[8882]],["vnsub",[8834,8402]],["vnsup",[8835,8402]],["Vopf",[120141]],["vopf",[120167]],["vprop",[8733]],["vrtri",[8883]],["Vscr",[119985]],["vscr",[120011]],["vsubnE",[10955,65024]],["vsubne",[8842,65024]],["vsupnE",[10956,65024]],["vsupne",[8843,65024]],["Vvdash",[8874]],["vzigzag",[10650]],["Wcirc",[372]],["wcirc",[373]],["wedbar",[10847]],["wedge",[8743]],["Wedge",[8896]],["wedgeq",[8793]],["weierp",[8472]],["Wfr",[120090]],["wfr",[120116]],["Wopf",[120142]],["wopf",[120168]],["wp",[8472]],["wr",[8768]],["wreath",[8768]],["Wscr",[119986]],["wscr",[120012]],["xcap",[8898]],["xcirc",[9711]],["xcup",[8899]],["xdtri",[9661]],["Xfr",[120091]],["xfr",[120117]],["xharr",[10231]],["xhArr",[10234]],["Xi",[926]],["xi",[958]],["xlarr",[10229]],["xlArr",[10232]],["xmap",[10236]],["xnis",[8955]],["xodot",[10752]],["Xopf",[120143]],["xopf",[120169]],["xoplus",[10753]],["xotime",[10754]],["xrarr",[10230]],["xrArr",[10233]],["Xscr",[119987]],["xscr",[120013]],["xsqcup",[10758]],["xuplus",[10756]],["xutri",[9651]],["xvee",[8897]],["xwedge",[8896]],["Yacute",[221]],["yacute",[253]],["YAcy",[1071]],["yacy",[1103]],["Ycirc",[374]],["ycirc",[375]],["Ycy",[1067]],["ycy",[1099]],["yen",[165]],["Yfr",[120092]],["yfr",[120118]],["YIcy",[1031]],["yicy",[1111]],["Yopf",[120144]],["yopf",[120170]],["Yscr",[119988]],["yscr",[120014]],["YUcy",[1070]],["yucy",[1102]],["yuml",[255]],["Yuml",[376]],["Zacute",[377]],["zacute",[378]],["Zcaron",[381]],["zcaron",[382]],["Zcy",[1047]],["zcy",[1079]],["Zdot",[379]],["zdot",[380]],["zeetrf",[8488]],["ZeroWidthSpace",[8203]],["Zeta",[918]],["zeta",[950]],["zfr",[120119]],["Zfr",[8488]],["ZHcy",[1046]],["zhcy",[1078]],["zigrarr",[8669]],["zopf",[120171]],["Zopf",[8484]],["Zscr",[119989]],["zscr",[120015]],["zwj",[8205]],["zwnj",[8204]]],i=[["NewLine",[10]]],a={},s={};!function(e,t){var n=o.length;for(;n--;){var r=o[n],a=r[0],s=r[1],c=s[0],l=s[1],u=c<32||c>126||62===c||60===c||38===c||34===c||39===c,d=void 0;u&&(d=t[c]=t[c]||{}),l?(e[a]=String.fromCharCode(c)+String.fromCharCode(l),u&&(d[l]=a)):(e[a]=String.fromCharCode(c),u&&(d[""]=a))}n=i.length;for(;n--;){var h=i[n],p=(a=h[0],h[1]);c=p[0],l=p[1];e[a]=String.fromCharCode(c)+(l?String.fromCharCode(l):"")}}(a,s);var c=function(){function e(){}return e.prototype.decode=function(e){return e&&e.length?e.replace(/&(#?[\w\d]+);?/g,(function(e,t){var n;if("#"===t.charAt(0)){var o="x"===t.charAt(1)?parseInt(t.substr(2).toLowerCase(),16):parseInt(t.substr(1));(!isNaN(o)||o>=-32768)&&(n=o<=65535?String.fromCharCode(o):r.fromCodePoint(o))}else n=a[t];return n||e})):""},e.decode=function(t){return(new e).decode(t)},e.prototype.encode=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",r=0;r<t;){var o=s[e.charCodeAt(r)];if(o){var i=o[e.charCodeAt(r+1)];if(i?r++:i=o[""],i){n+="&"+i+";",r++;continue}}n+=e.charAt(r),r++}return n},e.encode=function(t){return(new e).encode(t)},e.prototype.encodeNonUTF=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",o=0;o<t;){var i=e.charCodeAt(o),a=s[i];if(a){var c=a[e.charCodeAt(o+1)];if(c?o++:c=a[""],c){n+="&"+c+";",o++;continue}}i<32||i>126?i>=r.highSurrogateFrom&&i<=r.highSurrogateTo?(n+="&#"+r.getCodePoint(e,o)+";",o++):n+="&#"+i+";":n+=e.charAt(o),o++}return n},e.encodeNonUTF=function(t){return(new e).encodeNonUTF(t)},e.prototype.encodeNonASCII=function(e){if(!e||!e.length)return"";for(var t=e.length,n="",o=0;o<t;){var i=e.charCodeAt(o);i<=255?n+=e[o++]:i>=r.highSurrogateFrom&&i<=r.highSurrogateTo?(n+="&#"+r.getCodePoint(e,o)+";",o+=2):(n+="&#"+i+";",o++)}return n},e.encodeNonASCII=function(t){return(new e).encodeNonASCII(t)},e}();t.Html5Entities=c},function(e){e.exports=JSON.parse('[{"annotation":"regional indicator A","hexcode":"1F1E6","unicode":"🇦"},{"annotation":"regional indicator B","hexcode":"1F1E7","unicode":"🇧"},{"annotation":"regional indicator C","hexcode":"1F1E8","unicode":"🇨"},{"annotation":"regional indicator D","hexcode":"1F1E9","unicode":"🇩"},{"annotation":"regional indicator E","hexcode":"1F1EA","unicode":"🇪"},{"annotation":"regional indicator F","hexcode":"1F1EB","unicode":"🇫"},{"annotation":"regional indicator G","hexcode":"1F1EC","unicode":"🇬"},{"annotation":"regional indicator H","hexcode":"1F1ED","unicode":"🇭"},{"annotation":"regional indicator I","hexcode":"1F1EE","unicode":"🇮"},{"annotation":"regional indicator J","hexcode":"1F1EF","unicode":"🇯"},{"annotation":"regional indicator K","hexcode":"1F1F0","unicode":"🇰"},{"annotation":"regional indicator L","hexcode":"1F1F1","unicode":"🇱"},{"annotation":"regional indicator M","hexcode":"1F1F2","unicode":"🇲"},{"annotation":"regional indicator N","hexcode":"1F1F3","unicode":"🇳"},{"annotation":"regional indicator O","hexcode":"1F1F4","unicode":"🇴"},{"annotation":"regional indicator P","hexcode":"1F1F5","unicode":"🇵"},{"annotation":"regional indicator Q","hexcode":"1F1F6","unicode":"🇶"},{"annotation":"regional indicator R","hexcode":"1F1F7","unicode":"🇷"},{"annotation":"regional indicator S","hexcode":"1F1F8","unicode":"🇸"},{"annotation":"regional indicator T","hexcode":"1F1F9","unicode":"🇹"},{"annotation":"regional indicator U","hexcode":"1F1FA","unicode":"🇺"},{"annotation":"regional indicator V","hexcode":"1F1FB","unicode":"🇻"},{"annotation":"regional indicator W","hexcode":"1F1FC","unicode":"🇼"},{"annotation":"regional indicator X","hexcode":"1F1FD","unicode":"🇽"},{"annotation":"regional indicator Y","hexcode":"1F1FE","unicode":"🇾"},{"annotation":"regional indicator Z","hexcode":"1F1FF","unicode":"🇿"},{"annotation":"grinning face","group":0,"hexcode":"1F600","order":1,"tags":["face","grin"],"unicode":"😀","emoticon":":D"},{"annotation":"grinning face with big eyes","group":0,"hexcode":"1F603","order":2,"tags":["face","mouth","open","smile"],"unicode":"😃"},{"annotation":"grinning face with smiling eyes","group":0,"hexcode":"1F604","order":3,"tags":["eye","face","mouth","open","smile"],"unicode":"😄"},{"annotation":"beaming face with smiling eyes","group":0,"hexcode":"1F601","order":4,"tags":["eye","face","grin","smile"],"unicode":"😁"},{"annotation":"grinning squinting face","group":0,"hexcode":"1F606","order":5,"tags":["face","laugh","mouth","satisfied","smile"],"unicode":"😆","emoticon":"xD"},{"annotation":"grinning face with sweat","group":0,"hexcode":"1F605","order":6,"tags":["cold","face","open","smile","sweat"],"unicode":"😅"},{"annotation":"rolling on the floor laughing","group":0,"hexcode":"1F923","order":7,"tags":["face","floor","laugh","rofl","rolling","rotfl"],"unicode":"🤣","emoticon":":\'D"},{"annotation":"face with tears of joy","group":0,"hexcode":"1F602","order":8,"tags":["face","joy","laugh","tear"],"unicode":"😂","emoticon":":\')"},{"annotation":"slightly smiling face","group":0,"hexcode":"1F642","order":9,"tags":["face","smile"],"unicode":"🙂","emoticon":":)"},{"annotation":"upside-down face","group":0,"hexcode":"1F643","order":10,"tags":["face","upside-down"],"unicode":"🙃"},{"annotation":"winking face","group":0,"hexcode":"1F609","order":11,"tags":["face","wink"],"unicode":"😉","emoticon":";)"},{"annotation":"smiling face with smiling eyes","group":0,"hexcode":"1F60A","order":12,"tags":["blush","eye","face","smile"],"unicode":"😊","emoticon":":>"},{"annotation":"smiling face with halo","group":0,"hexcode":"1F607","order":13,"tags":["angel","face","fantasy","halo","innocent"],"unicode":"😇","emoticon":"o:)"},{"annotation":"smiling face with hearts","group":0,"hexcode":"1F970","order":14,"tags":["adore","crush","hearts","in love"],"unicode":"🥰"},{"annotation":"smiling face with heart-eyes","group":0,"hexcode":"1F60D","order":15,"tags":["eye","face","love","smile"],"unicode":"😍"},{"annotation":"star-struck","group":0,"hexcode":"1F929","order":16,"tags":["eyes","face","grinning","star"],"unicode":"🤩"},{"annotation":"face blowing a kiss","group":0,"hexcode":"1F618","order":17,"tags":["face","kiss"],"unicode":"😘","emoticon":":x"},{"annotation":"kissing face","group":0,"hexcode":"1F617","order":18,"tags":["face","kiss"],"unicode":"😗"},{"annotation":"smiling face","group":0,"hexcode":"263A","order":20,"tags":["face","outlined","relaxed","smile"],"unicode":"☺️"},{"annotation":"kissing face with closed eyes","group":0,"hexcode":"1F61A","order":21,"tags":["closed","eye","face","kiss"],"unicode":"😚","emoticon":":*"},{"annotation":"kissing face with smiling eyes","group":0,"hexcode":"1F619","order":22,"tags":["eye","face","kiss","smile"],"unicode":"😙"},{"annotation":"smiling face with tear","group":0,"hexcode":"1F972","order":23,"tags":["grateful","proud","relieved","smiling","tear","touched"],"unicode":"🥲"},{"annotation":"face savoring food","group":0,"hexcode":"1F60B","order":24,"tags":["delicious","face","savouring","smile","yum"],"unicode":"😋"},{"annotation":"face with tongue","group":0,"hexcode":"1F61B","order":25,"tags":["face","tongue"],"unicode":"😛","emoticon":":p"},{"annotation":"winking face with tongue","group":0,"hexcode":"1F61C","order":26,"tags":["eye","face","joke","tongue","wink"],"unicode":"😜","emoticon":";p"},{"annotation":"zany face","group":0,"hexcode":"1F92A","order":27,"tags":["eye","goofy","large","small"],"unicode":"🤪"},{"annotation":"squinting face with tongue","group":0,"hexcode":"1F61D","order":28,"tags":["eye","face","horrible","taste","tongue"],"unicode":"😝","emoticon":"xp"},{"annotation":"money-mouth face","group":0,"hexcode":"1F911","order":29,"tags":["face","money","mouth"],"unicode":"🤑"},{"annotation":"hugging face","group":0,"hexcode":"1F917","order":30,"tags":["face","hug","hugging"],"unicode":"🤗"},{"annotation":"face with hand over mouth","group":0,"hexcode":"1F92D","order":31,"tags":["whoops"],"unicode":"🤭"},{"annotation":"shushing face","group":0,"hexcode":"1F92B","order":32,"tags":["quiet","shush"],"unicode":"🤫"},{"annotation":"thinking face","group":0,"hexcode":"1F914","order":33,"tags":["face","thinking"],"unicode":"🤔","emoticon":":l"},{"annotation":"zipper-mouth face","group":0,"hexcode":"1F910","order":34,"tags":["face","mouth","zipper"],"unicode":"🤐","emoticon":":z"},{"annotation":"face with raised eyebrow","group":0,"hexcode":"1F928","order":35,"tags":["distrust","skeptic"],"unicode":"🤨"},{"annotation":"neutral face","group":0,"hexcode":"1F610","order":36,"tags":["deadpan","face","meh","neutral"],"unicode":"😐️","emoticon":":|"},{"annotation":"expressionless face","group":0,"hexcode":"1F611","order":37,"tags":["expressionless","face","inexpressive","meh","unexpressive"],"unicode":"😑"},{"annotation":"face without mouth","group":0,"hexcode":"1F636","order":38,"tags":["face","mouth","quiet","silent"],"unicode":"😶","emoticon":":#"},{"annotation":"face in clouds","group":0,"hexcode":"1F636-200D-1F32B-FE0F","order":39,"tags":["absentminded","face in the fog","head in clouds"],"unicode":"😶🌫️"},{"annotation":"smirking face","group":0,"hexcode":"1F60F","order":41,"tags":["face","smirk"],"unicode":"😏","emoticon":":j"},{"annotation":"unamused face","group":0,"hexcode":"1F612","order":42,"tags":["face","unamused","unhappy"],"unicode":"😒","emoticon":":?"},{"annotation":"face with rolling eyes","group":0,"hexcode":"1F644","order":43,"tags":["eyeroll","eyes","face","rolling"],"unicode":"🙄"},{"annotation":"grimacing face","group":0,"hexcode":"1F62C","order":44,"tags":["face","grimace"],"unicode":"😬","emoticon":"8D"},{"annotation":"face exhaling","group":0,"hexcode":"1F62E-200D-1F4A8","order":45,"tags":["exhale","gasp","groan","relief","whisper","whistle"],"unicode":"😮💨"},{"annotation":"lying face","group":0,"hexcode":"1F925","order":46,"tags":["face","lie","pinocchio"],"unicode":"🤥"},{"annotation":"relieved face","group":0,"hexcode":"1F60C","order":47,"tags":["face","relieved"],"unicode":"😌"},{"annotation":"pensive face","group":0,"hexcode":"1F614","order":48,"tags":["dejected","face","pensive"],"unicode":"😔"},{"annotation":"sleepy face","group":0,"hexcode":"1F62A","order":49,"tags":["face","sleep"],"unicode":"😪"},{"annotation":"drooling face","group":0,"hexcode":"1F924","order":50,"tags":["drooling","face"],"unicode":"🤤"},{"annotation":"sleeping face","group":0,"hexcode":"1F634","order":51,"tags":["face","sleep","zzz"],"unicode":"😴"},{"annotation":"face with medical mask","group":0,"hexcode":"1F637","order":52,"tags":["cold","doctor","face","mask","sick"],"unicode":"😷"},{"annotation":"face with thermometer","group":0,"hexcode":"1F912","order":53,"tags":["face","ill","sick","thermometer"],"unicode":"🤒"},{"annotation":"face with head-bandage","group":0,"hexcode":"1F915","order":54,"tags":["bandage","face","hurt","injury"],"unicode":"🤕"},{"annotation":"nauseated face","group":0,"hexcode":"1F922","order":55,"tags":["face","nauseated","vomit"],"unicode":"🤢","emoticon":"%("},{"annotation":"face vomiting","group":0,"hexcode":"1F92E","order":56,"tags":["puke","sick","vomit"],"unicode":"🤮"},{"annotation":"sneezing face","group":0,"hexcode":"1F927","order":57,"tags":["face","gesundheit","sneeze"],"unicode":"🤧"},{"annotation":"hot face","group":0,"hexcode":"1F975","order":58,"tags":["feverish","heat stroke","hot","red-faced","sweating"],"unicode":"🥵"},{"annotation":"cold face","group":0,"hexcode":"1F976","order":59,"tags":["blue-faced","cold","freezing","frostbite","icicles"],"unicode":"🥶"},{"annotation":"woozy face","group":0,"hexcode":"1F974","order":60,"tags":["dizzy","intoxicated","tipsy","uneven eyes","wavy mouth"],"unicode":"🥴","emoticon":":&"},{"annotation":"knocked-out face","group":0,"hexcode":"1F635","order":61,"tags":["dead","face","knocked out"],"unicode":"😵","emoticon":"xo"},{"annotation":"face with spiral eyes","group":0,"hexcode":"1F635-200D-1F4AB","order":62,"tags":["dizzy","hypnotized","spiral","trouble","whoa"],"unicode":"😵💫"},{"annotation":"exploding head","group":0,"hexcode":"1F92F","order":63,"tags":["mind blown","shocked"],"unicode":"🤯"},{"annotation":"cowboy hat face","group":0,"hexcode":"1F920","order":64,"tags":["cowboy","cowgirl","face","hat"],"unicode":"🤠"},{"annotation":"partying face","group":0,"hexcode":"1F973","order":65,"tags":["celebration","hat","horn","party"],"unicode":"🥳"},{"annotation":"disguised face","group":0,"hexcode":"1F978","order":66,"tags":["disguise","face","glasses","incognito","nose"],"unicode":"🥸"},{"annotation":"smiling face with sunglasses","group":0,"hexcode":"1F60E","order":67,"tags":["bright","cool","face","sun","sunglasses"],"unicode":"😎","emoticon":"8)"},{"annotation":"nerd face","group":0,"hexcode":"1F913","order":68,"tags":["face","geek","nerd"],"unicode":"🤓","emoticon":":B"},{"annotation":"face with monocle","group":0,"hexcode":"1F9D0","order":69,"tags":["stuffy"],"unicode":"🧐"},{"annotation":"confused face","group":0,"hexcode":"1F615","order":70,"tags":["confused","face","meh"],"unicode":"😕","emoticon":":/"},{"annotation":"worried face","group":0,"hexcode":"1F61F","order":71,"tags":["face","worried"],"unicode":"😟"},{"annotation":"slightly frowning face","group":0,"hexcode":"1F641","order":72,"tags":["face","frown"],"unicode":"🙁"},{"annotation":"frowning face","group":0,"hexcode":"2639","order":74,"tags":["face","frown"],"unicode":"☹️","emoticon":":("},{"annotation":"face with open mouth","group":0,"hexcode":"1F62E","order":75,"tags":["face","mouth","open","sympathy"],"unicode":"😮"},{"annotation":"hushed face","group":0,"hexcode":"1F62F","order":76,"tags":["face","hushed","stunned","surprised"],"unicode":"😯"},{"annotation":"astonished face","group":0,"hexcode":"1F632","order":77,"tags":["astonished","face","shocked","totally"],"unicode":"😲","emoticon":":o"},{"annotation":"flushed face","group":0,"hexcode":"1F633","order":78,"tags":["dazed","face","flushed"],"unicode":"😳","emoticon":":$"},{"annotation":"pleading face","group":0,"hexcode":"1F97A","order":79,"tags":["begging","mercy","puppy eyes"],"unicode":"🥺"},{"annotation":"frowning face with open mouth","group":0,"hexcode":"1F626","order":80,"tags":["face","frown","mouth","open"],"unicode":"😦"},{"annotation":"anguished face","group":0,"hexcode":"1F627","order":81,"tags":["anguished","face"],"unicode":"😧","emoticon":":s"},{"annotation":"fearful face","group":0,"hexcode":"1F628","order":82,"tags":["face","fear","fearful","scared"],"unicode":"😨"},{"annotation":"anxious face with sweat","group":0,"hexcode":"1F630","order":83,"tags":["blue","cold","face","rushed","sweat"],"unicode":"😰"},{"annotation":"sad but relieved face","group":0,"hexcode":"1F625","order":84,"tags":["disappointed","face","relieved","whew"],"unicode":"😥"},{"annotation":"crying face","group":0,"hexcode":"1F622","order":85,"tags":["cry","face","sad","tear"],"unicode":"😢","emoticon":":\'("},{"annotation":"loudly crying face","group":0,"hexcode":"1F62D","order":86,"tags":["cry","face","sad","sob","tear"],"unicode":"😭","emoticon":":\'o"},{"annotation":"face screaming in fear","group":0,"hexcode":"1F631","order":87,"tags":["face","fear","munch","scared","scream"],"unicode":"😱","emoticon":"Dx"},{"annotation":"confounded face","group":0,"hexcode":"1F616","order":88,"tags":["confounded","face"],"unicode":"😖","emoticon":"x("},{"annotation":"persevering face","group":0,"hexcode":"1F623","order":89,"tags":["face","persevere"],"unicode":"😣"},{"annotation":"disappointed face","group":0,"hexcode":"1F61E","order":90,"tags":["disappointed","face"],"unicode":"😞"},{"annotation":"downcast face with sweat","group":0,"hexcode":"1F613","order":91,"tags":["cold","face","sweat"],"unicode":"😓","emoticon":":<"},{"annotation":"weary face","group":0,"hexcode":"1F629","order":92,"tags":["face","tired","weary"],"unicode":"😩","emoticon":"D:"},{"annotation":"tired face","group":0,"hexcode":"1F62B","order":93,"tags":["face","tired"],"unicode":"😫","emoticon":":c"},{"annotation":"yawning face","group":0,"hexcode":"1F971","order":94,"tags":["bored","tired","yawn"],"unicode":"🥱"},{"annotation":"face with steam from nose","group":0,"hexcode":"1F624","order":95,"tags":["face","triumph","won"],"unicode":"😤"},{"annotation":"pouting face","group":0,"hexcode":"1F621","order":96,"tags":["angry","face","mad","pouting","rage","red"],"unicode":"😡","emoticon":">:/"},{"annotation":"angry face","group":0,"hexcode":"1F620","order":97,"tags":["anger","angry","face","mad"],"unicode":"😠"},{"annotation":"face with symbols on mouth","group":0,"hexcode":"1F92C","order":98,"tags":["swearing"],"unicode":"🤬","emoticon":":@"},{"annotation":"smiling face with horns","group":0,"hexcode":"1F608","order":99,"tags":["face","fairy tale","fantasy","horns","smile"],"unicode":"😈","emoticon":">:)"},{"annotation":"angry face with horns","group":0,"hexcode":"1F47F","order":100,"tags":["demon","devil","face","fantasy","imp"],"unicode":"👿","emoticon":">:("},{"annotation":"skull","group":0,"hexcode":"1F480","order":101,"tags":["death","face","fairy tale","monster"],"unicode":"💀"},{"annotation":"skull and crossbones","group":0,"hexcode":"2620","order":103,"tags":["crossbones","death","face","monster","skull"],"unicode":"☠️"},{"annotation":"pile of poo","group":0,"hexcode":"1F4A9","order":104,"tags":["dung","face","monster","poo","poop"],"unicode":"💩"},{"annotation":"clown face","group":0,"hexcode":"1F921","order":105,"tags":["clown","face"],"unicode":"🤡"},{"annotation":"ogre","group":0,"hexcode":"1F479","order":106,"tags":["creature","face","fairy tale","fantasy","monster"],"unicode":"👹","emoticon":">0)"},{"annotation":"goblin","group":0,"hexcode":"1F47A","order":107,"tags":["creature","face","fairy tale","fantasy","monster"],"unicode":"👺"},{"annotation":"ghost","group":0,"hexcode":"1F47B","order":108,"tags":["creature","face","fairy tale","fantasy","monster"],"unicode":"👻"},{"annotation":"alien","group":0,"hexcode":"1F47D","order":109,"tags":["creature","extraterrestrial","face","fantasy","ufo"],"unicode":"👽️"},{"annotation":"alien monster","group":0,"hexcode":"1F47E","order":110,"tags":["alien","creature","extraterrestrial","face","monster","ufo"],"unicode":"👾"},{"annotation":"robot","group":0,"hexcode":"1F916","order":111,"tags":["face","monster"],"unicode":"🤖"},{"annotation":"grinning cat","group":0,"hexcode":"1F63A","order":112,"tags":["cat","face","grinning","mouth","open","smile"],"unicode":"😺"},{"annotation":"grinning cat with smiling eyes","group":0,"hexcode":"1F638","order":113,"tags":["cat","eye","face","grin","smile"],"unicode":"😸"},{"annotation":"cat with tears of joy","group":0,"hexcode":"1F639","order":114,"tags":["cat","face","joy","tear"],"unicode":"😹"},{"annotation":"smiling cat with heart-eyes","group":0,"hexcode":"1F63B","order":115,"tags":["cat","eye","face","heart","love","smile"],"unicode":"😻"},{"annotation":"cat with wry smile","group":0,"hexcode":"1F63C","order":116,"tags":["cat","face","ironic","smile","wry"],"unicode":"😼"},{"annotation":"kissing cat","group":0,"hexcode":"1F63D","order":117,"tags":["cat","eye","face","kiss"],"unicode":"😽","emoticon":":3"},{"annotation":"weary cat","group":0,"hexcode":"1F640","order":118,"tags":["cat","face","oh","surprised","weary"],"unicode":"🙀"},{"annotation":"crying cat","group":0,"hexcode":"1F63F","order":119,"tags":["cat","cry","face","sad","tear"],"unicode":"😿"},{"annotation":"pouting cat","group":0,"hexcode":"1F63E","order":120,"tags":["cat","face","pouting"],"unicode":"😾"},{"annotation":"see-no-evil monkey","group":0,"hexcode":"1F648","order":121,"tags":["evil","face","forbidden","monkey","see"],"unicode":"🙈"},{"annotation":"hear-no-evil monkey","group":0,"hexcode":"1F649","order":122,"tags":["evil","face","forbidden","hear","monkey"],"unicode":"🙉"},{"annotation":"speak-no-evil monkey","group":0,"hexcode":"1F64A","order":123,"tags":["evil","face","forbidden","monkey","speak"],"unicode":"🙊"},{"annotation":"kiss mark","group":0,"hexcode":"1F48B","order":124,"tags":["kiss","lips"],"unicode":"💋"},{"annotation":"love letter","group":0,"hexcode":"1F48C","order":125,"tags":["heart","letter","love","mail"],"unicode":"💌"},{"annotation":"heart with arrow","group":0,"hexcode":"1F498","order":126,"tags":["arrow","cupid"],"unicode":"💘"},{"annotation":"heart with ribbon","group":0,"hexcode":"1F49D","order":127,"tags":["ribbon","valentine"],"unicode":"💝"},{"annotation":"sparkling heart","group":0,"hexcode":"1F496","order":128,"tags":["excited","sparkle"],"unicode":"💖"},{"annotation":"growing heart","group":0,"hexcode":"1F497","order":129,"tags":["excited","growing","nervous","pulse"],"unicode":"💗"},{"annotation":"beating heart","group":0,"hexcode":"1F493","order":130,"tags":["beating","heartbeat","pulsating"],"unicode":"💓"},{"annotation":"revolving hearts","group":0,"hexcode":"1F49E","order":131,"tags":["revolving"],"unicode":"💞"},{"annotation":"two hearts","group":0,"hexcode":"1F495","order":132,"tags":["love"],"unicode":"💕"},{"annotation":"heart decoration","group":0,"hexcode":"1F49F","order":133,"tags":["heart"],"unicode":"💟"},{"annotation":"heart exclamation","group":0,"hexcode":"2763","order":135,"tags":["exclamation","mark","punctuation"],"unicode":"❣️"},{"annotation":"broken heart","group":0,"hexcode":"1F494","order":136,"tags":["break","broken"],"unicode":"💔","emoticon":"</3"},{"annotation":"heart on fire","group":0,"hexcode":"2764-FE0F-200D-1F525","order":137,"tags":["burn","heart","love","lust","sacred heart"],"unicode":"❤️🔥"},{"annotation":"mending heart","group":0,"hexcode":"2764-FE0F-200D-1FA79","order":139,"tags":["healthier","improving","mending","recovering","recuperating","well"],"unicode":"❤️🩹"},{"annotation":"red heart","group":0,"hexcode":"2764","order":142,"tags":["heart"],"unicode":"❤️","emoticon":"<3"},{"annotation":"orange heart","group":0,"hexcode":"1F9E1","order":143,"tags":["orange"],"unicode":"🧡"},{"annotation":"yellow heart","group":0,"hexcode":"1F49B","order":144,"tags":["yellow"],"unicode":"💛"},{"annotation":"green heart","group":0,"hexcode":"1F49A","order":145,"tags":["green"],"unicode":"💚"},{"annotation":"blue heart","group":0,"hexcode":"1F499","order":146,"tags":["blue"],"unicode":"💙"},{"annotation":"purple heart","group":0,"hexcode":"1F49C","order":147,"tags":["purple"],"unicode":"💜"},{"annotation":"brown heart","group":0,"hexcode":"1F90E","order":148,"tags":["brown","heart"],"unicode":"🤎"},{"annotation":"black heart","group":0,"hexcode":"1F5A4","order":149,"tags":["black","evil","wicked"],"unicode":"🖤"},{"annotation":"white heart","group":0,"hexcode":"1F90D","order":150,"tags":["heart","white"],"unicode":"🤍"},{"annotation":"hundred points","group":0,"hexcode":"1F4AF","order":151,"tags":["100","full","hundred","score"],"unicode":"💯"},{"annotation":"anger symbol","group":0,"hexcode":"1F4A2","order":152,"tags":["angry","comic","mad"],"unicode":"💢"},{"annotation":"collision","group":0,"hexcode":"1F4A5","order":153,"tags":["boom","comic"],"unicode":"💥"},{"annotation":"dizzy","group":0,"hexcode":"1F4AB","order":154,"tags":["comic","star"],"unicode":"💫"},{"annotation":"sweat droplets","group":0,"hexcode":"1F4A6","order":155,"tags":["comic","splashing","sweat"],"unicode":"💦"},{"annotation":"dashing away","group":0,"hexcode":"1F4A8","order":156,"tags":["comic","dash","running"],"unicode":"💨"},{"annotation":"hole","group":0,"hexcode":"1F573","order":158,"tags":["hole"],"unicode":"🕳️"},{"annotation":"bomb","group":0,"hexcode":"1F4A3","order":159,"tags":["comic"],"unicode":"💣️"},{"annotation":"speech balloon","group":0,"hexcode":"1F4AC","order":160,"tags":["balloon","bubble","comic","dialog","speech"],"unicode":"💬"},{"annotation":"eye in speech bubble","group":0,"hexcode":"1F441-FE0F-200D-1F5E8-FE0F","order":161,"tags":["eye","speech bubble","witness"],"unicode":"👁️🗨️"},{"annotation":"left speech bubble","group":0,"hexcode":"1F5E8","order":166,"tags":["dialog","speech"],"unicode":"🗨️"},{"annotation":"right anger bubble","group":0,"hexcode":"1F5EF","order":168,"tags":["angry","balloon","bubble","mad"],"unicode":"🗯️"},{"annotation":"thought balloon","group":0,"hexcode":"1F4AD","order":169,"tags":["balloon","bubble","comic","thought"],"unicode":"💭"},{"annotation":"zzz","group":0,"hexcode":"1F4A4","order":170,"tags":["comic","sleep"],"unicode":"💤"},{"annotation":"waving hand","group":1,"hexcode":"1F44B","order":171,"tags":["hand","wave","waving"],"unicode":"👋","skins":[{"annotation":"waving hand: light skin tone","group":1,"hexcode":"1F44B-1F3FB","order":172,"unicode":"👋🏻"},{"annotation":"waving hand: medium-light skin tone","group":1,"hexcode":"1F44B-1F3FC","order":173,"unicode":"👋🏼"},{"annotation":"waving hand: medium skin tone","group":1,"hexcode":"1F44B-1F3FD","order":174,"unicode":"👋🏽"},{"annotation":"waving hand: medium-dark skin tone","group":1,"hexcode":"1F44B-1F3FE","order":175,"unicode":"👋🏾"},{"annotation":"waving hand: dark skin tone","group":1,"hexcode":"1F44B-1F3FF","order":176,"unicode":"👋🏿"}]},{"annotation":"raised back of hand","group":1,"hexcode":"1F91A","order":177,"tags":["backhand","raised"],"unicode":"🤚","skins":[{"annotation":"raised back of hand: light skin tone","group":1,"hexcode":"1F91A-1F3FB","order":178,"unicode":"🤚🏻"},{"annotation":"raised back of hand: medium-light skin tone","group":1,"hexcode":"1F91A-1F3FC","order":179,"unicode":"🤚🏼"},{"annotation":"raised back of hand: medium skin tone","group":1,"hexcode":"1F91A-1F3FD","order":180,"unicode":"🤚🏽"},{"annotation":"raised back of hand: medium-dark skin tone","group":1,"hexcode":"1F91A-1F3FE","order":181,"unicode":"🤚🏾"},{"annotation":"raised back of hand: dark skin tone","group":1,"hexcode":"1F91A-1F3FF","order":182,"unicode":"🤚🏿"}]},{"annotation":"hand with fingers splayed","group":1,"hexcode":"1F590","order":184,"tags":["finger","hand","splayed"],"unicode":"🖐️","skins":[{"annotation":"hand with fingers splayed: light skin tone","group":1,"hexcode":"1F590-1F3FB","order":185,"unicode":"🖐🏻"},{"annotation":"hand with fingers splayed: medium-light skin tone","group":1,"hexcode":"1F590-1F3FC","order":186,"unicode":"🖐🏼"},{"annotation":"hand with fingers splayed: medium skin tone","group":1,"hexcode":"1F590-1F3FD","order":187,"unicode":"🖐🏽"},{"annotation":"hand with fingers splayed: medium-dark skin tone","group":1,"hexcode":"1F590-1F3FE","order":188,"unicode":"🖐🏾"},{"annotation":"hand with fingers splayed: dark skin tone","group":1,"hexcode":"1F590-1F3FF","order":189,"unicode":"🖐🏿"}]},{"annotation":"raised hand","group":1,"hexcode":"270B","order":190,"tags":["hand","high 5","high five"],"unicode":"✋","skins":[{"annotation":"raised hand: light skin tone","group":1,"hexcode":"270B-1F3FB","order":191,"unicode":"✋🏻"},{"annotation":"raised hand: medium-light skin tone","group":1,"hexcode":"270B-1F3FC","order":192,"unicode":"✋🏼"},{"annotation":"raised hand: medium skin tone","group":1,"hexcode":"270B-1F3FD","order":193,"unicode":"✋🏽"},{"annotation":"raised hand: medium-dark skin tone","group":1,"hexcode":"270B-1F3FE","order":194,"unicode":"✋🏾"},{"annotation":"raised hand: dark skin tone","group":1,"hexcode":"270B-1F3FF","order":195,"unicode":"✋🏿"}]},{"annotation":"vulcan salute","group":1,"hexcode":"1F596","order":196,"tags":["finger","hand","spock","vulcan"],"unicode":"🖖","skins":[{"annotation":"vulcan salute: light skin tone","group":1,"hexcode":"1F596-1F3FB","order":197,"unicode":"🖖🏻"},{"annotation":"vulcan salute: medium-light skin tone","group":1,"hexcode":"1F596-1F3FC","order":198,"unicode":"🖖🏼"},{"annotation":"vulcan salute: medium skin tone","group":1,"hexcode":"1F596-1F3FD","order":199,"unicode":"🖖🏽"},{"annotation":"vulcan salute: medium-dark skin tone","group":1,"hexcode":"1F596-1F3FE","order":200,"unicode":"🖖🏾"},{"annotation":"vulcan salute: dark skin tone","group":1,"hexcode":"1F596-1F3FF","order":201,"unicode":"🖖🏿"}]},{"annotation":"OK hand","group":1,"hexcode":"1F44C","order":202,"tags":["hand","ok"],"unicode":"👌","skins":[{"annotation":"OK hand: light skin tone","group":1,"hexcode":"1F44C-1F3FB","order":203,"unicode":"👌🏻"},{"annotation":"OK hand: medium-light skin tone","group":1,"hexcode":"1F44C-1F3FC","order":204,"unicode":"👌🏼"},{"annotation":"OK hand: medium skin tone","group":1,"hexcode":"1F44C-1F3FD","order":205,"unicode":"👌🏽"},{"annotation":"OK hand: medium-dark skin tone","group":1,"hexcode":"1F44C-1F3FE","order":206,"unicode":"👌🏾"},{"annotation":"OK hand: dark skin tone","group":1,"hexcode":"1F44C-1F3FF","order":207,"unicode":"👌🏿"}]},{"annotation":"pinched fingers","group":1,"hexcode":"1F90C","order":208,"tags":["fingers","hand gesture","interrogation","pinched","sarcastic"],"unicode":"🤌","skins":[{"annotation":"pinched fingers: light skin tone","group":1,"hexcode":"1F90C-1F3FB","order":209,"unicode":"🤌🏻"},{"annotation":"pinched fingers: medium-light skin tone","group":1,"hexcode":"1F90C-1F3FC","order":210,"unicode":"🤌🏼"},{"annotation":"pinched fingers: medium skin tone","group":1,"hexcode":"1F90C-1F3FD","order":211,"unicode":"🤌🏽"},{"annotation":"pinched fingers: medium-dark skin tone","group":1,"hexcode":"1F90C-1F3FE","order":212,"unicode":"🤌🏾"},{"annotation":"pinched fingers: dark skin tone","group":1,"hexcode":"1F90C-1F3FF","order":213,"unicode":"🤌🏿"}]},{"annotation":"pinching hand","group":1,"hexcode":"1F90F","order":214,"tags":["small amount"],"unicode":"🤏","skins":[{"annotation":"pinching hand: light skin tone","group":1,"hexcode":"1F90F-1F3FB","order":215,"unicode":"🤏🏻"},{"annotation":"pinching hand: medium-light skin tone","group":1,"hexcode":"1F90F-1F3FC","order":216,"unicode":"🤏🏼"},{"annotation":"pinching hand: medium skin tone","group":1,"hexcode":"1F90F-1F3FD","order":217,"unicode":"🤏🏽"},{"annotation":"pinching hand: medium-dark skin tone","group":1,"hexcode":"1F90F-1F3FE","order":218,"unicode":"🤏🏾"},{"annotation":"pinching hand: dark skin tone","group":1,"hexcode":"1F90F-1F3FF","order":219,"unicode":"🤏🏿"}]},{"annotation":"victory hand","group":1,"hexcode":"270C","order":221,"tags":["hand","v","victory"],"unicode":"✌️","skins":[{"annotation":"victory hand: light skin tone","group":1,"hexcode":"270C-1F3FB","order":222,"unicode":"✌🏻"},{"annotation":"victory hand: medium-light skin tone","group":1,"hexcode":"270C-1F3FC","order":223,"unicode":"✌🏼"},{"annotation":"victory hand: medium skin tone","group":1,"hexcode":"270C-1F3FD","order":224,"unicode":"✌🏽"},{"annotation":"victory hand: medium-dark skin tone","group":1,"hexcode":"270C-1F3FE","order":225,"unicode":"✌🏾"},{"annotation":"victory hand: dark skin tone","group":1,"hexcode":"270C-1F3FF","order":226,"unicode":"✌🏿"}]},{"annotation":"crossed fingers","group":1,"hexcode":"1F91E","order":227,"tags":["cross","finger","hand","luck"],"unicode":"🤞","skins":[{"annotation":"crossed fingers: light skin tone","group":1,"hexcode":"1F91E-1F3FB","order":228,"unicode":"🤞🏻"},{"annotation":"crossed fingers: medium-light skin tone","group":1,"hexcode":"1F91E-1F3FC","order":229,"unicode":"🤞🏼"},{"annotation":"crossed fingers: medium skin tone","group":1,"hexcode":"1F91E-1F3FD","order":230,"unicode":"🤞🏽"},{"annotation":"crossed fingers: medium-dark skin tone","group":1,"hexcode":"1F91E-1F3FE","order":231,"unicode":"🤞🏾"},{"annotation":"crossed fingers: dark skin tone","group":1,"hexcode":"1F91E-1F3FF","order":232,"unicode":"🤞🏿"}]},{"annotation":"love-you gesture","group":1,"hexcode":"1F91F","order":233,"tags":["hand","ily"],"unicode":"🤟","skins":[{"annotation":"love-you gesture: light skin tone","group":1,"hexcode":"1F91F-1F3FB","order":234,"unicode":"🤟🏻"},{"annotation":"love-you gesture: medium-light skin tone","group":1,"hexcode":"1F91F-1F3FC","order":235,"unicode":"🤟🏼"},{"annotation":"love-you gesture: medium skin tone","group":1,"hexcode":"1F91F-1F3FD","order":236,"unicode":"🤟🏽"},{"annotation":"love-you gesture: medium-dark skin tone","group":1,"hexcode":"1F91F-1F3FE","order":237,"unicode":"🤟🏾"},{"annotation":"love-you gesture: dark skin tone","group":1,"hexcode":"1F91F-1F3FF","order":238,"unicode":"🤟🏿"}]},{"annotation":"sign of the horns","group":1,"hexcode":"1F918","order":239,"tags":["finger","hand","horns","rock-on"],"unicode":"🤘","emoticon":"\\\\m/","skins":[{"annotation":"sign of the horns: light skin tone","group":1,"hexcode":"1F918-1F3FB","order":240,"unicode":"🤘🏻"},{"annotation":"sign of the horns: medium-light skin tone","group":1,"hexcode":"1F918-1F3FC","order":241,"unicode":"🤘🏼"},{"annotation":"sign of the horns: medium skin tone","group":1,"hexcode":"1F918-1F3FD","order":242,"unicode":"🤘🏽"},{"annotation":"sign of the horns: medium-dark skin tone","group":1,"hexcode":"1F918-1F3FE","order":243,"unicode":"🤘🏾"},{"annotation":"sign of the horns: dark skin tone","group":1,"hexcode":"1F918-1F3FF","order":244,"unicode":"🤘🏿"}]},{"annotation":"call me hand","group":1,"hexcode":"1F919","order":245,"tags":["call","hand"],"unicode":"🤙","skins":[{"annotation":"call me hand: light skin tone","group":1,"hexcode":"1F919-1F3FB","order":246,"unicode":"🤙🏻"},{"annotation":"call me hand: medium-light skin tone","group":1,"hexcode":"1F919-1F3FC","order":247,"unicode":"🤙🏼"},{"annotation":"call me hand: medium skin tone","group":1,"hexcode":"1F919-1F3FD","order":248,"unicode":"🤙🏽"},{"annotation":"call me hand: medium-dark skin tone","group":1,"hexcode":"1F919-1F3FE","order":249,"unicode":"🤙🏾"},{"annotation":"call me hand: dark skin tone","group":1,"hexcode":"1F919-1F3FF","order":250,"unicode":"🤙🏿"}]},{"annotation":"backhand index pointing left","group":1,"hexcode":"1F448","order":251,"tags":["backhand","finger","hand","index","point"],"unicode":"👈️","skins":[{"annotation":"backhand index pointing left: light skin tone","group":1,"hexcode":"1F448-1F3FB","order":252,"unicode":"👈🏻"},{"annotation":"backhand index pointing left: medium-light skin tone","group":1,"hexcode":"1F448-1F3FC","order":253,"unicode":"👈🏼"},{"annotation":"backhand index pointing left: medium skin tone","group":1,"hexcode":"1F448-1F3FD","order":254,"unicode":"👈🏽"},{"annotation":"backhand index pointing left: medium-dark skin tone","group":1,"hexcode":"1F448-1F3FE","order":255,"unicode":"👈🏾"},{"annotation":"backhand index pointing left: dark skin tone","group":1,"hexcode":"1F448-1F3FF","order":256,"unicode":"👈🏿"}]},{"annotation":"backhand index pointing right","group":1,"hexcode":"1F449","order":257,"tags":["backhand","finger","hand","index","point"],"unicode":"👉️","skins":[{"annotation":"backhand index pointing right: light skin tone","group":1,"hexcode":"1F449-1F3FB","order":258,"unicode":"👉🏻"},{"annotation":"backhand index pointing right: medium-light skin tone","group":1,"hexcode":"1F449-1F3FC","order":259,"unicode":"👉🏼"},{"annotation":"backhand index pointing right: medium skin tone","group":1,"hexcode":"1F449-1F3FD","order":260,"unicode":"👉🏽"},{"annotation":"backhand index pointing right: medium-dark skin tone","group":1,"hexcode":"1F449-1F3FE","order":261,"unicode":"👉🏾"},{"annotation":"backhand index pointing right: dark skin tone","group":1,"hexcode":"1F449-1F3FF","order":262,"unicode":"👉🏿"}]},{"annotation":"backhand index pointing up","group":1,"hexcode":"1F446","order":263,"tags":["backhand","finger","hand","point","up"],"unicode":"👆️","skins":[{"annotation":"backhand index pointing up: light skin tone","group":1,"hexcode":"1F446-1F3FB","order":264,"unicode":"👆🏻"},{"annotation":"backhand index pointing up: medium-light skin tone","group":1,"hexcode":"1F446-1F3FC","order":265,"unicode":"👆🏼"},{"annotation":"backhand index pointing up: medium skin tone","group":1,"hexcode":"1F446-1F3FD","order":266,"unicode":"👆🏽"},{"annotation":"backhand index pointing up: medium-dark skin tone","group":1,"hexcode":"1F446-1F3FE","order":267,"unicode":"👆🏾"},{"annotation":"backhand index pointing up: dark skin tone","group":1,"hexcode":"1F446-1F3FF","order":268,"unicode":"👆🏿"}]},{"annotation":"middle finger","group":1,"hexcode":"1F595","order":269,"tags":["finger","hand"],"unicode":"🖕","skins":[{"annotation":"middle finger: light skin tone","group":1,"hexcode":"1F595-1F3FB","order":270,"unicode":"🖕🏻"},{"annotation":"middle finger: medium-light skin tone","group":1,"hexcode":"1F595-1F3FC","order":271,"unicode":"🖕🏼"},{"annotation":"middle finger: medium skin tone","group":1,"hexcode":"1F595-1F3FD","order":272,"unicode":"🖕🏽"},{"annotation":"middle finger: medium-dark skin tone","group":1,"hexcode":"1F595-1F3FE","order":273,"unicode":"🖕🏾"},{"annotation":"middle finger: dark skin tone","group":1,"hexcode":"1F595-1F3FF","order":274,"unicode":"🖕🏿"}]},{"annotation":"backhand index pointing down","group":1,"hexcode":"1F447","order":275,"tags":["backhand","down","finger","hand","point"],"unicode":"👇️","skins":[{"annotation":"backhand index pointing down: light skin tone","group":1,"hexcode":"1F447-1F3FB","order":276,"unicode":"👇🏻"},{"annotation":"backhand index pointing down: medium-light skin tone","group":1,"hexcode":"1F447-1F3FC","order":277,"unicode":"👇🏼"},{"annotation":"backhand index pointing down: medium skin tone","group":1,"hexcode":"1F447-1F3FD","order":278,"unicode":"👇🏽"},{"annotation":"backhand index pointing down: medium-dark skin tone","group":1,"hexcode":"1F447-1F3FE","order":279,"unicode":"👇🏾"},{"annotation":"backhand index pointing down: dark skin tone","group":1,"hexcode":"1F447-1F3FF","order":280,"unicode":"👇🏿"}]},{"annotation":"index pointing up","group":1,"hexcode":"261D","order":282,"tags":["finger","hand","index","point","up"],"unicode":"☝️","skins":[{"annotation":"index pointing up: light skin tone","group":1,"hexcode":"261D-1F3FB","order":283,"unicode":"☝🏻"},{"annotation":"index pointing up: medium-light skin tone","group":1,"hexcode":"261D-1F3FC","order":284,"unicode":"☝🏼"},{"annotation":"index pointing up: medium skin tone","group":1,"hexcode":"261D-1F3FD","order":285,"unicode":"☝🏽"},{"annotation":"index pointing up: medium-dark skin tone","group":1,"hexcode":"261D-1F3FE","order":286,"unicode":"☝🏾"},{"annotation":"index pointing up: dark skin tone","group":1,"hexcode":"261D-1F3FF","order":287,"unicode":"☝🏿"}]},{"annotation":"thumbs up","group":1,"hexcode":"1F44D","order":288,"tags":["+1","hand","thumb","up"],"unicode":"👍️","skins":[{"annotation":"thumbs up: light skin tone","group":1,"hexcode":"1F44D-1F3FB","order":289,"unicode":"👍🏻"},{"annotation":"thumbs up: medium-light skin tone","group":1,"hexcode":"1F44D-1F3FC","order":290,"unicode":"👍🏼"},{"annotation":"thumbs up: medium skin tone","group":1,"hexcode":"1F44D-1F3FD","order":291,"unicode":"👍🏽"},{"annotation":"thumbs up: medium-dark skin tone","group":1,"hexcode":"1F44D-1F3FE","order":292,"unicode":"👍🏾"},{"annotation":"thumbs up: dark skin tone","group":1,"hexcode":"1F44D-1F3FF","order":293,"unicode":"👍🏿"}]},{"annotation":"thumbs down","group":1,"hexcode":"1F44E","order":294,"tags":["-1","down","hand","thumb"],"unicode":"👎️","skins":[{"annotation":"thumbs down: light skin tone","group":1,"hexcode":"1F44E-1F3FB","order":295,"unicode":"👎🏻"},{"annotation":"thumbs down: medium-light skin tone","group":1,"hexcode":"1F44E-1F3FC","order":296,"unicode":"👎🏼"},{"annotation":"thumbs down: medium skin tone","group":1,"hexcode":"1F44E-1F3FD","order":297,"unicode":"👎🏽"},{"annotation":"thumbs down: medium-dark skin tone","group":1,"hexcode":"1F44E-1F3FE","order":298,"unicode":"👎🏾"},{"annotation":"thumbs down: dark skin tone","group":1,"hexcode":"1F44E-1F3FF","order":299,"unicode":"👎🏿"}]},{"annotation":"raised fist","group":1,"hexcode":"270A","order":300,"tags":["clenched","fist","hand","punch"],"unicode":"✊","skins":[{"annotation":"raised fist: light skin tone","group":1,"hexcode":"270A-1F3FB","order":301,"unicode":"✊🏻"},{"annotation":"raised fist: medium-light skin tone","group":1,"hexcode":"270A-1F3FC","order":302,"unicode":"✊🏼"},{"annotation":"raised fist: medium skin tone","group":1,"hexcode":"270A-1F3FD","order":303,"unicode":"✊🏽"},{"annotation":"raised fist: medium-dark skin tone","group":1,"hexcode":"270A-1F3FE","order":304,"unicode":"✊🏾"},{"annotation":"raised fist: dark skin tone","group":1,"hexcode":"270A-1F3FF","order":305,"unicode":"✊🏿"}]},{"annotation":"oncoming fist","group":1,"hexcode":"1F44A","order":306,"tags":["clenched","fist","hand","punch"],"unicode":"👊","skins":[{"annotation":"oncoming fist: light skin tone","group":1,"hexcode":"1F44A-1F3FB","order":307,"unicode":"👊🏻"},{"annotation":"oncoming fist: medium-light skin tone","group":1,"hexcode":"1F44A-1F3FC","order":308,"unicode":"👊🏼"},{"annotation":"oncoming fist: medium skin tone","group":1,"hexcode":"1F44A-1F3FD","order":309,"unicode":"👊🏽"},{"annotation":"oncoming fist: medium-dark skin tone","group":1,"hexcode":"1F44A-1F3FE","order":310,"unicode":"👊🏾"},{"annotation":"oncoming fist: dark skin tone","group":1,"hexcode":"1F44A-1F3FF","order":311,"unicode":"👊🏿"}]},{"annotation":"left-facing fist","group":1,"hexcode":"1F91B","order":312,"tags":["fist","leftwards"],"unicode":"🤛","skins":[{"annotation":"left-facing fist: light skin tone","group":1,"hexcode":"1F91B-1F3FB","order":313,"unicode":"🤛🏻"},{"annotation":"left-facing fist: medium-light skin tone","group":1,"hexcode":"1F91B-1F3FC","order":314,"unicode":"🤛🏼"},{"annotation":"left-facing fist: medium skin tone","group":1,"hexcode":"1F91B-1F3FD","order":315,"unicode":"🤛🏽"},{"annotation":"left-facing fist: medium-dark skin tone","group":1,"hexcode":"1F91B-1F3FE","order":316,"unicode":"🤛🏾"},{"annotation":"left-facing fist: dark skin tone","group":1,"hexcode":"1F91B-1F3FF","order":317,"unicode":"🤛🏿"}]},{"annotation":"right-facing fist","group":1,"hexcode":"1F91C","order":318,"tags":["fist","rightwards"],"unicode":"🤜","skins":[{"annotation":"right-facing fist: light skin tone","group":1,"hexcode":"1F91C-1F3FB","order":319,"unicode":"🤜🏻"},{"annotation":"right-facing fist: medium-light skin tone","group":1,"hexcode":"1F91C-1F3FC","order":320,"unicode":"🤜🏼"},{"annotation":"right-facing fist: medium skin tone","group":1,"hexcode":"1F91C-1F3FD","order":321,"unicode":"🤜🏽"},{"annotation":"right-facing fist: medium-dark skin tone","group":1,"hexcode":"1F91C-1F3FE","order":322,"unicode":"🤜🏾"},{"annotation":"right-facing fist: dark skin tone","group":1,"hexcode":"1F91C-1F3FF","order":323,"unicode":"🤜🏿"}]},{"annotation":"clapping hands","group":1,"hexcode":"1F44F","order":324,"tags":["clap","hand"],"unicode":"👏","skins":[{"annotation":"clapping hands: light skin tone","group":1,"hexcode":"1F44F-1F3FB","order":325,"unicode":"👏🏻"},{"annotation":"clapping hands: medium-light skin tone","group":1,"hexcode":"1F44F-1F3FC","order":326,"unicode":"👏🏼"},{"annotation":"clapping hands: medium skin tone","group":1,"hexcode":"1F44F-1F3FD","order":327,"unicode":"👏🏽"},{"annotation":"clapping hands: medium-dark skin tone","group":1,"hexcode":"1F44F-1F3FE","order":328,"unicode":"👏🏾"},{"annotation":"clapping hands: dark skin tone","group":1,"hexcode":"1F44F-1F3FF","order":329,"unicode":"👏🏿"}]},{"annotation":"raising hands","group":1,"hexcode":"1F64C","order":330,"tags":["celebration","gesture","hand","hooray","raised"],"unicode":"🙌","skins":[{"annotation":"raising hands: light skin tone","group":1,"hexcode":"1F64C-1F3FB","order":331,"unicode":"🙌🏻"},{"annotation":"raising hands: medium-light skin tone","group":1,"hexcode":"1F64C-1F3FC","order":332,"unicode":"🙌🏼"},{"annotation":"raising hands: medium skin tone","group":1,"hexcode":"1F64C-1F3FD","order":333,"unicode":"🙌🏽"},{"annotation":"raising hands: medium-dark skin tone","group":1,"hexcode":"1F64C-1F3FE","order":334,"unicode":"🙌🏾"},{"annotation":"raising hands: dark skin tone","group":1,"hexcode":"1F64C-1F3FF","order":335,"unicode":"🙌🏿"}]},{"annotation":"open hands","group":1,"hexcode":"1F450","order":336,"tags":["hand","open"],"unicode":"👐","skins":[{"annotation":"open hands: light skin tone","group":1,"hexcode":"1F450-1F3FB","order":337,"unicode":"👐🏻"},{"annotation":"open hands: medium-light skin tone","group":1,"hexcode":"1F450-1F3FC","order":338,"unicode":"👐🏼"},{"annotation":"open hands: medium skin tone","group":1,"hexcode":"1F450-1F3FD","order":339,"unicode":"👐🏽"},{"annotation":"open hands: medium-dark skin tone","group":1,"hexcode":"1F450-1F3FE","order":340,"unicode":"👐🏾"},{"annotation":"open hands: dark skin tone","group":1,"hexcode":"1F450-1F3FF","order":341,"unicode":"👐🏿"}]},{"annotation":"palms up together","group":1,"hexcode":"1F932","order":342,"tags":["prayer"],"unicode":"🤲","skins":[{"annotation":"palms up together: light skin tone","group":1,"hexcode":"1F932-1F3FB","order":343,"unicode":"🤲🏻"},{"annotation":"palms up together: medium-light skin tone","group":1,"hexcode":"1F932-1F3FC","order":344,"unicode":"🤲🏼"},{"annotation":"palms up together: medium skin tone","group":1,"hexcode":"1F932-1F3FD","order":345,"unicode":"🤲🏽"},{"annotation":"palms up together: medium-dark skin tone","group":1,"hexcode":"1F932-1F3FE","order":346,"unicode":"🤲🏾"},{"annotation":"palms up together: dark skin tone","group":1,"hexcode":"1F932-1F3FF","order":347,"unicode":"🤲🏿"}]},{"annotation":"handshake","group":1,"hexcode":"1F91D","order":348,"tags":["agreement","hand","meeting","shake"],"unicode":"🤝"},{"annotation":"folded hands","group":1,"hexcode":"1F64F","order":349,"tags":["ask","hand","high 5","high five","please","pray","thanks"],"unicode":"🙏","skins":[{"annotation":"folded hands: light skin tone","group":1,"hexcode":"1F64F-1F3FB","order":350,"unicode":"🙏🏻"},{"annotation":"folded hands: medium-light skin tone","group":1,"hexcode":"1F64F-1F3FC","order":351,"unicode":"🙏🏼"},{"annotation":"folded hands: medium skin tone","group":1,"hexcode":"1F64F-1F3FD","order":352,"unicode":"🙏🏽"},{"annotation":"folded hands: medium-dark skin tone","group":1,"hexcode":"1F64F-1F3FE","order":353,"unicode":"🙏🏾"},{"annotation":"folded hands: dark skin tone","group":1,"hexcode":"1F64F-1F3FF","order":354,"unicode":"🙏🏿"}]},{"annotation":"writing hand","group":1,"hexcode":"270D","order":356,"tags":["hand","write"],"unicode":"✍️","skins":[{"annotation":"writing hand: light skin tone","group":1,"hexcode":"270D-1F3FB","order":357,"unicode":"✍🏻"},{"annotation":"writing hand: medium-light skin tone","group":1,"hexcode":"270D-1F3FC","order":358,"unicode":"✍🏼"},{"annotation":"writing hand: medium skin tone","group":1,"hexcode":"270D-1F3FD","order":359,"unicode":"✍🏽"},{"annotation":"writing hand: medium-dark skin tone","group":1,"hexcode":"270D-1F3FE","order":360,"unicode":"✍🏾"},{"annotation":"writing hand: dark skin tone","group":1,"hexcode":"270D-1F3FF","order":361,"unicode":"✍🏿"}]},{"annotation":"nail polish","group":1,"hexcode":"1F485","order":362,"tags":["care","cosmetics","manicure","nail","polish"],"unicode":"💅","skins":[{"annotation":"nail polish: light skin tone","group":1,"hexcode":"1F485-1F3FB","order":363,"unicode":"💅🏻"},{"annotation":"nail polish: medium-light skin tone","group":1,"hexcode":"1F485-1F3FC","order":364,"unicode":"💅🏼"},{"annotation":"nail polish: medium skin tone","group":1,"hexcode":"1F485-1F3FD","order":365,"unicode":"💅🏽"},{"annotation":"nail polish: medium-dark skin tone","group":1,"hexcode":"1F485-1F3FE","order":366,"unicode":"💅🏾"},{"annotation":"nail polish: dark skin tone","group":1,"hexcode":"1F485-1F3FF","order":367,"unicode":"💅🏿"}]},{"annotation":"selfie","group":1,"hexcode":"1F933","order":368,"tags":["camera","phone"],"unicode":"🤳","skins":[{"annotation":"selfie: light skin tone","group":1,"hexcode":"1F933-1F3FB","order":369,"unicode":"🤳🏻"},{"annotation":"selfie: medium-light skin tone","group":1,"hexcode":"1F933-1F3FC","order":370,"unicode":"🤳🏼"},{"annotation":"selfie: medium skin tone","group":1,"hexcode":"1F933-1F3FD","order":371,"unicode":"🤳🏽"},{"annotation":"selfie: medium-dark skin tone","group":1,"hexcode":"1F933-1F3FE","order":372,"unicode":"🤳🏾"},{"annotation":"selfie: dark skin tone","group":1,"hexcode":"1F933-1F3FF","order":373,"unicode":"🤳🏿"}]},{"annotation":"flexed biceps","group":1,"hexcode":"1F4AA","order":374,"tags":["biceps","comic","flex","muscle"],"unicode":"💪","skins":[{"annotation":"flexed biceps: light skin tone","group":1,"hexcode":"1F4AA-1F3FB","order":375,"unicode":"💪🏻"},{"annotation":"flexed biceps: medium-light skin tone","group":1,"hexcode":"1F4AA-1F3FC","order":376,"unicode":"💪🏼"},{"annotation":"flexed biceps: medium skin tone","group":1,"hexcode":"1F4AA-1F3FD","order":377,"unicode":"💪🏽"},{"annotation":"flexed biceps: medium-dark skin tone","group":1,"hexcode":"1F4AA-1F3FE","order":378,"unicode":"💪🏾"},{"annotation":"flexed biceps: dark skin tone","group":1,"hexcode":"1F4AA-1F3FF","order":379,"unicode":"💪🏿"}]},{"annotation":"mechanical arm","group":1,"hexcode":"1F9BE","order":380,"tags":["accessibility","prosthetic"],"unicode":"🦾"},{"annotation":"mechanical leg","group":1,"hexcode":"1F9BF","order":381,"tags":["accessibility","prosthetic"],"unicode":"🦿"},{"annotation":"leg","group":1,"hexcode":"1F9B5","order":382,"tags":["kick","limb"],"unicode":"🦵","skins":[{"annotation":"leg: light skin tone","group":1,"hexcode":"1F9B5-1F3FB","order":383,"unicode":"🦵🏻"},{"annotation":"leg: medium-light skin tone","group":1,"hexcode":"1F9B5-1F3FC","order":384,"unicode":"🦵🏼"},{"annotation":"leg: medium skin tone","group":1,"hexcode":"1F9B5-1F3FD","order":385,"unicode":"🦵🏽"},{"annotation":"leg: medium-dark skin tone","group":1,"hexcode":"1F9B5-1F3FE","order":386,"unicode":"🦵🏾"},{"annotation":"leg: dark skin tone","group":1,"hexcode":"1F9B5-1F3FF","order":387,"unicode":"🦵🏿"}]},{"annotation":"foot","group":1,"hexcode":"1F9B6","order":388,"tags":["kick","stomp"],"unicode":"🦶","skins":[{"annotation":"foot: light skin tone","group":1,"hexcode":"1F9B6-1F3FB","order":389,"unicode":"🦶🏻"},{"annotation":"foot: medium-light skin tone","group":1,"hexcode":"1F9B6-1F3FC","order":390,"unicode":"🦶🏼"},{"annotation":"foot: medium skin tone","group":1,"hexcode":"1F9B6-1F3FD","order":391,"unicode":"🦶🏽"},{"annotation":"foot: medium-dark skin tone","group":1,"hexcode":"1F9B6-1F3FE","order":392,"unicode":"🦶🏾"},{"annotation":"foot: dark skin tone","group":1,"hexcode":"1F9B6-1F3FF","order":393,"unicode":"🦶🏿"}]},{"annotation":"ear","group":1,"hexcode":"1F442","order":394,"tags":["body"],"unicode":"👂️","skins":[{"annotation":"ear: light skin tone","group":1,"hexcode":"1F442-1F3FB","order":395,"unicode":"👂🏻"},{"annotation":"ear: medium-light skin tone","group":1,"hexcode":"1F442-1F3FC","order":396,"unicode":"👂🏼"},{"annotation":"ear: medium skin tone","group":1,"hexcode":"1F442-1F3FD","order":397,"unicode":"👂🏽"},{"annotation":"ear: medium-dark skin tone","group":1,"hexcode":"1F442-1F3FE","order":398,"unicode":"👂🏾"},{"annotation":"ear: dark skin tone","group":1,"hexcode":"1F442-1F3FF","order":399,"unicode":"👂🏿"}]},{"annotation":"ear with hearing aid","group":1,"hexcode":"1F9BB","order":400,"tags":["accessibility","hard of hearing"],"unicode":"🦻","skins":[{"annotation":"ear with hearing aid: light skin tone","group":1,"hexcode":"1F9BB-1F3FB","order":401,"unicode":"🦻🏻"},{"annotation":"ear with hearing aid: medium-light skin tone","group":1,"hexcode":"1F9BB-1F3FC","order":402,"unicode":"🦻🏼"},{"annotation":"ear with hearing aid: medium skin tone","group":1,"hexcode":"1F9BB-1F3FD","order":403,"unicode":"🦻🏽"},{"annotation":"ear with hearing aid: medium-dark skin tone","group":1,"hexcode":"1F9BB-1F3FE","order":404,"unicode":"🦻🏾"},{"annotation":"ear with hearing aid: dark skin tone","group":1,"hexcode":"1F9BB-1F3FF","order":405,"unicode":"🦻🏿"}]},{"annotation":"nose","group":1,"hexcode":"1F443","order":406,"tags":["body"],"unicode":"👃","skins":[{"annotation":"nose: light skin tone","group":1,"hexcode":"1F443-1F3FB","order":407,"unicode":"👃🏻"},{"annotation":"nose: medium-light skin tone","group":1,"hexcode":"1F443-1F3FC","order":408,"unicode":"👃🏼"},{"annotation":"nose: medium skin tone","group":1,"hexcode":"1F443-1F3FD","order":409,"unicode":"👃🏽"},{"annotation":"nose: medium-dark skin tone","group":1,"hexcode":"1F443-1F3FE","order":410,"unicode":"👃🏾"},{"annotation":"nose: dark skin tone","group":1,"hexcode":"1F443-1F3FF","order":411,"unicode":"👃🏿"}]},{"annotation":"brain","group":1,"hexcode":"1F9E0","order":412,"tags":["intelligent"],"unicode":"🧠"},{"annotation":"anatomical heart","group":1,"hexcode":"1FAC0","order":413,"tags":["anatomical","cardiology","heart","organ","pulse"],"unicode":"🫀"},{"annotation":"lungs","group":1,"hexcode":"1FAC1","order":414,"tags":["breath","exhalation","inhalation","organ","respiration"],"unicode":"🫁"},{"annotation":"tooth","group":1,"hexcode":"1F9B7","order":415,"tags":["dentist"],"unicode":"🦷"},{"annotation":"bone","group":1,"hexcode":"1F9B4","order":416,"tags":["skeleton"],"unicode":"🦴"},{"annotation":"eyes","group":1,"hexcode":"1F440","order":417,"tags":["eye","face"],"unicode":"👀"},{"annotation":"eye","group":1,"hexcode":"1F441","order":419,"tags":["body"],"unicode":"👁️"},{"annotation":"tongue","group":1,"hexcode":"1F445","order":420,"tags":["body"],"unicode":"👅"},{"annotation":"mouth","group":1,"hexcode":"1F444","order":421,"tags":["lips"],"unicode":"👄"},{"annotation":"baby","group":1,"hexcode":"1F476","order":422,"tags":["young"],"unicode":"👶","skins":[{"annotation":"baby: light skin tone","group":1,"hexcode":"1F476-1F3FB","order":423,"unicode":"👶🏻"},{"annotation":"baby: medium-light skin tone","group":1,"hexcode":"1F476-1F3FC","order":424,"unicode":"👶🏼"},{"annotation":"baby: medium skin tone","group":1,"hexcode":"1F476-1F3FD","order":425,"unicode":"👶🏽"},{"annotation":"baby: medium-dark skin tone","group":1,"hexcode":"1F476-1F3FE","order":426,"unicode":"👶🏾"},{"annotation":"baby: dark skin tone","group":1,"hexcode":"1F476-1F3FF","order":427,"unicode":"👶🏿"}]},{"annotation":"child","group":1,"hexcode":"1F9D2","order":428,"tags":["gender-neutral","unspecified gender","young"],"unicode":"🧒","skins":[{"annotation":"child: light skin tone","group":1,"hexcode":"1F9D2-1F3FB","order":429,"unicode":"🧒🏻"},{"annotation":"child: medium-light skin tone","group":1,"hexcode":"1F9D2-1F3FC","order":430,"unicode":"🧒🏼"},{"annotation":"child: medium skin tone","group":1,"hexcode":"1F9D2-1F3FD","order":431,"unicode":"🧒🏽"},{"annotation":"child: medium-dark skin tone","group":1,"hexcode":"1F9D2-1F3FE","order":432,"unicode":"🧒🏾"},{"annotation":"child: dark skin tone","group":1,"hexcode":"1F9D2-1F3FF","order":433,"unicode":"🧒🏿"}]},{"annotation":"boy","group":1,"hexcode":"1F466","order":434,"tags":["young"],"unicode":"👦","skins":[{"annotation":"boy: light skin tone","group":1,"hexcode":"1F466-1F3FB","order":435,"unicode":"👦🏻"},{"annotation":"boy: medium-light skin tone","group":1,"hexcode":"1F466-1F3FC","order":436,"unicode":"👦🏼"},{"annotation":"boy: medium skin tone","group":1,"hexcode":"1F466-1F3FD","order":437,"unicode":"👦🏽"},{"annotation":"boy: medium-dark skin tone","group":1,"hexcode":"1F466-1F3FE","order":438,"unicode":"👦🏾"},{"annotation":"boy: dark skin tone","group":1,"hexcode":"1F466-1F3FF","order":439,"unicode":"👦🏿"}]},{"annotation":"girl","group":1,"hexcode":"1F467","order":440,"tags":["virgo","young","zodiac"],"unicode":"👧","skins":[{"annotation":"girl: light skin tone","group":1,"hexcode":"1F467-1F3FB","order":441,"unicode":"👧🏻"},{"annotation":"girl: medium-light skin tone","group":1,"hexcode":"1F467-1F3FC","order":442,"unicode":"👧🏼"},{"annotation":"girl: medium skin tone","group":1,"hexcode":"1F467-1F3FD","order":443,"unicode":"👧🏽"},{"annotation":"girl: medium-dark skin tone","group":1,"hexcode":"1F467-1F3FE","order":444,"unicode":"👧🏾"},{"annotation":"girl: dark skin tone","group":1,"hexcode":"1F467-1F3FF","order":445,"unicode":"👧🏿"}]},{"annotation":"person","group":1,"hexcode":"1F9D1","order":446,"tags":["adult","gender-neutral","unspecified gender"],"unicode":"🧑","skins":[{"annotation":"person: light skin tone","group":1,"hexcode":"1F9D1-1F3FB","order":447,"unicode":"🧑🏻"},{"annotation":"person: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC","order":448,"unicode":"🧑🏼"},{"annotation":"person: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD","order":449,"unicode":"🧑🏽"},{"annotation":"person: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE","order":450,"unicode":"🧑🏾"},{"annotation":"person: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF","order":451,"unicode":"🧑🏿"}]},{"annotation":"person: blond hair","group":1,"hexcode":"1F471","order":452,"tags":["blond","blond-haired person","hair"],"unicode":"👱","skins":[{"annotation":"person: light skin tone, blond hair","group":1,"hexcode":"1F471-1F3FB","order":453,"unicode":"👱🏻"},{"annotation":"person: medium-light skin tone, blond hair","group":1,"hexcode":"1F471-1F3FC","order":454,"unicode":"👱🏼"},{"annotation":"person: medium skin tone, blond hair","group":1,"hexcode":"1F471-1F3FD","order":455,"unicode":"👱🏽"},{"annotation":"person: medium-dark skin tone, blond hair","group":1,"hexcode":"1F471-1F3FE","order":456,"unicode":"👱🏾"},{"annotation":"person: dark skin tone, blond hair","group":1,"hexcode":"1F471-1F3FF","order":457,"unicode":"👱🏿"}]},{"annotation":"man","group":1,"hexcode":"1F468","order":458,"tags":["adult"],"unicode":"👨","skins":[{"annotation":"man: light skin tone","group":1,"hexcode":"1F468-1F3FB","order":459,"unicode":"👨🏻"},{"annotation":"man: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC","order":460,"unicode":"👨🏼"},{"annotation":"man: medium skin tone","group":1,"hexcode":"1F468-1F3FD","order":461,"unicode":"👨🏽"},{"annotation":"man: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE","order":462,"unicode":"👨🏾"},{"annotation":"man: dark skin tone","group":1,"hexcode":"1F468-1F3FF","order":463,"unicode":"👨🏿"}]},{"annotation":"person: beard","group":1,"hexcode":"1F9D4","order":464,"tags":["beard","person"],"unicode":"🧔","skins":[{"annotation":"person: light skin tone, beard","group":1,"hexcode":"1F9D4-1F3FB","order":465,"unicode":"🧔🏻"},{"annotation":"person: medium-light skin tone, beard","group":1,"hexcode":"1F9D4-1F3FC","order":466,"unicode":"🧔🏼"},{"annotation":"person: medium skin tone, beard","group":1,"hexcode":"1F9D4-1F3FD","order":467,"unicode":"🧔🏽"},{"annotation":"person: medium-dark skin tone, beard","group":1,"hexcode":"1F9D4-1F3FE","order":468,"unicode":"🧔🏾"},{"annotation":"person: dark skin tone, beard","group":1,"hexcode":"1F9D4-1F3FF","order":469,"unicode":"🧔🏿"}]},{"annotation":"man: beard","group":1,"hexcode":"1F9D4-200D-2642-FE0F","order":470,"tags":["beard","man"],"unicode":"🧔♂️","skins":[{"annotation":"man: light skin tone, beard","group":1,"hexcode":"1F9D4-1F3FB-200D-2642-FE0F","order":472,"unicode":"🧔🏻♂️"},{"annotation":"man: medium-light skin tone, beard","group":1,"hexcode":"1F9D4-1F3FC-200D-2642-FE0F","order":474,"unicode":"🧔🏼♂️"},{"annotation":"man: medium skin tone, beard","group":1,"hexcode":"1F9D4-1F3FD-200D-2642-FE0F","order":476,"unicode":"🧔🏽♂️"},{"annotation":"man: medium-dark skin tone, beard","group":1,"hexcode":"1F9D4-1F3FE-200D-2642-FE0F","order":478,"unicode":"🧔🏾♂️"},{"annotation":"man: dark skin tone, beard","group":1,"hexcode":"1F9D4-1F3FF-200D-2642-FE0F","order":480,"unicode":"🧔🏿♂️"}]},{"annotation":"woman: beard","group":1,"hexcode":"1F9D4-200D-2640-FE0F","order":482,"tags":["beard","woman"],"unicode":"🧔♀️","skins":[{"annotation":"woman: light skin tone, beard","group":1,"hexcode":"1F9D4-1F3FB-200D-2640-FE0F","order":484,"unicode":"🧔🏻♀️"},{"annotation":"woman: medium-light skin tone, beard","group":1,"hexcode":"1F9D4-1F3FC-200D-2640-FE0F","order":486,"unicode":"🧔🏼♀️"},{"annotation":"woman: medium skin tone, beard","group":1,"hexcode":"1F9D4-1F3FD-200D-2640-FE0F","order":488,"unicode":"🧔🏽♀️"},{"annotation":"woman: medium-dark skin tone, beard","group":1,"hexcode":"1F9D4-1F3FE-200D-2640-FE0F","order":490,"unicode":"🧔🏾♀️"},{"annotation":"woman: dark skin tone, beard","group":1,"hexcode":"1F9D4-1F3FF-200D-2640-FE0F","order":492,"unicode":"🧔🏿♀️"}]},{"annotation":"man: red hair","group":1,"hexcode":"1F468-200D-1F9B0","order":494,"tags":["adult","man","red hair"],"unicode":"👨🦰","skins":[{"annotation":"man: light skin tone, red hair","group":1,"hexcode":"1F468-1F3FB-200D-1F9B0","order":495,"unicode":"👨🏻🦰"},{"annotation":"man: medium-light skin tone, red hair","group":1,"hexcode":"1F468-1F3FC-200D-1F9B0","order":496,"unicode":"👨🏼🦰"},{"annotation":"man: medium skin tone, red hair","group":1,"hexcode":"1F468-1F3FD-200D-1F9B0","order":497,"unicode":"👨🏽🦰"},{"annotation":"man: medium-dark skin tone, red hair","group":1,"hexcode":"1F468-1F3FE-200D-1F9B0","order":498,"unicode":"👨🏾🦰"},{"annotation":"man: dark skin tone, red hair","group":1,"hexcode":"1F468-1F3FF-200D-1F9B0","order":499,"unicode":"👨🏿🦰"}]},{"annotation":"man: curly hair","group":1,"hexcode":"1F468-200D-1F9B1","order":500,"tags":["adult","curly hair","man"],"unicode":"👨🦱","skins":[{"annotation":"man: light skin tone, curly hair","group":1,"hexcode":"1F468-1F3FB-200D-1F9B1","order":501,"unicode":"👨🏻🦱"},{"annotation":"man: medium-light skin tone, curly hair","group":1,"hexcode":"1F468-1F3FC-200D-1F9B1","order":502,"unicode":"👨🏼🦱"},{"annotation":"man: medium skin tone, curly hair","group":1,"hexcode":"1F468-1F3FD-200D-1F9B1","order":503,"unicode":"👨🏽🦱"},{"annotation":"man: medium-dark skin tone, curly hair","group":1,"hexcode":"1F468-1F3FE-200D-1F9B1","order":504,"unicode":"👨🏾🦱"},{"annotation":"man: dark skin tone, curly hair","group":1,"hexcode":"1F468-1F3FF-200D-1F9B1","order":505,"unicode":"👨🏿🦱"}]},{"annotation":"man: white hair","group":1,"hexcode":"1F468-200D-1F9B3","order":506,"tags":["adult","man","white hair"],"unicode":"👨🦳","skins":[{"annotation":"man: light skin tone, white hair","group":1,"hexcode":"1F468-1F3FB-200D-1F9B3","order":507,"unicode":"👨🏻🦳"},{"annotation":"man: medium-light skin tone, white hair","group":1,"hexcode":"1F468-1F3FC-200D-1F9B3","order":508,"unicode":"👨🏼🦳"},{"annotation":"man: medium skin tone, white hair","group":1,"hexcode":"1F468-1F3FD-200D-1F9B3","order":509,"unicode":"👨🏽🦳"},{"annotation":"man: medium-dark skin tone, white hair","group":1,"hexcode":"1F468-1F3FE-200D-1F9B3","order":510,"unicode":"👨🏾🦳"},{"annotation":"man: dark skin tone, white hair","group":1,"hexcode":"1F468-1F3FF-200D-1F9B3","order":511,"unicode":"👨🏿🦳"}]},{"annotation":"man: bald","group":1,"hexcode":"1F468-200D-1F9B2","order":512,"tags":["adult","bald","man"],"unicode":"👨🦲","skins":[{"annotation":"man: light skin tone, bald","group":1,"hexcode":"1F468-1F3FB-200D-1F9B2","order":513,"unicode":"👨🏻🦲"},{"annotation":"man: medium-light skin tone, bald","group":1,"hexcode":"1F468-1F3FC-200D-1F9B2","order":514,"unicode":"👨🏼🦲"},{"annotation":"man: medium skin tone, bald","group":1,"hexcode":"1F468-1F3FD-200D-1F9B2","order":515,"unicode":"👨🏽🦲"},{"annotation":"man: medium-dark skin tone, bald","group":1,"hexcode":"1F468-1F3FE-200D-1F9B2","order":516,"unicode":"👨🏾🦲"},{"annotation":"man: dark skin tone, bald","group":1,"hexcode":"1F468-1F3FF-200D-1F9B2","order":517,"unicode":"👨🏿🦲"}]},{"annotation":"woman","group":1,"hexcode":"1F469","order":518,"tags":["adult"],"unicode":"👩","skins":[{"annotation":"woman: light skin tone","group":1,"hexcode":"1F469-1F3FB","order":519,"unicode":"👩🏻"},{"annotation":"woman: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC","order":520,"unicode":"👩🏼"},{"annotation":"woman: medium skin tone","group":1,"hexcode":"1F469-1F3FD","order":521,"unicode":"👩🏽"},{"annotation":"woman: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE","order":522,"unicode":"👩🏾"},{"annotation":"woman: dark skin tone","group":1,"hexcode":"1F469-1F3FF","order":523,"unicode":"👩🏿"}]},{"annotation":"woman: red hair","group":1,"hexcode":"1F469-200D-1F9B0","order":524,"tags":["adult","red hair","woman"],"unicode":"👩🦰","skins":[{"annotation":"woman: light skin tone, red hair","group":1,"hexcode":"1F469-1F3FB-200D-1F9B0","order":525,"unicode":"👩🏻🦰"},{"annotation":"woman: medium-light skin tone, red hair","group":1,"hexcode":"1F469-1F3FC-200D-1F9B0","order":526,"unicode":"👩🏼🦰"},{"annotation":"woman: medium skin tone, red hair","group":1,"hexcode":"1F469-1F3FD-200D-1F9B0","order":527,"unicode":"👩🏽🦰"},{"annotation":"woman: medium-dark skin tone, red hair","group":1,"hexcode":"1F469-1F3FE-200D-1F9B0","order":528,"unicode":"👩🏾🦰"},{"annotation":"woman: dark skin tone, red hair","group":1,"hexcode":"1F469-1F3FF-200D-1F9B0","order":529,"unicode":"👩🏿🦰"}]},{"annotation":"person: red hair","group":1,"hexcode":"1F9D1-200D-1F9B0","order":530,"tags":["adult","gender-neutral","person","red hair","unspecified gender"],"unicode":"🧑🦰","skins":[{"annotation":"person: light skin tone, red hair","group":1,"hexcode":"1F9D1-1F3FB-200D-1F9B0","order":531,"unicode":"🧑🏻🦰"},{"annotation":"person: medium-light skin tone, red hair","group":1,"hexcode":"1F9D1-1F3FC-200D-1F9B0","order":532,"unicode":"🧑🏼🦰"},{"annotation":"person: medium skin tone, red hair","group":1,"hexcode":"1F9D1-1F3FD-200D-1F9B0","order":533,"unicode":"🧑🏽🦰"},{"annotation":"person: medium-dark skin tone, red hair","group":1,"hexcode":"1F9D1-1F3FE-200D-1F9B0","order":534,"unicode":"🧑🏾🦰"},{"annotation":"person: dark skin tone, red hair","group":1,"hexcode":"1F9D1-1F3FF-200D-1F9B0","order":535,"unicode":"🧑🏿🦰"}]},{"annotation":"woman: curly hair","group":1,"hexcode":"1F469-200D-1F9B1","order":536,"tags":["adult","curly hair","woman"],"unicode":"👩🦱","skins":[{"annotation":"woman: light skin tone, curly hair","group":1,"hexcode":"1F469-1F3FB-200D-1F9B1","order":537,"unicode":"👩🏻🦱"},{"annotation":"woman: medium-light skin tone, curly hair","group":1,"hexcode":"1F469-1F3FC-200D-1F9B1","order":538,"unicode":"👩🏼🦱"},{"annotation":"woman: medium skin tone, curly hair","group":1,"hexcode":"1F469-1F3FD-200D-1F9B1","order":539,"unicode":"👩🏽🦱"},{"annotation":"woman: medium-dark skin tone, curly hair","group":1,"hexcode":"1F469-1F3FE-200D-1F9B1","order":540,"unicode":"👩🏾🦱"},{"annotation":"woman: dark skin tone, curly hair","group":1,"hexcode":"1F469-1F3FF-200D-1F9B1","order":541,"unicode":"👩🏿🦱"}]},{"annotation":"person: curly hair","group":1,"hexcode":"1F9D1-200D-1F9B1","order":542,"tags":["adult","curly hair","gender-neutral","person","unspecified gender"],"unicode":"🧑🦱","skins":[{"annotation":"person: light skin tone, curly hair","group":1,"hexcode":"1F9D1-1F3FB-200D-1F9B1","order":543,"unicode":"🧑🏻🦱"},{"annotation":"person: medium-light skin tone, curly hair","group":1,"hexcode":"1F9D1-1F3FC-200D-1F9B1","order":544,"unicode":"🧑🏼🦱"},{"annotation":"person: medium skin tone, curly hair","group":1,"hexcode":"1F9D1-1F3FD-200D-1F9B1","order":545,"unicode":"🧑🏽🦱"},{"annotation":"person: medium-dark skin tone, curly hair","group":1,"hexcode":"1F9D1-1F3FE-200D-1F9B1","order":546,"unicode":"🧑🏾🦱"},{"annotation":"person: dark skin tone, curly hair","group":1,"hexcode":"1F9D1-1F3FF-200D-1F9B1","order":547,"unicode":"🧑🏿🦱"}]},{"annotation":"woman: white hair","group":1,"hexcode":"1F469-200D-1F9B3","order":548,"tags":["adult","white hair","woman"],"unicode":"👩🦳","skins":[{"annotation":"woman: light skin tone, white hair","group":1,"hexcode":"1F469-1F3FB-200D-1F9B3","order":549,"unicode":"👩🏻🦳"},{"annotation":"woman: medium-light skin tone, white hair","group":1,"hexcode":"1F469-1F3FC-200D-1F9B3","order":550,"unicode":"👩🏼🦳"},{"annotation":"woman: medium skin tone, white hair","group":1,"hexcode":"1F469-1F3FD-200D-1F9B3","order":551,"unicode":"👩🏽🦳"},{"annotation":"woman: medium-dark skin tone, white hair","group":1,"hexcode":"1F469-1F3FE-200D-1F9B3","order":552,"unicode":"👩🏾🦳"},{"annotation":"woman: dark skin tone, white hair","group":1,"hexcode":"1F469-1F3FF-200D-1F9B3","order":553,"unicode":"👩🏿🦳"}]},{"annotation":"person: white hair","group":1,"hexcode":"1F9D1-200D-1F9B3","order":554,"tags":["adult","gender-neutral","person","unspecified gender","white hair"],"unicode":"🧑🦳","skins":[{"annotation":"person: light skin tone, white hair","group":1,"hexcode":"1F9D1-1F3FB-200D-1F9B3","order":555,"unicode":"🧑🏻🦳"},{"annotation":"person: medium-light skin tone, white hair","group":1,"hexcode":"1F9D1-1F3FC-200D-1F9B3","order":556,"unicode":"🧑🏼🦳"},{"annotation":"person: medium skin tone, white hair","group":1,"hexcode":"1F9D1-1F3FD-200D-1F9B3","order":557,"unicode":"🧑🏽🦳"},{"annotation":"person: medium-dark skin tone, white hair","group":1,"hexcode":"1F9D1-1F3FE-200D-1F9B3","order":558,"unicode":"🧑🏾🦳"},{"annotation":"person: dark skin tone, white hair","group":1,"hexcode":"1F9D1-1F3FF-200D-1F9B3","order":559,"unicode":"🧑🏿🦳"}]},{"annotation":"woman: bald","group":1,"hexcode":"1F469-200D-1F9B2","order":560,"tags":["adult","bald","woman"],"unicode":"👩🦲","skins":[{"annotation":"woman: light skin tone, bald","group":1,"hexcode":"1F469-1F3FB-200D-1F9B2","order":561,"unicode":"👩🏻🦲"},{"annotation":"woman: medium-light skin tone, bald","group":1,"hexcode":"1F469-1F3FC-200D-1F9B2","order":562,"unicode":"👩🏼🦲"},{"annotation":"woman: medium skin tone, bald","group":1,"hexcode":"1F469-1F3FD-200D-1F9B2","order":563,"unicode":"👩🏽🦲"},{"annotation":"woman: medium-dark skin tone, bald","group":1,"hexcode":"1F469-1F3FE-200D-1F9B2","order":564,"unicode":"👩🏾🦲"},{"annotation":"woman: dark skin tone, bald","group":1,"hexcode":"1F469-1F3FF-200D-1F9B2","order":565,"unicode":"👩🏿🦲"}]},{"annotation":"person: bald","group":1,"hexcode":"1F9D1-200D-1F9B2","order":566,"tags":["adult","bald","gender-neutral","person","unspecified gender"],"unicode":"🧑🦲","skins":[{"annotation":"person: light skin tone, bald","group":1,"hexcode":"1F9D1-1F3FB-200D-1F9B2","order":567,"unicode":"🧑🏻🦲"},{"annotation":"person: medium-light skin tone, bald","group":1,"hexcode":"1F9D1-1F3FC-200D-1F9B2","order":568,"unicode":"🧑🏼🦲"},{"annotation":"person: medium skin tone, bald","group":1,"hexcode":"1F9D1-1F3FD-200D-1F9B2","order":569,"unicode":"🧑🏽🦲"},{"annotation":"person: medium-dark skin tone, bald","group":1,"hexcode":"1F9D1-1F3FE-200D-1F9B2","order":570,"unicode":"🧑🏾🦲"},{"annotation":"person: dark skin tone, bald","group":1,"hexcode":"1F9D1-1F3FF-200D-1F9B2","order":571,"unicode":"🧑🏿🦲"}]},{"annotation":"woman: blond hair","group":1,"hexcode":"1F471-200D-2640-FE0F","order":572,"tags":["blond-haired woman","blonde","hair","woman"],"unicode":"👱♀️","skins":[{"annotation":"woman: light skin tone, blond hair","group":1,"hexcode":"1F471-1F3FB-200D-2640-FE0F","order":574,"unicode":"👱🏻♀️"},{"annotation":"woman: medium-light skin tone, blond hair","group":1,"hexcode":"1F471-1F3FC-200D-2640-FE0F","order":576,"unicode":"👱🏼♀️"},{"annotation":"woman: medium skin tone, blond hair","group":1,"hexcode":"1F471-1F3FD-200D-2640-FE0F","order":578,"unicode":"👱🏽♀️"},{"annotation":"woman: medium-dark skin tone, blond hair","group":1,"hexcode":"1F471-1F3FE-200D-2640-FE0F","order":580,"unicode":"👱🏾♀️"},{"annotation":"woman: dark skin tone, blond hair","group":1,"hexcode":"1F471-1F3FF-200D-2640-FE0F","order":582,"unicode":"👱🏿♀️"}]},{"annotation":"man: blond hair","group":1,"hexcode":"1F471-200D-2642-FE0F","order":584,"tags":["blond","blond-haired man","hair","man"],"unicode":"👱♂️","skins":[{"annotation":"man: light skin tone, blond hair","group":1,"hexcode":"1F471-1F3FB-200D-2642-FE0F","order":586,"unicode":"👱🏻♂️"},{"annotation":"man: medium-light skin tone, blond hair","group":1,"hexcode":"1F471-1F3FC-200D-2642-FE0F","order":588,"unicode":"👱🏼♂️"},{"annotation":"man: medium skin tone, blond hair","group":1,"hexcode":"1F471-1F3FD-200D-2642-FE0F","order":590,"unicode":"👱🏽♂️"},{"annotation":"man: medium-dark skin tone, blond hair","group":1,"hexcode":"1F471-1F3FE-200D-2642-FE0F","order":592,"unicode":"👱🏾♂️"},{"annotation":"man: dark skin tone, blond hair","group":1,"hexcode":"1F471-1F3FF-200D-2642-FE0F","order":594,"unicode":"👱🏿♂️"}]},{"annotation":"older person","group":1,"hexcode":"1F9D3","order":596,"tags":["adult","gender-neutral","old","unspecified gender"],"unicode":"🧓","skins":[{"annotation":"older person: light skin tone","group":1,"hexcode":"1F9D3-1F3FB","order":597,"unicode":"🧓🏻"},{"annotation":"older person: medium-light skin tone","group":1,"hexcode":"1F9D3-1F3FC","order":598,"unicode":"🧓🏼"},{"annotation":"older person: medium skin tone","group":1,"hexcode":"1F9D3-1F3FD","order":599,"unicode":"🧓🏽"},{"annotation":"older person: medium-dark skin tone","group":1,"hexcode":"1F9D3-1F3FE","order":600,"unicode":"🧓🏾"},{"annotation":"older person: dark skin tone","group":1,"hexcode":"1F9D3-1F3FF","order":601,"unicode":"🧓🏿"}]},{"annotation":"old man","group":1,"hexcode":"1F474","order":602,"tags":["adult","man","old"],"unicode":"👴","skins":[{"annotation":"old man: light skin tone","group":1,"hexcode":"1F474-1F3FB","order":603,"unicode":"👴🏻"},{"annotation":"old man: medium-light skin tone","group":1,"hexcode":"1F474-1F3FC","order":604,"unicode":"👴🏼"},{"annotation":"old man: medium skin tone","group":1,"hexcode":"1F474-1F3FD","order":605,"unicode":"👴🏽"},{"annotation":"old man: medium-dark skin tone","group":1,"hexcode":"1F474-1F3FE","order":606,"unicode":"👴🏾"},{"annotation":"old man: dark skin tone","group":1,"hexcode":"1F474-1F3FF","order":607,"unicode":"👴🏿"}]},{"annotation":"old woman","group":1,"hexcode":"1F475","order":608,"tags":["adult","old","woman"],"unicode":"👵","skins":[{"annotation":"old woman: light skin tone","group":1,"hexcode":"1F475-1F3FB","order":609,"unicode":"👵🏻"},{"annotation":"old woman: medium-light skin tone","group":1,"hexcode":"1F475-1F3FC","order":610,"unicode":"👵🏼"},{"annotation":"old woman: medium skin tone","group":1,"hexcode":"1F475-1F3FD","order":611,"unicode":"👵🏽"},{"annotation":"old woman: medium-dark skin tone","group":1,"hexcode":"1F475-1F3FE","order":612,"unicode":"👵🏾"},{"annotation":"old woman: dark skin tone","group":1,"hexcode":"1F475-1F3FF","order":613,"unicode":"👵🏿"}]},{"annotation":"person frowning","group":1,"hexcode":"1F64D","order":614,"tags":["frown","gesture"],"unicode":"🙍","skins":[{"annotation":"person frowning: light skin tone","group":1,"hexcode":"1F64D-1F3FB","order":615,"unicode":"🙍🏻"},{"annotation":"person frowning: medium-light skin tone","group":1,"hexcode":"1F64D-1F3FC","order":616,"unicode":"🙍🏼"},{"annotation":"person frowning: medium skin tone","group":1,"hexcode":"1F64D-1F3FD","order":617,"unicode":"🙍🏽"},{"annotation":"person frowning: medium-dark skin tone","group":1,"hexcode":"1F64D-1F3FE","order":618,"unicode":"🙍🏾"},{"annotation":"person frowning: dark skin tone","group":1,"hexcode":"1F64D-1F3FF","order":619,"unicode":"🙍🏿"}]},{"annotation":"man frowning","group":1,"hexcode":"1F64D-200D-2642-FE0F","order":620,"tags":["frowning","gesture","man"],"unicode":"🙍♂️","skins":[{"annotation":"man frowning: light skin tone","group":1,"hexcode":"1F64D-1F3FB-200D-2642-FE0F","order":622,"unicode":"🙍🏻♂️"},{"annotation":"man frowning: medium-light skin tone","group":1,"hexcode":"1F64D-1F3FC-200D-2642-FE0F","order":624,"unicode":"🙍🏼♂️"},{"annotation":"man frowning: medium skin tone","group":1,"hexcode":"1F64D-1F3FD-200D-2642-FE0F","order":626,"unicode":"🙍🏽♂️"},{"annotation":"man frowning: medium-dark skin tone","group":1,"hexcode":"1F64D-1F3FE-200D-2642-FE0F","order":628,"unicode":"🙍🏾♂️"},{"annotation":"man frowning: dark skin tone","group":1,"hexcode":"1F64D-1F3FF-200D-2642-FE0F","order":630,"unicode":"🙍🏿♂️"}]},{"annotation":"woman frowning","group":1,"hexcode":"1F64D-200D-2640-FE0F","order":632,"tags":["frowning","gesture","woman"],"unicode":"🙍♀️","skins":[{"annotation":"woman frowning: light skin tone","group":1,"hexcode":"1F64D-1F3FB-200D-2640-FE0F","order":634,"unicode":"🙍🏻♀️"},{"annotation":"woman frowning: medium-light skin tone","group":1,"hexcode":"1F64D-1F3FC-200D-2640-FE0F","order":636,"unicode":"🙍🏼♀️"},{"annotation":"woman frowning: medium skin tone","group":1,"hexcode":"1F64D-1F3FD-200D-2640-FE0F","order":638,"unicode":"🙍🏽♀️"},{"annotation":"woman frowning: medium-dark skin tone","group":1,"hexcode":"1F64D-1F3FE-200D-2640-FE0F","order":640,"unicode":"🙍🏾♀️"},{"annotation":"woman frowning: dark skin tone","group":1,"hexcode":"1F64D-1F3FF-200D-2640-FE0F","order":642,"unicode":"🙍🏿♀️"}]},{"annotation":"person pouting","group":1,"hexcode":"1F64E","order":644,"tags":["gesture","pouting"],"unicode":"🙎","skins":[{"annotation":"person pouting: light skin tone","group":1,"hexcode":"1F64E-1F3FB","order":645,"unicode":"🙎🏻"},{"annotation":"person pouting: medium-light skin tone","group":1,"hexcode":"1F64E-1F3FC","order":646,"unicode":"🙎🏼"},{"annotation":"person pouting: medium skin tone","group":1,"hexcode":"1F64E-1F3FD","order":647,"unicode":"🙎🏽"},{"annotation":"person pouting: medium-dark skin tone","group":1,"hexcode":"1F64E-1F3FE","order":648,"unicode":"🙎🏾"},{"annotation":"person pouting: dark skin tone","group":1,"hexcode":"1F64E-1F3FF","order":649,"unicode":"🙎🏿"}]},{"annotation":"man pouting","group":1,"hexcode":"1F64E-200D-2642-FE0F","order":650,"tags":["gesture","man","pouting"],"unicode":"🙎♂️","skins":[{"annotation":"man pouting: light skin tone","group":1,"hexcode":"1F64E-1F3FB-200D-2642-FE0F","order":652,"unicode":"🙎🏻♂️"},{"annotation":"man pouting: medium-light skin tone","group":1,"hexcode":"1F64E-1F3FC-200D-2642-FE0F","order":654,"unicode":"🙎🏼♂️"},{"annotation":"man pouting: medium skin tone","group":1,"hexcode":"1F64E-1F3FD-200D-2642-FE0F","order":656,"unicode":"🙎🏽♂️"},{"annotation":"man pouting: medium-dark skin tone","group":1,"hexcode":"1F64E-1F3FE-200D-2642-FE0F","order":658,"unicode":"🙎🏾♂️"},{"annotation":"man pouting: dark skin tone","group":1,"hexcode":"1F64E-1F3FF-200D-2642-FE0F","order":660,"unicode":"🙎🏿♂️"}]},{"annotation":"woman pouting","group":1,"hexcode":"1F64E-200D-2640-FE0F","order":662,"tags":["gesture","pouting","woman"],"unicode":"🙎♀️","skins":[{"annotation":"woman pouting: light skin tone","group":1,"hexcode":"1F64E-1F3FB-200D-2640-FE0F","order":664,"unicode":"🙎🏻♀️"},{"annotation":"woman pouting: medium-light skin tone","group":1,"hexcode":"1F64E-1F3FC-200D-2640-FE0F","order":666,"unicode":"🙎🏼♀️"},{"annotation":"woman pouting: medium skin tone","group":1,"hexcode":"1F64E-1F3FD-200D-2640-FE0F","order":668,"unicode":"🙎🏽♀️"},{"annotation":"woman pouting: medium-dark skin tone","group":1,"hexcode":"1F64E-1F3FE-200D-2640-FE0F","order":670,"unicode":"🙎🏾♀️"},{"annotation":"woman pouting: dark skin tone","group":1,"hexcode":"1F64E-1F3FF-200D-2640-FE0F","order":672,"unicode":"🙎🏿♀️"}]},{"annotation":"person gesturing NO","group":1,"hexcode":"1F645","order":674,"tags":["forbidden","gesture","hand","person gesturing no","prohibited"],"unicode":"🙅","skins":[{"annotation":"person gesturing NO: light skin tone","group":1,"hexcode":"1F645-1F3FB","order":675,"unicode":"🙅🏻"},{"annotation":"person gesturing NO: medium-light skin tone","group":1,"hexcode":"1F645-1F3FC","order":676,"unicode":"🙅🏼"},{"annotation":"person gesturing NO: medium skin tone","group":1,"hexcode":"1F645-1F3FD","order":677,"unicode":"🙅🏽"},{"annotation":"person gesturing NO: medium-dark skin tone","group":1,"hexcode":"1F645-1F3FE","order":678,"unicode":"🙅🏾"},{"annotation":"person gesturing NO: dark skin tone","group":1,"hexcode":"1F645-1F3FF","order":679,"unicode":"🙅🏿"}]},{"annotation":"man gesturing NO","group":1,"hexcode":"1F645-200D-2642-FE0F","order":680,"tags":["forbidden","gesture","hand","man","man gesturing no","prohibited"],"unicode":"🙅♂️","skins":[{"annotation":"man gesturing NO: light skin tone","group":1,"hexcode":"1F645-1F3FB-200D-2642-FE0F","order":682,"unicode":"🙅🏻♂️"},{"annotation":"man gesturing NO: medium-light skin tone","group":1,"hexcode":"1F645-1F3FC-200D-2642-FE0F","order":684,"unicode":"🙅🏼♂️"},{"annotation":"man gesturing NO: medium skin tone","group":1,"hexcode":"1F645-1F3FD-200D-2642-FE0F","order":686,"unicode":"🙅🏽♂️"},{"annotation":"man gesturing NO: medium-dark skin tone","group":1,"hexcode":"1F645-1F3FE-200D-2642-FE0F","order":688,"unicode":"🙅🏾♂️"},{"annotation":"man gesturing NO: dark skin tone","group":1,"hexcode":"1F645-1F3FF-200D-2642-FE0F","order":690,"unicode":"🙅🏿♂️"}]},{"annotation":"woman gesturing NO","group":1,"hexcode":"1F645-200D-2640-FE0F","order":692,"tags":["forbidden","gesture","hand","prohibited","woman","woman gesturing no"],"unicode":"🙅♀️","skins":[{"annotation":"woman gesturing NO: light skin tone","group":1,"hexcode":"1F645-1F3FB-200D-2640-FE0F","order":694,"unicode":"🙅🏻♀️"},{"annotation":"woman gesturing NO: medium-light skin tone","group":1,"hexcode":"1F645-1F3FC-200D-2640-FE0F","order":696,"unicode":"🙅🏼♀️"},{"annotation":"woman gesturing NO: medium skin tone","group":1,"hexcode":"1F645-1F3FD-200D-2640-FE0F","order":698,"unicode":"🙅🏽♀️"},{"annotation":"woman gesturing NO: medium-dark skin tone","group":1,"hexcode":"1F645-1F3FE-200D-2640-FE0F","order":700,"unicode":"🙅🏾♀️"},{"annotation":"woman gesturing NO: dark skin tone","group":1,"hexcode":"1F645-1F3FF-200D-2640-FE0F","order":702,"unicode":"🙅🏿♀️"}]},{"annotation":"person gesturing OK","group":1,"hexcode":"1F646","order":704,"tags":["gesture","hand","ok","person gesturing ok"],"unicode":"🙆","skins":[{"annotation":"person gesturing OK: light skin tone","group":1,"hexcode":"1F646-1F3FB","order":705,"unicode":"🙆🏻"},{"annotation":"person gesturing OK: medium-light skin tone","group":1,"hexcode":"1F646-1F3FC","order":706,"unicode":"🙆🏼"},{"annotation":"person gesturing OK: medium skin tone","group":1,"hexcode":"1F646-1F3FD","order":707,"unicode":"🙆🏽"},{"annotation":"person gesturing OK: medium-dark skin tone","group":1,"hexcode":"1F646-1F3FE","order":708,"unicode":"🙆🏾"},{"annotation":"person gesturing OK: dark skin tone","group":1,"hexcode":"1F646-1F3FF","order":709,"unicode":"🙆🏿"}]},{"annotation":"man gesturing OK","group":1,"hexcode":"1F646-200D-2642-FE0F","order":710,"tags":["gesture","hand","man","man gesturing ok","ok"],"unicode":"🙆♂️","skins":[{"annotation":"man gesturing OK: light skin tone","group":1,"hexcode":"1F646-1F3FB-200D-2642-FE0F","order":712,"unicode":"🙆🏻♂️"},{"annotation":"man gesturing OK: medium-light skin tone","group":1,"hexcode":"1F646-1F3FC-200D-2642-FE0F","order":714,"unicode":"🙆🏼♂️"},{"annotation":"man gesturing OK: medium skin tone","group":1,"hexcode":"1F646-1F3FD-200D-2642-FE0F","order":716,"unicode":"🙆🏽♂️"},{"annotation":"man gesturing OK: medium-dark skin tone","group":1,"hexcode":"1F646-1F3FE-200D-2642-FE0F","order":718,"unicode":"🙆🏾♂️"},{"annotation":"man gesturing OK: dark skin tone","group":1,"hexcode":"1F646-1F3FF-200D-2642-FE0F","order":720,"unicode":"🙆🏿♂️"}]},{"annotation":"woman gesturing OK","group":1,"hexcode":"1F646-200D-2640-FE0F","order":722,"tags":["gesture","hand","ok","woman","woman gesturing ok"],"unicode":"🙆♀️","skins":[{"annotation":"woman gesturing OK: light skin tone","group":1,"hexcode":"1F646-1F3FB-200D-2640-FE0F","order":724,"unicode":"🙆🏻♀️"},{"annotation":"woman gesturing OK: medium-light skin tone","group":1,"hexcode":"1F646-1F3FC-200D-2640-FE0F","order":726,"unicode":"🙆🏼♀️"},{"annotation":"woman gesturing OK: medium skin tone","group":1,"hexcode":"1F646-1F3FD-200D-2640-FE0F","order":728,"unicode":"🙆🏽♀️"},{"annotation":"woman gesturing OK: medium-dark skin tone","group":1,"hexcode":"1F646-1F3FE-200D-2640-FE0F","order":730,"unicode":"🙆🏾♀️"},{"annotation":"woman gesturing OK: dark skin tone","group":1,"hexcode":"1F646-1F3FF-200D-2640-FE0F","order":732,"unicode":"🙆🏿♀️"}]},{"annotation":"person tipping hand","group":1,"hexcode":"1F481","order":734,"tags":["hand","help","information","sassy","tipping"],"unicode":"💁","skins":[{"annotation":"person tipping hand: light skin tone","group":1,"hexcode":"1F481-1F3FB","order":735,"unicode":"💁🏻"},{"annotation":"person tipping hand: medium-light skin tone","group":1,"hexcode":"1F481-1F3FC","order":736,"unicode":"💁🏼"},{"annotation":"person tipping hand: medium skin tone","group":1,"hexcode":"1F481-1F3FD","order":737,"unicode":"💁🏽"},{"annotation":"person tipping hand: medium-dark skin tone","group":1,"hexcode":"1F481-1F3FE","order":738,"unicode":"💁🏾"},{"annotation":"person tipping hand: dark skin tone","group":1,"hexcode":"1F481-1F3FF","order":739,"unicode":"💁🏿"}]},{"annotation":"man tipping hand","group":1,"hexcode":"1F481-200D-2642-FE0F","order":740,"tags":["man","sassy","tipping hand"],"unicode":"💁♂️","skins":[{"annotation":"man tipping hand: light skin tone","group":1,"hexcode":"1F481-1F3FB-200D-2642-FE0F","order":742,"unicode":"💁🏻♂️"},{"annotation":"man tipping hand: medium-light skin tone","group":1,"hexcode":"1F481-1F3FC-200D-2642-FE0F","order":744,"unicode":"💁🏼♂️"},{"annotation":"man tipping hand: medium skin tone","group":1,"hexcode":"1F481-1F3FD-200D-2642-FE0F","order":746,"unicode":"💁🏽♂️"},{"annotation":"man tipping hand: medium-dark skin tone","group":1,"hexcode":"1F481-1F3FE-200D-2642-FE0F","order":748,"unicode":"💁🏾♂️"},{"annotation":"man tipping hand: dark skin tone","group":1,"hexcode":"1F481-1F3FF-200D-2642-FE0F","order":750,"unicode":"💁🏿♂️"}]},{"annotation":"woman tipping hand","group":1,"hexcode":"1F481-200D-2640-FE0F","order":752,"tags":["sassy","tipping hand","woman"],"unicode":"💁♀️","skins":[{"annotation":"woman tipping hand: light skin tone","group":1,"hexcode":"1F481-1F3FB-200D-2640-FE0F","order":754,"unicode":"💁🏻♀️"},{"annotation":"woman tipping hand: medium-light skin tone","group":1,"hexcode":"1F481-1F3FC-200D-2640-FE0F","order":756,"unicode":"💁🏼♀️"},{"annotation":"woman tipping hand: medium skin tone","group":1,"hexcode":"1F481-1F3FD-200D-2640-FE0F","order":758,"unicode":"💁🏽♀️"},{"annotation":"woman tipping hand: medium-dark skin tone","group":1,"hexcode":"1F481-1F3FE-200D-2640-FE0F","order":760,"unicode":"💁🏾♀️"},{"annotation":"woman tipping hand: dark skin tone","group":1,"hexcode":"1F481-1F3FF-200D-2640-FE0F","order":762,"unicode":"💁🏿♀️"}]},{"annotation":"person raising hand","group":1,"hexcode":"1F64B","order":764,"tags":["gesture","hand","happy","raised"],"unicode":"🙋","skins":[{"annotation":"person raising hand: light skin tone","group":1,"hexcode":"1F64B-1F3FB","order":765,"unicode":"🙋🏻"},{"annotation":"person raising hand: medium-light skin tone","group":1,"hexcode":"1F64B-1F3FC","order":766,"unicode":"🙋🏼"},{"annotation":"person raising hand: medium skin tone","group":1,"hexcode":"1F64B-1F3FD","order":767,"unicode":"🙋🏽"},{"annotation":"person raising hand: medium-dark skin tone","group":1,"hexcode":"1F64B-1F3FE","order":768,"unicode":"🙋🏾"},{"annotation":"person raising hand: dark skin tone","group":1,"hexcode":"1F64B-1F3FF","order":769,"unicode":"🙋🏿"}]},{"annotation":"man raising hand","group":1,"hexcode":"1F64B-200D-2642-FE0F","order":770,"tags":["gesture","man","raising hand"],"unicode":"🙋♂️","skins":[{"annotation":"man raising hand: light skin tone","group":1,"hexcode":"1F64B-1F3FB-200D-2642-FE0F","order":772,"unicode":"🙋🏻♂️"},{"annotation":"man raising hand: medium-light skin tone","group":1,"hexcode":"1F64B-1F3FC-200D-2642-FE0F","order":774,"unicode":"🙋🏼♂️"},{"annotation":"man raising hand: medium skin tone","group":1,"hexcode":"1F64B-1F3FD-200D-2642-FE0F","order":776,"unicode":"🙋🏽♂️"},{"annotation":"man raising hand: medium-dark skin tone","group":1,"hexcode":"1F64B-1F3FE-200D-2642-FE0F","order":778,"unicode":"🙋🏾♂️"},{"annotation":"man raising hand: dark skin tone","group":1,"hexcode":"1F64B-1F3FF-200D-2642-FE0F","order":780,"unicode":"🙋🏿♂️"}]},{"annotation":"woman raising hand","group":1,"hexcode":"1F64B-200D-2640-FE0F","order":782,"tags":["gesture","raising hand","woman"],"unicode":"🙋♀️","skins":[{"annotation":"woman raising hand: light skin tone","group":1,"hexcode":"1F64B-1F3FB-200D-2640-FE0F","order":784,"unicode":"🙋🏻♀️"},{"annotation":"woman raising hand: medium-light skin tone","group":1,"hexcode":"1F64B-1F3FC-200D-2640-FE0F","order":786,"unicode":"🙋🏼♀️"},{"annotation":"woman raising hand: medium skin tone","group":1,"hexcode":"1F64B-1F3FD-200D-2640-FE0F","order":788,"unicode":"🙋🏽♀️"},{"annotation":"woman raising hand: medium-dark skin tone","group":1,"hexcode":"1F64B-1F3FE-200D-2640-FE0F","order":790,"unicode":"🙋🏾♀️"},{"annotation":"woman raising hand: dark skin tone","group":1,"hexcode":"1F64B-1F3FF-200D-2640-FE0F","order":792,"unicode":"🙋🏿♀️"}]},{"annotation":"deaf person","group":1,"hexcode":"1F9CF","order":794,"tags":["accessibility","deaf","ear","hear"],"unicode":"🧏","skins":[{"annotation":"deaf person: light skin tone","group":1,"hexcode":"1F9CF-1F3FB","order":795,"unicode":"🧏🏻"},{"annotation":"deaf person: medium-light skin tone","group":1,"hexcode":"1F9CF-1F3FC","order":796,"unicode":"🧏🏼"},{"annotation":"deaf person: medium skin tone","group":1,"hexcode":"1F9CF-1F3FD","order":797,"unicode":"🧏🏽"},{"annotation":"deaf person: medium-dark skin tone","group":1,"hexcode":"1F9CF-1F3FE","order":798,"unicode":"🧏🏾"},{"annotation":"deaf person: dark skin tone","group":1,"hexcode":"1F9CF-1F3FF","order":799,"unicode":"🧏🏿"}]},{"annotation":"deaf man","group":1,"hexcode":"1F9CF-200D-2642-FE0F","order":800,"tags":["deaf","man"],"unicode":"🧏♂️","skins":[{"annotation":"deaf man: light skin tone","group":1,"hexcode":"1F9CF-1F3FB-200D-2642-FE0F","order":802,"unicode":"🧏🏻♂️"},{"annotation":"deaf man: medium-light skin tone","group":1,"hexcode":"1F9CF-1F3FC-200D-2642-FE0F","order":804,"unicode":"🧏🏼♂️"},{"annotation":"deaf man: medium skin tone","group":1,"hexcode":"1F9CF-1F3FD-200D-2642-FE0F","order":806,"unicode":"🧏🏽♂️"},{"annotation":"deaf man: medium-dark skin tone","group":1,"hexcode":"1F9CF-1F3FE-200D-2642-FE0F","order":808,"unicode":"🧏🏾♂️"},{"annotation":"deaf man: dark skin tone","group":1,"hexcode":"1F9CF-1F3FF-200D-2642-FE0F","order":810,"unicode":"🧏🏿♂️"}]},{"annotation":"deaf woman","group":1,"hexcode":"1F9CF-200D-2640-FE0F","order":812,"tags":["deaf","woman"],"unicode":"🧏♀️","skins":[{"annotation":"deaf woman: light skin tone","group":1,"hexcode":"1F9CF-1F3FB-200D-2640-FE0F","order":814,"unicode":"🧏🏻♀️"},{"annotation":"deaf woman: medium-light skin tone","group":1,"hexcode":"1F9CF-1F3FC-200D-2640-FE0F","order":816,"unicode":"🧏🏼♀️"},{"annotation":"deaf woman: medium skin tone","group":1,"hexcode":"1F9CF-1F3FD-200D-2640-FE0F","order":818,"unicode":"🧏🏽♀️"},{"annotation":"deaf woman: medium-dark skin tone","group":1,"hexcode":"1F9CF-1F3FE-200D-2640-FE0F","order":820,"unicode":"🧏🏾♀️"},{"annotation":"deaf woman: dark skin tone","group":1,"hexcode":"1F9CF-1F3FF-200D-2640-FE0F","order":822,"unicode":"🧏🏿♀️"}]},{"annotation":"person bowing","group":1,"hexcode":"1F647","order":824,"tags":["apology","bow","gesture","sorry"],"unicode":"🙇","skins":[{"annotation":"person bowing: light skin tone","group":1,"hexcode":"1F647-1F3FB","order":825,"unicode":"🙇🏻"},{"annotation":"person bowing: medium-light skin tone","group":1,"hexcode":"1F647-1F3FC","order":826,"unicode":"🙇🏼"},{"annotation":"person bowing: medium skin tone","group":1,"hexcode":"1F647-1F3FD","order":827,"unicode":"🙇🏽"},{"annotation":"person bowing: medium-dark skin tone","group":1,"hexcode":"1F647-1F3FE","order":828,"unicode":"🙇🏾"},{"annotation":"person bowing: dark skin tone","group":1,"hexcode":"1F647-1F3FF","order":829,"unicode":"🙇🏿"}]},{"annotation":"man bowing","group":1,"hexcode":"1F647-200D-2642-FE0F","order":830,"tags":["apology","bowing","favor","gesture","man","sorry"],"unicode":"🙇♂️","skins":[{"annotation":"man bowing: light skin tone","group":1,"hexcode":"1F647-1F3FB-200D-2642-FE0F","order":832,"unicode":"🙇🏻♂️"},{"annotation":"man bowing: medium-light skin tone","group":1,"hexcode":"1F647-1F3FC-200D-2642-FE0F","order":834,"unicode":"🙇🏼♂️"},{"annotation":"man bowing: medium skin tone","group":1,"hexcode":"1F647-1F3FD-200D-2642-FE0F","order":836,"unicode":"🙇🏽♂️"},{"annotation":"man bowing: medium-dark skin tone","group":1,"hexcode":"1F647-1F3FE-200D-2642-FE0F","order":838,"unicode":"🙇🏾♂️"},{"annotation":"man bowing: dark skin tone","group":1,"hexcode":"1F647-1F3FF-200D-2642-FE0F","order":840,"unicode":"🙇🏿♂️"}]},{"annotation":"woman bowing","group":1,"hexcode":"1F647-200D-2640-FE0F","order":842,"tags":["apology","bowing","favor","gesture","sorry","woman"],"unicode":"🙇♀️","skins":[{"annotation":"woman bowing: light skin tone","group":1,"hexcode":"1F647-1F3FB-200D-2640-FE0F","order":844,"unicode":"🙇🏻♀️"},{"annotation":"woman bowing: medium-light skin tone","group":1,"hexcode":"1F647-1F3FC-200D-2640-FE0F","order":846,"unicode":"🙇🏼♀️"},{"annotation":"woman bowing: medium skin tone","group":1,"hexcode":"1F647-1F3FD-200D-2640-FE0F","order":848,"unicode":"🙇🏽♀️"},{"annotation":"woman bowing: medium-dark skin tone","group":1,"hexcode":"1F647-1F3FE-200D-2640-FE0F","order":850,"unicode":"🙇🏾♀️"},{"annotation":"woman bowing: dark skin tone","group":1,"hexcode":"1F647-1F3FF-200D-2640-FE0F","order":852,"unicode":"🙇🏿♀️"}]},{"annotation":"person facepalming","group":1,"hexcode":"1F926","order":854,"tags":["disbelief","exasperation","face","palm"],"unicode":"🤦","skins":[{"annotation":"person facepalming: light skin tone","group":1,"hexcode":"1F926-1F3FB","order":855,"unicode":"🤦🏻"},{"annotation":"person facepalming: medium-light skin tone","group":1,"hexcode":"1F926-1F3FC","order":856,"unicode":"🤦🏼"},{"annotation":"person facepalming: medium skin tone","group":1,"hexcode":"1F926-1F3FD","order":857,"unicode":"🤦🏽"},{"annotation":"person facepalming: medium-dark skin tone","group":1,"hexcode":"1F926-1F3FE","order":858,"unicode":"🤦🏾"},{"annotation":"person facepalming: dark skin tone","group":1,"hexcode":"1F926-1F3FF","order":859,"unicode":"🤦🏿"}]},{"annotation":"man facepalming","group":1,"hexcode":"1F926-200D-2642-FE0F","order":860,"tags":["disbelief","exasperation","facepalm","man"],"unicode":"🤦♂️","skins":[{"annotation":"man facepalming: light skin tone","group":1,"hexcode":"1F926-1F3FB-200D-2642-FE0F","order":862,"unicode":"🤦🏻♂️"},{"annotation":"man facepalming: medium-light skin tone","group":1,"hexcode":"1F926-1F3FC-200D-2642-FE0F","order":864,"unicode":"🤦🏼♂️"},{"annotation":"man facepalming: medium skin tone","group":1,"hexcode":"1F926-1F3FD-200D-2642-FE0F","order":866,"unicode":"🤦🏽♂️"},{"annotation":"man facepalming: medium-dark skin tone","group":1,"hexcode":"1F926-1F3FE-200D-2642-FE0F","order":868,"unicode":"🤦🏾♂️"},{"annotation":"man facepalming: dark skin tone","group":1,"hexcode":"1F926-1F3FF-200D-2642-FE0F","order":870,"unicode":"🤦🏿♂️"}]},{"annotation":"woman facepalming","group":1,"hexcode":"1F926-200D-2640-FE0F","order":872,"tags":["disbelief","exasperation","facepalm","woman"],"unicode":"🤦♀️","skins":[{"annotation":"woman facepalming: light skin tone","group":1,"hexcode":"1F926-1F3FB-200D-2640-FE0F","order":874,"unicode":"🤦🏻♀️"},{"annotation":"woman facepalming: medium-light skin tone","group":1,"hexcode":"1F926-1F3FC-200D-2640-FE0F","order":876,"unicode":"🤦🏼♀️"},{"annotation":"woman facepalming: medium skin tone","group":1,"hexcode":"1F926-1F3FD-200D-2640-FE0F","order":878,"unicode":"🤦🏽♀️"},{"annotation":"woman facepalming: medium-dark skin tone","group":1,"hexcode":"1F926-1F3FE-200D-2640-FE0F","order":880,"unicode":"🤦🏾♀️"},{"annotation":"woman facepalming: dark skin tone","group":1,"hexcode":"1F926-1F3FF-200D-2640-FE0F","order":882,"unicode":"🤦🏿♀️"}]},{"annotation":"person shrugging","group":1,"hexcode":"1F937","order":884,"tags":["doubt","ignorance","indifference","shrug"],"unicode":"🤷","skins":[{"annotation":"person shrugging: light skin tone","group":1,"hexcode":"1F937-1F3FB","order":885,"unicode":"🤷🏻"},{"annotation":"person shrugging: medium-light skin tone","group":1,"hexcode":"1F937-1F3FC","order":886,"unicode":"🤷🏼"},{"annotation":"person shrugging: medium skin tone","group":1,"hexcode":"1F937-1F3FD","order":887,"unicode":"🤷🏽"},{"annotation":"person shrugging: medium-dark skin tone","group":1,"hexcode":"1F937-1F3FE","order":888,"unicode":"🤷🏾"},{"annotation":"person shrugging: dark skin tone","group":1,"hexcode":"1F937-1F3FF","order":889,"unicode":"🤷🏿"}]},{"annotation":"man shrugging","group":1,"hexcode":"1F937-200D-2642-FE0F","order":890,"tags":["doubt","ignorance","indifference","man","shrug"],"unicode":"🤷♂️","skins":[{"annotation":"man shrugging: light skin tone","group":1,"hexcode":"1F937-1F3FB-200D-2642-FE0F","order":892,"unicode":"🤷🏻♂️"},{"annotation":"man shrugging: medium-light skin tone","group":1,"hexcode":"1F937-1F3FC-200D-2642-FE0F","order":894,"unicode":"🤷🏼♂️"},{"annotation":"man shrugging: medium skin tone","group":1,"hexcode":"1F937-1F3FD-200D-2642-FE0F","order":896,"unicode":"🤷🏽♂️"},{"annotation":"man shrugging: medium-dark skin tone","group":1,"hexcode":"1F937-1F3FE-200D-2642-FE0F","order":898,"unicode":"🤷🏾♂️"},{"annotation":"man shrugging: dark skin tone","group":1,"hexcode":"1F937-1F3FF-200D-2642-FE0F","order":900,"unicode":"🤷🏿♂️"}]},{"annotation":"woman shrugging","group":1,"hexcode":"1F937-200D-2640-FE0F","order":902,"tags":["doubt","ignorance","indifference","shrug","woman"],"unicode":"🤷♀️","skins":[{"annotation":"woman shrugging: light skin tone","group":1,"hexcode":"1F937-1F3FB-200D-2640-FE0F","order":904,"unicode":"🤷🏻♀️"},{"annotation":"woman shrugging: medium-light skin tone","group":1,"hexcode":"1F937-1F3FC-200D-2640-FE0F","order":906,"unicode":"🤷🏼♀️"},{"annotation":"woman shrugging: medium skin tone","group":1,"hexcode":"1F937-1F3FD-200D-2640-FE0F","order":908,"unicode":"🤷🏽♀️"},{"annotation":"woman shrugging: medium-dark skin tone","group":1,"hexcode":"1F937-1F3FE-200D-2640-FE0F","order":910,"unicode":"🤷🏾♀️"},{"annotation":"woman shrugging: dark skin tone","group":1,"hexcode":"1F937-1F3FF-200D-2640-FE0F","order":912,"unicode":"🤷🏿♀️"}]},{"annotation":"health worker","group":1,"hexcode":"1F9D1-200D-2695-FE0F","order":914,"tags":["doctor","healthcare","nurse","therapist"],"unicode":"🧑⚕️","skins":[{"annotation":"health worker: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2695-FE0F","order":916,"unicode":"🧑🏻⚕️"},{"annotation":"health worker: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2695-FE0F","order":918,"unicode":"🧑🏼⚕️"},{"annotation":"health worker: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2695-FE0F","order":920,"unicode":"🧑🏽⚕️"},{"annotation":"health worker: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2695-FE0F","order":922,"unicode":"🧑🏾⚕️"},{"annotation":"health worker: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2695-FE0F","order":924,"unicode":"🧑🏿⚕️"}]},{"annotation":"man health worker","group":1,"hexcode":"1F468-200D-2695-FE0F","order":926,"tags":["doctor","healthcare","man","nurse","therapist"],"unicode":"👨⚕️","skins":[{"annotation":"man health worker: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2695-FE0F","order":928,"unicode":"👨🏻⚕️"},{"annotation":"man health worker: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2695-FE0F","order":930,"unicode":"👨🏼⚕️"},{"annotation":"man health worker: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2695-FE0F","order":932,"unicode":"👨🏽⚕️"},{"annotation":"man health worker: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2695-FE0F","order":934,"unicode":"👨🏾⚕️"},{"annotation":"man health worker: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2695-FE0F","order":936,"unicode":"👨🏿⚕️"}]},{"annotation":"woman health worker","group":1,"hexcode":"1F469-200D-2695-FE0F","order":938,"tags":["doctor","healthcare","nurse","therapist","woman"],"unicode":"👩⚕️","skins":[{"annotation":"woman health worker: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2695-FE0F","order":940,"unicode":"👩🏻⚕️"},{"annotation":"woman health worker: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2695-FE0F","order":942,"unicode":"👩🏼⚕️"},{"annotation":"woman health worker: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2695-FE0F","order":944,"unicode":"👩🏽⚕️"},{"annotation":"woman health worker: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2695-FE0F","order":946,"unicode":"👩🏾⚕️"},{"annotation":"woman health worker: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2695-FE0F","order":948,"unicode":"👩🏿⚕️"}]},{"annotation":"student","group":1,"hexcode":"1F9D1-200D-1F393","order":950,"tags":["graduate"],"unicode":"🧑🎓","skins":[{"annotation":"student: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F393","order":951,"unicode":"🧑🏻🎓"},{"annotation":"student: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F393","order":952,"unicode":"🧑🏼🎓"},{"annotation":"student: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F393","order":953,"unicode":"🧑🏽🎓"},{"annotation":"student: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F393","order":954,"unicode":"🧑🏾🎓"},{"annotation":"student: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F393","order":955,"unicode":"🧑🏿🎓"}]},{"annotation":"man student","group":1,"hexcode":"1F468-200D-1F393","order":956,"tags":["graduate","man","student"],"unicode":"👨🎓","skins":[{"annotation":"man student: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F393","order":957,"unicode":"👨🏻🎓"},{"annotation":"man student: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F393","order":958,"unicode":"👨🏼🎓"},{"annotation":"man student: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F393","order":959,"unicode":"👨🏽🎓"},{"annotation":"man student: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F393","order":960,"unicode":"👨🏾🎓"},{"annotation":"man student: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F393","order":961,"unicode":"👨🏿🎓"}]},{"annotation":"woman student","group":1,"hexcode":"1F469-200D-1F393","order":962,"tags":["graduate","student","woman"],"unicode":"👩🎓","skins":[{"annotation":"woman student: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F393","order":963,"unicode":"👩🏻🎓"},{"annotation":"woman student: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F393","order":964,"unicode":"👩🏼🎓"},{"annotation":"woman student: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F393","order":965,"unicode":"👩🏽🎓"},{"annotation":"woman student: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F393","order":966,"unicode":"👩🏾🎓"},{"annotation":"woman student: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F393","order":967,"unicode":"👩🏿🎓"}]},{"annotation":"teacher","group":1,"hexcode":"1F9D1-200D-1F3EB","order":968,"tags":["instructor","professor"],"unicode":"🧑🏫","skins":[{"annotation":"teacher: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F3EB","order":969,"unicode":"🧑🏻🏫"},{"annotation":"teacher: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F3EB","order":970,"unicode":"🧑🏼🏫"},{"annotation":"teacher: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F3EB","order":971,"unicode":"🧑🏽🏫"},{"annotation":"teacher: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F3EB","order":972,"unicode":"🧑🏾🏫"},{"annotation":"teacher: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F3EB","order":973,"unicode":"🧑🏿🏫"}]},{"annotation":"man teacher","group":1,"hexcode":"1F468-200D-1F3EB","order":974,"tags":["instructor","man","professor","teacher"],"unicode":"👨🏫","skins":[{"annotation":"man teacher: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F3EB","order":975,"unicode":"👨🏻🏫"},{"annotation":"man teacher: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F3EB","order":976,"unicode":"👨🏼🏫"},{"annotation":"man teacher: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F3EB","order":977,"unicode":"👨🏽🏫"},{"annotation":"man teacher: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F3EB","order":978,"unicode":"👨🏾🏫"},{"annotation":"man teacher: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F3EB","order":979,"unicode":"👨🏿🏫"}]},{"annotation":"woman teacher","group":1,"hexcode":"1F469-200D-1F3EB","order":980,"tags":["instructor","professor","teacher","woman"],"unicode":"👩🏫","skins":[{"annotation":"woman teacher: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F3EB","order":981,"unicode":"👩🏻🏫"},{"annotation":"woman teacher: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F3EB","order":982,"unicode":"👩🏼🏫"},{"annotation":"woman teacher: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F3EB","order":983,"unicode":"👩🏽🏫"},{"annotation":"woman teacher: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F3EB","order":984,"unicode":"👩🏾🏫"},{"annotation":"woman teacher: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F3EB","order":985,"unicode":"👩🏿🏫"}]},{"annotation":"judge","group":1,"hexcode":"1F9D1-200D-2696-FE0F","order":986,"tags":["justice","scales"],"unicode":"🧑⚖️","skins":[{"annotation":"judge: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2696-FE0F","order":988,"unicode":"🧑🏻⚖️"},{"annotation":"judge: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2696-FE0F","order":990,"unicode":"🧑🏼⚖️"},{"annotation":"judge: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2696-FE0F","order":992,"unicode":"🧑🏽⚖️"},{"annotation":"judge: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2696-FE0F","order":994,"unicode":"🧑🏾⚖️"},{"annotation":"judge: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2696-FE0F","order":996,"unicode":"🧑🏿⚖️"}]},{"annotation":"man judge","group":1,"hexcode":"1F468-200D-2696-FE0F","order":998,"tags":["judge","justice","man","scales"],"unicode":"👨⚖️","skins":[{"annotation":"man judge: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2696-FE0F","order":1000,"unicode":"👨🏻⚖️"},{"annotation":"man judge: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2696-FE0F","order":1002,"unicode":"👨🏼⚖️"},{"annotation":"man judge: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2696-FE0F","order":1004,"unicode":"👨🏽⚖️"},{"annotation":"man judge: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2696-FE0F","order":1006,"unicode":"👨🏾⚖️"},{"annotation":"man judge: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2696-FE0F","order":1008,"unicode":"👨🏿⚖️"}]},{"annotation":"woman judge","group":1,"hexcode":"1F469-200D-2696-FE0F","order":1010,"tags":["judge","justice","scales","woman"],"unicode":"👩⚖️","skins":[{"annotation":"woman judge: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2696-FE0F","order":1012,"unicode":"👩🏻⚖️"},{"annotation":"woman judge: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2696-FE0F","order":1014,"unicode":"👩🏼⚖️"},{"annotation":"woman judge: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2696-FE0F","order":1016,"unicode":"👩🏽⚖️"},{"annotation":"woman judge: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2696-FE0F","order":1018,"unicode":"👩🏾⚖️"},{"annotation":"woman judge: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2696-FE0F","order":1020,"unicode":"👩🏿⚖️"}]},{"annotation":"farmer","group":1,"hexcode":"1F9D1-200D-1F33E","order":1022,"tags":["gardener","rancher"],"unicode":"🧑🌾","skins":[{"annotation":"farmer: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F33E","order":1023,"unicode":"🧑🏻🌾"},{"annotation":"farmer: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F33E","order":1024,"unicode":"🧑🏼🌾"},{"annotation":"farmer: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F33E","order":1025,"unicode":"🧑🏽🌾"},{"annotation":"farmer: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F33E","order":1026,"unicode":"🧑🏾🌾"},{"annotation":"farmer: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F33E","order":1027,"unicode":"🧑🏿🌾"}]},{"annotation":"man farmer","group":1,"hexcode":"1F468-200D-1F33E","order":1028,"tags":["farmer","gardener","man","rancher"],"unicode":"👨🌾","skins":[{"annotation":"man farmer: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F33E","order":1029,"unicode":"👨🏻🌾"},{"annotation":"man farmer: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F33E","order":1030,"unicode":"👨🏼🌾"},{"annotation":"man farmer: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F33E","order":1031,"unicode":"👨🏽🌾"},{"annotation":"man farmer: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F33E","order":1032,"unicode":"👨🏾🌾"},{"annotation":"man farmer: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F33E","order":1033,"unicode":"👨🏿🌾"}]},{"annotation":"woman farmer","group":1,"hexcode":"1F469-200D-1F33E","order":1034,"tags":["farmer","gardener","rancher","woman"],"unicode":"👩🌾","skins":[{"annotation":"woman farmer: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F33E","order":1035,"unicode":"👩🏻🌾"},{"annotation":"woman farmer: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F33E","order":1036,"unicode":"👩🏼🌾"},{"annotation":"woman farmer: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F33E","order":1037,"unicode":"👩🏽🌾"},{"annotation":"woman farmer: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F33E","order":1038,"unicode":"👩🏾🌾"},{"annotation":"woman farmer: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F33E","order":1039,"unicode":"👩🏿🌾"}]},{"annotation":"cook","group":1,"hexcode":"1F9D1-200D-1F373","order":1040,"tags":["chef"],"unicode":"🧑🍳","skins":[{"annotation":"cook: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F373","order":1041,"unicode":"🧑🏻🍳"},{"annotation":"cook: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F373","order":1042,"unicode":"🧑🏼🍳"},{"annotation":"cook: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F373","order":1043,"unicode":"🧑🏽🍳"},{"annotation":"cook: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F373","order":1044,"unicode":"🧑🏾🍳"},{"annotation":"cook: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F373","order":1045,"unicode":"🧑🏿🍳"}]},{"annotation":"man cook","group":1,"hexcode":"1F468-200D-1F373","order":1046,"tags":["chef","cook","man"],"unicode":"👨🍳","skins":[{"annotation":"man cook: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F373","order":1047,"unicode":"👨🏻🍳"},{"annotation":"man cook: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F373","order":1048,"unicode":"👨🏼🍳"},{"annotation":"man cook: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F373","order":1049,"unicode":"👨🏽🍳"},{"annotation":"man cook: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F373","order":1050,"unicode":"👨🏾🍳"},{"annotation":"man cook: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F373","order":1051,"unicode":"👨🏿🍳"}]},{"annotation":"woman cook","group":1,"hexcode":"1F469-200D-1F373","order":1052,"tags":["chef","cook","woman"],"unicode":"👩🍳","skins":[{"annotation":"woman cook: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F373","order":1053,"unicode":"👩🏻🍳"},{"annotation":"woman cook: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F373","order":1054,"unicode":"👩🏼🍳"},{"annotation":"woman cook: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F373","order":1055,"unicode":"👩🏽🍳"},{"annotation":"woman cook: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F373","order":1056,"unicode":"👩🏾🍳"},{"annotation":"woman cook: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F373","order":1057,"unicode":"👩🏿🍳"}]},{"annotation":"mechanic","group":1,"hexcode":"1F9D1-200D-1F527","order":1058,"tags":["electrician","plumber","tradesperson"],"unicode":"🧑🔧","skins":[{"annotation":"mechanic: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F527","order":1059,"unicode":"🧑🏻🔧"},{"annotation":"mechanic: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F527","order":1060,"unicode":"🧑🏼🔧"},{"annotation":"mechanic: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F527","order":1061,"unicode":"🧑🏽🔧"},{"annotation":"mechanic: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F527","order":1062,"unicode":"🧑🏾🔧"},{"annotation":"mechanic: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F527","order":1063,"unicode":"🧑🏿🔧"}]},{"annotation":"man mechanic","group":1,"hexcode":"1F468-200D-1F527","order":1064,"tags":["electrician","man","mechanic","plumber","tradesperson"],"unicode":"👨🔧","skins":[{"annotation":"man mechanic: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F527","order":1065,"unicode":"👨🏻🔧"},{"annotation":"man mechanic: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F527","order":1066,"unicode":"👨🏼🔧"},{"annotation":"man mechanic: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F527","order":1067,"unicode":"👨🏽🔧"},{"annotation":"man mechanic: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F527","order":1068,"unicode":"👨🏾🔧"},{"annotation":"man mechanic: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F527","order":1069,"unicode":"👨🏿🔧"}]},{"annotation":"woman mechanic","group":1,"hexcode":"1F469-200D-1F527","order":1070,"tags":["electrician","mechanic","plumber","tradesperson","woman"],"unicode":"👩🔧","skins":[{"annotation":"woman mechanic: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F527","order":1071,"unicode":"👩🏻🔧"},{"annotation":"woman mechanic: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F527","order":1072,"unicode":"👩🏼🔧"},{"annotation":"woman mechanic: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F527","order":1073,"unicode":"👩🏽🔧"},{"annotation":"woman mechanic: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F527","order":1074,"unicode":"👩🏾🔧"},{"annotation":"woman mechanic: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F527","order":1075,"unicode":"👩🏿🔧"}]},{"annotation":"factory worker","group":1,"hexcode":"1F9D1-200D-1F3ED","order":1076,"tags":["assembly","factory","industrial","worker"],"unicode":"🧑🏭","skins":[{"annotation":"factory worker: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F3ED","order":1077,"unicode":"🧑🏻🏭"},{"annotation":"factory worker: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F3ED","order":1078,"unicode":"🧑🏼🏭"},{"annotation":"factory worker: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F3ED","order":1079,"unicode":"🧑🏽🏭"},{"annotation":"factory worker: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F3ED","order":1080,"unicode":"🧑🏾🏭"},{"annotation":"factory worker: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F3ED","order":1081,"unicode":"🧑🏿🏭"}]},{"annotation":"man factory worker","group":1,"hexcode":"1F468-200D-1F3ED","order":1082,"tags":["assembly","factory","industrial","man","worker"],"unicode":"👨🏭","skins":[{"annotation":"man factory worker: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F3ED","order":1083,"unicode":"👨🏻🏭"},{"annotation":"man factory worker: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F3ED","order":1084,"unicode":"👨🏼🏭"},{"annotation":"man factory worker: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F3ED","order":1085,"unicode":"👨🏽🏭"},{"annotation":"man factory worker: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F3ED","order":1086,"unicode":"👨🏾🏭"},{"annotation":"man factory worker: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F3ED","order":1087,"unicode":"👨🏿🏭"}]},{"annotation":"woman factory worker","group":1,"hexcode":"1F469-200D-1F3ED","order":1088,"tags":["assembly","factory","industrial","woman","worker"],"unicode":"👩🏭","skins":[{"annotation":"woman factory worker: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F3ED","order":1089,"unicode":"👩🏻🏭"},{"annotation":"woman factory worker: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F3ED","order":1090,"unicode":"👩🏼🏭"},{"annotation":"woman factory worker: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F3ED","order":1091,"unicode":"👩🏽🏭"},{"annotation":"woman factory worker: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F3ED","order":1092,"unicode":"👩🏾🏭"},{"annotation":"woman factory worker: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F3ED","order":1093,"unicode":"👩🏿🏭"}]},{"annotation":"office worker","group":1,"hexcode":"1F9D1-200D-1F4BC","order":1094,"tags":["architect","business","manager","white-collar"],"unicode":"🧑💼","skins":[{"annotation":"office worker: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F4BC","order":1095,"unicode":"🧑🏻💼"},{"annotation":"office worker: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F4BC","order":1096,"unicode":"🧑🏼💼"},{"annotation":"office worker: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F4BC","order":1097,"unicode":"🧑🏽💼"},{"annotation":"office worker: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F4BC","order":1098,"unicode":"🧑🏾💼"},{"annotation":"office worker: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F4BC","order":1099,"unicode":"🧑🏿💼"}]},{"annotation":"man office worker","group":1,"hexcode":"1F468-200D-1F4BC","order":1100,"tags":["architect","business","man","manager","white-collar"],"unicode":"👨💼","skins":[{"annotation":"man office worker: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F4BC","order":1101,"unicode":"👨🏻💼"},{"annotation":"man office worker: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F4BC","order":1102,"unicode":"👨🏼💼"},{"annotation":"man office worker: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F4BC","order":1103,"unicode":"👨🏽💼"},{"annotation":"man office worker: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F4BC","order":1104,"unicode":"👨🏾💼"},{"annotation":"man office worker: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F4BC","order":1105,"unicode":"👨🏿💼"}]},{"annotation":"woman office worker","group":1,"hexcode":"1F469-200D-1F4BC","order":1106,"tags":["architect","business","manager","white-collar","woman"],"unicode":"👩💼","skins":[{"annotation":"woman office worker: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F4BC","order":1107,"unicode":"👩🏻💼"},{"annotation":"woman office worker: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F4BC","order":1108,"unicode":"👩🏼💼"},{"annotation":"woman office worker: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F4BC","order":1109,"unicode":"👩🏽💼"},{"annotation":"woman office worker: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F4BC","order":1110,"unicode":"👩🏾💼"},{"annotation":"woman office worker: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F4BC","order":1111,"unicode":"👩🏿💼"}]},{"annotation":"scientist","group":1,"hexcode":"1F9D1-200D-1F52C","order":1112,"tags":["biologist","chemist","engineer","physicist"],"unicode":"🧑🔬","skins":[{"annotation":"scientist: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F52C","order":1113,"unicode":"🧑🏻🔬"},{"annotation":"scientist: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F52C","order":1114,"unicode":"🧑🏼🔬"},{"annotation":"scientist: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F52C","order":1115,"unicode":"🧑🏽🔬"},{"annotation":"scientist: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F52C","order":1116,"unicode":"🧑🏾🔬"},{"annotation":"scientist: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F52C","order":1117,"unicode":"🧑🏿🔬"}]},{"annotation":"man scientist","group":1,"hexcode":"1F468-200D-1F52C","order":1118,"tags":["biologist","chemist","engineer","man","physicist","scientist"],"unicode":"👨🔬","skins":[{"annotation":"man scientist: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F52C","order":1119,"unicode":"👨🏻🔬"},{"annotation":"man scientist: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F52C","order":1120,"unicode":"👨🏼🔬"},{"annotation":"man scientist: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F52C","order":1121,"unicode":"👨🏽🔬"},{"annotation":"man scientist: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F52C","order":1122,"unicode":"👨🏾🔬"},{"annotation":"man scientist: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F52C","order":1123,"unicode":"👨🏿🔬"}]},{"annotation":"woman scientist","group":1,"hexcode":"1F469-200D-1F52C","order":1124,"tags":["biologist","chemist","engineer","physicist","scientist","woman"],"unicode":"👩🔬","skins":[{"annotation":"woman scientist: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F52C","order":1125,"unicode":"👩🏻🔬"},{"annotation":"woman scientist: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F52C","order":1126,"unicode":"👩🏼🔬"},{"annotation":"woman scientist: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F52C","order":1127,"unicode":"👩🏽🔬"},{"annotation":"woman scientist: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F52C","order":1128,"unicode":"👩🏾🔬"},{"annotation":"woman scientist: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F52C","order":1129,"unicode":"👩🏿🔬"}]},{"annotation":"technologist","group":1,"hexcode":"1F9D1-200D-1F4BB","order":1130,"tags":["coder","developer","inventor","software"],"unicode":"🧑💻","skins":[{"annotation":"technologist: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F4BB","order":1131,"unicode":"🧑🏻💻"},{"annotation":"technologist: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F4BB","order":1132,"unicode":"🧑🏼💻"},{"annotation":"technologist: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F4BB","order":1133,"unicode":"🧑🏽💻"},{"annotation":"technologist: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F4BB","order":1134,"unicode":"🧑🏾💻"},{"annotation":"technologist: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F4BB","order":1135,"unicode":"🧑🏿💻"}]},{"annotation":"man technologist","group":1,"hexcode":"1F468-200D-1F4BB","order":1136,"tags":["coder","developer","inventor","man","software","technologist"],"unicode":"👨💻","skins":[{"annotation":"man technologist: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F4BB","order":1137,"unicode":"👨🏻💻"},{"annotation":"man technologist: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F4BB","order":1138,"unicode":"👨🏼💻"},{"annotation":"man technologist: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F4BB","order":1139,"unicode":"👨🏽💻"},{"annotation":"man technologist: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F4BB","order":1140,"unicode":"👨🏾💻"},{"annotation":"man technologist: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F4BB","order":1141,"unicode":"👨🏿💻"}]},{"annotation":"woman technologist","group":1,"hexcode":"1F469-200D-1F4BB","order":1142,"tags":["coder","developer","inventor","software","technologist","woman"],"unicode":"👩💻","skins":[{"annotation":"woman technologist: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F4BB","order":1143,"unicode":"👩🏻💻"},{"annotation":"woman technologist: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F4BB","order":1144,"unicode":"👩🏼💻"},{"annotation":"woman technologist: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F4BB","order":1145,"unicode":"👩🏽💻"},{"annotation":"woman technologist: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F4BB","order":1146,"unicode":"👩🏾💻"},{"annotation":"woman technologist: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F4BB","order":1147,"unicode":"👩🏿💻"}]},{"annotation":"singer","group":1,"hexcode":"1F9D1-200D-1F3A4","order":1148,"tags":["actor","entertainer","rock","star"],"unicode":"🧑🎤","skins":[{"annotation":"singer: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F3A4","order":1149,"unicode":"🧑🏻🎤"},{"annotation":"singer: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F3A4","order":1150,"unicode":"🧑🏼🎤"},{"annotation":"singer: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F3A4","order":1151,"unicode":"🧑🏽🎤"},{"annotation":"singer: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F3A4","order":1152,"unicode":"🧑🏾🎤"},{"annotation":"singer: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F3A4","order":1153,"unicode":"🧑🏿🎤"}]},{"annotation":"man singer","group":1,"hexcode":"1F468-200D-1F3A4","order":1154,"tags":["actor","entertainer","man","rock","singer","star"],"unicode":"👨🎤","skins":[{"annotation":"man singer: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F3A4","order":1155,"unicode":"👨🏻🎤"},{"annotation":"man singer: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F3A4","order":1156,"unicode":"👨🏼🎤"},{"annotation":"man singer: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F3A4","order":1157,"unicode":"👨🏽🎤"},{"annotation":"man singer: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F3A4","order":1158,"unicode":"👨🏾🎤"},{"annotation":"man singer: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F3A4","order":1159,"unicode":"👨🏿🎤"}]},{"annotation":"woman singer","group":1,"hexcode":"1F469-200D-1F3A4","order":1160,"tags":["actor","entertainer","rock","singer","star","woman"],"unicode":"👩🎤","skins":[{"annotation":"woman singer: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F3A4","order":1161,"unicode":"👩🏻🎤"},{"annotation":"woman singer: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F3A4","order":1162,"unicode":"👩🏼🎤"},{"annotation":"woman singer: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F3A4","order":1163,"unicode":"👩🏽🎤"},{"annotation":"woman singer: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F3A4","order":1164,"unicode":"👩🏾🎤"},{"annotation":"woman singer: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F3A4","order":1165,"unicode":"👩🏿🎤"}]},{"annotation":"artist","group":1,"hexcode":"1F9D1-200D-1F3A8","order":1166,"tags":["palette"],"unicode":"🧑🎨","skins":[{"annotation":"artist: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F3A8","order":1167,"unicode":"🧑🏻🎨"},{"annotation":"artist: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F3A8","order":1168,"unicode":"🧑🏼🎨"},{"annotation":"artist: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F3A8","order":1169,"unicode":"🧑🏽🎨"},{"annotation":"artist: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F3A8","order":1170,"unicode":"🧑🏾🎨"},{"annotation":"artist: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F3A8","order":1171,"unicode":"🧑🏿🎨"}]},{"annotation":"man artist","group":1,"hexcode":"1F468-200D-1F3A8","order":1172,"tags":["artist","man","palette"],"unicode":"👨🎨","skins":[{"annotation":"man artist: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F3A8","order":1173,"unicode":"👨🏻🎨"},{"annotation":"man artist: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F3A8","order":1174,"unicode":"👨🏼🎨"},{"annotation":"man artist: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F3A8","order":1175,"unicode":"👨🏽🎨"},{"annotation":"man artist: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F3A8","order":1176,"unicode":"👨🏾🎨"},{"annotation":"man artist: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F3A8","order":1177,"unicode":"👨🏿🎨"}]},{"annotation":"woman artist","group":1,"hexcode":"1F469-200D-1F3A8","order":1178,"tags":["artist","palette","woman"],"unicode":"👩🎨","skins":[{"annotation":"woman artist: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F3A8","order":1179,"unicode":"👩🏻🎨"},{"annotation":"woman artist: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F3A8","order":1180,"unicode":"👩🏼🎨"},{"annotation":"woman artist: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F3A8","order":1181,"unicode":"👩🏽🎨"},{"annotation":"woman artist: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F3A8","order":1182,"unicode":"👩🏾🎨"},{"annotation":"woman artist: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F3A8","order":1183,"unicode":"👩🏿🎨"}]},{"annotation":"pilot","group":1,"hexcode":"1F9D1-200D-2708-FE0F","order":1184,"tags":["plane"],"unicode":"🧑✈️","skins":[{"annotation":"pilot: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2708-FE0F","order":1186,"unicode":"🧑🏻✈️"},{"annotation":"pilot: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2708-FE0F","order":1188,"unicode":"🧑🏼✈️"},{"annotation":"pilot: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2708-FE0F","order":1190,"unicode":"🧑🏽✈️"},{"annotation":"pilot: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2708-FE0F","order":1192,"unicode":"🧑🏾✈️"},{"annotation":"pilot: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2708-FE0F","order":1194,"unicode":"🧑🏿✈️"}]},{"annotation":"man pilot","group":1,"hexcode":"1F468-200D-2708-FE0F","order":1196,"tags":["man","pilot","plane"],"unicode":"👨✈️","skins":[{"annotation":"man pilot: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2708-FE0F","order":1198,"unicode":"👨🏻✈️"},{"annotation":"man pilot: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2708-FE0F","order":1200,"unicode":"👨🏼✈️"},{"annotation":"man pilot: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2708-FE0F","order":1202,"unicode":"👨🏽✈️"},{"annotation":"man pilot: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2708-FE0F","order":1204,"unicode":"👨🏾✈️"},{"annotation":"man pilot: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2708-FE0F","order":1206,"unicode":"👨🏿✈️"}]},{"annotation":"woman pilot","group":1,"hexcode":"1F469-200D-2708-FE0F","order":1208,"tags":["pilot","plane","woman"],"unicode":"👩✈️","skins":[{"annotation":"woman pilot: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2708-FE0F","order":1210,"unicode":"👩🏻✈️"},{"annotation":"woman pilot: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2708-FE0F","order":1212,"unicode":"👩🏼✈️"},{"annotation":"woman pilot: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2708-FE0F","order":1214,"unicode":"👩🏽✈️"},{"annotation":"woman pilot: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2708-FE0F","order":1216,"unicode":"👩🏾✈️"},{"annotation":"woman pilot: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2708-FE0F","order":1218,"unicode":"👩🏿✈️"}]},{"annotation":"astronaut","group":1,"hexcode":"1F9D1-200D-1F680","order":1220,"tags":["rocket"],"unicode":"🧑🚀","skins":[{"annotation":"astronaut: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F680","order":1221,"unicode":"🧑🏻🚀"},{"annotation":"astronaut: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F680","order":1222,"unicode":"🧑🏼🚀"},{"annotation":"astronaut: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F680","order":1223,"unicode":"🧑🏽🚀"},{"annotation":"astronaut: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F680","order":1224,"unicode":"🧑🏾🚀"},{"annotation":"astronaut: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F680","order":1225,"unicode":"🧑🏿🚀"}]},{"annotation":"man astronaut","group":1,"hexcode":"1F468-200D-1F680","order":1226,"tags":["astronaut","man","rocket"],"unicode":"👨🚀","skins":[{"annotation":"man astronaut: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F680","order":1227,"unicode":"👨🏻🚀"},{"annotation":"man astronaut: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F680","order":1228,"unicode":"👨🏼🚀"},{"annotation":"man astronaut: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F680","order":1229,"unicode":"👨🏽🚀"},{"annotation":"man astronaut: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F680","order":1230,"unicode":"👨🏾🚀"},{"annotation":"man astronaut: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F680","order":1231,"unicode":"👨🏿🚀"}]},{"annotation":"woman astronaut","group":1,"hexcode":"1F469-200D-1F680","order":1232,"tags":["astronaut","rocket","woman"],"unicode":"👩🚀","skins":[{"annotation":"woman astronaut: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F680","order":1233,"unicode":"👩🏻🚀"},{"annotation":"woman astronaut: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F680","order":1234,"unicode":"👩🏼🚀"},{"annotation":"woman astronaut: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F680","order":1235,"unicode":"👩🏽🚀"},{"annotation":"woman astronaut: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F680","order":1236,"unicode":"👩🏾🚀"},{"annotation":"woman astronaut: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F680","order":1237,"unicode":"👩🏿🚀"}]},{"annotation":"firefighter","group":1,"hexcode":"1F9D1-200D-1F692","order":1238,"tags":["firetruck"],"unicode":"🧑🚒","skins":[{"annotation":"firefighter: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F692","order":1239,"unicode":"🧑🏻🚒"},{"annotation":"firefighter: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F692","order":1240,"unicode":"🧑🏼🚒"},{"annotation":"firefighter: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F692","order":1241,"unicode":"🧑🏽🚒"},{"annotation":"firefighter: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F692","order":1242,"unicode":"🧑🏾🚒"},{"annotation":"firefighter: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F692","order":1243,"unicode":"🧑🏿🚒"}]},{"annotation":"man firefighter","group":1,"hexcode":"1F468-200D-1F692","order":1244,"tags":["firefighter","firetruck","man"],"unicode":"👨🚒","skins":[{"annotation":"man firefighter: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F692","order":1245,"unicode":"👨🏻🚒"},{"annotation":"man firefighter: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F692","order":1246,"unicode":"👨🏼🚒"},{"annotation":"man firefighter: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F692","order":1247,"unicode":"👨🏽🚒"},{"annotation":"man firefighter: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F692","order":1248,"unicode":"👨🏾🚒"},{"annotation":"man firefighter: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F692","order":1249,"unicode":"👨🏿🚒"}]},{"annotation":"woman firefighter","group":1,"hexcode":"1F469-200D-1F692","order":1250,"tags":["firefighter","firetruck","woman"],"unicode":"👩🚒","skins":[{"annotation":"woman firefighter: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F692","order":1251,"unicode":"👩🏻🚒"},{"annotation":"woman firefighter: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F692","order":1252,"unicode":"👩🏼🚒"},{"annotation":"woman firefighter: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F692","order":1253,"unicode":"👩🏽🚒"},{"annotation":"woman firefighter: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F692","order":1254,"unicode":"👩🏾🚒"},{"annotation":"woman firefighter: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F692","order":1255,"unicode":"👩🏿🚒"}]},{"annotation":"police officer","group":1,"hexcode":"1F46E","order":1256,"tags":["cop","officer","police"],"unicode":"👮","skins":[{"annotation":"police officer: light skin tone","group":1,"hexcode":"1F46E-1F3FB","order":1257,"unicode":"👮🏻"},{"annotation":"police officer: medium-light skin tone","group":1,"hexcode":"1F46E-1F3FC","order":1258,"unicode":"👮🏼"},{"annotation":"police officer: medium skin tone","group":1,"hexcode":"1F46E-1F3FD","order":1259,"unicode":"👮🏽"},{"annotation":"police officer: medium-dark skin tone","group":1,"hexcode":"1F46E-1F3FE","order":1260,"unicode":"👮🏾"},{"annotation":"police officer: dark skin tone","group":1,"hexcode":"1F46E-1F3FF","order":1261,"unicode":"👮🏿"}]},{"annotation":"man police officer","group":1,"hexcode":"1F46E-200D-2642-FE0F","order":1262,"tags":["cop","man","officer","police"],"unicode":"👮♂️","skins":[{"annotation":"man police officer: light skin tone","group":1,"hexcode":"1F46E-1F3FB-200D-2642-FE0F","order":1264,"unicode":"👮🏻♂️"},{"annotation":"man police officer: medium-light skin tone","group":1,"hexcode":"1F46E-1F3FC-200D-2642-FE0F","order":1266,"unicode":"👮🏼♂️"},{"annotation":"man police officer: medium skin tone","group":1,"hexcode":"1F46E-1F3FD-200D-2642-FE0F","order":1268,"unicode":"👮🏽♂️"},{"annotation":"man police officer: medium-dark skin tone","group":1,"hexcode":"1F46E-1F3FE-200D-2642-FE0F","order":1270,"unicode":"👮🏾♂️"},{"annotation":"man police officer: dark skin tone","group":1,"hexcode":"1F46E-1F3FF-200D-2642-FE0F","order":1272,"unicode":"👮🏿♂️"}]},{"annotation":"woman police officer","group":1,"hexcode":"1F46E-200D-2640-FE0F","order":1274,"tags":["cop","officer","police","woman"],"unicode":"👮♀️","skins":[{"annotation":"woman police officer: light skin tone","group":1,"hexcode":"1F46E-1F3FB-200D-2640-FE0F","order":1276,"unicode":"👮🏻♀️"},{"annotation":"woman police officer: medium-light skin tone","group":1,"hexcode":"1F46E-1F3FC-200D-2640-FE0F","order":1278,"unicode":"👮🏼♀️"},{"annotation":"woman police officer: medium skin tone","group":1,"hexcode":"1F46E-1F3FD-200D-2640-FE0F","order":1280,"unicode":"👮🏽♀️"},{"annotation":"woman police officer: medium-dark skin tone","group":1,"hexcode":"1F46E-1F3FE-200D-2640-FE0F","order":1282,"unicode":"👮🏾♀️"},{"annotation":"woman police officer: dark skin tone","group":1,"hexcode":"1F46E-1F3FF-200D-2640-FE0F","order":1284,"unicode":"👮🏿♀️"}]},{"annotation":"detective","group":1,"hexcode":"1F575","order":1287,"tags":["sleuth","spy"],"unicode":"🕵️","skins":[{"annotation":"detective: light skin tone","group":1,"hexcode":"1F575-1F3FB","order":1288,"unicode":"🕵🏻"},{"annotation":"detective: medium-light skin tone","group":1,"hexcode":"1F575-1F3FC","order":1289,"unicode":"🕵🏼"},{"annotation":"detective: medium skin tone","group":1,"hexcode":"1F575-1F3FD","order":1290,"unicode":"🕵🏽"},{"annotation":"detective: medium-dark skin tone","group":1,"hexcode":"1F575-1F3FE","order":1291,"unicode":"🕵🏾"},{"annotation":"detective: dark skin tone","group":1,"hexcode":"1F575-1F3FF","order":1292,"unicode":"🕵🏿"}]},{"annotation":"man detective","group":1,"hexcode":"1F575-FE0F-200D-2642-FE0F","order":1293,"tags":["detective","man","sleuth","spy"],"unicode":"🕵️♂️","skins":[{"annotation":"man detective: light skin tone","group":1,"hexcode":"1F575-1F3FB-200D-2642-FE0F","order":1297,"unicode":"🕵🏻♂️"},{"annotation":"man detective: medium-light skin tone","group":1,"hexcode":"1F575-1F3FC-200D-2642-FE0F","order":1299,"unicode":"🕵🏼♂️"},{"annotation":"man detective: medium skin tone","group":1,"hexcode":"1F575-1F3FD-200D-2642-FE0F","order":1301,"unicode":"🕵🏽♂️"},{"annotation":"man detective: medium-dark skin tone","group":1,"hexcode":"1F575-1F3FE-200D-2642-FE0F","order":1303,"unicode":"🕵🏾♂️"},{"annotation":"man detective: dark skin tone","group":1,"hexcode":"1F575-1F3FF-200D-2642-FE0F","order":1305,"unicode":"🕵🏿♂️"}]},{"annotation":"woman detective","group":1,"hexcode":"1F575-FE0F-200D-2640-FE0F","order":1307,"tags":["detective","sleuth","spy","woman"],"unicode":"🕵️♀️","skins":[{"annotation":"woman detective: light skin tone","group":1,"hexcode":"1F575-1F3FB-200D-2640-FE0F","order":1311,"unicode":"🕵🏻♀️"},{"annotation":"woman detective: medium-light skin tone","group":1,"hexcode":"1F575-1F3FC-200D-2640-FE0F","order":1313,"unicode":"🕵🏼♀️"},{"annotation":"woman detective: medium skin tone","group":1,"hexcode":"1F575-1F3FD-200D-2640-FE0F","order":1315,"unicode":"🕵🏽♀️"},{"annotation":"woman detective: medium-dark skin tone","group":1,"hexcode":"1F575-1F3FE-200D-2640-FE0F","order":1317,"unicode":"🕵🏾♀️"},{"annotation":"woman detective: dark skin tone","group":1,"hexcode":"1F575-1F3FF-200D-2640-FE0F","order":1319,"unicode":"🕵🏿♀️"}]},{"annotation":"guard","group":1,"hexcode":"1F482","order":1321,"tags":["guard"],"unicode":"💂","skins":[{"annotation":"guard: light skin tone","group":1,"hexcode":"1F482-1F3FB","order":1322,"unicode":"💂🏻"},{"annotation":"guard: medium-light skin tone","group":1,"hexcode":"1F482-1F3FC","order":1323,"unicode":"💂🏼"},{"annotation":"guard: medium skin tone","group":1,"hexcode":"1F482-1F3FD","order":1324,"unicode":"💂🏽"},{"annotation":"guard: medium-dark skin tone","group":1,"hexcode":"1F482-1F3FE","order":1325,"unicode":"💂🏾"},{"annotation":"guard: dark skin tone","group":1,"hexcode":"1F482-1F3FF","order":1326,"unicode":"💂🏿"}]},{"annotation":"man guard","group":1,"hexcode":"1F482-200D-2642-FE0F","order":1327,"tags":["guard","man"],"unicode":"💂♂️","skins":[{"annotation":"man guard: light skin tone","group":1,"hexcode":"1F482-1F3FB-200D-2642-FE0F","order":1329,"unicode":"💂🏻♂️"},{"annotation":"man guard: medium-light skin tone","group":1,"hexcode":"1F482-1F3FC-200D-2642-FE0F","order":1331,"unicode":"💂🏼♂️"},{"annotation":"man guard: medium skin tone","group":1,"hexcode":"1F482-1F3FD-200D-2642-FE0F","order":1333,"unicode":"💂🏽♂️"},{"annotation":"man guard: medium-dark skin tone","group":1,"hexcode":"1F482-1F3FE-200D-2642-FE0F","order":1335,"unicode":"💂🏾♂️"},{"annotation":"man guard: dark skin tone","group":1,"hexcode":"1F482-1F3FF-200D-2642-FE0F","order":1337,"unicode":"💂🏿♂️"}]},{"annotation":"woman guard","group":1,"hexcode":"1F482-200D-2640-FE0F","order":1339,"tags":["guard","woman"],"unicode":"💂♀️","skins":[{"annotation":"woman guard: light skin tone","group":1,"hexcode":"1F482-1F3FB-200D-2640-FE0F","order":1341,"unicode":"💂🏻♀️"},{"annotation":"woman guard: medium-light skin tone","group":1,"hexcode":"1F482-1F3FC-200D-2640-FE0F","order":1343,"unicode":"💂🏼♀️"},{"annotation":"woman guard: medium skin tone","group":1,"hexcode":"1F482-1F3FD-200D-2640-FE0F","order":1345,"unicode":"💂🏽♀️"},{"annotation":"woman guard: medium-dark skin tone","group":1,"hexcode":"1F482-1F3FE-200D-2640-FE0F","order":1347,"unicode":"💂🏾♀️"},{"annotation":"woman guard: dark skin tone","group":1,"hexcode":"1F482-1F3FF-200D-2640-FE0F","order":1349,"unicode":"💂🏿♀️"}]},{"annotation":"ninja","group":1,"hexcode":"1F977","order":1351,"tags":["fighter","hidden","stealth"],"unicode":"🥷","skins":[{"annotation":"ninja: light skin tone","group":1,"hexcode":"1F977-1F3FB","order":1352,"unicode":"🥷🏻"},{"annotation":"ninja: medium-light skin tone","group":1,"hexcode":"1F977-1F3FC","order":1353,"unicode":"🥷🏼"},{"annotation":"ninja: medium skin tone","group":1,"hexcode":"1F977-1F3FD","order":1354,"unicode":"🥷🏽"},{"annotation":"ninja: medium-dark skin tone","group":1,"hexcode":"1F977-1F3FE","order":1355,"unicode":"🥷🏾"},{"annotation":"ninja: dark skin tone","group":1,"hexcode":"1F977-1F3FF","order":1356,"unicode":"🥷🏿"}]},{"annotation":"construction worker","group":1,"hexcode":"1F477","order":1357,"tags":["construction","hat","worker"],"unicode":"👷","skins":[{"annotation":"construction worker: light skin tone","group":1,"hexcode":"1F477-1F3FB","order":1358,"unicode":"👷🏻"},{"annotation":"construction worker: medium-light skin tone","group":1,"hexcode":"1F477-1F3FC","order":1359,"unicode":"👷🏼"},{"annotation":"construction worker: medium skin tone","group":1,"hexcode":"1F477-1F3FD","order":1360,"unicode":"👷🏽"},{"annotation":"construction worker: medium-dark skin tone","group":1,"hexcode":"1F477-1F3FE","order":1361,"unicode":"👷🏾"},{"annotation":"construction worker: dark skin tone","group":1,"hexcode":"1F477-1F3FF","order":1362,"unicode":"👷🏿"}]},{"annotation":"man construction worker","group":1,"hexcode":"1F477-200D-2642-FE0F","order":1363,"tags":["construction","man","worker"],"unicode":"👷♂️","skins":[{"annotation":"man construction worker: light skin tone","group":1,"hexcode":"1F477-1F3FB-200D-2642-FE0F","order":1365,"unicode":"👷🏻♂️"},{"annotation":"man construction worker: medium-light skin tone","group":1,"hexcode":"1F477-1F3FC-200D-2642-FE0F","order":1367,"unicode":"👷🏼♂️"},{"annotation":"man construction worker: medium skin tone","group":1,"hexcode":"1F477-1F3FD-200D-2642-FE0F","order":1369,"unicode":"👷🏽♂️"},{"annotation":"man construction worker: medium-dark skin tone","group":1,"hexcode":"1F477-1F3FE-200D-2642-FE0F","order":1371,"unicode":"👷🏾♂️"},{"annotation":"man construction worker: dark skin tone","group":1,"hexcode":"1F477-1F3FF-200D-2642-FE0F","order":1373,"unicode":"👷🏿♂️"}]},{"annotation":"woman construction worker","group":1,"hexcode":"1F477-200D-2640-FE0F","order":1375,"tags":["construction","woman","worker"],"unicode":"👷♀️","skins":[{"annotation":"woman construction worker: light skin tone","group":1,"hexcode":"1F477-1F3FB-200D-2640-FE0F","order":1377,"unicode":"👷🏻♀️"},{"annotation":"woman construction worker: medium-light skin tone","group":1,"hexcode":"1F477-1F3FC-200D-2640-FE0F","order":1379,"unicode":"👷🏼♀️"},{"annotation":"woman construction worker: medium skin tone","group":1,"hexcode":"1F477-1F3FD-200D-2640-FE0F","order":1381,"unicode":"👷🏽♀️"},{"annotation":"woman construction worker: medium-dark skin tone","group":1,"hexcode":"1F477-1F3FE-200D-2640-FE0F","order":1383,"unicode":"👷🏾♀️"},{"annotation":"woman construction worker: dark skin tone","group":1,"hexcode":"1F477-1F3FF-200D-2640-FE0F","order":1385,"unicode":"👷🏿♀️"}]},{"annotation":"prince","group":1,"hexcode":"1F934","order":1387,"tags":["prince"],"unicode":"🤴","skins":[{"annotation":"prince: light skin tone","group":1,"hexcode":"1F934-1F3FB","order":1388,"unicode":"🤴🏻"},{"annotation":"prince: medium-light skin tone","group":1,"hexcode":"1F934-1F3FC","order":1389,"unicode":"🤴🏼"},{"annotation":"prince: medium skin tone","group":1,"hexcode":"1F934-1F3FD","order":1390,"unicode":"🤴🏽"},{"annotation":"prince: medium-dark skin tone","group":1,"hexcode":"1F934-1F3FE","order":1391,"unicode":"🤴🏾"},{"annotation":"prince: dark skin tone","group":1,"hexcode":"1F934-1F3FF","order":1392,"unicode":"🤴🏿"}]},{"annotation":"princess","group":1,"hexcode":"1F478","order":1393,"tags":["fairy tale","fantasy"],"unicode":"👸","skins":[{"annotation":"princess: light skin tone","group":1,"hexcode":"1F478-1F3FB","order":1394,"unicode":"👸🏻"},{"annotation":"princess: medium-light skin tone","group":1,"hexcode":"1F478-1F3FC","order":1395,"unicode":"👸🏼"},{"annotation":"princess: medium skin tone","group":1,"hexcode":"1F478-1F3FD","order":1396,"unicode":"👸🏽"},{"annotation":"princess: medium-dark skin tone","group":1,"hexcode":"1F478-1F3FE","order":1397,"unicode":"👸🏾"},{"annotation":"princess: dark skin tone","group":1,"hexcode":"1F478-1F3FF","order":1398,"unicode":"👸🏿"}]},{"annotation":"person wearing turban","group":1,"hexcode":"1F473","order":1399,"tags":["turban"],"unicode":"👳","skins":[{"annotation":"person wearing turban: light skin tone","group":1,"hexcode":"1F473-1F3FB","order":1400,"unicode":"👳🏻"},{"annotation":"person wearing turban: medium-light skin tone","group":1,"hexcode":"1F473-1F3FC","order":1401,"unicode":"👳🏼"},{"annotation":"person wearing turban: medium skin tone","group":1,"hexcode":"1F473-1F3FD","order":1402,"unicode":"👳🏽"},{"annotation":"person wearing turban: medium-dark skin tone","group":1,"hexcode":"1F473-1F3FE","order":1403,"unicode":"👳🏾"},{"annotation":"person wearing turban: dark skin tone","group":1,"hexcode":"1F473-1F3FF","order":1404,"unicode":"👳🏿"}]},{"annotation":"man wearing turban","group":1,"hexcode":"1F473-200D-2642-FE0F","order":1405,"tags":["man","turban"],"unicode":"👳♂️","skins":[{"annotation":"man wearing turban: light skin tone","group":1,"hexcode":"1F473-1F3FB-200D-2642-FE0F","order":1407,"unicode":"👳🏻♂️"},{"annotation":"man wearing turban: medium-light skin tone","group":1,"hexcode":"1F473-1F3FC-200D-2642-FE0F","order":1409,"unicode":"👳🏼♂️"},{"annotation":"man wearing turban: medium skin tone","group":1,"hexcode":"1F473-1F3FD-200D-2642-FE0F","order":1411,"unicode":"👳🏽♂️"},{"annotation":"man wearing turban: medium-dark skin tone","group":1,"hexcode":"1F473-1F3FE-200D-2642-FE0F","order":1413,"unicode":"👳🏾♂️"},{"annotation":"man wearing turban: dark skin tone","group":1,"hexcode":"1F473-1F3FF-200D-2642-FE0F","order":1415,"unicode":"👳🏿♂️"}]},{"annotation":"woman wearing turban","group":1,"hexcode":"1F473-200D-2640-FE0F","order":1417,"tags":["turban","woman"],"unicode":"👳♀️","skins":[{"annotation":"woman wearing turban: light skin tone","group":1,"hexcode":"1F473-1F3FB-200D-2640-FE0F","order":1419,"unicode":"👳🏻♀️"},{"annotation":"woman wearing turban: medium-light skin tone","group":1,"hexcode":"1F473-1F3FC-200D-2640-FE0F","order":1421,"unicode":"👳🏼♀️"},{"annotation":"woman wearing turban: medium skin tone","group":1,"hexcode":"1F473-1F3FD-200D-2640-FE0F","order":1423,"unicode":"👳🏽♀️"},{"annotation":"woman wearing turban: medium-dark skin tone","group":1,"hexcode":"1F473-1F3FE-200D-2640-FE0F","order":1425,"unicode":"👳🏾♀️"},{"annotation":"woman wearing turban: dark skin tone","group":1,"hexcode":"1F473-1F3FF-200D-2640-FE0F","order":1427,"unicode":"👳🏿♀️"}]},{"annotation":"person with skullcap","group":1,"hexcode":"1F472","order":1429,"tags":["cap","gua pi mao","hat","person","skullcap"],"unicode":"👲","skins":[{"annotation":"person with skullcap: light skin tone","group":1,"hexcode":"1F472-1F3FB","order":1430,"unicode":"👲🏻"},{"annotation":"person with skullcap: medium-light skin tone","group":1,"hexcode":"1F472-1F3FC","order":1431,"unicode":"👲🏼"},{"annotation":"person with skullcap: medium skin tone","group":1,"hexcode":"1F472-1F3FD","order":1432,"unicode":"👲🏽"},{"annotation":"person with skullcap: medium-dark skin tone","group":1,"hexcode":"1F472-1F3FE","order":1433,"unicode":"👲🏾"},{"annotation":"person with skullcap: dark skin tone","group":1,"hexcode":"1F472-1F3FF","order":1434,"unicode":"👲🏿"}]},{"annotation":"woman with headscarf","group":1,"hexcode":"1F9D5","order":1435,"tags":["headscarf","hijab","mantilla","tichel"],"unicode":"🧕","skins":[{"annotation":"woman with headscarf: light skin tone","group":1,"hexcode":"1F9D5-1F3FB","order":1436,"unicode":"🧕🏻"},{"annotation":"woman with headscarf: medium-light skin tone","group":1,"hexcode":"1F9D5-1F3FC","order":1437,"unicode":"🧕🏼"},{"annotation":"woman with headscarf: medium skin tone","group":1,"hexcode":"1F9D5-1F3FD","order":1438,"unicode":"🧕🏽"},{"annotation":"woman with headscarf: medium-dark skin tone","group":1,"hexcode":"1F9D5-1F3FE","order":1439,"unicode":"🧕🏾"},{"annotation":"woman with headscarf: dark skin tone","group":1,"hexcode":"1F9D5-1F3FF","order":1440,"unicode":"🧕🏿"}]},{"annotation":"person in tuxedo","group":1,"hexcode":"1F935","order":1441,"tags":["groom","person","tuxedo"],"unicode":"🤵","skins":[{"annotation":"person in tuxedo: light skin tone","group":1,"hexcode":"1F935-1F3FB","order":1442,"unicode":"🤵🏻"},{"annotation":"person in tuxedo: medium-light skin tone","group":1,"hexcode":"1F935-1F3FC","order":1443,"unicode":"🤵🏼"},{"annotation":"person in tuxedo: medium skin tone","group":1,"hexcode":"1F935-1F3FD","order":1444,"unicode":"🤵🏽"},{"annotation":"person in tuxedo: medium-dark skin tone","group":1,"hexcode":"1F935-1F3FE","order":1445,"unicode":"🤵🏾"},{"annotation":"person in tuxedo: dark skin tone","group":1,"hexcode":"1F935-1F3FF","order":1446,"unicode":"🤵🏿"}]},{"annotation":"man in tuxedo","group":1,"hexcode":"1F935-200D-2642-FE0F","order":1447,"tags":["man","tuxedo"],"unicode":"🤵♂️","skins":[{"annotation":"man in tuxedo: light skin tone","group":1,"hexcode":"1F935-1F3FB-200D-2642-FE0F","order":1449,"unicode":"🤵🏻♂️"},{"annotation":"man in tuxedo: medium-light skin tone","group":1,"hexcode":"1F935-1F3FC-200D-2642-FE0F","order":1451,"unicode":"🤵🏼♂️"},{"annotation":"man in tuxedo: medium skin tone","group":1,"hexcode":"1F935-1F3FD-200D-2642-FE0F","order":1453,"unicode":"🤵🏽♂️"},{"annotation":"man in tuxedo: medium-dark skin tone","group":1,"hexcode":"1F935-1F3FE-200D-2642-FE0F","order":1455,"unicode":"🤵🏾♂️"},{"annotation":"man in tuxedo: dark skin tone","group":1,"hexcode":"1F935-1F3FF-200D-2642-FE0F","order":1457,"unicode":"🤵🏿♂️"}]},{"annotation":"woman in tuxedo","group":1,"hexcode":"1F935-200D-2640-FE0F","order":1459,"tags":["tuxedo","woman"],"unicode":"🤵♀️","skins":[{"annotation":"woman in tuxedo: light skin tone","group":1,"hexcode":"1F935-1F3FB-200D-2640-FE0F","order":1461,"unicode":"🤵🏻♀️"},{"annotation":"woman in tuxedo: medium-light skin tone","group":1,"hexcode":"1F935-1F3FC-200D-2640-FE0F","order":1463,"unicode":"🤵🏼♀️"},{"annotation":"woman in tuxedo: medium skin tone","group":1,"hexcode":"1F935-1F3FD-200D-2640-FE0F","order":1465,"unicode":"🤵🏽♀️"},{"annotation":"woman in tuxedo: medium-dark skin tone","group":1,"hexcode":"1F935-1F3FE-200D-2640-FE0F","order":1467,"unicode":"🤵🏾♀️"},{"annotation":"woman in tuxedo: dark skin tone","group":1,"hexcode":"1F935-1F3FF-200D-2640-FE0F","order":1469,"unicode":"🤵🏿♀️"}]},{"annotation":"person with veil","group":1,"hexcode":"1F470","order":1471,"tags":["bride","person","veil","wedding"],"unicode":"👰","skins":[{"annotation":"person with veil: light skin tone","group":1,"hexcode":"1F470-1F3FB","order":1472,"unicode":"👰🏻"},{"annotation":"person with veil: medium-light skin tone","group":1,"hexcode":"1F470-1F3FC","order":1473,"unicode":"👰🏼"},{"annotation":"person with veil: medium skin tone","group":1,"hexcode":"1F470-1F3FD","order":1474,"unicode":"👰🏽"},{"annotation":"person with veil: medium-dark skin tone","group":1,"hexcode":"1F470-1F3FE","order":1475,"unicode":"👰🏾"},{"annotation":"person with veil: dark skin tone","group":1,"hexcode":"1F470-1F3FF","order":1476,"unicode":"👰🏿"}]},{"annotation":"man with veil","group":1,"hexcode":"1F470-200D-2642-FE0F","order":1477,"tags":["man","veil"],"unicode":"👰♂️","skins":[{"annotation":"man with veil: light skin tone","group":1,"hexcode":"1F470-1F3FB-200D-2642-FE0F","order":1479,"unicode":"👰🏻♂️"},{"annotation":"man with veil: medium-light skin tone","group":1,"hexcode":"1F470-1F3FC-200D-2642-FE0F","order":1481,"unicode":"👰🏼♂️"},{"annotation":"man with veil: medium skin tone","group":1,"hexcode":"1F470-1F3FD-200D-2642-FE0F","order":1483,"unicode":"👰🏽♂️"},{"annotation":"man with veil: medium-dark skin tone","group":1,"hexcode":"1F470-1F3FE-200D-2642-FE0F","order":1485,"unicode":"👰🏾♂️"},{"annotation":"man with veil: dark skin tone","group":1,"hexcode":"1F470-1F3FF-200D-2642-FE0F","order":1487,"unicode":"👰🏿♂️"}]},{"annotation":"woman with veil","group":1,"hexcode":"1F470-200D-2640-FE0F","order":1489,"tags":["veil","woman"],"unicode":"👰♀️","skins":[{"annotation":"woman with veil: light skin tone","group":1,"hexcode":"1F470-1F3FB-200D-2640-FE0F","order":1491,"unicode":"👰🏻♀️"},{"annotation":"woman with veil: medium-light skin tone","group":1,"hexcode":"1F470-1F3FC-200D-2640-FE0F","order":1493,"unicode":"👰🏼♀️"},{"annotation":"woman with veil: medium skin tone","group":1,"hexcode":"1F470-1F3FD-200D-2640-FE0F","order":1495,"unicode":"👰🏽♀️"},{"annotation":"woman with veil: medium-dark skin tone","group":1,"hexcode":"1F470-1F3FE-200D-2640-FE0F","order":1497,"unicode":"👰🏾♀️"},{"annotation":"woman with veil: dark skin tone","group":1,"hexcode":"1F470-1F3FF-200D-2640-FE0F","order":1499,"unicode":"👰🏿♀️"}]},{"annotation":"pregnant woman","group":1,"hexcode":"1F930","order":1501,"tags":["pregnant","woman"],"unicode":"🤰","skins":[{"annotation":"pregnant woman: light skin tone","group":1,"hexcode":"1F930-1F3FB","order":1502,"unicode":"🤰🏻"},{"annotation":"pregnant woman: medium-light skin tone","group":1,"hexcode":"1F930-1F3FC","order":1503,"unicode":"🤰🏼"},{"annotation":"pregnant woman: medium skin tone","group":1,"hexcode":"1F930-1F3FD","order":1504,"unicode":"🤰🏽"},{"annotation":"pregnant woman: medium-dark skin tone","group":1,"hexcode":"1F930-1F3FE","order":1505,"unicode":"🤰🏾"},{"annotation":"pregnant woman: dark skin tone","group":1,"hexcode":"1F930-1F3FF","order":1506,"unicode":"🤰🏿"}]},{"annotation":"breast-feeding","group":1,"hexcode":"1F931","order":1507,"tags":["baby","breast","nursing"],"unicode":"🤱","skins":[{"annotation":"breast-feeding: light skin tone","group":1,"hexcode":"1F931-1F3FB","order":1508,"unicode":"🤱🏻"},{"annotation":"breast-feeding: medium-light skin tone","group":1,"hexcode":"1F931-1F3FC","order":1509,"unicode":"🤱🏼"},{"annotation":"breast-feeding: medium skin tone","group":1,"hexcode":"1F931-1F3FD","order":1510,"unicode":"🤱🏽"},{"annotation":"breast-feeding: medium-dark skin tone","group":1,"hexcode":"1F931-1F3FE","order":1511,"unicode":"🤱🏾"},{"annotation":"breast-feeding: dark skin tone","group":1,"hexcode":"1F931-1F3FF","order":1512,"unicode":"🤱🏿"}]},{"annotation":"woman feeding baby","group":1,"hexcode":"1F469-200D-1F37C","order":1513,"tags":["baby","feeding","nursing","woman"],"unicode":"👩🍼","skins":[{"annotation":"woman feeding baby: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F37C","order":1514,"unicode":"👩🏻🍼"},{"annotation":"woman feeding baby: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F37C","order":1515,"unicode":"👩🏼🍼"},{"annotation":"woman feeding baby: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F37C","order":1516,"unicode":"👩🏽🍼"},{"annotation":"woman feeding baby: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F37C","order":1517,"unicode":"👩🏾🍼"},{"annotation":"woman feeding baby: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F37C","order":1518,"unicode":"👩🏿🍼"}]},{"annotation":"man feeding baby","group":1,"hexcode":"1F468-200D-1F37C","order":1519,"tags":["baby","feeding","man","nursing"],"unicode":"👨🍼","skins":[{"annotation":"man feeding baby: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F37C","order":1520,"unicode":"👨🏻🍼"},{"annotation":"man feeding baby: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F37C","order":1521,"unicode":"👨🏼🍼"},{"annotation":"man feeding baby: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F37C","order":1522,"unicode":"👨🏽🍼"},{"annotation":"man feeding baby: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F37C","order":1523,"unicode":"👨🏾🍼"},{"annotation":"man feeding baby: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F37C","order":1524,"unicode":"👨🏿🍼"}]},{"annotation":"person feeding baby","group":1,"hexcode":"1F9D1-200D-1F37C","order":1525,"tags":["baby","feeding","nursing","person"],"unicode":"🧑🍼","skins":[{"annotation":"person feeding baby: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F37C","order":1526,"unicode":"🧑🏻🍼"},{"annotation":"person feeding baby: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F37C","order":1527,"unicode":"🧑🏼🍼"},{"annotation":"person feeding baby: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F37C","order":1528,"unicode":"🧑🏽🍼"},{"annotation":"person feeding baby: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F37C","order":1529,"unicode":"🧑🏾🍼"},{"annotation":"person feeding baby: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F37C","order":1530,"unicode":"🧑🏿🍼"}]},{"annotation":"baby angel","group":1,"hexcode":"1F47C","order":1531,"tags":["angel","baby","face","fairy tale","fantasy"],"unicode":"👼","skins":[{"annotation":"baby angel: light skin tone","group":1,"hexcode":"1F47C-1F3FB","order":1532,"unicode":"👼🏻"},{"annotation":"baby angel: medium-light skin tone","group":1,"hexcode":"1F47C-1F3FC","order":1533,"unicode":"👼🏼"},{"annotation":"baby angel: medium skin tone","group":1,"hexcode":"1F47C-1F3FD","order":1534,"unicode":"👼🏽"},{"annotation":"baby angel: medium-dark skin tone","group":1,"hexcode":"1F47C-1F3FE","order":1535,"unicode":"👼🏾"},{"annotation":"baby angel: dark skin tone","group":1,"hexcode":"1F47C-1F3FF","order":1536,"unicode":"👼🏿"}]},{"annotation":"Santa Claus","group":1,"hexcode":"1F385","order":1537,"tags":["celebration","christmas","claus","father","santa","santa claus"],"unicode":"🎅","skins":[{"annotation":"Santa Claus: light skin tone","group":1,"hexcode":"1F385-1F3FB","order":1538,"unicode":"🎅🏻"},{"annotation":"Santa Claus: medium-light skin tone","group":1,"hexcode":"1F385-1F3FC","order":1539,"unicode":"🎅🏼"},{"annotation":"Santa Claus: medium skin tone","group":1,"hexcode":"1F385-1F3FD","order":1540,"unicode":"🎅🏽"},{"annotation":"Santa Claus: medium-dark skin tone","group":1,"hexcode":"1F385-1F3FE","order":1541,"unicode":"🎅🏾"},{"annotation":"Santa Claus: dark skin tone","group":1,"hexcode":"1F385-1F3FF","order":1542,"unicode":"🎅🏿"}]},{"annotation":"Mrs. Claus","group":1,"hexcode":"1F936","order":1543,"tags":["celebration","christmas","claus","mother","mrs.","mrs. claus"],"unicode":"🤶","skins":[{"annotation":"Mrs. Claus: light skin tone","group":1,"hexcode":"1F936-1F3FB","order":1544,"unicode":"🤶🏻"},{"annotation":"Mrs. Claus: medium-light skin tone","group":1,"hexcode":"1F936-1F3FC","order":1545,"unicode":"🤶🏼"},{"annotation":"Mrs. Claus: medium skin tone","group":1,"hexcode":"1F936-1F3FD","order":1546,"unicode":"🤶🏽"},{"annotation":"Mrs. Claus: medium-dark skin tone","group":1,"hexcode":"1F936-1F3FE","order":1547,"unicode":"🤶🏾"},{"annotation":"Mrs. Claus: dark skin tone","group":1,"hexcode":"1F936-1F3FF","order":1548,"unicode":"🤶🏿"}]},{"annotation":"mx claus","group":1,"hexcode":"1F9D1-200D-1F384","order":1549,"tags":["claus, christmas"],"unicode":"🧑🎄","skins":[{"annotation":"mx claus: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F384","order":1550,"unicode":"🧑🏻🎄"},{"annotation":"mx claus: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F384","order":1551,"unicode":"🧑🏼🎄"},{"annotation":"mx claus: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F384","order":1552,"unicode":"🧑🏽🎄"},{"annotation":"mx claus: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F384","order":1553,"unicode":"🧑🏾🎄"},{"annotation":"mx claus: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F384","order":1554,"unicode":"🧑🏿🎄"}]},{"annotation":"superhero","group":1,"hexcode":"1F9B8","order":1555,"tags":["good","hero","heroine","superpower"],"unicode":"🦸","skins":[{"annotation":"superhero: light skin tone","group":1,"hexcode":"1F9B8-1F3FB","order":1556,"unicode":"🦸🏻"},{"annotation":"superhero: medium-light skin tone","group":1,"hexcode":"1F9B8-1F3FC","order":1557,"unicode":"🦸🏼"},{"annotation":"superhero: medium skin tone","group":1,"hexcode":"1F9B8-1F3FD","order":1558,"unicode":"🦸🏽"},{"annotation":"superhero: medium-dark skin tone","group":1,"hexcode":"1F9B8-1F3FE","order":1559,"unicode":"🦸🏾"},{"annotation":"superhero: dark skin tone","group":1,"hexcode":"1F9B8-1F3FF","order":1560,"unicode":"🦸🏿"}]},{"annotation":"man superhero","group":1,"hexcode":"1F9B8-200D-2642-FE0F","order":1561,"tags":["good","hero","man","superpower"],"unicode":"🦸♂️","skins":[{"annotation":"man superhero: light skin tone","group":1,"hexcode":"1F9B8-1F3FB-200D-2642-FE0F","order":1563,"unicode":"🦸🏻♂️"},{"annotation":"man superhero: medium-light skin tone","group":1,"hexcode":"1F9B8-1F3FC-200D-2642-FE0F","order":1565,"unicode":"🦸🏼♂️"},{"annotation":"man superhero: medium skin tone","group":1,"hexcode":"1F9B8-1F3FD-200D-2642-FE0F","order":1567,"unicode":"🦸🏽♂️"},{"annotation":"man superhero: medium-dark skin tone","group":1,"hexcode":"1F9B8-1F3FE-200D-2642-FE0F","order":1569,"unicode":"🦸🏾♂️"},{"annotation":"man superhero: dark skin tone","group":1,"hexcode":"1F9B8-1F3FF-200D-2642-FE0F","order":1571,"unicode":"🦸🏿♂️"}]},{"annotation":"woman superhero","group":1,"hexcode":"1F9B8-200D-2640-FE0F","order":1573,"tags":["good","hero","heroine","superpower","woman"],"unicode":"🦸♀️","skins":[{"annotation":"woman superhero: light skin tone","group":1,"hexcode":"1F9B8-1F3FB-200D-2640-FE0F","order":1575,"unicode":"🦸🏻♀️"},{"annotation":"woman superhero: medium-light skin tone","group":1,"hexcode":"1F9B8-1F3FC-200D-2640-FE0F","order":1577,"unicode":"🦸🏼♀️"},{"annotation":"woman superhero: medium skin tone","group":1,"hexcode":"1F9B8-1F3FD-200D-2640-FE0F","order":1579,"unicode":"🦸🏽♀️"},{"annotation":"woman superhero: medium-dark skin tone","group":1,"hexcode":"1F9B8-1F3FE-200D-2640-FE0F","order":1581,"unicode":"🦸🏾♀️"},{"annotation":"woman superhero: dark skin tone","group":1,"hexcode":"1F9B8-1F3FF-200D-2640-FE0F","order":1583,"unicode":"🦸🏿♀️"}]},{"annotation":"supervillain","group":1,"hexcode":"1F9B9","order":1585,"tags":["criminal","evil","superpower","villain"],"unicode":"🦹","skins":[{"annotation":"supervillain: light skin tone","group":1,"hexcode":"1F9B9-1F3FB","order":1586,"unicode":"🦹🏻"},{"annotation":"supervillain: medium-light skin tone","group":1,"hexcode":"1F9B9-1F3FC","order":1587,"unicode":"🦹🏼"},{"annotation":"supervillain: medium skin tone","group":1,"hexcode":"1F9B9-1F3FD","order":1588,"unicode":"🦹🏽"},{"annotation":"supervillain: medium-dark skin tone","group":1,"hexcode":"1F9B9-1F3FE","order":1589,"unicode":"🦹🏾"},{"annotation":"supervillain: dark skin tone","group":1,"hexcode":"1F9B9-1F3FF","order":1590,"unicode":"🦹🏿"}]},{"annotation":"man supervillain","group":1,"hexcode":"1F9B9-200D-2642-FE0F","order":1591,"tags":["criminal","evil","man","superpower","villain"],"unicode":"🦹♂️","skins":[{"annotation":"man supervillain: light skin tone","group":1,"hexcode":"1F9B9-1F3FB-200D-2642-FE0F","order":1593,"unicode":"🦹🏻♂️"},{"annotation":"man supervillain: medium-light skin tone","group":1,"hexcode":"1F9B9-1F3FC-200D-2642-FE0F","order":1595,"unicode":"🦹🏼♂️"},{"annotation":"man supervillain: medium skin tone","group":1,"hexcode":"1F9B9-1F3FD-200D-2642-FE0F","order":1597,"unicode":"🦹🏽♂️"},{"annotation":"man supervillain: medium-dark skin tone","group":1,"hexcode":"1F9B9-1F3FE-200D-2642-FE0F","order":1599,"unicode":"🦹🏾♂️"},{"annotation":"man supervillain: dark skin tone","group":1,"hexcode":"1F9B9-1F3FF-200D-2642-FE0F","order":1601,"unicode":"🦹🏿♂️"}]},{"annotation":"woman supervillain","group":1,"hexcode":"1F9B9-200D-2640-FE0F","order":1603,"tags":["criminal","evil","superpower","villain","woman"],"unicode":"🦹♀️","skins":[{"annotation":"woman supervillain: light skin tone","group":1,"hexcode":"1F9B9-1F3FB-200D-2640-FE0F","order":1605,"unicode":"🦹🏻♀️"},{"annotation":"woman supervillain: medium-light skin tone","group":1,"hexcode":"1F9B9-1F3FC-200D-2640-FE0F","order":1607,"unicode":"🦹🏼♀️"},{"annotation":"woman supervillain: medium skin tone","group":1,"hexcode":"1F9B9-1F3FD-200D-2640-FE0F","order":1609,"unicode":"🦹🏽♀️"},{"annotation":"woman supervillain: medium-dark skin tone","group":1,"hexcode":"1F9B9-1F3FE-200D-2640-FE0F","order":1611,"unicode":"🦹🏾♀️"},{"annotation":"woman supervillain: dark skin tone","group":1,"hexcode":"1F9B9-1F3FF-200D-2640-FE0F","order":1613,"unicode":"🦹🏿♀️"}]},{"annotation":"mage","group":1,"hexcode":"1F9D9","order":1615,"tags":["sorcerer","sorceress","witch","wizard"],"unicode":"🧙","skins":[{"annotation":"mage: light skin tone","group":1,"hexcode":"1F9D9-1F3FB","order":1616,"unicode":"🧙🏻"},{"annotation":"mage: medium-light skin tone","group":1,"hexcode":"1F9D9-1F3FC","order":1617,"unicode":"🧙🏼"},{"annotation":"mage: medium skin tone","group":1,"hexcode":"1F9D9-1F3FD","order":1618,"unicode":"🧙🏽"},{"annotation":"mage: medium-dark skin tone","group":1,"hexcode":"1F9D9-1F3FE","order":1619,"unicode":"🧙🏾"},{"annotation":"mage: dark skin tone","group":1,"hexcode":"1F9D9-1F3FF","order":1620,"unicode":"🧙🏿"}]},{"annotation":"man mage","group":1,"hexcode":"1F9D9-200D-2642-FE0F","order":1621,"tags":["sorcerer","wizard"],"unicode":"🧙♂️","emoticon":":{>","skins":[{"annotation":"man mage: light skin tone","group":1,"hexcode":"1F9D9-1F3FB-200D-2642-FE0F","order":1623,"unicode":"🧙🏻♂️"},{"annotation":"man mage: medium-light skin tone","group":1,"hexcode":"1F9D9-1F3FC-200D-2642-FE0F","order":1625,"unicode":"🧙🏼♂️"},{"annotation":"man mage: medium skin tone","group":1,"hexcode":"1F9D9-1F3FD-200D-2642-FE0F","order":1627,"unicode":"🧙🏽♂️"},{"annotation":"man mage: medium-dark skin tone","group":1,"hexcode":"1F9D9-1F3FE-200D-2642-FE0F","order":1629,"unicode":"🧙🏾♂️"},{"annotation":"man mage: dark skin tone","group":1,"hexcode":"1F9D9-1F3FF-200D-2642-FE0F","order":1631,"unicode":"🧙🏿♂️"}]},{"annotation":"woman mage","group":1,"hexcode":"1F9D9-200D-2640-FE0F","order":1633,"tags":["sorceress","witch"],"unicode":"🧙♀️","skins":[{"annotation":"woman mage: light skin tone","group":1,"hexcode":"1F9D9-1F3FB-200D-2640-FE0F","order":1635,"unicode":"🧙🏻♀️"},{"annotation":"woman mage: medium-light skin tone","group":1,"hexcode":"1F9D9-1F3FC-200D-2640-FE0F","order":1637,"unicode":"🧙🏼♀️"},{"annotation":"woman mage: medium skin tone","group":1,"hexcode":"1F9D9-1F3FD-200D-2640-FE0F","order":1639,"unicode":"🧙🏽♀️"},{"annotation":"woman mage: medium-dark skin tone","group":1,"hexcode":"1F9D9-1F3FE-200D-2640-FE0F","order":1641,"unicode":"🧙🏾♀️"},{"annotation":"woman mage: dark skin tone","group":1,"hexcode":"1F9D9-1F3FF-200D-2640-FE0F","order":1643,"unicode":"🧙🏿♀️"}]},{"annotation":"fairy","group":1,"hexcode":"1F9DA","order":1645,"tags":["oberon","puck","titania"],"unicode":"🧚","skins":[{"annotation":"fairy: light skin tone","group":1,"hexcode":"1F9DA-1F3FB","order":1646,"unicode":"🧚🏻"},{"annotation":"fairy: medium-light skin tone","group":1,"hexcode":"1F9DA-1F3FC","order":1647,"unicode":"🧚🏼"},{"annotation":"fairy: medium skin tone","group":1,"hexcode":"1F9DA-1F3FD","order":1648,"unicode":"🧚🏽"},{"annotation":"fairy: medium-dark skin tone","group":1,"hexcode":"1F9DA-1F3FE","order":1649,"unicode":"🧚🏾"},{"annotation":"fairy: dark skin tone","group":1,"hexcode":"1F9DA-1F3FF","order":1650,"unicode":"🧚🏿"}]},{"annotation":"man fairy","group":1,"hexcode":"1F9DA-200D-2642-FE0F","order":1651,"tags":["oberon","puck"],"unicode":"🧚♂️","skins":[{"annotation":"man fairy: light skin tone","group":1,"hexcode":"1F9DA-1F3FB-200D-2642-FE0F","order":1653,"unicode":"🧚🏻♂️"},{"annotation":"man fairy: medium-light skin tone","group":1,"hexcode":"1F9DA-1F3FC-200D-2642-FE0F","order":1655,"unicode":"🧚🏼♂️"},{"annotation":"man fairy: medium skin tone","group":1,"hexcode":"1F9DA-1F3FD-200D-2642-FE0F","order":1657,"unicode":"🧚🏽♂️"},{"annotation":"man fairy: medium-dark skin tone","group":1,"hexcode":"1F9DA-1F3FE-200D-2642-FE0F","order":1659,"unicode":"🧚🏾♂️"},{"annotation":"man fairy: dark skin tone","group":1,"hexcode":"1F9DA-1F3FF-200D-2642-FE0F","order":1661,"unicode":"🧚🏿♂️"}]},{"annotation":"woman fairy","group":1,"hexcode":"1F9DA-200D-2640-FE0F","order":1663,"tags":["titania"],"unicode":"🧚♀️","skins":[{"annotation":"woman fairy: light skin tone","group":1,"hexcode":"1F9DA-1F3FB-200D-2640-FE0F","order":1665,"unicode":"🧚🏻♀️"},{"annotation":"woman fairy: medium-light skin tone","group":1,"hexcode":"1F9DA-1F3FC-200D-2640-FE0F","order":1667,"unicode":"🧚🏼♀️"},{"annotation":"woman fairy: medium skin tone","group":1,"hexcode":"1F9DA-1F3FD-200D-2640-FE0F","order":1669,"unicode":"🧚🏽♀️"},{"annotation":"woman fairy: medium-dark skin tone","group":1,"hexcode":"1F9DA-1F3FE-200D-2640-FE0F","order":1671,"unicode":"🧚🏾♀️"},{"annotation":"woman fairy: dark skin tone","group":1,"hexcode":"1F9DA-1F3FF-200D-2640-FE0F","order":1673,"unicode":"🧚🏿♀️"}]},{"annotation":"vampire","group":1,"hexcode":"1F9DB","order":1675,"tags":["dracula","undead"],"unicode":"🧛","emoticon":":E","skins":[{"annotation":"vampire: light skin tone","group":1,"hexcode":"1F9DB-1F3FB","order":1676,"unicode":"🧛🏻"},{"annotation":"vampire: medium-light skin tone","group":1,"hexcode":"1F9DB-1F3FC","order":1677,"unicode":"🧛🏼"},{"annotation":"vampire: medium skin tone","group":1,"hexcode":"1F9DB-1F3FD","order":1678,"unicode":"🧛🏽"},{"annotation":"vampire: medium-dark skin tone","group":1,"hexcode":"1F9DB-1F3FE","order":1679,"unicode":"🧛🏾"},{"annotation":"vampire: dark skin tone","group":1,"hexcode":"1F9DB-1F3FF","order":1680,"unicode":"🧛🏿"}]},{"annotation":"man vampire","group":1,"hexcode":"1F9DB-200D-2642-FE0F","order":1681,"tags":["dracula","undead"],"unicode":"🧛♂️","skins":[{"annotation":"man vampire: light skin tone","group":1,"hexcode":"1F9DB-1F3FB-200D-2642-FE0F","order":1683,"unicode":"🧛🏻♂️"},{"annotation":"man vampire: medium-light skin tone","group":1,"hexcode":"1F9DB-1F3FC-200D-2642-FE0F","order":1685,"unicode":"🧛🏼♂️"},{"annotation":"man vampire: medium skin tone","group":1,"hexcode":"1F9DB-1F3FD-200D-2642-FE0F","order":1687,"unicode":"🧛🏽♂️"},{"annotation":"man vampire: medium-dark skin tone","group":1,"hexcode":"1F9DB-1F3FE-200D-2642-FE0F","order":1689,"unicode":"🧛🏾♂️"},{"annotation":"man vampire: dark skin tone","group":1,"hexcode":"1F9DB-1F3FF-200D-2642-FE0F","order":1691,"unicode":"🧛🏿♂️"}]},{"annotation":"woman vampire","group":1,"hexcode":"1F9DB-200D-2640-FE0F","order":1693,"tags":["undead"],"unicode":"🧛♀️","skins":[{"annotation":"woman vampire: light skin tone","group":1,"hexcode":"1F9DB-1F3FB-200D-2640-FE0F","order":1695,"unicode":"🧛🏻♀️"},{"annotation":"woman vampire: medium-light skin tone","group":1,"hexcode":"1F9DB-1F3FC-200D-2640-FE0F","order":1697,"unicode":"🧛🏼♀️"},{"annotation":"woman vampire: medium skin tone","group":1,"hexcode":"1F9DB-1F3FD-200D-2640-FE0F","order":1699,"unicode":"🧛🏽♀️"},{"annotation":"woman vampire: medium-dark skin tone","group":1,"hexcode":"1F9DB-1F3FE-200D-2640-FE0F","order":1701,"unicode":"🧛🏾♀️"},{"annotation":"woman vampire: dark skin tone","group":1,"hexcode":"1F9DB-1F3FF-200D-2640-FE0F","order":1703,"unicode":"🧛🏿♀️"}]},{"annotation":"merperson","group":1,"hexcode":"1F9DC","order":1705,"tags":["mermaid","merman","merwoman"],"unicode":"🧜","skins":[{"annotation":"merperson: light skin tone","group":1,"hexcode":"1F9DC-1F3FB","order":1706,"unicode":"🧜🏻"},{"annotation":"merperson: medium-light skin tone","group":1,"hexcode":"1F9DC-1F3FC","order":1707,"unicode":"🧜🏼"},{"annotation":"merperson: medium skin tone","group":1,"hexcode":"1F9DC-1F3FD","order":1708,"unicode":"🧜🏽"},{"annotation":"merperson: medium-dark skin tone","group":1,"hexcode":"1F9DC-1F3FE","order":1709,"unicode":"🧜🏾"},{"annotation":"merperson: dark skin tone","group":1,"hexcode":"1F9DC-1F3FF","order":1710,"unicode":"🧜🏿"}]},{"annotation":"merman","group":1,"hexcode":"1F9DC-200D-2642-FE0F","order":1711,"tags":["triton"],"unicode":"🧜♂️","skins":[{"annotation":"merman: light skin tone","group":1,"hexcode":"1F9DC-1F3FB-200D-2642-FE0F","order":1713,"unicode":"🧜🏻♂️"},{"annotation":"merman: medium-light skin tone","group":1,"hexcode":"1F9DC-1F3FC-200D-2642-FE0F","order":1715,"unicode":"🧜🏼♂️"},{"annotation":"merman: medium skin tone","group":1,"hexcode":"1F9DC-1F3FD-200D-2642-FE0F","order":1717,"unicode":"🧜🏽♂️"},{"annotation":"merman: medium-dark skin tone","group":1,"hexcode":"1F9DC-1F3FE-200D-2642-FE0F","order":1719,"unicode":"🧜🏾♂️"},{"annotation":"merman: dark skin tone","group":1,"hexcode":"1F9DC-1F3FF-200D-2642-FE0F","order":1721,"unicode":"🧜🏿♂️"}]},{"annotation":"mermaid","group":1,"hexcode":"1F9DC-200D-2640-FE0F","order":1723,"tags":["merwoman"],"unicode":"🧜♀️","skins":[{"annotation":"mermaid: light skin tone","group":1,"hexcode":"1F9DC-1F3FB-200D-2640-FE0F","order":1725,"unicode":"🧜🏻♀️"},{"annotation":"mermaid: medium-light skin tone","group":1,"hexcode":"1F9DC-1F3FC-200D-2640-FE0F","order":1727,"unicode":"🧜🏼♀️"},{"annotation":"mermaid: medium skin tone","group":1,"hexcode":"1F9DC-1F3FD-200D-2640-FE0F","order":1729,"unicode":"🧜🏽♀️"},{"annotation":"mermaid: medium-dark skin tone","group":1,"hexcode":"1F9DC-1F3FE-200D-2640-FE0F","order":1731,"unicode":"🧜🏾♀️"},{"annotation":"mermaid: dark skin tone","group":1,"hexcode":"1F9DC-1F3FF-200D-2640-FE0F","order":1733,"unicode":"🧜🏿♀️"}]},{"annotation":"elf","group":1,"hexcode":"1F9DD","order":1735,"tags":["magical"],"unicode":"🧝","skins":[{"annotation":"elf: light skin tone","group":1,"hexcode":"1F9DD-1F3FB","order":1736,"unicode":"🧝🏻"},{"annotation":"elf: medium-light skin tone","group":1,"hexcode":"1F9DD-1F3FC","order":1737,"unicode":"🧝🏼"},{"annotation":"elf: medium skin tone","group":1,"hexcode":"1F9DD-1F3FD","order":1738,"unicode":"🧝🏽"},{"annotation":"elf: medium-dark skin tone","group":1,"hexcode":"1F9DD-1F3FE","order":1739,"unicode":"🧝🏾"},{"annotation":"elf: dark skin tone","group":1,"hexcode":"1F9DD-1F3FF","order":1740,"unicode":"🧝🏿"}]},{"annotation":"man elf","group":1,"hexcode":"1F9DD-200D-2642-FE0F","order":1741,"tags":["magical"],"unicode":"🧝♂️","skins":[{"annotation":"man elf: light skin tone","group":1,"hexcode":"1F9DD-1F3FB-200D-2642-FE0F","order":1743,"unicode":"🧝🏻♂️"},{"annotation":"man elf: medium-light skin tone","group":1,"hexcode":"1F9DD-1F3FC-200D-2642-FE0F","order":1745,"unicode":"🧝🏼♂️"},{"annotation":"man elf: medium skin tone","group":1,"hexcode":"1F9DD-1F3FD-200D-2642-FE0F","order":1747,"unicode":"🧝🏽♂️"},{"annotation":"man elf: medium-dark skin tone","group":1,"hexcode":"1F9DD-1F3FE-200D-2642-FE0F","order":1749,"unicode":"🧝🏾♂️"},{"annotation":"man elf: dark skin tone","group":1,"hexcode":"1F9DD-1F3FF-200D-2642-FE0F","order":1751,"unicode":"🧝🏿♂️"}]},{"annotation":"woman elf","group":1,"hexcode":"1F9DD-200D-2640-FE0F","order":1753,"tags":["magical"],"unicode":"🧝♀️","skins":[{"annotation":"woman elf: light skin tone","group":1,"hexcode":"1F9DD-1F3FB-200D-2640-FE0F","order":1755,"unicode":"🧝🏻♀️"},{"annotation":"woman elf: medium-light skin tone","group":1,"hexcode":"1F9DD-1F3FC-200D-2640-FE0F","order":1757,"unicode":"🧝🏼♀️"},{"annotation":"woman elf: medium skin tone","group":1,"hexcode":"1F9DD-1F3FD-200D-2640-FE0F","order":1759,"unicode":"🧝🏽♀️"},{"annotation":"woman elf: medium-dark skin tone","group":1,"hexcode":"1F9DD-1F3FE-200D-2640-FE0F","order":1761,"unicode":"🧝🏾♀️"},{"annotation":"woman elf: dark skin tone","group":1,"hexcode":"1F9DD-1F3FF-200D-2640-FE0F","order":1763,"unicode":"🧝🏿♀️"}]},{"annotation":"genie","group":1,"hexcode":"1F9DE","order":1765,"tags":["djinn"],"unicode":"🧞"},{"annotation":"man genie","group":1,"hexcode":"1F9DE-200D-2642-FE0F","order":1766,"tags":["djinn"],"unicode":"🧞♂️"},{"annotation":"woman genie","group":1,"hexcode":"1F9DE-200D-2640-FE0F","order":1768,"tags":["djinn"],"unicode":"🧞♀️"},{"annotation":"zombie","group":1,"hexcode":"1F9DF","order":1770,"tags":["undead","walking dead"],"unicode":"🧟","emoticon":"8#"},{"annotation":"man zombie","group":1,"hexcode":"1F9DF-200D-2642-FE0F","order":1771,"tags":["undead","walking dead"],"unicode":"🧟♂️"},{"annotation":"woman zombie","group":1,"hexcode":"1F9DF-200D-2640-FE0F","order":1773,"tags":["undead","walking dead"],"unicode":"🧟♀️"},{"annotation":"person getting massage","group":1,"hexcode":"1F486","order":1775,"tags":["face","massage","salon"],"unicode":"💆","skins":[{"annotation":"person getting massage: light skin tone","group":1,"hexcode":"1F486-1F3FB","order":1776,"unicode":"💆🏻"},{"annotation":"person getting massage: medium-light skin tone","group":1,"hexcode":"1F486-1F3FC","order":1777,"unicode":"💆🏼"},{"annotation":"person getting massage: medium skin tone","group":1,"hexcode":"1F486-1F3FD","order":1778,"unicode":"💆🏽"},{"annotation":"person getting massage: medium-dark skin tone","group":1,"hexcode":"1F486-1F3FE","order":1779,"unicode":"💆🏾"},{"annotation":"person getting massage: dark skin tone","group":1,"hexcode":"1F486-1F3FF","order":1780,"unicode":"💆🏿"}]},{"annotation":"man getting massage","group":1,"hexcode":"1F486-200D-2642-FE0F","order":1781,"tags":["face","man","massage"],"unicode":"💆♂️","skins":[{"annotation":"man getting massage: light skin tone","group":1,"hexcode":"1F486-1F3FB-200D-2642-FE0F","order":1783,"unicode":"💆🏻♂️"},{"annotation":"man getting massage: medium-light skin tone","group":1,"hexcode":"1F486-1F3FC-200D-2642-FE0F","order":1785,"unicode":"💆🏼♂️"},{"annotation":"man getting massage: medium skin tone","group":1,"hexcode":"1F486-1F3FD-200D-2642-FE0F","order":1787,"unicode":"💆🏽♂️"},{"annotation":"man getting massage: medium-dark skin tone","group":1,"hexcode":"1F486-1F3FE-200D-2642-FE0F","order":1789,"unicode":"💆🏾♂️"},{"annotation":"man getting massage: dark skin tone","group":1,"hexcode":"1F486-1F3FF-200D-2642-FE0F","order":1791,"unicode":"💆🏿♂️"}]},{"annotation":"woman getting massage","group":1,"hexcode":"1F486-200D-2640-FE0F","order":1793,"tags":["face","massage","woman"],"unicode":"💆♀️","skins":[{"annotation":"woman getting massage: light skin tone","group":1,"hexcode":"1F486-1F3FB-200D-2640-FE0F","order":1795,"unicode":"💆🏻♀️"},{"annotation":"woman getting massage: medium-light skin tone","group":1,"hexcode":"1F486-1F3FC-200D-2640-FE0F","order":1797,"unicode":"💆🏼♀️"},{"annotation":"woman getting massage: medium skin tone","group":1,"hexcode":"1F486-1F3FD-200D-2640-FE0F","order":1799,"unicode":"💆🏽♀️"},{"annotation":"woman getting massage: medium-dark skin tone","group":1,"hexcode":"1F486-1F3FE-200D-2640-FE0F","order":1801,"unicode":"💆🏾♀️"},{"annotation":"woman getting massage: dark skin tone","group":1,"hexcode":"1F486-1F3FF-200D-2640-FE0F","order":1803,"unicode":"💆🏿♀️"}]},{"annotation":"person getting haircut","group":1,"hexcode":"1F487","order":1805,"tags":["barber","beauty","haircut","parlor"],"unicode":"💇","skins":[{"annotation":"person getting haircut: light skin tone","group":1,"hexcode":"1F487-1F3FB","order":1806,"unicode":"💇🏻"},{"annotation":"person getting haircut: medium-light skin tone","group":1,"hexcode":"1F487-1F3FC","order":1807,"unicode":"💇🏼"},{"annotation":"person getting haircut: medium skin tone","group":1,"hexcode":"1F487-1F3FD","order":1808,"unicode":"💇🏽"},{"annotation":"person getting haircut: medium-dark skin tone","group":1,"hexcode":"1F487-1F3FE","order":1809,"unicode":"💇🏾"},{"annotation":"person getting haircut: dark skin tone","group":1,"hexcode":"1F487-1F3FF","order":1810,"unicode":"💇🏿"}]},{"annotation":"man getting haircut","group":1,"hexcode":"1F487-200D-2642-FE0F","order":1811,"tags":["haircut","man"],"unicode":"💇♂️","skins":[{"annotation":"man getting haircut: light skin tone","group":1,"hexcode":"1F487-1F3FB-200D-2642-FE0F","order":1813,"unicode":"💇🏻♂️"},{"annotation":"man getting haircut: medium-light skin tone","group":1,"hexcode":"1F487-1F3FC-200D-2642-FE0F","order":1815,"unicode":"💇🏼♂️"},{"annotation":"man getting haircut: medium skin tone","group":1,"hexcode":"1F487-1F3FD-200D-2642-FE0F","order":1817,"unicode":"💇🏽♂️"},{"annotation":"man getting haircut: medium-dark skin tone","group":1,"hexcode":"1F487-1F3FE-200D-2642-FE0F","order":1819,"unicode":"💇🏾♂️"},{"annotation":"man getting haircut: dark skin tone","group":1,"hexcode":"1F487-1F3FF-200D-2642-FE0F","order":1821,"unicode":"💇🏿♂️"}]},{"annotation":"woman getting haircut","group":1,"hexcode":"1F487-200D-2640-FE0F","order":1823,"tags":["haircut","woman"],"unicode":"💇♀️","skins":[{"annotation":"woman getting haircut: light skin tone","group":1,"hexcode":"1F487-1F3FB-200D-2640-FE0F","order":1825,"unicode":"💇🏻♀️"},{"annotation":"woman getting haircut: medium-light skin tone","group":1,"hexcode":"1F487-1F3FC-200D-2640-FE0F","order":1827,"unicode":"💇🏼♀️"},{"annotation":"woman getting haircut: medium skin tone","group":1,"hexcode":"1F487-1F3FD-200D-2640-FE0F","order":1829,"unicode":"💇🏽♀️"},{"annotation":"woman getting haircut: medium-dark skin tone","group":1,"hexcode":"1F487-1F3FE-200D-2640-FE0F","order":1831,"unicode":"💇🏾♀️"},{"annotation":"woman getting haircut: dark skin tone","group":1,"hexcode":"1F487-1F3FF-200D-2640-FE0F","order":1833,"unicode":"💇🏿♀️"}]},{"annotation":"person walking","group":1,"hexcode":"1F6B6","order":1835,"tags":["hike","walk","walking"],"unicode":"🚶","skins":[{"annotation":"person walking: light skin tone","group":1,"hexcode":"1F6B6-1F3FB","order":1836,"unicode":"🚶🏻"},{"annotation":"person walking: medium-light skin tone","group":1,"hexcode":"1F6B6-1F3FC","order":1837,"unicode":"🚶🏼"},{"annotation":"person walking: medium skin tone","group":1,"hexcode":"1F6B6-1F3FD","order":1838,"unicode":"🚶🏽"},{"annotation":"person walking: medium-dark skin tone","group":1,"hexcode":"1F6B6-1F3FE","order":1839,"unicode":"🚶🏾"},{"annotation":"person walking: dark skin tone","group":1,"hexcode":"1F6B6-1F3FF","order":1840,"unicode":"🚶🏿"}]},{"annotation":"man walking","group":1,"hexcode":"1F6B6-200D-2642-FE0F","order":1841,"tags":["hike","man","walk"],"unicode":"🚶♂️","skins":[{"annotation":"man walking: light skin tone","group":1,"hexcode":"1F6B6-1F3FB-200D-2642-FE0F","order":1843,"unicode":"🚶🏻♂️"},{"annotation":"man walking: medium-light skin tone","group":1,"hexcode":"1F6B6-1F3FC-200D-2642-FE0F","order":1845,"unicode":"🚶🏼♂️"},{"annotation":"man walking: medium skin tone","group":1,"hexcode":"1F6B6-1F3FD-200D-2642-FE0F","order":1847,"unicode":"🚶🏽♂️"},{"annotation":"man walking: medium-dark skin tone","group":1,"hexcode":"1F6B6-1F3FE-200D-2642-FE0F","order":1849,"unicode":"🚶🏾♂️"},{"annotation":"man walking: dark skin tone","group":1,"hexcode":"1F6B6-1F3FF-200D-2642-FE0F","order":1851,"unicode":"🚶🏿♂️"}]},{"annotation":"woman walking","group":1,"hexcode":"1F6B6-200D-2640-FE0F","order":1853,"tags":["hike","walk","woman"],"unicode":"🚶♀️","skins":[{"annotation":"woman walking: light skin tone","group":1,"hexcode":"1F6B6-1F3FB-200D-2640-FE0F","order":1855,"unicode":"🚶🏻♀️"},{"annotation":"woman walking: medium-light skin tone","group":1,"hexcode":"1F6B6-1F3FC-200D-2640-FE0F","order":1857,"unicode":"🚶🏼♀️"},{"annotation":"woman walking: medium skin tone","group":1,"hexcode":"1F6B6-1F3FD-200D-2640-FE0F","order":1859,"unicode":"🚶🏽♀️"},{"annotation":"woman walking: medium-dark skin tone","group":1,"hexcode":"1F6B6-1F3FE-200D-2640-FE0F","order":1861,"unicode":"🚶🏾♀️"},{"annotation":"woman walking: dark skin tone","group":1,"hexcode":"1F6B6-1F3FF-200D-2640-FE0F","order":1863,"unicode":"🚶🏿♀️"}]},{"annotation":"person standing","group":1,"hexcode":"1F9CD","order":1865,"tags":["stand","standing"],"unicode":"🧍","skins":[{"annotation":"person standing: light skin tone","group":1,"hexcode":"1F9CD-1F3FB","order":1866,"unicode":"🧍🏻"},{"annotation":"person standing: medium-light skin tone","group":1,"hexcode":"1F9CD-1F3FC","order":1867,"unicode":"🧍🏼"},{"annotation":"person standing: medium skin tone","group":1,"hexcode":"1F9CD-1F3FD","order":1868,"unicode":"🧍🏽"},{"annotation":"person standing: medium-dark skin tone","group":1,"hexcode":"1F9CD-1F3FE","order":1869,"unicode":"🧍🏾"},{"annotation":"person standing: dark skin tone","group":1,"hexcode":"1F9CD-1F3FF","order":1870,"unicode":"🧍🏿"}]},{"annotation":"man standing","group":1,"hexcode":"1F9CD-200D-2642-FE0F","order":1871,"tags":["man","standing"],"unicode":"🧍♂️","skins":[{"annotation":"man standing: light skin tone","group":1,"hexcode":"1F9CD-1F3FB-200D-2642-FE0F","order":1873,"unicode":"🧍🏻♂️"},{"annotation":"man standing: medium-light skin tone","group":1,"hexcode":"1F9CD-1F3FC-200D-2642-FE0F","order":1875,"unicode":"🧍🏼♂️"},{"annotation":"man standing: medium skin tone","group":1,"hexcode":"1F9CD-1F3FD-200D-2642-FE0F","order":1877,"unicode":"🧍🏽♂️"},{"annotation":"man standing: medium-dark skin tone","group":1,"hexcode":"1F9CD-1F3FE-200D-2642-FE0F","order":1879,"unicode":"🧍🏾♂️"},{"annotation":"man standing: dark skin tone","group":1,"hexcode":"1F9CD-1F3FF-200D-2642-FE0F","order":1881,"unicode":"🧍🏿♂️"}]},{"annotation":"woman standing","group":1,"hexcode":"1F9CD-200D-2640-FE0F","order":1883,"tags":["standing","woman"],"unicode":"🧍♀️","skins":[{"annotation":"woman standing: light skin tone","group":1,"hexcode":"1F9CD-1F3FB-200D-2640-FE0F","order":1885,"unicode":"🧍🏻♀️"},{"annotation":"woman standing: medium-light skin tone","group":1,"hexcode":"1F9CD-1F3FC-200D-2640-FE0F","order":1887,"unicode":"🧍🏼♀️"},{"annotation":"woman standing: medium skin tone","group":1,"hexcode":"1F9CD-1F3FD-200D-2640-FE0F","order":1889,"unicode":"🧍🏽♀️"},{"annotation":"woman standing: medium-dark skin tone","group":1,"hexcode":"1F9CD-1F3FE-200D-2640-FE0F","order":1891,"unicode":"🧍🏾♀️"},{"annotation":"woman standing: dark skin tone","group":1,"hexcode":"1F9CD-1F3FF-200D-2640-FE0F","order":1893,"unicode":"🧍🏿♀️"}]},{"annotation":"person kneeling","group":1,"hexcode":"1F9CE","order":1895,"tags":["kneel","kneeling"],"unicode":"🧎","skins":[{"annotation":"person kneeling: light skin tone","group":1,"hexcode":"1F9CE-1F3FB","order":1896,"unicode":"🧎🏻"},{"annotation":"person kneeling: medium-light skin tone","group":1,"hexcode":"1F9CE-1F3FC","order":1897,"unicode":"🧎🏼"},{"annotation":"person kneeling: medium skin tone","group":1,"hexcode":"1F9CE-1F3FD","order":1898,"unicode":"🧎🏽"},{"annotation":"person kneeling: medium-dark skin tone","group":1,"hexcode":"1F9CE-1F3FE","order":1899,"unicode":"🧎🏾"},{"annotation":"person kneeling: dark skin tone","group":1,"hexcode":"1F9CE-1F3FF","order":1900,"unicode":"🧎🏿"}]},{"annotation":"man kneeling","group":1,"hexcode":"1F9CE-200D-2642-FE0F","order":1901,"tags":["kneeling","man"],"unicode":"🧎♂️","skins":[{"annotation":"man kneeling: light skin tone","group":1,"hexcode":"1F9CE-1F3FB-200D-2642-FE0F","order":1903,"unicode":"🧎🏻♂️"},{"annotation":"man kneeling: medium-light skin tone","group":1,"hexcode":"1F9CE-1F3FC-200D-2642-FE0F","order":1905,"unicode":"🧎🏼♂️"},{"annotation":"man kneeling: medium skin tone","group":1,"hexcode":"1F9CE-1F3FD-200D-2642-FE0F","order":1907,"unicode":"🧎🏽♂️"},{"annotation":"man kneeling: medium-dark skin tone","group":1,"hexcode":"1F9CE-1F3FE-200D-2642-FE0F","order":1909,"unicode":"🧎🏾♂️"},{"annotation":"man kneeling: dark skin tone","group":1,"hexcode":"1F9CE-1F3FF-200D-2642-FE0F","order":1911,"unicode":"🧎🏿♂️"}]},{"annotation":"woman kneeling","group":1,"hexcode":"1F9CE-200D-2640-FE0F","order":1913,"tags":["kneeling","woman"],"unicode":"🧎♀️","skins":[{"annotation":"woman kneeling: light skin tone","group":1,"hexcode":"1F9CE-1F3FB-200D-2640-FE0F","order":1915,"unicode":"🧎🏻♀️"},{"annotation":"woman kneeling: medium-light skin tone","group":1,"hexcode":"1F9CE-1F3FC-200D-2640-FE0F","order":1917,"unicode":"🧎🏼♀️"},{"annotation":"woman kneeling: medium skin tone","group":1,"hexcode":"1F9CE-1F3FD-200D-2640-FE0F","order":1919,"unicode":"🧎🏽♀️"},{"annotation":"woman kneeling: medium-dark skin tone","group":1,"hexcode":"1F9CE-1F3FE-200D-2640-FE0F","order":1921,"unicode":"🧎🏾♀️"},{"annotation":"woman kneeling: dark skin tone","group":1,"hexcode":"1F9CE-1F3FF-200D-2640-FE0F","order":1923,"unicode":"🧎🏿♀️"}]},{"annotation":"person with white cane","group":1,"hexcode":"1F9D1-200D-1F9AF","order":1925,"tags":["accessibility","blind"],"unicode":"🧑🦯","skins":[{"annotation":"person with white cane: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F9AF","order":1926,"unicode":"🧑🏻🦯"},{"annotation":"person with white cane: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F9AF","order":1927,"unicode":"🧑🏼🦯"},{"annotation":"person with white cane: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F9AF","order":1928,"unicode":"🧑🏽🦯"},{"annotation":"person with white cane: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F9AF","order":1929,"unicode":"🧑🏾🦯"},{"annotation":"person with white cane: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F9AF","order":1930,"unicode":"🧑🏿🦯"}]},{"annotation":"man with white cane","group":1,"hexcode":"1F468-200D-1F9AF","order":1931,"tags":["accessibility","blind","man"],"unicode":"👨🦯","skins":[{"annotation":"man with white cane: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F9AF","order":1932,"unicode":"👨🏻🦯"},{"annotation":"man with white cane: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F9AF","order":1933,"unicode":"👨🏼🦯"},{"annotation":"man with white cane: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F9AF","order":1934,"unicode":"👨🏽🦯"},{"annotation":"man with white cane: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F9AF","order":1935,"unicode":"👨🏾🦯"},{"annotation":"man with white cane: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F9AF","order":1936,"unicode":"👨🏿🦯"}]},{"annotation":"woman with white cane","group":1,"hexcode":"1F469-200D-1F9AF","order":1937,"tags":["accessibility","blind","woman"],"unicode":"👩🦯","skins":[{"annotation":"woman with white cane: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F9AF","order":1938,"unicode":"👩🏻🦯"},{"annotation":"woman with white cane: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F9AF","order":1939,"unicode":"👩🏼🦯"},{"annotation":"woman with white cane: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F9AF","order":1940,"unicode":"👩🏽🦯"},{"annotation":"woman with white cane: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F9AF","order":1941,"unicode":"👩🏾🦯"},{"annotation":"woman with white cane: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F9AF","order":1942,"unicode":"👩🏿🦯"}]},{"annotation":"person in motorized wheelchair","group":1,"hexcode":"1F9D1-200D-1F9BC","order":1943,"tags":["accessibility","wheelchair"],"unicode":"🧑🦼","skins":[{"annotation":"person in motorized wheelchair: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F9BC","order":1944,"unicode":"🧑🏻🦼"},{"annotation":"person in motorized wheelchair: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F9BC","order":1945,"unicode":"🧑🏼🦼"},{"annotation":"person in motorized wheelchair: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F9BC","order":1946,"unicode":"🧑🏽🦼"},{"annotation":"person in motorized wheelchair: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F9BC","order":1947,"unicode":"🧑🏾🦼"},{"annotation":"person in motorized wheelchair: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F9BC","order":1948,"unicode":"🧑🏿🦼"}]},{"annotation":"man in motorized wheelchair","group":1,"hexcode":"1F468-200D-1F9BC","order":1949,"tags":["accessibility","man","wheelchair"],"unicode":"👨🦼","skins":[{"annotation":"man in motorized wheelchair: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F9BC","order":1950,"unicode":"👨🏻🦼"},{"annotation":"man in motorized wheelchair: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F9BC","order":1951,"unicode":"👨🏼🦼"},{"annotation":"man in motorized wheelchair: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F9BC","order":1952,"unicode":"👨🏽🦼"},{"annotation":"man in motorized wheelchair: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F9BC","order":1953,"unicode":"👨🏾🦼"},{"annotation":"man in motorized wheelchair: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F9BC","order":1954,"unicode":"👨🏿🦼"}]},{"annotation":"woman in motorized wheelchair","group":1,"hexcode":"1F469-200D-1F9BC","order":1955,"tags":["accessibility","wheelchair","woman"],"unicode":"👩🦼","skins":[{"annotation":"woman in motorized wheelchair: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F9BC","order":1956,"unicode":"👩🏻🦼"},{"annotation":"woman in motorized wheelchair: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F9BC","order":1957,"unicode":"👩🏼🦼"},{"annotation":"woman in motorized wheelchair: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F9BC","order":1958,"unicode":"👩🏽🦼"},{"annotation":"woman in motorized wheelchair: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F9BC","order":1959,"unicode":"👩🏾🦼"},{"annotation":"woman in motorized wheelchair: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F9BC","order":1960,"unicode":"👩🏿🦼"}]},{"annotation":"person in manual wheelchair","group":1,"hexcode":"1F9D1-200D-1F9BD","order":1961,"tags":["accessibility","wheelchair"],"unicode":"🧑🦽","skins":[{"annotation":"person in manual wheelchair: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F9BD","order":1962,"unicode":"🧑🏻🦽"},{"annotation":"person in manual wheelchair: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F9BD","order":1963,"unicode":"🧑🏼🦽"},{"annotation":"person in manual wheelchair: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F9BD","order":1964,"unicode":"🧑🏽🦽"},{"annotation":"person in manual wheelchair: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F9BD","order":1965,"unicode":"🧑🏾🦽"},{"annotation":"person in manual wheelchair: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F9BD","order":1966,"unicode":"🧑🏿🦽"}]},{"annotation":"man in manual wheelchair","group":1,"hexcode":"1F468-200D-1F9BD","order":1967,"tags":["accessibility","man","wheelchair"],"unicode":"👨🦽","skins":[{"annotation":"man in manual wheelchair: light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F9BD","order":1968,"unicode":"👨🏻🦽"},{"annotation":"man in manual wheelchair: medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F9BD","order":1969,"unicode":"👨🏼🦽"},{"annotation":"man in manual wheelchair: medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F9BD","order":1970,"unicode":"👨🏽🦽"},{"annotation":"man in manual wheelchair: medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F9BD","order":1971,"unicode":"👨🏾🦽"},{"annotation":"man in manual wheelchair: dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F9BD","order":1972,"unicode":"👨🏿🦽"}]},{"annotation":"woman in manual wheelchair","group":1,"hexcode":"1F469-200D-1F9BD","order":1973,"tags":["accessibility","wheelchair","woman"],"unicode":"👩🦽","skins":[{"annotation":"woman in manual wheelchair: light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F9BD","order":1974,"unicode":"👩🏻🦽"},{"annotation":"woman in manual wheelchair: medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F9BD","order":1975,"unicode":"👩🏼🦽"},{"annotation":"woman in manual wheelchair: medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F9BD","order":1976,"unicode":"👩🏽🦽"},{"annotation":"woman in manual wheelchair: medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F9BD","order":1977,"unicode":"👩🏾🦽"},{"annotation":"woman in manual wheelchair: dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F9BD","order":1978,"unicode":"👩🏿🦽"}]},{"annotation":"person running","group":1,"hexcode":"1F3C3","order":1979,"tags":["marathon","running"],"unicode":"🏃","skins":[{"annotation":"person running: light skin tone","group":1,"hexcode":"1F3C3-1F3FB","order":1980,"unicode":"🏃🏻"},{"annotation":"person running: medium-light skin tone","group":1,"hexcode":"1F3C3-1F3FC","order":1981,"unicode":"🏃🏼"},{"annotation":"person running: medium skin tone","group":1,"hexcode":"1F3C3-1F3FD","order":1982,"unicode":"🏃🏽"},{"annotation":"person running: medium-dark skin tone","group":1,"hexcode":"1F3C3-1F3FE","order":1983,"unicode":"🏃🏾"},{"annotation":"person running: dark skin tone","group":1,"hexcode":"1F3C3-1F3FF","order":1984,"unicode":"🏃🏿"}]},{"annotation":"man running","group":1,"hexcode":"1F3C3-200D-2642-FE0F","order":1985,"tags":["man","marathon","racing","running"],"unicode":"🏃♂️","skins":[{"annotation":"man running: light skin tone","group":1,"hexcode":"1F3C3-1F3FB-200D-2642-FE0F","order":1987,"unicode":"🏃🏻♂️"},{"annotation":"man running: medium-light skin tone","group":1,"hexcode":"1F3C3-1F3FC-200D-2642-FE0F","order":1989,"unicode":"🏃🏼♂️"},{"annotation":"man running: medium skin tone","group":1,"hexcode":"1F3C3-1F3FD-200D-2642-FE0F","order":1991,"unicode":"🏃🏽♂️"},{"annotation":"man running: medium-dark skin tone","group":1,"hexcode":"1F3C3-1F3FE-200D-2642-FE0F","order":1993,"unicode":"🏃🏾♂️"},{"annotation":"man running: dark skin tone","group":1,"hexcode":"1F3C3-1F3FF-200D-2642-FE0F","order":1995,"unicode":"🏃🏿♂️"}]},{"annotation":"woman running","group":1,"hexcode":"1F3C3-200D-2640-FE0F","order":1997,"tags":["marathon","racing","running","woman"],"unicode":"🏃♀️","skins":[{"annotation":"woman running: light skin tone","group":1,"hexcode":"1F3C3-1F3FB-200D-2640-FE0F","order":1999,"unicode":"🏃🏻♀️"},{"annotation":"woman running: medium-light skin tone","group":1,"hexcode":"1F3C3-1F3FC-200D-2640-FE0F","order":2001,"unicode":"🏃🏼♀️"},{"annotation":"woman running: medium skin tone","group":1,"hexcode":"1F3C3-1F3FD-200D-2640-FE0F","order":2003,"unicode":"🏃🏽♀️"},{"annotation":"woman running: medium-dark skin tone","group":1,"hexcode":"1F3C3-1F3FE-200D-2640-FE0F","order":2005,"unicode":"🏃🏾♀️"},{"annotation":"woman running: dark skin tone","group":1,"hexcode":"1F3C3-1F3FF-200D-2640-FE0F","order":2007,"unicode":"🏃🏿♀️"}]},{"annotation":"woman dancing","group":1,"hexcode":"1F483","order":2009,"tags":["dance","dancing","woman"],"unicode":"💃","skins":[{"annotation":"woman dancing: light skin tone","group":1,"hexcode":"1F483-1F3FB","order":2010,"unicode":"💃🏻"},{"annotation":"woman dancing: medium-light skin tone","group":1,"hexcode":"1F483-1F3FC","order":2011,"unicode":"💃🏼"},{"annotation":"woman dancing: medium skin tone","group":1,"hexcode":"1F483-1F3FD","order":2012,"unicode":"💃🏽"},{"annotation":"woman dancing: medium-dark skin tone","group":1,"hexcode":"1F483-1F3FE","order":2013,"unicode":"💃🏾"},{"annotation":"woman dancing: dark skin tone","group":1,"hexcode":"1F483-1F3FF","order":2014,"unicode":"💃🏿"}]},{"annotation":"man dancing","group":1,"hexcode":"1F57A","order":2015,"tags":["dance","dancing","man"],"unicode":"🕺","skins":[{"annotation":"man dancing: light skin tone","group":1,"hexcode":"1F57A-1F3FB","order":2016,"unicode":"🕺🏻"},{"annotation":"man dancing: medium-light skin tone","group":1,"hexcode":"1F57A-1F3FC","order":2017,"unicode":"🕺🏼"},{"annotation":"man dancing: medium skin tone","group":1,"hexcode":"1F57A-1F3FD","order":2018,"unicode":"🕺🏽"},{"annotation":"man dancing: medium-dark skin tone","group":1,"hexcode":"1F57A-1F3FE","order":2019,"unicode":"🕺🏾"},{"annotation":"man dancing: dark skin tone","group":1,"hexcode":"1F57A-1F3FF","order":2020,"unicode":"🕺🏿"}]},{"annotation":"person in suit levitating","group":1,"hexcode":"1F574","order":2022,"tags":["business","person","suit"],"unicode":"🕴️","skins":[{"annotation":"person in suit levitating: light skin tone","group":1,"hexcode":"1F574-1F3FB","order":2023,"unicode":"🕴🏻"},{"annotation":"person in suit levitating: medium-light skin tone","group":1,"hexcode":"1F574-1F3FC","order":2024,"unicode":"🕴🏼"},{"annotation":"person in suit levitating: medium skin tone","group":1,"hexcode":"1F574-1F3FD","order":2025,"unicode":"🕴🏽"},{"annotation":"person in suit levitating: medium-dark skin tone","group":1,"hexcode":"1F574-1F3FE","order":2026,"unicode":"🕴🏾"},{"annotation":"person in suit levitating: dark skin tone","group":1,"hexcode":"1F574-1F3FF","order":2027,"unicode":"🕴🏿"}]},{"annotation":"people with bunny ears","group":1,"hexcode":"1F46F","order":2028,"tags":["bunny ear","dancer","partying"],"unicode":"👯"},{"annotation":"men with bunny ears","group":1,"hexcode":"1F46F-200D-2642-FE0F","order":2029,"tags":["bunny ear","dancer","men","partying"],"unicode":"👯♂️"},{"annotation":"women with bunny ears","group":1,"hexcode":"1F46F-200D-2640-FE0F","order":2031,"tags":["bunny ear","dancer","partying","women"],"unicode":"👯♀️"},{"annotation":"person in steamy room","group":1,"hexcode":"1F9D6","order":2033,"tags":["sauna","steam room"],"unicode":"🧖","skins":[{"annotation":"person in steamy room: light skin tone","group":1,"hexcode":"1F9D6-1F3FB","order":2034,"unicode":"🧖🏻"},{"annotation":"person in steamy room: medium-light skin tone","group":1,"hexcode":"1F9D6-1F3FC","order":2035,"unicode":"🧖🏼"},{"annotation":"person in steamy room: medium skin tone","group":1,"hexcode":"1F9D6-1F3FD","order":2036,"unicode":"🧖🏽"},{"annotation":"person in steamy room: medium-dark skin tone","group":1,"hexcode":"1F9D6-1F3FE","order":2037,"unicode":"🧖🏾"},{"annotation":"person in steamy room: dark skin tone","group":1,"hexcode":"1F9D6-1F3FF","order":2038,"unicode":"🧖🏿"}]},{"annotation":"man in steamy room","group":1,"hexcode":"1F9D6-200D-2642-FE0F","order":2039,"tags":["sauna","steam room"],"unicode":"🧖♂️","skins":[{"annotation":"man in steamy room: light skin tone","group":1,"hexcode":"1F9D6-1F3FB-200D-2642-FE0F","order":2041,"unicode":"🧖🏻♂️"},{"annotation":"man in steamy room: medium-light skin tone","group":1,"hexcode":"1F9D6-1F3FC-200D-2642-FE0F","order":2043,"unicode":"🧖🏼♂️"},{"annotation":"man in steamy room: medium skin tone","group":1,"hexcode":"1F9D6-1F3FD-200D-2642-FE0F","order":2045,"unicode":"🧖🏽♂️"},{"annotation":"man in steamy room: medium-dark skin tone","group":1,"hexcode":"1F9D6-1F3FE-200D-2642-FE0F","order":2047,"unicode":"🧖🏾♂️"},{"annotation":"man in steamy room: dark skin tone","group":1,"hexcode":"1F9D6-1F3FF-200D-2642-FE0F","order":2049,"unicode":"🧖🏿♂️"}]},{"annotation":"woman in steamy room","group":1,"hexcode":"1F9D6-200D-2640-FE0F","order":2051,"tags":["sauna","steam room"],"unicode":"🧖♀️","skins":[{"annotation":"woman in steamy room: light skin tone","group":1,"hexcode":"1F9D6-1F3FB-200D-2640-FE0F","order":2053,"unicode":"🧖🏻♀️"},{"annotation":"woman in steamy room: medium-light skin tone","group":1,"hexcode":"1F9D6-1F3FC-200D-2640-FE0F","order":2055,"unicode":"🧖🏼♀️"},{"annotation":"woman in steamy room: medium skin tone","group":1,"hexcode":"1F9D6-1F3FD-200D-2640-FE0F","order":2057,"unicode":"🧖🏽♀️"},{"annotation":"woman in steamy room: medium-dark skin tone","group":1,"hexcode":"1F9D6-1F3FE-200D-2640-FE0F","order":2059,"unicode":"🧖🏾♀️"},{"annotation":"woman in steamy room: dark skin tone","group":1,"hexcode":"1F9D6-1F3FF-200D-2640-FE0F","order":2061,"unicode":"🧖🏿♀️"}]},{"annotation":"person climbing","group":1,"hexcode":"1F9D7","order":2063,"tags":["climber"],"unicode":"🧗","skins":[{"annotation":"person climbing: light skin tone","group":1,"hexcode":"1F9D7-1F3FB","order":2064,"unicode":"🧗🏻"},{"annotation":"person climbing: medium-light skin tone","group":1,"hexcode":"1F9D7-1F3FC","order":2065,"unicode":"🧗🏼"},{"annotation":"person climbing: medium skin tone","group":1,"hexcode":"1F9D7-1F3FD","order":2066,"unicode":"🧗🏽"},{"annotation":"person climbing: medium-dark skin tone","group":1,"hexcode":"1F9D7-1F3FE","order":2067,"unicode":"🧗🏾"},{"annotation":"person climbing: dark skin tone","group":1,"hexcode":"1F9D7-1F3FF","order":2068,"unicode":"🧗🏿"}]},{"annotation":"man climbing","group":1,"hexcode":"1F9D7-200D-2642-FE0F","order":2069,"tags":["climber"],"unicode":"🧗♂️","skins":[{"annotation":"man climbing: light skin tone","group":1,"hexcode":"1F9D7-1F3FB-200D-2642-FE0F","order":2071,"unicode":"🧗🏻♂️"},{"annotation":"man climbing: medium-light skin tone","group":1,"hexcode":"1F9D7-1F3FC-200D-2642-FE0F","order":2073,"unicode":"🧗🏼♂️"},{"annotation":"man climbing: medium skin tone","group":1,"hexcode":"1F9D7-1F3FD-200D-2642-FE0F","order":2075,"unicode":"🧗🏽♂️"},{"annotation":"man climbing: medium-dark skin tone","group":1,"hexcode":"1F9D7-1F3FE-200D-2642-FE0F","order":2077,"unicode":"🧗🏾♂️"},{"annotation":"man climbing: dark skin tone","group":1,"hexcode":"1F9D7-1F3FF-200D-2642-FE0F","order":2079,"unicode":"🧗🏿♂️"}]},{"annotation":"woman climbing","group":1,"hexcode":"1F9D7-200D-2640-FE0F","order":2081,"tags":["climber"],"unicode":"🧗♀️","skins":[{"annotation":"woman climbing: light skin tone","group":1,"hexcode":"1F9D7-1F3FB-200D-2640-FE0F","order":2083,"unicode":"🧗🏻♀️"},{"annotation":"woman climbing: medium-light skin tone","group":1,"hexcode":"1F9D7-1F3FC-200D-2640-FE0F","order":2085,"unicode":"🧗🏼♀️"},{"annotation":"woman climbing: medium skin tone","group":1,"hexcode":"1F9D7-1F3FD-200D-2640-FE0F","order":2087,"unicode":"🧗🏽♀️"},{"annotation":"woman climbing: medium-dark skin tone","group":1,"hexcode":"1F9D7-1F3FE-200D-2640-FE0F","order":2089,"unicode":"🧗🏾♀️"},{"annotation":"woman climbing: dark skin tone","group":1,"hexcode":"1F9D7-1F3FF-200D-2640-FE0F","order":2091,"unicode":"🧗🏿♀️"}]},{"annotation":"person fencing","group":1,"hexcode":"1F93A","order":2093,"tags":["fencer","fencing","sword"],"unicode":"🤺"},{"annotation":"horse racing","group":1,"hexcode":"1F3C7","order":2094,"tags":["horse","jockey","racehorse","racing"],"unicode":"🏇","skins":[{"annotation":"horse racing: light skin tone","group":1,"hexcode":"1F3C7-1F3FB","order":2095,"unicode":"🏇🏻"},{"annotation":"horse racing: medium-light skin tone","group":1,"hexcode":"1F3C7-1F3FC","order":2096,"unicode":"🏇🏼"},{"annotation":"horse racing: medium skin tone","group":1,"hexcode":"1F3C7-1F3FD","order":2097,"unicode":"🏇🏽"},{"annotation":"horse racing: medium-dark skin tone","group":1,"hexcode":"1F3C7-1F3FE","order":2098,"unicode":"🏇🏾"},{"annotation":"horse racing: dark skin tone","group":1,"hexcode":"1F3C7-1F3FF","order":2099,"unicode":"🏇🏿"}]},{"annotation":"skier","group":1,"hexcode":"26F7","order":2101,"tags":["ski","snow"],"unicode":"⛷️"},{"annotation":"snowboarder","group":1,"hexcode":"1F3C2","order":2102,"tags":["ski","snow","snowboard"],"unicode":"🏂️","skins":[{"annotation":"snowboarder: light skin tone","group":1,"hexcode":"1F3C2-1F3FB","order":2103,"unicode":"🏂🏻"},{"annotation":"snowboarder: medium-light skin tone","group":1,"hexcode":"1F3C2-1F3FC","order":2104,"unicode":"🏂🏼"},{"annotation":"snowboarder: medium skin tone","group":1,"hexcode":"1F3C2-1F3FD","order":2105,"unicode":"🏂🏽"},{"annotation":"snowboarder: medium-dark skin tone","group":1,"hexcode":"1F3C2-1F3FE","order":2106,"unicode":"🏂🏾"},{"annotation":"snowboarder: dark skin tone","group":1,"hexcode":"1F3C2-1F3FF","order":2107,"unicode":"🏂🏿"}]},{"annotation":"person golfing","group":1,"hexcode":"1F3CC","order":2109,"tags":["ball","golf"],"unicode":"🏌️","skins":[{"annotation":"person golfing: light skin tone","group":1,"hexcode":"1F3CC-1F3FB","order":2110,"unicode":"🏌🏻"},{"annotation":"person golfing: medium-light skin tone","group":1,"hexcode":"1F3CC-1F3FC","order":2111,"unicode":"🏌🏼"},{"annotation":"person golfing: medium skin tone","group":1,"hexcode":"1F3CC-1F3FD","order":2112,"unicode":"🏌🏽"},{"annotation":"person golfing: medium-dark skin tone","group":1,"hexcode":"1F3CC-1F3FE","order":2113,"unicode":"🏌🏾"},{"annotation":"person golfing: dark skin tone","group":1,"hexcode":"1F3CC-1F3FF","order":2114,"unicode":"🏌🏿"}]},{"annotation":"man golfing","group":1,"hexcode":"1F3CC-FE0F-200D-2642-FE0F","order":2115,"tags":["golf","man"],"unicode":"🏌️♂️","skins":[{"annotation":"man golfing: light skin tone","group":1,"hexcode":"1F3CC-1F3FB-200D-2642-FE0F","order":2119,"unicode":"🏌🏻♂️"},{"annotation":"man golfing: medium-light skin tone","group":1,"hexcode":"1F3CC-1F3FC-200D-2642-FE0F","order":2121,"unicode":"🏌🏼♂️"},{"annotation":"man golfing: medium skin tone","group":1,"hexcode":"1F3CC-1F3FD-200D-2642-FE0F","order":2123,"unicode":"🏌🏽♂️"},{"annotation":"man golfing: medium-dark skin tone","group":1,"hexcode":"1F3CC-1F3FE-200D-2642-FE0F","order":2125,"unicode":"🏌🏾♂️"},{"annotation":"man golfing: dark skin tone","group":1,"hexcode":"1F3CC-1F3FF-200D-2642-FE0F","order":2127,"unicode":"🏌🏿♂️"}]},{"annotation":"woman golfing","group":1,"hexcode":"1F3CC-FE0F-200D-2640-FE0F","order":2129,"tags":["golf","woman"],"unicode":"🏌️♀️","skins":[{"annotation":"woman golfing: light skin tone","group":1,"hexcode":"1F3CC-1F3FB-200D-2640-FE0F","order":2133,"unicode":"🏌🏻♀️"},{"annotation":"woman golfing: medium-light skin tone","group":1,"hexcode":"1F3CC-1F3FC-200D-2640-FE0F","order":2135,"unicode":"🏌🏼♀️"},{"annotation":"woman golfing: medium skin tone","group":1,"hexcode":"1F3CC-1F3FD-200D-2640-FE0F","order":2137,"unicode":"🏌🏽♀️"},{"annotation":"woman golfing: medium-dark skin tone","group":1,"hexcode":"1F3CC-1F3FE-200D-2640-FE0F","order":2139,"unicode":"🏌🏾♀️"},{"annotation":"woman golfing: dark skin tone","group":1,"hexcode":"1F3CC-1F3FF-200D-2640-FE0F","order":2141,"unicode":"🏌🏿♀️"}]},{"annotation":"person surfing","group":1,"hexcode":"1F3C4","order":2143,"tags":["surfing"],"unicode":"🏄️","skins":[{"annotation":"person surfing: light skin tone","group":1,"hexcode":"1F3C4-1F3FB","order":2144,"unicode":"🏄🏻"},{"annotation":"person surfing: medium-light skin tone","group":1,"hexcode":"1F3C4-1F3FC","order":2145,"unicode":"🏄🏼"},{"annotation":"person surfing: medium skin tone","group":1,"hexcode":"1F3C4-1F3FD","order":2146,"unicode":"🏄🏽"},{"annotation":"person surfing: medium-dark skin tone","group":1,"hexcode":"1F3C4-1F3FE","order":2147,"unicode":"🏄🏾"},{"annotation":"person surfing: dark skin tone","group":1,"hexcode":"1F3C4-1F3FF","order":2148,"unicode":"🏄🏿"}]},{"annotation":"man surfing","group":1,"hexcode":"1F3C4-200D-2642-FE0F","order":2149,"tags":["man","surfing"],"unicode":"🏄♂️","skins":[{"annotation":"man surfing: light skin tone","group":1,"hexcode":"1F3C4-1F3FB-200D-2642-FE0F","order":2151,"unicode":"🏄🏻♂️"},{"annotation":"man surfing: medium-light skin tone","group":1,"hexcode":"1F3C4-1F3FC-200D-2642-FE0F","order":2153,"unicode":"🏄🏼♂️"},{"annotation":"man surfing: medium skin tone","group":1,"hexcode":"1F3C4-1F3FD-200D-2642-FE0F","order":2155,"unicode":"🏄🏽♂️"},{"annotation":"man surfing: medium-dark skin tone","group":1,"hexcode":"1F3C4-1F3FE-200D-2642-FE0F","order":2157,"unicode":"🏄🏾♂️"},{"annotation":"man surfing: dark skin tone","group":1,"hexcode":"1F3C4-1F3FF-200D-2642-FE0F","order":2159,"unicode":"🏄🏿♂️"}]},{"annotation":"woman surfing","group":1,"hexcode":"1F3C4-200D-2640-FE0F","order":2161,"tags":["surfing","woman"],"unicode":"🏄♀️","skins":[{"annotation":"woman surfing: light skin tone","group":1,"hexcode":"1F3C4-1F3FB-200D-2640-FE0F","order":2163,"unicode":"🏄🏻♀️"},{"annotation":"woman surfing: medium-light skin tone","group":1,"hexcode":"1F3C4-1F3FC-200D-2640-FE0F","order":2165,"unicode":"🏄🏼♀️"},{"annotation":"woman surfing: medium skin tone","group":1,"hexcode":"1F3C4-1F3FD-200D-2640-FE0F","order":2167,"unicode":"🏄🏽♀️"},{"annotation":"woman surfing: medium-dark skin tone","group":1,"hexcode":"1F3C4-1F3FE-200D-2640-FE0F","order":2169,"unicode":"🏄🏾♀️"},{"annotation":"woman surfing: dark skin tone","group":1,"hexcode":"1F3C4-1F3FF-200D-2640-FE0F","order":2171,"unicode":"🏄🏿♀️"}]},{"annotation":"person rowing boat","group":1,"hexcode":"1F6A3","order":2173,"tags":["boat","rowboat"],"unicode":"🚣","skins":[{"annotation":"person rowing boat: light skin tone","group":1,"hexcode":"1F6A3-1F3FB","order":2174,"unicode":"🚣🏻"},{"annotation":"person rowing boat: medium-light skin tone","group":1,"hexcode":"1F6A3-1F3FC","order":2175,"unicode":"🚣🏼"},{"annotation":"person rowing boat: medium skin tone","group":1,"hexcode":"1F6A3-1F3FD","order":2176,"unicode":"🚣🏽"},{"annotation":"person rowing boat: medium-dark skin tone","group":1,"hexcode":"1F6A3-1F3FE","order":2177,"unicode":"🚣🏾"},{"annotation":"person rowing boat: dark skin tone","group":1,"hexcode":"1F6A3-1F3FF","order":2178,"unicode":"🚣🏿"}]},{"annotation":"man rowing boat","group":1,"hexcode":"1F6A3-200D-2642-FE0F","order":2179,"tags":["boat","man","rowboat"],"unicode":"🚣♂️","skins":[{"annotation":"man rowing boat: light skin tone","group":1,"hexcode":"1F6A3-1F3FB-200D-2642-FE0F","order":2181,"unicode":"🚣🏻♂️"},{"annotation":"man rowing boat: medium-light skin tone","group":1,"hexcode":"1F6A3-1F3FC-200D-2642-FE0F","order":2183,"unicode":"🚣🏼♂️"},{"annotation":"man rowing boat: medium skin tone","group":1,"hexcode":"1F6A3-1F3FD-200D-2642-FE0F","order":2185,"unicode":"🚣🏽♂️"},{"annotation":"man rowing boat: medium-dark skin tone","group":1,"hexcode":"1F6A3-1F3FE-200D-2642-FE0F","order":2187,"unicode":"🚣🏾♂️"},{"annotation":"man rowing boat: dark skin tone","group":1,"hexcode":"1F6A3-1F3FF-200D-2642-FE0F","order":2189,"unicode":"🚣🏿♂️"}]},{"annotation":"woman rowing boat","group":1,"hexcode":"1F6A3-200D-2640-FE0F","order":2191,"tags":["boat","rowboat","woman"],"unicode":"🚣♀️","skins":[{"annotation":"woman rowing boat: light skin tone","group":1,"hexcode":"1F6A3-1F3FB-200D-2640-FE0F","order":2193,"unicode":"🚣🏻♀️"},{"annotation":"woman rowing boat: medium-light skin tone","group":1,"hexcode":"1F6A3-1F3FC-200D-2640-FE0F","order":2195,"unicode":"🚣🏼♀️"},{"annotation":"woman rowing boat: medium skin tone","group":1,"hexcode":"1F6A3-1F3FD-200D-2640-FE0F","order":2197,"unicode":"🚣🏽♀️"},{"annotation":"woman rowing boat: medium-dark skin tone","group":1,"hexcode":"1F6A3-1F3FE-200D-2640-FE0F","order":2199,"unicode":"🚣🏾♀️"},{"annotation":"woman rowing boat: dark skin tone","group":1,"hexcode":"1F6A3-1F3FF-200D-2640-FE0F","order":2201,"unicode":"🚣🏿♀️"}]},{"annotation":"person swimming","group":1,"hexcode":"1F3CA","order":2203,"tags":["swim"],"unicode":"🏊️","skins":[{"annotation":"person swimming: light skin tone","group":1,"hexcode":"1F3CA-1F3FB","order":2204,"unicode":"🏊🏻"},{"annotation":"person swimming: medium-light skin tone","group":1,"hexcode":"1F3CA-1F3FC","order":2205,"unicode":"🏊🏼"},{"annotation":"person swimming: medium skin tone","group":1,"hexcode":"1F3CA-1F3FD","order":2206,"unicode":"🏊🏽"},{"annotation":"person swimming: medium-dark skin tone","group":1,"hexcode":"1F3CA-1F3FE","order":2207,"unicode":"🏊🏾"},{"annotation":"person swimming: dark skin tone","group":1,"hexcode":"1F3CA-1F3FF","order":2208,"unicode":"🏊🏿"}]},{"annotation":"man swimming","group":1,"hexcode":"1F3CA-200D-2642-FE0F","order":2209,"tags":["man","swim"],"unicode":"🏊♂️","skins":[{"annotation":"man swimming: light skin tone","group":1,"hexcode":"1F3CA-1F3FB-200D-2642-FE0F","order":2211,"unicode":"🏊🏻♂️"},{"annotation":"man swimming: medium-light skin tone","group":1,"hexcode":"1F3CA-1F3FC-200D-2642-FE0F","order":2213,"unicode":"🏊🏼♂️"},{"annotation":"man swimming: medium skin tone","group":1,"hexcode":"1F3CA-1F3FD-200D-2642-FE0F","order":2215,"unicode":"🏊🏽♂️"},{"annotation":"man swimming: medium-dark skin tone","group":1,"hexcode":"1F3CA-1F3FE-200D-2642-FE0F","order":2217,"unicode":"🏊🏾♂️"},{"annotation":"man swimming: dark skin tone","group":1,"hexcode":"1F3CA-1F3FF-200D-2642-FE0F","order":2219,"unicode":"🏊🏿♂️"}]},{"annotation":"woman swimming","group":1,"hexcode":"1F3CA-200D-2640-FE0F","order":2221,"tags":["swim","woman"],"unicode":"🏊♀️","skins":[{"annotation":"woman swimming: light skin tone","group":1,"hexcode":"1F3CA-1F3FB-200D-2640-FE0F","order":2223,"unicode":"🏊🏻♀️"},{"annotation":"woman swimming: medium-light skin tone","group":1,"hexcode":"1F3CA-1F3FC-200D-2640-FE0F","order":2225,"unicode":"🏊🏼♀️"},{"annotation":"woman swimming: medium skin tone","group":1,"hexcode":"1F3CA-1F3FD-200D-2640-FE0F","order":2227,"unicode":"🏊🏽♀️"},{"annotation":"woman swimming: medium-dark skin tone","group":1,"hexcode":"1F3CA-1F3FE-200D-2640-FE0F","order":2229,"unicode":"🏊🏾♀️"},{"annotation":"woman swimming: dark skin tone","group":1,"hexcode":"1F3CA-1F3FF-200D-2640-FE0F","order":2231,"unicode":"🏊🏿♀️"}]},{"annotation":"person bouncing ball","group":1,"hexcode":"26F9","order":2234,"tags":["ball"],"unicode":"⛹️","skins":[{"annotation":"person bouncing ball: light skin tone","group":1,"hexcode":"26F9-1F3FB","order":2235,"unicode":"⛹🏻"},{"annotation":"person bouncing ball: medium-light skin tone","group":1,"hexcode":"26F9-1F3FC","order":2236,"unicode":"⛹🏼"},{"annotation":"person bouncing ball: medium skin tone","group":1,"hexcode":"26F9-1F3FD","order":2237,"unicode":"⛹🏽"},{"annotation":"person bouncing ball: medium-dark skin tone","group":1,"hexcode":"26F9-1F3FE","order":2238,"unicode":"⛹🏾"},{"annotation":"person bouncing ball: dark skin tone","group":1,"hexcode":"26F9-1F3FF","order":2239,"unicode":"⛹🏿"}]},{"annotation":"man bouncing ball","group":1,"hexcode":"26F9-FE0F-200D-2642-FE0F","order":2240,"tags":["ball","man"],"unicode":"⛹️♂️","skins":[{"annotation":"man bouncing ball: light skin tone","group":1,"hexcode":"26F9-1F3FB-200D-2642-FE0F","order":2244,"unicode":"⛹🏻♂️"},{"annotation":"man bouncing ball: medium-light skin tone","group":1,"hexcode":"26F9-1F3FC-200D-2642-FE0F","order":2246,"unicode":"⛹🏼♂️"},{"annotation":"man bouncing ball: medium skin tone","group":1,"hexcode":"26F9-1F3FD-200D-2642-FE0F","order":2248,"unicode":"⛹🏽♂️"},{"annotation":"man bouncing ball: medium-dark skin tone","group":1,"hexcode":"26F9-1F3FE-200D-2642-FE0F","order":2250,"unicode":"⛹🏾♂️"},{"annotation":"man bouncing ball: dark skin tone","group":1,"hexcode":"26F9-1F3FF-200D-2642-FE0F","order":2252,"unicode":"⛹🏿♂️"}]},{"annotation":"woman bouncing ball","group":1,"hexcode":"26F9-FE0F-200D-2640-FE0F","order":2254,"tags":["ball","woman"],"unicode":"⛹️♀️","skins":[{"annotation":"woman bouncing ball: light skin tone","group":1,"hexcode":"26F9-1F3FB-200D-2640-FE0F","order":2258,"unicode":"⛹🏻♀️"},{"annotation":"woman bouncing ball: medium-light skin tone","group":1,"hexcode":"26F9-1F3FC-200D-2640-FE0F","order":2260,"unicode":"⛹🏼♀️"},{"annotation":"woman bouncing ball: medium skin tone","group":1,"hexcode":"26F9-1F3FD-200D-2640-FE0F","order":2262,"unicode":"⛹🏽♀️"},{"annotation":"woman bouncing ball: medium-dark skin tone","group":1,"hexcode":"26F9-1F3FE-200D-2640-FE0F","order":2264,"unicode":"⛹🏾♀️"},{"annotation":"woman bouncing ball: dark skin tone","group":1,"hexcode":"26F9-1F3FF-200D-2640-FE0F","order":2266,"unicode":"⛹🏿♀️"}]},{"annotation":"person lifting weights","group":1,"hexcode":"1F3CB","order":2269,"tags":["lifter","weight"],"unicode":"🏋️","skins":[{"annotation":"person lifting weights: light skin tone","group":1,"hexcode":"1F3CB-1F3FB","order":2270,"unicode":"🏋🏻"},{"annotation":"person lifting weights: medium-light skin tone","group":1,"hexcode":"1F3CB-1F3FC","order":2271,"unicode":"🏋🏼"},{"annotation":"person lifting weights: medium skin tone","group":1,"hexcode":"1F3CB-1F3FD","order":2272,"unicode":"🏋🏽"},{"annotation":"person lifting weights: medium-dark skin tone","group":1,"hexcode":"1F3CB-1F3FE","order":2273,"unicode":"🏋🏾"},{"annotation":"person lifting weights: dark skin tone","group":1,"hexcode":"1F3CB-1F3FF","order":2274,"unicode":"🏋🏿"}]},{"annotation":"man lifting weights","group":1,"hexcode":"1F3CB-FE0F-200D-2642-FE0F","order":2275,"tags":["man","weight lifter"],"unicode":"🏋️♂️","skins":[{"annotation":"man lifting weights: light skin tone","group":1,"hexcode":"1F3CB-1F3FB-200D-2642-FE0F","order":2279,"unicode":"🏋🏻♂️"},{"annotation":"man lifting weights: medium-light skin tone","group":1,"hexcode":"1F3CB-1F3FC-200D-2642-FE0F","order":2281,"unicode":"🏋🏼♂️"},{"annotation":"man lifting weights: medium skin tone","group":1,"hexcode":"1F3CB-1F3FD-200D-2642-FE0F","order":2283,"unicode":"🏋🏽♂️"},{"annotation":"man lifting weights: medium-dark skin tone","group":1,"hexcode":"1F3CB-1F3FE-200D-2642-FE0F","order":2285,"unicode":"🏋🏾♂️"},{"annotation":"man lifting weights: dark skin tone","group":1,"hexcode":"1F3CB-1F3FF-200D-2642-FE0F","order":2287,"unicode":"🏋🏿♂️"}]},{"annotation":"woman lifting weights","group":1,"hexcode":"1F3CB-FE0F-200D-2640-FE0F","order":2289,"tags":["weight lifter","woman"],"unicode":"🏋️♀️","skins":[{"annotation":"woman lifting weights: light skin tone","group":1,"hexcode":"1F3CB-1F3FB-200D-2640-FE0F","order":2293,"unicode":"🏋🏻♀️"},{"annotation":"woman lifting weights: medium-light skin tone","group":1,"hexcode":"1F3CB-1F3FC-200D-2640-FE0F","order":2295,"unicode":"🏋🏼♀️"},{"annotation":"woman lifting weights: medium skin tone","group":1,"hexcode":"1F3CB-1F3FD-200D-2640-FE0F","order":2297,"unicode":"🏋🏽♀️"},{"annotation":"woman lifting weights: medium-dark skin tone","group":1,"hexcode":"1F3CB-1F3FE-200D-2640-FE0F","order":2299,"unicode":"🏋🏾♀️"},{"annotation":"woman lifting weights: dark skin tone","group":1,"hexcode":"1F3CB-1F3FF-200D-2640-FE0F","order":2301,"unicode":"🏋🏿♀️"}]},{"annotation":"person biking","group":1,"hexcode":"1F6B4","order":2303,"tags":["bicycle","biking","cyclist"],"unicode":"🚴","skins":[{"annotation":"person biking: light skin tone","group":1,"hexcode":"1F6B4-1F3FB","order":2304,"unicode":"🚴🏻"},{"annotation":"person biking: medium-light skin tone","group":1,"hexcode":"1F6B4-1F3FC","order":2305,"unicode":"🚴🏼"},{"annotation":"person biking: medium skin tone","group":1,"hexcode":"1F6B4-1F3FD","order":2306,"unicode":"🚴🏽"},{"annotation":"person biking: medium-dark skin tone","group":1,"hexcode":"1F6B4-1F3FE","order":2307,"unicode":"🚴🏾"},{"annotation":"person biking: dark skin tone","group":1,"hexcode":"1F6B4-1F3FF","order":2308,"unicode":"🚴🏿"}]},{"annotation":"man biking","group":1,"hexcode":"1F6B4-200D-2642-FE0F","order":2309,"tags":["bicycle","biking","cyclist","man"],"unicode":"🚴♂️","skins":[{"annotation":"man biking: light skin tone","group":1,"hexcode":"1F6B4-1F3FB-200D-2642-FE0F","order":2311,"unicode":"🚴🏻♂️"},{"annotation":"man biking: medium-light skin tone","group":1,"hexcode":"1F6B4-1F3FC-200D-2642-FE0F","order":2313,"unicode":"🚴🏼♂️"},{"annotation":"man biking: medium skin tone","group":1,"hexcode":"1F6B4-1F3FD-200D-2642-FE0F","order":2315,"unicode":"🚴🏽♂️"},{"annotation":"man biking: medium-dark skin tone","group":1,"hexcode":"1F6B4-1F3FE-200D-2642-FE0F","order":2317,"unicode":"🚴🏾♂️"},{"annotation":"man biking: dark skin tone","group":1,"hexcode":"1F6B4-1F3FF-200D-2642-FE0F","order":2319,"unicode":"🚴🏿♂️"}]},{"annotation":"woman biking","group":1,"hexcode":"1F6B4-200D-2640-FE0F","order":2321,"tags":["bicycle","biking","cyclist","woman"],"unicode":"🚴♀️","skins":[{"annotation":"woman biking: light skin tone","group":1,"hexcode":"1F6B4-1F3FB-200D-2640-FE0F","order":2323,"unicode":"🚴🏻♀️"},{"annotation":"woman biking: medium-light skin tone","group":1,"hexcode":"1F6B4-1F3FC-200D-2640-FE0F","order":2325,"unicode":"🚴🏼♀️"},{"annotation":"woman biking: medium skin tone","group":1,"hexcode":"1F6B4-1F3FD-200D-2640-FE0F","order":2327,"unicode":"🚴🏽♀️"},{"annotation":"woman biking: medium-dark skin tone","group":1,"hexcode":"1F6B4-1F3FE-200D-2640-FE0F","order":2329,"unicode":"🚴🏾♀️"},{"annotation":"woman biking: dark skin tone","group":1,"hexcode":"1F6B4-1F3FF-200D-2640-FE0F","order":2331,"unicode":"🚴🏿♀️"}]},{"annotation":"person mountain biking","group":1,"hexcode":"1F6B5","order":2333,"tags":["bicycle","bicyclist","bike","cyclist","mountain"],"unicode":"🚵","skins":[{"annotation":"person mountain biking: light skin tone","group":1,"hexcode":"1F6B5-1F3FB","order":2334,"unicode":"🚵🏻"},{"annotation":"person mountain biking: medium-light skin tone","group":1,"hexcode":"1F6B5-1F3FC","order":2335,"unicode":"🚵🏼"},{"annotation":"person mountain biking: medium skin tone","group":1,"hexcode":"1F6B5-1F3FD","order":2336,"unicode":"🚵🏽"},{"annotation":"person mountain biking: medium-dark skin tone","group":1,"hexcode":"1F6B5-1F3FE","order":2337,"unicode":"🚵🏾"},{"annotation":"person mountain biking: dark skin tone","group":1,"hexcode":"1F6B5-1F3FF","order":2338,"unicode":"🚵🏿"}]},{"annotation":"man mountain biking","group":1,"hexcode":"1F6B5-200D-2642-FE0F","order":2339,"tags":["bicycle","bike","cyclist","man","mountain"],"unicode":"🚵♂️","skins":[{"annotation":"man mountain biking: light skin tone","group":1,"hexcode":"1F6B5-1F3FB-200D-2642-FE0F","order":2341,"unicode":"🚵🏻♂️"},{"annotation":"man mountain biking: medium-light skin tone","group":1,"hexcode":"1F6B5-1F3FC-200D-2642-FE0F","order":2343,"unicode":"🚵🏼♂️"},{"annotation":"man mountain biking: medium skin tone","group":1,"hexcode":"1F6B5-1F3FD-200D-2642-FE0F","order":2345,"unicode":"🚵🏽♂️"},{"annotation":"man mountain biking: medium-dark skin tone","group":1,"hexcode":"1F6B5-1F3FE-200D-2642-FE0F","order":2347,"unicode":"🚵🏾♂️"},{"annotation":"man mountain biking: dark skin tone","group":1,"hexcode":"1F6B5-1F3FF-200D-2642-FE0F","order":2349,"unicode":"🚵🏿♂️"}]},{"annotation":"woman mountain biking","group":1,"hexcode":"1F6B5-200D-2640-FE0F","order":2351,"tags":["bicycle","bike","biking","cyclist","mountain","woman"],"unicode":"🚵♀️","skins":[{"annotation":"woman mountain biking: light skin tone","group":1,"hexcode":"1F6B5-1F3FB-200D-2640-FE0F","order":2353,"unicode":"🚵🏻♀️"},{"annotation":"woman mountain biking: medium-light skin tone","group":1,"hexcode":"1F6B5-1F3FC-200D-2640-FE0F","order":2355,"unicode":"🚵🏼♀️"},{"annotation":"woman mountain biking: medium skin tone","group":1,"hexcode":"1F6B5-1F3FD-200D-2640-FE0F","order":2357,"unicode":"🚵🏽♀️"},{"annotation":"woman mountain biking: medium-dark skin tone","group":1,"hexcode":"1F6B5-1F3FE-200D-2640-FE0F","order":2359,"unicode":"🚵🏾♀️"},{"annotation":"woman mountain biking: dark skin tone","group":1,"hexcode":"1F6B5-1F3FF-200D-2640-FE0F","order":2361,"unicode":"🚵🏿♀️"}]},{"annotation":"person cartwheeling","group":1,"hexcode":"1F938","order":2363,"tags":["cartwheel","gymnastics"],"unicode":"🤸","skins":[{"annotation":"person cartwheeling: light skin tone","group":1,"hexcode":"1F938-1F3FB","order":2364,"unicode":"🤸🏻"},{"annotation":"person cartwheeling: medium-light skin tone","group":1,"hexcode":"1F938-1F3FC","order":2365,"unicode":"🤸🏼"},{"annotation":"person cartwheeling: medium skin tone","group":1,"hexcode":"1F938-1F3FD","order":2366,"unicode":"🤸🏽"},{"annotation":"person cartwheeling: medium-dark skin tone","group":1,"hexcode":"1F938-1F3FE","order":2367,"unicode":"🤸🏾"},{"annotation":"person cartwheeling: dark skin tone","group":1,"hexcode":"1F938-1F3FF","order":2368,"unicode":"🤸🏿"}]},{"annotation":"man cartwheeling","group":1,"hexcode":"1F938-200D-2642-FE0F","order":2369,"tags":["cartwheel","gymnastics","man"],"unicode":"🤸♂️","skins":[{"annotation":"man cartwheeling: light skin tone","group":1,"hexcode":"1F938-1F3FB-200D-2642-FE0F","order":2371,"unicode":"🤸🏻♂️"},{"annotation":"man cartwheeling: medium-light skin tone","group":1,"hexcode":"1F938-1F3FC-200D-2642-FE0F","order":2373,"unicode":"🤸🏼♂️"},{"annotation":"man cartwheeling: medium skin tone","group":1,"hexcode":"1F938-1F3FD-200D-2642-FE0F","order":2375,"unicode":"🤸🏽♂️"},{"annotation":"man cartwheeling: medium-dark skin tone","group":1,"hexcode":"1F938-1F3FE-200D-2642-FE0F","order":2377,"unicode":"🤸🏾♂️"},{"annotation":"man cartwheeling: dark skin tone","group":1,"hexcode":"1F938-1F3FF-200D-2642-FE0F","order":2379,"unicode":"🤸🏿♂️"}]},{"annotation":"woman cartwheeling","group":1,"hexcode":"1F938-200D-2640-FE0F","order":2381,"tags":["cartwheel","gymnastics","woman"],"unicode":"🤸♀️","skins":[{"annotation":"woman cartwheeling: light skin tone","group":1,"hexcode":"1F938-1F3FB-200D-2640-FE0F","order":2383,"unicode":"🤸🏻♀️"},{"annotation":"woman cartwheeling: medium-light skin tone","group":1,"hexcode":"1F938-1F3FC-200D-2640-FE0F","order":2385,"unicode":"🤸🏼♀️"},{"annotation":"woman cartwheeling: medium skin tone","group":1,"hexcode":"1F938-1F3FD-200D-2640-FE0F","order":2387,"unicode":"🤸🏽♀️"},{"annotation":"woman cartwheeling: medium-dark skin tone","group":1,"hexcode":"1F938-1F3FE-200D-2640-FE0F","order":2389,"unicode":"🤸🏾♀️"},{"annotation":"woman cartwheeling: dark skin tone","group":1,"hexcode":"1F938-1F3FF-200D-2640-FE0F","order":2391,"unicode":"🤸🏿♀️"}]},{"annotation":"people wrestling","group":1,"hexcode":"1F93C","order":2393,"tags":["wrestle","wrestler"],"unicode":"🤼"},{"annotation":"men wrestling","group":1,"hexcode":"1F93C-200D-2642-FE0F","order":2394,"tags":["men","wrestle"],"unicode":"🤼♂️"},{"annotation":"women wrestling","group":1,"hexcode":"1F93C-200D-2640-FE0F","order":2396,"tags":["women","wrestle"],"unicode":"🤼♀️"},{"annotation":"person playing water polo","group":1,"hexcode":"1F93D","order":2398,"tags":["polo","water"],"unicode":"🤽","skins":[{"annotation":"person playing water polo: light skin tone","group":1,"hexcode":"1F93D-1F3FB","order":2399,"unicode":"🤽🏻"},{"annotation":"person playing water polo: medium-light skin tone","group":1,"hexcode":"1F93D-1F3FC","order":2400,"unicode":"🤽🏼"},{"annotation":"person playing water polo: medium skin tone","group":1,"hexcode":"1F93D-1F3FD","order":2401,"unicode":"🤽🏽"},{"annotation":"person playing water polo: medium-dark skin tone","group":1,"hexcode":"1F93D-1F3FE","order":2402,"unicode":"🤽🏾"},{"annotation":"person playing water polo: dark skin tone","group":1,"hexcode":"1F93D-1F3FF","order":2403,"unicode":"🤽🏿"}]},{"annotation":"man playing water polo","group":1,"hexcode":"1F93D-200D-2642-FE0F","order":2404,"tags":["man","water polo"],"unicode":"🤽♂️","skins":[{"annotation":"man playing water polo: light skin tone","group":1,"hexcode":"1F93D-1F3FB-200D-2642-FE0F","order":2406,"unicode":"🤽🏻♂️"},{"annotation":"man playing water polo: medium-light skin tone","group":1,"hexcode":"1F93D-1F3FC-200D-2642-FE0F","order":2408,"unicode":"🤽🏼♂️"},{"annotation":"man playing water polo: medium skin tone","group":1,"hexcode":"1F93D-1F3FD-200D-2642-FE0F","order":2410,"unicode":"🤽🏽♂️"},{"annotation":"man playing water polo: medium-dark skin tone","group":1,"hexcode":"1F93D-1F3FE-200D-2642-FE0F","order":2412,"unicode":"🤽🏾♂️"},{"annotation":"man playing water polo: dark skin tone","group":1,"hexcode":"1F93D-1F3FF-200D-2642-FE0F","order":2414,"unicode":"🤽🏿♂️"}]},{"annotation":"woman playing water polo","group":1,"hexcode":"1F93D-200D-2640-FE0F","order":2416,"tags":["water polo","woman"],"unicode":"🤽♀️","skins":[{"annotation":"woman playing water polo: light skin tone","group":1,"hexcode":"1F93D-1F3FB-200D-2640-FE0F","order":2418,"unicode":"🤽🏻♀️"},{"annotation":"woman playing water polo: medium-light skin tone","group":1,"hexcode":"1F93D-1F3FC-200D-2640-FE0F","order":2420,"unicode":"🤽🏼♀️"},{"annotation":"woman playing water polo: medium skin tone","group":1,"hexcode":"1F93D-1F3FD-200D-2640-FE0F","order":2422,"unicode":"🤽🏽♀️"},{"annotation":"woman playing water polo: medium-dark skin tone","group":1,"hexcode":"1F93D-1F3FE-200D-2640-FE0F","order":2424,"unicode":"🤽🏾♀️"},{"annotation":"woman playing water polo: dark skin tone","group":1,"hexcode":"1F93D-1F3FF-200D-2640-FE0F","order":2426,"unicode":"🤽🏿♀️"}]},{"annotation":"person playing handball","group":1,"hexcode":"1F93E","order":2428,"tags":["ball","handball"],"unicode":"🤾","skins":[{"annotation":"person playing handball: light skin tone","group":1,"hexcode":"1F93E-1F3FB","order":2429,"unicode":"🤾🏻"},{"annotation":"person playing handball: medium-light skin tone","group":1,"hexcode":"1F93E-1F3FC","order":2430,"unicode":"🤾🏼"},{"annotation":"person playing handball: medium skin tone","group":1,"hexcode":"1F93E-1F3FD","order":2431,"unicode":"🤾🏽"},{"annotation":"person playing handball: medium-dark skin tone","group":1,"hexcode":"1F93E-1F3FE","order":2432,"unicode":"🤾🏾"},{"annotation":"person playing handball: dark skin tone","group":1,"hexcode":"1F93E-1F3FF","order":2433,"unicode":"🤾🏿"}]},{"annotation":"man playing handball","group":1,"hexcode":"1F93E-200D-2642-FE0F","order":2434,"tags":["handball","man"],"unicode":"🤾♂️","skins":[{"annotation":"man playing handball: light skin tone","group":1,"hexcode":"1F93E-1F3FB-200D-2642-FE0F","order":2436,"unicode":"🤾🏻♂️"},{"annotation":"man playing handball: medium-light skin tone","group":1,"hexcode":"1F93E-1F3FC-200D-2642-FE0F","order":2438,"unicode":"🤾🏼♂️"},{"annotation":"man playing handball: medium skin tone","group":1,"hexcode":"1F93E-1F3FD-200D-2642-FE0F","order":2440,"unicode":"🤾🏽♂️"},{"annotation":"man playing handball: medium-dark skin tone","group":1,"hexcode":"1F93E-1F3FE-200D-2642-FE0F","order":2442,"unicode":"🤾🏾♂️"},{"annotation":"man playing handball: dark skin tone","group":1,"hexcode":"1F93E-1F3FF-200D-2642-FE0F","order":2444,"unicode":"🤾🏿♂️"}]},{"annotation":"woman playing handball","group":1,"hexcode":"1F93E-200D-2640-FE0F","order":2446,"tags":["handball","woman"],"unicode":"🤾♀️","skins":[{"annotation":"woman playing handball: light skin tone","group":1,"hexcode":"1F93E-1F3FB-200D-2640-FE0F","order":2448,"unicode":"🤾🏻♀️"},{"annotation":"woman playing handball: medium-light skin tone","group":1,"hexcode":"1F93E-1F3FC-200D-2640-FE0F","order":2450,"unicode":"🤾🏼♀️"},{"annotation":"woman playing handball: medium skin tone","group":1,"hexcode":"1F93E-1F3FD-200D-2640-FE0F","order":2452,"unicode":"🤾🏽♀️"},{"annotation":"woman playing handball: medium-dark skin tone","group":1,"hexcode":"1F93E-1F3FE-200D-2640-FE0F","order":2454,"unicode":"🤾🏾♀️"},{"annotation":"woman playing handball: dark skin tone","group":1,"hexcode":"1F93E-1F3FF-200D-2640-FE0F","order":2456,"unicode":"🤾🏿♀️"}]},{"annotation":"person juggling","group":1,"hexcode":"1F939","order":2458,"tags":["balance","juggle","multitask","skill"],"unicode":"🤹","skins":[{"annotation":"person juggling: light skin tone","group":1,"hexcode":"1F939-1F3FB","order":2459,"unicode":"🤹🏻"},{"annotation":"person juggling: medium-light skin tone","group":1,"hexcode":"1F939-1F3FC","order":2460,"unicode":"🤹🏼"},{"annotation":"person juggling: medium skin tone","group":1,"hexcode":"1F939-1F3FD","order":2461,"unicode":"🤹🏽"},{"annotation":"person juggling: medium-dark skin tone","group":1,"hexcode":"1F939-1F3FE","order":2462,"unicode":"🤹🏾"},{"annotation":"person juggling: dark skin tone","group":1,"hexcode":"1F939-1F3FF","order":2463,"unicode":"🤹🏿"}]},{"annotation":"man juggling","group":1,"hexcode":"1F939-200D-2642-FE0F","order":2464,"tags":["juggling","man","multitask"],"unicode":"🤹♂️","skins":[{"annotation":"man juggling: light skin tone","group":1,"hexcode":"1F939-1F3FB-200D-2642-FE0F","order":2466,"unicode":"🤹🏻♂️"},{"annotation":"man juggling: medium-light skin tone","group":1,"hexcode":"1F939-1F3FC-200D-2642-FE0F","order":2468,"unicode":"🤹🏼♂️"},{"annotation":"man juggling: medium skin tone","group":1,"hexcode":"1F939-1F3FD-200D-2642-FE0F","order":2470,"unicode":"🤹🏽♂️"},{"annotation":"man juggling: medium-dark skin tone","group":1,"hexcode":"1F939-1F3FE-200D-2642-FE0F","order":2472,"unicode":"🤹🏾♂️"},{"annotation":"man juggling: dark skin tone","group":1,"hexcode":"1F939-1F3FF-200D-2642-FE0F","order":2474,"unicode":"🤹🏿♂️"}]},{"annotation":"woman juggling","group":1,"hexcode":"1F939-200D-2640-FE0F","order":2476,"tags":["juggling","multitask","woman"],"unicode":"🤹♀️","skins":[{"annotation":"woman juggling: light skin tone","group":1,"hexcode":"1F939-1F3FB-200D-2640-FE0F","order":2478,"unicode":"🤹🏻♀️"},{"annotation":"woman juggling: medium-light skin tone","group":1,"hexcode":"1F939-1F3FC-200D-2640-FE0F","order":2480,"unicode":"🤹🏼♀️"},{"annotation":"woman juggling: medium skin tone","group":1,"hexcode":"1F939-1F3FD-200D-2640-FE0F","order":2482,"unicode":"🤹🏽♀️"},{"annotation":"woman juggling: medium-dark skin tone","group":1,"hexcode":"1F939-1F3FE-200D-2640-FE0F","order":2484,"unicode":"🤹🏾♀️"},{"annotation":"woman juggling: dark skin tone","group":1,"hexcode":"1F939-1F3FF-200D-2640-FE0F","order":2486,"unicode":"🤹🏿♀️"}]},{"annotation":"person in lotus position","group":1,"hexcode":"1F9D8","order":2488,"tags":["meditation","yoga"],"unicode":"🧘","skins":[{"annotation":"person in lotus position: light skin tone","group":1,"hexcode":"1F9D8-1F3FB","order":2489,"unicode":"🧘🏻"},{"annotation":"person in lotus position: medium-light skin tone","group":1,"hexcode":"1F9D8-1F3FC","order":2490,"unicode":"🧘🏼"},{"annotation":"person in lotus position: medium skin tone","group":1,"hexcode":"1F9D8-1F3FD","order":2491,"unicode":"🧘🏽"},{"annotation":"person in lotus position: medium-dark skin tone","group":1,"hexcode":"1F9D8-1F3FE","order":2492,"unicode":"🧘🏾"},{"annotation":"person in lotus position: dark skin tone","group":1,"hexcode":"1F9D8-1F3FF","order":2493,"unicode":"🧘🏿"}]},{"annotation":"man in lotus position","group":1,"hexcode":"1F9D8-200D-2642-FE0F","order":2494,"tags":["meditation","yoga"],"unicode":"🧘♂️","skins":[{"annotation":"man in lotus position: light skin tone","group":1,"hexcode":"1F9D8-1F3FB-200D-2642-FE0F","order":2496,"unicode":"🧘🏻♂️"},{"annotation":"man in lotus position: medium-light skin tone","group":1,"hexcode":"1F9D8-1F3FC-200D-2642-FE0F","order":2498,"unicode":"🧘🏼♂️"},{"annotation":"man in lotus position: medium skin tone","group":1,"hexcode":"1F9D8-1F3FD-200D-2642-FE0F","order":2500,"unicode":"🧘🏽♂️"},{"annotation":"man in lotus position: medium-dark skin tone","group":1,"hexcode":"1F9D8-1F3FE-200D-2642-FE0F","order":2502,"unicode":"🧘🏾♂️"},{"annotation":"man in lotus position: dark skin tone","group":1,"hexcode":"1F9D8-1F3FF-200D-2642-FE0F","order":2504,"unicode":"🧘🏿♂️"}]},{"annotation":"woman in lotus position","group":1,"hexcode":"1F9D8-200D-2640-FE0F","order":2506,"tags":["meditation","yoga"],"unicode":"🧘♀️","skins":[{"annotation":"woman in lotus position: light skin tone","group":1,"hexcode":"1F9D8-1F3FB-200D-2640-FE0F","order":2508,"unicode":"🧘🏻♀️"},{"annotation":"woman in lotus position: medium-light skin tone","group":1,"hexcode":"1F9D8-1F3FC-200D-2640-FE0F","order":2510,"unicode":"🧘🏼♀️"},{"annotation":"woman in lotus position: medium skin tone","group":1,"hexcode":"1F9D8-1F3FD-200D-2640-FE0F","order":2512,"unicode":"🧘🏽♀️"},{"annotation":"woman in lotus position: medium-dark skin tone","group":1,"hexcode":"1F9D8-1F3FE-200D-2640-FE0F","order":2514,"unicode":"🧘🏾♀️"},{"annotation":"woman in lotus position: dark skin tone","group":1,"hexcode":"1F9D8-1F3FF-200D-2640-FE0F","order":2516,"unicode":"🧘🏿♀️"}]},{"annotation":"person taking bath","group":1,"hexcode":"1F6C0","order":2518,"tags":["bath","bathtub"],"unicode":"🛀","skins":[{"annotation":"person taking bath: light skin tone","group":1,"hexcode":"1F6C0-1F3FB","order":2519,"unicode":"🛀🏻"},{"annotation":"person taking bath: medium-light skin tone","group":1,"hexcode":"1F6C0-1F3FC","order":2520,"unicode":"🛀🏼"},{"annotation":"person taking bath: medium skin tone","group":1,"hexcode":"1F6C0-1F3FD","order":2521,"unicode":"🛀🏽"},{"annotation":"person taking bath: medium-dark skin tone","group":1,"hexcode":"1F6C0-1F3FE","order":2522,"unicode":"🛀🏾"},{"annotation":"person taking bath: dark skin tone","group":1,"hexcode":"1F6C0-1F3FF","order":2523,"unicode":"🛀🏿"}]},{"annotation":"person in bed","group":1,"hexcode":"1F6CC","order":2524,"tags":["hotel","sleep"],"unicode":"🛌","skins":[{"annotation":"person in bed: light skin tone","group":1,"hexcode":"1F6CC-1F3FB","order":2525,"unicode":"🛌🏻"},{"annotation":"person in bed: medium-light skin tone","group":1,"hexcode":"1F6CC-1F3FC","order":2526,"unicode":"🛌🏼"},{"annotation":"person in bed: medium skin tone","group":1,"hexcode":"1F6CC-1F3FD","order":2527,"unicode":"🛌🏽"},{"annotation":"person in bed: medium-dark skin tone","group":1,"hexcode":"1F6CC-1F3FE","order":2528,"unicode":"🛌🏾"},{"annotation":"person in bed: dark skin tone","group":1,"hexcode":"1F6CC-1F3FF","order":2529,"unicode":"🛌🏿"}]},{"annotation":"people holding hands","group":1,"hexcode":"1F9D1-200D-1F91D-200D-1F9D1","order":2530,"tags":["couple","hand","hold","holding hands","person"],"unicode":"🧑🤝🧑","skins":[{"annotation":"people holding hands: light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FB","order":2531,"unicode":"🧑🏻🤝🧑🏻"},{"annotation":"people holding hands: light skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FC","order":2532,"unicode":"🧑🏻🤝🧑🏼"},{"annotation":"people holding hands: light skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FD","order":2533,"unicode":"🧑🏻🤝🧑🏽"},{"annotation":"people holding hands: light skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FE","order":2534,"unicode":"🧑🏻🤝🧑🏾"},{"annotation":"people holding hands: light skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FF","order":2535,"unicode":"🧑🏻🤝🧑🏿"},{"annotation":"people holding hands: medium-light skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FB","order":2536,"unicode":"🧑🏼🤝🧑🏻"},{"annotation":"people holding hands: medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FC","order":2537,"unicode":"🧑🏼🤝🧑🏼"},{"annotation":"people holding hands: medium-light skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FD","order":2538,"unicode":"🧑🏼🤝🧑🏽"},{"annotation":"people holding hands: medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FE","order":2539,"unicode":"🧑🏼🤝🧑🏾"},{"annotation":"people holding hands: medium-light skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FF","order":2540,"unicode":"🧑🏼🤝🧑🏿"},{"annotation":"people holding hands: medium skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FB","order":2541,"unicode":"🧑🏽🤝🧑🏻"},{"annotation":"people holding hands: medium skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FC","order":2542,"unicode":"🧑🏽🤝🧑🏼"},{"annotation":"people holding hands: medium skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FD","order":2543,"unicode":"🧑🏽🤝🧑🏽"},{"annotation":"people holding hands: medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FE","order":2544,"unicode":"🧑🏽🤝🧑🏾"},{"annotation":"people holding hands: medium skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FF","order":2545,"unicode":"🧑🏽🤝🧑🏿"},{"annotation":"people holding hands: medium-dark skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FB","order":2546,"unicode":"🧑🏾🤝🧑🏻"},{"annotation":"people holding hands: medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FC","order":2547,"unicode":"🧑🏾🤝🧑🏼"},{"annotation":"people holding hands: medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FD","order":2548,"unicode":"🧑🏾🤝🧑🏽"},{"annotation":"people holding hands: medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FE","order":2549,"unicode":"🧑🏾🤝🧑🏾"},{"annotation":"people holding hands: medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FF","order":2550,"unicode":"🧑🏾🤝🧑🏿"},{"annotation":"people holding hands: dark skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FB","order":2551,"unicode":"🧑🏿🤝🧑🏻"},{"annotation":"people holding hands: dark skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FC","order":2552,"unicode":"🧑🏿🤝🧑🏼"},{"annotation":"people holding hands: dark skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FD","order":2553,"unicode":"🧑🏿🤝🧑🏽"},{"annotation":"people holding hands: dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FE","order":2554,"unicode":"🧑🏿🤝🧑🏾"},{"annotation":"people holding hands: dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FF","order":2555,"unicode":"🧑🏿🤝🧑🏿"}]},{"annotation":"women holding hands","group":1,"hexcode":"1F46D","order":2556,"tags":["couple","hand","holding hands","women"],"unicode":"👭","skins":[{"annotation":"women holding hands: light skin tone","group":1,"hexcode":"1F46D-1F3FB","order":2557,"unicode":"👭🏻"},{"annotation":"women holding hands: medium-light skin tone","group":1,"hexcode":"1F46D-1F3FC","order":2563,"unicode":"👭🏼"},{"annotation":"women holding hands: medium skin tone","group":1,"hexcode":"1F46D-1F3FD","order":2569,"unicode":"👭🏽"},{"annotation":"women holding hands: medium-dark skin tone","group":1,"hexcode":"1F46D-1F3FE","order":2575,"unicode":"👭🏾"},{"annotation":"women holding hands: dark skin tone","group":1,"hexcode":"1F46D-1F3FF","order":2581,"unicode":"👭🏿"},{"annotation":"women holding hands: light skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F469-1F3FC","order":2558,"unicode":"👩🏻🤝👩🏼"},{"annotation":"women holding hands: light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F469-1F3FD","order":2559,"unicode":"👩🏻🤝👩🏽"},{"annotation":"women holding hands: light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F469-1F3FE","order":2560,"unicode":"👩🏻🤝👩🏾"},{"annotation":"women holding hands: light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F469-1F3FF","order":2561,"unicode":"👩🏻🤝👩🏿"},{"annotation":"women holding hands: medium-light skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F469-1F3FB","order":2562,"unicode":"👩🏼🤝👩🏻"},{"annotation":"women holding hands: medium-light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F469-1F3FD","order":2564,"unicode":"👩🏼🤝👩🏽"},{"annotation":"women holding hands: medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F469-1F3FE","order":2565,"unicode":"👩🏼🤝👩🏾"},{"annotation":"women holding hands: medium-light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F469-1F3FF","order":2566,"unicode":"👩🏼🤝👩🏿"},{"annotation":"women holding hands: medium skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F469-1F3FB","order":2567,"unicode":"👩🏽🤝👩🏻"},{"annotation":"women holding hands: medium skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F469-1F3FC","order":2568,"unicode":"👩🏽🤝👩🏼"},{"annotation":"women holding hands: medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F469-1F3FE","order":2570,"unicode":"👩🏽🤝👩🏾"},{"annotation":"women holding hands: medium skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F469-1F3FF","order":2571,"unicode":"👩🏽🤝👩🏿"},{"annotation":"women holding hands: medium-dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F469-1F3FB","order":2572,"unicode":"👩🏾🤝👩🏻"},{"annotation":"women holding hands: medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F469-1F3FC","order":2573,"unicode":"👩🏾🤝👩🏼"},{"annotation":"women holding hands: medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F469-1F3FD","order":2574,"unicode":"👩🏾🤝👩🏽"},{"annotation":"women holding hands: medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F469-1F3FF","order":2576,"unicode":"👩🏾🤝👩🏿"},{"annotation":"women holding hands: dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F469-1F3FB","order":2577,"unicode":"👩🏿🤝👩🏻"},{"annotation":"women holding hands: dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F469-1F3FC","order":2578,"unicode":"👩🏿🤝👩🏼"},{"annotation":"women holding hands: dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F469-1F3FD","order":2579,"unicode":"👩🏿🤝👩🏽"},{"annotation":"women holding hands: dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F469-1F3FE","order":2580,"unicode":"👩🏿🤝👩🏾"}]},{"annotation":"woman and man holding hands","group":1,"hexcode":"1F46B","order":2582,"tags":["couple","hand","hold","holding hands","man","woman"],"unicode":"👫","skins":[{"annotation":"woman and man holding hands: light skin tone","group":1,"hexcode":"1F46B-1F3FB","order":2583,"unicode":"👫🏻"},{"annotation":"woman and man holding hands: medium-light skin tone","group":1,"hexcode":"1F46B-1F3FC","order":2589,"unicode":"👫🏼"},{"annotation":"woman and man holding hands: medium skin tone","group":1,"hexcode":"1F46B-1F3FD","order":2595,"unicode":"👫🏽"},{"annotation":"woman and man holding hands: medium-dark skin tone","group":1,"hexcode":"1F46B-1F3FE","order":2601,"unicode":"👫🏾"},{"annotation":"woman and man holding hands: dark skin tone","group":1,"hexcode":"1F46B-1F3FF","order":2607,"unicode":"👫🏿"},{"annotation":"woman and man holding hands: light skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F468-1F3FC","order":2584,"unicode":"👩🏻🤝👨🏼"},{"annotation":"woman and man holding hands: light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F468-1F3FD","order":2585,"unicode":"👩🏻🤝👨🏽"},{"annotation":"woman and man holding hands: light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F468-1F3FE","order":2586,"unicode":"👩🏻🤝👨🏾"},{"annotation":"woman and man holding hands: light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F468-1F3FF","order":2587,"unicode":"👩🏻🤝👨🏿"},{"annotation":"woman and man holding hands: medium-light skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F468-1F3FB","order":2588,"unicode":"👩🏼🤝👨🏻"},{"annotation":"woman and man holding hands: medium-light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F468-1F3FD","order":2590,"unicode":"👩🏼🤝👨🏽"},{"annotation":"woman and man holding hands: medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F468-1F3FE","order":2591,"unicode":"👩🏼🤝👨🏾"},{"annotation":"woman and man holding hands: medium-light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F468-1F3FF","order":2592,"unicode":"👩🏼🤝👨🏿"},{"annotation":"woman and man holding hands: medium skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F468-1F3FB","order":2593,"unicode":"👩🏽🤝👨🏻"},{"annotation":"woman and man holding hands: medium skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F468-1F3FC","order":2594,"unicode":"👩🏽🤝👨🏼"},{"annotation":"woman and man holding hands: medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F468-1F3FE","order":2596,"unicode":"👩🏽🤝👨🏾"},{"annotation":"woman and man holding hands: medium skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F468-1F3FF","order":2597,"unicode":"👩🏽🤝👨🏿"},{"annotation":"woman and man holding hands: medium-dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F468-1F3FB","order":2598,"unicode":"👩🏾🤝👨🏻"},{"annotation":"woman and man holding hands: medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F468-1F3FC","order":2599,"unicode":"👩🏾🤝👨🏼"},{"annotation":"woman and man holding hands: medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F468-1F3FD","order":2600,"unicode":"👩🏾🤝👨🏽"},{"annotation":"woman and man holding hands: medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F468-1F3FF","order":2602,"unicode":"👩🏾🤝👨🏿"},{"annotation":"woman and man holding hands: dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F468-1F3FB","order":2603,"unicode":"👩🏿🤝👨🏻"},{"annotation":"woman and man holding hands: dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F468-1F3FC","order":2604,"unicode":"👩🏿🤝👨🏼"},{"annotation":"woman and man holding hands: dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F468-1F3FD","order":2605,"unicode":"👩🏿🤝👨🏽"},{"annotation":"woman and man holding hands: dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F468-1F3FE","order":2606,"unicode":"👩🏿🤝👨🏾"}]},{"annotation":"men holding hands","group":1,"hexcode":"1F46C","order":2608,"tags":["couple","gemini","holding hands","man","men","twins","zodiac"],"unicode":"👬","skins":[{"annotation":"men holding hands: light skin tone","group":1,"hexcode":"1F46C-1F3FB","order":2609,"unicode":"👬🏻"},{"annotation":"men holding hands: medium-light skin tone","group":1,"hexcode":"1F46C-1F3FC","order":2615,"unicode":"👬🏼"},{"annotation":"men holding hands: medium skin tone","group":1,"hexcode":"1F46C-1F3FD","order":2621,"unicode":"👬🏽"},{"annotation":"men holding hands: medium-dark skin tone","group":1,"hexcode":"1F46C-1F3FE","order":2627,"unicode":"👬🏾"},{"annotation":"men holding hands: dark skin tone","group":1,"hexcode":"1F46C-1F3FF","order":2633,"unicode":"👬🏿"},{"annotation":"men holding hands: light skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F91D-200D-1F468-1F3FC","order":2610,"unicode":"👨🏻🤝👨🏼"},{"annotation":"men holding hands: light skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F91D-200D-1F468-1F3FD","order":2611,"unicode":"👨🏻🤝👨🏽"},{"annotation":"men holding hands: light skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F91D-200D-1F468-1F3FE","order":2612,"unicode":"👨🏻🤝👨🏾"},{"annotation":"men holding hands: light skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FB-200D-1F91D-200D-1F468-1F3FF","order":2613,"unicode":"👨🏻🤝👨🏿"},{"annotation":"men holding hands: medium-light skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F91D-200D-1F468-1F3FB","order":2614,"unicode":"👨🏼🤝👨🏻"},{"annotation":"men holding hands: medium-light skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F91D-200D-1F468-1F3FD","order":2616,"unicode":"👨🏼🤝👨🏽"},{"annotation":"men holding hands: medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F91D-200D-1F468-1F3FE","order":2617,"unicode":"👨🏼🤝👨🏾"},{"annotation":"men holding hands: medium-light skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FC-200D-1F91D-200D-1F468-1F3FF","order":2618,"unicode":"👨🏼🤝👨🏿"},{"annotation":"men holding hands: medium skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F91D-200D-1F468-1F3FB","order":2619,"unicode":"👨🏽🤝👨🏻"},{"annotation":"men holding hands: medium skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F91D-200D-1F468-1F3FC","order":2620,"unicode":"👨🏽🤝👨🏼"},{"annotation":"men holding hands: medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F91D-200D-1F468-1F3FE","order":2622,"unicode":"👨🏽🤝👨🏾"},{"annotation":"men holding hands: medium skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FD-200D-1F91D-200D-1F468-1F3FF","order":2623,"unicode":"👨🏽🤝👨🏿"},{"annotation":"men holding hands: medium-dark skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F91D-200D-1F468-1F3FB","order":2624,"unicode":"👨🏾🤝👨🏻"},{"annotation":"men holding hands: medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F91D-200D-1F468-1F3FC","order":2625,"unicode":"👨🏾🤝👨🏼"},{"annotation":"men holding hands: medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F91D-200D-1F468-1F3FD","order":2626,"unicode":"👨🏾🤝👨🏽"},{"annotation":"men holding hands: medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-1F91D-200D-1F468-1F3FF","order":2628,"unicode":"👨🏾🤝👨🏿"},{"annotation":"men holding hands: dark skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F91D-200D-1F468-1F3FB","order":2629,"unicode":"👨🏿🤝👨🏻"},{"annotation":"men holding hands: dark skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F91D-200D-1F468-1F3FC","order":2630,"unicode":"👨🏿🤝👨🏼"},{"annotation":"men holding hands: dark skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F91D-200D-1F468-1F3FD","order":2631,"unicode":"👨🏿🤝👨🏽"},{"annotation":"men holding hands: dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-1F91D-200D-1F468-1F3FE","order":2632,"unicode":"👨🏿🤝👨🏾"}]},{"annotation":"kiss","group":1,"hexcode":"1F48F","order":2634,"tags":["couple"],"unicode":"💏","skins":[{"annotation":"kiss: light skin tone","group":1,"hexcode":"1F48F-1F3FB","order":2635,"unicode":"💏🏻"},{"annotation":"kiss: medium-light skin tone","group":1,"hexcode":"1F48F-1F3FC","order":2636,"unicode":"💏🏼"},{"annotation":"kiss: medium skin tone","group":1,"hexcode":"1F48F-1F3FD","order":2637,"unicode":"💏🏽"},{"annotation":"kiss: medium-dark skin tone","group":1,"hexcode":"1F48F-1F3FE","order":2638,"unicode":"💏🏾"},{"annotation":"kiss: dark skin tone","group":1,"hexcode":"1F48F-1F3FF","order":2639,"unicode":"💏🏿"},{"annotation":"kiss: person, person, light skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FC","order":2640,"unicode":"🧑🏻❤️💋🧑🏼"},{"annotation":"kiss: person, person, light skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FD","order":2642,"unicode":"🧑🏻❤️💋🧑🏽"},{"annotation":"kiss: person, person, light skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FE","order":2644,"unicode":"🧑🏻❤️💋🧑🏾"},{"annotation":"kiss: person, person, light skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FF","order":2646,"unicode":"🧑🏻❤️💋🧑🏿"},{"annotation":"kiss: person, person, medium-light skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FB","order":2648,"unicode":"🧑🏼❤️💋🧑🏻"},{"annotation":"kiss: person, person, medium-light skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FD","order":2650,"unicode":"🧑🏼❤️💋🧑🏽"},{"annotation":"kiss: person, person, medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FE","order":2652,"unicode":"🧑🏼❤️💋🧑🏾"},{"annotation":"kiss: person, person, medium-light skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FF","order":2654,"unicode":"🧑🏼❤️💋🧑🏿"},{"annotation":"kiss: person, person, medium skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FB","order":2656,"unicode":"🧑🏽❤️💋🧑🏻"},{"annotation":"kiss: person, person, medium skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FC","order":2658,"unicode":"🧑🏽❤️💋🧑🏼"},{"annotation":"kiss: person, person, medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FE","order":2660,"unicode":"🧑🏽❤️💋🧑🏾"},{"annotation":"kiss: person, person, medium skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FF","order":2662,"unicode":"🧑🏽❤️💋🧑🏿"},{"annotation":"kiss: person, person, medium-dark skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FB","order":2664,"unicode":"🧑🏾❤️💋🧑🏻"},{"annotation":"kiss: person, person, medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FC","order":2666,"unicode":"🧑🏾❤️💋🧑🏼"},{"annotation":"kiss: person, person, medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FD","order":2668,"unicode":"🧑🏾❤️💋🧑🏽"},{"annotation":"kiss: person, person, medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FF","order":2670,"unicode":"🧑🏾❤️💋🧑🏿"},{"annotation":"kiss: person, person, dark skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FB","order":2672,"unicode":"🧑🏿❤️💋🧑🏻"},{"annotation":"kiss: person, person, dark skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FC","order":2674,"unicode":"🧑🏿❤️💋🧑🏼"},{"annotation":"kiss: person, person, dark skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FD","order":2676,"unicode":"🧑🏿❤️💋🧑🏽"},{"annotation":"kiss: person, person, dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FE","order":2678,"unicode":"🧑🏿❤️💋🧑🏾"}]},{"annotation":"kiss: woman, man","group":1,"hexcode":"1F469-200D-2764-FE0F-200D-1F48B-200D-1F468","order":2680,"tags":["couple","kiss","man","woman"],"unicode":"👩❤️💋👨","skins":[{"annotation":"kiss: woman, man, light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2682,"unicode":"👩🏻❤️💋👨🏻"},{"annotation":"kiss: woman, man, light skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2684,"unicode":"👩🏻❤️💋👨🏼"},{"annotation":"kiss: woman, man, light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2686,"unicode":"👩🏻❤️💋👨🏽"},{"annotation":"kiss: woman, man, light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2688,"unicode":"👩🏻❤️💋👨🏾"},{"annotation":"kiss: woman, man, light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2690,"unicode":"👩🏻❤️💋👨🏿"},{"annotation":"kiss: woman, man, medium-light skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2692,"unicode":"👩🏼❤️💋👨🏻"},{"annotation":"kiss: woman, man, medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2694,"unicode":"👩🏼❤️💋👨🏼"},{"annotation":"kiss: woman, man, medium-light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2696,"unicode":"👩🏼❤️💋👨🏽"},{"annotation":"kiss: woman, man, medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2698,"unicode":"👩🏼❤️💋👨🏾"},{"annotation":"kiss: woman, man, medium-light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2700,"unicode":"👩🏼❤️💋👨🏿"},{"annotation":"kiss: woman, man, medium skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2702,"unicode":"👩🏽❤️💋👨🏻"},{"annotation":"kiss: woman, man, medium skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2704,"unicode":"👩🏽❤️💋👨🏼"},{"annotation":"kiss: woman, man, medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2706,"unicode":"👩🏽❤️💋👨🏽"},{"annotation":"kiss: woman, man, medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2708,"unicode":"👩🏽❤️💋👨🏾"},{"annotation":"kiss: woman, man, medium skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2710,"unicode":"👩🏽❤️💋👨🏿"},{"annotation":"kiss: woman, man, medium-dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2712,"unicode":"👩🏾❤️💋👨🏻"},{"annotation":"kiss: woman, man, medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2714,"unicode":"👩🏾❤️💋👨🏼"},{"annotation":"kiss: woman, man, medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2716,"unicode":"👩🏾❤️💋👨🏽"},{"annotation":"kiss: woman, man, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2718,"unicode":"👩🏾❤️💋👨🏾"},{"annotation":"kiss: woman, man, medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2720,"unicode":"👩🏾❤️💋👨🏿"},{"annotation":"kiss: woman, man, dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2722,"unicode":"👩🏿❤️💋👨🏻"},{"annotation":"kiss: woman, man, dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2724,"unicode":"👩🏿❤️💋👨🏼"},{"annotation":"kiss: woman, man, dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2726,"unicode":"👩🏿❤️💋👨🏽"},{"annotation":"kiss: woman, man, dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2728,"unicode":"👩🏿❤️💋👨🏾"},{"annotation":"kiss: woman, man, dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2730,"unicode":"👩🏿❤️💋👨🏿"}]},{"annotation":"kiss: man, man","group":1,"hexcode":"1F468-200D-2764-FE0F-200D-1F48B-200D-1F468","order":2732,"tags":["couple","kiss","man"],"unicode":"👨❤️💋👨","skins":[{"annotation":"kiss: man, man, light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2734,"unicode":"👨🏻❤️💋👨🏻"},{"annotation":"kiss: man, man, light skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2736,"unicode":"👨🏻❤️💋👨🏼"},{"annotation":"kiss: man, man, light skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2738,"unicode":"👨🏻❤️💋👨🏽"},{"annotation":"kiss: man, man, light skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2740,"unicode":"👨🏻❤️💋👨🏾"},{"annotation":"kiss: man, man, light skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2742,"unicode":"👨🏻❤️💋👨🏿"},{"annotation":"kiss: man, man, medium-light skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2744,"unicode":"👨🏼❤️💋👨🏻"},{"annotation":"kiss: man, man, medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2746,"unicode":"👨🏼❤️💋👨🏼"},{"annotation":"kiss: man, man, medium-light skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2748,"unicode":"👨🏼❤️💋👨🏽"},{"annotation":"kiss: man, man, medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2750,"unicode":"👨🏼❤️💋👨🏾"},{"annotation":"kiss: man, man, medium-light skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2752,"unicode":"👨🏼❤️💋👨🏿"},{"annotation":"kiss: man, man, medium skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2754,"unicode":"👨🏽❤️💋👨🏻"},{"annotation":"kiss: man, man, medium skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2756,"unicode":"👨🏽❤️💋👨🏼"},{"annotation":"kiss: man, man, medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2758,"unicode":"👨🏽❤️💋👨🏽"},{"annotation":"kiss: man, man, medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2760,"unicode":"👨🏽❤️💋👨🏾"},{"annotation":"kiss: man, man, medium skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2762,"unicode":"👨🏽❤️💋👨🏿"},{"annotation":"kiss: man, man, medium-dark skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2764,"unicode":"👨🏾❤️💋👨🏻"},{"annotation":"kiss: man, man, medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2766,"unicode":"👨🏾❤️💋👨🏼"},{"annotation":"kiss: man, man, medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2768,"unicode":"👨🏾❤️💋👨🏽"},{"annotation":"kiss: man, man, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2770,"unicode":"👨🏾❤️💋👨🏾"},{"annotation":"kiss: man, man, medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2772,"unicode":"👨🏾❤️💋👨🏿"},{"annotation":"kiss: man, man, dark skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","order":2774,"unicode":"👨🏿❤️💋👨🏻"},{"annotation":"kiss: man, man, dark skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","order":2776,"unicode":"👨🏿❤️💋👨🏼"},{"annotation":"kiss: man, man, dark skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","order":2778,"unicode":"👨🏿❤️💋👨🏽"},{"annotation":"kiss: man, man, dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","order":2780,"unicode":"👨🏿❤️💋👨🏾"},{"annotation":"kiss: man, man, dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","order":2782,"unicode":"👨🏿❤️💋👨🏿"}]},{"annotation":"kiss: woman, woman","group":1,"hexcode":"1F469-200D-2764-FE0F-200D-1F48B-200D-1F469","order":2784,"tags":["couple","kiss","woman"],"unicode":"👩❤️💋👩","skins":[{"annotation":"kiss: woman, woman, light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","order":2786,"unicode":"👩🏻❤️💋👩🏻"},{"annotation":"kiss: woman, woman, light skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","order":2788,"unicode":"👩🏻❤️💋👩🏼"},{"annotation":"kiss: woman, woman, light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","order":2790,"unicode":"👩🏻❤️💋👩🏽"},{"annotation":"kiss: woman, woman, light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","order":2792,"unicode":"👩🏻❤️💋👩🏾"},{"annotation":"kiss: woman, woman, light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","order":2794,"unicode":"👩🏻❤️💋👩🏿"},{"annotation":"kiss: woman, woman, medium-light skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","order":2796,"unicode":"👩🏼❤️💋👩🏻"},{"annotation":"kiss: woman, woman, medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","order":2798,"unicode":"👩🏼❤️💋👩🏼"},{"annotation":"kiss: woman, woman, medium-light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","order":2800,"unicode":"👩🏼❤️💋👩🏽"},{"annotation":"kiss: woman, woman, medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","order":2802,"unicode":"👩🏼❤️💋👩🏾"},{"annotation":"kiss: woman, woman, medium-light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","order":2804,"unicode":"👩🏼❤️💋👩🏿"},{"annotation":"kiss: woman, woman, medium skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","order":2806,"unicode":"👩🏽❤️💋👩🏻"},{"annotation":"kiss: woman, woman, medium skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","order":2808,"unicode":"👩🏽❤️💋👩🏼"},{"annotation":"kiss: woman, woman, medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","order":2810,"unicode":"👩🏽❤️💋👩🏽"},{"annotation":"kiss: woman, woman, medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","order":2812,"unicode":"👩🏽❤️💋👩🏾"},{"annotation":"kiss: woman, woman, medium skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","order":2814,"unicode":"👩🏽❤️💋👩🏿"},{"annotation":"kiss: woman, woman, medium-dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","order":2816,"unicode":"👩🏾❤️💋👩🏻"},{"annotation":"kiss: woman, woman, medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","order":2818,"unicode":"👩🏾❤️💋👩🏼"},{"annotation":"kiss: woman, woman, medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","order":2820,"unicode":"👩🏾❤️💋👩🏽"},{"annotation":"kiss: woman, woman, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","order":2822,"unicode":"👩🏾❤️💋👩🏾"},{"annotation":"kiss: woman, woman, medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","order":2824,"unicode":"👩🏾❤️💋👩🏿"},{"annotation":"kiss: woman, woman, dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","order":2826,"unicode":"👩🏿❤️💋👩🏻"},{"annotation":"kiss: woman, woman, dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","order":2828,"unicode":"👩🏿❤️💋👩🏼"},{"annotation":"kiss: woman, woman, dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","order":2830,"unicode":"👩🏿❤️💋👩🏽"},{"annotation":"kiss: woman, woman, dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","order":2832,"unicode":"👩🏿❤️💋👩🏾"},{"annotation":"kiss: woman, woman, dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","order":2834,"unicode":"👩🏿❤️💋👩🏿"}]},{"annotation":"couple with heart","group":1,"hexcode":"1F491","order":2836,"tags":["couple","love"],"unicode":"💑","skins":[{"annotation":"couple with heart: light skin tone","group":1,"hexcode":"1F491-1F3FB","order":2837,"unicode":"💑🏻"},{"annotation":"couple with heart: medium-light skin tone","group":1,"hexcode":"1F491-1F3FC","order":2838,"unicode":"💑🏼"},{"annotation":"couple with heart: medium skin tone","group":1,"hexcode":"1F491-1F3FD","order":2839,"unicode":"💑🏽"},{"annotation":"couple with heart: medium-dark skin tone","group":1,"hexcode":"1F491-1F3FE","order":2840,"unicode":"💑🏾"},{"annotation":"couple with heart: dark skin tone","group":1,"hexcode":"1F491-1F3FF","order":2841,"unicode":"💑🏿"},{"annotation":"couple with heart: person, person, light skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F9D1-1F3FC","order":2842,"unicode":"🧑🏻❤️🧑🏼"},{"annotation":"couple with heart: person, person, light skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F9D1-1F3FD","order":2844,"unicode":"🧑🏻❤️🧑🏽"},{"annotation":"couple with heart: person, person, light skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F9D1-1F3FE","order":2846,"unicode":"🧑🏻❤️🧑🏾"},{"annotation":"couple with heart: person, person, light skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F9D1-1F3FF","order":2848,"unicode":"🧑🏻❤️🧑🏿"},{"annotation":"couple with heart: person, person, medium-light skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F9D1-1F3FB","order":2850,"unicode":"🧑🏼❤️🧑🏻"},{"annotation":"couple with heart: person, person, medium-light skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F9D1-1F3FD","order":2852,"unicode":"🧑🏼❤️🧑🏽"},{"annotation":"couple with heart: person, person, medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F9D1-1F3FE","order":2854,"unicode":"🧑🏼❤️🧑🏾"},{"annotation":"couple with heart: person, person, medium-light skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F9D1-1F3FF","order":2856,"unicode":"🧑🏼❤️🧑🏿"},{"annotation":"couple with heart: person, person, medium skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F9D1-1F3FB","order":2858,"unicode":"🧑🏽❤️🧑🏻"},{"annotation":"couple with heart: person, person, medium skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F9D1-1F3FC","order":2860,"unicode":"🧑🏽❤️🧑🏼"},{"annotation":"couple with heart: person, person, medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F9D1-1F3FE","order":2862,"unicode":"🧑🏽❤️🧑🏾"},{"annotation":"couple with heart: person, person, medium skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F9D1-1F3FF","order":2864,"unicode":"🧑🏽❤️🧑🏿"},{"annotation":"couple with heart: person, person, medium-dark skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F9D1-1F3FB","order":2866,"unicode":"🧑🏾❤️🧑🏻"},{"annotation":"couple with heart: person, person, medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F9D1-1F3FC","order":2868,"unicode":"🧑🏾❤️🧑🏼"},{"annotation":"couple with heart: person, person, medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F9D1-1F3FD","order":2870,"unicode":"🧑🏾❤️🧑🏽"},{"annotation":"couple with heart: person, person, medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F9D1-1F3FF","order":2872,"unicode":"🧑🏾❤️🧑🏿"},{"annotation":"couple with heart: person, person, dark skin tone, light skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F9D1-1F3FB","order":2874,"unicode":"🧑🏿❤️🧑🏻"},{"annotation":"couple with heart: person, person, dark skin tone, medium-light skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F9D1-1F3FC","order":2876,"unicode":"🧑🏿❤️🧑🏼"},{"annotation":"couple with heart: person, person, dark skin tone, medium skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F9D1-1F3FD","order":2878,"unicode":"🧑🏿❤️🧑🏽"},{"annotation":"couple with heart: person, person, dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F9D1-1F3FE","order":2880,"unicode":"🧑🏿❤️🧑🏾"}]},{"annotation":"couple with heart: woman, man","group":1,"hexcode":"1F469-200D-2764-FE0F-200D-1F468","order":2882,"tags":["couple","couple with heart","love","man","woman"],"unicode":"👩❤️👨","skins":[{"annotation":"couple with heart: woman, man, light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FB","order":2884,"unicode":"👩🏻❤️👨🏻"},{"annotation":"couple with heart: woman, man, light skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FC","order":2886,"unicode":"👩🏻❤️👨🏼"},{"annotation":"couple with heart: woman, man, light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FD","order":2888,"unicode":"👩🏻❤️👨🏽"},{"annotation":"couple with heart: woman, man, light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FE","order":2890,"unicode":"👩🏻❤️👨🏾"},{"annotation":"couple with heart: woman, man, light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FF","order":2892,"unicode":"👩🏻❤️👨🏿"},{"annotation":"couple with heart: woman, man, medium-light skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FB","order":2894,"unicode":"👩🏼❤️👨🏻"},{"annotation":"couple with heart: woman, man, medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FC","order":2896,"unicode":"👩🏼❤️👨🏼"},{"annotation":"couple with heart: woman, man, medium-light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FD","order":2898,"unicode":"👩🏼❤️👨🏽"},{"annotation":"couple with heart: woman, man, medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FE","order":2900,"unicode":"👩🏼❤️👨🏾"},{"annotation":"couple with heart: woman, man, medium-light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FF","order":2902,"unicode":"👩🏼❤️👨🏿"},{"annotation":"couple with heart: woman, man, medium skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FB","order":2904,"unicode":"👩🏽❤️👨🏻"},{"annotation":"couple with heart: woman, man, medium skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FC","order":2906,"unicode":"👩🏽❤️👨🏼"},{"annotation":"couple with heart: woman, man, medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FD","order":2908,"unicode":"👩🏽❤️👨🏽"},{"annotation":"couple with heart: woman, man, medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FE","order":2910,"unicode":"👩🏽❤️👨🏾"},{"annotation":"couple with heart: woman, man, medium skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FF","order":2912,"unicode":"👩🏽❤️👨🏿"},{"annotation":"couple with heart: woman, man, medium-dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FB","order":2914,"unicode":"👩🏾❤️👨🏻"},{"annotation":"couple with heart: woman, man, medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FC","order":2916,"unicode":"👩🏾❤️👨🏼"},{"annotation":"couple with heart: woman, man, medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FD","order":2918,"unicode":"👩🏾❤️👨🏽"},{"annotation":"couple with heart: woman, man, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FE","order":2920,"unicode":"👩🏾❤️👨🏾"},{"annotation":"couple with heart: woman, man, medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FF","order":2922,"unicode":"👩🏾❤️👨🏿"},{"annotation":"couple with heart: woman, man, dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FB","order":2924,"unicode":"👩🏿❤️👨🏻"},{"annotation":"couple with heart: woman, man, dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FC","order":2926,"unicode":"👩🏿❤️👨🏼"},{"annotation":"couple with heart: woman, man, dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FD","order":2928,"unicode":"👩🏿❤️👨🏽"},{"annotation":"couple with heart: woman, man, dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FE","order":2930,"unicode":"👩🏿❤️👨🏾"},{"annotation":"couple with heart: woman, man, dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FF","order":2932,"unicode":"👩🏿❤️👨🏿"}]},{"annotation":"couple with heart: man, man","group":1,"hexcode":"1F468-200D-2764-FE0F-200D-1F468","order":2934,"tags":["couple","couple with heart","love","man"],"unicode":"👨❤️👨","skins":[{"annotation":"couple with heart: man, man, light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FB","order":2936,"unicode":"👨🏻❤️👨🏻"},{"annotation":"couple with heart: man, man, light skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FC","order":2938,"unicode":"👨🏻❤️👨🏼"},{"annotation":"couple with heart: man, man, light skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FD","order":2940,"unicode":"👨🏻❤️👨🏽"},{"annotation":"couple with heart: man, man, light skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FE","order":2942,"unicode":"👨🏻❤️👨🏾"},{"annotation":"couple with heart: man, man, light skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FF","order":2944,"unicode":"👨🏻❤️👨🏿"},{"annotation":"couple with heart: man, man, medium-light skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FB","order":2946,"unicode":"👨🏼❤️👨🏻"},{"annotation":"couple with heart: man, man, medium-light skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FC","order":2948,"unicode":"👨🏼❤️👨🏼"},{"annotation":"couple with heart: man, man, medium-light skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FD","order":2950,"unicode":"👨🏼❤️👨🏽"},{"annotation":"couple with heart: man, man, medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FE","order":2952,"unicode":"👨🏼❤️👨🏾"},{"annotation":"couple with heart: man, man, medium-light skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FF","order":2954,"unicode":"👨🏼❤️👨🏿"},{"annotation":"couple with heart: man, man, medium skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FB","order":2956,"unicode":"👨🏽❤️👨🏻"},{"annotation":"couple with heart: man, man, medium skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FC","order":2958,"unicode":"👨🏽❤️👨🏼"},{"annotation":"couple with heart: man, man, medium skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FD","order":2960,"unicode":"👨🏽❤️👨🏽"},{"annotation":"couple with heart: man, man, medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FE","order":2962,"unicode":"👨🏽❤️👨🏾"},{"annotation":"couple with heart: man, man, medium skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FF","order":2964,"unicode":"👨🏽❤️👨🏿"},{"annotation":"couple with heart: man, man, medium-dark skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FB","order":2966,"unicode":"👨🏾❤️👨🏻"},{"annotation":"couple with heart: man, man, medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FC","order":2968,"unicode":"👨🏾❤️👨🏼"},{"annotation":"couple with heart: man, man, medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FD","order":2970,"unicode":"👨🏾❤️👨🏽"},{"annotation":"couple with heart: man, man, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FE","order":2972,"unicode":"👨🏾❤️👨🏾"},{"annotation":"couple with heart: man, man, medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FF","order":2974,"unicode":"👨🏾❤️👨🏿"},{"annotation":"couple with heart: man, man, dark skin tone, light skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FB","order":2976,"unicode":"👨🏿❤️👨🏻"},{"annotation":"couple with heart: man, man, dark skin tone, medium-light skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FC","order":2978,"unicode":"👨🏿❤️👨🏼"},{"annotation":"couple with heart: man, man, dark skin tone, medium skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FD","order":2980,"unicode":"👨🏿❤️👨🏽"},{"annotation":"couple with heart: man, man, dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FE","order":2982,"unicode":"👨🏿❤️👨🏾"},{"annotation":"couple with heart: man, man, dark skin tone","group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FF","order":2984,"unicode":"👨🏿❤️👨🏿"}]},{"annotation":"couple with heart: woman, woman","group":1,"hexcode":"1F469-200D-2764-FE0F-200D-1F469","order":2986,"tags":["couple","couple with heart","love","woman"],"unicode":"👩❤️👩","skins":[{"annotation":"couple with heart: woman, woman, light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FB","order":2988,"unicode":"👩🏻❤️👩🏻"},{"annotation":"couple with heart: woman, woman, light skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FC","order":2990,"unicode":"👩🏻❤️👩🏼"},{"annotation":"couple with heart: woman, woman, light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FD","order":2992,"unicode":"👩🏻❤️👩🏽"},{"annotation":"couple with heart: woman, woman, light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FE","order":2994,"unicode":"👩🏻❤️👩🏾"},{"annotation":"couple with heart: woman, woman, light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FF","order":2996,"unicode":"👩🏻❤️👩🏿"},{"annotation":"couple with heart: woman, woman, medium-light skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FB","order":2998,"unicode":"👩🏼❤️👩🏻"},{"annotation":"couple with heart: woman, woman, medium-light skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FC","order":3000,"unicode":"👩🏼❤️👩🏼"},{"annotation":"couple with heart: woman, woman, medium-light skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FD","order":3002,"unicode":"👩🏼❤️👩🏽"},{"annotation":"couple with heart: woman, woman, medium-light skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FE","order":3004,"unicode":"👩🏼❤️👩🏾"},{"annotation":"couple with heart: woman, woman, medium-light skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FF","order":3006,"unicode":"👩🏼❤️👩🏿"},{"annotation":"couple with heart: woman, woman, medium skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FB","order":3008,"unicode":"👩🏽❤️👩🏻"},{"annotation":"couple with heart: woman, woman, medium skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FC","order":3010,"unicode":"👩🏽❤️👩🏼"},{"annotation":"couple with heart: woman, woman, medium skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FD","order":3012,"unicode":"👩🏽❤️👩🏽"},{"annotation":"couple with heart: woman, woman, medium skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FE","order":3014,"unicode":"👩🏽❤️👩🏾"},{"annotation":"couple with heart: woman, woman, medium skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FF","order":3016,"unicode":"👩🏽❤️👩🏿"},{"annotation":"couple with heart: woman, woman, medium-dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FB","order":3018,"unicode":"👩🏾❤️👩🏻"},{"annotation":"couple with heart: woman, woman, medium-dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FC","order":3020,"unicode":"👩🏾❤️👩🏼"},{"annotation":"couple with heart: woman, woman, medium-dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FD","order":3022,"unicode":"👩🏾❤️👩🏽"},{"annotation":"couple with heart: woman, woman, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FE","order":3024,"unicode":"👩🏾❤️👩🏾"},{"annotation":"couple with heart: woman, woman, medium-dark skin tone, dark skin tone","group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FF","order":3026,"unicode":"👩🏾❤️👩🏿"},{"annotation":"couple with heart: woman, woman, dark skin tone, light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FB","order":3028,"unicode":"👩🏿❤️👩🏻"},{"annotation":"couple with heart: woman, woman, dark skin tone, medium-light skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FC","order":3030,"unicode":"👩🏿❤️👩🏼"},{"annotation":"couple with heart: woman, woman, dark skin tone, medium skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FD","order":3032,"unicode":"👩🏿❤️👩🏽"},{"annotation":"couple with heart: woman, woman, dark skin tone, medium-dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FE","order":3034,"unicode":"👩🏿❤️👩🏾"},{"annotation":"couple with heart: woman, woman, dark skin tone","group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FF","order":3036,"unicode":"👩🏿❤️👩🏿"}]},{"annotation":"family","group":1,"hexcode":"1F46A","order":3038,"tags":["family"],"unicode":"👪️"},{"annotation":"family: man, woman, boy","group":1,"hexcode":"1F468-200D-1F469-200D-1F466","order":3039,"tags":["boy","family","man","woman"],"unicode":"👨👩👦"},{"annotation":"family: man, woman, girl","group":1,"hexcode":"1F468-200D-1F469-200D-1F467","order":3040,"tags":["family","girl","man","woman"],"unicode":"👨👩👧"},{"annotation":"family: man, woman, girl, boy","group":1,"hexcode":"1F468-200D-1F469-200D-1F467-200D-1F466","order":3041,"tags":["boy","family","girl","man","woman"],"unicode":"👨👩👧👦"},{"annotation":"family: man, woman, boy, boy","group":1,"hexcode":"1F468-200D-1F469-200D-1F466-200D-1F466","order":3042,"tags":["boy","family","man","woman"],"unicode":"👨👩👦👦"},{"annotation":"family: man, woman, girl, girl","group":1,"hexcode":"1F468-200D-1F469-200D-1F467-200D-1F467","order":3043,"tags":["family","girl","man","woman"],"unicode":"👨👩👧👧"},{"annotation":"family: man, man, boy","group":1,"hexcode":"1F468-200D-1F468-200D-1F466","order":3044,"tags":["boy","family","man"],"unicode":"👨👨👦"},{"annotation":"family: man, man, girl","group":1,"hexcode":"1F468-200D-1F468-200D-1F467","order":3045,"tags":["family","girl","man"],"unicode":"👨👨👧"},{"annotation":"family: man, man, girl, boy","group":1,"hexcode":"1F468-200D-1F468-200D-1F467-200D-1F466","order":3046,"tags":["boy","family","girl","man"],"unicode":"👨👨👧👦"},{"annotation":"family: man, man, boy, boy","group":1,"hexcode":"1F468-200D-1F468-200D-1F466-200D-1F466","order":3047,"tags":["boy","family","man"],"unicode":"👨👨👦👦"},{"annotation":"family: man, man, girl, girl","group":1,"hexcode":"1F468-200D-1F468-200D-1F467-200D-1F467","order":3048,"tags":["family","girl","man"],"unicode":"👨👨👧👧"},{"annotation":"family: woman, woman, boy","group":1,"hexcode":"1F469-200D-1F469-200D-1F466","order":3049,"tags":["boy","family","woman"],"unicode":"👩👩👦"},{"annotation":"family: woman, woman, girl","group":1,"hexcode":"1F469-200D-1F469-200D-1F467","order":3050,"tags":["family","girl","woman"],"unicode":"👩👩👧"},{"annotation":"family: woman, woman, girl, boy","group":1,"hexcode":"1F469-200D-1F469-200D-1F467-200D-1F466","order":3051,"tags":["boy","family","girl","woman"],"unicode":"👩👩👧👦"},{"annotation":"family: woman, woman, boy, boy","group":1,"hexcode":"1F469-200D-1F469-200D-1F466-200D-1F466","order":3052,"tags":["boy","family","woman"],"unicode":"👩👩👦👦"},{"annotation":"family: woman, woman, girl, girl","group":1,"hexcode":"1F469-200D-1F469-200D-1F467-200D-1F467","order":3053,"tags":["family","girl","woman"],"unicode":"👩👩👧👧"},{"annotation":"family: man, boy","group":1,"hexcode":"1F468-200D-1F466","order":3054,"tags":["boy","family","man"],"unicode":"👨👦"},{"annotation":"family: man, boy, boy","group":1,"hexcode":"1F468-200D-1F466-200D-1F466","order":3055,"tags":["boy","family","man"],"unicode":"👨👦👦"},{"annotation":"family: man, girl","group":1,"hexcode":"1F468-200D-1F467","order":3056,"tags":["family","girl","man"],"unicode":"👨👧"},{"annotation":"family: man, girl, boy","group":1,"hexcode":"1F468-200D-1F467-200D-1F466","order":3057,"tags":["boy","family","girl","man"],"unicode":"👨👧👦"},{"annotation":"family: man, girl, girl","group":1,"hexcode":"1F468-200D-1F467-200D-1F467","order":3058,"tags":["family","girl","man"],"unicode":"👨👧👧"},{"annotation":"family: woman, boy","group":1,"hexcode":"1F469-200D-1F466","order":3059,"tags":["boy","family","woman"],"unicode":"👩👦"},{"annotation":"family: woman, boy, boy","group":1,"hexcode":"1F469-200D-1F466-200D-1F466","order":3060,"tags":["boy","family","woman"],"unicode":"👩👦👦"},{"annotation":"family: woman, girl","group":1,"hexcode":"1F469-200D-1F467","order":3061,"tags":["family","girl","woman"],"unicode":"👩👧"},{"annotation":"family: woman, girl, boy","group":1,"hexcode":"1F469-200D-1F467-200D-1F466","order":3062,"tags":["boy","family","girl","woman"],"unicode":"👩👧👦"},{"annotation":"family: woman, girl, girl","group":1,"hexcode":"1F469-200D-1F467-200D-1F467","order":3063,"tags":["family","girl","woman"],"unicode":"👩👧👧"},{"annotation":"speaking head","group":1,"hexcode":"1F5E3","order":3065,"tags":["face","head","silhouette","speak","speaking"],"unicode":"🗣️"},{"annotation":"bust in silhouette","group":1,"hexcode":"1F464","order":3066,"tags":["bust","silhouette"],"unicode":"👤"},{"annotation":"busts in silhouette","group":1,"hexcode":"1F465","order":3067,"tags":["bust","silhouette"],"unicode":"👥"},{"annotation":"people hugging","group":1,"hexcode":"1FAC2","order":3068,"tags":["goodbye","hello","hug","thanks"],"unicode":"🫂"},{"annotation":"footprints","group":1,"hexcode":"1F463","order":3069,"tags":["clothing","footprint","print"],"unicode":"👣"},{"annotation":"light skin tone","group":2,"hexcode":"1F3FB","order":3070,"tags":["skin tone","type 1–2"],"unicode":"🏻"},{"annotation":"medium-light skin tone","group":2,"hexcode":"1F3FC","order":3071,"tags":["skin tone","type 3"],"unicode":"🏼"},{"annotation":"medium skin tone","group":2,"hexcode":"1F3FD","order":3072,"tags":["skin tone","type 4"],"unicode":"🏽"},{"annotation":"medium-dark skin tone","group":2,"hexcode":"1F3FE","order":3073,"tags":["skin tone","type 5"],"unicode":"🏾"},{"annotation":"dark skin tone","group":2,"hexcode":"1F3FF","order":3074,"tags":["skin tone","type 6"],"unicode":"🏿"},{"annotation":"red hair","group":2,"hexcode":"1F9B0","order":3075,"tags":["ginger","redhead"],"unicode":"🦰"},{"annotation":"curly hair","group":2,"hexcode":"1F9B1","order":3076,"tags":["afro","curly","ringlets"],"unicode":"🦱"},{"annotation":"white hair","group":2,"hexcode":"1F9B3","order":3077,"tags":["gray","hair","old","white"],"unicode":"🦳"},{"annotation":"bald","group":2,"hexcode":"1F9B2","order":3078,"tags":["chemotherapy","hairless","no hair","shaven"],"unicode":"🦲"},{"annotation":"monkey face","group":3,"hexcode":"1F435","order":3079,"tags":["face","monkey"],"unicode":"🐵"},{"annotation":"monkey","group":3,"hexcode":"1F412","order":3080,"tags":["monkey"],"unicode":"🐒"},{"annotation":"gorilla","group":3,"hexcode":"1F98D","order":3081,"tags":["gorilla"],"unicode":"🦍"},{"annotation":"orangutan","group":3,"hexcode":"1F9A7","order":3082,"tags":["ape"],"unicode":"🦧"},{"annotation":"dog face","group":3,"hexcode":"1F436","order":3083,"tags":["dog","face","pet"],"unicode":"🐶"},{"annotation":"dog","group":3,"hexcode":"1F415","order":3084,"tags":["pet"],"unicode":"🐕️"},{"annotation":"guide dog","group":3,"hexcode":"1F9AE","order":3085,"tags":["accessibility","blind","guide"],"unicode":"🦮"},{"annotation":"service dog","group":3,"hexcode":"1F415-200D-1F9BA","order":3086,"tags":["accessibility","assistance","dog","service"],"unicode":"🐕🦺"},{"annotation":"poodle","group":3,"hexcode":"1F429","order":3087,"tags":["dog"],"unicode":"🐩"},{"annotation":"wolf","group":3,"hexcode":"1F43A","order":3088,"tags":["face"],"unicode":"🐺"},{"annotation":"fox","group":3,"hexcode":"1F98A","order":3089,"tags":["face"],"unicode":"🦊"},{"annotation":"raccoon","group":3,"hexcode":"1F99D","order":3090,"tags":["curious","sly"],"unicode":"🦝"},{"annotation":"cat face","group":3,"hexcode":"1F431","order":3091,"tags":["cat","face","pet"],"unicode":"🐱"},{"annotation":"cat","group":3,"hexcode":"1F408","order":3092,"tags":["pet"],"unicode":"🐈️"},{"annotation":"black cat","group":3,"hexcode":"1F408-200D-2B1B","order":3093,"tags":["black","cat","unlucky"],"unicode":"🐈⬛"},{"annotation":"lion","group":3,"hexcode":"1F981","order":3094,"tags":["face","leo","zodiac"],"unicode":"🦁"},{"annotation":"tiger face","group":3,"hexcode":"1F42F","order":3095,"tags":["face","tiger"],"unicode":"🐯"},{"annotation":"tiger","group":3,"hexcode":"1F405","order":3096,"tags":["tiger"],"unicode":"🐅"},{"annotation":"leopard","group":3,"hexcode":"1F406","order":3097,"tags":["leopard"],"unicode":"🐆"},{"annotation":"horse face","group":3,"hexcode":"1F434","order":3098,"tags":["face","horse"],"unicode":"🐴"},{"annotation":"horse","group":3,"hexcode":"1F40E","order":3099,"tags":["equestrian","racehorse","racing"],"unicode":"🐎"},{"annotation":"unicorn","group":3,"hexcode":"1F984","order":3100,"tags":["face"],"unicode":"🦄"},{"annotation":"zebra","group":3,"hexcode":"1F993","order":3101,"tags":["stripe"],"unicode":"🦓"},{"annotation":"deer","group":3,"hexcode":"1F98C","order":3102,"tags":["deer"],"unicode":"🦌"},{"annotation":"bison","group":3,"hexcode":"1F9AC","order":3103,"tags":["buffalo","herd","wisent"],"unicode":"🦬"},{"annotation":"cow face","group":3,"hexcode":"1F42E","order":3104,"tags":["cow","face"],"unicode":"🐮"},{"annotation":"ox","group":3,"hexcode":"1F402","order":3105,"tags":["bull","taurus","zodiac"],"unicode":"🐂"},{"annotation":"water buffalo","group":3,"hexcode":"1F403","order":3106,"tags":["buffalo","water"],"unicode":"🐃"},{"annotation":"cow","group":3,"hexcode":"1F404","order":3107,"tags":["cow"],"unicode":"🐄"},{"annotation":"pig face","group":3,"hexcode":"1F437","order":3108,"tags":["face","pig"],"unicode":"🐷"},{"annotation":"pig","group":3,"hexcode":"1F416","order":3109,"tags":["sow"],"unicode":"🐖"},{"annotation":"boar","group":3,"hexcode":"1F417","order":3110,"tags":["pig"],"unicode":"🐗"},{"annotation":"pig nose","group":3,"hexcode":"1F43D","order":3111,"tags":["face","nose","pig"],"unicode":"🐽"},{"annotation":"ram","group":3,"hexcode":"1F40F","order":3112,"tags":["aries","male","sheep","zodiac"],"unicode":"🐏"},{"annotation":"ewe","group":3,"hexcode":"1F411","order":3113,"tags":["female","sheep"],"unicode":"🐑"},{"annotation":"goat","group":3,"hexcode":"1F410","order":3114,"tags":["capricorn","zodiac"],"unicode":"🐐"},{"annotation":"camel","group":3,"hexcode":"1F42A","order":3115,"tags":["dromedary","hump"],"unicode":"🐪"},{"annotation":"two-hump camel","group":3,"hexcode":"1F42B","order":3116,"tags":["bactrian","camel","hump"],"unicode":"🐫"},{"annotation":"llama","group":3,"hexcode":"1F999","order":3117,"tags":["alpaca","guanaco","vicuña","wool"],"unicode":"🦙"},{"annotation":"giraffe","group":3,"hexcode":"1F992","order":3118,"tags":["spots"],"unicode":"🦒"},{"annotation":"elephant","group":3,"hexcode":"1F418","order":3119,"tags":["elephant"],"unicode":"🐘"},{"annotation":"mammoth","group":3,"hexcode":"1F9A3","order":3120,"tags":["extinction","large","tusk","woolly"],"unicode":"🦣"},{"annotation":"rhinoceros","group":3,"hexcode":"1F98F","order":3121,"tags":["rhinoceros"],"unicode":"🦏"},{"annotation":"hippopotamus","group":3,"hexcode":"1F99B","order":3122,"tags":["hippo"],"unicode":"🦛"},{"annotation":"mouse face","group":3,"hexcode":"1F42D","order":3123,"tags":["face","mouse"],"unicode":"🐭"},{"annotation":"mouse","group":3,"hexcode":"1F401","order":3124,"tags":["mouse"],"unicode":"🐁"},{"annotation":"rat","group":3,"hexcode":"1F400","order":3125,"tags":["rat"],"unicode":"🐀"},{"annotation":"hamster","group":3,"hexcode":"1F439","order":3126,"tags":["face","pet"],"unicode":"🐹"},{"annotation":"rabbit face","group":3,"hexcode":"1F430","order":3127,"tags":["bunny","face","pet","rabbit"],"unicode":"🐰"},{"annotation":"rabbit","group":3,"hexcode":"1F407","order":3128,"tags":["bunny","pet"],"unicode":"🐇"},{"annotation":"chipmunk","group":3,"hexcode":"1F43F","order":3130,"tags":["squirrel"],"unicode":"🐿️"},{"annotation":"beaver","group":3,"hexcode":"1F9AB","order":3131,"tags":["dam"],"unicode":"🦫"},{"annotation":"hedgehog","group":3,"hexcode":"1F994","order":3132,"tags":["spiny"],"unicode":"🦔"},{"annotation":"bat","group":3,"hexcode":"1F987","order":3133,"tags":["vampire"],"unicode":"🦇"},{"annotation":"bear","group":3,"hexcode":"1F43B","order":3134,"tags":["face"],"unicode":"🐻"},{"annotation":"polar bear","group":3,"hexcode":"1F43B-200D-2744-FE0F","order":3135,"tags":["arctic","bear","white"],"unicode":"🐻❄️"},{"annotation":"koala","group":3,"hexcode":"1F428","order":3137,"tags":["bear"],"unicode":"🐨"},{"annotation":"panda","group":3,"hexcode":"1F43C","order":3138,"tags":["face"],"unicode":"🐼"},{"annotation":"sloth","group":3,"hexcode":"1F9A5","order":3139,"tags":["lazy","slow"],"unicode":"🦥"},{"annotation":"otter","group":3,"hexcode":"1F9A6","order":3140,"tags":["fishing","playful"],"unicode":"🦦"},{"annotation":"skunk","group":3,"hexcode":"1F9A8","order":3141,"tags":["stink"],"unicode":"🦨"},{"annotation":"kangaroo","group":3,"hexcode":"1F998","order":3142,"tags":["australia","joey","jump","marsupial"],"unicode":"🦘"},{"annotation":"badger","group":3,"hexcode":"1F9A1","order":3143,"tags":["honey badger","pester"],"unicode":"🦡"},{"annotation":"paw prints","group":3,"hexcode":"1F43E","order":3144,"tags":["feet","paw","print"],"unicode":"🐾"},{"annotation":"turkey","group":3,"hexcode":"1F983","order":3145,"tags":["bird"],"unicode":"🦃"},{"annotation":"chicken","group":3,"hexcode":"1F414","order":3146,"tags":["bird"],"unicode":"🐔"},{"annotation":"rooster","group":3,"hexcode":"1F413","order":3147,"tags":["bird"],"unicode":"🐓"},{"annotation":"hatching chick","group":3,"hexcode":"1F423","order":3148,"tags":["baby","bird","chick","hatching"],"unicode":"🐣"},{"annotation":"baby chick","group":3,"hexcode":"1F424","order":3149,"tags":["baby","bird","chick"],"unicode":"🐤"},{"annotation":"front-facing baby chick","group":3,"hexcode":"1F425","order":3150,"tags":["baby","bird","chick"],"unicode":"🐥"},{"annotation":"bird","group":3,"hexcode":"1F426","order":3151,"tags":["bird"],"unicode":"🐦️"},{"annotation":"penguin","group":3,"hexcode":"1F427","order":3152,"tags":["bird"],"unicode":"🐧"},{"annotation":"dove","group":3,"hexcode":"1F54A","order":3154,"tags":["bird","fly","peace"],"unicode":"🕊️"},{"annotation":"eagle","group":3,"hexcode":"1F985","order":3155,"tags":["bird"],"unicode":"🦅"},{"annotation":"duck","group":3,"hexcode":"1F986","order":3156,"tags":["bird"],"unicode":"🦆"},{"annotation":"swan","group":3,"hexcode":"1F9A2","order":3157,"tags":["bird","cygnet","ugly duckling"],"unicode":"🦢"},{"annotation":"owl","group":3,"hexcode":"1F989","order":3158,"tags":["bird","wise"],"unicode":"🦉"},{"annotation":"dodo","group":3,"hexcode":"1F9A4","order":3159,"tags":["extinction","large","mauritius"],"unicode":"🦤"},{"annotation":"feather","group":3,"hexcode":"1FAB6","order":3160,"tags":["bird","flight","light","plumage"],"unicode":"🪶"},{"annotation":"flamingo","group":3,"hexcode":"1F9A9","order":3161,"tags":["flamboyant","tropical"],"unicode":"🦩"},{"annotation":"peacock","group":3,"hexcode":"1F99A","order":3162,"tags":["bird","ostentatious","peahen","proud"],"unicode":"🦚"},{"annotation":"parrot","group":3,"hexcode":"1F99C","order":3163,"tags":["bird","pirate","talk"],"unicode":"🦜"},{"annotation":"frog","group":3,"hexcode":"1F438","order":3164,"tags":["face"],"unicode":"🐸"},{"annotation":"crocodile","group":3,"hexcode":"1F40A","order":3165,"tags":["crocodile"],"unicode":"🐊"},{"annotation":"turtle","group":3,"hexcode":"1F422","order":3166,"tags":["terrapin","tortoise"],"unicode":"🐢"},{"annotation":"lizard","group":3,"hexcode":"1F98E","order":3167,"tags":["reptile"],"unicode":"🦎"},{"annotation":"snake","group":3,"hexcode":"1F40D","order":3168,"tags":["bearer","ophiuchus","serpent","zodiac"],"unicode":"🐍"},{"annotation":"dragon face","group":3,"hexcode":"1F432","order":3169,"tags":["dragon","face","fairy tale"],"unicode":"🐲"},{"annotation":"dragon","group":3,"hexcode":"1F409","order":3170,"tags":["fairy tale"],"unicode":"🐉"},{"annotation":"sauropod","group":3,"hexcode":"1F995","order":3171,"tags":["brachiosaurus","brontosaurus","diplodocus"],"unicode":"🦕"},{"annotation":"T-Rex","group":3,"hexcode":"1F996","order":3172,"tags":["t-rex","tyrannosaurus rex"],"unicode":"🦖"},{"annotation":"spouting whale","group":3,"hexcode":"1F433","order":3173,"tags":["face","spouting","whale"],"unicode":"🐳"},{"annotation":"whale","group":3,"hexcode":"1F40B","order":3174,"tags":["whale"],"unicode":"🐋"},{"annotation":"dolphin","group":3,"hexcode":"1F42C","order":3175,"tags":["flipper"],"unicode":"🐬"},{"annotation":"seal","group":3,"hexcode":"1F9AD","order":3176,"tags":["sea lion"],"unicode":"🦭"},{"annotation":"fish","group":3,"hexcode":"1F41F","order":3177,"tags":["pisces","zodiac"],"unicode":"🐟️"},{"annotation":"tropical fish","group":3,"hexcode":"1F420","order":3178,"tags":["fish","tropical"],"unicode":"🐠"},{"annotation":"blowfish","group":3,"hexcode":"1F421","order":3179,"tags":["fish"],"unicode":"🐡"},{"annotation":"shark","group":3,"hexcode":"1F988","order":3180,"tags":["fish"],"unicode":"🦈"},{"annotation":"octopus","group":3,"hexcode":"1F419","order":3181,"tags":["octopus"],"unicode":"🐙"},{"annotation":"spiral shell","group":3,"hexcode":"1F41A","order":3182,"tags":["shell","spiral"],"unicode":"🐚"},{"annotation":"snail","group":3,"hexcode":"1F40C","order":3183,"tags":["snail"],"unicode":"🐌"},{"annotation":"butterfly","group":3,"hexcode":"1F98B","order":3184,"tags":["insect","pretty"],"unicode":"🦋"},{"annotation":"bug","group":3,"hexcode":"1F41B","order":3185,"tags":["insect"],"unicode":"🐛"},{"annotation":"ant","group":3,"hexcode":"1F41C","order":3186,"tags":["insect"],"unicode":"🐜"},{"annotation":"honeybee","group":3,"hexcode":"1F41D","order":3187,"tags":["bee","insect"],"unicode":"🐝"},{"annotation":"beetle","group":3,"hexcode":"1FAB2","order":3188,"tags":["bug","insect"],"unicode":"🪲"},{"annotation":"lady beetle","group":3,"hexcode":"1F41E","order":3189,"tags":["beetle","insect","ladybird","ladybug"],"unicode":"🐞"},{"annotation":"cricket","group":3,"hexcode":"1F997","order":3190,"tags":["grasshopper"],"unicode":"🦗"},{"annotation":"cockroach","group":3,"hexcode":"1FAB3","order":3191,"tags":["insect","pest","roach"],"unicode":"🪳"},{"annotation":"spider","group":3,"hexcode":"1F577","order":3193,"tags":["insect"],"unicode":"🕷️"},{"annotation":"spider web","group":3,"hexcode":"1F578","order":3195,"tags":["spider","web"],"unicode":"🕸️"},{"annotation":"scorpion","group":3,"hexcode":"1F982","order":3196,"tags":["scorpio","zodiac"],"unicode":"🦂"},{"annotation":"mosquito","group":3,"hexcode":"1F99F","order":3197,"tags":["disease","fever","malaria","pest","virus"],"unicode":"🦟"},{"annotation":"fly","group":3,"hexcode":"1FAB0","order":3198,"tags":["disease","maggot","pest","rotting"],"unicode":"🪰"},{"annotation":"worm","group":3,"hexcode":"1FAB1","order":3199,"tags":["annelid","earthworm","parasite"],"unicode":"🪱"},{"annotation":"microbe","group":3,"hexcode":"1F9A0","order":3200,"tags":["amoeba","bacteria","virus"],"unicode":"🦠"},{"annotation":"bouquet","group":3,"hexcode":"1F490","order":3201,"tags":["flower"],"unicode":"💐"},{"annotation":"cherry blossom","group":3,"hexcode":"1F338","order":3202,"tags":["blossom","cherry","flower"],"unicode":"🌸"},{"annotation":"white flower","group":3,"hexcode":"1F4AE","order":3203,"tags":["flower"],"unicode":"💮"},{"annotation":"rosette","group":3,"hexcode":"1F3F5","order":3205,"tags":["plant"],"unicode":"🏵️"},{"annotation":"rose","group":3,"hexcode":"1F339","order":3206,"tags":["flower"],"unicode":"🌹"},{"annotation":"wilted flower","group":3,"hexcode":"1F940","order":3207,"tags":["flower","wilted"],"unicode":"🥀"},{"annotation":"hibiscus","group":3,"hexcode":"1F33A","order":3208,"tags":["flower"],"unicode":"🌺"},{"annotation":"sunflower","group":3,"hexcode":"1F33B","order":3209,"tags":["flower","sun"],"unicode":"🌻"},{"annotation":"blossom","group":3,"hexcode":"1F33C","order":3210,"tags":["flower"],"unicode":"🌼"},{"annotation":"tulip","group":3,"hexcode":"1F337","order":3211,"tags":["flower"],"unicode":"🌷"},{"annotation":"seedling","group":3,"hexcode":"1F331","order":3212,"tags":["young"],"unicode":"🌱"},{"annotation":"potted plant","group":3,"hexcode":"1FAB4","order":3213,"tags":["boring","grow","house","nurturing","plant","useless"],"unicode":"🪴"},{"annotation":"evergreen tree","group":3,"hexcode":"1F332","order":3214,"tags":["tree"],"unicode":"🌲"},{"annotation":"deciduous tree","group":3,"hexcode":"1F333","order":3215,"tags":["deciduous","shedding","tree"],"unicode":"🌳"},{"annotation":"palm tree","group":3,"hexcode":"1F334","order":3216,"tags":["palm","tree"],"unicode":"🌴"},{"annotation":"cactus","group":3,"hexcode":"1F335","order":3217,"tags":["plant"],"unicode":"🌵"},{"annotation":"sheaf of rice","group":3,"hexcode":"1F33E","order":3218,"tags":["ear","grain","rice"],"unicode":"🌾"},{"annotation":"herb","group":3,"hexcode":"1F33F","order":3219,"tags":["leaf"],"unicode":"🌿"},{"annotation":"shamrock","group":3,"hexcode":"2618","order":3221,"tags":["plant"],"unicode":"☘️"},{"annotation":"four leaf clover","group":3,"hexcode":"1F340","order":3222,"tags":["4","clover","four","four-leaf clover","leaf"],"unicode":"🍀"},{"annotation":"maple leaf","group":3,"hexcode":"1F341","order":3223,"tags":["falling","leaf","maple"],"unicode":"🍁"},{"annotation":"fallen leaf","group":3,"hexcode":"1F342","order":3224,"tags":["falling","leaf"],"unicode":"🍂"},{"annotation":"leaf fluttering in wind","group":3,"hexcode":"1F343","order":3225,"tags":["blow","flutter","leaf","wind"],"unicode":"🍃"},{"annotation":"grapes","group":4,"hexcode":"1F347","order":3226,"tags":["fruit","grape"],"unicode":"🍇"},{"annotation":"melon","group":4,"hexcode":"1F348","order":3227,"tags":["fruit"],"unicode":"🍈"},{"annotation":"watermelon","group":4,"hexcode":"1F349","order":3228,"tags":["fruit"],"unicode":"🍉"},{"annotation":"tangerine","group":4,"hexcode":"1F34A","order":3229,"tags":["fruit","orange"],"unicode":"🍊"},{"annotation":"lemon","group":4,"hexcode":"1F34B","order":3230,"tags":["citrus","fruit"],"unicode":"🍋"},{"annotation":"banana","group":4,"hexcode":"1F34C","order":3231,"tags":["fruit"],"unicode":"🍌"},{"annotation":"pineapple","group":4,"hexcode":"1F34D","order":3232,"tags":["fruit"],"unicode":"🍍"},{"annotation":"mango","group":4,"hexcode":"1F96D","order":3233,"tags":["fruit","tropical"],"unicode":"🥭"},{"annotation":"red apple","group":4,"hexcode":"1F34E","order":3234,"tags":["apple","fruit","red"],"unicode":"🍎"},{"annotation":"green apple","group":4,"hexcode":"1F34F","order":3235,"tags":["apple","fruit","green"],"unicode":"🍏"},{"annotation":"pear","group":4,"hexcode":"1F350","order":3236,"tags":["fruit"],"unicode":"🍐"},{"annotation":"peach","group":4,"hexcode":"1F351","order":3237,"tags":["fruit"],"unicode":"🍑"},{"annotation":"cherries","group":4,"hexcode":"1F352","order":3238,"tags":["berries","cherry","fruit","red"],"unicode":"🍒"},{"annotation":"strawberry","group":4,"hexcode":"1F353","order":3239,"tags":["berry","fruit"],"unicode":"🍓"},{"annotation":"blueberries","group":4,"hexcode":"1FAD0","order":3240,"tags":["berry","bilberry","blue","blueberry"],"unicode":"🫐"},{"annotation":"kiwi fruit","group":4,"hexcode":"1F95D","order":3241,"tags":["food","fruit","kiwi"],"unicode":"🥝"},{"annotation":"tomato","group":4,"hexcode":"1F345","order":3242,"tags":["fruit","vegetable"],"unicode":"🍅"},{"annotation":"olive","group":4,"hexcode":"1FAD2","order":3243,"tags":["food"],"unicode":"🫒"},{"annotation":"coconut","group":4,"hexcode":"1F965","order":3244,"tags":["palm","piña colada"],"unicode":"🥥"},{"annotation":"avocado","group":4,"hexcode":"1F951","order":3245,"tags":["food","fruit"],"unicode":"🥑"},{"annotation":"eggplant","group":4,"hexcode":"1F346","order":3246,"tags":["aubergine","vegetable"],"unicode":"🍆"},{"annotation":"potato","group":4,"hexcode":"1F954","order":3247,"tags":["food","vegetable"],"unicode":"🥔"},{"annotation":"carrot","group":4,"hexcode":"1F955","order":3248,"tags":["food","vegetable"],"unicode":"🥕"},{"annotation":"ear of corn","group":4,"hexcode":"1F33D","order":3249,"tags":["corn","ear","maize","maze"],"unicode":"🌽"},{"annotation":"hot pepper","group":4,"hexcode":"1F336","order":3251,"tags":["hot","pepper"],"unicode":"🌶️"},{"annotation":"bell pepper","group":4,"hexcode":"1FAD1","order":3252,"tags":["capsicum","pepper","vegetable"],"unicode":"🫑"},{"annotation":"cucumber","group":4,"hexcode":"1F952","order":3253,"tags":["food","pickle","vegetable"],"unicode":"🥒"},{"annotation":"leafy green","group":4,"hexcode":"1F96C","order":3254,"tags":["bok choy","cabbage","kale","lettuce"],"unicode":"🥬"},{"annotation":"broccoli","group":4,"hexcode":"1F966","order":3255,"tags":["wild cabbage"],"unicode":"🥦"},{"annotation":"garlic","group":4,"hexcode":"1F9C4","order":3256,"tags":["flavoring"],"unicode":"🧄"},{"annotation":"onion","group":4,"hexcode":"1F9C5","order":3257,"tags":["flavoring"],"unicode":"🧅"},{"annotation":"mushroom","group":4,"hexcode":"1F344","order":3258,"tags":["toadstool"],"unicode":"🍄"},{"annotation":"peanuts","group":4,"hexcode":"1F95C","order":3259,"tags":["food","nut","peanut","vegetable"],"unicode":"🥜"},{"annotation":"chestnut","group":4,"hexcode":"1F330","order":3260,"tags":["plant"],"unicode":"🌰"},{"annotation":"bread","group":4,"hexcode":"1F35E","order":3261,"tags":["loaf"],"unicode":"🍞"},{"annotation":"croissant","group":4,"hexcode":"1F950","order":3262,"tags":["bread","breakfast","food","french","roll"],"unicode":"🥐"},{"annotation":"baguette bread","group":4,"hexcode":"1F956","order":3263,"tags":["baguette","bread","food","french"],"unicode":"🥖"},{"annotation":"flatbread","group":4,"hexcode":"1FAD3","order":3264,"tags":["arepa","lavash","naan","pita"],"unicode":"🫓"},{"annotation":"pretzel","group":4,"hexcode":"1F968","order":3265,"tags":["twisted"],"unicode":"🥨"},{"annotation":"bagel","group":4,"hexcode":"1F96F","order":3266,"tags":["bakery","breakfast","schmear"],"unicode":"🥯"},{"annotation":"pancakes","group":4,"hexcode":"1F95E","order":3267,"tags":["breakfast","crêpe","food","hotcake","pancake"],"unicode":"🥞"},{"annotation":"waffle","group":4,"hexcode":"1F9C7","order":3268,"tags":["breakfast","indecisive","iron"],"unicode":"🧇"},{"annotation":"cheese wedge","group":4,"hexcode":"1F9C0","order":3269,"tags":["cheese"],"unicode":"🧀"},{"annotation":"meat on bone","group":4,"hexcode":"1F356","order":3270,"tags":["bone","meat"],"unicode":"🍖"},{"annotation":"poultry leg","group":4,"hexcode":"1F357","order":3271,"tags":["bone","chicken","drumstick","leg","poultry"],"unicode":"🍗"},{"annotation":"cut of meat","group":4,"hexcode":"1F969","order":3272,"tags":["chop","lambchop","porkchop","steak"],"unicode":"🥩"},{"annotation":"bacon","group":4,"hexcode":"1F953","order":3273,"tags":["breakfast","food","meat"],"unicode":"🥓"},{"annotation":"hamburger","group":4,"hexcode":"1F354","order":3274,"tags":["burger"],"unicode":"🍔"},{"annotation":"french fries","group":4,"hexcode":"1F35F","order":3275,"tags":["french","fries"],"unicode":"🍟"},{"annotation":"pizza","group":4,"hexcode":"1F355","order":3276,"tags":["cheese","slice"],"unicode":"🍕"},{"annotation":"hot dog","group":4,"hexcode":"1F32D","order":3277,"tags":["frankfurter","hotdog","sausage"],"unicode":"🌭"},{"annotation":"sandwich","group":4,"hexcode":"1F96A","order":3278,"tags":["bread"],"unicode":"🥪"},{"annotation":"taco","group":4,"hexcode":"1F32E","order":3279,"tags":["mexican"],"unicode":"🌮"},{"annotation":"burrito","group":4,"hexcode":"1F32F","order":3280,"tags":["mexican","wrap"],"unicode":"🌯"},{"annotation":"tamale","group":4,"hexcode":"1FAD4","order":3281,"tags":["mexican","wrapped"],"unicode":"🫔"},{"annotation":"stuffed flatbread","group":4,"hexcode":"1F959","order":3282,"tags":["falafel","flatbread","food","gyro","kebab","stuffed"],"unicode":"🥙"},{"annotation":"falafel","group":4,"hexcode":"1F9C6","order":3283,"tags":["chickpea","meatball"],"unicode":"🧆"},{"annotation":"egg","group":4,"hexcode":"1F95A","order":3284,"tags":["breakfast","food"],"unicode":"🥚"},{"annotation":"cooking","group":4,"hexcode":"1F373","order":3285,"tags":["breakfast","egg","frying","pan"],"unicode":"🍳"},{"annotation":"shallow pan of food","group":4,"hexcode":"1F958","order":3286,"tags":["casserole","food","paella","pan","shallow"],"unicode":"🥘"},{"annotation":"pot of food","group":4,"hexcode":"1F372","order":3287,"tags":["pot","stew"],"unicode":"🍲"},{"annotation":"fondue","group":4,"hexcode":"1FAD5","order":3288,"tags":["cheese","chocolate","melted","pot","swiss"],"unicode":"🫕"},{"annotation":"bowl with spoon","group":4,"hexcode":"1F963","order":3289,"tags":["breakfast","cereal","congee"],"unicode":"🥣"},{"annotation":"green salad","group":4,"hexcode":"1F957","order":3290,"tags":["food","green","salad"],"unicode":"🥗"},{"annotation":"popcorn","group":4,"hexcode":"1F37F","order":3291,"tags":["popcorn"],"unicode":"🍿"},{"annotation":"butter","group":4,"hexcode":"1F9C8","order":3292,"tags":["dairy"],"unicode":"🧈"},{"annotation":"salt","group":4,"hexcode":"1F9C2","order":3293,"tags":["condiment","shaker"],"unicode":"🧂"},{"annotation":"canned food","group":4,"hexcode":"1F96B","order":3294,"tags":["can"],"unicode":"🥫"},{"annotation":"bento box","group":4,"hexcode":"1F371","order":3295,"tags":["bento","box"],"unicode":"🍱"},{"annotation":"rice cracker","group":4,"hexcode":"1F358","order":3296,"tags":["cracker","rice"],"unicode":"🍘"},{"annotation":"rice ball","group":4,"hexcode":"1F359","order":3297,"tags":["ball","japanese","rice"],"unicode":"🍙"},{"annotation":"cooked rice","group":4,"hexcode":"1F35A","order":3298,"tags":["cooked","rice"],"unicode":"🍚"},{"annotation":"curry rice","group":4,"hexcode":"1F35B","order":3299,"tags":["curry","rice"],"unicode":"🍛"},{"annotation":"steaming bowl","group":4,"hexcode":"1F35C","order":3300,"tags":["bowl","noodle","ramen","steaming"],"unicode":"🍜"},{"annotation":"spaghetti","group":4,"hexcode":"1F35D","order":3301,"tags":["pasta"],"unicode":"🍝"},{"annotation":"roasted sweet potato","group":4,"hexcode":"1F360","order":3302,"tags":["potato","roasted","sweet"],"unicode":"🍠"},{"annotation":"oden","group":4,"hexcode":"1F362","order":3303,"tags":["kebab","seafood","skewer","stick"],"unicode":"🍢"},{"annotation":"sushi","group":4,"hexcode":"1F363","order":3304,"tags":["sushi"],"unicode":"🍣"},{"annotation":"fried shrimp","group":4,"hexcode":"1F364","order":3305,"tags":["fried","prawn","shrimp","tempura"],"unicode":"🍤"},{"annotation":"fish cake with swirl","group":4,"hexcode":"1F365","order":3306,"tags":["cake","fish","pastry","swirl"],"unicode":"🍥"},{"annotation":"moon cake","group":4,"hexcode":"1F96E","order":3307,"tags":["autumn","festival","yuèbǐng"],"unicode":"🥮"},{"annotation":"dango","group":4,"hexcode":"1F361","order":3308,"tags":["dessert","japanese","skewer","stick","sweet"],"unicode":"🍡"},{"annotation":"dumpling","group":4,"hexcode":"1F95F","order":3309,"tags":["empanada","gyōza","jiaozi","pierogi","potsticker"],"unicode":"🥟"},{"annotation":"fortune cookie","group":4,"hexcode":"1F960","order":3310,"tags":["prophecy"],"unicode":"🥠"},{"annotation":"takeout box","group":4,"hexcode":"1F961","order":3311,"tags":["oyster pail"],"unicode":"🥡"},{"annotation":"crab","group":4,"hexcode":"1F980","order":3312,"tags":["cancer","zodiac"],"unicode":"🦀"},{"annotation":"lobster","group":4,"hexcode":"1F99E","order":3313,"tags":["bisque","claws","seafood"],"unicode":"🦞"},{"annotation":"shrimp","group":4,"hexcode":"1F990","order":3314,"tags":["food","shellfish","small"],"unicode":"🦐"},{"annotation":"squid","group":4,"hexcode":"1F991","order":3315,"tags":["food","molusc"],"unicode":"🦑"},{"annotation":"oyster","group":4,"hexcode":"1F9AA","order":3316,"tags":["diving","pearl"],"unicode":"🦪"},{"annotation":"soft ice cream","group":4,"hexcode":"1F366","order":3317,"tags":["cream","dessert","ice","icecream","soft","sweet"],"unicode":"🍦"},{"annotation":"shaved ice","group":4,"hexcode":"1F367","order":3318,"tags":["dessert","ice","shaved","sweet"],"unicode":"🍧"},{"annotation":"ice cream","group":4,"hexcode":"1F368","order":3319,"tags":["cream","dessert","ice","sweet"],"unicode":"🍨"},{"annotation":"doughnut","group":4,"hexcode":"1F369","order":3320,"tags":["breakfast","dessert","donut","sweet"],"unicode":"🍩"},{"annotation":"cookie","group":4,"hexcode":"1F36A","order":3321,"tags":["dessert","sweet"],"unicode":"🍪"},{"annotation":"birthday cake","group":4,"hexcode":"1F382","order":3322,"tags":["birthday","cake","celebration","dessert","pastry","sweet"],"unicode":"🎂"},{"annotation":"shortcake","group":4,"hexcode":"1F370","order":3323,"tags":["cake","dessert","pastry","slice","sweet"],"unicode":"🍰"},{"annotation":"cupcake","group":4,"hexcode":"1F9C1","order":3324,"tags":["bakery","sweet"],"unicode":"🧁"},{"annotation":"pie","group":4,"hexcode":"1F967","order":3325,"tags":["filling","pastry"],"unicode":"🥧"},{"annotation":"chocolate bar","group":4,"hexcode":"1F36B","order":3326,"tags":["bar","chocolate","dessert","sweet"],"unicode":"🍫"},{"annotation":"candy","group":4,"hexcode":"1F36C","order":3327,"tags":["dessert","sweet"],"unicode":"🍬"},{"annotation":"lollipop","group":4,"hexcode":"1F36D","order":3328,"tags":["candy","dessert","sweet"],"unicode":"🍭"},{"annotation":"custard","group":4,"hexcode":"1F36E","order":3329,"tags":["dessert","pudding","sweet"],"unicode":"🍮"},{"annotation":"honey pot","group":4,"hexcode":"1F36F","order":3330,"tags":["honey","honeypot","pot","sweet"],"unicode":"🍯"},{"annotation":"baby bottle","group":4,"hexcode":"1F37C","order":3331,"tags":["baby","bottle","drink","milk"],"unicode":"🍼"},{"annotation":"glass of milk","group":4,"hexcode":"1F95B","order":3332,"tags":["drink","glass","milk"],"unicode":"🥛"},{"annotation":"hot beverage","group":4,"hexcode":"2615","order":3333,"tags":["beverage","coffee","drink","hot","steaming","tea"],"unicode":"☕️"},{"annotation":"teapot","group":4,"hexcode":"1FAD6","order":3334,"tags":["drink","pot","tea"],"unicode":"🫖"},{"annotation":"teacup without handle","group":4,"hexcode":"1F375","order":3335,"tags":["beverage","cup","drink","tea","teacup"],"unicode":"🍵"},{"annotation":"sake","group":4,"hexcode":"1F376","order":3336,"tags":["bar","beverage","bottle","cup","drink"],"unicode":"🍶"},{"annotation":"bottle with popping cork","group":4,"hexcode":"1F37E","order":3337,"tags":["bar","bottle","cork","drink","popping"],"unicode":"🍾"},{"annotation":"wine glass","group":4,"hexcode":"1F377","order":3338,"tags":["bar","beverage","drink","glass","wine"],"unicode":"🍷"},{"annotation":"cocktail glass","group":4,"hexcode":"1F378","order":3339,"tags":["bar","cocktail","drink","glass"],"unicode":"🍸️"},{"annotation":"tropical drink","group":4,"hexcode":"1F379","order":3340,"tags":["bar","drink","tropical"],"unicode":"🍹"},{"annotation":"beer mug","group":4,"hexcode":"1F37A","order":3341,"tags":["bar","beer","drink","mug"],"unicode":"🍺"},{"annotation":"clinking beer mugs","group":4,"hexcode":"1F37B","order":3342,"tags":["bar","beer","clink","drink","mug"],"unicode":"🍻"},{"annotation":"clinking glasses","group":4,"hexcode":"1F942","order":3343,"tags":["celebrate","clink","drink","glass"],"unicode":"🥂"},{"annotation":"tumbler glass","group":4,"hexcode":"1F943","order":3344,"tags":["glass","liquor","shot","tumbler","whisky"],"unicode":"🥃"},{"annotation":"cup with straw","group":4,"hexcode":"1F964","order":3345,"tags":["juice","soda"],"unicode":"🥤"},{"annotation":"bubble tea","group":4,"hexcode":"1F9CB","order":3346,"tags":["bubble","milk","pearl","tea"],"unicode":"🧋"},{"annotation":"beverage box","group":4,"hexcode":"1F9C3","order":3347,"tags":["beverage","box","juice","straw","sweet"],"unicode":"🧃"},{"annotation":"mate","group":4,"hexcode":"1F9C9","order":3348,"tags":["drink"],"unicode":"🧉"},{"annotation":"ice","group":4,"hexcode":"1F9CA","order":3349,"tags":["cold","ice cube","iceberg"],"unicode":"🧊"},{"annotation":"chopsticks","group":4,"hexcode":"1F962","order":3350,"tags":["hashi"],"unicode":"🥢"},{"annotation":"fork and knife with plate","group":4,"hexcode":"1F37D","order":3352,"tags":["cooking","fork","knife","plate"],"unicode":"🍽️"},{"annotation":"fork and knife","group":4,"hexcode":"1F374","order":3353,"tags":["cooking","cutlery","fork","knife"],"unicode":"🍴"},{"annotation":"spoon","group":4,"hexcode":"1F944","order":3354,"tags":["tableware"],"unicode":"🥄"},{"annotation":"kitchen knife","group":4,"hexcode":"1F52A","order":3355,"tags":["cooking","hocho","knife","tool","weapon"],"unicode":"🔪"},{"annotation":"amphora","group":4,"hexcode":"1F3FA","order":3356,"tags":["aquarius","cooking","drink","jug","zodiac"],"unicode":"🏺"},{"annotation":"globe showing Europe-Africa","group":5,"hexcode":"1F30D","order":3357,"tags":["africa","earth","europe","globe","globe showing europe-africa","world"],"unicode":"🌍️"},{"annotation":"globe showing Americas","group":5,"hexcode":"1F30E","order":3358,"tags":["americas","earth","globe","globe showing americas","world"],"unicode":"🌎️"},{"annotation":"globe showing Asia-Australia","group":5,"hexcode":"1F30F","order":3359,"tags":["asia","australia","earth","globe","globe showing asia-australia","world"],"unicode":"🌏️"},{"annotation":"globe with meridians","group":5,"hexcode":"1F310","order":3360,"tags":["earth","globe","meridians","world"],"unicode":"🌐"},{"annotation":"world map","group":5,"hexcode":"1F5FA","order":3362,"tags":["map","world"],"unicode":"🗺️"},{"annotation":"map of Japan","group":5,"hexcode":"1F5FE","order":3363,"tags":["japan","map","map of japan"],"unicode":"🗾"},{"annotation":"compass","group":5,"hexcode":"1F9ED","order":3364,"tags":["magnetic","navigation","orienteering"],"unicode":"🧭"},{"annotation":"snow-capped mountain","group":5,"hexcode":"1F3D4","order":3366,"tags":["cold","mountain","snow"],"unicode":"🏔️"},{"annotation":"mountain","group":5,"hexcode":"26F0","order":3368,"tags":["mountain"],"unicode":"⛰️"},{"annotation":"volcano","group":5,"hexcode":"1F30B","order":3369,"tags":["eruption","mountain"],"unicode":"🌋"},{"annotation":"mount fuji","group":5,"hexcode":"1F5FB","order":3370,"tags":["fuji","mountain"],"unicode":"🗻"},{"annotation":"camping","group":5,"hexcode":"1F3D5","order":3372,"tags":["camping"],"unicode":"🏕️"},{"annotation":"beach with umbrella","group":5,"hexcode":"1F3D6","order":3374,"tags":["beach","umbrella"],"unicode":"🏖️"},{"annotation":"desert","group":5,"hexcode":"1F3DC","order":3376,"tags":["desert"],"unicode":"🏜️"},{"annotation":"desert island","group":5,"hexcode":"1F3DD","order":3378,"tags":["desert","island"],"unicode":"🏝️"},{"annotation":"national park","group":5,"hexcode":"1F3DE","order":3380,"tags":["park"],"unicode":"🏞️"},{"annotation":"stadium","group":5,"hexcode":"1F3DF","order":3382,"tags":["stadium"],"unicode":"🏟️"},{"annotation":"classical building","group":5,"hexcode":"1F3DB","order":3384,"tags":["classical"],"unicode":"🏛️"},{"annotation":"building construction","group":5,"hexcode":"1F3D7","order":3386,"tags":["construction"],"unicode":"🏗️"},{"annotation":"brick","group":5,"hexcode":"1F9F1","order":3387,"tags":["bricks","clay","mortar","wall"],"unicode":"🧱"},{"annotation":"rock","group":5,"hexcode":"1FAA8","order":3388,"tags":["boulder","heavy","solid","stone"],"unicode":"🪨"},{"annotation":"wood","group":5,"hexcode":"1FAB5","order":3389,"tags":["log","lumber","timber"],"unicode":"🪵"},{"annotation":"hut","group":5,"hexcode":"1F6D6","order":3390,"tags":["house","roundhouse","yurt"],"unicode":"🛖"},{"annotation":"houses","group":5,"hexcode":"1F3D8","order":3392,"tags":["houses"],"unicode":"🏘️"},{"annotation":"derelict house","group":5,"hexcode":"1F3DA","order":3394,"tags":["derelict","house"],"unicode":"🏚️"},{"annotation":"house","group":5,"hexcode":"1F3E0","order":3395,"tags":["home"],"unicode":"🏠️"},{"annotation":"house with garden","group":5,"hexcode":"1F3E1","order":3396,"tags":["garden","home","house"],"unicode":"🏡"},{"annotation":"office building","group":5,"hexcode":"1F3E2","order":3397,"tags":["building"],"unicode":"🏢"},{"annotation":"Japanese post office","group":5,"hexcode":"1F3E3","order":3398,"tags":["japanese","japanese post office","post"],"unicode":"🏣"},{"annotation":"post office","group":5,"hexcode":"1F3E4","order":3399,"tags":["european","post"],"unicode":"🏤"},{"annotation":"hospital","group":5,"hexcode":"1F3E5","order":3400,"tags":["doctor","medicine"],"unicode":"🏥"},{"annotation":"bank","group":5,"hexcode":"1F3E6","order":3401,"tags":["building"],"unicode":"🏦"},{"annotation":"hotel","group":5,"hexcode":"1F3E8","order":3402,"tags":["building"],"unicode":"🏨"},{"annotation":"love hotel","group":5,"hexcode":"1F3E9","order":3403,"tags":["hotel","love"],"unicode":"🏩"},{"annotation":"convenience store","group":5,"hexcode":"1F3EA","order":3404,"tags":["convenience","store"],"unicode":"🏪"},{"annotation":"school","group":5,"hexcode":"1F3EB","order":3405,"tags":["building"],"unicode":"🏫"},{"annotation":"department store","group":5,"hexcode":"1F3EC","order":3406,"tags":["department","store"],"unicode":"🏬"},{"annotation":"factory","group":5,"hexcode":"1F3ED","order":3407,"tags":["building"],"unicode":"🏭️"},{"annotation":"Japanese castle","group":5,"hexcode":"1F3EF","order":3408,"tags":["castle","japanese"],"unicode":"🏯"},{"annotation":"castle","group":5,"hexcode":"1F3F0","order":3409,"tags":["european"],"unicode":"🏰"},{"annotation":"wedding","group":5,"hexcode":"1F492","order":3410,"tags":["chapel","romance"],"unicode":"💒"},{"annotation":"Tokyo tower","group":5,"hexcode":"1F5FC","order":3411,"tags":["tokyo","tower"],"unicode":"🗼"},{"annotation":"Statue of Liberty","group":5,"hexcode":"1F5FD","order":3412,"tags":["liberty","statue","statue of liberty"],"unicode":"🗽"},{"annotation":"church","group":5,"hexcode":"26EA","order":3413,"tags":["christian","cross","religion"],"unicode":"⛪️"},{"annotation":"mosque","group":5,"hexcode":"1F54C","order":3414,"tags":["islam","muslim","religion"],"unicode":"🕌"},{"annotation":"hindu temple","group":5,"hexcode":"1F6D5","order":3415,"tags":["hindu","temple"],"unicode":"🛕"},{"annotation":"synagogue","group":5,"hexcode":"1F54D","order":3416,"tags":["jew","jewish","religion","temple"],"unicode":"🕍"},{"annotation":"shinto shrine","group":5,"hexcode":"26E9","order":3418,"tags":["religion","shinto","shrine"],"unicode":"⛩️"},{"annotation":"kaaba","group":5,"hexcode":"1F54B","order":3419,"tags":["islam","muslim","religion"],"unicode":"🕋"},{"annotation":"fountain","group":5,"hexcode":"26F2","order":3420,"tags":["fountain"],"unicode":"⛲️"},{"annotation":"tent","group":5,"hexcode":"26FA","order":3421,"tags":["camping"],"unicode":"⛺️"},{"annotation":"foggy","group":5,"hexcode":"1F301","order":3422,"tags":["fog"],"unicode":"🌁"},{"annotation":"night with stars","group":5,"hexcode":"1F303","order":3423,"tags":["night","star"],"unicode":"🌃"},{"annotation":"cityscape","group":5,"hexcode":"1F3D9","order":3425,"tags":["city"],"unicode":"🏙️"},{"annotation":"sunrise over mountains","group":5,"hexcode":"1F304","order":3426,"tags":["morning","mountain","sun","sunrise"],"unicode":"🌄"},{"annotation":"sunrise","group":5,"hexcode":"1F305","order":3427,"tags":["morning","sun"],"unicode":"🌅"},{"annotation":"cityscape at dusk","group":5,"hexcode":"1F306","order":3428,"tags":["city","dusk","evening","landscape","sunset"],"unicode":"🌆"},{"annotation":"sunset","group":5,"hexcode":"1F307","order":3429,"tags":["dusk","sun"],"unicode":"🌇"},{"annotation":"bridge at night","group":5,"hexcode":"1F309","order":3430,"tags":["bridge","night"],"unicode":"🌉"},{"annotation":"hot springs","group":5,"hexcode":"2668","order":3432,"tags":["hot","hotsprings","springs","steaming"],"unicode":"♨️"},{"annotation":"carousel horse","group":5,"hexcode":"1F3A0","order":3433,"tags":["carousel","horse"],"unicode":"🎠"},{"annotation":"ferris wheel","group":5,"hexcode":"1F3A1","order":3434,"tags":["amusement park","ferris","wheel"],"unicode":"🎡"},{"annotation":"roller coaster","group":5,"hexcode":"1F3A2","order":3435,"tags":["amusement park","coaster","roller"],"unicode":"🎢"},{"annotation":"barber pole","group":5,"hexcode":"1F488","order":3436,"tags":["barber","haircut","pole"],"unicode":"💈"},{"annotation":"circus tent","group":5,"hexcode":"1F3AA","order":3437,"tags":["circus","tent"],"unicode":"🎪"},{"annotation":"locomotive","group":5,"hexcode":"1F682","order":3438,"tags":["engine","railway","steam","train"],"unicode":"🚂"},{"annotation":"railway car","group":5,"hexcode":"1F683","order":3439,"tags":["car","electric","railway","train","tram","trolleybus"],"unicode":"🚃"},{"annotation":"high-speed train","group":5,"hexcode":"1F684","order":3440,"tags":["railway","shinkansen","speed","train"],"unicode":"🚄"},{"annotation":"bullet train","group":5,"hexcode":"1F685","order":3441,"tags":["bullet","railway","shinkansen","speed","train"],"unicode":"🚅"},{"annotation":"train","group":5,"hexcode":"1F686","order":3442,"tags":["railway"],"unicode":"🚆"},{"annotation":"metro","group":5,"hexcode":"1F687","order":3443,"tags":["subway"],"unicode":"🚇️"},{"annotation":"light rail","group":5,"hexcode":"1F688","order":3444,"tags":["railway"],"unicode":"🚈"},{"annotation":"station","group":5,"hexcode":"1F689","order":3445,"tags":["railway","train"],"unicode":"🚉"},{"annotation":"tram","group":5,"hexcode":"1F68A","order":3446,"tags":["trolleybus"],"unicode":"🚊"},{"annotation":"monorail","group":5,"hexcode":"1F69D","order":3447,"tags":["vehicle"],"unicode":"🚝"},{"annotation":"mountain railway","group":5,"hexcode":"1F69E","order":3448,"tags":["car","mountain","railway"],"unicode":"🚞"},{"annotation":"tram car","group":5,"hexcode":"1F68B","order":3449,"tags":["car","tram","trolleybus"],"unicode":"🚋"},{"annotation":"bus","group":5,"hexcode":"1F68C","order":3450,"tags":["vehicle"],"unicode":"🚌"},{"annotation":"oncoming bus","group":5,"hexcode":"1F68D","order":3451,"tags":["bus","oncoming"],"unicode":"🚍️"},{"annotation":"trolleybus","group":5,"hexcode":"1F68E","order":3452,"tags":["bus","tram","trolley"],"unicode":"🚎"},{"annotation":"minibus","group":5,"hexcode":"1F690","order":3453,"tags":["bus"],"unicode":"🚐"},{"annotation":"ambulance","group":5,"hexcode":"1F691","order":3454,"tags":["vehicle"],"unicode":"🚑️"},{"annotation":"fire engine","group":5,"hexcode":"1F692","order":3455,"tags":["engine","fire","truck"],"unicode":"🚒"},{"annotation":"police car","group":5,"hexcode":"1F693","order":3456,"tags":["car","patrol","police"],"unicode":"🚓"},{"annotation":"oncoming police car","group":5,"hexcode":"1F694","order":3457,"tags":["car","oncoming","police"],"unicode":"🚔️"},{"annotation":"taxi","group":5,"hexcode":"1F695","order":3458,"tags":["vehicle"],"unicode":"🚕"},{"annotation":"oncoming taxi","group":5,"hexcode":"1F696","order":3459,"tags":["oncoming","taxi"],"unicode":"🚖"},{"annotation":"automobile","group":5,"hexcode":"1F697","order":3460,"tags":["car"],"unicode":"🚗"},{"annotation":"oncoming automobile","group":5,"hexcode":"1F698","order":3461,"tags":["automobile","car","oncoming"],"unicode":"🚘️"},{"annotation":"sport utility vehicle","group":5,"hexcode":"1F699","order":3462,"tags":["recreational","sport utility"],"unicode":"🚙"},{"annotation":"pickup truck","group":5,"hexcode":"1F6FB","order":3463,"tags":["pick-up","pickup","truck"],"unicode":"🛻"},{"annotation":"delivery truck","group":5,"hexcode":"1F69A","order":3464,"tags":["delivery","truck"],"unicode":"🚚"},{"annotation":"articulated lorry","group":5,"hexcode":"1F69B","order":3465,"tags":["lorry","semi","truck"],"unicode":"🚛"},{"annotation":"tractor","group":5,"hexcode":"1F69C","order":3466,"tags":["vehicle"],"unicode":"🚜"},{"annotation":"racing car","group":5,"hexcode":"1F3CE","order":3468,"tags":["car","racing"],"unicode":"🏎️"},{"annotation":"motorcycle","group":5,"hexcode":"1F3CD","order":3470,"tags":["racing"],"unicode":"🏍️"},{"annotation":"motor scooter","group":5,"hexcode":"1F6F5","order":3471,"tags":["motor","scooter"],"unicode":"🛵"},{"annotation":"manual wheelchair","group":5,"hexcode":"1F9BD","order":3472,"tags":["accessibility"],"unicode":"🦽"},{"annotation":"motorized wheelchair","group":5,"hexcode":"1F9BC","order":3473,"tags":["accessibility"],"unicode":"🦼"},{"annotation":"auto rickshaw","group":5,"hexcode":"1F6FA","order":3474,"tags":["tuk tuk"],"unicode":"🛺"},{"annotation":"bicycle","group":5,"hexcode":"1F6B2","order":3475,"tags":["bike"],"unicode":"🚲️"},{"annotation":"kick scooter","group":5,"hexcode":"1F6F4","order":3476,"tags":["kick","scooter"],"unicode":"🛴"},{"annotation":"skateboard","group":5,"hexcode":"1F6F9","order":3477,"tags":["board"],"unicode":"🛹"},{"annotation":"roller skate","group":5,"hexcode":"1F6FC","order":3478,"tags":["roller","skate"],"unicode":"🛼"},{"annotation":"bus stop","group":5,"hexcode":"1F68F","order":3479,"tags":["bus","busstop","stop"],"unicode":"🚏"},{"annotation":"motorway","group":5,"hexcode":"1F6E3","order":3481,"tags":["highway","road"],"unicode":"🛣️"},{"annotation":"railway track","group":5,"hexcode":"1F6E4","order":3483,"tags":["railway","train"],"unicode":"🛤️"},{"annotation":"oil drum","group":5,"hexcode":"1F6E2","order":3485,"tags":["drum","oil"],"unicode":"🛢️"},{"annotation":"fuel pump","group":5,"hexcode":"26FD","order":3486,"tags":["diesel","fuel","fuelpump","gas","pump","station"],"unicode":"⛽️"},{"annotation":"police car light","group":5,"hexcode":"1F6A8","order":3487,"tags":["beacon","car","light","police","revolving"],"unicode":"🚨"},{"annotation":"horizontal traffic light","group":5,"hexcode":"1F6A5","order":3488,"tags":["light","signal","traffic"],"unicode":"🚥"},{"annotation":"vertical traffic light","group":5,"hexcode":"1F6A6","order":3489,"tags":["light","signal","traffic"],"unicode":"🚦"},{"annotation":"stop sign","group":5,"hexcode":"1F6D1","order":3490,"tags":["octagonal","sign","stop"],"unicode":"🛑"},{"annotation":"construction","group":5,"hexcode":"1F6A7","order":3491,"tags":["barrier"],"unicode":"🚧"},{"annotation":"anchor","group":5,"hexcode":"2693","order":3492,"tags":["ship","tool"],"unicode":"⚓️"},{"annotation":"sailboat","group":5,"hexcode":"26F5","order":3493,"tags":["boat","resort","sea","yacht"],"unicode":"⛵️"},{"annotation":"canoe","group":5,"hexcode":"1F6F6","order":3494,"tags":["boat"],"unicode":"🛶"},{"annotation":"speedboat","group":5,"hexcode":"1F6A4","order":3495,"tags":["boat"],"unicode":"🚤"},{"annotation":"passenger ship","group":5,"hexcode":"1F6F3","order":3497,"tags":["passenger","ship"],"unicode":"🛳️"},{"annotation":"ferry","group":5,"hexcode":"26F4","order":3499,"tags":["boat","passenger"],"unicode":"⛴️"},{"annotation":"motor boat","group":5,"hexcode":"1F6E5","order":3501,"tags":["boat","motorboat"],"unicode":"🛥️"},{"annotation":"ship","group":5,"hexcode":"1F6A2","order":3502,"tags":["boat","passenger"],"unicode":"🚢"},{"annotation":"airplane","group":5,"hexcode":"2708","order":3504,"tags":["aeroplane"],"unicode":"✈️"},{"annotation":"small airplane","group":5,"hexcode":"1F6E9","order":3506,"tags":["aeroplane","airplane"],"unicode":"🛩️"},{"annotation":"airplane departure","group":5,"hexcode":"1F6EB","order":3507,"tags":["aeroplane","airplane","check-in","departure","departures"],"unicode":"🛫"},{"annotation":"airplane arrival","group":5,"hexcode":"1F6EC","order":3508,"tags":["aeroplane","airplane","arrivals","arriving","landing"],"unicode":"🛬"},{"annotation":"parachute","group":5,"hexcode":"1FA82","order":3509,"tags":["hang-glide","parasail","skydive"],"unicode":"🪂"},{"annotation":"seat","group":5,"hexcode":"1F4BA","order":3510,"tags":["chair"],"unicode":"💺"},{"annotation":"helicopter","group":5,"hexcode":"1F681","order":3511,"tags":["vehicle"],"unicode":"🚁"},{"annotation":"suspension railway","group":5,"hexcode":"1F69F","order":3512,"tags":["railway","suspension"],"unicode":"🚟"},{"annotation":"mountain cableway","group":5,"hexcode":"1F6A0","order":3513,"tags":["cable","gondola","mountain"],"unicode":"🚠"},{"annotation":"aerial tramway","group":5,"hexcode":"1F6A1","order":3514,"tags":["aerial","cable","car","gondola","tramway"],"unicode":"🚡"},{"annotation":"satellite","group":5,"hexcode":"1F6F0","order":3516,"tags":["space"],"unicode":"🛰️"},{"annotation":"rocket","group":5,"hexcode":"1F680","order":3517,"tags":["space"],"unicode":"🚀"},{"annotation":"flying saucer","group":5,"hexcode":"1F6F8","order":3518,"tags":["ufo"],"unicode":"🛸"},{"annotation":"bellhop bell","group":5,"hexcode":"1F6CE","order":3520,"tags":["bell","bellhop","hotel"],"unicode":"🛎️"},{"annotation":"luggage","group":5,"hexcode":"1F9F3","order":3521,"tags":["packing","travel"],"unicode":"🧳"},{"annotation":"hourglass done","group":5,"hexcode":"231B","order":3522,"tags":["sand","timer"],"unicode":"⌛️"},{"annotation":"hourglass not done","group":5,"hexcode":"23F3","order":3523,"tags":["hourglass","sand","timer"],"unicode":"⏳️"},{"annotation":"watch","group":5,"hexcode":"231A","order":3524,"tags":["clock"],"unicode":"⌚️"},{"annotation":"alarm clock","group":5,"hexcode":"23F0","order":3525,"tags":["alarm","clock"],"unicode":"⏰"},{"annotation":"stopwatch","group":5,"hexcode":"23F1","order":3527,"tags":["clock"],"unicode":"⏱️"},{"annotation":"timer clock","group":5,"hexcode":"23F2","order":3529,"tags":["clock","timer"],"unicode":"⏲️"},{"annotation":"mantelpiece clock","group":5,"hexcode":"1F570","order":3531,"tags":["clock"],"unicode":"🕰️"},{"annotation":"twelve o’clock","group":5,"hexcode":"1F55B","order":3532,"tags":["00","12","12:00","clock","o’clock","twelve"],"unicode":"🕛️"},{"annotation":"twelve-thirty","group":5,"hexcode":"1F567","order":3533,"tags":["12","12:30","clock","thirty","twelve"],"unicode":"🕧️"},{"annotation":"one o’clock","group":5,"hexcode":"1F550","order":3534,"tags":["00","1","1:00","clock","one","o’clock"],"unicode":"🕐️"},{"annotation":"one-thirty","group":5,"hexcode":"1F55C","order":3535,"tags":["1","1:30","clock","one","thirty"],"unicode":"🕜️"},{"annotation":"two o’clock","group":5,"hexcode":"1F551","order":3536,"tags":["00","2","2:00","clock","o’clock","two"],"unicode":"🕑️"},{"annotation":"two-thirty","group":5,"hexcode":"1F55D","order":3537,"tags":["2","2:30","clock","thirty","two"],"unicode":"🕝️"},{"annotation":"three o’clock","group":5,"hexcode":"1F552","order":3538,"tags":["00","3","3:00","clock","o’clock","three"],"unicode":"🕒️"},{"annotation":"three-thirty","group":5,"hexcode":"1F55E","order":3539,"tags":["3","3:30","clock","thirty","three"],"unicode":"🕞️"},{"annotation":"four o’clock","group":5,"hexcode":"1F553","order":3540,"tags":["00","4","4:00","clock","four","o’clock"],"unicode":"🕓️"},{"annotation":"four-thirty","group":5,"hexcode":"1F55F","order":3541,"tags":["4","4:30","clock","four","thirty"],"unicode":"🕟️"},{"annotation":"five o’clock","group":5,"hexcode":"1F554","order":3542,"tags":["00","5","5:00","clock","five","o’clock"],"unicode":"🕔️"},{"annotation":"five-thirty","group":5,"hexcode":"1F560","order":3543,"tags":["5","5:30","clock","five","thirty"],"unicode":"🕠️"},{"annotation":"six o’clock","group":5,"hexcode":"1F555","order":3544,"tags":["00","6","6:00","clock","o’clock","six"],"unicode":"🕕️"},{"annotation":"six-thirty","group":5,"hexcode":"1F561","order":3545,"tags":["6","6:30","clock","six","thirty"],"unicode":"🕡️"},{"annotation":"seven o’clock","group":5,"hexcode":"1F556","order":3546,"tags":["00","7","7:00","clock","o’clock","seven"],"unicode":"🕖️"},{"annotation":"seven-thirty","group":5,"hexcode":"1F562","order":3547,"tags":["7","7:30","clock","seven","thirty"],"unicode":"🕢️"},{"annotation":"eight o’clock","group":5,"hexcode":"1F557","order":3548,"tags":["00","8","8:00","clock","eight","o’clock"],"unicode":"🕗️"},{"annotation":"eight-thirty","group":5,"hexcode":"1F563","order":3549,"tags":["8","8:30","clock","eight","thirty"],"unicode":"🕣️"},{"annotation":"nine o’clock","group":5,"hexcode":"1F558","order":3550,"tags":["00","9","9:00","clock","nine","o’clock"],"unicode":"🕘️"},{"annotation":"nine-thirty","group":5,"hexcode":"1F564","order":3551,"tags":["9","9:30","clock","nine","thirty"],"unicode":"🕤️"},{"annotation":"ten o’clock","group":5,"hexcode":"1F559","order":3552,"tags":["00","10","10:00","clock","o’clock","ten"],"unicode":"🕙️"},{"annotation":"ten-thirty","group":5,"hexcode":"1F565","order":3553,"tags":["10","10:30","clock","ten","thirty"],"unicode":"🕥️"},{"annotation":"eleven o’clock","group":5,"hexcode":"1F55A","order":3554,"tags":["00","11","11:00","clock","eleven","o’clock"],"unicode":"🕚️"},{"annotation":"eleven-thirty","group":5,"hexcode":"1F566","order":3555,"tags":["11","11:30","clock","eleven","thirty"],"unicode":"🕦️"},{"annotation":"new moon","group":5,"hexcode":"1F311","order":3556,"tags":["dark","moon"],"unicode":"🌑"},{"annotation":"waxing crescent moon","group":5,"hexcode":"1F312","order":3557,"tags":["crescent","moon","waxing"],"unicode":"🌒"},{"annotation":"first quarter moon","group":5,"hexcode":"1F313","order":3558,"tags":["moon","quarter"],"unicode":"🌓"},{"annotation":"waxing gibbous moon","group":5,"hexcode":"1F314","order":3559,"tags":["gibbous","moon","waxing"],"unicode":"🌔"},{"annotation":"full moon","group":5,"hexcode":"1F315","order":3560,"tags":["full","moon"],"unicode":"🌕️"},{"annotation":"waning gibbous moon","group":5,"hexcode":"1F316","order":3561,"tags":["gibbous","moon","waning"],"unicode":"🌖"},{"annotation":"last quarter moon","group":5,"hexcode":"1F317","order":3562,"tags":["moon","quarter"],"unicode":"🌗"},{"annotation":"waning crescent moon","group":5,"hexcode":"1F318","order":3563,"tags":["crescent","moon","waning"],"unicode":"🌘"},{"annotation":"crescent moon","group":5,"hexcode":"1F319","order":3564,"tags":["crescent","moon"],"unicode":"🌙"},{"annotation":"new moon face","group":5,"hexcode":"1F31A","order":3565,"tags":["face","moon"],"unicode":"🌚"},{"annotation":"first quarter moon face","group":5,"hexcode":"1F31B","order":3566,"tags":["face","moon","quarter"],"unicode":"🌛"},{"annotation":"last quarter moon face","group":5,"hexcode":"1F31C","order":3567,"tags":["face","moon","quarter"],"unicode":"🌜️"},{"annotation":"thermometer","group":5,"hexcode":"1F321","order":3569,"tags":["weather"],"unicode":"🌡️"},{"annotation":"sun","group":5,"hexcode":"2600","order":3571,"tags":["bright","rays","sunny"],"unicode":"☀️"},{"annotation":"full moon face","group":5,"hexcode":"1F31D","order":3572,"tags":["bright","face","full","moon"],"unicode":"🌝"},{"annotation":"sun with face","group":5,"hexcode":"1F31E","order":3573,"tags":["bright","face","sun"],"unicode":"🌞"},{"annotation":"ringed planet","group":5,"hexcode":"1FA90","order":3574,"tags":["saturn","saturnine"],"unicode":"🪐"},{"annotation":"star","group":5,"hexcode":"2B50","order":3575,"tags":["star"],"unicode":"⭐️"},{"annotation":"glowing star","group":5,"hexcode":"1F31F","order":3576,"tags":["glittery","glow","shining","sparkle","star"],"unicode":"🌟"},{"annotation":"shooting star","group":5,"hexcode":"1F320","order":3577,"tags":["falling","shooting","star"],"unicode":"🌠"},{"annotation":"milky way","group":5,"hexcode":"1F30C","order":3578,"tags":["space"],"unicode":"🌌"},{"annotation":"cloud","group":5,"hexcode":"2601","order":3580,"tags":["weather"],"unicode":"☁️"},{"annotation":"sun behind cloud","group":5,"hexcode":"26C5","order":3581,"tags":["cloud","sun"],"unicode":"⛅️"},{"annotation":"cloud with lightning and rain","group":5,"hexcode":"26C8","order":3583,"tags":["cloud","rain","thunder"],"unicode":"⛈️"},{"annotation":"sun behind small cloud","group":5,"hexcode":"1F324","order":3585,"tags":["cloud","sun"],"unicode":"🌤️"},{"annotation":"sun behind large cloud","group":5,"hexcode":"1F325","order":3587,"tags":["cloud","sun"],"unicode":"🌥️"},{"annotation":"sun behind rain cloud","group":5,"hexcode":"1F326","order":3589,"tags":["cloud","rain","sun"],"unicode":"🌦️"},{"annotation":"cloud with rain","group":5,"hexcode":"1F327","order":3591,"tags":["cloud","rain"],"unicode":"🌧️"},{"annotation":"cloud with snow","group":5,"hexcode":"1F328","order":3593,"tags":["cloud","cold","snow"],"unicode":"🌨️"},{"annotation":"cloud with lightning","group":5,"hexcode":"1F329","order":3595,"tags":["cloud","lightning"],"unicode":"🌩️"},{"annotation":"tornado","group":5,"hexcode":"1F32A","order":3597,"tags":["cloud","whirlwind"],"unicode":"🌪️"},{"annotation":"fog","group":5,"hexcode":"1F32B","order":3599,"tags":["cloud"],"unicode":"🌫️"},{"annotation":"wind face","group":5,"hexcode":"1F32C","order":3601,"tags":["blow","cloud","face","wind"],"unicode":"🌬️"},{"annotation":"cyclone","group":5,"hexcode":"1F300","order":3602,"tags":["dizzy","hurricane","twister","typhoon"],"unicode":"🌀"},{"annotation":"rainbow","group":5,"hexcode":"1F308","order":3603,"tags":["rain"],"unicode":"🌈"},{"annotation":"closed umbrella","group":5,"hexcode":"1F302","order":3604,"tags":["clothing","rain","umbrella"],"unicode":"🌂"},{"annotation":"umbrella","group":5,"hexcode":"2602","order":3606,"tags":["clothing","rain"],"unicode":"☂️"},{"annotation":"umbrella with rain drops","group":5,"hexcode":"2614","order":3607,"tags":["clothing","drop","rain","umbrella"],"unicode":"☔️"},{"annotation":"umbrella on ground","group":5,"hexcode":"26F1","order":3609,"tags":["rain","sun","umbrella"],"unicode":"⛱️"},{"annotation":"high voltage","group":5,"hexcode":"26A1","order":3610,"tags":["danger","electric","lightning","voltage","zap"],"unicode":"⚡️"},{"annotation":"snowflake","group":5,"hexcode":"2744","order":3612,"tags":["cold","snow"],"unicode":"❄️"},{"annotation":"snowman","group":5,"hexcode":"2603","order":3614,"tags":["cold","snow"],"unicode":"☃️"},{"annotation":"snowman without snow","group":5,"hexcode":"26C4","order":3615,"tags":["cold","snow","snowman"],"unicode":"⛄️"},{"annotation":"comet","group":5,"hexcode":"2604","order":3617,"tags":["space"],"unicode":"☄️"},{"annotation":"fire","group":5,"hexcode":"1F525","order":3618,"tags":["flame","tool"],"unicode":"🔥"},{"annotation":"droplet","group":5,"hexcode":"1F4A7","order":3619,"tags":["cold","comic","drop","sweat"],"unicode":"💧"},{"annotation":"water wave","group":5,"hexcode":"1F30A","order":3620,"tags":["ocean","water","wave"],"unicode":"🌊"},{"annotation":"jack-o-lantern","group":6,"hexcode":"1F383","order":3621,"tags":["celebration","halloween","jack","lantern"],"unicode":"🎃"},{"annotation":"Christmas tree","group":6,"hexcode":"1F384","order":3622,"tags":["celebration","christmas","tree"],"unicode":"🎄"},{"annotation":"fireworks","group":6,"hexcode":"1F386","order":3623,"tags":["celebration"],"unicode":"🎆"},{"annotation":"sparkler","group":6,"hexcode":"1F387","order":3624,"tags":["celebration","fireworks","sparkle"],"unicode":"🎇"},{"annotation":"firecracker","group":6,"hexcode":"1F9E8","order":3625,"tags":["dynamite","explosive","fireworks"],"unicode":"🧨"},{"annotation":"sparkles","group":6,"hexcode":"2728","order":3626,"tags":["*","sparkle","star"],"unicode":"✨"},{"annotation":"balloon","group":6,"hexcode":"1F388","order":3627,"tags":["celebration"],"unicode":"🎈"},{"annotation":"party popper","group":6,"hexcode":"1F389","order":3628,"tags":["celebration","party","popper","tada"],"unicode":"🎉"},{"annotation":"confetti ball","group":6,"hexcode":"1F38A","order":3629,"tags":["ball","celebration","confetti"],"unicode":"🎊"},{"annotation":"tanabata tree","group":6,"hexcode":"1F38B","order":3630,"tags":["banner","celebration","japanese","tree"],"unicode":"🎋"},{"annotation":"pine decoration","group":6,"hexcode":"1F38D","order":3631,"tags":["bamboo","celebration","japanese","pine"],"unicode":"🎍"},{"annotation":"Japanese dolls","group":6,"hexcode":"1F38E","order":3632,"tags":["celebration","doll","festival","japanese","japanese dolls"],"unicode":"🎎"},{"annotation":"carp streamer","group":6,"hexcode":"1F38F","order":3633,"tags":["carp","celebration","streamer"],"unicode":"🎏"},{"annotation":"wind chime","group":6,"hexcode":"1F390","order":3634,"tags":["bell","celebration","chime","wind"],"unicode":"🎐"},{"annotation":"moon viewing ceremony","group":6,"hexcode":"1F391","order":3635,"tags":["celebration","ceremony","moon"],"unicode":"🎑"},{"annotation":"red envelope","group":6,"hexcode":"1F9E7","order":3636,"tags":["gift","good luck","hóngbāo","lai see","money"],"unicode":"🧧"},{"annotation":"ribbon","group":6,"hexcode":"1F380","order":3637,"tags":["celebration"],"unicode":"🎀"},{"annotation":"wrapped gift","group":6,"hexcode":"1F381","order":3638,"tags":["box","celebration","gift","present","wrapped"],"unicode":"🎁"},{"annotation":"reminder ribbon","group":6,"hexcode":"1F397","order":3640,"tags":["celebration","reminder","ribbon"],"unicode":"🎗️"},{"annotation":"admission tickets","group":6,"hexcode":"1F39F","order":3642,"tags":["admission","ticket"],"unicode":"🎟️"},{"annotation":"ticket","group":6,"hexcode":"1F3AB","order":3643,"tags":["admission"],"unicode":"🎫"},{"annotation":"military medal","group":6,"hexcode":"1F396","order":3645,"tags":["celebration","medal","military"],"unicode":"🎖️"},{"annotation":"trophy","group":6,"hexcode":"1F3C6","order":3646,"tags":["prize"],"unicode":"🏆️"},{"annotation":"sports medal","group":6,"hexcode":"1F3C5","order":3647,"tags":["medal"],"unicode":"🏅"},{"annotation":"1st place medal","group":6,"hexcode":"1F947","order":3648,"tags":["first","gold","medal"],"unicode":"🥇"},{"annotation":"2nd place medal","group":6,"hexcode":"1F948","order":3649,"tags":["medal","second","silver"],"unicode":"🥈"},{"annotation":"3rd place medal","group":6,"hexcode":"1F949","order":3650,"tags":["bronze","medal","third"],"unicode":"🥉"},{"annotation":"soccer ball","group":6,"hexcode":"26BD","order":3651,"tags":["ball","football","soccer"],"unicode":"⚽️"},{"annotation":"baseball","group":6,"hexcode":"26BE","order":3652,"tags":["ball"],"unicode":"⚾️"},{"annotation":"softball","group":6,"hexcode":"1F94E","order":3653,"tags":["ball","glove","underarm"],"unicode":"🥎"},{"annotation":"basketball","group":6,"hexcode":"1F3C0","order":3654,"tags":["ball","hoop"],"unicode":"🏀"},{"annotation":"volleyball","group":6,"hexcode":"1F3D0","order":3655,"tags":["ball","game"],"unicode":"🏐"},{"annotation":"american football","group":6,"hexcode":"1F3C8","order":3656,"tags":["american","ball","football"],"unicode":"🏈"},{"annotation":"rugby football","group":6,"hexcode":"1F3C9","order":3657,"tags":["ball","football","rugby"],"unicode":"🏉"},{"annotation":"tennis","group":6,"hexcode":"1F3BE","order":3658,"tags":["ball","racquet"],"unicode":"🎾"},{"annotation":"flying disc","group":6,"hexcode":"1F94F","order":3659,"tags":["ultimate"],"unicode":"🥏"},{"annotation":"bowling","group":6,"hexcode":"1F3B3","order":3660,"tags":["ball","game"],"unicode":"🎳"},{"annotation":"cricket game","group":6,"hexcode":"1F3CF","order":3661,"tags":["ball","bat","game"],"unicode":"🏏"},{"annotation":"field hockey","group":6,"hexcode":"1F3D1","order":3662,"tags":["ball","field","game","hockey","stick"],"unicode":"🏑"},{"annotation":"ice hockey","group":6,"hexcode":"1F3D2","order":3663,"tags":["game","hockey","ice","puck","stick"],"unicode":"🏒"},{"annotation":"lacrosse","group":6,"hexcode":"1F94D","order":3664,"tags":["ball","goal","stick"],"unicode":"🥍"},{"annotation":"ping pong","group":6,"hexcode":"1F3D3","order":3665,"tags":["ball","bat","game","paddle","table tennis"],"unicode":"🏓"},{"annotation":"badminton","group":6,"hexcode":"1F3F8","order":3666,"tags":["birdie","game","racquet","shuttlecock"],"unicode":"🏸"},{"annotation":"boxing glove","group":6,"hexcode":"1F94A","order":3667,"tags":["boxing","glove"],"unicode":"🥊"},{"annotation":"martial arts uniform","group":6,"hexcode":"1F94B","order":3668,"tags":["judo","karate","martial arts","taekwondo","uniform"],"unicode":"🥋"},{"annotation":"goal net","group":6,"hexcode":"1F945","order":3669,"tags":["goal","net"],"unicode":"🥅"},{"annotation":"flag in hole","group":6,"hexcode":"26F3","order":3670,"tags":["golf","hole"],"unicode":"⛳️"},{"annotation":"ice skate","group":6,"hexcode":"26F8","order":3672,"tags":["ice","skate"],"unicode":"⛸️"},{"annotation":"fishing pole","group":6,"hexcode":"1F3A3","order":3673,"tags":["fish","pole"],"unicode":"🎣"},{"annotation":"diving mask","group":6,"hexcode":"1F93F","order":3674,"tags":["diving","scuba","snorkeling"],"unicode":"🤿"},{"annotation":"running shirt","group":6,"hexcode":"1F3BD","order":3675,"tags":["athletics","running","sash","shirt"],"unicode":"🎽"},{"annotation":"skis","group":6,"hexcode":"1F3BF","order":3676,"tags":["ski","snow"],"unicode":"🎿"},{"annotation":"sled","group":6,"hexcode":"1F6F7","order":3677,"tags":["sledge","sleigh"],"unicode":"🛷"},{"annotation":"curling stone","group":6,"hexcode":"1F94C","order":3678,"tags":["game","rock"],"unicode":"🥌"},{"annotation":"bullseye","group":6,"hexcode":"1F3AF","order":3679,"tags":["dart","direct hit","game","hit","target"],"unicode":"🎯"},{"annotation":"yo-yo","group":6,"hexcode":"1FA80","order":3680,"tags":["fluctuate","toy"],"unicode":"🪀"},{"annotation":"kite","group":6,"hexcode":"1FA81","order":3681,"tags":["fly","soar"],"unicode":"🪁"},{"annotation":"pool 8 ball","group":6,"hexcode":"1F3B1","order":3682,"tags":["8","ball","billiard","eight","game"],"unicode":"🎱"},{"annotation":"crystal ball","group":6,"hexcode":"1F52E","order":3683,"tags":["ball","crystal","fairy tale","fantasy","fortune","tool"],"unicode":"🔮"},{"annotation":"magic wand","group":6,"hexcode":"1FA84","order":3684,"tags":["magic","witch","wizard"],"unicode":"🪄"},{"annotation":"nazar amulet","group":6,"hexcode":"1F9FF","order":3685,"tags":["bead","charm","evil-eye","nazar","talisman"],"unicode":"🧿"},{"annotation":"video game","group":6,"hexcode":"1F3AE","order":3686,"tags":["controller","game"],"unicode":"🎮️"},{"annotation":"joystick","group":6,"hexcode":"1F579","order":3688,"tags":["game","video game"],"unicode":"🕹️"},{"annotation":"slot machine","group":6,"hexcode":"1F3B0","order":3689,"tags":["game","slot"],"unicode":"🎰"},{"annotation":"game die","group":6,"hexcode":"1F3B2","order":3690,"tags":["dice","die","game"],"unicode":"🎲"},{"annotation":"puzzle piece","group":6,"hexcode":"1F9E9","order":3691,"tags":["clue","interlocking","jigsaw","piece","puzzle"],"unicode":"🧩"},{"annotation":"teddy bear","group":6,"hexcode":"1F9F8","order":3692,"tags":["plaything","plush","stuffed","toy"],"unicode":"🧸"},{"annotation":"piñata","group":6,"hexcode":"1FA85","order":3693,"tags":["celebration","party"],"unicode":"🪅"},{"annotation":"nesting dolls","group":6,"hexcode":"1FA86","order":3694,"tags":["doll","nesting","russia"],"unicode":"🪆"},{"annotation":"spade suit","group":6,"hexcode":"2660","order":3696,"tags":["card","game"],"unicode":"♠️"},{"annotation":"heart suit","group":6,"hexcode":"2665","order":3698,"tags":["card","game"],"unicode":"♥️"},{"annotation":"diamond suit","group":6,"hexcode":"2666","order":3700,"tags":["card","game"],"unicode":"♦️"},{"annotation":"club suit","group":6,"hexcode":"2663","order":3702,"tags":["card","game"],"unicode":"♣️"},{"annotation":"chess pawn","group":6,"hexcode":"265F","order":3704,"tags":["chess","dupe","expendable"],"unicode":"♟️"},{"annotation":"joker","group":6,"hexcode":"1F0CF","order":3705,"tags":["card","game","wildcard"],"unicode":"🃏"},{"annotation":"mahjong red dragon","group":6,"hexcode":"1F004","order":3706,"tags":["game","mahjong","red"],"unicode":"🀄️"},{"annotation":"flower playing cards","group":6,"hexcode":"1F3B4","order":3707,"tags":["card","flower","game","japanese","playing"],"unicode":"🎴"},{"annotation":"performing arts","group":6,"hexcode":"1F3AD","order":3708,"tags":["art","mask","performing","theater","theatre"],"unicode":"🎭️"},{"annotation":"framed picture","group":6,"hexcode":"1F5BC","order":3710,"tags":["art","frame","museum","painting","picture"],"unicode":"🖼️"},{"annotation":"artist palette","group":6,"hexcode":"1F3A8","order":3711,"tags":["art","museum","painting","palette"],"unicode":"🎨"},{"annotation":"thread","group":6,"hexcode":"1F9F5","order":3712,"tags":["needle","sewing","spool","string"],"unicode":"🧵"},{"annotation":"sewing needle","group":6,"hexcode":"1FAA1","order":3713,"tags":["embroidery","needle","sewing","stitches","sutures","tailoring"],"unicode":"🪡"},{"annotation":"yarn","group":6,"hexcode":"1F9F6","order":3714,"tags":["ball","crochet","knit"],"unicode":"🧶"},{"annotation":"knot","group":6,"hexcode":"1FAA2","order":3715,"tags":["rope","tangled","tie","twine","twist"],"unicode":"🪢"},{"annotation":"glasses","group":7,"hexcode":"1F453","order":3716,"tags":["clothing","eye","eyeglasses","eyewear"],"unicode":"👓️"},{"annotation":"sunglasses","group":7,"hexcode":"1F576","order":3718,"tags":["dark","eye","eyewear","glasses"],"unicode":"🕶️"},{"annotation":"goggles","group":7,"hexcode":"1F97D","order":3719,"tags":["eye protection","swimming","welding"],"unicode":"🥽"},{"annotation":"lab coat","group":7,"hexcode":"1F97C","order":3720,"tags":["doctor","experiment","scientist"],"unicode":"🥼"},{"annotation":"safety vest","group":7,"hexcode":"1F9BA","order":3721,"tags":["emergency","safety","vest"],"unicode":"🦺"},{"annotation":"necktie","group":7,"hexcode":"1F454","order":3722,"tags":["clothing","tie"],"unicode":"👔"},{"annotation":"t-shirt","group":7,"hexcode":"1F455","order":3723,"tags":["clothing","shirt","tshirt"],"unicode":"👕"},{"annotation":"jeans","group":7,"hexcode":"1F456","order":3724,"tags":["clothing","pants","trousers"],"unicode":"👖"},{"annotation":"scarf","group":7,"hexcode":"1F9E3","order":3725,"tags":["neck"],"unicode":"🧣"},{"annotation":"gloves","group":7,"hexcode":"1F9E4","order":3726,"tags":["hand"],"unicode":"🧤"},{"annotation":"coat","group":7,"hexcode":"1F9E5","order":3727,"tags":["jacket"],"unicode":"🧥"},{"annotation":"socks","group":7,"hexcode":"1F9E6","order":3728,"tags":["stocking"],"unicode":"🧦"},{"annotation":"dress","group":7,"hexcode":"1F457","order":3729,"tags":["clothing"],"unicode":"👗"},{"annotation":"kimono","group":7,"hexcode":"1F458","order":3730,"tags":["clothing"],"unicode":"👘"},{"annotation":"sari","group":7,"hexcode":"1F97B","order":3731,"tags":["clothing","dress"],"unicode":"🥻"},{"annotation":"one-piece swimsuit","group":7,"hexcode":"1FA71","order":3732,"tags":["bathing suit"],"unicode":"🩱"},{"annotation":"briefs","group":7,"hexcode":"1FA72","order":3733,"tags":["bathing suit","one-piece","swimsuit","underwear"],"unicode":"🩲"},{"annotation":"shorts","group":7,"hexcode":"1FA73","order":3734,"tags":["bathing suit","pants","underwear"],"unicode":"🩳"},{"annotation":"bikini","group":7,"hexcode":"1F459","order":3735,"tags":["clothing","swim"],"unicode":"👙"},{"annotation":"woman’s clothes","group":7,"hexcode":"1F45A","order":3736,"tags":["clothing","woman"],"unicode":"👚"},{"annotation":"purse","group":7,"hexcode":"1F45B","order":3737,"tags":["clothing","coin"],"unicode":"👛"},{"annotation":"handbag","group":7,"hexcode":"1F45C","order":3738,"tags":["bag","clothing","purse"],"unicode":"👜"},{"annotation":"clutch bag","group":7,"hexcode":"1F45D","order":3739,"tags":["bag","clothing","pouch"],"unicode":"👝"},{"annotation":"shopping bags","group":7,"hexcode":"1F6CD","order":3741,"tags":["bag","hotel","shopping"],"unicode":"🛍️"},{"annotation":"backpack","group":7,"hexcode":"1F392","order":3742,"tags":["bag","rucksack","satchel","school"],"unicode":"🎒"},{"annotation":"thong sandal","group":7,"hexcode":"1FA74","order":3743,"tags":["beach sandals","sandals","thong sandals","thongs","zōri"],"unicode":"🩴"},{"annotation":"man’s shoe","group":7,"hexcode":"1F45E","order":3744,"tags":["clothing","man","shoe"],"unicode":"👞"},{"annotation":"running shoe","group":7,"hexcode":"1F45F","order":3745,"tags":["athletic","clothing","shoe","sneaker"],"unicode":"👟"},{"annotation":"hiking boot","group":7,"hexcode":"1F97E","order":3746,"tags":["backpacking","boot","camping","hiking"],"unicode":"🥾"},{"annotation":"flat shoe","group":7,"hexcode":"1F97F","order":3747,"tags":["ballet flat","slip-on","slipper"],"unicode":"🥿"},{"annotation":"high-heeled shoe","group":7,"hexcode":"1F460","order":3748,"tags":["clothing","heel","shoe","woman"],"unicode":"👠"},{"annotation":"woman’s sandal","group":7,"hexcode":"1F461","order":3749,"tags":["clothing","sandal","shoe","woman"],"unicode":"👡"},{"annotation":"ballet shoes","group":7,"hexcode":"1FA70","order":3750,"tags":["ballet","dance"],"unicode":"🩰"},{"annotation":"woman’s boot","group":7,"hexcode":"1F462","order":3751,"tags":["boot","clothing","shoe","woman"],"unicode":"👢"},{"annotation":"crown","group":7,"hexcode":"1F451","order":3752,"tags":["clothing","king","queen"],"unicode":"👑"},{"annotation":"woman’s hat","group":7,"hexcode":"1F452","order":3753,"tags":["clothing","hat","woman"],"unicode":"👒"},{"annotation":"top hat","group":7,"hexcode":"1F3A9","order":3754,"tags":["clothing","hat","top","tophat"],"unicode":"🎩"},{"annotation":"graduation cap","group":7,"hexcode":"1F393","order":3755,"tags":["cap","celebration","clothing","graduation","hat"],"unicode":"🎓️"},{"annotation":"billed cap","group":7,"hexcode":"1F9E2","order":3756,"tags":["baseball cap"],"unicode":"🧢"},{"annotation":"military helmet","group":7,"hexcode":"1FA96","order":3757,"tags":["army","helmet","military","soldier","warrior"],"unicode":"🪖"},{"annotation":"rescue worker’s helmet","group":7,"hexcode":"26D1","order":3759,"tags":["aid","cross","face","hat","helmet"],"unicode":"⛑️"},{"annotation":"prayer beads","group":7,"hexcode":"1F4FF","order":3760,"tags":["beads","clothing","necklace","prayer","religion"],"unicode":"📿"},{"annotation":"lipstick","group":7,"hexcode":"1F484","order":3761,"tags":["cosmetics","makeup"],"unicode":"💄"},{"annotation":"ring","group":7,"hexcode":"1F48D","order":3762,"tags":["diamond"],"unicode":"💍"},{"annotation":"gem stone","group":7,"hexcode":"1F48E","order":3763,"tags":["diamond","gem","jewel"],"unicode":"💎"},{"annotation":"muted speaker","group":7,"hexcode":"1F507","order":3764,"tags":["mute","quiet","silent","speaker"],"unicode":"🔇"},{"annotation":"speaker low volume","group":7,"hexcode":"1F508","order":3765,"tags":["soft"],"unicode":"🔈️"},{"annotation":"speaker medium volume","group":7,"hexcode":"1F509","order":3766,"tags":["medium"],"unicode":"🔉"},{"annotation":"speaker high volume","group":7,"hexcode":"1F50A","order":3767,"tags":["loud"],"unicode":"🔊"},{"annotation":"loudspeaker","group":7,"hexcode":"1F4E2","order":3768,"tags":["loud","public address"],"unicode":"📢"},{"annotation":"megaphone","group":7,"hexcode":"1F4E3","order":3769,"tags":["cheering"],"unicode":"📣"},{"annotation":"postal horn","group":7,"hexcode":"1F4EF","order":3770,"tags":["horn","post","postal"],"unicode":"📯"},{"annotation":"bell","group":7,"hexcode":"1F514","order":3771,"tags":["bell"],"unicode":"🔔"},{"annotation":"bell with slash","group":7,"hexcode":"1F515","order":3772,"tags":["bell","forbidden","mute","quiet","silent"],"unicode":"🔕"},{"annotation":"musical score","group":7,"hexcode":"1F3BC","order":3773,"tags":["music","score"],"unicode":"🎼"},{"annotation":"musical note","group":7,"hexcode":"1F3B5","order":3774,"tags":["music","note"],"unicode":"🎵"},{"annotation":"musical notes","group":7,"hexcode":"1F3B6","order":3775,"tags":["music","note","notes"],"unicode":"🎶"},{"annotation":"studio microphone","group":7,"hexcode":"1F399","order":3777,"tags":["mic","microphone","music","studio"],"unicode":"🎙️"},{"annotation":"level slider","group":7,"hexcode":"1F39A","order":3779,"tags":["level","music","slider"],"unicode":"🎚️"},{"annotation":"control knobs","group":7,"hexcode":"1F39B","order":3781,"tags":["control","knobs","music"],"unicode":"🎛️"},{"annotation":"microphone","group":7,"hexcode":"1F3A4","order":3782,"tags":["karaoke","mic"],"unicode":"🎤"},{"annotation":"headphone","group":7,"hexcode":"1F3A7","order":3783,"tags":["earbud"],"unicode":"🎧️"},{"annotation":"radio","group":7,"hexcode":"1F4FB","order":3784,"tags":["video"],"unicode":"📻️"},{"annotation":"saxophone","group":7,"hexcode":"1F3B7","order":3785,"tags":["instrument","music","sax"],"unicode":"🎷"},{"annotation":"accordion","group":7,"hexcode":"1FA97","order":3786,"tags":["concertina","squeeze box"],"unicode":"🪗"},{"annotation":"guitar","group":7,"hexcode":"1F3B8","order":3787,"tags":["instrument","music"],"unicode":"🎸"},{"annotation":"musical keyboard","group":7,"hexcode":"1F3B9","order":3788,"tags":["instrument","keyboard","music","piano"],"unicode":"🎹"},{"annotation":"trumpet","group":7,"hexcode":"1F3BA","order":3789,"tags":["instrument","music"],"unicode":"🎺"},{"annotation":"violin","group":7,"hexcode":"1F3BB","order":3790,"tags":["instrument","music"],"unicode":"🎻"},{"annotation":"banjo","group":7,"hexcode":"1FA95","order":3791,"tags":["music","stringed"],"unicode":"🪕"},{"annotation":"drum","group":7,"hexcode":"1F941","order":3792,"tags":["drumsticks","music"],"unicode":"🥁"},{"annotation":"long drum","group":7,"hexcode":"1FA98","order":3793,"tags":["beat","conga","drum","rhythm"],"unicode":"🪘"},{"annotation":"mobile phone","group":7,"hexcode":"1F4F1","order":3794,"tags":["cell","mobile","phone","telephone"],"unicode":"📱"},{"annotation":"mobile phone with arrow","group":7,"hexcode":"1F4F2","order":3795,"tags":["arrow","cell","mobile","phone","receive"],"unicode":"📲"},{"annotation":"telephone","group":7,"hexcode":"260E","order":3797,"tags":["phone"],"unicode":"☎️"},{"annotation":"telephone receiver","group":7,"hexcode":"1F4DE","order":3798,"tags":["phone","receiver","telephone"],"unicode":"📞"},{"annotation":"pager","group":7,"hexcode":"1F4DF","order":3799,"tags":["pager"],"unicode":"📟️"},{"annotation":"fax machine","group":7,"hexcode":"1F4E0","order":3800,"tags":["fax"],"unicode":"📠"},{"annotation":"battery","group":7,"hexcode":"1F50B","order":3801,"tags":["battery"],"unicode":"🔋"},{"annotation":"electric plug","group":7,"hexcode":"1F50C","order":3802,"tags":["electric","electricity","plug"],"unicode":"🔌"},{"annotation":"laptop","group":7,"hexcode":"1F4BB","order":3803,"tags":["computer","pc","personal"],"unicode":"💻️"},{"annotation":"desktop computer","group":7,"hexcode":"1F5A5","order":3805,"tags":["computer","desktop"],"unicode":"🖥️"},{"annotation":"printer","group":7,"hexcode":"1F5A8","order":3807,"tags":["computer"],"unicode":"🖨️"},{"annotation":"keyboard","group":7,"hexcode":"2328","order":3809,"tags":["computer"],"unicode":"⌨️"},{"annotation":"computer mouse","group":7,"hexcode":"1F5B1","order":3811,"tags":["computer"],"unicode":"🖱️"},{"annotation":"trackball","group":7,"hexcode":"1F5B2","order":3813,"tags":["computer"],"unicode":"🖲️"},{"annotation":"computer disk","group":7,"hexcode":"1F4BD","order":3814,"tags":["computer","disk","minidisk","optical"],"unicode":"💽"},{"annotation":"floppy disk","group":7,"hexcode":"1F4BE","order":3815,"tags":["computer","disk","floppy"],"unicode":"💾"},{"annotation":"optical disk","group":7,"hexcode":"1F4BF","order":3816,"tags":["cd","computer","disk","optical"],"unicode":"💿️"},{"annotation":"dvd","group":7,"hexcode":"1F4C0","order":3817,"tags":["blu-ray","computer","disk","optical"],"unicode":"📀"},{"annotation":"abacus","group":7,"hexcode":"1F9EE","order":3818,"tags":["calculation"],"unicode":"🧮"},{"annotation":"movie camera","group":7,"hexcode":"1F3A5","order":3819,"tags":["camera","cinema","movie"],"unicode":"🎥"},{"annotation":"film frames","group":7,"hexcode":"1F39E","order":3821,"tags":["cinema","film","frames","movie"],"unicode":"🎞️"},{"annotation":"film projector","group":7,"hexcode":"1F4FD","order":3823,"tags":["cinema","film","movie","projector","video"],"unicode":"📽️"},{"annotation":"clapper board","group":7,"hexcode":"1F3AC","order":3824,"tags":["clapper","movie"],"unicode":"🎬️"},{"annotation":"television","group":7,"hexcode":"1F4FA","order":3825,"tags":["tv","video"],"unicode":"📺️"},{"annotation":"camera","group":7,"hexcode":"1F4F7","order":3826,"tags":["video"],"unicode":"📷️"},{"annotation":"camera with flash","group":7,"hexcode":"1F4F8","order":3827,"tags":["camera","flash","video"],"unicode":"📸"},{"annotation":"video camera","group":7,"hexcode":"1F4F9","order":3828,"tags":["camera","video"],"unicode":"📹️"},{"annotation":"videocassette","group":7,"hexcode":"1F4FC","order":3829,"tags":["tape","vhs","video"],"unicode":"📼"},{"annotation":"magnifying glass tilted left","group":7,"hexcode":"1F50D","order":3830,"tags":["glass","magnifying","search","tool"],"unicode":"🔍️"},{"annotation":"magnifying glass tilted right","group":7,"hexcode":"1F50E","order":3831,"tags":["glass","magnifying","search","tool"],"unicode":"🔎"},{"annotation":"candle","group":7,"hexcode":"1F56F","order":3833,"tags":["light"],"unicode":"🕯️"},{"annotation":"light bulb","group":7,"hexcode":"1F4A1","order":3834,"tags":["bulb","comic","electric","idea","light"],"unicode":"💡"},{"annotation":"flashlight","group":7,"hexcode":"1F526","order":3835,"tags":["electric","light","tool","torch"],"unicode":"🔦"},{"annotation":"red paper lantern","group":7,"hexcode":"1F3EE","order":3836,"tags":["bar","lantern","light","red"],"unicode":"🏮"},{"annotation":"diya lamp","group":7,"hexcode":"1FA94","order":3837,"tags":["diya","lamp","oil"],"unicode":"🪔"},{"annotation":"notebook with decorative cover","group":7,"hexcode":"1F4D4","order":3838,"tags":["book","cover","decorated","notebook"],"unicode":"📔"},{"annotation":"closed book","group":7,"hexcode":"1F4D5","order":3839,"tags":["book","closed"],"unicode":"📕"},{"annotation":"open book","group":7,"hexcode":"1F4D6","order":3840,"tags":["book","open"],"unicode":"📖"},{"annotation":"green book","group":7,"hexcode":"1F4D7","order":3841,"tags":["book","green"],"unicode":"📗"},{"annotation":"blue book","group":7,"hexcode":"1F4D8","order":3842,"tags":["blue","book"],"unicode":"📘"},{"annotation":"orange book","group":7,"hexcode":"1F4D9","order":3843,"tags":["book","orange"],"unicode":"📙"},{"annotation":"books","group":7,"hexcode":"1F4DA","order":3844,"tags":["book"],"unicode":"📚️"},{"annotation":"notebook","group":7,"hexcode":"1F4D3","order":3845,"tags":["notebook"],"unicode":"📓"},{"annotation":"ledger","group":7,"hexcode":"1F4D2","order":3846,"tags":["notebook"],"unicode":"📒"},{"annotation":"page with curl","group":7,"hexcode":"1F4C3","order":3847,"tags":["curl","document","page"],"unicode":"📃"},{"annotation":"scroll","group":7,"hexcode":"1F4DC","order":3848,"tags":["paper"],"unicode":"📜"},{"annotation":"page facing up","group":7,"hexcode":"1F4C4","order":3849,"tags":["document","page"],"unicode":"📄"},{"annotation":"newspaper","group":7,"hexcode":"1F4F0","order":3850,"tags":["news","paper"],"unicode":"📰"},{"annotation":"rolled-up newspaper","group":7,"hexcode":"1F5DE","order":3852,"tags":["news","newspaper","paper","rolled"],"unicode":"🗞️"},{"annotation":"bookmark tabs","group":7,"hexcode":"1F4D1","order":3853,"tags":["bookmark","mark","marker","tabs"],"unicode":"📑"},{"annotation":"bookmark","group":7,"hexcode":"1F516","order":3854,"tags":["mark"],"unicode":"🔖"},{"annotation":"label","group":7,"hexcode":"1F3F7","order":3856,"tags":["label"],"unicode":"🏷️"},{"annotation":"money bag","group":7,"hexcode":"1F4B0","order":3857,"tags":["bag","dollar","money","moneybag"],"unicode":"💰️"},{"annotation":"coin","group":7,"hexcode":"1FA99","order":3858,"tags":["gold","metal","money","silver","treasure"],"unicode":"🪙"},{"annotation":"yen banknote","group":7,"hexcode":"1F4B4","order":3859,"tags":["banknote","bill","currency","money","note","yen"],"unicode":"💴"},{"annotation":"dollar banknote","group":7,"hexcode":"1F4B5","order":3860,"tags":["banknote","bill","currency","dollar","money","note"],"unicode":"💵"},{"annotation":"euro banknote","group":7,"hexcode":"1F4B6","order":3861,"tags":["banknote","bill","currency","euro","money","note"],"unicode":"💶"},{"annotation":"pound banknote","group":7,"hexcode":"1F4B7","order":3862,"tags":["banknote","bill","currency","money","note","pound"],"unicode":"💷"},{"annotation":"money with wings","group":7,"hexcode":"1F4B8","order":3863,"tags":["banknote","bill","fly","money","wings"],"unicode":"💸"},{"annotation":"credit card","group":7,"hexcode":"1F4B3","order":3864,"tags":["card","credit","money"],"unicode":"💳️"},{"annotation":"receipt","group":7,"hexcode":"1F9FE","order":3865,"tags":["accounting","bookkeeping","evidence","proof"],"unicode":"🧾"},{"annotation":"chart increasing with yen","group":7,"hexcode":"1F4B9","order":3866,"tags":["chart","graph","growth","money","yen"],"unicode":"💹"},{"annotation":"envelope","group":7,"hexcode":"2709","order":3868,"tags":["email","letter"],"unicode":"✉️"},{"annotation":"e-mail","group":7,"hexcode":"1F4E7","order":3869,"tags":["email","letter","mail"],"unicode":"📧"},{"annotation":"incoming envelope","group":7,"hexcode":"1F4E8","order":3870,"tags":["e-mail","email","envelope","incoming","letter","receive"],"unicode":"📨"},{"annotation":"envelope with arrow","group":7,"hexcode":"1F4E9","order":3871,"tags":["arrow","e-mail","email","envelope","outgoing"],"unicode":"📩"},{"annotation":"outbox tray","group":7,"hexcode":"1F4E4","order":3872,"tags":["box","letter","mail","outbox","sent","tray"],"unicode":"📤️"},{"annotation":"inbox tray","group":7,"hexcode":"1F4E5","order":3873,"tags":["box","inbox","letter","mail","receive","tray"],"unicode":"📥️"},{"annotation":"package","group":7,"hexcode":"1F4E6","order":3874,"tags":["box","parcel"],"unicode":"📦️"},{"annotation":"closed mailbox with raised flag","group":7,"hexcode":"1F4EB","order":3875,"tags":["closed","mail","mailbox","postbox"],"unicode":"📫️"},{"annotation":"closed mailbox with lowered flag","group":7,"hexcode":"1F4EA","order":3876,"tags":["closed","lowered","mail","mailbox","postbox"],"unicode":"📪️"},{"annotation":"open mailbox with raised flag","group":7,"hexcode":"1F4EC","order":3877,"tags":["mail","mailbox","open","postbox"],"unicode":"📬️"},{"annotation":"open mailbox with lowered flag","group":7,"hexcode":"1F4ED","order":3878,"tags":["lowered","mail","mailbox","open","postbox"],"unicode":"📭️"},{"annotation":"postbox","group":7,"hexcode":"1F4EE","order":3879,"tags":["mail","mailbox"],"unicode":"📮"},{"annotation":"ballot box with ballot","group":7,"hexcode":"1F5F3","order":3881,"tags":["ballot","box"],"unicode":"🗳️"},{"annotation":"pencil","group":7,"hexcode":"270F","order":3883,"tags":["pencil"],"unicode":"✏️"},{"annotation":"black nib","group":7,"hexcode":"2712","order":3885,"tags":["nib","pen"],"unicode":"✒️"},{"annotation":"fountain pen","group":7,"hexcode":"1F58B","order":3887,"tags":["fountain","pen"],"unicode":"🖋️"},{"annotation":"pen","group":7,"hexcode":"1F58A","order":3889,"tags":["ballpoint"],"unicode":"🖊️"},{"annotation":"paintbrush","group":7,"hexcode":"1F58C","order":3891,"tags":["painting"],"unicode":"🖌️"},{"annotation":"crayon","group":7,"hexcode":"1F58D","order":3893,"tags":["crayon"],"unicode":"🖍️"},{"annotation":"memo","group":7,"hexcode":"1F4DD","order":3894,"tags":["pencil"],"unicode":"📝"},{"annotation":"briefcase","group":7,"hexcode":"1F4BC","order":3895,"tags":["briefcase"],"unicode":"💼"},{"annotation":"file folder","group":7,"hexcode":"1F4C1","order":3896,"tags":["file","folder"],"unicode":"📁"},{"annotation":"open file folder","group":7,"hexcode":"1F4C2","order":3897,"tags":["file","folder","open"],"unicode":"📂"},{"annotation":"card index dividers","group":7,"hexcode":"1F5C2","order":3899,"tags":["card","dividers","index"],"unicode":"🗂️"},{"annotation":"calendar","group":7,"hexcode":"1F4C5","order":3900,"tags":["date"],"unicode":"📅"},{"annotation":"tear-off calendar","group":7,"hexcode":"1F4C6","order":3901,"tags":["calendar"],"unicode":"📆"},{"annotation":"spiral notepad","group":7,"hexcode":"1F5D2","order":3903,"tags":["note","pad","spiral"],"unicode":"🗒️"},{"annotation":"spiral calendar","group":7,"hexcode":"1F5D3","order":3905,"tags":["calendar","pad","spiral"],"unicode":"🗓️"},{"annotation":"card index","group":7,"hexcode":"1F4C7","order":3906,"tags":["card","index","rolodex"],"unicode":"📇"},{"annotation":"chart increasing","group":7,"hexcode":"1F4C8","order":3907,"tags":["chart","graph","growth","trend","upward"],"unicode":"📈"},{"annotation":"chart decreasing","group":7,"hexcode":"1F4C9","order":3908,"tags":["chart","down","graph","trend"],"unicode":"📉"},{"annotation":"bar chart","group":7,"hexcode":"1F4CA","order":3909,"tags":["bar","chart","graph"],"unicode":"📊"},{"annotation":"clipboard","group":7,"hexcode":"1F4CB","order":3910,"tags":["clipboard"],"unicode":"📋️"},{"annotation":"pushpin","group":7,"hexcode":"1F4CC","order":3911,"tags":["pin"],"unicode":"📌"},{"annotation":"round pushpin","group":7,"hexcode":"1F4CD","order":3912,"tags":["pin","pushpin"],"unicode":"📍"},{"annotation":"paperclip","group":7,"hexcode":"1F4CE","order":3913,"tags":["paperclip"],"unicode":"📎"},{"annotation":"linked paperclips","group":7,"hexcode":"1F587","order":3915,"tags":["link","paperclip"],"unicode":"🖇️"},{"annotation":"straight ruler","group":7,"hexcode":"1F4CF","order":3916,"tags":["ruler","straight edge"],"unicode":"📏"},{"annotation":"triangular ruler","group":7,"hexcode":"1F4D0","order":3917,"tags":["ruler","set","triangle"],"unicode":"📐"},{"annotation":"scissors","group":7,"hexcode":"2702","order":3919,"tags":["cutting","tool"],"unicode":"✂️"},{"annotation":"card file box","group":7,"hexcode":"1F5C3","order":3921,"tags":["box","card","file"],"unicode":"🗃️"},{"annotation":"file cabinet","group":7,"hexcode":"1F5C4","order":3923,"tags":["cabinet","file","filing"],"unicode":"🗄️"},{"annotation":"wastebasket","group":7,"hexcode":"1F5D1","order":3925,"tags":["wastebasket"],"unicode":"🗑️"},{"annotation":"locked","group":7,"hexcode":"1F512","order":3926,"tags":["closed"],"unicode":"🔒️"},{"annotation":"unlocked","group":7,"hexcode":"1F513","order":3927,"tags":["lock","open","unlock"],"unicode":"🔓️"},{"annotation":"locked with pen","group":7,"hexcode":"1F50F","order":3928,"tags":["ink","lock","nib","pen","privacy"],"unicode":"🔏"},{"annotation":"locked with key","group":7,"hexcode":"1F510","order":3929,"tags":["closed","key","lock","secure"],"unicode":"🔐"},{"annotation":"key","group":7,"hexcode":"1F511","order":3930,"tags":["lock","password"],"unicode":"🔑"},{"annotation":"old key","group":7,"hexcode":"1F5DD","order":3932,"tags":["clue","key","lock","old"],"unicode":"🗝️"},{"annotation":"hammer","group":7,"hexcode":"1F528","order":3933,"tags":["tool"],"unicode":"🔨"},{"annotation":"axe","group":7,"hexcode":"1FA93","order":3934,"tags":["chop","hatchet","split","wood"],"unicode":"🪓"},{"annotation":"pick","group":7,"hexcode":"26CF","order":3936,"tags":["mining","tool"],"unicode":"⛏️"},{"annotation":"hammer and pick","group":7,"hexcode":"2692","order":3938,"tags":["hammer","pick","tool"],"unicode":"⚒️"},{"annotation":"hammer and wrench","group":7,"hexcode":"1F6E0","order":3940,"tags":["hammer","spanner","tool","wrench"],"unicode":"🛠️"},{"annotation":"dagger","group":7,"hexcode":"1F5E1","order":3942,"tags":["knife","weapon"],"unicode":"🗡️"},{"annotation":"crossed swords","group":7,"hexcode":"2694","order":3944,"tags":["crossed","swords","weapon"],"unicode":"⚔️"},{"annotation":"water pistol","group":7,"hexcode":"1F52B","order":3945,"tags":["gun","handgun","pistol","revolver","tool","water","weapon"],"unicode":"🔫"},{"annotation":"boomerang","group":7,"hexcode":"1FA83","order":3946,"tags":["australia","rebound","repercussion"],"unicode":"🪃"},{"annotation":"bow and arrow","group":7,"hexcode":"1F3F9","order":3947,"tags":["archer","arrow","bow","sagittarius","zodiac"],"unicode":"🏹"},{"annotation":"shield","group":7,"hexcode":"1F6E1","order":3949,"tags":["weapon"],"unicode":"🛡️"},{"annotation":"carpentry saw","group":7,"hexcode":"1FA9A","order":3950,"tags":["carpenter","lumber","saw","tool"],"unicode":"🪚"},{"annotation":"wrench","group":7,"hexcode":"1F527","order":3951,"tags":["spanner","tool"],"unicode":"🔧"},{"annotation":"screwdriver","group":7,"hexcode":"1FA9B","order":3952,"tags":["screw","tool"],"unicode":"🪛"},{"annotation":"nut and bolt","group":7,"hexcode":"1F529","order":3953,"tags":["bolt","nut","tool"],"unicode":"🔩"},{"annotation":"gear","group":7,"hexcode":"2699","order":3955,"tags":["cog","cogwheel","tool"],"unicode":"⚙️"},{"annotation":"clamp","group":7,"hexcode":"1F5DC","order":3957,"tags":["compress","tool","vice"],"unicode":"🗜️"},{"annotation":"balance scale","group":7,"hexcode":"2696","order":3959,"tags":["balance","justice","libra","scale","zodiac"],"unicode":"⚖️"},{"annotation":"white cane","group":7,"hexcode":"1F9AF","order":3960,"tags":["accessibility","blind"],"unicode":"🦯"},{"annotation":"link","group":7,"hexcode":"1F517","order":3961,"tags":["link"],"unicode":"🔗"},{"annotation":"chains","group":7,"hexcode":"26D3","order":3963,"tags":["chain"],"unicode":"⛓️"},{"annotation":"hook","group":7,"hexcode":"1FA9D","order":3964,"tags":["catch","crook","curve","ensnare","selling point"],"unicode":"🪝"},{"annotation":"toolbox","group":7,"hexcode":"1F9F0","order":3965,"tags":["chest","mechanic","tool"],"unicode":"🧰"},{"annotation":"magnet","group":7,"hexcode":"1F9F2","order":3966,"tags":["attraction","horseshoe","magnetic"],"unicode":"🧲"},{"annotation":"ladder","group":7,"hexcode":"1FA9C","order":3967,"tags":["climb","rung","step"],"unicode":"🪜"},{"annotation":"alembic","group":7,"hexcode":"2697","order":3969,"tags":["chemistry","tool"],"unicode":"⚗️"},{"annotation":"test tube","group":7,"hexcode":"1F9EA","order":3970,"tags":["chemist","chemistry","experiment","lab","science"],"unicode":"🧪"},{"annotation":"petri dish","group":7,"hexcode":"1F9EB","order":3971,"tags":["bacteria","biologist","biology","culture","lab"],"unicode":"🧫"},{"annotation":"dna","group":7,"hexcode":"1F9EC","order":3972,"tags":["biologist","evolution","gene","genetics","life"],"unicode":"🧬"},{"annotation":"microscope","group":7,"hexcode":"1F52C","order":3973,"tags":["science","tool"],"unicode":"🔬"},{"annotation":"telescope","group":7,"hexcode":"1F52D","order":3974,"tags":["science","tool"],"unicode":"🔭"},{"annotation":"satellite antenna","group":7,"hexcode":"1F4E1","order":3975,"tags":["antenna","dish","satellite"],"unicode":"📡"},{"annotation":"syringe","group":7,"hexcode":"1F489","order":3976,"tags":["medicine","needle","shot","sick"],"unicode":"💉"},{"annotation":"drop of blood","group":7,"hexcode":"1FA78","order":3977,"tags":["bleed","blood donation","injury","medicine","menstruation"],"unicode":"🩸"},{"annotation":"pill","group":7,"hexcode":"1F48A","order":3978,"tags":["doctor","medicine","sick"],"unicode":"💊"},{"annotation":"adhesive bandage","group":7,"hexcode":"1FA79","order":3979,"tags":["bandage"],"unicode":"🩹"},{"annotation":"stethoscope","group":7,"hexcode":"1FA7A","order":3980,"tags":["doctor","heart","medicine"],"unicode":"🩺"},{"annotation":"door","group":7,"hexcode":"1F6AA","order":3981,"tags":["door"],"unicode":"🚪"},{"annotation":"elevator","group":7,"hexcode":"1F6D7","order":3982,"tags":["accessibility","hoist","lift"],"unicode":"🛗"},{"annotation":"mirror","group":7,"hexcode":"1FA9E","order":3983,"tags":["reflection","reflector","speculum"],"unicode":"🪞"},{"annotation":"window","group":7,"hexcode":"1FA9F","order":3984,"tags":["frame","fresh air","opening","transparent","view"],"unicode":"🪟"},{"annotation":"bed","group":7,"hexcode":"1F6CF","order":3986,"tags":["hotel","sleep"],"unicode":"🛏️"},{"annotation":"couch and lamp","group":7,"hexcode":"1F6CB","order":3988,"tags":["couch","hotel","lamp"],"unicode":"🛋️"},{"annotation":"chair","group":7,"hexcode":"1FA91","order":3989,"tags":["seat","sit"],"unicode":"🪑"},{"annotation":"toilet","group":7,"hexcode":"1F6BD","order":3990,"tags":["toilet"],"unicode":"🚽"},{"annotation":"plunger","group":7,"hexcode":"1FAA0","order":3991,"tags":["force cup","plumber","suction","toilet"],"unicode":"🪠"},{"annotation":"shower","group":7,"hexcode":"1F6BF","order":3992,"tags":["water"],"unicode":"🚿"},{"annotation":"bathtub","group":7,"hexcode":"1F6C1","order":3993,"tags":["bath"],"unicode":"🛁"},{"annotation":"mouse trap","group":7,"hexcode":"1FAA4","order":3994,"tags":["bait","mousetrap","snare","trap"],"unicode":"🪤"},{"annotation":"razor","group":7,"hexcode":"1FA92","order":3995,"tags":["sharp","shave"],"unicode":"🪒"},{"annotation":"lotion bottle","group":7,"hexcode":"1F9F4","order":3996,"tags":["lotion","moisturizer","shampoo","sunscreen"],"unicode":"🧴"},{"annotation":"safety pin","group":7,"hexcode":"1F9F7","order":3997,"tags":["diaper","punk rock"],"unicode":"🧷"},{"annotation":"broom","group":7,"hexcode":"1F9F9","order":3998,"tags":["cleaning","sweeping","witch"],"unicode":"🧹"},{"annotation":"basket","group":7,"hexcode":"1F9FA","order":3999,"tags":["farming","laundry","picnic"],"unicode":"🧺"},{"annotation":"roll of paper","group":7,"hexcode":"1F9FB","order":4000,"tags":["paper towels","toilet paper"],"unicode":"🧻"},{"annotation":"bucket","group":7,"hexcode":"1FAA3","order":4001,"tags":["cask","pail","vat"],"unicode":"🪣"},{"annotation":"soap","group":7,"hexcode":"1F9FC","order":4002,"tags":["bar","bathing","cleaning","lather","soapdish"],"unicode":"🧼"},{"annotation":"toothbrush","group":7,"hexcode":"1FAA5","order":4003,"tags":["bathroom","brush","clean","dental","hygiene","teeth"],"unicode":"🪥"},{"annotation":"sponge","group":7,"hexcode":"1F9FD","order":4004,"tags":["absorbing","cleaning","porous"],"unicode":"🧽"},{"annotation":"fire extinguisher","group":7,"hexcode":"1F9EF","order":4005,"tags":["extinguish","fire","quench"],"unicode":"🧯"},{"annotation":"shopping cart","group":7,"hexcode":"1F6D2","order":4006,"tags":["cart","shopping","trolley"],"unicode":"🛒"},{"annotation":"cigarette","group":7,"hexcode":"1F6AC","order":4007,"tags":["smoking"],"unicode":"🚬"},{"annotation":"coffin","group":7,"hexcode":"26B0","order":4009,"tags":["death"],"unicode":"⚰️"},{"annotation":"headstone","group":7,"hexcode":"1FAA6","order":4010,"tags":["cemetery","grave","graveyard","tombstone"],"unicode":"🪦"},{"annotation":"funeral urn","group":7,"hexcode":"26B1","order":4012,"tags":["ashes","death","funeral","urn"],"unicode":"⚱️"},{"annotation":"moai","group":7,"hexcode":"1F5FF","order":4013,"tags":["face","moyai","statue"],"unicode":"🗿"},{"annotation":"placard","group":7,"hexcode":"1FAA7","order":4014,"tags":["demonstration","picket","protest","sign"],"unicode":"🪧"},{"annotation":"ATM sign","group":8,"hexcode":"1F3E7","order":4015,"tags":["atm","atm sign","automated","bank","teller"],"unicode":"🏧"},{"annotation":"litter in bin sign","group":8,"hexcode":"1F6AE","order":4016,"tags":["litter","litter bin"],"unicode":"🚮"},{"annotation":"potable water","group":8,"hexcode":"1F6B0","order":4017,"tags":["drinking","potable","water"],"unicode":"🚰"},{"annotation":"wheelchair symbol","group":8,"hexcode":"267F","order":4018,"tags":["access"],"unicode":"♿️"},{"annotation":"men’s room","group":8,"hexcode":"1F6B9","order":4019,"tags":["lavatory","man","restroom","wc"],"unicode":"🚹️"},{"annotation":"women’s room","group":8,"hexcode":"1F6BA","order":4020,"tags":["lavatory","restroom","wc","woman"],"unicode":"🚺️"},{"annotation":"restroom","group":8,"hexcode":"1F6BB","order":4021,"tags":["lavatory","wc"],"unicode":"🚻"},{"annotation":"baby symbol","group":8,"hexcode":"1F6BC","order":4022,"tags":["baby","changing"],"unicode":"🚼️"},{"annotation":"water closet","group":8,"hexcode":"1F6BE","order":4023,"tags":["closet","lavatory","restroom","water","wc"],"unicode":"🚾"},{"annotation":"passport control","group":8,"hexcode":"1F6C2","order":4024,"tags":["control","passport"],"unicode":"🛂"},{"annotation":"customs","group":8,"hexcode":"1F6C3","order":4025,"tags":["customs"],"unicode":"🛃"},{"annotation":"baggage claim","group":8,"hexcode":"1F6C4","order":4026,"tags":["baggage","claim"],"unicode":"🛄"},{"annotation":"left luggage","group":8,"hexcode":"1F6C5","order":4027,"tags":["baggage","locker","luggage"],"unicode":"🛅"},{"annotation":"warning","group":8,"hexcode":"26A0","order":4029,"tags":["warning"],"unicode":"⚠️"},{"annotation":"children crossing","group":8,"hexcode":"1F6B8","order":4030,"tags":["child","crossing","pedestrian","traffic"],"unicode":"🚸"},{"annotation":"no entry","group":8,"hexcode":"26D4","order":4031,"tags":["entry","forbidden","no","not","prohibited","traffic"],"unicode":"⛔️"},{"annotation":"prohibited","group":8,"hexcode":"1F6AB","order":4032,"tags":["entry","forbidden","no","not"],"unicode":"🚫"},{"annotation":"no bicycles","group":8,"hexcode":"1F6B3","order":4033,"tags":["bicycle","bike","forbidden","no","prohibited"],"unicode":"🚳"},{"annotation":"no smoking","group":8,"hexcode":"1F6AD","order":4034,"tags":["forbidden","no","not","prohibited","smoking"],"unicode":"🚭️"},{"annotation":"no littering","group":8,"hexcode":"1F6AF","order":4035,"tags":["forbidden","litter","no","not","prohibited"],"unicode":"🚯"},{"annotation":"non-potable water","group":8,"hexcode":"1F6B1","order":4036,"tags":["non-drinking","non-potable","water"],"unicode":"🚱"},{"annotation":"no pedestrians","group":8,"hexcode":"1F6B7","order":4037,"tags":["forbidden","no","not","pedestrian","prohibited"],"unicode":"🚷"},{"annotation":"no mobile phones","group":8,"hexcode":"1F4F5","order":4038,"tags":["cell","forbidden","mobile","no","phone"],"unicode":"📵"},{"annotation":"no one under eighteen","group":8,"hexcode":"1F51E","order":4039,"tags":["18","age restriction","eighteen","prohibited","underage"],"unicode":"🔞"},{"annotation":"radioactive","group":8,"hexcode":"2622","order":4041,"tags":["sign"],"unicode":"☢️"},{"annotation":"biohazard","group":8,"hexcode":"2623","order":4043,"tags":["sign"],"unicode":"☣️"},{"annotation":"up arrow","group":8,"hexcode":"2B06","order":4045,"tags":["arrow","cardinal","direction","north"],"unicode":"⬆️"},{"annotation":"up-right arrow","group":8,"hexcode":"2197","order":4047,"tags":["arrow","direction","intercardinal","northeast"],"unicode":"↗️"},{"annotation":"right arrow","group":8,"hexcode":"27A1","order":4049,"tags":["arrow","cardinal","direction","east"],"unicode":"➡️"},{"annotation":"down-right arrow","group":8,"hexcode":"2198","order":4051,"tags":["arrow","direction","intercardinal","southeast"],"unicode":"↘️"},{"annotation":"down arrow","group":8,"hexcode":"2B07","order":4053,"tags":["arrow","cardinal","direction","down","south"],"unicode":"⬇️"},{"annotation":"down-left arrow","group":8,"hexcode":"2199","order":4055,"tags":["arrow","direction","intercardinal","southwest"],"unicode":"↙️"},{"annotation":"left arrow","group":8,"hexcode":"2B05","order":4057,"tags":["arrow","cardinal","direction","west"],"unicode":"⬅️"},{"annotation":"up-left arrow","group":8,"hexcode":"2196","order":4059,"tags":["arrow","direction","intercardinal","northwest"],"unicode":"↖️"},{"annotation":"up-down arrow","group":8,"hexcode":"2195","order":4061,"tags":["arrow"],"unicode":"↕️"},{"annotation":"left-right arrow","group":8,"hexcode":"2194","order":4063,"tags":["arrow"],"unicode":"↔️"},{"annotation":"right arrow curving left","group":8,"hexcode":"21A9","order":4065,"tags":["arrow"],"unicode":"↩️"},{"annotation":"left arrow curving right","group":8,"hexcode":"21AA","order":4067,"tags":["arrow"],"unicode":"↪️"},{"annotation":"right arrow curving up","group":8,"hexcode":"2934","order":4069,"tags":["arrow"],"unicode":"⤴️"},{"annotation":"right arrow curving down","group":8,"hexcode":"2935","order":4071,"tags":["arrow","down"],"unicode":"⤵️"},{"annotation":"clockwise vertical arrows","group":8,"hexcode":"1F503","order":4072,"tags":["arrow","clockwise","reload"],"unicode":"🔃"},{"annotation":"counterclockwise arrows button","group":8,"hexcode":"1F504","order":4073,"tags":["anticlockwise","arrow","counterclockwise","withershins"],"unicode":"🔄"},{"annotation":"BACK arrow","group":8,"hexcode":"1F519","order":4074,"tags":["arrow","back","back arrow"],"unicode":"🔙"},{"annotation":"END arrow","group":8,"hexcode":"1F51A","order":4075,"tags":["arrow","end","end arrow"],"unicode":"🔚"},{"annotation":"ON! arrow","group":8,"hexcode":"1F51B","order":4076,"tags":["arrow","mark","on","on! arrow"],"unicode":"🔛"},{"annotation":"SOON arrow","group":8,"hexcode":"1F51C","order":4077,"tags":["arrow","soon","soon arrow"],"unicode":"🔜"},{"annotation":"TOP arrow","group":8,"hexcode":"1F51D","order":4078,"tags":["arrow","top","top arrow","up"],"unicode":"🔝"},{"annotation":"place of worship","group":8,"hexcode":"1F6D0","order":4079,"tags":["religion","worship"],"unicode":"🛐"},{"annotation":"atom symbol","group":8,"hexcode":"269B","order":4081,"tags":["atheist","atom"],"unicode":"⚛️"},{"annotation":"om","group":8,"hexcode":"1F549","order":4083,"tags":["hindu","religion"],"unicode":"🕉️"},{"annotation":"star of David","group":8,"hexcode":"2721","order":4085,"tags":["david","jew","jewish","religion","star","star of david"],"unicode":"✡️"},{"annotation":"wheel of dharma","group":8,"hexcode":"2638","order":4087,"tags":["buddhist","dharma","religion","wheel"],"unicode":"☸️"},{"annotation":"yin yang","group":8,"hexcode":"262F","order":4089,"tags":["religion","tao","taoist","yang","yin"],"unicode":"☯️"},{"annotation":"latin cross","group":8,"hexcode":"271D","order":4091,"tags":["christian","cross","religion"],"unicode":"✝️"},{"annotation":"orthodox cross","group":8,"hexcode":"2626","order":4093,"tags":["christian","cross","religion"],"unicode":"☦️"},{"annotation":"star and crescent","group":8,"hexcode":"262A","order":4095,"tags":["islam","muslim","religion"],"unicode":"☪️"},{"annotation":"peace symbol","group":8,"hexcode":"262E","order":4097,"tags":["peace"],"unicode":"☮️"},{"annotation":"menorah","group":8,"hexcode":"1F54E","order":4098,"tags":["candelabrum","candlestick","religion"],"unicode":"🕎"},{"annotation":"dotted six-pointed star","group":8,"hexcode":"1F52F","order":4099,"tags":["fortune","star"],"unicode":"🔯"},{"annotation":"Aries","group":8,"hexcode":"2648","order":4100,"tags":["aries","ram","zodiac"],"unicode":"♈️"},{"annotation":"Taurus","group":8,"hexcode":"2649","order":4101,"tags":["bull","ox","taurus","zodiac"],"unicode":"♉️"},{"annotation":"Gemini","group":8,"hexcode":"264A","order":4102,"tags":["gemini","twins","zodiac"],"unicode":"♊️"},{"annotation":"Cancer","group":8,"hexcode":"264B","order":4103,"tags":["cancer","crab","zodiac"],"unicode":"♋️"},{"annotation":"Leo","group":8,"hexcode":"264C","order":4104,"tags":["leo","lion","zodiac"],"unicode":"♌️"},{"annotation":"Virgo","group":8,"hexcode":"264D","order":4105,"tags":["virgo","zodiac"],"unicode":"♍️"},{"annotation":"Libra","group":8,"hexcode":"264E","order":4106,"tags":["balance","justice","libra","scales","zodiac"],"unicode":"♎️"},{"annotation":"Scorpio","group":8,"hexcode":"264F","order":4107,"tags":["scorpio","scorpion","scorpius","zodiac"],"unicode":"♏️"},{"annotation":"Sagittarius","group":8,"hexcode":"2650","order":4108,"tags":["archer","sagittarius","zodiac"],"unicode":"♐️"},{"annotation":"Capricorn","group":8,"hexcode":"2651","order":4109,"tags":["capricorn","goat","zodiac"],"unicode":"♑️"},{"annotation":"Aquarius","group":8,"hexcode":"2652","order":4110,"tags":["aquarius","bearer","water","zodiac"],"unicode":"♒️"},{"annotation":"Pisces","group":8,"hexcode":"2653","order":4111,"tags":["fish","pisces","zodiac"],"unicode":"♓️"},{"annotation":"Ophiuchus","group":8,"hexcode":"26CE","order":4112,"tags":["bearer","ophiuchus","serpent","snake","zodiac"],"unicode":"⛎"},{"annotation":"shuffle tracks button","group":8,"hexcode":"1F500","order":4113,"tags":["arrow","crossed"],"unicode":"🔀"},{"annotation":"repeat button","group":8,"hexcode":"1F501","order":4114,"tags":["arrow","clockwise","repeat"],"unicode":"🔁"},{"annotation":"repeat single button","group":8,"hexcode":"1F502","order":4115,"tags":["arrow","clockwise","once"],"unicode":"🔂"},{"annotation":"play button","group":8,"hexcode":"25B6","order":4117,"tags":["arrow","play","right","triangle"],"unicode":"▶️"},{"annotation":"fast-forward button","group":8,"hexcode":"23E9","order":4118,"tags":["arrow","double","fast","forward"],"unicode":"⏩️"},{"annotation":"next track button","group":8,"hexcode":"23ED","order":4120,"tags":["arrow","next scene","next track","triangle"],"unicode":"⏭️"},{"annotation":"play or pause button","group":8,"hexcode":"23EF","order":4122,"tags":["arrow","pause","play","right","triangle"],"unicode":"⏯️"},{"annotation":"reverse button","group":8,"hexcode":"25C0","order":4124,"tags":["arrow","left","reverse","triangle"],"unicode":"◀️"},{"annotation":"fast reverse button","group":8,"hexcode":"23EA","order":4125,"tags":["arrow","double","rewind"],"unicode":"⏪️"},{"annotation":"last track button","group":8,"hexcode":"23EE","order":4127,"tags":["arrow","previous scene","previous track","triangle"],"unicode":"⏮️"},{"annotation":"upwards button","group":8,"hexcode":"1F53C","order":4128,"tags":["arrow","button","red"],"unicode":"🔼"},{"annotation":"fast up button","group":8,"hexcode":"23EB","order":4129,"tags":["arrow","double"],"unicode":"⏫"},{"annotation":"downwards button","group":8,"hexcode":"1F53D","order":4130,"tags":["arrow","button","down","red"],"unicode":"🔽"},{"annotation":"fast down button","group":8,"hexcode":"23EC","order":4131,"tags":["arrow","double","down"],"unicode":"⏬"},{"annotation":"pause button","group":8,"hexcode":"23F8","order":4133,"tags":["bar","double","pause","vertical"],"unicode":"⏸️"},{"annotation":"stop button","group":8,"hexcode":"23F9","order":4135,"tags":["square","stop"],"unicode":"⏹️"},{"annotation":"record button","group":8,"hexcode":"23FA","order":4137,"tags":["circle","record"],"unicode":"⏺️"},{"annotation":"eject button","group":8,"hexcode":"23CF","order":4139,"tags":["eject"],"unicode":"⏏️"},{"annotation":"cinema","group":8,"hexcode":"1F3A6","order":4140,"tags":["camera","film","movie"],"unicode":"🎦"},{"annotation":"dim button","group":8,"hexcode":"1F505","order":4141,"tags":["brightness","dim","low"],"unicode":"🔅"},{"annotation":"bright button","group":8,"hexcode":"1F506","order":4142,"tags":["bright","brightness"],"unicode":"🔆"},{"annotation":"antenna bars","group":8,"hexcode":"1F4F6","order":4143,"tags":["antenna","bar","cell","mobile","phone"],"unicode":"📶"},{"annotation":"vibration mode","group":8,"hexcode":"1F4F3","order":4144,"tags":["cell","mobile","mode","phone","telephone","vibration"],"unicode":"📳"},{"annotation":"mobile phone off","group":8,"hexcode":"1F4F4","order":4145,"tags":["cell","mobile","off","phone","telephone"],"unicode":"📴"},{"annotation":"female sign","group":8,"hexcode":"2640","order":4147,"tags":["woman"],"unicode":"♀️"},{"annotation":"male sign","group":8,"hexcode":"2642","order":4149,"tags":["man"],"unicode":"♂️"},{"annotation":"transgender symbol","group":8,"hexcode":"26A7","order":4151,"tags":["transgender"],"unicode":"⚧️"},{"annotation":"multiply","group":8,"hexcode":"2716","order":4153,"tags":["cancel","multiplication","sign","x","×"],"unicode":"✖️"},{"annotation":"plus","group":8,"hexcode":"2795","order":4154,"tags":["+","math","sign"],"unicode":"➕"},{"annotation":"minus","group":8,"hexcode":"2796","order":4155,"tags":["-","math","sign","−"],"unicode":"➖"},{"annotation":"divide","group":8,"hexcode":"2797","order":4156,"tags":["division","math","sign","÷"],"unicode":"➗"},{"annotation":"infinity","group":8,"hexcode":"267E","order":4158,"tags":["forever","unbounded","universal"],"unicode":"♾️"},{"annotation":"double exclamation mark","group":8,"hexcode":"203C","order":4160,"tags":["!","!!","bangbang","exclamation","mark"],"unicode":"‼️"},{"annotation":"exclamation question mark","group":8,"hexcode":"2049","order":4162,"tags":["!","!?","?","exclamation","interrobang","mark","punctuation","question"],"unicode":"⁉️"},{"annotation":"red question mark","group":8,"hexcode":"2753","order":4163,"tags":["?","mark","punctuation","question"],"unicode":"❓️"},{"annotation":"white question mark","group":8,"hexcode":"2754","order":4164,"tags":["?","mark","outlined","punctuation","question"],"unicode":"❔"},{"annotation":"white exclamation mark","group":8,"hexcode":"2755","order":4165,"tags":["!","exclamation","mark","outlined","punctuation"],"unicode":"❕"},{"annotation":"red exclamation mark","group":8,"hexcode":"2757","order":4166,"tags":["!","exclamation","mark","punctuation"],"unicode":"❗️"},{"annotation":"wavy dash","group":8,"hexcode":"3030","order":4168,"tags":["dash","punctuation","wavy"],"unicode":"〰️"},{"annotation":"currency exchange","group":8,"hexcode":"1F4B1","order":4169,"tags":["bank","currency","exchange","money"],"unicode":"💱"},{"annotation":"heavy dollar sign","group":8,"hexcode":"1F4B2","order":4170,"tags":["currency","dollar","money"],"unicode":"💲"},{"annotation":"medical symbol","group":8,"hexcode":"2695","order":4172,"tags":["aesculapius","medicine","staff"],"unicode":"⚕️"},{"annotation":"recycling symbol","group":8,"hexcode":"267B","order":4174,"tags":["recycle"],"unicode":"♻️"},{"annotation":"fleur-de-lis","group":8,"hexcode":"269C","order":4176,"tags":["fleur-de-lis"],"unicode":"⚜️"},{"annotation":"trident emblem","group":8,"hexcode":"1F531","order":4177,"tags":["anchor","emblem","ship","tool","trident"],"unicode":"🔱"},{"annotation":"name badge","group":8,"hexcode":"1F4DB","order":4178,"tags":["badge","name"],"unicode":"📛"},{"annotation":"Japanese symbol for beginner","group":8,"hexcode":"1F530","order":4179,"tags":["beginner","chevron","japanese","japanese symbol for beginner","leaf"],"unicode":"🔰"},{"annotation":"hollow red circle","group":8,"hexcode":"2B55","order":4180,"tags":["circle","large","o","red"],"unicode":"⭕️"},{"annotation":"check mark button","group":8,"hexcode":"2705","order":4181,"tags":["button","check","mark","✓"],"unicode":"✅"},{"annotation":"check box with check","group":8,"hexcode":"2611","order":4183,"tags":["box","check","✓"],"unicode":"☑️"},{"annotation":"check mark","group":8,"hexcode":"2714","order":4185,"tags":["check","mark","✓"],"unicode":"✔️"},{"annotation":"cross mark","group":8,"hexcode":"274C","order":4186,"tags":["cancel","cross","mark","multiplication","multiply","x","×"],"unicode":"❌"},{"annotation":"cross mark button","group":8,"hexcode":"274E","order":4187,"tags":["mark","square","x","×"],"unicode":"❎"},{"annotation":"curly loop","group":8,"hexcode":"27B0","order":4188,"tags":["curl","loop"],"unicode":"➰"},{"annotation":"double curly loop","group":8,"hexcode":"27BF","order":4189,"tags":["curl","double","loop"],"unicode":"➿"},{"annotation":"part alternation mark","group":8,"hexcode":"303D","order":4191,"tags":["mark","part"],"unicode":"〽️"},{"annotation":"eight-spoked asterisk","group":8,"hexcode":"2733","order":4193,"tags":["*","asterisk"],"unicode":"✳️"},{"annotation":"eight-pointed star","group":8,"hexcode":"2734","order":4195,"tags":["*","star"],"unicode":"✴️"},{"annotation":"sparkle","group":8,"hexcode":"2747","order":4197,"tags":["*"],"unicode":"❇️"},{"annotation":"copyright","group":8,"hexcode":"00A9","order":4199,"tags":["c"],"unicode":"©️"},{"annotation":"registered","group":8,"hexcode":"00AE","order":4201,"tags":["r"],"unicode":"®️"},{"annotation":"trade mark","group":8,"hexcode":"2122","order":4203,"tags":["mark","tm","trademark"],"unicode":"™️"},{"annotation":"keycap: #","group":8,"hexcode":"0023-FE0F-20E3","order":4204,"tags":["keycap"],"unicode":"#️⃣"},{"annotation":"keycap: *","group":8,"hexcode":"002A-FE0F-20E3","order":4206,"tags":["keycap"],"unicode":"*️⃣"},{"annotation":"keycap: 0","group":8,"hexcode":"0030-FE0F-20E3","order":4208,"tags":["keycap"],"unicode":"0️⃣"},{"annotation":"keycap: 1","group":8,"hexcode":"0031-FE0F-20E3","order":4210,"tags":["keycap"],"unicode":"1️⃣"},{"annotation":"keycap: 2","group":8,"hexcode":"0032-FE0F-20E3","order":4212,"tags":["keycap"],"unicode":"2️⃣"},{"annotation":"keycap: 3","group":8,"hexcode":"0033-FE0F-20E3","order":4214,"tags":["keycap"],"unicode":"3️⃣"},{"annotation":"keycap: 4","group":8,"hexcode":"0034-FE0F-20E3","order":4216,"tags":["keycap"],"unicode":"4️⃣"},{"annotation":"keycap: 5","group":8,"hexcode":"0035-FE0F-20E3","order":4218,"tags":["keycap"],"unicode":"5️⃣"},{"annotation":"keycap: 6","group":8,"hexcode":"0036-FE0F-20E3","order":4220,"tags":["keycap"],"unicode":"6️⃣"},{"annotation":"keycap: 7","group":8,"hexcode":"0037-FE0F-20E3","order":4222,"tags":["keycap"],"unicode":"7️⃣"},{"annotation":"keycap: 8","group":8,"hexcode":"0038-FE0F-20E3","order":4224,"tags":["keycap"],"unicode":"8️⃣"},{"annotation":"keycap: 9","group":8,"hexcode":"0039-FE0F-20E3","order":4226,"tags":["keycap"],"unicode":"9️⃣"},{"annotation":"keycap: 10","group":8,"hexcode":"1F51F","order":4228,"tags":["keycap"],"unicode":"🔟"},{"annotation":"input latin uppercase","group":8,"hexcode":"1F520","order":4229,"tags":["abcd","input","latin","letters","uppercase"],"unicode":"🔠"},{"annotation":"input latin lowercase","group":8,"hexcode":"1F521","order":4230,"tags":["abcd","input","latin","letters","lowercase"],"unicode":"🔡"},{"annotation":"input numbers","group":8,"hexcode":"1F522","order":4231,"tags":["1234","input","numbers"],"unicode":"🔢"},{"annotation":"input symbols","group":8,"hexcode":"1F523","order":4232,"tags":["input","〒♪&%"],"unicode":"🔣"},{"annotation":"input latin letters","group":8,"hexcode":"1F524","order":4233,"tags":["abc","alphabet","input","latin","letters"],"unicode":"🔤"},{"annotation":"A button (blood type)","group":8,"hexcode":"1F170","order":4235,"tags":["a","a button (blood type)","blood type"],"unicode":"🅰️"},{"annotation":"AB button (blood type)","group":8,"hexcode":"1F18E","order":4236,"tags":["ab","ab button (blood type)","blood type"],"unicode":"🆎"},{"annotation":"B button (blood type)","group":8,"hexcode":"1F171","order":4238,"tags":["b","b button (blood type)","blood type"],"unicode":"🅱️"},{"annotation":"CL button","group":8,"hexcode":"1F191","order":4239,"tags":["cl","cl button"],"unicode":"🆑"},{"annotation":"COOL button","group":8,"hexcode":"1F192","order":4240,"tags":["cool","cool button"],"unicode":"🆒"},{"annotation":"FREE button","group":8,"hexcode":"1F193","order":4241,"tags":["free","free button"],"unicode":"🆓"},{"annotation":"information","group":8,"hexcode":"2139","order":4243,"tags":["i"],"unicode":"ℹ️"},{"annotation":"ID button","group":8,"hexcode":"1F194","order":4244,"tags":["id","id button","identity"],"unicode":"🆔"},{"annotation":"circled M","group":8,"hexcode":"24C2","order":4246,"tags":["circle","circled m","m"],"unicode":"Ⓜ️"},{"annotation":"NEW button","group":8,"hexcode":"1F195","order":4247,"tags":["new","new button"],"unicode":"🆕"},{"annotation":"NG button","group":8,"hexcode":"1F196","order":4248,"tags":["ng","ng button"],"unicode":"🆖"},{"annotation":"O button (blood type)","group":8,"hexcode":"1F17E","order":4250,"tags":["blood type","o","o button (blood type)"],"unicode":"🅾️"},{"annotation":"OK button","group":8,"hexcode":"1F197","order":4251,"tags":["ok","ok button"],"unicode":"🆗"},{"annotation":"P button","group":8,"hexcode":"1F17F","order":4253,"tags":["p button","parking"],"unicode":"🅿️"},{"annotation":"SOS button","group":8,"hexcode":"1F198","order":4254,"tags":["help","sos","sos button"],"unicode":"🆘"},{"annotation":"UP! button","group":8,"hexcode":"1F199","order":4255,"tags":["mark","up","up! button"],"unicode":"🆙"},{"annotation":"VS button","group":8,"hexcode":"1F19A","order":4256,"tags":["versus","vs","vs button"],"unicode":"🆚"},{"annotation":"Japanese “here” button","group":8,"hexcode":"1F201","order":4257,"tags":["japanese","japanese “here” button","katakana","“here”","ココ"],"unicode":"🈁"},{"annotation":"Japanese “service charge” button","group":8,"hexcode":"1F202","order":4259,"tags":["japanese","japanese “service charge” button","katakana","“service charge”","サ"],"unicode":"🈂️"},{"annotation":"Japanese “monthly amount” button","group":8,"hexcode":"1F237","order":4261,"tags":["ideograph","japanese","japanese “monthly amount” button","“monthly amount”","月"],"unicode":"🈷️"},{"annotation":"Japanese “not free of charge” button","group":8,"hexcode":"1F236","order":4262,"tags":["ideograph","japanese","japanese “not free of charge” button","“not free of charge”","有"],"unicode":"🈶"},{"annotation":"Japanese “reserved” button","group":8,"hexcode":"1F22F","order":4263,"tags":["ideograph","japanese","japanese “reserved” button","“reserved”","指"],"unicode":"🈯️"},{"annotation":"Japanese “bargain” button","group":8,"hexcode":"1F250","order":4264,"tags":["ideograph","japanese","japanese “bargain” button","“bargain”","得"],"unicode":"🉐"},{"annotation":"Japanese “discount” button","group":8,"hexcode":"1F239","order":4265,"tags":["ideograph","japanese","japanese “discount” button","“discount”","割"],"unicode":"🈹"},{"annotation":"Japanese “free of charge” button","group":8,"hexcode":"1F21A","order":4266,"tags":["ideograph","japanese","japanese “free of charge” button","“free of charge”","無"],"unicode":"🈚️"},{"annotation":"Japanese “prohibited” button","group":8,"hexcode":"1F232","order":4267,"tags":["ideograph","japanese","japanese “prohibited” button","“prohibited”","禁"],"unicode":"🈲"},{"annotation":"Japanese “acceptable” button","group":8,"hexcode":"1F251","order":4268,"tags":["ideograph","japanese","japanese “acceptable” button","“acceptable”","可"],"unicode":"🉑"},{"annotation":"Japanese “application” button","group":8,"hexcode":"1F238","order":4269,"tags":["ideograph","japanese","japanese “application” button","“application”","申"],"unicode":"🈸"},{"annotation":"Japanese “passing grade” button","group":8,"hexcode":"1F234","order":4270,"tags":["ideograph","japanese","japanese “passing grade” button","“passing grade”","合"],"unicode":"🈴"},{"annotation":"Japanese “vacancy” button","group":8,"hexcode":"1F233","order":4271,"tags":["ideograph","japanese","japanese “vacancy” button","“vacancy”","空"],"unicode":"🈳"},{"annotation":"Japanese “congratulations” button","group":8,"hexcode":"3297","order":4273,"tags":["ideograph","japanese","japanese “congratulations” button","“congratulations”","祝"],"unicode":"㊗️"},{"annotation":"Japanese “secret” button","group":8,"hexcode":"3299","order":4275,"tags":["ideograph","japanese","japanese “secret” button","“secret”","秘"],"unicode":"㊙️"},{"annotation":"Japanese “open for business” button","group":8,"hexcode":"1F23A","order":4276,"tags":["ideograph","japanese","japanese “open for business” button","“open for business”","営"],"unicode":"🈺"},{"annotation":"Japanese “no vacancy” button","group":8,"hexcode":"1F235","order":4277,"tags":["ideograph","japanese","japanese “no vacancy” button","“no vacancy”","満"],"unicode":"🈵"},{"annotation":"red circle","group":8,"hexcode":"1F534","order":4278,"tags":["circle","geometric","red"],"unicode":"🔴"},{"annotation":"orange circle","group":8,"hexcode":"1F7E0","order":4279,"tags":["circle","orange"],"unicode":"🟠"},{"annotation":"yellow circle","group":8,"hexcode":"1F7E1","order":4280,"tags":["circle","yellow"],"unicode":"🟡"},{"annotation":"green circle","group":8,"hexcode":"1F7E2","order":4281,"tags":["circle","green"],"unicode":"🟢"},{"annotation":"blue circle","group":8,"hexcode":"1F535","order":4282,"tags":["blue","circle","geometric"],"unicode":"🔵"},{"annotation":"purple circle","group":8,"hexcode":"1F7E3","order":4283,"tags":["circle","purple"],"unicode":"🟣"},{"annotation":"brown circle","group":8,"hexcode":"1F7E4","order":4284,"tags":["brown","circle"],"unicode":"🟤"},{"annotation":"black circle","group":8,"hexcode":"26AB","order":4285,"tags":["circle","geometric"],"unicode":"⚫️"},{"annotation":"white circle","group":8,"hexcode":"26AA","order":4286,"tags":["circle","geometric"],"unicode":"⚪️"},{"annotation":"red square","group":8,"hexcode":"1F7E5","order":4287,"tags":["red","square"],"unicode":"🟥"},{"annotation":"orange square","group":8,"hexcode":"1F7E7","order":4288,"tags":["orange","square"],"unicode":"🟧"},{"annotation":"yellow square","group":8,"hexcode":"1F7E8","order":4289,"tags":["square","yellow"],"unicode":"🟨"},{"annotation":"green square","group":8,"hexcode":"1F7E9","order":4290,"tags":["green","square"],"unicode":"🟩"},{"annotation":"blue square","group":8,"hexcode":"1F7E6","order":4291,"tags":["blue","square"],"unicode":"🟦"},{"annotation":"purple square","group":8,"hexcode":"1F7EA","order":4292,"tags":["purple","square"],"unicode":"🟪"},{"annotation":"brown square","group":8,"hexcode":"1F7EB","order":4293,"tags":["brown","square"],"unicode":"🟫"},{"annotation":"black large square","group":8,"hexcode":"2B1B","order":4294,"tags":["geometric","square"],"unicode":"⬛️"},{"annotation":"white large square","group":8,"hexcode":"2B1C","order":4295,"tags":["geometric","square"],"unicode":"⬜️"},{"annotation":"black medium square","group":8,"hexcode":"25FC","order":4297,"tags":["geometric","square"],"unicode":"◼️"},{"annotation":"white medium square","group":8,"hexcode":"25FB","order":4299,"tags":["geometric","square"],"unicode":"◻️"},{"annotation":"black medium-small square","group":8,"hexcode":"25FE","order":4300,"tags":["geometric","square"],"unicode":"◾️"},{"annotation":"white medium-small square","group":8,"hexcode":"25FD","order":4301,"tags":["geometric","square"],"unicode":"◽️"},{"annotation":"black small square","group":8,"hexcode":"25AA","order":4303,"tags":["geometric","square"],"unicode":"▪️"},{"annotation":"white small square","group":8,"hexcode":"25AB","order":4305,"tags":["geometric","square"],"unicode":"▫️"},{"annotation":"large orange diamond","group":8,"hexcode":"1F536","order":4306,"tags":["diamond","geometric","orange"],"unicode":"🔶"},{"annotation":"large blue diamond","group":8,"hexcode":"1F537","order":4307,"tags":["blue","diamond","geometric"],"unicode":"🔷"},{"annotation":"small orange diamond","group":8,"hexcode":"1F538","order":4308,"tags":["diamond","geometric","orange"],"unicode":"🔸"},{"annotation":"small blue diamond","group":8,"hexcode":"1F539","order":4309,"tags":["blue","diamond","geometric"],"unicode":"🔹"},{"annotation":"red triangle pointed up","group":8,"hexcode":"1F53A","order":4310,"tags":["geometric","red"],"unicode":"🔺"},{"annotation":"red triangle pointed down","group":8,"hexcode":"1F53B","order":4311,"tags":["down","geometric","red"],"unicode":"🔻"},{"annotation":"diamond with a dot","group":8,"hexcode":"1F4A0","order":4312,"tags":["comic","diamond","geometric","inside"],"unicode":"💠"},{"annotation":"radio button","group":8,"hexcode":"1F518","order":4313,"tags":["button","geometric","radio"],"unicode":"🔘"},{"annotation":"white square button","group":8,"hexcode":"1F533","order":4314,"tags":["button","geometric","outlined","square"],"unicode":"🔳"},{"annotation":"black square button","group":8,"hexcode":"1F532","order":4315,"tags":["button","geometric","square"],"unicode":"🔲"},{"annotation":"chequered flag","group":9,"hexcode":"1F3C1","order":4316,"tags":["checkered","chequered","racing"],"unicode":"🏁"},{"annotation":"triangular flag","group":9,"hexcode":"1F6A9","order":4317,"tags":["post"],"unicode":"🚩"},{"annotation":"crossed flags","group":9,"hexcode":"1F38C","order":4318,"tags":["celebration","cross","crossed","japanese"],"unicode":"🎌"},{"annotation":"black flag","group":9,"hexcode":"1F3F4","order":4319,"tags":["waving"],"unicode":"🏴"},{"annotation":"white flag","group":9,"hexcode":"1F3F3","order":4321,"tags":["waving"],"unicode":"🏳️"},{"annotation":"rainbow flag","group":9,"hexcode":"1F3F3-FE0F-200D-1F308","order":4322,"tags":["pride","rainbow"],"unicode":"🏳️🌈"},{"annotation":"transgender flag","group":9,"hexcode":"1F3F3-FE0F-200D-26A7-FE0F","order":4324,"tags":["flag","light blue","pink","transgender","white"],"unicode":"🏳️⚧️"},{"annotation":"pirate flag","group":9,"hexcode":"1F3F4-200D-2620-FE0F","order":4328,"tags":["jolly roger","pirate","plunder","treasure"],"unicode":"🏴☠️"},{"annotation":"flag: Ascension Island","group":9,"hexcode":"1F1E6-1F1E8","order":4330,"tags":["AC","flag"],"unicode":"🇦🇨"},{"annotation":"flag: Andorra","group":9,"hexcode":"1F1E6-1F1E9","order":4331,"tags":["AD","flag"],"unicode":"🇦🇩"},{"annotation":"flag: United Arab Emirates","group":9,"hexcode":"1F1E6-1F1EA","order":4332,"tags":["AE","flag"],"unicode":"🇦🇪"},{"annotation":"flag: Afghanistan","group":9,"hexcode":"1F1E6-1F1EB","order":4333,"tags":["AF","flag"],"unicode":"🇦🇫"},{"annotation":"flag: Antigua & Barbuda","group":9,"hexcode":"1F1E6-1F1EC","order":4334,"tags":["AG","flag"],"unicode":"🇦🇬"},{"annotation":"flag: Anguilla","group":9,"hexcode":"1F1E6-1F1EE","order":4335,"tags":["AI","flag"],"unicode":"🇦🇮"},{"annotation":"flag: Albania","group":9,"hexcode":"1F1E6-1F1F1","order":4336,"tags":["AL","flag"],"unicode":"🇦🇱"},{"annotation":"flag: Armenia","group":9,"hexcode":"1F1E6-1F1F2","order":4337,"tags":["AM","flag"],"unicode":"🇦🇲"},{"annotation":"flag: Angola","group":9,"hexcode":"1F1E6-1F1F4","order":4338,"tags":["AO","flag"],"unicode":"🇦🇴"},{"annotation":"flag: Antarctica","group":9,"hexcode":"1F1E6-1F1F6","order":4339,"tags":["AQ","flag"],"unicode":"🇦🇶"},{"annotation":"flag: Argentina","group":9,"hexcode":"1F1E6-1F1F7","order":4340,"tags":["AR","flag"],"unicode":"🇦🇷"},{"annotation":"flag: American Samoa","group":9,"hexcode":"1F1E6-1F1F8","order":4341,"tags":["AS","flag"],"unicode":"🇦🇸"},{"annotation":"flag: Austria","group":9,"hexcode":"1F1E6-1F1F9","order":4342,"tags":["AT","flag"],"unicode":"🇦🇹"},{"annotation":"flag: Australia","group":9,"hexcode":"1F1E6-1F1FA","order":4343,"tags":["AU","flag"],"unicode":"🇦🇺"},{"annotation":"flag: Aruba","group":9,"hexcode":"1F1E6-1F1FC","order":4344,"tags":["AW","flag"],"unicode":"🇦🇼"},{"annotation":"flag: Åland Islands","group":9,"hexcode":"1F1E6-1F1FD","order":4345,"tags":["AX","flag"],"unicode":"🇦🇽"},{"annotation":"flag: Azerbaijan","group":9,"hexcode":"1F1E6-1F1FF","order":4346,"tags":["AZ","flag"],"unicode":"🇦🇿"},{"annotation":"flag: Bosnia & Herzegovina","group":9,"hexcode":"1F1E7-1F1E6","order":4347,"tags":["BA","flag"],"unicode":"🇧🇦"},{"annotation":"flag: Barbados","group":9,"hexcode":"1F1E7-1F1E7","order":4348,"tags":["BB","flag"],"unicode":"🇧🇧"},{"annotation":"flag: Bangladesh","group":9,"hexcode":"1F1E7-1F1E9","order":4349,"tags":["BD","flag"],"unicode":"🇧🇩"},{"annotation":"flag: Belgium","group":9,"hexcode":"1F1E7-1F1EA","order":4350,"tags":["BE","flag"],"unicode":"🇧🇪"},{"annotation":"flag: Burkina Faso","group":9,"hexcode":"1F1E7-1F1EB","order":4351,"tags":["BF","flag"],"unicode":"🇧🇫"},{"annotation":"flag: Bulgaria","group":9,"hexcode":"1F1E7-1F1EC","order":4352,"tags":["BG","flag"],"unicode":"🇧🇬"},{"annotation":"flag: Bahrain","group":9,"hexcode":"1F1E7-1F1ED","order":4353,"tags":["BH","flag"],"unicode":"🇧🇭"},{"annotation":"flag: Burundi","group":9,"hexcode":"1F1E7-1F1EE","order":4354,"tags":["BI","flag"],"unicode":"🇧🇮"},{"annotation":"flag: Benin","group":9,"hexcode":"1F1E7-1F1EF","order":4355,"tags":["BJ","flag"],"unicode":"🇧🇯"},{"annotation":"flag: St. Barthélemy","group":9,"hexcode":"1F1E7-1F1F1","order":4356,"tags":["BL","flag"],"unicode":"🇧🇱"},{"annotation":"flag: Bermuda","group":9,"hexcode":"1F1E7-1F1F2","order":4357,"tags":["BM","flag"],"unicode":"🇧🇲"},{"annotation":"flag: Brunei","group":9,"hexcode":"1F1E7-1F1F3","order":4358,"tags":["BN","flag"],"unicode":"🇧🇳"},{"annotation":"flag: Bolivia","group":9,"hexcode":"1F1E7-1F1F4","order":4359,"tags":["BO","flag"],"unicode":"🇧🇴"},{"annotation":"flag: Caribbean Netherlands","group":9,"hexcode":"1F1E7-1F1F6","order":4360,"tags":["BQ","flag"],"unicode":"🇧🇶"},{"annotation":"flag: Brazil","group":9,"hexcode":"1F1E7-1F1F7","order":4361,"tags":["BR","flag"],"unicode":"🇧🇷"},{"annotation":"flag: Bahamas","group":9,"hexcode":"1F1E7-1F1F8","order":4362,"tags":["BS","flag"],"unicode":"🇧🇸"},{"annotation":"flag: Bhutan","group":9,"hexcode":"1F1E7-1F1F9","order":4363,"tags":["BT","flag"],"unicode":"🇧🇹"},{"annotation":"flag: Bouvet Island","group":9,"hexcode":"1F1E7-1F1FB","order":4364,"tags":["BV","flag"],"unicode":"🇧🇻"},{"annotation":"flag: Botswana","group":9,"hexcode":"1F1E7-1F1FC","order":4365,"tags":["BW","flag"],"unicode":"🇧🇼"},{"annotation":"flag: Belarus","group":9,"hexcode":"1F1E7-1F1FE","order":4366,"tags":["BY","flag"],"unicode":"🇧🇾"},{"annotation":"flag: Belize","group":9,"hexcode":"1F1E7-1F1FF","order":4367,"tags":["BZ","flag"],"unicode":"🇧🇿"},{"annotation":"flag: Canada","group":9,"hexcode":"1F1E8-1F1E6","order":4368,"tags":["CA","flag"],"unicode":"🇨🇦"},{"annotation":"flag: Cocos (Keeling) Islands","group":9,"hexcode":"1F1E8-1F1E8","order":4369,"tags":["CC","flag"],"unicode":"🇨🇨"},{"annotation":"flag: Congo - Kinshasa","group":9,"hexcode":"1F1E8-1F1E9","order":4370,"tags":["CD","flag"],"unicode":"🇨🇩"},{"annotation":"flag: Central African Republic","group":9,"hexcode":"1F1E8-1F1EB","order":4371,"tags":["CF","flag"],"unicode":"🇨🇫"},{"annotation":"flag: Congo - Brazzaville","group":9,"hexcode":"1F1E8-1F1EC","order":4372,"tags":["CG","flag"],"unicode":"🇨🇬"},{"annotation":"flag: Switzerland","group":9,"hexcode":"1F1E8-1F1ED","order":4373,"tags":["CH","flag"],"unicode":"🇨🇭"},{"annotation":"flag: Côte d’Ivoire","group":9,"hexcode":"1F1E8-1F1EE","order":4374,"tags":["CI","flag"],"unicode":"🇨🇮"},{"annotation":"flag: Cook Islands","group":9,"hexcode":"1F1E8-1F1F0","order":4375,"tags":["CK","flag"],"unicode":"🇨🇰"},{"annotation":"flag: Chile","group":9,"hexcode":"1F1E8-1F1F1","order":4376,"tags":["CL","flag"],"unicode":"🇨🇱"},{"annotation":"flag: Cameroon","group":9,"hexcode":"1F1E8-1F1F2","order":4377,"tags":["CM","flag"],"unicode":"🇨🇲"},{"annotation":"flag: China","group":9,"hexcode":"1F1E8-1F1F3","order":4378,"tags":["CN","flag"],"unicode":"🇨🇳"},{"annotation":"flag: Colombia","group":9,"hexcode":"1F1E8-1F1F4","order":4379,"tags":["CO","flag"],"unicode":"🇨🇴"},{"annotation":"flag: Clipperton Island","group":9,"hexcode":"1F1E8-1F1F5","order":4380,"tags":["CP","flag"],"unicode":"🇨🇵"},{"annotation":"flag: Costa Rica","group":9,"hexcode":"1F1E8-1F1F7","order":4381,"tags":["CR","flag"],"unicode":"🇨🇷"},{"annotation":"flag: Cuba","group":9,"hexcode":"1F1E8-1F1FA","order":4382,"tags":["CU","flag"],"unicode":"🇨🇺"},{"annotation":"flag: Cape Verde","group":9,"hexcode":"1F1E8-1F1FB","order":4383,"tags":["CV","flag"],"unicode":"🇨🇻"},{"annotation":"flag: Curaçao","group":9,"hexcode":"1F1E8-1F1FC","order":4384,"tags":["CW","flag"],"unicode":"🇨🇼"},{"annotation":"flag: Christmas Island","group":9,"hexcode":"1F1E8-1F1FD","order":4385,"tags":["CX","flag"],"unicode":"🇨🇽"},{"annotation":"flag: Cyprus","group":9,"hexcode":"1F1E8-1F1FE","order":4386,"tags":["CY","flag"],"unicode":"🇨🇾"},{"annotation":"flag: Czechia","group":9,"hexcode":"1F1E8-1F1FF","order":4387,"tags":["CZ","flag"],"unicode":"🇨🇿"},{"annotation":"flag: Germany","group":9,"hexcode":"1F1E9-1F1EA","order":4388,"tags":["DE","flag"],"unicode":"🇩🇪"},{"annotation":"flag: Diego Garcia","group":9,"hexcode":"1F1E9-1F1EC","order":4389,"tags":["DG","flag"],"unicode":"🇩🇬"},{"annotation":"flag: Djibouti","group":9,"hexcode":"1F1E9-1F1EF","order":4390,"tags":["DJ","flag"],"unicode":"🇩🇯"},{"annotation":"flag: Denmark","group":9,"hexcode":"1F1E9-1F1F0","order":4391,"tags":["DK","flag"],"unicode":"🇩🇰"},{"annotation":"flag: Dominica","group":9,"hexcode":"1F1E9-1F1F2","order":4392,"tags":["DM","flag"],"unicode":"🇩🇲"},{"annotation":"flag: Dominican Republic","group":9,"hexcode":"1F1E9-1F1F4","order":4393,"tags":["DO","flag"],"unicode":"🇩🇴"},{"annotation":"flag: Algeria","group":9,"hexcode":"1F1E9-1F1FF","order":4394,"tags":["DZ","flag"],"unicode":"🇩🇿"},{"annotation":"flag: Ceuta & Melilla","group":9,"hexcode":"1F1EA-1F1E6","order":4395,"tags":["EA","flag"],"unicode":"🇪🇦"},{"annotation":"flag: Ecuador","group":9,"hexcode":"1F1EA-1F1E8","order":4396,"tags":["EC","flag"],"unicode":"🇪🇨"},{"annotation":"flag: Estonia","group":9,"hexcode":"1F1EA-1F1EA","order":4397,"tags":["EE","flag"],"unicode":"🇪🇪"},{"annotation":"flag: Egypt","group":9,"hexcode":"1F1EA-1F1EC","order":4398,"tags":["EG","flag"],"unicode":"🇪🇬"},{"annotation":"flag: Western Sahara","group":9,"hexcode":"1F1EA-1F1ED","order":4399,"tags":["EH","flag"],"unicode":"🇪🇭"},{"annotation":"flag: Eritrea","group":9,"hexcode":"1F1EA-1F1F7","order":4400,"tags":["ER","flag"],"unicode":"🇪🇷"},{"annotation":"flag: Spain","group":9,"hexcode":"1F1EA-1F1F8","order":4401,"tags":["ES","flag"],"unicode":"🇪🇸"},{"annotation":"flag: Ethiopia","group":9,"hexcode":"1F1EA-1F1F9","order":4402,"tags":["ET","flag"],"unicode":"🇪🇹"},{"annotation":"flag: European Union","group":9,"hexcode":"1F1EA-1F1FA","order":4403,"tags":["EU","flag"],"unicode":"🇪🇺"},{"annotation":"flag: Finland","group":9,"hexcode":"1F1EB-1F1EE","order":4404,"tags":["FI","flag"],"unicode":"🇫🇮"},{"annotation":"flag: Fiji","group":9,"hexcode":"1F1EB-1F1EF","order":4405,"tags":["FJ","flag"],"unicode":"🇫🇯"},{"annotation":"flag: Falkland Islands","group":9,"hexcode":"1F1EB-1F1F0","order":4406,"tags":["FK","flag"],"unicode":"🇫🇰"},{"annotation":"flag: Micronesia","group":9,"hexcode":"1F1EB-1F1F2","order":4407,"tags":["FM","flag"],"unicode":"🇫🇲"},{"annotation":"flag: Faroe Islands","group":9,"hexcode":"1F1EB-1F1F4","order":4408,"tags":["FO","flag"],"unicode":"🇫🇴"},{"annotation":"flag: France","group":9,"hexcode":"1F1EB-1F1F7","order":4409,"tags":["FR","flag"],"unicode":"🇫🇷"},{"annotation":"flag: Gabon","group":9,"hexcode":"1F1EC-1F1E6","order":4410,"tags":["GA","flag"],"unicode":"🇬🇦"},{"annotation":"flag: United Kingdom","group":9,"hexcode":"1F1EC-1F1E7","order":4411,"tags":["GB","flag"],"unicode":"🇬🇧"},{"annotation":"flag: Grenada","group":9,"hexcode":"1F1EC-1F1E9","order":4412,"tags":["GD","flag"],"unicode":"🇬🇩"},{"annotation":"flag: Georgia","group":9,"hexcode":"1F1EC-1F1EA","order":4413,"tags":["GE","flag"],"unicode":"🇬🇪"},{"annotation":"flag: French Guiana","group":9,"hexcode":"1F1EC-1F1EB","order":4414,"tags":["GF","flag"],"unicode":"🇬🇫"},{"annotation":"flag: Guernsey","group":9,"hexcode":"1F1EC-1F1EC","order":4415,"tags":["GG","flag"],"unicode":"🇬🇬"},{"annotation":"flag: Ghana","group":9,"hexcode":"1F1EC-1F1ED","order":4416,"tags":["GH","flag"],"unicode":"🇬🇭"},{"annotation":"flag: Gibraltar","group":9,"hexcode":"1F1EC-1F1EE","order":4417,"tags":["GI","flag"],"unicode":"🇬🇮"},{"annotation":"flag: Greenland","group":9,"hexcode":"1F1EC-1F1F1","order":4418,"tags":["GL","flag"],"unicode":"🇬🇱"},{"annotation":"flag: Gambia","group":9,"hexcode":"1F1EC-1F1F2","order":4419,"tags":["GM","flag"],"unicode":"🇬🇲"},{"annotation":"flag: Guinea","group":9,"hexcode":"1F1EC-1F1F3","order":4420,"tags":["GN","flag"],"unicode":"🇬🇳"},{"annotation":"flag: Guadeloupe","group":9,"hexcode":"1F1EC-1F1F5","order":4421,"tags":["GP","flag"],"unicode":"🇬🇵"},{"annotation":"flag: Equatorial Guinea","group":9,"hexcode":"1F1EC-1F1F6","order":4422,"tags":["GQ","flag"],"unicode":"🇬🇶"},{"annotation":"flag: Greece","group":9,"hexcode":"1F1EC-1F1F7","order":4423,"tags":["GR","flag"],"unicode":"🇬🇷"},{"annotation":"flag: South Georgia & South Sandwich Islands","group":9,"hexcode":"1F1EC-1F1F8","order":4424,"tags":["GS","flag"],"unicode":"🇬🇸"},{"annotation":"flag: Guatemala","group":9,"hexcode":"1F1EC-1F1F9","order":4425,"tags":["GT","flag"],"unicode":"🇬🇹"},{"annotation":"flag: Guam","group":9,"hexcode":"1F1EC-1F1FA","order":4426,"tags":["GU","flag"],"unicode":"🇬🇺"},{"annotation":"flag: Guinea-Bissau","group":9,"hexcode":"1F1EC-1F1FC","order":4427,"tags":["GW","flag"],"unicode":"🇬🇼"},{"annotation":"flag: Guyana","group":9,"hexcode":"1F1EC-1F1FE","order":4428,"tags":["GY","flag"],"unicode":"🇬🇾"},{"annotation":"flag: Hong Kong SAR China","group":9,"hexcode":"1F1ED-1F1F0","order":4429,"tags":["HK","flag"],"unicode":"🇭🇰"},{"annotation":"flag: Heard & McDonald Islands","group":9,"hexcode":"1F1ED-1F1F2","order":4430,"tags":["HM","flag"],"unicode":"🇭🇲"},{"annotation":"flag: Honduras","group":9,"hexcode":"1F1ED-1F1F3","order":4431,"tags":["HN","flag"],"unicode":"🇭🇳"},{"annotation":"flag: Croatia","group":9,"hexcode":"1F1ED-1F1F7","order":4432,"tags":["HR","flag"],"unicode":"🇭🇷"},{"annotation":"flag: Haiti","group":9,"hexcode":"1F1ED-1F1F9","order":4433,"tags":["HT","flag"],"unicode":"🇭🇹"},{"annotation":"flag: Hungary","group":9,"hexcode":"1F1ED-1F1FA","order":4434,"tags":["HU","flag"],"unicode":"🇭🇺"},{"annotation":"flag: Canary Islands","group":9,"hexcode":"1F1EE-1F1E8","order":4435,"tags":["IC","flag"],"unicode":"🇮🇨"},{"annotation":"flag: Indonesia","group":9,"hexcode":"1F1EE-1F1E9","order":4436,"tags":["ID","flag"],"unicode":"🇮🇩"},{"annotation":"flag: Ireland","group":9,"hexcode":"1F1EE-1F1EA","order":4437,"tags":["IE","flag"],"unicode":"🇮🇪"},{"annotation":"flag: Israel","group":9,"hexcode":"1F1EE-1F1F1","order":4438,"tags":["IL","flag"],"unicode":"🇮🇱"},{"annotation":"flag: Isle of Man","group":9,"hexcode":"1F1EE-1F1F2","order":4439,"tags":["IM","flag"],"unicode":"🇮🇲"},{"annotation":"flag: India","group":9,"hexcode":"1F1EE-1F1F3","order":4440,"tags":["IN","flag"],"unicode":"🇮🇳"},{"annotation":"flag: British Indian Ocean Territory","group":9,"hexcode":"1F1EE-1F1F4","order":4441,"tags":["IO","flag"],"unicode":"🇮🇴"},{"annotation":"flag: Iraq","group":9,"hexcode":"1F1EE-1F1F6","order":4442,"tags":["IQ","flag"],"unicode":"🇮🇶"},{"annotation":"flag: Iran","group":9,"hexcode":"1F1EE-1F1F7","order":4443,"tags":["IR","flag"],"unicode":"🇮🇷"},{"annotation":"flag: Iceland","group":9,"hexcode":"1F1EE-1F1F8","order":4444,"tags":["IS","flag"],"unicode":"🇮🇸"},{"annotation":"flag: Italy","group":9,"hexcode":"1F1EE-1F1F9","order":4445,"tags":["IT","flag"],"unicode":"🇮🇹"},{"annotation":"flag: Jersey","group":9,"hexcode":"1F1EF-1F1EA","order":4446,"tags":["JE","flag"],"unicode":"🇯🇪"},{"annotation":"flag: Jamaica","group":9,"hexcode":"1F1EF-1F1F2","order":4447,"tags":["JM","flag"],"unicode":"🇯🇲"},{"annotation":"flag: Jordan","group":9,"hexcode":"1F1EF-1F1F4","order":4448,"tags":["JO","flag"],"unicode":"🇯🇴"},{"annotation":"flag: Japan","group":9,"hexcode":"1F1EF-1F1F5","order":4449,"tags":["JP","flag"],"unicode":"🇯🇵"},{"annotation":"flag: Kenya","group":9,"hexcode":"1F1F0-1F1EA","order":4450,"tags":["KE","flag"],"unicode":"🇰🇪"},{"annotation":"flag: Kyrgyzstan","group":9,"hexcode":"1F1F0-1F1EC","order":4451,"tags":["KG","flag"],"unicode":"🇰🇬"},{"annotation":"flag: Cambodia","group":9,"hexcode":"1F1F0-1F1ED","order":4452,"tags":["KH","flag"],"unicode":"🇰🇭"},{"annotation":"flag: Kiribati","group":9,"hexcode":"1F1F0-1F1EE","order":4453,"tags":["KI","flag"],"unicode":"🇰🇮"},{"annotation":"flag: Comoros","group":9,"hexcode":"1F1F0-1F1F2","order":4454,"tags":["KM","flag"],"unicode":"🇰🇲"},{"annotation":"flag: St. Kitts & Nevis","group":9,"hexcode":"1F1F0-1F1F3","order":4455,"tags":["KN","flag"],"unicode":"🇰🇳"},{"annotation":"flag: North Korea","group":9,"hexcode":"1F1F0-1F1F5","order":4456,"tags":["KP","flag"],"unicode":"🇰🇵"},{"annotation":"flag: South Korea","group":9,"hexcode":"1F1F0-1F1F7","order":4457,"tags":["KR","flag"],"unicode":"🇰🇷"},{"annotation":"flag: Kuwait","group":9,"hexcode":"1F1F0-1F1FC","order":4458,"tags":["KW","flag"],"unicode":"🇰🇼"},{"annotation":"flag: Cayman Islands","group":9,"hexcode":"1F1F0-1F1FE","order":4459,"tags":["KY","flag"],"unicode":"🇰🇾"},{"annotation":"flag: Kazakhstan","group":9,"hexcode":"1F1F0-1F1FF","order":4460,"tags":["KZ","flag"],"unicode":"🇰🇿"},{"annotation":"flag: Laos","group":9,"hexcode":"1F1F1-1F1E6","order":4461,"tags":["LA","flag"],"unicode":"🇱🇦"},{"annotation":"flag: Lebanon","group":9,"hexcode":"1F1F1-1F1E7","order":4462,"tags":["LB","flag"],"unicode":"🇱🇧"},{"annotation":"flag: St. Lucia","group":9,"hexcode":"1F1F1-1F1E8","order":4463,"tags":["LC","flag"],"unicode":"🇱🇨"},{"annotation":"flag: Liechtenstein","group":9,"hexcode":"1F1F1-1F1EE","order":4464,"tags":["LI","flag"],"unicode":"🇱🇮"},{"annotation":"flag: Sri Lanka","group":9,"hexcode":"1F1F1-1F1F0","order":4465,"tags":["LK","flag"],"unicode":"🇱🇰"},{"annotation":"flag: Liberia","group":9,"hexcode":"1F1F1-1F1F7","order":4466,"tags":["LR","flag"],"unicode":"🇱🇷"},{"annotation":"flag: Lesotho","group":9,"hexcode":"1F1F1-1F1F8","order":4467,"tags":["LS","flag"],"unicode":"🇱🇸"},{"annotation":"flag: Lithuania","group":9,"hexcode":"1F1F1-1F1F9","order":4468,"tags":["LT","flag"],"unicode":"🇱🇹"},{"annotation":"flag: Luxembourg","group":9,"hexcode":"1F1F1-1F1FA","order":4469,"tags":["LU","flag"],"unicode":"🇱🇺"},{"annotation":"flag: Latvia","group":9,"hexcode":"1F1F1-1F1FB","order":4470,"tags":["LV","flag"],"unicode":"🇱🇻"},{"annotation":"flag: Libya","group":9,"hexcode":"1F1F1-1F1FE","order":4471,"tags":["LY","flag"],"unicode":"🇱🇾"},{"annotation":"flag: Morocco","group":9,"hexcode":"1F1F2-1F1E6","order":4472,"tags":["MA","flag"],"unicode":"🇲🇦"},{"annotation":"flag: Monaco","group":9,"hexcode":"1F1F2-1F1E8","order":4473,"tags":["MC","flag"],"unicode":"🇲🇨"},{"annotation":"flag: Moldova","group":9,"hexcode":"1F1F2-1F1E9","order":4474,"tags":["MD","flag"],"unicode":"🇲🇩"},{"annotation":"flag: Montenegro","group":9,"hexcode":"1F1F2-1F1EA","order":4475,"tags":["ME","flag"],"unicode":"🇲🇪"},{"annotation":"flag: St. Martin","group":9,"hexcode":"1F1F2-1F1EB","order":4476,"tags":["MF","flag"],"unicode":"🇲🇫"},{"annotation":"flag: Madagascar","group":9,"hexcode":"1F1F2-1F1EC","order":4477,"tags":["MG","flag"],"unicode":"🇲🇬"},{"annotation":"flag: Marshall Islands","group":9,"hexcode":"1F1F2-1F1ED","order":4478,"tags":["MH","flag"],"unicode":"🇲🇭"},{"annotation":"flag: North Macedonia","group":9,"hexcode":"1F1F2-1F1F0","order":4479,"tags":["MK","flag"],"unicode":"🇲🇰"},{"annotation":"flag: Mali","group":9,"hexcode":"1F1F2-1F1F1","order":4480,"tags":["ML","flag"],"unicode":"🇲🇱"},{"annotation":"flag: Myanmar (Burma)","group":9,"hexcode":"1F1F2-1F1F2","order":4481,"tags":["MM","flag"],"unicode":"🇲🇲"},{"annotation":"flag: Mongolia","group":9,"hexcode":"1F1F2-1F1F3","order":4482,"tags":["MN","flag"],"unicode":"🇲🇳"},{"annotation":"flag: Macao SAR China","group":9,"hexcode":"1F1F2-1F1F4","order":4483,"tags":["MO","flag"],"unicode":"🇲🇴"},{"annotation":"flag: Northern Mariana Islands","group":9,"hexcode":"1F1F2-1F1F5","order":4484,"tags":["MP","flag"],"unicode":"🇲🇵"},{"annotation":"flag: Martinique","group":9,"hexcode":"1F1F2-1F1F6","order":4485,"tags":["MQ","flag"],"unicode":"🇲🇶"},{"annotation":"flag: Mauritania","group":9,"hexcode":"1F1F2-1F1F7","order":4486,"tags":["MR","flag"],"unicode":"🇲🇷"},{"annotation":"flag: Montserrat","group":9,"hexcode":"1F1F2-1F1F8","order":4487,"tags":["MS","flag"],"unicode":"🇲🇸"},{"annotation":"flag: Malta","group":9,"hexcode":"1F1F2-1F1F9","order":4488,"tags":["MT","flag"],"unicode":"🇲🇹"},{"annotation":"flag: Mauritius","group":9,"hexcode":"1F1F2-1F1FA","order":4489,"tags":["MU","flag"],"unicode":"🇲🇺"},{"annotation":"flag: Maldives","group":9,"hexcode":"1F1F2-1F1FB","order":4490,"tags":["MV","flag"],"unicode":"🇲🇻"},{"annotation":"flag: Malawi","group":9,"hexcode":"1F1F2-1F1FC","order":4491,"tags":["MW","flag"],"unicode":"🇲🇼"},{"annotation":"flag: Mexico","group":9,"hexcode":"1F1F2-1F1FD","order":4492,"tags":["MX","flag"],"unicode":"🇲🇽"},{"annotation":"flag: Malaysia","group":9,"hexcode":"1F1F2-1F1FE","order":4493,"tags":["MY","flag"],"unicode":"🇲🇾"},{"annotation":"flag: Mozambique","group":9,"hexcode":"1F1F2-1F1FF","order":4494,"tags":["MZ","flag"],"unicode":"🇲🇿"},{"annotation":"flag: Namibia","group":9,"hexcode":"1F1F3-1F1E6","order":4495,"tags":["NA","flag"],"unicode":"🇳🇦"},{"annotation":"flag: New Caledonia","group":9,"hexcode":"1F1F3-1F1E8","order":4496,"tags":["NC","flag"],"unicode":"🇳🇨"},{"annotation":"flag: Niger","group":9,"hexcode":"1F1F3-1F1EA","order":4497,"tags":["NE","flag"],"unicode":"🇳🇪"},{"annotation":"flag: Norfolk Island","group":9,"hexcode":"1F1F3-1F1EB","order":4498,"tags":["NF","flag"],"unicode":"🇳🇫"},{"annotation":"flag: Nigeria","group":9,"hexcode":"1F1F3-1F1EC","order":4499,"tags":["NG","flag"],"unicode":"🇳🇬"},{"annotation":"flag: Nicaragua","group":9,"hexcode":"1F1F3-1F1EE","order":4500,"tags":["NI","flag"],"unicode":"🇳🇮"},{"annotation":"flag: Netherlands","group":9,"hexcode":"1F1F3-1F1F1","order":4501,"tags":["NL","flag"],"unicode":"🇳🇱"},{"annotation":"flag: Norway","group":9,"hexcode":"1F1F3-1F1F4","order":4502,"tags":["NO","flag"],"unicode":"🇳🇴"},{"annotation":"flag: Nepal","group":9,"hexcode":"1F1F3-1F1F5","order":4503,"tags":["NP","flag"],"unicode":"🇳🇵"},{"annotation":"flag: Nauru","group":9,"hexcode":"1F1F3-1F1F7","order":4504,"tags":["NR","flag"],"unicode":"🇳🇷"},{"annotation":"flag: Niue","group":9,"hexcode":"1F1F3-1F1FA","order":4505,"tags":["NU","flag"],"unicode":"🇳🇺"},{"annotation":"flag: New Zealand","group":9,"hexcode":"1F1F3-1F1FF","order":4506,"tags":["NZ","flag"],"unicode":"🇳🇿"},{"annotation":"flag: Oman","group":9,"hexcode":"1F1F4-1F1F2","order":4507,"tags":["OM","flag"],"unicode":"🇴🇲"},{"annotation":"flag: Panama","group":9,"hexcode":"1F1F5-1F1E6","order":4508,"tags":["PA","flag"],"unicode":"🇵🇦"},{"annotation":"flag: Peru","group":9,"hexcode":"1F1F5-1F1EA","order":4509,"tags":["PE","flag"],"unicode":"🇵🇪"},{"annotation":"flag: French Polynesia","group":9,"hexcode":"1F1F5-1F1EB","order":4510,"tags":["PF","flag"],"unicode":"🇵🇫"},{"annotation":"flag: Papua New Guinea","group":9,"hexcode":"1F1F5-1F1EC","order":4511,"tags":["PG","flag"],"unicode":"🇵🇬"},{"annotation":"flag: Philippines","group":9,"hexcode":"1F1F5-1F1ED","order":4512,"tags":["PH","flag"],"unicode":"🇵🇭"},{"annotation":"flag: Pakistan","group":9,"hexcode":"1F1F5-1F1F0","order":4513,"tags":["PK","flag"],"unicode":"🇵🇰"},{"annotation":"flag: Poland","group":9,"hexcode":"1F1F5-1F1F1","order":4514,"tags":["PL","flag"],"unicode":"🇵🇱"},{"annotation":"flag: St. Pierre & Miquelon","group":9,"hexcode":"1F1F5-1F1F2","order":4515,"tags":["PM","flag"],"unicode":"🇵🇲"},{"annotation":"flag: Pitcairn Islands","group":9,"hexcode":"1F1F5-1F1F3","order":4516,"tags":["PN","flag"],"unicode":"🇵🇳"},{"annotation":"flag: Puerto Rico","group":9,"hexcode":"1F1F5-1F1F7","order":4517,"tags":["PR","flag"],"unicode":"🇵🇷"},{"annotation":"flag: Palestinian Territories","group":9,"hexcode":"1F1F5-1F1F8","order":4518,"tags":["PS","flag"],"unicode":"🇵🇸"},{"annotation":"flag: Portugal","group":9,"hexcode":"1F1F5-1F1F9","order":4519,"tags":["PT","flag"],"unicode":"🇵🇹"},{"annotation":"flag: Palau","group":9,"hexcode":"1F1F5-1F1FC","order":4520,"tags":["PW","flag"],"unicode":"🇵🇼"},{"annotation":"flag: Paraguay","group":9,"hexcode":"1F1F5-1F1FE","order":4521,"tags":["PY","flag"],"unicode":"🇵🇾"},{"annotation":"flag: Qatar","group":9,"hexcode":"1F1F6-1F1E6","order":4522,"tags":["QA","flag"],"unicode":"🇶🇦"},{"annotation":"flag: Réunion","group":9,"hexcode":"1F1F7-1F1EA","order":4523,"tags":["RE","flag"],"unicode":"🇷🇪"},{"annotation":"flag: Romania","group":9,"hexcode":"1F1F7-1F1F4","order":4524,"tags":["RO","flag"],"unicode":"🇷🇴"},{"annotation":"flag: Serbia","group":9,"hexcode":"1F1F7-1F1F8","order":4525,"tags":["RS","flag"],"unicode":"🇷🇸"},{"annotation":"flag: Russia","group":9,"hexcode":"1F1F7-1F1FA","order":4526,"tags":["RU","flag"],"unicode":"🇷🇺"},{"annotation":"flag: Rwanda","group":9,"hexcode":"1F1F7-1F1FC","order":4527,"tags":["RW","flag"],"unicode":"🇷🇼"},{"annotation":"flag: Saudi Arabia","group":9,"hexcode":"1F1F8-1F1E6","order":4528,"tags":["SA","flag"],"unicode":"🇸🇦"},{"annotation":"flag: Solomon Islands","group":9,"hexcode":"1F1F8-1F1E7","order":4529,"tags":["SB","flag"],"unicode":"🇸🇧"},{"annotation":"flag: Seychelles","group":9,"hexcode":"1F1F8-1F1E8","order":4530,"tags":["SC","flag"],"unicode":"🇸🇨"},{"annotation":"flag: Sudan","group":9,"hexcode":"1F1F8-1F1E9","order":4531,"tags":["SD","flag"],"unicode":"🇸🇩"},{"annotation":"flag: Sweden","group":9,"hexcode":"1F1F8-1F1EA","order":4532,"tags":["SE","flag"],"unicode":"🇸🇪"},{"annotation":"flag: Singapore","group":9,"hexcode":"1F1F8-1F1EC","order":4533,"tags":["SG","flag"],"unicode":"🇸🇬"},{"annotation":"flag: St. Helena","group":9,"hexcode":"1F1F8-1F1ED","order":4534,"tags":["SH","flag"],"unicode":"🇸🇭"},{"annotation":"flag: Slovenia","group":9,"hexcode":"1F1F8-1F1EE","order":4535,"tags":["SI","flag"],"unicode":"🇸🇮"},{"annotation":"flag: Svalbard & Jan Mayen","group":9,"hexcode":"1F1F8-1F1EF","order":4536,"tags":["SJ","flag"],"unicode":"🇸🇯"},{"annotation":"flag: Slovakia","group":9,"hexcode":"1F1F8-1F1F0","order":4537,"tags":["SK","flag"],"unicode":"🇸🇰"},{"annotation":"flag: Sierra Leone","group":9,"hexcode":"1F1F8-1F1F1","order":4538,"tags":["SL","flag"],"unicode":"🇸🇱"},{"annotation":"flag: San Marino","group":9,"hexcode":"1F1F8-1F1F2","order":4539,"tags":["SM","flag"],"unicode":"🇸🇲"},{"annotation":"flag: Senegal","group":9,"hexcode":"1F1F8-1F1F3","order":4540,"tags":["SN","flag"],"unicode":"🇸🇳"},{"annotation":"flag: Somalia","group":9,"hexcode":"1F1F8-1F1F4","order":4541,"tags":["SO","flag"],"unicode":"🇸🇴"},{"annotation":"flag: Suriname","group":9,"hexcode":"1F1F8-1F1F7","order":4542,"tags":["SR","flag"],"unicode":"🇸🇷"},{"annotation":"flag: South Sudan","group":9,"hexcode":"1F1F8-1F1F8","order":4543,"tags":["SS","flag"],"unicode":"🇸🇸"},{"annotation":"flag: São Tomé & Príncipe","group":9,"hexcode":"1F1F8-1F1F9","order":4544,"tags":["ST","flag"],"unicode":"🇸🇹"},{"annotation":"flag: El Salvador","group":9,"hexcode":"1F1F8-1F1FB","order":4545,"tags":["SV","flag"],"unicode":"🇸🇻"},{"annotation":"flag: Sint Maarten","group":9,"hexcode":"1F1F8-1F1FD","order":4546,"tags":["SX","flag"],"unicode":"🇸🇽"},{"annotation":"flag: Syria","group":9,"hexcode":"1F1F8-1F1FE","order":4547,"tags":["SY","flag"],"unicode":"🇸🇾"},{"annotation":"flag: Eswatini","group":9,"hexcode":"1F1F8-1F1FF","order":4548,"tags":["SZ","flag"],"unicode":"🇸🇿"},{"annotation":"flag: Tristan da Cunha","group":9,"hexcode":"1F1F9-1F1E6","order":4549,"tags":["TA","flag"],"unicode":"🇹🇦"},{"annotation":"flag: Turks & Caicos Islands","group":9,"hexcode":"1F1F9-1F1E8","order":4550,"tags":["TC","flag"],"unicode":"🇹🇨"},{"annotation":"flag: Chad","group":9,"hexcode":"1F1F9-1F1E9","order":4551,"tags":["TD","flag"],"unicode":"🇹🇩"},{"annotation":"flag: French Southern Territories","group":9,"hexcode":"1F1F9-1F1EB","order":4552,"tags":["TF","flag"],"unicode":"🇹🇫"},{"annotation":"flag: Togo","group":9,"hexcode":"1F1F9-1F1EC","order":4553,"tags":["TG","flag"],"unicode":"🇹🇬"},{"annotation":"flag: Thailand","group":9,"hexcode":"1F1F9-1F1ED","order":4554,"tags":["TH","flag"],"unicode":"🇹🇭"},{"annotation":"flag: Tajikistan","group":9,"hexcode":"1F1F9-1F1EF","order":4555,"tags":["TJ","flag"],"unicode":"🇹🇯"},{"annotation":"flag: Tokelau","group":9,"hexcode":"1F1F9-1F1F0","order":4556,"tags":["TK","flag"],"unicode":"🇹🇰"},{"annotation":"flag: Timor-Leste","group":9,"hexcode":"1F1F9-1F1F1","order":4557,"tags":["TL","flag"],"unicode":"🇹🇱"},{"annotation":"flag: Turkmenistan","group":9,"hexcode":"1F1F9-1F1F2","order":4558,"tags":["TM","flag"],"unicode":"🇹🇲"},{"annotation":"flag: Tunisia","group":9,"hexcode":"1F1F9-1F1F3","order":4559,"tags":["TN","flag"],"unicode":"🇹🇳"},{"annotation":"flag: Tonga","group":9,"hexcode":"1F1F9-1F1F4","order":4560,"tags":["TO","flag"],"unicode":"🇹🇴"},{"annotation":"flag: Turkey","group":9,"hexcode":"1F1F9-1F1F7","order":4561,"tags":["TR","flag"],"unicode":"🇹🇷"},{"annotation":"flag: Trinidad & Tobago","group":9,"hexcode":"1F1F9-1F1F9","order":4562,"tags":["TT","flag"],"unicode":"🇹🇹"},{"annotation":"flag: Tuvalu","group":9,"hexcode":"1F1F9-1F1FB","order":4563,"tags":["TV","flag"],"unicode":"🇹🇻"},{"annotation":"flag: Taiwan","group":9,"hexcode":"1F1F9-1F1FC","order":4564,"tags":["TW","flag"],"unicode":"🇹🇼"},{"annotation":"flag: Tanzania","group":9,"hexcode":"1F1F9-1F1FF","order":4565,"tags":["TZ","flag"],"unicode":"🇹🇿"},{"annotation":"flag: Ukraine","group":9,"hexcode":"1F1FA-1F1E6","order":4566,"tags":["UA","flag"],"unicode":"🇺🇦"},{"annotation":"flag: Uganda","group":9,"hexcode":"1F1FA-1F1EC","order":4567,"tags":["UG","flag"],"unicode":"🇺🇬"},{"annotation":"flag: U.S. Outlying Islands","group":9,"hexcode":"1F1FA-1F1F2","order":4568,"tags":["UM","flag"],"unicode":"🇺🇲"},{"annotation":"flag: United Nations","group":9,"hexcode":"1F1FA-1F1F3","order":4569,"tags":["UN","flag"],"unicode":"🇺🇳"},{"annotation":"flag: United States","group":9,"hexcode":"1F1FA-1F1F8","order":4570,"tags":["US","flag"],"unicode":"🇺🇸"},{"annotation":"flag: Uruguay","group":9,"hexcode":"1F1FA-1F1FE","order":4571,"tags":["UY","flag"],"unicode":"🇺🇾"},{"annotation":"flag: Uzbekistan","group":9,"hexcode":"1F1FA-1F1FF","order":4572,"tags":["UZ","flag"],"unicode":"🇺🇿"},{"annotation":"flag: Vatican City","group":9,"hexcode":"1F1FB-1F1E6","order":4573,"tags":["VA","flag"],"unicode":"🇻🇦"},{"annotation":"flag: St. Vincent & Grenadines","group":9,"hexcode":"1F1FB-1F1E8","order":4574,"tags":["VC","flag"],"unicode":"🇻🇨"},{"annotation":"flag: Venezuela","group":9,"hexcode":"1F1FB-1F1EA","order":4575,"tags":["VE","flag"],"unicode":"🇻🇪"},{"annotation":"flag: British Virgin Islands","group":9,"hexcode":"1F1FB-1F1EC","order":4576,"tags":["VG","flag"],"unicode":"🇻🇬"},{"annotation":"flag: U.S. Virgin Islands","group":9,"hexcode":"1F1FB-1F1EE","order":4577,"tags":["VI","flag"],"unicode":"🇻🇮"},{"annotation":"flag: Vietnam","group":9,"hexcode":"1F1FB-1F1F3","order":4578,"tags":["VN","flag"],"unicode":"🇻🇳"},{"annotation":"flag: Vanuatu","group":9,"hexcode":"1F1FB-1F1FA","order":4579,"tags":["VU","flag"],"unicode":"🇻🇺"},{"annotation":"flag: Wallis & Futuna","group":9,"hexcode":"1F1FC-1F1EB","order":4580,"tags":["WF","flag"],"unicode":"🇼🇫"},{"annotation":"flag: Samoa","group":9,"hexcode":"1F1FC-1F1F8","order":4581,"tags":["WS","flag"],"unicode":"🇼🇸"},{"annotation":"flag: Kosovo","group":9,"hexcode":"1F1FD-1F1F0","order":4582,"tags":["XK","flag"],"unicode":"🇽🇰"},{"annotation":"flag: Yemen","group":9,"hexcode":"1F1FE-1F1EA","order":4583,"tags":["YE","flag"],"unicode":"🇾🇪"},{"annotation":"flag: Mayotte","group":9,"hexcode":"1F1FE-1F1F9","order":4584,"tags":["YT","flag"],"unicode":"🇾🇹"},{"annotation":"flag: South Africa","group":9,"hexcode":"1F1FF-1F1E6","order":4585,"tags":["ZA","flag"],"unicode":"🇿🇦"},{"annotation":"flag: Zambia","group":9,"hexcode":"1F1FF-1F1F2","order":4586,"tags":["ZM","flag"],"unicode":"🇿🇲"},{"annotation":"flag: Zimbabwe","group":9,"hexcode":"1F1FF-1F1FC","order":4587,"tags":["ZW","flag"],"unicode":"🇿🇼"},{"annotation":"flag: England","group":9,"hexcode":"1F3F4-E0067-E0062-E0065-E006E-E0067-E007F","order":4588,"tags":["flag","gbeng"],"unicode":"🏴"},{"annotation":"flag: Scotland","group":9,"hexcode":"1F3F4-E0067-E0062-E0073-E0063-E0074-E007F","order":4589,"tags":["flag","gbsct"],"unicode":"🏴"},{"annotation":"flag: Wales","group":9,"hexcode":"1F3F4-E0067-E0062-E0077-E006C-E0073-E007F","order":4590,"tags":["flag","gbwls"],"unicode":"🏴"}]')},function(e){e.exports=JSON.parse('{"2049":"interrobang","2122":"tm","2139":"information_source","2194":"left_right_arrow","2195":"arrow_up_down","2196":"arrow_upper_left","2197":"arrow_upper_right","2198":"arrow_lower_right","2199":"arrow_lower_left","2328":"keyboard","2600":"sunny","2601":"cloud","2602":"umbrella","2603":"snowman","2604":"comet","2611":"ballot_box_with_check","2614":"umbrella_with_rain_drops","2615":"coffee","2618":"shamrock","2620":"skull_and_crossbones","2622":"radioactive_sign","2623":"biohazard_sign","2626":"orthodox_cross","2638":"wheel_of_dharma","2639":"white_frowning_face","2640":"female_sign","2642":"male_sign","2648":"aries","2649":"taurus","2650":"sagittarius","2651":"capricorn","2652":"aquarius","2653":"pisces","2660":"spades","2663":"clubs","2665":"hearts","2666":"diamonds","2668":"hotsprings","2692":"hammer_and_pick","2693":"anchor","2694":"crossed_swords","2695":["medical_symbol","staff_of_aesculapius"],"2696":"scales","2697":"alembic","2699":"gear","2702":"scissors","2705":"white_check_mark","2708":"airplane","2709":["email","envelope"],"2712":"black_nib","2714":"heavy_check_mark","2716":"heavy_multiplication_x","2721":"star_of_david","2728":"sparkles","2733":"eight_spoked_asterisk","2734":"eight_pointed_black_star","2744":"snowflake","2747":"sparkle","2753":"question","2754":"grey_question","2755":"grey_exclamation","2757":["exclamation","heavy_exclamation_mark"],"2763":"heavy_heart_exclamation_mark_ornament","2764":"heart","2795":"heavy_plus_sign","2796":"heavy_minus_sign","2797":"heavy_division_sign","2934":"arrow_heading_up","2935":"arrow_heading_down","3030":"wavy_dash","3297":"congratulations","3299":"secret","0023-FE0F-20E3":"hash","002A-FE0F-20E3":"keycap_star","0030-FE0F-20E3":"zero","0031-FE0F-20E3":"one","0032-FE0F-20E3":"two","0033-FE0F-20E3":"three","0034-FE0F-20E3":"four","0035-FE0F-20E3":"five","0036-FE0F-20E3":"six","0037-FE0F-20E3":"seven","0038-FE0F-20E3":"eight","0039-FE0F-20E3":"nine","00A9":"copyright","00AE":"registered","1F004":"mahjong","1F0CF":"black_joker","1F170":"a","1F171":"b","1F17E":"o2","1F17F":"parking","1F18E":"ab","1F191":"cl","1F192":"cool","1F193":"free","1F194":"id","1F195":"new","1F196":"ng","1F197":"ok","1F198":"sos","1F199":"up","1F19A":"vs","1F1E6-1F1E8":"flag-ac","1F1E6-1F1E9":"flag-ad","1F1E6-1F1EA":"flag-ae","1F1E6-1F1EB":"flag-af","1F1E6-1F1EC":"flag-ag","1F1E6-1F1EE":"flag-ai","1F1E6-1F1F1":"flag-al","1F1E6-1F1F2":"flag-am","1F1E6-1F1F4":"flag-ao","1F1E6-1F1F6":"flag-aq","1F1E6-1F1F7":"flag-ar","1F1E6-1F1F8":"flag-as","1F1E6-1F1F9":"flag-at","1F1E6-1F1FA":"flag-au","1F1E6-1F1FC":"flag-aw","1F1E6-1F1FD":"flag-ax","1F1E6-1F1FF":"flag-az","1F1E7-1F1E6":"flag-ba","1F1E7-1F1E7":"flag-bb","1F1E7-1F1E9":"flag-bd","1F1E7-1F1EA":"flag-be","1F1E7-1F1EB":"flag-bf","1F1E7-1F1EC":"flag-bg","1F1E7-1F1ED":"flag-bh","1F1E7-1F1EE":"flag-bi","1F1E7-1F1EF":"flag-bj","1F1E7-1F1F1":"flag-bl","1F1E7-1F1F2":"flag-bm","1F1E7-1F1F3":"flag-bn","1F1E7-1F1F4":"flag-bo","1F1E7-1F1F6":"flag-bq","1F1E7-1F1F7":"flag-br","1F1E7-1F1F8":"flag-bs","1F1E7-1F1F9":"flag-bt","1F1E7-1F1FB":"flag-bv","1F1E7-1F1FC":"flag-bw","1F1E7-1F1FE":"flag-by","1F1E7-1F1FF":"flag-bz","1F1E8-1F1E6":"flag-ca","1F1E8-1F1E8":"flag-cc","1F1E8-1F1E9":"flag-cd","1F1E8-1F1EB":"flag-cf","1F1E8-1F1EC":"flag-cg","1F1E8-1F1ED":"flag-ch","1F1E8-1F1EE":"flag-ci","1F1E8-1F1F0":"flag-ck","1F1E8-1F1F1":"flag-cl","1F1E8-1F1F2":"flag-cm","1F1E8-1F1F3":["cn","flag-cn"],"1F1E8-1F1F4":"flag-co","1F1E8-1F1F5":"flag-cp","1F1E8-1F1F7":"flag-cr","1F1E8-1F1FA":"flag-cu","1F1E8-1F1FB":"flag-cv","1F1E8-1F1FC":"flag-cw","1F1E8-1F1FD":"flag-cx","1F1E8-1F1FE":"flag-cy","1F1E8-1F1FF":"flag-cz","1F1E9-1F1EA":["de","flag-de"],"1F1E9-1F1EC":"flag-dg","1F1E9-1F1EF":"flag-dj","1F1E9-1F1F0":"flag-dk","1F1E9-1F1F2":"flag-dm","1F1E9-1F1F4":"flag-do","1F1E9-1F1FF":"flag-dz","1F1EA-1F1E6":"flag-ea","1F1EA-1F1E8":"flag-ec","1F1EA-1F1EA":"flag-ee","1F1EA-1F1EC":"flag-eg","1F1EA-1F1ED":"flag-eh","1F1EA-1F1F7":"flag-er","1F1EA-1F1F8":["es","flag-es"],"1F1EA-1F1F9":"flag-et","1F1EA-1F1FA":"flag-eu","1F1EB-1F1EE":"flag-fi","1F1EB-1F1EF":"flag-fj","1F1EB-1F1F0":"flag-fk","1F1EB-1F1F2":"flag-fm","1F1EB-1F1F4":"flag-fo","1F1EB-1F1F7":["fr","flag-fr"],"1F1EC-1F1E6":"flag-ga","1F1EC-1F1E7":["gb","uk","flag-gb"],"1F1EC-1F1E9":"flag-gd","1F1EC-1F1EA":"flag-ge","1F1EC-1F1EB":"flag-gf","1F1EC-1F1EC":"flag-gg","1F1EC-1F1ED":"flag-gh","1F1EC-1F1EE":"flag-gi","1F1EC-1F1F1":"flag-gl","1F1EC-1F1F2":"flag-gm","1F1EC-1F1F3":"flag-gn","1F1EC-1F1F5":"flag-gp","1F1EC-1F1F6":"flag-gq","1F1EC-1F1F7":"flag-gr","1F1EC-1F1F8":"flag-gs","1F1EC-1F1F9":"flag-gt","1F1EC-1F1FA":"flag-gu","1F1EC-1F1FC":"flag-gw","1F1EC-1F1FE":"flag-gy","1F1ED-1F1F0":"flag-hk","1F1ED-1F1F2":"flag-hm","1F1ED-1F1F3":"flag-hn","1F1ED-1F1F7":"flag-hr","1F1ED-1F1F9":"flag-ht","1F1ED-1F1FA":"flag-hu","1F1EE-1F1E8":"flag-ic","1F1EE-1F1E9":"flag-id","1F1EE-1F1EA":"flag-ie","1F1EE-1F1F1":"flag-il","1F1EE-1F1F2":"flag-im","1F1EE-1F1F3":"flag-in","1F1EE-1F1F4":"flag-io","1F1EE-1F1F6":"flag-iq","1F1EE-1F1F7":"flag-ir","1F1EE-1F1F8":"flag-is","1F1EE-1F1F9":["it","flag-it"],"1F1EF-1F1EA":"flag-je","1F1EF-1F1F2":"flag-jm","1F1EF-1F1F4":"flag-jo","1F1EF-1F1F5":["jp","flag-jp"],"1F1F0-1F1EA":"flag-ke","1F1F0-1F1EC":"flag-kg","1F1F0-1F1ED":"flag-kh","1F1F0-1F1EE":"flag-ki","1F1F0-1F1F2":"flag-km","1F1F0-1F1F3":"flag-kn","1F1F0-1F1F5":"flag-kp","1F1F0-1F1F7":["kr","flag-kr"],"1F1F0-1F1FC":"flag-kw","1F1F0-1F1FE":"flag-ky","1F1F0-1F1FF":"flag-kz","1F1F1-1F1E6":"flag-la","1F1F1-1F1E7":"flag-lb","1F1F1-1F1E8":"flag-lc","1F1F1-1F1EE":"flag-li","1F1F1-1F1F0":"flag-lk","1F1F1-1F1F7":"flag-lr","1F1F1-1F1F8":"flag-ls","1F1F1-1F1F9":"flag-lt","1F1F1-1F1FA":"flag-lu","1F1F1-1F1FB":"flag-lv","1F1F1-1F1FE":"flag-ly","1F1F2-1F1E6":"flag-ma","1F1F2-1F1E8":"flag-mc","1F1F2-1F1E9":"flag-md","1F1F2-1F1EA":"flag-me","1F1F2-1F1EB":"flag-mf","1F1F2-1F1EC":"flag-mg","1F1F2-1F1ED":"flag-mh","1F1F2-1F1F0":"flag-mk","1F1F2-1F1F1":"flag-ml","1F1F2-1F1F2":"flag-mm","1F1F2-1F1F3":"flag-mn","1F1F2-1F1F4":"flag-mo","1F1F2-1F1F5":"flag-mp","1F1F2-1F1F6":"flag-mq","1F1F2-1F1F7":"flag-mr","1F1F2-1F1F8":"flag-ms","1F1F2-1F1F9":"flag-mt","1F1F2-1F1FA":"flag-mu","1F1F2-1F1FB":"flag-mv","1F1F2-1F1FC":"flag-mw","1F1F2-1F1FD":"flag-mx","1F1F2-1F1FE":"flag-my","1F1F2-1F1FF":"flag-mz","1F1F3-1F1E6":"flag-na","1F1F3-1F1E8":"flag-nc","1F1F3-1F1EA":"flag-ne","1F1F3-1F1EB":"flag-nf","1F1F3-1F1EC":"flag-ng","1F1F3-1F1EE":"flag-ni","1F1F3-1F1F1":"flag-nl","1F1F3-1F1F4":"flag-no","1F1F3-1F1F5":"flag-np","1F1F3-1F1F7":"flag-nr","1F1F3-1F1FA":"flag-nu","1F1F3-1F1FF":"flag-nz","1F1F4-1F1F2":"flag-om","1F1F5-1F1E6":"flag-pa","1F1F5-1F1EA":"flag-pe","1F1F5-1F1EB":"flag-pf","1F1F5-1F1EC":"flag-pg","1F1F5-1F1ED":"flag-ph","1F1F5-1F1F0":"flag-pk","1F1F5-1F1F1":"flag-pl","1F1F5-1F1F2":"flag-pm","1F1F5-1F1F3":"flag-pn","1F1F5-1F1F7":"flag-pr","1F1F5-1F1F8":"flag-ps","1F1F5-1F1F9":"flag-pt","1F1F5-1F1FC":"flag-pw","1F1F5-1F1FE":"flag-py","1F1F6-1F1E6":"flag-qa","1F1F7-1F1EA":"flag-re","1F1F7-1F1F4":"flag-ro","1F1F7-1F1F8":"flag-rs","1F1F7-1F1FA":["ru","flag-ru"],"1F1F7-1F1FC":"flag-rw","1F1F8-1F1E6":"flag-sa","1F1F8-1F1E7":"flag-sb","1F1F8-1F1E8":"flag-sc","1F1F8-1F1E9":"flag-sd","1F1F8-1F1EA":"flag-se","1F1F8-1F1EC":"flag-sg","1F1F8-1F1ED":"flag-sh","1F1F8-1F1EE":"flag-si","1F1F8-1F1EF":"flag-sj","1F1F8-1F1F0":"flag-sk","1F1F8-1F1F1":"flag-sl","1F1F8-1F1F2":"flag-sm","1F1F8-1F1F3":"flag-sn","1F1F8-1F1F4":"flag-so","1F1F8-1F1F7":"flag-sr","1F1F8-1F1F8":"flag-ss","1F1F8-1F1F9":"flag-st","1F1F8-1F1FB":"flag-sv","1F1F8-1F1FD":"flag-sx","1F1F8-1F1FE":"flag-sy","1F1F8-1F1FF":"flag-sz","1F1F9-1F1E6":"flag-ta","1F1F9-1F1E8":"flag-tc","1F1F9-1F1E9":"flag-td","1F1F9-1F1EB":"flag-tf","1F1F9-1F1EC":"flag-tg","1F1F9-1F1ED":"flag-th","1F1F9-1F1EF":"flag-tj","1F1F9-1F1F0":"flag-tk","1F1F9-1F1F1":"flag-tl","1F1F9-1F1F2":"flag-tm","1F1F9-1F1F3":"flag-tn","1F1F9-1F1F4":"flag-to","1F1F9-1F1F7":"flag-tr","1F1F9-1F1F9":"flag-tt","1F1F9-1F1FB":"flag-tv","1F1F9-1F1FC":"flag-tw","1F1F9-1F1FF":"flag-tz","1F1FA-1F1E6":"flag-ua","1F1FA-1F1EC":"flag-ug","1F1FA-1F1F2":"flag-um","1F1FA-1F1F3":"flag-un","1F1FA-1F1F8":["us","flag-us"],"1F1FA-1F1FE":"flag-uy","1F1FA-1F1FF":"flag-uz","1F1FB-1F1E6":"flag-va","1F1FB-1F1E8":"flag-vc","1F1FB-1F1EA":"flag-ve","1F1FB-1F1EC":"flag-vg","1F1FB-1F1EE":"flag-vi","1F1FB-1F1F3":"flag-vn","1F1FB-1F1FA":"flag-vu","1F1FC-1F1EB":"flag-wf","1F1FC-1F1F8":"flag-ws","1F1FD-1F1F0":"flag-xk","1F1FE-1F1EA":"flag-ye","1F1FE-1F1F9":"flag-yt","1F1FF-1F1E6":"flag-za","1F1FF-1F1F2":"flag-zm","1F1FF-1F1FC":"flag-zw","1F201":"koko","1F202":"sa","1F21A":"u7121","1F22F":"u6307","1F232":"u7981","1F233":"u7a7a","1F234":"u5408","1F235":"u6e80","1F236":"u6709","1F237":"u6708","1F238":"u7533","1F239":"u5272","1F23A":"u55b6","1F250":"ideograph_advantage","1F251":"accept","1F300":"cyclone","1F301":"foggy","1F302":"closed_umbrella","1F303":"night_with_stars","1F304":"sunrise_over_mountains","1F305":"sunrise","1F306":"city_sunset","1F307":"city_sunrise","1F308":"rainbow","1F309":"bridge_at_night","1F30A":"ocean","1F30B":"volcano","1F30C":"milky_way","1F30D":"earth_africa","1F30E":"earth_americas","1F30F":"earth_asia","1F310":"globe_with_meridians","1F311":"new_moon","1F312":"waxing_crescent_moon","1F313":"first_quarter_moon","1F314":["moon","waxing_gibbous_moon"],"1F315":"full_moon","1F316":"waning_gibbous_moon","1F317":"last_quarter_moon","1F318":"waning_crescent_moon","1F319":"crescent_moon","1F31A":"new_moon_with_face","1F31B":"first_quarter_moon_with_face","1F31C":"last_quarter_moon_with_face","1F31D":"full_moon_with_face","1F31E":"sun_with_face","1F31F":"star2","1F320":"stars","1F321":"thermometer","1F324":["mostly_sunny","sun_small_cloud"],"1F325":["barely_sunny","sun_behind_cloud"],"1F326":["partly_sunny_rain","sun_behind_rain_cloud"],"1F327":"rain_cloud","1F328":"snow_cloud","1F329":["lightning","lightning_cloud"],"1F32A":["tornado","tornado_cloud"],"1F32B":"fog","1F32C":"wind_blowing_face","1F32D":"hotdog","1F32E":"taco","1F32F":"burrito","1F330":"chestnut","1F331":"seedling","1F332":"evergreen_tree","1F333":"deciduous_tree","1F334":"palm_tree","1F335":"cactus","1F336":"hot_pepper","1F337":"tulip","1F338":"cherry_blossom","1F339":"rose","1F33A":"hibiscus","1F33B":"sunflower","1F33C":"blossom","1F33D":"corn","1F33E":"ear_of_rice","1F33F":"herb","1F340":"four_leaf_clover","1F341":"maple_leaf","1F342":"fallen_leaf","1F343":"leaves","1F344":"mushroom","1F345":"tomato","1F346":"eggplant","1F347":"grapes","1F348":"melon","1F349":"watermelon","1F34A":"tangerine","1F34B":"lemon","1F34C":"banana","1F34D":"pineapple","1F34E":"apple","1F34F":"green_apple","1F350":"pear","1F351":"peach","1F352":"cherries","1F353":"strawberry","1F354":"hamburger","1F355":"pizza","1F356":"meat_on_bone","1F357":"poultry_leg","1F358":"rice_cracker","1F359":"rice_ball","1F35A":"rice","1F35B":"curry","1F35C":"ramen","1F35D":"spaghetti","1F35E":"bread","1F35F":"fries","1F360":"sweet_potato","1F361":"dango","1F362":"oden","1F363":"sushi","1F364":"fried_shrimp","1F365":"fish_cake","1F366":"icecream","1F367":"shaved_ice","1F368":"ice_cream","1F369":"doughnut","1F36A":"cookie","1F36B":"chocolate_bar","1F36C":"candy","1F36D":"lollipop","1F36E":"custard","1F36F":"honey_pot","1F370":"cake","1F371":"bento","1F372":"stew","1F373":["fried_egg","cooking"],"1F374":"fork_and_knife","1F375":"tea","1F376":"sake","1F377":"wine_glass","1F378":"cocktail","1F379":"tropical_drink","1F37A":"beer","1F37B":"beers","1F37C":"baby_bottle","1F37D":"knife_fork_plate","1F37E":"champagne","1F37F":"popcorn","1F380":"ribbon","1F381":"gift","1F382":"birthday","1F383":"jack_o_lantern","1F384":"christmas_tree","1F385":"santa","1F386":"fireworks","1F387":"sparkler","1F388":"balloon","1F389":"tada","1F38A":"confetti_ball","1F38B":"tanabata_tree","1F38C":"crossed_flags","1F38D":"bamboo","1F38E":"dolls","1F38F":"flags","1F390":"wind_chime","1F391":"rice_scene","1F392":"school_satchel","1F393":"mortar_board","1F396":"medal","1F397":"reminder_ribbon","1F399":"studio_microphone","1F39A":"level_slider","1F39B":"control_knobs","1F39E":"film_frames","1F39F":"admission_tickets","1F3A0":"carousel_horse","1F3A1":"ferris_wheel","1F3A2":"roller_coaster","1F3A3":"fishing_pole_and_fish","1F3A4":"microphone","1F3A5":"movie_camera","1F3A6":"cinema","1F3A7":"headphones","1F3A8":"art","1F3A9":"tophat","1F3AA":"circus_tent","1F3AB":"ticket","1F3AC":"clapper","1F3AD":"performing_arts","1F3AE":"video_game","1F3AF":"dart","1F3B0":"slot_machine","1F3B1":"8ball","1F3B2":"game_die","1F3B3":"bowling","1F3B4":"flower_playing_cards","1F3B5":"musical_note","1F3B6":"notes","1F3B7":"saxophone","1F3B8":"guitar","1F3B9":"musical_keyboard","1F3BA":"trumpet","1F3BB":"violin","1F3BC":"musical_score","1F3BD":"running_shirt_with_sash","1F3BE":"tennis","1F3BF":"ski","1F3C0":"basketball","1F3C1":"checkered_flag","1F3C2":"snowboarder","1F3C3-200D-2640-FE0F":"woman-running","1F3C3-200D-2642-FE0F":"man-running","1F3C3":["runner","running"],"1F3C4-200D-2640-FE0F":"woman-surfing","1F3C4-200D-2642-FE0F":"man-surfing","1F3C4":"surfer","1F3C5":"sports_medal","1F3C6":"trophy","1F3C7":"horse_racing","1F3C8":"football","1F3C9":"rugby_football","1F3CA-200D-2640-FE0F":"woman-swimming","1F3CA-200D-2642-FE0F":"man-swimming","1F3CA":"swimmer","1F3CB-FE0F-200D-2640-FE0F":"woman-lifting-weights","1F3CB-FE0F-200D-2642-FE0F":"man-lifting-weights","1F3CB":"weight_lifter","1F3CC-FE0F-200D-2640-FE0F":"woman-golfing","1F3CC-FE0F-200D-2642-FE0F":"man-golfing","1F3CC":"golfer","1F3CD":"racing_motorcycle","1F3CE":"racing_car","1F3CF":"cricket_bat_and_ball","1F3D0":"volleyball","1F3D1":"field_hockey_stick_and_ball","1F3D2":"ice_hockey_stick_and_puck","1F3D3":"table_tennis_paddle_and_ball","1F3D4":"snow_capped_mountain","1F3D5":"camping","1F3D6":"beach_with_umbrella","1F3D7":"building_construction","1F3D8":"house_buildings","1F3D9":"cityscape","1F3DA":"derelict_house_building","1F3DB":"classical_building","1F3DC":"desert","1F3DD":"desert_island","1F3DE":"national_park","1F3DF":"stadium","1F3E0":"house","1F3E1":"house_with_garden","1F3E2":"office","1F3E3":"post_office","1F3E4":"european_post_office","1F3E5":"hospital","1F3E6":"bank","1F3E7":"atm","1F3E8":"hotel","1F3E9":"love_hotel","1F3EA":"convenience_store","1F3EB":"school","1F3EC":"department_store","1F3ED":"factory","1F3EE":["izakaya_lantern","lantern"],"1F3EF":"japanese_castle","1F3F0":"european_castle","1F3F3-FE0F-200D-1F308":"rainbow-flag","1F3F3-FE0F-200D-26A7-FE0F":"transgender_flag","1F3F3":"waving_white_flag","1F3F4-200D-2620-FE0F":"pirate_flag","1F3F4-E0067-E0062-E0065-E006E-E0067-E007F":"flag-england","1F3F4-E0067-E0062-E0073-E0063-E0074-E007F":"flag-scotland","1F3F4-E0067-E0062-E0077-E006C-E0073-E007F":"flag-wales","1F3F4":"waving_black_flag","1F3F5":"rosette","1F3F7":"label","1F3F8":"badminton_racquet_and_shuttlecock","1F3F9":"bow_and_arrow","1F3FA":"amphora","1F3FB":"skin-tone-2","1F3FC":"skin-tone-3","1F3FD":"skin-tone-4","1F3FE":"skin-tone-5","1F3FF":"skin-tone-6","1F400":"rat","1F401":"mouse2","1F402":"ox","1F403":"water_buffalo","1F404":"cow2","1F405":"tiger2","1F406":"leopard","1F407":"rabbit2","1F408-200D-2B1B":"black_cat","1F408":"cat2","1F409":"dragon","1F40A":"crocodile","1F40B":"whale2","1F40C":"snail","1F40D":"snake","1F40E":"racehorse","1F40F":"ram","1F410":"goat","1F411":"sheep","1F412":"monkey","1F413":"rooster","1F414":"chicken","1F415-200D-1F9BA":"service_dog","1F415":"dog2","1F416":"pig2","1F417":"boar","1F418":"elephant","1F419":"octopus","1F41A":"shell","1F41B":"bug","1F41C":"ant","1F41D":["bee","honeybee"],"1F41E":["ladybug","lady_beetle"],"1F41F":"fish","1F420":"tropical_fish","1F421":"blowfish","1F422":"turtle","1F423":"hatching_chick","1F424":"baby_chick","1F425":"hatched_chick","1F426":"bird","1F427":"penguin","1F428":"koala","1F429":"poodle","1F42A":"dromedary_camel","1F42B":"camel","1F42C":["dolphin","flipper"],"1F42D":"mouse","1F42E":"cow","1F42F":"tiger","1F430":"rabbit","1F431":"cat","1F432":"dragon_face","1F433":"whale","1F434":"horse","1F435":"monkey_face","1F436":"dog","1F437":"pig","1F438":"frog","1F439":"hamster","1F43A":"wolf","1F43B-200D-2744-FE0F":"polar_bear","1F43B":"bear","1F43C":"panda_face","1F43D":"pig_nose","1F43E":["feet","paw_prints"],"1F43F":"chipmunk","1F440":"eyes","1F441-FE0F-200D-1F5E8-FE0F":"eye-in-speech-bubble","1F441":"eye","1F442":"ear","1F443":"nose","1F444":"lips","1F445":"tongue","1F446":"point_up_2","1F447":"point_down","1F448":"point_left","1F449":"point_right","1F44A":["facepunch","punch"],"1F44B":"wave","1F44C":"ok_hand","1F44D":["+1","thumbsup"],"1F44E":["-1","thumbsdown"],"1F44F":"clap","1F450":"open_hands","1F451":"crown","1F452":"womans_hat","1F453":"eyeglasses","1F454":"necktie","1F455":["shirt","tshirt"],"1F456":"jeans","1F457":"dress","1F458":"kimono","1F459":"bikini","1F45A":"womans_clothes","1F45B":"purse","1F45C":"handbag","1F45D":"pouch","1F45E":["mans_shoe","shoe"],"1F45F":"athletic_shoe","1F460":"high_heel","1F461":"sandal","1F462":"boot","1F463":"footprints","1F464":"bust_in_silhouette","1F465":"busts_in_silhouette","1F466":"boy","1F467":"girl","1F468-200D-1F33E":"male-farmer","1F468-200D-1F373":"male-cook","1F468-200D-1F37C":"man_feeding_baby","1F468-200D-1F393":"male-student","1F468-200D-1F3A4":"male-singer","1F468-200D-1F3A8":"male-artist","1F468-200D-1F3EB":"male-teacher","1F468-200D-1F3ED":"male-factory-worker","1F468-200D-1F466-200D-1F466":"man-boy-boy","1F468-200D-1F466":"man-boy","1F468-200D-1F467-200D-1F466":"man-girl-boy","1F468-200D-1F467-200D-1F467":"man-girl-girl","1F468-200D-1F467":"man-girl","1F468-200D-1F468-200D-1F466":"man-man-boy","1F468-200D-1F468-200D-1F466-200D-1F466":"man-man-boy-boy","1F468-200D-1F468-200D-1F467":"man-man-girl","1F468-200D-1F468-200D-1F467-200D-1F466":"man-man-girl-boy","1F468-200D-1F468-200D-1F467-200D-1F467":"man-man-girl-girl","1F468-200D-1F469-200D-1F466":"man-woman-boy","1F468-200D-1F469-200D-1F466-200D-1F466":"man-woman-boy-boy","1F468-200D-1F469-200D-1F467":"man-woman-girl","1F468-200D-1F469-200D-1F467-200D-1F466":"man-woman-girl-boy","1F468-200D-1F469-200D-1F467-200D-1F467":"man-woman-girl-girl","1F468-200D-1F4BB":"male-technologist","1F468-200D-1F4BC":"male-office-worker","1F468-200D-1F527":"male-mechanic","1F468-200D-1F52C":"male-scientist","1F468-200D-1F680":"male-astronaut","1F468-200D-1F692":"male-firefighter","1F468-200D-1F9AF":"man_with_probing_cane","1F468-200D-1F9B0":"red_haired_man","1F468-200D-1F9B1":"curly_haired_man","1F468-200D-1F9B2":"bald_man","1F468-200D-1F9B3":"white_haired_man","1F468-200D-1F9BC":"man_in_motorized_wheelchair","1F468-200D-1F9BD":"man_in_manual_wheelchair","1F468-200D-2695-FE0F":"male-doctor","1F468-200D-2696-FE0F":"male-judge","1F468-200D-2708-FE0F":"male-pilot","1F468-200D-2764-FE0F-200D-1F468":"man-heart-man","1F468-200D-2764-FE0F-200D-1F48B-200D-1F468":"man-kiss-man","1F468":"man","1F469-200D-1F33E":"female-farmer","1F469-200D-1F373":"female-cook","1F469-200D-1F37C":"woman_feeding_baby","1F469-200D-1F393":"female-student","1F469-200D-1F3A4":"female-singer","1F469-200D-1F3A8":"female-artist","1F469-200D-1F3EB":"female-teacher","1F469-200D-1F3ED":"female-factory-worker","1F469-200D-1F466-200D-1F466":"woman-boy-boy","1F469-200D-1F466":"woman-boy","1F469-200D-1F467-200D-1F466":"woman-girl-boy","1F469-200D-1F467-200D-1F467":"woman-girl-girl","1F469-200D-1F467":"woman-girl","1F469-200D-1F469-200D-1F466":"woman-woman-boy","1F469-200D-1F469-200D-1F466-200D-1F466":"woman-woman-boy-boy","1F469-200D-1F469-200D-1F467":"woman-woman-girl","1F469-200D-1F469-200D-1F467-200D-1F466":"woman-woman-girl-boy","1F469-200D-1F469-200D-1F467-200D-1F467":"woman-woman-girl-girl","1F469-200D-1F4BB":"female-technologist","1F469-200D-1F4BC":"female-office-worker","1F469-200D-1F527":"female-mechanic","1F469-200D-1F52C":"female-scientist","1F469-200D-1F680":"female-astronaut","1F469-200D-1F692":"female-firefighter","1F469-200D-1F9AF":"woman_with_probing_cane","1F469-200D-1F9B0":"red_haired_woman","1F469-200D-1F9B1":"curly_haired_woman","1F469-200D-1F9B2":"bald_woman","1F469-200D-1F9B3":"white_haired_woman","1F469-200D-1F9BC":"woman_in_motorized_wheelchair","1F469-200D-1F9BD":"woman_in_manual_wheelchair","1F469-200D-2695-FE0F":"female-doctor","1F469-200D-2696-FE0F":"female-judge","1F469-200D-2708-FE0F":"female-pilot","1F469-200D-2764-FE0F-200D-1F468":"woman-heart-man","1F469-200D-2764-FE0F-200D-1F469":"woman-heart-woman","1F469-200D-2764-FE0F-200D-1F48B-200D-1F468":"woman-kiss-man","1F469-200D-2764-FE0F-200D-1F48B-200D-1F469":"woman-kiss-woman","1F469":"woman","1F46A":"family","1F46B":["man_and_woman_holding_hands","woman_and_man_holding_hands","couple"],"1F46C":["two_men_holding_hands","men_holding_hands"],"1F46D":["two_women_holding_hands","women_holding_hands"],"1F46E-200D-2640-FE0F":"female-police-officer","1F46E-200D-2642-FE0F":"male-police-officer","1F46E":"cop","1F46F-200D-2640-FE0F":"woman-with-bunny-ears-partying","1F46F-200D-2642-FE0F":"man-with-bunny-ears-partying","1F46F":"dancers","1F470-200D-2640-FE0F":"woman_with_veil","1F470-200D-2642-FE0F":"man_with_veil","1F470":"bride_with_veil","1F471-200D-2640-FE0F":"blond-haired-woman","1F471-200D-2642-FE0F":"blond-haired-man","1F471":"person_with_blond_hair","1F472":"man_with_gua_pi_mao","1F473-200D-2640-FE0F":"woman-wearing-turban","1F473-200D-2642-FE0F":"man-wearing-turban","1F473":"man_with_turban","1F474":"older_man","1F475":"older_woman","1F476":"baby","1F477-200D-2640-FE0F":"female-construction-worker","1F477-200D-2642-FE0F":"male-construction-worker","1F477":"construction_worker","1F478":"princess","1F479":"japanese_ogre","1F47A":"japanese_goblin","1F47B":"ghost","1F47C":"angel","1F47D":"alien","1F47E":"space_invader","1F47F":"imp","1F480":"skull","1F481-200D-2640-FE0F":"woman-tipping-hand","1F481-200D-2642-FE0F":"man-tipping-hand","1F481":"information_desk_person","1F482-200D-2640-FE0F":"female-guard","1F482-200D-2642-FE0F":"male-guard","1F482":"guardsman","1F483":"dancer","1F484":"lipstick","1F485":"nail_care","1F486-200D-2640-FE0F":"woman-getting-massage","1F486-200D-2642-FE0F":"man-getting-massage","1F486":"massage","1F487-200D-2640-FE0F":"woman-getting-haircut","1F487-200D-2642-FE0F":"man-getting-haircut","1F487":"haircut","1F488":"barber","1F489":"syringe","1F48A":"pill","1F48B":"kiss","1F48C":"love_letter","1F48D":"ring","1F48E":"gem","1F48F":"couplekiss","1F490":"bouquet","1F491":"couple_with_heart","1F492":"wedding","1F493":"heartbeat","1F494":"broken_heart","1F495":"two_hearts","1F496":"sparkling_heart","1F497":"heartpulse","1F498":"cupid","1F499":"blue_heart","1F49A":"green_heart","1F49B":"yellow_heart","1F49C":"purple_heart","1F49D":"gift_heart","1F49E":"revolving_hearts","1F49F":"heart_decoration","1F4A0":"diamond_shape_with_a_dot_inside","1F4A1":"bulb","1F4A2":"anger","1F4A3":"bomb","1F4A4":"zzz","1F4A5":["boom","collision"],"1F4A6":"sweat_drops","1F4A7":"droplet","1F4A8":"dash","1F4A9":["hankey","poop","shit"],"1F4AA":"muscle","1F4AB":"dizzy","1F4AC":"speech_balloon","1F4AD":"thought_balloon","1F4AE":"white_flower","1F4AF":"100","1F4B0":"moneybag","1F4B1":"currency_exchange","1F4B2":"heavy_dollar_sign","1F4B3":"credit_card","1F4B4":"yen","1F4B5":"dollar","1F4B6":"euro","1F4B7":"pound","1F4B8":"money_with_wings","1F4B9":"chart","1F4BA":"seat","1F4BB":"computer","1F4BC":"briefcase","1F4BD":"minidisc","1F4BE":"floppy_disk","1F4BF":"cd","1F4C0":"dvd","1F4C1":"file_folder","1F4C2":"open_file_folder","1F4C3":"page_with_curl","1F4C4":"page_facing_up","1F4C5":"date","1F4C6":"calendar","1F4C7":"card_index","1F4C8":"chart_with_upwards_trend","1F4C9":"chart_with_downwards_trend","1F4CA":"bar_chart","1F4CB":"clipboard","1F4CC":"pushpin","1F4CD":"round_pushpin","1F4CE":"paperclip","1F4CF":"straight_ruler","1F4D0":"triangular_ruler","1F4D1":"bookmark_tabs","1F4D2":"ledger","1F4D3":"notebook","1F4D4":"notebook_with_decorative_cover","1F4D5":"closed_book","1F4D6":["book","open_book"],"1F4D7":"green_book","1F4D8":"blue_book","1F4D9":"orange_book","1F4DA":"books","1F4DB":"name_badge","1F4DC":"scroll","1F4DD":["memo","pencil"],"1F4DE":"telephone_receiver","1F4DF":"pager","1F4E0":"fax","1F4E1":"satellite_antenna","1F4E2":"loudspeaker","1F4E3":"mega","1F4E4":"outbox_tray","1F4E5":"inbox_tray","1F4E6":"package","1F4E7":"e-mail","1F4E8":"incoming_envelope","1F4E9":"envelope_with_arrow","1F4EA":"mailbox_closed","1F4EB":"mailbox","1F4EC":"mailbox_with_mail","1F4ED":"mailbox_with_no_mail","1F4EE":"postbox","1F4EF":"postal_horn","1F4F0":"newspaper","1F4F1":"iphone","1F4F2":"calling","1F4F3":"vibration_mode","1F4F4":"mobile_phone_off","1F4F5":"no_mobile_phones","1F4F6":"signal_strength","1F4F7":"camera","1F4F8":"camera_with_flash","1F4F9":"video_camera","1F4FA":"tv","1F4FB":"radio","1F4FC":"vhs","1F4FD":"film_projector","1F4FF":"prayer_beads","1F500":"twisted_rightwards_arrows","1F501":"repeat","1F502":"repeat_one","1F503":"arrows_clockwise","1F504":"arrows_counterclockwise","1F505":"low_brightness","1F506":"high_brightness","1F507":"mute","1F508":"speaker","1F509":"sound","1F50A":"loud_sound","1F50B":"battery","1F50C":"electric_plug","1F50D":"mag","1F50E":"mag_right","1F50F":"lock_with_ink_pen","1F510":"closed_lock_with_key","1F511":"key","1F512":"lock","1F513":"unlock","1F514":"bell","1F515":"no_bell","1F516":"bookmark","1F517":"link","1F518":"radio_button","1F519":"back","1F51A":"end","1F51B":"on","1F51C":"soon","1F51D":"top","1F51E":"underage","1F51F":"keycap_ten","1F520":"capital_abcd","1F521":"abcd","1F522":"1234","1F523":"symbols","1F524":"abc","1F525":"fire","1F526":"flashlight","1F527":"wrench","1F528":"hammer","1F529":"nut_and_bolt","1F52A":["hocho","knife"],"1F52B":"gun","1F52C":"microscope","1F52D":"telescope","1F52E":"crystal_ball","1F52F":"six_pointed_star","1F530":"beginner","1F531":"trident","1F532":"black_square_button","1F533":"white_square_button","1F534":"red_circle","1F535":"large_blue_circle","1F536":"large_orange_diamond","1F537":"large_blue_diamond","1F538":"small_orange_diamond","1F539":"small_blue_diamond","1F53A":"small_red_triangle","1F53B":"small_red_triangle_down","1F53C":"arrow_up_small","1F53D":"arrow_down_small","1F549":"om_symbol","1F54A":"dove_of_peace","1F54B":"kaaba","1F54C":"mosque","1F54D":"synagogue","1F54E":"menorah_with_nine_branches","1F550":"clock1","1F551":"clock2","1F552":"clock3","1F553":"clock4","1F554":"clock5","1F555":"clock6","1F556":"clock7","1F557":"clock8","1F558":"clock9","1F559":"clock10","1F55A":"clock11","1F55B":"clock12","1F55C":"clock130","1F55D":"clock230","1F55E":"clock330","1F55F":"clock430","1F560":"clock530","1F561":"clock630","1F562":"clock730","1F563":"clock830","1F564":"clock930","1F565":"clock1030","1F566":"clock1130","1F567":"clock1230","1F56F":"candle","1F570":"mantelpiece_clock","1F573":"hole","1F574":"man_in_business_suit_levitating","1F575-FE0F-200D-2640-FE0F":"female-detective","1F575-FE0F-200D-2642-FE0F":"male-detective","1F575":"sleuth_or_spy","1F576":"dark_sunglasses","1F577":"spider","1F578":"spider_web","1F579":"joystick","1F57A":"man_dancing","1F587":"linked_paperclips","1F58A":"lower_left_ballpoint_pen","1F58B":"lower_left_fountain_pen","1F58C":"lower_left_paintbrush","1F58D":"lower_left_crayon","1F590":"raised_hand_with_fingers_splayed","1F595":["middle_finger","reversed_hand_with_middle_finger_extended"],"1F596":"spock-hand","1F5A4":"black_heart","1F5A5":"desktop_computer","1F5A8":"printer","1F5B1":"three_button_mouse","1F5B2":"trackball","1F5BC":"frame_with_picture","1F5C2":"card_index_dividers","1F5C3":"card_file_box","1F5C4":"file_cabinet","1F5D1":"wastebasket","1F5D2":"spiral_note_pad","1F5D3":"spiral_calendar_pad","1F5DC":"compression","1F5DD":"old_key","1F5DE":"rolled_up_newspaper","1F5E1":"dagger_knife","1F5E3":"speaking_head_in_silhouette","1F5E8":"left_speech_bubble","1F5EF":"right_anger_bubble","1F5F3":"ballot_box_with_ballot","1F5FA":"world_map","1F5FB":"mount_fuji","1F5FC":"tokyo_tower","1F5FD":"statue_of_liberty","1F5FE":"japan","1F5FF":"moyai","1F600":"grinning","1F601":"grin","1F602":"joy","1F603":"smiley","1F604":"smile","1F605":"sweat_smile","1F606":["laughing","satisfied"],"1F607":"innocent","1F608":"smiling_imp","1F609":"wink","1F60A":"blush","1F60B":"yum","1F60C":"relieved","1F60D":"heart_eyes","1F60E":"sunglasses","1F60F":"smirk","1F610":"neutral_face","1F611":"expressionless","1F612":"unamused","1F613":"sweat","1F614":"pensive","1F615":"confused","1F616":"confounded","1F617":"kissing","1F618":"kissing_heart","1F619":"kissing_smiling_eyes","1F61A":"kissing_closed_eyes","1F61B":"stuck_out_tongue","1F61C":"stuck_out_tongue_winking_eye","1F61D":"stuck_out_tongue_closed_eyes","1F61E":"disappointed","1F61F":"worried","1F620":"angry","1F621":"rage","1F622":"cry","1F623":"persevere","1F624":"triumph","1F625":"disappointed_relieved","1F626":"frowning","1F627":"anguished","1F628":"fearful","1F629":"weary","1F62A":"sleepy","1F62B":"tired_face","1F62C":"grimacing","1F62D":"sob","1F62E":"open_mouth","1F62F":"hushed","1F630":"cold_sweat","1F631":"scream","1F632":"astonished","1F633":"flushed","1F634":"sleeping","1F635":"dizzy_face","1F636":"no_mouth","1F637":"mask","1F638":"smile_cat","1F639":"joy_cat","1F63A":"smiley_cat","1F63B":"heart_eyes_cat","1F63C":"smirk_cat","1F63D":"kissing_cat","1F63E":"pouting_cat","1F63F":"crying_cat_face","1F640":"scream_cat","1F641":"slightly_frowning_face","1F642":"slightly_smiling_face","1F643":"upside_down_face","1F644":"face_with_rolling_eyes","1F645-200D-2640-FE0F":"woman-gesturing-no","1F645-200D-2642-FE0F":"man-gesturing-no","1F645":"no_good","1F646-200D-2640-FE0F":"woman-gesturing-ok","1F646-200D-2642-FE0F":"man-gesturing-ok","1F646":"ok_woman","1F647-200D-2640-FE0F":"woman-bowing","1F647-200D-2642-FE0F":"man-bowing","1F647":"bow","1F648":"see_no_evil","1F649":"hear_no_evil","1F64A":"speak_no_evil","1F64B-200D-2640-FE0F":"woman-raising-hand","1F64B-200D-2642-FE0F":"man-raising-hand","1F64B":"raising_hand","1F64C":"raised_hands","1F64D-200D-2640-FE0F":"woman-frowning","1F64D-200D-2642-FE0F":"man-frowning","1F64D":"person_frowning","1F64E-200D-2640-FE0F":"woman-pouting","1F64E-200D-2642-FE0F":"man-pouting","1F64E":"person_with_pouting_face","1F64F":"pray","1F680":"rocket","1F681":"helicopter","1F682":"steam_locomotive","1F683":"railway_car","1F684":"bullettrain_side","1F685":"bullettrain_front","1F686":"train2","1F687":"metro","1F688":"light_rail","1F689":"station","1F68A":"tram","1F68B":"train","1F68C":"bus","1F68D":"oncoming_bus","1F68E":"trolleybus","1F68F":"busstop","1F690":"minibus","1F691":"ambulance","1F692":"fire_engine","1F693":"police_car","1F694":"oncoming_police_car","1F695":"taxi","1F696":"oncoming_taxi","1F697":["car","red_car"],"1F698":"oncoming_automobile","1F699":"blue_car","1F69A":"truck","1F69B":"articulated_lorry","1F69C":"tractor","1F69D":"monorail","1F69E":"mountain_railway","1F69F":"suspension_railway","1F6A0":"mountain_cableway","1F6A1":"aerial_tramway","1F6A2":"ship","1F6A3-200D-2640-FE0F":"woman-rowing-boat","1F6A3-200D-2642-FE0F":"man-rowing-boat","1F6A3":"rowboat","1F6A4":"speedboat","1F6A5":"traffic_light","1F6A6":"vertical_traffic_light","1F6A7":"construction","1F6A8":"rotating_light","1F6A9":"triangular_flag_on_post","1F6AA":"door","1F6AB":"no_entry_sign","1F6AC":"smoking","1F6AD":"no_smoking","1F6AE":"put_litter_in_its_place","1F6AF":"do_not_litter","1F6B0":"potable_water","1F6B1":"non-potable_water","1F6B2":"bike","1F6B3":"no_bicycles","1F6B4-200D-2640-FE0F":"woman-biking","1F6B4-200D-2642-FE0F":"man-biking","1F6B4":"bicyclist","1F6B5-200D-2640-FE0F":"woman-mountain-biking","1F6B5-200D-2642-FE0F":"man-mountain-biking","1F6B5":"mountain_bicyclist","1F6B6-200D-2640-FE0F":"woman-walking","1F6B6-200D-2642-FE0F":"man-walking","1F6B6":"walking","1F6B7":"no_pedestrians","1F6B8":"children_crossing","1F6B9":"mens","1F6BA":"womens","1F6BB":"restroom","1F6BC":"baby_symbol","1F6BD":"toilet","1F6BE":"wc","1F6BF":"shower","1F6C0":"bath","1F6C1":"bathtub","1F6C2":"passport_control","1F6C3":"customs","1F6C4":"baggage_claim","1F6C5":"left_luggage","1F6CB":"couch_and_lamp","1F6CC":"sleeping_accommodation","1F6CD":"shopping_bags","1F6CE":"bellhop_bell","1F6CF":"bed","1F6D0":"place_of_worship","1F6D1":"octagonal_sign","1F6D2":"shopping_trolley","1F6D5":"hindu_temple","1F6D6":"hut","1F6D7":"elevator","1F6E0":"hammer_and_wrench","1F6E1":"shield","1F6E2":"oil_drum","1F6E3":"motorway","1F6E4":"railway_track","1F6E5":"motor_boat","1F6E9":"small_airplane","1F6EB":"airplane_departure","1F6EC":"airplane_arriving","1F6F0":"satellite","1F6F3":"passenger_ship","1F6F4":"scooter","1F6F5":"motor_scooter","1F6F6":"canoe","1F6F7":"sled","1F6F8":"flying_saucer","1F6F9":"skateboard","1F6FA":"auto_rickshaw","1F6FB":"pickup_truck","1F6FC":"roller_skate","1F7E0":"large_orange_circle","1F7E1":"large_yellow_circle","1F7E2":"large_green_circle","1F7E3":"large_purple_circle","1F7E4":"large_brown_circle","1F7E5":"large_red_square","1F7E6":"large_blue_square","1F7E7":"large_orange_square","1F7E8":"large_yellow_square","1F7E9":"large_green_square","1F7EA":"large_purple_square","1F7EB":"large_brown_square","1F90C":"pinched_fingers","1F90D":"white_heart","1F90E":"brown_heart","1F90F":"pinching_hand","1F910":"zipper_mouth_face","1F911":"money_mouth_face","1F912":"face_with_thermometer","1F913":"nerd_face","1F914":"thinking_face","1F915":"face_with_head_bandage","1F916":"robot_face","1F917":"hugging_face","1F918":["the_horns","sign_of_the_horns"],"1F919":"call_me_hand","1F91A":"raised_back_of_hand","1F91B":"left-facing_fist","1F91C":"right-facing_fist","1F91D":"handshake","1F91E":["crossed_fingers","hand_with_index_and_middle_fingers_crossed"],"1F91F":"i_love_you_hand_sign","1F920":"face_with_cowboy_hat","1F921":"clown_face","1F922":"nauseated_face","1F923":"rolling_on_the_floor_laughing","1F924":"drooling_face","1F925":"lying_face","1F926-200D-2640-FE0F":"woman-facepalming","1F926-200D-2642-FE0F":"man-facepalming","1F926":"face_palm","1F927":"sneezing_face","1F928":["face_with_raised_eyebrow","face_with_one_eyebrow_raised"],"1F929":["star-struck","grinning_face_with_star_eyes"],"1F92A":["zany_face","grinning_face_with_one_large_and_one_small_eye"],"1F92B":["shushing_face","face_with_finger_covering_closed_lips"],"1F92C":["face_with_symbols_on_mouth","serious_face_with_symbols_covering_mouth"],"1F92D":["face_with_hand_over_mouth","smiling_face_with_smiling_eyes_and_hand_covering_mouth"],"1F92E":["face_vomiting","face_with_open_mouth_vomiting"],"1F92F":["exploding_head","shocked_face_with_exploding_head"],"1F930":"pregnant_woman","1F931":"breast-feeding","1F932":"palms_up_together","1F933":"selfie","1F934":"prince","1F935-200D-2640-FE0F":"woman_in_tuxedo","1F935-200D-2642-FE0F":"man_in_tuxedo","1F935":"person_in_tuxedo","1F936":["mrs_claus","mother_christmas"],"1F937-200D-2640-FE0F":"woman-shrugging","1F937-200D-2642-FE0F":"man-shrugging","1F937":"shrug","1F938-200D-2640-FE0F":"woman-cartwheeling","1F938-200D-2642-FE0F":"man-cartwheeling","1F938":"person_doing_cartwheel","1F939-200D-2640-FE0F":"woman-juggling","1F939-200D-2642-FE0F":"man-juggling","1F939":"juggling","1F93A":"fencer","1F93C-200D-2640-FE0F":"woman-wrestling","1F93C-200D-2642-FE0F":"man-wrestling","1F93C":"wrestlers","1F93D-200D-2640-FE0F":"woman-playing-water-polo","1F93D-200D-2642-FE0F":"man-playing-water-polo","1F93D":"water_polo","1F93E-200D-2640-FE0F":"woman-playing-handball","1F93E-200D-2642-FE0F":"man-playing-handball","1F93E":"handball","1F93F":"diving_mask","1F940":"wilted_flower","1F941":"drum_with_drumsticks","1F942":"clinking_glasses","1F943":"tumbler_glass","1F944":"spoon","1F945":"goal_net","1F947":"first_place_medal","1F948":"second_place_medal","1F949":"third_place_medal","1F94A":"boxing_glove","1F94B":"martial_arts_uniform","1F94C":"curling_stone","1F94D":"lacrosse","1F94E":"softball","1F94F":"flying_disc","1F950":"croissant","1F951":"avocado","1F952":"cucumber","1F953":"bacon","1F954":"potato","1F955":"carrot","1F956":"baguette_bread","1F957":"green_salad","1F958":"shallow_pan_of_food","1F959":"stuffed_flatbread","1F95A":"egg","1F95B":"glass_of_milk","1F95C":"peanuts","1F95D":"kiwifruit","1F95E":"pancakes","1F95F":"dumpling","1F960":"fortune_cookie","1F961":"takeout_box","1F962":"chopsticks","1F963":"bowl_with_spoon","1F964":"cup_with_straw","1F965":"coconut","1F966":"broccoli","1F967":"pie","1F968":"pretzel","1F969":"cut_of_meat","1F96A":"sandwich","1F96B":"canned_food","1F96C":"leafy_green","1F96D":"mango","1F96E":"moon_cake","1F96F":"bagel","1F970":"smiling_face_with_3_hearts","1F971":"yawning_face","1F972":"smiling_face_with_tear","1F973":"partying_face","1F974":"woozy_face","1F975":"hot_face","1F976":"cold_face","1F977":"ninja","1F978":"disguised_face","1F97A":"pleading_face","1F97B":"sari","1F97C":"lab_coat","1F97D":"goggles","1F97E":"hiking_boot","1F97F":"womans_flat_shoe","1F980":"crab","1F981":"lion_face","1F982":"scorpion","1F983":"turkey","1F984":"unicorn_face","1F985":"eagle","1F986":"duck","1F987":"bat","1F988":"shark","1F989":"owl","1F98A":"fox_face","1F98B":"butterfly","1F98C":"deer","1F98D":"gorilla","1F98E":"lizard","1F98F":"rhinoceros","1F990":"shrimp","1F991":"squid","1F992":"giraffe_face","1F993":"zebra_face","1F994":"hedgehog","1F995":"sauropod","1F996":"t-rex","1F997":"cricket","1F998":"kangaroo","1F999":"llama","1F99A":"peacock","1F99B":"hippopotamus","1F99C":"parrot","1F99D":"raccoon","1F99E":"lobster","1F99F":"mosquito","1F9A0":"microbe","1F9A1":"badger","1F9A2":"swan","1F9A3":"mammoth","1F9A4":"dodo","1F9A5":"sloth","1F9A6":"otter","1F9A7":"orangutan","1F9A8":"skunk","1F9A9":"flamingo","1F9AA":"oyster","1F9AB":"beaver","1F9AC":"bison","1F9AD":"seal","1F9AE":"guide_dog","1F9AF":"probing_cane","1F9B4":"bone","1F9B5":"leg","1F9B6":"foot","1F9B7":"tooth","1F9B8-200D-2640-FE0F":"female_superhero","1F9B8-200D-2642-FE0F":"male_superhero","1F9B8":"superhero","1F9B9-200D-2640-FE0F":"female_supervillain","1F9B9-200D-2642-FE0F":"male_supervillain","1F9B9":"supervillain","1F9BA":"safety_vest","1F9BB":"ear_with_hearing_aid","1F9BC":"motorized_wheelchair","1F9BD":"manual_wheelchair","1F9BE":"mechanical_arm","1F9BF":"mechanical_leg","1F9C0":"cheese_wedge","1F9C1":"cupcake","1F9C2":"salt","1F9C3":"beverage_box","1F9C4":"garlic","1F9C5":"onion","1F9C6":"falafel","1F9C7":"waffle","1F9C8":"butter","1F9C9":"mate_drink","1F9CA":"ice_cube","1F9CB":"bubble_tea","1F9CD-200D-2640-FE0F":"woman_standing","1F9CD-200D-2642-FE0F":"man_standing","1F9CD":"standing_person","1F9CE-200D-2640-FE0F":"woman_kneeling","1F9CE-200D-2642-FE0F":"man_kneeling","1F9CE":"kneeling_person","1F9CF-200D-2640-FE0F":"deaf_woman","1F9CF-200D-2642-FE0F":"deaf_man","1F9CF":"deaf_person","1F9D0":"face_with_monocle","1F9D1-200D-1F33E":"farmer","1F9D1-200D-1F373":"cook","1F9D1-200D-1F37C":"person_feeding_baby","1F9D1-200D-1F384":"mx_claus","1F9D1-200D-1F393":"student","1F9D1-200D-1F3A4":"singer","1F9D1-200D-1F3A8":"artist","1F9D1-200D-1F3EB":"teacher","1F9D1-200D-1F3ED":"factory_worker","1F9D1-200D-1F4BB":"technologist","1F9D1-200D-1F4BC":"office_worker","1F9D1-200D-1F527":"mechanic","1F9D1-200D-1F52C":"scientist","1F9D1-200D-1F680":"astronaut","1F9D1-200D-1F692":"firefighter","1F9D1-200D-1F91D-200D-1F9D1":"people_holding_hands","1F9D1-200D-1F9AF":"person_with_probing_cane","1F9D1-200D-1F9B0":"red_haired_person","1F9D1-200D-1F9B1":"curly_haired_person","1F9D1-200D-1F9B2":"bald_person","1F9D1-200D-1F9B3":"white_haired_person","1F9D1-200D-1F9BC":"person_in_motorized_wheelchair","1F9D1-200D-1F9BD":"person_in_manual_wheelchair","1F9D1-200D-2695-FE0F":"health_worker","1F9D1-200D-2696-FE0F":"judge","1F9D1-200D-2708-FE0F":"pilot","1F9D1":"adult","1F9D2":"child","1F9D3":"older_adult","1F9D4":"bearded_person","1F9D5":"person_with_headscarf","1F9D6-200D-2640-FE0F":"woman_in_steamy_room","1F9D6-200D-2642-FE0F":"man_in_steamy_room","1F9D6":"person_in_steamy_room","1F9D7-200D-2640-FE0F":"woman_climbing","1F9D7-200D-2642-FE0F":"man_climbing","1F9D7":"person_climbing","1F9D8-200D-2640-FE0F":"woman_in_lotus_position","1F9D8-200D-2642-FE0F":"man_in_lotus_position","1F9D8":"person_in_lotus_position","1F9D9-200D-2640-FE0F":"female_mage","1F9D9-200D-2642-FE0F":"male_mage","1F9D9":"mage","1F9DA-200D-2640-FE0F":"female_fairy","1F9DA-200D-2642-FE0F":"male_fairy","1F9DA":"fairy","1F9DB-200D-2640-FE0F":"female_vampire","1F9DB-200D-2642-FE0F":"male_vampire","1F9DB":"vampire","1F9DC-200D-2640-FE0F":"mermaid","1F9DC-200D-2642-FE0F":"merman","1F9DC":"merperson","1F9DD-200D-2640-FE0F":"female_elf","1F9DD-200D-2642-FE0F":"male_elf","1F9DD":"elf","1F9DE-200D-2640-FE0F":"female_genie","1F9DE-200D-2642-FE0F":"male_genie","1F9DE":"genie","1F9DF-200D-2640-FE0F":"female_zombie","1F9DF-200D-2642-FE0F":"male_zombie","1F9DF":"zombie","1F9E0":"brain","1F9E1":"orange_heart","1F9E2":"billed_cap","1F9E3":"scarf","1F9E4":"gloves","1F9E5":"coat","1F9E6":"socks","1F9E7":"red_envelope","1F9E8":"firecracker","1F9E9":"jigsaw","1F9EA":"test_tube","1F9EB":"petri_dish","1F9EC":"dna","1F9ED":"compass","1F9EE":"abacus","1F9EF":"fire_extinguisher","1F9F0":"toolbox","1F9F1":"bricks","1F9F2":"magnet","1F9F3":"luggage","1F9F4":"lotion_bottle","1F9F5":"thread","1F9F6":"yarn","1F9F7":"safety_pin","1F9F8":"teddy_bear","1F9F9":"broom","1F9FA":"basket","1F9FB":"roll_of_paper","1F9FC":"soap","1F9FD":"sponge","1F9FE":"receipt","1F9FF":"nazar_amulet","1FA70":"ballet_shoes","1FA71":"one-piece_swimsuit","1FA72":"briefs","1FA73":"shorts","1FA74":"thong_sandal","1FA78":"drop_of_blood","1FA79":"adhesive_bandage","1FA7A":"stethoscope","1FA80":"yo-yo","1FA81":"kite","1FA82":"parachute","1FA83":"boomerang","1FA84":"magic_wand","1FA85":"pinata","1FA86":"nesting_dolls","1FA90":"ringed_planet","1FA91":"chair","1FA92":"razor","1FA93":"axe","1FA94":"diya_lamp","1FA95":"banjo","1FA96":"military_helmet","1FA97":"accordion","1FA98":"long_drum","1FA99":"coin","1FA9A":"carpentry_saw","1FA9B":"screwdriver","1FA9C":"ladder","1FA9D":"hook","1FA9E":"mirror","1FA9F":"window","1FAA0":"plunger","1FAA1":"sewing_needle","1FAA2":"knot","1FAA3":"bucket","1FAA4":"mouse_trap","1FAA5":"toothbrush","1FAA6":"headstone","1FAA7":"placard","1FAA8":"rock","1FAB0":"fly","1FAB1":"worm","1FAB2":"beetle","1FAB3":"cockroach","1FAB4":"potted_plant","1FAB5":"wood","1FAB6":"feather","1FAC0":"anatomical_heart","1FAC1":"lungs","1FAC2":"people_hugging","1FAD0":"blueberries","1FAD1":"bell_pepper","1FAD2":"olive","1FAD3":"flatbread","1FAD4":"tamale","1FAD5":"fondue","1FAD6":"teapot","203C":"bangbang","21A9":"leftwards_arrow_with_hook","21AA":"arrow_right_hook","231A":"watch","231B":"hourglass","23CF":"eject","23E9":"fast_forward","23EA":"rewind","23EB":"arrow_double_up","23EC":"arrow_double_down","23ED":"black_right_pointing_double_triangle_with_vertical_bar","23EE":"black_left_pointing_double_triangle_with_vertical_bar","23EF":"black_right_pointing_triangle_with_double_vertical_bar","23F0":"alarm_clock","23F1":"stopwatch","23F2":"timer_clock","23F3":"hourglass_flowing_sand","23F8":"double_vertical_bar","23F9":"black_square_for_stop","23FA":"black_circle_for_record","24C2":"m","25AA":"black_small_square","25AB":"white_small_square","25B6":"arrow_forward","25C0":"arrow_backward","25FB":"white_medium_square","25FC":"black_medium_square","25FD":"white_medium_small_square","25FE":"black_medium_small_square","260E":["phone","telephone"],"261D":"point_up","262A":"star_and_crescent","262E":"peace_symbol","262F":"yin_yang","263A":"relaxed","264A":"gemini","264B":"cancer","264C":"leo","264D":"virgo","264E":"libra","264F":"scorpius","265F":"chess_pawn","267B":"recycle","267E":"infinity","267F":"wheelchair","269B":"atom_symbol","269C":"fleur_de_lis","26A0":"warning","26A1":"zap","26A7":"transgender_symbol","26AA":"white_circle","26AB":"black_circle","26B0":"coffin","26B1":"funeral_urn","26BD":"soccer","26BE":"baseball","26C4":"snowman_without_snow","26C5":"partly_sunny","26C8":"thunder_cloud_and_rain","26CE":"ophiuchus","26CF":"pick","26D1":"helmet_with_white_cross","26D3":"chains","26D4":"no_entry","26E9":"shinto_shrine","26EA":"church","26F0":"mountain","26F1":"umbrella_on_ground","26F2":"fountain","26F3":"golf","26F4":"ferry","26F5":["boat","sailboat"],"26F7":"skier","26F8":"ice_skate","26F9-FE0F-200D-2640-FE0F":"woman-bouncing-ball","26F9-FE0F-200D-2642-FE0F":"man-bouncing-ball","26F9":"person_with_ball","26FA":"tent","26FD":"fuelpump","270A":"fist","270B":["hand","raised_hand"],"270C":"v","270D":"writing_hand","270F":"pencil2","271D":"latin_cross","274C":"x","274E":"negative_squared_cross_mark","27A1":"arrow_right","27B0":"curly_loop","27BF":"loop","2B05":"arrow_left","2B06":"arrow_up","2B07":"arrow_down","2B1B":"black_large_square","2B1C":"white_large_square","2B50":"star","2B55":"o","303D":"part_alternation_mark"}')},function(e,t,n){"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},function(e,t){t.klona=function e(t){if("object"!=typeof t)return t;var n,r,o=Object.prototype.toString.call(t);if("[object Object]"===o){if(t.constructor!==Object&&"function"==typeof t.constructor)for(n in r=new t.constructor,t)r.hasOwnProperty(n)&&r[n]!==t[n]&&(r[n]=e(t[n]));else for(n in r={},t)"__proto__"===n?Object.defineProperty(r,n,{value:e(t[n]),configurable:!0,enumerable:!0,writable:!0}):r[n]=e(t[n]);return r}if("[object Array]"===o){for(n=t.length,r=Array(n);n--;)r[n]=e(t[n]);return r}return"[object Set]"===o?(r=new Set,t.forEach((function(t){r.add(e(t))})),r):"[object Map]"===o?(r=new Map,t.forEach((function(t,n){r.set(e(n),e(t))})),r):"[object Date]"===o?new Date(+t):"[object RegExp]"===o?((r=new RegExp(t.source,t.flags)).lastIndex=t.lastIndex,r):"[object DataView]"===o?new t.constructor(e(t.buffer)):"[object ArrayBuffer]"===o?t.slice(0):"Array]"===o.slice(-6)?new t.constructor(t):t}},function(e,t,n){"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===o}(e)}(e)};var o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?u((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function a(e,t,n){return e.concat(t).map((function(e){return i(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function c(e,t){try{return t in e}catch(e){return!1}}function l(e,t,n){var r={};return n.isMergeableObject(e)&&s(e).forEach((function(t){r[t]=i(e[t],n)})),s(t).forEach((function(o){(function(e,t){return c(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(c(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return u;var n=t.customMerge(e);return"function"==typeof n?n:u}(o,n)(e[o],t[o],n):r[o]=i(t[o],n))})),r}function u(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||a,n.isMergeableObject=n.isMergeableObject||r,n.cloneUnlessOtherwiseSpecified=i;var o=Array.isArray(t);return o===Array.isArray(e)?o?n.arrayMerge(e,t,n):l(e,t,n):i(t,n)}u.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return u(e,n,t)}),{})};var d=u;e.exports=d},function(e,t,n){var r,o,i;o=[],void 0===(i="function"==typeof(r=function(){return function(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function n(t){var n,r=t.exec(e.substring(g));if(r)return n=r[0],g+=n.length,n}for(var r,o,i,a,s,c=e.length,l=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,d=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,p=/^\d+$/,m=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,g=0,f=[];;){if(n(u),g>=c)return f;r=n(d),o=[],","===r.slice(-1)?(r=r.replace(h,""),b()):_()}function _(){for(n(l),i="",a="in descriptor";;){if(s=e.charAt(g),"in descriptor"===a)if(t(s))i&&(o.push(i),i="",a="after descriptor");else{if(","===s)return g+=1,i&&o.push(i),void b();if("("===s)i+=s,a="in parens";else{if(""===s)return i&&o.push(i),void b();i+=s}}else if("in parens"===a)if(")"===s)i+=s,a="in descriptor";else{if(""===s)return o.push(i),void b();i+=s}else if("after descriptor"===a)if(t(s));else{if(""===s)return void b();a="in descriptor",g-=1}g+=1}}function b(){var t,n,i,a,s,c,l,u,d,h=!1,g={};for(a=0;a<o.length;a++)c=(s=o[a])[s.length-1],l=s.substring(0,s.length-1),u=parseInt(l,10),d=parseFloat(l),p.test(l)&&"w"===c?((t||n)&&(h=!0),0===u?h=!0:t=u):m.test(l)&&"x"===c?((t||n||i)&&(h=!0),d<0?h=!0:n=d):p.test(l)&&"h"===c?((i||n)&&(h=!0),0===u?h=!0:i=u):h=!0;h?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+s+"'."):(g.url=r,t&&(g.w=t),n&&(g.d=n),i&&(g.h=i),f.push(g))}}})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";(function(t){let r=n(409),o=n(321),i=n(599),a=n(215),s=n(1077),c=n(411),l=n(1078),u=n(414),d=n(602),h=n(323),p=n(415),m=n(601),g=n(417),f=n(603),_=n(604),b=n(416),v=n(275),y=n(322);function E(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}E.plugin=function(e,n){function r(...t){let r=n(...t);return r.postcssPlugin=e,r.postcssVersion=(new s).version,r}let o;return console&&console.warn&&(console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),t.env.LANG&&t.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226")),Object.defineProperty(r,"postcss",{get:()=>(o||(o=r()),o)}),r.process=function(e,t,n){return E([r(n)]).process(e,t)},r},E.stringify=c,E.parse=f,E.fromJSON=l,E.list=_,E.comment=e=>new h(e),E.atRule=e=>new p(e),E.decl=e=>new o(e),E.rule=e=>new b(e),E.root=e=>new v(e),E.document=e=>new u(e),E.CssSyntaxError=r,E.Declaration=o,E.Container=a,E.Document=u,E.Comment=h,E.Warning=d,E.AtRule=p,E.Result=m,E.Input=g,E.Rule=b,E.Root=v,E.Node=y,i.registerPostcss(E),e.exports=E,E.default=E}).call(this,n(371))},,function(e,t,n){"use strict";(function(t){let{SourceMapConsumer:r,SourceMapGenerator:o}=n(412),{dirname:i,resolve:a,relative:s,sep:c}=n(413),{pathToFileURL:l}=n(600),u=Boolean(r&&o),d=Boolean(i&&a&&s&&c);e.exports=class{constructor(e,t,n){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){return this.previousMaps||(this.previousMaps=[],this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}})),this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}clearAnnotation(){if(!1===this.mapOpts.annotation)return;let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}setSourcesContent(){let e={};this.root.walk(t=>{if(t.source){let n=t.source.input.from;n&&!e[n]&&(e[n]=!0,this.map.setSourceContent(this.toUrl(this.path(n)),t.source.input.css))}})}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),o=e.root||i(e.file);!1===this.mapOpts.sourcesContent?(t=new r(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map(()=>null))):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(o)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}toBase64(e){return t?t.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){return this.generateString(),this.isSourcesContent()&&this.setSourcesContent(),this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?i(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=i(a(t,this.mapOpts.annotation))),e=s(t,e)}toUrl(e){return"\\"===c&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(l)return l(e.source.input.from).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}return this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new o({file:this.outputFile()});let e,t,n=1,r=1,i={source:"",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,(o,a,s)=>{if(this.css+=o,a&&"end"!==s&&(i.generated.line=n,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source="<no source>",i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(n+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=o.length,a&&"start"!==s){let e=a.parent||{raws:{}};("decl"!==a.type||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=n,i.generated.column=r-2,this.map.addMapping(i)):(i.source="<no source>",i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1,this.map.addMapping(i)))}})}generate(){if(this.clearAnnotation(),d&&u&&this.isMap())return this.generateMap();let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}}).call(this,n(24).Buffer)},function(e,t,n){"use strict";let r={};e.exports=function(e){r[e]||(r[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},function(e,t,n){"use strict";let r=n(321),o=n(1074),i=n(323),a=n(415),s=n(275),c=n(416);e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=o(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}comment(e){let t=new i;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]);let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}emptyRule(e){let t=new c;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}other(e){let t=!1,n=null,r=!1,o=null,i=[],a=e[1].startsWith("--"),s=[],c=e;for(;c;){if(n=c[0],s.push(c),"("===n||"["===n)o||(o=c),i.push("("===n?")":"]");else if(a&&r&&"{"===n)o||(o=c),i.push("}");else if(0===i.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&r){for(;s.length&&(c=s[s.length-1][0],"space"===c||"comment"===c);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}rule(e){e.pop();let t=new c;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}decl(e,t){let n=new r;this.init(n,e[0][2]);let o,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]);"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(o=e.shift(),":"===o[0]){n.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let a=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(o=e[t],"!important"===o[1].toLowerCase()){n.important=!0;let r=this.stringFrom(e,t);r=this.spacesFromEnd(e)+r," !important"!==r&&(n.raws.important=r);break}if("important"===o[1].toLowerCase()){let r=e.slice(0),o="";for(let e=t;e>0;e--){let t=r[e][0];if(0===o.trim().indexOf("!")&&"space"!==t)break;o=r.pop()[1]+o}0===o.trim().indexOf("!")&&(n.important=!0,n.raws.important=o,e=r)}if("space"!==o[0]&&"comment"!==o[0])break}let s=e.some(e=>"space"!==e[0]&&"comment"!==e[0]);this.raw(n,"value",e),s?n.raws.between+=a:n.value=a+n.value,n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}atrule(e){let t,n,r,o=new a;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(c.length>0){for(r=c.length-1,n=c[r];n&&"space"===n[0];)n=c[--r];n&&(o.source.end=this.getPosition(n[3]||n[2]))}this.end(e);break}c.push(e)}else c.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(o.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(o,"params",c),i&&(e=c[c.length-1],o.source.end=this.getPosition(e[3]||e[2]),this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),s&&(o.nodes=[],this.current=o)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e),e.source={start:this.getPosition(t),input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}raw(e,t,n){let r,o,i,a,s=n.length,c="",l=!0,u=/^([#.|])?(\w)+/i;for(let t=0;t<s;t+=1)r=n[t],o=r[0],"comment"!==o||"rule"!==e.type?"comment"===o||"space"===o&&t===s-1?l=!1:c+=r[1]:(a=n[t-1],i=n[t+1],"space"!==a[0]&&"space"!==i[0]&&u.test(a[1])&&u.test(i[1])?c+=r[1]:l=!1);if(!l){let r=n.reduce((e,t)=>e+t[1],"");e.raws[t]={value:c,raw:r}}e[t]=c}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}colon(e){let t,n,r,o=0;for(let[i,a]of e.entries()){if(t=a,n=t[0],"("===n&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}unclosedBracket(e){throw this.input.error("Unclosed bracket",e[2])}unknownWord(e){throw this.input.error("Unknown word",e[0][2])}unexpectedClose(e){throw this.input.error("Unexpected }",e[2])}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}doubleColon(e){throw this.input.error("Double colon",e[2])}unnamedAtrule(e,t){throw this.input.error("At-rule without name",t[2])}precheckMissedSemicolon(){}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let o=t-1;o>=0&&(n=e[o],"space"===n[0]||(r+=1,2!==r));o--);throw this.input.error("Missed semicolon",n[2])}}},function(e,t,n){"use strict";const r="'".charCodeAt(0),o='"'.charCodeAt(0),i="\\".charCodeAt(0),a="/".charCodeAt(0),s="\n".charCodeAt(0),c=" ".charCodeAt(0),l="\f".charCodeAt(0),u="\t".charCodeAt(0),d="\r".charCodeAt(0),h="[".charCodeAt(0),p="]".charCodeAt(0),m="(".charCodeAt(0),g=")".charCodeAt(0),f="{".charCodeAt(0),_="}".charCodeAt(0),b=";".charCodeAt(0),v="*".charCodeAt(0),y=":".charCodeAt(0),E="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\n"'(/\\]/,T=/[\da-f]/i;e.exports=function(e,t={}){let n,x,k,F,O,R,D,I,A,N,M=e.css.valueOf(),P=t.ignoreErrors,L=M.length,j=0,U=[],B=[];function G(t){throw e.error("Unclosed "+t,j)}return{back:function(e){B.push(e)},nextToken:function(e){if(B.length)return B.pop();if(j>=L)return;let t=!!e&&e.ignoreUnclosed;switch(n=M.charCodeAt(j),n){case s:case c:case u:case d:case l:x=j;do{x+=1,n=M.charCodeAt(x)}while(n===c||n===s||n===u||n===d||n===l);N=["space",M.slice(j,x)],j=x-1;break;case h:case p:case f:case _:case y:case b:case g:{let e=String.fromCharCode(n);N=[e,e,j];break}case m:if(I=U.length?U.pop()[1]:"",A=M.charCodeAt(j+1),"url"===I&&A!==r&&A!==o&&A!==c&&A!==s&&A!==u&&A!==l&&A!==d){x=j;do{if(R=!1,x=M.indexOf(")",x+1),-1===x){if(P||t){x=j;break}G("bracket")}for(D=x;M.charCodeAt(D-1)===i;)D-=1,R=!R}while(R);N=["brackets",M.slice(j,x+1),j,x],j=x}else x=M.indexOf(")",j+1),F=M.slice(j,x+1),-1===x||C.test(F)?N=["(","(",j]:(N=["brackets",F,j,x],j=x);break;case r:case o:k=n===r?"'":'"',x=j;do{if(R=!1,x=M.indexOf(k,x+1),-1===x){if(P||t){x=j+1;break}G("string")}for(D=x;M.charCodeAt(D-1)===i;)D-=1,R=!R}while(R);N=["string",M.slice(j,x+1),j,x],j=x;break;case E:S.lastIndex=j+1,S.test(M),x=0===S.lastIndex?M.length-1:S.lastIndex-2,N=["at-word",M.slice(j,x+1),j,x],j=x;break;case i:for(x=j,O=!0;M.charCodeAt(x+1)===i;)x+=1,O=!O;if(n=M.charCodeAt(x+1),O&&n!==a&&n!==c&&n!==s&&n!==u&&n!==d&&n!==l&&(x+=1,T.test(M.charAt(x)))){for(;T.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===c&&(x+=1)}N=["word",M.slice(j,x+1),j,x],j=x;break;default:n===a&&M.charCodeAt(j+1)===v?(x=M.indexOf("*/",j+2)+1,0===x&&(P||t?x=M.length:G("comment")),N=["comment",M.slice(j,x+1),j,x],j=x):(w.lastIndex=j+1,w.test(M),x=0===w.lastIndex?M.length-1:w.lastIndex-2,N=["word",M.slice(j,x+1),j,x],U.push(N),j=x)}return j++,N},endOfFile:function(){return 0===B.length&&j>=L},position:function(){return j}}}},function(e,t){e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},customAlphabet:(e,t)=>()=>{let n="",r=t;for(;r--;)n+=e[Math.random()*e.length|0];return n}}},,function(e,t,n){"use strict";let r=n(599),o=n(414),i=n(275);class a{constructor(e=[]){this.version="8.3.5",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,t={}){return 0!==this.plugins.length||void 0!==t.parser||void 0!==t.stringifier||void 0!==t.syntax||t.hideNothingWarning||"undefined"!=typeof console&&console.warn&&console.warn("You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js."),new r(this,e,t)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else{if("function"!=typeof n)throw"object"==typeof n&&(n.parse||n.stringify)?new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation."):new Error(n+" is not a PostCSS plugin");t.push(n)}return t}}e.exports=a,a.default=a,i.registerProcessor(a),o.registerProcessor(a)},function(e,t,n){"use strict";let r=n(321),o=n(605),i=n(323),a=n(415),s=n(417),c=n(275),l=n(416);function u(e,t){if(Array.isArray(e))return e.map(e=>u(e));let{inputs:n,...d}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:s.prototype};n.map&&(n.map={...n.map,__proto__:o.prototype}),t.push(n)}}if(d.nodes&&(d.nodes=e.nodes.map(e=>u(e,t))),d.source){let{inputId:e,...n}=d.source;d.source=n,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new c(d);if("decl"===d.type)return new r(d);if("rule"===d.type)return new l(d);if("comment"===d.type)return new i(d);if("atrule"===d.type)return new a(d);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlurhashCanvas=t.Blurhash=void 0;var o=n(1080);Object.defineProperty(t,"Blurhash",{enumerable:!0,get:function(){return r(o).default}});var i=n(608);Object.defineProperty(t,"BlurhashCanvas",{enumerable:!0,get:function(){return r(i).default}})},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return s(t,e),t},l=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=c(n(78)),h=u(n(608)),p={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"},m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.componentDidUpdate=function(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")},t.prototype.render=function(){var e=this.props,t=e.hash,n=e.height,r=e.width,o=e.punch,a=e.resolutionX,s=e.resolutionY,c=e.style,u=l(e,["hash","height","width","punch","resolutionX","resolutionY","style"]);return d.createElement("div",i({},u,{style:i(i({display:"inline-block",height:n,width:r},c),{position:"relative"})}),d.createElement(h.default,{hash:t,height:s,width:a,punch:o,style:p}))},t.defaultProps={height:128,width:128,resolutionX:32,resolutionY:32},t}(d.PureComponent);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(610),o=n(611),i=n(420),a=function(e){if(!e||e.length<6)throw new i.ValidationError("The blurhash string must be at least 6 characters");var t=r.decode83(e[0]),n=Math.floor(t/9)+1,o=t%9+1;if(e.length!==4+2*o*n)throw new i.ValidationError("blurhash length mismatch: length is "+e.length+" but it should be "+(4+2*o*n))};t.isBlurhashValid=function(e){try{a(e)}catch(e){return{result:!1,errorReason:e.message}}return{result:!0}};var s=function(e){var t=e>>16,n=e>>8&255,r=255&e;return[o.sRGBToLinear(t),o.sRGBToLinear(n),o.sRGBToLinear(r)]},c=function(e,t){var n=Math.floor(e/361),r=Math.floor(e/19)%19,i=e%19;return[o.signPow((n-9)/9,2)*t,o.signPow((r-9)/9,2)*t,o.signPow((i-9)/9,2)*t]};t.default=function(e,t,n,i){a(e),i|=1;for(var l=r.decode83(e[0]),u=Math.floor(l/9)+1,d=l%9+1,h=(r.decode83(e[1])+1)/166,p=new Array(d*u),m=0;m<p.length;m++)if(0===m){var g=r.decode83(e.substring(2,6));p[m]=s(g)}else{g=r.decode83(e.substring(4+2*m,6+2*m));p[m]=c(g,h*i)}for(var f=4*t,_=new Uint8ClampedArray(f*n),b=0;b<n;b++)for(var v=0;v<t;v++){for(var y=0,E=0,S=0,w=0;w<u;w++)for(m=0;m<d;m++){var C=Math.cos(Math.PI*v*m/t)*Math.cos(Math.PI*b*w/n),T=p[m+w*d];y+=T[0]*C,E+=T[1]*C,S+=T[2]*C}var x=o.linearTosRGB(y),k=o.linearTosRGB(E),F=o.linearTosRGB(S);_[4*v+0+b*f]=x,_[4*v+1+b*f]=k,_[4*v+2+b*f]=F,_[4*v+3+b*f]=255}return _}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(610),o=n(611),i=n(420);t.default=function(e,t,n,a,s){if(a<1||a>9||s<1||s>9)throw new i.ValidationError("BlurHash must have between 1 and 9 components");if(t*n*4!==e.length)throw new i.ValidationError("Width and height must match the pixels array");for(var c=[],l=function(r){for(var i=function(i){var a=0==i&&0==r?1:2,s=function(e,t,n,r){for(var i=0,a=0,s=0,c=4*t,l=0;l<t;l++)for(var u=0;u<n;u++){var d=r(l,u);i+=d*o.sRGBToLinear(e[4*l+0+u*c]),a+=d*o.sRGBToLinear(e[4*l+1+u*c]),s+=d*o.sRGBToLinear(e[4*l+2+u*c])}var h=1/(t*n);return[i*h,a*h,s*h]}(e,t,n,(function(e,o){return a*Math.cos(Math.PI*i*e/t)*Math.cos(Math.PI*r*o/n)}));c.push(s)},s=0;s<a;s++)i(s)},u=0;u<s;u++)l(u);var d,h,p=c[0],m=c.slice(1),g="",f=a-1+9*(s-1);if(g+=r.encode83(f,1),m.length>0){var _=Math.max.apply(Math,m.map((function(e){return Math.max.apply(Math,e)}))),b=Math.floor(Math.max(0,Math.min(82,Math.floor(166*_-.5))));d=(b+1)/166,g+=r.encode83(b,1)}else d=1,g+=r.encode83(0,1);return g+=r.encode83((h=p,(o.linearTosRGB(h[0])<<16)+(o.linearTosRGB(h[1])<<8)+o.linearTosRGB(h[2])),4),m.forEach((function(e){g+=r.encode83(function(e,t){return 19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*o.signPow(e[0]/t,.5)+9.5))))*19+19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*o.signPow(e[1]/t,.5)+9.5))))+Math.floor(Math.max(0,Math.min(18,Math.floor(9*o.signPow(e[2]/t,.5)+9.5))))}(e,d),2)})),g}},function(e,t){e.exports="img/download.4f331f0.svg"},function(e,t,n){var r=n(1085);e.exports=function(e){if(137!==e[0])throw new Error("Invalid .png file header");if(80!==e[1])throw new Error("Invalid .png file header");if(78!==e[2])throw new Error("Invalid .png file header");if(71!==e[3])throw new Error("Invalid .png file header");if(13!==e[4])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(10!==e[5])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==e[6])throw new Error("Invalid .png file header");if(10!==e[7])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");var t=!1,n=[],s=8;for(;s<e.length;){o[3]=e[s++],o[2]=e[s++],o[1]=e[s++],o[0]=e[s++];var c=a[0]+4,l=new Uint8Array(c);l[0]=e[s++],l[1]=e[s++],l[2]=e[s++],l[3]=e[s++];var u=String.fromCharCode(l[0])+String.fromCharCode(l[1])+String.fromCharCode(l[2])+String.fromCharCode(l[3]);if(!n.length&&"IHDR"!==u)throw new Error("IHDR header missing");if("IEND"===u){t=!0,n.push({name:u,data:new Uint8Array(0)});break}for(var d=4;d<c;d++)l[d]=e[s++];o[3]=e[s++],o[2]=e[s++],o[1]=e[s++],o[0]=e[s++];var h=i[0];if(r.buf(l)!==h)throw new Error("CRC values for "+u+" header do not match, PNG file is likely corrupted");var p=new Uint8Array(l.buffer.slice(4));n.push({name:u,data:p})}if(!t)throw new Error(".png file ended prematurely: no IEND header was found");return n};var o=new Uint8Array(4),i=new Int32Array(o.buffer),a=new Uint32Array(o.buffer)},function(e,t,n){(function(e){var n;n=function(t){t.version="0.3.0";var n=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=void 0!==e;function o(e){for(var t=-1,r=0,o=e.length-7;r<o;)t=(t=(t=(t=(t=(t=(t=(t=t>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])];for(;r<o+7;)t=t>>>8^n[255&(t^e[r++])];return-1^t}t.table=n,t.bstr=function(t){if(t.length>32768&&r)return o(new e(t));for(var i=-1,a=t.length-1,s=0;s<a;)i=n[255&(i^t.charCodeAt(s++))]^i>>>8,i=n[255&(i^t.charCodeAt(s++))]^i>>>8;return s===a&&(i=i>>>8^n[255&(i^t.charCodeAt(s))]),-1^i},t.buf=function(e){if(e.length>1e4)return o(e);for(var t=-1,r=0,i=e.length-3;r<i;)t=(t=(t=(t=t>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])];for(;r<i+3;)t=t>>>8^n[255&(t^e[r++])];return-1^t},t.str=function(e){for(var t,r,o=-1,i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))<128?o=o>>>8^n[255&(o^t)]:t<2048?o=(o=o>>>8^n[255&(o^(192|t>>6&31))])>>>8^n[255&(o^(128|63&t))]:t>=55296&&t<57344?(t=64+(1023&t),r=1023&e.charCodeAt(i++),o=(o=(o=(o=o>>>8^n[255&(o^(240|t>>8&7))])>>>8^n[255&(o^(128|t>>2&63))])>>>8^n[255&(o^(128|r>>6&15|3&t))])>>>8^n[255&(o^(128|63&r))]):o=(o=(o=o>>>8^n[255&(o^(224|t>>12&15))])>>>8^n[255&(o^(128|t>>6&63))])>>>8^n[255&(o^(128|63&t))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(t):n({})}).call(this,n(24).Buffer)},function(e,t,n){e.exports=function(){return new Worker(n.p+"df68b9f4f43f094f5acf.worker.js")}},function(e,t){e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var n,r=String(e),o="",i=!!t&&!!t.extended,a=!!t&&!!t.globstar,s=!1,c=t&&"string"==typeof t.flags?t.flags:"",l=0,u=r.length;l<u;l++)switch(n=r[l]){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":o+="\\"+n;break;case"?":if(i){o+=".";break}case"[":case"]":if(i){o+=n;break}case"{":if(i){s=!0,o+="(";break}case"}":if(i){s=!1,o+=")";break}case",":if(s){o+="|";break}o+="\\"+n;break;case"*":for(var d=r[l-1],h=1;"*"===r[l+1];)h++,l++;var p=r[l+1];if(a)h>1&&("/"===d||void 0===d)&&("/"===p||void 0===p)?(o+="((?:[^/]*(?:/|$))*)",l++):o+="([^/]*)";else o+=".*";break;default:o+=n}return c&&~c.indexOf("g")||(o="^"+o+"$"),new RegExp(o,c)}},function(e,t){e.exports="img/plus.53bc1d6.svg"},function(e,t,n){(function(e){(function(t){"use strict";function n(e){switch(e._type){case"document":case"block_quote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"link":case"image":case"custom_inline":case"custom_block":return!0;default:return!1}}var r=function(e,t){this.current=e,this.entering=!0===t},o=function(){var e=this.current,t=this.entering;if(null===e)return null;var r=n(e);return t&&r?e._firstChild?(this.current=e._firstChild,this.entering=!0):this.entering=!1:e===this.root?this.current=null:null===e._next?(this.current=e._parent,this.entering=!1):(this.current=e._next,this.entering=!0),{entering:t,node:e}},i=function(e){return{current:e,root:e,entering:!0,next:o,resumeAt:r}},a=function(e,t){this._type=e,this._parent=null,this._firstChild=null,this._lastChild=null,this._prev=null,this._next=null,this._sourcepos=t,this._lastLineBlank=!1,this._lastLineChecked=!1,this._open=!0,this._string_content=null,this._literal=null,this._listData={},this._info=null,this._destination=null,this._title=null,this._isFenced=!1,this._fenceChar=null,this._fenceLength=0,this._fenceOffset=null,this._level=null,this._onEnter=null,this._onExit=null},s=a.prototype;Object.defineProperty(s,"isContainer",{get:function(){return n(this)}}),Object.defineProperty(s,"type",{get:function(){return this._type}}),Object.defineProperty(s,"firstChild",{get:function(){return this._firstChild}}),Object.defineProperty(s,"lastChild",{get:function(){return this._lastChild}}),Object.defineProperty(s,"next",{get:function(){return this._next}}),Object.defineProperty(s,"prev",{get:function(){return this._prev}}),Object.defineProperty(s,"parent",{get:function(){return this._parent}}),Object.defineProperty(s,"sourcepos",{get:function(){return this._sourcepos}}),Object.defineProperty(s,"literal",{get:function(){return this._literal},set:function(e){this._literal=e}}),Object.defineProperty(s,"destination",{get:function(){return this._destination},set:function(e){this._destination=e}}),Object.defineProperty(s,"title",{get:function(){return this._title},set:function(e){this._title=e}}),Object.defineProperty(s,"info",{get:function(){return this._info},set:function(e){this._info=e}}),Object.defineProperty(s,"level",{get:function(){return this._level},set:function(e){this._level=e}}),Object.defineProperty(s,"listType",{get:function(){return this._listData.type},set:function(e){this._listData.type=e}}),Object.defineProperty(s,"listTight",{get:function(){return this._listData.tight},set:function(e){this._listData.tight=e}}),Object.defineProperty(s,"listStart",{get:function(){return this._listData.start},set:function(e){this._listData.start=e}}),Object.defineProperty(s,"listDelimiter",{get:function(){return this._listData.delimiter},set:function(e){this._listData.delimiter=e}}),Object.defineProperty(s,"onEnter",{get:function(){return this._onEnter},set:function(e){this._onEnter=e}}),Object.defineProperty(s,"onExit",{get:function(){return this._onExit},set:function(e){this._onExit=e}}),a.prototype.appendChild=function(e){e.unlink(),e._parent=this,this._lastChild?(this._lastChild._next=e,e._prev=this._lastChild,this._lastChild=e):(this._firstChild=e,this._lastChild=e)},a.prototype.prependChild=function(e){e.unlink(),e._parent=this,this._firstChild?(this._firstChild._prev=e,e._next=this._firstChild,this._firstChild=e):(this._firstChild=e,this._lastChild=e)},a.prototype.unlink=function(){this._prev?this._prev._next=this._next:this._parent&&(this._parent._firstChild=this._next),this._next?this._next._prev=this._prev:this._parent&&(this._parent._lastChild=this._prev),this._parent=null,this._next=null,this._prev=null},a.prototype.insertAfter=function(e){e.unlink(),e._next=this._next,e._next&&(e._next._prev=e),e._prev=this,this._next=e,e._parent=this._parent,e._next||(e._parent._lastChild=e)},a.prototype.insertBefore=function(e){e.unlink(),e._prev=this._prev,e._prev&&(e._prev._next=e),e._next=this,this._prev=e,e._parent=this._parent,e._prev||(e._parent._firstChild=e)},a.prototype.walker=function(){return new i(this)};var c={};function l(e,t,n){var r,o,i,a,s,u="";for("string"!=typeof t&&(n=t,t=l.defaultChars),void 0===n&&(n=!0),s=function(e){var t,n,r=c[e];if(r)return r;for(r=c[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}(t),r=0,o=e.length;r<o;r++)if(i=e.charCodeAt(r),n&&37===i&&r+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3)))u+=e.slice(r,r+3),r+=2;else if(i<128)u+=s[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&r+1<o&&(a=e.charCodeAt(r+1))>=56320&&a<=57343){u+=encodeURIComponent(e[r]+e[r+1]),r++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[r]);return u}l.defaultChars=";/?:@&=+$,-_.!~*'()#",l.componentChars="-_.!~*'()";var u=l,d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function p(e,t){return e(t={exports:{}},t.exports),t.exports}function m(e){return e&&e.default||e}var g={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""},f=Object.freeze({__proto__:null,Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:"",default:g}),_={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},b=Object.freeze({__proto__:null,Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",default:_}),v={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},y=Object.freeze({__proto__:null,amp:"&",apos:"'",gt:">",lt:"<",quot:'"',default:v}),E=m(Object.freeze({__proto__:null,default:{0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}})),S=p((function(e,t){var n=d&&d.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(E);t.default=function(e){if(e>=55296&&e<=57343||e>1114111)return"<22>";e in r.default&&(e=r.default[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}}));h(S);var w=m(f),C=m(b),T=m(y),x=p((function(e,t){var n=d&&d.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(w),o=n(C),i=n(T),a=n(S);function s(e){var t=Object.keys(e).join("|"),n=l(e),r=new RegExp("&(?:"+(t+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(e){return String(e).replace(r,n)}}t.decodeXML=s(i.default),t.decodeHTMLStrict=s(r.default);var c=function(e,t){return e<t?1:-1};function l(e){return function(t){return"#"===t.charAt(1)?"X"===t.charAt(2)||"x"===t.charAt(2)?a.default(parseInt(t.substr(3),16)):a.default(parseInt(t.substr(2),10)):e[t.slice(1,-1)]}}t.decodeHTML=function(){for(var e=Object.keys(o.default).sort(c),t=Object.keys(r.default).sort(c),n=0,i=0;n<t.length;n++)e[i]===t[n]?(t[n]+=";?",i++):t[n]+=";";var a=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),s=l(r.default);function u(e){return";"!==e.substr(-1)&&(e+=";"),s(e)}return function(e){return String(e).replace(a,u)}}()}));h(x),x.decodeXML,x.decodeHTMLStrict,x.decodeHTML;var k=p((function(e,t){var n=d&&d.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(T).default),o=c(r);t.encodeXML=m(r,o);var i=s(n(w).default),a=c(i);function s(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function c(e){var t=[],n=[];return Object.keys(e).forEach((function(e){return 1===e.length?t.push("\\"+e):n.push(e)})),n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.encodeHTML=m(i,a);var l=/[^\0-\x7F]/g,u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function h(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function p(e,t){return"&#x"+(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536).toString(16).toUpperCase()+";"}function m(e,t){return function(n){return n.replace(t,(function(t){return e[t]})).replace(u,p).replace(l,h)}}var g=c(r);t.escape=function(e){return e.replace(g,h).replace(u,p).replace(l,h)}}));h(k),k.encodeXML,k.encodeHTML,k.escape;var F=p((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e,t){return(!t||t<=0?x.decodeXML:x.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?x.decodeXML:x.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?k.encodeXML:k.encodeHTML)(e)};var n=k;t.encodeXML=n.encodeXML,t.encodeHTML=n.encodeHTML,t.escape=n.escape,t.encodeHTML4=n.encodeHTML,t.encodeHTML5=n.encodeHTML;var r=x;t.decodeXML=r.decodeXML,t.decodeHTML=r.decodeHTML,t.decodeHTMLStrict=r.decodeHTMLStrict,t.decodeHTML4=r.decodeHTML,t.decodeHTML5=r.decodeHTML,t.decodeHTML4Strict=r.decodeHTMLStrict,t.decodeHTML5Strict=r.decodeHTMLStrict,t.decodeXMLStrict=r.decodeXML}));h(F),F.decode,F.decodeStrict,F.encode,F.encodeXML,F.encodeHTML,F.escape,F.encodeHTML4,F.encodeHTML5,F.decodeXML;var O,R,D,I=F.decodeHTML,A=(F.decodeHTMLStrict,F.decodeHTML4,F.decodeHTML5,F.decodeHTML4Strict,F.decodeHTML5Strict,F.decodeXMLStrict,"&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});"),N="<[A-Za-z][A-Za-z0-9-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*/?>",M="</[A-Za-z][A-Za-z0-9-]*\\s*[>]",P=new RegExp("^(?:<[A-Za-z][A-Za-z0-9-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*/?>|</[A-Za-z][A-Za-z0-9-]*\\s*[>]|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|[<][?][\\s\\S]*?[?][>]|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),L=/[\\&]/,j="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",U=new RegExp("\\\\"+j+"|"+A,"gi"),B=new RegExp('[&<>"]',"g"),G=function(e){return 92===e.charCodeAt(0)?e.charAt(1):I(e)},V=function(e){return L.test(e)?e.replace(U,G):e},q=function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return e}},H=function(e){return B.test(e)?e.replace(B,q):e};function z(e){return O(e)}if(String.fromCodePoint)O=function(e){try{return String.fromCodePoint(e)}catch(e){if(e instanceof RangeError)return String.fromCharCode(65533);throw e}};else{var W=String.fromCharCode,K=Math.floor;O=function(){var e,t,n=16384,r=[],o=-1,i=arguments.length;if(!i)return"";for(var a="";++o<i;){var s=Number(arguments[o]);if(!isFinite(s)||s<0||s>1114111||K(s)!==s)return String.fromCharCode(65533);s<=65535?r.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,r.push(e,t)),(o+1===i||r.length>n)&&(a+=W.apply(null,r),r.length=0)}return a}}String.prototype.repeat||(R=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(e){}return n}(),D=function(e){if(null==this)throw TypeError();var t=String(this),n=e?Number(e):0;if(n!=n&&(n=0),n<0||n==1/0)throw RangeError();for(var r="";n;)n%2==1&&(r+=t),n>1&&(t+=t),n>>=1;return r},R?R(String.prototype,"repeat",{value:D,configurable:!0,writable:!0}):String.prototype.repeat=D);var Y=function(e){try{return u(e)}catch(t){return e}},$=V,Q=j,J="\\\\"+Q,X=P,Z=new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),ee=new RegExp('^(?:"('+J+'|[^"\\x00])*"|\'('+J+"|[^'\\x00])*'|\\(("+J+"|[^()\\x00])*\\))"),te=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,ne=new RegExp("^"+Q),re=new RegExp("^&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});","i"),oe=/`+/,ie=/^`+/,ae=/\.\.\./g,se=/--+/g,ce=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,le=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,ue=/^ *(?:\n *)?/,de=/^[ \t\n\x0b\x0c\x0d]/,he=/^\s/,pe=/ *$/,me=/^ */,ge=/^ *(?:\n|$)/,fe=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,_e=/^[^\n`\[\]\\!<&*_'"]+/m,be=function(e){var t=new a("text");return t._literal=e,t},ve=function(e){return e.slice(1,e.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()},ye=function(e){var t=e.exec(this.subject.slice(this.pos));return null===t?null:(this.pos+=t.index+t[0].length,t[0])},Ee=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},Se=function(){return this.match(ue),!0},we=function(e){var t=this.match(ie);if(null===t)return!1;for(var n,r,o,i=this.pos;null!==(n=this.match(oe));)if(n===t)return r=new a("code"),(o=this.subject.slice(i,this.pos-t.length).replace(/\n/gm," ")).length>0&&null!==o.match(/[^ ]/)&&" "==o[0]&&" "==o[o.length-1]?r._literal=o.slice(1,o.length-1):r._literal=o,e.appendChild(r),!0;return this.pos=i,e.appendChild(be(t)),!0},Ce=function(e){var t,n=this.subject;return this.pos+=1,10===this.peek()?(this.pos+=1,t=new a("linebreak"),e.appendChild(t)):ne.test(n.charAt(this.pos))?(e.appendChild(be(n.charAt(this.pos))),this.pos+=1):e.appendChild(be("\\")),!0},Te=function(e){var t,n,r;return(t=this.match(ce))?(n=t.slice(1,t.length-1),(r=new a("link"))._destination=Y("mailto:"+n),r._title="",r.appendChild(be(n)),e.appendChild(r),!0):!!(t=this.match(le))&&(n=t.slice(1,t.length-1),(r=new a("link"))._destination=Y(n),r._title="",r.appendChild(be(n)),e.appendChild(r),!0)},xe=function(e){var t=this.match(X);if(null===t)return!1;var n=new a("html_inline");return n._literal=t,e.appendChild(n),!0},ke=function(e){var t,n,r,o,i,a,s,c,l,u,d,h=0,p=this.pos;if(39===e||34===e)h++,this.pos++;else for(;this.peek()===e;)h++,this.pos++;return 0===h?null:(t=0===p?"\n":this.subject.charAt(p-1),n=-1===(r=this.peek())?"\n":z(r),c=he.test(n),l=Z.test(n),u=he.test(t),d=Z.test(t),o=!c&&(!l||u||d),i=!u&&(!d||c||l),95===e?(a=o&&(!i||d),s=i&&(!o||l)):39===e||34===e?(a=o&&!i,s=i):(a=o,s=i),this.pos=p,{numdelims:h,can_open:a,can_close:s})},Fe=function(e,t){var n=this.scanDelims(e);if(!n)return!1;var r,o=n.numdelims,i=this.pos;this.pos+=o,r=39===e?"’":34===e?"“":this.subject.slice(i,this.pos);var a=be(r);return t.appendChild(a),(n.can_open||n.can_close)&&(this.options.smart||39!==e&&34!==e)&&(this.delimiters={cc:e,numdelims:o,origdelims:o,node:a,previous:this.delimiters,next:null,can_open:n.can_open,can_close:n.can_close},null!==this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},Oe=function(e){null!==e.previous&&(e.previous.next=e.next),null===e.next?this.delimiters=e.previous:e.next.previous=e.previous},Re=function(e,t){e.next!==t&&(e.next=t,t.previous=e)},De=function(e){for(var t,n,r,o,i,s,c,l,u,d,h=[[],[],[]],p=!1,m=0;m<3;m++)h[m][95]=e,h[m][42]=e,h[m][39]=e,h[m][34]=e;for(n=this.delimiters;null!==n&&n.previous!==e;)n=n.previous;for(;null!==n;){var g=n.cc;if(n.can_close){for(t=n.previous,d=!1;null!==t&&t!==e&&t!==h[n.origdelims%3][g];){if(p=(n.can_open||t.can_close)&&n.origdelims%3!=0&&(t.origdelims+n.origdelims)%3==0,t.cc===n.cc&&t.can_open&&!p){d=!0;break}t=t.previous}if(r=n,42===g||95===g)if(d){c=n.numdelims>=2&&t.numdelims>=2?2:1,o=t.node,i=n.node,t.numdelims-=c,n.numdelims-=c,o._literal=o._literal.slice(0,o._literal.length-c),i._literal=i._literal.slice(0,i._literal.length-c);var f=new a(1===c?"emph":"strong");for(l=o._next;l&&l!==i;)u=l._next,l.unlink(),f.appendChild(l),l=u;o.insertAfter(f),Re(t,n),0===t.numdelims&&(o.unlink(),this.removeDelimiter(t)),0===n.numdelims&&(i.unlink(),s=n.next,this.removeDelimiter(n),n=s)}else n=n.next;else 39===g?(n.node._literal="’",d&&(t.node._literal="‘"),n=n.next):34===g&&(n.node._literal="”",d&&(t.node.literal="“"),n=n.next);d||(h[r.origdelims%3][g]=r.previous,r.can_open||this.removeDelimiter(r))}else n=n.next}for(;null!==this.delimiters&&this.delimiters!==e;)this.removeDelimiter(this.delimiters)},Ie=function(){var e=this.match(ee);return null===e?null:$(e.substr(1,e.length-2))},Ae=function(){var e=this.match(te);if(null===e){if(60===this.peek())return null;for(var t,n=this.pos,r=0;-1!==(t=this.peek());)if(92===t&&ne.test(this.subject.charAt(this.pos+1)))this.pos+=1,-1!==this.peek()&&(this.pos+=1);else if(40===t)this.pos+=1,r+=1;else if(41===t){if(r<1)break;this.pos+=1,r-=1}else{if(null!==de.exec(z(t)))break;this.pos+=1}return this.pos===n&&41!==t||0!==r?null:(e=this.subject.substr(n,this.pos-n),Y($(e)))}return Y($(e.substr(1,e.length-2)))},Ne=function(){var e=this.match(fe);return null===e||e.length>1001?0:e.length},Me=function(e){var t=this.pos;this.pos+=1;var n=be("[");return e.appendChild(n),this.addBracket(n,t,!1),!0},Pe=function(e){var t=this.pos;if(this.pos+=1,91===this.peek()){this.pos+=1;var n=be("![");e.appendChild(n),this.addBracket(n,t+1,!0)}else e.appendChild(be("!"));return!0},Le=function(e){var t,n,r,o,i,s,c=!1;if(this.pos+=1,t=this.pos,null===(s=this.brackets))return e.appendChild(be("]")),!0;if(!s.active)return e.appendChild(be("]")),this.removeBracket(),!0;n=s.image;var l=this.pos;if(40===this.peek()&&(this.pos++,this.spnl()&&null!==(r=this.parseLinkDestination())&&this.spnl()&&(de.test(this.subject.charAt(this.pos-1))&&(o=this.parseLinkTitle()),1)&&this.spnl()&&41===this.peek()?(this.pos+=1,c=!0):this.pos=l),!c){var u=this.pos,d=this.parseLinkLabel();if(d>2?i=this.subject.slice(u,u+d):s.bracketAfter||(i=this.subject.slice(s.index,t)),0===d&&(this.pos=l),i){var h=this.refmap[ve(i)];h&&(r=h.destination,o=h.title,c=!0)}}if(c){var p,m,g=new a(n?"image":"link");for(g._destination=r,g._title=o||"",p=s.node._next;p;)m=p._next,p.unlink(),g.appendChild(p),p=m;if(e.appendChild(g),this.processEmphasis(s.previousDelimiter),this.removeBracket(),s.node.unlink(),!n)for(s=this.brackets;null!==s;)s.image||(s.active=!1),s=s.previous;return!0}return this.removeBracket(),this.pos=t,e.appendChild(be("]")),!0},je=function(e,t,n){null!==this.brackets&&(this.brackets.bracketAfter=!0),this.brackets={node:e,previous:this.brackets,previousDelimiter:this.delimiters,index:t,image:n,active:!0}},Ue=function(){this.brackets=this.brackets.previous},Be=function(e){var t;return!!(t=this.match(re))&&(e.appendChild(be(I(t))),!0)},Ge=function(e){var t;return!!(t=this.match(_e))&&(this.options.smart?e.appendChild(be(t.replace(ae,"…").replace(se,(function(e){var t=0,n=0;return e.length%3==0?n=e.length/3:e.length%2==0?t=e.length/2:e.length%3==2?(t=1,n=(e.length-2)/3):(t=2,n=(e.length-4)/3),"—".repeat(n)+"–".repeat(t)})))):e.appendChild(be(t)),!0)},Ve=function(e){this.pos+=1;var t=e._lastChild;if(t&&"text"===t.type&&" "===t._literal[t._literal.length-1]){var n=" "===t._literal[t._literal.length-2];t._literal=t._literal.replace(pe,""),e.appendChild(new a(n?"linebreak":"softbreak"))}else e.appendChild(new a("softbreak"));return this.match(me),!0},qe=function(e,t){var n,r,o,i;this.subject=e,this.pos=0;var a=this.pos;if(0===(i=this.parseLinkLabel()))return 0;if(n=this.subject.substr(0,i),58!==this.peek())return this.pos=a,0;if(this.pos++,this.spnl(),null===(r=this.parseLinkDestination()))return this.pos=a,0;var s=this.pos;this.spnl(),this.pos!==s&&(o=this.parseLinkTitle()),null===o&&(o="",this.pos=s);var c=!0;if(null===this.match(ge)&&(""===o?c=!1:(o="",this.pos=s,c=null!==this.match(ge))),!c)return this.pos=a,0;var l=ve(n);return""===l?(this.pos=a,0):(t[l]||(t[l]={destination:r,title:o}),this.pos-a)},He=function(e){var t=!1,n=this.peek();if(-1===n)return!1;switch(n){case 10:t=this.parseNewline(e);break;case 92:t=this.parseBackslash(e);break;case 96:t=this.parseBackticks(e);break;case 42:case 95:t=this.handleDelim(n,e);break;case 39:case 34:t=this.options.smart&&this.handleDelim(n,e);break;case 91:t=this.parseOpenBracket(e);break;case 33:t=this.parseBang(e);break;case 93:t=this.parseCloseBracket(e);break;case 60:t=this.parseAutolink(e)||this.parseHtmlTag(e);break;case 38:t=this.parseEntity(e);break;default:t=this.parseString(e)}return t||(this.pos+=1,e.appendChild(be(z(n)))),!0},ze=function(e){for(this.subject=e._string_content.trim(),this.pos=0,this.delimiters=null,this.brackets=null;this.parseInline(e););e._string_content=null,this.processEmphasis(null)};function We(e){return{subject:"",delimiters:null,brackets:null,pos:0,refmap:{},match:ye,peek:Ee,spnl:Se,parseBackticks:we,parseBackslash:Ce,parseAutolink:Te,parseHtmlTag:xe,scanDelims:ke,handleDelim:Fe,parseLinkTitle:Ie,parseLinkDestination:Ae,parseLinkLabel:Ne,parseOpenBracket:Me,parseBang:Pe,parseCloseBracket:Le,addBracket:je,removeBracket:Ue,parseEntity:Be,parseString:Ge,parseNewline:Ve,parseReference:qe,parseInline:He,processEmphasis:De,removeDelimiter:Oe,options:e||{},parse:ze}}var Ke=[/./,/^<(?:script|pre|textarea|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+N+"|"+M+")\\s*$","i")],Ye=[/./,/<\/(?:script|pre|textarea|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],$e=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,Qe=/^[#`~*+_=<>0-9-]/,Je=/[^ \t\f\v\r\n]/,Xe=/^[*+-]/,Ze=/^(\d{1,9})([.)])/,et=/^#{1,6}(?:[ \t]+|$)/,tt=/^`{3,}(?!.*`)|^~{3,}/,nt=/^(?:`{3,}|~{3,})(?= *$)/,rt=/^(?:=+|-+)[ \t]*$/,ot=/\r\n|\n|\r/,it=function(e){return 32===e||9===e},at=function(e,t){return t<e.length?e.charCodeAt(t):-1},st=function(e){for(;e;){if(e._lastLineBlank)return!0;var t=e.type;if(e._lastLineChecked||"list"!==t&&"item"!==t){e._lastLineChecked=!0;break}e._lastLineChecked=!0,e=e._lastChild}return!1},ct=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip._string_content+=" ".repeat(e)}this.tip._string_content+=this.currentLine.slice(this.offset)+"\n"},lt=function(e,t){for(;!this.blocks[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var n=t+1,r=new a(e,[[this.lineNumber,n],[0,0]]);return r._string_content="",this.tip.appendChild(r),this.tip=r,r},ut=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var e=this.oldtip._parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},dt={document:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},list:{continue:function(){return 0},finalize:function(e,t){for(var n=t._firstChild;n;){if(st(n)&&n._next){t._listData.tight=!1;break}for(var r=n._firstChild;r;){if(st(r)&&(n._next||r._next)){t._listData.tight=!1;break}r=r._next}n=n._next}},canContain:function(e){return"item"===e},acceptsLines:!1},block_quote:{continue:function(e){var t=e.currentLine;return e.indented||62!==at(t,e.nextNonspace)?1:(e.advanceNextNonspace(),e.advanceOffset(1,!1),it(at(t,e.offset))&&e.advanceOffset(1,!0),0)},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},item:{continue:function(e,t){if(e.blank){if(null==t._firstChild)return 1;e.advanceNextNonspace()}else{if(!(e.indent>=t._listData.markerOffset+t._listData.padding))return 1;e.advanceOffset(t._listData.markerOffset+t._listData.padding,!0)}return 0},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},heading:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},thematic_break:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},code_block:{continue:function(e,t){var n=e.currentLine,r=e.indent;if(t._isFenced){var o=r<=3&&n.charAt(e.nextNonspace)===t._fenceChar&&n.slice(e.nextNonspace).match(nt);if(o&&o[0].length>=t._fenceLength)return e.lastLineLength=e.offset+r+o[0].length,e.finalize(t,e.lineNumber),2;for(var i=t._fenceOffset;i>0&&it(at(n,e.offset));)e.advanceOffset(1,!0),i--}else if(r>=4)e.advanceOffset(4,!0);else{if(!e.blank)return 1;e.advanceNextNonspace()}return 0},finalize:function(e,t){if(t._isFenced){var n=t._string_content,r=n.indexOf("\n"),o=n.slice(0,r),i=n.slice(r+1);t.info=V(o.trim()),t._literal=i}else t._literal=t._string_content.replace(/(\n *)+$/,"\n");t._string_content=null},canContain:function(){return!1},acceptsLines:!0},html_block:{continue:function(e,t){return!e.blank||6!==t._htmlBlockType&&7!==t._htmlBlockType?0:1},finalize:function(e,t){t._literal=t._string_content.replace(/(\n *)+$/,""),t._string_content=null},canContain:function(){return!1},acceptsLines:!0},paragraph:{continue:function(e){return e.blank?1:0},finalize:function(e,t){for(var n,r,o=!1;91===at(t._string_content,0)&&(n=e.inlineParser.parseReference(t._string_content,e.refmap));)t._string_content=t._string_content.slice(n),o=!0;o&&(r=t._string_content,!Je.test(r))&&t.unlink()},canContain:function(){return!1},acceptsLines:!0}},ht=[function(e){return e.indented||62!==at(e.currentLine,e.nextNonspace)?0:(e.advanceNextNonspace(),e.advanceOffset(1,!1),it(at(e.currentLine,e.offset))&&e.advanceOffset(1,!0),e.closeUnmatchedBlocks(),e.addChild("block_quote",e.nextNonspace),1)},function(e){var t;if(!e.indented&&(t=e.currentLine.slice(e.nextNonspace).match(et))){e.advanceNextNonspace(),e.advanceOffset(t[0].length,!1),e.closeUnmatchedBlocks();var n=e.addChild("heading",e.nextNonspace);return n.level=t[0].trim().length,n._string_content=e.currentLine.slice(e.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),e.advanceOffset(e.currentLine.length-e.offset),2}return 0},function(e){var t;if(!e.indented&&(t=e.currentLine.slice(e.nextNonspace).match(tt))){var n=t[0].length;e.closeUnmatchedBlocks();var r=e.addChild("code_block",e.nextNonspace);return r._isFenced=!0,r._fenceLength=n,r._fenceChar=t[0][0],r._fenceOffset=e.indent,e.advanceNextNonspace(),e.advanceOffset(n,!1),2}return 0},function(e,t){if(!e.indented&&60===at(e.currentLine,e.nextNonspace)){var n,r=e.currentLine.slice(e.nextNonspace);for(n=1;n<=7;n++)if(Ke[n].test(r)&&(n<7||"paragraph"!==t.type))return e.closeUnmatchedBlocks(),e.addChild("html_block",e.offset)._htmlBlockType=n,2}return 0},function(e,t){var n;if(!e.indented&&"paragraph"===t.type&&(n=e.currentLine.slice(e.nextNonspace).match(rt))){var r;for(e.closeUnmatchedBlocks();91===at(t._string_content,0)&&(r=e.inlineParser.parseReference(t._string_content,e.refmap));)t._string_content=t._string_content.slice(r);if(t._string_content.length>0){var o=new a("heading",t.sourcepos);return o.level="="===n[0][0]?1:2,o._string_content=t._string_content,t.insertAfter(o),t.unlink(),e.tip=o,e.advanceOffset(e.currentLine.length-e.offset,!1),2}return 0}return 0},function(e){return!e.indented&&$e.test(e.currentLine.slice(e.nextNonspace))?(e.closeUnmatchedBlocks(),e.addChild("thematic_break",e.nextNonspace),e.advanceOffset(e.currentLine.length-e.offset,!1),2):0},function(e,t){var n,r,o;return e.indented&&"list"!==t.type||!(n=function(e,t){var n,r,o,i,a=e.currentLine.slice(e.nextNonspace),s={type:null,tight:!0,bulletChar:null,start:null,delimiter:null,padding:null,markerOffset:e.indent};if(e.indent>=4)return null;if(n=a.match(Xe))s.type="bullet",s.bulletChar=n[0][0];else{if(!(n=a.match(Ze))||"paragraph"===t.type&&"1"!==n[1])return null;s.type="ordered",s.start=parseInt(n[1]),s.delimiter=n[2]}if(-1!==(r=at(e.currentLine,e.nextNonspace+n[0].length))&&9!==r&&32!==r)return null;if("paragraph"===t.type&&!e.currentLine.slice(e.nextNonspace+n[0].length).match(Je))return null;e.advanceNextNonspace(),e.advanceOffset(n[0].length,!0),o=e.column,i=e.offset;do{e.advanceOffset(1,!0),r=at(e.currentLine,e.offset)}while(e.column-o<5&&it(r));var c=-1===at(e.currentLine,e.offset),l=e.column-o;return l>=5||l<1||c?(s.padding=n[0].length+1,e.column=o,e.offset=i,it(at(e.currentLine,e.offset))&&e.advanceOffset(1,!0)):s.padding=n[0].length+l,s}(e,t))?0:(e.closeUnmatchedBlocks(),"list"===e.tip.type&&(r=t._listData,o=n,r.type===o.type&&r.delimiter===o.delimiter&&r.bulletChar===o.bulletChar)||((t=e.addChild("list",e.nextNonspace))._listData=n),(t=e.addChild("item",e.nextNonspace))._listData=n,1)},function(e){return e.indented&&"paragraph"!==e.tip.type&&!e.blank?(e.advanceOffset(4,!0),e.closeUnmatchedBlocks(),e.addChild("code_block",e.offset),2):0}],pt=function(e,t){for(var n,r,o,i=this.currentLine;e>0&&(o=i[this.offset]);)"\t"===o?(n=4-this.column%4,t?(this.partiallyConsumedTab=n>e,r=n>e?e:n,this.column+=r,this.offset+=this.partiallyConsumedTab?0:1,e-=r):(this.partiallyConsumedTab=!1,this.column+=n,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},mt=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},gt=function(){for(var e,t=this.currentLine,n=this.offset,r=this.column;""!==(e=t.charAt(n));)if(" "===e)n++,r++;else{if("\t"!==e)break;n++,r+=4-r%4}this.blank="\n"===e||"\r"===e||""===e,this.nextNonspace=n,this.nextNonspaceColumn=r,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=4},ft=function(e){var t,n,r=!0,o=this.doc;for(this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,-1!==e.indexOf("\0")&&(e=e.replace(/\0/g,"<22>")),this.currentLine=e;(n=o._lastChild)&&n._open;){switch(o=n,this.findNextNonspace(),this.blocks[o.type].continue(this,o)){case 0:break;case 1:r=!1;break;case 2:return;default:throw"continue returned illegal value, must be 0, 1, or 2"}if(!r){o=o._parent;break}}this.allClosed=o===this.oldtip,this.lastMatchedContainer=o;for(var i="paragraph"!==o.type&&dt[o.type].acceptsLines,a=this.blockStarts,s=a.length;!i;){if(this.findNextNonspace(),!this.indented&&!Qe.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var c=0;c<s;){var l=a[c](this,o);if(1===l){o=this.tip;break}if(2===l){o=this.tip,i=!0;break}c++}if(c===s){this.advanceNextNonspace();break}}if(this.allClosed||this.blank||"paragraph"!==this.tip.type){this.closeUnmatchedBlocks(),this.blank&&o.lastChild&&(o.lastChild._lastLineBlank=!0),t=o.type;for(var u=this.blank&&!("block_quote"===t||"code_block"===t&&o._isFenced||"item"===t&&!o._firstChild&&o.sourcepos[0][0]===this.lineNumber),d=o;d;)d._lastLineBlank=u,d=d._parent;this.blocks[t].acceptsLines?(this.addLine(),"html_block"===t&&o._htmlBlockType>=1&&o._htmlBlockType<=5&&Ye[o._htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(o,this.lineNumber))):this.offset<e.length&&!this.blank&&(o=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}else this.addLine();this.lastLineLength=e.length},_t=function(e,t){var n=e._parent;e._open=!1,e.sourcepos[1]=[t,this.lastLineLength],this.blocks[e.type].finalize(this,e),this.tip=n},bt=function(e){var t,n,r,o=e.walker();for(this.inlineParser.refmap=this.refmap,this.inlineParser.options=this.options;n=o.next();)r=(t=n.node).type,n.entering||"paragraph"!==r&&"heading"!==r||this.inlineParser.parse(t)},vt=function(){return new a("document",[[1,1],[0,0]])},yt=function(e){this.doc=new vt,this.tip=this.doc,this.refmap={},this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="",this.options.time&&console.time("preparing input");var t=e.split(ot),n=t.length;10===e.charCodeAt(e.length-1)&&(n-=1),this.options.time&&console.timeEnd("preparing input"),this.options.time&&console.time("block parsing");for(var r=0;r<n;r++)this.incorporateLine(t[r]);for(;this.tip;)this.finalize(this.tip,n);return this.options.time&&console.timeEnd("block parsing"),this.options.time&&console.time("inline parsing"),this.processInlines(this.doc),this.options.time&&console.timeEnd("inline parsing"),this.doc};function Et(){}Et.prototype.render=function(e){var t,n,r=e.walker();for(this.buffer="",this.lastOut="\n";t=r.next();)this[n=t.node.type]&&this[n](t.node,t.entering);return this.buffer},Et.prototype.out=function(e){this.lit(e)},Et.prototype.lit=function(e){this.buffer+=e,this.lastOut=e},Et.prototype.cr=function(){"\n"!==this.lastOut&&this.lit("\n")},Et.prototype.esc=function(e){return e};var St=/^javascript:|vbscript:|file:|data:/i,wt=/^data:image\/(?:png|gif|jpeg|webp)/i,Ct=function(e){return St.test(e)&&!wt.test(e)};function Tt(e){(e=e||{}).softbreak=e.softbreak||"\n",this.disableTags=0,this.lastOut="\n",this.options=e}Tt.prototype=Object.create(Et.prototype),Tt.prototype.text=function(e){this.out(e.literal)},Tt.prototype.html_inline=function(e){this.options.safe?this.lit("\x3c!-- raw HTML omitted --\x3e"):this.lit(e.literal)},Tt.prototype.html_block=function(e){this.cr(),this.options.safe?this.lit("\x3c!-- raw HTML omitted --\x3e"):this.lit(e.literal),this.cr()},Tt.prototype.softbreak=function(){this.lit(this.options.softbreak)},Tt.prototype.linebreak=function(){this.tag("br",[],!0),this.cr()},Tt.prototype.link=function(e,t){var n=this.attrs(e);t?(this.options.safe&&Ct(e.destination)||n.push(["href",this.esc(e.destination)]),e.title&&n.push(["title",this.esc(e.title)]),this.tag("a",n)):this.tag("/a")},Tt.prototype.image=function(e,t){t?(0===this.disableTags&&(this.options.safe&&Ct(e.destination)?this.lit('<img src="" alt="'):this.lit('<img src="'+this.esc(e.destination)+'" alt="')),this.disableTags+=1):(this.disableTags-=1,0===this.disableTags&&(e.title&&this.lit('" title="'+this.esc(e.title)),this.lit('" />')))},Tt.prototype.emph=function(e,t){this.tag(t?"em":"/em")},Tt.prototype.strong=function(e,t){this.tag(t?"strong":"/strong")},Tt.prototype.paragraph=function(e,t){var n=e.parent.parent,r=this.attrs(e);null!==n&&"list"===n.type&&n.listTight||(t?(this.cr(),this.tag("p",r)):(this.tag("/p"),this.cr()))},Tt.prototype.heading=function(e,t){var n="h"+e.level,r=this.attrs(e);t?(this.cr(),this.tag(n,r)):(this.tag("/"+n),this.cr())},Tt.prototype.code=function(e){this.tag("code"),this.out(e.literal),this.tag("/code")},Tt.prototype.code_block=function(e){var t=e.info?e.info.split(/\s+/):[],n=this.attrs(e);t.length>0&&t[0].length>0&&n.push(["class","language-"+this.esc(t[0])]),this.cr(),this.tag("pre"),this.tag("code",n),this.out(e.literal),this.tag("/code"),this.tag("/pre"),this.cr()},Tt.prototype.thematic_break=function(e){var t=this.attrs(e);this.cr(),this.tag("hr",t,!0),this.cr()},Tt.prototype.block_quote=function(e,t){var n=this.attrs(e);t?(this.cr(),this.tag("blockquote",n),this.cr()):(this.cr(),this.tag("/blockquote"),this.cr())},Tt.prototype.list=function(e,t){var n="bullet"===e.listType?"ul":"ol",r=this.attrs(e);if(t){var o=e.listStart;null!==o&&1!==o&&r.push(["start",o.toString()]),this.cr(),this.tag(n,r),this.cr()}else this.cr(),this.tag("/"+n),this.cr()},Tt.prototype.item=function(e,t){var n=this.attrs(e);t?this.tag("li",n):(this.tag("/li"),this.cr())},Tt.prototype.custom_inline=function(e,t){t&&e.onEnter?this.lit(e.onEnter):!t&&e.onExit&&this.lit(e.onExit)},Tt.prototype.custom_block=function(e,t){this.cr(),t&&e.onEnter?this.lit(e.onEnter):!t&&e.onExit&&this.lit(e.onExit),this.cr()},Tt.prototype.esc=H,Tt.prototype.out=function(e){this.lit(this.esc(e))},Tt.prototype.tag=function(e,t,n){if(!(this.disableTags>0)){if(this.buffer+="<"+e,t&&t.length>0)for(var r,o=0;void 0!==(r=t[o]);)this.buffer+=" "+r[0]+'="'+r[1]+'"',o++;n&&(this.buffer+=" /"),this.buffer+=">",this.lastOut=">"}},Tt.prototype.attrs=function(e){var t=[];if(this.options.sourcepos){var n=e.sourcepos;n&&t.push(["data-sourcepos",String(n[0][0])+":"+String(n[0][1])+"-"+String(n[1][0])+":"+String(n[1][1])])}return t};var xt=/\<[^>]*\>/;function kt(e){e=e||{},this.disableTags=0,this.lastOut="\n",this.indentLevel=0,this.indent=" ",this.options=e}kt.prototype=Object.create(Et.prototype),kt.prototype.render=function(e){var t,n;this.buffer="";var r,o,i,a,s,c,l=e.walker(),u=this.options;for(u.time&&console.time("rendering"),this.buffer+='<?xml version="1.0" encoding="UTF-8"?>\n',this.buffer+='<!DOCTYPE document SYSTEM "CommonMark.dtd">\n';r=l.next();)if(i=r.entering,c=(o=r.node).type,a=o.isContainer,s="thematic_break"===c||"linebreak"===c||"softbreak"===c,n=c.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase(),i){switch(t=[],c){case"document":t.push(["xmlns","http://commonmark.org/xml/1.0"]);break;case"list":null!==o.listType&&t.push(["type",o.listType.toLowerCase()]),null!==o.listStart&&t.push(["start",String(o.listStart)]),null!==o.listTight&&t.push(["tight",o.listTight?"true":"false"]);var d=o.listDelimiter;if(null!==d){var h="";h="."===d?"period":"paren",t.push(["delimiter",h])}break;case"code_block":o.info&&t.push(["info",o.info]);break;case"heading":t.push(["level",String(o.level)]);break;case"link":case"image":t.push(["destination",o.destination]),t.push(["title",o.title]);break;case"custom_inline":case"custom_block":t.push(["on_enter",o.onEnter]),t.push(["on_exit",o.onExit])}if(u.sourcepos){var p=o.sourcepos;p&&t.push(["sourcepos",String(p[0][0])+":"+String(p[0][1])+"-"+String(p[1][0])+":"+String(p[1][1])])}if(this.cr(),this.out(this.tag(n,t,s)),a)this.indentLevel+=1;else if(!a&&!s){var m=o.literal;m&&this.out(this.esc(m)),this.out(this.tag("/"+n))}}else this.indentLevel-=1,this.cr(),this.out(this.tag("/"+n));return u.time&&console.timeEnd("rendering"),this.buffer+="\n",this.buffer},kt.prototype.out=function(e){this.disableTags>0?this.buffer+=e.replace(xt,""):this.buffer+=e,this.lastOut=e},kt.prototype.cr=function(){if("\n"!==this.lastOut){this.buffer+="\n",this.lastOut="\n";for(var e=this.indentLevel;e>0;e--)this.buffer+=this.indent}},kt.prototype.tag=function(e,t,n){var r="<"+e;if(t&&t.length>0)for(var o,i=0;void 0!==(o=t[i]);)r+=" "+o[0]+'="'+this.esc(o[1])+'"',i++;return n&&(r+=" /"),r+=">"},kt.prototype.esc=H,t.HtmlRenderer=Tt,t.Node=a,t.Parser=function(e){return{doc:new vt,blocks:dt,blockStarts:ht,tip:this.doc,oldtip:this.doc,currentLine:"",lineNumber:0,offset:0,column:0,nextNonspace:0,nextNonspaceColumn:0,indent:0,indented:!1,blank:!1,partiallyConsumedTab:!1,allClosed:!0,lastMatchedContainer:this.doc,refmap:{},lastLineLength:0,inlineParser:new We(e),findNextNonspace:gt,advanceOffset:pt,advanceNextNonspace:mt,addLine:ct,addChild:lt,incorporateLine:ft,finalize:_t,processInlines:bt,closeUnmatchedBlocks:ut,parse:yt,options:e||{}}},t.Renderer=Et,t.XmlRenderer=kt,Object.defineProperty(t,"__esModule",{value:!0})})(t)}).call(this,n(23))},function(e,t){function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t];"object"!=typeof r||Object.isFrozen(r)||n(r)})),e}var r=n,o=n;r.default=o;class i{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function a(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const c=e=>!!e.kind;class l{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=a(e)}openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){c(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}class u{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{u._collapse(e)}))}}class d extends u{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function h(e){return e?"string"==typeof e?e:e.source:null}const p=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;const m="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",g={begin:"\\\\[\\s\\S]",relevance:0},f={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[g]},_={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[g]},b={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},v=function(e,t,n={}){const r=s({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(b),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},y=v("//","$"),E=v("/\\*","\\*/"),S=v("#","$"),w={className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C={className:"number",begin:m,relevance:0},T={className:"number",begin:"\\b(0b[01]+)",relevance:0},x={className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},k={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[g,{begin:/\[/,end:/\]/,relevance:0,contains:[g]}]}]},F={className:"title",begin:"[a-zA-Z]\\w*",relevance:0},O={className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},R={begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0};var D=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:m,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map(e=>h(e)).join("")}(t,/.*\b/,e.binary,/\b.*/)),s({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:g,APOS_STRING_MODE:f,QUOTE_STRING_MODE:_,PHRASAL_WORDS_MODE:b,COMMENT:v,C_LINE_COMMENT_MODE:y,C_BLOCK_COMMENT_MODE:E,HASH_COMMENT_MODE:S,NUMBER_MODE:w,C_NUMBER_MODE:C,BINARY_NUMBER_MODE:T,CSS_NUMBER_MODE:x,REGEXP_MODE:k,TITLE_MODE:F,UNDERSCORE_TITLE_MODE:O,METHOD_GUARD:R,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function I(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function A(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=I,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function N(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map(e=>h(e)).join("|")+")"}(...e.illegal))}function M(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function P(e,t){void 0===e.relevance&&(e.relevance=1)}const L=["of","and","for","in","not","or","if","then","parent","list","value"];function j(e,t){return t?Number(t):function(e){return L.includes(e.toLowerCase())}(e)?0:1}function U(e,{plugins:t}){function n(t,n){return new RegExp(h(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=n(function(e,t="|"){let n=0;return e.map(e=>{n+=1;const t=n;let r=h(e),o="";for(;r.length>0;){const e=p.exec(r);if(!e){o+=r;break}o+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o}).map(e=>`(${e})`).join(t)}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class o{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new r;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=s(e.classNameAliases||{}),function t(r,i){const a=r;if(r.isCompiled)return a;[M].forEach(e=>e(r,i)),e.compilerExtensions.forEach(e=>e(r,i)),r.__beforeBegin=null,[A,N,P].forEach(e=>e(r,i)),r.isCompiled=!0;let c=null;if("object"==typeof r.keywords&&(c=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=function e(t,n,r="keyword"){const o={};return"string"==typeof t?i(r,t.split(" ")):Array.isArray(t)?i(r,t):Object.keys(t).forEach((function(r){Object.assign(o,e(t[r],n,r))})),o;function i(e,t){n&&(t=t.map(e=>e.toLowerCase())),t.forEach((function(t){const n=t.split("|");o[n[0]]=[e,j(n[0],n[1])]}))}}(r.keywords,e.case_insensitive)),r.lexemes&&c)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return c=c||r.lexemes||/\w+/,a.keywordPatternRe=n(c,!0),i&&(r.begin||(r.begin=/\B|\b/),a.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(a.endRe=n(r.end)),a.terminatorEnd=h(r.end)||"",r.endsWithParent&&i.terminatorEnd&&(a.terminatorEnd+=(r.end?"|":"")+i.terminatorEnd)),r.illegal&&(a.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return s(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(function e(t){return!!t&&(t.endsWithParent||e(t.starts))}(e))return s(e,{starts:e.starts?s(e.starts):null});if(Object.isFrozen(e))return s(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,a)})),r.starts&&t(r.starts,i),a.matcher=function(e){const t=new o;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function B(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,a(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const G={"after:highlightElement":({el:e,result:t,text:n})=>{const r=q(e);if(!r.length)return;const o=document.createElement("div");o.innerHTML=t.value,t.value=function(e,t,n){let r=0,o="";const i=[];function s(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function c(e){o+="<"+V(e)+[].map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+a(e.value)+'"'})).join("")+">"}function l(e){o+="</"+V(e)+">"}function u(e){("start"===e.event?c:l)(e.node)}for(;e.length||t.length;){let t=s();if(o+=a(n.substring(r,t[0].offset)),r=t[0].offset,t===e){i.reverse().forEach(l);do{u(t.splice(0,1)[0]),t=s()}while(t===e&&t.length&&t[0].offset===r);i.reverse().forEach(c)}else"start"===t[0].event?i.push(t[0].node):i.pop(),u(t.splice(0,1)[0])}return o+a(n.substr(r))}(r,q(o),n)}};function V(e){return e.nodeName.toLowerCase()}function q(e){const t=[];return function e(n,r){for(let o=n.firstChild;o;o=o.nextSibling)3===o.nodeType?r+=o.nodeValue.length:1===o.nodeType&&(t.push({event:"start",offset:r,node:o}),r=e(o,r),V(o).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:o}));return r}(e,0),t}const H={},z=e=>{console.error(e)},W=(e,...t)=>{console.log("WARN: "+e,...t)},K=(e,t)=>{H[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),H[`${e}/${t}`]=!0)},Y=a,$=s,Q=Symbol("nomatch");var J=function(e){const t=Object.create(null),n=Object.create(null),o=[];let a=!0;const s=/(^(<[^>]+>|\t|)+|\n)/gm,c="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let u={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:d};function h(e){return u.noHighlightRe.test(e)}function p(e,t,n,r){let o="",i="";"object"==typeof t?(o=e,n=t.ignoreIllegals,i=t.language,r=void 0):(K("10.7.0","highlight(lang, code, ...args) has been deprecated."),K("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,o=t);const a={code:o,language:i};x("before:highlight",a);const s=a.result?a.result:m(a.language,a.code,n,r);return s.code=a.code,x("after:highlight",s),s}function m(e,n,r,s){function l(e,t){const n=y.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function d(){null!=C.subLanguage?function(){if(""===k)return;let e=null;if("string"==typeof C.subLanguage){if(!t[C.subLanguage])return void x.addText(k);e=m(C.subLanguage,k,!0,T[C.subLanguage]),T[C.subLanguage]=e.top}else e=g(k,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(F+=e.relevance),x.addSublanguage(e.emitter,e.language)}():function(){if(!C.keywords)return void x.addText(k);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(k),n="";for(;t;){n+=k.substring(e,t.index);const r=l(C,t);if(r){const[e,o]=r;if(x.addText(n),n="",F+=o,e.startsWith("_"))n+=t[0];else{const n=y.classNameAliases[e]||e;x.addKeyword(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(k)}n+=k.substr(e),x.addText(n)}(),k=""}function h(e){return e.className&&x.openNode(y.classNameAliases[e.className]||e.className),C=Object.create(e,{parent:{value:C}}),C}function p(e){return 0===C.matcher.regexIndex?(k+=e[0],1):(D=!0,0)}function f(e){const t=e[0],n=e.rule,r=new i(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return p(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?k+=t:(n.excludeBegin&&(k+=t),d(),n.returnBegin||n.excludeBegin||(k=t)),h(n),n.returnBegin?0:t.length}function _(e){const t=e[0],r=n.substr(e.index),o=function e(t,n,r){let o=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(t.endRe,r);if(o){if(t["on:end"]){const e=new i(t);t["on:end"](n,e),e.isMatchIgnored&&(o=!1)}if(o){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return e(t.parent,n,r)}(C,e,r);if(!o)return Q;const a=C;a.skip?k+=t:(a.returnEnd||a.excludeEnd||(k+=t),d(),a.excludeEnd&&(k=t));do{C.className&&x.closeNode(),C.skip||C.subLanguage||(F+=C.relevance),C=C.parent}while(C!==o.parent);return o.starts&&(o.endSameAsBegin&&(o.starts.endRe=o.endRe),h(o.starts)),a.returnEnd?0:t.length}let b={};function v(t,o){const i=o&&o[0];if(k+=t,null==i)return d(),0;if("begin"===b.type&&"end"===o.type&&b.index===o.index&&""===i){if(k+=n.slice(o.index,o.index+1),!a){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=b.rule,t}return 1}if(b=o,"begin"===o.type)return f(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+i+'" for mode "'+(C.className||"<unnamed>")+'"');throw e.mode=C,e}if("end"===o.type){const e=_(o);if(e!==Q)return e}if("illegal"===o.type&&""===i)return 1;if(R>1e5&&R>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return k+=i,i.length}const y=w(e);if(!y)throw z(c.replace("{}",e)),new Error('Unknown language: "'+e+'"');const E=U(y,{plugins:o});let S="",C=s||E;const T={},x=new u.__emitter(u);!function(){const e=[];for(let t=C;t!==y;t=t.parent)t.className&&e.unshift(t.className);e.forEach(e=>x.openNode(e))}();let k="",F=0,O=0,R=0,D=!1;try{for(C.matcher.considerAll();;){R++,D?D=!1:C.matcher.considerAll(),C.matcher.lastIndex=O;const e=C.matcher.exec(n);if(!e)break;const t=v(n.substring(O,e.index),e);O=e.index+t}return v(n.substr(O)),x.closeAllNodes(),x.finalize(),S=x.toHTML(),{relevance:Math.floor(F),value:S,language:e,illegal:!1,emitter:x,top:C}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(O-100,O+100),mode:t.mode},sofar:S,relevance:0,value:Y(n),emitter:x};if(a)return{illegal:!1,relevance:0,value:Y(n),emitter:x,language:e,top:C,errorRaised:t};throw t}}function g(e,n){n=n||u.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new u.__emitter(u),value:Y(e),illegal:!1,top:l};return t.emitter.addText(e),t}(e),o=n.filter(w).filter(T).map(t=>m(t,e,!1));o.unshift(r);const i=o.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(w(e.language).supersetOf===t.language)return 1;if(w(t.language).supersetOf===e.language)return-1}return 0}),[a,s]=i,c=a;return c.second_best=s,c}const f={"before:highlightElement":({el:e})=>{u.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,"\n"))},"after:highlightElement":({result:e})=>{u.useBR&&(e.value=e.value.replace(/\n/g,"<br>"))}},_=/^(<[^>]+>|\t)+/gm,b={"after:highlightElement":({result:e})=>{u.tabReplace&&(e.value=e.value.replace(_,e=>e.replace(/\t/g,u.tabReplace)))}};function v(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t);if(n){const t=w(n[1]);return t||(W(c.replace("{}",n[1])),W("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>h(e)||w(e))}(e);if(h(r))return;x("before:highlightElement",{el:e,language:r}),t=e;const o=t.textContent,i=r?p(o,{language:r,ignoreIllegals:!0}):g(o);x("after:highlightElement",{el:e,result:i,text:o}),e.innerHTML=i.value,function(e,t,r){const o=t?n[t]:r;e.classList.add("hljs"),o&&e.classList.add(o)}(e,r,i.language),e.result={language:i.language,re:i.relevance,relavance:i.relevance},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.relevance,relavance:i.second_best.relevance})}const y=()=>{if(y.called)return;y.called=!0,K("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead.");document.querySelectorAll("pre code").forEach(v)};let E=!1;function S(){if("loading"===document.readyState)return void(E=!0);document.querySelectorAll("pre code").forEach(v)}function w(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function C(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{n[e.toLowerCase()]=t})}function T(e){const t=w(e);return t&&!t.disableAutodetect}function x(e,t){const n=e;o.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){E&&S()}),!1),Object.assign(e,{highlight:p,highlightAuto:g,highlightAll:S,fixMarkup:function(e){return K("10.2.0","fixMarkup will be removed entirely in v11.0"),K("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,u.tabReplace||u.useBR?t.replace(s,e=>"\n"===e?u.useBR?"<br>":e:u.tabReplace?e.replace(/\t/g,u.tabReplace):e):t;var t},highlightElement:v,highlightBlock:function(e){return K("10.7.0","highlightBlock will be removed entirely in v12.0"),K("10.7.0","Please use highlightElement now."),v(e)},configure:function(e){e.useBR&&(K("10.3.0","'useBR' will be removed entirely in v11.0"),K("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),u=$(u,e)},initHighlighting:y,initHighlightingOnLoad:function(){K("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),E=!0},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if(z("Language definition for '{}' could not be registered.".replace("{}",n)),!a)throw e;z(e),o=l}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&C(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:w,registerAliases:C,requireLanguage:function(e){K("10.4.0","requireLanguage will be removed entirely in v11."),K("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=w(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:T,inherit:$,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},vuePlugin:B(e).VuePlugin}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="10.7.3";for(const e in D)"object"==typeof D[e]&&r(D[e]);return Object.assign(e,D),e.addPlugin(f),e.addPlugin(G),e.addPlugin(b),e}({});e.exports=J},function(e,t){e.exports=function(e){var t="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+",n="далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ",r="null истина ложь неопределено",o=e.inherit(e.NUMBER_MODE),i={className:"string",begin:'"|\\|',end:'"|$',contains:[{begin:'""'}]},a={begin:"'",end:"'",excludeBegin:!0,excludeEnd:!0,contains:[{className:"number",begin:"\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}"}]},s=e.inherit(e.C_LINE_COMMENT_MODE);return{name:"1C:Enterprise",case_insensitive:!0,keywords:{$pattern:t,keyword:n,built_in:"разделительстраниц разделительстрок символтабуляции ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ",class:"webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени форматкартинки ширинаподчиненныхэлементовформы виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц отображениевремениэлементовпланировщика типфайлаформатированногодокумента обходрезультатазапроса типзаписизапроса видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов доступкфайлу режимдиалогавыборафайла режимоткрытияфайла типизмеренияпостроителязапроса видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs форматдатыjson экранированиесимволовjson видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных использованиеусловногооформлениякомпоновкиданных важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты статусразборапочтовогосообщения режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии типхранилищасертификатовкриптографии кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip режимсохраненияпутейzip уровеньсжатияzip звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса типномерадокумента типномеразадачи типформы удалениедвижений важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты",type:"comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура фиксированноесоответствие фиксированныймассив ",literal:r},contains:[{className:"meta",begin:"#|&",end:"$",keywords:{$pattern:t,"meta-keyword":n+"загрузитьизфайла вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент "},contains:[s]},{className:"function",variants:[{begin:"процедура|функция",end:"\\)",keywords:"процедура функция"},{begin:"конецпроцедуры|конецфункции",keywords:"конецпроцедуры конецфункции"}],contains:[{begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"params",begin:t,end:",",excludeEnd:!0,endsWithParent:!0,keywords:{$pattern:t,keyword:"знач",literal:r},contains:[o,i,a]},s]},e.inherit(e.TITLE_MODE,{begin:t})]},s,{className:"symbol",begin:"~",end:";|:",excludeEnd:!0},o,i,a]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t={ruleDeclaration:/^[a-zA-Z][a-zA-Z0-9-]*/,unexpectedChars:/[!@#$^&',?+~`|:]/},r=e.COMMENT(/;/,/$/),o={className:"attribute",begin:n(t.ruleDeclaration,/(?=\s*=)/)};return{name:"Augmented Backus-Naur Form",illegal:t.unexpectedChars,keywords:["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],contains:[o,r,{className:"symbol",begin:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/},{className:"symbol",begin:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/},{className:"symbol",begin:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/},{className:"symbol",begin:/%[si]/},e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(...e){return e.map(e=>n(e)).join("")}function o(...e){return"("+e.map(e=>n(e)).join("|")+")"}e.exports=function(e){const t=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"];return{name:"Apache Access Log",contains:[{className:"number",begin:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,relevance:5},{className:"number",begin:/\b\d+\b/,relevance:0},{className:"string",begin:r(/"/,o(...t)),end:/"/,keywords:t,illegal:/\n/,relevance:5,contains:[{begin:/HTTP\/[12]\.\d'/,relevance:5}]},{className:"string",begin:/\[\d[^\]\n]{8,}\]/,illegal:/\n/,relevance:1},{className:"string",begin:/\[/,end:/\]/,illegal:/\n/,relevance:0},{className:"string",begin:/"Mozilla\/\d\.\d \(/,end:/"/,illegal:/\n/,relevance:3},{className:"string",begin:/"/,end:/"/,illegal:/\n/,relevance:0}]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t={className:"rest_arg",begin:/[.]{3}/,end:/[a-zA-Z_$][a-zA-Z0-9_$]*/,relevance:10};return{name:"ActionScript",aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"class",beginKeywords:"package",end:/\{/,contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"meta",beginKeywords:"import include",end:/;/,keywords:{"meta-keyword":"import include"}},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,illegal:/\S/,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t]},{begin:n(/:\s*/,/([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/)}]},e.METHOD_GUARD],illegal:/#/}}},function(e,t){e.exports=function(e){const t="[A-Za-z](_?[A-Za-z0-9.])*",n=e.COMMENT("--","$"),r={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:"[]\\{\\}%#'\"",contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:t,endsParent:!0,relevance:0}]};return{name:"Ada",case_insensitive:!0,keywords:{keyword:"abort else new return abs elsif not reverse abstract end accept entry select access exception of separate aliased exit or some all others subtype and for out synchronized array function overriding at tagged generic package task begin goto pragma terminate body private then if procedure type case in protected constant interface is raise use declare range delay limited record when delta loop rem while digits renames with do mod requeue xor",literal:"True False"},contains:[n,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:"\\b(\\d(_|\\d)*#\\w+(\\.\\w+)?#([eE][-+]?\\d(_|\\d)*)?|\\d(_|\\d)*(\\.\\d(_|\\d)*)?([eE][-+]?\\d(_|\\d)*)?)",relevance:0},{className:"symbol",begin:"'"+t},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:"[]\\{\\}%#'\""},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[n,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:"[]\\{\\}%#'\""},r,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:"[]\\{\\}%#'\""}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:"[]\\{\\}%#'\""},r]}}},function(e,t){e.exports=function(e){var t={className:"built_in",begin:"\\b(void|bool|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|string|ref|array|double|float|auto|dictionary)"},n={className:"symbol",begin:"[a-zA-Z0-9_]+@"},r={className:"keyword",begin:"<",end:">",contains:[t,n]};return t.contains=[r],n.contains=[r],{name:"AngelScript",aliases:["asc"],keywords:"for in|0 break continue while do|0 return if else case switch namespace is cast or and xor not get|0 in inout|10 out override set|0 private public const default|0 final shared external mixin|10 enum typedef funcdef this super import from interface abstract|0 try catch protected explicit property",illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"""',end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]}]}]},t,n,{className:"literal",begin:"\\b(null|true|false)"},{className:"number",relevance:0,begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"}]}}},function(e,t){e.exports=function(e){const t={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[t,{className:"number",begin:/:\d{1,5}/},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",{className:"number",begin:/[$%]\d+/}]},t,{className:"number",begin:/\d+/},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(...e){return e.map(e=>n(e)).join("")}function o(...e){return"("+e.map(e=>n(e)).join("|")+")"}e.exports=function(e){const t=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),n={className:"params",begin:/\(/,end:/\)/,contains:["self",e.C_NUMBER_MODE,t]},i=e.COMMENT(/--/,/$/),a=[i,e.COMMENT(/\(\*/,/\*\)/,{contains:["self",i]}),e.HASH_COMMENT_MODE];return{name:"AppleScript",aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[t,e.C_NUMBER_MODE,{className:"built_in",begin:r(/\b/,o(/clipboard info/,/the clipboard/,/info for/,/list (disks|folder)/,/mount volume/,/path to/,/(close|open for) access/,/(get|set) eof/,/current date/,/do shell script/,/get volume settings/,/random number/,/set volume/,/system attribute/,/system info/,/time to GMT/,/(load|run|store) script/,/scripting components/,/ASCII (character|number)/,/localized string/,/choose (application|color|file|file name|folder|from list|remote application|URL)/,/display (alert|dialog)/),/\b/)},{className:"built_in",begin:/^\s*return\b/},{className:"literal",begin:/\b(text item delimiters|current application|missing value)\b/},{className:"keyword",begin:r(/\b/,o(/apart from/,/aside from/,/instead of/,/out of/,/greater than/,/isn't|(doesn't|does not) (equal|come before|come after|contain)/,/(greater|less) than( or equal)?/,/(starts?|ends|begins?) with/,/contained by/,/comes (before|after)/,/a (ref|reference)/,/POSIX (file|path)/,/(date|time) string/,/quoted form/),/\b/)},{beginKeywords:"on",illegal:/[${=;\n]/,contains:[e.UNDERSCORE_TITLE_MODE,n]},...a],illegal:/\/\/|->|=>|\[\[/}}},function(e,t){e.exports=function(e){const t="[A-Za-z_][0-9A-Za-z_]*",n={keyword:"if for while var new function do return void else break",literal:"BackSlash DoubleQuote false ForwardSlash Infinity NaN NewLine null PI SingleQuote Tab TextFormatting true undefined",built_in:"Abs Acos Angle Attachments Area AreaGeodetic Asin Atan Atan2 Average Bearing Boolean Buffer BufferGeodetic Ceil Centroid Clip Console Constrain Contains Cos Count Crosses Cut Date DateAdd DateDiff Day Decode DefaultValue Dictionary Difference Disjoint Distance DistanceGeodetic Distinct DomainCode DomainName Equals Exp Extent Feature FeatureSet FeatureSetByAssociation FeatureSetById FeatureSetByPortalItem FeatureSetByRelationshipName FeatureSetByTitle FeatureSetByUrl Filter First Floor Geometry GroupBy Guid HasKey Hour IIf IndexOf Intersection Intersects IsEmpty IsNan IsSelfIntersecting Length LengthGeodetic Log Max Mean Millisecond Min Minute Month MultiPartToSinglePart Multipoint NextSequenceValue Now Number OrderBy Overlaps Point Polygon Polyline Portal Pow Random Relate Reverse RingIsClockWise Round Second SetGeometry Sin Sort Sqrt Stdev Sum SymmetricDifference Tan Text Timestamp Today ToLocal Top Touches ToUTC TrackCurrentTime TrackGeometryWindow TrackIndex TrackStartTime TrackWindow TypeOf Union UrlEncode Variance Weekday When Within Year "},r={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},o={className:"subst",begin:"\\$\\{",end:"\\}",keywords:n,contains:[]},i={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,o]};o.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,r,e.REGEXP_MODE];const a=o.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{name:"ArcGIS Arcade",keywords:n,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"symbol",begin:"\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+"},r,{begin:/[{,]\s*/,relevance:0,contains:[{begin:t+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:t,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(return)\\b)\\s*",keywords:"return",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+t+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:a}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:a}],illegal:/\[|%/},{begin:/\$[(.]/}],illegal:/#(?!!)/}}},function(e,t){function n(e){return r("(",e,")?")}function r(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t="boolean byte word String",o="KeyboardController MouseController SoftwareSerial EthernetServer EthernetClient LiquidCrystal RobotControl GSMVoiceCall EthernetUDP EsploraTFT HttpClient RobotMotor WiFiClient GSMScanner FileSystem Scheduler GSMServer YunClient YunServer IPAddress GSMClient GSMModem Keyboard Ethernet Console GSMBand Esplora Stepper Process WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage Client Server GSMPIN FileIO Bridge Serial EEPROM Stream Mouse Audio Servo File Task GPRS WiFi Wire TFT GSM SPI SD ",i="setup loop runShellCommandAsynchronously analogWriteResolution retrieveCallingNumber printFirmwareVersion analogReadResolution sendDigitalPortPair noListenOnLocalhost readJoystickButton setFirmwareVersion readJoystickSwitch scrollDisplayRight getVoiceCallStatus scrollDisplayLeft writeMicroseconds delayMicroseconds beginTransmission getSignalStrength runAsynchronously getAsynchronously listenOnLocalhost getCurrentCarrier readAccelerometer messageAvailable sendDigitalPorts lineFollowConfig countryNameWrite runShellCommand readStringUntil rewindDirectory readTemperature setClockDivider readLightSensor endTransmission analogReference detachInterrupt countryNameRead attachInterrupt encryptionType readBytesUntil robotNameWrite readMicrophone robotNameRead cityNameWrite userNameWrite readJoystickY readJoystickX mouseReleased openNextFile scanNetworks noInterrupts digitalWrite beginSpeaker mousePressed isActionDone mouseDragged displayLogos noAutoscroll addParameter remoteNumber getModifiers keyboardRead userNameRead waitContinue processInput parseCommand printVersion readNetworks writeMessage blinkVersion cityNameRead readMessage setDataMode parsePacket isListening setBitOrder beginPacket isDirectory motorsWrite drawCompass digitalRead clearScreen serialEvent rightToLeft setTextSize leftToRight requestFrom keyReleased compassRead analogWrite interrupts WiFiServer disconnect playMelody parseFloat autoscroll getPINUsed setPINUsed setTimeout sendAnalog readSlider analogRead beginWrite createChar motorsStop keyPressed tempoWrite readButton subnetMask debugPrint macAddress writeGreen randomSeed attachGPRS readString sendString remotePort releaseAll mouseMoved background getXChange getYChange answerCall getResult voiceCall endPacket constrain getSocket writeJSON getButton available connected findUntil readBytes exitValue readGreen writeBlue startLoop IPAddress isPressed sendSysex pauseMode gatewayIP setCursor getOemKey tuneWrite noDisplay loadImage switchPIN onRequest onReceive changePIN playFile noBuffer parseInt overflow checkPIN knobRead beginTFT bitClear updateIR bitWrite position writeRGB highByte writeRed setSpeed readBlue noStroke remoteIP transfer shutdown hangCall beginSMS endWrite attached maintain noCursor checkReg checkPUK shiftOut isValid shiftIn pulseIn connect println localIP pinMode getIMEI display noBlink process getBand running beginSD drawBMP lowByte setBand release bitRead prepare pointTo readRed setMode noFill remove listen stroke detach attach noTone exists buffer height bitSet circle config cursor random IRread setDNS endSMS getKey micros millis begin print write ready flush width isPIN blink clear press mkdir rmdir close point yield image BSSID click delay read text move peek beep rect line open seek fill size turn stop home find step tone sqrt RSSI SSID end bit tan cos sin pow map abs max min get run put",a="DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL DEFAULT OUTPUT INPUT HIGH LOW",s=function(e){const t=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="(decltype\\(auto\\)|"+n("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+n("<[^<>]+>")+")",i={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:n("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},u=n("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",d={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"_Bool _Complex _Imaginary",_relevance_hints:["asin","atan2","atan","calloc","ceil","cosh","cos","exit","exp","fabs","floor","fmod","fprintf","fputs","free","frexp","auto_ptr","deque","list","queue","stack","vector","map","set","pair","bitset","multiset","multimap","unordered_set","fscanf","future","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","tolower","toupper","labs","ldexp","log10","log","malloc","realloc","memchr","memcmp","memcpy","memset","modf","pow","printf","putchar","puts","scanf","sinh","sin","snprintf","sprintf","sqrt","sscanf","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","tanh","tan","unordered_map","unordered_multiset","unordered_multimap","priority_queue","make_pair","array","shared_ptr","abort","terminate","abs","acos","vfprintf","vprintf","vsprintf","endl","initializer_list","unique_ptr","complex","imaginary","std","string","wstring","cin","cout","cerr","clog","stdin","stdout","stderr","stringstream","istringstream","ostringstream"],literal:"true false nullptr NULL"},h={className:"function.dispatch",relevance:0,keywords:d,begin:r(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!while)/,e.IDENT_RE,(p=/\s*\(/,r("(?=",p,")")))};var p;const m=[h,c,i,t,e.C_BLOCK_COMMENT_MODE,s,a],g={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:m.concat([{begin:/\(/,end:/\)/,keywords:d,contains:m.concat(["self"]),relevance:0}]),relevance:0},f={className:"function",begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,s]},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,a,s,i,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,a,s,i]}]},i,t,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(g,f,h,m,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",end:">",keywords:d,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:d},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:d}}}(e),c=s.keywords;return c.keyword+=" "+t,c.literal+=" "+a,c.built_in+=" "+o,c._+=" "+i,s.name="Arduino",s.aliases=["ino"],s.supersetOf="cpp",s}},function(e,t){e.exports=function(e){const t={variants:[e.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}),e.COMMENT("[;@]","$",{relevance:0}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+e.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},t,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(e){return o("(?=",e,")")}function o(...e){return e.map(e=>n(e)).join("")}function i(...e){return"("+e.map(e=>n(e)).join("|")+")"}e.exports=function(e){const t=o(/[A-Z_]/,o("(",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(a,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{className:"meta-string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[A-Za-z0-9._:-]+/,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[n]},{begin:/'/,end:/'/,contains:[n]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,l,c,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,s,l,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:o(/</,r(o(t,i(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:u}]},{className:"tag",begin:o(/<\//,r(o(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t=[{className:"strong",begin:/\*{2}([^\n]+?)\*{2}/},{className:"strong",begin:n(/\*\*/,/((\*(?!\*)|\\[^\n]|[^*\n\\])+\n)+/,/(\*(?!\*)|\\[^\n]|[^*\n\\])*/,/\*\*/),relevance:0},{className:"strong",begin:/\B\*(\S|\S[^\n]*?\S)\*(?!\w)/},{className:"strong",begin:/\*[^\s]([^\n]+\n)+([^\n]+)\*/}],r=[{className:"emphasis",begin:/_{2}([^\n]+?)_{2}/},{className:"emphasis",begin:n(/__/,/((_(?!_)|\\[^\n]|[^_\n\\])+\n)+/,/(_(?!_)|\\[^\n]|[^_\n\\])*/,/__/),relevance:0},{className:"emphasis",begin:/\b_(\S|\S[^\n]*?\S)_(?!\w)/},{className:"emphasis",begin:/_[^\s]([^\n]+\n)+([^\n]+)_/},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0}];return{name:"AsciiDoc",aliases:["adoc"],contains:[e.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,6})[ \t].+?([ \t]\\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|-+|\\.+|[^\\n]+?::)\\s+"},{className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{begin:/\\[*_`]/},{begin:/\\\\\*{2}[^\n]*?\*{2}/},{begin:/\\\\_{2}[^\n]*_{2}/},{begin:/\\\\`{2}[^\n]*`{2}/},{begin:/[:;}][*_`](?![*_`])/},...t,...r,{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:/`{2}/,end:/(\n{2}|`{2})/},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+?\\[[^[]*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance";return{name:"AspectJ",keywords:t,illegal:/<\/|#/,contains:[e.COMMENT(/\/\*\*/,/\*\//,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:/@[A-Za-z]+/}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},e.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:t+" get set args call",excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:n(e.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:t,illegal:/["\[\]]/,contains:[{begin:n(e.UNDERSCORE_IDENT_RE,/\s*\(/),keywords:t+" get set args call",relevance:0},e.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.\w+)?\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:t,excludeEnd:!0,contains:[{begin:n(e.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:t,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:/@[A-Za-z]+/}]}}},function(e,t){e.exports=function(e){const t={begin:"`[\\s\\S]"};return{name:"AutoHotkey",case_insensitive:!0,aliases:["ahk"],keywords:{keyword:"Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group",literal:"true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[t,e.inherit(e.QUOTE_STRING_MODE,{contains:[t]}),e.COMMENT(";","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,{className:"number",begin:e.NUMBER_RE,relevance:0},{className:"variable",begin:"%[a-zA-Z0-9#_$@]+%"},{className:"built_in",begin:"^\\s*\\w+\\s*(,|%)"},{className:"title",variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{className:"meta",begin:"^\\s*#\\w+",end:"$",relevance:0},{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{begin:",\\s*,"}]}}},function(e,t){e.exports=function(e){const t={variants:[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#cs","#ce"),e.COMMENT("#comments-start","#comments-end")]},n={begin:"\\$[A-z0-9_]+"},r={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},o={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"AutoIt",case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:"ByRef Case Const ContinueCase ContinueLoop Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",built_in:"Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive",literal:"True False And Null Not Or Default"},contains:[t,n,r,o,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":["EndRegion","forcedef","forceref","ignorefunc","include","include-once","NoTrayIcon","OnAutoItStartRegister","pragma","Region","RequireAdmin","Tidy_Off","Tidy_On","Tidy_Parameters"]},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{"meta-keyword":"include"},end:"$",contains:[r,{className:"meta-string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},r,t]},{className:"symbol",begin:"@[A-z0-9_]+"},{className:"function",beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[n,r,o]}]}]}}},function(e,t){e.exports=function(e){return{name:"AVR Assembly",case_insensitive:!0,keywords:{$pattern:"\\.?"+e.IDENT_RE,keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),e.C_NUMBER_MODE,e.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}},function(e,t){e.exports=function(e){return{name:"Awk",keywords:{keyword:"BEGIN END if else while do for in break continue delete next nextfile function func exit|10"},contains:[{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},e.REGEXP_MODE,e.HASH_COMMENT_MODE,e.NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"X++",aliases:["x++"],keywords:{keyword:["abstract","as","asc","avg","break","breakpoint","by","byref","case","catch","changecompany","class","client","client","common","const","continue","count","crosscompany","delegate","delete_from","desc","display","div","do","edit","else","eventhandler","exists","extends","final","finally","firstfast","firstonly","firstonly1","firstonly10","firstonly100","firstonly1000","flush","for","forceliterals","forcenestedloop","forceplaceholders","forceselectorder","forupdate","from","generateonly","group","hint","if","implements","in","index","insert_recordset","interface","internal","is","join","like","maxof","minof","mod","namespace","new","next","nofetch","notexists","optimisticlock","order","outer","pessimisticlock","print","private","protected","public","readonly","repeatableread","retry","return","reverse","select","server","setting","static","sum","super","switch","this","throw","try","ttsabort","ttsbegin","ttscommit","unchecked","update_recordset","using","validtimestate","void","where","while"],built_in:["anytype","boolean","byte","char","container","date","double","enum","guid","int","int64","long","real","short","str","utcdatetime","var"],literal:["default","false","null","true"]},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]}]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{className:"variable",variants:[{begin:n(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,o]};o.contains.push(a);const s={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t]},c=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp"},contains:[c,e.SHEBANG(),l,s,e.HASH_COMMENT_MODE,i,a,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},t]}}},function(e,t){e.exports=function(e){return{name:"BASIC",case_insensitive:!0,illegal:"^.",keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keyword:"ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO HEX$ IF THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE WEND WIDTH WINDOW WRITE XOR"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("REM","$",{relevance:10}),e.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10},{className:"number",begin:"\\b\\d+(\\.\\d+)?([edED]\\d+)?[#!]?",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}},function(e,t){e.exports=function(e){return{name:"Backus–Naur Form",contains:[{className:"attribute",begin:/</,end:/>/},{begin:/::=/,end:/$/,contains:[{begin:/</,end:/>/},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}]}}},function(e,t){e.exports=function(e){const t={className:"literal",begin:/[+-]/,relevance:0};return{name:"Brainfuck",aliases:["bf"],contains:[e.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/(?:\+\+|--)/,contains:[t]},t]}}},function(e,t){function n(e){return r("(",e,")?")}function r(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t=function(e){const t=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="(decltype\\(auto\\)|"+n("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+n("<[^<>]+>")+")",i={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:n("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},u=n("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",d={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"_Bool _Complex _Imaginary",_relevance_hints:["asin","atan2","atan","calloc","ceil","cosh","cos","exit","exp","fabs","floor","fmod","fprintf","fputs","free","frexp","auto_ptr","deque","list","queue","stack","vector","map","set","pair","bitset","multiset","multimap","unordered_set","fscanf","future","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","tolower","toupper","labs","ldexp","log10","log","malloc","realloc","memchr","memcmp","memcpy","memset","modf","pow","printf","putchar","puts","scanf","sinh","sin","snprintf","sprintf","sqrt","sscanf","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","tanh","tan","unordered_map","unordered_multiset","unordered_multimap","priority_queue","make_pair","array","shared_ptr","abort","terminate","abs","acos","vfprintf","vprintf","vsprintf","endl","initializer_list","unique_ptr","complex","imaginary","std","string","wstring","cin","cout","cerr","clog","stdin","stdout","stderr","stringstream","istringstream","ostringstream"],literal:"true false nullptr NULL"},h={className:"function.dispatch",relevance:0,keywords:d,begin:r(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!while)/,e.IDENT_RE,(p=/\s*\(/,r("(?=",p,")")))};var p;const m=[h,c,i,t,e.C_BLOCK_COMMENT_MODE,s,a],g={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:m.concat([{begin:/\(/,end:/\)/,keywords:d,contains:m.concat(["self"]),relevance:0}]),relevance:0},f={className:"function",begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,s]},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,a,s,i,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,a,s,i]}]},i,t,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(g,f,h,m,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",end:">",keywords:d,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:d},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:d}}}(e);return t.disableAutodetect=!0,t.aliases=[],e.getLanguage("c")||t.aliases.push("c","h"),e.getLanguage("cpp")||t.aliases.push("cc","c++","h++","hpp","hh","hxx","cxx"),t}},function(e,t){function n(e){return function(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}("(",e,")?")}e.exports=function(e){const t=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="(decltype\\(auto\\)|"+n("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+n("<[^<>]+>")+")",o={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},i={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(i,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},c={className:"title",begin:n("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},l=n("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",u={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},d=[s,o,t,e.C_BLOCK_COMMENT_MODE,a,i],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:d.concat([{begin:/\(/,end:/\)/,keywords:u,contains:d.concat(["self"]),relevance:0}]),relevance:0},p={className:"function",begin:"("+r+"[\\*&\\s]+)+"+l,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:l,returnBegin:!0,contains:[c],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,i,a,o,{begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,i,a,o]}]},o,t,e.C_BLOCK_COMMENT_MODE,s]};return{name:"C",aliases:["h"],keywords:u,disableAutodetect:!0,illegal:"</",contains:[].concat(h,p,d,[s,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",end:">",keywords:u,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:u},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:s,strings:i,keywords:u}}}},function(e,t){e.exports=function(e){const t="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},o={className:"string",begin:/(#\d+)+/},i={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[r,o]}].concat(n)},a={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[e.TITLE_MODE,i]};return{name:"C/AL",case_insensitive:!0,keywords:{keyword:t,literal:"false true"},illegal:/\/\*/,contains:[r,o,{className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},{className:"string",begin:'"',end:'"'},e.NUMBER_MODE,a,i]}}},function(e,t){e.exports=function(e){return{name:"Cap’n Proto",aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}},function(e,t){e.exports=function(e){const t="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",n={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:t,relevance:10},r=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[n]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return n.contains=r,{name:"Ceylon",keywords:{keyword:t+" shared abstract formal default actual variable late native deprecated final sealed annotation suppressWarnings small",meta:"doc by license see throws tagged"},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"meta",begin:'@[a-z]\\w*(?::"[^"]*")?'}].concat(r)}}},function(e,t){e.exports=function(e){return{name:"Clean",aliases:["icl","dcl"],keywords:{keyword:"if let in with where case of class instance otherwise implementation definition system module from import qualified as special code inline foreign export ccall stdcall generic derive infix infixl infixr",built_in:"Int Real Char Bool",literal:"True False"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:"->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>"}]}}},function(e,t){e.exports=function(e){const t="[a-zA-Z_\\-!.?+*=<>&#'][a-zA-Z_\\-!.?+*=<>&#'0-9/;:]*",n="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",r={$pattern:t,"builtin-name":n+" cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},o={begin:t,relevance:0},i={className:"number",begin:"[-+]?\\d+(\\.\\d+)?",relevance:0},a=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),s=e.COMMENT(";","$",{relevance:0}),c={className:"literal",begin:/\b(true|false|nil)\b/},l={begin:"[\\[\\{]",end:"[\\]\\}]"},u={className:"comment",begin:"\\^"+t},d=e.COMMENT("\\^\\{","\\}"),h={className:"symbol",begin:"[:]{1,2}"+t},p={begin:"\\(",end:"\\)"},m={endsWithParent:!0,relevance:0},g={keywords:r,className:"name",begin:t,relevance:0,starts:m},f=[p,a,u,d,s,h,l,i,c,o],_={beginKeywords:n,lexemes:t,end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:t,relevance:0,excludeEnd:!0,endsParent:!0}].concat(f)};return p.contains=[e.COMMENT("comment",""),_,g,m],m.contains=f,l.contains=f,d.contains=[l],{name:"Clojure",aliases:["clj"],illegal:/\S/,contains:[p,a,u,d,s,h,l,i,c]}}},function(e,t){e.exports=function(e){return{name:"Clojure REPL",contains:[{className:"meta",begin:/^([\w.-]+|\s*#_)?=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}},function(e,t){e.exports=function(e){return{name:"CMake",aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process file find_file find_library find_package find_path find_program foreach function get_cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_options add_subdirectory add_test aux_source_directory build_command create_test_sourcelist define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_directory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined"},contains:[{className:"variable",begin:/\$\{/,end:/\}/},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}},function(e,t){const n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],r=["true","false","null","undefined","NaN","Infinity"],o=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);e.exports=function(e){const t={keyword:n.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((i=["var","const","let","function","static"],e=>!i.includes(e))),literal:r.concat(["yes","no","on","off"]),built_in:o.concat(["npm","print"])};var i;const a="[A-Za-z$_][0-9A-Za-z$_]*",s={className:"subst",begin:/#\{/,end:/\}/,keywords:t},c=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[s,e.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+a},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];s.contains=c;const l=e.inherit(e.TITLE_MODE,{begin:a}),u={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(c)}]};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:c.concat([e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+a+"\\s*=\\s*(\\(.*\\)\\s*)?\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[l,u]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:"(\\(.*\\)\\s*)?\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[u]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[l]},l]},{begin:a+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}},function(e,t){e.exports=function(e){return{name:"Coq",keywords:{keyword:"_|0 as at cofix else end exists exists2 fix for forall fun if IF in let match mod Prop return Set then Type using where with Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture Conjectures Constant constr Constraint Constructors Context Corollary CreateHintDb Cut Declare Defined Definition Delimit Dependencies Dependent Derive Drop eauto End Equality Eval Example Existential Existentials Existing Export exporting Extern Extract Extraction Fact Field Fields File Fixpoint Focus for From Function Functional Generalizable Global Goal Grab Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident Identity If Immediate Implicit Import Include Inductive Infix Info Initial Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation Obligations Opaque Open Optimize Options Parameter Parameters Parametric Path Paths pattern Polymorphic Preterm Print Printing Program Projections Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused Unfold Universe Universes Unset Unshelve using Variable Variables Variant Verbose Visibility where with",built_in:"abstract absurd admit after apply as assert assumption at auto autorewrite autounfold before bottom btauto by case case_eq cbn cbv change classical_left classical_right clear clearbody cofix compare compute congruence constr_eq constructor contradict contradiction cut cutrewrite cycle decide decompose dependent destruct destruction dintuition discriminate discrR do double dtauto eapply eassumption eauto ecase econstructor edestruct ediscriminate eelim eexact eexists einduction einjection eleft elim elimtype enough equality erewrite eright esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail field field_simplify field_simplify_eq first firstorder fix fold fourier functional generalize generalizing gfail give_up has_evar hnf idtac in induction injection instantiate intro intro_pattern intros intuition inversion inversion_clear is_evar is_var lapply lazy left lia lra move native_compute nia nsatz omega once pattern pose progress proof psatz quote record red refine reflexivity remember rename repeat replace revert revgoals rewrite rewrite_strat right ring ring_simplify rtauto set setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve specialize split split_Rabs split_Rmult stepl stepr subst sum swap symmetry tactic tauto time timeout top transitivity trivial try tryif unfold unify until using vm_compute with"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("\\(\\*","\\*\\)"),e.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}},function(e,t){e.exports=function(e){return{name:"Caché Object Script",case_insensitive:!0,aliases:["cls"],keywords:"property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii",contains:[{className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0},{className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"sql"},{begin:/&(js|jscript|javascript)</,end:/>/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*</,end:/>\s*>/,subLanguage:"xml"}]}}},function(e,t){function n(e){return r("(",e,")?")}function r(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="(decltype\\(auto\\)|"+n("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+n("<[^<>]+>")+")",i={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:n("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},u=n("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",d={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"_Bool _Complex _Imaginary",_relevance_hints:["asin","atan2","atan","calloc","ceil","cosh","cos","exit","exp","fabs","floor","fmod","fprintf","fputs","free","frexp","auto_ptr","deque","list","queue","stack","vector","map","set","pair","bitset","multiset","multimap","unordered_set","fscanf","future","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","tolower","toupper","labs","ldexp","log10","log","malloc","realloc","memchr","memcmp","memcpy","memset","modf","pow","printf","putchar","puts","scanf","sinh","sin","snprintf","sprintf","sqrt","sscanf","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","tanh","tan","unordered_map","unordered_multiset","unordered_multimap","priority_queue","make_pair","array","shared_ptr","abort","terminate","abs","acos","vfprintf","vprintf","vsprintf","endl","initializer_list","unique_ptr","complex","imaginary","std","string","wstring","cin","cout","cerr","clog","stdin","stdout","stderr","stringstream","istringstream","ostringstream"],literal:"true false nullptr NULL"},h={className:"function.dispatch",relevance:0,keywords:d,begin:r(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!while)/,e.IDENT_RE,(p=/\s*\(/,r("(?=",p,")")))};var p;const m=[h,c,i,t,e.C_BLOCK_COMMENT_MODE,s,a],g={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:m.concat([{begin:/\(/,end:/\)/,keywords:d,contains:m.concat(["self"]),relevance:0}]),relevance:0},f={className:"function",begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,s]},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,a,s,i,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,a,s,i]}]},i,t,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(g,f,h,m,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",end:">",keywords:d,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:d},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:d}}}},function(e,t){e.exports=function(e){const t="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{name:"crmsh",aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:"params meta operations op rule attributes utilization read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\ number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},contains:[e.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:"primitive rsc_template",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+t.split(" ").join("|")+")\\s+",keywords:t,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:"property rsc_defaults op_defaults",starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},e.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z$_#][\w_-]+)=/,relevance:0},{className:"tag",begin:"</?",end:"/?>",relevance:0}]}}},function(e,t){e.exports=function(e){const t="(_?[ui](8|16|32|64|128))?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",r={$pattern:"[a-zA-Z_]\\w*[!?=]?",keyword:"abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},o={className:"subst",begin:/#\{/,end:/\}/,keywords:r},i={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:r};function a(e,t){const n=[{begin:e,end:t}];return n[0].contains=n,n}const s={className:"string",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[Qwi]?\\(",end:"\\)",contains:a("\\(","\\)")},{begin:"%[Qwi]?\\[",end:"\\]",contains:a("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:a(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:a("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},c={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:a("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:a("\\[","\\]")},{begin:"%q\\{",end:/\}/,contains:a(/\{/,/\}/)},{begin:"%q<",end:">",contains:a("<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},l={begin:"(?!%\\})("+e.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},u=[i,s,c,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:"%r\\(",end:"\\)",contains:a("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:a("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:a(/\{/,/\}/)},{begin:"%r<",end:">",contains:a("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},l,{className:"meta",begin:"@\\[",end:"\\]",contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"})]},e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"})],relevance:2},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})],relevance:2},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[s,{begin:n}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?(_?f(32|64))?(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+t}],relevance:0}];return o.contains=u,i.contains=u.slice(1),{name:"Crystal",aliases:["cr"],keywords:r,contains:u}}},function(e,t){e.exports=function(e){const t={keyword:["abstract","as","base","break","case","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},o={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},i=e.inherit(o,{illegal:/\n/}),a={className:"subst",begin:/\{/,end:/\}/,keywords:t},s=e.inherit(a,{illegal:/\n/}),c={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,s]},l={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]},u=e.inherit(l,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]});a.contains=[l,c,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE],s.contains=[u,c,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const d={variants:[l,c,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},p=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",m={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},d,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+p+"\\s+)+"+e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[d,r,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},m]}}},function(e,t){e.exports=function(e){return{name:"CSP",case_insensitive:!1,keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_-]*",keyword:"base-uri child-src connect-src default-src font-src form-action frame-ancestors frame-src img-src media-src object-src plugin-types report-uri sandbox script-src style-src"},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}},function(e,t){const n=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],i=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],a=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse();function s(e){return function(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}("(?=",e,")")}e.exports=function(e){const t=(e=>({IMPORTANT:{className:"meta",begin:"!important"},HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}))(e),c=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[e.C_BLOCK_COMMENT_MODE,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},e.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+o.join("|")+")"},{begin:"::("+i.join("|")+")"}]},{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:":",end:"[;}]",contains:[t.HEXCOLOR,t.IMPORTANT,e.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},{className:"built_in",begin:/[\w-]+(?=\()/}]},{begin:s(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:r.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b"}]}}},function(e,t){e.exports=function(e){const t={$pattern:e.UNDERSCORE_IDENT_RE,keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},n="((0|[1-9][\\d_]*)|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))",r="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",o={className:"number",begin:"\\b"+n+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},i={className:"number",begin:"\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|"+n+"(i|[fF]i|Li))",relevance:0},a={className:"string",begin:"'("+r+"|.)",end:"'",illegal:"."},s={className:"string",begin:'"',contains:[{begin:r,relevance:0}],end:'"[cwd]?'},c=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c,{className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},s,{className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},{className:"string",begin:"`",end:"`[cwd]?"},{className:"string",begin:'q"\\{',end:'\\}"'},i,o,a,{className:"meta",begin:"^#!",end:"$",relevance:5},{className:"meta",begin:"#(line)",end:"$",relevance:5},{className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.+?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},o={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},i={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};o.contains.push(i),i.contains.push(o);let a=[t,r];return o.contains=o.contains.concat(a),i.contains=i.contains.concat(a),a=a.concat(o,i),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o,i,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},r,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}},function(e,t){e.exports=function(e){const t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},n={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},r={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]}]};n.contains=[e.C_NUMBER_MODE,r];const o=["Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],i=o.map(e=>e+"?");return{name:"Dart",keywords:{keyword:"abstract as assert async await break case catch class const continue covariant default deferred do dynamic else enum export extends extension external factory false final finally for Function get hide if implements import in inferface is late library mixin new null on operator part required rethrow return set show static super switch sync this throw true try typedef var void while with yield",built_in:o.concat(i).concat(["Never","Null","dynamic","print","document","querySelector","querySelectorAll","window"]),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},contains:[r,e.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),e.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",end:"$",relevance:0}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}},function(e,t){e.exports=function(e){const t="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure absolute reintroduce operator as is abstract alias assembler bitpacked break continue cppdecl cvar enumerator experimental platform deprecated unimplemented dynamic export far16 forward generic helper implements interrupt iochecks local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat specialize strict unaligned varargs ",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"meta",variants:[{begin:/\{\$/,end:/\}/},{begin:/\(\*\$/,end:/\*\)/}]},o={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},i={className:"string",begin:/(#\d+)+/},a={begin:e.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE]},s={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[o,i,r].concat(n)},r].concat(n)};return{name:"Delphi",aliases:["dpr","dfm","pas","pascal","freepascal","lazarus","lpr","lfm"],case_insensitive:!0,keywords:t,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[o,i,e.NUMBER_MODE,{className:"number",relevance:0,variants:[{begin:"\\$[0-9A-Fa-f]+"},{begin:"&[0-7]+"},{begin:"%[01]+"}]},a,s,r].concat(n)}}},function(e,t){e.exports=function(e){return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^--- +\d+,\d+ +----$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/^index/,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/},{begin:/^diff --git/,end:/$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}},function(e,t){e.exports=function(e){const t={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE]};return{name:"Django",aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%\}/,/\{%\s*endcomment\s*%\}/),e.COMMENT(/\{#/,/#\}/),{className:"template-tag",begin:/\{%/,end:/%\}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[t],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[t]}]}}},function(e,t){e.exports=function(e){return{name:"DNS Zone",aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},e.inherit(e.NUMBER_MODE,{begin:/\b\d+[dhwm]?/})]}}},function(e,t){e.exports=function(e){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:"from maintainer expose env arg user onbuild stopsignal",contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"</"}}},function(e,t){e.exports=function(e){const t=e.COMMENT(/^\s*@?rem\b/,/$/,{relevance:10});return{name:"Batch file (DOS)",aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",built_in:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux shift cd dir echo setlocal endlocal set pause copy append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shift sort start subst time title tree type ver verify vol ping net ipconfig taskkill xcopy ren del"},contains:[{className:"variable",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"function",begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",end:"goto:eof",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),t]},{className:"number",begin:"\\b\\d+",relevance:0},t]}}},function(e,t){e.exports=function(e){return{keywords:"dsconfig",contains:[{className:"keyword",begin:"^dsconfig",end:/\s/,excludeEnd:!0,relevance:10},{className:"built_in",begin:/(list|create|get|set|delete)-(\w+)/,end:/\s/,excludeEnd:!0,illegal:"!@#$%^&*()",relevance:10},{className:"built_in",begin:/--(\w+)/,end:/\s/,excludeEnd:!0},{className:"string",begin:/"/,end:/"/},{className:"string",begin:/'/,end:/'/},{className:"string",begin:/[\w\-?]+:\w+/,end:/\W/,relevance:0},{className:"string",begin:/\w+(\-\w+)*/,end:/(?=\W)/,relevance:0},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t={className:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},n={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:e.C_NUMBER_RE}],relevance:0},r={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef ifdef ifndef"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{"meta-keyword":"include"},contains:[e.inherit(t,{className:"meta-string"}),{className:"meta-string",begin:"<",end:">",illegal:"\\n"}]},t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},o={className:"variable",begin:/&[a-z\d_]*\b/},i={className:"meta-keyword",begin:"/[a-z][a-z\\d-]*/"},a={className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},s={className:"params",begin:"<",end:">",contains:[n,o]},c={className:"class",begin:/[a-zA-Z_][a-zA-Z\d_@]*\s\{/,end:/[{;=]/,returnBegin:!0,excludeEnd:!0};return{name:"Device Tree",keywords:"",contains:[{className:"class",begin:"/\\s*\\{",end:/\};/,relevance:10,contains:[o,i,a,c,s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,t]},o,i,a,c,s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,t,r,{begin:e.IDENT_RE+"::",keywords:""}]}}},function(e,t){e.exports=function(e){return{name:"Dust",aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/,keywords:"if eq ne lt lte gt gte select default math sep"}]}}},function(e,t){e.exports=function(e){const t=e.COMMENT(/\(\*/,/\*\)/);return{name:"Extended Backus-Naur Form",illegal:/\S/,contains:[t,{className:"attribute",begin:/^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/},{begin:/=/,end:/[.;]/,contains:[t,{className:"meta",begin:/\?.*\?/},{className:"string",variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"`",end:"`"}]}]}]}}},function(e,t){e.exports=function(e){const t="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",n={$pattern:t,keyword:"and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote require import with|0"},r={className:"subst",begin:/#\{/,end:/\}/,keywords:n},o={className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[1-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},i={className:"string",begin:"~[a-z](?=[/|([{<\"'])",contains:[{endsParent:!0,contains:[{contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin:/</,end:/>/}]}]}]},a={className:"string",begin:"~[A-Z](?=[/|([{<\"'])",contains:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin:/</,end:/>/}]},s={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},c={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:t,endsParent:!0})]},l=e.inherit(c,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),u=[s,a,i,e.HASH_COMMENT_MODE,l,c,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[s,{begin:"[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?"}],relevance:0},{className:"symbol",begin:t+":(?!:)",relevance:0},o,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"},{begin:"->"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{begin:/\/: (?=\d+\s*[,\]])/,relevance:0,contains:[o]},{className:"regexp",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return r.contains=u,{name:"Elixir",keywords:n,contains:u}}},function(e,t){e.exports=function(e){const t={variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},n={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},r={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},t]};return{name:"Elm",keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port effect command subscription",contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[r,t],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[r,t],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[n,r,{begin:/\{/,end:/\}/,contains:r.contains},t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"port",end:"$",keywords:"port",contains:[t]},{className:"string",begin:"'\\\\?.",end:"'",illegal:"."},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,n,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}],illegal:/;/}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__",built_in:"proc lambda",literal:"true false nil"},o={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},a=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__","\\n$")],s={className:"subst",begin:/#\{/,end:/\}/,keywords:r},c={className:"string",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:/<<[-~]?'?(\w+)\n(?:[^\n]*\n)*?\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,s]})]}]},l={className:"number",relevance:0,variants:[{begin:"\\b([1-9](_?[0-9])*|0)(\\.([0-9](_?[0-9])*))?([eE][+-]?([0-9](_?[0-9])*)|r)?i?\\b"},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},u={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:r},d=[c,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE,relevance:0}]}].concat(a)},{className:"function",begin:n(/def\s+/,(h=t+"\\s*(\\(|;|$)",n("(?=",h,")"))),relevance:0,keywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:t}),u].concat(a)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[c,{begin:t}],relevance:0},l,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:r},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(i,a),relevance:0}].concat(i,a);var h;s.contains=d,u.contains=d;const p=[{begin:/^\s*=>/,starts:{end:"$",contains:d}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",contains:d}}];return a.unshift(i),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:r,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(p).concat(a).concat(d)}}},function(e,t){e.exports=function(e){return{name:"ERB",subLanguage:"xml",contains:[e.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){return{name:"Erlang REPL",keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta",begin:"^[0-9]+> ",relevance:10},e.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:n(/\?(::)?/,/([A-Z]\w*)/,/((::)[A-Z]\w*)*/)},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}},function(e,t){e.exports=function(e){const t="[a-z'][a-zA-Z0-9_']*",n="("+t+":"+t+"|"+t+")",r={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},o=e.COMMENT("%","$"),i={className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},a={begin:"fun\\s+"+t+"/\\d+"},s={begin:n+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:n,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},c={begin:/\{/,end:/\}/,relevance:0},l={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},u={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},d={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:/\{/,end:/\}/,relevance:0}]},h={beginKeywords:"fun receive if try case",end:"end",keywords:r};h.contains=[o,a,e.inherit(e.APOS_STRING_MODE,{className:""}),h,s,e.QUOTE_STRING_MODE,i,c,l,u,d];const p=[o,a,h,s,e.QUOTE_STRING_MODE,i,c,l,u,d];s.contains[1].contains=p,c.contains=p,d.contains[1].contains=p;const m={className:"params",begin:"\\(",end:"\\)",contains:p};return{name:"Erlang",aliases:["erl"],keywords:r,illegal:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",contains:[{className:"function",begin:"^"+t+"\\s*\\(",end:"->",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[m,e.inherit(e.TITLE_MODE,{begin:t})],starts:{end:";|\\.",keywords:r,contains:p}},o,{begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,keywords:{$pattern:"-"+e.IDENT_RE,keyword:["-module","-record","-undef","-export","-ifdef","-ifndef","-author","-copyright","-doc","-vsn","-import","-include","-include_lib","-compile","-define","-else","-endif","-file","-behaviour","-behavior","-spec"].map(e=>e+"|1.5").join(" ")},contains:[m]},i,e.QUOTE_STRING_MODE,d,l,u,c,{begin:/\.$/}]}}},function(e,t){e.exports=function(e){return{name:"Excel formulae",aliases:["xlsx","xls"],case_insensitive:!0,keywords:{$pattern:/[a-zA-Z][\w\.]*/,built_in:"ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST"},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},e.BACKSLASH_ESCAPE,e.QUOTE_STRING_MODE,{className:"number",begin:e.NUMBER_RE+"(%)?",relevance:0},e.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}},function(e,t){e.exports=function(e){return{name:"FIX",contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}},function(e,t){e.exports=function(e){const t={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[{className:"title",relevance:0,begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/}]};return{name:"Flix",keywords:{literal:"true false",keyword:"case class def else enum if impl import in lat rel index let match namespace switch type yield with"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},{className:"string",variants:[{begin:'"',end:'"'}]},t,e.C_NUMBER_MODE]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t={variants:[e.COMMENT("!","$",{relevance:0}),e.COMMENT("^C[ ]","$",{relevance:0}),e.COMMENT("^C$","$",{relevance:0})]},r=/(_[a-z_\d]+)?/,o=/([de][+-]?\d+)?/,i={className:"number",variants:[{begin:n(/\b\d+/,/\.(\d*)/,o,r)},{begin:n(/\b\d+/,o,r)},{begin:n(/\.\d+/,o,r)}],relevance:0},a={className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]};return{name:"Fortran",case_insensitive:!0,aliases:["f90","f95"],keywords:{literal:".False. .True.",keyword:"kind do concurrent local shared while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then block endblock endassociate public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure impure integer real character complex logical codimension dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image sync change team co_broadcast co_max co_min co_sum co_reduce"},illegal:/\/\*/,contains:[{className:"string",relevance:0,variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},a,{begin:/^C\s*=(?!=)/,relevance:0},t,i]}}},function(e,t){e.exports=function(e){const t={begin:"<",end:">",contains:[e.inherit(e.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{name:"F#",aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},e.COMMENT("\\(\\*(\\s)","\\*\\)",{contains:["self"]}),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE,t]},{className:"meta",begin:"\\[<",end:">\\]",relevance:10},{className:"symbol",begin:"\\B('[A-Za-z])\\b",contains:[e.BACKSLASH_ESCAPE]},e.C_LINE_COMMENT_MODE,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),e.C_NUMBER_MODE]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t={keyword:"abort acronym acronyms alias all and assign binary card diag display else eq file files for free ge gt if integer le loop lt maximizing minimizing model models ne negative no not option options or ord positive prod put putpage puttl repeat sameas semicont semiint smax smin solve sos1 sos2 sum system table then until using while xor yes",literal:"eps inf na",built_in:"abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power randBinomial randLinear randTriangle round rPower sigmoid sign signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion handleCollect handleDelete handleStatus handleSubmit heapFree heapLimit heapSize jobHandle jobKill jobStatus jobTerminate licenseLevel licenseStatus maxExecError sleep timeClose timeComp timeElapsed timeExec timeStart"},r={className:"symbol",variants:[{begin:/=[lgenxc]=/},{begin:/\$/}]},o={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},i={begin:"/",end:"/",keywords:t,contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},a=/[a-z0-9&#*=?@\\><:,()$[\]_.{}!+%^-]+/,s={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[o,i,{className:"comment",begin:n(a,(c=n(/[ ]+/,a),n("(",c,")*"))),relevance:0}]};var c;return{name:"GAMS",aliases:["gms"],case_insensitive:!0,keywords:t,contains:[e.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0-9]+",end:"$",returnBegin:!0,contains:[{className:"meta-keyword",begin:"^\\$[a-z0-9]+"}]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,s]},{beginKeywords:"table",end:";",returnBegin:!0,contains:[{beginKeywords:"table",end:"$",contains:[s]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z0-9_]+/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},r]},e.C_NUMBER_MODE,r]}}},function(e,t){e.exports=function(e){const t={keyword:"bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new open output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint ne ge le gt lt and xor or not eq eqv",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin sylvester strtrim",literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS __STDIN __STDOUT __STDERR __FILE_DIR"},n=e.COMMENT("@","@"),r={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{"meta-keyword":"include"},contains:[{className:"meta-string",begin:'"',end:'"',illegal:"\\n"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n]},o={begin:/\bstruct\s+/,end:/\s/,keywords:"struct",contains:[{className:"type",begin:e.UNDERSCORE_IDENT_RE,relevance:0}]},i=[{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\.\.\./},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,o]}],a={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},s=function(t,r,o){const s=e.inherit({className:"function",beginKeywords:t,end:r,excludeEnd:!0,contains:[].concat(i)},o||{});return s.contains.push(a),s.contains.push(e.C_NUMBER_MODE),s.contains.push(e.C_BLOCK_COMMENT_MODE),s.contains.push(n),s},c={className:"built_in",begin:"\\b("+t.built_in.split(" ").join("|")+")\\b"},l={className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE],relevance:0},u={begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,keywords:t,relevance:0,contains:[{beginKeywords:t.keyword},c,{className:"built_in",begin:e.UNDERSCORE_IDENT_RE,relevance:0}]},d={begin:/\(/,end:/\)/,relevance:0,keywords:{built_in:t.built_in,literal:t.literal},contains:[e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,c,u,l,"self"]};return u.contains.push(d),{name:"GAUSS",aliases:["gss"],case_insensitive:!0,keywords:t,illegal:/(\{[%#]|[%#]\}| <- )/,contains:[e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,l,r,{className:"keyword",begin:/\bexternal (matrix|string|array|sparse matrix|struct|proc|keyword|fn)/},s("proc keyword",";"),s("fn","="),{beginKeywords:"for threadfor",end:/;/,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE,n,d]},{variants:[{begin:e.UNDERSCORE_IDENT_RE+"\\."+e.UNDERSCORE_IDENT_RE},{begin:e.UNDERSCORE_IDENT_RE+"\\s*="}],relevance:0},u,o]}}},function(e,t){e.exports=function(e){const t={$pattern:"[A-Z_][A-Z0-9_.]*",keyword:"IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR"},n=e.inherit(e.C_NUMBER_MODE,{begin:"([-+]?((\\.\\d+)|(\\d+)(\\.\\d*)?))|"+e.C_NUMBER_RE}),r=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(/\(/,/\)/),n,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"name",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"name",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"attr",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"attr",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",contains:[n],end:"\\]"},{className:"symbol",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{name:"G-code (ISO 6983)",aliases:["nc"],case_insensitive:!0,keywords:t,contains:[{className:"meta",begin:"%"},{className:"meta",begin:"([O])([0-9]+)"}].concat(r)}}},function(e,t){e.exports=function(e){return{name:"Gherkin",aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},e.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},e.QUOTE_STRING_MODE]}}},function(e,t){e.exports=function(e){return{name:"GLSL",keywords:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}},function(e,t){e.exports=function(e){return{name:"GML",case_insensitive:!1,keywords:{keyword:"begin end if then else while do for break continue with until repeat exit and or xor not return mod div switch case default var globalvar enum function constructor delete #macro #region #endregion",built_in:"is_real is_string is_array is_undefined is_int32 is_int64 is_ptr is_vec3 is_vec4 is_matrix is_bool is_method is_struct is_infinity is_nan is_numeric typeof variable_global_exists variable_global_get variable_global_set variable_instance_exists variable_instance_get variable_instance_set variable_instance_get_names variable_struct_exists variable_struct_get variable_struct_get_names variable_struct_names_count variable_struct_remove variable_struct_set array_delete array_insert array_length array_length_1d array_length_2d array_height_2d array_equals array_create array_copy array_pop array_push array_resize array_sort random random_range irandom irandom_range random_set_seed random_get_seed randomize randomise choose abs round floor ceil sign frac sqrt sqr exp ln log2 log10 sin cos tan arcsin arccos arctan arctan2 dsin dcos dtan darcsin darccos darctan darctan2 degtorad radtodeg power logn min max mean median clamp lerp dot_product dot_product_3d dot_product_normalised dot_product_3d_normalised dot_product_normalized dot_product_3d_normalized math_set_epsilon math_get_epsilon angle_difference point_distance_3d point_distance point_direction lengthdir_x lengthdir_y real string int64 ptr string_format chr ansi_char ord string_length string_byte_length string_pos string_copy string_char_at string_ord_at string_byte_at string_set_byte_at string_delete string_insert string_lower string_upper string_repeat string_letters string_digits string_lettersdigits string_replace string_replace_all string_count string_hash_to_newline clipboard_has_text clipboard_set_text clipboard_get_text date_current_datetime date_create_datetime date_valid_datetime date_inc_year date_inc_month date_inc_week date_inc_day date_inc_hour date_inc_minute date_inc_second date_get_year date_get_month date_get_week date_get_day date_get_hour date_get_minute date_get_second date_get_weekday date_get_day_of_year date_get_hour_of_year date_get_minute_of_year date_get_second_of_year date_year_span date_month_span date_week_span date_day_span date_hour_span date_minute_span date_second_span date_compare_datetime date_compare_date date_compare_time date_date_of date_time_of date_datetime_string date_date_string date_time_string date_days_in_month date_days_in_year date_leap_year date_is_today date_set_timezone date_get_timezone game_set_speed game_get_speed motion_set motion_add place_free place_empty place_meeting place_snapped move_random move_snap move_towards_point move_contact_solid move_contact_all move_outside_solid move_outside_all move_bounce_solid move_bounce_all move_wrap distance_to_point distance_to_object position_empty position_meeting path_start path_end mp_linear_step mp_potential_step mp_linear_step_object mp_potential_step_object mp_potential_settings mp_linear_path mp_potential_path mp_linear_path_object mp_potential_path_object mp_grid_create mp_grid_destroy mp_grid_clear_all mp_grid_clear_cell mp_grid_clear_rectangle mp_grid_add_cell mp_grid_get_cell mp_grid_add_rectangle mp_grid_add_instances mp_grid_path mp_grid_draw mp_grid_to_ds_grid collision_point collision_rectangle collision_circle collision_ellipse collision_line collision_point_list collision_rectangle_list collision_circle_list collision_ellipse_list collision_line_list instance_position_list instance_place_list point_in_rectangle point_in_triangle point_in_circle rectangle_in_rectangle rectangle_in_triangle rectangle_in_circle instance_find instance_exists instance_number instance_position instance_nearest instance_furthest instance_place instance_create_depth instance_create_layer instance_copy instance_change instance_destroy position_destroy position_change instance_id_get instance_deactivate_all instance_deactivate_object instance_deactivate_region instance_activate_all instance_activate_object instance_activate_region room_goto room_goto_previous room_goto_next room_previous room_next room_restart game_end game_restart game_load game_save game_save_buffer game_load_buffer event_perform event_user event_perform_object event_inherited show_debug_message show_debug_overlay debug_event debug_get_callstack alarm_get alarm_set font_texture_page_size keyboard_set_map keyboard_get_map keyboard_unset_map keyboard_check keyboard_check_pressed keyboard_check_released keyboard_check_direct keyboard_get_numlock keyboard_set_numlock keyboard_key_press keyboard_key_release keyboard_clear io_clear mouse_check_button mouse_check_button_pressed mouse_check_button_released mouse_wheel_up mouse_wheel_down mouse_clear draw_self draw_sprite draw_sprite_pos draw_sprite_ext draw_sprite_stretched draw_sprite_stretched_ext draw_sprite_tiled draw_sprite_tiled_ext draw_sprite_part draw_sprite_part_ext draw_sprite_general draw_clear draw_clear_alpha draw_point draw_line draw_line_width draw_rectangle draw_roundrect draw_roundrect_ext draw_triangle draw_circle draw_ellipse draw_set_circle_precision draw_arrow draw_button draw_path draw_healthbar draw_getpixel draw_getpixel_ext draw_set_colour draw_set_color draw_set_alpha draw_get_colour draw_get_color draw_get_alpha merge_colour make_colour_rgb make_colour_hsv colour_get_red colour_get_green colour_get_blue colour_get_hue colour_get_saturation colour_get_value merge_color make_color_rgb make_color_hsv color_get_red color_get_green color_get_blue color_get_hue color_get_saturation color_get_value merge_color screen_save screen_save_part draw_set_font draw_set_halign draw_set_valign draw_text draw_text_ext string_width string_height string_width_ext string_height_ext draw_text_transformed draw_text_ext_transformed draw_text_colour draw_text_ext_colour draw_text_transformed_colour draw_text_ext_transformed_colour draw_text_color draw_text_ext_color draw_text_transformed_color draw_text_ext_transformed_color draw_point_colour draw_line_colour draw_line_width_colour draw_rectangle_colour draw_roundrect_colour draw_roundrect_colour_ext draw_triangle_colour draw_circle_colour draw_ellipse_colour draw_point_color draw_line_color draw_line_width_color draw_rectangle_color draw_roundrect_color draw_roundrect_color_ext draw_triangle_color draw_circle_color draw_ellipse_color draw_primitive_begin draw_vertex draw_vertex_colour draw_vertex_color draw_primitive_end sprite_get_uvs font_get_uvs sprite_get_texture font_get_texture texture_get_width texture_get_height texture_get_uvs draw_primitive_begin_texture draw_vertex_texture draw_vertex_texture_colour draw_vertex_texture_color texture_global_scale surface_create surface_create_ext surface_resize surface_free surface_exists surface_get_width surface_get_height surface_get_texture surface_set_target surface_set_target_ext surface_reset_target surface_depth_disable surface_get_depth_disable draw_surface draw_surface_stretched draw_surface_tiled draw_surface_part draw_surface_ext draw_surface_stretched_ext draw_surface_tiled_ext draw_surface_part_ext draw_surface_general surface_getpixel surface_getpixel_ext surface_save surface_save_part surface_copy surface_copy_part application_surface_draw_enable application_get_position application_surface_enable application_surface_is_enabled display_get_width display_get_height display_get_orientation display_get_gui_width display_get_gui_height display_reset display_mouse_get_x display_mouse_get_y display_mouse_set display_set_ui_visibility window_set_fullscreen window_get_fullscreen window_set_caption window_set_min_width window_set_max_width window_set_min_height window_set_max_height window_get_visible_rects window_get_caption window_set_cursor window_get_cursor window_set_colour window_get_colour window_set_color window_get_color window_set_position window_set_size window_set_rectangle window_center window_get_x window_get_y window_get_width window_get_height window_mouse_get_x window_mouse_get_y window_mouse_set window_view_mouse_get_x window_view_mouse_get_y window_views_mouse_get_x window_views_mouse_get_y audio_listener_position audio_listener_velocity audio_listener_orientation audio_emitter_position audio_emitter_create audio_emitter_free audio_emitter_exists audio_emitter_pitch audio_emitter_velocity audio_emitter_falloff audio_emitter_gain audio_play_sound audio_play_sound_on audio_play_sound_at audio_stop_sound audio_resume_music audio_music_is_playing audio_resume_sound audio_pause_sound audio_pause_music audio_channel_num audio_sound_length audio_get_type audio_falloff_set_model audio_play_music audio_stop_music audio_master_gain audio_music_gain audio_sound_gain audio_sound_pitch audio_stop_all audio_resume_all audio_pause_all audio_is_playing audio_is_paused audio_exists audio_sound_set_track_position audio_sound_get_track_position audio_emitter_get_gain audio_emitter_get_pitch audio_emitter_get_x audio_emitter_get_y audio_emitter_get_z audio_emitter_get_vx audio_emitter_get_vy audio_emitter_get_vz audio_listener_set_position audio_listener_set_velocity audio_listener_set_orientation audio_listener_get_data audio_set_master_gain audio_get_master_gain audio_sound_get_gain audio_sound_get_pitch audio_get_name audio_sound_set_track_position audio_sound_get_track_position audio_create_stream audio_destroy_stream audio_create_sync_group audio_destroy_sync_group audio_play_in_sync_group audio_start_sync_group audio_stop_sync_group audio_pause_sync_group audio_resume_sync_group audio_sync_group_get_track_pos audio_sync_group_debug audio_sync_group_is_playing audio_debug audio_group_load audio_group_unload audio_group_is_loaded audio_group_load_progress audio_group_name audio_group_stop_all audio_group_set_gain audio_create_buffer_sound audio_free_buffer_sound audio_create_play_queue audio_free_play_queue audio_queue_sound audio_get_recorder_count audio_get_recorder_info audio_start_recording audio_stop_recording audio_sound_get_listener_mask audio_emitter_get_listener_mask audio_get_listener_mask audio_sound_set_listener_mask audio_emitter_set_listener_mask audio_set_listener_mask audio_get_listener_count audio_get_listener_info audio_system show_message show_message_async clickable_add clickable_add_ext clickable_change clickable_change_ext clickable_delete clickable_exists clickable_set_style show_question show_question_async get_integer get_string get_integer_async get_string_async get_login_async get_open_filename get_save_filename get_open_filename_ext get_save_filename_ext show_error highscore_clear highscore_add highscore_value highscore_name draw_highscore sprite_exists sprite_get_name sprite_get_number sprite_get_width sprite_get_height sprite_get_xoffset sprite_get_yoffset sprite_get_bbox_left sprite_get_bbox_right sprite_get_bbox_top sprite_get_bbox_bottom sprite_save sprite_save_strip sprite_set_cache_size sprite_set_cache_size_ext sprite_get_tpe sprite_prefetch sprite_prefetch_multi sprite_flush sprite_flush_multi sprite_set_speed sprite_get_speed_type sprite_get_speed font_exists font_get_name font_get_fontname font_get_bold font_get_italic font_get_first font_get_last font_get_size font_set_cache_size path_exists path_get_name path_get_length path_get_time path_get_kind path_get_closed path_get_precision path_get_number path_get_point_x path_get_point_y path_get_point_speed path_get_x path_get_y path_get_speed script_exists script_get_name timeline_add timeline_delete timeline_clear timeline_exists timeline_get_name timeline_moment_clear timeline_moment_add_script timeline_size timeline_max_moment object_exists object_get_name object_get_sprite object_get_solid object_get_visible object_get_persistent object_get_mask object_get_parent object_get_physics object_is_ancestor room_exists room_get_name sprite_set_offset sprite_duplicate sprite_assign sprite_merge sprite_add sprite_replace sprite_create_from_surface sprite_add_from_surface sprite_delete sprite_set_alpha_from_sprite sprite_collision_mask font_add_enable_aa font_add_get_enable_aa font_add font_add_sprite font_add_sprite_ext font_replace font_replace_sprite font_replace_sprite_ext font_delete path_set_kind path_set_closed path_set_precision path_add path_assign path_duplicate path_append path_delete path_add_point path_insert_point path_change_point path_delete_point path_clear_points path_reverse path_mirror path_flip path_rotate path_rescale path_shift script_execute object_set_sprite object_set_solid object_set_visible object_set_persistent object_set_mask room_set_width room_set_height room_set_persistent room_set_background_colour room_set_background_color room_set_view room_set_viewport room_get_viewport room_set_view_enabled room_add room_duplicate room_assign room_instance_add room_instance_clear room_get_camera room_set_camera asset_get_index asset_get_type file_text_open_from_string file_text_open_read file_text_open_write file_text_open_append file_text_close file_text_write_string file_text_write_real file_text_writeln file_text_read_string file_text_read_real file_text_readln file_text_eof file_text_eoln file_exists file_delete file_rename file_copy directory_exists directory_create directory_destroy file_find_first file_find_next file_find_close file_attributes filename_name filename_path filename_dir filename_drive filename_ext filename_change_ext file_bin_open file_bin_rewrite file_bin_close file_bin_position file_bin_size file_bin_seek file_bin_write_byte file_bin_read_byte parameter_count parameter_string environment_get_variable ini_open_from_string ini_open ini_close ini_read_string ini_read_real ini_write_string ini_write_real ini_key_exists ini_section_exists ini_key_delete ini_section_delete ds_set_precision ds_exists ds_stack_create ds_stack_destroy ds_stack_clear ds_stack_copy ds_stack_size ds_stack_empty ds_stack_push ds_stack_pop ds_stack_top ds_stack_write ds_stack_read ds_queue_create ds_queue_destroy ds_queue_clear ds_queue_copy ds_queue_size ds_queue_empty ds_queue_enqueue ds_queue_dequeue ds_queue_head ds_queue_tail ds_queue_write ds_queue_read ds_list_create ds_list_destroy ds_list_clear ds_list_copy ds_list_size ds_list_empty ds_list_add ds_list_insert ds_list_replace ds_list_delete ds_list_find_index ds_list_find_value ds_list_mark_as_list ds_list_mark_as_map ds_list_sort ds_list_shuffle ds_list_write ds_list_read ds_list_set ds_map_create ds_map_destroy ds_map_clear ds_map_copy ds_map_size ds_map_empty ds_map_add ds_map_add_list ds_map_add_map ds_map_replace ds_map_replace_map ds_map_replace_list ds_map_delete ds_map_exists ds_map_find_value ds_map_find_previous ds_map_find_next ds_map_find_first ds_map_find_last ds_map_write ds_map_read ds_map_secure_save ds_map_secure_load ds_map_secure_load_buffer ds_map_secure_save_buffer ds_map_set ds_priority_create ds_priority_destroy ds_priority_clear ds_priority_copy ds_priority_size ds_priority_empty ds_priority_add ds_priority_change_priority ds_priority_find_priority ds_priority_delete_value ds_priority_delete_min ds_priority_find_min ds_priority_delete_max ds_priority_find_max ds_priority_write ds_priority_read ds_grid_create ds_grid_destroy ds_grid_copy ds_grid_resize ds_grid_width ds_grid_height ds_grid_clear ds_grid_set ds_grid_add ds_grid_multiply ds_grid_set_region ds_grid_add_region ds_grid_multiply_region ds_grid_set_disk ds_grid_add_disk ds_grid_multiply_disk ds_grid_set_grid_region ds_grid_add_grid_region ds_grid_multiply_grid_region ds_grid_get ds_grid_get_sum ds_grid_get_max ds_grid_get_min ds_grid_get_mean ds_grid_get_disk_sum ds_grid_get_disk_min ds_grid_get_disk_max ds_grid_get_disk_mean ds_grid_value_exists ds_grid_value_x ds_grid_value_y ds_grid_value_disk_exists ds_grid_value_disk_x ds_grid_value_disk_y ds_grid_shuffle ds_grid_write ds_grid_read ds_grid_sort ds_grid_set ds_grid_get effect_create_below effect_create_above effect_clear part_type_create part_type_destroy part_type_exists part_type_clear part_type_shape part_type_sprite part_type_size part_type_scale part_type_orientation part_type_life part_type_step part_type_death part_type_speed part_type_direction part_type_gravity part_type_colour1 part_type_colour2 part_type_colour3 part_type_colour_mix part_type_colour_rgb part_type_colour_hsv part_type_color1 part_type_color2 part_type_color3 part_type_color_mix part_type_color_rgb part_type_color_hsv part_type_alpha1 part_type_alpha2 part_type_alpha3 part_type_blend part_system_create part_system_create_layer part_system_destroy part_system_exists part_system_clear part_system_draw_order part_system_depth part_system_position part_system_automatic_update part_system_automatic_draw part_system_update part_system_drawit part_system_get_layer part_system_layer part_particles_create part_particles_create_colour part_particles_create_color part_particles_clear part_particles_count part_emitter_create part_emitter_destroy part_emitter_destroy_all part_emitter_exists part_emitter_clear part_emitter_region part_emitter_burst part_emitter_stream external_call external_define external_free window_handle window_device matrix_get matrix_set matrix_build_identity matrix_build matrix_build_lookat matrix_build_projection_ortho matrix_build_projection_perspective matrix_build_projection_perspective_fov matrix_multiply matrix_transform_vertex matrix_stack_push matrix_stack_pop matrix_stack_multiply matrix_stack_set matrix_stack_clear matrix_stack_top matrix_stack_is_empty browser_input_capture os_get_config os_get_info os_get_language os_get_region os_lock_orientation display_get_dpi_x display_get_dpi_y display_set_gui_size display_set_gui_maximise display_set_gui_maximize device_mouse_dbclick_enable display_set_timing_method display_get_timing_method display_set_sleep_margin display_get_sleep_margin virtual_key_add virtual_key_hide virtual_key_delete virtual_key_show draw_enable_drawevent draw_enable_swf_aa draw_set_swf_aa_level draw_get_swf_aa_level draw_texture_flush draw_flush gpu_set_blendenable gpu_set_ztestenable gpu_set_zfunc gpu_set_zwriteenable gpu_set_lightingenable gpu_set_fog gpu_set_cullmode gpu_set_blendmode gpu_set_blendmode_ext gpu_set_blendmode_ext_sepalpha gpu_set_colorwriteenable gpu_set_colourwriteenable gpu_set_alphatestenable gpu_set_alphatestref gpu_set_alphatestfunc gpu_set_texfilter gpu_set_texfilter_ext gpu_set_texrepeat gpu_set_texrepeat_ext gpu_set_tex_filter gpu_set_tex_filter_ext gpu_set_tex_repeat gpu_set_tex_repeat_ext gpu_set_tex_mip_filter gpu_set_tex_mip_filter_ext gpu_set_tex_mip_bias gpu_set_tex_mip_bias_ext gpu_set_tex_min_mip gpu_set_tex_min_mip_ext gpu_set_tex_max_mip gpu_set_tex_max_mip_ext gpu_set_tex_max_aniso gpu_set_tex_max_aniso_ext gpu_set_tex_mip_enable gpu_set_tex_mip_enable_ext gpu_get_blendenable gpu_get_ztestenable gpu_get_zfunc gpu_get_zwriteenable gpu_get_lightingenable gpu_get_fog gpu_get_cullmode gpu_get_blendmode gpu_get_blendmode_ext gpu_get_blendmode_ext_sepalpha gpu_get_blendmode_src gpu_get_blendmode_dest gpu_get_blendmode_srcalpha gpu_get_blendmode_destalpha gpu_get_colorwriteenable gpu_get_colourwriteenable gpu_get_alphatestenable gpu_get_alphatestref gpu_get_alphatestfunc gpu_get_texfilter gpu_get_texfilter_ext gpu_get_texrepeat gpu_get_texrepeat_ext gpu_get_tex_filter gpu_get_tex_filter_ext gpu_get_tex_repeat gpu_get_tex_repeat_ext gpu_get_tex_mip_filter gpu_get_tex_mip_filter_ext gpu_get_tex_mip_bias gpu_get_tex_mip_bias_ext gpu_get_tex_min_mip gpu_get_tex_min_mip_ext gpu_get_tex_max_mip gpu_get_tex_max_mip_ext gpu_get_tex_max_aniso gpu_get_tex_max_aniso_ext gpu_get_tex_mip_enable gpu_get_tex_mip_enable_ext gpu_push_state gpu_pop_state gpu_get_state gpu_set_state draw_light_define_ambient draw_light_define_direction draw_light_define_point draw_light_enable draw_set_lighting draw_light_get_ambient draw_light_get draw_get_lighting shop_leave_rating url_get_domain url_open url_open_ext url_open_full get_timer achievement_login achievement_logout achievement_post achievement_increment achievement_post_score achievement_available achievement_show_achievements achievement_show_leaderboards achievement_load_friends achievement_load_leaderboard achievement_send_challenge achievement_load_progress achievement_reset achievement_login_status achievement_get_pic achievement_show_challenge_notifications achievement_get_challenges achievement_event achievement_show achievement_get_info cloud_file_save cloud_string_save cloud_synchronise ads_enable ads_disable ads_setup ads_engagement_launch ads_engagement_available ads_engagement_active ads_event ads_event_preload ads_set_reward_callback ads_get_display_height ads_get_display_width ads_move ads_interstitial_available ads_interstitial_display device_get_tilt_x device_get_tilt_y device_get_tilt_z device_is_keypad_open device_mouse_check_button device_mouse_check_button_pressed device_mouse_check_button_released device_mouse_x device_mouse_y device_mouse_raw_x device_mouse_raw_y device_mouse_x_to_gui device_mouse_y_to_gui iap_activate iap_status iap_enumerate_products iap_restore_all iap_acquire iap_consume iap_product_details iap_purchase_details facebook_init facebook_login facebook_status facebook_graph_request facebook_dialog facebook_logout facebook_launch_offerwall facebook_post_message facebook_send_invite facebook_user_id facebook_accesstoken facebook_check_permission facebook_request_read_permissions facebook_request_publish_permissions gamepad_is_supported gamepad_get_device_count gamepad_is_connected gamepad_get_description gamepad_get_button_threshold gamepad_set_button_threshold gamepad_get_axis_deadzone gamepad_set_axis_deadzone gamepad_button_count gamepad_button_check gamepad_button_check_pressed gamepad_button_check_released gamepad_button_value gamepad_axis_count gamepad_axis_value gamepad_set_vibration gamepad_set_colour gamepad_set_color os_is_paused window_has_focus code_is_compiled http_get http_get_file http_post_string http_request json_encode json_decode zip_unzip load_csv base64_encode base64_decode md5_string_unicode md5_string_utf8 md5_file os_is_network_connected sha1_string_unicode sha1_string_utf8 sha1_file os_powersave_enable analytics_event analytics_event_ext win8_livetile_tile_notification win8_livetile_tile_clear win8_livetile_badge_notification win8_livetile_badge_clear win8_livetile_queue_enable win8_secondarytile_pin win8_secondarytile_badge_notification win8_secondarytile_delete win8_livetile_notification_begin win8_livetile_notification_secondary_begin win8_livetile_notification_expiry win8_livetile_notification_tag win8_livetile_notification_text_add win8_livetile_notification_image_add win8_livetile_notification_end win8_appbar_enable win8_appbar_add_element win8_appbar_remove_element win8_settingscharm_add_entry win8_settingscharm_add_html_entry win8_settingscharm_add_xaml_entry win8_settingscharm_set_xaml_property win8_settingscharm_get_xaml_property win8_settingscharm_remove_entry win8_share_image win8_share_screenshot win8_share_file win8_share_url win8_share_text win8_search_enable win8_search_disable win8_search_add_suggestions win8_device_touchscreen_available win8_license_initialize_sandbox win8_license_trial_version winphone_license_trial_version winphone_tile_title winphone_tile_count winphone_tile_back_title winphone_tile_back_content winphone_tile_back_content_wide winphone_tile_front_image winphone_tile_front_image_small winphone_tile_front_image_wide winphone_tile_back_image winphone_tile_back_image_wide winphone_tile_background_colour winphone_tile_background_color winphone_tile_icon_image winphone_tile_small_icon_image winphone_tile_wide_content winphone_tile_cycle_images winphone_tile_small_background_image physics_world_create physics_world_gravity physics_world_update_speed physics_world_update_iterations physics_world_draw_debug physics_pause_enable physics_fixture_create physics_fixture_set_kinematic physics_fixture_set_density physics_fixture_set_awake physics_fixture_set_restitution physics_fixture_set_friction physics_fixture_set_collision_group physics_fixture_set_sensor physics_fixture_set_linear_damping physics_fixture_set_angular_damping physics_fixture_set_circle_shape physics_fixture_set_box_shape physics_fixture_set_edge_shape physics_fixture_set_polygon_shape physics_fixture_set_chain_shape physics_fixture_add_point physics_fixture_bind physics_fixture_bind_ext physics_fixture_delete physics_apply_force physics_apply_impulse physics_apply_angular_impulse physics_apply_local_force physics_apply_local_impulse physics_apply_torque physics_mass_properties physics_draw_debug physics_test_overlap physics_remove_fixture physics_set_friction physics_set_density physics_set_restitution physics_get_friction physics_get_density physics_get_restitution physics_joint_distance_create physics_joint_rope_create physics_joint_revolute_create physics_joint_prismatic_create physics_joint_pulley_create physics_joint_wheel_create physics_joint_weld_create physics_joint_friction_create physics_joint_gear_create physics_joint_enable_motor physics_joint_get_value physics_joint_set_value physics_joint_delete physics_particle_create physics_particle_delete physics_particle_delete_region_circle physics_particle_delete_region_box physics_particle_delete_region_poly physics_particle_set_flags physics_particle_set_category_flags physics_particle_draw physics_particle_draw_ext physics_particle_count physics_particle_get_data physics_particle_get_data_particle physics_particle_group_begin physics_particle_group_circle physics_particle_group_box physics_particle_group_polygon physics_particle_group_add_point physics_particle_group_end physics_particle_group_join physics_particle_group_delete physics_particle_group_count physics_particle_group_get_data physics_particle_group_get_mass physics_particle_group_get_inertia physics_particle_group_get_centre_x physics_particle_group_get_centre_y physics_particle_group_get_vel_x physics_particle_group_get_vel_y physics_particle_group_get_ang_vel physics_particle_group_get_x physics_particle_group_get_y physics_particle_group_get_angle physics_particle_set_group_flags physics_particle_get_group_flags physics_particle_get_max_count physics_particle_get_radius physics_particle_get_density physics_particle_get_damping physics_particle_get_gravity_scale physics_particle_set_max_count physics_particle_set_radius physics_particle_set_density physics_particle_set_damping physics_particle_set_gravity_scale network_create_socket network_create_socket_ext network_create_server network_create_server_raw network_connect network_connect_raw network_send_packet network_send_raw network_send_broadcast network_send_udp network_send_udp_raw network_set_timeout network_set_config network_resolve network_destroy buffer_create buffer_write buffer_read buffer_seek buffer_get_surface buffer_set_surface buffer_delete buffer_exists buffer_get_type buffer_get_alignment buffer_poke buffer_peek buffer_save buffer_save_ext buffer_load buffer_load_ext buffer_load_partial buffer_copy buffer_fill buffer_get_size buffer_tell buffer_resize buffer_md5 buffer_sha1 buffer_base64_encode buffer_base64_decode buffer_base64_decode_ext buffer_sizeof buffer_get_address buffer_create_from_vertex_buffer buffer_create_from_vertex_buffer_ext buffer_copy_from_vertex_buffer buffer_async_group_begin buffer_async_group_option buffer_async_group_end buffer_load_async buffer_save_async gml_release_mode gml_pragma steam_activate_overlay steam_is_overlay_enabled steam_is_overlay_activated steam_get_persona_name steam_initialised steam_is_cloud_enabled_for_app steam_is_cloud_enabled_for_account steam_file_persisted steam_get_quota_total steam_get_quota_free steam_file_write steam_file_write_file steam_file_read steam_file_delete steam_file_exists steam_file_size steam_file_share steam_is_screenshot_requested steam_send_screenshot steam_is_user_logged_on steam_get_user_steam_id steam_user_owns_dlc steam_user_installed_dlc steam_set_achievement steam_get_achievement steam_clear_achievement steam_set_stat_int steam_set_stat_float steam_set_stat_avg_rate steam_get_stat_int steam_get_stat_float steam_get_stat_avg_rate steam_reset_all_stats steam_reset_all_stats_achievements steam_stats_ready steam_create_leaderboard steam_upload_score steam_upload_score_ext steam_download_scores_around_user steam_download_scores steam_download_friends_scores steam_upload_score_buffer steam_upload_score_buffer_ext steam_current_game_language steam_available_languages steam_activate_overlay_browser steam_activate_overlay_user steam_activate_overlay_store steam_get_user_persona_name steam_get_app_id steam_get_user_account_id steam_ugc_download steam_ugc_create_item steam_ugc_start_item_update steam_ugc_set_item_title steam_ugc_set_item_description steam_ugc_set_item_visibility steam_ugc_set_item_tags steam_ugc_set_item_content steam_ugc_set_item_preview steam_ugc_submit_item_update steam_ugc_get_item_update_progress steam_ugc_subscribe_item steam_ugc_unsubscribe_item steam_ugc_num_subscribed_items steam_ugc_get_subscribed_items steam_ugc_get_item_install_info steam_ugc_get_item_update_info steam_ugc_request_item_details steam_ugc_create_query_user steam_ugc_create_query_user_ex steam_ugc_create_query_all steam_ugc_create_query_all_ex steam_ugc_query_set_cloud_filename_filter steam_ugc_query_set_match_any_tag steam_ugc_query_set_search_text steam_ugc_query_set_ranked_by_trend_days steam_ugc_query_add_required_tag steam_ugc_query_add_excluded_tag steam_ugc_query_set_return_long_description steam_ugc_query_set_return_total_only steam_ugc_query_set_allow_cached_response steam_ugc_send_query shader_set shader_get_name shader_reset shader_current shader_is_compiled shader_get_sampler_index shader_get_uniform shader_set_uniform_i shader_set_uniform_i_array shader_set_uniform_f shader_set_uniform_f_array shader_set_uniform_matrix shader_set_uniform_matrix_array shader_enable_corner_id texture_set_stage texture_get_texel_width texture_get_texel_height shaders_are_supported vertex_format_begin vertex_format_end vertex_format_delete vertex_format_add_position vertex_format_add_position_3d vertex_format_add_colour vertex_format_add_color vertex_format_add_normal vertex_format_add_texcoord vertex_format_add_textcoord vertex_format_add_custom vertex_create_buffer vertex_create_buffer_ext vertex_delete_buffer vertex_begin vertex_end vertex_position vertex_position_3d vertex_colour vertex_color vertex_argb vertex_texcoord vertex_normal vertex_float1 vertex_float2 vertex_float3 vertex_float4 vertex_ubyte4 vertex_submit vertex_freeze vertex_get_number vertex_get_buffer_size vertex_create_buffer_from_buffer vertex_create_buffer_from_buffer_ext push_local_notification push_get_first_local_notification push_get_next_local_notification push_cancel_local_notification skeleton_animation_set skeleton_animation_get skeleton_animation_mix skeleton_animation_set_ext skeleton_animation_get_ext skeleton_animation_get_duration skeleton_animation_get_frames skeleton_animation_clear skeleton_skin_set skeleton_skin_get skeleton_attachment_set skeleton_attachment_get skeleton_attachment_create skeleton_collision_draw_set skeleton_bone_data_get skeleton_bone_data_set skeleton_bone_state_get skeleton_bone_state_set skeleton_get_minmax skeleton_get_num_bounds skeleton_get_bounds skeleton_animation_get_frame skeleton_animation_set_frame draw_skeleton draw_skeleton_time draw_skeleton_instance draw_skeleton_collision skeleton_animation_list skeleton_skin_list skeleton_slot_data layer_get_id layer_get_id_at_depth layer_get_depth layer_create layer_destroy layer_destroy_instances layer_add_instance layer_has_instance layer_set_visible layer_get_visible layer_exists layer_x layer_y layer_get_x layer_get_y layer_hspeed layer_vspeed layer_get_hspeed layer_get_vspeed layer_script_begin layer_script_end layer_shader layer_get_script_begin layer_get_script_end layer_get_shader layer_set_target_room layer_get_target_room layer_reset_target_room layer_get_all layer_get_all_elements layer_get_name layer_depth layer_get_element_layer layer_get_element_type layer_element_move layer_force_draw_depth layer_is_draw_depth_forced layer_get_forced_depth layer_background_get_id layer_background_exists layer_background_create layer_background_destroy layer_background_visible layer_background_change layer_background_sprite layer_background_htiled layer_background_vtiled layer_background_stretch layer_background_yscale layer_background_xscale layer_background_blend layer_background_alpha layer_background_index layer_background_speed layer_background_get_visible layer_background_get_sprite layer_background_get_htiled layer_background_get_vtiled layer_background_get_stretch layer_background_get_yscale layer_background_get_xscale layer_background_get_blend layer_background_get_alpha layer_background_get_index layer_background_get_speed layer_sprite_get_id layer_sprite_exists layer_sprite_create layer_sprite_destroy layer_sprite_change layer_sprite_index layer_sprite_speed layer_sprite_xscale layer_sprite_yscale layer_sprite_angle layer_sprite_blend layer_sprite_alpha layer_sprite_x layer_sprite_y layer_sprite_get_sprite layer_sprite_get_index layer_sprite_get_speed layer_sprite_get_xscale layer_sprite_get_yscale layer_sprite_get_angle layer_sprite_get_blend layer_sprite_get_alpha layer_sprite_get_x layer_sprite_get_y layer_tilemap_get_id layer_tilemap_exists layer_tilemap_create layer_tilemap_destroy tilemap_tileset tilemap_x tilemap_y tilemap_set tilemap_set_at_pixel tilemap_get_tileset tilemap_get_tile_width tilemap_get_tile_height tilemap_get_width tilemap_get_height tilemap_get_x tilemap_get_y tilemap_get tilemap_get_at_pixel tilemap_get_cell_x_at_pixel tilemap_get_cell_y_at_pixel tilemap_clear draw_tilemap draw_tile tilemap_set_global_mask tilemap_get_global_mask tilemap_set_mask tilemap_get_mask tilemap_get_frame tile_set_empty tile_set_index tile_set_flip tile_set_mirror tile_set_rotate tile_get_empty tile_get_index tile_get_flip tile_get_mirror tile_get_rotate layer_tile_exists layer_tile_create layer_tile_destroy layer_tile_change layer_tile_xscale layer_tile_yscale layer_tile_blend layer_tile_alpha layer_tile_x layer_tile_y layer_tile_region layer_tile_visible layer_tile_get_sprite layer_tile_get_xscale layer_tile_get_yscale layer_tile_get_blend layer_tile_get_alpha layer_tile_get_x layer_tile_get_y layer_tile_get_region layer_tile_get_visible layer_instance_get_instance instance_activate_layer instance_deactivate_layer camera_create camera_create_view camera_destroy camera_apply camera_get_active camera_get_default camera_set_default camera_set_view_mat camera_set_proj_mat camera_set_update_script camera_set_begin_script camera_set_end_script camera_set_view_pos camera_set_view_size camera_set_view_speed camera_set_view_border camera_set_view_angle camera_set_view_target camera_get_view_mat camera_get_proj_mat camera_get_update_script camera_get_begin_script camera_get_end_script camera_get_view_x camera_get_view_y camera_get_view_width camera_get_view_height camera_get_view_speed_x camera_get_view_speed_y camera_get_view_border_x camera_get_view_border_y camera_get_view_angle camera_get_view_target view_get_camera view_get_visible view_get_xport view_get_yport view_get_wport view_get_hport view_get_surface_id view_set_camera view_set_visible view_set_xport view_set_yport view_set_wport view_set_hport view_set_surface_id gesture_drag_time gesture_drag_distance gesture_flick_speed gesture_double_tap_time gesture_double_tap_distance gesture_pinch_distance gesture_pinch_angle_towards gesture_pinch_angle_away gesture_rotate_time gesture_rotate_angle gesture_tap_count gesture_get_drag_time gesture_get_drag_distance gesture_get_flick_speed gesture_get_double_tap_time gesture_get_double_tap_distance gesture_get_pinch_distance gesture_get_pinch_angle_towards gesture_get_pinch_angle_away gesture_get_rotate_time gesture_get_rotate_angle gesture_get_tap_count keyboard_virtual_show keyboard_virtual_hide keyboard_virtual_status keyboard_virtual_height",literal:"self other all noone global local undefined pointer_invalid pointer_null path_action_stop path_action_restart path_action_continue path_action_reverse true false pi GM_build_date GM_version GM_runtime_version timezone_local timezone_utc gamespeed_fps gamespeed_microseconds ev_create ev_destroy ev_step ev_alarm ev_keyboard ev_mouse ev_collision ev_other ev_draw ev_draw_begin ev_draw_end ev_draw_pre ev_draw_post ev_keypress ev_keyrelease ev_trigger ev_left_button ev_right_button ev_middle_button ev_no_button ev_left_press ev_right_press ev_middle_press ev_left_release ev_right_release ev_middle_release ev_mouse_enter ev_mouse_leave ev_mouse_wheel_up ev_mouse_wheel_down ev_global_left_button ev_global_right_button ev_global_middle_button ev_global_left_press ev_global_right_press ev_global_middle_press ev_global_left_release ev_global_right_release ev_global_middle_release ev_joystick1_left ev_joystick1_right ev_joystick1_up ev_joystick1_down ev_joystick1_button1 ev_joystick1_button2 ev_joystick1_button3 ev_joystick1_button4 ev_joystick1_button5 ev_joystick1_button6 ev_joystick1_button7 ev_joystick1_button8 ev_joystick2_left ev_joystick2_right ev_joystick2_up ev_joystick2_down ev_joystick2_button1 ev_joystick2_button2 ev_joystick2_button3 ev_joystick2_button4 ev_joystick2_button5 ev_joystick2_button6 ev_joystick2_button7 ev_joystick2_button8 ev_outside ev_boundary ev_game_start ev_game_end ev_room_start ev_room_end ev_no_more_lives ev_animation_end ev_end_of_path ev_no_more_health ev_close_button ev_user0 ev_user1 ev_user2 ev_user3 ev_user4 ev_user5 ev_user6 ev_user7 ev_user8 ev_user9 ev_user10 ev_user11 ev_user12 ev_user13 ev_user14 ev_user15 ev_step_normal ev_step_begin ev_step_end ev_gui ev_gui_begin ev_gui_end ev_cleanup ev_gesture ev_gesture_tap ev_gesture_double_tap ev_gesture_drag_start ev_gesture_dragging ev_gesture_drag_end ev_gesture_flick ev_gesture_pinch_start ev_gesture_pinch_in ev_gesture_pinch_out ev_gesture_pinch_end ev_gesture_rotate_start ev_gesture_rotating ev_gesture_rotate_end ev_global_gesture_tap ev_global_gesture_double_tap ev_global_gesture_drag_start ev_global_gesture_dragging ev_global_gesture_drag_end ev_global_gesture_flick ev_global_gesture_pinch_start ev_global_gesture_pinch_in ev_global_gesture_pinch_out ev_global_gesture_pinch_end ev_global_gesture_rotate_start ev_global_gesture_rotating ev_global_gesture_rotate_end vk_nokey vk_anykey vk_enter vk_return vk_shift vk_control vk_alt vk_escape vk_space vk_backspace vk_tab vk_pause vk_printscreen vk_left vk_right vk_up vk_down vk_home vk_end vk_delete vk_insert vk_pageup vk_pagedown vk_f1 vk_f2 vk_f3 vk_f4 vk_f5 vk_f6 vk_f7 vk_f8 vk_f9 vk_f10 vk_f11 vk_f12 vk_numpad0 vk_numpad1 vk_numpad2 vk_numpad3 vk_numpad4 vk_numpad5 vk_numpad6 vk_numpad7 vk_numpad8 vk_numpad9 vk_divide vk_multiply vk_subtract vk_add vk_decimal vk_lshift vk_lcontrol vk_lalt vk_rshift vk_rcontrol vk_ralt mb_any mb_none mb_left mb_right mb_middle c_aqua c_black c_blue c_dkgray c_fuchsia c_gray c_green c_lime c_ltgray c_maroon c_navy c_olive c_purple c_red c_silver c_teal c_white c_yellow c_orange fa_left fa_center fa_right fa_top fa_middle fa_bottom pr_pointlist pr_linelist pr_linestrip pr_trianglelist pr_trianglestrip pr_trianglefan bm_complex bm_normal bm_add bm_max bm_subtract bm_zero bm_one bm_src_colour bm_inv_src_colour bm_src_color bm_inv_src_color bm_src_alpha bm_inv_src_alpha bm_dest_alpha bm_inv_dest_alpha bm_dest_colour bm_inv_dest_colour bm_dest_color bm_inv_dest_color bm_src_alpha_sat tf_point tf_linear tf_anisotropic mip_off mip_on mip_markedonly audio_falloff_none audio_falloff_inverse_distance audio_falloff_inverse_distance_clamped audio_falloff_linear_distance audio_falloff_linear_distance_clamped audio_falloff_exponent_distance audio_falloff_exponent_distance_clamped audio_old_system audio_new_system audio_mono audio_stereo audio_3d cr_default cr_none cr_arrow cr_cross cr_beam cr_size_nesw cr_size_ns cr_size_nwse cr_size_we cr_uparrow cr_hourglass cr_drag cr_appstart cr_handpoint cr_size_all spritespeed_framespersecond spritespeed_framespergameframe asset_object asset_unknown asset_sprite asset_sound asset_room asset_path asset_script asset_font asset_timeline asset_tiles asset_shader fa_readonly fa_hidden fa_sysfile fa_volumeid fa_directory fa_archive ds_type_map ds_type_list ds_type_stack ds_type_queue ds_type_grid ds_type_priority ef_explosion ef_ring ef_ellipse ef_firework ef_smoke ef_smokeup ef_star ef_spark ef_flare ef_cloud ef_rain ef_snow pt_shape_pixel pt_shape_disk pt_shape_square pt_shape_line pt_shape_star pt_shape_circle pt_shape_ring pt_shape_sphere pt_shape_flare pt_shape_spark pt_shape_explosion pt_shape_cloud pt_shape_smoke pt_shape_snow ps_distr_linear ps_distr_gaussian ps_distr_invgaussian ps_shape_rectangle ps_shape_ellipse ps_shape_diamond ps_shape_line ty_real ty_string dll_cdecl dll_stdcall matrix_view matrix_projection matrix_world os_win32 os_windows os_macosx os_ios os_android os_symbian os_linux os_unknown os_winphone os_tizen os_win8native os_wiiu os_3ds os_psvita os_bb10 os_ps4 os_xboxone os_ps3 os_xbox360 os_uwp os_tvos os_switch browser_not_a_browser browser_unknown browser_ie browser_firefox browser_chrome browser_safari browser_safari_mobile browser_opera browser_tizen browser_edge browser_windows_store browser_ie_mobile device_ios_unknown device_ios_iphone device_ios_iphone_retina device_ios_ipad device_ios_ipad_retina device_ios_iphone5 device_ios_iphone6 device_ios_iphone6plus device_emulator device_tablet display_landscape display_landscape_flipped display_portrait display_portrait_flipped tm_sleep tm_countvsyncs of_challenge_win of_challen ge_lose of_challenge_tie leaderboard_type_number leaderboard_type_time_mins_secs cmpfunc_never cmpfunc_less cmpfunc_equal cmpfunc_lessequal cmpfunc_greater cmpfunc_notequal cmpfunc_greaterequal cmpfunc_always cull_noculling cull_clockwise cull_counterclockwise lighttype_dir lighttype_point iap_ev_storeload iap_ev_product iap_ev_purchase iap_ev_consume iap_ev_restore iap_storeload_ok iap_storeload_failed iap_status_uninitialised iap_status_unavailable iap_status_loading iap_status_available iap_status_processing iap_status_restoring iap_failed iap_unavailable iap_available iap_purchased iap_canceled iap_refunded fb_login_default fb_login_fallback_to_webview fb_login_no_fallback_to_webview fb_login_forcing_webview fb_login_use_system_account fb_login_forcing_safari phy_joint_anchor_1_x phy_joint_anchor_1_y phy_joint_anchor_2_x phy_joint_anchor_2_y phy_joint_reaction_force_x phy_joint_reaction_force_y phy_joint_reaction_torque phy_joint_motor_speed phy_joint_angle phy_joint_motor_torque phy_joint_max_motor_torque phy_joint_translation phy_joint_speed phy_joint_motor_force phy_joint_max_motor_force phy_joint_length_1 phy_joint_length_2 phy_joint_damping_ratio phy_joint_frequency phy_joint_lower_angle_limit phy_joint_upper_angle_limit phy_joint_angle_limits phy_joint_max_length phy_joint_max_torque phy_joint_max_force phy_debug_render_aabb phy_debug_render_collision_pairs phy_debug_render_coms phy_debug_render_core_shapes phy_debug_render_joints phy_debug_render_obb phy_debug_render_shapes phy_particle_flag_water phy_particle_flag_zombie phy_particle_flag_wall phy_particle_flag_spring phy_particle_flag_elastic phy_particle_flag_viscous phy_particle_flag_powder phy_particle_flag_tensile phy_particle_flag_colourmixing phy_particle_flag_colormixing phy_particle_group_flag_solid phy_particle_group_flag_rigid phy_particle_data_flag_typeflags phy_particle_data_flag_position phy_particle_data_flag_velocity phy_particle_data_flag_colour phy_particle_data_flag_color phy_particle_data_flag_category achievement_our_info achievement_friends_info achievement_leaderboard_info achievement_achievement_info achievement_filter_all_players achievement_filter_friends_only achievement_filter_favorites_only achievement_type_achievement_challenge achievement_type_score_challenge achievement_pic_loaded achievement_show_ui achievement_show_profile achievement_show_leaderboard achievement_show_achievement achievement_show_bank achievement_show_friend_picker achievement_show_purchase_prompt network_socket_tcp network_socket_udp network_socket_bluetooth network_type_connect network_type_disconnect network_type_data network_type_non_blocking_connect network_config_connect_timeout network_config_use_non_blocking_socket network_config_enable_reliable_udp network_config_disable_reliable_udp buffer_fixed buffer_grow buffer_wrap buffer_fast buffer_vbuffer buffer_network buffer_u8 buffer_s8 buffer_u16 buffer_s16 buffer_u32 buffer_s32 buffer_u64 buffer_f16 buffer_f32 buffer_f64 buffer_bool buffer_text buffer_string buffer_surface_copy buffer_seek_start buffer_seek_relative buffer_seek_end buffer_generalerror buffer_outofspace buffer_outofbounds buffer_invalidtype text_type button_type input_type ANSI_CHARSET DEFAULT_CHARSET EASTEUROPE_CHARSET RUSSIAN_CHARSET SYMBOL_CHARSET SHIFTJIS_CHARSET HANGEUL_CHARSET GB2312_CHARSET CHINESEBIG5_CHARSET JOHAB_CHARSET HEBREW_CHARSET ARABIC_CHARSET GREEK_CHARSET TURKISH_CHARSET VIETNAMESE_CHARSET THAI_CHARSET MAC_CHARSET BALTIC_CHARSET OEM_CHARSET gp_face1 gp_face2 gp_face3 gp_face4 gp_shoulderl gp_shoulderr gp_shoulderlb gp_shoulderrb gp_select gp_start gp_stickl gp_stickr gp_padu gp_padd gp_padl gp_padr gp_axislh gp_axislv gp_axisrh gp_axisrv ov_friends ov_community ov_players ov_settings ov_gamegroup ov_achievements lb_sort_none lb_sort_ascending lb_sort_descending lb_disp_none lb_disp_numeric lb_disp_time_sec lb_disp_time_ms ugc_result_success ugc_filetype_community ugc_filetype_microtrans ugc_visibility_public ugc_visibility_friends_only ugc_visibility_private ugc_query_RankedByVote ugc_query_RankedByPublicationDate ugc_query_AcceptedForGameRankedByAcceptanceDate ugc_query_RankedByTrend ugc_query_FavoritedByFriendsRankedByPublicationDate ugc_query_CreatedByFriendsRankedByPublicationDate ugc_query_RankedByNumTimesReported ugc_query_CreatedByFollowedUsersRankedByPublicationDate ugc_query_NotYetRated ugc_query_RankedByTotalVotesAsc ugc_query_RankedByVotesUp ugc_query_RankedByTextSearch ugc_sortorder_CreationOrderDesc ugc_sortorder_CreationOrderAsc ugc_sortorder_TitleAsc ugc_sortorder_LastUpdatedDesc ugc_sortorder_SubscriptionDateDesc ugc_sortorder_VoteScoreDesc ugc_sortorder_ForModeration ugc_list_Published ugc_list_VotedOn ugc_list_VotedUp ugc_list_VotedDown ugc_list_WillVoteLater ugc_list_Favorited ugc_list_Subscribed ugc_list_UsedOrPlayed ugc_list_Followed ugc_match_Items ugc_match_Items_Mtx ugc_match_Items_ReadyToUse ugc_match_Collections ugc_match_Artwork ugc_match_Videos ugc_match_Screenshots ugc_match_AllGuides ugc_match_WebGuides ugc_match_IntegratedGuides ugc_match_UsableInGame ugc_match_ControllerBindings vertex_usage_position vertex_usage_colour vertex_usage_color vertex_usage_normal vertex_usage_texcoord vertex_usage_textcoord vertex_usage_blendweight vertex_usage_blendindices vertex_usage_psize vertex_usage_tangent vertex_usage_binormal vertex_usage_fog vertex_usage_depth vertex_usage_sample vertex_type_float1 vertex_type_float2 vertex_type_float3 vertex_type_float4 vertex_type_colour vertex_type_color vertex_type_ubyte4 layerelementtype_undefined layerelementtype_background layerelementtype_instance layerelementtype_oldtilemap layerelementtype_sprite layerelementtype_tilemap layerelementtype_particlesystem layerelementtype_tile tile_rotate tile_flip tile_mirror tile_index_mask kbv_type_default kbv_type_ascii kbv_type_url kbv_type_email kbv_type_numbers kbv_type_phone kbv_type_phone_name kbv_returnkey_default kbv_returnkey_go kbv_returnkey_google kbv_returnkey_join kbv_returnkey_next kbv_returnkey_route kbv_returnkey_search kbv_returnkey_send kbv_returnkey_yahoo kbv_returnkey_done kbv_returnkey_continue kbv_returnkey_emergency kbv_autocapitalize_none kbv_autocapitalize_words kbv_autocapitalize_sentences kbv_autocapitalize_characters",symbol:"argument_relative argument argument0 argument1 argument2 argument3 argument4 argument5 argument6 argument7 argument8 argument9 argument10 argument11 argument12 argument13 argument14 argument15 argument_count x|0 y|0 xprevious yprevious xstart ystart hspeed vspeed direction speed friction gravity gravity_direction path_index path_position path_positionprevious path_speed path_scale path_orientation path_endaction object_index id solid persistent mask_index instance_count instance_id room_speed fps fps_real current_time current_year current_month current_day current_weekday current_hour current_minute current_second alarm timeline_index timeline_position timeline_speed timeline_running timeline_loop room room_first room_last room_width room_height room_caption room_persistent score lives health show_score show_lives show_health caption_score caption_lives caption_health event_type event_number event_object event_action application_surface gamemaker_pro gamemaker_registered gamemaker_version error_occurred error_last debug_mode keyboard_key keyboard_lastkey keyboard_lastchar keyboard_string mouse_x mouse_y mouse_button mouse_lastbutton cursor_sprite visible sprite_index sprite_width sprite_height sprite_xoffset sprite_yoffset image_number image_index image_speed depth image_xscale image_yscale image_angle image_alpha image_blend bbox_left bbox_right bbox_top bbox_bottom layer background_colour background_showcolour background_color background_showcolor view_enabled view_current view_visible view_xview view_yview view_wview view_hview view_xport view_yport view_wport view_hport view_angle view_hborder view_vborder view_hspeed view_vspeed view_object view_surface_id view_camera game_id game_display_name game_project_name game_save_id working_directory temp_directory program_directory browser_width browser_height os_type os_device os_browser os_version display_aa async_load delta_time webgl_enabled event_data iap_data phy_rotation phy_position_x phy_position_y phy_angular_velocity phy_linear_velocity_x phy_linear_velocity_y phy_speed_x phy_speed_y phy_speed phy_angular_damping phy_linear_damping phy_bullet phy_fixed_rotation phy_active phy_mass phy_inertia phy_com_x phy_com_y phy_dynamic phy_kinematic phy_sleeping phy_collision_points phy_collision_x phy_collision_y phy_col_normal_x phy_col_normal_y phy_position_xprevious phy_position_yprevious"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){const t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,illegal:/["']/}]}]}}},function(e,t){e.exports=function(e){return{name:"Golo",keywords:{keyword:"println readln print import module function local return let var while for foreach times in case when match with break continue augment augmentation each find filter reduce if then else otherwise try catch finally raise throw orIfNull DynamicObject|10 DynamicVariable struct Observable map set vector list array",literal:"true false null"},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}},function(e,t){e.exports=function(e){return{name:"Gradle",case_insensitive:!0,keywords:{keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.REGEXP_MODE]}}},function(e,t){function n(e){return function(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}("(?=",e,")")}function r(e,t={}){return t.variants=e,t}e.exports=function(e){const t=r([e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]})]),o={className:"regexp",begin:/~?\/[^\/\n]+\//,contains:[e.BACKSLASH_ESCAPE]},i=r([e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]),a=r([{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:"\\$/",end:"/\\$",relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE],{className:"string"});return{name:"Groovy",keywords:{built_in:"this super",literal:"true false null",keyword:"byte short char int long boolean float double void def as in assert trait abstract static volatile transient public private protected synchronized final class interface enum if else for while switch case break default continue throw throws try catch finally implements extends new import package return instanceof"},contains:[e.SHEBANG({binary:"groovy",relevance:10}),t,a,o,i,{className:"class",beginKeywords:"class interface trait enum",end:/\{/,illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{className:"meta",begin:"@[A-Za-z]+",relevance:0},{className:"attr",begin:"[A-Za-z0-9_$]+[ \t]*:",relevance:0},{begin:/\?/,end:/:/,relevance:0,contains:[t,a,o,i,"self"]},{className:"symbol",begin:"^[ \t]*"+n("[A-Za-z0-9_$]+:"),excludeBegin:!0,end:"[A-Za-z0-9_$]+:",relevance:0}],illegal:/#|<\//}}},function(e,t){e.exports=function(e){return{name:"HAML",case_insensitive:!0,contains:[{className:"meta",begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",relevance:10},e.COMMENT("^\\s*(!=#|=#|-#|/).*$",!1,{relevance:0}),{begin:"^\\s*(-|=|!=)(?!#)",starts:{end:"\\n",subLanguage:"ruby"}},{className:"tag",begin:"^\\s*%",contains:[{className:"selector-tag",begin:"\\w+"},{className:"selector-id",begin:"#[\\w-]+"},{className:"selector-class",begin:"\\.[\\w-]+"},{begin:/\{\s*/,end:/\s*\}/,contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,starts:{end:/\}/,subLanguage:"ruby"}}]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(...e){return e.map(e=>n(e)).join("")}e.exports=function(e){const t={"builtin-name":["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"]},o=/\[\]|\[[^\]]+\]/,i=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,a=function(...e){return"("+e.map(e=>n(e)).join("|")+")"}(/""|"[^"]+"/,/''|'[^']+'/,o,i),s=r(r("(",/\.|\.\/|\//,")?"),a,function(e){return r("(",e,")*")}(r(/(\.|\/)/,a))),c=r("(",o,"|",i,")(?==)"),l={begin:s,lexemes:/[\w.\/]+/},u=e.inherit(l,{keywords:{literal:["true","false","undefined","null"]}}),d={begin:/\(/,end:/\)/},h={className:"attr",begin:c,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,u,d]}}},p={contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},h,u,d],returnEnd:!0},m=e.inherit(l,{className:"name",keywords:t,starts:e.inherit(p,{end:/\)/})});d.contains=[m];const g=e.inherit(l,{keywords:t,className:"name",starts:e.inherit(p,{end:/\}\}/})}),f=e.inherit(l,{keywords:t,className:"name"}),_=e.inherit(l,{className:"name",keywords:t,starts:e.inherit(p,{end:/\}\}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},e.COMMENT(/\{\{!--/,/--\}\}/),e.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[g],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[f]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[g]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[f]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[_]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[_]}]}}},function(e,t){e.exports=function(e){const t={variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},n={className:"meta",begin:/\{-#/,end:/#-\}/},r={className:"meta",begin:"^#",end:"$"},o={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},i={begin:"\\(",end:"\\)",illegal:'"',contains:[n,r,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"}),t]};return{name:"Haskell",aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[i,t],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[i,t],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[o,i,t]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[n,o,i,{begin:/\{/,end:/\}/,contains:i.contains},t]},{beginKeywords:"default",end:"$",contains:[o,i,t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[o,e.QUOTE_STRING_MODE,t]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},n,r,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,o,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}]}}},function(e,t){e.exports=function(e){return{name:"Haxe",aliases:["hx"],keywords:{keyword:"break case cast catch continue default do dynamic else enum extern for function here if import in inline never new override package private get set public return static super switch this throw trace try typedef untyped using var while Int Float String Bool Dynamic Void Array ",built_in:"trace this",literal:"true false null _"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"},{className:"subst",begin:"\\$",end:/\W\}/}]},e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"@:",end:"$"},{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elseif end error"}},{className:"type",begin:":[ \t]*",end:"[^A-Za-z0-9_ \t\\->]",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:":[ \t]*",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"new *",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"class",beginKeywords:"enum",end:"\\{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"abstract",end:"[\\{$]",contains:[{className:"type",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"from +",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"to +",end:"\\W",excludeBegin:!0,excludeEnd:!0},e.TITLE_MODE],keywords:{keyword:"abstract from to"}},{className:"class",begin:"\\b(class|interface) +",end:"[\\{$]",excludeEnd:!0,keywords:"class interface",contains:[{className:"keyword",begin:"\\b(extends|implements) +",keywords:"extends implements",contains:[{className:"type",begin:e.IDENT_RE,relevance:0}]},e.TITLE_MODE]},{className:"function",beginKeywords:"function",end:"\\(",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE]}],illegal:/<\//}}},function(e,t){e.exports=function(e){return{name:"HSP",case_insensitive:!0,keywords:{$pattern:/[\w._]+/,keyword:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",begin:/\{"/,end:/"\}/,contains:[e.BACKSLASH_ESCAPE]},e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),e.NUMBER_MODE,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},e.NUMBER_MODE,e.C_NUMBER_MODE]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(...e){return e.map(e=>n(e)).join("")}function o(e){const t={"builtin-name":["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"]},o=/\[\]|\[[^\]]+\]/,i=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,a=function(...e){return"("+e.map(e=>n(e)).join("|")+")"}(/""|"[^"]+"/,/''|'[^']+'/,o,i),s=r(r("(",/\.|\.\/|\//,")?"),a,function(e){return r("(",e,")*")}(r(/(\.|\/)/,a)));const c=r("(",o,"|",i,")(?==)"),l={begin:s,lexemes:/[\w.\/]+/},u=e.inherit(l,{keywords:{literal:["true","false","undefined","null"]}}),d={begin:/\(/,end:/\)/},h={className:"attr",begin:c,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,u,d]}}},p={contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},h,u,d],returnEnd:!0},m=e.inherit(l,{className:"name",keywords:t,starts:e.inherit(p,{end:/\)/})});d.contains=[m];const g=e.inherit(l,{keywords:t,className:"name",starts:e.inherit(p,{end:/\}\}/})}),f=e.inherit(l,{keywords:t,className:"name"}),_=e.inherit(l,{className:"name",keywords:t,starts:e.inherit(p,{end:/\}\}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},e.COMMENT(/\{\{!--/,/--\}\}/),e.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[g],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[f]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[g]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[f]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[_]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[_]}]}}e.exports=function(e){const t=o(e);return t.name="HTMLbars",e.getLanguage("handlebars")&&(t.disableAutodetect=!0),t}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t="HTTP/(2|1\\.[01])",r={className:"attribute",begin:n("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},o=[r,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+t+" \\d{3})",end:/$/,contains:[{className:"meta",begin:t},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:o}},{begin:"(?=^[A-Z]+ (.*?) "+t+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:t},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:o}},e.inherit(r,{relevance:0})]}}},function(e,t){e.exports=function(e){var t="[a-zA-Z_\\-!.?+*=<>&#'][a-zA-Z_\\-!.?+*=<>&#'0-9/;:]*",n={$pattern:t,"builtin-name":"!= % %= & &= * ** **= *= *map + += , --build-class-- --import-- -= . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorator multicombinations name neg? next none? nonlocal not not-in not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms xi xor yield yield-from zero? zip zip-longest | |= ~"},r={begin:t,relevance:0},o={className:"number",begin:"[-+]?\\d+(\\.\\d+)?",relevance:0},i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),a=e.COMMENT(";","$",{relevance:0}),s={className:"literal",begin:/\b([Tt]rue|[Ff]alse|nil|None)\b/},c={begin:"[\\[\\{]",end:"[\\]\\}]"},l={className:"comment",begin:"\\^"+t},u=e.COMMENT("\\^\\{","\\}"),d={className:"symbol",begin:"[:]{1,2}"+t},h={begin:"\\(",end:"\\)"},p={endsWithParent:!0,relevance:0},m={className:"name",relevance:0,keywords:n,begin:t,starts:p},g=[h,i,l,u,a,d,c,o,s,r];return h.contains=[e.COMMENT("comment",""),m,p],p.contains=g,c.contains=g,{name:"Hy",aliases:["hylang"],illegal:/\S/,contains:[e.SHEBANG(),h,i,l,u,a,d,c,o,s]}}},function(e,t){e.exports=function(e){return{name:"Inform 7",aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:"\\[",end:"\\]"}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:"\\[",end:"\\]",contains:["self"]}]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(...e){return e.map(e=>n(e)).join("")}e.exports=function(e){const t={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},o=e.COMMENT();o.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[o,a,i,s,t,"self"],relevance:0},l=function(...e){return"("+e.map(e=>n(e)).join("|")+")"}(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:r(l,"(\\s*\\.\\s*",l,")*",r("(?=",/\s*=\s*[^#\s]/,")")),className:"attr",starts:{end:/$/,contains:[o,c,a,i,s,t]}}]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t=/(_[a-z_\d]+)?/,r=/([de][+-]?\d+)?/,o={className:"number",variants:[{begin:n(/\b\d+/,/\.(\d*)/,r,t)},{begin:n(/\b\d+/,r,t)},{begin:n(/\.\d+/,r,t)}],relevance:0};return{name:"IRPF90",case_insensitive:!0,keywords:{literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"},illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},e.COMMENT("!","$",{relevance:0}),e.COMMENT("begin_doc","end_doc",{relevance:10}),o]}}},function(e,t){e.exports=function(e){const t="[A-Za-zА-Яа-яёЁ_!][A-Za-zА-Яа-яёЁ_0-9]*",n={className:"number",begin:e.NUMBER_RE,relevance:0},r={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]},o={className:"doctag",begin:"\\b(?:TODO|DONE|BEGIN|END|STUB|CHG|FIXME|NOTE|BUG|XXX)\\b",relevance:0},i={variants:[{className:"comment",begin:"//",end:"$",relevance:0,contains:[e.PHRASAL_WORDS_MODE,o]},{className:"comment",begin:"/\\*",end:"\\*/",relevance:0,contains:[e.PHRASAL_WORDS_MODE,o]}]},a={$pattern:t,keyword:"and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile конецпока except exitfor finally foreach все if если in в not не or или try while пока ",built_in:"SYSRES_CONST_ACCES_RIGHT_TYPE_EDIT SYSRES_CONST_ACCES_RIGHT_TYPE_FULL SYSRES_CONST_ACCES_RIGHT_TYPE_VIEW SYSRES_CONST_ACCESS_MODE_REQUISITE_CODE SYSRES_CONST_ACCESS_NO_ACCESS_VIEW SYSRES_CONST_ACCESS_NO_ACCESS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW SYSRES_CONST_ACCESS_RIGHTS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_TYPE_CHANGE SYSRES_CONST_ACCESS_TYPE_CHANGE_CODE SYSRES_CONST_ACCESS_TYPE_EXISTS SYSRES_CONST_ACCESS_TYPE_EXISTS_CODE SYSRES_CONST_ACCESS_TYPE_FULL SYSRES_CONST_ACCESS_TYPE_FULL_CODE SYSRES_CONST_ACCESS_TYPE_VIEW SYSRES_CONST_ACCESS_TYPE_VIEW_CODE SYSRES_CONST_ACTION_TYPE_ABORT SYSRES_CONST_ACTION_TYPE_ACCEPT SYSRES_CONST_ACTION_TYPE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ADD_ATTACHMENT SYSRES_CONST_ACTION_TYPE_CHANGE_CARD SYSRES_CONST_ACTION_TYPE_CHANGE_KIND SYSRES_CONST_ACTION_TYPE_CHANGE_STORAGE SYSRES_CONST_ACTION_TYPE_CONTINUE SYSRES_CONST_ACTION_TYPE_COPY SYSRES_CONST_ACTION_TYPE_CREATE SYSRES_CONST_ACTION_TYPE_CREATE_VERSION SYSRES_CONST_ACTION_TYPE_DELETE SYSRES_CONST_ACTION_TYPE_DELETE_ATTACHMENT SYSRES_CONST_ACTION_TYPE_DELETE_VERSION SYSRES_CONST_ACTION_TYPE_DISABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE_AND_PASSWORD SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_PASSWORD SYSRES_CONST_ACTION_TYPE_EXPORT_WITH_LOCK SYSRES_CONST_ACTION_TYPE_EXPORT_WITHOUT_LOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITH_UNLOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITHOUT_UNLOCK SYSRES_CONST_ACTION_TYPE_LIFE_CYCLE_STAGE SYSRES_CONST_ACTION_TYPE_LOCK SYSRES_CONST_ACTION_TYPE_LOCK_FOR_SERVER SYSRES_CONST_ACTION_TYPE_LOCK_MODIFY SYSRES_CONST_ACTION_TYPE_MARK_AS_READED SYSRES_CONST_ACTION_TYPE_MARK_AS_UNREADED SYSRES_CONST_ACTION_TYPE_MODIFY SYSRES_CONST_ACTION_TYPE_MODIFY_CARD SYSRES_CONST_ACTION_TYPE_MOVE_TO_ARCHIVE SYSRES_CONST_ACTION_TYPE_OFF_ENCRYPTION SYSRES_CONST_ACTION_TYPE_PASSWORD_CHANGE SYSRES_CONST_ACTION_TYPE_PERFORM SYSRES_CONST_ACTION_TYPE_RECOVER_FROM_LOCAL_COPY SYSRES_CONST_ACTION_TYPE_RESTART SYSRES_CONST_ACTION_TYPE_RESTORE_FROM_ARCHIVE SYSRES_CONST_ACTION_TYPE_REVISION SYSRES_CONST_ACTION_TYPE_SEND_BY_MAIL SYSRES_CONST_ACTION_TYPE_SIGN SYSRES_CONST_ACTION_TYPE_START SYSRES_CONST_ACTION_TYPE_UNLOCK SYSRES_CONST_ACTION_TYPE_UNLOCK_FROM_SERVER SYSRES_CONST_ACTION_TYPE_VERSION_STATE SYSRES_CONST_ACTION_TYPE_VERSION_VISIBILITY SYSRES_CONST_ACTION_TYPE_VIEW SYSRES_CONST_ACTION_TYPE_VIEW_SHADOW_COPY SYSRES_CONST_ACTION_TYPE_WORKFLOW_DESCRIPTION_MODIFY SYSRES_CONST_ACTION_TYPE_WRITE_HISTORY SYSRES_CONST_ACTIVE_VERSION_STATE_PICK_VALUE SYSRES_CONST_ADD_REFERENCE_MODE_NAME SYSRES_CONST_ADDITION_REQUISITE_CODE SYSRES_CONST_ADDITIONAL_PARAMS_REQUISITE_CODE SYSRES_CONST_ADITIONAL_JOB_END_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_READ_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_START_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_STATE_REQUISITE_NAME SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE_ACTION SYSRES_CONST_ALL_ACCEPT_CONDITION_RUS SYSRES_CONST_ALL_USERS_GROUP SYSRES_CONST_ALL_USERS_GROUP_NAME SYSRES_CONST_ALL_USERS_SERVER_GROUP_NAME SYSRES_CONST_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_APP_VIEWER_TYPE_REQUISITE_CODE SYSRES_CONST_APPROVING_SIGNATURE_NAME SYSRES_CONST_APPROVING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE_CODE SYSRES_CONST_ATTACH_TYPE_COMPONENT_TOKEN SYSRES_CONST_ATTACH_TYPE_DOC SYSRES_CONST_ATTACH_TYPE_EDOC SYSRES_CONST_ATTACH_TYPE_FOLDER SYSRES_CONST_ATTACH_TYPE_JOB SYSRES_CONST_ATTACH_TYPE_REFERENCE SYSRES_CONST_ATTACH_TYPE_TASK SYSRES_CONST_AUTH_ENCODED_PASSWORD SYSRES_CONST_AUTH_ENCODED_PASSWORD_CODE SYSRES_CONST_AUTH_NOVELL SYSRES_CONST_AUTH_PASSWORD SYSRES_CONST_AUTH_PASSWORD_CODE SYSRES_CONST_AUTH_WINDOWS SYSRES_CONST_AUTHENTICATING_SIGNATURE_NAME SYSRES_CONST_AUTHENTICATING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_AUTO_ENUM_METHOD_FLAG SYSRES_CONST_AUTO_NUMERATION_CODE SYSRES_CONST_AUTO_STRONG_ENUM_METHOD_FLAG SYSRES_CONST_AUTOTEXT_NAME_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_TEXT_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_USAGE_ALL SYSRES_CONST_AUTOTEXT_USAGE_ALL_CODE SYSRES_CONST_AUTOTEXT_USAGE_SIGN SYSRES_CONST_AUTOTEXT_USAGE_SIGN_CODE SYSRES_CONST_AUTOTEXT_USAGE_WORK SYSRES_CONST_AUTOTEXT_USAGE_WORK_CODE SYSRES_CONST_AUTOTEXT_USE_ANYWHERE_CODE SYSRES_CONST_AUTOTEXT_USE_ON_SIGNING_CODE SYSRES_CONST_AUTOTEXT_USE_ON_WORK_CODE SYSRES_CONST_BEGIN_DATE_REQUISITE_CODE SYSRES_CONST_BLACK_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BLUE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BTN_PART SYSRES_CONST_CALCULATED_ROLE_TYPE_CODE SYSRES_CONST_CALL_TYPE_VARIABLE_BUTTON_VALUE SYSRES_CONST_CALL_TYPE_VARIABLE_PROGRAM_VALUE SYSRES_CONST_CANCEL_MESSAGE_FUNCTION_RESULT SYSRES_CONST_CARD_PART SYSRES_CONST_CARD_REFERENCE_MODE_NAME SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_AND_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_VALUE SYSRES_CONST_CHECK_PARAM_VALUE_DATE_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_FLOAT_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_INTEGER_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_PICK_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_REEFRENCE_PARAM_TYPE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_CODE_COMPONENT_TYPE_ADMIN SYSRES_CONST_CODE_COMPONENT_TYPE_DEVELOPER SYSRES_CONST_CODE_COMPONENT_TYPE_DOCS SYSRES_CONST_CODE_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_CODE_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_CODE_COMPONENT_TYPE_OTHER SYSRES_CONST_CODE_COMPONENT_TYPE_REFERENCE SYSRES_CONST_CODE_COMPONENT_TYPE_REPORT SYSRES_CONST_CODE_COMPONENT_TYPE_SCRIPT SYSRES_CONST_CODE_COMPONENT_TYPE_URL SYSRES_CONST_CODE_REQUISITE_ACCESS SYSRES_CONST_CODE_REQUISITE_CODE SYSRES_CONST_CODE_REQUISITE_COMPONENT SYSRES_CONST_CODE_REQUISITE_DESCRIPTION SYSRES_CONST_CODE_REQUISITE_EXCLUDE_COMPONENT SYSRES_CONST_CODE_REQUISITE_RECORD SYSRES_CONST_COMMENT_REQ_CODE SYSRES_CONST_COMMON_SETTINGS_REQUISITE_CODE SYSRES_CONST_COMP_CODE_GRD SYSRES_CONST_COMPONENT_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_COMPONENT_TYPE_ADMIN_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DEVELOPER_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DOCS SYSRES_CONST_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_COMPONENT_TYPE_EDOCS SYSRES_CONST_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_COMPONENT_TYPE_OTHER SYSRES_CONST_COMPONENT_TYPE_REFERENCE_TYPES SYSRES_CONST_COMPONENT_TYPE_REFERENCES SYSRES_CONST_COMPONENT_TYPE_REPORTS SYSRES_CONST_COMPONENT_TYPE_SCRIPTS SYSRES_CONST_COMPONENT_TYPE_URL SYSRES_CONST_COMPONENTS_REMOTE_SERVERS_VIEW_CODE SYSRES_CONST_CONDITION_BLOCK_DESCRIPTION SYSRES_CONST_CONST_FIRM_STATUS_COMMON SYSRES_CONST_CONST_FIRM_STATUS_INDIVIDUAL SYSRES_CONST_CONST_NEGATIVE_VALUE SYSRES_CONST_CONST_POSITIVE_VALUE SYSRES_CONST_CONST_SERVER_STATUS_DONT_REPLICATE SYSRES_CONST_CONST_SERVER_STATUS_REPLICATE SYSRES_CONST_CONTENTS_REQUISITE_CODE SYSRES_CONST_DATA_TYPE_BOOLEAN SYSRES_CONST_DATA_TYPE_DATE SYSRES_CONST_DATA_TYPE_FLOAT SYSRES_CONST_DATA_TYPE_INTEGER SYSRES_CONST_DATA_TYPE_PICK SYSRES_CONST_DATA_TYPE_REFERENCE SYSRES_CONST_DATA_TYPE_STRING SYSRES_CONST_DATA_TYPE_TEXT SYSRES_CONST_DATA_TYPE_VARIANT SYSRES_CONST_DATE_CLOSE_REQ_CODE SYSRES_CONST_DATE_FORMAT_DATE_ONLY_CHAR SYSRES_CONST_DATE_OPEN_REQ_CODE SYSRES_CONST_DATE_REQUISITE SYSRES_CONST_DATE_REQUISITE_CODE SYSRES_CONST_DATE_REQUISITE_NAME SYSRES_CONST_DATE_REQUISITE_TYPE SYSRES_CONST_DATE_TYPE_CHAR SYSRES_CONST_DATETIME_FORMAT_VALUE SYSRES_CONST_DEA_ACCESS_RIGHTS_ACTION_CODE SYSRES_CONST_DESCRIPTION_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_DET1_PART SYSRES_CONST_DET2_PART SYSRES_CONST_DET3_PART SYSRES_CONST_DET4_PART SYSRES_CONST_DET5_PART SYSRES_CONST_DET6_PART SYSRES_CONST_DETAIL_DATASET_KEY_REQUISITE_CODE SYSRES_CONST_DETAIL_PICK_REQUISITE_CODE SYSRES_CONST_DETAIL_REQ_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_NAME SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_NAME SYSRES_CONST_DOCUMENT_STORAGES_CODE SYSRES_CONST_DOCUMENT_TEMPLATES_TYPE_NAME SYSRES_CONST_DOUBLE_REQUISITE_CODE SYSRES_CONST_EDITOR_CLOSE_FILE_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_CLOSE_PROCESS_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_TYPE_REQUISITE_CODE SYSRES_CONST_EDITORS_APPLICATION_NAME_REQUISITE_CODE SYSRES_CONST_EDITORS_CREATE_SEVERAL_PROCESSES_REQUISITE_CODE SYSRES_CONST_EDITORS_EXTENSION_REQUISITE_CODE SYSRES_CONST_EDITORS_OBSERVER_BY_PROCESS_TYPE SYSRES_CONST_EDITORS_REFERENCE_CODE SYSRES_CONST_EDITORS_REPLACE_SPEC_CHARS_REQUISITE_CODE SYSRES_CONST_EDITORS_USE_PLUGINS_REQUISITE_CODE SYSRES_CONST_EDITORS_VIEW_DOCUMENT_OPENED_TO_EDIT_CODE SYSRES_CONST_EDOC_CARD_TYPE_REQUISITE_CODE SYSRES_CONST_EDOC_CARD_TYPES_LINK_REQUISITE_CODE SYSRES_CONST_EDOC_CERTIFICATE_AND_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_CERTIFICATE_ENCODE_CODE SYSRES_CONST_EDOC_DATE_REQUISITE_CODE SYSRES_CONST_EDOC_KIND_REFERENCE_CODE SYSRES_CONST_EDOC_KINDS_BY_TEMPLATE_ACTION_CODE SYSRES_CONST_EDOC_MANAGE_ACCESS_CODE SYSRES_CONST_EDOC_NONE_ENCODE_CODE SYSRES_CONST_EDOC_NUMBER_REQUISITE_CODE SYSRES_CONST_EDOC_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_READONLY_ACCESS_CODE SYSRES_CONST_EDOC_SHELL_LIFE_TYPE_VIEW_VALUE SYSRES_CONST_EDOC_SIZE_RESTRICTION_PRIORITY_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_CHECK_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_COMPUTER_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_DATABASE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_EDIT_IN_STORAGE_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_LOCAL_PATH_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_SHARED_SOURCE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_EDOC_TYPES_REFERENCE_CODE SYSRES_CONST_EDOC_VERSION_ACTIVE_STAGE_CODE SYSRES_CONST_EDOC_VERSION_DESIGN_STAGE_CODE SYSRES_CONST_EDOC_VERSION_OBSOLETE_STAGE_CODE SYSRES_CONST_EDOC_WRITE_ACCES_CODE SYSRES_CONST_EDOCUMENT_CARD_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_END_DATE_REQUISITE_CODE SYSRES_CONST_ENUMERATION_TYPE_REQUISITE_CODE SYSRES_CONST_EXECUTE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_EXECUTIVE_FILE_STORAGE_TYPE SYSRES_CONST_EXIST_CONST SYSRES_CONST_EXIST_VALUE SYSRES_CONST_EXPORT_LOCK_TYPE_ASK SYSRES_CONST_EXPORT_LOCK_TYPE_WITH_LOCK SYSRES_CONST_EXPORT_LOCK_TYPE_WITHOUT_LOCK SYSRES_CONST_EXPORT_VERSION_TYPE_ASK SYSRES_CONST_EXPORT_VERSION_TYPE_LAST SYSRES_CONST_EXPORT_VERSION_TYPE_LAST_ACTIVE SYSRES_CONST_EXTENSION_REQUISITE_CODE SYSRES_CONST_FILTER_NAME_REQUISITE_CODE SYSRES_CONST_FILTER_REQUISITE_CODE SYSRES_CONST_FILTER_TYPE_COMMON_CODE SYSRES_CONST_FILTER_TYPE_COMMON_NAME SYSRES_CONST_FILTER_TYPE_USER_CODE SYSRES_CONST_FILTER_TYPE_USER_NAME SYSRES_CONST_FILTER_VALUE_REQUISITE_NAME SYSRES_CONST_FLOAT_NUMBER_FORMAT_CHAR SYSRES_CONST_FLOAT_REQUISITE_TYPE SYSRES_CONST_FOLDER_AUTHOR_VALUE SYSRES_CONST_FOLDER_KIND_ANY_OBJECTS SYSRES_CONST_FOLDER_KIND_COMPONENTS SYSRES_CONST_FOLDER_KIND_EDOCS SYSRES_CONST_FOLDER_KIND_JOBS SYSRES_CONST_FOLDER_KIND_TASKS SYSRES_CONST_FOLDER_TYPE_COMMON SYSRES_CONST_FOLDER_TYPE_COMPONENT SYSRES_CONST_FOLDER_TYPE_FAVORITES SYSRES_CONST_FOLDER_TYPE_INBOX SYSRES_CONST_FOLDER_TYPE_OUTBOX SYSRES_CONST_FOLDER_TYPE_QUICK_LAUNCH SYSRES_CONST_FOLDER_TYPE_SEARCH SYSRES_CONST_FOLDER_TYPE_SHORTCUTS SYSRES_CONST_FOLDER_TYPE_USER SYSRES_CONST_FROM_DICTIONARY_ENUM_METHOD_FLAG SYSRES_CONST_FULL_SUBSTITUTE_TYPE SYSRES_CONST_FULL_SUBSTITUTE_TYPE_CODE SYSRES_CONST_FUNCTION_CANCEL_RESULT SYSRES_CONST_FUNCTION_CATEGORY_SYSTEM SYSRES_CONST_FUNCTION_CATEGORY_USER SYSRES_CONST_FUNCTION_FAILURE_RESULT SYSRES_CONST_FUNCTION_SAVE_RESULT SYSRES_CONST_GENERATED_REQUISITE SYSRES_CONST_GREEN_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_GROUP_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_NAME SYSRES_CONST_GROUP_CATEGORY_SERVICE_CODE SYSRES_CONST_GROUP_CATEGORY_SERVICE_NAME SYSRES_CONST_GROUP_COMMON_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_FULL_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_CODES_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_SERVICE_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_USER_REQUISITE_CODE SYSRES_CONST_GROUPS_REFERENCE_CODE SYSRES_CONST_GROUPS_REQUISITE_CODE SYSRES_CONST_HIDDEN_MODE_NAME SYSRES_CONST_HIGH_LVL_REQUISITE_CODE SYSRES_CONST_HISTORY_ACTION_CREATE_CODE SYSRES_CONST_HISTORY_ACTION_DELETE_CODE SYSRES_CONST_HISTORY_ACTION_EDIT_CODE SYSRES_CONST_HOUR_CHAR SYSRES_CONST_ID_REQUISITE_CODE SYSRES_CONST_IDSPS_REQUISITE_CODE SYSRES_CONST_IMAGE_MODE_COLOR SYSRES_CONST_IMAGE_MODE_GREYSCALE SYSRES_CONST_IMAGE_MODE_MONOCHROME SYSRES_CONST_IMPORTANCE_HIGH SYSRES_CONST_IMPORTANCE_LOW SYSRES_CONST_IMPORTANCE_NORMAL SYSRES_CONST_IN_DESIGN_VERSION_STATE_PICK_VALUE SYSRES_CONST_INCOMING_WORK_RULE_TYPE_CODE SYSRES_CONST_INT_REQUISITE SYSRES_CONST_INT_REQUISITE_TYPE SYSRES_CONST_INTEGER_NUMBER_FORMAT_CHAR SYSRES_CONST_INTEGER_TYPE_CHAR SYSRES_CONST_IS_GENERATED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_PUBLIC_ROLE_REQUISITE_CODE SYSRES_CONST_IS_REMOTE_USER_NEGATIVE_VALUE SYSRES_CONST_IS_REMOTE_USER_POSITIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_STORED_VALUE SYSRES_CONST_ITALIC_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_JOB_BLOCK_DESCRIPTION SYSRES_CONST_JOB_KIND_CONTROL_JOB SYSRES_CONST_JOB_KIND_JOB SYSRES_CONST_JOB_KIND_NOTICE SYSRES_CONST_JOB_STATE_ABORTED SYSRES_CONST_JOB_STATE_COMPLETE SYSRES_CONST_JOB_STATE_WORKING SYSRES_CONST_KIND_REQUISITE_CODE SYSRES_CONST_KIND_REQUISITE_NAME SYSRES_CONST_KINDS_CREATE_SHADOW_COPIES_REQUISITE_CODE SYSRES_CONST_KINDS_DEFAULT_EDOC_LIFE_STAGE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALL_TEPLATES_ALLOWED_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_LIFE_CYCLE_STAGE_CHANGING_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_MULTIPLE_ACTIVE_VERSIONS_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_SHARE_ACCES_RIGHTS_BY_DEFAULT_CODE SYSRES_CONST_KINDS_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_TYPE_REQUISITE_CODE SYSRES_CONST_KINDS_SIGNERS_REQUISITES_CODE SYSRES_CONST_KOD_INPUT_TYPE SYSRES_CONST_LAST_UPDATE_DATE_REQUISITE_CODE SYSRES_CONST_LIFE_CYCLE_START_STAGE_REQUISITE_CODE SYSRES_CONST_LILAC_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_LINK_OBJECT_KIND_COMPONENT SYSRES_CONST_LINK_OBJECT_KIND_DOCUMENT SYSRES_CONST_LINK_OBJECT_KIND_EDOC SYSRES_CONST_LINK_OBJECT_KIND_FOLDER SYSRES_CONST_LINK_OBJECT_KIND_JOB SYSRES_CONST_LINK_OBJECT_KIND_REFERENCE SYSRES_CONST_LINK_OBJECT_KIND_TASK SYSRES_CONST_LINK_REF_TYPE_REQUISITE_CODE SYSRES_CONST_LIST_REFERENCE_MODE_NAME SYSRES_CONST_LOCALIZATION_DICTIONARY_MAIN_VIEW_CODE SYSRES_CONST_MAIN_VIEW_CODE SYSRES_CONST_MANUAL_ENUM_METHOD_FLAG SYSRES_CONST_MASTER_COMP_TYPE_REQUISITE_CODE SYSRES_CONST_MASTER_TABLE_REC_ID_REQUISITE_CODE SYSRES_CONST_MAXIMIZED_MODE_NAME SYSRES_CONST_ME_VALUE SYSRES_CONST_MESSAGE_ATTENTION_CAPTION SYSRES_CONST_MESSAGE_CONFIRMATION_CAPTION SYSRES_CONST_MESSAGE_ERROR_CAPTION SYSRES_CONST_MESSAGE_INFORMATION_CAPTION SYSRES_CONST_MINIMIZED_MODE_NAME SYSRES_CONST_MINUTE_CHAR SYSRES_CONST_MODULE_REQUISITE_CODE SYSRES_CONST_MONITORING_BLOCK_DESCRIPTION SYSRES_CONST_MONTH_FORMAT_VALUE SYSRES_CONST_NAME_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_NAME_REQUISITE_CODE SYSRES_CONST_NAME_SINGULAR_REQUISITE_CODE SYSRES_CONST_NAMEAN_INPUT_TYPE SYSRES_CONST_NEGATIVE_PICK_VALUE SYSRES_CONST_NEGATIVE_VALUE SYSRES_CONST_NO SYSRES_CONST_NO_PICK_VALUE SYSRES_CONST_NO_SIGNATURE_REQUISITE_CODE SYSRES_CONST_NO_VALUE SYSRES_CONST_NONE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_NORMAL_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NORMAL_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_NORMAL_MODE_NAME SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_NOTE_REQUISITE_CODE SYSRES_CONST_NOTICE_BLOCK_DESCRIPTION SYSRES_CONST_NUM_REQUISITE SYSRES_CONST_NUM_STR_REQUISITE_CODE SYSRES_CONST_NUMERATION_AUTO_NOT_STRONG SYSRES_CONST_NUMERATION_AUTO_STRONG SYSRES_CONST_NUMERATION_FROM_DICTONARY SYSRES_CONST_NUMERATION_MANUAL SYSRES_CONST_NUMERIC_TYPE_CHAR SYSRES_CONST_NUMREQ_REQUISITE_CODE SYSRES_CONST_OBSOLETE_VERSION_STATE_PICK_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_OPTIONAL_FORM_COMP_REQCODE_PREFIX SYSRES_CONST_ORANGE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_ORIGINALREF_REQUISITE_CODE SYSRES_CONST_OURFIRM_REF_CODE SYSRES_CONST_OURFIRM_REQUISITE_CODE SYSRES_CONST_OURFIRM_VAR SYSRES_CONST_OUTGOING_WORK_RULE_TYPE_CODE SYSRES_CONST_PICK_NEGATIVE_RESULT SYSRES_CONST_PICK_POSITIVE_RESULT SYSRES_CONST_PICK_REQUISITE SYSRES_CONST_PICK_REQUISITE_TYPE SYSRES_CONST_PICK_TYPE_CHAR SYSRES_CONST_PLAN_STATUS_REQUISITE_CODE SYSRES_CONST_PLATFORM_VERSION_COMMENT SYSRES_CONST_PLUGINS_SETTINGS_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_POSITIVE_PICK_VALUE SYSRES_CONST_POWER_TO_CREATE_ACTION_CODE SYSRES_CONST_POWER_TO_SIGN_ACTION_CODE SYSRES_CONST_PRIORITY_REQUISITE_CODE SYSRES_CONST_QUALIFIED_TASK_TYPE SYSRES_CONST_QUALIFIED_TASK_TYPE_CODE SYSRES_CONST_RECSTAT_REQUISITE_CODE SYSRES_CONST_RED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_REF_ID_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_REF_REQUISITE SYSRES_CONST_REF_REQUISITE_TYPE SYSRES_CONST_REF_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_REFERENCE_RECORD_HISTORY_CREATE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_DELETE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_MODIFY_ACTION_CODE SYSRES_CONST_REFERENCE_TYPE_CHAR SYSRES_CONST_REFERENCE_TYPE_REQUISITE_NAME SYSRES_CONST_REFERENCES_ADD_PARAMS_REQUISITE_CODE SYSRES_CONST_REFERENCES_DISPLAY_REQUISITE_REQUISITE_CODE SYSRES_CONST_REMOTE_SERVER_STATUS_WORKING SYSRES_CONST_REMOTE_SERVER_TYPE_MAIN SYSRES_CONST_REMOTE_SERVER_TYPE_SECONDARY SYSRES_CONST_REMOTE_USER_FLAG_VALUE_CODE SYSRES_CONST_REPORT_APP_EDITOR_INTERNAL SYSRES_CONST_REPORT_BASE_REPORT_ID_REQUISITE_CODE SYSRES_CONST_REPORT_BASE_REPORT_REQUISITE_CODE SYSRES_CONST_REPORT_SCRIPT_REQUISITE_CODE SYSRES_CONST_REPORT_TEMPLATE_REQUISITE_CODE SYSRES_CONST_REPORT_VIEWER_CODE_REQUISITE_CODE SYSRES_CONST_REQ_ALLOW_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_RECORD_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_SERVER_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_MODE_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_EDIT_CODE SYSRES_CONST_REQ_MODE_HIDDEN_CODE SYSRES_CONST_REQ_MODE_NOT_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_VIEW_CODE SYSRES_CONST_REQ_NUMBER_REQUISITE_CODE SYSRES_CONST_REQ_SECTION_VALUE SYSRES_CONST_REQ_TYPE_VALUE SYSRES_CONST_REQUISITE_FORMAT_BY_UNIT SYSRES_CONST_REQUISITE_FORMAT_DATE_FULL SYSRES_CONST_REQUISITE_FORMAT_DATE_TIME SYSRES_CONST_REQUISITE_FORMAT_LEFT SYSRES_CONST_REQUISITE_FORMAT_RIGHT SYSRES_CONST_REQUISITE_FORMAT_WITHOUT_UNIT SYSRES_CONST_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_REQUISITE_SECTION_ACTIONS SYSRES_CONST_REQUISITE_SECTION_BUTTON SYSRES_CONST_REQUISITE_SECTION_BUTTONS SYSRES_CONST_REQUISITE_SECTION_CARD SYSRES_CONST_REQUISITE_SECTION_TABLE SYSRES_CONST_REQUISITE_SECTION_TABLE10 SYSRES_CONST_REQUISITE_SECTION_TABLE11 SYSRES_CONST_REQUISITE_SECTION_TABLE12 SYSRES_CONST_REQUISITE_SECTION_TABLE13 SYSRES_CONST_REQUISITE_SECTION_TABLE14 SYSRES_CONST_REQUISITE_SECTION_TABLE15 SYSRES_CONST_REQUISITE_SECTION_TABLE16 SYSRES_CONST_REQUISITE_SECTION_TABLE17 SYSRES_CONST_REQUISITE_SECTION_TABLE18 SYSRES_CONST_REQUISITE_SECTION_TABLE19 SYSRES_CONST_REQUISITE_SECTION_TABLE2 SYSRES_CONST_REQUISITE_SECTION_TABLE20 SYSRES_CONST_REQUISITE_SECTION_TABLE21 SYSRES_CONST_REQUISITE_SECTION_TABLE22 SYSRES_CONST_REQUISITE_SECTION_TABLE23 SYSRES_CONST_REQUISITE_SECTION_TABLE24 SYSRES_CONST_REQUISITE_SECTION_TABLE3 SYSRES_CONST_REQUISITE_SECTION_TABLE4 SYSRES_CONST_REQUISITE_SECTION_TABLE5 SYSRES_CONST_REQUISITE_SECTION_TABLE6 SYSRES_CONST_REQUISITE_SECTION_TABLE7 SYSRES_CONST_REQUISITE_SECTION_TABLE8 SYSRES_CONST_REQUISITE_SECTION_TABLE9 SYSRES_CONST_REQUISITES_PSEUDOREFERENCE_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_RIGHT_ALIGNMENT_CODE SYSRES_CONST_ROLES_REFERENCE_CODE SYSRES_CONST_ROUTE_STEP_AFTER_RUS SYSRES_CONST_ROUTE_STEP_AND_CONDITION_RUS SYSRES_CONST_ROUTE_STEP_OR_CONDITION_RUS SYSRES_CONST_ROUTE_TYPE_COMPLEX SYSRES_CONST_ROUTE_TYPE_PARALLEL SYSRES_CONST_ROUTE_TYPE_SERIAL SYSRES_CONST_SBDATASETDESC_NEGATIVE_VALUE SYSRES_CONST_SBDATASETDESC_POSITIVE_VALUE SYSRES_CONST_SBVIEWSDESC_POSITIVE_VALUE SYSRES_CONST_SCRIPT_BLOCK_DESCRIPTION SYSRES_CONST_SEARCH_BY_TEXT_REQUISITE_CODE SYSRES_CONST_SEARCHES_COMPONENT_CONTENT SYSRES_CONST_SEARCHES_CRITERIA_ACTION_NAME SYSRES_CONST_SEARCHES_EDOC_CONTENT SYSRES_CONST_SEARCHES_FOLDER_CONTENT SYSRES_CONST_SEARCHES_JOB_CONTENT SYSRES_CONST_SEARCHES_REFERENCE_CODE SYSRES_CONST_SEARCHES_TASK_CONTENT SYSRES_CONST_SECOND_CHAR SYSRES_CONST_SECTION_REQUISITE_ACTIONS_VALUE SYSRES_CONST_SECTION_REQUISITE_CARD_VALUE SYSRES_CONST_SECTION_REQUISITE_CODE SYSRES_CONST_SECTION_REQUISITE_DETAIL_1_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_2_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_3_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_4_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_5_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_6_VALUE SYSRES_CONST_SELECT_REFERENCE_MODE_NAME SYSRES_CONST_SELECT_TYPE_SELECTABLE SYSRES_CONST_SELECT_TYPE_SELECTABLE_ONLY_CHILD SYSRES_CONST_SELECT_TYPE_SELECTABLE_WITH_CHILD SYSRES_CONST_SELECT_TYPE_UNSLECTABLE SYSRES_CONST_SERVER_TYPE_MAIN SYSRES_CONST_SERVICE_USER_CATEGORY_FIELD_VALUE SYSRES_CONST_SETTINGS_USER_REQUISITE_CODE SYSRES_CONST_SIGNATURE_AND_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SIGNATURE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SINGULAR_TITLE_REQUISITE_CODE SYSRES_CONST_SQL_SERVER_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_SQL_SERVER_ENCODE_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_STANDART_ROUTES_GROUPS_REFERENCE_CODE SYSRES_CONST_STATE_REQ_NAME SYSRES_CONST_STATE_REQUISITE_ACTIVE_VALUE SYSRES_CONST_STATE_REQUISITE_CLOSED_VALUE SYSRES_CONST_STATE_REQUISITE_CODE SYSRES_CONST_STATIC_ROLE_TYPE_CODE SYSRES_CONST_STATUS_PLAN_DEFAULT_VALUE SYSRES_CONST_STATUS_VALUE_AUTOCLEANING SYSRES_CONST_STATUS_VALUE_BLUE_SQUARE SYSRES_CONST_STATUS_VALUE_COMPLETE SYSRES_CONST_STATUS_VALUE_GREEN_SQUARE SYSRES_CONST_STATUS_VALUE_ORANGE_SQUARE SYSRES_CONST_STATUS_VALUE_PURPLE_SQUARE SYSRES_CONST_STATUS_VALUE_RED_SQUARE SYSRES_CONST_STATUS_VALUE_SUSPEND SYSRES_CONST_STATUS_VALUE_YELLOW_SQUARE SYSRES_CONST_STDROUTE_SHOW_TO_USERS_REQUISITE_CODE SYSRES_CONST_STORAGE_TYPE_FILE SYSRES_CONST_STORAGE_TYPE_SQL_SERVER SYSRES_CONST_STR_REQUISITE SYSRES_CONST_STRIKEOUT_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_STRING_FORMAT_LEFT_ALIGN_CHAR SYSRES_CONST_STRING_FORMAT_RIGHT_ALIGN_CHAR SYSRES_CONST_STRING_REQUISITE_CODE SYSRES_CONST_STRING_REQUISITE_TYPE SYSRES_CONST_STRING_TYPE_CHAR SYSRES_CONST_SUBSTITUTES_PSEUDOREFERENCE_CODE SYSRES_CONST_SUBTASK_BLOCK_DESCRIPTION SYSRES_CONST_SYSTEM_SETTING_CURRENT_USER_PARAM_VALUE SYSRES_CONST_SYSTEM_SETTING_EMPTY_VALUE_PARAM_VALUE SYSRES_CONST_SYSTEM_VERSION_COMMENT SYSRES_CONST_TASK_ACCESS_TYPE_ALL SYSRES_CONST_TASK_ACCESS_TYPE_ALL_MEMBERS SYSRES_CONST_TASK_ACCESS_TYPE_MANUAL SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION_AND_PASSWORD SYSRES_CONST_TASK_ENCODE_TYPE_NONE SYSRES_CONST_TASK_ENCODE_TYPE_PASSWORD SYSRES_CONST_TASK_ROUTE_ALL_CONDITION SYSRES_CONST_TASK_ROUTE_AND_CONDITION SYSRES_CONST_TASK_ROUTE_OR_CONDITION SYSRES_CONST_TASK_STATE_ABORTED SYSRES_CONST_TASK_STATE_COMPLETE SYSRES_CONST_TASK_STATE_CONTINUED SYSRES_CONST_TASK_STATE_CONTROL SYSRES_CONST_TASK_STATE_INIT SYSRES_CONST_TASK_STATE_WORKING SYSRES_CONST_TASK_TITLE SYSRES_CONST_TASK_TYPES_GROUPS_REFERENCE_CODE SYSRES_CONST_TASK_TYPES_REFERENCE_CODE SYSRES_CONST_TEMPLATES_REFERENCE_CODE SYSRES_CONST_TEST_DATE_REQUISITE_NAME SYSRES_CONST_TEST_DEV_DATABASE_NAME SYSRES_CONST_TEST_DEV_SYSTEM_CODE SYSRES_CONST_TEST_EDMS_DATABASE_NAME SYSRES_CONST_TEST_EDMS_MAIN_CODE SYSRES_CONST_TEST_EDMS_MAIN_DB_NAME SYSRES_CONST_TEST_EDMS_SECOND_CODE SYSRES_CONST_TEST_EDMS_SECOND_DB_NAME SYSRES_CONST_TEST_EDMS_SYSTEM_CODE SYSRES_CONST_TEST_NUMERIC_REQUISITE_NAME SYSRES_CONST_TEXT_REQUISITE SYSRES_CONST_TEXT_REQUISITE_CODE SYSRES_CONST_TEXT_REQUISITE_TYPE SYSRES_CONST_TEXT_TYPE_CHAR SYSRES_CONST_TYPE_CODE_REQUISITE_CODE SYSRES_CONST_TYPE_REQUISITE_CODE SYSRES_CONST_UNDEFINED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_UNITS_SECTION_ID_REQUISITE_CODE SYSRES_CONST_UNITS_SECTION_REQUISITE_CODE SYSRES_CONST_UNOPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_NAME SYSRES_CONST_USE_ACCESS_TYPE_CODE SYSRES_CONST_USE_ACCESS_TYPE_NAME SYSRES_CONST_USER_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_USER_ADDITIONAL_INFORMATION_REQUISITE_CODE SYSRES_CONST_USER_AND_GROUP_ID_FROM_PSEUDOREFERENCE_REQUISITE_CODE SYSRES_CONST_USER_CATEGORY_NORMAL SYSRES_CONST_USER_CERTIFICATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_STATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_SUBJECT_NAME_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_THUMBPRINT_REQUISITE_CODE SYSRES_CONST_USER_COMMON_CATEGORY SYSRES_CONST_USER_COMMON_CATEGORY_CODE SYSRES_CONST_USER_FULL_NAME_REQUISITE_CODE SYSRES_CONST_USER_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_USER_LOGIN_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_SYSTEM_REQUISITE_CODE SYSRES_CONST_USER_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_USER_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_USER_SERVICE_CATEGORY SYSRES_CONST_USER_SERVICE_CATEGORY_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_NAME SYSRES_CONST_USER_STATUS_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_DEVELOPER_NAME SYSRES_CONST_USER_STATUS_DISABLED_CODE SYSRES_CONST_USER_STATUS_DISABLED_NAME SYSRES_CONST_USER_STATUS_SYSTEM_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_USER_CODE SYSRES_CONST_USER_STATUS_USER_NAME SYSRES_CONST_USER_STATUS_USER_NAME_DEPRECATED SYSRES_CONST_USER_TYPE_FIELD_VALUE_USER SYSRES_CONST_USER_TYPE_REQUISITE_CODE SYSRES_CONST_USERS_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USERS_IS_MAIN_SERVER_REQUISITE_CODE SYSRES_CONST_USERS_REFERENCE_CODE SYSRES_CONST_USERS_REGISTRATION_CERTIFICATES_ACTION_NAME SYSRES_CONST_USERS_REQUISITE_CODE SYSRES_CONST_USERS_SYSTEM_REQUISITE_CODE SYSRES_CONST_USERS_USER_ACCESS_RIGHTS_TYPR_REQUISITE_CODE SYSRES_CONST_USERS_USER_AUTHENTICATION_REQUISITE_CODE SYSRES_CONST_USERS_USER_COMPONENT_REQUISITE_CODE SYSRES_CONST_USERS_USER_GROUP_REQUISITE_CODE SYSRES_CONST_USERS_VIEW_CERTIFICATES_ACTION_NAME SYSRES_CONST_VIEW_DEFAULT_CODE SYSRES_CONST_VIEW_DEFAULT_NAME SYSRES_CONST_VIEWER_REQUISITE_CODE SYSRES_CONST_WAITING_BLOCK_DESCRIPTION SYSRES_CONST_WIZARD_FORM_LABEL_TEST_STRING SYSRES_CONST_WIZARD_QUERY_PARAM_HEIGHT_ETALON_STRING SYSRES_CONST_WIZARD_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_WORK_RULES_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_WORK_TIME_CALENDAR_REFERENCE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORK_WORKFLOW_SOFT_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORKFLOW_ROUTE_TYPR_HARD SYSRES_CONST_WORKFLOW_ROUTE_TYPR_SOFT SYSRES_CONST_XML_ENCODING SYSRES_CONST_XREC_STAT_REQUISITE_CODE SYSRES_CONST_XRECID_FIELD_NAME SYSRES_CONST_YES SYSRES_CONST_YES_NO_2_REQUISITE_CODE SYSRES_CONST_YES_NO_REQUISITE_CODE SYSRES_CONST_YES_NO_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_YES_PICK_VALUE SYSRES_CONST_YES_VALUE CR FALSE nil NO_VALUE NULL TAB TRUE YES_VALUE ADMINISTRATORS_GROUP_NAME CUSTOMIZERS_GROUP_NAME DEVELOPERS_GROUP_NAME SERVICE_USERS_GROUP_NAME DECISION_BLOCK_FIRST_OPERAND_PROPERTY DECISION_BLOCK_NAME_PROPERTY DECISION_BLOCK_OPERATION_PROPERTY DECISION_BLOCK_RESULT_TYPE_PROPERTY DECISION_BLOCK_SECOND_OPERAND_PROPERTY ANY_FILE_EXTENTION COMPRESSED_DOCUMENT_EXTENSION EXTENDED_DOCUMENT_EXTENSION SHORT_COMPRESSED_DOCUMENT_EXTENSION SHORT_EXTENDED_DOCUMENT_EXTENSION JOB_BLOCK_ABORT_DEADLINE_PROPERTY JOB_BLOCK_AFTER_FINISH_EVENT JOB_BLOCK_AFTER_QUERY_PARAMETERS_EVENT JOB_BLOCK_ATTACHMENT_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY JOB_BLOCK_BEFORE_QUERY_PARAMETERS_EVENT JOB_BLOCK_BEFORE_START_EVENT JOB_BLOCK_CREATED_JOBS_PROPERTY JOB_BLOCK_DEADLINE_PROPERTY JOB_BLOCK_EXECUTION_RESULTS_PROPERTY JOB_BLOCK_IS_PARALLEL_PROPERTY JOB_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY JOB_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY JOB_BLOCK_JOB_TEXT_PROPERTY JOB_BLOCK_NAME_PROPERTY JOB_BLOCK_NEED_SIGN_ON_PERFORM_PROPERTY JOB_BLOCK_PERFORMER_PROPERTY JOB_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY JOB_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY JOB_BLOCK_SUBJECT_PROPERTY ENGLISH_LANGUAGE_CODE RUSSIAN_LANGUAGE_CODE smHidden smMaximized smMinimized smNormal wmNo wmYes COMPONENT_TOKEN_LINK_KIND DOCUMENT_LINK_KIND EDOCUMENT_LINK_KIND FOLDER_LINK_KIND JOB_LINK_KIND REFERENCE_LINK_KIND TASK_LINK_KIND COMPONENT_TOKEN_LOCK_TYPE EDOCUMENT_VERSION_LOCK_TYPE MONITOR_BLOCK_AFTER_FINISH_EVENT MONITOR_BLOCK_BEFORE_START_EVENT MONITOR_BLOCK_DEADLINE_PROPERTY MONITOR_BLOCK_INTERVAL_PROPERTY MONITOR_BLOCK_INTERVAL_TYPE_PROPERTY MONITOR_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY MONITOR_BLOCK_NAME_PROPERTY MONITOR_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY MONITOR_BLOCK_SEARCH_SCRIPT_PROPERTY NOTICE_BLOCK_AFTER_FINISH_EVENT NOTICE_BLOCK_ATTACHMENT_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY NOTICE_BLOCK_BEFORE_START_EVENT NOTICE_BLOCK_CREATED_NOTICES_PROPERTY NOTICE_BLOCK_DEADLINE_PROPERTY NOTICE_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY NOTICE_BLOCK_NAME_PROPERTY NOTICE_BLOCK_NOTICE_TEXT_PROPERTY NOTICE_BLOCK_PERFORMER_PROPERTY NOTICE_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY NOTICE_BLOCK_SUBJECT_PROPERTY dseAfterCancel dseAfterClose dseAfterDelete dseAfterDeleteOutOfTransaction dseAfterInsert dseAfterOpen dseAfterScroll dseAfterUpdate dseAfterUpdateOutOfTransaction dseBeforeCancel dseBeforeClose dseBeforeDelete dseBeforeDetailUpdate dseBeforeInsert dseBeforeOpen dseBeforeUpdate dseOnAnyRequisiteChange dseOnCloseRecord dseOnDeleteError dseOnOpenRecord dseOnPrepareUpdate dseOnUpdateError dseOnUpdateRatifiedRecord dseOnValidDelete dseOnValidUpdate reOnChange reOnChangeValues SELECTION_BEGIN_ROUTE_EVENT SELECTION_END_ROUTE_EVENT CURRENT_PERIOD_IS_REQUIRED PREVIOUS_CARD_TYPE_NAME SHOW_RECORD_PROPERTIES_FORM ACCESS_RIGHTS_SETTING_DIALOG_CODE ADMINISTRATOR_USER_CODE ANALYTIC_REPORT_TYPE asrtHideLocal asrtHideRemote CALCULATED_ROLE_TYPE_CODE COMPONENTS_REFERENCE_DEVELOPER_VIEW_CODE DCTS_TEST_PROTOCOLS_FOLDER_PATH E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED_BY_USER E_EDOC_VERSION_ALREDY_SIGNED E_EDOC_VERSION_ALREDY_SIGNED_BY_USER EDOC_TYPES_CODE_REQUISITE_FIELD_NAME EDOCUMENTS_ALIAS_NAME FILES_FOLDER_PATH FILTER_OPERANDS_DELIMITER FILTER_OPERATIONS_DELIMITER FORMCARD_NAME FORMLIST_NAME GET_EXTENDED_DOCUMENT_EXTENSION_CREATION_MODE GET_EXTENDED_DOCUMENT_EXTENSION_IMPORT_MODE INTEGRATED_REPORT_TYPE IS_BUILDER_APPLICATION_ROLE IS_BUILDER_APPLICATION_ROLE2 IS_BUILDER_USERS ISBSYSDEV LOG_FOLDER_PATH mbCancel mbNo mbNoToAll mbOK mbYes mbYesToAll MEMORY_DATASET_DESRIPTIONS_FILENAME mrNo mrNoToAll mrYes mrYesToAll MULTIPLE_SELECT_DIALOG_CODE NONOPERATING_RECORD_FLAG_FEMININE NONOPERATING_RECORD_FLAG_MASCULINE OPERATING_RECORD_FLAG_FEMININE OPERATING_RECORD_FLAG_MASCULINE PROFILING_SETTINGS_COMMON_SETTINGS_CODE_VALUE PROGRAM_INITIATED_LOOKUP_ACTION ratDelete ratEdit ratInsert REPORT_TYPE REQUIRED_PICK_VALUES_VARIABLE rmCard rmList SBRTE_PROGID_DEV SBRTE_PROGID_RELEASE STATIC_ROLE_TYPE_CODE SUPPRESS_EMPTY_TEMPLATE_CREATION SYSTEM_USER_CODE UPDATE_DIALOG_DATASET USED_IN_OBJECT_HINT_PARAM USER_INITIATED_LOOKUP_ACTION USER_NAME_FORMAT USER_SELECTION_RESTRICTIONS WORKFLOW_TEST_PROTOCOLS_FOLDER_PATH ELS_SUBTYPE_CONTROL_NAME ELS_FOLDER_KIND_CONTROL_NAME REPEAT_PROCESS_CURRENT_OBJECT_EXCEPTION_NAME PRIVILEGE_COMPONENT_FULL_ACCESS PRIVILEGE_DEVELOPMENT_EXPORT PRIVILEGE_DEVELOPMENT_IMPORT PRIVILEGE_DOCUMENT_DELETE PRIVILEGE_ESD PRIVILEGE_FOLDER_DELETE PRIVILEGE_MANAGE_ACCESS_RIGHTS PRIVILEGE_MANAGE_REPLICATION PRIVILEGE_MANAGE_SESSION_SERVER PRIVILEGE_OBJECT_FULL_ACCESS PRIVILEGE_OBJECT_VIEW PRIVILEGE_RESERVE_LICENSE PRIVILEGE_SYSTEM_CUSTOMIZE PRIVILEGE_SYSTEM_DEVELOP PRIVILEGE_SYSTEM_INSTALL PRIVILEGE_TASK_DELETE PRIVILEGE_USER_PLUGIN_SETTINGS_CUSTOMIZE PRIVILEGES_PSEUDOREFERENCE_CODE ACCESS_TYPES_PSEUDOREFERENCE_CODE ALL_AVAILABLE_COMPONENTS_PSEUDOREFERENCE_CODE ALL_AVAILABLE_PRIVILEGES_PSEUDOREFERENCE_CODE ALL_REPLICATE_COMPONENTS_PSEUDOREFERENCE_CODE AVAILABLE_DEVELOPERS_COMPONENTS_PSEUDOREFERENCE_CODE COMPONENTS_PSEUDOREFERENCE_CODE FILTRATER_SETTINGS_CONFLICTS_PSEUDOREFERENCE_CODE GROUPS_PSEUDOREFERENCE_CODE RECEIVE_PROTOCOL_PSEUDOREFERENCE_CODE REFERENCE_REQUISITE_PSEUDOREFERENCE_CODE REFERENCE_REQUISITES_PSEUDOREFERENCE_CODE REFTYPES_PSEUDOREFERENCE_CODE REPLICATION_SEANCES_DIARY_PSEUDOREFERENCE_CODE SEND_PROTOCOL_PSEUDOREFERENCE_CODE SUBSTITUTES_PSEUDOREFERENCE_CODE SYSTEM_SETTINGS_PSEUDOREFERENCE_CODE UNITS_PSEUDOREFERENCE_CODE USERS_PSEUDOREFERENCE_CODE VIEWERS_PSEUDOREFERENCE_CODE CERTIFICATE_TYPE_ENCRYPT CERTIFICATE_TYPE_SIGN CERTIFICATE_TYPE_SIGN_AND_ENCRYPT STORAGE_TYPE_FILE STORAGE_TYPE_NAS_CIFS STORAGE_TYPE_SAPERION STORAGE_TYPE_SQL_SERVER COMPTYPE2_REQUISITE_DOCUMENTS_VALUE COMPTYPE2_REQUISITE_TASKS_VALUE COMPTYPE2_REQUISITE_FOLDERS_VALUE COMPTYPE2_REQUISITE_REFERENCES_VALUE SYSREQ_CODE SYSREQ_COMPTYPE2 SYSREQ_CONST_AVAILABLE_FOR_WEB SYSREQ_CONST_COMMON_CODE SYSREQ_CONST_COMMON_VALUE SYSREQ_CONST_FIRM_CODE SYSREQ_CONST_FIRM_STATUS SYSREQ_CONST_FIRM_VALUE SYSREQ_CONST_SERVER_STATUS SYSREQ_CONTENTS SYSREQ_DATE_OPEN SYSREQ_DATE_CLOSE SYSREQ_DESCRIPTION SYSREQ_DESCRIPTION_LOCALIZE_ID SYSREQ_DOUBLE SYSREQ_EDOC_ACCESS_TYPE SYSREQ_EDOC_AUTHOR SYSREQ_EDOC_CREATED SYSREQ_EDOC_DELEGATE_RIGHTS_REQUISITE_CODE SYSREQ_EDOC_EDITOR SYSREQ_EDOC_ENCODE_TYPE SYSREQ_EDOC_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_EXPORT_DATE SYSREQ_EDOC_EXPORTER SYSREQ_EDOC_KIND SYSREQ_EDOC_LIFE_STAGE_NAME SYSREQ_EDOC_LOCKED_FOR_SERVER_CODE SYSREQ_EDOC_MODIFIED SYSREQ_EDOC_NAME SYSREQ_EDOC_NOTE SYSREQ_EDOC_QUALIFIED_ID SYSREQ_EDOC_SESSION_KEY SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_SIGNATURE_TYPE SYSREQ_EDOC_SIGNED SYSREQ_EDOC_STORAGE SYSREQ_EDOC_STORAGES_ARCHIVE_STORAGE SYSREQ_EDOC_STORAGES_CHECK_RIGHTS SYSREQ_EDOC_STORAGES_COMPUTER_NAME SYSREQ_EDOC_STORAGES_EDIT_IN_STORAGE SYSREQ_EDOC_STORAGES_EXECUTIVE_STORAGE SYSREQ_EDOC_STORAGES_FUNCTION SYSREQ_EDOC_STORAGES_INITIALIZED SYSREQ_EDOC_STORAGES_LOCAL_PATH SYSREQ_EDOC_STORAGES_SAPERION_DATABASE_NAME SYSREQ_EDOC_STORAGES_SEARCH_BY_TEXT SYSREQ_EDOC_STORAGES_SERVER_NAME SYSREQ_EDOC_STORAGES_SHARED_SOURCE_NAME SYSREQ_EDOC_STORAGES_TYPE SYSREQ_EDOC_TEXT_MODIFIED SYSREQ_EDOC_TYPE_ACT_CODE SYSREQ_EDOC_TYPE_ACT_DESCRIPTION SYSREQ_EDOC_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_EDOC_TYPE_ACT_SECTION SYSREQ_EDOC_TYPE_ADD_PARAMS SYSREQ_EDOC_TYPE_COMMENT SYSREQ_EDOC_TYPE_EVENT_TEXT SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_EDOC_TYPE_NAME_LOCALIZE_ID SYSREQ_EDOC_TYPE_NUMERATION_METHOD SYSREQ_EDOC_TYPE_PSEUDO_REQUISITE_CODE SYSREQ_EDOC_TYPE_REQ_CODE SYSREQ_EDOC_TYPE_REQ_DESCRIPTION SYSREQ_EDOC_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_REQ_IS_LEADING SYSREQ_EDOC_TYPE_REQ_IS_REQUIRED SYSREQ_EDOC_TYPE_REQ_NUMBER SYSREQ_EDOC_TYPE_REQ_ON_CHANGE SYSREQ_EDOC_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_EDOC_TYPE_REQ_ON_SELECT SYSREQ_EDOC_TYPE_REQ_ON_SELECT_KIND SYSREQ_EDOC_TYPE_REQ_SECTION SYSREQ_EDOC_TYPE_VIEW_CARD SYSREQ_EDOC_TYPE_VIEW_CODE SYSREQ_EDOC_TYPE_VIEW_COMMENT SYSREQ_EDOC_TYPE_VIEW_IS_MAIN SYSREQ_EDOC_TYPE_VIEW_NAME SYSREQ_EDOC_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_EDOC_VERSION_AUTHOR SYSREQ_EDOC_VERSION_CRC SYSREQ_EDOC_VERSION_DATA SYSREQ_EDOC_VERSION_EDITOR SYSREQ_EDOC_VERSION_EXPORT_DATE SYSREQ_EDOC_VERSION_EXPORTER SYSREQ_EDOC_VERSION_HIDDEN SYSREQ_EDOC_VERSION_LIFE_STAGE SYSREQ_EDOC_VERSION_MODIFIED SYSREQ_EDOC_VERSION_NOTE SYSREQ_EDOC_VERSION_SIGNATURE_TYPE SYSREQ_EDOC_VERSION_SIGNED SYSREQ_EDOC_VERSION_SIZE SYSREQ_EDOC_VERSION_SOURCE SYSREQ_EDOC_VERSION_TEXT_MODIFIED SYSREQ_EDOCKIND_DEFAULT_VERSION_STATE_CODE SYSREQ_FOLDER_KIND SYSREQ_FUNC_CATEGORY SYSREQ_FUNC_COMMENT SYSREQ_FUNC_GROUP SYSREQ_FUNC_GROUP_COMMENT SYSREQ_FUNC_GROUP_NUMBER SYSREQ_FUNC_HELP SYSREQ_FUNC_PARAM_DEF_VALUE SYSREQ_FUNC_PARAM_IDENT SYSREQ_FUNC_PARAM_NUMBER SYSREQ_FUNC_PARAM_TYPE SYSREQ_FUNC_TEXT SYSREQ_GROUP_CATEGORY SYSREQ_ID SYSREQ_LAST_UPDATE SYSREQ_LEADER_REFERENCE SYSREQ_LINE_NUMBER SYSREQ_MAIN_RECORD_ID SYSREQ_NAME SYSREQ_NAME_LOCALIZE_ID SYSREQ_NOTE SYSREQ_ORIGINAL_RECORD SYSREQ_OUR_FIRM SYSREQ_PROFILING_SETTINGS_BATCH_LOGING SYSREQ_PROFILING_SETTINGS_BATCH_SIZE SYSREQ_PROFILING_SETTINGS_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_SQL_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_START_LOGGED SYSREQ_RECORD_STATUS SYSREQ_REF_REQ_FIELD_NAME SYSREQ_REF_REQ_FORMAT SYSREQ_REF_REQ_GENERATED SYSREQ_REF_REQ_LENGTH SYSREQ_REF_REQ_PRECISION SYSREQ_REF_REQ_REFERENCE SYSREQ_REF_REQ_SECTION SYSREQ_REF_REQ_STORED SYSREQ_REF_REQ_TOKENS SYSREQ_REF_REQ_TYPE SYSREQ_REF_REQ_VIEW SYSREQ_REF_TYPE_ACT_CODE SYSREQ_REF_TYPE_ACT_DESCRIPTION SYSREQ_REF_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_ACT_ON_EXECUTE SYSREQ_REF_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_REF_TYPE_ACT_SECTION SYSREQ_REF_TYPE_ADD_PARAMS SYSREQ_REF_TYPE_COMMENT SYSREQ_REF_TYPE_COMMON_SETTINGS SYSREQ_REF_TYPE_DISPLAY_REQUISITE_NAME SYSREQ_REF_TYPE_EVENT_TEXT SYSREQ_REF_TYPE_MAIN_LEADING_REF SYSREQ_REF_TYPE_NAME_IN_SINGULAR SYSREQ_REF_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_REF_TYPE_NAME_LOCALIZE_ID SYSREQ_REF_TYPE_NUMERATION_METHOD SYSREQ_REF_TYPE_REQ_CODE SYSREQ_REF_TYPE_REQ_DESCRIPTION SYSREQ_REF_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_REQ_IS_CONTROL SYSREQ_REF_TYPE_REQ_IS_FILTER SYSREQ_REF_TYPE_REQ_IS_LEADING SYSREQ_REF_TYPE_REQ_IS_REQUIRED SYSREQ_REF_TYPE_REQ_NUMBER SYSREQ_REF_TYPE_REQ_ON_CHANGE SYSREQ_REF_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_REF_TYPE_REQ_ON_SELECT SYSREQ_REF_TYPE_REQ_ON_SELECT_KIND SYSREQ_REF_TYPE_REQ_SECTION SYSREQ_REF_TYPE_VIEW_CARD SYSREQ_REF_TYPE_VIEW_CODE SYSREQ_REF_TYPE_VIEW_COMMENT SYSREQ_REF_TYPE_VIEW_IS_MAIN SYSREQ_REF_TYPE_VIEW_NAME SYSREQ_REF_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_REFERENCE_TYPE_ID SYSREQ_STATE SYSREQ_STATЕ SYSREQ_SYSTEM_SETTINGS_VALUE SYSREQ_TYPE SYSREQ_UNIT SYSREQ_UNIT_ID SYSREQ_USER_GROUPS_GROUP_FULL_NAME SYSREQ_USER_GROUPS_GROUP_NAME SYSREQ_USER_GROUPS_GROUP_SERVER_NAME SYSREQ_USERS_ACCESS_RIGHTS SYSREQ_USERS_AUTHENTICATION SYSREQ_USERS_CATEGORY SYSREQ_USERS_COMPONENT SYSREQ_USERS_COMPONENT_USER_IS_PUBLIC SYSREQ_USERS_DOMAIN SYSREQ_USERS_FULL_USER_NAME SYSREQ_USERS_GROUP SYSREQ_USERS_IS_MAIN_SERVER SYSREQ_USERS_LOGIN SYSREQ_USERS_REFERENCE_USER_IS_PUBLIC SYSREQ_USERS_STATUS SYSREQ_USERS_USER_CERTIFICATE SYSREQ_USERS_USER_CERTIFICATE_INFO SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_NAME SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_VERSION SYSREQ_USERS_USER_CERTIFICATE_STATE SYSREQ_USERS_USER_CERTIFICATE_SUBJECT_NAME SYSREQ_USERS_USER_CERTIFICATE_THUMBPRINT SYSREQ_USERS_USER_DEFAULT_CERTIFICATE SYSREQ_USERS_USER_DESCRIPTION SYSREQ_USERS_USER_GLOBAL_NAME SYSREQ_USERS_USER_LOGIN SYSREQ_USERS_USER_MAIN_SERVER SYSREQ_USERS_USER_TYPE SYSREQ_WORK_RULES_FOLDER_ID RESULT_VAR_NAME RESULT_VAR_NAME_ENG AUTO_NUMERATION_RULE_ID CANT_CHANGE_ID_REQUISITE_RULE_ID CANT_CHANGE_OURFIRM_REQUISITE_RULE_ID CHECK_CHANGING_REFERENCE_RECORD_USE_RULE_ID CHECK_CODE_REQUISITE_RULE_ID CHECK_DELETING_REFERENCE_RECORD_USE_RULE_ID CHECK_FILTRATER_CHANGES_RULE_ID CHECK_RECORD_INTERVAL_RULE_ID CHECK_REFERENCE_INTERVAL_RULE_ID CHECK_REQUIRED_DATA_FULLNESS_RULE_ID CHECK_REQUIRED_REQUISITES_FULLNESS_RULE_ID MAKE_RECORD_UNRATIFIED_RULE_ID RESTORE_AUTO_NUMERATION_RULE_ID SET_FIRM_CONTEXT_FROM_RECORD_RULE_ID SET_FIRST_RECORD_IN_LIST_FORM_RULE_ID SET_IDSPS_VALUE_RULE_ID SET_NEXT_CODE_VALUE_RULE_ID SET_OURFIRM_BOUNDS_RULE_ID SET_OURFIRM_REQUISITE_RULE_ID SCRIPT_BLOCK_AFTER_FINISH_EVENT SCRIPT_BLOCK_BEFORE_START_EVENT SCRIPT_BLOCK_EXECUTION_RESULTS_PROPERTY SCRIPT_BLOCK_NAME_PROPERTY SCRIPT_BLOCK_SCRIPT_PROPERTY SUBTASK_BLOCK_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_AFTER_FINISH_EVENT SUBTASK_BLOCK_ASSIGN_PARAMS_EVENT SUBTASK_BLOCK_ATTACHMENTS_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY SUBTASK_BLOCK_BEFORE_START_EVENT SUBTASK_BLOCK_CREATED_TASK_PROPERTY SUBTASK_BLOCK_CREATION_EVENT SUBTASK_BLOCK_DEADLINE_PROPERTY SUBTASK_BLOCK_IMPORTANCE_PROPERTY SUBTASK_BLOCK_INITIATOR_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY SUBTASK_BLOCK_JOBS_TYPE_PROPERTY SUBTASK_BLOCK_NAME_PROPERTY SUBTASK_BLOCK_PARALLEL_ROUTE_PROPERTY SUBTASK_BLOCK_PERFORMERS_PROPERTY SUBTASK_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_REQUIRE_SIGN_PROPERTY SUBTASK_BLOCK_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_START_EVENT SUBTASK_BLOCK_STEP_CONTROL_PROPERTY SUBTASK_BLOCK_SUBJECT_PROPERTY SUBTASK_BLOCK_TASK_CONTROL_PROPERTY SUBTASK_BLOCK_TEXT_PROPERTY SUBTASK_BLOCK_UNLOCK_ATTACHMENTS_ON_STOP_PROPERTY SUBTASK_BLOCK_USE_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_WAIT_FOR_TASK_COMPLETE_PROPERTY SYSCOMP_CONTROL_JOBS SYSCOMP_FOLDERS SYSCOMP_JOBS SYSCOMP_NOTICES SYSCOMP_TASKS SYSDLG_CREATE_EDOCUMENT SYSDLG_CREATE_EDOCUMENT_VERSION SYSDLG_CURRENT_PERIOD SYSDLG_EDIT_FUNCTION_HELP SYSDLG_EDOCUMENT_KINDS_FOR_TEMPLATE SYSDLG_EXPORT_MULTIPLE_EDOCUMENTS SYSDLG_EXPORT_SINGLE_EDOCUMENT SYSDLG_IMPORT_EDOCUMENT SYSDLG_MULTIPLE_SELECT SYSDLG_SETUP_ACCESS_RIGHTS SYSDLG_SETUP_DEFAULT_RIGHTS SYSDLG_SETUP_FILTER_CONDITION SYSDLG_SETUP_SIGN_RIGHTS SYSDLG_SETUP_TASK_OBSERVERS SYSDLG_SETUP_TASK_ROUTE SYSDLG_SETUP_USERS_LIST SYSDLG_SIGN_EDOCUMENT SYSDLG_SIGN_MULTIPLE_EDOCUMENTS SYSREF_ACCESS_RIGHTS_TYPES SYSREF_ADMINISTRATION_HISTORY SYSREF_ALL_AVAILABLE_COMPONENTS SYSREF_ALL_AVAILABLE_PRIVILEGES SYSREF_ALL_REPLICATING_COMPONENTS SYSREF_AVAILABLE_DEVELOPERS_COMPONENTS SYSREF_CALENDAR_EVENTS SYSREF_COMPONENT_TOKEN_HISTORY SYSREF_COMPONENT_TOKENS SYSREF_COMPONENTS SYSREF_CONSTANTS SYSREF_DATA_RECEIVE_PROTOCOL SYSREF_DATA_SEND_PROTOCOL SYSREF_DIALOGS SYSREF_DIALOGS_REQUISITES SYSREF_EDITORS SYSREF_EDOC_CARDS SYSREF_EDOC_TYPES SYSREF_EDOCUMENT_CARD_REQUISITES SYSREF_EDOCUMENT_CARD_TYPES SYSREF_EDOCUMENT_CARD_TYPES_REFERENCE SYSREF_EDOCUMENT_CARDS SYSREF_EDOCUMENT_HISTORY SYSREF_EDOCUMENT_KINDS SYSREF_EDOCUMENT_REQUISITES SYSREF_EDOCUMENT_SIGNATURES SYSREF_EDOCUMENT_TEMPLATES SYSREF_EDOCUMENT_TEXT_STORAGES SYSREF_EDOCUMENT_VIEWS SYSREF_FILTERER_SETUP_CONFLICTS SYSREF_FILTRATER_SETTING_CONFLICTS SYSREF_FOLDER_HISTORY SYSREF_FOLDERS SYSREF_FUNCTION_GROUPS SYSREF_FUNCTION_PARAMS SYSREF_FUNCTIONS SYSREF_JOB_HISTORY SYSREF_LINKS SYSREF_LOCALIZATION_DICTIONARY SYSREF_LOCALIZATION_LANGUAGES SYSREF_MODULES SYSREF_PRIVILEGES SYSREF_RECORD_HISTORY SYSREF_REFERENCE_REQUISITES SYSREF_REFERENCE_TYPE_VIEWS SYSREF_REFERENCE_TYPES SYSREF_REFERENCES SYSREF_REFERENCES_REQUISITES SYSREF_REMOTE_SERVERS SYSREF_REPLICATION_SESSIONS_LOG SYSREF_REPLICATION_SESSIONS_PROTOCOL SYSREF_REPORTS SYSREF_ROLES SYSREF_ROUTE_BLOCK_GROUPS SYSREF_ROUTE_BLOCKS SYSREF_SCRIPTS SYSREF_SEARCHES SYSREF_SERVER_EVENTS SYSREF_SERVER_EVENTS_HISTORY SYSREF_STANDARD_ROUTE_GROUPS SYSREF_STANDARD_ROUTES SYSREF_STATUSES SYSREF_SYSTEM_SETTINGS SYSREF_TASK_HISTORY SYSREF_TASK_KIND_GROUPS SYSREF_TASK_KINDS SYSREF_TASK_RIGHTS SYSREF_TASK_SIGNATURES SYSREF_TASKS SYSREF_UNITS SYSREF_USER_GROUPS SYSREF_USER_GROUPS_REFERENCE SYSREF_USER_SUBSTITUTION SYSREF_USERS SYSREF_USERS_REFERENCE SYSREF_VIEWERS SYSREF_WORKING_TIME_CALENDARS ACCESS_RIGHTS_TABLE_NAME EDMS_ACCESS_TABLE_NAME EDOC_TYPES_TABLE_NAME TEST_DEV_DB_NAME TEST_DEV_SYSTEM_CODE TEST_EDMS_DB_NAME TEST_EDMS_MAIN_CODE TEST_EDMS_MAIN_DB_NAME TEST_EDMS_SECOND_CODE TEST_EDMS_SECOND_DB_NAME TEST_EDMS_SYSTEM_CODE TEST_ISB5_MAIN_CODE TEST_ISB5_SECOND_CODE TEST_SQL_SERVER_2005_NAME TEST_SQL_SERVER_NAME ATTENTION_CAPTION cbsCommandLinks cbsDefault CONFIRMATION_CAPTION ERROR_CAPTION INFORMATION_CAPTION mrCancel mrOk EDOC_VERSION_ACTIVE_STAGE_CODE EDOC_VERSION_DESIGN_STAGE_CODE EDOC_VERSION_OBSOLETE_STAGE_CODE cpDataEnciphermentEnabled cpDigitalSignatureEnabled cpID cpIssuer cpPluginVersion cpSerial cpSubjectName cpSubjSimpleName cpValidFromDate cpValidToDate ISBL_SYNTAX NO_SYNTAX XML_SYNTAX WAIT_BLOCK_AFTER_FINISH_EVENT WAIT_BLOCK_BEFORE_START_EVENT WAIT_BLOCK_DEADLINE_PROPERTY WAIT_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY WAIT_BLOCK_NAME_PROPERTY WAIT_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SYSRES_COMMON SYSRES_CONST SYSRES_MBFUNC SYSRES_SBDATA SYSRES_SBGUI SYSRES_SBINTF SYSRES_SBREFDSC SYSRES_SQLERRORS SYSRES_SYSCOMP atUser atGroup atRole aemEnabledAlways aemDisabledAlways aemEnabledOnBrowse aemEnabledOnEdit aemDisabledOnBrowseEmpty apBegin apEnd alLeft alRight asmNever asmNoButCustomize asmAsLastTime asmYesButCustomize asmAlways cirCommon cirRevoked ctSignature ctEncode ctSignatureEncode clbUnchecked clbChecked clbGrayed ceISB ceAlways ceNever ctDocument ctReference ctScript ctUnknown ctReport ctDialog ctFunction ctFolder ctEDocument ctTask ctJob ctNotice ctControlJob cfInternal cfDisplay ciUnspecified ciWrite ciRead ckFolder ckEDocument ckTask ckJob ckComponentToken ckAny ckReference ckScript ckReport ckDialog ctISBLEditor ctBevel ctButton ctCheckListBox ctComboBox ctComboEdit ctGrid ctDBCheckBox ctDBComboBox ctDBEdit ctDBEllipsis ctDBMemo ctDBNavigator ctDBRadioGroup ctDBStatusLabel ctEdit ctGroupBox ctInplaceHint ctMemo ctPanel ctListBox ctRadioButton ctRichEdit ctTabSheet ctWebBrowser ctImage ctHyperLink ctLabel ctDBMultiEllipsis ctRibbon ctRichView ctInnerPanel ctPanelGroup ctBitButton cctDate cctInteger cctNumeric cctPick cctReference cctString cctText cltInternal cltPrimary cltGUI dseBeforeOpen dseAfterOpen dseBeforeClose dseAfterClose dseOnValidDelete dseBeforeDelete dseAfterDelete dseAfterDeleteOutOfTransaction dseOnDeleteError dseBeforeInsert dseAfterInsert dseOnValidUpdate dseBeforeUpdate dseOnUpdateRatifiedRecord dseAfterUpdate dseAfterUpdateOutOfTransaction dseOnUpdateError dseAfterScroll dseOnOpenRecord dseOnCloseRecord dseBeforeCancel dseAfterCancel dseOnUpdateDeadlockError dseBeforeDetailUpdate dseOnPrepareUpdate dseOnAnyRequisiteChange dssEdit dssInsert dssBrowse dssInActive dftDate dftShortDate dftDateTime dftTimeStamp dotDays dotHours dotMinutes dotSeconds dtkndLocal dtkndUTC arNone arView arEdit arFull ddaView ddaEdit emLock emEdit emSign emExportWithLock emImportWithUnlock emChangeVersionNote emOpenForModify emChangeLifeStage emDelete emCreateVersion emImport emUnlockExportedWithLock emStart emAbort emReInit emMarkAsReaded emMarkAsUnreaded emPerform emAccept emResume emChangeRights emEditRoute emEditObserver emRecoveryFromLocalCopy emChangeWorkAccessType emChangeEncodeTypeToCertificate emChangeEncodeTypeToPassword emChangeEncodeTypeToNone emChangeEncodeTypeToCertificatePassword emChangeStandardRoute emGetText emOpenForView emMoveToStorage emCreateObject emChangeVersionHidden emDeleteVersion emChangeLifeCycleStage emApprovingSign emExport emContinue emLockFromEdit emUnLockForEdit emLockForServer emUnlockFromServer emDelegateAccessRights emReEncode ecotFile ecotProcess eaGet eaCopy eaCreate eaCreateStandardRoute edltAll edltNothing edltQuery essmText essmCard esvtLast esvtLastActive esvtSpecified edsfExecutive edsfArchive edstSQLServer edstFile edvstNone edvstEDocumentVersionCopy edvstFile edvstTemplate edvstScannedFile vsDefault vsDesign vsActive vsObsolete etNone etCertificate etPassword etCertificatePassword ecException ecWarning ecInformation estAll estApprovingOnly evtLast evtLastActive evtQuery fdtString fdtNumeric fdtInteger fdtDate fdtText fdtUnknown fdtWideString fdtLargeInteger ftInbox ftOutbox ftFavorites ftCommonFolder ftUserFolder ftComponents ftQuickLaunch ftShortcuts ftSearch grhAuto grhX1 grhX2 grhX3 hltText hltRTF hltHTML iffBMP iffJPEG iffMultiPageTIFF iffSinglePageTIFF iffTIFF iffPNG im8bGrayscale im24bRGB im1bMonochrome itBMP itJPEG itWMF itPNG ikhInformation ikhWarning ikhError ikhNoIcon icUnknown icScript icFunction icIntegratedReport icAnalyticReport icDataSetEventHandler icActionHandler icFormEventHandler icLookUpEventHandler icRequisiteChangeEventHandler icBeforeSearchEventHandler icRoleCalculation icSelectRouteEventHandler icBlockPropertyCalculation icBlockQueryParamsEventHandler icChangeSearchResultEventHandler icBlockEventHandler icSubTaskInitEventHandler icEDocDataSetEventHandler icEDocLookUpEventHandler icEDocActionHandler icEDocFormEventHandler icEDocRequisiteChangeEventHandler icStructuredConversionRule icStructuredConversionEventBefore icStructuredConversionEventAfter icWizardEventHandler icWizardFinishEventHandler icWizardStepEventHandler icWizardStepFinishEventHandler icWizardActionEnableEventHandler icWizardActionExecuteEventHandler icCreateJobsHandler icCreateNoticesHandler icBeforeLookUpEventHandler icAfterLookUpEventHandler icTaskAbortEventHandler icWorkflowBlockActionHandler icDialogDataSetEventHandler icDialogActionHandler icDialogLookUpEventHandler icDialogRequisiteChangeEventHandler icDialogFormEventHandler icDialogValidCloseEventHandler icBlockFormEventHandler icTaskFormEventHandler icReferenceMethod icEDocMethod icDialogMethod icProcessMessageHandler isShow isHide isByUserSettings jkJob jkNotice jkControlJob jtInner jtLeft jtRight jtFull jtCross lbpAbove lbpBelow lbpLeft lbpRight eltPerConnection eltPerUser sfcUndefined sfcBlack sfcGreen sfcRed sfcBlue sfcOrange sfcLilac sfsItalic sfsStrikeout sfsNormal ldctStandardRoute ldctWizard ldctScript ldctFunction ldctRouteBlock ldctIntegratedReport ldctAnalyticReport ldctReferenceType ldctEDocumentType ldctDialog ldctServerEvents mrcrtNone mrcrtUser mrcrtMaximal mrcrtCustom vtEqual vtGreaterOrEqual vtLessOrEqual vtRange rdYesterday rdToday rdTomorrow rdThisWeek rdThisMonth rdThisYear rdNextMonth rdNextWeek rdLastWeek rdLastMonth rdWindow rdFile rdPrinter rdtString rdtNumeric rdtInteger rdtDate rdtReference rdtAccount rdtText rdtPick rdtUnknown rdtLargeInteger rdtDocument reOnChange reOnChangeValues ttGlobal ttLocal ttUser ttSystem ssmBrowse ssmSelect ssmMultiSelect ssmBrowseModal smSelect smLike smCard stNone stAuthenticating stApproving sctString sctStream sstAnsiSort sstNaturalSort svtEqual svtContain soatString soatNumeric soatInteger soatDatetime soatReferenceRecord soatText soatPick soatBoolean soatEDocument soatAccount soatIntegerCollection soatNumericCollection soatStringCollection soatPickCollection soatDatetimeCollection soatBooleanCollection soatReferenceRecordCollection soatEDocumentCollection soatAccountCollection soatContents soatUnknown tarAbortByUser tarAbortByWorkflowException tvtAllWords tvtExactPhrase tvtAnyWord usNone usCompleted usRedSquare usBlueSquare usYellowSquare usGreenSquare usOrangeSquare usPurpleSquare usFollowUp utUnknown utUser utDeveloper utAdministrator utSystemDeveloper utDisconnected btAnd btDetailAnd btOr btNotOr btOnly vmView vmSelect vmNavigation vsmSingle vsmMultiple vsmMultipleCheck vsmNoSelection wfatPrevious wfatNext wfatCancel wfatFinish wfepUndefined wfepText3 wfepText6 wfepText9 wfepSpinEdit wfepDropDown wfepRadioGroup wfepFlag wfepText12 wfepText15 wfepText18 wfepText21 wfepText24 wfepText27 wfepText30 wfepRadioGroupColumn1 wfepRadioGroupColumn2 wfepRadioGroupColumn3 wfetQueryParameter wfetText wfetDelimiter wfetLabel wptString wptInteger wptNumeric wptBoolean wptDateTime wptPick wptText wptUser wptUserList wptEDocumentInfo wptEDocumentInfoList wptReferenceRecordInfo wptReferenceRecordInfoList wptFolderInfo wptTaskInfo wptContents wptFileName wptDate wsrComplete wsrGoNext wsrGoPrevious wsrCustom wsrCancel wsrGoFinal wstForm wstEDocument wstTaskCard wstReferenceRecordCard wstFinal waAll waPerformers waManual wsbStart wsbFinish wsbNotice wsbStep wsbDecision wsbWait wsbMonitor wsbScript wsbConnector wsbSubTask wsbLifeCycleStage wsbPause wdtInteger wdtFloat wdtString wdtPick wdtDateTime wdtBoolean wdtTask wdtJob wdtFolder wdtEDocument wdtReferenceRecord wdtUser wdtGroup wdtRole wdtIntegerCollection wdtFloatCollection wdtStringCollection wdtPickCollection wdtDateTimeCollection wdtBooleanCollection wdtTaskCollection wdtJobCollection wdtFolderCollection wdtEDocumentCollection wdtReferenceRecordCollection wdtUserCollection wdtGroupCollection wdtRoleCollection wdtContents wdtUserList wdtSearchDescription wdtDeadLine wdtPickSet wdtAccountCollection wiLow wiNormal wiHigh wrtSoft wrtHard wsInit wsRunning wsDone wsControlled wsAborted wsContinued wtmFull wtmFromCurrent wtmOnlyCurrent ",class:"AltState Application CallType ComponentTokens CreatedJobs CreatedNotices ControlState DialogResult Dialogs EDocuments EDocumentVersionSource Folders GlobalIDs Job Jobs InputValue LookUpReference LookUpRequisiteNames LookUpSearch Object ParentComponent Processes References Requisite ReportName Reports Result Scripts Searches SelectedAttachments SelectedItems SelectMode Sender ServerEvents ServiceFactory ShiftState SubTask SystemDialogs Tasks Wizard Wizards Work ВызовСпособ ИмяОтчета РеквЗнач ",literal:"null true false nil "},s={begin:"\\.\\s*"+e.UNDERSCORE_IDENT_RE,keywords:a,relevance:0},c={className:"type",begin:":[ \\t]*("+"IApplication IAccessRights IAccountRepository IAccountSelectionRestrictions IAction IActionList IAdministrationHistoryDescription IAnchors IApplication IArchiveInfo IAttachment IAttachmentList ICheckListBox ICheckPointedList IColumn IComponent IComponentDescription IComponentToken IComponentTokenFactory IComponentTokenInfo ICompRecordInfo IConnection IContents IControl IControlJob IControlJobInfo IControlList ICrypto ICrypto2 ICustomJob ICustomJobInfo ICustomListBox ICustomObjectWizardStep ICustomWork ICustomWorkInfo IDataSet IDataSetAccessInfo IDataSigner IDateCriterion IDateRequisite IDateRequisiteDescription IDateValue IDeaAccessRights IDeaObjectInfo IDevelopmentComponentLock IDialog IDialogFactory IDialogPickRequisiteItems IDialogsFactory IDICSFactory IDocRequisite IDocumentInfo IDualListDialog IECertificate IECertificateInfo IECertificates IEditControl IEditorForm IEdmsExplorer IEdmsObject IEdmsObjectDescription IEdmsObjectFactory IEdmsObjectInfo IEDocument IEDocumentAccessRights IEDocumentDescription IEDocumentEditor IEDocumentFactory IEDocumentInfo IEDocumentStorage IEDocumentVersion IEDocumentVersionListDialog IEDocumentVersionSource IEDocumentWizardStep IEDocVerSignature IEDocVersionState IEnabledMode IEncodeProvider IEncrypter IEvent IEventList IException IExternalEvents IExternalHandler IFactory IField IFileDialog IFolder IFolderDescription IFolderDialog IFolderFactory IFolderInfo IForEach IForm IFormTitle IFormWizardStep IGlobalIDFactory IGlobalIDInfo IGrid IHasher IHistoryDescription IHyperLinkControl IImageButton IImageControl IInnerPanel IInplaceHint IIntegerCriterion IIntegerList IIntegerRequisite IIntegerValue IISBLEditorForm IJob IJobDescription IJobFactory IJobForm IJobInfo ILabelControl ILargeIntegerCriterion ILargeIntegerRequisite ILargeIntegerValue ILicenseInfo ILifeCycleStage IList IListBox ILocalIDInfo ILocalization ILock IMemoryDataSet IMessagingFactory IMetadataRepository INotice INoticeInfo INumericCriterion INumericRequisite INumericValue IObject IObjectDescription IObjectImporter IObjectInfo IObserver IPanelGroup IPickCriterion IPickProperty IPickRequisite IPickRequisiteDescription IPickRequisiteItem IPickRequisiteItems IPickValue IPrivilege IPrivilegeList IProcess IProcessFactory IProcessMessage IProgress IProperty IPropertyChangeEvent IQuery IReference IReferenceCriterion IReferenceEnabledMode IReferenceFactory IReferenceHistoryDescription IReferenceInfo IReferenceRecordCardWizardStep IReferenceRequisiteDescription IReferencesFactory IReferenceValue IRefRequisite IReport IReportFactory IRequisite IRequisiteDescription IRequisiteDescriptionList IRequisiteFactory IRichEdit IRouteStep IRule IRuleList ISchemeBlock IScript IScriptFactory ISearchCriteria ISearchCriterion ISearchDescription ISearchFactory ISearchFolderInfo ISearchForObjectDescription ISearchResultRestrictions ISecuredContext ISelectDialog IServerEvent IServerEventFactory IServiceDialog IServiceFactory ISignature ISignProvider ISignProvider2 ISignProvider3 ISimpleCriterion IStringCriterion IStringList IStringRequisite IStringRequisiteDescription IStringValue ISystemDialogsFactory ISystemInfo ITabSheet ITask ITaskAbortReasonInfo ITaskCardWizardStep ITaskDescription ITaskFactory ITaskInfo ITaskRoute ITextCriterion ITextRequisite ITextValue ITreeListSelectDialog IUser IUserList IValue IView IWebBrowserControl IWizard IWizardAction IWizardFactory IWizardFormElement IWizardParam IWizardPickParam IWizardReferenceParam IWizardStep IWorkAccessRights IWorkDescription IWorkflowAskableParam IWorkflowAskableParams IWorkflowBlock IWorkflowBlockResult IWorkflowEnabledMode IWorkflowParam IWorkflowPickParam IWorkflowReferenceParam IWorkState IWorkTreeCustomNode IWorkTreeJobNode IWorkTreeTaskNode IXMLEditorForm SBCrypto ".trim().replace(/\s/g,"|")+")",end:"[ \\t]*=",excludeEnd:!0},l={className:"variable",keywords:a,begin:t,relevance:0,contains:[c,s]};return{name:"ISBL",case_insensitive:!0,keywords:a,illegal:"\\$|\\?|%|,|;$|~|#|@|</",contains:[{className:"function",begin:"[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]*\\(",end:"\\)$",returnBegin:!0,keywords:a,illegal:"[\\[\\]\\|\\$\\?%,~#@]",contains:[{className:"title",keywords:{$pattern:t,built_in:"AddSubString AdjustLineBreaks AmountInWords Analysis ArrayDimCount ArrayHighBound ArrayLowBound ArrayOf ArrayReDim Assert Assigned BeginOfMonth BeginOfPeriod BuildProfilingOperationAnalysis CallProcedure CanReadFile CArrayElement CDataSetRequisite ChangeDate ChangeReferenceDataset Char CharPos CheckParam CheckParamValue CompareStrings ConstantExists ControlState ConvertDateStr Copy CopyFile CreateArray CreateCachedReference CreateConnection CreateDialog CreateDualListDialog CreateEditor CreateException CreateFile CreateFolderDialog CreateInputDialog CreateLinkFile CreateList CreateLock CreateMemoryDataSet CreateObject CreateOpenDialog CreateProgress CreateQuery CreateReference CreateReport CreateSaveDialog CreateScript CreateSQLPivotFunction CreateStringList CreateTreeListSelectDialog CSelectSQL CSQL CSubString CurrentUserID CurrentUserName CurrentVersion DataSetLocateEx DateDiff DateTimeDiff DateToStr DayOfWeek DeleteFile DirectoryExists DisableCheckAccessRights DisableCheckFullShowingRestriction DisableMassTaskSendingRestrictions DropTable DupeString EditText EnableCheckAccessRights EnableCheckFullShowingRestriction EnableMassTaskSendingRestrictions EndOfMonth EndOfPeriod ExceptionExists ExceptionsOff ExceptionsOn Execute ExecuteProcess Exit ExpandEnvironmentVariables ExtractFileDrive ExtractFileExt ExtractFileName ExtractFilePath ExtractParams FileExists FileSize FindFile FindSubString FirmContext ForceDirectories Format FormatDate FormatNumeric FormatSQLDate FormatString FreeException GetComponent GetComponentLaunchParam GetConstant GetLastException GetReferenceRecord GetRefTypeByRefID GetTableID GetTempFolder IfThen In IndexOf InputDialog InputDialogEx InteractiveMode IsFileLocked IsGraphicFile IsNumeric Length LoadString LoadStringFmt LocalTimeToUTC LowerCase Max MessageBox MessageBoxEx MimeDecodeBinary MimeDecodeString MimeEncodeBinary MimeEncodeString Min MoneyInWords MoveFile NewID Now OpenFile Ord Precision Raise ReadCertificateFromFile ReadFile ReferenceCodeByID ReferenceNumber ReferenceRequisiteMode ReferenceRequisiteValue RegionDateSettings RegionNumberSettings RegionTimeSettings RegRead RegWrite RenameFile Replace Round SelectServerCode SelectSQL ServerDateTime SetConstant SetManagedFolderFieldsState ShowConstantsInputDialog ShowMessage Sleep Split SQL SQL2XLSTAB SQLProfilingSendReport StrToDate SubString SubStringCount SystemSetting Time TimeDiff Today Transliterate Trim UpperCase UserStatus UTCToLocalTime ValidateXML VarIsClear VarIsEmpty VarIsNull WorkTimeDiff WriteFile WriteFileEx WriteObjectHistory Анализ БазаДанных БлокЕсть БлокЕстьРасш БлокИнфо БлокСнять БлокСнятьРасш БлокУстановить Ввод ВводМеню ВедС ВедСпр ВерхняяГраницаМассива ВнешПрогр Восст ВременнаяПапка Время ВыборSQL ВыбратьЗапись ВыделитьСтр Вызвать Выполнить ВыпПрогр ГрафическийФайл ГруппаДополнительно ДатаВремяСерв ДеньНедели ДиалогДаНет ДлинаСтр ДобПодстр ЕПусто ЕслиТо ЕЧисло ЗамПодстр ЗаписьСправочника ЗначПоляСпр ИДТипСпр ИзвлечьДиск ИзвлечьИмяФайла ИзвлечьПуть ИзвлечьРасширение ИзмДат ИзменитьРазмерМассива ИзмеренийМассива ИмяОрг ИмяПоляСпр Индекс ИндикаторЗакрыть ИндикаторОткрыть ИндикаторШаг ИнтерактивныйРежим ИтогТблСпр КодВидВедСпр КодВидСпрПоИД КодПоAnalit КодСимвола КодСпр КолПодстр КолПроп КонМес Конст КонстЕсть КонстЗнач КонТран КопироватьФайл КопияСтр КПериод КСтрТблСпр Макс МаксСтрТблСпр Массив Меню МенюРасш Мин НаборДанныхНайтиРасш НаимВидСпр НаимПоAnalit НаимСпр НастроитьПереводыСтрок НачМес НачТран НижняяГраницаМассива НомерСпр НПериод Окно Окр Окружение ОтлИнфДобавить ОтлИнфУдалить Отчет ОтчетАнал ОтчетИнт ПапкаСуществует Пауза ПВыборSQL ПереименоватьФайл Переменные ПереместитьФайл Подстр ПоискПодстр ПоискСтр ПолучитьИДТаблицы ПользовательДополнительно ПользовательИД ПользовательИмя ПользовательСтатус Прервать ПроверитьПараметр ПроверитьПараметрЗнач ПроверитьУсловие РазбСтр РазнВремя РазнДат РазнДатаВремя РазнРабВремя РегУстВрем РегУстДат РегУстЧсл РедТекст РеестрЗапись РеестрСписокИменПарам РеестрЧтение РеквСпр РеквСпрПр Сегодня Сейчас Сервер СерверПроцессИД СертификатФайлСчитать СжПроб Символ СистемаДиректумКод СистемаИнформация СистемаКод Содержит СоединениеЗакрыть СоединениеОткрыть СоздатьДиалог СоздатьДиалогВыбораИзДвухСписков СоздатьДиалогВыбораПапки СоздатьДиалогОткрытияФайла СоздатьДиалогСохраненияФайла СоздатьЗапрос СоздатьИндикатор СоздатьИсключение СоздатьКэшированныйСправочник СоздатьМассив СоздатьНаборДанных СоздатьОбъект СоздатьОтчет СоздатьПапку СоздатьРедактор СоздатьСоединение СоздатьСписок СоздатьСписокСтрок СоздатьСправочник СоздатьСценарий СоздСпр СостСпр Сохр СохрСпр СписокСистем Спр Справочник СпрБлокЕсть СпрБлокСнять СпрБлокСнятьРасш СпрБлокУстановить СпрИзмНабДан СпрКод СпрНомер СпрОбновить СпрОткрыть СпрОтменить СпрПарам СпрПолеЗнач СпрПолеИмя СпрРекв СпрРеквВведЗн СпрРеквНовые СпрРеквПр СпрРеквПредЗн СпрРеквРежим СпрРеквТипТекст СпрСоздать СпрСост СпрСохранить СпрТблИтог СпрТблСтр СпрТблСтрКол СпрТблСтрМакс СпрТблСтрМин СпрТблСтрПред СпрТблСтрСлед СпрТблСтрСозд СпрТблСтрУд СпрТекПредст СпрУдалить СравнитьСтр СтрВерхРегистр СтрНижнРегистр СтрТблСпр СумПроп Сценарий СценарийПарам ТекВерсия ТекОрг Точн Тран Транслитерация УдалитьТаблицу УдалитьФайл УдСпр УдСтрТблСпр Уст УстановкиКонстант ФайлАтрибутСчитать ФайлАтрибутУстановить ФайлВремя ФайлВремяУстановить ФайлВыбрать ФайлЗанят ФайлЗаписать ФайлИскать ФайлКопировать ФайлМожноЧитать ФайлОткрыть ФайлПереименовать ФайлПерекодировать ФайлПереместить ФайлПросмотреть ФайлРазмер ФайлСоздать ФайлСсылкаСоздать ФайлСуществует ФайлСчитать ФайлУдалить ФмтSQLДат ФмтДат ФмтСтр ФмтЧсл Формат ЦМассивЭлемент ЦНаборДанныхРеквизит ЦПодстр "},begin:"[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]*\\(",end:"\\(",returnBegin:!0,excludeEnd:!0},s,l,r,n,i]},c,s,l,r,n,i]}}},function(e,t){var n="\\.([0-9](_*[0-9])*)",r="[0-9a-fA-F](_*[0-9a-fA-F])*",o={className:"number",variants:[{begin:`(\\b([0-9](_*[0-9])*)((${n})|\\.)?|(${n}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b`},{begin:`\\b([0-9](_*[0-9])*)((${n})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${n})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{begin:`\\b0[xX]((${r})\\.?|(${r})?\\.(${r}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${r})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};e.exports=function(e){var t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",r={className:"meta",begin:"@"+t,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]};const i=o;return{name:"Java",aliases:["jsp"],keywords:n,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface enum",end:/[{;=]/,excludeEnd:!0,relevance:1,keywords:"class interface enum",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"class",begin:"record\\s+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,excludeEnd:!0,end:/[{;=]/,keywords:n,contains:[{beginKeywords:"record"},{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:n,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function",begin:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:n,relevance:0,contains:[r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i,r]}}},function(e,t){const n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],r=["true","false","null","undefined","NaN","Infinity"],o=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function i(e){return a("(?=",e,")")}function a(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t="[A-Za-z$_][0-9A-Za-z$_]*",s="<>",c="</>",l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];"<"!==r?">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch()):t.ignoreMatch()}},u={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:n,literal:r,built_in:o},d="\\.([0-9](_?[0-9])*)",h={className:"number",variants:[{begin:`(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((${d})|\\.)?|(${d}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{begin:`\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},m={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},g={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:t+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},b=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,g,f,h,e.REGEXP_MODE];p.contains=b.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(b)});const v=[].concat(_,p.contains),y=v.concat([{begin:/\(/,end:/\)/,keywords:u,contains:["self"].concat(v)}]),E={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:y};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:y},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,g,f,_,h,{begin:a(/[{,\n]\s*/,i(a(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,t+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:t+i("\\s*:"),relevance:0}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[_,e.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:y}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:s,end:c},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:u,contains:["self",e.inherit(e.TITLE_MODE,{begin:t}),E],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[E,e.inherit(e.TITLE_MODE,{begin:t})]},{variants:[{begin:"\\."+t},{begin:"\\$"+t}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),"self",E]},{begin:"(get|set)\\s+(?="+t+"\\()",end:/\{/,keywords:"get set",contains:[e.inherit(e.TITLE_MODE,{begin:t}),{begin:/\(\)/},E]},{begin:/\$[(.]/}]}}},function(e,t){e.exports=function(e){const t={className:"params",begin:/\(/,end:/\)/,contains:[{begin:/[\w-]+ *=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[\w-]+/}]}],relevance:0};return{name:"JBoss CLI",aliases:["wildfly-cli"],keywords:{$pattern:"[a-z-]+",keyword:"alias batch cd clear command connect connection-factory connection-info data-source deploy deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias undeploy unset version xa-data-source",literal:"true false"},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"params",begin:/--[\w\-=\/]+/},{className:"function",begin:/:[\w\-.]+/,relevance:0},{className:"string",begin:/\B([\/.])[\w\-.\/=]+/},t]}}},function(e,t){e.exports=function(e){const t={literal:"true false null"},n=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],r=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],o={end:",",endsWithParent:!0,excludeEnd:!0,contains:r,keywords:t},i={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(o,{begin:/:/})].concat(n),illegal:"\\S"},a={begin:"\\[",end:"\\]",contains:[e.inherit(o)],illegal:"\\S"};return r.push(i,a),n.forEach((function(e){r.push(e)})),{name:"JSON",contains:r,keywords:t,illegal:"\\S"}}},function(e,t){e.exports=function(e){var t="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",n={$pattern:t,keyword:["baremodule","begin","break","catch","ccall","const","continue","do","else","elseif","end","export","false","finally","for","function","global","if","import","in","isa","let","local","macro","module","quote","return","true","try","using","where","while"],literal:["ARGS","C_NULL","DEPOT_PATH","ENDIAN_BOM","ENV","Inf","Inf16","Inf32","Inf64","InsertionSort","LOAD_PATH","MergeSort","NaN","NaN16","NaN32","NaN64","PROGRAM_FILE","QuickSort","RoundDown","RoundFromZero","RoundNearest","RoundNearestTiesAway","RoundNearestTiesUp","RoundToZero","RoundUp","VERSION|0","devnull","false","im","missing","nothing","pi","stderr","stdin","stdout","true","undef","π","ℯ"],built_in:["AbstractArray","AbstractChannel","AbstractChar","AbstractDict","AbstractDisplay","AbstractFloat","AbstractIrrational","AbstractMatrix","AbstractRange","AbstractSet","AbstractString","AbstractUnitRange","AbstractVecOrMat","AbstractVector","Any","ArgumentError","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError","LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","ProcessFailedException","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","TaskFailedException","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","UndefKeywordError","UndefRefError","UndefVarError","Union","UnionAll","UnitRange","Unsigned","Val","Vararg","VecElement","VecOrMat","Vector","VersionNumber","WeakKeyDict","WeakRef"]},r={keywords:n,illegal:/<\//},o={className:"subst",begin:/\$\(/,end:/\)/,keywords:n},i={className:"variable",begin:"\\$"+t},a={className:"string",contains:[e.BACKSLASH_ESCAPE,o,i],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},s={className:"string",contains:[e.BACKSLASH_ESCAPE,o,i],begin:"`",end:"`"},c={className:"meta",begin:"@"+t};return r.name="Julia",r.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},a,s,c,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],o.contains=r.contains,r}},function(e,t){e.exports=function(e){return{name:"Julia REPL",contains:[{className:"meta",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"},aliases:["jldoctest"]}]}}},function(e,t){var n="\\.([0-9](_*[0-9])*)",r="[0-9a-fA-F](_*[0-9a-fA-F])*",o={className:"number",variants:[{begin:`(\\b([0-9](_*[0-9])*)((${n})|\\.)?|(${n}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b`},{begin:`\\b([0-9](_*[0-9])*)((${n})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${n})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{begin:`\\b0[xX]((${r})\\.?|(${r})?\\.(${r}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${r})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};e.exports=function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},a={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,r]}]};r.contains.push(a);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"meta-string"})]}]},l=o,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=d;return h.variants[1].contains=[d],d.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,c,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,c,a,e.C_NUMBER_MODE]},u]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},s,c]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}}},function(e,t){e.exports=function(e){const t="\\]|\\?>",n={$pattern:"[a-zA-Z_][\\w.]*|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},r=e.COMMENT("\x3c!--","--\x3e",{relevance:0}),o={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[r]}},i={className:"meta",begin:"\\[/noprocess|<\\?(lasso(script)?|=)"},a={className:"symbol",begin:"'[a-zA-Z_][\\w.]*'"},s=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$][a-zA-Z_][\\w.]*"},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:"[a-zA-Z_][\\w.]*",illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)[a-zA-Z_][\\w.]*",relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[a]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z_][\\w.]*(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:n,contains:[{className:"meta",begin:t,relevance:0,starts:{end:"\\[|<\\?(lasso(script)?|=)",returnEnd:!0,relevance:0,contains:[r]}},o,i,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:n,contains:[{className:"meta",begin:t,relevance:0,starts:{end:"\\[noprocess\\]|<\\?(lasso(script)?|=)",returnEnd:!0,contains:[r]}},o,i].concat(s)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(s)}}},function(e,t){e.exports=function(e){const t=[{begin:/\^{6}[0-9a-f]{6}/},{begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{begin:/\^{2}[\u0000-\u007f]/}],n=[{className:"keyword",begin:/\\/,relevance:0,contains:[{endsParent:!0,begin:function(...e){return"("+e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("|")+")"}(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map(e=>e+"(?![a-zA-Z@:_])"))},{endsParent:!0,begin:new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map(e=>e+"(?![a-zA-Z:_])").join("|"))},{endsParent:!0,variants:t},{endsParent:!0,relevance:0,variants:[{begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}]}]},{className:"params",relevance:0,begin:/#+\d?/},{variants:t},{className:"built_in",relevance:0,begin:/[$&^_]/},{className:"meta",begin:"% !TeX",end:"$",relevance:10},e.COMMENT("%","$",{relevance:0})],r={begin:/\{/,end:/\}/,relevance:0,contains:["self",...n]},o=e.inherit(r,{relevance:0,endsParent:!0,contains:[r,...n]}),i={begin:/\[/,end:/\]/,endsParent:!0,relevance:0,contains:[r,...n]},a={begin:/\s+/,relevance:0},s=[o],c=[i],l=function(e,t){return{contains:[a],starts:{relevance:0,contains:e,starts:t}}},u=function(e,t){return{begin:"\\\\"+e+"(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\"+e},relevance:0,contains:[a],starts:t}},d=function(t,n){return e.inherit({begin:"\\\\begin(?=[ \t]*(\\r?\\n[ \t]*)?\\{"+t+"\\})",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\begin"},relevance:0},l(s,n))},h=(t="string")=>e.END_SAME_AS_BEGIN({className:t,begin:/(.|\r?\n)/,end:/(.|\r?\n)/,excludeBegin:!0,excludeEnd:!0,endsParent:!0}),p=function(e){return{className:"string",end:"(?=\\\\end\\{"+e+"\\})"}},m=(e="string")=>({relevance:0,begin:/\{/,starts:{endsParent:!0,contains:[{className:e,end:/(?=\})/,endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]}});return{name:"LaTeX",aliases:["tex"],contains:[...[...["verb","lstinline"].map(e=>u(e,{contains:[h()]})),u("mint",l(s,{contains:[h()]})),u("mintinline",l(s,{contains:[m(),h()]})),u("url",{contains:[m("link"),m("link")]}),u("hyperref",{contains:[m("link")]}),u("href",l(c,{contains:[m("link")]})),...[].concat(...["","\\*"].map(e=>[d("verbatim"+e,p("verbatim"+e)),d("filecontents"+e,l(s,p("filecontents"+e))),...["","B","L"].map(t=>d(t+"Verbatim"+e,l(c,p(t+"Verbatim"+e))))])),d("minted",l(c,l(s,p("minted"))))],...n]}}},function(e,t){e.exports=function(e){return{name:"LDIF",contains:[{className:"attribute",begin:"^dn",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0},relevance:10},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0}},{className:"literal",begin:"^-",end:"$"},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){return{name:"Leaf",contains:[{className:"function",begin:"#+[A-Za-z_0-9]*\\(",end:/ \{/,returnBegin:!0,excludeEnd:!0,contains:[{className:"keyword",begin:"#+"},{className:"title",begin:"[A-Za-z_][A-Za-z_0-9]*"},{className:"params",begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"string",begin:'"',end:'"'},{className:"variable",begin:"[A-Za-z_][A-Za-z_0-9]*"}]}]}]}}},function(e,t){const n=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],i=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],a=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse(),s=o.concat(i);e.exports=function(e){const t=(e=>({IMPORTANT:{className:"meta",begin:"!important"},HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}))(e),c=s,l=[],u=[],d=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},h=function(e,t,n){return{className:e,begin:t,relevance:n}},p={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:r.join(" ")},m={begin:"\\(",end:"\\)",contains:u,keywords:p,relevance:0};u.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,h("variable","@@?[\\w-]+",10),h("variable","@\\{[\\w-]+\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT);const g=u.concat({begin:/\{/,end:/\}/,contains:l}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(u)},_={begin:"([\\w-]+|@\\{[\\w-]+\\})\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},{className:"attribute",begin:"\\b("+a.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:u}}]},b={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:p,returnEnd:!0,contains:u,relevance:0}},v={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:g}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:"([\\w-]+|@\\{[\\w-]+\\})",end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,h("keyword","all\\b"),h("variable","@\\{[\\w-]+\\}"),{begin:"\\b("+n.join("|")+")\\b",className:"selector-tag"},h("selector-tag","([\\w-]+|@\\{[\\w-]+\\})%?",0),h("selector-id","#([\\w-]+|@\\{[\\w-]+\\})"),h("selector-class","\\.([\\w-]+|@\\{[\\w-]+\\})",0),h("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:"::("+i.join("|")+")"},{begin:"\\(",end:"\\)",contains:g},{begin:"!important"}]},E={begin:`[\\w-]+:(:)?(${c.join("|")})`,returnBegin:!0,contains:[y]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,b,v,E,_,y),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:l}}},function(e,t){e.exports=function(e){var t="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",n="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?",r={className:"literal",begin:"\\b(t{1}|nil)\\b"},o={className:"number",variants:[{begin:n,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+n+" +"+n,end:"\\)"}]},i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),a=e.COMMENT(";","$",{relevance:0}),s={begin:"\\*",end:"\\*"},c={className:"symbol",begin:"[:&]"+t},l={begin:t,relevance:0},u={begin:"\\|[^]*?\\|"},d={contains:[o,i,s,c,{begin:"\\(",end:"\\)",contains:["self",r,i,o,l]},l],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'\\|[^]*?\\|"}]},h={variants:[{begin:"'"+t},{begin:"#'"+t+"(::"+t+")*"}]},p={begin:"\\(\\s*",end:"\\)"},m={endsWithParent:!0,relevance:0};return p.contains=[{className:"name",variants:[{begin:t,relevance:0},{begin:"\\|[^]*?\\|"}]},m],m.contains=[d,h,p,r,o,i,a,s,c,u,l],{name:"Lisp",illegal:/\S/,contains:[o,e.SHEBANG(),r,i,a,d,h,p,l]}}},function(e,t){e.exports=function(e){const t={className:"variable",variants:[{begin:"\\b([gtps][A-Z]{1}[a-zA-Z0-9]*)(\\[.+\\])?(?:\\s*?)"},{begin:"\\$_[A-Z]+"}],relevance:0},n=[e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("--","$"),e.COMMENT("[^:]//","$")],r=e.inherit(e.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z][A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),o=e.inherit(e.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{name:"LiveCode",case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress difference directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge messageAuthenticationCode messageDigest millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetDriver libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load extension loadedExtensions multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract symmetric union unload vectorDotProduct wait write"},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[o,r],relevance:0},{beginKeywords:"command on",end:"$",contains:[t,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r].concat(n),illegal:";$|^\\[|^=|&|\\{"}}},function(e,t){const n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],r=["true","false","null","undefined","NaN","Infinity"],o=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);e.exports=function(e){const t={keyword:n.concat(["then","unless","until","loop","of","by","when","and","or","is","isnt","not","it","that","otherwise","from","to","til","fallthrough","case","enum","native","list","map","__hasProp","__extends","__slice","__bind","__indexOf"]),literal:r.concat(["yes","no","on","off","it","that","void"]),built_in:o.concat(["npm","print"])},i="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",a=e.inherit(e.TITLE_MODE,{begin:i}),s={className:"subst",begin:/#\{/,end:/\}/,keywords:t},c={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:t},l=[e.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s,c]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,c]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[s,e.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/}]},{begin:"@"+i},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];s.contains=l;const u={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(l)}]};return{name:"LiveScript",aliases:["ls"],keywords:t,illegal:/\/\*/,contains:l.concat([e.COMMENT("\\/\\*","\\*\\/"),e.HASH_COMMENT_MODE,{begin:"(#=>|=>|\\|>>|-?->|!->)"},{className:"function",contains:[a,u],returnBegin:!0,variants:[{begin:"("+i+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B->\\*?",end:"->\\*?"},{begin:"("+i+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\)\\s*)?\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+i+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[a]},a]},{begin:i+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t=/([-a-zA-Z$._][\w$.-]*)/,r={className:"variable",variants:[{begin:n(/%/,t)},{begin:/%\d+/},{begin:/#\d+/}]},o={className:"title",variants:[{begin:n(/@/,t)},{begin:/@\d+/},{begin:n(/!/,t)},{begin:n(/!\d+/,t)},{begin:/!\d+/}]};return{name:"LLVM IR",keywords:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly double",contains:[{className:"type",begin:/\bi\d+(?=\s|\b)/},e.COMMENT(/;\s*$/,null,{relevance:0}),e.COMMENT(/;/,/$/),e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:/"/,end:/[^\\]"/}]},o,{className:"punctuation",relevance:0,begin:/,/},{className:"operator",relevance:0,begin:/=/},r,{className:"symbol",variants:[{begin:/^\s*[a-z]+:/}],relevance:0},{className:"number",variants:[{begin:/0[xX][a-fA-F0-9]+/},{begin:/-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/}],relevance:0}]}}},function(e,t){e.exports=function(e){var t={className:"string",begin:'"',end:'"',contains:[{className:"subst",begin:/\\[tn"\\]/}]},n={className:"number",relevance:0,begin:e.C_NUMBER_RE};return{name:"LSL (Linden Scripting Language)",illegal:":",contains:[t,{className:"comment",variants:[e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/")],relevance:0},n,{className:"section",variants:[{begin:"\\b(state|default)\\b"},{begin:"\\b(state_(entry|exit)|touch(_(start|end))?|(land_)?collision(_(start|end))?|timer|listen|(no_)?sensor|control|(not_)?at_(rot_)?target|money|email|experience_permissions(_denied)?|run_time_permissions|changed|attach|dataserver|moving_(start|end)|link_message|(on|object)_rez|remote_data|http_re(sponse|quest)|path_update|transaction_result)\\b"}]},{className:"built_in",begin:"\\b(ll(AgentInExperience|(Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(Details|ErrorMessage)|ReturnObjectsBy(ID|Owner)|Json(2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(Mag|Norm|Dist)|Rot(Between|2(Euler|Fwd|Left|Up))|(Euler|Axes)2Rot|Whisper|(Region|Owner)?Say|Shout|Listen(Control|Remove)?|Sensor(Repeat|Remove)?|Detected(Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|([GS]et)(AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(Scale|Offset|Rotate)Texture|(Rot)?Target(Remove)?|(Stop)?MoveToTarget|Apply(Rotational)?Impulse|Set(KeyframedMotion|ContentType|RegionPos|(Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(Queueing|Radius)|Vehicle(Type|(Float|Vector|Rotation)Param)|(Touch|Sit)?Text|Camera(Eye|At)Offset|PrimitiveParams|ClickAction|Link(Alpha|Color|PrimitiveParams(Fast)?|Texture(Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get((Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(PrimitiveParams|Number(OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(Details|PermMask|PrimCount)|Parcel(MaxPrims|Details|Prim(Count|Owners))|Attached(List)?|(SPMax|Free|Used)Memory|Region(Name|TimeDilation|FPS|Corner|AgentCount)|Root(Position|Rotation)|UnixTime|(Parcel|Region)Flags|(Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(Prims|NotecardLines|Sides)|Animation(List)?|(Camera|Local)(Pos|Rot)|Vel|Accel|Omega|Time(stamp|OfDay)|(Object|CenterOf)?Mass|MassMKS|Energy|Owner|(Owner)?Key|SunDirection|Texture(Offset|Scale|Rot)|Inventory(Number|Name|Key|Type|Creator|PermMask)|Permissions(Key)?|StartParameter|List(Length|EntryType)|Date|Agent(Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(Name|State))|(Get|Reset|GetAndReset)Time|PlaySound(Slave)?|LoopSound(Master|Slave)?|(Trigger|Stop|Preload)Sound|((Get|Delete)Sub|Insert)String|To(Upper|Lower)|Give(InventoryList|Money)|RezObject|(Stop)?LookAt|Sleep|CollisionFilter|(Take|Release)Controls|DetachFromAvatar|AttachToAvatar(Temp)?|InstantMessage|(GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(Length|Trim)|(Start|Stop)Animation|TargetOmega|Request(Experience)?Permissions|(Create|Break)Link|BreakAllLinks|(Give|Remove)Inventory|Water|PassTouches|Request(Agent|Inventory)Data|TeleportAgent(Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(Axis|Angle)|A(cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(CSV|Integer|Json|Float|String|Key|Vector|Rot|List(Strided)?)|DeleteSubList|List(Statistics|Sort|Randomize|(Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(Slope|Normal|Contour)|GroundRepel|(Set|Remove)VehicleFlags|SitOnLink|(AvatarOn)?(Link)?SitTarget|Script(Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(Integer|String)ToBase64|XorBase64|Log(10)?|Base64To(String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(Load|Release|(E|Une)scape)URL|ParcelMedia(CommandList|Query)|ModPow|MapDestination|(RemoveFrom|AddTo|Reset)Land(Pass|Ban)List|(Set|Clear)CameraParams|HTTP(Request|Response)|TextBox|DetectedTouch(UV|Face|Pos|(N|Bin)ormal|ST)|(MD5|SHA1|DumpList2)String|Request(Secure)?URL|Clear(Prim|Link)Media|(Link)?ParticleSystem|(Get|Request)(Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"},{className:"literal",variants:[{begin:"\\b(PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b"},{begin:"\\b(XP_ERROR_(EXPERIENCES_DISABLED|EXPERIENCE_(DISABLED|SUSPENDED)|INVALID_(EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(FOUND|PERMITTED(_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(_OBJECT)?|(DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(_(BY_(LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(PARCEL(_OWNER)?|REGION)))?|CAMERA_(PITCH|DISTANCE|BEHINDNESS_(ANGLE|LAG)|(FOCUS|POSITION)(_(THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(ROOT|SET|ALL_(OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(IVE|_(ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(FWD|BACK|(ROT_)?(LEFT|RIGHT)|UP|DOWN|(ML_)?LBUTTON)|PERMISSION_(RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(_START)?|TELEPORT|MEDIA)|OBJECT_(CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_(ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(COUNT|EQUIVALENCE)|RETURN_(PARCEL(_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(_TAG)?|CREATOR|ATTACHED_(POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(BODY_SHAPE|PATHFINDING)_TYPE|(RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(MEMORY|TIME))|TYPE_(INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(DEBUG|PUBLIC)_CHANNEL|ATTACH_(AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](SHOULDER|HAND|FOOT|EAR|EYE|[UL](ARM|LEG)|HIP)|(LEFT|RIGHT)_PEC|HUD_(CENTER_[12]|TOP_(RIGHT|CENTER|LEFT)|BOTTOM(_(RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(BASE|TIP)|[LR]WING|FACE_(JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(ONLINE|NAME|BORN|SIM_(POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(ON_FILE|USED)|REMOTE_DATA_(CHANNEL|REQUEST|REPLY)|PSYS_(PART_(BF_(ZERO|ONE(_MINUS_(DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(START|END)_(COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(RIBBON|WIND|INTERP_(COLOR|SCALE)|BOUNCE|FOLLOW_(SRC|VELOCITY)|TARGET_(POS|LINEAR)|EMISSIVE)_MASK)|SRC_(MAX_AGE|PATTERN|ANGLE_(BEGIN|END)|BURST_(RATE|PART_COUNT|RADIUS|SPEED_(MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(DROP|EXPLODE|ANGLE(_CONE(_EMPTY)?)?)))|VEHICLE_(REFERENCE_FRAME|TYPE_(NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(LINEAR|ANGULAR)_(FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(LINEAR|ANGULAR)_(DEFLECTION_(EFFICIENCY|TIMESCALE)|MOTOR_(DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(EFFICIENCY|TIMESCALE)|BANKING_(EFFICIENCY|MIX|TIMESCALE)|FLAG_(NO_DEFLECTION_UP|LIMIT_(ROLL_ONLY|MOTOR_UP)|HOVER_((WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(ALLOW_UNSIT|ALPHA_MODE(_(BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(_(BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(_(STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(NONE|LOW|MEDIUM|HIGH)|BUMP_(NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(TYPE_(SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(MIRROR|INVERT))|PHYSICS(_(SHAPE_(CONVEX|NONE|PRIM|TYPE)))?|(POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(ALT_IMAGE_ENABLE|CONTROLS|(CURRENT|HOME)_URL|AUTO_(LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(WIDTH|HEIGHT)_PIXELS|WHITELIST(_ENABLE)?|PERMS_(INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(STANDARD|MINI)|PERM_(NONE|OWNER|GROUP|ANYONE)|MAX_(URL_LENGTH|WHITELIST_(SIZE|COUNT)|(WIDTH|HEIGHT)_PIXELS)))|MASK_(BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(MEDIA_COMMAND_(STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(ALLOW_(FLY|(GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(GROUP_)?OBJECTS)|USE_(ACCESS_(GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(GROUP|ALL)_OBJECT_ENTRY)|COUNT_(TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(HIDE|DEFAULT)|REGION_FLAG_(ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(METHOD|MIMETYPE|BODY_(MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(INVALID_(AGENT|LINK_OBJECT)|NO(T_EXPERIENCE|_(ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(TRIM(_(HEAD|TAIL))?)|CLICK_ACTION_(NONE|TOUCH|SIT|BUY|PAY|OPEN(_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(NONE|SCRIPT_MEMORY)|RC_(DATA_FLAGS|DETECT_PHANTOM|GET_(LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(TYPES|AGENTS|(NON)?PHYSICAL|LAND))|RCERR_(CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(ALLOWED_(AGENT|GROUP)_(ADD|REMOVE)|BANNED_AGENT_(ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(COMMAND|CMD_(PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(CMD_((SMOOTH_)?STOP|JUMP)|DESIRED_(TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(_([ABCD]|NONE))?|MAX_(DECEL|TURN_RADIUS|(ACCEL|SPEED)))|PURSUIT_(OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(EVADE_(HIDDEN|SPOTTED)|FAILURE_(DYNAMIC_PATHFINDING_DISABLED|INVALID_(GOAL|START)|NO_(NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(PARCEL_)?UNREACHABLE)|(GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(_(FAST|NONE|SLOW))?|CONTENT_TYPE_(ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(RADIUS|STATIC)|(PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b"},{begin:"\\b(FALSE|TRUE)\\b"},{begin:"\\b(ZERO_ROTATION)\\b"},{begin:"\\b(EOF|JSON_(ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(GRANTED|DENIED))\\b"},{begin:"\\b(ZERO_VECTOR|TOUCH_INVALID_(TEXCOORD|VECTOR))\\b"}]},{className:"type",begin:"\\b(integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}}},function(e,t){e.exports=function(e){const t={begin:"\\[=*\\[",end:"\\]=*\\]",contains:["self"]},n=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[","\\]=*\\]",{contains:[t],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:n.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:n}].concat(n)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\[=*\\[",end:"\\]=*\\]",contains:[t],relevance:5}])}}},function(e,t){e.exports=function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t]},o={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},i={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,o,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,"meta-keyword":".PHONY"}},i]}}},function(e,t){const n=["AASTriangle","AbelianGroup","Abort","AbortKernels","AbortProtect","AbortScheduledTask","Above","Abs","AbsArg","AbsArgPlot","Absolute","AbsoluteCorrelation","AbsoluteCorrelationFunction","AbsoluteCurrentValue","AbsoluteDashing","AbsoluteFileName","AbsoluteOptions","AbsolutePointSize","AbsoluteThickness","AbsoluteTime","AbsoluteTiming","AcceptanceThreshold","AccountingForm","Accumulate","Accuracy","AccuracyGoal","ActionDelay","ActionMenu","ActionMenuBox","ActionMenuBoxOptions","Activate","Active","ActiveClassification","ActiveClassificationObject","ActiveItem","ActivePrediction","ActivePredictionObject","ActiveStyle","AcyclicGraphQ","AddOnHelpPath","AddSides","AddTo","AddToSearchIndex","AddUsers","AdjacencyGraph","AdjacencyList","AdjacencyMatrix","AdjacentMeshCells","AdjustmentBox","AdjustmentBoxOptions","AdjustTimeSeriesForecast","AdministrativeDivisionData","AffineHalfSpace","AffineSpace","AffineStateSpaceModel","AffineTransform","After","AggregatedEntityClass","AggregationLayer","AircraftData","AirportData","AirPressureData","AirTemperatureData","AiryAi","AiryAiPrime","AiryAiZero","AiryBi","AiryBiPrime","AiryBiZero","AlgebraicIntegerQ","AlgebraicNumber","AlgebraicNumberDenominator","AlgebraicNumberNorm","AlgebraicNumberPolynomial","AlgebraicNumberTrace","AlgebraicRules","AlgebraicRulesData","Algebraics","AlgebraicUnitQ","Alignment","AlignmentMarker","AlignmentPoint","All","AllowAdultContent","AllowedCloudExtraParameters","AllowedCloudParameterExtensions","AllowedDimensions","AllowedFrequencyRange","AllowedHeads","AllowGroupClose","AllowIncomplete","AllowInlineCells","AllowKernelInitialization","AllowLooseGrammar","AllowReverseGroupClose","AllowScriptLevelChange","AllowVersionUpdate","AllTrue","Alphabet","AlphabeticOrder","AlphabeticSort","AlphaChannel","AlternateImage","AlternatingFactorial","AlternatingGroup","AlternativeHypothesis","Alternatives","AltitudeMethod","AmbientLight","AmbiguityFunction","AmbiguityList","Analytic","AnatomyData","AnatomyForm","AnatomyPlot3D","AnatomySkinStyle","AnatomyStyling","AnchoredSearch","And","AndersonDarlingTest","AngerJ","AngleBisector","AngleBracket","AnglePath","AnglePath3D","AngleVector","AngularGauge","Animate","AnimationCycleOffset","AnimationCycleRepetitions","AnimationDirection","AnimationDisplayTime","AnimationRate","AnimationRepetitions","AnimationRunning","AnimationRunTime","AnimationTimeIndex","Animator","AnimatorBox","AnimatorBoxOptions","AnimatorElements","Annotate","Annotation","AnnotationDelete","AnnotationKeys","AnnotationRules","AnnotationValue","Annuity","AnnuityDue","Annulus","AnomalyDetection","AnomalyDetector","AnomalyDetectorFunction","Anonymous","Antialiasing","AntihermitianMatrixQ","Antisymmetric","AntisymmetricMatrixQ","Antonyms","AnyOrder","AnySubset","AnyTrue","Apart","ApartSquareFree","APIFunction","Appearance","AppearanceElements","AppearanceRules","AppellF1","Append","AppendCheck","AppendLayer","AppendTo","Apply","ApplySides","ArcCos","ArcCosh","ArcCot","ArcCoth","ArcCsc","ArcCsch","ArcCurvature","ARCHProcess","ArcLength","ArcSec","ArcSech","ArcSin","ArcSinDistribution","ArcSinh","ArcTan","ArcTanh","Area","Arg","ArgMax","ArgMin","ArgumentCountQ","ARIMAProcess","ArithmeticGeometricMean","ARMAProcess","Around","AroundReplace","ARProcess","Array","ArrayComponents","ArrayDepth","ArrayFilter","ArrayFlatten","ArrayMesh","ArrayPad","ArrayPlot","ArrayQ","ArrayResample","ArrayReshape","ArrayRules","Arrays","Arrow","Arrow3DBox","ArrowBox","Arrowheads","ASATriangle","Ask","AskAppend","AskConfirm","AskDisplay","AskedQ","AskedValue","AskFunction","AskState","AskTemplateDisplay","AspectRatio","AspectRatioFixed","Assert","AssociateTo","Association","AssociationFormat","AssociationMap","AssociationQ","AssociationThread","AssumeDeterministic","Assuming","Assumptions","AstronomicalData","Asymptotic","AsymptoticDSolveValue","AsymptoticEqual","AsymptoticEquivalent","AsymptoticGreater","AsymptoticGreaterEqual","AsymptoticIntegrate","AsymptoticLess","AsymptoticLessEqual","AsymptoticOutputTracker","AsymptoticProduct","AsymptoticRSolveValue","AsymptoticSolve","AsymptoticSum","Asynchronous","AsynchronousTaskObject","AsynchronousTasks","Atom","AtomCoordinates","AtomCount","AtomDiagramCoordinates","AtomList","AtomQ","AttentionLayer","Attributes","Audio","AudioAmplify","AudioAnnotate","AudioAnnotationLookup","AudioBlockMap","AudioCapture","AudioChannelAssignment","AudioChannelCombine","AudioChannelMix","AudioChannels","AudioChannelSeparate","AudioData","AudioDelay","AudioDelete","AudioDevice","AudioDistance","AudioEncoding","AudioFade","AudioFrequencyShift","AudioGenerator","AudioIdentify","AudioInputDevice","AudioInsert","AudioInstanceQ","AudioIntervals","AudioJoin","AudioLabel","AudioLength","AudioLocalMeasurements","AudioLooping","AudioLoudness","AudioMeasurements","AudioNormalize","AudioOutputDevice","AudioOverlay","AudioPad","AudioPan","AudioPartition","AudioPause","AudioPitchShift","AudioPlay","AudioPlot","AudioQ","AudioRecord","AudioReplace","AudioResample","AudioReverb","AudioReverse","AudioSampleRate","AudioSpectralMap","AudioSpectralTransformation","AudioSplit","AudioStop","AudioStream","AudioStreams","AudioTimeStretch","AudioTracks","AudioTrim","AudioType","AugmentedPolyhedron","AugmentedSymmetricPolynomial","Authenticate","Authentication","AuthenticationDialog","AutoAction","Autocomplete","AutocompletionFunction","AutoCopy","AutocorrelationTest","AutoDelete","AutoEvaluateEvents","AutoGeneratedPackage","AutoIndent","AutoIndentSpacings","AutoItalicWords","AutoloadPath","AutoMatch","Automatic","AutomaticImageSize","AutoMultiplicationSymbol","AutoNumberFormatting","AutoOpenNotebooks","AutoOpenPalettes","AutoQuoteCharacters","AutoRefreshed","AutoRemove","AutorunSequencing","AutoScaling","AutoScroll","AutoSpacing","AutoStyleOptions","AutoStyleWords","AutoSubmitting","Axes","AxesEdge","AxesLabel","AxesOrigin","AxesStyle","AxiomaticTheory","Axis","BabyMonsterGroupB","Back","Background","BackgroundAppearance","BackgroundTasksSettings","Backslash","Backsubstitution","Backward","Ball","Band","BandpassFilter","BandstopFilter","BarabasiAlbertGraphDistribution","BarChart","BarChart3D","BarcodeImage","BarcodeRecognize","BaringhausHenzeTest","BarLegend","BarlowProschanImportance","BarnesG","BarOrigin","BarSpacing","BartlettHannWindow","BartlettWindow","BaseDecode","BaseEncode","BaseForm","Baseline","BaselinePosition","BaseStyle","BasicRecurrentLayer","BatchNormalizationLayer","BatchSize","BatesDistribution","BattleLemarieWavelet","BayesianMaximization","BayesianMaximizationObject","BayesianMinimization","BayesianMinimizationObject","Because","BeckmannDistribution","Beep","Before","Begin","BeginDialogPacket","BeginFrontEndInteractionPacket","BeginPackage","BellB","BellY","Below","BenfordDistribution","BeniniDistribution","BenktanderGibratDistribution","BenktanderWeibullDistribution","BernoulliB","BernoulliDistribution","BernoulliGraphDistribution","BernoulliProcess","BernsteinBasis","BesselFilterModel","BesselI","BesselJ","BesselJZero","BesselK","BesselY","BesselYZero","Beta","BetaBinomialDistribution","BetaDistribution","BetaNegativeBinomialDistribution","BetaPrimeDistribution","BetaRegularized","Between","BetweennessCentrality","BeveledPolyhedron","BezierCurve","BezierCurve3DBox","BezierCurve3DBoxOptions","BezierCurveBox","BezierCurveBoxOptions","BezierFunction","BilateralFilter","Binarize","BinaryDeserialize","BinaryDistance","BinaryFormat","BinaryImageQ","BinaryRead","BinaryReadList","BinarySerialize","BinaryWrite","BinCounts","BinLists","Binomial","BinomialDistribution","BinomialProcess","BinormalDistribution","BiorthogonalSplineWavelet","BipartiteGraphQ","BiquadraticFilterModel","BirnbaumImportance","BirnbaumSaundersDistribution","BitAnd","BitClear","BitGet","BitLength","BitNot","BitOr","BitSet","BitShiftLeft","BitShiftRight","BitXor","BiweightLocation","BiweightMidvariance","Black","BlackmanHarrisWindow","BlackmanNuttallWindow","BlackmanWindow","Blank","BlankForm","BlankNullSequence","BlankSequence","Blend","Block","BlockchainAddressData","BlockchainBase","BlockchainBlockData","BlockchainContractValue","BlockchainData","BlockchainGet","BlockchainKeyEncode","BlockchainPut","BlockchainTokenData","BlockchainTransaction","BlockchainTransactionData","BlockchainTransactionSign","BlockchainTransactionSubmit","BlockMap","BlockRandom","BlomqvistBeta","BlomqvistBetaTest","Blue","Blur","BodePlot","BohmanWindow","Bold","Bond","BondCount","BondList","BondQ","Bookmarks","Boole","BooleanConsecutiveFunction","BooleanConvert","BooleanCountingFunction","BooleanFunction","BooleanGraph","BooleanMaxterms","BooleanMinimize","BooleanMinterms","BooleanQ","BooleanRegion","Booleans","BooleanStrings","BooleanTable","BooleanVariables","BorderDimensions","BorelTannerDistribution","Bottom","BottomHatTransform","BoundaryDiscretizeGraphics","BoundaryDiscretizeRegion","BoundaryMesh","BoundaryMeshRegion","BoundaryMeshRegionQ","BoundaryStyle","BoundedRegionQ","BoundingRegion","Bounds","Box","BoxBaselineShift","BoxData","BoxDimensions","Boxed","Boxes","BoxForm","BoxFormFormatTypes","BoxFrame","BoxID","BoxMargins","BoxMatrix","BoxObject","BoxRatios","BoxRotation","BoxRotationPoint","BoxStyle","BoxWhiskerChart","Bra","BracketingBar","BraKet","BrayCurtisDistance","BreadthFirstScan","Break","BridgeData","BrightnessEqualize","BroadcastStationData","Brown","BrownForsytheTest","BrownianBridgeProcess","BrowserCategory","BSplineBasis","BSplineCurve","BSplineCurve3DBox","BSplineCurve3DBoxOptions","BSplineCurveBox","BSplineCurveBoxOptions","BSplineFunction","BSplineSurface","BSplineSurface3DBox","BSplineSurface3DBoxOptions","BubbleChart","BubbleChart3D","BubbleScale","BubbleSizes","BuildingData","BulletGauge","BusinessDayQ","ButterflyGraph","ButterworthFilterModel","Button","ButtonBar","ButtonBox","ButtonBoxOptions","ButtonCell","ButtonContents","ButtonData","ButtonEvaluator","ButtonExpandable","ButtonFrame","ButtonFunction","ButtonMargins","ButtonMinHeight","ButtonNote","ButtonNotebook","ButtonSource","ButtonStyle","ButtonStyleMenuListing","Byte","ByteArray","ByteArrayFormat","ByteArrayQ","ByteArrayToString","ByteCount","ByteOrdering","C","CachedValue","CacheGraphics","CachePersistence","CalendarConvert","CalendarData","CalendarType","Callout","CalloutMarker","CalloutStyle","CallPacket","CanberraDistance","Cancel","CancelButton","CandlestickChart","CanonicalGraph","CanonicalizePolygon","CanonicalizePolyhedron","CanonicalName","CanonicalWarpingCorrespondence","CanonicalWarpingDistance","CantorMesh","CantorStaircase","Cap","CapForm","CapitalDifferentialD","Capitalize","CapsuleShape","CaptureRunning","CardinalBSplineBasis","CarlemanLinearize","CarmichaelLambda","CaseOrdering","Cases","CaseSensitive","Cashflow","Casoratian","Catalan","CatalanNumber","Catch","CategoricalDistribution","Catenate","CatenateLayer","CauchyDistribution","CauchyWindow","CayleyGraph","CDF","CDFDeploy","CDFInformation","CDFWavelet","Ceiling","CelestialSystem","Cell","CellAutoOverwrite","CellBaseline","CellBoundingBox","CellBracketOptions","CellChangeTimes","CellContents","CellContext","CellDingbat","CellDynamicExpression","CellEditDuplicate","CellElementsBoundingBox","CellElementSpacings","CellEpilog","CellEvaluationDuplicate","CellEvaluationFunction","CellEvaluationLanguage","CellEventActions","CellFrame","CellFrameColor","CellFrameLabelMargins","CellFrameLabels","CellFrameMargins","CellGroup","CellGroupData","CellGrouping","CellGroupingRules","CellHorizontalScrolling","CellID","CellLabel","CellLabelAutoDelete","CellLabelMargins","CellLabelPositioning","CellLabelStyle","CellLabelTemplate","CellMargins","CellObject","CellOpen","CellPrint","CellProlog","Cells","CellSize","CellStyle","CellTags","CellularAutomaton","CensoredDistribution","Censoring","Center","CenterArray","CenterDot","CentralFeature","CentralMoment","CentralMomentGeneratingFunction","Cepstrogram","CepstrogramArray","CepstrumArray","CForm","ChampernowneNumber","ChangeOptions","ChannelBase","ChannelBrokerAction","ChannelDatabin","ChannelHistoryLength","ChannelListen","ChannelListener","ChannelListeners","ChannelListenerWait","ChannelObject","ChannelPreSendFunction","ChannelReceiverFunction","ChannelSend","ChannelSubscribers","ChanVeseBinarize","Character","CharacterCounts","CharacterEncoding","CharacterEncodingsPath","CharacteristicFunction","CharacteristicPolynomial","CharacterName","CharacterNormalize","CharacterRange","Characters","ChartBaseStyle","ChartElementData","ChartElementDataFunction","ChartElementFunction","ChartElements","ChartLabels","ChartLayout","ChartLegends","ChartStyle","Chebyshev1FilterModel","Chebyshev2FilterModel","ChebyshevDistance","ChebyshevT","ChebyshevU","Check","CheckAbort","CheckAll","Checkbox","CheckboxBar","CheckboxBox","CheckboxBoxOptions","ChemicalData","ChessboardDistance","ChiDistribution","ChineseRemainder","ChiSquareDistribution","ChoiceButtons","ChoiceDialog","CholeskyDecomposition","Chop","ChromaticityPlot","ChromaticityPlot3D","ChromaticPolynomial","Circle","CircleBox","CircleDot","CircleMinus","CirclePlus","CirclePoints","CircleThrough","CircleTimes","CirculantGraph","CircularOrthogonalMatrixDistribution","CircularQuaternionMatrixDistribution","CircularRealMatrixDistribution","CircularSymplecticMatrixDistribution","CircularUnitaryMatrixDistribution","Circumsphere","CityData","ClassifierFunction","ClassifierInformation","ClassifierMeasurements","ClassifierMeasurementsObject","Classify","ClassPriors","Clear","ClearAll","ClearAttributes","ClearCookies","ClearPermissions","ClearSystemCache","ClebschGordan","ClickPane","Clip","ClipboardNotebook","ClipFill","ClippingStyle","ClipPlanes","ClipPlanesStyle","ClipRange","Clock","ClockGauge","ClockwiseContourIntegral","Close","Closed","CloseKernels","ClosenessCentrality","Closing","ClosingAutoSave","ClosingEvent","ClosingSaveDialog","CloudAccountData","CloudBase","CloudConnect","CloudConnections","CloudDeploy","CloudDirectory","CloudDisconnect","CloudEvaluate","CloudExport","CloudExpression","CloudExpressions","CloudFunction","CloudGet","CloudImport","CloudLoggingData","CloudObject","CloudObjectInformation","CloudObjectInformationData","CloudObjectNameFormat","CloudObjects","CloudObjectURLType","CloudPublish","CloudPut","CloudRenderingMethod","CloudSave","CloudShare","CloudSubmit","CloudSymbol","CloudUnshare","CloudUserID","ClusterClassify","ClusterDissimilarityFunction","ClusteringComponents","ClusteringTree","CMYKColor","Coarse","CodeAssistOptions","Coefficient","CoefficientArrays","CoefficientDomain","CoefficientList","CoefficientRules","CoifletWavelet","Collect","Colon","ColonForm","ColorBalance","ColorCombine","ColorConvert","ColorCoverage","ColorData","ColorDataFunction","ColorDetect","ColorDistance","ColorFunction","ColorFunctionScaling","Colorize","ColorNegate","ColorOutput","ColorProfileData","ColorQ","ColorQuantize","ColorReplace","ColorRules","ColorSelectorSettings","ColorSeparate","ColorSetter","ColorSetterBox","ColorSetterBoxOptions","ColorSlider","ColorsNear","ColorSpace","ColorToneMapping","Column","ColumnAlignments","ColumnBackgrounds","ColumnForm","ColumnLines","ColumnsEqual","ColumnSpacings","ColumnWidths","CombinedEntityClass","CombinerFunction","CometData","CommonDefaultFormatTypes","Commonest","CommonestFilter","CommonName","CommonUnits","CommunityBoundaryStyle","CommunityGraphPlot","CommunityLabels","CommunityRegionStyle","CompanyData","CompatibleUnitQ","CompilationOptions","CompilationTarget","Compile","Compiled","CompiledCodeFunction","CompiledFunction","CompilerOptions","Complement","ComplementedEntityClass","CompleteGraph","CompleteGraphQ","CompleteKaryTree","CompletionsListPacket","Complex","ComplexContourPlot","Complexes","ComplexExpand","ComplexInfinity","ComplexityFunction","ComplexListPlot","ComplexPlot","ComplexPlot3D","ComplexRegionPlot","ComplexStreamPlot","ComplexVectorPlot","ComponentMeasurements","ComponentwiseContextMenu","Compose","ComposeList","ComposeSeries","CompositeQ","Composition","CompoundElement","CompoundExpression","CompoundPoissonDistribution","CompoundPoissonProcess","CompoundRenewalProcess","Compress","CompressedData","CompressionLevel","ComputeUncertainty","Condition","ConditionalExpression","Conditioned","Cone","ConeBox","ConfidenceLevel","ConfidenceRange","ConfidenceTransform","ConfigurationPath","ConformAudio","ConformImages","Congruent","ConicHullRegion","ConicHullRegion3DBox","ConicHullRegionBox","ConicOptimization","Conjugate","ConjugateTranspose","Conjunction","Connect","ConnectedComponents","ConnectedGraphComponents","ConnectedGraphQ","ConnectedMeshComponents","ConnectedMoleculeComponents","ConnectedMoleculeQ","ConnectionSettings","ConnectLibraryCallbackFunction","ConnectSystemModelComponents","ConnesWindow","ConoverTest","ConsoleMessage","ConsoleMessagePacket","Constant","ConstantArray","ConstantArrayLayer","ConstantImage","ConstantPlusLayer","ConstantRegionQ","Constants","ConstantTimesLayer","ConstellationData","ConstrainedMax","ConstrainedMin","Construct","Containing","ContainsAll","ContainsAny","ContainsExactly","ContainsNone","ContainsOnly","ContentFieldOptions","ContentLocationFunction","ContentObject","ContentPadding","ContentsBoundingBox","ContentSelectable","ContentSize","Context","ContextMenu","Contexts","ContextToFileName","Continuation","Continue","ContinuedFraction","ContinuedFractionK","ContinuousAction","ContinuousMarkovProcess","ContinuousTask","ContinuousTimeModelQ","ContinuousWaveletData","ContinuousWaveletTransform","ContourDetect","ContourGraphics","ContourIntegral","ContourLabels","ContourLines","ContourPlot","ContourPlot3D","Contours","ContourShading","ContourSmoothing","ContourStyle","ContraharmonicMean","ContrastiveLossLayer","Control","ControlActive","ControlAlignment","ControlGroupContentsBox","ControllabilityGramian","ControllabilityMatrix","ControllableDecomposition","ControllableModelQ","ControllerDuration","ControllerInformation","ControllerInformationData","ControllerLinking","ControllerManipulate","ControllerMethod","ControllerPath","ControllerState","ControlPlacement","ControlsRendering","ControlType","Convergents","ConversionOptions","ConversionRules","ConvertToBitmapPacket","ConvertToPostScript","ConvertToPostScriptPacket","ConvexHullMesh","ConvexPolygonQ","ConvexPolyhedronQ","ConvolutionLayer","Convolve","ConwayGroupCo1","ConwayGroupCo2","ConwayGroupCo3","CookieFunction","Cookies","CoordinateBoundingBox","CoordinateBoundingBoxArray","CoordinateBounds","CoordinateBoundsArray","CoordinateChartData","CoordinatesToolOptions","CoordinateTransform","CoordinateTransformData","CoprimeQ","Coproduct","CopulaDistribution","Copyable","CopyDatabin","CopyDirectory","CopyFile","CopyTag","CopyToClipboard","CornerFilter","CornerNeighbors","Correlation","CorrelationDistance","CorrelationFunction","CorrelationTest","Cos","Cosh","CoshIntegral","CosineDistance","CosineWindow","CosIntegral","Cot","Coth","Count","CountDistinct","CountDistinctBy","CounterAssignments","CounterBox","CounterBoxOptions","CounterClockwiseContourIntegral","CounterEvaluator","CounterFunction","CounterIncrements","CounterStyle","CounterStyleMenuListing","CountRoots","CountryData","Counts","CountsBy","Covariance","CovarianceEstimatorFunction","CovarianceFunction","CoxianDistribution","CoxIngersollRossProcess","CoxModel","CoxModelFit","CramerVonMisesTest","CreateArchive","CreateCellID","CreateChannel","CreateCloudExpression","CreateDatabin","CreateDataStructure","CreateDataSystemModel","CreateDialog","CreateDirectory","CreateDocument","CreateFile","CreateIntermediateDirectories","CreateManagedLibraryExpression","CreateNotebook","CreatePacletArchive","CreatePalette","CreatePalettePacket","CreatePermissionsGroup","CreateScheduledTask","CreateSearchIndex","CreateSystemModel","CreateTemporary","CreateUUID","CreateWindow","CriterionFunction","CriticalityFailureImportance","CriticalitySuccessImportance","CriticalSection","Cross","CrossEntropyLossLayer","CrossingCount","CrossingDetect","CrossingPolygon","CrossMatrix","Csc","Csch","CTCLossLayer","Cube","CubeRoot","Cubics","Cuboid","CuboidBox","Cumulant","CumulantGeneratingFunction","Cup","CupCap","Curl","CurlyDoubleQuote","CurlyQuote","CurrencyConvert","CurrentDate","CurrentImage","CurrentlySpeakingPacket","CurrentNotebookImage","CurrentScreenImage","CurrentValue","Curry","CurryApplied","CurvatureFlowFilter","CurveClosed","Cyan","CycleGraph","CycleIndexPolynomial","Cycles","CyclicGroup","Cyclotomic","Cylinder","CylinderBox","CylindricalDecomposition","D","DagumDistribution","DamData","DamerauLevenshteinDistance","DampingFactor","Darker","Dashed","Dashing","DatabaseConnect","DatabaseDisconnect","DatabaseReference","Databin","DatabinAdd","DatabinRemove","Databins","DatabinUpload","DataCompression","DataDistribution","DataRange","DataReversed","Dataset","DatasetDisplayPanel","DataStructure","DataStructureQ","Date","DateBounds","Dated","DateDelimiters","DateDifference","DatedUnit","DateFormat","DateFunction","DateHistogram","DateInterval","DateList","DateListLogPlot","DateListPlot","DateListStepPlot","DateObject","DateObjectQ","DateOverlapsQ","DatePattern","DatePlus","DateRange","DateReduction","DateString","DateTicksFormat","DateValue","DateWithinQ","DaubechiesWavelet","DavisDistribution","DawsonF","DayCount","DayCountConvention","DayHemisphere","DaylightQ","DayMatchQ","DayName","DayNightTerminator","DayPlus","DayRange","DayRound","DeBruijnGraph","DeBruijnSequence","Debug","DebugTag","Decapitalize","Decimal","DecimalForm","DeclareKnownSymbols","DeclarePackage","Decompose","DeconvolutionLayer","Decrement","Decrypt","DecryptFile","DedekindEta","DeepSpaceProbeData","Default","DefaultAxesStyle","DefaultBaseStyle","DefaultBoxStyle","DefaultButton","DefaultColor","DefaultControlPlacement","DefaultDuplicateCellStyle","DefaultDuration","DefaultElement","DefaultFaceGridsStyle","DefaultFieldHintStyle","DefaultFont","DefaultFontProperties","DefaultFormatType","DefaultFormatTypeForStyle","DefaultFrameStyle","DefaultFrameTicksStyle","DefaultGridLinesStyle","DefaultInlineFormatType","DefaultInputFormatType","DefaultLabelStyle","DefaultMenuStyle","DefaultNaturalLanguage","DefaultNewCellStyle","DefaultNewInlineCellStyle","DefaultNotebook","DefaultOptions","DefaultOutputFormatType","DefaultPrintPrecision","DefaultStyle","DefaultStyleDefinitions","DefaultTextFormatType","DefaultTextInlineFormatType","DefaultTicksStyle","DefaultTooltipStyle","DefaultValue","DefaultValues","Defer","DefineExternal","DefineInputStreamMethod","DefineOutputStreamMethod","DefineResourceFunction","Definition","Degree","DegreeCentrality","DegreeGraphDistribution","DegreeLexicographic","DegreeReverseLexicographic","DEigensystem","DEigenvalues","Deinitialization","Del","DelaunayMesh","Delayed","Deletable","Delete","DeleteAnomalies","DeleteBorderComponents","DeleteCases","DeleteChannel","DeleteCloudExpression","DeleteContents","DeleteDirectory","DeleteDuplicates","DeleteDuplicatesBy","DeleteFile","DeleteMissing","DeleteObject","DeletePermissionsKey","DeleteSearchIndex","DeleteSmallComponents","DeleteStopwords","DeleteWithContents","DeletionWarning","DelimitedArray","DelimitedSequence","Delimiter","DelimiterFlashTime","DelimiterMatching","Delimiters","DeliveryFunction","Dendrogram","Denominator","DensityGraphics","DensityHistogram","DensityPlot","DensityPlot3D","DependentVariables","Deploy","Deployed","Depth","DepthFirstScan","Derivative","DerivativeFilter","DerivedKey","DescriptorStateSpace","DesignMatrix","DestroyAfterEvaluation","Det","DeviceClose","DeviceConfigure","DeviceExecute","DeviceExecuteAsynchronous","DeviceObject","DeviceOpen","DeviceOpenQ","DeviceRead","DeviceReadBuffer","DeviceReadLatest","DeviceReadList","DeviceReadTimeSeries","Devices","DeviceStreams","DeviceWrite","DeviceWriteBuffer","DGaussianWavelet","DiacriticalPositioning","Diagonal","DiagonalizableMatrixQ","DiagonalMatrix","DiagonalMatrixQ","Dialog","DialogIndent","DialogInput","DialogLevel","DialogNotebook","DialogProlog","DialogReturn","DialogSymbols","Diamond","DiamondMatrix","DiceDissimilarity","DictionaryLookup","DictionaryWordQ","DifferenceDelta","DifferenceOrder","DifferenceQuotient","DifferenceRoot","DifferenceRootReduce","Differences","DifferentialD","DifferentialRoot","DifferentialRootReduce","DifferentiatorFilter","DigitalSignature","DigitBlock","DigitBlockMinimum","DigitCharacter","DigitCount","DigitQ","DihedralAngle","DihedralGroup","Dilation","DimensionalCombinations","DimensionalMeshComponents","DimensionReduce","DimensionReducerFunction","DimensionReduction","Dimensions","DiracComb","DiracDelta","DirectedEdge","DirectedEdges","DirectedGraph","DirectedGraphQ","DirectedInfinity","Direction","Directive","Directory","DirectoryName","DirectoryQ","DirectoryStack","DirichletBeta","DirichletCharacter","DirichletCondition","DirichletConvolve","DirichletDistribution","DirichletEta","DirichletL","DirichletLambda","DirichletTransform","DirichletWindow","DisableConsolePrintPacket","DisableFormatting","DiscreteAsymptotic","DiscreteChirpZTransform","DiscreteConvolve","DiscreteDelta","DiscreteHadamardTransform","DiscreteIndicator","DiscreteLimit","DiscreteLQEstimatorGains","DiscreteLQRegulatorGains","DiscreteLyapunovSolve","DiscreteMarkovProcess","DiscreteMaxLimit","DiscreteMinLimit","DiscretePlot","DiscretePlot3D","DiscreteRatio","DiscreteRiccatiSolve","DiscreteShift","DiscreteTimeModelQ","DiscreteUniformDistribution","DiscreteVariables","DiscreteWaveletData","DiscreteWaveletPacketTransform","DiscreteWaveletTransform","DiscretizeGraphics","DiscretizeRegion","Discriminant","DisjointQ","Disjunction","Disk","DiskBox","DiskMatrix","DiskSegment","Dispatch","DispatchQ","DispersionEstimatorFunction","Display","DisplayAllSteps","DisplayEndPacket","DisplayFlushImagePacket","DisplayForm","DisplayFunction","DisplayPacket","DisplayRules","DisplaySetSizePacket","DisplayString","DisplayTemporary","DisplayWith","DisplayWithRef","DisplayWithVariable","DistanceFunction","DistanceMatrix","DistanceTransform","Distribute","Distributed","DistributedContexts","DistributeDefinitions","DistributionChart","DistributionDomain","DistributionFitTest","DistributionParameterAssumptions","DistributionParameterQ","Dithering","Div","Divergence","Divide","DivideBy","Dividers","DivideSides","Divisible","Divisors","DivisorSigma","DivisorSum","DMSList","DMSString","Do","DockedCells","DocumentGenerator","DocumentGeneratorInformation","DocumentGeneratorInformationData","DocumentGenerators","DocumentNotebook","DocumentWeightingRules","Dodecahedron","DomainRegistrationInformation","DominantColors","DOSTextFormat","Dot","DotDashed","DotEqual","DotLayer","DotPlusLayer","Dotted","DoubleBracketingBar","DoubleContourIntegral","DoubleDownArrow","DoubleLeftArrow","DoubleLeftRightArrow","DoubleLeftTee","DoubleLongLeftArrow","DoubleLongLeftRightArrow","DoubleLongRightArrow","DoubleRightArrow","DoubleRightTee","DoubleUpArrow","DoubleUpDownArrow","DoubleVerticalBar","DoublyInfinite","Down","DownArrow","DownArrowBar","DownArrowUpArrow","DownLeftRightVector","DownLeftTeeVector","DownLeftVector","DownLeftVectorBar","DownRightTeeVector","DownRightVector","DownRightVectorBar","Downsample","DownTee","DownTeeArrow","DownValues","DragAndDrop","DrawEdges","DrawFrontFaces","DrawHighlighted","Drop","DropoutLayer","DSolve","DSolveValue","Dt","DualLinearProgramming","DualPolyhedron","DualSystemsModel","DumpGet","DumpSave","DuplicateFreeQ","Duration","Dynamic","DynamicBox","DynamicBoxOptions","DynamicEvaluationTimeout","DynamicGeoGraphics","DynamicImage","DynamicLocation","DynamicModule","DynamicModuleBox","DynamicModuleBoxOptions","DynamicModuleParent","DynamicModuleValues","DynamicName","DynamicNamespace","DynamicReference","DynamicSetting","DynamicUpdating","DynamicWrapper","DynamicWrapperBox","DynamicWrapperBoxOptions","E","EarthImpactData","EarthquakeData","EccentricityCentrality","Echo","EchoFunction","EclipseType","EdgeAdd","EdgeBetweennessCentrality","EdgeCapacity","EdgeCapForm","EdgeColor","EdgeConnectivity","EdgeContract","EdgeCost","EdgeCount","EdgeCoverQ","EdgeCycleMatrix","EdgeDashing","EdgeDelete","EdgeDetect","EdgeForm","EdgeIndex","EdgeJoinForm","EdgeLabeling","EdgeLabels","EdgeLabelStyle","EdgeList","EdgeOpacity","EdgeQ","EdgeRenderingFunction","EdgeRules","EdgeShapeFunction","EdgeStyle","EdgeTaggedGraph","EdgeTaggedGraphQ","EdgeTags","EdgeThickness","EdgeWeight","EdgeWeightedGraphQ","Editable","EditButtonSettings","EditCellTagsSettings","EditDistance","EffectiveInterest","Eigensystem","Eigenvalues","EigenvectorCentrality","Eigenvectors","Element","ElementData","ElementwiseLayer","ElidedForms","Eliminate","EliminationOrder","Ellipsoid","EllipticE","EllipticExp","EllipticExpPrime","EllipticF","EllipticFilterModel","EllipticK","EllipticLog","EllipticNomeQ","EllipticPi","EllipticReducedHalfPeriods","EllipticTheta","EllipticThetaPrime","EmbedCode","EmbeddedHTML","EmbeddedService","EmbeddingLayer","EmbeddingObject","EmitSound","EmphasizeSyntaxErrors","EmpiricalDistribution","Empty","EmptyGraphQ","EmptyRegion","EnableConsolePrintPacket","Enabled","Encode","Encrypt","EncryptedObject","EncryptFile","End","EndAdd","EndDialogPacket","EndFrontEndInteractionPacket","EndOfBuffer","EndOfFile","EndOfLine","EndOfString","EndPackage","EngineEnvironment","EngineeringForm","Enter","EnterExpressionPacket","EnterTextPacket","Entity","EntityClass","EntityClassList","EntityCopies","EntityFunction","EntityGroup","EntityInstance","EntityList","EntityPrefetch","EntityProperties","EntityProperty","EntityPropertyClass","EntityRegister","EntityStore","EntityStores","EntityTypeName","EntityUnregister","EntityValue","Entropy","EntropyFilter","Environment","Epilog","EpilogFunction","Equal","EqualColumns","EqualRows","EqualTilde","EqualTo","EquatedTo","Equilibrium","EquirippleFilterKernel","Equivalent","Erf","Erfc","Erfi","ErlangB","ErlangC","ErlangDistribution","Erosion","ErrorBox","ErrorBoxOptions","ErrorNorm","ErrorPacket","ErrorsDialogSettings","EscapeRadius","EstimatedBackground","EstimatedDistribution","EstimatedProcess","EstimatorGains","EstimatorRegulator","EuclideanDistance","EulerAngles","EulerCharacteristic","EulerE","EulerGamma","EulerianGraphQ","EulerMatrix","EulerPhi","Evaluatable","Evaluate","Evaluated","EvaluatePacket","EvaluateScheduledTask","EvaluationBox","EvaluationCell","EvaluationCompletionAction","EvaluationData","EvaluationElements","EvaluationEnvironment","EvaluationMode","EvaluationMonitor","EvaluationNotebook","EvaluationObject","EvaluationOrder","Evaluator","EvaluatorNames","EvenQ","EventData","EventEvaluator","EventHandler","EventHandlerTag","EventLabels","EventSeries","ExactBlackmanWindow","ExactNumberQ","ExactRootIsolation","ExampleData","Except","ExcludedForms","ExcludedLines","ExcludedPhysicalQuantities","ExcludePods","Exclusions","ExclusionsStyle","Exists","Exit","ExitDialog","ExoplanetData","Exp","Expand","ExpandAll","ExpandDenominator","ExpandFileName","ExpandNumerator","Expectation","ExpectationE","ExpectedValue","ExpGammaDistribution","ExpIntegralE","ExpIntegralEi","ExpirationDate","Exponent","ExponentFunction","ExponentialDistribution","ExponentialFamily","ExponentialGeneratingFunction","ExponentialMovingAverage","ExponentialPowerDistribution","ExponentPosition","ExponentStep","Export","ExportAutoReplacements","ExportByteArray","ExportForm","ExportPacket","ExportString","Expression","ExpressionCell","ExpressionGraph","ExpressionPacket","ExpressionUUID","ExpToTrig","ExtendedEntityClass","ExtendedGCD","Extension","ExtentElementFunction","ExtentMarkers","ExtentSize","ExternalBundle","ExternalCall","ExternalDataCharacterEncoding","ExternalEvaluate","ExternalFunction","ExternalFunctionName","ExternalIdentifier","ExternalObject","ExternalOptions","ExternalSessionObject","ExternalSessions","ExternalStorageBase","ExternalStorageDownload","ExternalStorageGet","ExternalStorageObject","ExternalStoragePut","ExternalStorageUpload","ExternalTypeSignature","ExternalValue","Extract","ExtractArchive","ExtractLayer","ExtractPacletArchive","ExtremeValueDistribution","FaceAlign","FaceForm","FaceGrids","FaceGridsStyle","FacialFeatures","Factor","FactorComplete","Factorial","Factorial2","FactorialMoment","FactorialMomentGeneratingFunction","FactorialPower","FactorInteger","FactorList","FactorSquareFree","FactorSquareFreeList","FactorTerms","FactorTermsList","Fail","Failure","FailureAction","FailureDistribution","FailureQ","False","FareySequence","FARIMAProcess","FeatureDistance","FeatureExtract","FeatureExtraction","FeatureExtractor","FeatureExtractorFunction","FeatureNames","FeatureNearest","FeatureSpacePlot","FeatureSpacePlot3D","FeatureTypes","FEDisableConsolePrintPacket","FeedbackLinearize","FeedbackSector","FeedbackSectorStyle","FeedbackType","FEEnableConsolePrintPacket","FetalGrowthData","Fibonacci","Fibonorial","FieldCompletionFunction","FieldHint","FieldHintStyle","FieldMasked","FieldSize","File","FileBaseName","FileByteCount","FileConvert","FileDate","FileExistsQ","FileExtension","FileFormat","FileHandler","FileHash","FileInformation","FileName","FileNameDepth","FileNameDialogSettings","FileNameDrop","FileNameForms","FileNameJoin","FileNames","FileNameSetter","FileNameSplit","FileNameTake","FilePrint","FileSize","FileSystemMap","FileSystemScan","FileTemplate","FileTemplateApply","FileType","FilledCurve","FilledCurveBox","FilledCurveBoxOptions","Filling","FillingStyle","FillingTransform","FilteredEntityClass","FilterRules","FinancialBond","FinancialData","FinancialDerivative","FinancialIndicator","Find","FindAnomalies","FindArgMax","FindArgMin","FindChannels","FindClique","FindClusters","FindCookies","FindCurvePath","FindCycle","FindDevices","FindDistribution","FindDistributionParameters","FindDivisions","FindEdgeCover","FindEdgeCut","FindEdgeIndependentPaths","FindEquationalProof","FindEulerianCycle","FindExternalEvaluators","FindFaces","FindFile","FindFit","FindFormula","FindFundamentalCycles","FindGeneratingFunction","FindGeoLocation","FindGeometricConjectures","FindGeometricTransform","FindGraphCommunities","FindGraphIsomorphism","FindGraphPartition","FindHamiltonianCycle","FindHamiltonianPath","FindHiddenMarkovStates","FindImageText","FindIndependentEdgeSet","FindIndependentVertexSet","FindInstance","FindIntegerNullVector","FindKClan","FindKClique","FindKClub","FindKPlex","FindLibrary","FindLinearRecurrence","FindList","FindMatchingColor","FindMaximum","FindMaximumCut","FindMaximumFlow","FindMaxValue","FindMeshDefects","FindMinimum","FindMinimumCostFlow","FindMinimumCut","FindMinValue","FindMoleculeSubstructure","FindPath","FindPeaks","FindPermutation","FindPostmanTour","FindProcessParameters","FindRepeat","FindRoot","FindSequenceFunction","FindSettings","FindShortestPath","FindShortestTour","FindSpanningTree","FindSystemModelEquilibrium","FindTextualAnswer","FindThreshold","FindTransientRepeat","FindVertexCover","FindVertexCut","FindVertexIndependentPaths","Fine","FinishDynamic","FiniteAbelianGroupCount","FiniteGroupCount","FiniteGroupData","First","FirstCase","FirstPassageTimeDistribution","FirstPosition","FischerGroupFi22","FischerGroupFi23","FischerGroupFi24Prime","FisherHypergeometricDistribution","FisherRatioTest","FisherZDistribution","Fit","FitAll","FitRegularization","FittedModel","FixedOrder","FixedPoint","FixedPointList","FlashSelection","Flat","Flatten","FlattenAt","FlattenLayer","FlatTopWindow","FlipView","Floor","FlowPolynomial","FlushPrintOutputPacket","Fold","FoldList","FoldPair","FoldPairList","FollowRedirects","Font","FontColor","FontFamily","FontForm","FontName","FontOpacity","FontPostScriptName","FontProperties","FontReencoding","FontSize","FontSlant","FontSubstitutions","FontTracking","FontVariations","FontWeight","For","ForAll","ForceVersionInstall","Format","FormatRules","FormatType","FormatTypeAutoConvert","FormatValues","FormBox","FormBoxOptions","FormControl","FormFunction","FormLayoutFunction","FormObject","FormPage","FormTheme","FormulaData","FormulaLookup","FortranForm","Forward","ForwardBackward","Fourier","FourierCoefficient","FourierCosCoefficient","FourierCosSeries","FourierCosTransform","FourierDCT","FourierDCTFilter","FourierDCTMatrix","FourierDST","FourierDSTMatrix","FourierMatrix","FourierParameters","FourierSequenceTransform","FourierSeries","FourierSinCoefficient","FourierSinSeries","FourierSinTransform","FourierTransform","FourierTrigSeries","FractionalBrownianMotionProcess","FractionalGaussianNoiseProcess","FractionalPart","FractionBox","FractionBoxOptions","FractionLine","Frame","FrameBox","FrameBoxOptions","Framed","FrameInset","FrameLabel","Frameless","FrameMargins","FrameRate","FrameStyle","FrameTicks","FrameTicksStyle","FRatioDistribution","FrechetDistribution","FreeQ","FrenetSerretSystem","FrequencySamplingFilterKernel","FresnelC","FresnelF","FresnelG","FresnelS","Friday","FrobeniusNumber","FrobeniusSolve","FromAbsoluteTime","FromCharacterCode","FromCoefficientRules","FromContinuedFraction","FromDate","FromDigits","FromDMS","FromEntity","FromJulianDate","FromLetterNumber","FromPolarCoordinates","FromRomanNumeral","FromSphericalCoordinates","FromUnixTime","Front","FrontEndDynamicExpression","FrontEndEventActions","FrontEndExecute","FrontEndObject","FrontEndResource","FrontEndResourceString","FrontEndStackSize","FrontEndToken","FrontEndTokenExecute","FrontEndValueCache","FrontEndVersion","FrontFaceColor","FrontFaceOpacity","Full","FullAxes","FullDefinition","FullForm","FullGraphics","FullInformationOutputRegulator","FullOptions","FullRegion","FullSimplify","Function","FunctionCompile","FunctionCompileExport","FunctionCompileExportByteArray","FunctionCompileExportLibrary","FunctionCompileExportString","FunctionDomain","FunctionExpand","FunctionInterpolation","FunctionPeriod","FunctionRange","FunctionSpace","FussellVeselyImportance","GaborFilter","GaborMatrix","GaborWavelet","GainMargins","GainPhaseMargins","GalaxyData","GalleryView","Gamma","GammaDistribution","GammaRegularized","GapPenalty","GARCHProcess","GatedRecurrentLayer","Gather","GatherBy","GaugeFaceElementFunction","GaugeFaceStyle","GaugeFrameElementFunction","GaugeFrameSize","GaugeFrameStyle","GaugeLabels","GaugeMarkers","GaugeStyle","GaussianFilter","GaussianIntegers","GaussianMatrix","GaussianOrthogonalMatrixDistribution","GaussianSymplecticMatrixDistribution","GaussianUnitaryMatrixDistribution","GaussianWindow","GCD","GegenbauerC","General","GeneralizedLinearModelFit","GenerateAsymmetricKeyPair","GenerateConditions","GeneratedCell","GeneratedDocumentBinding","GenerateDerivedKey","GenerateDigitalSignature","GenerateDocument","GeneratedParameters","GeneratedQuantityMagnitudes","GenerateFileSignature","GenerateHTTPResponse","GenerateSecuredAuthenticationKey","GenerateSymmetricKey","GeneratingFunction","GeneratorDescription","GeneratorHistoryLength","GeneratorOutputType","Generic","GenericCylindricalDecomposition","GenomeData","GenomeLookup","GeoAntipode","GeoArea","GeoArraySize","GeoBackground","GeoBoundingBox","GeoBounds","GeoBoundsRegion","GeoBubbleChart","GeoCenter","GeoCircle","GeoContourPlot","GeoDensityPlot","GeodesicClosing","GeodesicDilation","GeodesicErosion","GeodesicOpening","GeoDestination","GeodesyData","GeoDirection","GeoDisk","GeoDisplacement","GeoDistance","GeoDistanceList","GeoElevationData","GeoEntities","GeoGraphics","GeogravityModelData","GeoGridDirectionDifference","GeoGridLines","GeoGridLinesStyle","GeoGridPosition","GeoGridRange","GeoGridRangePadding","GeoGridUnitArea","GeoGridUnitDistance","GeoGridVector","GeoGroup","GeoHemisphere","GeoHemisphereBoundary","GeoHistogram","GeoIdentify","GeoImage","GeoLabels","GeoLength","GeoListPlot","GeoLocation","GeologicalPeriodData","GeomagneticModelData","GeoMarker","GeometricAssertion","GeometricBrownianMotionProcess","GeometricDistribution","GeometricMean","GeometricMeanFilter","GeometricOptimization","GeometricScene","GeometricTransformation","GeometricTransformation3DBox","GeometricTransformation3DBoxOptions","GeometricTransformationBox","GeometricTransformationBoxOptions","GeoModel","GeoNearest","GeoPath","GeoPosition","GeoPositionENU","GeoPositionXYZ","GeoProjection","GeoProjectionData","GeoRange","GeoRangePadding","GeoRegionValuePlot","GeoResolution","GeoScaleBar","GeoServer","GeoSmoothHistogram","GeoStreamPlot","GeoStyling","GeoStylingImageFunction","GeoVariant","GeoVector","GeoVectorENU","GeoVectorPlot","GeoVectorXYZ","GeoVisibleRegion","GeoVisibleRegionBoundary","GeoWithinQ","GeoZoomLevel","GestureHandler","GestureHandlerTag","Get","GetBoundingBoxSizePacket","GetContext","GetEnvironment","GetFileName","GetFrontEndOptionsDataPacket","GetLinebreakInformationPacket","GetMenusPacket","GetPageBreakInformationPacket","Glaisher","GlobalClusteringCoefficient","GlobalPreferences","GlobalSession","Glow","GoldenAngle","GoldenRatio","GompertzMakehamDistribution","GoochShading","GoodmanKruskalGamma","GoodmanKruskalGammaTest","Goto","Grad","Gradient","GradientFilter","GradientOrientationFilter","GrammarApply","GrammarRules","GrammarToken","Graph","Graph3D","GraphAssortativity","GraphAutomorphismGroup","GraphCenter","GraphComplement","GraphData","GraphDensity","GraphDiameter","GraphDifference","GraphDisjointUnion","GraphDistance","GraphDistanceMatrix","GraphElementData","GraphEmbedding","GraphHighlight","GraphHighlightStyle","GraphHub","Graphics","Graphics3D","Graphics3DBox","Graphics3DBoxOptions","GraphicsArray","GraphicsBaseline","GraphicsBox","GraphicsBoxOptions","GraphicsColor","GraphicsColumn","GraphicsComplex","GraphicsComplex3DBox","GraphicsComplex3DBoxOptions","GraphicsComplexBox","GraphicsComplexBoxOptions","GraphicsContents","GraphicsData","GraphicsGrid","GraphicsGridBox","GraphicsGroup","GraphicsGroup3DBox","GraphicsGroup3DBoxOptions","GraphicsGroupBox","GraphicsGroupBoxOptions","GraphicsGrouping","GraphicsHighlightColor","GraphicsRow","GraphicsSpacing","GraphicsStyle","GraphIntersection","GraphLayout","GraphLinkEfficiency","GraphPeriphery","GraphPlot","GraphPlot3D","GraphPower","GraphPropertyDistribution","GraphQ","GraphRadius","GraphReciprocity","GraphRoot","GraphStyle","GraphUnion","Gray","GrayLevel","Greater","GreaterEqual","GreaterEqualLess","GreaterEqualThan","GreaterFullEqual","GreaterGreater","GreaterLess","GreaterSlantEqual","GreaterThan","GreaterTilde","Green","GreenFunction","Grid","GridBaseline","GridBox","GridBoxAlignment","GridBoxBackground","GridBoxDividers","GridBoxFrame","GridBoxItemSize","GridBoxItemStyle","GridBoxOptions","GridBoxSpacings","GridCreationSettings","GridDefaultElement","GridElementStyleOptions","GridFrame","GridFrameMargins","GridGraph","GridLines","GridLinesStyle","GroebnerBasis","GroupActionBase","GroupBy","GroupCentralizer","GroupElementFromWord","GroupElementPosition","GroupElementQ","GroupElements","GroupElementToWord","GroupGenerators","Groupings","GroupMultiplicationTable","GroupOrbits","GroupOrder","GroupPageBreakWithin","GroupSetwiseStabilizer","GroupStabilizer","GroupStabilizerChain","GroupTogetherGrouping","GroupTogetherNestedGrouping","GrowCutComponents","Gudermannian","GuidedFilter","GumbelDistribution","HaarWavelet","HadamardMatrix","HalfLine","HalfNormalDistribution","HalfPlane","HalfSpace","HalftoneShading","HamiltonianGraphQ","HammingDistance","HammingWindow","HandlerFunctions","HandlerFunctionsKeys","HankelH1","HankelH2","HankelMatrix","HankelTransform","HannPoissonWindow","HannWindow","HaradaNortonGroupHN","HararyGraph","HarmonicMean","HarmonicMeanFilter","HarmonicNumber","Hash","HatchFilling","HatchShading","Haversine","HazardFunction","Head","HeadCompose","HeaderAlignment","HeaderBackground","HeaderDisplayFunction","HeaderLines","HeaderSize","HeaderStyle","Heads","HeavisideLambda","HeavisidePi","HeavisideTheta","HeldGroupHe","HeldPart","HelpBrowserLookup","HelpBrowserNotebook","HelpBrowserSettings","Here","HermiteDecomposition","HermiteH","HermitianMatrixQ","HessenbergDecomposition","Hessian","HeunB","HeunBPrime","HeunC","HeunCPrime","HeunD","HeunDPrime","HeunG","HeunGPrime","HeunT","HeunTPrime","HexadecimalCharacter","Hexahedron","HexahedronBox","HexahedronBoxOptions","HiddenItems","HiddenMarkovProcess","HiddenSurface","Highlighted","HighlightGraph","HighlightImage","HighlightMesh","HighpassFilter","HigmanSimsGroupHS","HilbertCurve","HilbertFilter","HilbertMatrix","Histogram","Histogram3D","HistogramDistribution","HistogramList","HistogramTransform","HistogramTransformInterpolation","HistoricalPeriodData","HitMissTransform","HITSCentrality","HjorthDistribution","HodgeDual","HoeffdingD","HoeffdingDTest","Hold","HoldAll","HoldAllComplete","HoldComplete","HoldFirst","HoldForm","HoldPattern","HoldRest","HolidayCalendar","HomeDirectory","HomePage","Horizontal","HorizontalForm","HorizontalGauge","HorizontalScrollPosition","HornerForm","HostLookup","HotellingTSquareDistribution","HoytDistribution","HTMLSave","HTTPErrorResponse","HTTPRedirect","HTTPRequest","HTTPRequestData","HTTPResponse","Hue","HumanGrowthData","HumpDownHump","HumpEqual","HurwitzLerchPhi","HurwitzZeta","HyperbolicDistribution","HypercubeGraph","HyperexponentialDistribution","Hyperfactorial","Hypergeometric0F1","Hypergeometric0F1Regularized","Hypergeometric1F1","Hypergeometric1F1Regularized","Hypergeometric2F1","Hypergeometric2F1Regularized","HypergeometricDistribution","HypergeometricPFQ","HypergeometricPFQRegularized","HypergeometricU","Hyperlink","HyperlinkAction","HyperlinkCreationSettings","Hyperplane","Hyphenation","HyphenationOptions","HypoexponentialDistribution","HypothesisTestData","I","IconData","Iconize","IconizedObject","IconRules","Icosahedron","Identity","IdentityMatrix","If","IgnoreCase","IgnoreDiacritics","IgnorePunctuation","IgnoreSpellCheck","IgnoringInactive","Im","Image","Image3D","Image3DProjection","Image3DSlices","ImageAccumulate","ImageAdd","ImageAdjust","ImageAlign","ImageApply","ImageApplyIndexed","ImageAspectRatio","ImageAssemble","ImageAugmentationLayer","ImageBoundingBoxes","ImageCache","ImageCacheValid","ImageCapture","ImageCaptureFunction","ImageCases","ImageChannels","ImageClip","ImageCollage","ImageColorSpace","ImageCompose","ImageContainsQ","ImageContents","ImageConvolve","ImageCooccurrence","ImageCorners","ImageCorrelate","ImageCorrespondingPoints","ImageCrop","ImageData","ImageDeconvolve","ImageDemosaic","ImageDifference","ImageDimensions","ImageDisplacements","ImageDistance","ImageEffect","ImageExposureCombine","ImageFeatureTrack","ImageFileApply","ImageFileFilter","ImageFileScan","ImageFilter","ImageFocusCombine","ImageForestingComponents","ImageFormattingWidth","ImageForwardTransformation","ImageGraphics","ImageHistogram","ImageIdentify","ImageInstanceQ","ImageKeypoints","ImageLabels","ImageLegends","ImageLevels","ImageLines","ImageMargins","ImageMarker","ImageMarkers","ImageMeasurements","ImageMesh","ImageMultiply","ImageOffset","ImagePad","ImagePadding","ImagePartition","ImagePeriodogram","ImagePerspectiveTransformation","ImagePosition","ImagePreviewFunction","ImagePyramid","ImagePyramidApply","ImageQ","ImageRangeCache","ImageRecolor","ImageReflect","ImageRegion","ImageResize","ImageResolution","ImageRestyle","ImageRotate","ImageRotated","ImageSaliencyFilter","ImageScaled","ImageScan","ImageSize","ImageSizeAction","ImageSizeCache","ImageSizeMultipliers","ImageSizeRaw","ImageSubtract","ImageTake","ImageTransformation","ImageTrim","ImageType","ImageValue","ImageValuePositions","ImagingDevice","ImplicitRegion","Implies","Import","ImportAutoReplacements","ImportByteArray","ImportOptions","ImportString","ImprovementImportance","In","Inactivate","Inactive","IncidenceGraph","IncidenceList","IncidenceMatrix","IncludeAromaticBonds","IncludeConstantBasis","IncludeDefinitions","IncludeDirectories","IncludeFileExtension","IncludeGeneratorTasks","IncludeHydrogens","IncludeInflections","IncludeMetaInformation","IncludePods","IncludeQuantities","IncludeRelatedTables","IncludeSingularTerm","IncludeWindowTimes","Increment","IndefiniteMatrixQ","Indent","IndentingNewlineSpacings","IndentMaxFraction","IndependenceTest","IndependentEdgeSetQ","IndependentPhysicalQuantity","IndependentUnit","IndependentUnitDimension","IndependentVertexSetQ","Indeterminate","IndeterminateThreshold","IndexCreationOptions","Indexed","IndexEdgeTaggedGraph","IndexGraph","IndexTag","Inequality","InexactNumberQ","InexactNumbers","InfiniteFuture","InfiniteLine","InfinitePast","InfinitePlane","Infinity","Infix","InflationAdjust","InflationMethod","Information","InformationData","InformationDataGrid","Inherited","InheritScope","InhomogeneousPoissonProcess","InitialEvaluationHistory","Initialization","InitializationCell","InitializationCellEvaluation","InitializationCellWarning","InitializationObjects","InitializationValue","Initialize","InitialSeeding","InlineCounterAssignments","InlineCounterIncrements","InlineRules","Inner","InnerPolygon","InnerPolyhedron","Inpaint","Input","InputAliases","InputAssumptions","InputAutoReplacements","InputField","InputFieldBox","InputFieldBoxOptions","InputForm","InputGrouping","InputNamePacket","InputNotebook","InputPacket","InputSettings","InputStream","InputString","InputStringPacket","InputToBoxFormPacket","Insert","InsertionFunction","InsertionPointObject","InsertLinebreaks","InsertResults","Inset","Inset3DBox","Inset3DBoxOptions","InsetBox","InsetBoxOptions","Insphere","Install","InstallService","InstanceNormalizationLayer","InString","Integer","IntegerDigits","IntegerExponent","IntegerLength","IntegerName","IntegerPart","IntegerPartitions","IntegerQ","IntegerReverse","Integers","IntegerString","Integral","Integrate","Interactive","InteractiveTradingChart","Interlaced","Interleaving","InternallyBalancedDecomposition","InterpolatingFunction","InterpolatingPolynomial","Interpolation","InterpolationOrder","InterpolationPoints","InterpolationPrecision","Interpretation","InterpretationBox","InterpretationBoxOptions","InterpretationFunction","Interpreter","InterpretTemplate","InterquartileRange","Interrupt","InterruptSettings","IntersectedEntityClass","IntersectingQ","Intersection","Interval","IntervalIntersection","IntervalMarkers","IntervalMarkersStyle","IntervalMemberQ","IntervalSlider","IntervalUnion","Into","Inverse","InverseBetaRegularized","InverseCDF","InverseChiSquareDistribution","InverseContinuousWaveletTransform","InverseDistanceTransform","InverseEllipticNomeQ","InverseErf","InverseErfc","InverseFourier","InverseFourierCosTransform","InverseFourierSequenceTransform","InverseFourierSinTransform","InverseFourierTransform","InverseFunction","InverseFunctions","InverseGammaDistribution","InverseGammaRegularized","InverseGaussianDistribution","InverseGudermannian","InverseHankelTransform","InverseHaversine","InverseImagePyramid","InverseJacobiCD","InverseJacobiCN","InverseJacobiCS","InverseJacobiDC","InverseJacobiDN","InverseJacobiDS","InverseJacobiNC","InverseJacobiND","InverseJacobiNS","InverseJacobiSC","InverseJacobiSD","InverseJacobiSN","InverseLaplaceTransform","InverseMellinTransform","InversePermutation","InverseRadon","InverseRadonTransform","InverseSeries","InverseShortTimeFourier","InverseSpectrogram","InverseSurvivalFunction","InverseTransformedRegion","InverseWaveletTransform","InverseWeierstrassP","InverseWishartMatrixDistribution","InverseZTransform","Invisible","InvisibleApplication","InvisibleTimes","IPAddress","IrreduciblePolynomialQ","IslandData","IsolatingInterval","IsomorphicGraphQ","IsotopeData","Italic","Item","ItemAspectRatio","ItemBox","ItemBoxOptions","ItemDisplayFunction","ItemSize","ItemStyle","ItoProcess","JaccardDissimilarity","JacobiAmplitude","Jacobian","JacobiCD","JacobiCN","JacobiCS","JacobiDC","JacobiDN","JacobiDS","JacobiNC","JacobiND","JacobiNS","JacobiP","JacobiSC","JacobiSD","JacobiSN","JacobiSymbol","JacobiZeta","JankoGroupJ1","JankoGroupJ2","JankoGroupJ3","JankoGroupJ4","JarqueBeraALMTest","JohnsonDistribution","Join","JoinAcross","Joined","JoinedCurve","JoinedCurveBox","JoinedCurveBoxOptions","JoinForm","JordanDecomposition","JordanModelDecomposition","JulianDate","JuliaSetBoettcher","JuliaSetIterationCount","JuliaSetPlot","JuliaSetPoints","K","KagiChart","KaiserBesselWindow","KaiserWindow","KalmanEstimator","KalmanFilter","KarhunenLoeveDecomposition","KaryTree","KatzCentrality","KCoreComponents","KDistribution","KEdgeConnectedComponents","KEdgeConnectedGraphQ","KeepExistingVersion","KelvinBei","KelvinBer","KelvinKei","KelvinKer","KendallTau","KendallTauTest","KernelExecute","KernelFunction","KernelMixtureDistribution","KernelObject","Kernels","Ket","Key","KeyCollisionFunction","KeyComplement","KeyDrop","KeyDropFrom","KeyExistsQ","KeyFreeQ","KeyIntersection","KeyMap","KeyMemberQ","KeypointStrength","Keys","KeySelect","KeySort","KeySortBy","KeyTake","KeyUnion","KeyValueMap","KeyValuePattern","Khinchin","KillProcess","KirchhoffGraph","KirchhoffMatrix","KleinInvariantJ","KnapsackSolve","KnightTourGraph","KnotData","KnownUnitQ","KochCurve","KolmogorovSmirnovTest","KroneckerDelta","KroneckerModelDecomposition","KroneckerProduct","KroneckerSymbol","KuiperTest","KumaraswamyDistribution","Kurtosis","KuwaharaFilter","KVertexConnectedComponents","KVertexConnectedGraphQ","LABColor","Label","Labeled","LabeledSlider","LabelingFunction","LabelingSize","LabelStyle","LabelVisibility","LaguerreL","LakeData","LambdaComponents","LambertW","LaminaData","LanczosWindow","LandauDistribution","Language","LanguageCategory","LanguageData","LanguageIdentify","LanguageOptions","LaplaceDistribution","LaplaceTransform","Laplacian","LaplacianFilter","LaplacianGaussianFilter","Large","Larger","Last","Latitude","LatitudeLongitude","LatticeData","LatticeReduce","Launch","LaunchKernels","LayeredGraphPlot","LayerSizeFunction","LayoutInformation","LCHColor","LCM","LeaderSize","LeafCount","LeapYearQ","LearnDistribution","LearnedDistribution","LearningRate","LearningRateMultipliers","LeastSquares","LeastSquaresFilterKernel","Left","LeftArrow","LeftArrowBar","LeftArrowRightArrow","LeftDownTeeVector","LeftDownVector","LeftDownVectorBar","LeftRightArrow","LeftRightVector","LeftTee","LeftTeeArrow","LeftTeeVector","LeftTriangle","LeftTriangleBar","LeftTriangleEqual","LeftUpDownVector","LeftUpTeeVector","LeftUpVector","LeftUpVectorBar","LeftVector","LeftVectorBar","LegendAppearance","Legended","LegendFunction","LegendLabel","LegendLayout","LegendMargins","LegendMarkers","LegendMarkerSize","LegendreP","LegendreQ","LegendreType","Length","LengthWhile","LerchPhi","Less","LessEqual","LessEqualGreater","LessEqualThan","LessFullEqual","LessGreater","LessLess","LessSlantEqual","LessThan","LessTilde","LetterCharacter","LetterCounts","LetterNumber","LetterQ","Level","LeveneTest","LeviCivitaTensor","LevyDistribution","Lexicographic","LibraryDataType","LibraryFunction","LibraryFunctionError","LibraryFunctionInformation","LibraryFunctionLoad","LibraryFunctionUnload","LibraryLoad","LibraryUnload","LicenseID","LiftingFilterData","LiftingWaveletTransform","LightBlue","LightBrown","LightCyan","Lighter","LightGray","LightGreen","Lighting","LightingAngle","LightMagenta","LightOrange","LightPink","LightPurple","LightRed","LightSources","LightYellow","Likelihood","Limit","LimitsPositioning","LimitsPositioningTokens","LindleyDistribution","Line","Line3DBox","Line3DBoxOptions","LinearFilter","LinearFractionalOptimization","LinearFractionalTransform","LinearGradientImage","LinearizingTransformationData","LinearLayer","LinearModelFit","LinearOffsetFunction","LinearOptimization","LinearProgramming","LinearRecurrence","LinearSolve","LinearSolveFunction","LineBox","LineBoxOptions","LineBreak","LinebreakAdjustments","LineBreakChart","LinebreakSemicolonWeighting","LineBreakWithin","LineColor","LineGraph","LineIndent","LineIndentMaxFraction","LineIntegralConvolutionPlot","LineIntegralConvolutionScale","LineLegend","LineOpacity","LineSpacing","LineWrapParts","LinkActivate","LinkClose","LinkConnect","LinkConnectedQ","LinkCreate","LinkError","LinkFlush","LinkFunction","LinkHost","LinkInterrupt","LinkLaunch","LinkMode","LinkObject","LinkOpen","LinkOptions","LinkPatterns","LinkProtocol","LinkRankCentrality","LinkRead","LinkReadHeld","LinkReadyQ","Links","LinkService","LinkWrite","LinkWriteHeld","LiouvilleLambda","List","Listable","ListAnimate","ListContourPlot","ListContourPlot3D","ListConvolve","ListCorrelate","ListCurvePathPlot","ListDeconvolve","ListDensityPlot","ListDensityPlot3D","Listen","ListFormat","ListFourierSequenceTransform","ListInterpolation","ListLineIntegralConvolutionPlot","ListLinePlot","ListLogLinearPlot","ListLogLogPlot","ListLogPlot","ListPicker","ListPickerBox","ListPickerBoxBackground","ListPickerBoxOptions","ListPlay","ListPlot","ListPlot3D","ListPointPlot3D","ListPolarPlot","ListQ","ListSliceContourPlot3D","ListSliceDensityPlot3D","ListSliceVectorPlot3D","ListStepPlot","ListStreamDensityPlot","ListStreamPlot","ListSurfacePlot3D","ListVectorDensityPlot","ListVectorPlot","ListVectorPlot3D","ListZTransform","Literal","LiteralSearch","LocalAdaptiveBinarize","LocalCache","LocalClusteringCoefficient","LocalizeDefinitions","LocalizeVariables","LocalObject","LocalObjects","LocalResponseNormalizationLayer","LocalSubmit","LocalSymbol","LocalTime","LocalTimeZone","LocationEquivalenceTest","LocationTest","Locator","LocatorAutoCreate","LocatorBox","LocatorBoxOptions","LocatorCentering","LocatorPane","LocatorPaneBox","LocatorPaneBoxOptions","LocatorRegion","Locked","Log","Log10","Log2","LogBarnesG","LogGamma","LogGammaDistribution","LogicalExpand","LogIntegral","LogisticDistribution","LogisticSigmoid","LogitModelFit","LogLikelihood","LogLinearPlot","LogLogisticDistribution","LogLogPlot","LogMultinormalDistribution","LogNormalDistribution","LogPlot","LogRankTest","LogSeriesDistribution","LongEqual","Longest","LongestCommonSequence","LongestCommonSequencePositions","LongestCommonSubsequence","LongestCommonSubsequencePositions","LongestMatch","LongestOrderedSequence","LongForm","Longitude","LongLeftArrow","LongLeftRightArrow","LongRightArrow","LongShortTermMemoryLayer","Lookup","Loopback","LoopFreeGraphQ","Looping","LossFunction","LowerCaseQ","LowerLeftArrow","LowerRightArrow","LowerTriangularize","LowerTriangularMatrixQ","LowpassFilter","LQEstimatorGains","LQGRegulator","LQOutputRegulatorGains","LQRegulatorGains","LUBackSubstitution","LucasL","LuccioSamiComponents","LUDecomposition","LunarEclipse","LUVColor","LyapunovSolve","LyonsGroupLy","MachineID","MachineName","MachineNumberQ","MachinePrecision","MacintoshSystemPageSetup","Magenta","Magnification","Magnify","MailAddressValidation","MailExecute","MailFolder","MailItem","MailReceiverFunction","MailResponseFunction","MailSearch","MailServerConnect","MailServerConnection","MailSettings","MainSolve","MaintainDynamicCaches","Majority","MakeBoxes","MakeExpression","MakeRules","ManagedLibraryExpressionID","ManagedLibraryExpressionQ","MandelbrotSetBoettcher","MandelbrotSetDistance","MandelbrotSetIterationCount","MandelbrotSetMemberQ","MandelbrotSetPlot","MangoldtLambda","ManhattanDistance","Manipulate","Manipulator","MannedSpaceMissionData","MannWhitneyTest","MantissaExponent","Manual","Map","MapAll","MapAt","MapIndexed","MAProcess","MapThread","MarchenkoPasturDistribution","MarcumQ","MardiaCombinedTest","MardiaKurtosisTest","MardiaSkewnessTest","MarginalDistribution","MarkovProcessProperties","Masking","MatchingDissimilarity","MatchLocalNameQ","MatchLocalNames","MatchQ","Material","MathematicalFunctionData","MathematicaNotation","MathieuC","MathieuCharacteristicA","MathieuCharacteristicB","MathieuCharacteristicExponent","MathieuCPrime","MathieuGroupM11","MathieuGroupM12","MathieuGroupM22","MathieuGroupM23","MathieuGroupM24","MathieuS","MathieuSPrime","MathMLForm","MathMLText","Matrices","MatrixExp","MatrixForm","MatrixFunction","MatrixLog","MatrixNormalDistribution","MatrixPlot","MatrixPower","MatrixPropertyDistribution","MatrixQ","MatrixRank","MatrixTDistribution","Max","MaxBend","MaxCellMeasure","MaxColorDistance","MaxDate","MaxDetect","MaxDuration","MaxExtraBandwidths","MaxExtraConditions","MaxFeatureDisplacement","MaxFeatures","MaxFilter","MaximalBy","Maximize","MaxItems","MaxIterations","MaxLimit","MaxMemoryUsed","MaxMixtureKernels","MaxOverlapFraction","MaxPlotPoints","MaxPoints","MaxRecursion","MaxStableDistribution","MaxStepFraction","MaxSteps","MaxStepSize","MaxTrainingRounds","MaxValue","MaxwellDistribution","MaxWordGap","McLaughlinGroupMcL","Mean","MeanAbsoluteLossLayer","MeanAround","MeanClusteringCoefficient","MeanDegreeConnectivity","MeanDeviation","MeanFilter","MeanGraphDistance","MeanNeighborDegree","MeanShift","MeanShiftFilter","MeanSquaredLossLayer","Median","MedianDeviation","MedianFilter","MedicalTestData","Medium","MeijerG","MeijerGReduce","MeixnerDistribution","MellinConvolve","MellinTransform","MemberQ","MemoryAvailable","MemoryConstrained","MemoryConstraint","MemoryInUse","MengerMesh","Menu","MenuAppearance","MenuCommandKey","MenuEvaluator","MenuItem","MenuList","MenuPacket","MenuSortingValue","MenuStyle","MenuView","Merge","MergeDifferences","MergingFunction","MersennePrimeExponent","MersennePrimeExponentQ","Mesh","MeshCellCentroid","MeshCellCount","MeshCellHighlight","MeshCellIndex","MeshCellLabel","MeshCellMarker","MeshCellMeasure","MeshCellQuality","MeshCells","MeshCellShapeFunction","MeshCellStyle","MeshConnectivityGraph","MeshCoordinates","MeshFunctions","MeshPrimitives","MeshQualityGoal","MeshRange","MeshRefinementFunction","MeshRegion","MeshRegionQ","MeshShading","MeshStyle","Message","MessageDialog","MessageList","MessageName","MessageObject","MessageOptions","MessagePacket","Messages","MessagesNotebook","MetaCharacters","MetaInformation","MeteorShowerData","Method","MethodOptions","MexicanHatWavelet","MeyerWavelet","Midpoint","Min","MinColorDistance","MinDate","MinDetect","MineralData","MinFilter","MinimalBy","MinimalPolynomial","MinimalStateSpaceModel","Minimize","MinimumTimeIncrement","MinIntervalSize","MinkowskiQuestionMark","MinLimit","MinMax","MinorPlanetData","Minors","MinRecursion","MinSize","MinStableDistribution","Minus","MinusPlus","MinValue","Missing","MissingBehavior","MissingDataMethod","MissingDataRules","MissingQ","MissingString","MissingStyle","MissingValuePattern","MittagLefflerE","MixedFractionParts","MixedGraphQ","MixedMagnitude","MixedRadix","MixedRadixQuantity","MixedUnit","MixtureDistribution","Mod","Modal","Mode","Modular","ModularInverse","ModularLambda","Module","Modulus","MoebiusMu","Molecule","MoleculeContainsQ","MoleculeEquivalentQ","MoleculeGraph","MoleculeModify","MoleculePattern","MoleculePlot","MoleculePlot3D","MoleculeProperty","MoleculeQ","MoleculeRecognize","MoleculeValue","Moment","Momentary","MomentConvert","MomentEvaluate","MomentGeneratingFunction","MomentOfInertia","Monday","Monitor","MonomialList","MonomialOrder","MonsterGroupM","MoonPhase","MoonPosition","MorletWavelet","MorphologicalBinarize","MorphologicalBranchPoints","MorphologicalComponents","MorphologicalEulerNumber","MorphologicalGraph","MorphologicalPerimeter","MorphologicalTransform","MortalityData","Most","MountainData","MouseAnnotation","MouseAppearance","MouseAppearanceTag","MouseButtons","Mouseover","MousePointerNote","MousePosition","MovieData","MovingAverage","MovingMap","MovingMedian","MoyalDistribution","Multicolumn","MultiedgeStyle","MultigraphQ","MultilaunchWarning","MultiLetterItalics","MultiLetterStyle","MultilineFunction","Multinomial","MultinomialDistribution","MultinormalDistribution","MultiplicativeOrder","Multiplicity","MultiplySides","Multiselection","MultivariateHypergeometricDistribution","MultivariatePoissonDistribution","MultivariateTDistribution","N","NakagamiDistribution","NameQ","Names","NamespaceBox","NamespaceBoxOptions","Nand","NArgMax","NArgMin","NBernoulliB","NBodySimulation","NBodySimulationData","NCache","NDEigensystem","NDEigenvalues","NDSolve","NDSolveValue","Nearest","NearestFunction","NearestMeshCells","NearestNeighborGraph","NearestTo","NebulaData","NeedCurrentFrontEndPackagePacket","NeedCurrentFrontEndSymbolsPacket","NeedlemanWunschSimilarity","Needs","Negative","NegativeBinomialDistribution","NegativeDefiniteMatrixQ","NegativeIntegers","NegativeMultinomialDistribution","NegativeRationals","NegativeReals","NegativeSemidefiniteMatrixQ","NeighborhoodData","NeighborhoodGraph","Nest","NestedGreaterGreater","NestedLessLess","NestedScriptRules","NestGraph","NestList","NestWhile","NestWhileList","NetAppend","NetBidirectionalOperator","NetChain","NetDecoder","NetDelete","NetDrop","NetEncoder","NetEvaluationMode","NetExtract","NetFlatten","NetFoldOperator","NetGANOperator","NetGraph","NetInformation","NetInitialize","NetInsert","NetInsertSharedArrays","NetJoin","NetMapOperator","NetMapThreadOperator","NetMeasurements","NetModel","NetNestOperator","NetPairEmbeddingOperator","NetPort","NetPortGradient","NetPrepend","NetRename","NetReplace","NetReplacePart","NetSharedArray","NetStateObject","NetTake","NetTrain","NetTrainResultsObject","NetworkPacketCapture","NetworkPacketRecording","NetworkPacketRecordingDuring","NetworkPacketTrace","NeumannValue","NevilleThetaC","NevilleThetaD","NevilleThetaN","NevilleThetaS","NewPrimitiveStyle","NExpectation","Next","NextCell","NextDate","NextPrime","NextScheduledTaskTime","NHoldAll","NHoldFirst","NHoldRest","NicholsGridLines","NicholsPlot","NightHemisphere","NIntegrate","NMaximize","NMaxValue","NMinimize","NMinValue","NominalVariables","NonAssociative","NoncentralBetaDistribution","NoncentralChiSquareDistribution","NoncentralFRatioDistribution","NoncentralStudentTDistribution","NonCommutativeMultiply","NonConstants","NondimensionalizationTransform","None","NoneTrue","NonlinearModelFit","NonlinearStateSpaceModel","NonlocalMeansFilter","NonNegative","NonNegativeIntegers","NonNegativeRationals","NonNegativeReals","NonPositive","NonPositiveIntegers","NonPositiveRationals","NonPositiveReals","Nor","NorlundB","Norm","Normal","NormalDistribution","NormalGrouping","NormalizationLayer","Normalize","Normalized","NormalizedSquaredEuclideanDistance","NormalMatrixQ","NormalsFunction","NormFunction","Not","NotCongruent","NotCupCap","NotDoubleVerticalBar","Notebook","NotebookApply","NotebookAutoSave","NotebookClose","NotebookConvertSettings","NotebookCreate","NotebookCreateReturnObject","NotebookDefault","NotebookDelete","NotebookDirectory","NotebookDynamicExpression","NotebookEvaluate","NotebookEventActions","NotebookFileName","NotebookFind","NotebookFindReturnObject","NotebookGet","NotebookGetLayoutInformationPacket","NotebookGetMisspellingsPacket","NotebookImport","NotebookInformation","NotebookInterfaceObject","NotebookLocate","NotebookObject","NotebookOpen","NotebookOpenReturnObject","NotebookPath","NotebookPrint","NotebookPut","NotebookPutReturnObject","NotebookRead","NotebookResetGeneratedCells","Notebooks","NotebookSave","NotebookSaveAs","NotebookSelection","NotebookSetupLayoutInformationPacket","NotebooksMenu","NotebookTemplate","NotebookWrite","NotElement","NotEqualTilde","NotExists","NotGreater","NotGreaterEqual","NotGreaterFullEqual","NotGreaterGreater","NotGreaterLess","NotGreaterSlantEqual","NotGreaterTilde","Nothing","NotHumpDownHump","NotHumpEqual","NotificationFunction","NotLeftTriangle","NotLeftTriangleBar","NotLeftTriangleEqual","NotLess","NotLessEqual","NotLessFullEqual","NotLessGreater","NotLessLess","NotLessSlantEqual","NotLessTilde","NotNestedGreaterGreater","NotNestedLessLess","NotPrecedes","NotPrecedesEqual","NotPrecedesSlantEqual","NotPrecedesTilde","NotReverseElement","NotRightTriangle","NotRightTriangleBar","NotRightTriangleEqual","NotSquareSubset","NotSquareSubsetEqual","NotSquareSuperset","NotSquareSupersetEqual","NotSubset","NotSubsetEqual","NotSucceeds","NotSucceedsEqual","NotSucceedsSlantEqual","NotSucceedsTilde","NotSuperset","NotSupersetEqual","NotTilde","NotTildeEqual","NotTildeFullEqual","NotTildeTilde","NotVerticalBar","Now","NoWhitespace","NProbability","NProduct","NProductFactors","NRoots","NSolve","NSum","NSumTerms","NuclearExplosionData","NuclearReactorData","Null","NullRecords","NullSpace","NullWords","Number","NumberCompose","NumberDecompose","NumberExpand","NumberFieldClassNumber","NumberFieldDiscriminant","NumberFieldFundamentalUnits","NumberFieldIntegralBasis","NumberFieldNormRepresentatives","NumberFieldRegulator","NumberFieldRootsOfUnity","NumberFieldSignature","NumberForm","NumberFormat","NumberLinePlot","NumberMarks","NumberMultiplier","NumberPadding","NumberPoint","NumberQ","NumberSeparator","NumberSigns","NumberString","Numerator","NumeratorDenominator","NumericalOrder","NumericalSort","NumericArray","NumericArrayQ","NumericArrayType","NumericFunction","NumericQ","NuttallWindow","NValues","NyquistGridLines","NyquistPlot","O","ObservabilityGramian","ObservabilityMatrix","ObservableDecomposition","ObservableModelQ","OceanData","Octahedron","OddQ","Off","Offset","OLEData","On","ONanGroupON","Once","OneIdentity","Opacity","OpacityFunction","OpacityFunctionScaling","Open","OpenAppend","Opener","OpenerBox","OpenerBoxOptions","OpenerView","OpenFunctionInspectorPacket","Opening","OpenRead","OpenSpecialOptions","OpenTemporary","OpenWrite","Operate","OperatingSystem","OperatorApplied","OptimumFlowData","Optional","OptionalElement","OptionInspectorSettings","OptionQ","Options","OptionsPacket","OptionsPattern","OptionValue","OptionValueBox","OptionValueBoxOptions","Or","Orange","Order","OrderDistribution","OrderedQ","Ordering","OrderingBy","OrderingLayer","Orderless","OrderlessPatternSequence","OrnsteinUhlenbeckProcess","Orthogonalize","OrthogonalMatrixQ","Out","Outer","OuterPolygon","OuterPolyhedron","OutputAutoOverwrite","OutputControllabilityMatrix","OutputControllableModelQ","OutputForm","OutputFormData","OutputGrouping","OutputMathEditExpression","OutputNamePacket","OutputResponse","OutputSizeLimit","OutputStream","Over","OverBar","OverDot","Overflow","OverHat","Overlaps","Overlay","OverlayBox","OverlayBoxOptions","Overscript","OverscriptBox","OverscriptBoxOptions","OverTilde","OverVector","OverwriteTarget","OwenT","OwnValues","Package","PackingMethod","PackPaclet","PacletDataRebuild","PacletDirectoryAdd","PacletDirectoryLoad","PacletDirectoryRemove","PacletDirectoryUnload","PacletDisable","PacletEnable","PacletFind","PacletFindRemote","PacletInformation","PacletInstall","PacletInstallSubmit","PacletNewerQ","PacletObject","PacletObjectQ","PacletSite","PacletSiteObject","PacletSiteRegister","PacletSites","PacletSiteUnregister","PacletSiteUpdate","PacletUninstall","PacletUpdate","PaddedForm","Padding","PaddingLayer","PaddingSize","PadeApproximant","PadLeft","PadRight","PageBreakAbove","PageBreakBelow","PageBreakWithin","PageFooterLines","PageFooters","PageHeaderLines","PageHeaders","PageHeight","PageRankCentrality","PageTheme","PageWidth","Pagination","PairedBarChart","PairedHistogram","PairedSmoothHistogram","PairedTTest","PairedZTest","PaletteNotebook","PalettePath","PalindromeQ","Pane","PaneBox","PaneBoxOptions","Panel","PanelBox","PanelBoxOptions","Paneled","PaneSelector","PaneSelectorBox","PaneSelectorBoxOptions","PaperWidth","ParabolicCylinderD","ParagraphIndent","ParagraphSpacing","ParallelArray","ParallelCombine","ParallelDo","Parallelepiped","ParallelEvaluate","Parallelization","Parallelize","ParallelMap","ParallelNeeds","Parallelogram","ParallelProduct","ParallelSubmit","ParallelSum","ParallelTable","ParallelTry","Parameter","ParameterEstimator","ParameterMixtureDistribution","ParameterVariables","ParametricFunction","ParametricNDSolve","ParametricNDSolveValue","ParametricPlot","ParametricPlot3D","ParametricRampLayer","ParametricRegion","ParentBox","ParentCell","ParentConnect","ParentDirectory","ParentForm","Parenthesize","ParentList","ParentNotebook","ParetoDistribution","ParetoPickandsDistribution","ParkData","Part","PartBehavior","PartialCorrelationFunction","PartialD","ParticleAcceleratorData","ParticleData","Partition","PartitionGranularity","PartitionsP","PartitionsQ","PartLayer","PartOfSpeech","PartProtection","ParzenWindow","PascalDistribution","PassEventsDown","PassEventsUp","Paste","PasteAutoQuoteCharacters","PasteBoxFormInlineCells","PasteButton","Path","PathGraph","PathGraphQ","Pattern","PatternFilling","PatternSequence","PatternTest","PauliMatrix","PaulWavelet","Pause","PausedTime","PDF","PeakDetect","PeanoCurve","PearsonChiSquareTest","PearsonCorrelationTest","PearsonDistribution","PercentForm","PerfectNumber","PerfectNumberQ","PerformanceGoal","Perimeter","PeriodicBoundaryCondition","PeriodicInterpolation","Periodogram","PeriodogramArray","Permanent","Permissions","PermissionsGroup","PermissionsGroupMemberQ","PermissionsGroups","PermissionsKey","PermissionsKeys","PermutationCycles","PermutationCyclesQ","PermutationGroup","PermutationLength","PermutationList","PermutationListQ","PermutationMax","PermutationMin","PermutationOrder","PermutationPower","PermutationProduct","PermutationReplace","Permutations","PermutationSupport","Permute","PeronaMalikFilter","Perpendicular","PerpendicularBisector","PersistenceLocation","PersistenceTime","PersistentObject","PersistentObjects","PersistentValue","PersonData","PERTDistribution","PetersenGraph","PhaseMargins","PhaseRange","PhysicalSystemData","Pi","Pick","PIDData","PIDDerivativeFilter","PIDFeedforward","PIDTune","Piecewise","PiecewiseExpand","PieChart","PieChart3D","PillaiTrace","PillaiTraceTest","PingTime","Pink","PitchRecognize","Pivoting","PixelConstrained","PixelValue","PixelValuePositions","Placed","Placeholder","PlaceholderReplace","Plain","PlanarAngle","PlanarGraph","PlanarGraphQ","PlanckRadiationLaw","PlaneCurveData","PlanetaryMoonData","PlanetData","PlantData","Play","PlayRange","Plot","Plot3D","Plot3Matrix","PlotDivision","PlotJoined","PlotLabel","PlotLabels","PlotLayout","PlotLegends","PlotMarkers","PlotPoints","PlotRange","PlotRangeClipping","PlotRangeClipPlanesStyle","PlotRangePadding","PlotRegion","PlotStyle","PlotTheme","Pluralize","Plus","PlusMinus","Pochhammer","PodStates","PodWidth","Point","Point3DBox","Point3DBoxOptions","PointBox","PointBoxOptions","PointFigureChart","PointLegend","PointSize","PoissonConsulDistribution","PoissonDistribution","PoissonProcess","PoissonWindow","PolarAxes","PolarAxesOrigin","PolarGridLines","PolarPlot","PolarTicks","PoleZeroMarkers","PolyaAeppliDistribution","PolyGamma","Polygon","Polygon3DBox","Polygon3DBoxOptions","PolygonalNumber","PolygonAngle","PolygonBox","PolygonBoxOptions","PolygonCoordinates","PolygonDecomposition","PolygonHoleScale","PolygonIntersections","PolygonScale","Polyhedron","PolyhedronAngle","PolyhedronCoordinates","PolyhedronData","PolyhedronDecomposition","PolyhedronGenus","PolyLog","PolynomialExtendedGCD","PolynomialForm","PolynomialGCD","PolynomialLCM","PolynomialMod","PolynomialQ","PolynomialQuotient","PolynomialQuotientRemainder","PolynomialReduce","PolynomialRemainder","Polynomials","PoolingLayer","PopupMenu","PopupMenuBox","PopupMenuBoxOptions","PopupView","PopupWindow","Position","PositionIndex","Positive","PositiveDefiniteMatrixQ","PositiveIntegers","PositiveRationals","PositiveReals","PositiveSemidefiniteMatrixQ","PossibleZeroQ","Postfix","PostScript","Power","PowerDistribution","PowerExpand","PowerMod","PowerModList","PowerRange","PowerSpectralDensity","PowersRepresentations","PowerSymmetricPolynomial","Precedence","PrecedenceForm","Precedes","PrecedesEqual","PrecedesSlantEqual","PrecedesTilde","Precision","PrecisionGoal","PreDecrement","Predict","PredictionRoot","PredictorFunction","PredictorInformation","PredictorMeasurements","PredictorMeasurementsObject","PreemptProtect","PreferencesPath","Prefix","PreIncrement","Prepend","PrependLayer","PrependTo","PreprocessingRules","PreserveColor","PreserveImageOptions","Previous","PreviousCell","PreviousDate","PriceGraphDistribution","PrimaryPlaceholder","Prime","PrimeNu","PrimeOmega","PrimePi","PrimePowerQ","PrimeQ","Primes","PrimeZetaP","PrimitivePolynomialQ","PrimitiveRoot","PrimitiveRootList","PrincipalComponents","PrincipalValue","Print","PrintableASCIIQ","PrintAction","PrintForm","PrintingCopies","PrintingOptions","PrintingPageRange","PrintingStartingPageNumber","PrintingStyleEnvironment","Printout3D","Printout3DPreviewer","PrintPrecision","PrintTemporary","Prism","PrismBox","PrismBoxOptions","PrivateCellOptions","PrivateEvaluationOptions","PrivateFontOptions","PrivateFrontEndOptions","PrivateKey","PrivateNotebookOptions","PrivatePaths","Probability","ProbabilityDistribution","ProbabilityPlot","ProbabilityPr","ProbabilityScalePlot","ProbitModelFit","ProcessConnection","ProcessDirectory","ProcessEnvironment","Processes","ProcessEstimator","ProcessInformation","ProcessObject","ProcessParameterAssumptions","ProcessParameterQ","ProcessStateDomain","ProcessStatus","ProcessTimeDomain","Product","ProductDistribution","ProductLog","ProgressIndicator","ProgressIndicatorBox","ProgressIndicatorBoxOptions","Projection","Prolog","PromptForm","ProofObject","Properties","Property","PropertyList","PropertyValue","Proportion","Proportional","Protect","Protected","ProteinData","Pruning","PseudoInverse","PsychrometricPropertyData","PublicKey","PublisherID","PulsarData","PunctuationCharacter","Purple","Put","PutAppend","Pyramid","PyramidBox","PyramidBoxOptions","QBinomial","QFactorial","QGamma","QHypergeometricPFQ","QnDispersion","QPochhammer","QPolyGamma","QRDecomposition","QuadraticIrrationalQ","QuadraticOptimization","Quantile","QuantilePlot","Quantity","QuantityArray","QuantityDistribution","QuantityForm","QuantityMagnitude","QuantityQ","QuantityUnit","QuantityVariable","QuantityVariableCanonicalUnit","QuantityVariableDimensions","QuantityVariableIdentifier","QuantityVariablePhysicalQuantity","Quartics","QuartileDeviation","Quartiles","QuartileSkewness","Query","QueueingNetworkProcess","QueueingProcess","QueueProperties","Quiet","Quit","Quotient","QuotientRemainder","RadialGradientImage","RadialityCentrality","RadicalBox","RadicalBoxOptions","RadioButton","RadioButtonBar","RadioButtonBox","RadioButtonBoxOptions","Radon","RadonTransform","RamanujanTau","RamanujanTauL","RamanujanTauTheta","RamanujanTauZ","Ramp","Random","RandomChoice","RandomColor","RandomComplex","RandomEntity","RandomFunction","RandomGeoPosition","RandomGraph","RandomImage","RandomInstance","RandomInteger","RandomPermutation","RandomPoint","RandomPolygon","RandomPolyhedron","RandomPrime","RandomReal","RandomSample","RandomSeed","RandomSeeding","RandomVariate","RandomWalkProcess","RandomWord","Range","RangeFilter","RangeSpecification","RankedMax","RankedMin","RarerProbability","Raster","Raster3D","Raster3DBox","Raster3DBoxOptions","RasterArray","RasterBox","RasterBoxOptions","Rasterize","RasterSize","Rational","RationalFunctions","Rationalize","Rationals","Ratios","RawArray","RawBoxes","RawData","RawMedium","RayleighDistribution","Re","Read","ReadByteArray","ReadLine","ReadList","ReadProtected","ReadString","Real","RealAbs","RealBlockDiagonalForm","RealDigits","RealExponent","Reals","RealSign","Reap","RebuildPacletData","RecognitionPrior","RecognitionThreshold","Record","RecordLists","RecordSeparators","Rectangle","RectangleBox","RectangleBoxOptions","RectangleChart","RectangleChart3D","RectangularRepeatingElement","RecurrenceFilter","RecurrenceTable","RecurringDigitsForm","Red","Reduce","RefBox","ReferenceLineStyle","ReferenceMarkers","ReferenceMarkerStyle","Refine","ReflectionMatrix","ReflectionTransform","Refresh","RefreshRate","Region","RegionBinarize","RegionBoundary","RegionBoundaryStyle","RegionBounds","RegionCentroid","RegionDifference","RegionDimension","RegionDisjoint","RegionDistance","RegionDistanceFunction","RegionEmbeddingDimension","RegionEqual","RegionFillingStyle","RegionFunction","RegionImage","RegionIntersection","RegionMeasure","RegionMember","RegionMemberFunction","RegionMoment","RegionNearest","RegionNearestFunction","RegionPlot","RegionPlot3D","RegionProduct","RegionQ","RegionResize","RegionSize","RegionSymmetricDifference","RegionUnion","RegionWithin","RegisterExternalEvaluator","RegularExpression","Regularization","RegularlySampledQ","RegularPolygon","ReIm","ReImLabels","ReImPlot","ReImStyle","Reinstall","RelationalDatabase","RelationGraph","Release","ReleaseHold","ReliabilityDistribution","ReliefImage","ReliefPlot","RemoteAuthorizationCaching","RemoteConnect","RemoteConnectionObject","RemoteFile","RemoteRun","RemoteRunProcess","Remove","RemoveAlphaChannel","RemoveAsynchronousTask","RemoveAudioStream","RemoveBackground","RemoveChannelListener","RemoveChannelSubscribers","Removed","RemoveDiacritics","RemoveInputStreamMethod","RemoveOutputStreamMethod","RemoveProperty","RemoveScheduledTask","RemoveUsers","RemoveVideoStream","RenameDirectory","RenameFile","RenderAll","RenderingOptions","RenewalProcess","RenkoChart","RepairMesh","Repeated","RepeatedNull","RepeatedString","RepeatedTiming","RepeatingElement","Replace","ReplaceAll","ReplaceHeldPart","ReplaceImageValue","ReplaceList","ReplacePart","ReplacePixelValue","ReplaceRepeated","ReplicateLayer","RequiredPhysicalQuantities","Resampling","ResamplingAlgorithmData","ResamplingMethod","Rescale","RescalingTransform","ResetDirectory","ResetMenusPacket","ResetScheduledTask","ReshapeLayer","Residue","ResizeLayer","Resolve","ResourceAcquire","ResourceData","ResourceFunction","ResourceObject","ResourceRegister","ResourceRemove","ResourceSearch","ResourceSubmissionObject","ResourceSubmit","ResourceSystemBase","ResourceSystemPath","ResourceUpdate","ResourceVersion","ResponseForm","Rest","RestartInterval","Restricted","Resultant","ResumePacket","Return","ReturnEntersInput","ReturnExpressionPacket","ReturnInputFormPacket","ReturnPacket","ReturnReceiptFunction","ReturnTextPacket","Reverse","ReverseApplied","ReverseBiorthogonalSplineWavelet","ReverseElement","ReverseEquilibrium","ReverseGraph","ReverseSort","ReverseSortBy","ReverseUpEquilibrium","RevolutionAxis","RevolutionPlot3D","RGBColor","RiccatiSolve","RiceDistribution","RidgeFilter","RiemannR","RiemannSiegelTheta","RiemannSiegelZ","RiemannXi","Riffle","Right","RightArrow","RightArrowBar","RightArrowLeftArrow","RightComposition","RightCosetRepresentative","RightDownTeeVector","RightDownVector","RightDownVectorBar","RightTee","RightTeeArrow","RightTeeVector","RightTriangle","RightTriangleBar","RightTriangleEqual","RightUpDownVector","RightUpTeeVector","RightUpVector","RightUpVectorBar","RightVector","RightVectorBar","RiskAchievementImportance","RiskReductionImportance","RogersTanimotoDissimilarity","RollPitchYawAngles","RollPitchYawMatrix","RomanNumeral","Root","RootApproximant","RootIntervals","RootLocusPlot","RootMeanSquare","RootOfUnityQ","RootReduce","Roots","RootSum","Rotate","RotateLabel","RotateLeft","RotateRight","RotationAction","RotationBox","RotationBoxOptions","RotationMatrix","RotationTransform","Round","RoundImplies","RoundingRadius","Row","RowAlignments","RowBackgrounds","RowBox","RowHeights","RowLines","RowMinHeight","RowReduce","RowsEqual","RowSpacings","RSolve","RSolveValue","RudinShapiro","RudvalisGroupRu","Rule","RuleCondition","RuleDelayed","RuleForm","RulePlot","RulerUnits","Run","RunProcess","RunScheduledTask","RunThrough","RuntimeAttributes","RuntimeOptions","RussellRaoDissimilarity","SameQ","SameTest","SameTestProperties","SampledEntityClass","SampleDepth","SampledSoundFunction","SampledSoundList","SampleRate","SamplingPeriod","SARIMAProcess","SARMAProcess","SASTriangle","SatelliteData","SatisfiabilityCount","SatisfiabilityInstances","SatisfiableQ","Saturday","Save","Saveable","SaveAutoDelete","SaveConnection","SaveDefinitions","SavitzkyGolayMatrix","SawtoothWave","Scale","Scaled","ScaleDivisions","ScaledMousePosition","ScaleOrigin","ScalePadding","ScaleRanges","ScaleRangeStyle","ScalingFunctions","ScalingMatrix","ScalingTransform","Scan","ScheduledTask","ScheduledTaskActiveQ","ScheduledTaskInformation","ScheduledTaskInformationData","ScheduledTaskObject","ScheduledTasks","SchurDecomposition","ScientificForm","ScientificNotationThreshold","ScorerGi","ScorerGiPrime","ScorerHi","ScorerHiPrime","ScreenRectangle","ScreenStyleEnvironment","ScriptBaselineShifts","ScriptForm","ScriptLevel","ScriptMinSize","ScriptRules","ScriptSizeMultipliers","Scrollbars","ScrollingOptions","ScrollPosition","SearchAdjustment","SearchIndexObject","SearchIndices","SearchQueryString","SearchResultObject","Sec","Sech","SechDistribution","SecondOrderConeOptimization","SectionGrouping","SectorChart","SectorChart3D","SectorOrigin","SectorSpacing","SecuredAuthenticationKey","SecuredAuthenticationKeys","SeedRandom","Select","Selectable","SelectComponents","SelectedCells","SelectedNotebook","SelectFirst","Selection","SelectionAnimate","SelectionCell","SelectionCellCreateCell","SelectionCellDefaultStyle","SelectionCellParentStyle","SelectionCreateCell","SelectionDebuggerTag","SelectionDuplicateCell","SelectionEvaluate","SelectionEvaluateCreateCell","SelectionMove","SelectionPlaceholder","SelectionSetStyle","SelectWithContents","SelfLoops","SelfLoopStyle","SemanticImport","SemanticImportString","SemanticInterpretation","SemialgebraicComponentInstances","SemidefiniteOptimization","SendMail","SendMessage","Sequence","SequenceAlignment","SequenceAttentionLayer","SequenceCases","SequenceCount","SequenceFold","SequenceFoldList","SequenceForm","SequenceHold","SequenceLastLayer","SequenceMostLayer","SequencePosition","SequencePredict","SequencePredictorFunction","SequenceReplace","SequenceRestLayer","SequenceReverseLayer","SequenceSplit","Series","SeriesCoefficient","SeriesData","SeriesTermGoal","ServiceConnect","ServiceDisconnect","ServiceExecute","ServiceObject","ServiceRequest","ServiceResponse","ServiceSubmit","SessionSubmit","SessionTime","Set","SetAccuracy","SetAlphaChannel","SetAttributes","Setbacks","SetBoxFormNamesPacket","SetCloudDirectory","SetCookies","SetDelayed","SetDirectory","SetEnvironment","SetEvaluationNotebook","SetFileDate","SetFileLoadingContext","SetNotebookStatusLine","SetOptions","SetOptionsPacket","SetPermissions","SetPrecision","SetProperty","SetSecuredAuthenticationKey","SetSelectedNotebook","SetSharedFunction","SetSharedVariable","SetSpeechParametersPacket","SetStreamPosition","SetSystemModel","SetSystemOptions","Setter","SetterBar","SetterBox","SetterBoxOptions","Setting","SetUsers","SetValue","Shading","Shallow","ShannonWavelet","ShapiroWilkTest","Share","SharingList","Sharpen","ShearingMatrix","ShearingTransform","ShellRegion","ShenCastanMatrix","ShiftedGompertzDistribution","ShiftRegisterSequence","Short","ShortDownArrow","Shortest","ShortestMatch","ShortestPathFunction","ShortLeftArrow","ShortRightArrow","ShortTimeFourier","ShortTimeFourierData","ShortUpArrow","Show","ShowAutoConvert","ShowAutoSpellCheck","ShowAutoStyles","ShowCellBracket","ShowCellLabel","ShowCellTags","ShowClosedCellArea","ShowCodeAssist","ShowContents","ShowControls","ShowCursorTracker","ShowGroupOpenCloseIcon","ShowGroupOpener","ShowInvisibleCharacters","ShowPageBreaks","ShowPredictiveInterface","ShowSelection","ShowShortBoxForm","ShowSpecialCharacters","ShowStringCharacters","ShowSyntaxStyles","ShrinkingDelay","ShrinkWrapBoundingBox","SiderealTime","SiegelTheta","SiegelTukeyTest","SierpinskiCurve","SierpinskiMesh","Sign","Signature","SignedRankTest","SignedRegionDistance","SignificanceLevel","SignPadding","SignTest","SimilarityRules","SimpleGraph","SimpleGraphQ","SimplePolygonQ","SimplePolyhedronQ","Simplex","Simplify","Sin","Sinc","SinghMaddalaDistribution","SingleEvaluation","SingleLetterItalics","SingleLetterStyle","SingularValueDecomposition","SingularValueList","SingularValuePlot","SingularValues","Sinh","SinhIntegral","SinIntegral","SixJSymbol","Skeleton","SkeletonTransform","SkellamDistribution","Skewness","SkewNormalDistribution","SkinStyle","Skip","SliceContourPlot3D","SliceDensityPlot3D","SliceDistribution","SliceVectorPlot3D","Slider","Slider2D","Slider2DBox","Slider2DBoxOptions","SliderBox","SliderBoxOptions","SlideView","Slot","SlotSequence","Small","SmallCircle","Smaller","SmithDecomposition","SmithDelayCompensator","SmithWatermanSimilarity","SmoothDensityHistogram","SmoothHistogram","SmoothHistogram3D","SmoothKernelDistribution","SnDispersion","Snippet","SnubPolyhedron","SocialMediaData","Socket","SocketConnect","SocketListen","SocketListener","SocketObject","SocketOpen","SocketReadMessage","SocketReadyQ","Sockets","SocketWaitAll","SocketWaitNext","SoftmaxLayer","SokalSneathDissimilarity","SolarEclipse","SolarSystemFeatureData","SolidAngle","SolidData","SolidRegionQ","Solve","SolveAlways","SolveDelayed","Sort","SortBy","SortedBy","SortedEntityClass","Sound","SoundAndGraphics","SoundNote","SoundVolume","SourceLink","Sow","Space","SpaceCurveData","SpaceForm","Spacer","Spacings","Span","SpanAdjustments","SpanCharacterRounding","SpanFromAbove","SpanFromBoth","SpanFromLeft","SpanLineThickness","SpanMaxSize","SpanMinSize","SpanningCharacters","SpanSymmetric","SparseArray","SpatialGraphDistribution","SpatialMedian","SpatialTransformationLayer","Speak","SpeakerMatchQ","SpeakTextPacket","SpearmanRankTest","SpearmanRho","SpeciesData","SpecificityGoal","SpectralLineData","Spectrogram","SpectrogramArray","Specularity","SpeechCases","SpeechInterpreter","SpeechRecognize","SpeechSynthesize","SpellingCorrection","SpellingCorrectionList","SpellingDictionaries","SpellingDictionariesPath","SpellingOptions","SpellingSuggestionsPacket","Sphere","SphereBox","SpherePoints","SphericalBesselJ","SphericalBesselY","SphericalHankelH1","SphericalHankelH2","SphericalHarmonicY","SphericalPlot3D","SphericalRegion","SphericalShell","SpheroidalEigenvalue","SpheroidalJoiningFactor","SpheroidalPS","SpheroidalPSPrime","SpheroidalQS","SpheroidalQSPrime","SpheroidalRadialFactor","SpheroidalS1","SpheroidalS1Prime","SpheroidalS2","SpheroidalS2Prime","Splice","SplicedDistribution","SplineClosed","SplineDegree","SplineKnots","SplineWeights","Split","SplitBy","SpokenString","Sqrt","SqrtBox","SqrtBoxOptions","Square","SquaredEuclideanDistance","SquareFreeQ","SquareIntersection","SquareMatrixQ","SquareRepeatingElement","SquaresR","SquareSubset","SquareSubsetEqual","SquareSuperset","SquareSupersetEqual","SquareUnion","SquareWave","SSSTriangle","StabilityMargins","StabilityMarginsStyle","StableDistribution","Stack","StackBegin","StackComplete","StackedDateListPlot","StackedListPlot","StackInhibit","StadiumShape","StandardAtmosphereData","StandardDeviation","StandardDeviationFilter","StandardForm","Standardize","Standardized","StandardOceanData","StandbyDistribution","Star","StarClusterData","StarData","StarGraph","StartAsynchronousTask","StartExternalSession","StartingStepSize","StartOfLine","StartOfString","StartProcess","StartScheduledTask","StartupSound","StartWebSession","StateDimensions","StateFeedbackGains","StateOutputEstimator","StateResponse","StateSpaceModel","StateSpaceRealization","StateSpaceTransform","StateTransformationLinearize","StationaryDistribution","StationaryWaveletPacketTransform","StationaryWaveletTransform","StatusArea","StatusCentrality","StepMonitor","StereochemistryElements","StieltjesGamma","StippleShading","StirlingS1","StirlingS2","StopAsynchronousTask","StoppingPowerData","StopScheduledTask","StrataVariables","StratonovichProcess","StreamColorFunction","StreamColorFunctionScaling","StreamDensityPlot","StreamMarkers","StreamPlot","StreamPoints","StreamPosition","Streams","StreamScale","StreamStyle","String","StringBreak","StringByteCount","StringCases","StringContainsQ","StringCount","StringDelete","StringDrop","StringEndsQ","StringExpression","StringExtract","StringForm","StringFormat","StringFreeQ","StringInsert","StringJoin","StringLength","StringMatchQ","StringPadLeft","StringPadRight","StringPart","StringPartition","StringPosition","StringQ","StringRepeat","StringReplace","StringReplaceList","StringReplacePart","StringReverse","StringRiffle","StringRotateLeft","StringRotateRight","StringSkeleton","StringSplit","StringStartsQ","StringTake","StringTemplate","StringToByteArray","StringToStream","StringTrim","StripBoxes","StripOnInput","StripWrapperBoxes","StrokeForm","StructuralImportance","StructuredArray","StructuredArrayHeadQ","StructuredSelection","StruveH","StruveL","Stub","StudentTDistribution","Style","StyleBox","StyleBoxAutoDelete","StyleData","StyleDefinitions","StyleForm","StyleHints","StyleKeyMapping","StyleMenuListing","StyleNameDialogSettings","StyleNames","StylePrint","StyleSheetPath","Subdivide","Subfactorial","Subgraph","SubMinus","SubPlus","SubresultantPolynomialRemainders","SubresultantPolynomials","Subresultants","Subscript","SubscriptBox","SubscriptBoxOptions","Subscripted","Subsequences","Subset","SubsetCases","SubsetCount","SubsetEqual","SubsetMap","SubsetPosition","SubsetQ","SubsetReplace","Subsets","SubStar","SubstitutionSystem","Subsuperscript","SubsuperscriptBox","SubsuperscriptBoxOptions","SubtitleEncoding","SubtitleTracks","Subtract","SubtractFrom","SubtractSides","SubValues","Succeeds","SucceedsEqual","SucceedsSlantEqual","SucceedsTilde","Success","SuchThat","Sum","SumConvergence","SummationLayer","Sunday","SunPosition","Sunrise","Sunset","SuperDagger","SuperMinus","SupernovaData","SuperPlus","Superscript","SuperscriptBox","SuperscriptBoxOptions","Superset","SupersetEqual","SuperStar","Surd","SurdForm","SurfaceAppearance","SurfaceArea","SurfaceColor","SurfaceData","SurfaceGraphics","SurvivalDistribution","SurvivalFunction","SurvivalModel","SurvivalModelFit","SuspendPacket","SuzukiDistribution","SuzukiGroupSuz","SwatchLegend","Switch","Symbol","SymbolName","SymletWavelet","Symmetric","SymmetricGroup","SymmetricKey","SymmetricMatrixQ","SymmetricPolynomial","SymmetricReduction","Symmetrize","SymmetrizedArray","SymmetrizedArrayRules","SymmetrizedDependentComponents","SymmetrizedIndependentComponents","SymmetrizedReplacePart","SynchronousInitialization","SynchronousUpdating","Synonyms","Syntax","SyntaxForm","SyntaxInformation","SyntaxLength","SyntaxPacket","SyntaxQ","SynthesizeMissingValues","SystemCredential","SystemCredentialData","SystemCredentialKey","SystemCredentialKeys","SystemCredentialStoreObject","SystemDialogInput","SystemException","SystemGet","SystemHelpPath","SystemInformation","SystemInformationData","SystemInstall","SystemModel","SystemModeler","SystemModelExamples","SystemModelLinearize","SystemModelParametricSimulate","SystemModelPlot","SystemModelProgressReporting","SystemModelReliability","SystemModels","SystemModelSimulate","SystemModelSimulateSensitivity","SystemModelSimulationData","SystemOpen","SystemOptions","SystemProcessData","SystemProcesses","SystemsConnectionsModel","SystemsModelDelay","SystemsModelDelayApproximate","SystemsModelDelete","SystemsModelDimensions","SystemsModelExtract","SystemsModelFeedbackConnect","SystemsModelLabels","SystemsModelLinearity","SystemsModelMerge","SystemsModelOrder","SystemsModelParallelConnect","SystemsModelSeriesConnect","SystemsModelStateFeedbackConnect","SystemsModelVectorRelativeOrders","SystemStub","SystemTest","Tab","TabFilling","Table","TableAlignments","TableDepth","TableDirections","TableForm","TableHeadings","TableSpacing","TableView","TableViewBox","TableViewBoxBackground","TableViewBoxItemSize","TableViewBoxOptions","TabSpacings","TabView","TabViewBox","TabViewBoxOptions","TagBox","TagBoxNote","TagBoxOptions","TaggingRules","TagSet","TagSetDelayed","TagStyle","TagUnset","Take","TakeDrop","TakeLargest","TakeLargestBy","TakeList","TakeSmallest","TakeSmallestBy","TakeWhile","Tally","Tan","Tanh","TargetDevice","TargetFunctions","TargetSystem","TargetUnits","TaskAbort","TaskExecute","TaskObject","TaskRemove","TaskResume","Tasks","TaskSuspend","TaskWait","TautologyQ","TelegraphProcess","TemplateApply","TemplateArgBox","TemplateBox","TemplateBoxOptions","TemplateEvaluate","TemplateExpression","TemplateIf","TemplateObject","TemplateSequence","TemplateSlot","TemplateSlotSequence","TemplateUnevaluated","TemplateVerbatim","TemplateWith","TemporalData","TemporalRegularity","Temporary","TemporaryVariable","TensorContract","TensorDimensions","TensorExpand","TensorProduct","TensorQ","TensorRank","TensorReduce","TensorSymmetry","TensorTranspose","TensorWedge","TestID","TestReport","TestReportObject","TestResultObject","Tetrahedron","TetrahedronBox","TetrahedronBoxOptions","TeXForm","TeXSave","Text","Text3DBox","Text3DBoxOptions","TextAlignment","TextBand","TextBoundingBox","TextBox","TextCases","TextCell","TextClipboardType","TextContents","TextData","TextElement","TextForm","TextGrid","TextJustification","TextLine","TextPacket","TextParagraph","TextPosition","TextRecognize","TextSearch","TextSearchReport","TextSentences","TextString","TextStructure","TextStyle","TextTranslation","Texture","TextureCoordinateFunction","TextureCoordinateScaling","TextWords","Therefore","ThermodynamicData","ThermometerGauge","Thick","Thickness","Thin","Thinning","ThisLink","ThompsonGroupTh","Thread","ThreadingLayer","ThreeJSymbol","Threshold","Through","Throw","ThueMorse","Thumbnail","Thursday","Ticks","TicksStyle","TideData","Tilde","TildeEqual","TildeFullEqual","TildeTilde","TimeConstrained","TimeConstraint","TimeDirection","TimeFormat","TimeGoal","TimelinePlot","TimeObject","TimeObjectQ","TimeRemaining","Times","TimesBy","TimeSeries","TimeSeriesAggregate","TimeSeriesForecast","TimeSeriesInsert","TimeSeriesInvertibility","TimeSeriesMap","TimeSeriesMapThread","TimeSeriesModel","TimeSeriesModelFit","TimeSeriesResample","TimeSeriesRescale","TimeSeriesShift","TimeSeriesThread","TimeSeriesWindow","TimeUsed","TimeValue","TimeWarpingCorrespondence","TimeWarpingDistance","TimeZone","TimeZoneConvert","TimeZoneOffset","Timing","Tiny","TitleGrouping","TitsGroupT","ToBoxes","ToCharacterCode","ToColor","ToContinuousTimeModel","ToDate","Today","ToDiscreteTimeModel","ToEntity","ToeplitzMatrix","ToExpression","ToFileName","Together","Toggle","ToggleFalse","Toggler","TogglerBar","TogglerBox","TogglerBoxOptions","ToHeldExpression","ToInvertibleTimeSeries","TokenWords","Tolerance","ToLowerCase","Tomorrow","ToNumberField","TooBig","Tooltip","TooltipBox","TooltipBoxOptions","TooltipDelay","TooltipStyle","ToonShading","Top","TopHatTransform","ToPolarCoordinates","TopologicalSort","ToRadicals","ToRules","ToSphericalCoordinates","ToString","Total","TotalHeight","TotalLayer","TotalVariationFilter","TotalWidth","TouchPosition","TouchscreenAutoZoom","TouchscreenControlPlacement","ToUpperCase","Tr","Trace","TraceAbove","TraceAction","TraceBackward","TraceDepth","TraceDialog","TraceForward","TraceInternal","TraceLevel","TraceOff","TraceOn","TraceOriginal","TracePrint","TraceScan","TrackedSymbols","TrackingFunction","TracyWidomDistribution","TradingChart","TraditionalForm","TraditionalFunctionNotation","TraditionalNotation","TraditionalOrder","TrainingProgressCheckpointing","TrainingProgressFunction","TrainingProgressMeasurements","TrainingProgressReporting","TrainingStoppingCriterion","TrainingUpdateSchedule","TransferFunctionCancel","TransferFunctionExpand","TransferFunctionFactor","TransferFunctionModel","TransferFunctionPoles","TransferFunctionTransform","TransferFunctionZeros","TransformationClass","TransformationFunction","TransformationFunctions","TransformationMatrix","TransformedDistribution","TransformedField","TransformedProcess","TransformedRegion","TransitionDirection","TransitionDuration","TransitionEffect","TransitiveClosureGraph","TransitiveReductionGraph","Translate","TranslationOptions","TranslationTransform","Transliterate","Transparent","TransparentColor","Transpose","TransposeLayer","TrapSelection","TravelDirections","TravelDirectionsData","TravelDistance","TravelDistanceList","TravelMethod","TravelTime","TreeForm","TreeGraph","TreeGraphQ","TreePlot","TrendStyle","Triangle","TriangleCenter","TriangleConstruct","TriangleMeasurement","TriangleWave","TriangularDistribution","TriangulateMesh","Trig","TrigExpand","TrigFactor","TrigFactorList","Trigger","TrigReduce","TrigToExp","TrimmedMean","TrimmedVariance","TropicalStormData","True","TrueQ","TruncatedDistribution","TruncatedPolyhedron","TsallisQExponentialDistribution","TsallisQGaussianDistribution","TTest","Tube","TubeBezierCurveBox","TubeBezierCurveBoxOptions","TubeBox","TubeBoxOptions","TubeBSplineCurveBox","TubeBSplineCurveBoxOptions","Tuesday","TukeyLambdaDistribution","TukeyWindow","TunnelData","Tuples","TuranGraph","TuringMachine","TuttePolynomial","TwoWayRule","Typed","TypeSpecifier","UnateQ","Uncompress","UnconstrainedParameters","Undefined","UnderBar","Underflow","Underlined","Underoverscript","UnderoverscriptBox","UnderoverscriptBoxOptions","Underscript","UnderscriptBox","UnderscriptBoxOptions","UnderseaFeatureData","UndirectedEdge","UndirectedGraph","UndirectedGraphQ","UndoOptions","UndoTrackedVariables","Unequal","UnequalTo","Unevaluated","UniformDistribution","UniformGraphDistribution","UniformPolyhedron","UniformSumDistribution","Uninstall","Union","UnionedEntityClass","UnionPlus","Unique","UnitaryMatrixQ","UnitBox","UnitConvert","UnitDimensions","Unitize","UnitRootTest","UnitSimplify","UnitStep","UnitSystem","UnitTriangle","UnitVector","UnitVectorLayer","UnityDimensions","UniverseModelData","UniversityData","UnixTime","Unprotect","UnregisterExternalEvaluator","UnsameQ","UnsavedVariables","Unset","UnsetShared","UntrackedVariables","Up","UpArrow","UpArrowBar","UpArrowDownArrow","Update","UpdateDynamicObjects","UpdateDynamicObjectsSynchronous","UpdateInterval","UpdatePacletSites","UpdateSearchIndex","UpDownArrow","UpEquilibrium","UpperCaseQ","UpperLeftArrow","UpperRightArrow","UpperTriangularize","UpperTriangularMatrixQ","Upsample","UpSet","UpSetDelayed","UpTee","UpTeeArrow","UpTo","UpValues","URL","URLBuild","URLDecode","URLDispatcher","URLDownload","URLDownloadSubmit","URLEncode","URLExecute","URLExpand","URLFetch","URLFetchAsynchronous","URLParse","URLQueryDecode","URLQueryEncode","URLRead","URLResponseTime","URLSave","URLSaveAsynchronous","URLShorten","URLSubmit","UseGraphicsRange","UserDefinedWavelet","Using","UsingFrontEnd","UtilityFunction","V2Get","ValenceErrorHandling","ValidationLength","ValidationSet","Value","ValueBox","ValueBoxOptions","ValueDimensions","ValueForm","ValuePreprocessingFunction","ValueQ","Values","ValuesData","Variables","Variance","VarianceEquivalenceTest","VarianceEstimatorFunction","VarianceGammaDistribution","VarianceTest","VectorAngle","VectorAround","VectorAspectRatio","VectorColorFunction","VectorColorFunctionScaling","VectorDensityPlot","VectorGlyphData","VectorGreater","VectorGreaterEqual","VectorLess","VectorLessEqual","VectorMarkers","VectorPlot","VectorPlot3D","VectorPoints","VectorQ","VectorRange","Vectors","VectorScale","VectorScaling","VectorSizes","VectorStyle","Vee","Verbatim","Verbose","VerboseConvertToPostScriptPacket","VerificationTest","VerifyConvergence","VerifyDerivedKey","VerifyDigitalSignature","VerifyFileSignature","VerifyInterpretation","VerifySecurityCertificates","VerifySolutions","VerifyTestAssumptions","Version","VersionedPreferences","VersionNumber","VertexAdd","VertexCapacity","VertexColors","VertexComponent","VertexConnectivity","VertexContract","VertexCoordinateRules","VertexCoordinates","VertexCorrelationSimilarity","VertexCosineSimilarity","VertexCount","VertexCoverQ","VertexDataCoordinates","VertexDegree","VertexDelete","VertexDiceSimilarity","VertexEccentricity","VertexInComponent","VertexInDegree","VertexIndex","VertexJaccardSimilarity","VertexLabeling","VertexLabels","VertexLabelStyle","VertexList","VertexNormals","VertexOutComponent","VertexOutDegree","VertexQ","VertexRenderingFunction","VertexReplace","VertexShape","VertexShapeFunction","VertexSize","VertexStyle","VertexTextureCoordinates","VertexWeight","VertexWeightedGraphQ","Vertical","VerticalBar","VerticalForm","VerticalGauge","VerticalSeparator","VerticalSlider","VerticalTilde","Video","VideoEncoding","VideoExtractFrames","VideoFrameList","VideoFrameMap","VideoPause","VideoPlay","VideoQ","VideoStop","VideoStream","VideoStreams","VideoTimeSeries","VideoTracks","VideoTrim","ViewAngle","ViewCenter","ViewMatrix","ViewPoint","ViewPointSelectorSettings","ViewPort","ViewProjection","ViewRange","ViewVector","ViewVertical","VirtualGroupData","Visible","VisibleCell","VoiceStyleData","VoigtDistribution","VolcanoData","Volume","VonMisesDistribution","VoronoiMesh","WaitAll","WaitAsynchronousTask","WaitNext","WaitUntil","WakebyDistribution","WalleniusHypergeometricDistribution","WaringYuleDistribution","WarpingCorrespondence","WarpingDistance","WatershedComponents","WatsonUSquareTest","WattsStrogatzGraphDistribution","WaveletBestBasis","WaveletFilterCoefficients","WaveletImagePlot","WaveletListPlot","WaveletMapIndexed","WaveletMatrixPlot","WaveletPhi","WaveletPsi","WaveletScale","WaveletScalogram","WaveletThreshold","WeaklyConnectedComponents","WeaklyConnectedGraphComponents","WeaklyConnectedGraphQ","WeakStationarity","WeatherData","WeatherForecastData","WebAudioSearch","WebElementObject","WeberE","WebExecute","WebImage","WebImageSearch","WebSearch","WebSessionObject","WebSessions","WebWindowObject","Wedge","Wednesday","WeibullDistribution","WeierstrassE1","WeierstrassE2","WeierstrassE3","WeierstrassEta1","WeierstrassEta2","WeierstrassEta3","WeierstrassHalfPeriods","WeierstrassHalfPeriodW1","WeierstrassHalfPeriodW2","WeierstrassHalfPeriodW3","WeierstrassInvariantG2","WeierstrassInvariantG3","WeierstrassInvariants","WeierstrassP","WeierstrassPPrime","WeierstrassSigma","WeierstrassZeta","WeightedAdjacencyGraph","WeightedAdjacencyMatrix","WeightedData","WeightedGraphQ","Weights","WelchWindow","WheelGraph","WhenEvent","Which","While","White","WhiteNoiseProcess","WhitePoint","Whitespace","WhitespaceCharacter","WhittakerM","WhittakerW","WienerFilter","WienerProcess","WignerD","WignerSemicircleDistribution","WikidataData","WikidataSearch","WikipediaData","WikipediaSearch","WilksW","WilksWTest","WindDirectionData","WindingCount","WindingPolygon","WindowClickSelect","WindowElements","WindowFloating","WindowFrame","WindowFrameElements","WindowMargins","WindowMovable","WindowOpacity","WindowPersistentStyles","WindowSelected","WindowSize","WindowStatusArea","WindowTitle","WindowToolbars","WindowWidth","WindSpeedData","WindVectorData","WinsorizedMean","WinsorizedVariance","WishartMatrixDistribution","With","WolframAlpha","WolframAlphaDate","WolframAlphaQuantity","WolframAlphaResult","WolframLanguageData","Word","WordBoundary","WordCharacter","WordCloud","WordCount","WordCounts","WordData","WordDefinition","WordFrequency","WordFrequencyData","WordList","WordOrientation","WordSearch","WordSelectionFunction","WordSeparators","WordSpacings","WordStem","WordTranslation","WorkingPrecision","WrapAround","Write","WriteLine","WriteString","Wronskian","XMLElement","XMLObject","XMLTemplate","Xnor","Xor","XYZColor","Yellow","Yesterday","YuleDissimilarity","ZernikeR","ZeroSymmetric","ZeroTest","ZeroWidthTimes","Zeta","ZetaZero","ZIPCodeData","ZipfDistribution","ZoomCenter","ZoomFactor","ZTest","ZTransform","$Aborted","$ActivationGroupID","$ActivationKey","$ActivationUserRegistered","$AddOnsDirectory","$AllowDataUpdates","$AllowExternalChannelFunctions","$AllowInternet","$AssertFunction","$Assumptions","$AsynchronousTask","$AudioDecoders","$AudioEncoders","$AudioInputDevices","$AudioOutputDevices","$BaseDirectory","$BasePacletsDirectory","$BatchInput","$BatchOutput","$BlockchainBase","$BoxForms","$ByteOrdering","$CacheBaseDirectory","$Canceled","$ChannelBase","$CharacterEncoding","$CharacterEncodings","$CloudAccountName","$CloudBase","$CloudConnected","$CloudConnection","$CloudCreditsAvailable","$CloudEvaluation","$CloudExpressionBase","$CloudObjectNameFormat","$CloudObjectURLType","$CloudRootDirectory","$CloudSymbolBase","$CloudUserID","$CloudUserUUID","$CloudVersion","$CloudVersionNumber","$CloudWolframEngineVersionNumber","$CommandLine","$CompilationTarget","$ConditionHold","$ConfiguredKernels","$Context","$ContextPath","$ControlActiveSetting","$Cookies","$CookieStore","$CreationDate","$CurrentLink","$CurrentTask","$CurrentWebSession","$DataStructures","$DateStringFormat","$DefaultAudioInputDevice","$DefaultAudioOutputDevice","$DefaultFont","$DefaultFrontEnd","$DefaultImagingDevice","$DefaultLocalBase","$DefaultMailbox","$DefaultNetworkInterface","$DefaultPath","$DefaultProxyRules","$DefaultSystemCredentialStore","$Display","$DisplayFunction","$DistributedContexts","$DynamicEvaluation","$Echo","$EmbedCodeEnvironments","$EmbeddableServices","$EntityStores","$Epilog","$EvaluationCloudBase","$EvaluationCloudObject","$EvaluationEnvironment","$ExportFormats","$ExternalIdentifierTypes","$ExternalStorageBase","$Failed","$FinancialDataSource","$FontFamilies","$FormatType","$FrontEnd","$FrontEndSession","$GeoEntityTypes","$GeoLocation","$GeoLocationCity","$GeoLocationCountry","$GeoLocationPrecision","$GeoLocationSource","$HistoryLength","$HomeDirectory","$HTMLExportRules","$HTTPCookies","$HTTPRequest","$IgnoreEOF","$ImageFormattingWidth","$ImageResolution","$ImagingDevice","$ImagingDevices","$ImportFormats","$IncomingMailSettings","$InitialDirectory","$Initialization","$InitializationContexts","$Input","$InputFileName","$InputStreamMethods","$Inspector","$InstallationDate","$InstallationDirectory","$InterfaceEnvironment","$InterpreterTypes","$IterationLimit","$KernelCount","$KernelID","$Language","$LaunchDirectory","$LibraryPath","$LicenseExpirationDate","$LicenseID","$LicenseProcesses","$LicenseServer","$LicenseSubprocesses","$LicenseType","$Line","$Linked","$LinkSupported","$LoadedFiles","$LocalBase","$LocalSymbolBase","$MachineAddresses","$MachineDomain","$MachineDomains","$MachineEpsilon","$MachineID","$MachineName","$MachinePrecision","$MachineType","$MaxExtraPrecision","$MaxLicenseProcesses","$MaxLicenseSubprocesses","$MaxMachineNumber","$MaxNumber","$MaxPiecewiseCases","$MaxPrecision","$MaxRootDegree","$MessageGroups","$MessageList","$MessagePrePrint","$Messages","$MinMachineNumber","$MinNumber","$MinorReleaseNumber","$MinPrecision","$MobilePhone","$ModuleNumber","$NetworkConnected","$NetworkInterfaces","$NetworkLicense","$NewMessage","$NewSymbol","$NotebookInlineStorageLimit","$Notebooks","$NoValue","$NumberMarks","$Off","$OperatingSystem","$Output","$OutputForms","$OutputSizeLimit","$OutputStreamMethods","$Packages","$ParentLink","$ParentProcessID","$PasswordFile","$PatchLevelID","$Path","$PathnameSeparator","$PerformanceGoal","$Permissions","$PermissionsGroupBase","$PersistenceBase","$PersistencePath","$PipeSupported","$PlotTheme","$Post","$Pre","$PreferencesDirectory","$PreInitialization","$PrePrint","$PreRead","$PrintForms","$PrintLiteral","$Printout3DPreviewer","$ProcessID","$ProcessorCount","$ProcessorType","$ProductInformation","$ProgramName","$PublisherID","$RandomState","$RecursionLimit","$RegisteredDeviceClasses","$RegisteredUserName","$ReleaseNumber","$RequesterAddress","$RequesterWolframID","$RequesterWolframUUID","$RootDirectory","$ScheduledTask","$ScriptCommandLine","$ScriptInputString","$SecuredAuthenticationKeyTokens","$ServiceCreditsAvailable","$Services","$SessionID","$SetParentLink","$SharedFunctions","$SharedVariables","$SoundDisplay","$SoundDisplayFunction","$SourceLink","$SSHAuthentication","$SubtitleDecoders","$SubtitleEncoders","$SummaryBoxDataSizeLimit","$SuppressInputFormHeads","$SynchronousEvaluation","$SyntaxHandler","$System","$SystemCharacterEncoding","$SystemCredentialStore","$SystemID","$SystemMemory","$SystemShell","$SystemTimeZone","$SystemWordLength","$TemplatePath","$TemporaryDirectory","$TemporaryPrefix","$TestFileName","$TextStyle","$TimedOut","$TimeUnit","$TimeZone","$TimeZoneEntity","$TopDirectory","$TraceOff","$TraceOn","$TracePattern","$TracePostAction","$TracePreAction","$UnitSystem","$Urgent","$UserAddOnsDirectory","$UserAgentLanguages","$UserAgentMachine","$UserAgentName","$UserAgentOperatingSystem","$UserAgentString","$UserAgentVersion","$UserBaseDirectory","$UserBasePacletsDirectory","$UserDocumentsDirectory","$Username","$UserName","$UserURLBase","$Version","$VersionNumber","$VideoDecoders","$VideoEncoders","$VoiceStyles","$WolframDocumentsDirectory","$WolframID","$WolframUUID"];function r(e){return e?"string"==typeof e?e:e.source:null}function o(e){return i("(",e,")?")}function i(...e){return e.map(e=>r(e)).join("")}function a(...e){return"("+e.map(e=>r(e)).join("|")+")"}e.exports=function(e){const t=a(i(/([2-9]|[1-2]\d|[3][0-5])\^\^/,/(\w*\.\w+|\w+\.\w*|\w+)/),/(\d*\.\d+|\d+\.\d*|\d+)/),r={className:"number",relevance:0,begin:i(t,o(a(/``[+-]?(\d*\.\d+|\d+\.\d*|\d+)/,/`([+-]?(\d*\.\d+|\d+\.\d*|\d+))?/)),o(/\*\^[+-]?\d+/))},s=/[a-zA-Z$][a-zA-Z0-9$]*/,c=new Set(n),l={variants:[{className:"builtin-symbol",begin:s,"on:begin":(e,t)=>{c.has(e[0])||t.ignoreMatch()}},{className:"symbol",relevance:0,begin:s}]},u={className:"message-name",relevance:0,begin:i("::",s)};return{name:"Mathematica",aliases:["mma","wl"],classNameAliases:{brace:"punctuation",pattern:"type",slot:"type",symbol:"variable","named-character":"variable","builtin-symbol":"built_in","message-name":"string"},contains:[e.COMMENT(/\(\*/,/\*\)/,{contains:["self"]}),{className:"pattern",relevance:0,begin:/([a-zA-Z$][a-zA-Z0-9$]*)?_+([a-zA-Z$][a-zA-Z0-9$]*)?/},{className:"slot",relevance:0,begin:/#[a-zA-Z$][a-zA-Z0-9$]*|#+[0-9]?/},u,l,{className:"named-character",begin:/\\\[[$a-zA-Z][$a-zA-Z0-9]+\]/},e.QUOTE_STRING_MODE,r,{className:"operator",relevance:0,begin:/[+\-*/,;.:@~=><&|_`'^?!%]+/},{className:"brace",relevance:0,begin:/[[\](){}]/}]}}},function(e,t){e.exports=function(e){var t={relevance:0,contains:[{begin:"('|\\.')+"}]};return{name:"Matlab",keywords:{keyword:"arguments break case catch classdef continue else elseif end enumeration events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i|0 inf nan isnan isinf isfinite j|0 why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table readtable writetable sortrows sort figure plot plot3 scatter scatter3 cellfun legend intersect ismember procrustes hold num2cell "},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{className:"built_in",begin:/true|false/,relevance:0,starts:t},{begin:"[a-zA-Z][a-zA-Z_0-9]*('|\\.')+",relevance:0},{className:"number",begin:e.C_NUMBER_RE,relevance:0,starts:t},{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{begin:/\]|\}|\)/,relevance:0,starts:t},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}],starts:t},e.COMMENT("^\\s*%\\{\\s*$","^\\s*%\\}\\s*$"),e.COMMENT("%","$")]}}},function(e,t){e.exports=function(e){return{name:"Maxima",keywords:{$pattern:"[A-Za-z_%][0-9A-Za-z_%]*",keyword:"if then else elseif for thru do while unless step in and or not",literal:"true false unknown inf minf ind und %e %i %pi %phi %gamma",built_in:" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv connected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree derivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetric implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_display init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric random_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_binomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remvalue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trace tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlying_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c capping cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependencies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_vertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hypergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat prompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",symbol:"_ __ %|0 %%|0"},contains:[{className:"comment",begin:"/\\*",end:"\\*/",contains:["self"]},e.QUOTE_STRING_MODE,{className:"number",relevance:0,variants:[{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",relevance:10},{begin:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{begin:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],illegal:/@/}}},function(e,t){e.exports=function(e){return{name:"MEL",keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:"</",contains:[e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/[$%@](\^\w\b|#\w+|[^\s\w{]|\{\w+\}|\w+)/},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t=e.COMMENT("%","$"),n=e.inherit(e.APOS_STRING_MODE,{relevance:0}),r=e.inherit(e.QUOTE_STRING_MODE,{relevance:0});return r.contains=r.contains.slice(),r.contains.push({className:"subst",begin:"\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]",relevance:0}),{name:"Mercury",aliases:["m","moo"],keywords:{keyword:"module use_module import_module include_module end_module initialise mutable initialize finalize finalise interface implementation pred mode func type inst solver any_pred any_func is semidet det nondet multi erroneous failure cc_nondet cc_multi typeclass instance where pragma promise external trace atomic or_else require_complete_switch require_det require_semidet require_multi require_nondet require_cc_multi require_cc_nondet require_erroneous require_failure",meta:"inline no_inline type_spec source_file fact_table obsolete memo loop_check minimal_model terminates does_not_terminate check_termination promise_equivalent_clauses foreign_proc foreign_decl foreign_code foreign_type foreign_import_module foreign_export_enum foreign_export foreign_enum may_call_mercury will_not_call_mercury thread_safe not_thread_safe maybe_thread_safe promise_pure promise_semipure tabled_for_io local untrailed trailed attach_to_io_state can_pass_as_mercury_type stable will_not_throw_exception may_modify_trail will_not_modify_trail may_duplicate may_not_duplicate affects_liveness does_not_affect_liveness doesnt_affect_liveness no_sharing unknown_sharing sharing",built_in:"some all not if then else true fail false try catch catch_any semidet_true semidet_false semidet_fail impure_true impure semipure"},contains:[{className:"built_in",variants:[{begin:"<=>"},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},{className:"built_in",variants:[{begin:":-\\|--\x3e"},{begin:"=",relevance:0}]},t,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"0'.\\|0[box][0-9a-fA-F]*"},e.NUMBER_MODE,n,r,{begin:/:-/},{begin:/\.$/}]}}},function(e,t){e.exports=function(e){return{name:"MIPS Assembly",case_insensitive:!0,aliases:["mips"],keywords:{$pattern:"\\.?"+e.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},contains:[{className:"keyword",begin:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|c\\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|div\\.[ds]|ldx?c1|luxc1|lwx?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?u?|tnei?|wait|wrpgpr)",end:"\\s"},e.COMMENT("[;#](?!\\s*$)","$"),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"0x[0-9a-f]+"},{begin:"\\b-?\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^\\s*[0-9]+:"},{begin:"[0-9]+[bf]"}],relevance:0}],illegal:/\//}}},function(e,t){e.exports=function(e){return{name:"Mizar",keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[e.COMMENT("::","$")]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(...e){return e.map(e=>n(e)).join("")}function o(...e){return"("+e.map(e=>n(e)).join("|")+")"}e.exports=function(e){const t=/[dualxmsipngr]{0,12}/,n={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"].join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:n},a={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:r(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},c=[e.BACKSLASH_ESCAPE,i,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],u=(e,n,o="\\1")=>{const i="\\1"===o?o:r(o,n);return r(r("(?:",e,")"),n,/(?:\\.|[^\\\/])*?/,i,/(?:\\.|[^\\\/])*?/,o,t)},d=(e,n,o)=>r(r("(?:",e,")"),n,/(?:\\.|[^\\\/])*?/,o,t),h=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:u("s|tr|y",o(...l))},{begin:u("s|tr|y","\\(","\\)")},{begin:u("s|tr|y","\\[","\\]")},{begin:u("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",o(...l),/\1/)},{begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=h,a.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:n,contains:h}}},function(e,t){e.exports=function(e){return{name:"Mojolicious",subLanguage:"xml",contains:[{className:"meta",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}},function(e,t){e.exports=function(e){const t={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},e.NUMBER_MODE]};return{name:"Monkey",case_insensitive:!0,keywords:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw import",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},illegal:/\/\*/,contains:[e.COMMENT("#rem","#end"),e.COMMENT("'","$",{relevance:0}),{className:"function",beginKeywords:"function method",end:"[(=:]|$",illegal:/\n/,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"$",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{className:"built_in",begin:"\\b(self|super)\\b"},{className:"meta",begin:"\\s*#",end:"$",keywords:{"meta-keyword":"if else elseif endif end then"}},{className:"meta",begin:"^\\s*strict\\b"},{beginKeywords:"alias",end:"=",contains:[e.UNDERSCORE_TITLE_MODE]},e.QUOTE_STRING_MODE,t]}}},function(e,t){e.exports=function(e){const t={keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={className:"subst",begin:/#\{/,end:/\}/,keywords:t},o=[e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r]}]},{className:"built_in",begin:"@__"+e.IDENT_RE},{begin:"@"+e.IDENT_RE},{begin:e.IDENT_RE+"\\\\"+e.IDENT_RE}];r.contains=o;const i=e.inherit(e.TITLE_MODE,{begin:n}),a={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{name:"MoonScript",aliases:["moon"],keywords:t,illegal:/\/\*/,contains:o.concat([e.COMMENT("--","$"),{className:"function",begin:"^\\s*"+n+"\\s*=\\s*(\\(.*\\)\\s*)?\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[i,a]},{begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:"(\\(.*\\)\\s*)?\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[a]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[i]},i]},{className:"name",begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}},function(e,t){e.exports=function(e){return{name:"N1QL",case_insensitive:!0,contains:[{beginKeywords:"build create index delete drop explain infer|10 insert merge prepare select update upsert|10",end:/;/,endsWithParent:!0,keywords:{keyword:"all alter analyze and any array as asc begin between binary boolean break bucket build by call case cast cluster collate collection commit connect continue correlate cover create database dataset datastore declare decrement delete derived desc describe distinct do drop each element else end every except exclude execute exists explain fetch first flatten for force from function grant group gsi having if ignore ilike in include increment index infer inline inner insert intersect into is join key keys keyspace known last left let letting like limit lsm map mapping matched materialized merge minus namespace nest not number object offset on option or order outer over parse partition password path pool prepare primary private privilege procedure public raw realm reduce rename return returning revoke right role rollback satisfies schema select self semi set show some start statistics string system then to transaction trigger truncate under union unique unknown unnest unset update upsert use user using validate value valued values via view when where while with within work xor",literal:"true false null missing|5",built_in:"array_agg array_append array_concat array_contains array_count array_distinct array_ifnull array_length array_max array_min array_position array_prepend array_put array_range array_remove array_repeat array_replace array_reverse array_sort array_sum avg count max min sum greatest least ifmissing ifmissingornull ifnull missingif nullif ifinf ifnan ifnanorinf naninf neginfif posinfif clock_millis clock_str date_add_millis date_add_str date_diff_millis date_diff_str date_part_millis date_part_str date_trunc_millis date_trunc_str duration_to_str millis str_to_millis millis_to_str millis_to_utc millis_to_zone_name now_millis now_str str_to_duration str_to_utc str_to_zone_name decode_json encode_json encoded_size poly_length base64 base64_encode base64_decode meta uuid abs acos asin atan atan2 ceil cos degrees e exp ln log floor pi power radians random round sign sin sqrt tan trunc object_length object_names object_pairs object_inner_pairs object_values object_inner_values object_add object_put object_remove object_unwrap regexp_contains regexp_like regexp_position regexp_replace contains initcap length lower ltrim position repeat replace rtrim split substr title trim upper isarray isatom isboolean isnumber isobject isstring type toarray toatom toboolean tonumber toobject tostring"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE],relevance:2},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/\}/},{begin:/[$@]/+e.UNDERSCORE_IDENT_RE}]},n={endsWithParent:!0,keywords:{$pattern:"[a-z/_]+",literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[t]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},t]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\{/,contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|\\{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:n}],relevance:0}],illegal:"[^\\s\\}]"}}},function(e,t){e.exports=function(e){return{name:"Nim",keywords:{keyword:"addr and as asm bind block break case cast const continue converter discard distinct div do elif else end enum except export finally for from func generic if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while with without xor yield",literal:"shared guarded stdin stdout stderr result true false",built_in:"int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 bool char string cstring pointer expr stmt void auto any range array openarray varargs seq set clong culong cchar cschar cshort cint csize clonglong cfloat cdouble clongdouble cuchar cushort cuint culonglong cstringarray semistatic"},contains:[{className:"meta",begin:/\{\./,end:/\.\}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t={keyword:"rec with let in inherit assert if else then",literal:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},n={className:"subst",begin:/\$\{/,end:/\}/,keywords:t},r={className:"string",contains:[n],variants:[{begin:"''",end:"''"},{begin:'"',end:'"'}]},o=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,{begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/\S+/}]}];return n.contains=o,{name:"Nix",aliases:["nixos"],keywords:t,contains:o}}},function(e,t){e.exports=function(e){return{name:"Node REPL",contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$",subLanguage:"javascript"}},variants:[{begin:/^>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}},function(e,t){e.exports=function(e){const t={className:"variable",begin:/\$+\{[\w.:-]+\}/},n={className:"variable",begin:/\$+\w+/,illegal:/\(\)\{\}/},r={className:"variable",begin:/\$+\([\w^.:-]+\)/},o={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"},{begin:"`",end:"`"}],illegal:/\n/,contains:[{className:"meta",begin:/\$(\\[nrt]|\$)/},{className:"variable",begin:/\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/},t,n,r]};return{name:"NSIS",case_insensitive:!1,keywords:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecShellWait ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileWriteUTF16LE FileSeek FileWrite FileWriteByte FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetKnownFolderPath GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfRtlLanguage IfShellVarContextAll IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText Int64Cmp Int64CmpU Int64Fmt IntCmp IntCmpU IntFmt IntOp IntPtrCmp IntPtrCmpU IntPtrOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadAndSetImage LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestLongPathAware ManifestMaxVersionTested ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PEAddResource PEDllCharacteristics PERemoveResource PESubsysVer Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegMultiStr WriteRegNone WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib"},contains:[e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),{className:"function",beginKeywords:"Function PageEx Section SectionGroup",end:"$"},o,{className:"keyword",begin:/!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|searchparse|searchreplace|system|tempfile|undef|verbose|warning)/},t,n,r,{className:"params",begin:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},{className:"class",begin:/\w+::\w+/},e.NUMBER_MODE]}}},function(e,t){e.exports=function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:"@interface @class @protocol @implementation"};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{$pattern:t,keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.split(" ").join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}},function(e,t){e.exports=function(e){return{name:"OCaml",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/->/}]}}},function(e,t){e.exports=function(e){const t={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},n={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},r=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),o={className:"function",beginKeywords:"module function",end:/=|\{/,contains:[{className:"params",begin:"\\(",end:"\\)",contains:["self",n,r,t,{className:"literal",begin:"false|true|PI|undef"}]},e.UNDERSCORE_TITLE_MODE]};return{name:"OpenSCAD",aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"meta",keywords:{"meta-keyword":"include use"},begin:"include|use <",end:">"},r,t,{begin:"[*!#%]",relevance:0},o]}}},function(e,t){e.exports=function(e){const t={$pattern:/\.?\w+/,keyword:"abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained"},n=e.COMMENT(/\{/,/\}/,{relevance:0}),r=e.COMMENT("\\(\\*","\\*\\)",{relevance:10}),o={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},i={className:"string",begin:"(#\\d+)+"},a={className:"function",beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",keywords:t,contains:[o,i]},n,r]};return{name:"Oxygene",case_insensitive:!0,keywords:t,illegal:'("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',contains:[n,r,e.C_LINE_COMMENT_MODE,o,i,e.NUMBER_MODE,a,{className:"class",begin:"=\\bclass\\b",end:"end;",keywords:t,contains:[o,i,n,r,e.C_LINE_COMMENT_MODE,a]}]}}},function(e,t){e.exports=function(e){const t=e.COMMENT(/\{/,/\}/,{contains:["self"]});return{name:"Parser3",subLanguage:"xml",relevance:0,contains:[e.COMMENT("^#","$"),e.COMMENT(/\^rem\{/,/\}/,{relevance:10,contains:[t]}),{className:"meta",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:/\$\{?[\w\-.:]+\}?/},{className:"keyword",begin:/\^[\w\-.:]+/},{className:"number",begin:"\\^#[0-9a-fA-F]+"},e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"Packet Filter config",aliases:["pf.conf"],keywords:{$pattern:/[a-z0-9_<>-]+/,built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to route allow-opts divert-packet divert-reply divert-to flags group icmp-type icmp6-type label once probability recieved-on rtable prio queue tos tag tagged user keep fragment for os drop af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin source-hash static-port dup-to reply-to route-to parent bandwidth default min max qlimit block-policy debug fingerprints hostid limit loginterface optimization reassemble ruleset-optimization basic none profile skip state-defaults state-policy timeout const counters persist no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy source-track global rule max-src-nodes max-src-states max-src-conn max-src-conn-rate overload flush scrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[e.HASH_COMMENT_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE,{className:"variable",begin:/\$[\w\d#@][\w\d_]*/},{className:"variable",begin:/<(?!\/)/,end:/>/}]}}},function(e,t){e.exports=function(e){const t=e.COMMENT("--","$"),n="BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 MACADDR MACADDR8 MONEY NUMERIC DEC DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR NAME OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROLE|10 REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ",r=n.trim().split(" ").map((function(e){return e.split("|")[0]})).join("|"),o="ARRAY_AGG AVG BIT_AND BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR_POP VAR_SAMP PERCENTILE_CONT PERCENTILE_DISC ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE NUM_NONNULLS NUM_NULLS ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN LOG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT TRUNC WIDTH_BUCKET RANDOM SETSEED ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ASCII BTRIM CHR CONCAT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAP LEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLACE REGEXP_SPLIT_TO_ARRAY REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR TO_ASCII TO_HEX TRANSLATE OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 TIMEOFDAY TRANSACTION_TIMESTAMP|10 ENUM_FIRST ENUM_LAST ENUM_RANGE AREA CENTER DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILY INET_MERGE MACADDR8_SET7BIT ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR_TO_ARRAY TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_TO_XML_AND_XMLSCHEMA QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA CURSOR_TO_XML CURSOR_TO_XMLSCHEMA SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA DATABASE_TO_XML DATABASE_TO_XMLSCHEMA DATABASE_TO_XML_AND_XMLSCHEMA XMLATTRIBUTES TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_PATH JSONB_EXTRACT_PATH JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEXT JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY CURRVAL LASTVAL NEXTVAL SETVAL COALESCE NULLIF GREATEST LEAST ARRAY_APPEND ARRAY_CAT ARRAY_NDIMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY STRING_TO_ARRAY UNNEST ISEMPTY LOWER_INC UPPER_INC LOWER_INF UPPER_INF RANGE_MERGE GENERATE_SERIES GENERATE_SUBSCRIPTS CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX TXID_SNAPSHOT_XMIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE GIN_CLEAN_PENDING_LIST SUPPRESS_REDUNDANT_UPDATES_TRIGGER LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRITE GROUPING CAST ".trim().split(" ").map((function(e){return e.split("|")[0]})).join("|");return{name:"PostgreSQL",aliases:["postgres","postgresql"],case_insensitive:!0,keywords:{keyword:"ABORT ALTER ANALYZE BEGIN CALL CHECKPOINT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET REVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS FAMILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS METHOD CAST AS TRANSFORM TRANSACTION OWNED TO INTO SESSION AUTHORIZATION INDEX PROCEDURE ASSERTION ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS DEFERRABLE RANGE DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ILIKE IN INITIALLY INNER INTERSECT IS ISNULL JOIN LATERAL LEADING LIKE LIMIT NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN TRAILING UNION UNIQUE USING VARIADIC|10 VERBOSE WHEN WHERE WINDOW WITH BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT ADD ADMIN EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS|10 WITHOUT INHERIT DEPENDS CALLED INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCEDURES RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS BUFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED OF NOTHING NONE EXCLUDE ATTRIBUTE USAGE ROUTINES TRUE FALSE NAN INFINITY ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLICE DEBUG LOG INFO NOTICE WARNING ASSERT OPEN SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHERIT LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS ",built_in:"CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CURRENT_DATE LOCALTIME LOCALTIMESTAMP CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ROW_COUNT RESULT_OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 SQLSTATE SQLERRM|10 SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED SQL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION TRANSACTION_RESOLUTION_UNKNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLOW INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST INVALID_DATETIME_FORMAT INVALID_ESCAPE_CHARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE SEQUENCE_GENERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVALID_BINARY_REPRESENTATION BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION UNIQUE_VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIMEOUT INVALID_SQL_STATEMENT_NAME TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST INVALID_TRANSACTION_TERMINATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_VIOLATED SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR INSUFFICIENT_PRIVILEGE CANNOT_COERCE GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH INDETERMINATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_ALIAS DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION INVALID_DATABASE_DEFINITION INVALID_FUNCTION_DEFINITION INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED STATEMENT_TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_CONNECT_NOW DATABASE_DROPPED SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION FDW_INVALID_ATTRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX FDW_INVALID_OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION FDW_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED INDEX_CORRUPTED "},illegal:/:==|\W\s*\(\*|(^|\s)\$[a-z]|\{\{|[a-z]:\s*$|\.\.\.|TO:|DO:/,contains:[{className:"keyword",variants:[{begin:/\bTEXT\s*SEARCH\b/},{begin:/\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/},{begin:/\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/},{begin:/\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/},{begin:/\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/},{begin:/\bNULLS\s+(FIRST|LAST)\b/},{begin:/\bEVENT\s+TRIGGER\b/},{begin:/\b(MAPPING|OR)\s+REPLACE\b/},{begin:/\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/},{begin:/\b(SHARE|EXCLUSIVE)\s+MODE\b/},{begin:/\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/},{begin:/\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/},{begin:/\bPRESERVE\s+ROWS\b/},{begin:/\bDISCARD\s+PLANS\b/},{begin:/\bREFERENCING\s+(OLD|NEW)\b/},{begin:/\bSKIP\s+LOCKED\b/},{begin:/\bGROUPING\s+SETS\b/},{begin:/\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/},{begin:/\b(WITH|WITHOUT)\s+HOLD\b/},{begin:/\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/},{begin:/\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/},{begin:/\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/},{begin:/\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/},{begin:/\bIS\s+(NOT\s+)?UNKNOWN\b/},{begin:/\bSECURITY\s+LABEL\b/},{begin:/\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/},{begin:/\bWITH\s+(NO\s+)?DATA\b/},{begin:/\b(FOREIGN|SET)\s+DATA\b/},{begin:/\bSET\s+(CATALOG|CONSTRAINTS)\b/},{begin:/\b(WITH|FOR)\s+ORDINALITY\b/},{begin:/\bIS\s+(NOT\s+)?DOCUMENT\b/},{begin:/\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/},{begin:/\b(STRIP|PRESERVE)\s+WHITESPACE\b/},{begin:/\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/},{begin:/\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/},{begin:/\bAT\s+TIME\s+ZONE\b/},{begin:/\bGRANTED\s+BY\b/},{begin:/\bRETURN\s+(QUERY|NEXT)\b/},{begin:/\b(ATTACH|DETACH)\s+PARTITION\b/},{begin:/\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/},{begin:/\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/},{begin:/\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/}]},{begin:/\b(FORMAT|FAMILY|VERSION)\s*\(/},{begin:/\bINCLUDE\s*\(/,keywords:"INCLUDE"},{begin:/\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/},{begin:/\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/},{begin:/\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/,relevance:10},{begin:/\bEXTRACT\s*\(/,end:/\bFROM\b/,returnEnd:!0,keywords:{type:"CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS MILLENNIUM MILLISECONDS MINUTE MONTH QUARTER SECOND TIMEZONE TIMEZONE_HOUR TIMEZONE_MINUTE WEEK YEAR"}},{begin:/\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/,keywords:{keyword:"NAME"}},{begin:/\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/,keywords:{keyword:"DOCUMENT CONTENT"}},{beginKeywords:"CACHE INCREMENT MAXVALUE MINVALUE",end:e.C_NUMBER_RE,returnEnd:!0,keywords:"BY CACHE INCREMENT MAXVALUE MINVALUE"},{className:"type",begin:/\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/},{className:"type",begin:/\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/},{begin:/\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/,keywords:{keyword:"RETURNS",type:"LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER"}},{begin:"\\b("+o+")\\s*\\("},{begin:"\\.("+r+")\\b"},{begin:"\\b("+r+")\\s+PATH\\b",keywords:{keyword:"PATH",type:n.replace("PATH ","")}},{className:"type",begin:"\\b("+r+")\\b"},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:"(e|E|u&|U&)'",end:"'",contains:[{begin:"\\\\."}],relevance:10},e.END_SAME_AS_BEGIN({begin:"\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$",end:"\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$",contains:[{subLanguage:["pgsql","perl","python","tcl","r","lua","java","php","ruby","bash","scheme","xml","json"],endsWithParent:!0}]}),{begin:'"',end:'"',contains:[{begin:'""'}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"meta",variants:[{begin:"%(ROW)?TYPE",relevance:10},{begin:"\\$\\d+"},{begin:"^#\\w",end:"$"}]},{className:"symbol",begin:"<<\\s*[a-zA-Z_][a-zA-Z_0-9$]*\\s*>>",relevance:10}]}}},function(e,t){e.exports=function(e){const t={className:"variable",begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*(?![A-Za-z0-9])(?![$])"},n={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},r={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},o=e.inherit(e.APOS_STRING_MODE,{illegal:null}),i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(r)}),a=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(r)}),s={className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[e.inherit(o,{begin:"b'",end:"'"}),e.inherit(i,{begin:'b"',end:'"'}),i,o,a]},c={className:"number",variants:[{begin:"\\b0b[01]+(?:_[01]+)*\\b"},{begin:"\\b0o[0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:e[+-]?\\d+)?"}],relevance:0},l={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile enum eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match|0 mixed new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException UnhandledMatchError ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Stringable Throwable Traversable WeakReference WeakMap Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php3","php4","php5","php6","php7","php8"],case_insensitive:!0,keywords:l,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[n]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),n,{className:"keyword",begin:/\$this\b/},t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",t,e.C_BLOCK_COMMENT_MODE,s,c]}]},{className:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",relevance:0,end:";",contains:[e.UNDERSCORE_TITLE_MODE]},s,c]}}},function(e,t){e.exports=function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}},function(e,t){e.exports=function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}},function(e,t){e.exports=function(e){return{name:"Pony",keywords:{keyword:"actor addressof and as be break class compile_error compile_intrinsic consume continue delegate digestof do else elseif embed end error for fun if ifdef in interface is isnt lambda let match new not object or primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},contains:[{className:"type",begin:"\\b_?[A-Z][\\w]*",relevance:0},{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE],relevance:0},{begin:e.IDENT_RE+"'",relevance:0},{className:"number",begin:"(-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t={$pattern:/-?[A-z\.\-]+\b/,keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",built_in:"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"},n={begin:"`[\\s\\S]",relevance:0},r={className:"variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},o={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[n,r,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},i={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},a=e.inherit(e.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]}]}),s={className:"built_in",variants:[{begin:"(".concat("Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where",")+(-)[\\w\\d]+")}]},c={className:"class",beginKeywords:"class enum",end:/\s*[{]/,excludeEnd:!0,relevance:0,contains:[e.TITLE_MODE]},l={className:"function",begin:/function\s+/,end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:/\w[\w\d]*((-)[\w\d]+)*/,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[r]}]},u={begin:/using\s/,end:/$/,returnBegin:!0,contains:[o,i,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]},d={variants:[{className:"operator",begin:"(".concat("-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",")\\b")},{className:"literal",begin:/(-)[\w\d]+/,relevance:0}]},h={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(t.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},e.inherit(e.TITLE_MODE,{endsParent:!0})]},p=[h,a,n,e.NUMBER_MODE,o,i,s,r,{className:"literal",begin:/\$(null|true|false)\b/},{className:"selector-tag",begin:/@\B/,relevance:0}],m={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",p,{begin:"("+["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"].join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return h.contains.unshift(m),{name:"PowerShell",aliases:["ps","ps1"],case_insensitive:!0,keywords:t,contains:p.concat(c,l,u,d,m)}}},function(e,t){e.exports=function(e){return{name:"Processing",keywords:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",title:"setup draw",built_in:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"Python profiler",contains:[e.C_NUMBER_MODE,{begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{begin:"function calls",end:"$",contains:[e.C_NUMBER_MODE],relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\(",end:"\\)$",excludeBegin:!0,excludeEnd:!0,relevance:0}]}}},function(e,t){e.exports=function(e){const t={begin:/\(/,end:/\)/,relevance:0},n={begin:/\[/,end:/\]/},r={className:"comment",begin:/%/,end:/$/,contains:[e.PHRASAL_WORDS_MODE]},o={className:"string",begin:/`/,end:/`/,contains:[e.BACKSLASH_ESCAPE]},i=[{begin:/[a-z][A-Za-z0-9_]*/,relevance:0},{className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},t,{begin:/:-/},n,r,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,o,{className:"string",begin:/0'(\\'|.)/},{className:"string",begin:/0'\\s/},e.C_NUMBER_MODE];return t.contains=i,n.contains=i,{name:"Prolog",contains:i.concat([{begin:/\.$/}])}}},function(e,t){e.exports=function(e){var t="[ \\t\\f]*",n="([ \\t\\f]*[:=][ \\t\\f]*|[ \\t\\f]+)",r="([^\\\\:= \\t\\f\\n]|\\\\.)+",o={end:n,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".properties",case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{returnBegin:!0,variants:[{begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+[ \\t\\f]*[:=][ \\t\\f]*",relevance:1},{begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+[ \\t\\f]+",relevance:0}],contains:[{className:"attr",begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",endsParent:!0,relevance:0}],starts:o},{begin:r+n,returnBegin:!0,relevance:0,contains:[{className:"meta",begin:r,endsParent:!0,relevance:0}],starts:o},{className:"attr",relevance:0,begin:r+t+"$"}]}}},function(e,t){e.exports=function(e){return{name:"Protocol Buffers",keywords:{keyword:"package import option optional required repeated group oneof",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"message enum service",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"function",beginKeywords:"rpc",end:/[{;]/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+(?=\s*=[^\n]+;$)/}]}}},function(e,t){e.exports=function(e){const t=e.COMMENT("#","$"),n=e.inherit(e.TITLE_MODE,{begin:"([A-Za-z_]|::)(\\w|::)*"}),r={className:"variable",begin:"\\$([A-Za-z_]|::)(\\w|::)*"},o={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{name:"Puppet",aliases:["pp"],contains:[t,r,o,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[n,t]},{beginKeywords:"define",end:/\{/,contains:[{className:"section",begin:e.IDENT_RE,endsParent:!0}]},{begin:e.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"keyword",begin:e.IDENT_RE},{begin:/\{/,end:/\}/,keywords:{keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},relevance:0,contains:[o,t,{begin:"[a-zA-Z_]+\\s*=>",returnBegin:!0,end:"=>",contains:[{className:"attr",begin:e.IDENT_RE}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},r]}],relevance:0}]}}},function(e,t){e.exports=function(e){return{name:"PureBASIC",aliases:["pb","pbi"],keywords:"Align And Array As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerElseIf CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary Extends FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount Map Module NewList NewMap Next Not Or Procedure ProcedureC ProcedureCDLL ProcedureDLL ProcedureReturn Protected Prototype PrototypeC ReDim Read Repeat Restore Return Runtime Select Shared Static Step Structure StructureUnion Swap Threaded To UndefineMacro Until Until UnuseModule UseModule Wend While With XIncludeFile XOr",contains:[e.COMMENT(";","$",{relevance:0}),{className:"function",begin:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",end:"\\(",excludeEnd:!0,returnBegin:!0,contains:[{className:"keyword",begin:"(Procedure|Declare)(C|CDLL|DLL)?",excludeEnd:!0},{className:"type",begin:"\\.\\w*"},e.UNDERSCORE_TITLE_MODE]},{className:"string",begin:'(~)?"',end:'"',illegal:"\\n"},{className:"symbol",begin:"#[a-zA-Z_]\\w*\\$?"}]}}},function(e,t){function n(e){return function(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}("(?=",e,")")}e.exports=function(e){const t={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},r={className:"meta",begin:/^(>>>|\.\.\.) /},o={className:"subst",begin:/\{/,end:/\}/,keywords:t,illegal:/#/},i={begin:/\{\{/,relevance:0},a={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r,i,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r,i,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,i,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},s="[0-9](_?[0-9])*",c=`(\\b(${s}))?\\.(${s})|\\b(${s})\\.`,l={className:"number",relevance:0,variants:[{begin:`(\\b(${s})|(${c}))[eE][+-]?(${s})[jJ]?\\b`},{begin:`(${c})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${s})[jJ]\\b`}]},u={className:"comment",begin:n(/# type:/),end:/$/,keywords:t,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},d={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:["self",r,l,a,e.HASH_COMMENT_MODE]}]};return o.contains=[a,l,r],{name:"Python",aliases:["py","gyp","ipython"],keywords:t,illegal:/(<\/|->|\?)|=>/,contains:[r,l,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},a,u,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,d,{begin:/->/,endsWithParent:!0,keywords:t}]},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[l,d,a]}]}}},function(e,t){e.exports=function(e){return{aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}},function(e,t){e.exports=function(e){return{name:"Q",aliases:["k","kdb"],keywords:{$pattern:/(`?)[A-Za-z0-9_]+\b/,keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"},contains:[e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t="[a-zA-Z_][a-zA-Z0-9\\._]*",r={className:"attribute",begin:"\\bid\\s*:",starts:{className:"string",end:t,returnEnd:!1}},o={begin:t+"\\s*:",returnBegin:!0,contains:[{className:"attribute",begin:t,end:"\\s*:",excludeEnd:!0,relevance:0}],relevance:0},i={begin:n(t,/\s*\{/),end:/\{/,returnBegin:!0,relevance:0,contains:[e.inherit(e.TITLE_MODE,{begin:t})]};return{name:"QML",aliases:["qt"],case_insensitive:!1,keywords:{keyword:"in of on if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4d Promise"},contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{begin:/</,end:/>\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},{className:"keyword",begin:"\\bsignal\\b",starts:{className:"string",end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},{className:"keyword",begin:"\\bproperty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)",returnEnd:!0}},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:"\\."+e.IDENT_RE,relevance:0},r,o,i],illegal:/#/}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/;return{name:"R",illegal:/->/,keywords:{$pattern:t,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},compilerExtensions:[(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.begin=n(r.beforeMatch,n("(?=",r.begin,")")),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch}],contains:[e.COMMENT(/#'/,/$/,{contains:[{className:"doctag",begin:"@examples",starts:{contains:[{begin:/\n/},{begin:/#'\s*(?=@[a-zA-Z]+)/,endsParent:!0},{begin:/#'/,end:/$/,excludeBegin:!0}]}},{className:"doctag",begin:"@param",end:/$/,contains:[{className:"variable",variants:[{begin:t},{begin:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{className:"doctag",begin:/@[a-zA-Z]+/},{className:"meta-keyword",begin:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{className:"number",relevance:0,beforeMatch:/([^a-zA-Z0-9._])/,variants:[{match:/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/},{match:/0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/},{match:/(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/}]},{begin:"%",end:"%"},{begin:n(/[a-zA-Z][a-zA-Z_0-9]*/,"\\s+<-\\s+")},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}},function(e,t){e.exports=function(e){const t="~?[a-z$_][0-9a-zA-Z$_]*",n="`?[A-Z$_][0-9a-zA-Z$_]*",r="("+(["||","++","**","+.","*","/","*.","/.","..."].map((function(e){return e.split("").map((function(e){return"\\"+e})).join("")})).join("|")+"|\\|>|&&|==|===)"),o="\\s+"+r+"\\s+",i={keyword:"and as asr assert begin class constraint do done downto else end exception external for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new nonrec object of open or private rec sig struct then to try type val virtual when while with",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ",literal:"true false"},a="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",s={className:"number",relevance:0,variants:[{begin:a},{begin:"\\(-"+a+"\\)"}]},c={className:"operator",relevance:0,begin:r},l=[{className:"identifier",relevance:0,begin:t},c,s],u=[e.QUOTE_STRING_MODE,c,{className:"module",begin:"\\b"+n,returnBegin:!0,end:".",contains:[{className:"identifier",begin:n,relevance:0}]}],d=[{className:"module",begin:"\\b"+n,returnBegin:!0,end:".",relevance:0,contains:[{className:"identifier",begin:n,relevance:0}]}],h={className:"function",relevance:0,keywords:i,variants:[{begin:"\\s(\\(\\.?.*?\\)|"+t+")\\s*=>",end:"\\s*=>",returnBegin:!0,relevance:0,contains:[{className:"params",variants:[{begin:t},{begin:"~?[a-z$_][0-9a-zA-Z$_]*(\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*('?[a-z$_][0-9a-z$_]*\\s*(,'?[a-z$_][0-9a-z$_]*\\s*)*)?\\))?){0,2}"},{begin:/\(\s*\)/}]}]},{begin:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",end:"\\s=>",returnBegin:!0,relevance:0,contains:[{className:"params",relevance:0,variants:[{begin:t,end:"(,|\\n|\\))",relevance:0,contains:[c,{className:"typing",begin:":",end:"(,|\\n)",returnBegin:!0,relevance:0,contains:d}]}]}]},{begin:"\\(\\.\\s"+t+"\\)\\s*=>"}]};u.push(h);const p={className:"constructor",begin:n+"\\(",end:"\\)",illegal:"\\n",keywords:i,contains:[e.QUOTE_STRING_MODE,c,{className:"params",begin:"\\b"+t}]},m={className:"pattern-match",begin:"\\|",returnBegin:!0,keywords:i,end:"=>",relevance:0,contains:[p,c,{relevance:0,className:"constructor",begin:n}]},g={className:"module-access",keywords:i,returnBegin:!0,variants:[{begin:"\\b("+n+"\\.)+"+t},{begin:"\\b("+n+"\\.)+\\(",end:"\\)",returnBegin:!0,contains:[h,{begin:"\\(",end:"\\)",skip:!0}].concat(u)},{begin:"\\b("+n+"\\.)+\\{",end:/\}/}],contains:u};return d.push(g),{name:"ReasonML",aliases:["re"],keywords:i,illegal:"(:-|:=|\\$\\{|\\+=)",contains:[e.COMMENT("/\\*","\\*/",{illegal:"^(#,\\/\\/)"}),{className:"character",begin:"'(\\\\[^']+|[^'])'",illegal:"\\n",relevance:0},e.QUOTE_STRING_MODE,{className:"literal",begin:"\\(\\)",relevance:0},{className:"literal",begin:"\\[\\|",end:"\\|\\]",relevance:0,contains:l},{className:"literal",begin:"\\[",end:"\\]",relevance:0,contains:l},p,{className:"operator",begin:o,illegal:"--\x3e",relevance:0},s,e.C_LINE_COMMENT_MODE,m,h,{className:"module-def",begin:"\\bmodule\\s+"+t+"\\s+"+n+"\\s+=\\s+\\{",end:/\}/,returnBegin:!0,keywords:i,relevance:0,contains:[{className:"module",relevance:0,begin:n},{begin:/\{/,end:/\}/,skip:!0}].concat(u)},g]}}},function(e,t){e.exports=function(e){return{name:"RenderMan RIB",keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:"</",contains:[e.HASH_COMMENT_MODE,e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}},function(e,t){e.exports=function(e){const t={className:"attribute",begin:/[a-zA-Z-_]+/,end:/\s*:/,excludeEnd:!0,starts:{end:";",relevance:0,contains:[{className:"variable",begin:/\.[a-zA-Z-_]+/},{className:"keyword",begin:/\(optional\)/}]}};return{name:"Roboconf",aliases:["graph","instances"],case_insensitive:!0,keywords:"import",contains:[{begin:"^facet [a-zA-Z-_][^\\n{]+\\{",end:/\}/,keywords:"facet",contains:[t,e.HASH_COMMENT_MODE]},{begin:"^\\s*instance of [a-zA-Z-_][^\\n{]+\\{",end:/\}/,keywords:"name count channels instance-data instance-state instance of",illegal:/\S/,contains:["self",t,e.HASH_COMMENT_MODE]},{begin:"^[a-zA-Z-_][^\\n{]+\\{",end:/\}/,contains:[t,e.HASH_COMMENT_MODE]},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t="foreach do while for if from to step else on-error and or not in",n="true false yes no nothing nil null",r={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]},i={className:"string",begin:/'/,end:/'/};return{name:"Microtik RouterOS script",aliases:["mikrotik"],case_insensitive:!0,keywords:{$pattern:/:?[\w-]+/,literal:n,keyword:t+" :"+t.split(" ").join(" :")+" :"+"global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime".split(" ").join(" :")},contains:[{variants:[{begin:/\/\*/,end:/\*\//},{begin:/\/\//,end:/$/},{begin:/<\//,end:/>/}],illegal:/./},e.COMMENT("^#","$"),o,i,r,{begin:/[\w-]+=([^\s{}[\]()>]+)/,relevance:0,returnBegin:!0,contains:[{className:"attribute",begin:/[^=]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[o,i,r,{className:"literal",begin:"\\b("+n.split(" ").join("|")+")\\b"},{begin:/("[^"]*"|[^\s{}[\]]+)/}]}]},{className:"number",begin:/\*[0-9a-fA-F]+/},{begin:"\\b("+"add remove enable disable set get print export edit find run debug error info warning".split(" ").join("|")+")([\\s[(\\]|])",returnBegin:!0,contains:[{className:"builtin-name",begin:/\w+/}]},{className:"built_in",variants:[{begin:"(\\.\\./|/|\\s)(("+"traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw".split(" ").join("|")+");?\\s)+"},{begin:/\.\./,relevance:0}]}]}}},function(e,t){e.exports=function(e){return{name:"RenderMan RSL",keywords:{keyword:"float color point normal vector matrix while for if do return else break extern continue",built_in:"abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},{className:"class",beginKeywords:"surface displacement light volume imager",end:"\\("},{beginKeywords:"illuminate illuminance gather",end:"\\("}]}}},function(e,t){e.exports=function(e){return{name:"Oracle Rules Language",keywords:{keyword:"BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",built_in:"IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"literal",variants:[{begin:"#\\s+",relevance:0},{begin:"#[a-zA-Z .]+"}]}]}}},function(e,t){e.exports=function(e){const t="([ui](8|16|32|64|128|size)|f(32|64))?",n="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:n},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+t}],relevance:0},{className:"function",beginKeywords:"fn",end:"(\\(|<)",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"meta-string",begin:/"/,end:/"/}]},{className:"class",beginKeywords:"type",end:";",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"\\S"},{className:"class",beginKeywords:"trait enum struct union",end:/\{/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"[\\w\\d]"},{begin:e.IDENT_RE+"::",keywords:{built_in:n}},{begin:"->"}]}}},function(e,t){e.exports=function(e){return{name:"SAS",case_insensitive:!0,keywords:{literal:"null missing _all_ _automatic_ _character_ _infile_ _n_ _name_ _null_ _numeric_ _user_ _webout_",meta:"do if then else end until while abort array attrib by call cards cards4 catname continue datalines datalines4 delete delim delimiter display dm drop endsas error file filename footnote format goto in infile informat input keep label leave length libname link list lostcard merge missing modify options output out page put redirect remove rename replace retain return select set skip startsas stop title update waitsas where window x systask add and alter as cascade check create delete describe distinct drop foreign from group having index insert into in key like message modify msgtype not null on or order primary references reset restrict select set table unique update validate view where"},contains:[{className:"keyword",begin:/^\s*(proc [\w\d_]+|data|run|quit)[\s;]/},{className:"variable",begin:/&[a-zA-Z_&][a-zA-Z0-9_]*\.?/},{className:"emphasis",begin:/^\s*datalines|cards.*;/,end:/^\s*;\s*$/},{className:"built_in",begin:"%(bquote|nrbquote|cmpres|qcmpres|compstor|datatyp|display|do|else|end|eval|global|goto|if|index|input|keydef|label|left|length|let|local|lowcase|macro|mend|nrbquote|nrquote|nrstr|put|qcmpres|qleft|qlowcase|qscan|qsubstr|qsysfunc|qtrim|quote|qupcase|scan|str|substr|superq|syscall|sysevalf|sysexec|sysfunc|sysget|syslput|sysprod|sysrc|sysrput|then|to|trim|unquote|until|upcase|verify|while|window)"},{className:"name",begin:/%[a-zA-Z_][a-zA-Z_0-9]*/},{className:"meta",begin:"[^%](abs|addr|airy|arcos|arsin|atan|attrc|attrn|band|betainv|blshift|bnot|bor|brshift|bxor|byte|cdf|ceil|cexist|cinv|close|cnonct|collate|compbl|compound|compress|cos|cosh|css|curobs|cv|daccdb|daccdbsl|daccsl|daccsyd|dacctab|dairy|date|datejul|datepart|datetime|day|dclose|depdb|depdbsl|depdbsl|depsl|depsl|depsyd|depsyd|deptab|deptab|dequote|dhms|dif|digamma|dim|dinfo|dnum|dopen|doptname|doptnum|dread|dropnote|dsname|erf|erfc|exist|exp|fappend|fclose|fcol|fdelete|fetch|fetchobs|fexist|fget|fileexist|filename|fileref|finfo|finv|fipname|fipnamel|fipstate|floor|fnonct|fnote|fopen|foptname|foptnum|fpoint|fpos|fput|fread|frewind|frlen|fsep|fuzz|fwrite|gaminv|gamma|getoption|getvarc|getvarn|hbound|hms|hosthelp|hour|ibessel|index|indexc|indexw|input|inputc|inputn|int|intck|intnx|intrr|irr|jbessel|juldate|kurtosis|lag|lbound|left|length|lgamma|libname|libref|log|log10|log2|logpdf|logpmf|logsdf|lowcase|max|mdy|mean|min|minute|mod|month|mopen|mort|n|netpv|nmiss|normal|note|npv|open|ordinal|pathname|pdf|peek|peekc|pmf|point|poisson|poke|probbeta|probbnml|probchi|probf|probgam|probhypr|probit|probnegb|probnorm|probt|put|putc|putn|qtr|quote|ranbin|rancau|ranexp|rangam|range|rank|rannor|ranpoi|rantbl|rantri|ranuni|repeat|resolve|reverse|rewind|right|round|saving|scan|sdf|second|sign|sin|sinh|skewness|soundex|spedis|sqrt|std|stderr|stfips|stname|stnamel|substr|sum|symget|sysget|sysmsg|sysprod|sysrc|system|tan|tanh|time|timepart|tinv|tnonct|today|translate|tranwrd|trigamma|trim|trimn|trunc|uniform|upcase|uss|var|varfmt|varinfmt|varlabel|varlen|varname|varnum|varray|varrayx|vartype|verify|vformat|vformatd|vformatdx|vformatn|vformatnx|vformatw|vformatwx|vformatx|vinarray|vinarrayx|vinformat|vinformatd|vinformatdx|vinformatn|vinformatnx|vinformatw|vinformatwx|vinformatx|vlabel|vlabelx|vlength|vlengthx|vname|vnamex|vtype|vtypex|weekday|year|yyq|zipfips|zipname|zipnamel|zipstate)[(]"},{className:"string",variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},e.COMMENT("\\*",";"),e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:/\$\{/,end:/\}/}]},n={className:"string",variants:[{begin:'"""',end:'"""'},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[t],relevance:10}]},r={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},o={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},i={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[r]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[r]},o]},a={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[o]};return{name:"Scala",keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},r,a,i,e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}},function(e,t){e.exports=function(e){const t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n={$pattern:t,"builtin-name":"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},r={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},o={className:"number",variants:[{begin:"(-|\\+)?\\d+([./]\\d+)?",relevance:0},{begin:"(-|\\+)?\\d+([./]\\d+)?[+\\-](-|\\+)?\\d+([./]\\d+)?i",relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},i=e.QUOTE_STRING_MODE,a=[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#\\|","\\|#")],s={begin:t,relevance:0},c={className:"symbol",begin:"'"+t},l={endsWithParent:!0,relevance:0},u={variants:[{begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)",contains:["self",r,i,o,s,c]}]},d={className:"name",relevance:0,begin:t,keywords:n},h={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[d,{endsParent:!0,variants:[{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/}],contains:[s]}]},d,l]};return l.contains=[r,o,i,s,c,u,h].concat(a),{name:"Scheme",illegal:/\S/,contains:[e.SHEBANG(),o,i,c,u,h].concat(a)}}},function(e,t){e.exports=function(e){const t=[e.C_NUMBER_MODE,{className:"string",begin:"'|\"",end:"'|\"",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}];return{name:"Scilab",aliases:["sci"],keywords:{$pattern:/%?\w+/,keyword:"abort break case clear catch continue do elseif else endfunction end for function global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan type typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{begin:"[a-zA-Z_][a-zA-Z_0-9]*[\\.']+",relevance:0},{begin:"\\[",end:"\\][\\.']*",relevance:0,contains:t},e.COMMENT("//","$")].concat(t)}}},function(e,t){const n=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],i=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],a=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse();e.exports=function(e){const t=(e=>({IMPORTANT:{className:"meta",begin:"!important"},HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}))(e),s=i,c=o,l={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+c.join("|")+")"},{className:"selector-pseudo",begin:"::("+s.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[e.CSS_NUMBER_MODE]},{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[l,t.HEXCOLOR,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT]},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:r.join(" ")},contains:[{begin:"@[a-z-]+",className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,e.CSS_NUMBER_MODE]}]}}},function(e,t){e.exports=function(e){return{name:"Shell Session",aliases:["console"],contains:[{className:"meta",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#]/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}},function(e,t){e.exports=function(e){const t=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"];return{name:"Smali",contains:[{className:"string",begin:'"',end:'"',relevance:0},e.COMMENT("#","$",{relevance:0}),{className:"keyword",variants:[{begin:"\\s*\\.end\\s[a-zA-Z0-9]*"},{begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{begin:"\\s("+["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"].join("|")+")"}]},{className:"built_in",variants:[{begin:"\\s("+t.join("|")+")\\s"},{begin:"\\s("+t.join("|")+")((-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{begin:"\\s("+["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"].join("|")+")((-|/)[a-zA-Z0-9]+)*\\s",relevance:10}]},{className:"class",begin:"L[^(;:\n]*;",relevance:0},{begin:"[vp][0-9]+"}]}}},function(e,t){e.exports=function(e){const t={className:"string",begin:"\\$.{1}"},n={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:"self super nil true false thisContext",contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:"[a-z][a-zA-Z0-9_]*:",relevance:0},e.C_NUMBER_MODE,n,t,{begin:"\\|[ ]*[a-z][a-zA-Z0-9_]*([ ]+[a-z][a-zA-Z0-9_]*)*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?[a-z][a-zA-Z0-9_]*"}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,t,e.C_NUMBER_MODE,n]}]}}},function(e,t){e.exports=function(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}},function(e,t){e.exports=function(e){const t={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},n={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"define undef ifdef ifndef else endif include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(t,{className:"meta-string"}),{className:"meta-string",begin:/<[^\n>]*>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]};return{name:"SQF",case_insensitive:!0,keywords:{keyword:"case catch default do else exit exitWith for forEach from if private switch then throw to try waitUntil while with",built_in:"abs accTime acos action actionIDs actionKeys actionKeysImages actionKeysNames actionKeysNamesArray actionName actionParams activateAddons activatedAddons activateKey add3DENConnection add3DENEventHandler add3DENLayer addAction addBackpack addBackpackCargo addBackpackCargoGlobal addBackpackGlobal addCamShake addCuratorAddons addCuratorCameraArea addCuratorEditableObjects addCuratorEditingArea addCuratorPoints addEditorObject addEventHandler addForce addGoggles addGroupIcon addHandgunItem addHeadgear addItem addItemCargo addItemCargoGlobal addItemPool addItemToBackpack addItemToUniform addItemToVest addLiveStats addMagazine addMagazineAmmoCargo addMagazineCargo addMagazineCargoGlobal addMagazineGlobal addMagazinePool addMagazines addMagazineTurret addMenu addMenuItem addMissionEventHandler addMPEventHandler addMusicEventHandler addOwnedMine addPlayerScores addPrimaryWeaponItem addPublicVariableEventHandler addRating addResources addScore addScoreSide addSecondaryWeaponItem addSwitchableUnit addTeamMember addToRemainsCollector addTorque addUniform addVehicle addVest addWaypoint addWeapon addWeaponCargo addWeaponCargoGlobal addWeaponGlobal addWeaponItem addWeaponPool addWeaponTurret admin agent agents AGLToASL aimedAtTarget aimPos airDensityRTD airplaneThrottle airportSide AISFinishHeal alive all3DENEntities allAirports allControls allCurators allCutLayers allDead allDeadMen allDisplays allGroups allMapMarkers allMines allMissionObjects allow3DMode allowCrewInImmobile allowCuratorLogicIgnoreAreas allowDamage allowDammage allowFileOperations allowFleeing allowGetIn allowSprint allPlayers allSimpleObjects allSites allTurrets allUnits allUnitsUAV allVariables ammo ammoOnPylon and animate animateBay animateDoor animatePylon animateSource animationNames animationPhase animationSourcePhase animationState append apply armoryPoints arrayIntersect asin ASLToAGL ASLToATL assert assignAsCargo assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner assignAsTurret assignCurator assignedCargo assignedCommander assignedDriver assignedGunner assignedItems assignedTarget assignedTeam assignedVehicle assignedVehicleRole assignItem assignTeam assignToAirport atan atan2 atg ATLToASL attachedObject attachedObjects attachedTo attachObject attachTo attackEnabled backpack backpackCargo backpackContainer backpackItems backpackMagazines backpackSpaceFor behaviour benchmark binocular boundingBox boundingBoxReal boundingCenter breakOut breakTo briefingName buildingExit buildingPos buttonAction buttonSetAction cadetMode call callExtension camCommand camCommit camCommitPrepared camCommitted camConstuctionSetParams camCreate camDestroy cameraEffect cameraEffectEnableHUD cameraInterest cameraOn cameraView campaignConfigFile camPreload camPreloaded camPrepareBank camPrepareDir camPrepareDive camPrepareFocus camPrepareFov camPrepareFovRange camPreparePos camPrepareRelPos camPrepareTarget camSetBank camSetDir camSetDive camSetFocus camSetFov camSetFovRange camSetPos camSetRelPos camSetTarget camTarget camUseNVG canAdd canAddItemToBackpack canAddItemToUniform canAddItemToVest cancelSimpleTaskDestination canFire canMove canSlingLoad canStand canSuspend canTriggerDynamicSimulation canUnloadInCombat canVehicleCargo captive captiveNum cbChecked cbSetChecked ceil channelEnabled cheatsEnabled checkAIFeature checkVisibility className clearAllItemsFromBackpack clearBackpackCargo clearBackpackCargoGlobal clearGroupIcons clearItemCargo clearItemCargoGlobal clearItemPool clearMagazineCargo clearMagazineCargoGlobal clearMagazinePool clearOverlay clearRadio clearWeaponCargo clearWeaponCargoGlobal clearWeaponPool clientOwner closeDialog closeDisplay closeOverlay collapseObjectTree collect3DENHistory collectiveRTD combatMode commandArtilleryFire commandChat commander commandFire commandFollow commandFSM commandGetOut commandingMenu commandMove commandRadio commandStop commandSuppressiveFire commandTarget commandWatch comment commitOverlay compile compileFinal completedFSM composeText configClasses configFile configHierarchy configName configProperties configSourceAddonList configSourceMod configSourceModList confirmSensorTarget connectTerminalToUAV controlsGroupCtrl copyFromClipboard copyToClipboard copyWaypoints cos count countEnemy countFriendly countSide countType countUnknown create3DENComposition create3DENEntity createAgent createCenter createDialog createDiaryLink createDiaryRecord createDiarySubject createDisplay createGearDialog createGroup createGuardedPoint createLocation createMarker createMarkerLocal createMenu createMine createMissionDisplay createMPCampaignDisplay createSimpleObject createSimpleTask createSite createSoundSource createTask createTeam createTrigger createUnit createVehicle createVehicleCrew createVehicleLocal crew ctAddHeader ctAddRow ctClear ctCurSel ctData ctFindHeaderRows ctFindRowHeader ctHeaderControls ctHeaderCount ctRemoveHeaders ctRemoveRows ctrlActivate ctrlAddEventHandler ctrlAngle ctrlAutoScrollDelay ctrlAutoScrollRewind ctrlAutoScrollSpeed ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ctrlCreate ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ctrlIDD ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ctrlMapScale ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ctrlModelDirAndUp ctrlModelScale ctrlParent ctrlParentControlsGroup ctrlPosition ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ctrlScale ctrlSetActiveColor ctrlSetAngle ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ctrlSetEventHandler ctrlSetFade ctrlSetFocus ctrlSetFont ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ctrlSetFontH3 ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ctrlSetFontH6B ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ctrlSetFontHeightH3 ctrlSetFontHeightH4 ctrlSetFontHeightH5 ctrlSetFontHeightH6 ctrlSetFontHeightSecondary ctrlSetFontP ctrlSetFontPB ctrlSetFontSecondary ctrlSetForegroundColor ctrlSetModel ctrlSetModelDirAndUp ctrlSetModelScale ctrlSetPixelPrecision ctrlSetPosition ctrlSetScale ctrlSetStructuredText ctrlSetText ctrlSetTextColor ctrlSetTooltip ctrlSetTooltipColorBox ctrlSetTooltipColorShade ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ctrlTextWidth ctrlType ctrlVisible ctRowControls ctRowCount ctSetCurSel ctSetData ctSetHeaderTemplate ctSetRowTemplate ctSetValue ctValue curatorAddons curatorCamera curatorCameraArea curatorCameraAreaCeiling curatorCoef curatorEditableObjects curatorEditingArea curatorEditingAreaType curatorMouseOver curatorPoints curatorRegisteredObjects curatorSelected curatorWaypointCost current3DENOperation currentChannel currentCommand currentMagazine currentMagazineDetail currentMagazineDetailTurret currentMagazineTurret currentMuzzle currentNamespace currentTask currentTasks currentThrowable currentVisionMode currentWaypoint currentWeapon currentWeaponMode currentWeaponTurret currentZeroing cursorObject cursorTarget customChat customRadio cutFadeOut cutObj cutRsc cutText damage date dateToNumber daytime deActivateKey debriefingText debugFSM debugLog deg delete3DENEntities deleteAt deleteCenter deleteCollection deleteEditorObject deleteGroup deleteGroupWhenEmpty deleteIdentity deleteLocation deleteMarker deleteMarkerLocal deleteRange deleteResources deleteSite deleteStatus deleteTeam deleteVehicle deleteVehicleCrew deleteWaypoint detach detectedMines diag_activeMissionFSMs diag_activeScripts diag_activeSQFScripts diag_activeSQSScripts diag_captureFrame diag_captureFrameToFile diag_captureSlowFrame diag_codePerformance diag_drawMode diag_enable diag_enabled diag_fps diag_fpsMin diag_frameNo diag_lightNewLoad diag_list diag_log diag_logSlowFrame diag_mergeConfigFile diag_recordTurretLimits diag_setLightNew diag_tickTime diag_toggle dialog diarySubjectExists didJIP didJIPOwner difficulty difficultyEnabled difficultyEnabledRTD difficultyOption direction directSay disableAI disableCollisionWith disableConversation disableDebriefingStats disableMapIndicators disableNVGEquipment disableRemoteSensors disableSerialization disableTIEquipment disableUAVConnectability disableUserInput displayAddEventHandler displayCtrl displayParent displayRemoveAllEventHandlers displayRemoveEventHandler displaySetEventHandler dissolveTeam distance distance2D distanceSqr distributionRegion do3DENAction doArtilleryFire doFire doFollow doFSM doGetOut doMove doorPhase doStop doSuppressiveFire doTarget doWatch drawArrow drawEllipse drawIcon drawIcon3D drawLine drawLine3D drawLink drawLocation drawPolygon drawRectangle drawTriangle driver drop dynamicSimulationDistance dynamicSimulationDistanceCoef dynamicSimulationEnabled dynamicSimulationSystemEnabled echo edit3DENMissionAttributes editObject editorSetEventHandler effectiveCommander emptyPositions enableAI enableAIFeature enableAimPrecision enableAttack enableAudioFeature enableAutoStartUpRTD enableAutoTrimRTD enableCamShake enableCaustics enableChannel enableCollisionWith enableCopilot enableDebriefingStats enableDiagLegend enableDynamicSimulation enableDynamicSimulationSystem enableEndDialog enableEngineArtillery enableEnvironment enableFatigue enableGunLights enableInfoPanelComponent enableIRLasers enableMimics enablePersonTurret enableRadio enableReload enableRopeAttach enableSatNormalOnDetail enableSaving enableSentences enableSimulation enableSimulationGlobal enableStamina enableTeamSwitch enableTraffic enableUAVConnectability enableUAVWaypoints enableVehicleCargo enableVehicleSensor enableWeaponDisassembly endLoadingScreen endMission engineOn enginesIsOnRTD enginesRpmRTD enginesTorqueRTD entities environmentEnabled estimatedEndServerTime estimatedTimeLeft evalObjectArgument everyBackpack everyContainer exec execEditorScript execFSM execVM exp expectedDestination exportJIPMessages eyeDirection eyePos face faction fadeMusic fadeRadio fadeSound fadeSpeech failMission fillWeaponsFromPool find findCover findDisplay findEditorObject findEmptyPosition findEmptyPositionReady findIf findNearestEnemy finishMissionInit finite fire fireAtTarget firstBackpack flag flagAnimationPhase flagOwner flagSide flagTexture fleeing floor flyInHeight flyInHeightASL fog fogForecast fogParams forceAddUniform forcedMap forceEnd forceFlagTexture forceFollowRoad forceMap forceRespawn forceSpeed forceWalk forceWeaponFire forceWeatherChange forEachMember forEachMemberAgent forEachMemberTeam forgetTarget format formation formationDirection formationLeader formationMembers formationPosition formationTask formatText formLeader freeLook fromEditor fuel fullCrew gearIDCAmmoCount gearSlotAmmoCount gearSlotData get3DENActionState get3DENAttribute get3DENCamera get3DENConnections get3DENEntity get3DENEntityID get3DENGrid get3DENIconsVisible get3DENLayerEntities get3DENLinesVisible get3DENMissionAttribute get3DENMouseOver get3DENSelected getAimingCoef getAllEnvSoundControllers getAllHitPointsDamage getAllOwnedMines getAllSoundControllers getAmmoCargo getAnimAimPrecision getAnimSpeedCoef getArray getArtilleryAmmo getArtilleryComputerSettings getArtilleryETA getAssignedCuratorLogic getAssignedCuratorUnit getBackpackCargo getBleedingRemaining getBurningValue getCameraViewDirection getCargoIndex getCenterOfMass getClientState getClientStateNumber getCompatiblePylonMagazines getConnectedUAV getContainerMaxLoad getCursorObjectParams getCustomAimCoef getDammage getDescription getDir getDirVisual getDLCAssetsUsage getDLCAssetsUsageByName getDLCs getEditorCamera getEditorMode getEditorObjectScope getElevationOffset getEnvSoundController getFatigue getForcedFlagTexture getFriend getFSMVariable getFuelCargo getGroupIcon getGroupIconParams getGroupIcons getHideFrom getHit getHitIndex getHitPointDamage getItemCargo getMagazineCargo getMarkerColor getMarkerPos getMarkerSize getMarkerType getMass getMissionConfig getMissionConfigValue getMissionDLCs getMissionLayerEntities getModelInfo getMousePosition getMusicPlayedTime getNumber getObjectArgument getObjectChildren getObjectDLC getObjectMaterials getObjectProxy getObjectTextures getObjectType getObjectViewDistance getOxygenRemaining getPersonUsedDLCs getPilotCameraDirection getPilotCameraPosition getPilotCameraRotation getPilotCameraTarget getPlateNumber getPlayerChannel getPlayerScores getPlayerUID getPos getPosASL getPosASLVisual getPosASLW getPosATL getPosATLVisual getPosVisual getPosWorld getPylonMagazines getRelDir getRelPos getRemoteSensorsDisabled getRepairCargo getResolution getShadowDistance getShotParents getSlingLoad getSoundController getSoundControllerResult getSpeed getStamina getStatValue getSuppression getTerrainGrid getTerrainHeightASL getText getTotalDLCUsageTime getUnitLoadout getUnitTrait getUserMFDText getUserMFDvalue getVariable getVehicleCargo getWeaponCargo getWeaponSway getWingsOrientationRTD getWingsPositionRTD getWPPos glanceAt globalChat globalRadio goggles goto group groupChat groupFromNetId groupIconSelectable groupIconsVisible groupId groupOwner groupRadio groupSelectedUnits groupSelectUnit gunner gusts halt handgunItems handgunMagazine handgunWeapon handsHit hasInterface hasPilotCamera hasWeapon hcAllGroups hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcSetGroup hcShowBar hcShownBar headgear hideBody hideObject hideObjectGlobal hideSelection hint hintC hintCadet hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity image importAllGroups importance in inArea inAreaArray incapacitatedState inflame inflamed infoPanel infoPanelComponentEnabled infoPanelComponents infoPanels inGameUISetEventHandler inheritsFrom initAmbientLife inPolygon inputAction inRangeOfArtillery insertEditorObject intersect is3DEN is3DENMultiplayer isAbleToBreathe isAgent isArray isAutoHoverOn isAutonomous isAutotest isBleeding isBurning isClass isCollisionLightOn isCopilotEnabled isDamageAllowed isDedicated isDLCAvailable isEngineOn isEqualTo isEqualType isEqualTypeAll isEqualTypeAny isEqualTypeArray isEqualTypeParams isFilePatchingEnabled isFlashlightOn isFlatEmpty isForcedWalk isFormationLeader isGroupDeletedWhenEmpty isHidden isInRemainsCollector isInstructorFigureEnabled isIRLaserOn isKeyActive isKindOf isLaserOn isLightOn isLocalized isManualFire isMarkedForCollection isMultiplayer isMultiplayerSolo isNil isNull isNumber isObjectHidden isObjectRTD isOnRoad isPipEnabled isPlayer isRealTime isRemoteExecuted isRemoteExecutedJIP isServer isShowing3DIcons isSimpleObject isSprintAllowed isStaminaEnabled isSteamMission isStreamFriendlyUIEnabled isText isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable isUAVConnected isUIContext isUniformAllowed isVehicleCargo isVehicleRadarOn isVehicleSensorEnabled isWalking isWeaponDeployed isWeaponRested itemCargo items itemsWithMagazines join joinAs joinAsSilent joinSilent joinString kbAddDatabase kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact kbRemoveTopic kbTell kbWasSaid keyImage keyName knowsAbout land landAt landResult language laserTarget lbAdd lbClear lbColor lbColorRight lbCurSel lbData lbDelete lbIsSelected lbPicture lbPictureRight lbSelection lbSetColor lbSetColorRight lbSetCurSel lbSetData lbSetPicture lbSetPictureColor lbSetPictureColorDisabled lbSetPictureColorSelected lbSetPictureRight lbSetPictureRightColor lbSetPictureRightColorDisabled lbSetPictureRightColorSelected lbSetSelectColor lbSetSelectColorRight lbSetSelected lbSetText lbSetTextRight lbSetTooltip lbSetValue lbSize lbSort lbSortByValue lbText lbTextRight lbValue leader leaderboardDeInit leaderboardGetRows leaderboardInit leaderboardRequestRowsFriends leaderboardsRequestUploadScore leaderboardsRequestUploadScoreKeepBest leaderboardState leaveVehicle libraryCredits libraryDisclaimers lifeState lightAttachObject lightDetachObject lightIsOn lightnings limitSpeed linearConversion lineIntersects lineIntersectsObjs lineIntersectsSurfaces lineIntersectsWith linkItem list listObjects listRemoteTargets listVehicleSensors ln lnbAddArray lnbAddColumn lnbAddRow lnbClear lnbColor lnbCurSelRow lnbData lnbDeleteColumn lnbDeleteRow lnbGetColumnsPosition lnbPicture lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData lnbSetPicture lnbSetText lnbSetValue lnbSize lnbSort lnbSortByValue lnbText lnbValue load loadAbs loadBackpack loadFile loadGame loadIdentity loadMagazine loadOverlay loadStatus loadUniform loadVest local localize locationPosition lock lockCameraTo lockCargo lockDriver locked lockedCargo lockedDriver lockedTurret lockIdentity lockTurret lockWP log logEntities logNetwork logNetworkTerminate lookAt lookAtPos magazineCargo magazines magazinesAllTurrets magazinesAmmo magazinesAmmoCargo magazinesAmmoFull magazinesDetail magazinesDetailBackpack magazinesDetailUniform magazinesDetailVest magazinesTurret magazineTurretAmmo mapAnimAdd mapAnimClear mapAnimCommit mapAnimDone mapCenterOnCamera mapGridPosition markAsFinishedOnSteam markerAlpha markerBrush markerColor markerDir markerPos markerShape markerSize markerText markerType max members menuAction menuAdd menuChecked menuClear menuCollapse menuData menuDelete menuEnable menuEnabled menuExpand menuHover menuPicture menuSetAction menuSetCheck menuSetData menuSetPicture menuSetValue menuShortcut menuShortcutText menuSize menuSort menuText menuURL menuValue min mineActive mineDetectedBy missionConfigFile missionDifficulty missionName missionNamespace missionStart missionVersion mod modelToWorld modelToWorldVisual modelToWorldVisualWorld modelToWorldWorld modParams moonIntensity moonPhase morale move move3DENCamera moveInAny moveInCargo moveInCommander moveInDriver moveInGunner moveInTurret moveObjectToEnd moveOut moveTime moveTo moveToCompleted moveToFailed musicVolume name nameSound nearEntities nearestBuilding nearestLocation nearestLocations nearestLocationWithDubbing nearestObject nearestObjects nearestTerrainObjects nearObjects nearObjectsReady nearRoads nearSupplies nearTargets needReload netId netObjNull newOverlay nextMenuItemIndex nextWeatherChange nMenuItems not numberOfEnginesRTD numberToDate objectCurators objectFromNetId objectParent objStatus onBriefingGroup onBriefingNotes onBriefingPlan onBriefingTeamSwitch onCommandModeChanged onDoubleClick onEachFrame onGroupIconClick onGroupIconOverEnter onGroupIconOverLeave onHCGroupSelectionChanged onMapSingleClick onPlayerConnected onPlayerDisconnected onPreloadFinished onPreloadStarted onShowNewObject onTeamSwitch openCuratorInterface openDLCPage openMap openSteamApp openYoutubeVideo or orderGetIn overcast overcastForecast owner param params parseNumber parseSimpleArray parseText parsingNamespace particlesQuality pickWeaponPool pitch pixelGrid pixelGridBase pixelGridNoUIScale pixelH pixelW playableSlotsNumber playableUnits playAction playActionNow player playerRespawnTime playerSide playersNumber playGesture playMission playMove playMoveNow playMusic playScriptedMission playSound playSound3D position positionCameraToWorld posScreenToWorld posWorldToScreen ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ppEffectDestroy ppEffectEnable ppEffectEnabled ppEffectForceInNVG precision preloadCamera preloadObject preloadSound preloadTitleObj preloadTitleRsc preprocessFile preprocessFileLineNumbers primaryWeapon primaryWeaponItems primaryWeaponMagazine priority processDiaryLink productVersion profileName profileNamespace profileNameSteam progressLoadingScreen progressPosition progressSetPosition publicVariable publicVariableClient publicVariableServer pushBack pushBackUnique putWeaponPool queryItemsPool queryMagazinePool queryWeaponPool rad radioChannelAdd radioChannelCreate radioChannelRemove radioChannelSetCallSign radioChannelSetLabel radioVolume rain rainbow random rank rankId rating rectangular registeredTasks registerTask reload reloadEnabled remoteControl remoteExec remoteExecCall remoteExecutedOwner remove3DENConnection remove3DENEventHandler remove3DENLayer removeAction removeAll3DENEventHandlers removeAllActions removeAllAssignedItems removeAllContainers removeAllCuratorAddons removeAllCuratorCameraAreas removeAllCuratorEditingAreas removeAllEventHandlers removeAllHandgunItems removeAllItems removeAllItemsWithMagazines removeAllMissionEventHandlers removeAllMPEventHandlers removeAllMusicEventHandlers removeAllOwnedMines removeAllPrimaryWeaponItems removeAllWeapons removeBackpack removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea removeCuratorEditableObjects removeCuratorEditingArea removeDrawIcon removeDrawLinks removeEventHandler removeFromRemainsCollector removeGoggles removeGroupIcon removeHandgunItem removeHeadgear removeItem removeItemFromBackpack removeItemFromUniform removeItemFromVest removeItems removeMagazine removeMagazineGlobal removeMagazines removeMagazinesTurret removeMagazineTurret removeMenuItem removeMissionEventHandler removeMPEventHandler removeMusicEventHandler removeOwnedMine removePrimaryWeaponItem removeSecondaryWeaponItem removeSimpleTask removeSwitchableUnit removeTeamMember removeUniform removeVest removeWeapon removeWeaponAttachmentCargo removeWeaponCargo removeWeaponGlobal removeWeaponTurret reportRemoteTarget requiredVersion resetCamShake resetSubgroupDirection resize resources respawnVehicle restartEditorCamera reveal revealMine reverse reversedMouseY roadAt roadsConnectedTo roleDescription ropeAttachedObjects ropeAttachedTo ropeAttachEnabled ropeAttachTo ropeCreate ropeCut ropeDestroy ropeDetach ropeEndPosition ropeLength ropes ropeUnwind ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript safeZoneH safeZoneW safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY save3DENInventory saveGame saveIdentity saveJoysticks saveOverlay saveProfileNamespace saveStatus saveVar savingEnabled say say2D say3D scopeName score scoreSide screenshot screenToWorld scriptDone scriptName scudState secondaryWeapon secondaryWeaponItems secondaryWeaponMagazine select selectBestPlaces selectDiarySubject selectedEditorObjects selectEditorObject selectionNames selectionPosition selectLeader selectMax selectMin selectNoPlayer selectPlayer selectRandom selectRandomWeighted selectWeapon selectWeaponTurret sendAUMessage sendSimpleCommand sendTask sendTaskResult sendUDPMessage serverCommand serverCommandAvailable serverCommandExecutable serverName serverTime set set3DENAttribute set3DENAttributes set3DENGrid set3DENIconsVisible set3DENLayer set3DENLinesVisible set3DENLogicType set3DENMissionAttribute set3DENMissionAttributes set3DENModelsVisible set3DENObjectType set3DENSelected setAccTime setActualCollectiveRTD setAirplaneThrottle setAirportSide setAmmo setAmmoCargo setAmmoOnPylon setAnimSpeedCoef setAperture setApertureNew setArmoryPoints setAttributes setAutonomous setBehaviour setBleedingRemaining setBrakesRTD setCameraInterest setCamShakeDefParams setCamShakeParams setCamUseTI setCaptive setCenterOfMass setCollisionLight setCombatMode setCompassOscillation setConvoySeparation setCuratorCameraAreaCeiling setCuratorCoef setCuratorEditingAreaType setCuratorWaypointCost setCurrentChannel setCurrentTask setCurrentWaypoint setCustomAimCoef setCustomWeightRTD setDamage setDammage setDate setDebriefingText setDefaultCamera setDestination setDetailMapBlendPars setDir setDirection setDrawIcon setDriveOnPath setDropInterval setDynamicSimulationDistance setDynamicSimulationDistanceCoef setEditorMode setEditorObjectScope setEffectCondition setEngineRPMRTD setFace setFaceAnimation setFatigue setFeatureType setFlagAnimationPhase setFlagOwner setFlagSide setFlagTexture setFog setFormation setFormationTask setFormDir setFriend setFromEditor setFSMVariable setFuel setFuelCargo setGroupIcon setGroupIconParams setGroupIconsSelectable setGroupIconsVisible setGroupId setGroupIdGlobal setGroupOwner setGusts setHideBehind setHit setHitIndex setHitPointDamage setHorizonParallaxCoef setHUDMovementLevels setIdentity setImportance setInfoPanel setLeader setLightAmbient setLightAttenuation setLightBrightness setLightColor setLightDayLight setLightFlareMaxDistance setLightFlareSize setLightIntensity setLightnings setLightUseFlare setLocalWindParams setMagazineTurretAmmo setMarkerAlpha setMarkerAlphaLocal setMarkerBrush setMarkerBrushLocal setMarkerColor setMarkerColorLocal setMarkerDir setMarkerDirLocal setMarkerPos setMarkerPosLocal setMarkerShape setMarkerShapeLocal setMarkerSize setMarkerSizeLocal setMarkerText setMarkerTextLocal setMarkerType setMarkerTypeLocal setMass setMimic setMousePosition setMusicEffect setMusicEventHandler setName setNameSound setObjectArguments setObjectMaterial setObjectMaterialGlobal setObjectProxy setObjectTexture setObjectTextureGlobal setObjectViewDistance setOvercast setOwner setOxygenRemaining setParticleCircle setParticleClass setParticleFire setParticleParams setParticleRandom setPilotCameraDirection setPilotCameraRotation setPilotCameraTarget setPilotLight setPiPEffect setPitch setPlateNumber setPlayable setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW setPosATL setPosition setPosWorld setPylonLoadOut setPylonsPriority setRadioMsg setRain setRainbow setRandomLip setRank setRectangular setRepairCargo setRotorBrakeRTD setShadowDistance setShotParents setSide setSimpleTaskAlwaysVisible setSimpleTaskCustomData setSimpleTaskDescription setSimpleTaskDestination setSimpleTaskTarget setSimpleTaskType setSimulWeatherLayers setSize setSkill setSlingLoad setSoundEffect setSpeaker setSpeech setSpeedMode setStamina setStaminaScheme setStatValue setSuppression setSystemOfUnits setTargetAge setTaskMarkerOffset setTaskResult setTaskState setTerrainGrid setText setTimeMultiplier setTitleEffect setTrafficDensity setTrafficDistance setTrafficGap setTrafficSpeed setTriggerActivation setTriggerArea setTriggerStatements setTriggerText setTriggerTimeout setTriggerType setType setUnconscious setUnitAbility setUnitLoadout setUnitPos setUnitPosWeak setUnitRank setUnitRecoilCoefficient setUnitTrait setUnloadInCombat setUserActionText setUserMFDText setUserMFDvalue setVariable setVectorDir setVectorDirAndUp setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor setVehicleCargo setVehicleId setVehicleLock setVehiclePosition setVehicleRadar setVehicleReceiveRemoteTargets setVehicleReportOwnPosition setVehicleReportRemoteTargets setVehicleTIPars setVehicleVarName setVelocity setVelocityModelSpace setVelocityTransformation setViewDistance setVisibleIfTreeCollapsed setWantedRPMRTD setWaves setWaypointBehaviour setWaypointCombatMode setWaypointCompletionRadius setWaypointDescription setWaypointForceBehaviour setWaypointFormation setWaypointHousePosition setWaypointLoiterRadius setWaypointLoiterType setWaypointName setWaypointPosition setWaypointScript setWaypointSpeed setWaypointStatements setWaypointTimeout setWaypointType setWaypointVisible setWeaponReloadingTime setWind setWindDir setWindForce setWindStr setWingForceScaleRTD setWPPos show3DIcons showChat showCinemaBorder showCommandingMenu showCompass showCuratorCompass showGPS showHUD showLegend showMap shownArtilleryComputer shownChat shownCompass shownCuratorCompass showNewEditorObject shownGPS shownHUD shownMap shownPad shownRadio shownScoretable shownUAVFeed shownWarrant shownWatch showPad showRadio showScoretable showSubtitles showUAVFeed showWarrant showWatch showWaypoint showWaypoints side sideChat sideEnemy sideFriendly sideRadio simpleTasks simulationEnabled simulCloudDensity simulCloudOcclusion simulInClouds simulWeatherSync sin size sizeOf skill skillFinal skipTime sleep sliderPosition sliderRange sliderSetPosition sliderSetRange sliderSetSpeed sliderSpeed slingLoadAssistantShown soldierMagazines someAmmo sort soundVolume spawn speaker speed speedMode splitString sqrt squadParams stance startLoadingScreen step stop stopEngineRTD stopped str sunOrMoon supportInfo suppressFor surfaceIsWater surfaceNormal surfaceType swimInDepth switchableUnits switchAction switchCamera switchGesture switchLight switchMove synchronizedObjects synchronizedTriggers synchronizedWaypoints synchronizeObjectsAdd synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint systemChat systemOfUnits tan targetKnowledge targets targetsAggregate targetsQuery taskAlwaysVisible taskChildren taskCompleted taskCustomData taskDescription taskDestination taskHint taskMarkerOffset taskParent taskResult taskState taskType teamMember teamName teams teamSwitch teamSwitchEnabled teamType terminate terrainIntersect terrainIntersectASL terrainIntersectAtASL text textLog textLogFormat tg time timeMultiplier titleCut titleFadeOut titleObj titleRsc titleText toArray toFixed toLower toString toUpper triggerActivated triggerActivation triggerArea triggerAttachedVehicle triggerAttachObject triggerAttachVehicle triggerDynamicSimulation triggerStatements triggerText triggerTimeout triggerTimeoutCurrent triggerType turretLocal turretOwner turretUnit tvAdd tvClear tvCollapse tvCollapseAll tvCount tvCurSel tvData tvDelete tvExpand tvExpandAll tvPicture tvSetColor tvSetCurSel tvSetData tvSetPicture tvSetPictureColor tvSetPictureColorDisabled tvSetPictureColorSelected tvSetPictureRight tvSetPictureRightColor tvSetPictureRightColorDisabled tvSetPictureRightColorSelected tvSetText tvSetTooltip tvSetValue tvSort tvSortByValue tvText tvTooltip tvValue type typeName typeOf UAVControl uiNamespace uiSleep unassignCurator unassignItem unassignTeam unassignVehicle underwater uniform uniformContainer uniformItems uniformMagazines unitAddons unitAimPosition unitAimPositionVisual unitBackpack unitIsUAV unitPos unitReady unitRecoilCoefficient units unitsBelowHeight unlinkItem unlockAchievement unregisterTask updateDrawIcon updateMenuItem updateObjectTree useAISteeringComponent useAudioTimeForMoves userInputDisabled vectorAdd vectorCos vectorCrossProduct vectorDiff vectorDir vectorDirVisual vectorDistance vectorDistanceSqr vectorDotProduct vectorFromTo vectorMagnitude vectorMagnitudeSqr vectorModelToWorld vectorModelToWorldVisual vectorMultiply vectorNormalized vectorUp vectorUpVisual vectorWorldToModel vectorWorldToModelVisual vehicle vehicleCargoEnabled vehicleChat vehicleRadio vehicleReceiveRemoteTargets vehicleReportOwnPosition vehicleReportRemoteTargets vehicles vehicleVarName velocity velocityModelSpace verifySignature vest vestContainer vestItems vestMagazines viewDistance visibleCompass visibleGPS visibleMap visiblePosition visiblePositionASL visibleScoretable visibleWatch waves waypointAttachedObject waypointAttachedVehicle waypointAttachObject waypointAttachVehicle waypointBehaviour waypointCombatMode waypointCompletionRadius waypointDescription waypointForceBehaviour waypointFormation waypointHousePosition waypointLoiterRadius waypointLoiterType waypointName waypointPosition waypoints waypointScript waypointsEnabledUAV waypointShow waypointSpeed waypointStatements waypointTimeout waypointTimeoutCurrent waypointType waypointVisible weaponAccessories weaponAccessoriesCargo weaponCargo weaponDirection weaponInertia weaponLowered weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret weightRTD WFSideText wind ",literal:"blufor civilian configNull controlNull displayNull east endl false grpNull independent lineBreak locationNull nil objNull opfor pi resistance scriptNull sideAmbientLife sideEmpty sideLogic sideUnknown taskNull teamMemberNull true west"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.NUMBER_MODE,{className:"variable",begin:/\b_+[a-zA-Z]\w*/},{className:"title",begin:/[a-zA-Z][a-zA-Z0-9]+_fnc_\w*/},t,n],illegal:/#|^\$ /}}},function(e,t){e.exports=function(e){var t=e.COMMENT("--","$");return{name:"SQL (more)",aliases:["mysql","oracle"],disableAutodetect:!0,case_insensitive:!0,illegal:/[<>{}*]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",end:/;/,endsWithParent:!0,keywords:{$pattern:/[\w\.]+/,keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null unknown",built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:"`",end:"`"},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(...e){return e.map(e=>n(e)).join("")}function o(...e){return"("+e.map(e=>n(e)).join("|")+")"}e.exports=function(e){const t=e.COMMENT("--","$"),n=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],a=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],c=a,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update ","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter(e=>!a.includes(e)),u={begin:r(/\b/,o(...c),/\s*\(/),keywords:{built_in:c}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?e+"|0":e)}(l,{when:e=>e.length<3}),literal:n,type:i,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:o(...s),keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:n,type:i}},{className:"type",begin:o("double precision","large object","with timezone","without timezone")},u,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}},function(e,t){e.exports=function(e){return{name:"Stan",aliases:["stanfuncs"],keywords:{$pattern:e.IDENT_RE,title:["functions","model","data","parameters","quantities","transformed","generated"],keyword:["for","in","if","else","while","break","continue","return"].concat(["int","real","vector","ordered","positive_ordered","simplex","unit_vector","row_vector","matrix","cholesky_factor_corr|10","cholesky_factor_cov|10","corr_matrix|10","cov_matrix|10","void"]).concat(["print","reject","increment_log_prob|10","integrate_ode|10","integrate_ode_rk45|10","integrate_ode_bdf|10","algebra_solver"]),built_in:["Phi","Phi_approx","abs","acos","acosh","algebra_solver","append_array","append_col","append_row","asin","asinh","atan","atan2","atanh","bernoulli_cdf","bernoulli_lccdf","bernoulli_lcdf","bernoulli_logit_lpmf","bernoulli_logit_rng","bernoulli_lpmf","bernoulli_rng","bessel_first_kind","bessel_second_kind","beta_binomial_cdf","beta_binomial_lccdf","beta_binomial_lcdf","beta_binomial_lpmf","beta_binomial_rng","beta_cdf","beta_lccdf","beta_lcdf","beta_lpdf","beta_rng","binary_log_loss","binomial_cdf","binomial_coefficient_log","binomial_lccdf","binomial_lcdf","binomial_logit_lpmf","binomial_lpmf","binomial_rng","block","categorical_logit_lpmf","categorical_logit_rng","categorical_lpmf","categorical_rng","cauchy_cdf","cauchy_lccdf","cauchy_lcdf","cauchy_lpdf","cauchy_rng","cbrt","ceil","chi_square_cdf","chi_square_lccdf","chi_square_lcdf","chi_square_lpdf","chi_square_rng","cholesky_decompose","choose","col","cols","columns_dot_product","columns_dot_self","cos","cosh","cov_exp_quad","crossprod","csr_extract_u","csr_extract_v","csr_extract_w","csr_matrix_times_vector","csr_to_dense_matrix","cumulative_sum","determinant","diag_matrix","diag_post_multiply","diag_pre_multiply","diagonal","digamma","dims","dirichlet_lpdf","dirichlet_rng","distance","dot_product","dot_self","double_exponential_cdf","double_exponential_lccdf","double_exponential_lcdf","double_exponential_lpdf","double_exponential_rng","e","eigenvalues_sym","eigenvectors_sym","erf","erfc","exp","exp2","exp_mod_normal_cdf","exp_mod_normal_lccdf","exp_mod_normal_lcdf","exp_mod_normal_lpdf","exp_mod_normal_rng","expm1","exponential_cdf","exponential_lccdf","exponential_lcdf","exponential_lpdf","exponential_rng","fabs","falling_factorial","fdim","floor","fma","fmax","fmin","fmod","frechet_cdf","frechet_lccdf","frechet_lcdf","frechet_lpdf","frechet_rng","gamma_cdf","gamma_lccdf","gamma_lcdf","gamma_lpdf","gamma_p","gamma_q","gamma_rng","gaussian_dlm_obs_lpdf","get_lp","gumbel_cdf","gumbel_lccdf","gumbel_lcdf","gumbel_lpdf","gumbel_rng","head","hypergeometric_lpmf","hypergeometric_rng","hypot","inc_beta","int_step","integrate_ode","integrate_ode_bdf","integrate_ode_rk45","inv","inv_Phi","inv_chi_square_cdf","inv_chi_square_lccdf","inv_chi_square_lcdf","inv_chi_square_lpdf","inv_chi_square_rng","inv_cloglog","inv_gamma_cdf","inv_gamma_lccdf","inv_gamma_lcdf","inv_gamma_lpdf","inv_gamma_rng","inv_logit","inv_sqrt","inv_square","inv_wishart_lpdf","inv_wishart_rng","inverse","inverse_spd","is_inf","is_nan","lbeta","lchoose","lgamma","lkj_corr_cholesky_lpdf","lkj_corr_cholesky_rng","lkj_corr_lpdf","lkj_corr_rng","lmgamma","lmultiply","log","log10","log1m","log1m_exp","log1m_inv_logit","log1p","log1p_exp","log2","log_determinant","log_diff_exp","log_falling_factorial","log_inv_logit","log_mix","log_rising_factorial","log_softmax","log_sum_exp","logistic_cdf","logistic_lccdf","logistic_lcdf","logistic_lpdf","logistic_rng","logit","lognormal_cdf","lognormal_lccdf","lognormal_lcdf","lognormal_lpdf","lognormal_rng","machine_precision","matrix_exp","max","mdivide_left_spd","mdivide_left_tri_low","mdivide_right_spd","mdivide_right_tri_low","mean","min","modified_bessel_first_kind","modified_bessel_second_kind","multi_gp_cholesky_lpdf","multi_gp_lpdf","multi_normal_cholesky_lpdf","multi_normal_cholesky_rng","multi_normal_lpdf","multi_normal_prec_lpdf","multi_normal_rng","multi_student_t_lpdf","multi_student_t_rng","multinomial_lpmf","multinomial_rng","multiply_log","multiply_lower_tri_self_transpose","neg_binomial_2_cdf","neg_binomial_2_lccdf","neg_binomial_2_lcdf","neg_binomial_2_log_lpmf","neg_binomial_2_log_rng","neg_binomial_2_lpmf","neg_binomial_2_rng","neg_binomial_cdf","neg_binomial_lccdf","neg_binomial_lcdf","neg_binomial_lpmf","neg_binomial_rng","negative_infinity","normal_cdf","normal_lccdf","normal_lcdf","normal_lpdf","normal_rng","not_a_number","num_elements","ordered_logistic_lpmf","ordered_logistic_rng","owens_t","pareto_cdf","pareto_lccdf","pareto_lcdf","pareto_lpdf","pareto_rng","pareto_type_2_cdf","pareto_type_2_lccdf","pareto_type_2_lcdf","pareto_type_2_lpdf","pareto_type_2_rng","pi","poisson_cdf","poisson_lccdf","poisson_lcdf","poisson_log_lpmf","poisson_log_rng","poisson_lpmf","poisson_rng","positive_infinity","pow","print","prod","qr_Q","qr_R","quad_form","quad_form_diag","quad_form_sym","rank","rayleigh_cdf","rayleigh_lccdf","rayleigh_lcdf","rayleigh_lpdf","rayleigh_rng","reject","rep_array","rep_matrix","rep_row_vector","rep_vector","rising_factorial","round","row","rows","rows_dot_product","rows_dot_self","scaled_inv_chi_square_cdf","scaled_inv_chi_square_lccdf","scaled_inv_chi_square_lcdf","scaled_inv_chi_square_lpdf","scaled_inv_chi_square_rng","sd","segment","sin","singular_values","sinh","size","skew_normal_cdf","skew_normal_lccdf","skew_normal_lcdf","skew_normal_lpdf","skew_normal_rng","softmax","sort_asc","sort_desc","sort_indices_asc","sort_indices_desc","sqrt","sqrt2","square","squared_distance","step","student_t_cdf","student_t_lccdf","student_t_lcdf","student_t_lpdf","student_t_rng","sub_col","sub_row","sum","tail","tan","tanh","target","tcrossprod","tgamma","to_array_1d","to_array_2d","to_matrix","to_row_vector","to_vector","trace","trace_gen_quad_form","trace_quad_form","trigamma","trunc","uniform_cdf","uniform_lccdf","uniform_lcdf","uniform_lpdf","uniform_rng","variance","von_mises_lpdf","von_mises_rng","weibull_cdf","weibull_lccdf","weibull_lcdf","weibull_lpdf","weibull_rng","wiener_lpdf","wishart_lpdf","wishart_rng"]},contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(/#/,/$/,{relevance:0,keywords:{"meta-keyword":"include"}}),e.COMMENT(/\/\*/,/\*\//,{relevance:0,contains:[{className:"doctag",begin:/@(return|param)/}]}),{begin:/<\s*lower\s*=/,keywords:"lower"},{begin:/[<,]\s*upper\s*=/,keywords:"upper"},{className:"keyword",begin:/\btarget\s*\+=/,relevance:10},{begin:"~\\s*("+e.IDENT_RE+")\\s*\\(",keywords:["bernoulli","bernoulli_logit","beta","beta_binomial","binomial","binomial_logit","categorical","categorical_logit","cauchy","chi_square","dirichlet","double_exponential","exp_mod_normal","exponential","frechet","gamma","gaussian_dlm_obs","gumbel","hypergeometric","inv_chi_square","inv_gamma","inv_wishart","lkj_corr","lkj_corr_cholesky","logistic","lognormal","multi_gp","multi_gp_cholesky","multi_normal","multi_normal_cholesky","multi_normal_prec","multi_student_t","multinomial","neg_binomial","neg_binomial_2","neg_binomial_2_log","normal","ordered_logistic","pareto","pareto_type_2","poisson","poisson_log","rayleigh","scaled_inv_chi_square","skew_normal","student_t","uniform","von_mises","weibull","wiener","wishart"]},{className:"number",variants:[{begin:/\b\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/},{begin:/\.\d+(?:[eE][+-]?\d+)?\b/}],relevance:0},{className:"string",begin:'"',end:'"',relevance:0}]}}},function(e,t){e.exports=function(e){return{name:"Stata",aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey bias binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 bubble bubbleplot ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error esize est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 forest forestplot form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate funnel funnelplot g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labbe labbeplot labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize menl meqparse mer merg merge meta mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trimfill trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"symbol",begin:/`[a-zA-Z0-9_]+'/},{className:"variable",begin:/\$\{?[a-zA-Z0-9_]+\}?/},{className:"string",variants:[{begin:'`"[^\r\n]*?"\''},{begin:'"[^\r\n"]*"'}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ \t]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:"HEADER ENDSEC DATA"},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}},function(e,t){const n=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],i=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],a=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse();e.exports=function(e){const t=(e=>({IMPORTANT:{className:"meta",begin:"!important"},HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}))(e),s={className:"variable",begin:"\\$"+e.IDENT_RE};return{name:"Stylus",aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.HEXCOLOR,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*(?=[.\\s\\n[:,(])",className:"selector-class"},{begin:"#[a-zA-Z][a-zA-Z0-9_-]*(?=[.\\s\\n[:,(])",className:"selector-id"},{begin:"\\b("+n.join("|")+")(?=[.\\s\\n[:,(])",className:"selector-tag"},{className:"selector-pseudo",begin:"&?:("+o.join("|")+")(?=[.\\s\\n[:,(])"},{className:"selector-pseudo",begin:"&?::("+i.join("|")+")(?=[.\\s\\n[:,(])"},t.ATTRIBUTE_SELECTOR_MODE,{className:"keyword",begin:/@media/,starts:{end:/[{;}]/,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:r.join(" ")},contains:[e.CSS_NUMBER_MODE]}},{className:"keyword",begin:"@((-(o|moz|ms|webkit)-)?("+["charset","css","debug","extend","font-face","for","import","include","keyframes","media","mixin","page","warn","while"].join("|")+"))\\b"},s,e.CSS_NUMBER_MODE,{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[t.HEXCOLOR,s,e.APOS_STRING_MODE,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE]}]},{className:"attribute",begin:"\\b("+a.join("|")+")\\b",starts:{end:/;|$/,contains:[t.HEXCOLOR,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t.IMPORTANT],illegal:/\./,relevance:0}}]}}},function(e,t){e.exports=function(e){return{name:"SubUnit",case_insensitive:!0,contains:[{className:"string",begin:"\\[\n(multipart)?",end:"\\]\n"},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(e){return o("(?=",e,")")}function o(...e){return e.map(e=>n(e)).join("")}function i(...e){return"("+e.map(e=>n(e)).join("|")+")"}const a=e=>o(/\b/,e,/\w$/.test(e)?/\b/:/\B/),s=["Protocol","Type"].map(a),c=["init","self"].map(a),l=["Any","Self"],u=["associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],d=["false","nil","true"],h=["assignment","associativity","higherThan","left","lowerThan","none","right"],p=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],m=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],g=i(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),f=i(g,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),_=o(g,f,"*"),b=i(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),v=i(b,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),y=o(b,v,"*"),E=o(/[A-Z]/,v,"*"),S=["autoclosure",o(/convention\(/,i("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",o(/objc\(/,y,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","testable","UIApplicationMain","unknown","usableFromInline"],w=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];e.exports=function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),g=[e.C_LINE_COMMENT_MODE,n],b={className:"keyword",begin:o(/\./,r(i(...s,...c))),end:i(...s,...c),excludeBegin:!0},C={match:o(/\./,i(...u)),relevance:0},T=u.filter(e=>"string"==typeof e).concat(["_|0"]),x={variants:[{className:"keyword",match:i(...u.filter(e=>"string"!=typeof e).concat(l).map(a),...c)}]},k={$pattern:i(/\b\w+/,/#\w+/),keyword:T.concat(p),literal:d},F=[b,C,x],O=[{match:o(/\./,i(...m)),relevance:0},{className:"built_in",match:o(/\b/,i(...m),/(?=\()/)}],R={match:/->/,relevance:0},D=[R,{className:"operator",relevance:0,variants:[{match:_},{match:`\\.(\\.|${f})+`}]}],I={className:"number",relevance:0,variants:[{match:"\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b"},{match:"\\b0x(([0-9a-fA-F]_*)+)(\\.(([0-9a-fA-F]_*)+))?([pP][+-]?(([0-9]_*)+))?\\b"},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},A=(e="")=>({className:"subst",variants:[{match:o(/\\/,e,/[0\\tnr"']/)},{match:o(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),N=(e="")=>({className:"subst",match:o(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(e="")=>({className:"subst",label:"interpol",begin:o(/\\/,e,/\(/),end:/\)/}),P=(e="")=>({begin:o(e,/"""/),end:o(/"""/,e),contains:[A(e),N(e),M(e)]}),L=(e="")=>({begin:o(e,/"/),end:o(/"/,e),contains:[A(e),M(e)]}),j={className:"string",variants:[P(),P("#"),P("##"),P("###"),L(),L("#"),L("##"),L("###")]},U={match:o(/`/,y,/`/)},B=[U,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${v}+`}],G=[{match:/(@|#)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:w,contains:[...D,I,j]}]}},{className:"keyword",match:o(/@/,i(...S))},{className:"meta",match:o(/@/,y)}],V={match:r(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:o(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,v,"+")},{className:"type",match:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:o(/\s+&\s+/,r(E)),relevance:0}]},q={begin:/</,end:/>/,keywords:k,contains:[...g,...F,...G,R,V]};V.contains.push(q);const H={begin:/\(/,end:/\)/,relevance:0,keywords:k,contains:["self",{match:o(y,/\s*:/),keywords:"_|0",relevance:0},...g,...F,...O,...D,I,j,...B,...G,V]},z={beginKeywords:"func",contains:[{className:"title",match:i(U.match,y,_),endsParent:!0,relevance:0},t]},W={begin:/</,end:/>/,contains:[...g,V]},K={begin:/\(/,end:/\)/,keywords:k,contains:[{begin:i(r(o(y,/\s*:/)),r(o(y,/\s+/,y,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:y}]},...g,...F,...D,I,j,...G,V,H],endsParent:!0,illegal:/["']/},Y={className:"function",match:r(/\bfunc\b/),contains:[z,W,K,t],illegal:[/\[/,/%/]},$={className:"function",match:/\b(subscript|init[?!]?)\s*(?=[<(])/,keywords:{keyword:"subscript init init? init!",$pattern:/\w+[?!]?/},contains:[W,K,t],illegal:/\[|%/},Q={beginKeywords:"operator",end:e.MATCH_NOTHING_RE,contains:[{className:"title",match:_,endsParent:!0,relevance:0}]},J={beginKeywords:"precedencegroup",end:e.MATCH_NOTHING_RE,contains:[{className:"title",match:E,relevance:0},{begin:/{/,end:/}/,relevance:0,endsParent:!0,keywords:[...h,...d],contains:[V]}]};for(const e of j.variants){const t=e.contains.find(e=>"interpol"===e.label);t.keywords=k;const n=[...F,...O,...D,I,j,...B];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:k,contains:[...g,Y,$,{className:"class",beginKeywords:"struct protocol class extension enum",end:"\\{",excludeEnd:!0,keywords:k,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...F]},Q,J,{beginKeywords:"import",end:/$/,contains:[...g],relevance:0},...F,...O,...D,I,j,...B,...G,V,H]}}},function(e,t){e.exports=function(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\(/,end:/\)/,contains:["self",{begin:/\\./}]}],relevance:10},{className:"keyword",begin:/\$(?!noop)[a-zA-Z][_a-zA-Z0-9]*/,end:/\(/,excludeEnd:!0},{className:"variable",begin:/%[_a-zA-Z0-9:]*/,end:"%"},{className:"symbol",begin:/\\./}]}}},function(e,t){e.exports=function(e){var t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},o=e.inherit(r,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),i={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},a={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},s={begin:/\{/,end:/\}/,contains:[a],illegal:"\\n",relevance:0},c={begin:"\\[",end:"\\]",contains:[a],illegal:"\\n",relevance:0},l=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},i,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},s,c,r],u=[...l];return u.pop(),u.push(o),a.contains=u,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:l}}},function(e,t){e.exports=function(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}},function(e,t){function n(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t=/[a-zA-Z_][a-zA-Z0-9_]*/,r={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:n(/\$/,(o=/::/,n("(",o,")?")),t,"(::",t,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[r]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r]};var o}},function(e,t){e.exports=function(e){return{name:"Thrift",keywords:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:"bool byte i16 i32 i64 double string binary",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",end:">",keywords:"bool byte i16 i32 i64 double string binary",contains:["self"]}]}}},function(e,t){e.exports=function(e){const t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"symbol",begin:":[^\\]]+"};return{name:"TP",keywords:{keyword:"ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN SUBSTR FINDSTR VOFFSET PROG ATTR MN POS",literal:"ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET"},contains:[{className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},{className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]},{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}},function(e,t){e.exports=function(e){var t="attribute block constant cycle date dump include max min parent random range source template_from_string",n={beginKeywords:t,keywords:{name:t},relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},r={begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize column convert_encoding date date_modify default escape filter first format inky_to_html inline_css join json_encode keys last length lower map markdown merge nl2br number_format raw reduce replace reverse round slice sort spaceless split striptags title trim upper url_encode",contains:[n]},o="apply autoescape block deprecated do embed extends filter flush for from if import include macro sandbox set use verbatim with";return o=o+" "+o.split(" ").map((function(e){return"end"+e})).join(" "),{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#\}/),{className:"template-tag",begin:/\{%/,end:/%\}/,contains:[{className:"name",begin:/\w+/,keywords:o,starts:{endsWithParent:!0,contains:[r,n],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self",r,n]}]}}},function(e,t){const n="[A-Za-z$_][0-9A-Za-z$_]*",r=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],o=["true","false","null","undefined","NaN","Infinity"],i=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function a(e){return s("(?=",e,")")}function s(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}e.exports=function(e){const t={$pattern:n,keyword:r.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]),literal:o,built_in:i.concat(["any","void","number","boolean","string","object","never","enum"])},c={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},l=(e,t,n)=>{const r=e.contains.findIndex(e=>e.label===t);if(-1===r)throw new Error("can not find mode to replace");e.contains.splice(r,1,n)},u=function(e){const t=n,c="<>",l="</>",u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];"<"!==r?">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch()):t.ignoreMatch()}},d={$pattern:n,keyword:r,literal:o,built_in:i},h="\\.([0-9](_?[0-9])*)",p={className:"number",variants:[{begin:`(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((${h})|\\.)?|(${h}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{begin:`\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},g={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},f={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},b={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:t+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,f,_,p,e.REGEXP_MODE];m.contains=v.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(v)});const y=[].concat(b,m.contains),E=y.concat([{begin:/\(/,end:/\)/,keywords:d,contains:["self"].concat(y)}]),S={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:E};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:E},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,f,_,b,p,{begin:s(/[{,\n]\s*/,a(s(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,t+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:t+a("\\s*:"),relevance:0}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[b,e.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:E}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:c,end:l},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:d,contains:["self",e.inherit(e.TITLE_MODE,{begin:t}),S],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[S,e.inherit(e.TITLE_MODE,{begin:t})]},{variants:[{begin:"\\."+t},{begin:"\\$"+t}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),"self",S]},{begin:"(get|set)\\s+(?="+t+"\\()",end:/\{/,keywords:"get set",contains:[e.inherit(e.TITLE_MODE,{begin:t}),{begin:/\(\)/},S]},{begin:/\$[(.]/}]}}(e);return Object.assign(u.keywords,t),u.exports.PARAMS_CONTAINS.push(c),u.contains=u.contains.concat([c,{beginKeywords:"namespace",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"}]),l(u,"shebang",e.SHEBANG()),l(u,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),u.contains.find(e=>"function"===e.className).relevance=0,Object.assign(u,{name:"TypeScript",aliases:["ts","tsx"]}),u}},function(e,t){e.exports=function(e){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$",relevance:2}]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(...e){return e.map(e=>n(e)).join("")}function o(...e){return"("+e.map(e=>n(e)).join("|")+")"}e.exports=function(e){const t=/\d{1,2}\/\d{1,2}\/\d{4}/,n=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:r(/# */,o(n,t),/ *#/)},{begin:r(/# */,a,/ *#/)},{begin:r(/# */,i,/ *#/)},{begin:r(/# */,o(n,t),/ +/,o(i,a),/ *#/)}]},c=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},c,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{"meta-keyword":"const disable else elseif enable end externalsource if region then"},contains:[l]}]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(...e){return e.map(e=>n(e)).join("")}function o(...e){return"("+e.map(e=>n(e)).join("|")+")"}e.exports=function(e){const t="lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid split cint sin datepart ltrim sqr time derived eval date formatpercent exp inputbox left ascw chrw regexp cstr err".split(" ");return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:["server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],literal:"true false null nothing empty"},illegal:"//",contains:[{begin:r(o(...t),"\\s*\\("),relevance:0,keywords:{built_in:t}},e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}},function(e,t){e.exports=function(e){return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1,keywords:{$pattern:/[\w\$]+/,keyword:"accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf|0 bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate|5 genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor",literal:"null",built_in:"$finish $stop $exit $fatal $error $warning $info $realtime $time $printtimescale $bitstoreal $bitstoshortreal $itor $signed $cast $bits $stime $timeformat $realtobits $shortrealtobits $rtoi $unsigned $asserton $assertkill $assertpasson $assertfailon $assertnonvacuouson $assertoff $assertcontrol $assertpassoff $assertfailoff $assertvacuousoff $isunbounded $sampled $fell $changed $past_gclk $fell_gclk $changed_gclk $rising_gclk $steady_gclk $coverage_control $coverage_get $coverage_save $set_coverage_db_name $rose $stable $past $rose_gclk $stable_gclk $future_gclk $falling_gclk $changing_gclk $display $coverage_get_max $coverage_merge $get_coverage $load_coverage_db $typename $unpacked_dimensions $left $low $increment $clog2 $ln $log10 $exp $sqrt $pow $floor $ceil $sin $cos $tan $countbits $onehot $isunknown $fatal $warning $dimensions $right $high $size $asin $acos $atan $atan2 $hypot $sinh $cosh $tanh $asinh $acosh $atanh $countones $onehot0 $error $info $random $dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson $dist_t $dist_uniform $q_initialize $q_remove $q_exam $async$and$array $async$nand$array $async$or$array $async$nor$array $sync$and$array $sync$nand$array $sync$or$array $sync$nor$array $q_add $q_full $psprintf $async$and$plane $async$nand$plane $async$or$plane $async$nor$plane $sync$and$plane $sync$nand$plane $sync$or$plane $sync$nor$plane $system $display $displayb $displayh $displayo $strobe $strobeb $strobeh $strobeo $write $readmemb $readmemh $writememh $value$plusargs $dumpvars $dumpon $dumplimit $dumpports $dumpportson $dumpportslimit $writeb $writeh $writeo $monitor $monitorb $monitorh $monitoro $writememb $dumpfile $dumpoff $dumpall $dumpflush $dumpportsoff $dumpportsall $dumpportsflush $fclose $fdisplay $fdisplayb $fdisplayh $fdisplayo $fstrobe $fstrobeb $fstrobeh $fstrobeo $swrite $swriteb $swriteh $swriteo $fscanf $fread $fseek $fflush $feof $fopen $fwrite $fwriteb $fwriteh $fwriteo $fmonitor $fmonitorb $fmonitorh $fmonitoro $sformat $sformatf $fgetc $ungetc $fgets $sscanf $rewind $ftell $ferror"},contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"number",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"\\b((\\d+'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{begin:"\\B(('(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{begin:"\\b([0-9_])+",relevance:0}]},{className:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{className:"meta",begin:"`",end:"$",keywords:{"meta-keyword":"define __FILE__ __LINE__ begin_keywords celldefine default_nettype define else elsif end_keywords endcelldefine endif ifdef ifndef include line nounconnected_drive pragma resetall timescale unconnected_drive undef undefineall"},relevance:0}]}}},function(e,t){e.exports=function(e){return{name:"VHDL",case_insensitive:!0,keywords:{keyword:"abs access after alias all and architecture array assert assume assume_guarantee attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package parameter port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable view vmode vprop vunit wait when while with xnor xor",built_in:"boolean bit character integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_logic std_logic_vector unsigned signed boolean_vector integer_vector std_ulogic std_ulogic_vector unresolved_unsigned u_unsigned unresolved_signed u_signed real_vector time_vector",literal:"false true note warning error failure line text side width"},illegal:/\{/,contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:"\\b(\\d(_|\\d)*#\\w+(\\.\\w+)?#([eE][-+]?\\d(_|\\d)*)?|\\d(_|\\d)*(\\.\\d(_|\\d)*)?([eE][-+]?\\d(_|\\d)*)?)",relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}},function(e,t){e.exports=function(e){return{name:"Vim Script",keywords:{$pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[e.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}},function(e,t){e.exports=function(e){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+e.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}},function(e,t){e.exports=function(e){const t={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:"if then else do while until for loop import with is as where when by data constant integer real text name boolean symbol infix prefix postfix block tree",literal:"true false nil",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts"},n={className:"string",begin:'"',end:'"',illegal:"\\n"},r={beginKeywords:"import",end:"$",keywords:t,contains:[n]},o={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,keywords:t}})]};return{name:"XL",aliases:["tao"],keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:"<<",end:">>"},o,r,{className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},e.NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"XQuery",aliases:["xpath","xq"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:"module schema namespace boundary-space preserve no-preserve strip default collation base-uri ordering context decimal-format decimal-separator copy-namespaces empty-sequence except exponent-separator external grouping-separator inherit no-inherit lax minus-sign per-mille percent schema-attribute schema-element strict unordered zero-digit declare import option function validate variable for at in let where order group by return if then else tumbling sliding window start when only end previous next stable ascending descending allowing empty greatest least some every satisfies switch case typeswitch try catch and or to union intersect instance of treat as castable cast map array delete insert into replace value rename copy modify update",type:"item document-node node attribute document element comment namespace namespace-node processing-instruction text construction xs:anyAtomicType xs:untypedAtomic xs:duration xs:time xs:decimal xs:float xs:double xs:gYearMonth xs:gYear xs:gMonthDay xs:gMonth xs:gDay xs:boolean xs:base64Binary xs:hexBinary xs:anyURI xs:QName xs:NOTATION xs:dateTime xs:dateTimeStamp xs:date xs:string xs:normalizedString xs:token xs:language xs:NMTOKEN xs:Name xs:NCName xs:ID xs:IDREF xs:ENTITY xs:integer xs:nonPositiveInteger xs:negativeInteger xs:long xs:int xs:short xs:byte xs:nonNegativeInteger xs:unisignedLong xs:unsignedInt xs:unsignedShort xs:unsignedByte xs:positiveInteger xs:yearMonthDuration xs:dayTimeDuration",literal:"eq ne lt le gt ge is self:: child:: descendant:: descendant-or-self:: attribute:: following:: following-sibling:: parent:: ancestor:: ancestor-or-self:: preceding:: preceding-sibling:: NaN"},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/},{begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^</$:'"-]\b(?:abs|accumulator-(?:after|before)|adjust-(?:date(?:Time)?|time)-to-timezone|analyze-string|apply|available-(?:environment-variables|system-properties)|avg|base-uri|boolean|ceiling|codepoints?-(?:equal|to-string)|collation-key|collection|compare|concat|contains(?:-token)?|copy-of|count|current(?:-)?(?:date(?:Time)?|time|group(?:ing-key)?|output-uri|merge-(?:group|key))?data|dateTime|days?-from-(?:date(?:Time)?|duration)|deep-equal|default-(?:collation|language)|distinct-values|document(?:-uri)?|doc(?:-available)?|element-(?:available|with-id)|empty|encode-for-uri|ends-with|environment-variable|error|escape-html-uri|exactly-one|exists|false|filter|floor|fold-(?:left|right)|for-each(?:-pair)?|format-(?:date(?:Time)?|time|integer|number)|function-(?:arity|available|lookup|name)|generate-id|has-children|head|hours-from-(?:dateTime|duration|time)|id(?:ref)?|implicit-timezone|in-scope-prefixes|index-of|innermost|insert-before|iri-to-uri|json-(?:doc|to-xml)|key|lang|last|load-xquery-module|local-name(?:-from-QName)?|(?:lower|upper)-case|matches|max|minutes-from-(?:dateTime|duration|time)|min|months?-from-(?:date(?:Time)?|duration)|name(?:space-uri-?(?:for-prefix|from-QName)?)?|nilled|node-name|normalize-(?:space|unicode)|not|number|one-or-more|outermost|parse-(?:ietf-date|json)|path|position|(?:prefix-from-)?QName|random-number-generator|regex-group|remove|replace|resolve-(?:QName|uri)|reverse|root|round(?:-half-to-even)?|seconds-from-(?:dateTime|duration|time)|snapshot|sort|starts-with|static-base-uri|stream-available|string-?(?:join|length|to-codepoints)?|subsequence|substring-?(?:after|before)?|sum|system-property|tail|timezone-from-(?:date(?:Time)?|time)|tokenize|trace|trans(?:form|late)|true|type-available|unordered|unparsed-(?:entity|text)?-?(?:public-id|uri|available|lines)?|uri-collection|xml-to-json|years?-from-(?:date(?:Time)?|duration)|zero-or-one)\b/},{begin:/\blocal:/,end:/\(/,excludeEnd:!0},{begin:/\bzip:/,end:/(?:zip-file|(?:xml|html|text|binary)-entry| (?:update-)?entries)\b/},{begin:/\b(?:util|db|functx|app|xdmp|xmldb):/,end:/\(/,excludeEnd:!0}]},{className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},{className:"number",begin:/(\b0[0-7_]+)|(\b0x[0-9a-fA-F_]+)|(\b[1-9][0-9_]*(\.[0-9_]+)?)|[0_]\b/,relevance:0},{className:"comment",begin:/\(:/,end:/:\)/,relevance:10,contains:[{className:"doctag",begin:/@\w+/}]},{className:"meta",begin:/%[\w\-:]+/},{className:"title",begin:/\bxquery version "[13]\.[01]"\s?(?:encoding ".+")?/,end:/;/},{beginKeywords:"element attribute comment document processing-instruction",end:/\{/,excludeEnd:!0},{begin:/<([\w._:-]+)(\s+\S*=('|").*('|"))?>/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}},function(e,t){e.exports=function(e){const t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n=e.UNDERSCORE_TITLE_MODE,r={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},o="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:o,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(/\/\*/,/\*\//,{contains:[{className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[n,{className:"params",begin:/\(/,end:/\)/,keywords:o,contains:["self",e.C_BLOCK_COMMENT_MODE,t,r]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},n]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[n]},{beginKeywords:"use",end:/;/,contains:[n]},{begin:/=>/},t,r]}}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(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}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||f(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 f(e,t){if(e){if("string"==typeof e)return _(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?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}function _(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 b(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=f(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,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}var v=String.fromCharCode,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",S={};function w(e,t){if(!S[e]){S[e]={};for(var n=0;n<e.length;n++)S[e][e.charAt(n)]=n}return S[e][t]}var C={compressToBase64:function(e){if(null==e)return"";var t=C._compress(e,6,(function(e){return y.charAt(e)}));switch(t.length%4){default:case 0:return t;case 1:return t+"===";case 2:return t+"==";case 3:return t+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:C._decompress(e.length,32,(function(t){return w(y,e.charAt(t))}))},compressToUTF16:function(e){return null==e?"":C._compress(e,15,(function(e){return v(e+32)}))+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:C._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=C.compress(e),n=new Uint8Array(2*t.length),r=0,o=t.length;r<o;r++){var i=t.charCodeAt(r);n[2*r]=i>>>8,n[2*r+1]=i%256}return n},decompressFromUint8Array:function(e){if(null==e)return C.decompress(e);for(var t=new Array(e.length/2),n=0,r=t.length;n<r;n++)t[n]=256*e[2*n]+e[2*n+1];var o=[];return t.forEach((function(e){o.push(v(e))})),C.decompress(o.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":C._compress(e,6,(function(e){return E.charAt(e)}))},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),C._decompress(e.length,32,(function(t){return w(E,e.charAt(t))})))},compress:function(e){return C._compress(e,16,(function(e){return v(e)}))},_compress:function(e,t,n){if(null==e)return"";var r,o,i,a={},s={},c="",l="",u="",d=2,h=3,p=2,m=[],g=0,f=0;for(i=0;i<e.length;i+=1)if(c=e.charAt(i),Object.prototype.hasOwnProperty.call(a,c)||(a[c]=h++,s[c]=!0),l=u+c,Object.prototype.hasOwnProperty.call(a,l))u=l;else{if(Object.prototype.hasOwnProperty.call(s,u)){if(u.charCodeAt(0)<256){for(r=0;r<p;r++)g<<=1,f==t-1?(f=0,m.push(n(g)),g=0):f++;for(o=u.charCodeAt(0),r=0;r<8;r++)g=g<<1|1&o,f==t-1?(f=0,m.push(n(g)),g=0):f++,o>>=1}else{for(o=1,r=0;r<p;r++)g=g<<1|o,f==t-1?(f=0,m.push(n(g)),g=0):f++,o=0;for(o=u.charCodeAt(0),r=0;r<16;r++)g=g<<1|1&o,f==t-1?(f=0,m.push(n(g)),g=0):f++,o>>=1}0==--d&&(d=Math.pow(2,p),p++),delete s[u]}else for(o=a[u],r=0;r<p;r++)g=g<<1|1&o,f==t-1?(f=0,m.push(n(g)),g=0):f++,o>>=1;0==--d&&(d=Math.pow(2,p),p++),a[l]=h++,u=String(c)}if(""!==u){if(Object.prototype.hasOwnProperty.call(s,u)){if(u.charCodeAt(0)<256){for(r=0;r<p;r++)g<<=1,f==t-1?(f=0,m.push(n(g)),g=0):f++;for(o=u.charCodeAt(0),r=0;r<8;r++)g=g<<1|1&o,f==t-1?(f=0,m.push(n(g)),g=0):f++,o>>=1}else{for(o=1,r=0;r<p;r++)g=g<<1|o,f==t-1?(f=0,m.push(n(g)),g=0):f++,o=0;for(o=u.charCodeAt(0),r=0;r<16;r++)g=g<<1|1&o,f==t-1?(f=0,m.push(n(g)),g=0):f++,o>>=1}0==--d&&(d=Math.pow(2,p),p++),delete s[u]}else for(o=a[u],r=0;r<p;r++)g=g<<1|1&o,f==t-1?(f=0,m.push(n(g)),g=0):f++,o>>=1;0==--d&&(d=Math.pow(2,p),p++)}for(o=2,r=0;r<p;r++)g=g<<1|1&o,f==t-1?(f=0,m.push(n(g)),g=0):f++,o>>=1;for(;;){if(g<<=1,f==t-1){m.push(n(g));break}f++}return m.join("")},decompress:function(e){return null==e?"":""==e?null:C._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(e,t,n){var r,o,i,a,s,c,l,u=[],d=4,h=4,p=3,m="",g=[],f={val:n(0),position:t,index:1};for(r=0;r<3;r+=1)u[r]=r;for(i=0,s=Math.pow(2,2),c=1;c!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=t,f.val=n(f.index++)),i|=(a>0?1:0)*c,c<<=1;switch(i){case 0:for(i=0,s=Math.pow(2,8),c=1;c!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=t,f.val=n(f.index++)),i|=(a>0?1:0)*c,c<<=1;l=v(i);break;case 1:for(i=0,s=Math.pow(2,16),c=1;c!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=t,f.val=n(f.index++)),i|=(a>0?1:0)*c,c<<=1;l=v(i);break;case 2:return""}for(u[3]=l,o=l,g.push(l);;){if(f.index>e)return"";for(i=0,s=Math.pow(2,p),c=1;c!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=t,f.val=n(f.index++)),i|=(a>0?1:0)*c,c<<=1;switch(l=i){case 0:for(i=0,s=Math.pow(2,8),c=1;c!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=t,f.val=n(f.index++)),i|=(a>0?1:0)*c,c<<=1;u[h++]=v(i),l=h-1,d--;break;case 1:for(i=0,s=Math.pow(2,16),c=1;c!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=t,f.val=n(f.index++)),i|=(a>0?1:0)*c,c<<=1;u[h++]=v(i),l=h-1,d--;break;case 2:return g.join("")}if(0==d&&(d=Math.pow(2,p),p++),u[l])m=u[l];else{if(l!==h)return null;m=o+o.charAt(0)}g.push(m),u[h++]=o+m.charAt(0),o=m,0==--d&&(d=Math.pow(2,p),p++)}}},T={DEBUG:!1,LIB_VERSION:"1.12.2"},x=Array.prototype,k=Function.prototype,F=Object.prototype,O=x.slice,R=F.toString,D=F.hasOwnProperty,I="undefined"!=typeof window?window:{},A=I.navigator||{userAgent:""},N=I.document||{},M=A.userAgent,P=k.bind,L=x.forEach,j=x.indexOf,U=Array.isArray,B={},G={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},V=function(){if(T.DEBUG&&!G.isUndefined(window.console)&&window.console)try{window.console.log.apply(window.console,arguments)}catch(e){G.each(arguments,(function(e){window.console.log(e)}))}},q=function(){if(T.DEBUG&&!G.isUndefined(window.console)&&window.console){var e=["PostHog error:"].concat(Array.prototype.slice.call(arguments));try{window.console.error.apply(window.console,e)}catch(t){G.each(e,(function(e){window.console.error(e)}))}}},H=function(){if(!G.isUndefined(window.console)&&window.console){var e=["PostHog error:"].concat(Array.prototype.slice.call(arguments));try{window.console.error.apply(window.console,e)}catch(t){G.each(e,(function(e){window.console.error(e)}))}}};G.bind=function(e,t){var n,r;if(P&&e.bind===P)return P.apply(e,O.call(arguments,1));if(!G.isFunction(e))throw new TypeError;return n=O.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(O.call(arguments)));var o={};o.prototype=e.prototype;var i=new o;o.prototype=null;var a=e.apply(i,n.concat(O.call(arguments)));return Object(a)===a?a:i}},G.bind_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=G.bind(e[t],e))},G.each=function(e,t,n){if(null!=e)if(L&&e.forEach===L)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,o=e.length;r<o;r++)if(r in e&&t.call(n,e[r],r,e)===B)return}else for(var i in e)if(D.call(e,i)&&t.call(n,e[i],i,e)===B)return},G.extend=function(e){return G.each(O.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},G.isArray=U||function(e){return"[object Array]"===R.call(e)},G.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},G.include=function(e,t){var n=!1;return null===e?n:j&&e.indexOf===j?-1!=e.indexOf(t):(G.each(e,(function(e){if(n||(n=e===t))return B})),n)},G.includes=function(e,t){return-1!==e.indexOf(t)},G.isObject=function(e){return e===Object(e)&&!G.isArray(e)},G.isEmptyObject=function(e){if(G.isObject(e)){for(var t in e)if(D.call(e,t))return!1;return!0}return!1},G.isUndefined=function(e){return void 0===e},G.isString=function(e){return"[object String]"==R.call(e)},G.isDate=function(e){return"[object Date]"==R.call(e)},G.isNumber=function(e){return"[object Number]"==R.call(e)},G.encodeDates=function(e){return G.each(e,(function(t,n){G.isDate(t)?e[n]=G.formatDate(t):G.isObject(t)&&(e[n]=G.encodeDates(t))})),e},G.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},G.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},G.safewrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){H("Implementation error. Please turn on debug and contact support@posthog.com."),T.DEBUG&&H(e)}}},G.safewrap_class=function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=G.safewrap(e.prototype[t[n]])},G.safewrap_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=G.safewrap(e[t]))},G.strip_empty_properties=function(e){var t={};return G.each(e,(function(e,n){G.isString(e)&&e.length>0&&(t[n]=e)})),t};var z,W="undefined"!=typeof Symbol?Symbol("__deepCircularCopyInProgress__"):"__deepCircularCopyInProgress__";function K(e){switch(r(e.className)){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function Y(e){var t="";return Z(e)&&!ee(e)&&e.childNodes&&e.childNodes.length&&G.each(e.childNodes,(function(e){J(e)&&e.textContent&&(t+=G.trim(e.textContent).split(/(\s+)/).filter(te).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))})),G.trim(t)}function $(e){return e&&1===e.nodeType}function Q(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function J(e){return e&&3===e.nodeType}G.copyAndTruncateStrings=function(e,t){return function e(t,n){return t!==Object(t)?n?n(t):t:t[W]?void 0:(t[W]=!0,G.isArray(t)?(r=[],G.each(t,(function(t){r.push(e(t,n))}))):(r={},G.each(t,(function(t,o){o!==W&&(r[o]=e(t,n))}))),delete t[W],r);var r}(e,(function(e){return"string"==typeof e&&null!==t&&(e=e.slice(0,t)),e}))},G.base64Encode=function(e){var t,n,r,o,i,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,c=0,l="",u=[];if(!e)return e;e=G.utf8Encode(e);do{t=(i=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=i>>12&63,r=i>>6&63,o=63&i,u[c++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(o)}while(s<e.length);switch(l=u.join(""),e.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"="}return l},G.utf8Encode=function(e){var t,n,r,o,i="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,o=0;o<r;o++){var a=e.charCodeAt(o),s=null;a<128?n++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>t&&(i+=e.substring(t,n)),i+=s,t=n=o+1)}return n>t&&(i+=e.substring(t,e.length)),i},G.UUID=(z=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)},function(){var e=(window.screen.height*window.screen.width).toString(16);return z()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=M,r=[],o=0;function i(e,t){var n,o=0;for(n=0;n<t.length;n++)o|=r[n]<<8*n;return e^o}for(e=0;e<n.length;e++)t=n.charCodeAt(e),r.unshift(255&t),r.length>=4&&(o=i(o,r),r=[]);return r.length>0&&(o=i(o,r)),o.toString(16)}()+"-"+e+"-"+z()}),G.isBlockedUA=function(e){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp)/i.test(e)},G.HTTPBuildQuery=function(e,t){var n,r,o=[];return G.isUndefined(t)&&(t="&"),G.each(e,(function(e,t){n=encodeURIComponent(e.toString()),r=encodeURIComponent(t),o[o.length]=r+"="+n})),o.join(t)},G.getQueryParam=function(e,t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var r=n[1];try{r=decodeURIComponent(r)}catch(e){q("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},G.getHashParam=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},G.register_event=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,o,i){if(t)if(t.addEventListener&&!o)t.addEventListener(n,r,!!i);else{var a="on"+n,s=t[a];t[a]=function(t,n,r){return function(o){if(o=o||e(window.event)){var i,a,s=!0;return G.isFunction(r)&&(i=r(o)),a=n.call(t,o),!1!==i&&!1!==a||(s=!1),s}}}(t,r,s)}else q("No valid element provided to register_event")}}(),G.info={campaignParams:function(){var e="utm_source utm_medium utm_campaign utm_content utm_term".split(" "),t="",n={};return G.each(e,(function(e){(t=G.getQueryParam(N.URL,e)).length&&(n[e]=t)})),n},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=G.info.searchEngine(e),n="yahoo"!=t?"q":"p",r={};if(null!==t){r.$search_engine=t;var o=G.getQueryParam(e,n);o.length&&(r.ph_keyword=o)}return r},browser:function(e,t,n){return t=t||"",n||G.includes(e," OPR/")?G.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":G.includes(e,"IEMobile")||G.includes(e,"WPDesktop")?"Internet Explorer Mobile":G.includes(e,"SamsungBrowser/")?"Samsung Internet":G.includes(e,"Edge")||G.includes(e,"Edg/")?"Microsoft Edge":G.includes(e,"FBIOS")?"Facebook Mobile":G.includes(e,"Chrome")?"Chrome":G.includes(e,"CriOS")?"Chrome iOS":G.includes(e,"UCWEB")||G.includes(e,"UCBrowser")?"UC Browser":G.includes(e,"FxiOS")?"Firefox iOS":G.includes(t,"Apple")?G.includes(e,"Mobile")?"Mobile Safari":"Safari":G.includes(e,"Android")?"Android Mobile":G.includes(e,"Konqueror")?"Konqueror":G.includes(e,"Firefox")?"Firefox":G.includes(e,"MSIE")||G.includes(e,"Trident/")?"Internet Explorer":G.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[G.info.browser(e,t,n)];if(void 0===r)return null;var o=e.match(r);return o?parseFloat(o[o.length-2]):null},os:function(){var e=M;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var t=this.device(e);return"iPad"===t||"Android Tablet"===t?"Tablet":t?"Mobile":"Desktop"},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},properties:function(){return G.extend(G.strip_empty_properties({$os:G.info.os(),$browser:G.info.browser(M,A.vendor,window.opera),$device:G.info.device(M),$device_type:G.info.deviceType(M)}),{$current_url:window.location.href,$host:window.location.host,$pathname:window.location.pathname,$browser_version:G.info.browserVersion(M,A.vendor,window.opera),$screen_height:window.screen.height,$screen_width:window.screen.width,$viewport_height:window.innerHeight,$viewport_width:window.innerWidth,$lib:"web",$lib_version:T.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:G.timestamp()/1e3})},people_properties:function(){return G.extend(G.strip_empty_properties({$os:G.info.os(),$browser:G.info.browser(M,A.vendor,window.opera)}),{$browser_version:G.info.browserVersion(M,A.vendor,window.opera)})}},G.isObject=G.isObject,G.isBlockedUA=G.isBlockedUA,G.isEmptyObject=G.isEmptyObject,G.info=G.info,G.info.device=G.info.device,G.info.browser=G.info.browser,G.info.browserVersion=G.info.browserVersion,G.info.properties=G.info.properties;var X=["a","button","form","input","select","textarea","label"];function Z(e){for(var t=e;t.parentNode&&!Q(t,"body");t=t.parentNode){var n=K(t).split(" ");if(G.includes(n,"ph-sensitive")||G.includes(n,"ph-no-capture"))return!1}if(G.includes(K(e).split(" "),"ph-include"))return!0;var r=e.type||"";if("string"==typeof r)switch(r.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";if("string"==typeof o){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(o.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function ee(e){return!!(Q(e,"input")&&"button"!=e.type||Q(e,"select")||Q(e,"textarea")||"true"===e.getAttribute("contenteditable"))}function te(e){if(null===e||G.isUndefined(e))return!1;if("string"==typeof e){e=G.trim(e);if(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(e))return!1}return!0}function ne(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=e,n.onload=t;var r=document.getElementsByTagName("script");r.length>0?r[0].parentNode.insertBefore(n,r[0]):document.body.appendChild(n)}var re=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.get_config("rageclick");o(this,e),this.clicks=[],this.instance=t,this.enabled=n}return a(e,[{key:"click",value:function(e,t,n){if(this.enabled){var r=this.clicks[this.clicks.length-1];r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&n-r.timestamp<1e3?(this.clicks.push({x:e,y:t,timestamp:n}),3===this.clicks.length&&this.instance.capture("$rageclick")):this.clicks=[{x:e,y:t,timestamp:n}]}}}]),e}(),oe={_initializedTokens:[],_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;do{e=e.previousSibling}while(e&&!$(e));return e},_getPropertiesFromElement:function(e,t,n){var r=e.tagName.toLowerCase(),o={tag_name:r};X.indexOf(r)>-1&&!n&&(o.$el_text=Y(e));var i=K(e);i.length>0&&(o.classes=i.split(" ").filter((function(e){return""!==e}))),G.each(e.attributes,(function(n){ee(e)&&-1===["name","id","class"].indexOf(n.name)||!t&&te(n.value)&&(o["attr__"+n.name]=n.value)}));for(var a=1,s=1,c=e;c=this._previousElementSibling(c);)a++,c.tagName===e.tagName&&s++;return o.nth_child=a,o.nth_of_type=s,o},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(e){var t=[];return G.each(document.querySelectorAll(e.css_selector),(function(e){var n;["input","select"].indexOf(e.tagName.toLowerCase())>-1?n=e.value:e.textContent&&(n=e.textContent),te(n)&&t.push(n)})),t.join(", ")},_getCustomProperties:function(e){var t={};return G.each(this._customProperties,(function(n){G.each(n.event_selectors,(function(r){var o=document.querySelectorAll(r);G.each(o,(function(r){G.includes(e,r)&&Z(r)&&(t[n.name]=this._extractCustomPropertyValue(n))}),this)}),this)}),this),t},_getEventTarget:function(e){return void 0===e.target?e.srcElement:e.target.shadowRoot?e.composedPath()[0]:e.target},_captureEvent:function(e,t){var n=this._getEventTarget(e);if(J(n)&&(n=n.parentNode),"click"===e.type&&this.rageclicks.click(e.clientX,e.clientY,(new Date).getTime()),function(e,t){if(!e||Q(e,"html")||!$(e))return!1;for(var n=!1,r=[e],o=!0,i=e;i.parentNode&&!Q(i,"body");)if(11!==i.parentNode.nodeType){if(!(o=i.parentNode))break;if(X.indexOf(o.tagName.toLowerCase())>-1)n=!0;else{var a=window.getComputedStyle(o);a&&"pointer"===a.getPropertyValue("cursor")&&(n=!0)}r.push(o),i=o}else r.push(i.parentNode.host),i=i.parentNode.host;var s=window.getComputedStyle(e);if(s&&"pointer"===s.getPropertyValue("cursor")&&"click"===t.type)return!0;var c=e.tagName.toLowerCase();switch(c){case"html":return!1;case"form":return"submit"===t.type;case"input":return"change"===t.type||"click"===t.type;case"select":case"textarea":return"change"===t.type||"click"===t.type;default:return n?"click"===t.type:"click"===t.type&&(X.indexOf(c)>-1||"true"===e.getAttribute("contenteditable"))}}(n,e)){for(var r=[n],o=n;o.parentNode&&!Q(o,"body");)11!==o.parentNode.nodeType?(r.push(o.parentNode),o=o.parentNode):(r.push(o.parentNode.host),o=o.parentNode.host);var i,a=[],s=!1;if(G.each(r,(function(e){var n=Z(e);"a"===e.tagName.toLowerCase()&&(i=e.getAttribute("href"),i=n&&te(i)&&i);var r=K(e).split(" ");G.includes(r,"ph-no-capture")&&(s=!0),a.push(this._getPropertiesFromElement(e,t.get_config("mask_all_element_attributes"),t.get_config("mask_all_text")))}),this),t.get_config("mask_all_text")||(a[0].$el_text=Y(n)),i&&(a[0].attr__href=i),s)return!1;var c=G.extend(this._getDefaultProperties(e.type),{$elements:a},this._getCustomProperties(r));return t.capture("$autocapture",c),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(e){var t=G.bind((function(t){t=t||window.event,this._captureEvent(t,e)}),this);G.register_event(document,"submit",t,!1,!0),G.register_event(document,"change",t,!1,!0),G.register_event(document,"click",t,!1,!0)},_customProperties:{},init:function(e){e.toolbar.maybeLoadEditor(),this.rageclicks=new re(e)},afterDecideResponse:function(e,t){var n=t.get_config("token");this._initializedTokens.indexOf(n)>-1?console.log('autocapture already initialized for token "'+n+'"'):(this._initializedTokens.push(n),e&&e.config&&!0===e.config.enable_collect_everything&&t.get_config("autocapture")?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture_enabled=!1)},enabledForProject:function(e,t,n){t=G.isUndefined(t)?10:t,n=G.isUndefined(n)?10:n;for(var r=0,o=0;o<e.length;o++)r+=e.charCodeAt(o);return r%t<n},isBrowserSupported:function(){return G.isFunction(document.querySelectorAll)}};G.bind_instance_methods(oe),G.safewrap_instance_methods(oe);var ie=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,ae={get:function(e){try{for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}}catch(e){}return null},parse:function(e){var t;try{t=JSON.parse(ae.get(e))||{}}catch(e){}return t},set:function(e,t,n,r,o){try{var i="",a="",s="";if(r){var c=document.location.hostname.match(ie),l=c?c[0]:"";i=l?"; domain=."+l:""}if(n){var u=new Date;u.setTime(u.getTime()+24*n*60*60*1e3),a="; expires="+u.toGMTString()}o&&(s="; secure");var d=e+"="+encodeURIComponent(t)+a+"; path=/"+i+s;return document.cookie=d,d}catch(e){return}},remove:function(e,t){try{ae.set(e,"",-1,t)}catch(e){return}}},se=null,ce={is_supported:function(){if(null!==se)return se;var e=!0;try{var t="__mplssupport__";ce.set(t,"xyz"),"xyz"!==ce.get(t)&&(e=!1),ce.remove(t)}catch(t){e=!1}return e||q("localStorage unsupported; falling back to cookie store"),se=e,e},error:function(e){q("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(e){ce.error(e)}return null},parse:function(e){try{return JSON.parse(ce.get(e))||{}}catch(e){}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(e){ce.error(e)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(e){ce.error(e)}}},le={},ue={is_supported:function(){return!0},error:function(e){q("memoryStorage error: "+e)},parse:function(e){return le[e]||null},set:function(e,t){le[e]=t},remove:function(e){delete le[e]}};function de(e,t){ye(!0,e,t)}function he(e,t){ye(!1,e,t)}function pe(e,t){return"1"===ve(e,t)}function me(e,t){return!!function(e){if(e&&e.respectDnt){var t=e&&e.window||I,n=t.navigator||{},r=!1;return G.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],(function(e){G.includes([!0,1,"1","yes"],e)&&(r=!0)})),r}return!1}(t)||"0"===ve(e,t)}function ge(e,t){return Ee(e,(function(e){return this._get_config(e)}),t)}function fe(e,t){_e(t=t||{}).remove(be(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function _e(e){return"localStorage"===(e=e||{}).persistenceType?ce:ae}function be(e,t){return((t=t||{}).persistencePrefix||"__ph_opt_in_out_")+e}function ve(e,t){return _e(t).get(be(e,t))}function ye(e,t,n){G.isString(t)&&t.length?(_e(n=n||{}).set(be(t,n),e?1:0,G.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.capture&&e&&n.capture(n.captureEventName||"$opt_in",n.captureProperties,{send_immediately:!0})):console.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function Ee(e,t,n){return function(){var r=!1;try{var o=t.call(this,"token"),i=t.call(this,"respect_dnt"),a=t.call(this,"opt_out_capturing_persistence_type"),s=t.call(this,"opt_out_capturing_cookie_prefix"),c=t.call(this,"window");o&&(r=me(o,{respectDnt:i,persistenceType:a,persistencePrefix:s,window:c}))}catch(e){n||console.error("Unexpected error when checking capturing opt-out status: "+e)}if(!r)return e.apply(this,arguments);var l=arguments[arguments.length-1];"function"==typeof l&&l(0)}}var Se={set_action:function(e,t){var n={},r={};return G.isObject(e)?G.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$set=r,n},set_once_action:function(e,t){var n={},r={};return G.isObject(e)?G.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$set_once=r,n}},we=function(){};G.extend(we.prototype,Se),we.prototype._init=function(e){this._posthog=e},we.prototype.set=ge((function(e,t,n){var r=this.set_action(e,t);return G.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._posthog.persistence.update_referrer_info(document.referrer),r.$set=G.extend({},G.info.people_properties(),this._posthog.persistence.get_referrer_info(),r.$set),this._send_request(r,n)})),we.prototype.set_once=ge((function(e,t,n){var r=this.set_once_action(e,t);return G.isObject(e)&&(n=t),this._send_request(r,n)})),we.prototype.toString=function(){return this._posthog.toString()+".people"},we.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._posthog.get_distinct_id();var n=this._posthog.get_property("$device_id"),r=this._posthog.get_property("$user_id"),o=this._posthog.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),o&&(e.$had_persisted_distinct_id=o);var i=G.encodeDates(e),a=G.copyAndTruncateStrings(i,this._get_config("properties_string_max_length")),s=JSON.stringify(i),c=G.base64Encode(s);return this._posthog._send_request(this._get_config("api_host")+"/engage/",{data:c},{},this._posthog._prepare_callback(t,a)),a},we.prototype._get_config=function(e){return this._posthog.get_config(e)},we.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},we.prototype.set=we.prototype.set,we.prototype.set_once=we.prototype.set_once,we.prototype.toString=we.prototype.toString;var Ce=function(){function e(t){o(this,e),this.instance=t,this._override_warning=!1,this.flagCallReported={}}return a(e,[{key:"getFlags",value:function(){return this.instance.get_property("$override_feature_flags")?(this._override_warning||console.warn("[PostHog] Overriding feature flags! Feature flags from server were: "+JSON.stringify(this.instance.get_property("$active_feature_flags"))),this._override_warning=!0,this.instance.get_property("$override_feature_flags")):this.instance.get_property("$active_feature_flags")}},{key:"reloadFeatureFlags",value:function(){var e=this,t=this.instance.get_config("token"),n=JSON.stringify({token:t,distinct_id:this.instance.get_distinct_id()}),r=G.base64Encode(n);this.instance._send_request(this.instance.get_config("api_host")+"/decide/",{data:r},{method:"POST"},this.instance._prepare_callback((function(t){t.featureFlags?e.instance.persistence&&e.instance.persistence.register({$active_feature_flags:t.featureFlags}):e.instance.persistence&&e.instance.persistence.unregister("$active_feature_flags")})))}},{key:"isFeatureEnabled",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.getFlags())return console.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time."),!1;var n=this.getFlags().indexOf(e)>-1;return!t.send_event&&"send_event"in t||this.flagCallReported[e]||(this.flagCallReported[e]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}},{key:"override",value:function(e){if(!1===e)return this.instance.persistence.unregister("$override_feature_flags");this.instance.persistence.register("$override_feature_flags",e)}}]),e}(),Te=["__mps","__mpso","__mpus","__mpa","__mpap","__mpr","__mpu","$people_distinct_id","__alias","__cmpns","__timers","$session_recording_enabled","$sesid"],xe=function(e){var t="";e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,this.featureFlagEventHandlers=[],e.persistence_name?this.name="ph_"+e.persistence_name:this.name="ph_"+t+"_posthog";var n=e.persistence;"cookie"!==n&&"localStorage"!==n&&"memory"!==n&&(H("Unknown persistence type "+n+"; falling back to cookie"),n=e.persistence="cookie"),"localStorage"===n&&ce.is_supported()?this.storage=ce:this.storage="memory"===n?ue:ae,this.load(),this.update_config(e),this.save()};xe.prototype.addFeatureFlagsHandler=function(e){return this.featureFlagEventHandlers.push(e),!0},xe.prototype.receivedFeatureFlags=function(e){this.featureFlagEventHandlers.forEach((function(t){return t(e)}))},xe.prototype.properties=function(){var e={};return G.each(this.props,(function(t,n){G.include(Te,n)||(e[n]=t)})),e},xe.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=G.extend({},e))}},xe.prototype.save=function(){this.disabled||this.storage.set(this.name,JSON.stringify(this.props),this.expire_days,this.cross_subdomain,this.secure)},xe.prototype.remove=function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)},xe.prototype.clear=function(){this.remove(),this.props={}},xe.prototype.register_once=function(e,t,n){return!!G.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,e&&e.$active_feature_flags&&this.receivedFeatureFlags(e.$active_feature_flags),G.each(e,(function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)}),this),this.save(),!0)},xe.prototype.register=function(e,t){return!!G.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,e&&e.$active_feature_flags&&this.receivedFeatureFlags(e.$active_feature_flags),G.extend(this.props,e),this.save(),!0)},xe.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save(),"$active_feature_flags"===e&&this.receivedFeatureFlags([]))},xe.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(G.info.campaignParams()),this.campaign_params_saved=!0)},xe.prototype.update_search_keyword=function(e){this.register(G.info.searchInfo(e))},xe.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:G.info.referringDomain(e)||"$direct"},""),this.register({$referrer:e||this.props.$referrer||"$direct",$referring_domain:G.info.referringDomain(e)||this.props.$referring_domain||"$direct"})},xe.prototype.get_referrer_info=function(){return G.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},xe.prototype.safe_merge=function(e){return G.each(this.props,(function(t,n){n in e||(e[n]=t)})),e},xe.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},xe.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},xe.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},xe.prototype.get_cross_subdomain=function(){return this.cross_subdomain},xe.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},xe.prototype.set_event_timer=function(e,t){var n=this.props.__timers||{};n[e]=t,this.props.__timers=n,this.save()},xe.prototype.remove_event_timer=function(e){var t=(this.props.__timers||{})[e];return G.isUndefined(t)||(delete this.props.__timers[e],this.save()),t};var ke=function(){function e(t){o(this,e),this.instance=t,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint="/e/",this.stopRrweb=null}return a(e,[{key:"startRecordingIfEnabled",value:function(){this.instance.get_property("$session_recording_enabled")&&!this.instance.get_config("disable_session_recording")&&this._startCapture()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=null,this.captureStarted=!1)}},{key:"afterDecideResponse",value:function(e){var t=!this.instance.get_config("disable_session_recording")&&!!e.sessionRecording;this.instance.persistence&&this.instance.persistence.register(s({},"$session_recording_enabled",t)),t&&(e.sessionRecording.endpoint&&(this.endpoint=e.sessionRecording.endpoint),this.submitRecordings())}},{key:"submitRecordings",value:function(){var e=this;this.emit=!0,this._startCapture(),this.snapshots.forEach((function(t){return e._captureSnapshot(t)}))}},{key:"_startCapture",value:function(){void 0!==Object.assign&&(this.captureStarted||this.instance.get_config("disable_session_recording")||(this.captureStarted=!0,ne(this.instance.get_config("api_host")+"/static/recorder.js?v="+T.LIB_VERSION,G.bind(this._onScriptLoaded,this))))}},{key:"_onScriptLoaded",value:function(){for(var e=this,t={blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!1,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1},n=this.instance.get_config("session_recording"),r=0,o=Object.entries(n||{});r<o.length;r++){var i=g(o[r],2),a=i[0],c=i[1];a in t&&(t[a]=c)}this.stopRrweb=window.rrweb.record(l({emit:function(t){var n,r,o,i,a,c={$snapshot_data:t,$session_id:(n=e.instance.persistence,r=t.timestamp,o=g(n.props.$sesid||[0,null],2),i=o[0],a=o[1],Math.abs(r-i)>18e5&&(a=G.UUID()),n.register(s({},"$sesid",[r,a])),a)};e.instance._captureMetrics.incr("rrweb-record"),e.instance._captureMetrics.incr("rrweb-record-".concat(t.type)),e.emit?e._captureSnapshot(c):e.snapshots.push(c)}},t)),this.instance._addCaptureHook((function(e){"$pageview"===e&&window.rrweb.record.addCustomEvent("$pageview",{href:window.location.href})}))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{transport:"XHR",method:"POST",endpoint:this.endpoint,_forceCompression:!0,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:2===e.$snapshot_data.type}})}}]),e}(),Fe=function(){function e(t){o(this,e),this.instance=t}return a(e,[{key:"call",value:function(){var e=this,t=JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id()}),n=G.base64Encode(t);this.instance._send_request(this.instance.get_config("api_host")+"/decide/",{data:n},{method:"POST"},(function(t){return e.parseDecideResponse(t)}))}},{key:"parseDecideResponse",value:function(e){var t=this;if(!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){t.parseDecideResponse(e)}),500);if(this.instance.toolbar.afterDecideResponse(e),this.instance.sessionRecording.afterDecideResponse(e),oe.afterDecideResponse(e,this.instance),e.featureFlags?this.instance.persistence&&this.instance.persistence.register({$active_feature_flags:e.featureFlags}):this.instance.persistence&&this.instance.persistence.unregister("$active_feature_flags"),e.supportedCompression){var n,r={},o=b(e.supportedCompression);try{for(o.s();!(n=o.n()).done;){r[n.value]=!0}}catch(e){o.e(e)}finally{o.f()}this.instance.compression=r}else this.instance.compression={}}}]),e}(),Oe=function(){function e(t){o(this,e),this.instance=t}return a(e,[{key:"afterDecideResponse",value:function(e){var t=e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});e.isAuthenticated&&t.toolbarVersion&&0===t.toolbarVersion.indexOf("toolbar")&&(this._loadEditor(l(l({},t),{},{apiURL:this.instance.get_config("api_host")})),this.instance.set_config({debug:!0}))}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.localStorage,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.history;try{var r,o=G.getHashParam(e.hash,"__posthog")||G.getHashParam(e.hash,"state"),i=o?JSON.parse(decodeURIComponent(o)):null,a=i&&("mpeditor"===i.action||"ph_authorize"===i.action);return a?(r=i)&&Object.keys(r).length>0&&(t.setItem("_postHogEditorParams",JSON.stringify(r)),i.desiredHash?e.hash=i.desiredHash:n?n.replaceState("",document.title,e.pathname+e.search):e.hash=""):delete(r=JSON.parse(t.getItem("_postHogEditorParams")||"{}")).userIntent,r.apiURL=this.instance.get_config("api_host"),!(!r.token||this.instance.get_config("token")!==r.token)&&(this._loadEditor(r),!0)}catch(e){return!1}}},{key:"_loadEditor",value:function(e){var t=this;if(!window._postHogToolbarLoaded){window._postHogToolbarLoaded=!0;var n=e.jsURL||e.apiURL||this.instance.get_config("api_host");return ne(n+(n.endsWith("/")?"":"/")+"static/toolbar.js?_ts="+(new Date).getTime(),(function(){window.ph_load_editor(e)})),G.register_event(window,"turbolinks:load",(function(){window._postHogToolbarLoaded=!1,t._loadEditor(e)})),!0}return!1}}]),e}(),Re=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;o(this,e),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=function(){},this._pollInterval=t}return a(e,[{key:"setPollInterval",value:function(e){this._pollInterval=e,this.isPolling&&this.poll()}},{key:"enqueue",value:function(){}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return(new Date).getTime()}}]),e}(),De=function(e){u(n,e);var t=m(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;return o(this,n),(i=t.call(this,a)).handlePollRequest=r,i.captureMetrics=e,i}return a(n,[{key:"enqueue",value:function(e,t,n){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:e,data:t,options:n}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var e=this;clearTimeout(this._poller),this._poller=setTimeout((function(){if(e._event_queue.length>0){var t=e.formatQueue(),n=function(n){var r=t[n],o=r.url,i=r.data,a=r.options;G.each(i,(function(t,n){i[n].offset=Math.abs(i[n].timestamp-e.getTime()),delete i[n].timestamp})),e.handlePollRequest(o,i,a),e.captureMetrics.incr("batch-requests"),e.captureMetrics.incr("batch-requests-".concat(o.slice(o.length-2))),e.captureMetrics.incr("batch-handle",i.length),e.captureMetrics.incr("batch-handle-".concat(o.slice(o.length-2)),i.length)};for(var r in t)n(r);e._event_queue.length=0,e._empty_queue_count=0}else e._empty_queue_count++;e._empty_queue_count>4&&(e.isPolling=!1,e._empty_queue_count=0),e.isPolling&&e.poll()}),this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var e=this.formatQueue();for(var t in e){var n=e[t],r=n.url,o=n.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(r.slice(r.length-2))),this.captureMetrics.incr("batch-unload",o.length),this.captureMetrics.incr("batch-unload-".concat(r.slice(r.length-2)),o.length)}}},{key:"unload",value:function(){clearTimeout(this._poller);var e=this._event_queue.length>0?this.formatQueue():{};for(var t in this._event_queue.length=0,e){var n=e[t],r=n.url,o=n.data,i=n.options;this.handlePollRequest(r,o,l(l({},i),{},{transport:"sendbeacon"}))}}},{key:"formatQueue",value:function(){var e={};return G.each(this._event_queue,(function(t){var n=t.url,r=t.data,o=t.options,i=(o?o._batchKey:null)||n;void 0===e[i]&&(e[i]={data:[],url:n,options:o}),o&&e[i].options&&e[i].options._metrics&&!e[i].options._metrics.rrweb_full_snapshot&&(e[i].options._metrics.rrweb_full_snapshot=o._metrics.rrweb_full_snapshot),e[i].data.push(r)})),e}}]),n}(Re),Ie=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return(new Date).getTime()};o(this,e),this.enabled=t,this.capture=n,this.getTime=r,this.metrics={},this.requests={}}return a(e,[{key:"incr",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)+t)}},{key:"decr",value:function(e){this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)-1)}},{key:"startRequest",value:function(e){if(this.enabled){var t=G.UUID();return this.requests[t]=[this.getTime(),e],t}}},{key:"finishRequest",value:function(e){if(this.enabled&&this.requests[e]){var t=g(this.requests[e],2),n=t[0],r=t[1];return r.duration=this.getTime()-n,delete this.requests[e],r}}},{key:"markRequestFailed",value:function(e){this.enabled&&this.capture("$capture_failed_request",e)}},{key:"captureInProgressRequests",value:function(){var e=this;this.enabled&&Object.keys(this.requests).forEach((function(t){var n=e.finishRequest(t);e.markRequestFailed(l(l({},n),{},{type:"inflight_at_unload"}))}))}}]),e}(),Ae=Uint8Array,Ne=Uint16Array,Me=Uint32Array,Pe=new Ae([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Le=new Ae([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),je=new Ae([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ue=function(e,t){for(var n=new Ne(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new Me(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)o[i]=i-n[r]<<5|r;return[n,o]},Be=Ue(Pe,2),Ge=Be[0],Ve=Be[1];Ge[28]=258,Ve[258]=28;for(var qe=Ue(Le,0)[1],He=new Ne(32768),ze=0;ze<32768;++ze){var We=(43690&ze)>>>1|(21845&ze)<<1;We=(61680&(We=(52428&We)>>>2|(13107&We)<<2))>>>4|(3855&We)<<4,He[ze]=((65280&We)>>>8|(255&We)<<8)>>>1}var Ke=function(e,t,n){for(var r=e.length,o=0,i=new Ne(t);o<r;++o)++i[e[o]-1];var a,s=new Ne(t);for(o=0;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;if(n){a=new Ne(1<<t);var c=15-t;for(o=0;o<r;++o)if(e[o])for(var l=o<<4|e[o],u=t-e[o],d=s[e[o]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)a[He[d]>>>c]=l}else for(a=new Ne(r),o=0;o<r;++o)a[o]=He[s[e[o]-1]++]>>>15-e[o];return a},Ye=new Ae(288);for(ze=0;ze<144;++ze)Ye[ze]=8;for(ze=144;ze<256;++ze)Ye[ze]=9;for(ze=256;ze<280;++ze)Ye[ze]=7;for(ze=280;ze<288;++ze)Ye[ze]=8;var $e=new Ae(32);for(ze=0;ze<32;++ze)$e[ze]=5;var Qe=Ke(Ye,9,0),Je=Ke($e,5,0),Xe=function(e){return(e/8>>0)+(7&e&&1)},Ze=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Ne?Ne:e instanceof Me?Me:Ae)(n-t);return r.set(e.subarray(t,n)),r},et=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},tt=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},nt=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var o=n.length,i=n.slice();if(!o)return[new Ae(0),0];if(1==o){var a=new Ae(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=o-1;)s=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};var h=i[0].s;for(r=1;r<o;++r)i[r].s>h&&(h=i[r].s);var p=new Ne(h+1),m=rt(n[u-1],p,0);if(m>t){r=0;var g=0,f=m-t,_=1<<f;for(i.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<o;++r){var b=i[r].s;if(!(p[b]>t))break;g+=_-(1<<m-p[b]),p[b]=t}for(g>>>=f;g>0;){var v=i[r].s;p[v]<t?g-=1<<t-p[v]++-1:++r}for(;r>=0&&g;--r){var y=i[r].s;p[y]==t&&(--p[y],++g)}m=t}return[new Ae(p),m]},rt=function e(t,n,r){return-1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},ot=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Ne(++t),r=0,o=e[0],i=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==o&&s!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(o);i=1,o=e[s]}return[n.subarray(0,r),t]},it=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},at=function(e,t,n){var r=n.length,o=Xe(t+2);e[o]=255&r,e[o+1]=r>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var i=0;i<r;++i)e[o+i+4]=n[i];return 8*(o+4+r)},st=function(e,t,n,r,o,i,a,s,c,l,u){et(t,u++,n),++o[256];for(var d=nt(o,15),h=d[0],p=d[1],m=nt(i,15),g=m[0],f=m[1],_=ot(h),b=_[0],v=_[1],y=ot(g),E=y[0],S=y[1],w=new Ne(19),C=0;C<b.length;++C)w[31&b[C]]++;for(C=0;C<E.length;++C)w[31&E[C]]++;for(var T=nt(w,7),x=T[0],k=T[1],F=19;F>4&&!x[je[F-1]];--F);var O,R,D,I,A=l+5<<3,N=it(o,Ye)+it(i,$e)+a,M=it(o,h)+it(i,g)+a+14+3*F+it(w,x)+(2*w[16]+3*w[17]+7*w[18]);if(A<=N&&A<=M)return at(t,u,e.subarray(c,c+l));if(et(t,u,1+(M<N)),u+=2,M<N){O=Ke(h,p,0),R=h,D=Ke(g,f,0),I=g;var P=Ke(x,k,0);et(t,u,v-257),et(t,u+5,S-1),et(t,u+10,F-4),u+=14;for(C=0;C<F;++C)et(t,u+3*C,x[je[C]]);u+=3*F;for(var L=[b,E],j=0;j<2;++j){var U=L[j];for(C=0;C<U.length;++C){var B=31&U[C];et(t,u,P[B]),u+=x[B],B>15&&(et(t,u,U[C]>>>5&127),u+=U[C]>>>12)}}}else O=Qe,R=Ye,D=Je,I=$e;for(C=0;C<s;++C)if(r[C]>255){B=r[C]>>>18&31;tt(t,u,O[B+257]),u+=R[B+257],B>7&&(et(t,u,r[C]>>>23&31),u+=Pe[B]);var G=31&r[C];tt(t,u,D[G]),u+=I[G],G>3&&(tt(t,u,r[C]>>>5&8191),u+=Le[G])}else tt(t,u,O[r[C]]),u+=R[r[C]];return tt(t,u,O[256]),u+R[256]},ct=new Me([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),lt=new Ae(0),ut=function(){for(var e=new Me(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),dt=function(e,t,n,r,o){return function(e,t,n,r,o,i){var a=e.length,s=new Ae(r+a+5*(1+Math.floor(a/7e3))+o),c=s.subarray(r,s.length-o),l=0;if(!t||a<8)for(var u=0;u<=a;u+=65535){var d=u+65535;d<a?l=at(c,l,e.subarray(u,d)):(c[u]=i,l=at(c,l,e.subarray(u,a)))}else{for(var h=ct[t-1],p=h>>>13,m=8191&h,g=(1<<n)-1,f=new Ne(32768),_=new Ne(g+1),b=Math.ceil(n/3),v=2*b,y=function(t){return(e[t]^e[t+1]<<b^e[t+2]<<v)&g},E=new Me(25e3),S=new Ne(288),w=new Ne(32),C=0,T=0,x=(u=0,0),k=0,F=0;u<a;++u){var O=y(u),R=32767&u,D=_[O];if(f[R]=D,_[O]=R,k<=u){var I=a-u;if((C>7e3||x>24576)&&I>423){l=st(e,c,0,E,S,w,T,x,F,u-F,l),x=C=T=0,F=u;for(var A=0;A<286;++A)S[A]=0;for(A=0;A<30;++A)w[A]=0}var N=2,M=0,P=m,L=R-D&32767;if(I>2&&O==y(u-L))for(var j=Math.min(p,I)-1,U=Math.min(32767,u),B=Math.min(258,I);L<=U&&--P&&R!=D;){if(e[u+N]==e[u+N-L]){for(var G=0;G<B&&e[u+G]==e[u+G-L];++G);if(G>N){if(N=G,M=L,G>j)break;var V=Math.min(L,G-2),q=0;for(A=0;A<V;++A){var H=u-L+A+32768&32767,z=H-f[H]+32768&32767;z>q&&(q=z,D=H)}}}L+=(R=D)-(D=f[R])+32768&32767}if(M){E[x++]=268435456|Ve[N]<<18|qe[M];var W=31&Ve[N],K=31&qe[M];T+=Pe[W]+Le[K],++S[257+W],++w[K],k=u+N,++C}else E[x++]=e[u],++S[e[u]]}}l=st(e,c,i,E,S,w,T,x,F,u-F,l),i||(l=at(c,l,lt))}return Ze(s,0,r+Xe(l)+o)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!o)},ht=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function pt(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=ut[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}}(),r=e.length;n.p(e);var o,i=dt(e,t,10+((o=t).filename&&o.filename.length+1||0),8),a=i.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&ht(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(i,t),ht(i,a-8,n.d()),ht(i,a-4,r),i}function mt(e,t){var n=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new Ae(e.length+(e.length>>>1)),o=0,i=function(e){r[o++]=e},a=0;a<n;++a){if(o+5>r.length){var s=new Ae(o+8+(n-a<<1));s.set(r),r=s}var c=e.charCodeAt(a);c<128||t?i(c):c<2048?(i(192|c>>>6),i(128|63&c)):c>55295&&c<57344?(i(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++a))>>>18),i(128|c>>>12&63),i(128|c>>>6&63),i(128|63&c)):(i(224|c>>>12),i(128|c>>>6&63),i(128|63&c))}return Ze(r,0,o)}var gt,ft,_t,bt=function e(t,n){if(n.blob)return new Blob([t.buffer],{type:"text/plain"});if(n.sendBeacon){var r=e(t,{method:"POST"});return new Blob([r],{type:"application/x-www-form-urlencoded"})}return"POST"!==n.method?null:(o=Array.isArray(t)?"data="+encodeURIComponent(t):"data="+encodeURIComponent(t.data),t.compression&&(o+="&compression="+t.compression),o);var o},vt=function(e){var t=e.url,n=e.data,r=e.headers,o=e.options,i=e.captureMetrics,a=e.callback,s=e.retriesPerformedSoFar,c=e.retryQueue,u=new XMLHttpRequest;u.open(o.method,t,!0);var d=bt(n,o);i.incr("_send_request"),i.incr("_send_request_inflight");var h=i.startRequest(l({data_size:G.isString(n)?n.length:d.length,endpoint:t.slice(t.length-2)},o._metrics));G.each(r,(function(e,t){u.setRequestHeader(t,e)})),"POST"!==o.method||o.blob||u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.withCredentials=!0,u.onreadystatechange=function(){if(4===u.readyState){i.incr("xhr-response"),i.incr("xhr-response-".concat(u.status)),i.decr("_send_request_inflight");var e=i.finishRequest(h);if(200===u.status){if(a){var d;try{d=JSON.parse(u.responseText)}catch(e){return void q(e)}a(d)}}else{var p="Bad HTTP status: "+u.status+" "+u.statusText;q(p),[401,403,404].indexOf(u.status)<0&&c.enqueue({url:t,data:n,options:o,headers:r,retriesPerformedSoFar:(s||0)+1,callback:a}),i.markRequestFailed(l(l({},e),{},{type:"non_200",status:u.status,statusText:u.statusText})),a&&(o.verbose?a({status:0,error:p}):a(0))}}},u.send(d)},yt=function(e){u(n,e);var t=m(n);function n(e){var r;return o(this,n),(r=t.call(this)).captureMetrics=e,r.isPolling=!1,r.queue=[],r.areWeOnline=!0,"onLine"in window.navigator&&(r.areWeOnline=window.navigator.onLine,window.addEventListener("online",(function(){r._handleWeAreNowOnline()})),window.addEventListener("offline",(function(){r.areWeOnline=!1}))),r}return a(n,[{key:"enqueue",value:function(e){var t=e.retriesPerformedSoFar||0;if(!(t>=10)){var n=3e3*Math.pow(2,t),r=new Date(Date.now()+n);console.warn("Enqueued failed request for retry in ".concat(n)),this.queue.push({retryAt:r,requestData:e}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var e=this;clearTimeout(this._poller),this._poller=setTimeout((function(){e.areWeOnline&&e.queue.length>0&&e.flush(),e.poll()}),this._pollInterval)}},{key:"flush",value:function(){var e=new Date(Date.now()),t=this.queue.filter((function(t){return t.retryAt<e}));if(t.length>0){this.queue=this.queue.filter((function(t){return t.retryAt>=e}));var n,r=b(t);try{for(r.s();!(n=r.n()).done;){var o=n.value.requestData;this._executeXhrRequest(o)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"unload",value:function(){clearTimeout(this._poller);var e,t=b(this.queue);try{for(t.s();!(e=t.n()).done;){var n=e.value.requestData,r=n.url,o=n.data,i=n.options;window.navigator.sendBeacon(r,bt(o,l(l({},i),{},{sendBeacon:!0})))}}catch(e){t.e(e)}finally{t.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(e){var t=e.url,n=e.data,r=e.options,o=e.headers,i=e.callback,a=e.retriesPerformedSoFar;vt({url:t,data:n||{},options:r||{},headers:o||{},retriesPerformedSoFar:a||0,callback:i,captureMetrics:this.captureMetrics,retryQueue:this})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),n}(Re),Et=function(){},St={},wt=I.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Ct=!wt&&-1===M.indexOf("MSIE")&&-1===M.indexOf("Mozilla"),Tt=function(){},xt=function(e,t,n){var r,o="posthog"===n?ft:ft[n];if(o&&0===gt)r=o;else{if(o&&!G.isArray(o))return void q("You have already initialized "+n);r=new Tt}if(r._init(e,t,n),r.people=new we,r.people._init(r),r.featureFlags=new Ce(r),r.feature_flags=r.featureFlags,r.toolbar=new Oe(r),r.sessionRecording=new ke(r),r.sessionRecording.startRecordingIfEnabled(),r.__autocapture_enabled=r.get_config("autocapture"),r.get_config("autocapture")){oe.enabledForProject(r.get_config("token"),100,100)?oe.isBrowserSupported()?oe.init(r):(r.__autocapture_enabled=!1,V("Disabling Automatic Event Collection because this browser is not supported")):(r.__autocapture_enabled=!1,V("Not in active bucket: disabling Automatic Event Collection."))}return r.get_config("advanced_disable_decide")||new Fe(r).call(),T.DEBUG=T.DEBUG||r.get_config("debug"),!G.isUndefined(o)&&G.isArray(o)&&(r._execute_array.call(r.people,o.people),r._execute_array(o)),r};Tt.prototype.init=function(e,t,n){if(G.isUndefined(n))q("You must name your new library: init(token, config, name)");else{if("posthog"!==n){var r=xt(e,t,n);return ft[n]=r,r._loaded(),r}q("You must initialize the main posthog object right after you include the PostHog js snippet")}},Tt.prototype._init=function(e,t,n){this.__loaded=!0,this.config={},this._triggered_notifs=[],this.compression={},this.set_config(G.extend({},{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",autocapture:!0,rageclick:!1,cross_subdomain_cookie:-1===N.location.hostname.indexOf("herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:function(){},store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:"https:"===I.location.protocol,ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,property_blacklist:[],sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!1,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,_onCapture:function(){},_capture_metrics:!1},t,{name:n,token:e,callback_fn:("posthog"===n?n:"posthog."+n)+"._jsc"})),this._jsc=function(){},this._captureMetrics=new Ie(this.get_config("_capture_metrics"),G.bind(this.capture,this)),this._requestQueue=new De(this._captureMetrics,G.bind(this._handle_queued_event,this)),this._retryQueue=new yt(this._captureMetrics),this.__captureHooks=[],this.__request_queue=[],this.persistence=new xe(this.config),this._gdpr_init();var r=G.UUID();this.get_distinct_id()||this.register_once({distinct_id:r,$device_id:r},""),I.addEventListener&&I.addEventListener("unload",this._handle_unload.bind(this))},Tt.prototype._loaded=function(){this.get_config("loaded")(this),this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture_pageview()},Tt.prototype._start_queue_if_opted_in=function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()},Tt.prototype._dom_loaded=function(){this.has_opted_out_capturing()||G.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__request_queue,this._start_queue_if_opted_in()},Tt.prototype._prepare_callback=function(e,t){if(G.isUndefined(e))return null;if(wt){return function(n){e(n,t)}}var n=this._jsc,r=""+Math.floor(1e8*Math.random()),o=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(o){delete n[r],e(o,t)},o},Tt.prototype._handle_unload=function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics),this._captureMetrics.captureInProgressRequests()),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.capture("$pageleave",null,{transport:"sendbeacon"})},Tt.prototype._handle_queued_event=function(e,t,n){var r=JSON.stringify(t);this.__compress_and_send_json_request(e,r,n||St,Et)},Tt.prototype.__compress_and_send_json_request=function(e,t,n,r){var o,i=g(function(e,t,n){return"lz64"===e?[{data:C.compressToBase64(t),compression:"lz64"},n]:"gzip-js"===e?[pt(mt(t),{mtime:0}),l(l({},n),{},{blob:!0,urlQueryArgs:{compression:"gzip-js"}})]:[{data:G.base64Encode(t)},n]}((o=this.compression)["gzip-js"]?"gzip-js":o.lz64?"lz64":"base64",t,n),2),a=i[0],s=i[1];this._send_request(e,a,s,r)},Tt.prototype._send_request=function(e,t,n,r){if(Ct)this.__request_queue.push(arguments);else{var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};n=G.extend(o,n||{}),wt||(n.method="GET");var i=I.navigator.sendBeacon&&"sendbeacon"===n.transport.toLowerCase(),a=n.urlQueryArgs||{};if(a.ip=this.get_config("ip")?1:0,a._=(new Date).getTime().toString(),e+="?"+G.HTTPBuildQuery(a),G.isObject(t)&&this.get_config("img")){var s=N.createElement("img");s.src=e,N.body.appendChild(s)}else if(i)I.navigator.sendBeacon(e,bt(t,l(l({},n),{},{sendBeacon:!0})));else if(wt)try{vt({url:e,data:t,headers:this.get_config("xhr_headers"),options:n,captureMetrics:this._captureMetrics,callback:r,retriesPerformedSoFar:0,retryQueue:this._retryQueue})}catch(e){q(e)}else{var c=N.createElement("script");c.type="text/javascript",c.async=!0,c.defer=!0,c.src=e;var u=N.getElementsByTagName("script")[0];u.parentNode.insertBefore(c,u)}}},Tt.prototype._execute_array=function(e){var t,n=[],r=[],o=[];G.each(e,(function(e){e&&(t=e[0],G.isArray(t)?o.push(e):"function"==typeof e?e.call(this):G.isArray(e)&&"alias"===t?n.push(e):G.isArray(e)&&-1!==t.indexOf("capture")&&"function"==typeof this[t]?o.push(e):r.push(e))}),this);var i=function(e,t){G.each(e,(function(e){if(G.isArray(e[0])){var n=t;G.each(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};i(n,this),i(r,this),i(o,this)},Tt.prototype.push=function(e){this._execute_array([e])},Tt.prototype.capture=Ee((function(e,t,n){this._captureMetrics.incr("capture"),"$snapshot"===e&&this._captureMetrics.incr("snapshot");var r=(n=n||St).transport;if(r&&(n.transport=r),G.isUndefined(e)||"string"!=typeof e)q("No event name provided to posthog.capture");else if(!G.isBlockedUA(M)){var o=this.persistence.remove_event_timer(e);this.persistence.update_search_keyword(N.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(N.referrer);var i={event:e,properties:this._calculate_event_properties(e,t,o)};"$identify"===e&&n.$set&&(i.$set=n.$set),i=G.copyAndTruncateStrings(i,n._noTruncate?null:this.get_config("properties_string_max_length")),this.get_config("debug")&&V("PostHog.js send",i);var a=JSON.stringify(i),s=this.get_config("api_host")+(n.endpoint||"/e/"),c=n!==St;return!this.get_config("request_batching")||c&&!n._batchKey?this.__compress_and_send_json_request(s,a,n):(i.timestamp=new Date,this._requestQueue.enqueue(s,i,n)),this._invokeCaptureHooks(e),i}}),(function(e){return this.get_config(e)}),_t),Tt.prototype._addCaptureHook=function(e){this.__captureHooks.push(e)},Tt.prototype._invokeCaptureHooks=function(e){this.config._onCapture(e),G.each(this.__captureHooks,(function(t){return t(e)}))},Tt.prototype._calculate_event_properties=function(e,t,n){var r=t||{};if(r.token=this.get_config("token"),"$snapshot"===e){var o=this.persistence.properties();return r.distinct_id=o.distinct_id,r}if(!G.isUndefined(n)){var i=(new Date).getTime()-n;r.$duration=parseFloat((i/1e3).toFixed(3))}r=G.extend({},G.info.properties(),this.persistence.properties(),r);var a=this.get_config("property_blacklist");G.isArray(a)?G.each(a,(function(e){delete r[e]})):q("Invalid value for property_blacklist config: "+a);var s=this.get_config("sanitize_properties");return s&&(r=s(r,e)),r},Tt.prototype.capture_pageview=function(e){G.isUndefined(e)&&(e=N.location.href),this.capture("$pageview")},Tt.prototype.register=function(e,t){this.persistence.register(e,t)},Tt.prototype.register_once=function(e,t,n){this.persistence.register_once(e,t,n)},Tt.prototype.unregister=function(e){this.persistence.unregister(e)},Tt.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},Tt.prototype.isFeatureEnabled=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.featureFlags.isFeatureEnabled(e,t)},Tt.prototype.reloadFeatureFlags=function(){return this.feature_flags.reloadFeatureFlags()},Tt.prototype.onFeatureFlags=function(e){this.persistence.addFeatureFlagsHandler(e);var t=this.feature_flags.getFlags();t&&e(t)},Tt.prototype.identify=function(e,t,n){if(e){this._captureMetrics.incr("identify");var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var o=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:o},"")}e!==r&&e!==this.get_property("__alias")&&(this.unregister("__alias"),this.register({distinct_id:e})),e===r||this.get_property("$device_id")&&r!==this.get_property("$device_id")?(t&&this.people.set(t),n&&this.people.set_once(n)):this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{}},{$set_once:n||{}}),this.reloadFeatureFlags()}else q("Unique user id has not been set in posthog.identify")},Tt.prototype.reset=function(e){var t=this.get_property("$device_id");this.persistence.clear();var n=G.UUID();this.register_once({distinct_id:n,$device_id:e?n:t},"")},Tt.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},Tt.prototype.alias=function(e,t){if(e===this.get_property("$people_distinct_id"))return H("Attempting to create alias for existing People user - aborting."),-2;var n=this;return G.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single("__alias",e),this.capture("$create_alias",{alias:e,distinct_id:t},(function(){n.identify(e)}))):(q("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},Tt.prototype.set_config=function(e){var t=l({},this.config);G.isObject(e)&&(G.extend(this.config,e),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),ce.is_supported()&&"true"===ce.get("ph_debug")&&(this.config.debug=!0),T.DEBUG=T.DEBUG||this.get_config("debug"),this.sessionRecording&&void 0!==e.disable_session_recording&&t.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))},Tt.prototype.startSessionRecording=function(){this.set_config({disable_session_recording:!1})},Tt.prototype.stopSessionRecording=function(){this.set_config({disable_session_recording:!0})},Tt.prototype.sessionRecordingStarted=function(){return this.sessionRecording.started()},Tt.prototype.get_config=function(e){return this.config[e]},Tt.prototype.get_property=function(e){return this.persistence.props[e]},Tt.prototype.toString=function(){var e=this.get_config("name");return"posthog"!==e&&(e="posthog."+e),e},Tt.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&ce.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!ae.get("ph_optout")||(ae.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},Tt.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t)},Tt.prototype._gdpr_call_func=function(e,t){return t=G.extend({capture:G.bind(this.capture,this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},t),ce.is_supported()||"localStorage"!==t.persistence_type||(t.persistence_type="cookie"),e(this.get_config("token"),{capture:t.capture,captureEventName:t.capture_event_name,captureProperties:t.capture_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieExpiration:t.cookie_expiration,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie})},Tt.prototype.opt_in_capturing=function(e){e=G.extend({enable_persistence:!0},e),this._gdpr_call_func(de,e),this._gdpr_update_persistence(e)},Tt.prototype.opt_out_capturing=function(e){e=G.extend({clear_persistence:!0},e),this._gdpr_call_func(he,e),this._gdpr_update_persistence(e)},Tt.prototype.has_opted_in_capturing=function(e){return this._gdpr_call_func(pe,e)},Tt.prototype.has_opted_out_capturing=function(e){return this._gdpr_call_func(me,e)},Tt.prototype.clear_opt_in_out_capturing=function(e){e=G.extend({enable_persistence:!0},e),this._gdpr_call_func(fe,e),this._gdpr_update_persistence(e)},Tt.prototype.sentry_integration=function(e,t,n,r){this.name="posthog-js",this.setupOnce=function(o){o((function(o){if("error"!==o.level||!e.__loaded)return o;o.tags||(o.tags={}),o.tags["PostHog URL"]=e.config.api_host+"/person/"+e.get_distinct_id();var i={$sentry_event_id:o.event_id,$sentry_exception:o.exception};return t&&n&&(i.$sentry_url=(r||"https://sentry.io/organizations/")+t+"/issues/?project="+n+"&query="+o.event_id),e.capture("$exception",i),o}))}},Tt.prototype.debug=function(e){!1===e?(I.console.log("You've disabled debug mode."),localStorage&&localStorage.setItem("ph_debug",void 0),this.set_config({debug:!1})):(I.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))},Tt.prototype.decodeLZ64=C.decompressFromBase64,Tt.prototype.init=Tt.prototype.init,Tt.prototype.reset=Tt.prototype.reset,Tt.prototype.capture=Tt.prototype.capture,Tt.prototype.capture_pageview=Tt.prototype.capture_pageview,Tt.prototype.register=Tt.prototype.register,Tt.prototype.register_once=Tt.prototype.register_once,Tt.prototype.unregister=Tt.prototype.unregister,Tt.prototype.identify=Tt.prototype.identify,Tt.prototype.alias=Tt.prototype.alias,Tt.prototype.set_config=Tt.prototype.set_config,Tt.prototype.get_config=Tt.prototype.get_config,Tt.prototype.get_property=Tt.prototype.get_property,Tt.prototype.get_distinct_id=Tt.prototype.get_distinct_id,Tt.prototype.toString=Tt.prototype.toString,Tt.prototype.opt_out_captureing=Tt.prototype.opt_out_captureing,Tt.prototype.opt_in_captureing=Tt.prototype.opt_in_captureing,Tt.prototype.has_opted_out_captureing=Tt.prototype.has_opted_out_captureing,Tt.prototype.has_opted_in_captureing=Tt.prototype.has_opted_in_captureing,Tt.prototype.clear_opt_in_out_captureing=Tt.prototype.clear_opt_in_out_captureing,Tt.prototype.opt_out_capturing=Tt.prototype.opt_out_capturing,Tt.prototype.opt_in_capturing=Tt.prototype.opt_in_capturing,Tt.prototype.has_opted_out_capturing=Tt.prototype.has_opted_out_capturing,Tt.prototype.has_opted_in_capturing=Tt.prototype.has_opted_in_capturing,Tt.prototype.clear_opt_in_out_capturing=Tt.prototype.clear_opt_in_out_capturing,Tt.prototype.isFeatureEnabled=Tt.prototype.isFeatureEnabled,Tt.prototype.reloadFeatureFlags=Tt.prototype.reloadFeatureFlags,Tt.prototype.onFeatureFlags=Tt.prototype.onFeatureFlags,Tt.prototype.decodeLZ64=Tt.prototype.decodeLZ64,Tt.prototype.SentryIntegration=Tt.prototype.sentry_integration,Tt.prototype.debug=Tt.prototype.debug,Tt.prototype.LIB_VERSION=T.LIB_VERSION,Tt.prototype.startSessionRecording=Tt.prototype.startSessionRecording,Tt.prototype.stopSessionRecording=Tt.prototype.stopSessionRecording,Tt.prototype.sessionRecordingStarted=Tt.prototype.sessionRecordingStarted,xe.prototype.properties=xe.prototype.properties,xe.prototype.update_search_keyword=xe.prototype.update_search_keyword,xe.prototype.update_referrer_info=xe.prototype.update_referrer_info,xe.prototype.get_cross_subdomain=xe.prototype.get_cross_subdomain,xe.prototype.clear=xe.prototype.clear,G.safewrap_class(Tt,["identify"]);var kt={},Ft=function(){ft.init=function(e,t,n){if(n)return ft[n]||(ft[n]=kt[n]=xt(e,t,n),ft[n]._loaded()),ft[n];var r=ft;kt.posthog?r=kt.posthog:e&&((r=xt(e,t,"posthog"))._loaded(),kt.posthog=r),ft=r,1===gt&&(I.posthog=ft),G.each(kt,(function(e,t){"posthog"!==t&&(ft[t]=e)})),ft._=G}};var Ot=(gt=0,ft=new Tt,Ft(),ft.init(),function(){function e(){e.done||(e.done=!0,Ct=!1,G.each(kt,(function(e){e._dom_loaded()})))}if(N.addEventListener)"complete"===N.readyState?e():N.addEventListener("DOMContentLoaded",e,!1);else if(N.attachEvent){N.attachEvent("onreadystatechange",e);var t=!1;try{t=null===I.frameElement}catch(e){}N.documentElement.doScroll&&t&&function t(){try{N.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}G.register_event(I,"load",e,!0)}(),ft);e.exports=Ot},function(e,t){e.exports="img/betas/spaces.475c2e5.png"},function(e,t,n){var r=n(1285),o=n(1286),i=n(1303),a=n(1304);function s(e,t,n,i,a){var s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=t,t=i=void 0):2!==c||t.getContext||(i=n,n=t,t=void 0),new Promise((function(r,a){try{var s=o.create(n,i);r(e(s,t,i))}catch(e){a(e)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=t,t=i=void 0):3===c&&(t.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=t,t=void 0));try{var u=o.create(n,i);a(null,e(u,t,i))}catch(e){a(e)}}t.create=o.create,t.toCanvas=s.bind(null,i.render),t.toDataURL=s.bind(null,i.renderToDataURL),t.toString=s.bind(null,(function(e,t,n){return a.render(e,n)}))},function(e,t){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},function(e,t,n){var r=n(244),o=n(219),i=n(432),a=n(1287),s=n(1288),c=n(1289),l=n(1290),u=n(1291),d=n(625),h=n(1292),p=n(1295),m=n(1296),g=n(220),f=n(1297),_=n(431);function b(e,t,n){var r,o,i=e.size,a=m.getEncodedBits(t,n);for(r=0;r<15;r++)o=1==(a>>r&1),r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),r<8?e.set(8,i-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}function v(e,t,n){var i=new a;n.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),g.getCharCountIndicator(t.mode,e)),t.write(i)}));var s=8*(o.getSymbolTotalCodewords(e)-d.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);for(var c=(s-i.getLengthInBits())/8,l=0;l<c;l++)i.put(l%2?17:236,8);return function(e,t,n){for(var i=o.getSymbolTotalCodewords(t),a=d.getTotalCodewordsCount(t,n),s=i-a,c=d.getBlocksCount(t,n),l=c-i%c,u=Math.floor(i/c),p=Math.floor(s/c),m=p+1,g=u-p,f=new h(g),_=0,b=new Array(c),v=new Array(c),y=0,E=r.from(e.buffer),S=0;S<c;S++){var w=S<l?p:m;b[S]=E.slice(_,_+w),v[S]=f.encode(b[S]),_+=w,y=Math.max(y,w)}var C,T,x=r.alloc(i),k=0;for(C=0;C<y;C++)for(T=0;T<c;T++)C<b[T].length&&(x[k++]=b[T][C]);for(C=0;C<g;C++)for(T=0;T<c;T++)x[k++]=v[T][C];return x}(i,e,t)}function y(e,t,n,r){var i;if(_(e))i=f.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");var a=t;if(!a){var d=f.rawSplit(e);a=p.getBestVersionForData(d,n)}i=f.fromString(e,a||40)}var h=p.getBestVersionForData(i,n);if(!h)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<h)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+h+".\n")}else t=h;var m=v(t,n,i),g=o.getSymbolSize(t),y=new s(g);return function(e,t){for(var n=e.size,r=l.getPositions(t),o=0;o<r.length;o++)for(var i=r[o][0],a=r[o][1],s=-1;s<=7;s++)if(!(i+s<=-1||n<=i+s))for(var c=-1;c<=7;c++)a+c<=-1||n<=a+c||(s>=0&&s<=6&&(0===c||6===c)||c>=0&&c<=6&&(0===s||6===s)||s>=2&&s<=4&&c>=2&&c<=4?e.set(i+s,a+c,!0,!0):e.set(i+s,a+c,!1,!0))}(y,t),function(e){for(var t=e.size,n=8;n<t-8;n++){var r=n%2==0;e.set(n,6,r,!0),e.set(6,n,r,!0)}}(y),function(e,t){for(var n=c.getPositions(t),r=0;r<n.length;r++)for(var o=n[r][0],i=n[r][1],a=-2;a<=2;a++)for(var s=-2;s<=2;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?e.set(o+a,i+s,!0,!0):e.set(o+a,i+s,!1,!0)}(y,t),b(y,n,0),t>=7&&function(e,t){for(var n,r,o,i=e.size,a=p.getEncodedBits(t),s=0;s<18;s++)n=Math.floor(s/3),r=s%3+i-8-3,o=1==(a>>s&1),e.set(n,r,o,!0),e.set(r,n,o,!0)}(y,t),function(e,t){for(var n=e.size,r=-1,o=n-1,i=7,a=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var c=0;c<2;c++)if(!e.isReserved(o,s-c)){var l=!1;a<t.length&&(l=1==(t[a]>>>i&1)),e.set(o,s-c,l),-1===--i&&(a++,i=7)}if((o+=r)<0||n<=o){o-=r,r=-r;break}}}(y,m),isNaN(r)&&(r=u.getBestMask(y,b.bind(null,y,n))),u.applyMask(r,y),b(y,n,r),{modules:y,version:t,errorCorrectionLevel:n,maskPattern:r,segments:i}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");var n,r,a=i.M;return void 0!==t&&(a=i.from(t.errorCorrectionLevel,i.M),n=p.from(t.version),r=u.from(t.maskPattern),t.toSJISFunc&&o.setToSJISFunction(t.toSJISFunc)),y(e,n,a,r)}},function(e,t){function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=n},function(e,t,n){var r=n(244);function o(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=r.alloc(e*e),this.reservedBit=r.alloc(e*e)}o.prototype.set=function(e,t,n,r){var o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},o.prototype.get=function(e,t){return this.data[e*this.size+t]},o.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},o.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=o},function(e,t,n){var r=n(219).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];for(var t=Math.floor(e/7)+2,n=r(e),o=145===n?26:2*Math.ceil((n-13)/(2*t-2)),i=[n-7],a=1;a<t-1;a++)i[a]=i[a-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){for(var n=[],r=t.getRowColCoords(e),o=r.length,i=0;i<o;i++)for(var a=0;a<o;a++)0===i&&0===a||0===i&&a===o-1||i===o-1&&0===a||n.push([r[i],r[a]]);return n}},function(e,t,n){var r=n(219).getSymbolSize;t.getPositions=function(e){var t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n=3,r=3,o=40,i=10;function a(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){for(var t=e.size,r=0,o=0,i=0,a=null,s=null,c=0;c<t;c++){o=i=0,a=s=null;for(var l=0;l<t;l++){var u=e.get(c,l);u===a?o++:(o>=5&&(r+=n+(o-5)),a=u,o=1),(u=e.get(l,c))===s?i++:(i>=5&&(r+=n+(i-5)),s=u,i=1)}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5))}return r},t.getPenaltyN2=function(e){for(var t=e.size,n=0,o=0;o<t-1;o++)for(var i=0;i<t-1;i++){var a=e.get(o,i)+e.get(o,i+1)+e.get(o+1,i)+e.get(o+1,i+1);4!==a&&0!==a||n++}return n*r},t.getPenaltyN3=function(e){for(var t=e.size,n=0,r=0,i=0,a=0;a<t;a++){r=i=0;for(var s=0;s<t;s++)r=r<<1&2047|e.get(a,s),s>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|e.get(s,a),s>=10&&(1488===i||93===i)&&n++}return n*o},t.getPenaltyN4=function(e){for(var t=0,n=e.data.length,r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*i},t.applyMask=function(e,t){for(var n=t.size,r=0;r<n;r++)for(var o=0;o<n;o++)t.isReserved(o,r)||t.xor(o,r,a(e,o,r))},t.getBestMask=function(e,n){for(var r=Object.keys(t.Patterns).length,o=0,i=1/0,a=0;a<r;a++){n(a),t.applyMask(a,e);var s=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),s<i&&(i=s,o=a)}return o}},function(e,t,n){var r=n(244),o=n(1293),i=n(24).Buffer;function a(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(e){this.degree=e,this.genPoly=o.generateECPolynomial(this.degree)},a.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=r.alloc(this.degree),n=i.concat([e,t],e.length+this.degree),a=o.mod(n,this.genPoly),s=this.degree-a.length;if(s>0){var c=r.alloc(this.degree);return a.copy(c,s),c}return a},e.exports=a},function(e,t,n){var r=n(244),o=n(1294);t.mul=function(e,t){for(var n=r.alloc(e.length+t.length-1),i=0;i<e.length;i++)for(var a=0;a<t.length;a++)n[i+a]^=o.mul(e[i],t[a]);return n},t.mod=function(e,t){for(var n=r.from(e);n.length-t.length>=0;){for(var i=n[0],a=0;a<t.length;a++)n[a]^=o.mul(t[a],i);for(var s=0;s<n.length&&0===n[s];)s++;n=n.slice(s)}return n},t.generateECPolynomial=function(e){for(var n=r.from([1]),i=0;i<e;i++)n=t.mul(n,[1,o.exp(i)]);return n}},function(e,t,n){var r=n(244),o=r.alloc(512),i=r.alloc(256);!function(){for(var e=1,t=0;t<255;t++)o[t]=e,i[e]=t,256&(e<<=1)&&(e^=285);for(t=255;t<512;t++)o[t]=o[t-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return i[e]},t.exp=function(e){return o[e]},t.mul=function(e,t){return 0===e||0===t?0:o[i[e]+i[t]]}},function(e,t,n){var r=n(219),o=n(625),i=n(432),a=n(220),s=n(626),c=n(431),l=r.getBCHDigit(7973);function u(e,t){return a.getCharCountIndicator(e,t)+4}function d(e,t){var n=0;return e.forEach((function(e){var r=u(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);var i=8*(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t));if(n===a.MIXED)return i;var c=i-u(n,e);switch(n){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){var r,o=i.from(n,i.M);if(c(e)){if(e.length>1)return function(e,n){for(var r=1;r<=40;r++){if(d(e,r)<=t.getCapacity(r,n,a.MIXED))return r}}(e,o);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(var o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var t=e<<12;r.getBCHDigit(t)-l>=0;)t^=7973<<r.getBCHDigit(t)-l;return e<<12|t}},function(e,t,n){var r=n(219),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){for(var n=e.bit<<3|t,i=n<<10;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},function(e,t,n){var r=n(220),o=n(1298),i=n(1299),a=n(1300),s=n(1301),c=n(627),l=n(219),u=n(1302);function d(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){for(var r,o=[];null!==(r=e.exec(n));)o.push({data:r[0],index:r.index,mode:t,length:r[0].length});return o}function p(e){var t,n,o=h(c.NUMERIC,r.NUMERIC,e),i=h(c.ALPHANUMERIC,r.ALPHANUMERIC,e);return l.isKanjiModeEnabled()?(t=h(c.BYTE,r.BYTE,e),n=h(c.KANJI,r.KANJI,e)):(t=h(c.BYTE_KANJI,r.BYTE,e),n=[]),o.concat(i,t,n).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function m(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return i.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return a.getBitsLength(e)}}function g(e,t){var n,c=r.getBestModeForData(e);if((n=r.from(t,c))!==r.BYTE&&n.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(e);case r.ALPHANUMERIC:return new i(e);case r.KANJI:return new s(e);case r.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e}),[])},t.fromString=function(e,n){for(var o=function(e,t){for(var n={},o={start:{}},i=["start"],a=0;a<e.length;a++){for(var s=e[a],c=[],l=0;l<s.length;l++){var u=s[l],d=""+a+l;c.push(d),n[d]={node:u,lastCount:0},o[d]={};for(var h=0;h<i.length;h++){var p=i[h];n[p]&&n[p].node.mode===u.mode?(o[p][d]=m(n[p].lastCount+u.length,u.mode)-m(n[p].lastCount,u.mode),n[p].lastCount+=u.length):(n[p]&&(n[p].lastCount=u.length),o[p][d]=m(u.length,u.mode)+4+r.getCharCountIndicator(u.mode,t))}}i=c}for(h=0;h<i.length;h++)o[i[h]].end=0;return{map:o,table:n}}(function(e){for(var t=[],n=0;n<e.length;n++){var o=e[n];switch(o.mode){case r.NUMERIC:t.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:t.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:t.push([o,{data:o.data,mode:r.BYTE,length:d(o.data)}]);break;case r.BYTE:t.push([{data:o.data,mode:r.BYTE,length:d(o.data)}])}}return t}(p(e,l.isKanjiModeEnabled())),n),i=u.find_path(o.map,"start","end"),a=[],s=1;s<i.length-1;s++)a.push(o.table[i[s]].node);return t.fromArray(function(e){return e.reduce((function(e,t){var n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(a))},t.rawSplit=function(e){return t.fromArray(p(e,l.isKanjiModeEnabled()))}},function(e,t,n){var r=n(220);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){var t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);var o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},e.exports=o},function(e,t,n){var r=n(220),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=r.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){var t;for(t=0;t+2<=this.data.length;t+=2){var n=45*o.indexOf(this.data[t]);n+=o.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=i},function(e,t,n){var r=n(244),o=n(220);function i(e){this.mode=o.BYTE,this.data=r.from(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(var t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=i},function(e,t,n){var r=n(220),o=n(219);function i(e){this.mode=r.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){var t;for(t=0;t<this.data.length;t++){var n=o.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=i},function(e,t,n){"use strict";var r={single_source_shortest_paths:function(e,t,n){var o={},i={};i[t]=0;var a,s,c,l,u,d,h,p=r.PriorityQueue.make();for(p.push(t,0);!p.empty();)for(c in s=(a=p.pop()).value,l=a.cost,u=e[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],h=i[c],(void 0===i[c]||h>d)&&(i[c]=d,p.push(c,d),o[c]=s));if(void 0!==n&&void 0===i[n]){var m=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(m)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,n){var o=r.single_source_shortest_paths(e,t,n);return r.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(e){var t,n=r.PriorityQueue,o={};for(t in e=e||{},n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o.queue=[],o.sorter=e.sorter||n.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=r},function(e,t,n){var r=n(628);t.render=function(e,t,n){var o=n,i=t;void 0!==o||t&&t.getContext||(o=t,t=void 0),t||(i=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);var a=r.getImageWidth(e.modules.size,o),s=i.getContext("2d"),c=s.createImageData(a,a);return r.qrToImageData(c.data,e,o),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,i,a),s.putImageData(c,0,0),i},t.renderToDataURL=function(e,n,r){var o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});var i=t.render(e,n,o),a=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(a,s.quality)}},function(e,t,n){var r=n(628);function o(e,t){var n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(e,t,n){var r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){var a=r.getOptions(t),s=e.modules.size,c=e.modules.data,l=s+2*a.margin,u=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+o(a.color.dark,"stroke")+' d="'+function(e,t,n){for(var r="",o=0,a=!1,s=0,c=0;c<e.length;c++){var l=Math.floor(c%t),u=Math.floor(c/t);l||a||(a=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(r+=a?i("M",l+n,.5+u+n):i("m",o,0),o=0,a=!1),l+1<t&&e[c+1]||(r+=i("h",s),s=0)):o++}return r}(c,s,a.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,p),p}},function(e,t){e.exports="img/social/facebook.d547f79.png"},function(e,t){e.exports="img/social/twitter-2.6517b36.png"},function(e,t){e.exports="img/social/linkedin.ab157f6.png"},function(e,t){e.exports="img/social/reddit.eeab8e6.png"},function(e,t){e.exports="img/social/email-1.1134895.png"},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(1311),a=n(102);class s{constructor(e){this.store=e,o()(this,"filter",new i.a),o()(this,"activeSpace",a.g.instance.activeSpace),o()(this,"allRoomsInHome",a.g.instance.allRoomsInHome),o()(this,"onSelectedSpaceUpdated",(e,t=this.allRoomsInHome)=>{if(e===this.activeSpace&&t===this.allRoomsInHome)return;const n=this.activeSpace,r=this.allRoomsInHome;this.activeSpace=e,this.allRoomsInHome=t,!e&&t||this.updateFilter(),r&&!n?this.store.addFilter(this.filter):t&&!e&&this.store.removeFilter(this.filter)}),o()(this,"onHomeBehaviourUpdated",e=>{this.onSelectedSpaceUpdated(this.activeSpace,e)}),o()(this,"updateFilter",()=>{this.activeSpace&&a.g.instance.traverseSpace(this.activeSpace.roomId,e=>{var t,n;null===(t=this.store.matrixClient)||void 0===t||null===(n=t.getRoom(e))||void 0===n||n.loadMembersIfNeeded()}),this.filter.updateSpace(this.activeSpace)}),this.allRoomsInHome&&!this.activeSpace||(this.updateFilter(),e.addFilter(this.filter)),a.g.instance.on(a.e,this.onSelectedSpaceUpdated),a.g.instance.on(a.c,this.onHomeBehaviourUpdated)}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(79),o=n.n(r),i=n(3),a=n(270),s=n(102),c=n(392);class l extends i.EventEmitter{constructor(...t){super(...t),o()(this,"roomIds",new Set),o()(this,"space",null),o()(this,"onStoreUpdate",async()=>{const t=this.roomIds;this.roomIds=new Set(s.g.instance.getSpaceFilteredRoomIds(this.space)),Object(c.a)(t,this.roomIds)&&(this.emit(a.a),e(()=>{this.emit(a.a)}))}),o()(this,"getSpaceEventKey",e=>e?e.roomId:s.a)}get kind(){return a.b.Prefilter}isVisible(e){return this.roomIds.has(e.roomId)}updateSpace(e){s.g.instance.off(this.getSpaceEventKey(this.space),this.onStoreUpdate),s.g.instance.on(this.getSpaceEventKey(this.space=e),this.onStoreUpdate),this.onStoreUpdate()}destroy(){s.g.instance.off(this.getSpaceEventKey(this.space),this.onStoreUpdate)}}}).call(this,n(161).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(439),o=n(87),i=n(186),a=n(80),s=n(156),c=n(239),l=n(141),u=n(105);class d{static tagRoom(e,t,n,d,h,p){let m=null;const g=s.b.instance;if(d&&g.getTagSorting(d)===c.b.Manual){const e=[...g.orderedLists[d]];e.sort((e,t)=>e.tags[d].order-t.tags[d].order);const t=d===n&&h<p?1:0,r=t+p-1,o=t+p,i=r<=0?0:e[r].tags[d].order,a=o>=e.length?1:e[o].tags[d].order;m={order:(i+a)/2}}return Object(r.a)("RoomListActions.tagRoom",()=>{const r=[],s=t.roomId;if(void 0===n&&d===l.a.DM||n===l.a.DM&&void 0===d)return i.c(t,d===l.a.DM).catch(e=>{console.error("Failed to set direct chat tag "+e),o.a.createTrackedDialog("Failed to set direct chat tag","",u.a,{title:Object(a.a)("Failed to set direct chat tag"),description:e&&e.message?e.message:Object(a.a)("Operation failed")})});const c=n!==d;if(n&&n!==l.a.DM&&c){const t=e.deleteRoomTag(s,n).catch((function(e){console.error("Failed to remove tag "+n+" from room: "+e),o.a.createTrackedDialog("Failed to remove tag from room","",u.a,{title:Object(a.a)("Failed to remove tag %(tagName)s from room",{tagName:n}),description:e&&e.message?e.message:Object(a.a)("Operation failed")})}));r.push(t)}if(d&&d!==l.a.DM&&(c||m)){m=m||{};const t=e.setRoomTag(s,d,m).catch((function(e){throw console.error("Failed to add tag "+d+" to room: "+e),o.a.createTrackedDialog("Failed to add tag to room","",u.a,{title:Object(a.a)("Failed to add tag %(tagName)s to room",{tagName:d}),description:e&&e.message?e.message:Object(a.a)("Operation failed")}),e}));r.push(t)}return Promise.all(r)},()=>({room:t,oldTag:n,newTag:d,metaData:m}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(645);class o{constructor(){}static forRoom(e){return r.a.instance.getOrCreateChamberForRoom(e)}}},function(e,t){function n(e,t,n,r){var o,i=null==(o=r)||"number"==typeof o||"boolean"==typeof o?r:n(r),a=t.get(i);return void 0===a&&(a=e.call(this,r),t.set(i,a)),a}function r(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return void 0===i&&(i=e.apply(this,r),t.set(o,i)),i}function o(e,t,n,r,o){return n.bind(t,e,r,o)}function i(e,t){return o(e,this,1===e.length?n:r,t.cache.create(),t.serializer)}function a(){return JSON.stringify(arguments)}function s(){this.cache=Object.create(null)}s.prototype.has=function(e){return e in this.cache},s.prototype.get=function(e){return this.cache[e]},s.prototype.set=function(e,t){this.cache[e]=t};var c={create:function(){return new s}};e.exports=function(e,t){var n=t&&t.cache?t.cache:c,r=t&&t.serializer?t.serializer:a;return(t&&t.strategy?t.strategy:i)(e,{cache:n,serializer:r})},e.exports.strategies={variadic:function(e,t){return o(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,t){return o(e,this,n,t.cache.create(),t.serializer)}}},function(e,t,n){"use strict";function r(){window.TouchEvent||(window.TouchEvent=class extends UIEvent{get altKey(){return!1}get changedTouches(){return[]}get ctrlKey(){return!1}get metaKey(){return!1}get shiftKey(){return!1}get targetTouches(){return[]}get touches(){return[]}get rotation(){return 0}get scale(){return 0}constructor(e,t){super(e,t)}})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";const{Deflate:r,deflate:o,deflateRaw:i,gzip:a}=n(1317),{Inflate:s,inflate:c,inflateRaw:l,ungzip:u}=n(1320),d=n(222);e.exports.Deflate=r,e.exports.deflate=o,e.exports.deflateRaw=i,e.exports.gzip=a,e.exports.Inflate=s,e.exports.inflate=c,e.exports.inflateRaw=l,e.exports.ungzip=u,e.exports.constants=d},function(e,t,n){"use strict";const r=n(1318),o=n(669),i=n(670),a=n(452),s=n(671),c=Object.prototype.toString,{Z_NO_FLUSH:l,Z_SYNC_FLUSH:u,Z_FULL_FLUSH:d,Z_FINISH:h,Z_OK:p,Z_STREAM_END:m,Z_DEFAULT_COMPRESSION:g,Z_DEFAULT_STRATEGY:f,Z_DEFLATED:_}=n(222);function b(e){this.options=o.assign({level:g,method:_,chunkSize:16384,windowBits:15,memLevel:8,strategy:f},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==p)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=r.deflateSetDictionary(this.strm,e),n!==p)throw new Error(a[n]);this._dict_set=!0}}function v(e,t){const n=new b(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}b.prototype.push=function(e,t){const n=this.strm,o=this.options.chunkSize;let a,s;if(this.ended)return!1;for(s=t===~~t?t:!0===t?h:l,"string"==typeof e?n.input=i.string2buf(e):"[object ArrayBuffer]"===c.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(o),n.next_out=0,n.avail_out=o),(s===u||s===d)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=r.deflate(n,s),a===m)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=r.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===p;if(0!==n.avail_out){if(s>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},b.prototype.onData=function(e){this.chunks.push(e)},b.prototype.onEnd=function(e){e===p&&(this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Deflate=b,e.exports.deflate=v,e.exports.deflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.gzip=function(e,t){return(t=t||{}).gzip=!0,v(e,t)},e.exports.constants=n(222)},function(e,t,n){"use strict";const{_tr_init:r,_tr_stored_block:o,_tr_flush_block:i,_tr_tally:a,_tr_align:s}=n(1319),c=n(667),l=n(668),u=n(452),{Z_NO_FLUSH:d,Z_PARTIAL_FLUSH:h,Z_FULL_FLUSH:p,Z_FINISH:m,Z_BLOCK:g,Z_OK:f,Z_STREAM_END:_,Z_STREAM_ERROR:b,Z_DATA_ERROR:v,Z_BUF_ERROR:y,Z_DEFAULT_COMPRESSION:E,Z_FILTERED:S,Z_HUFFMAN_ONLY:w,Z_RLE:C,Z_FIXED:T,Z_DEFAULT_STRATEGY:x,Z_UNKNOWN:k,Z_DEFLATED:F}=n(222),O=(e,t)=>(e.msg=u[t],t),R=e=>(e<<1)-(e>4?9:0),D=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let I=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const A=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},N=(e,t)=>{i(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,A(e.strm)},M=(e,t)=>{e.pending_buf[e.pending++]=t},P=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},L=(e,t,n,r)=>{let o=e.avail_in;return o>r&&(o=r),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),n),1===e.state.wrap?e.adler=c(e.adler,t,o,n):2===e.state.wrap&&(e.adler=l(e.adler,t,o,n)),e.next_in+=o,e.total_in+=o,o)},j=(e,t)=>{let n,r,o=e.max_chain_length,i=e.strstart,a=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,d=e.prev,h=e.strstart+258;let p=l[i+a-1],m=l[i+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,l[n+a]===m&&l[n+a-1]===p&&l[n]===l[i]&&l[++n]===l[i+1]){i+=2,n++;do{}while(l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&i<h);if(r=258-(h-i),i=h-258,r>a){if(e.match_start=t,a=r,r>=s)break;p=l[i+a-1],m=l[i+a]}}}while((t=d[t&u])>c&&0!=--o);return a<=e.lookahead?a:e.lookahead},U=e=>{const t=e.w_size;let n,r,o,i,a;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{o=e.head[--n],e.head[n]=o>=t?o-t:0}while(--r);r=t,n=r;do{o=e.prev[--n],e.prev[n]=o>=t?o-t:0}while(--r);i+=t}if(0===e.strm.avail_in)break;if(r=L(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=I(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=I(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},B=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(U(e),e.lookahead<262&&t===d)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=I(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=j(e,n)),e.match_length>=3)if(r=a(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=I(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=I(e,e.ins_h,e.window[e.strstart+1]);else r=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===m?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2},G=(e,t)=>{let n,r,o;for(;;){if(e.lookahead<262){if(U(e),e.lookahead<262&&t===d)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=I(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=j(e,n),e.match_length<=5&&(e.strategy===S||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,r=a(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=I(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=a(e,0,e.window[e.strstart-1]),r&&N(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=a(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===m?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2};function V(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}const q=[new V(0,0,0,0,(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(U(e),0===e.lookahead&&t===d)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,N(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===m?(N(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),1)}),new V(4,4,8,4,B),new V(4,5,16,8,B),new V(4,6,32,32,B),new V(4,4,16,16,G),new V(8,16,32,32,G),new V(8,16,128,128,G),new V(8,32,128,256,G),new V(32,128,258,1024,G),new V(32,258,258,4096,G)];function H(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=F,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const z=e=>{if(!e||!e.state)return O(e,b);e.total_in=e.total_out=0,e.data_type=k;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=d,r(t),f},W=e=>{const t=z(e);var n;return t===f&&((n=e.state).window_size=2*n.w_size,D(n.head),n.max_lazy_match=q[n.level].max_lazy,n.good_match=q[n.level].good_length,n.nice_match=q[n.level].nice_length,n.max_chain_length=q[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},K=(e,t,n,r,o,i)=>{if(!e)return b;let a=1;if(t===E&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),o<1||o>9||n!==F||r<8||r>15||t<0||t>9||i<0||i>T)return O(e,b);8===r&&(r=9);const s=new H;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=i,s.method=n,W(e)};e.exports.deflateInit=(e,t)=>K(e,t,F,15,8,x),e.exports.deflateInit2=K,e.exports.deflateReset=W,e.exports.deflateResetKeep=z,e.exports.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?b:(e.state.gzhead=t,f):b,e.exports.deflate=(e,t)=>{let n,r;if(!e||!e.state||t>g||t<0)return e?O(e,b):b;const i=e.state;if(!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==m)return O(e,0===e.avail_out?y:b);i.strm=e;const c=i.last_flush;if(i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,M(i,31),M(i,139),M(i,8),i.gzhead?(M(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),M(i,255&i.gzhead.time),M(i,i.gzhead.time>>8&255),M(i,i.gzhead.time>>16&255),M(i,i.gzhead.time>>24&255),M(i,9===i.level?2:i.strategy>=w||i.level<2?4:0),M(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(M(i,255&i.gzhead.extra.length),M(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=l(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(M(i,0),M(i,0),M(i,0),M(i,0),M(i,0),M(i,9===i.level?2:i.strategy>=w||i.level<2?4:0),M(i,3),i.status=113);else{let t=F+(i.w_bits-8<<4)<<8,n=-1;n=i.strategy>=w||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=n<<6,0!==i.strstart&&(t|=32),t+=31-t%31,i.status=113,P(i,t),0!==i.strstart&&(P(i,e.adler>>>16),P(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(e.adler=l(e.adler,i.pending_buf,i.pending-n,n)),A(e),n=i.pending,i.pending!==i.pending_buf_size));)M(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=l(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=l(e.adler,i.pending_buf,i.pending-n,n)),A(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,M(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(e.adler=l(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=l(e.adler,i.pending_buf,i.pending-n,n)),A(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,M(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(e.adler=l(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&A(e),i.pending+2<=i.pending_buf_size&&(M(i,255&e.adler),M(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(A(e),0===e.avail_out)return i.last_flush=-1,f}else if(0===e.avail_in&&R(t)<=R(c)&&t!==m)return O(e,y);if(666===i.status&&0!==e.avail_in)return O(e,y);if(0!==e.avail_in||0!==i.lookahead||t!==d&&666!==i.status){let n=i.strategy===w?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(U(e),0===e.lookahead)){if(t===d)return 1;break}if(e.match_length=0,n=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===m?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2})(i,t):i.strategy===C?((e,t)=>{let n,r,o,i;const s=e.window;for(;;){if(e.lookahead<=258){if(U(e),e.lookahead<=258&&t===d)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(o=e.strstart-1,r=s[o],r===s[++o]&&r===s[++o]&&r===s[++o])){i=e.strstart+258;do{}while(r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&o<i);e.match_length=258-(i-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=a(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===m?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2})(i,t):q[i.level].func(i,t);if(3!==n&&4!==n||(i.status=666),1===n||3===n)return 0===e.avail_out&&(i.last_flush=-1),f;if(2===n&&(t===h?s(i):t!==g&&(o(i,0,0,!1),t===p&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),A(e),0===e.avail_out))return i.last_flush=-1,f}return t!==m?f:i.wrap<=0?_:(2===i.wrap?(M(i,255&e.adler),M(i,e.adler>>8&255),M(i,e.adler>>16&255),M(i,e.adler>>24&255),M(i,255&e.total_in),M(i,e.total_in>>8&255),M(i,e.total_in>>16&255),M(i,e.total_in>>24&255)):(P(i,e.adler>>>16),P(i,65535&e.adler)),A(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?f:_)},e.exports.deflateEnd=e=>{if(!e||!e.state)return b;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?O(e,b):(e.state=null,113===t?O(e,v):f)},e.exports.deflateSetDictionary=(e,t)=>{let n=t.length;if(!e||!e.state)return b;const r=e.state,o=r.wrap;if(2===o||1===o&&42!==r.status||r.lookahead)return b;if(1===o&&(e.adler=c(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===o&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const i=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,U(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=I(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,U(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=i,r.wrap=o,f},e.exports.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,n){"use strict";function r(e){let t=e.length;for(;--t>=0;)e[t]=0}const o=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=new Array(576);r(c);const l=new Array(60);r(l);const u=new Array(512);r(u);const d=new Array(256);r(d);const h=new Array(29);r(h);const p=new Array(30);function m(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}let g,f,_;function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}r(p);const v=e=>e<256?u[e]:u[256+(e>>>7)],y=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},E=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,y(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},S=(e,t,n)=>{E(e,n[2*t],n[2*t+1])},w=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},C=(e,t,n)=>{const r=new Array(16);let o,i,a=0;for(o=1;o<=15;o++)r[o]=a=a+n[o-1]<<1;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=w(r[t]++,t))}},T=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},x=e=>{e.bi_valid>8?y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},k=(e,t,n,r)=>{const o=2*t,i=2*n;return e[o]<e[i]||e[o]===e[i]&&r[t]<=r[n]},F=(e,t,n)=>{const r=e.heap[n];let o=n<<1;for(;o<=e.heap_len&&(o<e.heap_len&&k(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!k(t,r,e.heap[o],e.depth));)e.heap[n]=e.heap[o],n=o,o<<=1;e.heap[n]=r},O=(e,t,n)=>{let r,a,s,c,l=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],a=e.pending_buf[e.l_buf+l],l++,0===r?S(e,a,t):(s=d[a],S(e,s+256+1,t),c=o[s],0!==c&&(a-=h[s],E(e,a,c)),r--,s=v(r),S(e,s,n),c=i[s],0!==c&&(r-=p[s],E(e,r,c)))}while(l<e.last_lit);S(e,256,t)},R=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.elems;let a,s,c,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a<i;a++)0!==n[2*a]?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):n[2*a+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,n[2*c]=1,e.depth[c]=0,e.opt_len--,o&&(e.static_len-=r[2*c+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)F(e,n,a);c=i;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],F(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[2*c]=n[2*a]+n[2*s],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[2*a+1]=n[2*s+1]=c,e.heap[1]=c++,F(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,o=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,u,d,h,p,m,g=0;for(h=0;h<=15;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)u=e.heap[l],h=n[2*n[2*u+1]+1]+1,h>c&&(h=c,g++),n[2*u+1]=h,u>r||(e.bl_count[h]++,p=0,u>=s&&(p=a[u-s]),m=n[2*u],e.opt_len+=m*(h+p),i&&(e.static_len+=m*(o[2*u+1]+p)));if(0!==g){do{for(h=c-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(h=c;0!==h;h--)for(u=e.bl_count[h];0!==u;)d=e.heap[--l],d>r||(n[2*d+1]!==h&&(e.opt_len+=(h-n[2*d+1])*n[2*d],n[2*d+1]=h),u--)}})(e,t),C(n,l,e.bl_count)},D=(e,t,n)=>{let r,o,i=-1,a=t[1],s=0,c=7,l=4;for(0===a&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=a,a=t[2*(r+1)+1],++s<c&&o===a||(s<l?e.bl_tree[2*o]+=s:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,i=o,0===a?(c=138,l=3):o===a?(c=6,l=3):(c=7,l=4))},I=(e,t,n)=>{let r,o,i=-1,a=t[1],s=0,c=7,l=4;for(0===a&&(c=138,l=3),r=0;r<=n;r++)if(o=a,a=t[2*(r+1)+1],!(++s<c&&o===a)){if(s<l)do{S(e,o,e.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(S(e,o,e.bl_tree),s--),S(e,16,e.bl_tree),E(e,s-3,2)):s<=10?(S(e,17,e.bl_tree),E(e,s-3,3)):(S(e,18,e.bl_tree),E(e,s-11,7));s=0,i=o,0===a?(c=138,l=3):o===a?(c=6,l=3):(c=7,l=4)}};let A=!1;const N=(e,t,n,r)=>{E(e,0+(r?1:0),3),((e,t,n,r)=>{x(e),r&&(y(e,n),y(e,~n)),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n,!0)};e.exports._tr_init=e=>{A||((()=>{let e,t,n,r,s;const b=new Array(16);for(n=0,r=0;r<28;r++)for(h[r]=n,e=0;e<1<<o[r];e++)d[n++]=r;for(d[n-1]=r,s=0,r=0;r<16;r++)for(p[r]=s,e=0;e<1<<i[r];e++)u[s++]=r;for(s>>=7;r<30;r++)for(p[r]=s<<7,e=0;e<1<<i[r]-7;e++)u[256+s++]=r;for(t=0;t<=15;t++)b[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,b[8]++;for(;e<=255;)c[2*e+1]=9,e++,b[9]++;for(;e<=279;)c[2*e+1]=7,e++,b[7]++;for(;e<=287;)c[2*e+1]=8,e++,b[8]++;for(C(c,287,b),e=0;e<30;e++)l[2*e+1]=5,l[2*e]=w(e,5);g=new m(c,o,257,286,15),f=new m(l,i,0,30,15),_=new m(new Array(0),a,0,19,7)})(),A=!0),e.l_desc=new b(e.dyn_ltree,g),e.d_desc=new b(e.dyn_dtree,f),e.bl_desc=new b(e.bl_tree,_),e.bi_buf=0,e.bi_valid=0,T(e)},e.exports._tr_stored_block=N,e.exports._tr_flush_block=(e,t,n,r)=>{let o,i,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),R(e,e.l_desc),R(e,e.d_desc),a=(e=>{let t;for(D(e,e.dyn_ltree,e.l_desc.max_code),D(e,e.dyn_dtree,e.d_desc.max_code),R(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*s[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=o&&(o=i)):o=i=n+5,n+4<=o&&-1!==t?N(e,t,n,r):4===e.strategy||i===o?(E(e,2+(r?1:0),3),O(e,c,l)):(E(e,4+(r?1:0),3),((e,t,n,r)=>{let o;for(E(e,t-257,5),E(e,n-1,5),E(e,r-4,4),o=0;o<r;o++)E(e,e.bl_tree[2*s[o]+1],3);I(e,e.dyn_ltree,t-1),I(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),O(e,e.dyn_ltree,e.dyn_dtree)),T(e),r&&x(e)},e.exports._tr_tally=(e,t,n)=>(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(d[n]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1),e.exports._tr_align=e=>{E(e,2,3),S(e,256,c),(e=>{16===e.bi_valid?(y(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},function(e,t,n){"use strict";const r=n(1321),o=n(669),i=n(670),a=n(452),s=n(671),c=n(1324),l=Object.prototype.toString,{Z_NO_FLUSH:u,Z_FINISH:d,Z_OK:h,Z_STREAM_END:p,Z_NEED_DICT:m,Z_STREAM_ERROR:g,Z_DATA_ERROR:f,Z_MEM_ERROR:_}=n(222);function b(e){this.options=o.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let n=r.inflateInit2(this.strm,t.windowBits);if(n!==h)throw new Error(a[n]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary),n!==h)))throw new Error(a[n])}function v(e,t){const n=new b(t);if(n.push(e),n.err)throw n.msg||a[n.err];return n.result}b.prototype.push=function(e,t){const n=this.strm,o=this.options.chunkSize,a=this.options.dictionary;let s,c,b;if(this.ended)return!1;for(c=t===~~t?t:!0===t?d:u,"[object ArrayBuffer]"===l.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(o),n.next_out=0,n.avail_out=o),s=r.inflate(n,c),s===m&&a&&(s=r.inflateSetDictionary(n,a),s===h?s=r.inflate(n,c):s===f&&(s=m));n.avail_in>0&&s===p&&n.state.wrap>0&&0!==e[n.next_in];)r.inflateReset(n),s=r.inflate(n,c);switch(s){case g:case f:case m:case _:return this.onEnd(s),this.ended=!0,!1}if(b=n.avail_out,n.next_out&&(0===n.avail_out||s===p))if("string"===this.options.to){let e=i.utf8border(n.output,n.next_out),t=n.next_out-e,r=i.buf2string(n.output,e);n.next_out=t,n.avail_out=o-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(r)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(s!==h||0!==b){if(s===p)return s=r.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},b.prototype.onData=function(e){this.chunks.push(e)},b.prototype.onEnd=function(e){e===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Inflate=b,e.exports.inflate=v,e.exports.inflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.ungzip=v,e.exports.constants=n(222)},function(e,t,n){"use strict";const r=n(667),o=n(668),i=n(1322),a=n(1323),{Z_FINISH:s,Z_BLOCK:c,Z_TREES:l,Z_OK:u,Z_STREAM_END:d,Z_NEED_DICT:h,Z_STREAM_ERROR:p,Z_DATA_ERROR:m,Z_MEM_ERROR:g,Z_BUF_ERROR:f,Z_DEFLATED:_}=n(222),b=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const y=e=>{if(!e||!e.state)return p;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,u},E=e=>{if(!e||!e.state)return p;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,y(e)},S=(e,t)=>{let n;if(!e||!e.state)return p;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?p:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,E(e))},w=(e,t)=>{if(!e)return p;const n=new v;e.state=n,n.window=null;const r=S(e,t);return r!==u&&(e.state=null),r};let C,T,x=!0;const k=e=>{if(x){C=new Int32Array(512),T=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,C,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,T,0,e.work,{bits:5}),x=!1}e.lencode=C,e.lenbits=9,e.distcode=T,e.distbits=5},F=(e,t,n,r)=>{let o;const i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),r>=i.wsize?(i.window.set(t.subarray(n-i.wsize,n),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>r&&(o=r),i.window.set(t.subarray(n-r,n-r+o),i.wnext),(r-=o)?(i.window.set(t.subarray(n-r,n),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0};e.exports.inflateReset=E,e.exports.inflateReset2=S,e.exports.inflateResetKeep=y,e.exports.inflateInit=e=>w(e,15),e.exports.inflateInit2=w,e.exports.inflate=(e,t)=>{let n,v,y,E,S,w,C,T,x,O,R,D,I,A,N,M,P,L,j,U,B,G,V=0;const q=new Uint8Array(4);let H,z;const W=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return p;n=e.state,12===n.mode&&(n.mode=13),S=e.next_out,y=e.output,C=e.avail_out,E=e.next_in,v=e.input,w=e.avail_in,T=n.hold,x=n.bits,O=w,R=C,G=u;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;x<16;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if(2&n.wrap&&35615===T){n.check=0,q[0]=255&T,q[1]=T>>>8&255,n.check=o(n.check,q,2,0),T=0,x=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&T)<<8)+(T>>8))%31){e.msg="incorrect header check",n.mode=30;break}if((15&T)!==_){e.msg="unknown compression method",n.mode=30;break}if(T>>>=4,x-=4,B=8+(15&T),0===n.wbits)n.wbits=B;else if(B>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<n.wbits,e.adler=n.check=1,n.mode=512&T?10:12,T=0,x=0;break;case 2:for(;x<16;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if(n.flags=T,(255&n.flags)!==_){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=T>>8&1),512&n.flags&&(q[0]=255&T,q[1]=T>>>8&255,n.check=o(n.check,q,2,0)),T=0,x=0,n.mode=3;case 3:for(;x<32;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}n.head&&(n.head.time=T),512&n.flags&&(q[0]=255&T,q[1]=T>>>8&255,q[2]=T>>>16&255,q[3]=T>>>24&255,n.check=o(n.check,q,4,0)),T=0,x=0,n.mode=4;case 4:for(;x<16;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}n.head&&(n.head.xflags=255&T,n.head.os=T>>8),512&n.flags&&(q[0]=255&T,q[1]=T>>>8&255,n.check=o(n.check,q,2,0)),T=0,x=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}n.length=T,n.head&&(n.head.extra_len=T),512&n.flags&&(q[0]=255&T,q[1]=T>>>8&255,n.check=o(n.check,q,2,0)),T=0,x=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(D=n.length,D>w&&(D=w),D&&(n.head&&(B=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(v.subarray(E,E+D),B)),512&n.flags&&(n.check=o(n.check,v,D,E)),w-=D,E+=D,n.length-=D),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===w)break e;D=0;do{B=v[E+D++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B))}while(B&&D<w);if(512&n.flags&&(n.check=o(n.check,v,D,E)),w-=D,E+=D,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===w)break e;D=0;do{B=v[E+D++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B))}while(B&&D<w);if(512&n.flags&&(n.check=o(n.check,v,D,E)),w-=D,E+=D,B)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if(T!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}T=0,x=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}e.adler=n.check=b(T),T=0,x=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=S,e.avail_out=C,e.next_in=E,e.avail_in=w,n.hold=T,n.bits=x,h;e.adler=n.check=1,n.mode=12;case 12:if(t===c||t===l)break e;case 13:if(n.last){T>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}switch(n.last=1&T,T>>>=1,x-=1,3&T){case 0:n.mode=14;break;case 1:if(k(n),n.mode=20,t===l){T>>>=2,x-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}T>>>=2,x-=2;break;case 14:for(T>>>=7&x,x-=7&x;x<32;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if((65535&T)!=(T>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&T,T=0,x=0,n.mode=15,t===l)break e;case 15:n.mode=16;case 16:if(D=n.length,D){if(D>w&&(D=w),D>C&&(D=C),0===D)break e;y.set(v.subarray(E,E+D),S),w-=D,E+=D,C-=D,S+=D,n.length-=D;break}n.mode=12;break;case 17:for(;x<14;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if(n.nlen=257+(31&T),T>>>=5,x-=5,n.ndist=1+(31&T),T>>>=5,x-=5,n.ncode=4+(15&T),T>>>=4,x-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}n.lens[W[n.have++]]=7&T,T>>>=3,x-=3}for(;n.have<19;)n.lens[W[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,H={bits:n.lenbits},G=a(0,n.lens,0,19,n.lencode,0,n.work,H),n.lenbits=H.bits,G){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;V=n.lencode[T&(1<<n.lenbits)-1],N=V>>>24,M=V>>>16&255,P=65535&V,!(N<=x);){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if(P<16)T>>>=N,x-=N,n.lens[n.have++]=P;else{if(16===P){for(z=N+2;x<z;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if(T>>>=N,x-=N,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}B=n.lens[n.have-1],D=3+(3&T),T>>>=2,x-=2}else if(17===P){for(z=N+3;x<z;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}T>>>=N,x-=N,B=0,D=3+(7&T),T>>>=3,x-=3}else{for(z=N+7;x<z;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}T>>>=N,x-=N,B=0,D=11+(127&T),T>>>=7,x-=7}if(n.have+D>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;D--;)n.lens[n.have++]=B}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,H={bits:n.lenbits},G=a(1,n.lens,0,n.nlen,n.lencode,0,n.work,H),n.lenbits=H.bits,G){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,H={bits:n.distbits},G=a(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,H),n.distbits=H.bits,G){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,t===l)break e;case 20:n.mode=21;case 21:if(w>=6&&C>=258){e.next_out=S,e.avail_out=C,e.next_in=E,e.avail_in=w,n.hold=T,n.bits=x,i(e,R),S=e.next_out,y=e.output,C=e.avail_out,E=e.next_in,v=e.input,w=e.avail_in,T=n.hold,x=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;V=n.lencode[T&(1<<n.lenbits)-1],N=V>>>24,M=V>>>16&255,P=65535&V,!(N<=x);){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if(M&&0==(240&M)){for(L=N,j=M,U=P;V=n.lencode[U+((T&(1<<L+j)-1)>>L)],N=V>>>24,M=V>>>16&255,P=65535&V,!(L+N<=x);){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}T>>>=L,x-=L,n.back+=L}if(T>>>=N,x-=N,n.back+=N,n.length=P,0===M){n.mode=26;break}if(32&M){n.back=-1,n.mode=12;break}if(64&M){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&M,n.mode=22;case 22:if(n.extra){for(z=n.extra;x<z;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}n.length+=T&(1<<n.extra)-1,T>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;V=n.distcode[T&(1<<n.distbits)-1],N=V>>>24,M=V>>>16&255,P=65535&V,!(N<=x);){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if(0==(240&M)){for(L=N,j=M,U=P;V=n.distcode[U+((T&(1<<L+j)-1)>>L)],N=V>>>24,M=V>>>16&255,P=65535&V,!(L+N<=x);){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}T>>>=L,x-=L,n.back+=L}if(T>>>=N,x-=N,n.back+=N,64&M){e.msg="invalid distance code",n.mode=30;break}n.offset=P,n.extra=15&M,n.mode=24;case 24:if(n.extra){for(z=n.extra;x<z;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}n.offset+=T&(1<<n.extra)-1,T>>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===C)break e;if(D=R-C,n.offset>D){if(D=n.offset-D,D>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}D>n.wnext?(D-=n.wnext,I=n.wsize-D):I=n.wnext-D,D>n.length&&(D=n.length),A=n.window}else A=y,I=S-n.offset,D=n.length;D>C&&(D=C),C-=D,n.length-=D;do{y[S++]=A[I++]}while(--D);0===n.length&&(n.mode=21);break;case 26:if(0===C)break e;y[S++]=n.length,C--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===w)break e;w--,T|=v[E++]<<x,x+=8}if(R-=C,e.total_out+=R,n.total+=R,R&&(e.adler=n.check=n.flags?o(n.check,y,R,S-R):r(n.check,y,R,S-R)),R=C,(n.flags?T:b(T))!==n.check){e.msg="incorrect data check",n.mode=30;break}T=0,x=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(0===w)break e;w--,T+=v[E++]<<x,x+=8}if(T!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}T=0,x=0}n.mode=29;case 29:G=d;break e;case 30:G=m;break e;case 31:return g;case 32:default:return p}return e.next_out=S,e.avail_out=C,e.next_in=E,e.avail_in=w,n.hold=T,n.bits=x,(n.wsize||R!==e.avail_out&&n.mode<30&&(n.mode<27||t!==s))&&F(e,e.output,e.next_out,R-e.avail_out)?(n.mode=31,g):(O-=e.avail_in,R-=e.avail_out,e.total_in+=O,e.total_out+=R,n.total+=R,n.wrap&&R&&(e.adler=n.check=n.flags?o(n.check,y,R,e.next_out-R):r(n.check,y,R,e.next_out-R)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===O&&0===R||t===s)&&G===u&&(G=f),G)},e.exports.inflateEnd=e=>{if(!e||!e.state)return p;let t=e.state;return t.window&&(t.window=null),e.state=null,u},e.exports.inflateGetHeader=(e,t)=>{if(!e||!e.state)return p;const n=e.state;return 0==(2&n.wrap)?p:(n.head=t,t.done=!1,u)},e.exports.inflateSetDictionary=(e,t)=>{const n=t.length;let o,i,a;return e&&e.state?(o=e.state,0!==o.wrap&&11!==o.mode?p:11===o.mode&&(i=1,i=r(i,t,n,0),i!==o.check)?m:(a=F(e,t,n,n),a?(o.mode=31,g):(o.havedict=1,u))):p},e.exports.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";e.exports=function(e,t){let n,r,o,i,a,s,c,l,u,d,h,p,m,g,f,_,b,v,y,E,S,w,C,T;const x=e.state;n=e.next_in,C=e.input,r=n+(e.avail_in-5),o=e.next_out,T=e.output,i=o-(t-e.avail_out),a=o+(e.avail_out-257),s=x.dmax,c=x.wsize,l=x.whave,u=x.wnext,d=x.window,h=x.hold,p=x.bits,m=x.lencode,g=x.distcode,f=(1<<x.lenbits)-1,_=(1<<x.distbits)-1;e:do{p<15&&(h+=C[n++]<<p,p+=8,h+=C[n++]<<p,p+=8),b=m[h&f];t:for(;;){if(v=b>>>24,h>>>=v,p-=v,v=b>>>16&255,0===v)T[o++]=65535&b;else{if(!(16&v)){if(0==(64&v)){b=m[(65535&b)+(h&(1<<v)-1)];continue t}if(32&v){x.mode=12;break e}e.msg="invalid literal/length code",x.mode=30;break e}y=65535&b,v&=15,v&&(p<v&&(h+=C[n++]<<p,p+=8),y+=h&(1<<v)-1,h>>>=v,p-=v),p<15&&(h+=C[n++]<<p,p+=8,h+=C[n++]<<p,p+=8),b=g[h&_];n:for(;;){if(v=b>>>24,h>>>=v,p-=v,v=b>>>16&255,!(16&v)){if(0==(64&v)){b=g[(65535&b)+(h&(1<<v)-1)];continue n}e.msg="invalid distance code",x.mode=30;break e}if(E=65535&b,v&=15,p<v&&(h+=C[n++]<<p,p+=8,p<v&&(h+=C[n++]<<p,p+=8)),E+=h&(1<<v)-1,E>s){e.msg="invalid distance too far back",x.mode=30;break e}if(h>>>=v,p-=v,v=o-i,E>v){if(v=E-v,v>l&&x.sane){e.msg="invalid distance too far back",x.mode=30;break e}if(S=0,w=d,0===u){if(S+=c-v,v<y){y-=v;do{T[o++]=d[S++]}while(--v);S=o-E,w=T}}else if(u<v){if(S+=c+u-v,v-=u,v<y){y-=v;do{T[o++]=d[S++]}while(--v);if(S=0,u<y){v=u,y-=v;do{T[o++]=d[S++]}while(--v);S=o-E,w=T}}}else if(S+=u-v,v<y){y-=v;do{T[o++]=d[S++]}while(--v);S=o-E,w=T}for(;y>2;)T[o++]=w[S++],T[o++]=w[S++],T[o++]=w[S++],y-=3;y&&(T[o++]=w[S++],y>1&&(T[o++]=w[S++]))}else{S=o-E;do{T[o++]=T[S++],T[o++]=T[S++],T[o++]=T[S++],y-=3}while(y>2);y&&(T[o++]=T[S++],y>1&&(T[o++]=T[S++]))}break}}break}}while(n<r&&o<a);y=p>>3,n-=y,p-=y<<3,h&=(1<<p)-1,e.next_in=n,e.next_out=o,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=o<a?a-o+257:257-(o-a),x.hold=h,x.bits=p}},function(e,t,n){"use strict";const r=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),o=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),i=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),a=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,t,n,s,c,l,u,d)=>{const h=d.bits;let p,m,g,f,_,b,v=0,y=0,E=0,S=0,w=0,C=0,T=0,x=0,k=0,F=0,O=null,R=0;const D=new Uint16Array(16),I=new Uint16Array(16);let A,N,M,P=null,L=0;for(v=0;v<=15;v++)D[v]=0;for(y=0;y<s;y++)D[t[n+y]]++;for(w=h,S=15;S>=1&&0===D[S];S--);if(w>S&&(w=S),0===S)return c[l++]=20971520,c[l++]=20971520,d.bits=1,0;for(E=1;E<S&&0===D[E];E++);for(w<E&&(w=E),x=1,v=1;v<=15;v++)if(x<<=1,x-=D[v],x<0)return-1;if(x>0&&(0===e||1!==S))return-1;for(I[1]=0,v=1;v<15;v++)I[v+1]=I[v]+D[v];for(y=0;y<s;y++)0!==t[n+y]&&(u[I[t[n+y]]++]=y);if(0===e?(O=P=u,b=19):1===e?(O=r,R-=257,P=o,L-=257,b=256):(O=i,P=a,b=-1),F=0,y=0,v=E,_=l,C=w,T=0,g=-1,k=1<<w,f=k-1,1===e&&k>852||2===e&&k>592)return 1;for(;;){A=v-T,u[y]<b?(N=0,M=u[y]):u[y]>b?(N=P[L+u[y]],M=O[R+u[y]]):(N=96,M=0),p=1<<v-T,m=1<<C,E=m;do{m-=p,c[_+(F>>T)+m]=A<<24|N<<16|M|0}while(0!==m);for(p=1<<v-1;F&p;)p>>=1;if(0!==p?(F&=p-1,F+=p):F=0,y++,0==--D[v]){if(v===S)break;v=t[n+u[y]]}if(v>w&&(F&f)!==g){for(0===T&&(T=w),_+=E,C=v-T,x=1<<C;C+T<S&&(x-=D[C+T],!(x<=0));)C++,x<<=1;if(k+=1<<C,1===e&&k>852||2===e&&k>592)return 1;g=F&f,c[g]=w<<24|C<<16|_-l|0}}return 0!==F&&(c[_+F]=v-T<<24|64<<16|0),d.bits=w,0}},function(e,t,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t,n){!function(){"use strict";var t,r=n(1326),o=n(672);function i(e){this.written=0,t=512*(e||20),this.out=o.clean(t)}i.prototype.append=function(e,n,i,a){var s,c,l,u,d,h,p;if("string"==typeof n)n=o.stringToUint8(n);else if(n.constructor!==Uint8Array.prototype.constructor)throw"Invalid input type. You gave me: "+n.constructor.toString().match(/function\s*([$A-Za-z_][0-9A-Za-z_]*)\s*\(/)[1];return"function"==typeof i&&(a=i,i={}),l=(i=i||{}).mode||4095&parseInt("777",8),u=i.mtime||Math.floor(+new Date/1e3),d=i.uid||0,h=i.gid||0,s={fileName:e,fileMode:o.pad(l,7),uid:o.pad(d,7),gid:o.pad(h,7),fileSize:o.pad(n.length,11),mtime:o.pad(u,11),checksum:" ",type:"0",ustar:"ustar ",owner:i.owner||"",group:i.group||""},c=0,Object.keys(s).forEach((function(e){var t,n,r=s[e];for(t=0,n=r.length;t<n;t+=1)c+=r.charCodeAt(t)})),s.checksum=o.pad(c,6)+"\0 ",p=r.format(s),this.out.set(p,this.written),this.written+=p.length,this.written+n.length>this.out.length&&(this.out=o.extend(this.out,this.written,n.length,t)),this.out.set(n,this.written),this.written+=n.length+(512-(n.length%512||512)),this.out.length-this.written<1024&&(this.out=o.extend(this.out,this.written,1024,t)),"function"==typeof a&&a(this.out),this.out},i.prototype.clear=function(){this.written=0,this.out=o.clean(t)},i.utils=o,i.stringToUint8=o.stringToUint8,i.uint8ToBase64=o.uint8ToBase64,i.base64ToUint8=o.base64ToUint8,e.exports=i}()},function(e,t,n){!function(){"use strict";var t,r=n(672);t=[{field:"fileName",length:100},{field:"fileMode",length:8},{field:"uid",length:8},{field:"gid",length:8},{field:"fileSize",length:12},{field:"mtime",length:12},{field:"checksum",length:8},{field:"type",length:1},{field:"linkName",length:100},{field:"ustar",length:8},{field:"owner",length:32},{field:"group",length:32},{field:"majorNumber",length:8},{field:"minorNumber",length:8},{field:"filenamePrefix",length:155},{field:"padding",length:12}],e.exports.structure=t,e.exports.format=function(e,n){var o=r.clean(512),i=0;return t.forEach((function(t){var n,r,a=e[t.field]||"";for(n=0,r=a.length;n<r;n+=1)o[i]=a.charCodeAt(n),i+=1;i+=t.length-n})),"function"==typeof n?n(o,i):o}}()},function(e,t){e.exports="img/icon-pill-remove.7719165.svg"},function(e,t){e.exports="img/element-icons/info.dc07e19.svg"},function(e,t,n){"use strict";var r=n(79),o=n.n(r),i=n(82),a=n(83),s=n(249);var c;!function(e){e.Online="online",e.Offline="offline",e.Unavailable="unavailable"}(c||(c={}));t.a=new class{constructor(){o()(this,"unavailableTimer",null),o()(this,"dispatcherRef",null),o()(this,"state",null),o()(this,"onAction",e=>{"user_activity"===e.action&&(this.setState(c.Online),this.unavailableTimer.restart())})}async start(){for(this.unavailableTimer=new s.a(18e4),this.dispatcherRef=a.a.register(this.onAction);this.unavailableTimer;)try{await this.unavailableTimer.finished(),this.setState(c.Unavailable)}catch(e){}}stop(){this.dispatcherRef&&(a.a.unregister(this.dispatcherRef),this.dispatcherRef=null),this.unavailableTimer&&(this.unavailableTimer.abort(),this.unavailableTimer=null)}getState(){return this.state}async setState(e){if(e===this.state)return;const t=this.state;if(this.state=e,!i.a.get().isGuest())try{await i.a.get().setPresence({presence:this.state}),console.info("Presence:",e)}catch(e){console.error("Failed to set presence:",e),this.state=t}}}},function(e,t){e.exports="fonts/Twemoji_Mozilla/TwemojiMozilla-colr.8aee240.woff2"},function(e,t){e.exports="fonts/Twemoji_Mozilla/TwemojiMozilla-sbix.293e5ba.woff2"},function(e,t){e.exports="img/e2e/verified.5be6c9f.svg"},function(e,t,n){!function(){"use strict";function e(e){var t=!0,n=!1,r=null,o={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function a(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function s(e){t=!1}function c(){document.addEventListener("mousemove",l),document.addEventListener("mousedown",l),document.addEventListener("mouseup",l),document.addEventListener("pointermove",l),document.addEventListener("pointerdown",l),document.addEventListener("pointerup",l),document.addEventListener("touchmove",l),document.addEventListener("touchstart",l),document.addEventListener("touchend",l)}function l(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",l),document.removeEventListener("mousedown",l),document.removeEventListener("mouseup",l),document.removeEventListener("pointermove",l),document.removeEventListener("pointerdown",l),document.removeEventListener("pointerup",l),document.removeEventListener("touchmove",l),document.removeEventListener("touchstart",l),document.removeEventListener("touchend",l))}document.addEventListener("keydown",(function(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&a(e.activeElement),t=!0)}),!0),document.addEventListener("mousedown",s,!0),document.addEventListener("pointerdown",s,!0),document.addEventListener("touchstart",s,!0),document.addEventListener("visibilitychange",(function(e){"hidden"===document.visibilityState&&(n&&(t=!0),c())}),!0),c(),e.addEventListener("focus",(function(e){var n,r,s;i(e.target)&&(t||(n=e.target,r=n.type,"INPUT"===(s=n.tagName)&&o[r]&&!n.readOnly||"TEXTAREA"===s&&!n.readOnly||n.isContentEditable))&&a(e.target)}),!0),e.addEventListener("blur",(function(e){var t;i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1}),100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))}),!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}()},function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t){"use strict";e.exports=function(){if("undefined"==typeof document||"undefined"==typeof window)return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var e=document.documentElement,t=null,n="initial",r=n,o=Date.now(),i="false",a=["button","input","select","textarea"],s=[],c=[16,17,18,91,93],l=[],u={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},d=!1,h={x:null,y:null},p={2:"touch",3:"touch",4:"mouse"},m=!1;try{var g=Object.defineProperty({},"passive",{get:function(){m=!0}});window.addEventListener("test",null,g)}catch(e){}var f=function(){var e=!!m&&{passive:!0};document.addEventListener("DOMContentLoaded",_),window.PointerEvent?(window.addEventListener("pointerdown",b),window.addEventListener("pointermove",y)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",b),window.addEventListener("MSPointerMove",y)):(window.addEventListener("mousedown",b),window.addEventListener("mousemove",y),"ontouchstart"in window&&(window.addEventListener("touchstart",b,e),window.addEventListener("touchend",b))),window.addEventListener(x(),y,e),window.addEventListener("keydown",b),window.addEventListener("keyup",b),window.addEventListener("focusin",E),window.addEventListener("focusout",S)},_=function(){if(i=!(e.getAttribute("data-whatpersist")||"false"===document.body.getAttribute("data-whatpersist")))try{window.sessionStorage.getItem("what-input")&&(n=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(r=window.sessionStorage.getItem("what-intent"))}catch(e){}v("input"),v("intent")},b=function(e){var t=e.which,o=u[e.type];"pointer"===o&&(o=C(e));var i=!l.length&&-1===c.indexOf(t),s=l.length&&-1!==l.indexOf(t),d="keyboard"===o&&t&&(i||s)||"mouse"===o||"touch"===o;if(T(o)&&(d=!1),d&&n!==o&&(w("input",n=o),v("input")),d&&r!==o){var h=document.activeElement;h&&h.nodeName&&(-1===a.indexOf(h.nodeName.toLowerCase())||"button"===h.nodeName.toLowerCase()&&!O(h,"form"))&&(w("intent",r=o),v("intent"))}},v=function(t){e.setAttribute("data-what"+t,"input"===t?n:r),k(t)},y=function(e){var t=u[e.type];"pointer"===t&&(t=C(e)),F(e),(!d&&!T(t)||d&&"wheel"===e.type||"mousewheel"===e.type||"DOMMouseScroll"===e.type)&&r!==t&&(w("intent",r=t),v("intent"))},E=function(n){n.target.nodeName?(t=n.target.nodeName.toLowerCase(),e.setAttribute("data-whatelement",t),n.target.classList&&n.target.classList.length&&e.setAttribute("data-whatclasses",n.target.classList.toString().replace(" ",","))):S()},S=function(){t=null,e.removeAttribute("data-whatelement"),e.removeAttribute("data-whatclasses")},w=function(e,t){if(i)try{window.sessionStorage.setItem("what-"+e,t)}catch(e){}},C=function(e){return"number"==typeof e.pointerType?p[e.pointerType]:"pen"===e.pointerType?"touch":e.pointerType},T=function(e){var t=Date.now(),r="mouse"===e&&"touch"===n&&t-o<200;return o=t,r},x=function(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"},k=function(e){for(var t=0,o=s.length;t<o;t++)s[t].type===e&&s[t].fn.call(void 0,"input"===e?n:r)},F=function(e){h.x!==e.screenX||h.y!==e.screenY?(d=!1,h.x=e.screenX,h.y=e.screenY):d=!0},O=function(e,t){var n=window.Element.prototype;if(n.matches||(n.matches=n.msMatchesSelector||n.webkitMatchesSelector),n.closest)return e.closest(t);do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null};return"addEventListener"in window&&Array.prototype.indexOf&&(u[x()]="mouse",f()),{ask:function(e){return"intent"===e?r:n},element:function(){return t},ignoreKeys:function(e){c=e},specificKeys:function(e){l=e},registerOnChange:function(e,t){s.push({fn:e,type:t||"input"})},unRegisterOnChange:function(e){var t=function(e){for(var t=0,n=s.length;t<n;t++)if(s[t].fn===e)return t}(e);(t||0===t)&&s.splice(t,1)},clearStorage:function(){window.sessionStorage.clear()}}}()}])},e.exports=r()},function(e,t){e.exports="img/element-icons/roomlist/dark-light-mode.f72b785.svg"},function(e,t,n){"use strict";t.__esModule=!0,t.config=t.Transition=t.TransitionGroup=t.SwitchTransition=t.ReplaceTransition=t.CSSTransition=void 0;var r=l(n(1337));t.CSSTransition=r.default;var o=l(n(1341));t.ReplaceTransition=o.default;var i=l(n(1343));t.SwitchTransition=i.default;var a=l(n(716));t.TransitionGroup=a.default;var s=l(n(468));t.Transition=s.default;var c=l(n(714));function l(e){return e&&e.__esModule?e:{default:e}}t.config=c.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(88)),o=l(n(1338)),i=l(n(1340)),a=l(n(78)),s=l(n(468)),c=n(715);function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var d=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,i.default)(e,t)}))},h=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return(0,o.default)(e,t)}))}(e,r))},i.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&d(e,r),o&&d(e,o),i&&d(e,i)},i.render=function(){var e=this.props,t=(e.classNames,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["classNames"]));return a.default.createElement(s.default,u({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(a.default.Component);h.defaultProps={classNames:""},h.propTypes=u({},s.default.propTypes,{classNames:c.classNamesShape,onEnter:r.default.func,onEntering:r.default.func,onEntered:r.default.func,onExit:r.default.func,onExiting:r.default.func,onExited:r.default.func});var p=h;t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(1339));e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(88)),o=s(n(78)),i=s(n(142)),a=s(n(716));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=r.prototype;return s.handleLifecycle=function(e,t,n){var r,a=this.props.children,s=o.default.Children.toArray(a)[t];if(s.props[e]&&(r=s.props)[e].apply(r,n),this.props[e]){var c=s.props.nodeRef?void 0:i.default.findDOMNode(this);this.props[e](c)}},s.render=function(){var e=this.props,t=e.children,n=e.in,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),i=o.default.Children.toArray(t),s=i[0],c=i[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,o.default.createElement(a.default,r,n?o.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):o.default.cloneElement(c,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},r}(o.default.Component);c.propTypes={in:r.default.bool.isRequired,children:function(e,t){return 2!==o.default.Children.count(e[t])?new Error('"'+t+'" must be exactly two transition components.'):null}};var l=c;t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var s=o(e.children),c=i(t,s);return Object.keys(c).forEach((function(o){var i=c[o];if((0,r.isValidElement)(i)){var l=o in t,u=o in s,d=t[o],h=(0,r.isValidElement)(d)&&!d.props.in;!u||l&&!h?u||!l||h?u&&l&&(0,r.isValidElement)(d)&&(c[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:d.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):c[o]=(0,r.cloneElement)(i,{in:!1}):c[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)})}})),c};var r=n(78);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var c in t){if(o[c])for(r=0;r<o[c].length;r++){var l=o[c][r];s[o[c][r]]=n(l)}s[c]=n(c)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}function a(e,t,n){return null!=n[t]?n[t]:e.props[t]}},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.modes=void 0;var r,o,i=l(n(78)),a=l(n(88)),s=n(468),c=l(n(469));function l(e){return e&&e.__esModule?e:{default:e}}var u={out:"out-in",in:"in-out"};t.modes=u;var d=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},h=((r={})[u.out]=function(e){var t=e.current,n=e.changeState;return i.default.cloneElement(t,{in:!1,onExited:d(t,"onExited",(function(){n(s.ENTERING,null)}))})},r[u.in]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,i.default.cloneElement(r,{in:!0,onEntered:d(r,"onEntered",(function(){n(s.ENTERING)}))})]},r),p=((o={})[u.out]=function(e){var t=e.children,n=e.changeState;return i.default.cloneElement(t,{in:!0,onEntered:d(t,"onEntered",(function(){n(s.ENTERED,i.default.cloneElement(t,{in:!0}))}))})},o[u.in]=function(e){var t=e.current,n=e.children,r=e.changeState;return[i.default.cloneElement(t,{in:!1,onExited:d(t,"onExited",(function(){r(s.ENTERED,i.default.cloneElement(n,{in:!0}))}))}),i.default.cloneElement(n,{in:!0})]},o),m=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:s.ENTERED,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.componentDidMount=function(){this.appeared=!0},r.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===s.ENTERING&&e.mode===u.in?{status:s.ENTERING}:!t.current||(n=t.current,r=e.children,n===r||i.default.isValidElement(n)&&i.default.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:i.default.cloneElement(e.children,{in:!0})}:{status:s.EXITING};var n,r},o.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,a=o.status,l=o.current,u={children:n,current:l,changeState:this.changeState,status:a};switch(a){case s.ENTERING:e=p[r](u);break;case s.EXITING:e=h[r](u);break;case s.ENTERED:e=l}return i.default.createElement(c.default.Provider,{value:{isMounting:!this.appeared}},e)},r}(i.default.Component);m.propTypes={mode:a.default.oneOf([u.in,u.out]),children:a.default.oneOfType([a.default.element.isRequired])},m.defaultProps={mode:u.out};var g=m;t.default=g},function(e,t){e.exports="img/element-icons/room/default_app.2034d23.svg"},function(e,t){e.exports="img/element-icons/room/default_video.66250a4.svg"},function(e,t){e.exports="img/element-icons/room/default_cal.65049a4.svg"},function(e,t){e.exports="img/element-icons/room/default_doc.02ee63f.svg"},function(e,t){e.exports="img/element-icons/room/default_clock.e3e0f9b.svg"},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(78),i=r(o),a=r(n(540)),s=r(n(92)),c=n(1350),l=n(1352),u=n(1366),d=n(1367),h=r(n(1369)),p=r(n(1370)),m=r(n(142)),g=/[ \t]{2,}/g,f=/^[ \t]*/gm,_=function(e){return e.replace(g," ").replace(f,"").trim()},b=function(e){return _("\n %creact-beautiful-dnd\n\n %c"+_(e)+"\n\n %c👷 This is a development only message. It will be removed in production builds.\n")};function v(e,t){var n;"undefined"!=typeof window&&window["__react-beautiful-dnd-disable-dev-warnings"]||(n=console)[e].apply(n,function(e){return[b(e),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]}(t))}var y=v.bind(null,"warn"),E=v.bind(null,"error");function S(){}function w(e,t,n){var r=t.map((function(t){var r=function(e,t){return s({},e,{},t)}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}}));return function(){r.forEach((function(e){e()}))}}function C(e){this.message=e}function T(e,t){if(!e)throw new C("Invariant failed: "+(t||""))}C.prototype.toString=function(){return this.message};var x=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=S,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&(n.tryAbort(),y("\n An error was caught by our window 'error' event listener while a drag was occurring.\n The active drag has been aborted.\n "));var r=e.error;r instanceof C&&(e.preventDefault(),E(r.message))},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}a(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=w(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(e instanceof C)return E(e.message),void this.setState({});throw e},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(i.Component),k=function(e){return e+1},F=function(e,t){var n=e.droppableId===t.droppableId,r=k(e.index),o=k(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+o+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+o+"\n "},O=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},R=function(e){return"\n The item has returned to its starting position\n of "+k(e.index)+"\n"},D="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",I=function(e){return"\n You have lifted an item in position "+k(e.source.index)+"\n"},A=function(e){var t=e.destination;if(t)return F(e.source,t);var n=e.combine;return n?O(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},N=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+R(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+F(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+O(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+R(e.source)+"\n "},M={x:0,y:0},P=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},L=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},j=function(e,t){return e.x===t.x&&e.y===t.y},U=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},B=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},G=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},V=function(e,t){return Math.min.apply(Math,t.map((function(t){return G(e,t)})))},q=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},H=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},z=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},W=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=d.getRect({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):d.getRect(e)},K=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,o=e.frame,i=function(e,t,n){var r;return n&&n.increasedBy?s({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(function(e,t){return t?H(e,t.scroll.diff.displacement):e}(t.marginBox,o),r,n);return{page:t,withPlaceholder:n,active:W(i,o)}},Y=function(e,t){e.frame||T(!1);var n=e.frame,r=L(t,n.scroll.initial),o=U(r),i=s({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}}),a=K({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return s({},e,{frame:i,subject:a})};function $(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function Q(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function J(e,t){if(e.find)return e.find(t);var n=Q(e,t);return-1!==n?e[n]:void 0}function X(e){return Array.prototype.slice.call(e)}var Z=h((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),ee=h((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),te=h((function(e){return $(e)})),ne=h((function(e){return $(e)})),re=h((function(e,t){return ne(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}))}));function oe(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function ie(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var ae=h((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),se=function(e,t){return e.descriptor.droppableId===t.descriptor.id},ce={point:M,value:0},le={invisible:{},visible:{},all:[]},ue={displaced:le,displacedBy:ce,at:null},de=function(e,t){return function(n){return e<=n&&n<=t}},he=function(e){var t=de(e.top,e.bottom),n=de(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;var a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return!(!a||!s)||(a&&i||s&&o)}},pe=function(e){var t=de(e.top,e.bottom),n=de(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},me={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},ge={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},fe=function(e){var t=e.target,n=e.destination,r=e.viewport,o=e.withDroppableDisplacement,i=e.isVisibleThroughFrameFn,a=o?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:M;return H(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,i)&&function(e,t,n){return n(t)(e)}(a,r,i)},_e=function(e){return fe(s({},e,{isVisibleThroughFrameFn:he}))},be=function(e){return fe(s({},e,{isVisibleThroughFrameFn:pe}))};function ve(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce((function(e,t){var s=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return d.getRect(d.expand(n,r))}(t,r),c=t.descriptor.id;if(e.all.push(c),!_e({target:s,destination:n,viewport:o,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var l={draggableId:c,shouldAnimate:function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,o=t.visible;if(r[e])return!1;var i=o[e];return!i||i.shouldAnimate}(c,a,i)};return e.visible[c]=l,e}),{all:[],visible:{},invisible:{}})}function ye(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,o=e.destination,i=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:le,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function Ee(e){var t=e.draggable,n=e.insideDestination,r=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,s=e.index,c=e.forceShouldAnimate,l=se(t,r);if(null==s)return ye({insideDestination:n,inHomeList:l,displacedBy:i,destination:r});var u=J(n,(function(e){return e.descriptor.index===s}));if(!u)return ye({insideDestination:n,inHomeList:l,displacedBy:i,destination:r});var d=ae(t,n),h=n.indexOf(u);return{displaced:ve({afterDragging:d.slice(h),destination:r,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:c}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function Se(e,t){return Boolean(t.effected[e])}var we=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,s=e.previousImpact,c=e.viewport,l=e.afterCritical,u=s.at;if(u||T(!1,"Cannot move in direction without previous impact location"),"REORDER"===u.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,o=e.location;if(!r.length)return null;var i=o.index,a=t?i+1:i-1,s=r[0].descriptor.index,c=r[r.length-1].descriptor.index;return a<s||a>(n?c:c+1)?null:a}({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:a});return null==d?null:Ee({draggable:r,insideDestination:a,destination:i,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:d})}var h=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,o=e.combine,i=e.afterCritical;if(!n.isCombineEnabled)return null;var a=o.draggableId,s=r[a].descriptor.index;return Se(a,i)?t?s:s-1:t?s+1:s}({isMovingForward:t,destination:i,displaced:s.displaced,draggables:o,combine:u.combine,afterCritical:l});return null==h?null:Ee({draggable:r,insideDestination:a,destination:i,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:h})},Ce=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,o=ie(n);o||T(!1);var i=o.draggableId,a=r[i].page.borderBox.center,s=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,o=e.displacedBy,i=Boolean(t.visible[r]||t.invisible[r]);return Se(r,n)?i?M:U(o.point):i?o.point:M}({displaced:n.displaced,afterCritical:t,combineWith:i,displacedBy:n.displacedBy});return P(a,s)},Te=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},xe=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},ke=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return B(t.line,n.marginBox[t.end]+Te(t,r),xe(t,n.marginBox,r))},Fe=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return B(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),xe(t,n.marginBox,r))},Oe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,o=e.droppable,i=e.afterCritical,a=re(o.descriptor.id,r),s=n.page,c=o.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return B(t.line,n.contentBox[t.start]+Te(t,r),xe(t,n.contentBox,r))}({axis:c,moveInto:o.page,isMoving:s});var l=t.displaced,u=t.displacedBy,h=l.all[0];if(h){var p=r[h];if(Se(h,i))return Fe({axis:c,moveRelativeTo:p.page,isMoving:s});var m=d.offset(p.page,u.point);return Fe({axis:c,moveRelativeTo:m,isMoving:s})}var g=a[a.length-1];if(g.descriptor.id===n.descriptor.id)return s.borderBox.center;if(Se(g.descriptor.id,i)){var f=d.offset(g.page,U(i.displacedBy.point));return ke({axis:c,moveRelativeTo:f,isMoving:s})}return ke({axis:c,moveRelativeTo:g.page,isMoving:s})},Re=function(e,t){var n=e.frame;return n?P(t,n.scroll.diff.displacement):t},De=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.afterCritical,a=n.page.borderBox.center,s=t.at;return r&&s?"REORDER"===s.type?Oe({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:i}):Ce({impact:t,draggables:o,afterCritical:i}):a}(e),n=e.droppable;return n?Re(n,t):t},Ie=function(e,t){var n=L(t,e.scroll.initial),r=U(n);return{frame:d.getRect({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function Ae(e,t){return e.map((function(e){return t[e]}))}var Ne=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=function(e,t){return P(e.scroll.diff.displacement,t)}(e.viewport,t),o=L(r,n.page.borderBox.center);return P(n.client.borderBox.center,o)},Me=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,i=e.withDroppableDisplacement,a=e.onlyOnMainAxis,c=void 0!==a&&a,l=L(r,t.page.borderBox.center),u={target:H(t.page.borderBox,l),destination:n,withDroppableDisplacement:i,viewport:o};return c?function(e){return fe(s({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=de(e.top,e.bottom),r=de(e.left,e.right);return function(e){return t===me?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(u):be(u)},Pe=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.draggables,i=e.previousImpact,a=e.viewport,c=e.previousPageBorderBoxCenter,l=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var d=re(r.descriptor.id,o),h=se(n,r),p=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.previousImpact;if(!r.isCombineEnabled)return null;if(!oe(i))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return s({},i,{at:t})}var c=i.displaced.all,l=c.length?c[0]:null;if(t)return l?a(l):null;var u=ae(n,o);if(!l)return u.length?a(u[u.length-1].descriptor.id):null;var d=Q(u,(function(e){return e.descriptor.id===l}));-1===d&&T(!1,"Could not find displaced item in set");var h=d-1;return h<0?null:a(u[h].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:d,previousImpact:i})||we({isMovingForward:t,isInHomeList:h,draggable:n,draggables:o,destination:r,insideDestination:d,previousImpact:i,viewport:a,afterCritical:u});if(!p)return null;var m=De({impact:p,draggable:n,droppable:r,draggables:o,afterCritical:u});if(Me({draggable:n,destination:r,newPageBorderBoxCenter:m,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Ne({pageBorderBoxCenter:m,draggable:n,viewport:a}),impact:p,scrollJumpRequest:null};var g=L(m,c);return{clientSelection:l,impact:function(e){var t=e.impact,n=e.viewport,r=e.destination,o=e.draggables,i=e.maxScrollChange,a=Ie(n,P(n.scroll.current,i)),c=r.frame?Y(r,P(r.frame.scroll.current,i)):r,l=t.displaced,u=ve({afterDragging:Ae(l.all,o),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:l,forceShouldAnimate:!1}),d=ve({afterDragging:Ae(l.all,o),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),h={},p={},m=[l,u,d];return l.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,m);t?p[e]=t:h[e]=!0})),s({},t,{displaced:{all:l.all,invisible:h,visible:p}})}({impact:p,viewport:a,destination:r,draggables:o,maxScrollChange:g}),scrollJumpRequest:g}},Le=function(e){var t=e.subject.active;return t||T(!1,"Cannot get clipped area from droppable"),t},je=function(e,t){var n=e.page.borderBox.center;return Se(e.descriptor.id,t)?L(n,t.displacedBy.point):n},Ue=function(e,t){var n=e.page.borderBox;return Se(e.descriptor.id,t)?H(n,U(t.displacedBy.point)):n},Be=h((function(e,t){var n=t[e.line];return{value:n,point:B(e.line,n)}})),Ge=function(e,t){return s({},e,{scroll:s({},e.scroll,{max:t})})},Ve=function(e,t,n){var r=e.frame;se(t,e)&&T(!1,"Should not add placeholder space to home list"),e.subject.withPlaceholder&&T(!1,"Cannot add placeholder size to a subject when it already has one");var o=Be(e.axis,t.displaceBy).point,i=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return B(r.line,t[r.line]);var o=e.subject.page.contentBox[r.size],i=re(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[r.size]}),0)+t[r.line]-o;return i<=0?null:B(r.line,i)}(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){var c=K({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return s({},e,{subject:c})}var l=i?P(r.scroll.max,i):r.scroll.max,u=Ge(r,l),d=K({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:u});return s({},e,{subject:d,frame:u})},qe=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,o=e.isOver,i=e.draggables,a=e.droppables,s=e.viewport,c=e.afterCritical,l=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,o=e.droppables,i=e.viewport,a=r.subject.active;if(!a)return null;var s=r.axis,c=de(a[s.start],a[s.end]),l=te(o).filter((function(e){return e!==r})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return he(i.frame)(Le(e))})).filter((function(e){var n=Le(e);return t?a[s.crossAxisEnd]<n[s.crossAxisEnd]:n[s.crossAxisStart]<a[s.crossAxisStart]})).filter((function(e){var t=Le(e),n=de(t[s.start],t[s.end]);return c(t[s.start])||c(t[s.end])||n(a[s.start])||n(a[s.end])})).sort((function(e,n){var r=Le(e)[s.crossAxisStart],o=Le(n)[s.crossAxisStart];return t?r-o:o-r})).filter((function(e,t,n){return Le(e)[s.crossAxisStart]===Le(n[0])[s.crossAxisStart]}));if(!l.length)return null;if(1===l.length)return l[0];var u=l.filter((function(e){return de(Le(e)[s.start],Le(e)[s.end])(n[s.line])}));return 1===u.length?u[0]:u.length>1?u.sort((function(e,t){return Le(e)[s.start]-Le(t)[s.start]}))[0]:l.sort((function(e,t){var r=V(n,z(Le(e))),o=V(n,z(Le(t)));return r!==o?r-o:Le(e)[s.start]-Le(t)[s.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:a,viewport:s});if(!l)return null;var u=re(l.descriptor.id,i),d=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,o=e.draggable,i=e.draggables,a=e.destination,s=e.viewport,c=e.afterCritical;if(!n){if(r.length)return null;var l={displaced:le,displacedBy:ce,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},u=De({impact:l,draggable:o,droppable:a,draggables:i,afterCritical:c}),d=se(o,a)?a:Ve(a,o,i);return Me({draggable:o,destination:d,newPageBorderBoxCenter:u,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?l:null}var h,p=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),m=(h=n.descriptor.index,n.descriptor.id===o.descriptor.id||p?h:h+1),g=Be(a.axis,o.displaceBy);return Ee({draggable:o,insideDestination:r,destination:a,viewport:s,displacedBy:g,last:le,index:m})}({previousPageBorderBoxCenter:n,destination:l,draggable:r,draggables:i,moveRelativeTo:function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,o=e.insideDestination,i=e.afterCritical;return o.filter((function(e){return be({target:Ue(e,i),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var o=G(t,Re(r,je(e,i))),a=G(t,Re(r,je(n,i)));return o<a?-1:a<o?1:e.descriptor.index-n.descriptor.index}))[0]||null}({pageBorderBoxCenter:n,viewport:s,destination:l,insideDestination:u,afterCritical:c}),insideDestination:u,viewport:s,afterCritical:c});if(!d)return null;var h=De({impact:d,draggable:r,droppable:l,draggables:i,afterCritical:c});return{clientSelection:Ne({pageBorderBoxCenter:h,draggable:r,viewport:s}),impact:d,scrollJumpRequest:null}},He=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},ze=function(e){var t=e.state,n=e.type,r=function(e,t){var n=He(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),o=Boolean(r),i=t.dimensions.droppables[t.critical.droppable.id],a=r||i,s=a.axis.direction,c="vertical"===s&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===s&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(c&&!o)return null;var l="MOVE_DOWN"===n||"MOVE_RIGHT"===n,u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,h=t.dimensions,p=h.draggables,m=h.droppables;return c?Pe({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:u,destination:a,draggables:p,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):qe({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:u,isOver:a,draggables:p,droppables:m,viewport:t.viewport,afterCritical:t.afterCritical})};function We(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Ke(e){var t=de(e.top,e.bottom),n=de(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function Ye(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,o=te(r).filter((function(e){if(!e.isEnabled)return!1;var n,r,o=e.subject.active;if(!o)return!1;if(r=o,!((n=t).left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top))return!1;if(Ke(o)(t.center))return!0;var i=e.axis,a=o.center[i.crossAxisLine],s=t[i.crossAxisStart],c=t[i.crossAxisEnd],l=de(o[i.crossAxisStart],o[i.crossAxisEnd]),u=l(s),d=l(c);return!u&&!d||(u?s<a:c>a)}));return o.length?1===o.length?o[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,o=n.page.borderBox.center,i=r.map((function(e){var n=e.axis,r=B(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:G(o,r)}})).sort((function(e,t){return t.distance-e.distance}));return i[0]?i[0].id:null}({pageBorderBox:t,draggable:n,candidates:o}):null}var $e=function(e,t){return d.getRect(H(e,t))};function Qe(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var Je=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,o=e.droppables,i=e.previousImpact,a=e.viewport,s=e.afterCritical,c=$e(n.page.borderBox,t),l=Ye({pageBorderBox:c,draggable:n,droppables:o});if(!l)return ue;var u=o[l],d=re(u.descriptor.id,r),h=function(e,t){var n=e.frame;return n?$e(t,n.scroll.diff.value):t}(u,c);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,o=e.destination,i=e.insideDestination,a=e.afterCritical;if(!o.isCombineEnabled)return null;var s=o.axis,c=Be(o.axis,t.displaceBy),l=c.value,u=n[s.start],d=n[s.end],h=J(ae(t,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox,o=n[s.size]/4,i=Se(t,a),c=Qe({displaced:r.displaced,id:t});return i?c?d>n[s.start]+o&&d<n[s.end]-o:u>n[s.start]-l+o&&u<n[s.end]-l-o:c?d>n[s.start]+l+o&&d<n[s.end]+l-o:u>n[s.start]+o&&u<n[s.end]-o}));return h?{displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:h.descriptor.id,droppableId:o.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:i,destination:u,insideDestination:d,afterCritical:s})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.last,a=e.viewport,s=e.afterCritical,c=r.axis,l=Be(r.axis,n.displaceBy),u=l.value,d=t[c.start],h=t[c.end],p=function(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:J(ae(n,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[c.line],r=Se(t,s),o=Qe({displaced:i,id:t});return r?o?h<=n:d<n-u:o?h<=n+u:d<n})),inHomeList:se(n,r)});return Ee({draggable:n,insideDestination:o,destination:r,viewport:a,last:i,displacedBy:l,index:p})}({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:u,insideDestination:d,last:i.displaced,viewport:a,afterCritical:s})},Xe=function(e,t){var n;return s({},e,((n={})[t.descriptor.id]=t,n))},Ze=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,o=He(t),i=He(n);if(!o)return r;if(o===i)return r;var a=r[o];if(!a.subject.withPlaceholder)return r;var c=function(e){var t=e.subject.withPlaceholder;t||T(!1,"Cannot remove placeholder form subject when there was none");var n=e.frame;if(!n){var r=K({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return s({},e,{subject:r})}var o=t.oldFrameMaxScroll;o||T(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder");var i=Ge(n,o),a=K({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return s({},e,{subject:a,frame:i})}(a);return Xe(r,c)},et=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,o=e.viewport,i=e.impact,a=e.scrollJumpRequest,c=o||t.viewport,l=r||t.dimensions,u=n||t.current.client.selection,d=L(u,t.initial.client.selection),h={offset:d,selection:u,borderBoxCenter:P(t.initial.client.borderBoxCenter,d)},p={selection:P(h.selection,c.scroll.current),borderBoxCenter:P(h.borderBoxCenter,c.scroll.current),offset:P(h.offset,c.scroll.diff.value)},m={client:h,page:p};if("COLLECTING"===t.phase)return s({phase:"COLLECTING"},t,{dimensions:l,viewport:c,current:m});var g=l.draggables[t.critical.draggable.id],f=i||Je({pageOffset:p.offset,draggable:g,draggables:l.draggables,droppables:l.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),_=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,o=e.previousImpact,i=e.impact,a=Ze({previousImpact:o,impact:i,droppables:r}),s=He(i);if(!s)return a;var c=r[s];if(se(t,c))return a;if(c.subject.withPlaceholder)return a;var l=Ve(c,t,n);return Xe(a,l)}({draggable:g,impact:f,previousImpact:t.impact,draggables:l.draggables,droppables:l.droppables});return s({},t,{current:m,dimensions:{draggables:l.draggables,droppables:_},impact:f,viewport:c,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})};var tt=function(e){var t=e.impact,n=e.viewport,r=e.draggables,o=e.destination,i=e.forceShouldAnimate,a=t.displaced,c=ve({afterDragging:function(e,t){return e.map((function(e){return t[e]}))}(a.all,r),destination:o,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:i,last:a});return s({},t,{displaced:c})},nt=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.viewport,a=e.afterCritical,s=De({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:a});return Ne({pageBorderBoxCenter:s,draggable:n,viewport:i})},rt=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&T(!1);var o=t.impact,i=r||t.viewport,a=n||t.dimensions,s=a.draggables,c=a.droppables,l=s[t.critical.draggable.id],u=He(o);u||T(!1,"Must be over a destination in SNAP movement mode");var d=c[u],h=tt({impact:o,viewport:i,destination:d,draggables:s}),p=nt({impact:h,draggable:l,droppable:d,draggables:s,viewport:i,afterCritical:t.afterCritical});return et({impact:h,clientSelection:p,state:t,dimensions:a,viewport:i})},ot=function(e){var t=e.draggable,n=e.home,r=e.draggables,o=e.viewport,i=Be(n.axis,t.displaceBy),a=re(n.descriptor.id,r),s=a.indexOf(t);-1===s&&T(!1,"Expected draggable to be inside home list");var c,l=a.slice(s+1),u=l.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),d={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:i,effected:u};return{impact:{displaced:ve({afterDragging:l,destination:n,displacedBy:i,last:null,viewport:o.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:(c=t.descriptor,{index:c.index,droppableId:c.droppableId})}},afterCritical:d}},it=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,o=r.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,i=function(e){var t=e.frame;return t||T(!1,"Expected Droppable to have a frame"),t}(n[t]).scroll.diff.value;return function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,o=d.offset(t.client,n),i=d.withScroll(o,r);return s({},t,{placeholder:s({},t.placeholder,{client:o}),client:o,page:i})}({draggable:e,offset:P(o,i),initialWindowScroll:r.scroll.initial})}))},at=function(e){return"SNAP"===e.movementMode},st=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:Xe(e.droppables,t)}}(e.dimensions,t);return!at(e)||n?et({state:e,dimensions:r}):rt({state:e,dimensions:r})};function ct(e){return e.isDragging&&"SNAP"===e.movementMode?s({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var lt={phase:"IDLE",completed:null,shouldFlush:!1},ut=function(e,t){if(void 0===e&&(e=lt),"FLUSH"===t.type)return s({},lt,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&T(!1,"INITIAL_PUBLISH must come after a IDLE phase");var n=t.payload,r=n.critical,o=n.clientSelection,i=n.viewport,a=n.dimensions,c=n.movementMode,l=a.draggables[r.draggable.id],u=a.droppables[r.droppable.id],d={selection:o,borderBoxCenter:l.client.borderBox.center,offset:M},h={client:d,page:{selection:P(d.selection,i.scroll.initial),borderBoxCenter:P(d.selection,i.scroll.initial),offset:P(d.selection,i.scroll.diff.value)}},p=te(a.droppables).every((function(e){return!e.isFixedOnPage})),m=ot({draggable:l,home:u,draggables:a.draggables,viewport:i}),g=m.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:a,initial:h,current:h,isWindowScrollAllowed:p,impact:g,afterCritical:m.afterCritical,onLiftImpact:g,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&T(!1,"Collection cannot start from phase "+e.phase),s({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&T(!1,"Unexpected "+t.type+" received in phase "+e.phase),function(e){var t=e.state,n=e.published,r=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return Y(n,e.scroll)})),o=s({},t.dimensions.droppables,{},Z(r)),i=ee(it({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),a=s({},t.dimensions.draggables,{},i);n.removals.forEach((function(e){delete a[e]}));var c={droppables:o,draggables:a},l=He(t.impact),u=l?c.droppables[l]:null,d=c.draggables[t.critical.draggable.id],h=c.droppables[t.critical.droppable.id],p=ot({draggable:d,home:h,draggables:a,viewport:t.viewport}),m=p.impact,g=p.afterCritical,f=u&&u.isCombineEnabled?t.impact:m,_=Je({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:f,viewport:t.viewport,afterCritical:g}),b=s({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:_,onLiftImpact:m,dimensions:c,afterCritical:g,forceShouldAnimate:!1});return"COLLECTING"===t.phase?b:s({phase:"DROP_PENDING"},b,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;We(e)||T(!1,t.type+" not permitted in phase "+e.phase);var f=t.payload.client;return j(f,e.current.client.selection)?e:et({state:e,clientSelection:f,impact:at(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return ct(e);if("COLLECTING"===e.phase)return ct(e);We(e)||T(!1,t.type+" not permitted in phase "+e.phase);var _=t.payload,b=_.id,v=_.newScroll,y=e.dimensions.droppables[b];if(!y)return e;var E=Y(y,v);return st(e,E,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;We(e)||T(!1,"Attempting to move in an unsupported phase "+e.phase);var S=t.payload,w=S.id,C=S.isEnabled,x=e.dimensions.droppables[w];x||T(!1,"Cannot find Droppable[id: "+w+"] to toggle its enabled state"),x.isEnabled===C&&T(!1,"Trying to set droppable isEnabled to "+String(C)+"\n but it is already "+String(x.isEnabled));var k=s({},x,{isEnabled:C});return st(e,k,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;We(e)||T(!1,"Attempting to move in an unsupported phase "+e.phase);var F=t.payload,O=F.id,R=F.isCombineEnabled,D=e.dimensions.droppables[O];D||T(!1,"Cannot find Droppable[id: "+O+"] to toggle its isCombineEnabled state"),D.isCombineEnabled===R&&T(!1,"Trying to set droppable isCombineEnabled to "+String(R)+"\n but it is already "+String(D.isCombineEnabled));var I=s({},D,{isCombineEnabled:R});return st(e,I,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;We(e)||T(!1,"Cannot move by window in phase "+e.phase),e.isWindowScrollAllowed||T(!1,"Window scrolling is currently not supported for fixed lists");var A=t.payload.newScroll;if(j(e.viewport.scroll.current,A))return ct(e);var N=Ie(e.viewport,A);return at(e)?rt({state:e,viewport:N}):et({state:e,viewport:N})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!We(e))return e;var L=t.payload.maxScroll;if(j(L,e.viewport.scroll.max))return e;var U=s({},e.viewport,{scroll:s({},e.viewport.scroll,{max:L})});return s({phase:"DRAGGING"},e,{viewport:U})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&T(!1,t.type+" received while not in DRAGGING phase");var B=ze({state:e,type:t.type});return B?et({state:e,impact:B.impact,clientSelection:B.clientSelection,scrollJumpRequest:B.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var G=t.payload.reason;return"COLLECTING"!==e.phase&&T(!1,"Can only move into the DROP_PENDING phase from the COLLECTING phase"),s({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:G})}if("DROP_ANIMATE"===t.type){var V=t.payload,q=V.completed,H=V.dropDuration,z=V.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&T(!1,"Cannot animate drop from phase "+e.phase),{phase:"DROP_ANIMATING",completed:q,dropDuration:H,newHomeClientOffset:z,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},dt=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},ht=function(){return{type:"COLLECTION_STARTING",payload:null}},pt=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},mt=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},gt=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},ft=function(e){return{type:"MOVE",payload:e}},_t=function(){return{type:"MOVE_UP",payload:null}},bt=function(){return{type:"MOVE_DOWN",payload:null}},vt=function(){return{type:"MOVE_RIGHT",payload:null}},yt=function(){return{type:"MOVE_LEFT",payload:null}},Et=function(e){return{type:"DROP_COMPLETE",payload:e}},St=function(e){return{type:"DROP",payload:e}},wt=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function Ct(e,t){!function(e){if(!(e.length<=1)){for(var t=e.map((function(e){return e.descriptor.index})),n={},r=1;r<t.length;r++){var o=t[r];o!==t[r-1]+1&&(n[o]=!0)}if(Object.keys(n).length){var i=t.map((function(e){return Boolean(n[e])?"[🔥"+e+"]":""+e})).join(", ");y("\n Detected non-consecutive <Draggable /> indexes.\n\n (This can cause unexpected bugs)\n\n "+i+"\n ")}}}(re(e.droppable.id,t.draggables))}var Tt="cubic-bezier(.2,1,.1,1)",xt={drop:0,combining:.7},kt={drop:.75},Ft=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",Ot={fluid:"opacity "+Ft,snap:"transform "+Ft+", opacity "+Ft,drop:function(e){var t=e+"s "+Tt;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+Ft,placeholder:"height "+Ft+", width "+Ft+", margin "+Ft},Rt=function(e){return j(e,M)?null:"translate("+e.x+"px, "+e.y+"px)"},Dt=Rt,It=function(e,t){var n=Rt(e);return n?t?n+" scale("+kt.drop+")":n:null},At=.33,Nt=.55,Mt=Nt-At,Pt=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var o=t(),i=r.payload.reason;if("COLLECTING"!==o.phase){if("IDLE"!==o.phase){"DROP_PENDING"===o.phase&&o.isWaiting&&T(!1,"A DROP action occurred while DROP_PENDING and still waiting"),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&T(!1,"Cannot drop in phase: "+o.phase);var a=o.critical,c=o.dimensions,l=c.draggables[o.critical.draggable.id],u=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,o=e.home,i=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:s({},r,{displaced:le}),didDropInsideDroppable:!0}:{impact:tt({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),d=u.impact,h=u.didDropInsideDroppable,p=h?oe(d):null,m=h?ie(d):null,g={index:a.draggable.index,droppableId:a.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:p,combine:m},_=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,o=e.viewport,i=e.afterCritical,a=r.draggables,s=r.droppables,c=He(t),l=c?s[c]:null,u=s[n.descriptor.droppableId],d=nt({impact:t,draggable:n,draggables:a,afterCritical:i,droppable:l||u,viewport:o});return L(d,n.client.borderBox.center)}({impact:d,draggable:l,dimensions:c,viewport:o.viewport,afterCritical:o.afterCritical}),b={critical:o.critical,afterCritical:o.afterCritical,result:f,impact:d};if(!j(o.current.client.offset,_)||Boolean(f.combine)){var v=function(e){var t=e.current,n=e.destination,r=e.reason,o=G(t,n);if(o<=0)return At;if(o>=1500)return Nt;var i=At+Mt*(o/1500);return Number(("CANCEL"===r?.6*i:i).toFixed(2))}({current:o.current.client.offset,destination:_,reason:i});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:_,dropDuration:v,completed:b}))}else n(Et({completed:b}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:i}))}else e(r)}}},Lt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function jt(e){var t=e.onWindowScroll;var n=p((function(){t(Lt())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),o=S;function i(){return o!==S}return{start:function(){i()&&T(!1,"Cannot start scroll listener when already active"),o=w(window,[r])},stop:function(){i()||T(!1,"Cannot stop scroll listener when not active"),n.cancel(),o(),o=S},isActive:i}}var Ut=function(e){var t=jt({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},Bt=function(){var e=[];return{add:function(t){var n=setTimeout((function(){return function(t){var n=Q(e,(function(e){return e.timerId===t}));-1===n&&T(!1,"Could not find timer"),e.splice(n,1)[0].callback()}(n)})),r={timerId:n,callback:t};e.push(r)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},Gt=function(e,t){t()},Vt=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},qt=function(e,t,n,r){if(e){var o=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),o=function(o){t?y("Announcement already made. Not making a second announcement"):n?y("\n Announcements cannot be made asynchronously.\n Default message has already been announced.\n "):(t=!0,e(o),clearTimeout(r))};return o.wasCalled=function(){return t},o}(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}else n(r(t))},Ht=function(e,t){var n=function(e,t){var n=Bt(),r=null,o=function(n){r||T(!1,"Cannot fire onDragEnd when there is no matching onDragStart"),r=null,Gt(0,(function(){return qt(e().onDragEnd,n,t,N)}))};return{beforeCapture:function(t,n){r&&T(!1,"Cannot fire onBeforeCapture as a drag start has already been published"),Gt(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){r&&T(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"),Gt(0,(function(){var r=e().onBeforeDragStart;r&&r(Vt(t,n))}))},start:function(o,i){r&&T(!1,"Cannot fire onBeforeDragStart as a drag start has already been published");var a=Vt(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add((function(){Gt(0,(function(){return qt(e().onDragStart,a,t,I)}))}))},update:function(o,i){var a=oe(i),c=ie(i);r||T(!1,"Cannot fire onDragMove when onDragStart has not been called");var l=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(o,r.lastCritical);l&&(r.lastCritical=o);var u,d,h=(u=r.lastLocation,d=a,!(null==u&&null==d||null!=u&&null!=d&&u.droppableId===d.droppableId&&u.index===d.index));h&&(r.lastLocation=a);var p=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&(e.draggableId===t.draggableId&&e.droppableId===t.droppableId)}(r.lastCombine,c);if(p&&(r.lastCombine=c),l||h||p){var m=s({},Vt(o,r.mode),{combine:c,destination:a});n.add((function(){Gt(0,(function(){return qt(e().onDragUpdate,m,t,A)}))}))}},flush:function(){r||T(!1,"Can only flush responders while dragging"),n.flush()},drop:o,abort:function(){if(r){var e=s({},Vt(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});o(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var o=r.payload.critical;return n.beforeStart(o,r.payload.movementMode),t(r),void n.start(o,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var i=r.payload.completed.result;return n.flush(),t(r),void n.drop(i)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},zt=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&T(!1,"Cannot finish a drop animating when no drop is occurring"),e.dispatch(Et({completed:r.completed}))}else t(n)}}},Wt=function(e){var t=null,n=null;return function(r){return function(o){if("FLUSH"!==o.type&&"DROP_COMPLETE"!==o.type&&"DROP_ANIMATION_FINISHED"!==o.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),"DROP_ANIMATE"===o.type){var i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=w(window,[i])}))}}}},Kt=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(St({reason:r.reason})))}}}},Yt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"react-beautiful-dnd"}):c.compose,$t=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,o=e.styleMarshal,i=e.getResponders,a=e.announce,s=e.autoScroller;return c.createStore(ut,Yt(c.applyMiddleware((t=o,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(o){if("LIFT"===o.type){var i=o.payload,a=i.id,s=i.clientSelection,c=i.movementMode,l=n();"DROP_ANIMATING"===l.phase&&r(Et({completed:l.completed})),"IDLE"!==n().phase&&T(!1,"Unexpected phase to start a drag"),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:c}});var u={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===c}},d=e.startPublishing(u),h=d.critical,p=d.dimensions,m=d.viewport;Ct(h,p),r(function(e){return{type:"INITIAL_PUBLISH",payload:e}}({critical:h,dimensions:p,clientSelection:s,movementMode:c,viewport:m}))}else t(o)}}}}(n),Pt,zt,Wt,Kt,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var o=t.getState();return"DRAGGING"!==o.phase&&T(!1,"Expected phase to be DRAGGING after INITIAL_PUBLISH"),void e.start(o)}n(r),e.scroll(t.getState())}}}}(s),Ut,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),Ht(i,a))))};var Qt=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,o=e.width,i=L({x:n,y:t},{x:o,y:r});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},Jt=function(){var e=document.documentElement;return e||T(!1,"Cannot find document.documentElement"),e},Xt=function(){var e=Jt();return Qt({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Zt=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,o=function(){var e=Lt(),t=Xt(),n=e.y,r=e.x,o=Jt(),i=r+o.clientWidth,a=n+o.clientHeight;return{frame:d.getRect({top:n,left:r,right:i,bottom:a}),scroll:{initial:e,current:e,max:t,diff:{value:M,displacement:M}}}}(),i=o.scroll.current,a=t.droppable,s=r.droppable.getAllByType(a.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(i,n)})),c=r.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(i)}));return{dimensions:{draggables:ee(c),droppables:Z(s)},critical:t,viewport:o}};function en(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&("virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode||(y("\n You are attempting to add or remove a Draggable [id: "+n.descriptor.id+"]\n while a drag is occurring. This is only supported for virtual lists.\n\n See https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/patterns/virtual-lists.md\n "),!1)))}var tn,nn,rn=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},o=null,i=function(){o||(n.collectionStarting(),o=requestAnimationFrame((function(){o=null;var e=r,i=e.additions,a=e.removals,s=e.modified,c=Object.keys(i).map((function(e){return t.draggable.getById(e).getDimension(M)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),l=Object.keys(s).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),u={additions:c,removals:Object.keys(a),modified:l};r={additions:{},removals:{},modified:{}},n.publish(u)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],i()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],i()},stop:function(){o&&(cancelAnimationFrame(o),o=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(t){n||T(!1,"Should only be subscribed when a collection is occurring");var o=n.critical.draggable;"ADDITION"===t.type&&en(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&en(e,o,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:function(r,o){e.droppable.exists(r)||T(!1,"Cannot update is enabled flag of Droppable "+r+" as it is not registered"),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:function(r,o){n&&(e.droppable.exists(r)||T(!1,"Cannot update isCombineEnabled flag of Droppable "+r+" as it is not registered"),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,o){n&&(e.droppable.exists(r)||T(!1,"Cannot update the scroll on Droppable "+r+" as it is not registered"),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:function(t){n&&T(!1,"Cannot start capturing critical dimensions as there is already a collection");var r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},s=e.subscribe(o);return n={critical:a,unsubscribe:s},Zt({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}}},on=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},an=function(e){window.scrollBy(e.x,e.y)},sn=h((function(e){return te(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),cn=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var o=r[n];return o.frame?o:null}return function(e,t){return J(sn(t),(function(t){return t.frame||T(!1,"Invalid result"),Ke(t.frame.pageMarginBox)(e)}))}(t,r)},ln=.25,un=.05,dn=28,hn=function(e){return Math.pow(e,2)},pn={stopDampeningAt:1200,accelerateAt:360},mn=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,o=n-t;return 0===o?(y("\n Detected distance range of 0 in the fluid auto scroller\n This is unexpected and would cause a divide by 0 issue.\n Not allowing an auto scroll\n "),0):(r-t)/o},gn=pn.accelerateAt,fn=pn.stopDampeningAt,_n=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,o=e.shouldUseTimeDampening,i=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return dn;if(e===t.startScrollingFrom)return 1;var n=mn({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=dn*hn(1-n);return Math.ceil(r)}(t,n);return 0===i?0:o?Math.max(function(e,t){var n=t,r=fn,o=Date.now()-n;if(o>=fn)return e;if(o<gn)return 1;var i=mn({startOfRange:gn,endOfRange:r,current:o}),a=e*hn(i);return Math.ceil(a)}(i,r),1):i},bn=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:e[t.size]*ln,maxScrollValueAt:e[t.size]*un}}(t,o);return n[o.end]<n[o.start]?_n({distanceToEdge:n[o.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i}):-1*_n({distanceToEdge:n[o.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i})},vn=q((function(e){return 0===e?0:e})),yn=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},s=bn({container:n,distanceToEdges:a,dragStartTime:t,axis:me,shouldUseTimeDampening:i}),c=bn({container:n,distanceToEdges:a,dragStartTime:t,axis:ge,shouldUseTimeDampening:i}),l=vn({x:c,y:s});if(j(l,M))return null;var u=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,o=n.height>t.height,i=n.width>t.width;return i||o?i&&o?null:{x:i?0:r.x,y:o?0:r.y}:r}({container:n,subject:r,proposedScroll:l});return u?j(u,M)?null:u:null},En=q((function(e){return 0===e?0:e>0?1:-1})),Sn=(tn=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,o=P(t,r),i={x:tn(o.x,n.x),y:tn(o.y,n.y)};return j(i,M)?null:i}),wn=function(e){var t=e.max,n=e.current,r=e.change,o={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},i=En(r),a=Sn({max:o,current:n,change:i});return!a||(0!==i.x&&0===a.x||0!==i.y&&0===a.y)},Cn=function(e,t){return wn({current:e.scroll.current,max:e.scroll.max,change:t})},Tn=function(e,t){var n=e.frame;return!!n&&wn({current:n.scroll.current,max:n.scroll.max,change:t})},xn=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var c=function(e){var t=e.viewport,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=yn({dragStartTime:o,container:t.frame,subject:n,center:r,shouldUseTimeDampening:i});return a&&Cn(t,a)?a:null}({dragStartTime:n,viewport:t.viewport,subject:s,center:a,shouldUseTimeDampening:r});if(c)return void o(c)}var l=cn({center:a,destination:He(t.impact),droppables:t.dimensions.droppables});if(l){var u=function(e){var t=e.droppable,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var s=yn({dragStartTime:o,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:i});return s&&Tn(t,s)?s:null}({dragStartTime:n,droppable:l,subject:s,center:a,shouldUseTimeDampening:r});u&&i(l.descriptor.id,u)}},kn=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,o=function(e,t){if(!Tn(e,t))return t;var r=function(e,t){var n=e.frame;return n&&Tn(e,t)?Sn({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var o=L(t,r);return n(e.descriptor.id,o),L(t,o)},i=function(e,t,n){if(!e)return n;if(!Cn(t,n))return n;var o=function(e,t){if(!Cn(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return Sn({current:r,max:n,change:t})}(t,n);if(!o)return r(n),null;var i=L(n,o);return r(i),L(n,i)};return function(e){var n=e.scrollJumpRequest;if(n){var r=He(e.impact);r||T(!1,"Cannot perform a jump scroll when there is no destination");var a=o(e.dimensions.droppables[r],n);if(a){var s=e.viewport,c=i(e.isWindowScrollAllowed,s,a);c&&function(e,n){var r=P(e.current.client.selection,n);t({client:r})}(e,c)}}}},Fn=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,o=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=p(t),o=p(n),i=null,a=function(e){i||T(!1,"Cannot fluid scroll if not dragging");var t=i,n=t.shouldUseTimeDampening,a=t.dragStartTime;xn({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:n})};return{start:function(e){i&&T(!1,"Cannot start auto scrolling when already started");var t=Date.now(),n=!1,r=function(){n=!0};xn({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),i={dragStartTime:t,shouldUseTimeDampening:n},n&&a(e)},stop:function(){i&&(r.cancel(),o.cancel(),i=null)},scroll:a}}({scrollWindow:n,scrollDroppable:t}),i=kn({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}},On={base:nn="data-rbd-drag-handle",draggableId:nn+"-draggable-id",contextId:nn+"-context-id"},Rn=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Dn=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),In={contextId:"data-rbd-scroll-container-context-id"},An=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},Nn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?o.useLayoutEffect:o.useEffect,Mn=function(){var e=document.querySelector("head");return e||T(!1,"Cannot find the head to append a style to"),e},Pn=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Ln(e,t){var n=u.useMemo((function(){return function(e){var t,n,r,o=(t=e,function(e){return"["+e+'="'+t+'"]'}),i=(n="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:o(On.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),a=[(r="\n transition: "+Ot.outOfTheWay+";\n ",{selector:o(Rn.contextId),styles:{dragging:r,dropAnimating:r,userCancel:r}}),i,{selector:o(Dn.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:An(a,"always"),resting:An(a,"resting"),dragging:An(a,"dragging"),dropAnimating:An(a,"dropAnimating"),userCancel:An(a,"userCancel")}}(e)}),[e]),r=o.useRef(null),i=o.useRef(null),a=u.useCallback(h((function(e){var t=i.current;t||T(!1,"Cannot set dynamic style element if it is not set"),t.textContent=e})),[]),s=u.useCallback((function(e){var t=r.current;t||T(!1,"Cannot set dynamic style element if it is not set"),t.textContent=e}),[]);Nn((function(){(r.current||i.current)&&T(!1,"style elements already mounted");var o=Pn(t),c=Pn(t);return r.current=o,i.current=c,o.setAttribute("data-rbd-always",e),c.setAttribute("data-rbd-dynamic",e),Mn().appendChild(o),Mn().appendChild(c),s(n.always),a(n.resting),function(){var e=function(e){var t=e.current;t||T(!1,"Cannot unmount ref as it is not set"),Mn().removeChild(t),e.current=null};e(r),e(i)}}),[t,s,a,n.always,n.resting,e]);var c=u.useCallback((function(){return a(n.dragging)}),[a,n.dragging]),l=u.useCallback((function(e){a("DROP"!==e?n.userCancel:n.dropAnimating)}),[a,n.dropAnimating,n.userCancel]),d=u.useCallback((function(){i.current&&a(n.resting)}),[a,n.resting]);return u.useMemo((function(){return{dragging:c,dropping:l,resting:d}}),[c,l,d])}var jn=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Un(e){return e instanceof jn(e).HTMLElement}function Bn(e,t){var n="["+On.contextId+'="'+e+'"]',r=X(document.querySelectorAll(n));if(!r.length)return y('Unable to find any drag handles in the context "'+e+'"'),null;var o=J(r,(function(e){return e.getAttribute(On.draggableId)===t}));return o?Un(o)?o:(y("drag handle needs to be a HTMLElement"),null):(y('Unable to find drag handle with id "'+t+'" as no handle with a matching id was found'),null)}function Gn(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||T(!1,"Cannot find draggable entry with id ["+e+"]"),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return $(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=o(e);return t||T(!1,"Cannot find droppable entry with id ["+e+"]"),t},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return $(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Vn=i.createContext(null),qn=function(){var e=document.body;return e||T(!1,"Cannot find document.body"),e},Hn={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var zn=0,Wn={separator:"::"};function Kn(e,t){return void 0===t&&(t=Wn),u.useMemo((function(){return""+e+t.separator+zn++}),[t.separator,e])}var Yn=i.createContext(null),$n="^16.8.5 || ^17.0.0",Qn=/(\d+)\.(\d+)\.(\d+)/,Jn=function(e){var t=Qn.exec(e);return null==t&&T(!1,"Unable to parse React version "+e),{major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3]),raw:e}},Xn="\n We expect a html5 doctype: <!doctype html>\n This is to ensure consistent browser layout and measurement\n\n More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md\n";function Zn(e){e()}function er(e,t){Zn((function(){o.useEffect((function(){try{e()}catch(e){E("\n A setup problem was encountered.\n\n > "+e.message+"\n ")}}),t)}))}function tr(){er((function(){var e,t,n,r,o,a;e=$n,t=i.version,n=Jn(e),r=Jn(t),function(e,t){return t.major>e.major||!(t.major<e.major)&&(t.minor>e.minor||!(t.minor<e.minor)&&t.patch>=e.patch)}(n,r)||y("\n React version: ["+r.raw+"]\n does not satisfy expected peer dependency version: ["+n.raw+"]\n\n This can result in run time bugs, and even fatal crashes\n "),o=document,(a=o.doctype)?("html"!==a.name.toLowerCase()&&y("\n Unexpected <!doctype> found: ("+a.name+")\n\n "+Xn+"\n "),""!==a.publicId&&y("\n Unexpected <!doctype> publicId found: ("+a.publicId+")\n A html5 doctype does not have a publicId\n\n "+Xn+"\n ")):y("\n No <!doctype html> found.\n\n "+Xn+"\n ")}),[])}function nr(e){var t=o.useRef(e);return o.useEffect((function(){t.current=e})),t}var rr,or=((rr={})[13]=!0,rr[9]=!0,rr),ir=function(e){or[e.keyCode]&&e.preventDefault()},ar=function(){var e="visibilitychange";return"undefined"==typeof document?e:J([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}();var sr,cr={type:"IDLE"};function lr(e){var t=e.cancel,n=e.completed,r=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,i=e.clientY;if(0===t){var a={x:n,y:i},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&T(!1,"Cannot be IDLE");var c=s.point;if(l=c,u=a,Math.abs(u.x-l.x)>=5||Math.abs(u.y-l.y)>=5){var l,u;e.preventDefault();var d=s.actions.fluidLift(a);o({type:"DRAGGING",actions:d})}}}},{eventName:"mouseup",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void ir(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&T(!1,"Unexpected phase"),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:ar,fn:t}]}function ur(e){var t=o.useRef(cr),n=o.useRef(S),r=u.useMemo((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,s,{sourceEvent:t});if(o){t.preventDefault();var i={x:t.clientX,y:t.clientY};n.current(),d(o,i)}}}}}}),[e]),i=u.useMemo((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),a=u.useCallback((function(){n.current=w(window,[i,r],{passive:!1,capture:!0})}),[i,r]),s=u.useCallback((function(){"IDLE"!==t.current.type&&(t.current=cr,n.current(),a())}),[a]),c=u.useCallback((function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),l=u.useCallback((function(){var e=lr({cancel:c,completed:s,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=w(window,e,{capture:!0,passive:!1})}),[c,s]),d=u.useCallback((function(e,n){"IDLE"!==t.current.type&&T(!1,"Expected to move from IDLE to PENDING drag"),t.current={type:"PENDING",point:n,actions:e},l()}),[l]);Nn((function(){return a(),function(){n.current()}}),[a])}function dr(){}var hr=((sr={})[34]=!0,sr[33]=!0,sr[36]=!0,sr[35]=!0,sr);function pr(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(hr[r.keyCode]?r.preventDefault():ir(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:ar,fn:n}]}function mr(e){var t=o.useRef(dr),n=u.useMemo((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var o=e.findClosestDraggableId(n);if(o){var i=e.tryGetLock(o,c,{sourceEvent:n});if(i){n.preventDefault();var a=!0,s=i.snapLift();t.current(),t.current=w(window,pr(s,c),{capture:!0,passive:!1})}}}function c(){a||T(!1,"Cannot stop capturing a keyboard drag when not capturing"),a=!1,t.current(),r()}}}}),[e]),r=u.useCallback((function(){t.current=w(window,[n],{passive:!1,capture:!0})}),[n]);Nn((function(){return r(),function(){t.current()}}),[r])}var gr={type:"IDLE"};function fr(e){var t=o.useRef(gr),n=o.useRef(S),r=u.useCallback((function(){return t.current}),[]),i=u.useCallback((function(e){t.current=e}),[]),a=u.useMemo((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,c,{sourceEvent:t});if(o){var i=t.touches[0],a={x:i.clientX,y:i.clientY};n.current(),p(o,a)}}}}}}),[e]),s=u.useCallback((function(){n.current=w(window,[a],{capture:!0,passive:!1})}),[a]),c=u.useCallback((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(gr),n.current(),s())}),[s,i]),l=u.useCallback((function(){var e=t.current;c(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[c]),d=u.useCallback((function(){var e={capture:!0,passive:!1},t={cancel:l,completed:c,getPhase:r},o=w(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var o=e.touches[0],i={x:o.clientX,y:o.clientY};e.preventDefault(),n.actions.move(i)}else t()}},{eventName:"touchend",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&T(!1);var o=e.touches[0];if(o&&o.force>=.15){var i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();i&&t()}}},{eventName:ar,fn:t}]}(t),e),i=w(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:ar,fn:t}]}(t),e);n.current=function(){o(),i()}}),[l,r,c]),h=u.useCallback((function(){var e=r();"PENDING"!==e.type&&T(!1,"Cannot start dragging from phase "+e.type);var t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,i]),p=u.useCallback((function(e,t){"IDLE"!==r().type&&T(!1,"Expected to move from IDLE to PENDING drag");var n=setTimeout(h,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),d()}),[d,r,i,h]);Nn((function(){return s(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(gr))}}),[r,s,i]),Nn((function(){return w(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}var _r={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function br(e,t){var n=t.target;return!!Un(n)&&function e(t,n){if(null==n)return!1;if(Boolean(_r[n.tagName.toLowerCase()]))return!0;var r=n.getAttribute("contenteditable");return"true"===r||""===r||n!==t&&e(t,n.parentElement)}(e,n)}var vr=function(e){return d.getRect(e.getBoundingClientRect()).center};var yr="undefined"==typeof document?"matches":J(["matches","msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||"matches";function Er(e,t){return e.closest?e.closest(t):function e(t,n){return null==t?null:t[yr](n)?t:e(t.parentElement,n)}(e,t)}function Sr(e,t){var n,r=t.target;if(!((n=r)instanceof jn(n).Element))return y("event.target must be a Element"),null;var o=Er(r,function(e){return"["+On.contextId+'="'+e+'"]'}(e));return o?Un(o)?o:(y("drag handle must be a HTMLElement"),null):null}function wr(e){e.preventDefault()}function Cr(e){var t=e.expected,n=e.phase,r=e.isLockActive,o=e.shouldWarn;return r()?t===n||(o&&y("\n Cannot perform action.\n The actions you used belong to an outdated phase\n\n Current phase: "+t+"\n You called an action from outdated phase: "+n+"\n\n Tips:\n\n - Do not use preDragActions actions after calling preDragActions.lift()\n "),!1):(o&&y("\n Cannot perform action.\n The sensor no longer has an action lock.\n\n Tips:\n\n - Throw away your action handlers when forceStop() is called\n - Check actions.isActive() if you really need to\n "),!1)}function Tr(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=r.draggable.findById(o);return i?!!i.options.isEnabled&&!!on(n.getState(),o):(y("Unable to find draggable with id: "+o),!1)}function xr(e){var t=e.lockAPI,n=e.contextId,r=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,c=e.sourceEvent;if(!Tr({lockAPI:t,store:r,registry:o,draggableId:i}))return null;var l=o.draggable.getById(i),u=function(e,t){var n="["+Rn.contextId+'="'+e+'"]',r=J(X(document.querySelectorAll(n)),(function(e){return e.getAttribute(Rn.id)===t}));return r?Un(r)?r:(y("Draggable element is not a HTMLElement"),null):null}(n,l.descriptor.id);if(!u)return y("Unable to find draggable element with id: "+i),null;if(c&&!l.options.canDragInteractiveElements&&br(u,c))return null;var d=t.claim(a||S),h="PRE_DRAG";function m(){return l.options.shouldRespectForcePress}function g(){return t.isActive(d)}var f=function(e,t){Cr({expected:e,phase:h,isLockActive:g,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function _(e){function n(){t.release(),h="COMPLETED"}function o(t,o){if(void 0===o&&(o={shouldBlockNextClick:!1}),e.cleanup(),o.shouldBlockNextClick){var i=w(window,[{eventName:"click",fn:wr,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(i)}n(),r.dispatch(St({reason:t}))}return"PRE_DRAG"!==h&&(n(),"PRE_DRAG"!==h&&T(!1,"Cannot lift in phase "+h)),r.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),h="DRAGGING",s({isActive:function(){return Cr({expected:"DRAGGING",phase:h,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:m,drop:function(e){return o("DROP",e)},cancel:function(e){return o("CANCEL",e)}},e.actions)}return{isActive:function(){return Cr({expected:"PRE_DRAG",phase:h,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:m,fluidLift:function(e){var t=p((function(e){f((function(){return ft({client:e})}))})),n=_({liftActionArgs:{id:i,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return s({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return f(_t)},moveRight:function(){return f(vt)},moveDown:function(){return f(bt)},moveLeft:function(){return f(yt)}};return _({liftActionArgs:{id:i,clientSelection:vr(u),movementMode:"SNAP"},cleanup:S,actions:e})},abort:function(){Cr({expected:"PRE_DRAG",phase:h,isLockActive:g,shouldWarn:!0})&&t.release()}}}var kr=[ur,mr,fr];function Fr(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,a=e.enableDefaultSensors,s=[].concat(a?kr:[],i||[]),c=o.useState((function(){return function(){var e=null;function t(){e||T(!1,"Cannot release lock when there is no lock"),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&T(!1,"Cannot claim lock as it is already claimed");var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],l=u.useCallback((function(e,t){e.isDragging&&!t.isDragging&&c.tryAbandon()}),[c]);Nn((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();l(e,t),e=t}))}),[c,n,l]),Nn((function(){return c.tryAbandon}),[c.tryAbandon]);var d,h=u.useCallback((function(e){return Tr({lockAPI:c,registry:r,store:n,draggableId:e})}),[c,r,n]),p=u.useCallback((function(e,o,i){return xr({lockAPI:c,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:o,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})}),[t,c,r,n]),m=u.useCallback((function(e){return function(e,t){var n=Sr(e,t);return n?n.getAttribute(On.draggableId):null}(t,e)}),[t]),g=u.useCallback((function(e){var t=r.draggable.findById(e);return t?t.options:null}),[r.draggable]),f=u.useCallback((function(){c.isClaimed()&&(c.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[c,n]),_=u.useCallback(c.isClaimed,[c]),b=u.useMemo((function(){return{canGetLock:h,tryGetLock:p,findClosestDraggableId:m,findOptionsForDraggable:g,tryReleaseLock:f,isLockClaimed:_}}),[h,p,m,g,f,_]);d=s,Zn((function(){var e=nr(d);er((function(){e.current.length!==d.length&&T(!1,"Cannot change the amount of sensor hooks after mounting")}))}));for(var v=0;v<s.length;v++)s[v](b)}function Or(e){return e.current||T(!1,"Could not find store from lazy ref"),e.current}function Rr(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,a=e.nonce,d=e.dragHandleUsageInstructions,h=o.useRef(null);tr();var p=nr(e),m=u.useCallback((function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(p.current)}),[p]),g=function(e){var t=u.useMemo((function(){return function(e){return"rbd-announcement-"+e}(e)}),[e]),n=o.useRef(null);return o.useEffect((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),s(e.style,Hn),qn().appendChild(e),function(){setTimeout((function(){var t=qn();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),u.useCallback((function(e){var t=n.current;t?t.textContent=e:y('\n A screen reader message was trying to be announced but it was unable to do so.\n This can occur if you unmount your <DragDropContext /> in your onDragEnd.\n Consider calling provided.announce() before the unmount so that the instruction will\n not be lost for users relying on a screen reader.\n\n Message not passed to screen reader:\n\n "'+e+'"\n ')}),[])}(t),f=function(e){var t=e.contextId,n=e.text,r=Kn("hidden-text",{separator:"-"}),i=u.useMemo((function(){return"rbd-hidden-text-"+(e={contextId:t,uniqueId:r}).contextId+"-"+e.uniqueId;var e}),[r,t]);return o.useEffect((function(){var e=document.createElement("div");return e.id=i,e.textContent=n,e.style.display="none",qn().appendChild(e),function(){var t=qn();t.contains(e)&&t.removeChild(e)}}),[i,n]),i}({contextId:t,text:d}),_=Ln(t,a),b=u.useCallback((function(e){Or(h).dispatch(e)}),[]),v=u.useMemo((function(){return c.bindActionCreators({publishWhileDragging:dt,updateDroppableScroll:pt,updateDroppableIsEnabled:mt,updateDroppableIsCombineEnabled:gt,collectionStarting:ht},b)}),[b]),E=function(){var e=u.useMemo(Gn,[]);return o.useEffect((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),S=u.useMemo((function(){return rn(E,v)}),[E,v]),w=u.useMemo((function(){return Fn(s({scrollWindow:an,scrollDroppable:S.scrollDroppable},c.bindActionCreators({move:ft},b)))}),[S.scrollDroppable,b]),C=function(e){var t=o.useRef({}),n=o.useRef(null),r=o.useRef(null),i=o.useRef(!1),a=u.useCallback((function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}}),[]),s=u.useCallback((function(t){var n=Bn(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),c=u.useCallback((function(e,t){n.current===e&&(n.current=t)}),[]),l=u.useCallback((function(){r.current||i.current&&(r.current=requestAnimationFrame((function(){r.current=null;var e=n.current;e&&s(e)})))}),[s]),d=u.useCallback((function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(On.draggableId)===e&&(n.current=e)}),[]);return Nn((function(){return i.current=!0,function(){i.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}}),[]),u.useMemo((function(){return{register:a,tryRecordFocus:d,tryRestoreFocusRecorded:l,tryShiftRecord:c}}),[a,d,l,c])}(t),T=u.useMemo((function(){return $t({announce:g,autoScroller:w,dimensionMarshal:S,focusMarshal:C,getResponders:m,styleMarshal:_})}),[g,w,S,C,m,_]);h.current&&h.current!==T&&y("unexpected store change"),h.current=T;var x=u.useCallback((function(){var e=Or(h);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),k=u.useCallback((function(){var e=Or(h).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n(u.useMemo((function(){return{isDragging:k,tryAbort:x}}),[k,x]));var F=u.useCallback((function(e){return on(Or(h).getState(),e)}),[]),O=u.useCallback((function(){return We(Or(h).getState())}),[]),R=u.useMemo((function(){return{marshal:S,focus:C,contextId:t,canLift:F,isMovementAllowed:O,dragHandleUsageInstructionsId:f,registry:E}}),[t,S,f,C,F,O,E]);return Fr({contextId:t,store:T,registry:E,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),o.useEffect((function(){return x}),[x]),i.createElement(Yn.Provider,{value:R},i.createElement(l.Provider,{context:Vn,store:T},e.children))}var Dr=0;var Ir=function(e){return function(t){return e===t}},Ar=Ir("scroll"),Nr=Ir("auto"),Mr=Ir("visible"),Pr=function(e,t){return t(e.overflowX)||t(e.overflowY)},Lr=function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Pr(n,Ar)||Pr(n,Nr)},jr=function e(t){return null==t?null:t===document.body?function(){var e=qn(),t=document.documentElement;if(t||T(!1),!Lr(e))return!1;var n,r,o=window.getComputedStyle(t),i={overflowX:o.overflowX,overflowY:o.overflowY};return(r=Mr)((n=i).overflowX)&&r(n.overflowY)||y("\n We have detected that your <body> element might be a scroll container.\n We have found no reliable way of detecting whether the <body> element is a scroll container.\n Under most circumstances a <body> scroll bar will be on the <html> element (document.documentElement)\n\n Because we cannot determine if the <body> is a scroll container, and generally it is not one,\n we will be treating the <body> as *not* a scroll container\n\n More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/how-we-detect-scroll-containers.md\n "),!1}()?t:null:t===document.documentElement?null:Lr(t)?t:e(t.parentElement)},Ur=function(e){return{x:e.scrollLeft,y:e.scrollTop}},Br=function(e){return{closestScrollable:jr(e),isFixedOnPage:function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))}(e)}},Gr=function(e){var t=e.ref,n=e.descriptor,r=e.env,o=e.windowScroll,i=e.direction,a=e.isDropDisabled,s=e.isCombineEnabled,c=e.shouldClipSubject,l=r.closestScrollable,u=function(e,t){var n=d.getBox(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a={top:r,right:o+t.scrollWidth,bottom:i,left:o},s=d.expand(a,n.border);return d.createBox({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})}(t,l),h=d.withScroll(u,o),p=function(){if(!l)return null;var e=d.getBox(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:d.withScroll(e,o),scroll:Ur(l),scrollSize:t,shouldClipSubject:c}}();return function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,a=e.client,s=e.page,c=e.closest,l=function(){if(!c)return null;var e=c.scrollSize,t=c.client,n=Qt({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:n,diff:{value:M,displacement:M}}}}(),u="vertical"===i?me:ge;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:u,isEnabled:n,client:a,page:s,frame:l,subject:K({page:s,withPlaceholder:null,axis:u,frame:l})}}({descriptor:n,isEnabled:!a,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:i,client:u,page:h,closest:p})},Vr={passive:!1},qr={passive:!0},Hr=function(e){return e.shouldPublishImmediately?Vr:qr};function zr(e){var t=o.useContext(e);return t||T(!1,"Could not find required context"),t}var Wr=function(e){return e&&e.env.closestScrollable||null};function Kr(e){var t=o.useRef(null),n=zr(Yn),r=Kn("droppable"),i=n.registry,a=n.marshal,s=nr(e),c=u.useMemo((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),l=o.useRef(c),d=u.useMemo((function(){return h((function(e,n){t.current||T(!1,"Can only update scroll when dragging");var r={x:e,y:n};a.updateDroppableScroll(c.id,r)}))}),[c.id,a]),m=u.useCallback((function(){var e=t.current;return e&&e.env.closestScrollable?Ur(e.env.closestScrollable):M}),[]),g=u.useCallback((function(){var e=m();d(e.x,e.y)}),[m,d]),f=u.useMemo((function(){return p(g)}),[g]),_=u.useCallback((function(){var e=t.current,n=Wr(e);e&&n||T(!1,"Could not find scroll options while scrolling"),e.scrollOptions.shouldPublishImmediately?g():f()}),[f,g]),b=u.useCallback((function(e,r){t.current&&T(!1,"Cannot collect a droppable while a drag is occurring");var o=s.current,i=o.getDroppableRef();i||T(!1,"Cannot collect without a droppable ref");var a=Br(i),l={ref:i,descriptor:c,env:a,scrollOptions:r};t.current=l;var u=Gr({ref:i,descriptor:c,env:a,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),d=a.closestScrollable;return d&&(d.setAttribute(In.contextId,n.contextId),d.addEventListener("scroll",_,Hr(l.scrollOptions)),function(e){e&&(jr(e.parentElement)&&y("\n Droppable: unsupported nested scroll container detected.\n A Droppable can only have one scroll parent (which can be itself)\n Nested scroll containers are currently not supported.\n\n We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131\n "))}(d)),u}),[n.contextId,c,_,s]),v=u.useCallback((function(){var e=t.current,n=Wr(e);return e&&n||T(!1,"Can only recollect Droppable client for Droppables that have a scroll container"),Ur(n)}),[]),E=u.useCallback((function(){var e=t.current;e||T(!1,"Cannot stop drag when no active drag");var n=Wr(e);t.current=null,n&&(f.cancel(),n.removeAttribute(In.contextId),n.removeEventListener("scroll",_,Hr(e.scrollOptions)))}),[_,f]),S=u.useCallback((function(e){var n=t.current;n||T(!1,"Cannot scroll when there is no drag");var r=Wr(n);r||T(!1,"Cannot scroll a droppable with no closest scrollable"),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),w=u.useMemo((function(){return{getDimensionAndWatchScroll:b,getScrollWhileDragging:v,dragStopped:E,scroll:S}}),[E,b,v,S]),C=u.useMemo((function(){return{uniqueId:r,descriptor:c,callbacks:w}}),[w,c,r]);Nn((function(){return l.current=C.descriptor,i.droppable.register(C),function(){t.current&&(y("Unsupported: changing the droppableId or type of a Droppable during a drag"),E()),i.droppable.unregister(C)}}),[w,c,E,C,a,i.droppable]),Nn((function(){t.current&&a.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)}),[e.isDropDisabled,a]),Nn((function(){t.current&&a.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,a])}function Yr(){}var $r={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},Qr=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,o=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate;return t||"close"===r?$r:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?Ot.placeholder:null}};var Jr=i.memo((function(e){var t=o.useRef(null),n=u.useCallback((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),r=e.animate,a=e.onTransitionEnd,s=e.onClose,c=e.contextId,l=o.useState("open"===e.animate),d=l[0],h=l[1];o.useEffect((function(){return d?"open"!==r?(n(),h(!1),Yr):t.current?Yr:(t.current=setTimeout((function(){t.current=null,h(!1)})),n):Yr}),[r,d,n]);var p=u.useCallback((function(e){"height"===e.propertyName&&(a(),"close"===r&&s())}),[r,s,a]),m=Qr({isAnimatingOpenOnMount:d,animate:e.animate,placeholder:e.placeholder});return i.createElement(e.placeholder.tagName,{style:m,"data-rbd-placeholder-context-id":c,onTransitionEnd:p,ref:e.innerRef})})),Xr=i.createContext(null);function Zr(e){e&&Un(e)||T(!1,"\n provided.innerRef has not been provided with a HTMLElement.\n\n You can find a guide on using the innerRef callback functions at:\n https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/using-inner-ref.md\n ")}function eo(e){return"boolean"==typeof e}function to(e,t){t.forEach((function(t){return t(e)}))}var no=[function(e){var t=e.props;t.droppableId||T(!1,"A Droppable requires a droppableId prop"),"string"!=typeof t.droppableId&&T(!1,"A Droppable requires a [string] droppableId. Provided: ["+typeof t.droppableId+"]")},function(e){var t=e.props;eo(t.isDropDisabled)||T(!1,"isDropDisabled must be a boolean"),eo(t.isCombineEnabled)||T(!1,"isCombineEnabled must be a boolean"),eo(t.ignoreContainerClipping)||T(!1,"ignoreContainerClipping must be a boolean")},function(e){Zr((0,e.getDroppableRef)())}],ro=[function(e){var t=e.props,n=e.getPlaceholderRef;t.placeholder&&(n()||y('\n Droppable setup issue [droppableId: "'+t.droppableId+'"]:\n DroppableProvided > placeholder could not be found.\n\n Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.\n More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/api/droppable.md\n '))}],oo=[function(e){e.props.renderClone||T(!1,"Must provide a clone render function (renderClone) for virtual lists")},function(e){(0,e.getPlaceholderRef)()&&T(!1,"Expected virtual list to not have a placeholder")}];var io=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return a(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(i.PureComponent),ao=5e3,so=4500,co=function(e,t){return t?Ot.drop(t.duration):e?Ot.snap:Ot.fluid},lo=function(e,t){return e?t?xt.drop:xt.combining:null};function uo(e){return"DRAGGING"===e.type?(r=(n=e).dimension.client,o=n.offset,i=n.combineWith,a=n.dropping,s=Boolean(i),c=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(n),l=Boolean(a),u=l?It(o,s):Dt(o),{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:co(c,a),transform:u,opacity:lo(s,l),zIndex:l?so:ao,pointerEvents:"none"}):{transform:Dt((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t,n,r,o,i,a,s,c,l,u}function ho(e){var t=Kn("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,a=e.canDragInteractiveElements,s=e.shouldRespectForcePress,c=e.isEnabled,l=u.useMemo((function(){return{canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:c}}),[a,c,s]),h=u.useCallback((function(e){var t=i();return t||T(!1,"Cannot get dimension when no ref is set"),function(e,t,n){void 0===n&&(n=M);var r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=d.calculateBox(o,r),a=d.withScroll(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)}),[n,i]),p=u.useMemo((function(){return{uniqueId:t,descriptor:n,options:l,getDimension:h}}),[n,h,l,t]),m=o.useRef(p),g=o.useRef(!0);Nn((function(){return r.draggable.register(m.current),function(){return r.draggable.unregister(m.current)}}),[r.draggable]),Nn((function(){if(g.current)g.current=!1;else{var e=m.current;m.current=p,r.draggable.update(p,e)}}),[p,r.draggable])}function po(e,t,n){er((function(){function r(e){return"Draggable[id: "+e+"]: "}var o,i=e.draggableId;i||T(!1,"Draggable requires a draggableId"),"string"!=typeof i&&T(!1,"Draggable requires a [string] draggableId.\n Provided: [type: "+typeof i+"] (value: "+i+")"),o=e.index,(Number.isInteger?Number.isInteger(o):"number"==typeof o&&isFinite(o)&&Math.floor(o)===o)||T(!1,r(i)+" requires an integer index prop"),"DRAGGING"!==e.mapped.type&&(Zr(n()),e.isEnabled&&(Bn(t,i)||T(!1,r(i)+" Unable to find drag handle")))}))}function mo(e){e.preventDefault()}var go=function(e,t){return e===t},fo=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function _o(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var bo={mapped:{type:"SECONDARY",offset:M,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:_o(null)}};var vo={dropAnimationFinished:wt},yo=l.connect((function(){var e,t,n,r=(e=h((function(e,t){return{x:e,y:t}})),t=h((function(e,t,n,r,o){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=h((function(e,n,r,o,i,a,s){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,o,i,a,null)}}})),function(r,o){if(r.isDragging){if(r.critical.draggable.id!==o.draggableId)return null;var i=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=He(r.impact),c=(u=r.impact).at&&"COMBINE"===u.at.type?u.at.combine.draggableId:null,l=r.forceShouldAnimate;return n(e(i.x,i.y),r.movementMode,a,o.isClone,s,c,l)}var u;if("DROP_ANIMATING"===r.phase){var d=r.completed;if(d.result.draggableId!==o.draggableId)return null;var h=o.isClone,p=r.dimensions.draggables[o.draggableId],m=d.result,g=m.mode,f=fo(m),_=function(e){return e.combine?e.combine.draggableId:null}(m),b={duration:r.dropDuration,curve:Tt,moveTo:r.newHomeClientOffset,opacity:_?xt.drop:null,scale:_?kt.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:p,dropping:b,draggingOver:f,combineWith:_,mode:g,forceShouldAnimate:null,snapshot:t(g,h,f,_,b)}}}return null}),o=function(){var e=h((function(e,t){return{x:e,y:t}})),t=h(_o),n=h((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=function(e){return e?n(M,e,!0):null},o=function(t,o,i,a){var s=i.displaced.visible[t],c=Boolean(a.inVirtualList&&a.effected[t]),l=ie(i),u=l&&l.draggableId===t?o:null;if(!s){if(!c)return r(u);if(i.displaced.invisible[t])return null;var d=U(a.displacedBy.point),h=e(d.x,d.y);return n(h,u,!0)}if(c)return r(u);var p=i.displacedBy.point,m=e(p.x,p.y);return n(m,u,s.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(e,t){return r(e,t)||o(e,t)||bo}}),vo,null,{context:Vn,pure:!0,areStatePropsEqual:go})((function(e){var t=o.useRef(null),n=u.useCallback((function(e){t.current=e}),[]),r=u.useCallback((function(){return t.current}),[]),i=zr(Yn),a=i.contextId,s=i.dragHandleUsageInstructionsId,c=i.registry,l=zr(Xr),d=l.type,h=l.droppableId,p=u.useMemo((function(){return{id:e.draggableId,index:e.index,type:d,droppableId:h}}),[e.draggableId,e.index,d,h]),m=e.children,g=e.draggableId,f=e.isEnabled,_=e.shouldRespectForcePress,b=e.canDragInteractiveElements,v=e.isClone,y=e.mapped,E=e.dropAnimationFinished;po(e,a,r),function(e){Zn((function(){var t=o.useRef(e);er((function(){e!==t.current&&T(!1,"Draggable isClone prop value changed during component life")}),[e])}))}(v),v||ho(u.useMemo((function(){return{descriptor:p,registry:c,getDraggableRef:r,canDragInteractiveElements:b,shouldRespectForcePress:_,isEnabled:f}}),[p,c,r,b,_,f]));var S=u.useMemo((function(){return f?{tabIndex:0,role:"button","aria-describedby":s,"data-rbd-drag-handle-draggable-id":g,"data-rbd-drag-handle-context-id":a,draggable:!1,onDragStart:mo}:null}),[a,s,g,f]),w=u.useCallback((function(e){"DRAGGING"===y.type&&y.dropping&&"transform"===e.propertyName&&E()}),[E,y]),C=u.useMemo((function(){var e=uo(y),t="DRAGGING"===y.type&&y.dropping?w:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":a,"data-rbd-draggable-id":g,style:e,onTransitionEnd:t},dragHandleProps:S}}),[a,S,g,y,w,n]),x=u.useMemo((function(){return{draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}}}),[p.droppableId,p.id,p.index,p.type]);return m(C,y.snapshot,x)}));function Eo(e){return zr(Xr).isUsingCloneFor!==e.draggableId||e.isClone?i.createElement(yo,e):null}var So=function(e,t){return e===t.droppable.type},wo=function(e,t){return t.draggables[e.draggable.id]},Co={updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}};var To={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||T(!1,"document.body is not ready"),document.body}},xo=l.connect((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=s({},e,{shouldAnimatePlaceholder:!1}),n=h((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),r=h((function(r,o,i,a,s,c){var l=s.descriptor.id;if(s.descriptor.droppableId===r){var u=c?{render:c,dragging:n(s.descriptor)}:null,d={isDraggingOver:i,draggingOverWith:i?l:null,draggingFromThisWith:l,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:u}}if(!o)return t;if(!a)return e;var h={isDraggingOver:i,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:h,useClone:null}}));return function(n,o){var i=o.droppableId,a=o.type,s=!o.isDropDisabled,c=o.renderClone;if(n.isDragging){var l=n.critical;if(!So(a,l))return t;var u=wo(l,n.dimensions),d=He(n.impact)===i;return r(i,s,d,d,u,c)}if("DROP_ANIMATING"===n.phase){var h=n.completed;if(!So(a,h.critical))return t;var p=wo(h.critical,n.dimensions);return r(i,s,fo(h.result)===i,He(h.impact)===i,p,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var m=n.completed;if(!So(a,m.critical))return t;var g=He(m.impact)===i,f=Boolean(m.impact.at&&"COMBINE"===m.impact.at.type),_=m.critical.droppable.id===i;return g?f?e:t:_?e:t}return t}}),Co,null,{context:Vn,pure:!0,areStatePropsEqual:go})((function(e){var t=o.useContext(Yn);t||T(!1,"Could not find app context");var n,r=t.contextId,a=t.isMovementAllowed,s=o.useRef(null),c=o.useRef(null),l=e.children,d=e.droppableId,h=e.type,p=e.mode,g=e.direction,f=e.ignoreContainerClipping,_=e.isDropDisabled,b=e.isCombineEnabled,v=e.snapshot,y=e.useClone,E=e.updateViewportMaxScroll,S=e.getContainerForClone,w=u.useCallback((function(){return s.current}),[]),C=u.useCallback((function(e){s.current=e}),[]),x=u.useCallback((function(){return c.current}),[]),k=u.useCallback((function(e){c.current=e}),[]);n={props:e,getDroppableRef:w,getPlaceholderRef:x},er((function(){to(n,no),"standard"===n.props.mode&&to(n,ro),"virtual"===n.props.mode&&to(n,oo)}));var F=u.useCallback((function(){a()&&E({maxScroll:Xt()})}),[a,E]);Kr({droppableId:d,type:h,mode:p,direction:g,isDropDisabled:_,isCombineEnabled:b,ignoreContainerClipping:f,getDroppableRef:w});var O=i.createElement(io,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,n=e.data,o=e.animate;return i.createElement(Jr,{placeholder:n,onClose:t,innerRef:k,animate:o,contextId:r,onTransitionEnd:F})})),R=u.useMemo((function(){return{innerRef:C,placeholder:O,droppableProps:{"data-rbd-droppable-id":d,"data-rbd-droppable-context-id":r}}}),[r,d,O,C]),D=y?y.dragging.draggableId:null,I=u.useMemo((function(){return{droppableId:d,type:h,isUsingCloneFor:D}}),[d,D,h]);return i.createElement(Xr.Provider,{value:I},l(R,v),function(){if(!y)return null;var e=y.dragging,t=y.render,n=i.createElement(Eo,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(n,r){return t(n,r,e)}));return m.createPortal(n,S())}())}));xo.defaultProps=To,t.DragDropContext=function(e){var t=u.useMemo((function(){return""+Dr++}),[]),n=e.dragHandleUsageInstructions||D;return i.createElement(x,null,(function(r){return i.createElement(Rr,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))},t.Draggable=function(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return i.createElement(Eo,s({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))},t.Droppable=xo,t.resetServerContext=function(){Dr=0,zn=0},t.useKeyboardSensor=mr,t.useMouseSensor=ur,t.useTouchSensor=fr},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(1351));var i="function"==typeof Symbol&&Symbol.observable||"@@observable",a=function(){return Math.random().toString(36).substring(7).split("").join(".")},s={INIT:"@@redux/INIT"+a(),REPLACE:"@@redux/REPLACE"+a(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+a()}};function c(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function l(e){var t=typeof e;t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";var n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}(e);return t}function u(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function d(e,t){return function(){return t(e.apply(this,arguments))}}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function p(){}"string"==typeof p.name&&"isCrushed"!==p.name&&u('You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.'),t.__DO_NOT_USE__ActionTypes=s,t.applyMiddleware=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(i)}));return r=h.apply(void 0,a)(n.dispatch),o.default(o.default({},n),{},{dispatch:r})}}},t.bindActionCreators=function(e,t){if("function"==typeof e)return d(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, but instead received: '"+l(e)+'\'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=d(o,t))}return n},t.combineReducers=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];void 0===e[o]&&u('No reducer provided for key "'+o+'"'),"function"==typeof e[o]&&(n[o]=e[o])}var i,a,d=Object.keys(n);i={};try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:s.INIT}))throw new Error('The slice reducer for key "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:s.PROBE_UNKNOWN_ACTION()}))throw new Error('The slice reducer for key "'+t+"\" returned undefined when probed with a random type. Don't try to handle '"+s.INIT+'\' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){a=e}return function(e,t){if(void 0===e&&(e={}),a)throw a;var r=function(e,t,n,r){var o=Object.keys(t),i=n&&n.type===s.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!c(e))return"The "+i+' has unexpected type of "'+l(e)+'". Expected argument to be an object with the following keys: "'+o.join('", "')+'"';var a=Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)&&!r[e]}));return a.forEach((function(e){r[e]=!0})),n&&n.type===s.REPLACE?void 0:a.length>0?"Unexpected "+(a.length>1?"keys":"key")+' "'+a.join('", "')+'" found in '+i+'. Expected to find one of the known reducer keys instead: "'+o.join('", "')+'". Unexpected keys will be ignored.':void 0}(e,n,t,i);r&&u(r);for(var o=!1,h={},p=0;p<d.length;p++){var m=d[p],g=n[m],f=e[m],_=g(f,t);if(void 0===_){var b=t&&t.type;throw new Error("When called with an action of type "+(b?'"'+String(b)+'"':"(unknown type)")+', the slice reducer for key "'+m+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}h[m]=_,o=o||_!==f}return(o=o||d.length!==Object.keys(e).length)?h:e}},t.compose=h,t.createStore=function e(t,n,r){var o;if("function"==typeof n&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function. Instead, received: '"+l(r)+"'");return r(e)(t,n)}if("function"!=typeof t)throw new Error("Expected the root reducer to be a function. Instead, received: '"+l(t)+"'");var a=t,u=n,d=[],h=d,p=!1;function m(){h===d&&(h=d.slice())}function g(){if(p)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function f(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function. Instead, received: '"+l(e)+"'");if(p)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var t=!0;return m(),h.push(e),function(){if(t){if(p)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,m();var n=h.indexOf(e);h.splice(n,1),d=null}}}function _(e){if(!c(e))throw new Error("Actions must be plain objects. Instead, the actual type was: '"+l(e)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(p)throw new Error("Reducers may not dispatch actions.");try{p=!0,u=a(u,e)}finally{p=!1}for(var t=d=h,n=0;n<t.length;n++){(0,t[n])()}return e}function b(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function. Instead, received: '"+l(e));a=e,_({type:s.REPLACE})}function v(){var e,t=f;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error("Expected the observer to be an object. Instead, received: '"+l(e)+"'");function n(){e.next&&e.next(g())}return n(),{unsubscribe:t(n)}}})[i]=function(){return this},e}return _({type:s.INIT}),(o={dispatch:_,subscribe:f,getState:g,replaceReducer:b})[i]=v,o}},function(e,t,n){var r=n(79);function o(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}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0;var o=r(n(1353));t.Provider=o.default;var i=r(n(739));t.connectAdvanced=i.default;var a=n(224);t.ReactReduxContext=a.ReactReduxContext;var s=r(n(1355));t.connect=s.default;var c=n(1363);t.useDispatch=c.useDispatch,t.createDispatchHook=c.createDispatchHook;var l=n(1364);t.useSelector=l.useSelector,t.createSelectorHook=l.createSelectorHook;var u=n(744);t.useStore=u.useStore,t.createStoreHook=u.createStoreHook;var d=n(738),h=n(1365);t.batch=h.unstable_batchedUpdates;var p=r(n(740));t.shallowEqual=p.default,(0,d.setBatch)(h.unstable_batchedUpdates)},function(e,t,n){"use strict";var r=n(118),o=n(170);t.__esModule=!0,t.default=void 0;var i=o(n(78)),a=r(n(88)),s=n(224),c=r(n(473)),l=n(474);function u(e){var t=e.store,n=e.context,r=e.children,o=(0,i.useMemo)((function(){var e=new c.default(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),a=(0,i.useMemo)((function(){return t.getState()}),[t]);(0,l.useIsomorphicLayoutEffect)((function(){var e=o.subscription;return e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,a]);var u=n||s.ReactReduxContext;return i.default.createElement(u.Provider,{value:o},r)}u.propTypes={store:a.default.shape({subscribe:a.default.func.isRequired,dispatch:a.default.func.isRequired,getState:a.default.func.isRequired}),context:a.default.object,children:a.default.any};var d=u;t.default=d},function(e,t,n){"use strict";var r=n(305),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),g=c(n),f=0;f<a.length;++f){var _=a[f];if(!(i[_]||r&&r[_]||g&&g[_]||s&&s[_])){var b=h(n,_);try{l(t,_,b)}catch(e){}}}}return t}},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.createConnect=m,t.default=void 0;var o=r(n(92)),i=r(n(304)),a=r(n(739)),s=r(n(740)),c=r(n(1356)),l=r(n(1359)),u=r(n(1360)),d=r(n(1361));function h(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function p(e,t){return e===t}function m(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?a.default:n,m=t.mapStateToPropsFactories,g=void 0===m?l.default:m,f=t.mapDispatchToPropsFactories,_=void 0===f?c.default:f,b=t.mergePropsFactories,v=void 0===b?u.default:b,y=t.selectorFactory,E=void 0===y?d.default:y;return function(e,t,n,a){void 0===a&&(a={});var c=a,l=c.pure,u=void 0===l||l,d=c.areStatesEqual,m=void 0===d?p:d,f=c.areOwnPropsEqual,b=void 0===f?s.default:f,y=c.areStatePropsEqual,S=void 0===y?s.default:y,w=c.areMergedPropsEqual,C=void 0===w?s.default:w,T=(0,i.default)(c,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),x=h(e,g,"mapStateToProps"),k=h(t,_,"mapDispatchToProps"),F=h(n,v,"mergeProps");return r(E,(0,o.default)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:x,initMapDispatchToProps:k,initMergeProps:F,pure:u,areStatesEqual:m,areOwnPropsEqual:b,areStatePropsEqual:S,areMergedPropsEqual:C},T))}}var g=m();t.default=g},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.whenMapDispatchToPropsIsFunction=a,t.whenMapDispatchToPropsIsMissing=s,t.whenMapDispatchToPropsIsObject=c,t.default=void 0;var o=r(n(1357)),i=n(741);function a(e){return"function"==typeof e?(0,i.wrapMapToPropsFunc)(e,"mapDispatchToProps"):void 0}function s(e){return e?void 0:(0,i.wrapMapToPropsConstant)((function(e){return{dispatch:e}}))}function c(e){return e&&"object"==typeof e?(0,i.wrapMapToPropsConstant)((function(t){return(0,o.default)(e,t)})):void 0}var l=[a,s,c];t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={},r=function(r){var o=e[r];"function"==typeof o&&(n[r]=function(){return t(o.apply(void 0,arguments))})};for(var o in e)r(o);return n}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}},function(e,t,n){"use strict";t.__esModule=!0,t.whenMapStateToPropsIsFunction=o,t.whenMapStateToPropsIsMissing=i,t.default=void 0;var r=n(741);function o(e){return"function"==typeof e?(0,r.wrapMapToPropsFunc)(e,"mapStateToProps"):void 0}function i(e){return e?void 0:(0,r.wrapMapToPropsConstant)((function(){return{}}))}var a=[o,i];t.default=a},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.defaultMergeProps=a,t.wrapMergePropsFunc=s,t.whenMergePropsIsFunction=c,t.whenMergePropsIsOmitted=l,t.default=void 0;var o=r(n(92)),i=r(n(742));function a(e,t,n){return(0,o.default)({},n,e,t)}function s(e){return function(t,n){var r,o=n.displayName,a=n.pure,s=n.areMergedPropsEqual,c=!1;return function(t,n,l){var u=e(t,n,l);return c?a&&s(u,r)||(r=u):(c=!0,r=u,(0,i.default)(r,o,"mergeProps")),r}}}function c(e){return"function"==typeof e?s(e):void 0}function l(e){return e?void 0:function(){return a}}var u=[c,l];t.default=u},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.impureFinalPropsSelectorFactory=a,t.pureFinalPropsSelectorFactory=s,t.default=function(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,c=t.initMergeProps,l=(0,o.default)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),u=n(e,l),d=r(e,l),h=c(e,l);(0,i.default)(u,d,h,l.displayName);return(l.pure?s:a)(u,d,h,e,l)};var o=r(n(304)),i=r(n(1362));function a(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function s(e,t,n,r,o){var i,a,s,c,l,u=o.areStatesEqual,d=o.areOwnPropsEqual,h=o.areStatePropsEqual,p=!1;function m(o,p){var m,g,f=!d(p,a),_=!u(o,i);return i=o,a=p,f&&_?(s=e(i,a),t.dependsOnOwnProps&&(c=t(r,a)),l=n(s,c,a)):f?(e.dependsOnOwnProps&&(s=e(i,a)),t.dependsOnOwnProps&&(c=t(r,a)),l=n(s,c,a)):_?(m=e(i,a),g=!h(m,s),s=m,g&&(l=n(s,c,a)),l):l}return function(o,u){return p?m(o,u):(s=e(i=o,a=u),c=t(r,a),l=n(s,c,a),p=!0,l)}}},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.default=function(e,t,n,r){i(e,"mapStateToProps",r),i(t,"mapDispatchToProps",r),i(n,"mergeProps",r)};var o=r(n(743));function i(e,t,n){if(!e)throw new Error("Unexpected value for "+t+" in "+n+".");"mapStateToProps"!==t&&"mapDispatchToProps"!==t||Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||(0,o.default)("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps.")}},function(e,t,n){"use strict";t.__esModule=!0,t.createDispatchHook=i,t.useDispatch=void 0;var r=n(224),o=n(744);function i(e){void 0===e&&(e=r.ReactReduxContext);var t=e===r.ReactReduxContext?o.useStore:(0,o.createStoreHook)(e);return function(){return t().dispatch}}var a=i();t.useDispatch=a},function(e,t,n){"use strict";var r=n(118);t.__esModule=!0,t.createSelectorHook=u,t.useSelector=void 0;var o=n(78),i=n(745),a=r(n(473)),s=n(474),c=n(224),l=function(e,t){return e===t};function u(e){void 0===e&&(e=c.ReactReduxContext);var t=e===c.ReactReduxContext?i.useReduxContext:function(){return(0,o.useContext)(e)};return function(e,n){if(void 0===n&&(n=l),!e)throw new Error("You must pass a selector to useSelector");if("function"!=typeof e)throw new Error("You must pass a function as a selector to useSelector");if("function"!=typeof n)throw new Error("You must pass a function as an equality function to useSelector");var r=t(),i=function(e,t,n,r){var i,c=(0,o.useReducer)((function(e){return e+1}),0)[1],l=(0,o.useMemo)((function(){return new a.default(n,r)}),[n,r]),u=(0,o.useRef)(),d=(0,o.useRef)(),h=(0,o.useRef)(),p=(0,o.useRef)(),m=n.getState();try{if(e!==d.current||m!==h.current||u.current){var g=e(m);i=void 0!==p.current&&t(g,p.current)?p.current:g}else i=p.current}catch(e){throw u.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),e}return(0,s.useIsomorphicLayoutEffect)((function(){d.current=e,h.current=m,p.current=i,u.current=void 0})),(0,s.useIsomorphicLayoutEffect)((function(){function e(){try{var e=n.getState(),r=d.current(e);if(t(r,p.current))return;p.current=r,h.current=e}catch(e){u.current=e}c()}return l.onStateChange=e,l.trySubscribe(),e(),function(){return l.tryUnsubscribe()}}),[n,l]),i}(e,n,r.store,r.subscription);return(0,o.useDebugValue)(i),i}}var d=u();t.useSelector=d},function(e,t,n){"use strict";t.__esModule=!0,t.unstable_batchedUpdates=void 0;var r=n(142);t.unstable_batchedUpdates=r.unstable_batchedUpdates},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78);function o(e,t){var n=r.useState((function(){return{inputs:t,result:e()}}))[0],o=r.useRef(!0),i=r.useRef(n),a=o.current||Boolean(t&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.current.inputs))?i.current:{inputs:t,result:e()};return r.useEffect((function(){o.current=!1,i.current=a}),[a]),a.result}function i(e,t){return o((function(){return e}),t)}var a=o,s=i;t.useCallback=s,t.useCallbackOne=i,t.useMemo=a,t.useMemoOne=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(1368))&&"object"==typeof r&&"default"in r?r.default:r,i=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},a=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},s=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},c={top:0,right:0,bottom:0,left:0},l=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?c:n,o=e.border,l=void 0===o?c:o,u=e.padding,d=void 0===u?c:u,h=i(a(t,r)),p=i(s(t,l)),m=i(s(p,d));return{marginBox:h,borderBox:i(t),paddingBox:p,contentBox:m,margin:r,border:l,padding:d}},u=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&o(!1,"Could not parse value [raw: "+e+", without suffix: "+t+"]"),n},d=function(e,t){var n,r,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,c=(r=t,{top:(n=o).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return l({borderBox:c,border:i,margin:a,padding:s})},h=function(e,t){var n={top:u(t.marginTop),right:u(t.marginRight),bottom:u(t.marginBottom),left:u(t.marginLeft)},r={top:u(t.paddingTop),right:u(t.paddingRight),bottom:u(t.paddingBottom),left:u(t.paddingLeft)},o={top:u(t.borderTopWidth),right:u(t.borderRightWidth),bottom:u(t.borderBottomWidth),left:u(t.borderLeftWidth)};return l({borderBox:e,margin:n,padding:r,border:o})};t.calculateBox=h,t.createBox=l,t.expand=a,t.getBox=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return h(t,n)},t.getRect=i,t.offset=d,t.shrink=s,t.withScroll=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){if(!e)throw new Error("Invariant failed: "+(t||""))}},function(e,t,n){"use strict";var r=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function o(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(o=e[n],i=t[n],!(o===i||r(o)&&r(i)))return!1;var o,i;return!0}e.exports=function(e,t){var n;void 0===t&&(t=o);var r,i=[],a=!1;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return a&&n===this&&t(o,i)||(r=e.apply(this,o),a=!0,n=this,i=o),r}}},function(e,t,n){"use strict";e.exports=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r}},function(e,t,n){"use strict";n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return b}));var r=n(519),o=n(93),i=n(227),a=n(82);async function s(e,t){const n=a.a.get(),o={limit:10};void 0!==t&&(o.rooms=[t]);const i={search_categories:{room_events:{search_term:e,filter:o,order_by:r.a.Recent,event_context:{before_limit:1,after_limit:1,include_profile:!0}}}};return{response:await n.search({body:i}),query:i}}async function c(e,t){const n=a.a.get(),r=await s(e,t),o={_query:r.query,results:[],highlights:[]};return n.processRoomEventsSearch(o,r.response)}function l(e,t){const n=e.result,r=t.result;return n.origin_server_ts>r.origin_server_ts?-1:n.origin_server_ts<r.origin_server_ts?1:0}async function u(e,t,n=!0){const r=i.a.get(),o={search_term:e,before_limit:1,after_limit:1,limit:10,order_by_recency:!0,room_id:void 0};void 0!==t&&(o.room_id=t);const a=await r.search(o);o.next_batch=a.next_batch;return{response:a,query:o}}function d(e,t){try{const n=e[e.length-1].result,r=t[t.length-1].result;return n.origin_server_ts<=r.origin_server_ts?-1:1}catch{return 0}}function h(e,t,n,r){const o=n.concat(r).sort(l);t.results=o.slice(0,10),e.cachedEvents=o.slice(10)}function p(e,t,n){const r=function(e,t,n){const r={},o=e.cachedEvents;let i=e.oldestEventFrom;return r.highlights=e.highlights,t&&n&&n.results?(d(t.results,n.results)<0&&(i="local"),h(e,r,t.results,n.results),r.highlights=t.highlights.concat(n.highlights)):t?(d(t.results,o)<0&&(i="local"),h(e,r,t.results,o)):n&&n.results?(d(n.results,o)<0&&(i="server"),h(e,r,n.results,o)):(r.results=o,e.cachedEvents=[]),e.oldestEventFrom=i,r}(e,t,n);return e.count?r.count=e.count:r.count=t.count+n.count,t&&(e.seshatQuery.next_batch=t.next_batch),n&&(e.serverSideNextBatch=n.next_batch),e.seshatQuery.next_batch?r.next_batch=e.seshatQuery.next_batch:e.serverSideNextBatch&&(r.next_batch=e.serverSideNextBatch),!r.next_batch&&e.cachedEvents.length>0&&(r.next_batch="cached"),r}function m(e=[]){for(let t=0;t<e.length;t++){const n=e[t].context.getTimeline();for(let e=0;e<n.length;e++){const t=n[e],r=t.event;r.curve25519Key&&(t.makeEncrypted(o.a.RoomMessageEncrypted,{algorithm:r.algorithm},r.curve25519Key,r.ed25519Key),t.forwardingCurve25519KeyChain=r.forwardingCurve25519KeyChain,delete r.curve25519Key,delete r.ed25519Key,delete r.algorithm,delete r.forwardingCurve25519KeyChain)}}}function g(e,t){let n;return n=void 0!==t?a.a.get().isRoomEncrypted(t)?async function(e,t){const n={results:[],highlights:[]};if(""===e)return n;const r=await u(e,t);n.seshatQuery=r.query;const o={search_categories:{room_events:r.response}},i=a.a.get().processRoomEventsSearch(n,o);return m(i.results),i}(e,t):c(e,t):async function(e){const t=a.a.get(),n=s(e),r=u(e);await Promise.all([n,r]);const o=await r,i=await n,c=i.query,l=i.response,d=o.query,h=o.response,g={seshatQuery:d,_query:c,serverSideNextBatch:l.search_categories.room_events.next_batch,cachedEvents:[],oldestEventFrom:"server",results:[],highlights:[]},f={search_categories:{room_events:p(g,h,l.search_categories.room_events)}},_=t.processRoomEventsSearch(g,f);return m(_.results),_}(e),n}function f(e){const t=a.a.get(),n=e.seshatQuery,r=e._query;if(n){if(r){const t=async function(e){const t=i.a.get(),n=a.a.get(),r=e.seshatQuery,o=e.oldestEventFrom;let s,c,l;if(!r.next_batch||e.serverSideNextBatch&&"server"!==o||(s=await t.search(r)),e.serverSideNextBatch&&("local"===o||!r.next_batch)){const t={body:e._query,next_batch:e.serverSideNextBatch};c=await n.search(t)}c&&(l=c.search_categories.room_events);const u={search_categories:{room_events:p(e,s,l)}},d=e.results?e.results.length:0,h=n.processRoomEventsSearch(e,u),g=h.results.length-d;return m(h.results.slice(Math.max(h.results.length-g,0))),e.pendingRequest=null,h}(e);return e.pendingRequest=t,t}{const t=async function(e){const t=i.a.get(),n=e.seshatQuery,r=await t.search(n);e.seshatQuery.next_batch=r.next_batch;const o=r.results.length,s={search_categories:{room_events:r}},c=a.a.get().processRoomEventsSearch(e,s);return m(c.results.slice(Math.max(c.results.length-o,0))),e.pendingRequest=null,c}(e);return e.pendingRequest=t,t}}return t.backPaginateRoomEventsSearch(e)}function _(e){const t=i.a.get(),n=a.a.get();return e.pendingRequest?e.pendingRequest:null===t?n.backPaginateRoomEventsSearch(e):f(e)}function b(e,t){return null===i.a.get()?c(e,t):g(e,t)}},function(e,t,n){"use strict";var r=n(79),o=n.n(r);class i{constructor(){o()(this,"scrollStateMap",new Map)}getScrollState(e){return this.scrollStateMap.get(e)}setScrollState(e,t){this.scrollStateMap.set(e,t)}}void 0===window.mxRoomScrollStateStore&&(window.mxRoomScrollStateStore=new i),t.a=window.mxRoomScrollStateStore},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79),o=n.n(r);class i{constructor(e){this.event=e,o()(this,"serializedParts",null),o()(this,"caret",null)}setEditorState(e,t){this.caret=e,this.serializedParts=t}hasEditorState(){return!!this.serializedParts}getSerializedParts(){return this.serializedParts}getCaret(){return this.caret}getEvent(){return this.event}}},function(e,t){e.exports="img/stickerpack-placeholder.9c54c13.png"},function(e,t,n){"undefined"!=typeof self&&self,e.exports=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=0)}([function(e,t,n){"use strict";(function(t){var n=t.AudioContext||t.webkitAudioContext,r=function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.isRecordingSupported())throw new Error("Recording is not supported in this browser");this.state="inactive",this.config=Object.assign({bufferLength:4096,encoderApplication:2049,encoderFrameSize:20,encoderPath:"encoderWorker.min.js",encoderSampleRate:48e3,maxFramesPerPage:40,mediaTrackConstraints:!0,monitorGain:0,numberOfChannels:1,recordingGain:1,resampleQuality:3,streamPages:!1,wavBitDepth:16,sourceNode:{context:null}},n),this.encodedSamplePosition=0,this.initAudioContext(),this.initialize=this.initWorklet().then((function(){return t.initEncoder()}))};r.isRecordingSupported=function(){var e=t.navigator&&t.navigator.mediaDevices&&t.navigator.mediaDevices.getUserMedia;return n&&e&&t.WebAssembly},r.version="8.0.3",r.prototype.clearStream=function(){this.stream&&(this.stream.getTracks?this.stream.getTracks().forEach((function(e){return e.stop()})):this.stream.stop())},r.prototype.close=function(){return this.monitorGainNode.disconnect(),this.recordingGainNode.disconnect(),this.sourceNode&&this.sourceNode.disconnect(),this.clearStream(),this.encoder&&(this.encoderNode.disconnect(),this.encoder.postMessage({command:"close"})),this.config.sourceNode.context?Promise.resolve():this.audioContext.close()},r.prototype.encodeBuffers=function(e){if("recording"===this.state){for(var t=[],n=0;n<e.numberOfChannels;n++)t[n]=e.getChannelData(n);this.encoder.postMessage({command:"encode",buffers:t})}},r.prototype.initAudioContext=function(){this.audioContext=this.config.sourceNode.context?this.config.sourceNode.context:new n,this.monitorGainNode=this.audioContext.createGain(),this.setMonitorGain(this.config.monitorGain),this.recordingGainNode=this.audioContext.createGain(),this.setRecordingGain(this.config.recordingGain)},r.prototype.initEncoder=function(){var e=this;this.audioContext.audioWorklet?(this.encoderNode=new AudioWorkletNode(this.audioContext,"encoder-worklet",{numberOfOutputs:0}),this.encoder=this.encoderNode.port):(console.log("audioWorklet support not detected. Falling back to scriptProcessor"),this.encodeBuffers=function(){return delete e.encodeBuffers},this.encoderNode=this.audioContext.createScriptProcessor(this.config.bufferLength,this.config.numberOfChannels,this.config.numberOfChannels),this.encoderNode.onaudioprocess=function(t){var n=t.inputBuffer;return e.encodeBuffers(n)},this.encoderNode.connect(this.audioContext.destination),this.encoder=new t.Worker(this.config.encoderPath))},r.prototype.initSourceNode=function(){var e=this;return this.config.sourceNode.context?(this.sourceNode=this.config.sourceNode,Promise.resolve()):t.navigator.mediaDevices.getUserMedia({audio:this.config.mediaTrackConstraints}).then((function(t){e.stream=t,e.sourceNode=e.audioContext.createMediaStreamSource(t)}))},r.prototype.initWorker=function(){var e=this,t=(this.config.streamPages?this.streamPage:this.storePage).bind(this);return this.recordedPages=[],this.totalLength=0,new Promise((function(n){e.encoder.addEventListener("message",(function r(o){var i=o.data;switch(i.message){case"ready":n();break;case"page":e.encodedSamplePosition=i.samplePosition,t(i.page);break;case"done":e.encoder.removeEventListener("message",r),e.finish()}})),e.encoder.start&&e.encoder.start();var r=e.config,o=(r.sourceNode,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(r,["sourceNode"]));e.encoder.postMessage(Object.assign({command:"init",originalSampleRate:e.audioContext.sampleRate,wavSampleRate:e.audioContext.sampleRate},o))}))},r.prototype.initWorklet=function(){return this.audioContext.audioWorklet?this.audioContext.audioWorklet.addModule(this.config.encoderPath):Promise.resolve()},r.prototype.pause=function(e){var t=this;if("recording"===this.state)return this.state="paused",this.recordingGainNode.disconnect(),e&&this.config.streamPages?new Promise((function(e){t.encoder.addEventListener("message",(function n(r){"flushed"===r.data.message&&(t.encoder.removeEventListener("message",n),t.onpause(),e())})),t.encoder.start&&t.encoder.start(),t.encoder.postMessage({command:"flush"})})):(this.onpause(),Promise.resolve())},r.prototype.resume=function(){"paused"===this.state&&(this.state="recording",this.recordingGainNode.connect(this.encoderNode),this.onresume())},r.prototype.setRecordingGain=function(e){this.config.recordingGain=e,this.recordingGainNode&&this.audioContext&&this.recordingGainNode.gain.setTargetAtTime(e,this.audioContext.currentTime,.01)},r.prototype.setMonitorGain=function(e){this.config.monitorGain=e,this.monitorGainNode&&this.audioContext&&this.monitorGainNode.gain.setTargetAtTime(e,this.audioContext.currentTime,.01)},r.prototype.start=function(){var e=this;return"inactive"===this.state?(this.state="loading",this.encodedSamplePosition=0,this.audioContext.resume().then((function(){return e.initialize})).then((function(){return Promise.all([e.initSourceNode(),e.initWorker()])})).then((function(){e.state="recording",e.encoder.postMessage({command:"getHeaderPages"}),e.sourceNode.connect(e.monitorGainNode),e.sourceNode.connect(e.recordingGainNode),e.monitorGainNode.connect(e.audioContext.destination),e.recordingGainNode.connect(e.encoderNode),e.onstart()})).catch((function(t){throw e.state="inactive",t}))):Promise.resolve()},r.prototype.stop=function(){var e=this;return"paused"===this.state||"recording"===this.state?(this.state="inactive",this.recordingGainNode.connect(this.encoderNode),this.monitorGainNode.disconnect(),this.clearStream(),new Promise((function(t){e.encoder.addEventListener("message",(function n(r){"done"===r.data.message&&(e.encoder.removeEventListener("message",n),t())})),e.encoder.start&&e.encoder.start(),e.encoder.postMessage({command:"done"})}))):Promise.resolve()},r.prototype.storePage=function(e){this.recordedPages.push(e),this.totalLength+=e.length},r.prototype.streamPage=function(e){this.ondataavailable(e)},r.prototype.finish=function(){if(!this.config.streamPages){var e=new Uint8Array(this.totalLength);this.recordedPages.reduce((function(t,n){return e.set(n,t),t+n.length}),0),this.ondataavailable(e)}this.onstop()},r.prototype.ondataavailable=function(){},r.prototype.onpause=function(){},r.prototype.onresume=function(){},r.prototype.onstart=function(){},r.prototype.onstop=function(){},e.exports=r}).call(this,n(1))},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){e.exports=n.p+"recorder-worklet.342e864.js"},function(e,t){e.exports="img/feather-customised/files.d6a33b8.svg"},function(e,t){e.exports="img/room_replaced.80042bb.svg"},function(e,t){e.exports="img/upload-big.cdac3ea.svg"},function(e,t){e.exports="img/icons-groups.29180b0.svg"},function(e,t){e.exports="img/icons-room-add.bd36e26.svg"},function(e,t){e.exports="img/camera.2f271b6.svg"},function(e,t){e.exports="img/element-icons/brands/apple.5160971.svg"},function(e,t){e.exports="img/element-icons/brands/facebook.c3243cf.svg"},function(e,t){e.exports="img/element-icons/brands/github.bf60283.svg"},function(e,t){e.exports="img/element-icons/brands/gitlab.d4ee177.svg"},function(e,t){e.exports="img/element-icons/brands/google.04f5e48.svg"},function(e,t){e.exports="img/element-icons/brands/twitter.892d1c7.svg"},function(e,t,n){"use strict";t.a={}},function(e,t){e.exports="img/icon-email-user.af133ff.svg"},function(e,t){e.exports="img/icon-address-delete.40c8a04.svg"},function(e,t){e.exports="img/icons-show-stickers.4e420bf.svg"},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return L}));var r,o=n(79),i=n.n(o),a=n(78),s=n.n(a),c=n(142),l=n.n(c),u=n(623),d=n.n(u),h=n(93),p=n(131),m=n(148),g=n(87),f=n(83),_=n(80),b=n(103),v=n(84),y=n(240),E=n(858),S=n(178),w=n(114),C=n(130),T=n(106),x=n(81),k=n(143),F=n(91),O=n(280),R=n(859),D=n(110),I=n(860),A=n(861),N=n(862);function M(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}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let L=Object(x.a)("views.messages.TextualBody")(r=class extends s.a.Component{constructor(t){super(t),i()(this,"contentRef",Object(a.createRef)()),i()(this,"unmounted",!1),i()(this,"pills",[]),i()(this,"onCancelClick",()=>{this.setState({widgetHidden:!0}),e.localStorage&&e.localStorage.setItem("hide_preview_"+this.props.mxEvent.getId(),"1"),this.forceUpdate()}),i()(this,"onEmoteSenderClick",()=>{const e=this.props.mxEvent;f.a.dispatch({action:F.a.ComposerInsert,userId:e.getSender()})}),i()(this,"getEventTileOps",()=>({isWidgetHidden:()=>this.state.widgetHidden,unhideWidget:()=>{this.setState({widgetHidden:!1}),e.localStorage&&e.localStorage.removeItem("hide_preview_"+this.props.mxEvent.getId())}})),i()(this,"onStarterLinkClick",(e,t)=>{t.preventDefault();const n=S.a.sharedInstance();if(!n.hasManager())return void n.openNoManagerDialog();const r=n.getPrimaryManager(),o=r.getScalarClient();o.connect().then(()=>{const t=o.getStarterLink(e),n=r.uiUrl;g.a.createTrackedDialog("Add an integration","",D.a,{title:Object(_.a)("Add an Integration"),description:s.a.createElement("div",null,Object(_.a)("You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?",{integrationsUrl:n})),button:Object(_.a)("Continue"),onFinished(e){if(!e)return;const n=window.screen.width>1024?1024:window.screen.width,r=window.screen.height>800?800:window.screen.height,o=(window.screen.width-n)/2,i=`height=${r}, width=${n}, top=${(window.screen.height-r)/2}, left=${o},`;window.open(t,"_blank",i).opener=null}})})}),i()(this,"openHistoryDialog",async()=>{g.a.createDialog(I.a,{mxEvent:this.props.mxEvent})}),this.state={links:[],widgetHidden:!1}}componentDidMount(){this.props.editState||this.applyFormatting()}applyFormatting(){const e=v.b.getValue("showCodeLineNumbers");if(this.activateSpoilers([this.contentRef.current]),Object(E.a)([this.contentRef.current],this.props.mxEvent,this.pills),p.g(this.contentRef.current),this.calculateUrlPreview(),"org.matrix.custom.html"===this.props.mxEvent.getContent().format){const t=l.a.findDOMNode(this).getElementsByTagName("pre");if(t.length>0)for(let n=0;n<t.length;n++){if("mx_EventTile_pre_container"==t[n].parentElement.className)continue;0==t[n].getElementsByTagName("code").length&&this.addCodeElement(t[n]);const r=this.wrapInDiv(t[n]);this.handleCodeBlockExpansion(t[n]),this.addCodeExpansionButton(r,t[n]),this.addCodeCopyButton(r),e&&this.addLineNumbers(t[n])}const n=l.a.findDOMNode(this).getElementsByTagName("code");n.length>0&&setTimeout(()=>{if(!this.unmounted)for(let e=0;e<n.length;e++)n[e].className.includes("hljs")||this.highlightCode(n[e])},10)}}addCodeElement(e){const t=document.createElement("code");t.append(...e.childNodes),e.appendChild(t)}addCodeExpansionButton(e,t){if(Math.round(t.offsetHeight/k.b.instance.windowHeight*100)<30)return;const n=document.createElement("span");n.className="mx_EventTile_button ","mx_EventTile_collapsedCodeBlock"==t.className?n.className+="mx_EventTile_expandButton":n.className+="mx_EventTile_collapseButton",n.onclick=async()=>{n.className="mx_EventTile_button ","mx_EventTile_collapsedCodeBlock"==t.className?(t.className="",n.className+="mx_EventTile_collapseButton"):(t.className="mx_EventTile_collapsedCodeBlock",n.className+="mx_EventTile_expandButton"),this.props.onHeightChanged()},e.appendChild(n)}addCodeCopyButton(e){const t=document.createElement("span");t.className="mx_EventTile_button mx_EventTile_copyButton ";e.getElementsByClassName("mx_EventTile_button").length>0&&(t.className+="mx_EventTile_buttonBottom"),t.onclick=async()=>{const e=t.parentElement.getElementsByTagName("code")[0],n=await Object(C.c)(e.textContent),r=t.getBoundingClientRect(),{close:o}=b.n(O.a,P(P({},Object(b.p)(r,2)),{},{message:n?Object(_.a)("Copied!"):Object(_.a)("Failed to copy")}));t.onmouseleave=o},e.appendChild(t)}wrapInDiv(e){const t=document.createElement("div");return t.className="mx_EventTile_pre_container",e.parentNode.replaceChild(t,e),t.appendChild(e),t}handleCodeBlockExpansion(e){v.b.getValue("expandCodeByDefault")||(e.className="mx_EventTile_collapsedCodeBlock")}addLineNumbers(e){const t=e.innerHTML.replace(/\n(<\/code>)?$/,"").split(/\n/).length;e.innerHTML='<span class="mx_EventTile_lineNumbers"></span>'+e.innerHTML+"<span></span>";const n=e.getElementsByClassName("mx_EventTile_lineNumbers")[0];for(let e=1;e<=t;e++)n.innerHTML+='<span class="mx_EventTile_lineNumber">'+e+"</span>"}highlightCode(e){if(v.b.getValue("enableSyntaxHighlightLanguageDetection")&&e.parentElement instanceof HTMLPreElement)d.a.highlightBlock(e);else{0!=e.className.split(/\s+/).filter((function(e){return e.startsWith("language-")&&!e.startsWith("language-_")})).length&&d.a.highlightBlock(e)}}componentDidUpdate(e){if(!this.props.editState){const t=e.editState&&!this.props.editState;(e.replacingEventId!==this.props.replacingEventId||t)&&this.applyFormatting()}}componentWillUnmount(){this.unmounted=!0,Object(E.b)(this.pills)}shouldComponentUpdate(e,t){return e.mxEvent.getId()!==this.props.mxEvent.getId()||e.highlights!==this.props.highlights||e.replacingEventId!==this.props.replacingEventId||e.highlightLink!==this.props.highlightLink||e.showUrlPreview!==this.props.showUrlPreview||e.editState!==this.props.editState||t.links!==this.state.links||t.widgetHidden!==this.state.widgetHidden}calculateUrlPreview(){if(this.props.showUrlPreview){let e=this.findLinks([this.contentRef.current]);if(e.length){if(e=Array.from(new Set(e)),this.setState({links:e}),window.localStorage){const e=!!window.localStorage.getItem("hide_preview_"+this.props.mxEvent.getId());this.setState({widgetHidden:e})}}else this.state.links.length&&this.setState({links:[]})}}activateSpoilers(e){let t=e[0];for(;t;){if("SPAN"===t.tagName&&"string"==typeof t.getAttribute("data-mx-spoiler")){const e=document.createElement("span"),n=t.getAttribute("data-mx-spoiler");t.removeAttribute("data-mx-spoiler");const r=s.a.createElement(R.a,{reason:n,contentHtml:t.outerHTML});l.a.render(r,e),t.parentNode.replaceChild(e,t),t=e}t.childNodes&&t.childNodes.length&&this.activateSpoilers(t.childNodes),t=t.nextSibling}}findLinks(e){let t=[];for(let n=0;n<e.length;n++){const r=e[n];if("A"===r.tagName&&r.getAttribute("href"))this.isLinkPreviewable(r)&&t.push(r.getAttribute("href"));else{if("PRE"===r.tagName||"CODE"===r.tagName||"BLOCKQUOTE"===r.tagName)continue;r.children&&r.children.length&&(t=t.concat(this.findLinks(r.children)))}}return t}isLinkPreviewable(e){if(!e.getAttribute("href").startsWith("http://")&&!e.getAttribute("href").startsWith("https://"))return!1;if(e.textContent.indexOf("/")>-1)return!0;{const t=e.getAttribute("href").match(/^https?:\/\/(.*?)(\/|$)/)[1];return!Object(w.d)(t)&&!e.textContent.toLowerCase().trim().startsWith(t.toLowerCase())}}renderEditedMarker(){const e=this.props.mxEvent.replacingEventDate(),t=e&&Object(m.b)(e),n=s.a.createElement("div",null,s.a.createElement("div",{className:"mx_Tooltip_title"},Object(_.a)("Edited at %(date)s",{date:t})),s.a.createElement("div",{className:"mx_Tooltip_sub"},Object(_.a)("Click to view edits")));return s.a.createElement(T.a,{className:"mx_EventTile_edited",onClick:this.openHistoryDialog,title:Object(_.a)("Edited at %(date)s. Click to view edits.",{date:t}),tooltip:n},s.a.createElement("span",null,`(${Object(_.a)("edited")})`))}render(){if(this.props.editState)return s.a.createElement(A.a,{editState:this.props.editState,className:"mx_EventTile_content"});const e=this.props.mxEvent,t=e.getContent(),n=!e.replacingEvent()&&!!y.a.getParentEventId(e);let r,o=p.b(t,this.props.highlights,{disableBigEmoji:t.msgtype===h.b.Emote||!v.b.getValue("TextualBody.enableBigEmoji"),stripReplyFallback:n,ref:this.contentRef,returnString:!1});switch(this.props.replacingEventId&&(o=s.a.createElement(s.a.Fragment,null,o,this.renderEditedMarker())),this.props.highlightLink?o=s.a.createElement("a",{href:this.props.highlightLink},o):t.data&&"string"==typeof t.data["org.matrix.neb.starter_link"]&&(o=s.a.createElement("a",{href:"#",onClick:this.onStarterLinkClick.bind(this,t.data["org.matrix.neb.starter_link"])},o)),this.state.links.length&&!this.state.widgetHidden&&this.props.showUrlPreview&&(r=s.a.createElement(N.a,{links:this.state.links,mxEvent:this.props.mxEvent,onCancelClick:this.onCancelClick,onHeightChanged:this.props.onHeightChanged})),t.msgtype){case h.b.Emote:return s.a.createElement("div",{className:"mx_MEmoteBody mx_EventTile_content"},"* ",s.a.createElement("span",{className:"mx_MEmoteBody_sender",onClick:this.onEmoteSenderClick},e.sender?e.sender.name:e.getSender())," ",o,r);case h.b.Notice:return s.a.createElement("div",{className:"mx_MNoticeBody mx_EventTile_content"},o,r);default:return s.a.createElement("div",{className:"mx_MTextBody mx_EventTile_content"},o,r)}}})||r}).call(this,n(23))},function(e,t){e.exports="img/icon_context_delete.f02c798.svg"},function(e,t){var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,o){void 0===o&&(o=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=o;if(null==e||null==t)throw new Error("Null input. (diff_main)");if(e==t)return e?[new n.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,s=this.diff_commonPrefix(e,t),c=e.substring(0,s);e=e.substring(s),t=t.substring(s),s=this.diff_commonSuffix(e,t);var l=e.substring(e.length-s);e=e.substring(0,e.length-s),t=t.substring(0,t.length-s);var u=this.diff_compute_(e,t,a,i);return c&&u.unshift(new n.Diff(0,c)),l&&u.push(new n.Diff(0,l)),this.diff_cleanupMerge(u),u},n.prototype.diff_compute_=function(e,t,r,o){var i;if(!e)return[new n.Diff(1,t)];if(!t)return[new n.Diff(-1,e)];var a=e.length>t.length?e:t,s=e.length>t.length?t:e,c=a.indexOf(s);if(-1!=c)return i=[new n.Diff(1,a.substring(0,c)),new n.Diff(0,s),new n.Diff(1,a.substring(c+s.length))],e.length>t.length&&(i[0][0]=i[2][0]=-1),i;if(1==s.length)return[new n.Diff(-1,e),new n.Diff(1,t)];var l=this.diff_halfMatch_(e,t);if(l){var u=l[0],d=l[1],h=l[2],p=l[3],m=l[4],g=this.diff_main(u,h,r,o),f=this.diff_main(d,p,r,o);return g.concat([new n.Diff(0,m)],f)}return r&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,o):this.diff_bisect_(e,t,o)},n.prototype.diff_lineMode_=function(e,t,r){var o=this.diff_linesToChars_(e,t);e=o.chars1,t=o.chars2;var i=o.lineArray,a=this.diff_main(e,t,!1,r);this.diff_charsToLines_(a,i),this.diff_cleanupSemantic(a),a.push(new n.Diff(0,""));for(var s=0,c=0,l=0,u="",d="";s<a.length;){switch(a[s][0]){case 1:l++,d+=a[s][1];break;case-1:c++,u+=a[s][1];break;case 0:if(c>=1&&l>=1){a.splice(s-c-l,c+l),s=s-c-l;for(var h=this.diff_main(u,d,!1,r),p=h.length-1;p>=0;p--)a.splice(s,0,h[p]);s+=h.length}l=0,c=0,u="",d=""}s++}return a.pop(),a},n.prototype.diff_bisect_=function(e,t,r){for(var o=e.length,i=t.length,a=Math.ceil((o+i)/2),s=a,c=2*a,l=new Array(c),u=new Array(c),d=0;d<c;d++)l[d]=-1,u[d]=-1;l[s+1]=0,u[s+1]=0;for(var h=o-i,p=h%2!=0,m=0,g=0,f=0,_=0,b=0;b<a&&!((new Date).getTime()>r);b++){for(var v=-b+m;v<=b-g;v+=2){for(var y=s+v,E=(x=v==-b||v!=b&&l[y-1]<l[y+1]?l[y+1]:l[y-1]+1)-v;x<o&&E<i&&e.charAt(x)==t.charAt(E);)x++,E++;if(l[y]=x,x>o)g+=2;else if(E>i)m+=2;else if(p){if((C=s+h-v)>=0&&C<c&&-1!=u[C])if(x>=(w=o-u[C]))return this.diff_bisectSplit_(e,t,x,E,r)}}for(var S=-b+f;S<=b-_;S+=2){for(var w,C=s+S,T=(w=S==-b||S!=b&&u[C-1]<u[C+1]?u[C+1]:u[C-1]+1)-S;w<o&&T<i&&e.charAt(o-w-1)==t.charAt(i-T-1);)w++,T++;if(u[C]=w,w>o)_+=2;else if(T>i)f+=2;else if(!p){if((y=s+h-S)>=0&&y<c&&-1!=l[y]){var x;E=s+(x=l[y])-y;if(x>=(w=o-w))return this.diff_bisectSplit_(e,t,x,E,r)}}}}return[new n.Diff(-1,e),new n.Diff(1,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,o){var i=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(i,a,!1,o),u=this.diff_main(s,c,!1,o);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function o(e){for(var t="",o=0,a=-1,s=n.length;a<e.length-1;){-1==(a=e.indexOf("\n",o))&&(a=e.length-1);var c=e.substring(o,a+1);(r.hasOwnProperty?r.hasOwnProperty(c):void 0!==r[c])?t+=String.fromCharCode(r[c]):(s==i&&(c=e.substring(o),a=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),o=a+1}return t}n[0]="";var i=4e4,a=o(e);return i=65535,{chars1:a,chars2:o(t),lineArray:n}},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],o=[],i=0;i<r.length;i++)o[i]=t[r.charCodeAt(i)];e[n][1]=o.join("")}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),o=r,i=0;n<o;)e.substring(i,o)==t.substring(i,o)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),o=r,i=0;n<o;)e.substring(e.length-o,e.length-i)==t.substring(t.length-o,t.length-i)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var o=Math.min(n,r);if(e==t)return o;for(var i=0,a=1;;){var s=e.substring(o-a),c=t.indexOf(s);if(-1==c)return i;a+=c,0!=c&&e.substring(o-a)!=t.substring(0,a)||(i=a,a++)}},n.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;var o=this;function i(e,t,n){for(var r,i,a,s,c=e.substring(n,n+Math.floor(e.length/4)),l=-1,u="";-1!=(l=t.indexOf(c,l+1));){var d=o.diff_commonPrefix(e.substring(n),t.substring(l)),h=o.diff_commonSuffix(e.substring(0,n),t.substring(0,l));u.length<h+d&&(u=t.substring(l-h,l)+t.substring(l,l+d),r=e.substring(0,n-h),i=e.substring(n+d),a=t.substring(0,l-h),s=t.substring(l+d))}return 2*u.length>=e.length?[r,i,a,s,u]:null}var a,s,c,l,u,d=i(n,r,Math.ceil(n.length/4)),h=i(n,r,Math.ceil(n.length/2));return d||h?(a=h?d&&d[4].length>h[4].length?d:h:d,e.length>t.length?(s=a[0],c=a[1],l=a[2],u=a[3]):(l=a[0],u=a[1],s=a[2],c=a[3]),[s,c,l,u,a[4]]):null},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,r=[],o=0,i=null,a=0,s=0,c=0,l=0,u=0;a<e.length;)0==e[a][0]?(r[o++]=a,s=l,c=u,l=0,u=0,i=e[a][1]):(1==e[a][0]?l+=e[a][1].length:u+=e[a][1].length,i&&i.length<=Math.max(s,c)&&i.length<=Math.max(l,u)&&(e.splice(r[o-1],0,new n.Diff(-1,i)),e[r[o-1]+1][0]=1,o--,a=--o>0?r[o-1]:-1,s=0,c=0,l=0,u=0,i=null,t=!0)),a++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a<e.length;){if(-1==e[a-1][0]&&1==e[a][0]){var d=e[a-1][1],h=e[a][1],p=this.diff_commonOverlap_(d,h),m=this.diff_commonOverlap_(h,d);p>=m?(p>=d.length/2||p>=h.length/2)&&(e.splice(a,0,new n.Diff(0,h.substring(0,p))),e[a-1][1]=d.substring(0,d.length-p),e[a+1][1]=h.substring(p),a++):(m>=d.length/2||m>=h.length/2)&&(e.splice(a,0,new n.Diff(0,d.substring(0,m))),e[a-1][0]=1,e[a-1][1]=h.substring(0,h.length-m),e[a+1][0]=-1,e[a+1][1]=d.substring(m),a++),a++}a++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var r=e.charAt(e.length-1),o=t.charAt(0),i=r.match(n.nonAlphaNumericRegex_),a=o.match(n.nonAlphaNumericRegex_),s=i&&r.match(n.whitespaceRegex_),c=a&&o.match(n.whitespaceRegex_),l=s&&r.match(n.linebreakRegex_),u=c&&o.match(n.linebreakRegex_),d=l&&e.match(n.blanklineEndRegex_),h=u&&t.match(n.blanklineStartRegex_);return d||h?5:l||u?4:i&&!s&&c?3:s||c?2:i||a?1:0}for(var r=1;r<e.length-1;){if(0==e[r-1][0]&&0==e[r+1][0]){var o=e[r-1][1],i=e[r][1],a=e[r+1][1],s=this.diff_commonSuffix(o,i);if(s){var c=i.substring(i.length-s);o=o.substring(0,o.length-s),i=c+i.substring(0,i.length-s),a=c+a}for(var l=o,u=i,d=a,h=t(o,i)+t(i,a);i.charAt(0)===a.charAt(0);){o+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);var p=t(o,i)+t(i,a);p>=h&&(h=p,l=o,u=i,d=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=u,d?e[r+1][1]=d:(e.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,r=[],o=0,i=null,a=0,s=!1,c=!1,l=!1,u=!1;a<e.length;)0==e[a][0]?(e[a][1].length<this.Diff_EditCost&&(l||u)?(r[o++]=a,s=l,c=u,i=e[a][1]):(o=0,i=null),l=u=!1):(-1==e[a][0]?u=!0:l=!0,i&&(s&&c&&l&&u||i.length<this.Diff_EditCost/2&&s+c+l+u==3)&&(e.splice(r[o-1],0,new n.Diff(-1,i)),e[r[o-1]+1][0]=1,o--,i=null,s&&c?(l=u=!0,o=0):(a=--o>0?r[o-1]:-1,l=u=!1),t=!0)),a++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push(new n.Diff(0,""));for(var t,r=0,o=0,i=0,a="",s="";r<e.length;)switch(e[r][0]){case 1:i++,s+=e[r][1],r++;break;case-1:o++,a+=e[r][1],r++;break;case 0:o+i>1?(0!==o&&0!==i&&(0!==(t=this.diff_commonPrefix(s,a))&&(r-o-i>0&&0==e[r-o-i-1][0]?e[r-o-i-1][1]+=s.substring(0,t):(e.splice(0,0,new n.Diff(0,s.substring(0,t))),r++),s=s.substring(t),a=a.substring(t)),0!==(t=this.diff_commonSuffix(s,a))&&(e[r][1]=s.substring(s.length-t)+e[r][1],s=s.substring(0,s.length-t),a=a.substring(0,a.length-t))),r-=o+i,e.splice(r,o+i),a.length&&(e.splice(r,0,new n.Diff(-1,a)),r++),s.length&&(e.splice(r,0,new n.Diff(1,s)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,i=0,o=0,a="",s=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;r<e.length-1;)0==e[r-1][0]&&0==e[r+1][0]&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)==e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),c=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),c=!0)),r++;c&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n,r=0,o=0,i=0,a=0;for(n=0;n<e.length&&(1!==e[n][0]&&(r+=e[n][1].length),-1!==e[n][0]&&(o+=e[n][1].length),!(r>t));n++)i=r,a=o;return e.length!=n&&-1===e[n][0]?a:a+(t-i)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,r=/</g,o=/>/g,i=/\n/g,a=0;a<e.length;a++){var s=e[a][0],c=e[a][1].replace(n,"&").replace(r,"<").replace(o,">").replace(i,"¶<br>");switch(s){case 1:t[a]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case-1:t[a]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[a]="<span>"+c+"</span>"}}return t.join("")},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,r=0,o=0;o<e.length;o++){var i=e[o][0],a=e[o][1];switch(i){case 1:n+=a.length;break;case-1:r+=a.length;break;case 0:t+=Math.max(n,r),n=0,r=0}}return t+=Math.max(n,r)},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case 1:t[n]="+"+encodeURI(e[n][1]);break;case-1:t[n]="-"+e[n][1].length;break;case 0:t[n]="="+e[n][1].length}return t.join("\t").replace(/%20/g," ")},n.prototype.diff_fromDelta=function(e,t){for(var r=[],o=0,i=0,a=t.split(/\t/g),s=0;s<a.length;s++){var c=a[s].substring(1);switch(a[s].charAt(0)){case"+":try{r[o++]=new n.Diff(1,decodeURI(c))}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var l=parseInt(c,10);if(isNaN(l)||l<0)throw new Error("Invalid number in diff_fromDelta: "+c);var u=e.substring(i,i+=l);"="==a[s].charAt(0)?r[o++]=new n.Diff(0,u):r[o++]=new n.Diff(-1,u);break;default:if(a[s])throw new Error("Invalid diff operation in diff_fromDelta: "+a[s])}}if(i!=e.length)throw new Error("Delta length ("+i+") does not equal source text length ("+e.length+").");return r},n.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),o=this;function i(e,r){var i=e/t.length,a=Math.abs(n-r);return o.Match_Distance?i+a/o.Match_Distance:a?1:i}var a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(i(0,s),a),-1!=(s=e.lastIndexOf(t,n+t.length))&&(a=Math.min(i(0,s),a)));var c,l,u=1<<t.length-1;s=-1;for(var d,h=t.length+e.length,p=0;p<t.length;p++){for(c=0,l=h;c<l;)i(p,n+l)<=a?c=l:h=l,l=Math.floor((h-c)/2+c);h=l;var m=Math.max(1,n-l+1),g=Math.min(n+l,e.length)+t.length,f=Array(g+2);f[g+1]=(1<<p)-1;for(var _=g;_>=m;_--){var b=r[e.charAt(_-1)];if(f[_]=0===p?(f[_+1]<<1|1)&b:(f[_+1]<<1|1)&b|(d[_+1]|d[_])<<1|1|d[_+1],f[_]&u){var v=i(p,_-1);if(v<=a){if(a=v,!((s=_-1)>n))break;m=Math.max(1,2*n-s)}}}if(i(p+1,n)>a)break;d=f}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(0!=t.length){if(null===e.start2)throw Error("patch not initialized");for(var r=t.substring(e.start2,e.start2+e.length1),o=0;t.indexOf(r)!=t.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)o+=this.Patch_Margin,r=t.substring(e.start2-o,e.start2+e.length1+o);o+=this.Patch_Margin;var i=t.substring(e.start2-o,e.start2);i&&e.diffs.unshift(new n.Diff(0,i));var a=t.substring(e.start2+e.length1,e.start2+e.length1+o);a&&e.diffs.push(new n.Diff(0,a)),e.start1-=i.length,e.start2-=i.length,e.length1+=i.length+a.length,e.length2+=i.length+a.length}},n.prototype.patch_make=function(e,t,r){var o,i;if("string"==typeof e&&"string"==typeof t&&void 0===r)o=e,(i=this.diff_main(o,t,!0)).length>2&&(this.diff_cleanupSemantic(i),this.diff_cleanupEfficiency(i));else if(e&&"object"==typeof e&&void 0===t&&void 0===r)i=e,o=this.diff_text1(i);else if("string"==typeof e&&t&&"object"==typeof t&&void 0===r)o=e,i=t;else{if("string"!=typeof e||"string"!=typeof t||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");o=e,i=r}if(0===i.length)return[];for(var a=[],s=new n.patch_obj,c=0,l=0,u=0,d=o,h=o,p=0;p<i.length;p++){var m=i[p][0],g=i[p][1];switch(c||0===m||(s.start1=l,s.start2=u),m){case 1:s.diffs[c++]=i[p],s.length2+=g.length,h=h.substring(0,u)+g+h.substring(u);break;case-1:s.length1+=g.length,s.diffs[c++]=i[p],h=h.substring(0,u)+h.substring(u+g.length);break;case 0:g.length<=2*this.Patch_Margin&&c&&i.length!=p+1?(s.diffs[c++]=i[p],s.length1+=g.length,s.length2+=g.length):g.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(s,d),a.push(s),s=new n.patch_obj,c=0,d=h,l=u)}1!==m&&(l+=g.length),-1!==m&&(u+=g.length)}return c&&(this.patch_addContext_(s,d),a.push(s)),a},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var o=e[r],i=new n.patch_obj;i.diffs=[];for(var a=0;a<o.diffs.length;a++)i.diffs[a]=new n.Diff(o.diffs[a][0],o.diffs[a][1]);i.start1=o.start1,i.start2=o.start2,i.length1=o.length1,i.length2=o.length2,t[r]=i}return t},n.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var r=0,o=[],i=0;i<e.length;i++){var a,s,c=e[i].start2+r,l=this.diff_text1(e[i].diffs),u=-1;if(l.length>this.Match_MaxBits?-1!=(a=this.match_main(t,l.substring(0,this.Match_MaxBits),c))&&(-1==(u=this.match_main(t,l.substring(l.length-this.Match_MaxBits),c+l.length-this.Match_MaxBits))||a>=u)&&(a=-1):a=this.match_main(t,l,c),-1==a)o[i]=!1,r-=e[i].length2-e[i].length1;else if(o[i]=!0,r=a-c,l==(s=-1==u?t.substring(a,a+l.length):t.substring(a,u+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[i].diffs)+t.substring(a+l.length);else{var d=this.diff_main(l,s,!1);if(l.length>this.Match_MaxBits&&this.diff_levenshtein(d)/l.length>this.Patch_DeleteThreshold)o[i]=!1;else{this.diff_cleanupSemanticLossless(d);for(var h,p=0,m=0;m<e[i].diffs.length;m++){var g=e[i].diffs[m];0!==g[0]&&(h=this.diff_xIndex(d,p)),1===g[0]?t=t.substring(0,a+h)+g[1]+t.substring(a+h):-1===g[0]&&(t=t.substring(0,a+h)+t.substring(a+this.diff_xIndex(d,p+g[1].length))),-1!==g[0]&&(p+=g[1].length)}}}}return[t=t.substring(n.length,t.length-n.length),o]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,r="",o=1;o<=t;o++)r+=String.fromCharCode(o);for(o=0;o<e.length;o++)e[o].start1+=t,e[o].start2+=t;var i=e[0],a=i.diffs;if(0==a.length||0!=a[0][0])a.unshift(new n.Diff(0,r)),i.start1-=t,i.start2-=t,i.length1+=t,i.length2+=t;else if(t>a[0][1].length){var s=t-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],i.start1-=s,i.start2-=s,i.length1+=s,i.length2+=s}if(0==(a=(i=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new n.Diff(0,r)),i.length1+=t,i.length2+=t;else if(t>a[a.length-1][1].length){s=t-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,s),i.length1+=s,i.length2+=s}return r},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,r=0;r<e.length;r++)if(!(e[r].length1<=t)){var o=e[r];e.splice(r--,1);for(var i=o.start1,a=o.start2,s="";0!==o.diffs.length;){var c=new n.patch_obj,l=!0;for(c.start1=i-s.length,c.start2=a-s.length,""!==s&&(c.length1=c.length2=s.length,c.diffs.push(new n.Diff(0,s)));0!==o.diffs.length&&c.length1<t-this.Patch_Margin;){var u=o.diffs[0][0],d=o.diffs[0][1];1===u?(c.length2+=d.length,a+=d.length,c.diffs.push(o.diffs.shift()),l=!1):-1===u&&1==c.diffs.length&&0==c.diffs[0][0]&&d.length>2*t?(c.length1+=d.length,i+=d.length,l=!1,c.diffs.push(new n.Diff(u,d)),o.diffs.shift()):(d=d.substring(0,t-c.length1-this.Patch_Margin),c.length1+=d.length,i+=d.length,0===u?(c.length2+=d.length,a+=d.length):l=!1,c.diffs.push(new n.Diff(u,d)),d==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(d.length))}s=(s=this.diff_text2(c.diffs)).substring(s.length-this.Patch_Margin);var h=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==h&&(c.length1+=h.length,c.length2+=h.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=h:c.diffs.push(new n.Diff(0,h))),l||e.splice(++r,0,c)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},n.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var r=e.split("\n"),o=0,i=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;o<r.length;){var a=r[o].match(i);if(!a)throw new Error("Invalid patch string: "+r[o]);var s=new n.patch_obj;for(t.push(s),s.start1=parseInt(a[1],10),""===a[2]?(s.start1--,s.length1=1):"0"==a[2]?s.length1=0:(s.start1--,s.length1=parseInt(a[2],10)),s.start2=parseInt(a[3],10),""===a[4]?(s.start2--,s.length2=1):"0"==a[4]?s.length2=0:(s.start2--,s.length2=parseInt(a[4],10)),o++;o<r.length;){var c=r[o].charAt(0);try{var l=decodeURI(r[o].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+l)}if("-"==c)s.diffs.push(new n.Diff(-1,l));else if("+"==c)s.diffs.push(new n.Diff(1,l));else if(" "==c)s.diffs.push(new n.Diff(0,l));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+l)}o++}}return t},(n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],n=0;n<this.diffs.length;n++){switch(this.diffs[n][0]){case 1:e="+";break;case-1:e="-";break;case 0:e=" "}t[n+1]=e+encodeURI(this.diffs[n][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=n,e.exports.diff_match_patch=n,e.exports.DIFF_DELETE=-1,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},function(e,t,n){"use strict";function r(e,t,n){var o;return"#text"===e.nodeName?o=n.document.createTextNode(e.data):"#comment"===e.nodeName?o=n.document.createComment(e.data):(t?o=n.document.createElementNS("http://www.w3.org/2000/svg",e.nodeName):"svg"===e.nodeName.toLowerCase()?(o=n.document.createElementNS("http://www.w3.org/2000/svg","svg"),t=!0):o=n.document.createElement(e.nodeName),e.attributes&&Object.entries(e.attributes).forEach((function(e){var t=e[0],n=e[1];return o.setAttribute(t,n)})),e.childNodes&&e.childNodes.forEach((function(e){return o.appendChild(r(e,t,n))})),n.valueDiffing&&(e.value&&(o.value=e.value),e.checked&&(o.checked=e.checked),e.selected&&(o.selected=e.selected))),o}function o(e,t){for(t=t.slice();t.length>0;){if(!e.childNodes)return!1;var n=t.splice(0,1)[0];e=e.childNodes[n]}return e}function i(e,t,n){var i,a,s,c,l=o(e,t[n._const.route]),u={diff:t,node:l};if(n.preDiffApply(u))return!0;switch(t[n._const.action]){case n._const.addAttribute:if(!l||!l.setAttribute)return!1;l.setAttribute(t[n._const.name],t[n._const.value]);break;case n._const.modifyAttribute:if(!l||!l.setAttribute)return!1;l.setAttribute(t[n._const.name],t[n._const.newValue]),"INPUT"===l.nodeName&&"value"===t[n._const.name]&&(l.value=t[n._const.newValue]);break;case n._const.removeAttribute:if(!l||!l.removeAttribute)return!1;l.removeAttribute(t[n._const.name]);break;case n._const.modifyTextElement:if(!l||3!==l.nodeType)return!1;n.textDiff(l,l.data,t[n._const.oldValue],t[n._const.newValue]);break;case n._const.modifyValue:if(!l||void 0===l.value)return!1;l.value=t[n._const.newValue];break;case n._const.modifyComment:if(!l||void 0===l.data)return!1;n.textDiff(l,l.data,t[n._const.oldValue],t[n._const.newValue]);break;case n._const.modifyChecked:if(!l||void 0===l.checked)return!1;l.checked=t[n._const.newValue];break;case n._const.modifySelected:if(!l||void 0===l.selected)return!1;l.selected=t[n._const.newValue];break;case n._const.replaceElement:l.parentNode.replaceChild(r(t[n._const.newValue],"http://www.w3.org/2000/svg"===l.namespaceURI,n),l);break;case n._const.relocateGroup:Array.apply(void 0,new Array(t.groupLength)).map((function(){return l.removeChild(l.childNodes[t[n._const.from]])})).forEach((function(e,r){0===r&&(a=l.childNodes[t[n._const.to]]),l.insertBefore(e,a||null)}));break;case n._const.removeElement:l.parentNode.removeChild(l);break;case n._const.addElement:c=(s=t[n._const.route].slice()).splice(s.length-1,1)[0],(l=o(e,s)).insertBefore(r(t[n._const.element],"http://www.w3.org/2000/svg"===l.namespaceURI,n),l.childNodes[c]||null);break;case n._const.removeTextElement:if(!l||3!==l.nodeType)return!1;l.parentNode.removeChild(l);break;case n._const.addTextElement:if(c=(s=t[n._const.route].slice()).splice(s.length-1,1)[0],i=n.document.createTextNode(t[n._const.value]),!(l=o(e,s))||!l.childNodes)return!1;l.insertBefore(i,l.childNodes[c]||null);break;default:console.log("unknown action")}return u.newNode=i,n.postDiffApply(u),!0}function a(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){var t=this;void 0===e&&(e={}),Object.entries(e).forEach((function(e){var n=e[0],r=e[1];return t[n]=r}))};function c(e){var t=[];return t.push(e.nodeName),"#text"!==e.nodeName&&"#comment"!==e.nodeName&&e.attributes&&(e.attributes.class&&t.push(e.nodeName+"."+e.attributes.class.replace(/ /g,".")),e.attributes.id&&t.push(e.nodeName+"#"+e.attributes.id)),t}function l(e){var t={},n={};return e.forEach((function(e){c(e).forEach((function(e){var r=e in t;r||e in n?r&&(delete t[e],n[e]=!0):t[e]=!0}))})),t}function u(e,t){var n=l(e),r=l(t),o={};return Object.keys(n).forEach((function(e){r[e]&&(o[e]=!0)})),o}function d(e){return delete e.outerDone,delete e.innerDone,delete e.valueDone,!e.childNodes||e.childNodes.every(d)}function h(e,t){if(!["nodeName","value","checked","selected","data"].every((function(n){return e[n]===t[n]})))return!1;if(Boolean(e.attributes)!==Boolean(t.attributes))return!1;if(Boolean(e.childNodes)!==Boolean(t.childNodes))return!1;if(e.attributes){var n=Object.keys(e.attributes),r=Object.keys(t.attributes);if(n.length!==r.length)return!1;if(!n.every((function(n){return e.attributes[n]===t.attributes[n]})))return!1}if(e.childNodes){if(e.childNodes.length!==t.childNodes.length)return!1;if(!e.childNodes.every((function(e,n){return h(e,t.childNodes[n])})))return!1}return!0}function p(e,t,n,r,o){if(!e||!t)return!1;if(e.nodeName!==t.nodeName)return!1;if("#text"===e.nodeName)return!!o||e.data===t.data;if(e.nodeName in n)return!0;if(e.attributes&&t.attributes){if(e.attributes.id){if(e.attributes.id!==t.attributes.id)return!1;if(e.nodeName+"#"+e.attributes.id in n)return!0}if(e.attributes.class&&e.attributes.class===t.attributes.class&&e.nodeName+"."+e.attributes.class.replace(/ /g,".")in n)return!0}if(r)return!0;var i=e.childNodes?e.childNodes.slice().reverse():[],a=t.childNodes?t.childNodes.slice().reverse():[];if(i.length!==a.length)return!1;if(o)return i.every((function(e,t){return e.nodeName===a[t].nodeName}));var s=u(i,a);return i.every((function(e,t){return p(e,a[t],s,!0,!0)}))}function m(e){return JSON.parse(JSON.stringify(e))}function g(e,t,n,r){var o=0,i=[],a=e.length,s=t.length,l=Array.apply(void 0,new Array(a+1)).map((function(){return[]})),d=u(e,t),h=a===s;h&&e.some((function(e,n){var r=c(e),o=c(t[n]);return r.length!==o.length?(h=!1,!0):(r.some((function(e,t){if(e!==o[t])return h=!1,!0})),!h||void 0)}));for(var m=0;m<a;m++)for(var g=e[m],f=0;f<s;f++){var _=t[f];n[m]||r[f]||!p(g,_,d,h)?l[m+1][f+1]=0:(l[m+1][f+1]=l[m][f]?l[m][f]+1:1,l[m+1][f+1]>=o&&(o=l[m+1][f+1],i=[m+1,f+1]))}return 0!==o&&{oldValue:i[0]-o,newValue:i[1]-o,length:o}}function f(e,t){return Array.apply(void 0,new Array(e)).map((function(){return t}))}s.prototype.toString=function(){return JSON.stringify(this)},s.prototype.setValue=function(e,t){return this[e]=t,this};var _=function(){this.list=[]};function b(e,t){var n,r,o=e;for(t=t.slice();t.length>0;){if(!o.childNodes)return!1;r=t.splice(0,1)[0],n=o,o=o.childNodes[r]}return{node:o,parentNode:n,nodeIndex:r}}function v(e,t,n){return t.forEach((function(t){!function(e,t,n){var r,o,i,a=b(e,t[n._const.route]),s=a.node,c=a.parentNode,l=a.nodeIndex,u=[],d={diff:t,node:s};if(n.preVirtualDiffApply(d))return!0;switch(t[n._const.action]){case n._const.addAttribute:s.attributes||(s.attributes={}),s.attributes[t[n._const.name]]=t[n._const.value],"checked"===t[n._const.name]?s.checked=!0:"selected"===t[n._const.name]?s.selected=!0:"INPUT"===s.nodeName&&"value"===t[n._const.name]&&(s.value=t[n._const.value]);break;case n._const.modifyAttribute:s.attributes[t[n._const.name]]=t[n._const.newValue];break;case n._const.removeAttribute:delete s.attributes[t[n._const.name]],0===Object.keys(s.attributes).length&&delete s.attributes,"checked"===t[n._const.name]?s.checked=!1:"selected"===t[n._const.name]?delete s.selected:"INPUT"===s.nodeName&&"value"===t[n._const.name]&&delete s.value;break;case n._const.modifyTextElement:s.data=t[n._const.newValue];break;case n._const.modifyValue:s.value=t[n._const.newValue];break;case n._const.modifyComment:s.data=t[n._const.newValue];break;case n._const.modifyChecked:s.checked=t[n._const.newValue];break;case n._const.modifySelected:s.selected=t[n._const.newValue];break;case n._const.replaceElement:(r=m(t[n._const.newValue])).outerDone=!0,r.innerDone=!0,r.valueDone=!0,c.childNodes[l]=r;break;case n._const.relocateGroup:s.childNodes.splice(t[n._const.from],t.groupLength).reverse().forEach((function(e){return s.childNodes.splice(t[n._const.to],0,e)})),s.subsets&&s.subsets.forEach((function(e){if(t[n._const.from]<t[n._const.to]&&e.oldValue<=t[n._const.to]&&e.oldValue>t[n._const.from]){e.oldValue-=t.groupLength;var r=e.oldValue+e.length-t[n._const.to];r>0&&(u.push({oldValue:t[n._const.to]+t.groupLength,newValue:e.newValue+e.length-r,length:r}),e.length-=r)}else if(t[n._const.from]>t[n._const.to]&&e.oldValue>t[n._const.to]&&e.oldValue<t[n._const.from]){e.oldValue+=t.groupLength;var o=e.oldValue+e.length-t[n._const.to];o>0&&(u.push({oldValue:t[n._const.to]+t.groupLength,newValue:e.newValue+e.length-o,length:o}),e.length-=o)}else e.oldValue===t[n._const.from]&&(e.oldValue=t[n._const.to])}));break;case n._const.removeElement:c.childNodes.splice(l,1),c.subsets&&c.subsets.forEach((function(e){e.oldValue>l?e.oldValue-=1:e.oldValue===l?e.delete=!0:e.oldValue<l&&e.oldValue+e.length>l&&(e.oldValue+e.length-1===l?e.length--:(u.push({newValue:e.newValue+l-e.oldValue,oldValue:l,length:e.length-l+e.oldValue-1}),e.length=l-e.oldValue))})),s=c;break;case n._const.addElement:o=t[n._const.route].slice(),i=o.splice(o.length-1,1)[0],s=b(e,o).node,(r=m(t[n._const.element])).outerDone=!0,r.innerDone=!0,r.valueDone=!0,s.childNodes||(s.childNodes=[]),i>=s.childNodes.length?s.childNodes.push(r):s.childNodes.splice(i,0,r),s.subsets&&s.subsets.forEach((function(e){if(e.oldValue>=i)e.oldValue+=1;else if(e.oldValue<i&&e.oldValue+e.length>i){var t=e.oldValue+e.length-i;u.push({newValue:e.newValue+e.length-t,oldValue:i+1,length:t}),e.length-=t}}));break;case n._const.removeTextElement:c.childNodes.splice(l,1),"TEXTAREA"===c.nodeName&&delete c.value,c.subsets&&c.subsets.forEach((function(e){e.oldValue>l?e.oldValue-=1:e.oldValue===l?e.delete=!0:e.oldValue<l&&e.oldValue+e.length>l&&(e.oldValue+e.length-1===l?e.length--:(u.push({newValue:e.newValue+l-e.oldValue,oldValue:l,length:e.length-l+e.oldValue-1}),e.length=l-e.oldValue))})),s=c;break;case n._const.addTextElement:o=t[n._const.route].slice(),i=o.splice(o.length-1,1)[0],(r={}).nodeName="#text",r.data=t[n._const.value],(s=b(e,o).node).childNodes||(s.childNodes=[]),i>=s.childNodes.length?s.childNodes.push(r):s.childNodes.splice(i,0,r),"TEXTAREA"===s.nodeName&&(s.value=t[n._const.newValue]),s.subsets&&s.subsets.forEach((function(e){if(e.oldValue>=i&&(e.oldValue+=1),e.oldValue<i&&e.oldValue+e.length>i){var t=e.oldValue+e.length-i;u.push({newValue:e.newValue+e.length-t,oldValue:i+1,length:t}),e.length-=t}}));break;default:console.log("unknown action")}s.subsets&&(s.subsets=s.subsets.filter((function(e){return!e.delete&&e.oldValue!==e.newValue})),u.length&&(s.subsets=s.subsets.concat(u))),d.newNode=r,n.postVirtualDiffApply(d)}(e,t,n)})),!0}function y(e,t){void 0===t&&(t={});var n={};return n.nodeName=e.nodeName,"#text"===n.nodeName||"#comment"===n.nodeName?n.data=e.data:(e.attributes&&e.attributes.length>0&&(n.attributes={},Array.prototype.slice.call(e.attributes).forEach((function(e){return n.attributes[e.name]=e.value}))),"TEXTAREA"===n.nodeName?n.value=e.value:e.childNodes&&e.childNodes.length>0&&(n.childNodes=[],Array.prototype.slice.call(e.childNodes).forEach((function(e){return n.childNodes.push(y(e,t))}))),t.valueDiffing&&(void 0!==e.checked&&e.type&&["radio","checkbox"].includes(e.type.toLowerCase())?n.checked=e.checked:void 0!==e.value&&(n.value=e.value),void 0!==e.selected&&(n.selected=e.selected))),n}_.prototype.add=function(e){var t;(t=this.list).push.apply(t,e)},_.prototype.forEach=function(e){this.list.forEach((function(t){return e(t)}))};var E=/<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g,S=Object.create?Object.create(null):{},w=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function C(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}var T={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuItem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function x(e){var t={nodeName:"",attributes:{}},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.nodeName=n[1].toUpperCase(),(T[n[1].toLowerCase()]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.nodeName.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",data:-1!==r?e.slice(4,r):""}}for(var o=new RegExp(w),i=null,a=!1;!a;)if(null===(i=o.exec(e)))a=!0;else if(i[0].trim())if(i[1]){var s=i[1].trim(),c=[s,""];s.indexOf("=")>-1&&(c=s.split("=")),t.attributes[c[0]]=c[1],o.lastIndex--}else i[2]&&(t.attributes[i[2]]=i[3].trim().substring(1,i[3].length-1));return t}function k(e){return function e(t){return delete t.voidElement,t.childNodes&&t.childNodes.forEach((function(t){return e(t)})),t}(function(e,t){void 0===t&&(t={components:S});var n,r=[],o=-1,i=[],a=!1;return e.replace(E,(function(s,c){if(a){if(s!=="</"+n.nodeName+">")return;a=!1}var l,u="/"!==s.charAt(1),d=s.startsWith("\x3c!--"),h=c+s.length,p=e.charAt(h);if(d){var m=x(s);return o<0?(r.push(m),r):((l=i[o])&&(l.childNodes||(l.childNodes=[]),l.childNodes.push(m)),r)}if(u&&(n=x(s),o++,"tag"===n.type&&t.components[n.nodeName]&&(n.type="component",a=!0),n.voidElement||a||!p||"<"===p||(n.childNodes||(n.childNodes=[]),n.childNodes.push({nodeName:"#text",data:C(e.slice(h,e.indexOf("<",h)))})),0===o&&r.push(n),(l=i[o-1])&&(l.childNodes||(l.childNodes=[]),l.childNodes.push(n)),i[o]=n),(!u||n.voidElement)&&(o--,!a&&"<"!==p&&p)){l=-1===o?r:i[o].childNodes||[];var g=e.indexOf("<",h),f=C(e.slice(h,-1===g?void 0:g));l.push({nodeName:"#text",data:f})}})),r[0]}(e))}var F=function(e,t,n){this.options=n,this.t1=e instanceof HTMLElement?y(e,this.options):"string"==typeof e?k(e,this.options):JSON.parse(JSON.stringify(e)),this.t2=t instanceof HTMLElement?y(t,this.options):"string"==typeof t?k(t,this.options):JSON.parse(JSON.stringify(t)),this.diffcount=0,this.foundAll=!1,this.debug&&(this.t1Orig=y(e,this.options),this.t2Orig=y(t,this.options)),this.tracker=new _};F.prototype.init=function(){return this.findDiffs(this.t1,this.t2)},F.prototype.findDiffs=function(e,t){var n;do{if(this.options.debug&&(this.diffcount+=1,this.diffcount>this.options.diffcap))throw window.diffError=[this.t1Orig,this.t2Orig],new Error("surpassed diffcap:"+JSON.stringify(this.t1Orig)+" -> "+JSON.stringify(this.t2Orig));0===(n=this.findNextDiff(e,t,[])).length&&(h(e,t)||(this.foundAll?console.error("Could not find remaining diffs!"):(this.foundAll=!0,d(e),n=this.findNextDiff(e,t,[])))),n.length>0&&(this.foundAll=!1,this.tracker.add(n),v(e,n,this.options))}while(n.length>0);return this.tracker.list},F.prototype.findNextDiff=function(e,t,n){var r,o;if(this.options.maxDepth&&n.length>this.options.maxDepth)return[];if(!e.outerDone){if(r=this.findOuterDiff(e,t,n),this.options.filterOuterDiff&&(o=this.options.filterOuterDiff(e,t,r))&&(r=o),r.length>0)return e.outerDone=!0,r;e.outerDone=!0}if(!e.innerDone){if((r=this.findInnerDiff(e,t,n)).length>0)return r;e.innerDone=!0}if(this.options.valueDiffing&&!e.valueDone){if((r=this.findValueDiff(e,t,n)).length>0)return e.valueDone=!0,r;e.valueDone=!0}return[]},F.prototype.findOuterDiff=function(e,t,n){var r,o,i,a,c,l,u=[];if(e.nodeName!==t.nodeName){if(!n.length)throw new Error("Top level nodes have to be of the same kind.");return[(new s).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(e)).setValue(this.options._const.newValue,m(t)).setValue(this.options._const.route,n)]}if(n.length&&this.options.maxNodeDiffCount<Math.abs((e.childNodes||[]).length-(t.childNodes||[]).length))return[(new s).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(e)).setValue(this.options._const.newValue,m(t)).setValue(this.options._const.route,n)];if(e.data!==t.data)return"#text"===e.nodeName?[(new s).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,n).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)]:[(new s).setValue(this.options._const.action,this.options._const.modifyComment).setValue(this.options._const.route,n).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)];for(o=e.attributes?Object.keys(e.attributes).sort():[],i=t.attributes?Object.keys(t.attributes).sort():[],a=o.length,l=0;l<a;l++)r=o[l],-1===(c=i.indexOf(r))?u.push((new s).setValue(this.options._const.action,this.options._const.removeAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,r).setValue(this.options._const.value,e.attributes[r])):(i.splice(c,1),e.attributes[r]!==t.attributes[r]&&u.push((new s).setValue(this.options._const.action,this.options._const.modifyAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,r).setValue(this.options._const.oldValue,e.attributes[r]).setValue(this.options._const.newValue,t.attributes[r])));for(a=i.length,l=0;l<a;l++)r=i[l],u.push((new s).setValue(this.options._const.action,this.options._const.addAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,r).setValue(this.options._const.value,t.attributes[r]));return u},F.prototype.findInnerDiff=function(e,t,n){var r=e.childNodes?e.childNodes.slice():[],o=t.childNodes?t.childNodes.slice():[],i=Math.max(r.length,o.length),a=Math.abs(r.length-o.length),c=[],l=0;if(!this.options.maxChildCount||i<this.options.maxChildCount){var u=e.subsets&&e.subsetsAge--?e.subsets:e.childNodes&&t.childNodes?function(e,t){for(var n=e.childNodes?e.childNodes:[],r=t.childNodes?t.childNodes:[],o=f(n.length,!1),i=f(r.length,!1),a=[],s=!0,c=function(){return arguments[1]};s;)(s=g(n,r,o,i))&&(a.push(s),Array.apply(void 0,new Array(s.length)).map(c).forEach((function(e){return t=e,o[s.oldValue+t]=!0,void(i[s.newValue+t]=!0);var t})));return e.subsets=a,e.subsetsAge=100,a}(e,t):[];if(u.length>0&&(c=this.attemptGroupRelocation(e,t,u,n)).length>0)return c}for(var d=0;d<i;d+=1){var p=r[d],_=o[d];a&&(p&&!_?"#text"===p.nodeName?(c.push((new s).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.value,p.data)),l-=1):(c.push((new s).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.element,m(p))),l-=1):_&&!p&&("#text"===_.nodeName?c.push((new s).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.value,_.data)):c.push((new s).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.element,m(_))))),p&&_&&(!this.options.maxChildCount||i<this.options.maxChildCount?c=c.concat(this.findNextDiff(p,_,n.concat(l))):h(p,_)||(r.length>o.length?("#text"===p.nodeName?c.push((new s).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.value,p.data)):c.push((new s).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.element,m(p)).setValue(this.options._const.route,n.concat(l))),r.splice(d,1),d-=1,l-=1,a-=1):r.length<o.length?(c=c.concat([(new s).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.element,m(_)).setValue(this.options._const.route,n.concat(l))]),r.splice(d,0,{}),a-=1):c=c.concat([(new s).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(p)).setValue(this.options._const.newValue,m(_)).setValue(this.options._const.route,n.concat(l))]))),l+=1}return e.innerDone=!0,c},F.prototype.attemptGroupRelocation=function(e,t,n,r){for(var o,i,a,c,l,u,d=function(e,t,n){var r=e.childNodes?f(e.childNodes.length,!0):[],o=t.childNodes?f(t.childNodes.length,!0):[],i=0;return n.forEach((function(e){for(var t=e.oldValue+e.length,n=e.newValue+e.length,a=e.oldValue;a<t;a+=1)r[a]=i;for(var s=e.newValue;s<n;s+=1)o[s]=i;i+=1})),{gaps1:r,gaps2:o}}(e,t,n),h=d.gaps1,g=d.gaps2,_=Math.min(h.length,g.length),b=[],v=0,y=0;v<_;y+=1,v+=1)if(!0===h[v])if("#text"===(c=e.childNodes[y]).nodeName)if("#text"===t.childNodes[v].nodeName){if(c.data!==t.childNodes[v].data){for(u=y;e.childNodes.length>u+1&&"#text"===e.childNodes[u+1].nodeName;)if(u+=1,t.childNodes[v].data===e.childNodes[u].data){l=!0;break}if(!l)return b.push((new s).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,r.concat(v)).setValue(this.options._const.oldValue,c.data).setValue(this.options._const.newValue,t.childNodes[v].data)),b}}else b.push((new s).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,r.concat(v)).setValue(this.options._const.value,c.data)),h.splice(v,1),_=Math.min(h.length,g.length),v-=1;else b.push((new s).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,r.concat(v)).setValue(this.options._const.element,m(c))),h.splice(v,1),_=Math.min(h.length,g.length),v-=1;else if(!0===g[v])"#text"===(c=t.childNodes[v]).nodeName?(b.push((new s).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,r.concat(v)).setValue(this.options._const.value,c.data)),h.splice(v,0,!0),_=Math.min(h.length,g.length),y-=1):(b.push((new s).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,r.concat(v)).setValue(this.options._const.element,m(c))),h.splice(v,0,!0),_=Math.min(h.length,g.length),y-=1);else if(h[v]!==g[v]){if(b.length>0)return b;if(a=n[h[v]],(i=Math.min(a.newValue,e.childNodes.length-a.length))!==a.oldValue){o=!1;for(var E=0;E<a.length;E+=1)p(e.childNodes[i+E],e.childNodes[a.oldValue+E],[],!1,!0)||(o=!0);if(o)return[(new s).setValue(this.options._const.action,this.options._const.relocateGroup).setValue("groupLength",a.length).setValue(this.options._const.from,a.oldValue).setValue(this.options._const.to,i).setValue(this.options._const.route,r)]}}return b},F.prototype.findValueDiff=function(e,t,n){var r=[];return e.selected!==t.selected&&r.push((new s).setValue(this.options._const.action,this.options._const.modifySelected).setValue(this.options._const.oldValue,e.selected).setValue(this.options._const.newValue,t.selected).setValue(this.options._const.route,n)),(e.value||t.value)&&e.value!==t.value&&"OPTION"!==e.nodeName&&r.push((new s).setValue(this.options._const.action,this.options._const.modifyValue).setValue(this.options._const.oldValue,e.value||"").setValue(this.options._const.newValue,t.value||"").setValue(this.options._const.route,n)),e.checked!==t.checked&&r.push((new s).setValue(this.options._const.action,this.options._const.modifyChecked).setValue(this.options._const.oldValue,e.checked).setValue(this.options._const.newValue,t.checked).setValue(this.options._const.route,n)),r};var O={debug:!1,diffcap:10,maxDepth:!1,maxChildCount:50,valueDiffing:!0,textDiff:function(e,t,n,r){e.data=r},preVirtualDiffApply:function(){},postVirtualDiffApply:function(){},preDiffApply:function(){},postDiffApply:function(){},filterOuterDiff:null,compress:!1,_const:!1,document:!(!window||!window.document)&&window.document},R=function(e){var t=this;if(void 0===e&&(e={}),this.options=e,Object.entries(O).forEach((function(e){var n=e[0],r=e[1];Object.prototype.hasOwnProperty.call(t.options,n)||(t.options[n]=r)})),!this.options._const){var n=["addAttribute","modifyAttribute","removeAttribute","modifyTextElement","relocateGroup","removeElement","addElement","removeTextElement","addTextElement","replaceElement","modifyValue","modifyChecked","modifySelected","modifyComment","action","route","oldValue","newValue","element","group","from","to","name","value","data","attributes","nodeName","childNodes","checked","selected"];this.options._const={},this.options.compress?n.forEach((function(e,n){return t.options._const[e]=n})):n.forEach((function(e){return t.options._const[e]=e}))}this.DiffFinder=F};R.prototype.apply=function(e,t){return function(e,t,n){return t.every((function(t){return i(e,t,n)}))}(e,t,this.options)},R.prototype.undo=function(e,t){return function(e,t,n){t.length||(t=[t]),(t=t.slice()).reverse(),t.forEach((function(t){!function(e,t,n){switch(t[n._const.action]){case n._const.addAttribute:t[n._const.action]=n._const.removeAttribute,i(e,t,n);break;case n._const.modifyAttribute:a(t,n._const.oldValue,n._const.newValue),i(e,t,n);break;case n._const.removeAttribute:t[n._const.action]=n._const.addAttribute,i(e,t,n);break;case n._const.modifyTextElement:case n._const.modifyValue:case n._const.modifyComment:case n._const.modifyChecked:case n._const.modifySelected:case n._const.replaceElement:a(t,n._const.oldValue,n._const.newValue),i(e,t,n);break;case n._const.relocateGroup:a(t,n._const.from,n._const.to),i(e,t,n);break;case n._const.removeElement:t[n._const.action]=n._const.addElement,i(e,t,n);break;case n._const.addElement:t[n._const.action]=n._const.removeElement,i(e,t,n);break;case n._const.removeTextElement:t[n._const.action]=n._const.addTextElement,i(e,t,n);break;case n._const.addTextElement:t[n._const.action]=n._const.removeTextElement,i(e,t,n);break;default:console.log("unknown action")}}(e,t,n)}))}(e,t,this.options)},R.prototype.diff=function(e,t){return new this.DiffFinder(e,t,this.options).init()};var D=function(e){var t=this;void 0===e&&(e={}),this.pad="│ ",this.padding="",this.tick=1,this.messages=[];var n=function(e,n){var r=e[n];e[n]=function(){for(var o=[],i=arguments.length;i--;)o[i]=arguments[i];t.fin(n,Array.prototype.slice.call(o));var a=r.apply(e,o);return t.fout(n,a),a}};for(var r in e)"function"==typeof e[r]&&n(e,r);this.log("┌ TRACELOG START")};D.prototype.fin=function(e,t){this.padding+=this.pad,this.log("├─> entering "+e,t)},D.prototype.fout=function(e,t){this.log("│<──┘ generated return value",t),this.padding=this.padding.substring(0,this.padding.length-this.pad.length)},D.prototype.format=function(e,t){return function(e){for(e=""+e;e.length<4;)e="0"+e;return e}(t)+"> "+this.padding+e},D.prototype.log=function(){var e=Array.prototype.slice.call(arguments),t=function(e){return e?"string"==typeof e?e:e instanceof HTMLElement?e.outerHTML||"<empty>":e instanceof Array?"["+e.map(t).join(",")+"]":e.toString()||e.valueOf()||"<unknown>":"<falsey>"};e=e.map(t).join(", "),this.messages.push(this.format(e,this.tick++))},D.prototype.toString=function(){for(var e="└───";e.length<=this.padding.length+this.pad.length;)e+="× ";var t=this.padding;return this.padding="",e=this.format(e,this.tick),this.padding=t,this.messages.join("\n")+"\n"+e},t.DiffDOM=R,t.TraceLogger=D,t.nodeToObj=y,t.stringToObj=k},function(e,t,n){"use strict";(function(e){var t=n(134),r=n(10),o=n.n(r),i=n(1399),a=n.n(i);let s;t.request((function(e,t){return e.qs=a.a.stringify(e.qs||{},e.qsStringifyOptions),o()(e,t)}));try{s=e.indexedDB}catch(e){}s&&t.setCryptoStoreFactory((function(){return new t.IndexedDBCryptoStore(s,"matrix-js-sdk:crypto")}));e.matrixcs=t}).call(this,n(23))},function(e,t,n){"use strict";var r=n(1400),o=n(1410),i=n(500);e.exports={formats:i,parse:o,stringify:r}},function(e,t,n){"use strict";var r=n(1401),o=n(865),i=n(500),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,c(t)?t:[t])},d=Date.prototype.toISOString,h=i.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},m=function e(t,n,i,a,s,l,d,h,m,g,f,_,b,v,y){var E,S=t;if(y.has(t))throw new RangeError("Cyclic object value");if("function"==typeof d?S=d(n,S):S instanceof Date?S=g(S):"comma"===i&&c(S)&&(S=o.maybeMap(S,(function(e){return e instanceof Date?g(e):e}))),null===S){if(a)return l&&!b?l(n,p.encoder,v,"key",f):n;S=""}if("string"==typeof(E=S)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||o.isBuffer(S))return l?[_(b?n:l(n,p.encoder,v,"key",f))+"="+_(l(S,p.encoder,v,"value",f))]:[_(n)+"="+_(String(S))];var w,C=[];if(void 0===S)return C;if("comma"===i&&c(S))w=[{value:S.length>0?S.join(",")||null:void 0}];else if(c(d))w=d;else{var T=Object.keys(S);w=h?T.sort(h):T}for(var x=0;x<w.length;++x){var k=w[x],F="object"==typeof k&&void 0!==k.value?k.value:S[k];if(!s||null!==F){var O=c(S)?"function"==typeof i?i(n,k):n:n+(m?"."+k:"["+k+"]");y.set(t,!0);var R=r();u(C,e(F,O,i,a,s,l,d,h,m,g,f,_,b,v,R))}}return C};e.exports=function(e,t){var n,o=e,l=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=i.formatters[n],o=p.filter;return("function"==typeof e.filter||c(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof l.filter?o=(0,l.filter)("",o):c(l.filter)&&(n=l.filter);var d,h=[];if("object"!=typeof o||null===o)return"";d=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var g=s[d];n||(n=Object.keys(o)),l.sort&&n.sort(l.sort);for(var f=r(),_=0;_<n.length;++_){var b=n[_];l.skipNulls&&null===o[b]||u(h,m(o[b],b,g,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,f))}var v=h.join(l.delimiter),y=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""}},function(e,t,n){"use strict";var r=n(498),o=n(1406),i=n(1408),a=r("%TypeError%"),s=r("%WeakMap%",!0),c=r("%Map%",!0),l=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),h=o("Map.prototype.get",!0),p=o("Map.prototype.set",!0),m=o("Map.prototype.has",!0),g=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return l(e,r)}else if(c){if(t)return h(t,r)}else if(n)return function(e,t){var n=g(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return d(e,r)}else if(c){if(t)return m(t,r)}else if(n)return function(e,t){return!!g(e,t)}(n,r);return!1},set:function(r,o){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),u(e,r,o)):c?(t||(t=new c),p(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=g(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1403);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",o=Array.prototype.slice,i=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==i.call(t))throw new TypeError(r+t);for(var n,a=o.call(arguments,1),s=function(){if(this instanceof n){var r=t.apply(this,a.concat(o.call(arguments)));return Object(r)===r?r:this}return t.apply(e,a.concat(o.call(arguments)))},c=Math.max(0,t.length-a.length),l=[],u=0;u<c;u++)l.push("$"+u);if(n=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var d=function(){};d.prototype=t.prototype,n.prototype=new d,d.prototype=null}return n}},function(e,t,n){"use strict";var r=n(499);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var r=n(498),o=n(1407),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},function(e,t,n){"use strict";var r=n(499),o=n(498),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||r.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=s(r,a,arguments);if(c&&l){var n=c(t,"length");n.configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var d=function(){return s(r,i,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d},function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&c&&"function"==typeof c.get?c.get:null,u=s&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,f=Function.prototype.toString,_=String.prototype.match,b="function"==typeof BigInt?BigInt.prototype.valueOf:null,v=Object.getOwnPropertySymbols,y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,E="function"==typeof Symbol&&"object"==typeof Symbol.iterator,S=Object.prototype.propertyIsEnumerable,w=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),C=n(1409).custom,T=C&&R(C)?C:null,x="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function k(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return String(e).replace(/"/g,""")}function O(e){return!("[object Array]"!==A(e)||x&&"object"==typeof e&&x in e)}function R(e){if(E)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!y)return!1;try{return y.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,o){var s=n||{};if(I(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(I(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!I(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(I(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,n){if(t.length>n.maxStringLength){var r=t.length-n.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return e(t.slice(0,n.maxStringLength),n)+o}return k(t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,M),"single",n)}(t,s);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var g=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=g&&g>0&&"object"==typeof t)return O(t)?"[Array]":"[Object]";var v=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=Array(e.indent+1).join(" ")}return{base:n,prev:Array(t+1).join(n)}}(s,r);if(void 0===o)o=[];else if(N(o,t)>=0)return"[Circular]";function S(t,n,i){if(n&&(o=o.slice()).push(n),i){var a={depth:s.depth};return I(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if("function"==typeof t){var C=function(e){if(e.name)return e.name;var t=_.call(f.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),D=B(t,S);return"[Function"+(C?": "+C:" (anonymous)")+"]"+(D.length>0?" { "+D.join(", ")+" }":"")}if(R(t)){var G=E?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):y.call(t);return"object"!=typeof t||E?G:P(G)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var V="<"+String(t.nodeName).toLowerCase(),q=t.attributes||[],H=0;H<q.length;H++)V+=" "+q[H].name+"="+k(F(q[H].value),"double",s);return V+=">",t.childNodes&&t.childNodes.length&&(V+="..."),V+="</"+String(t.nodeName).toLowerCase()+">"}if(O(t)){if(0===t.length)return"[]";var z=B(t,S);return v&&!function(e){for(var t=0;t<e.length;t++)if(N(e[t],"\n")>=0)return!1;return!0}(z)?"["+U(z,v)+"]":"[ "+z.join(", ")+" ]"}if(function(e){return!("[object Error]"!==A(e)||x&&"object"==typeof e&&x in e)}(t)){var W=B(t,S);return 0===W.length?"["+String(t)+"]":"{ ["+String(t)+"] "+W.join(", ")+" }"}if("object"==typeof t&&c){if(T&&"function"==typeof t[T])return t[T]();if("symbol"!==c&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var K=[];return a.call(t,(function(e,n){K.push(S(n,t,!0)+" => "+S(e,t))})),j("Map",i.call(t),K,v)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var Y=[];return u.call(t,(function(e){Y.push(S(e,t))})),j("Set",l.call(t),Y,v)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return L("WeakMap");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return L("WeakSet");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(t))return L("WeakRef");if(function(e){return!("[object Number]"!==A(e)||x&&"object"==typeof e&&x in e)}(t))return P(S(Number(t)));if(function(e){if(!e||"object"!=typeof e||!b)return!1;try{return b.call(e),!0}catch(e){}return!1}(t))return P(S(b.call(t)));if(function(e){return!("[object Boolean]"!==A(e)||x&&"object"==typeof e&&x in e)}(t))return P(m.call(t));if(function(e){return!("[object String]"!==A(e)||x&&"object"==typeof e&&x in e)}(t))return P(S(String(t)));if(!function(e){return!("[object Date]"!==A(e)||x&&"object"==typeof e&&x in e)}(t)&&!function(e){return!("[object RegExp]"!==A(e)||x&&"object"==typeof e&&x in e)}(t)){var $=B(t,S),Q=w?w(t)===Object.prototype:t instanceof Object||t.constructor===Object,J=t instanceof Object?"":"null prototype",X=!Q&&x&&Object(t)===t&&x in t?A(t).slice(8,-1):J?"Object":"",Z=(Q||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(X||J?"["+[].concat(X||[],J||[]).join(": ")+"] ":"");return 0===$.length?Z+"{}":v?Z+"{"+U($,v)+"}":Z+"{ "+$.join(", ")+" }"}return String(t)};var D=Object.prototype.hasOwnProperty||function(e){return e in this};function I(e,t){return D.call(e,t)}function A(e){return g.call(e)}function N(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function M(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function P(e){return"Object("+e+")"}function L(e){return e+" { ? }"}function j(e,t,n,r){return e+" ("+t+") {"+(r?U(n,r):n.join(", "))+"}"}function U(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+e.join(","+n)+"\n"+t.prev}function B(e,t){var n=O(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=I(e,o)?t(e[o],e):""}var i,a="function"==typeof v?v(e):[];if(E){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)I(e,c)&&(n&&String(Number(c))===c&&c<e.length||E&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof v)for(var l=0;l<a.length;l++)S.call(e,a[l])&&r.push("["+t(a[l])+"]: "+t(e[a[l]],e));return r}},,function(e,t,n){"use strict";var r=n(865),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=s?i.slice(0,s.index):i,u=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var d=0;n.depth>0&&null!==(s=a.exec(i))&&d<n.depth;){if(d+=1,!n.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+i.slice(s.index)+"]"),function(e,t,n,r){for(var o=r?t:c(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=o:a[l]=o:a={0:o}}o=a}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,l={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=u.split(t.delimiter,d),p=-1,m=t.charset;if(t.charsetSentinel)for(n=0;n<h.length;++n)0===h[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===h[n]?m="utf-8":"utf8=%26%2310003%3B"===h[n]&&(m="iso-8859-1"),p=n,n=h.length);for(n=0;n<h.length;++n)if(n!==p){var g,f,_=h[n],b=_.indexOf("]="),v=-1===b?_.indexOf("="):b+1;-1===v?(g=t.decoder(_,a.decoder,m,"key"),f=t.strictNullHandling?null:""):(g=t.decoder(_.slice(0,v),a.decoder,m,"key"),f=r.maybeMap(c(_.slice(v+1),t),(function(e){return t.decoder(e,a.decoder,m,"value")}))),f&&t.interpretNumericEntities&&"iso-8859-1"===m&&(f=s(f)),_.indexOf("[]=")>-1&&(f=i(f)?[f]:f),o.call(l,g)?l[g]=r.combine(l[g],f):l[g]=f}return l}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),p=0;p<h.length;++p){var m=h[p],g=l(m,u[m],n,"string"==typeof e);d=r.merge(d,g,n)}return!0===n.allowSparse?d:r.compact(d)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{async supportsEventIndexing(){return!0}async initEventIndex(e,t){throw new Error("Unimplemented")}async addEventToIndex(e,t){throw new Error("Unimplemented")}async deleteEvent(e){throw new Error("Unimplemented")}async isEventIndexEmpty(){throw new Error("Unimplemented")}indexIsEmpty(){throw new Error("Unimplemented")}isRoomIndexed(e){throw new Error("Unimplemented")}async getStats(){throw new Error("Unimplemented")}async getUserVersion(){throw new Error("Unimplemented")}async setUserVersion(e){throw new Error("Unimplemented")}async commitLiveEvents(){throw new Error("Unimplemented")}async searchEventIndex(e){throw new Error("Unimplemented")}async addHistoricEvents(e,t,n){throw new Error("Unimplemented")}async addCrawlerCheckpoint(e){throw new Error("Unimplemented")}async removeCrawlerCheckpoint(e){throw new Error("Unimplemented")}async loadCheckpoints(){throw new Error("Unimplemented")}async loadFileEvents(e){throw new Error("Unimplemented")}async closeEventIndex(){throw new Error("Unimplemented")}async deleteEventIndex(){throw new Error("Unimplemented")}}},,function(e,t,n){var r;!function(o,i){"use strict";var a="model",s="name",c="type",l="vendor",u="version",d="mobile",h="tablet",p="smarttv",m={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e,t){return e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),void 0===t?e:e.substring(0,255)}},g={rgx:function(e,t){for(var n,r,o,i,a,s,c=0;c<t.length&&!a;){var l=t[c],u=t[c+1];for(n=r=0;n<l.length&&!a;)if(a=l[n++].exec(e))for(o=0;o<u.length;o++)s=a[++r],"object"==typeof(i=u[o])&&i.length>0?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;c+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(m.has(t[n][r],e))return"?"===n?void 0:n}else if(m.has(t[n],e))return"?"===n?void 0:n;return e}},f={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},_={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[s,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[s,u],[/opios[\/\s]+([\w\.]+)/i],[u,[s,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[u,[s,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[s,u],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[u,[s,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[u,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[u,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[s,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[u,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[u,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],u],[/focus\/([\w\.]+)/i],[u,[s,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[u,[s,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[u,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[s,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[u,[s,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[u,[s,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],u],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[s,u],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[s],[/;fbav\/([\w\.]+);/i],[u,[s,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[s,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[s,u],[/\bgsa\/([\w\.]+)\s.*safari\//i],[u,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[u,[s,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],u],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[u,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[s,u],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[u,[s,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[u,s],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[s,[u,g.str,f.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[s,u],[/(navigator|netscape)\/([\w\.-]+)/i],[[s,"Netscape"],u],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[u,[s,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[s,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",m.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",m.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",m.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[a,[l,"Samsung"],[c,h]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[a,[l,"Samsung"],[c,d]],[/\((ip(?:hone|od)[\s\w]*);/i],[a,[l,"Apple"],[c,d]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[l,"Apple"],[c,h]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[a,[l,"Huawei"],[c,h]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[a,[l,"Huawei"],[c,d]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[a,/_/g," "],[l,"Xiaomi"],[c,d]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[a,/_/g," "],[l,"Xiaomi"],[c,h]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[a,[l,"OPPO"],[c,d]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[a,[l,"Vivo"],[c,d]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[a,[l,"Realme"],[c,d]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[a,[l,"Motorola"],[c,d]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[a,[l,"Motorola"],[c,h]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[a,[l,"LG"],[c,h]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[a,[l,"LG"],[c,d]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[a,[l,"Lenovo"],[c,h]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[a,/_/g," "],[l,"Nokia"],[c,d]],[/droid.+;\s(pixel\sc)[\s)]/i],[a,[l,"Google"],[c,h]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[a,[l,"Google"],[c,d]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[l,"Sony"],[c,d]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[a,"Xperia Tablet"],[l,"Sony"],[c,h]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[a,[l,"OnePlus"],[c,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[a,[l,"Amazon"],[c,h]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[a,"Fire Phone"],[l,"Amazon"],[c,d]],[/\((playbook);[\w\s\),;-]+(rim)/i],[a,l,[c,h]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[a,[l,"BlackBerry"],[c,d]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[a,[l,"ASUS"],[c,h]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[a,[l,"ASUS"],[c,d]],[/(nexus\s9)/i],[a,[l,"HTC"],[c,h]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[l,[a,/_/g," "],[c,d]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[a,[l,"Acer"],[c,h]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[a,[l,"Meizu"],[c,d]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[l,a,[c,d]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[l,a,[c,h]],[/\s(surface\sduo)\s/i],[a,[l,"Microsoft"],[c,h]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[a,[l,"Fairphone"],[c,d]],[/\s(u304aa)\sbuild/i],[a,[l,"AT&T"],[c,d]],[/sie-(\w*)/i],[a,[l,"Siemens"],[c,d]],[/[;\/]\s?(rct\w+)\sbuild/i],[a,[l,"RCA"],[c,h]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[a,[l,"Dell"],[c,h]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[a,[l,"Verizon"],[c,h]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[a,[l,"Barnes & Noble"],[c,h]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[a,[l,"NuVision"],[c,h]],[/;\s(k88)\sbuild/i],[a,[l,"ZTE"],[c,h]],[/;\s(nx\d{3}j)\sbuild/i],[a,[l,"ZTE"],[c,d]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[a,[l,"Swiss"],[c,d]],[/[;\/]\s?(zur\d{3})\sbuild/i],[a,[l,"Swiss"],[c,h]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[a,[l,"Zeki"],[c,h]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[l,"Dragon Touch"],a,[c,h]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[a,[l,"Insignia"],[c,h]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[a,[l,"NextBook"],[c,h]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[l,"Voice"],a,[c,d]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[l,"LvTel"],a,[c,d]],[/;\s(ph-1)\s/i],[a,[l,"Essential"],[c,d]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[a,[l,"Envizen"],[c,h]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[a,[l,"MachSpeed"],[c,h]],[/[;\/]\s?tu_(1491)\sbuild/i],[a,[l,"Rotor"],[c,h]],[/(shield[\w\s]+)\sbuild/i],[a,[l,"Nvidia"],[c,h]],[/(sprint)\s(\w+)/i],[l,a,[c,d]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[l,"Microsoft"],[c,d]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[l,"Zebra"],[c,h]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[l,"Zebra"],[c,d]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[l,a,[c,"console"]],[/droid.+;\s(shield)\sbuild/i],[a,[l,"Nvidia"],[c,"console"]],[/(playstation\s[345portablevi]+)/i],[a,[l,"Sony"],[c,"console"]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[a,[l,"Microsoft"],[c,"console"]],[/smart-tv.+(samsung)/i],[l,[c,p]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[l,"Samsung"],[c,p]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[l,"LG"],[c,p]],[/(apple)\s?tv/i],[l,[a,"Apple TV"],[c,p]],[/crkey/i],[[a,"Chromecast"],[l,"Google"],[c,p]],[/droid.+aft([\w])(\sbuild\/|\))/i],[a,[l,"Amazon"],[c,p]],[/\(dtv[\);].+(aquos)/i],[a,[l,"Sharp"],[c,p]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[l,m.trim],[a,m.trim],[c,p]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[c,p]],[/((pebble))app\/[\d\.]+\s/i],[l,a,[c,"wearable"]],[/droid.+;\s(glass)\s\d/i],[a,[l,"Google"],[c,"wearable"]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[a,[l,"Zebra"],[c,"wearable"]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[l,[c,"embedded"]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[a,[c,d]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[a,[c,h]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[c,m.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[a,[l,"Generic"]],[/(phone)/i],[[c,d]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[u,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[s,u],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,s]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[s,u],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[s,[u,g.str,f.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[s,"Windows"],[u,g.str,f.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[s,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[s,"Mac OS"],[u,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[s,u],[/\(bb(10);/i],[u,[s,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[u,[s,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[u,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[u,[s,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[s,"Chromium OS"],u],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[s,u],[/(sunos)\s?([\w\.\d]*)/i],[[s,"Solaris"],u],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[s,u]]},b=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof b))return new b(e,t).getResult();var n=e||(void 0!==o&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),r=t?m.extend(_,t):_;return this.getBrowser=function(){var e={name:void 0,version:void 0};return g.rgx.call(e,n,r.browser),e.major=m.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return g.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return g.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return g.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return g.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n="string"==typeof e&&e.length>255?m.trim(e,255):e,this},this.setUA(n),this};b.VERSION="0.7.28",b.BROWSER={NAME:s,MAJOR:"major",VERSION:u},b.CPU={ARCHITECTURE:"architecture"},b.DEVICE={MODEL:a,VENDOR:l,TYPE:c,CONSOLE:"console",MOBILE:d,SMARTTV:p,TABLET:h,WEARABLE:"wearable",EMBEDDED:"embedded"},b.ENGINE={NAME:s,VERSION:u},b.OS={NAME:s,VERSION:u},void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=b),t.UAParser=b):void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r);var v=void 0!==o&&(o.jQuery||o.Zepto);if(v&&!v.ua){var y=new b;v.ua=y.getResult(),v.ua.get=function(){return y.getUA()},v.ua.set=function(e){y.setUA(e);var t=y.getResult();for(var n in t)v.ua[n]=t[n]}}}("object"==typeof window?window:this)},,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"components",(function(){return zu}));var r,o=n(117),i=n(103),a=n(528),s=n(465),c=n(710),l=n(703),u=n(876),d=n(874),h=n(873),p=n(763),m=n(734),g=n(762),f=n(347),_=n(693),b=n(711),v=n(748),y=n(342),E=n(788),S=n(890),w=n(234),C=n(349),T=n(813),x=n(791),k=n(706),F=n(699),O=n(825),R=n(891),D=n(831),I=n(829),A=n(457),N=n(834),M=n(79),P=n.n(M),L=n(78),j=n.n(L),U=n(487),B=n(81),G=n(145),V=n(350);let q=Object(B.a)("views.audio_messages.DurationClock")(r=class extends j.a.PureComponent{constructor(e){super(e),P()(this,"onTimeUpdate",e=>{this.setState({durationSeconds:e[1]})}),this.state={durationSeconds:this.props.playback.clockInfo.durationSeconds},this.props.playback.clockInfo.liveData.onUpdate(this.onTimeUpdate)}render(){return j.a.createElement(V.a,{seconds:this.state.durationSeconds})}})||r;var H,z,W,K=n(104),Y=n(80),$=n(204),Q=n(281),J=n(211);let X=Object(B.a)("views.audio_messages.SeekBar")((W=z=class extends j.a.PureComponent{constructor(e){super(e),P()(this,"animationFrameFn",new Q.a(()=>this.doUpdate(),()=>requestAnimationFrame(()=>this.animationFrameFn.trigger()))),P()(this,"onChange",e=>{this.props.playback.skipTo(Number(e.target.value)*this.props.playback.clockInfo.durationSeconds)}),this.state={percentage:0},this.props.playback.clockInfo.liveData.onUpdate(()=>this.animationFrameFn.mark())}doUpdate(){this.setState({percentage:Object(J.c)(this.props.playback.clockInfo.timeSeconds,0,this.props.playback.clockInfo.durationSeconds)})}left(){this.props.playback.skipTo(this.props.playback.clockInfo.timeSeconds-5)}right(){this.props.playback.skipTo(this.props.playback.clockInfo.timeSeconds+5)}render(){return j.a.createElement("input",{type:"range",className:"mx_SeekBar",tabIndex:this.props.tabIndex,onChange:this.onChange,min:0,max:1,value:this.state.percentage,step:.001,style:{"--fillTo":this.state.percentage},disabled:this.props.playbackPhase===$.d.Decoding})}},P()(z,"defaultProps",{tabIndex:0}),H=W))||H;var Z,ee=n(488),te=n(489);let ne=Object(B.a)("views.audio_messages.AudioPlayer")(Z=class extends te.a{constructor(...e){super(...e),P()(this,"playPauseRef",Object(L.createRef)()),P()(this,"seekRef",Object(L.createRef)()),P()(this,"onKeyDown",e=>{var t;if(e.key===K.a.SPACE)e.stopPropagation(),null===(t=this.playPauseRef.current)||void 0===t||t.toggleState();else if(e.key===K.a.ARROW_LEFT){var n;e.stopPropagation(),null===(n=this.seekRef.current)||void 0===n||n.left()}else if(e.key===K.a.ARROW_RIGHT){var r;e.stopPropagation(),null===(r=this.seekRef.current)||void 0===r||r.right()}})}renderFileSize(){const e=this.props.playback.sizeBytes;return e?`(${Object(G.a)(e)})`:null}renderComponent(){return j.a.createElement("div",{className:"mx_MediaBody mx_AudioPlayer_container",tabIndex:0,onKeyDown:this.onKeyDown},j.a.createElement("div",{className:"mx_AudioPlayer_primaryContainer"},j.a.createElement(U.a,{playback:this.props.playback,playbackPhase:this.state.playbackPhase,tabIndex:-1,ref:this.playPauseRef}),j.a.createElement("div",{className:"mx_AudioPlayer_mediaInfo"},j.a.createElement("span",{className:"mx_AudioPlayer_mediaName"},this.props.mediaName||Object(Y.a)("Unnamed audio")),j.a.createElement("div",{className:"mx_AudioPlayer_byline"},j.a.createElement(q,{playback:this.props.playback})," ",this.renderFileSize()))),j.a.createElement("div",{className:"mx_AudioPlayer_seek"},j.a.createElement(X,{playback:this.props.playback,tabIndex:-1,playbackPhase:this.state.playbackPhase,ref:this.seekRef}),j.a.createElement(ee.a,{playback:this.props.playback,defaultDisplaySeconds:0})))}})||Z;var re,oe,ie,ae=n(797),se=n(796),ce=n(799),le=n(486),ue=n(485),de=n(356),he=n(821),pe=n(357),me=n(830),ge=n(226),fe=n(828),_e=n(826),be=n(353),ve=n(203),ye=n(493),Ee=n(252),Se=n(832),we=n(352),Ce=n(820),Te=n(120),xe=n(255),ke=n(655),Fe=n(132),Oe=n(119),Re=n(470),De=n(248),Ie=n(728),Ae=n(729),Ne=n(163),Me=n(421),Pe=n(737),Le=n(369),je=n(673),Ue=n(247),Be=n(2),Ge=n(82),Ve=n(83),qe=n(265),He=n(123),ze=n(194),We=n(195),Ke=n(266),Ye=n(236),$e=n(91),Qe=n(86),Je=n.n(Qe),Xe=n(100),Ze=n(1391),et=n.n(Ze);let tt=Object(B.a)("views.elements.AddressTile")((ie=oe=class extends j.a.Component{render(){const e=this.props.address,t=e.displayName||e.address,r=[],o=["mx-user-id","mx-room-id"].includes(e.addressType);o&&e.avatarMxc?r.push(Object(Xe.b)(e.avatarMxc).getSquareThumbnailHttp(25)):"email"===e.addressType&&r.push(et.a);const i=Je()({mx_AddressTile_name:!0,mx_AddressTile_justified:this.props.justified});let a,s=!1;if(o&&e.isKnown){const n=Je()({mx_AddressTile_id:!0,mx_AddressTile_justified:this.props.justified});a=j.a.createElement("div",{className:"mx_AddressTile_mx"},j.a.createElement("div",{className:i},t),this.props.showAddress?j.a.createElement("div",{className:n},e.address):j.a.createElement("div",null))}else if(o){const e=Je()({mx_AddressTile_unknownMx:!0,mx_AddressTile_justified:this.props.justified});a=j.a.createElement("div",{className:e},this.props.address.address)}else if("email"===e.addressType){const t=Je()({mx_AddressTile_email:!0,mx_AddressTile_justified:this.props.justified});let n=null;e.displayName&&(n=j.a.createElement("div",{className:i},e.displayName)),a=j.a.createElement("div",{className:"mx_AddressTile_mx"},j.a.createElement("div",{className:t},e.address),n)}else{s=!0;const e=Je()({mx_AddressTile_unknown:!0,mx_AddressTile_justified:this.props.justified});a=j.a.createElement("div",{className:e},Object(Y.a)("Unknown Address"))}const c=Je()({mx_AddressTile:!0,mx_AddressTile_error:s});let l;return this.props.canDismiss&&(l=j.a.createElement("div",{className:"mx_AddressTile_dismiss",onClick:this.props.onDismissed},j.a.createElement("img",{src:n(1392),width:"9",height:"9"}))),j.a.createElement("div",{className:c},j.a.createElement("div",{className:"mx_AddressTile_avatar"},j.a.createElement(Te.a,{defaultToInitialLetter:!0,width:25,height:25,name:t,title:t,urls:r})),a,l)}},P()(oe,"defaultProps",{canDismiss:!1,onDismissed:function(){},justified:!1}),re=ie))||re;var nt;let rt=Object(B.a)("views.elements.AddressSelector")(nt=class extends j.a.Component{constructor(e){super(e),P()(this,"scrollElement",Object(L.createRef)()),P()(this,"addressListElement",Object(L.createRef)()),P()(this,"moveSelectionTop",()=>{this.state.selected>0&&this.setState({selected:0,hover:!1})}),P()(this,"moveSelectionUp",()=>{this.state.selected>0&&this.setState({selected:this.state.selected-1,hover:!1})}),P()(this,"moveSelectionDown",()=>{this.state.selected<this.maxSelected(this.props.addressList)&&this.setState({selected:this.state.selected+1,hover:!1})}),P()(this,"chooseSelection",()=>{this.selectAddress(this.state.selected)}),P()(this,"onClick",e=>{this.selectAddress(e)}),P()(this,"onMouseEnter",e=>{this.setState({selected:e,hover:!0})}),P()(this,"onMouseLeave",()=>{this.setState({hover:!1})}),P()(this,"selectAddress",e=>{0!==this.props.addressList.length&&(this.props.onSelected(e),this.setState({hover:!1}))}),this.state={selected:void 0===this.props.selected?0:this.props.selected,hover:!1}}UNSAFE_componentWillReceiveProps(e){const t=this.state.selected,n=this.maxSelected(e.addressList);t>n&&this.setState({selected:n})}componentDidUpdate(){if(this.scrollElement.current&&this.props.addressList.length>0&&!this.state.hover){const e=this.addressListElement.current.getBoundingClientRect().height;this.scrollElement.current.scrollTop=this.state.selected*e-e}}createAddressListTiles(){const e=this.maxSelected(this.props.addressList),t=[];if(this.props.addressList.length>0)for(let n=0;n<=e;n++){const e=Je()({mx_AddressSelector_addressListElement:!0,mx_AddressSelector_selected:this.state.selected===n});t.push(j.a.createElement("div",{className:e,onClick:this.onClick.bind(this,n),onMouseEnter:this.onMouseEnter.bind(this,n),onMouseLeave:this.onMouseLeave,key:this.props.addressList[n].addressType+"/"+this.props.addressList[n].address,ref:this.addressListElement},j.a.createElement(tt,{address:this.props.addressList[n],showAddress:this.props.showAddress,justified:!0})))}return t}maxSelected(e){const t=0===e.length?0:e.length-1;return t>this.props.truncateAt-1?this.props.truncateAt-1:t}render(){const e=Je()({mx_AddressSelector:!0,mx_AddressSelector_empty:0===this.props.addressList.length});return j.a.createElement("div",{className:e,ref:this.scrollElement},this.props.header,this.createAddressListTiles())}})||nt;var ot,it,at,st=n(95),ct=n(116);const lt={"mx-user-id":Object(Y.b)("Matrix ID"),"mx-room-id":Object(Y.b)("Matrix Room ID"),email:Object(Y.b)("email address")};let ut=Object(B.a)("views.dialogs.AddressPickerDialog")((at=it=class extends j.a.Component{constructor(e){super(e),P()(this,"textinput",Object(L.createRef)()),P()(this,"addressSelector",Object(L.createRef)()),P()(this,"queryChangedDebouncer",void 0),P()(this,"cancelThreepidLookup",void 0),P()(this,"onButtonClick",()=>{let e=this.state.selectedList.slice();""!==this.textinput.current.value&&(e=this.addAddressesToList([this.textinput.current.value]),null===e)||this.props.onFinished(!0,e)}),P()(this,"onCancel",()=>{this.props.onFinished(!1)}),P()(this,"onKeyDown",e=>{const t=this.textinput.current?this.textinput.current.value:void 0;e.key===K.a.ESCAPE?(e.stopPropagation(),e.preventDefault(),this.props.onFinished(!1)):e.key===K.a.ARROW_UP?(e.stopPropagation(),e.preventDefault(),this.addressSelector.current&&this.addressSelector.current.moveSelectionUp()):e.key===K.a.ARROW_DOWN?(e.stopPropagation(),e.preventDefault(),this.addressSelector.current&&this.addressSelector.current.moveSelectionDown()):this.state.suggestedList.length>0&&[K.a.COMMA,K.a.ENTER,K.a.TAB].includes(e.key)?(e.stopPropagation(),e.preventDefault(),this.addressSelector.current&&this.addressSelector.current.chooseSelection()):0===t.length&&this.state.selectedList.length&&e.key===K.a.BACKSPACE?(e.stopPropagation(),e.preventDefault(),this.onDismissed(this.state.selectedList.length-1)()):e.key===K.a.ENTER?(e.stopPropagation(),e.preventDefault(),""===t?this.onButtonClick():this.addAddressesToList([t])):!t||e.key!==K.a.COMMA&&e.key!==K.a.TAB||(e.stopPropagation(),e.preventDefault(),this.addAddressesToList([t]))}),P()(this,"onQueryChanged",e=>{const t=e.target.value;this.queryChangedDebouncer&&clearTimeout(this.queryChangedDebouncer),t.length>0&&"@"!==t&&t.length>=2?this.queryChangedDebouncer=setTimeout(()=>{"user"===this.props.pickerType?this.props.groupId?this.doNaiveGroupSearch(t):this.state.serverSupportsUserDirectory?this.doUserDirectorySearch(t):this.doLocalSearch(t):"room"===this.props.pickerType?this.props.groupId?this.doNaiveGroupRoomSearch(t):this.doRoomSearch(t):console.error("Unknown pickerType",this.props.pickerType)},200):this.setState({suggestedList:[],query:"",searchError:null})}),P()(this,"onDismissed",e=>()=>{const t=this.state.selectedList.slice();t.splice(e,1),this.setState({selectedList:t,suggestedList:[],query:""}),this.cancelThreepidLookup&&this.cancelThreepidLookup()}),P()(this,"onSelected",e=>{const t=this.state.selectedList.slice();t.push(this.getFilteredSuggestions()[e]),this.setState({selectedList:t,suggestedList:[],query:""}),this.cancelThreepidLookup&&this.cancelThreepidLookup()}),P()(this,"onPaste",e=>{e.preventDefault();const t=e.clipboardData.getData("text");this.addAddressesToList(t.split(/[\s,]+/))}),P()(this,"onUseDefaultIdentityServerClick",e=>{e.preventDefault(),Object(Ke.d)();const{validAddressTypes:t}=this.state;t.push(qe.a.Email),this.setState({validAddressTypes:t})}),P()(this,"onManageSettingsClick",e=>{e.preventDefault(),Ve.a.fire($e.a.ViewUserSettings),this.onCancel()});let t=this.props.validAddressTypes;!Ge.a.get().getIdentityServerUrl()&&t.includes(qe.a.Email)&&(t=t.filter(e=>e!==qe.a.Email)),this.state={invalidAddressError:!1,selectedList:[],busy:!1,searchError:null,serverSupportsUserDirectory:!0,query:"",suggestedList:[],validAddressTypes:t}}componentDidMount(){this.props.focus&&(this.textinput.current.value=this.props.value)}getPlaceholder(){const{placeholder:e}=this.props;return"string"==typeof e?e:e(this.state.validAddressTypes)}doNaiveGroupSearch(e){const t=e.toLowerCase();this.setState({busy:!0,query:e,searchError:null}),Ge.a.get().getGroupUsers(this.props.groupId).then(n=>{const r=[];n.chunk.forEach(e=>{const n=e.user_id.toLowerCase().includes(t),o=(e.displayname||"").toLowerCase().includes(t);(n||o)&&r.push({user_id:e.user_id,avatar_url:e.avatar_url,display_name:e.displayname})}),this.processResults(r,e)}).catch(e=>{console.error("Error whilst searching group rooms: ",e),this.setState({searchError:e.errcode?e.message:Object(Y.a)("Something went wrong!")})}).then(()=>{this.setState({busy:!1})})}doNaiveGroupRoomSearch(e){const t=e.toLowerCase(),n=[];He.a.getGroupRooms(this.props.groupId).forEach(e=>{const r=(e.name||"").toLowerCase().includes(t),o=(e.topic||"").toLowerCase().includes(t),i=(e.canonical_alias||"").toLowerCase().includes(t);(r||o||i)&&n.push({room_id:e.room_id,avatar_url:e.avatar_url,name:e.name||e.canonical_alias})}),this.processResults(n,e),this.setState({busy:!1})}doRoomSearch(e){const t=e.toLowerCase(),n=Ge.a.get().getRooms(),r=[];n.forEach(e=>{let n=1/0;const o=e.currentState.getStateEvents("m.room.name",""),i=o?o.getContent().name:"",a=e.getCanonicalAlias(),s=e.currentState.getStateEvents("m.room.aliases").map(e=>e.getContent().aliases).reduce((e,t)=>e.concat(t),[]),c=(i||"").toLowerCase().includes(t);let l=!1,u=1/0;if(s.forEach(e=>{(e||"").toLowerCase().includes(t)&&(l=!0,u>e.length&&(u=e.length))}),!c&&!l)return;l&&(n=u);const d=e.currentState.getStateEvents("m.room.avatar",""),h=d?d.getContent().url:void 0;r.push({rank:n,room_id:e.roomId,avatar_url:h,name:i||a||s[0]||Object(Y.a)("Unnamed Room")})});const o=r.sort((e,t)=>e.rank-t.rank);this.processResults(o,e),this.setState({busy:!1})}doUserDirectorySearch(e){this.setState({busy:!0,query:e,searchError:null}),Ge.a.get().searchUserDirectory({term:e}).then(t=>{this.state.query===e&&this.processResults(t.results,e)}).catch(t=>{console.error("Error whilst searching user directory: ",t),this.setState({searchError:t.errcode?t.message:Object(Y.a)("Something went wrong!")}),"M_UNRECOGNIZED"===t.errcode&&(this.setState({serverSupportsUserDirectory:!1}),this.doLocalSearch(e))}).then(()=>{this.setState({busy:!1})})}doLocalSearch(e){this.setState({query:e,searchError:null});const t=e.toLowerCase(),n=[];Ge.a.get().getUsers().forEach(e=>{-1===e.userId.toLowerCase().indexOf(t)&&-1===e.displayName.toLowerCase().indexOf(t)||n.push({user_id:e.userId,display_name:e.displayName,avatar_url:e.avatarUrl})}),this.processResults(n,e)}processResults(e,t){const n=[];e.forEach(e=>{if(e.room_id){const t=Ge.a.get(),r=t.getRoom(e.room_id);if(r){const e=r.currentState.getStateEvents("m.room.tombstone","");if(e&&e.getContent()&&e.getContent().replacement_room){if(t.getRoom(e.getContent().replacement_room))return}}n.push({addressType:"mx-room-id",address:e.room_id,displayName:e.name,avatarMxc:e.avatar_url,isKnown:!0})}else(this.props.includeSelf||e.user_id!==Ge.a.get().credentials.userId)&&n.push({addressType:"mx-user-id",address:e.user_id,displayName:e.display_name,avatarMxc:e.avatar_url,isKnown:!0})});const r=Object(qe.c)(t);if(this.state.validAddressTypes.includes(r)){if("email"===r&&!ze.a(t))return void this.setState({searchError:Object(Y.a)("That doesn't look like a valid email address")});n.unshift({addressType:r,address:t,isKnown:!1}),this.cancelThreepidLookup&&this.cancelThreepidLookup(),"email"===r&&this.lookupThreepid(r,t)}this.setState({suggestedList:n,invalidAddressError:!1},()=>{this.addressSelector.current&&this.addressSelector.current.moveSelectionTop()})}addAddressesToList(e){const t=this.state.selectedList.slice();let n=!1;return e.forEach(e=>{e=e.trim();const r=Object(qe.c)(e),o={addressType:r,address:e,isKnown:!1};if(this.state.validAddressTypes.includes(r)){if("mx-user-id"===r){const e=Ge.a.get().getUser(o.address);e&&(o.displayName=e.displayName,o.avatarMxc=e.avatarUrl,o.isKnown=!0)}else if("mx-room-id"===r){const e=Ge.a.get().getRoom(o.address);e&&(o.displayName=e.name,o.isKnown=!0)}}else n=!0;t.push(o)}),this.setState({selectedList:t,suggestedList:[],query:"",invalidAddressError:!!n||this.state.invalidAddressError}),this.cancelThreepidLookup&&this.cancelThreepidLookup(),n?null:t}async lookupThreepid(e,t){let n=!1;if(this.cancelThreepidLookup=function(){n=!0},await Object(Be.H)(500),n)return null;try{const r=new We.a,o=await r.getAccessToken();if(n)return null;const i=await Ge.a.get().lookupThreePid(e,t,void 0,o);if(n||null===i||!i.mxid)return null;const a=await Ge.a.get().getProfileInfo(i.mxid);if(n||null===a)return null;this.setState({suggestedList:[{addressType:e,address:t,displayName:a.displayname,avatarMxc:a.avatar_url,isKnown:!0}]})}catch(e){console.error(e),this.setState({searchError:Object(Y.a)("Something went wrong!")})}}getFilteredSuggestions(){const e={};return this.state.selectedList.forEach(({address:t,addressType:n})=>{e[n]||(e[n]=new Set),e[n].add(t)}),this.state.suggestedList.filter(({address:t,addressType:n})=>!(e[n]&&e[n].has(t)))}render(){let e;this.props.description&&(e=j.a.createElement("div",{className:"mx_AddressPickerDialog_label"},j.a.createElement("label",{htmlFor:"textinput"},this.props.description)));const t=[];if(this.state.selectedList.length>0)for(let e=0;e<this.state.selectedList.length;e++)t.push(j.a.createElement(tt,{key:e,address:this.state.selectedList[e],canDismiss:!0,onDismissed:this.onDismissed(e),showAddress:"user"===this.props.pickerType}));t.push(j.a.createElement("textarea",{key:this.state.selectedList.length,onPaste:this.onPaste,rows:1,id:"textinput",ref:this.textinput,className:"mx_AddressPickerDialog_input",onChange:this.onQueryChanged,placeholder:this.getPlaceholder(),defaultValue:this.props.value,autoFocus:this.props.focus}));const n=this.getFilteredSuggestions();let r,o,i;if(this.state.invalidAddressError){const e=this.state.validAddressTypes.map(e=>Object(Y.a)(lt[e]));r=j.a.createElement("div",{className:"mx_AddressPickerDialog_error"},Object(Y.a)("You have entered an invalid address."),j.a.createElement("br",null),Object(Y.a)("Try using one of the following valid address types: %(validTypesList)s.",{validTypesList:e.join(", ")}))}else this.state.searchError?r=j.a.createElement("div",{className:"mx_AddressPickerDialog_error"},this.state.searchError):this.state.query.length>0&&0===n.length&&!this.state.busy?r=j.a.createElement("div",{className:"mx_AddressPickerDialog_error"},Object(Y.a)("No results")):o=j.a.createElement(rt,{ref:this.addressSelector,addressList:n,showAddress:"user"===this.props.pickerType,onSelected:this.onSelected,truncateAt:40});if("user"===this.props.pickerType&&!this.state.validAddressTypes.includes(qe.a.Email)&&this.props.validAddressTypes.includes(qe.a.Email)){const e=Object(Ke.c)();i=e?j.a.createElement("div",{className:"mx_AddressPickerDialog_identityServer"},Object(Y.a)("Use an identity server to invite by email. <default>Use the default (%(defaultIdentityServerName)s)</default> or manage in <settings>Settings</settings>.",{defaultIdentityServerName:Object(Ye.a)(e)},{default:e=>j.a.createElement("a",{href:"#",onClick:this.onUseDefaultIdentityServerClick},e),settings:e=>j.a.createElement("a",{href:"#",onClick:this.onManageSettingsClick},e)})):j.a.createElement("div",{className:"mx_AddressPickerDialog_identityServer"},Object(Y.a)("Use an identity server to invite by email. Manage in <settings>Settings</settings>.",{},{settings:e=>j.a.createElement("a",{href:"#",onClick:this.onManageSettingsClick},e)}))}return j.a.createElement(st.a,{className:"mx_AddressPickerDialog",onKeyDown:this.onKeyDown,onFinished:this.props.onFinished,title:this.props.title},e,j.a.createElement("div",{className:"mx_Dialog_content"},j.a.createElement("div",{className:"mx_AddressPickerDialog_inputContainer"},t),r,o,this.props.extraNode,i),j.a.createElement(ct.a,{primaryButton:this.props.button,onPrimaryButtonClick:this.onButtonClick,onCancel:this.onCancel}))}},P()(it,"defaultProps",{value:"",focus:!0,validAddressTypes:qe.b,pickerType:"user",includeSelf:!1}),ot=at))||ot;var dt,ht=n(550),pt=n(666),mt=n(223),gt=n(835),ft=n(676),_t=n(428),bt=n(105),vt=n(97);let yt=Object(B.a)("views.dialogs.ConfirmAndWaitRedactDialog")(dt=class extends j.a.PureComponent{constructor(e){super(e),P()(this,"onParentFinished",async e=>{if(e){this.setState({isRedacting:!0});try{await this.props.redact(),this.props.onFinished(!0)}catch(e){const t=e.errcode||e.statusCode;void 0!==t?this.setState({redactionErrorCode:t}):this.props.onFinished(!0)}}else this.props.onFinished(!1)}),this.state={isRedacting:!1,redactionErrorCode:null}}render(){if(this.state.isRedacting){if(this.state.redactionErrorCode){const e=this.state.redactionErrorCode;return j.a.createElement(bt.a,{onFinished:this.props.onFinished,title:Object(Y.a)("Error"),description:Object(Y.a)("You cannot delete this message. (%(code)s)",{code:e})})}return j.a.createElement(st.a,{onFinished:this.props.onFinished,hasCancel:!1,title:Object(Y.a)("Removing…")},j.a.createElement(vt.a,null))}return j.a.createElement(_t.a,{onFinished:this.onParentFinished})}})||dt;var Et=n(760),St=n(836),wt=n(689),Ct=n(692),Tt=n(447),xt=n(665),kt=n(90),Ft=n(87),Ot=n(110);var Rt,Dt=e=>{const t=kt.a.get().brand,n=Object(Y.a)("You've previously used a newer version of %(brand)s with this session. To use this version again with end to end encryption, you will need to sign out and back in again.",{brand:t});return j.a.createElement(st.a,{className:"mx_CryptoStoreTooNewDialog",contentId:"mx_Dialog_content",title:Object(Y.a)("Incompatible Database"),hasCancel:!1,onFinished:e.onFinished},j.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},n),j.a.createElement(ct.a,{primaryButton:Object(Y.a)("Continue With Encryption Disabled"),hasCancel:!1,onPrimaryButtonClick:e.onFinished},j.a.createElement("button",{onClick:()=>{Ft.a.createTrackedDialog("Logout e2e db too new","",Ot.a,{title:Object(Y.a)("Sign out"),description:Object(Y.a)("To avoid losing your chat history, you must export your room keys before logging out. You will need to go back to the newer version of %(brand)s to do this",{brand:t}),button:Object(Y.a)("Sign out"),focus:!1,onFinished:t=>{t&&(Ve.a.dispatch({action:"logout"}),e.onFinished(!0))}})}},Object(Y.a)("Sign out"))))},It=n(548),At=n(327),Nt=n(709),Mt=n(619),Pt=n(450),Lt=n(886),jt=n(166),Ut=n(367),Bt=n(674),Gt=n(708),Vt=n(772),qt=n(724),Ht=n(824),zt=n(620),Wt=n(767),Kt=n(663),Yt=n(480),$t=n(653),Qt=n(822);let Jt=Object(B.a)("views.dialogs.SeshatResetDialog")(Rt=class extends j.a.PureComponent{render(){return j.a.createElement(st.a,{hasCancel:!0,onFinished:this.props.onFinished.bind(null,!1),title:Object(Y.a)("Reset event store?")},j.a.createElement("div",null,j.a.createElement("p",null,Object(Y.a)("You most likely do not want to reset your event index store"),j.a.createElement("br",null),Object(Y.a)("If you do, please note that none of your messages will be deleted, but the search experience might be degraded for a few moments whilst the index is recreated"))),j.a.createElement(ct.a,{primaryButton:Object(Y.a)("Reset event store"),onPrimaryButtonClick:this.props.onFinished.bind(null,!0),primaryButtonClass:"danger",cancelButton:Object(Y.a)("Cancel"),onCancel:this.props.onFinished.bind(null,!1)}))}})||Rt;var Xt,Zt=n(330),en=n(658),tn=n(169),nn=n.n(tn),rn=n(188);class on extends j.a.PureComponent{constructor(...e){super(...e),P()(this,"onChange",e=>{this.props.onChange(this.props.url,e.currentTarget.checked)})}render(){return j.a.createElement("input",{type:"checkbox",onChange:this.onChange,checked:this.props.checked})}}let an=Object(B.a)("views.dialogs.TermsDialog")(Xt=class extends j.a.PureComponent{constructor(e){super(e),P()(this,"onCancelClick",()=>{this.props.onFinished(!1)}),P()(this,"onNextClick",()=>{this.props.onFinished(!0,Object.keys(this.state.agreedUrls).filter(e=>this.state.agreedUrls[e]))}),P()(this,"onTermsCheckboxChange",(e,t)=>{this.setState({agreedUrls:Object.assign({},this.state.agreedUrls,{[e]:t})})}),this.state={agreedUrls:{}};for(const t of e.agreedUrls)this.state.agreedUrls[t]=!0}nameForServiceType(e,t){switch(e){case rn.a.IS:return j.a.createElement("div",null,Object(Y.a)("Identity server"),j.a.createElement("br",null),"(",t,")");case rn.a.IM:return j.a.createElement("div",null,Object(Y.a)("Integration manager"),j.a.createElement("br",null),"(",t,")")}}summaryForServiceType(e){switch(e){case rn.a.IS:return j.a.createElement("div",null,Object(Y.a)("Find others by phone or email"),j.a.createElement("br",null),Object(Y.a)("Be found by phone or email"));case rn.a.IM:return j.a.createElement("div",null,Object(Y.a)("Use bots, bridges, widgets and sticker packs"))}}render(){const e=[];for(const t of this.props.policiesAndServicePairs){const n=nn.a.parse(t.service.baseUrl),r=Object.values(t.policies);for(let o=0;o<r.length;++o){const i=r[o],a=Object(Y.i)(Object.keys(i).filter(e=>"version"!==e));let s,c;0===o&&(s=this.nameForServiceType(t.service.serviceType,n.host),c=this.summaryForServiceType(t.service.serviceType)),e.push(j.a.createElement("tr",{key:i[a].url},j.a.createElement("td",{className:"mx_TermsDialog_service"},s),j.a.createElement("td",{className:"mx_TermsDialog_summary"},c),j.a.createElement("td",null,i[a].name,j.a.createElement("a",{rel:"noreferrer noopener",target:"_blank",href:i[a].url},j.a.createElement("span",{className:"mx_TermsDialog_link"}))),j.a.createElement("td",null,j.a.createElement(on,{url:i[a].url,onChange:this.onTermsCheckboxChange,checked:Boolean(this.state.agreedUrls[i[a].url])}))))}}let t=!1;for(const e of this.props.policiesAndServicePairs){let n=0;for(const t of Object.values(e.policies)){let e=!1;for(const n of Object.keys(t))if("version"!==n&&this.state.agreedUrls[t[n].url]){e=!0;break}e&&++n}if(n===Object.keys(e.policies).length){t=!0;break}}return j.a.createElement(st.a,{fixedWidth:!1,onFinished:this.onCancelClick,title:Object(Y.a)("Terms of Service"),contentId:"mx_Dialog_content",hasCancel:!1},j.a.createElement("div",{id:"mx_Dialog_content"},j.a.createElement("p",null,Object(Y.a)("To continue you need to accept the terms of this service.")),j.a.createElement("table",{className:"mx_TermsDialog_termsTable"},j.a.createElement("tbody",null,j.a.createElement("tr",{className:"mx_TermsDialog_termsTableHeader"},j.a.createElement("th",null,Object(Y.a)("Service")),j.a.createElement("th",null,Object(Y.a)("Summary")),j.a.createElement("th",null,Object(Y.a)("Document")),j.a.createElement("th",null,Object(Y.a)("Accept"))),e))),j.a.createElement(ct.a,{primaryButton:Object(Y.a)("Next"),hasCancel:!0,onCancel:this.onCancelClick,onPrimaryButtonClick:this.onNextClick,primaryDisabled:!t}))}})||Xt;var sn,cn=n(750),ln=n(803),un=n(192),dn=n(458),hn=n(884),pn=n(684);let mn=Object(B.a)("views.dialogs.security.ConfirmDestroyCrossSigningDialog")(sn=class extends j.a.Component{constructor(...e){super(...e),P()(this,"onConfirm",()=>{this.props.onFinished(!0)}),P()(this,"onDecline",()=>{this.props.onFinished(!1)})}render(){return j.a.createElement(st.a,{className:"mx_ConfirmDestroyCrossSigningDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(Y.a)("Destroy cross-signing keys?")},j.a.createElement("div",{className:"mx_ConfirmDestroyCrossSigningDialog_content"},j.a.createElement("p",null,Object(Y.a)("Deleting cross-signing keys is permanent. Anyone you have verified with will see security alerts. You almost certainly don't want to do this, unless you've lost every device you can cross-sign from."))),j.a.createElement(ct.a,{primaryButton:Object(Y.a)("Clear cross-signing keys"),onPrimaryButtonClick:this.onConfirm,primaryButtonClass:"danger",cancelButton:Object(Y.a)("Cancel"),onCancel:this.onDecline}))}})||sn;var gn,fn,_n,bn=n(827),vn=n(678),yn=n(695),En=n(85),Sn=n(106),wn=n(124),Cn=n(154);let Tn=Object(B.a)("views.elements.ActionButton")((_n=fn=class extends j.a.Component{constructor(e){super(e),P()(this,"onClick",e=>{e.stopPropagation(),wn.a.trackEvent("Action Button","click",this.props.action),Ve.a.dispatch({action:this.props.action})}),P()(this,"onMouseEnter",()=>{this.props.tooltip&&this.setState({showTooltip:!0}),this.props.mouseOverAction&&Ve.a.dispatch({action:this.props.mouseOverAction})}),P()(this,"onMouseLeave",()=>{this.setState({showTooltip:!1})}),this.state={showTooltip:!1}}render(){let e;this.state.showTooltip&&(e=j.a.createElement(Cn.b,{className:"mx_RoleButton_tooltip",label:this.props.label}));const t=this.props.iconPath?j.a.createElement("img",{src:this.props.iconPath,width:this.props.size,height:this.props.size}):void 0,n=["mx_RoleButton"];return this.props.className&&n.push(this.props.className),j.a.createElement(En.a,{className:n.join(" "),onClick:this.onClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,"aria-label":this.props.label},t,e,this.props.children)}},P()(fn,"defaultProps",{size:"25",tooltip:!1}),gn=_n))||gn;var xn=n(719),kn=n(382),Fn=n(730),On=n(454),Rn=n(765),Dn=n(263),In=n(662),An=n(787),Nn=n(288),Mn=n(481),Pn=n(497),Ln=n(789),jn=n(101),Un=n(764),Bn=n(292),Gn=n(341),Vn=n(147),qn=n(780),Hn=n(448),zn=n(165),Wn=n(777),Kn=n(466),Yn=n(446),$n=n(430),Qn=n(240),Jn=n(335),Xn=n(184),Zn=n(333),er=n(355),tr=n(351),nr=n(201),rr=n(844),or=n(547),ir=n(137),ar=n(189),sr=n(246),cr=n(850),lr=n(334),ur=n(434),dr=n(277),hr=n(704),pr=n(157),mr=n(638),gr=n(436),fr=n(368),_r=n(634),br=n(636),vr=n(637),yr=n(633),Er=n(635),Sr=n(735),wr=n(776),Cr=n(128),Tr=n(148);const xr=new Map([[Cr.e.Connected,Object(Y.b)("Connected")],[Cr.e.Connecting,Object(Y.b)("Connecting")]]);class kr extends j.a.Component{constructor(e){super(e),P()(this,"onSilencedChanged",e=>{this.setState({silenced:e})}),P()(this,"onStateChanged",e=>{this.setState({callState:e})}),this.state={callState:this.props.callEventGrouper.state,silenced:!1}}componentDidMount(){this.props.callEventGrouper.addListener(wr.a.StateChanged,this.onStateChanged),this.props.callEventGrouper.addListener(wr.a.SilencedChanged,this.onSilencedChanged)}componentWillUnmount(){this.props.callEventGrouper.removeListener(wr.a.StateChanged,this.onStateChanged),this.props.callEventGrouper.removeListener(wr.a.SilencedChanged,this.onSilencedChanged)}renderCallBackButton(e){return j.a.createElement(En.a,{className:"mx_CallEvent_content_button mx_CallEvent_content_button_callBack",onClick:this.props.callEventGrouper.callBack,kind:"primary"},j.a.createElement("span",null," ",e," "))}renderContent(e){if(e===Cr.e.Ringing){const e=Je()({mx_CallEvent_iconButton:!0,mx_CallEvent_unSilence:this.state.silenced,mx_CallEvent_silence:!this.state.silenced});return j.a.createElement("div",{className:"mx_CallEvent_content"},j.a.createElement(Sn.a,{className:e,onClick:this.props.callEventGrouper.toggleSilenced,title:this.state.silenced?Object(Y.a)("Sound on"):Object(Y.a)("Silence call")}),j.a.createElement(En.a,{className:"mx_CallEvent_content_button mx_CallEvent_content_button_reject",onClick:this.props.callEventGrouper.rejectCall,kind:"danger"},j.a.createElement("span",null," ",Object(Y.a)("Decline")," ")),j.a.createElement(En.a,{className:"mx_CallEvent_content_button mx_CallEvent_content_button_answer",onClick:this.props.callEventGrouper.answerCall,kind:"primary"},j.a.createElement("span",null," ",Object(Y.a)("Accept")," ")))}if(e===Cr.e.Ended){const e=this.props.callEventGrouper.hangupReason;if(this.props.callEventGrouper.gotRejected)return j.a.createElement("div",{className:"mx_CallEvent_content"},Object(Y.a)("Call declined"),this.renderCallBackButton(Object(Y.a)("Call back")));if([Cr.b.UserHangup,"user hangup"].includes(e)||!e){const e=this.props.callEventGrouper.duration;let t=Object(Y.a)("Call ended");return e&&(t+=" • "+Object(Tr.a)(e)),j.a.createElement("div",{className:"mx_CallEvent_content"},t)}if(e===Cr.b.InviteTimeout)return j.a.createElement("div",{className:"mx_CallEvent_content"},Object(Y.a)("Missed call"),this.renderCallBackButton(Object(Y.a)("Call back")));let t;return t=e===Cr.b.IceFailed?Object(Y.a)("Could not connect media"):"ice_timeout"===e?Object(Y.a)("Connection failed"):e===Cr.b.NoUserMedia?Object(Y.a)("Their device couldn't start the camera or microphone"):"unknown_error"===e?Object(Y.a)("An unknown error occurred"):e===Cr.b.UserBusy?Object(Y.a)("The user you called is busy."):Object(Y.a)("Unknown failure: %(reason)s)",{reason:e}),j.a.createElement("div",{className:"mx_CallEvent_content"},j.a.createElement(Gn.b,{tooltip:t,className:"mx_CallEvent_content_tooltip",kind:Gn.a.Warning}),Object(Y.a)("Connection failed"),this.renderCallBackButton(Object(Y.a)("Retry")))}return Array.from(xr.keys()).includes(e)?j.a.createElement("div",{className:"mx_CallEvent_content"},xr.get(e)):e===wr.b.Missed?j.a.createElement("div",{className:"mx_CallEvent_content"},Object(Y.a)("Missed call"),this.renderCallBackButton(Object(Y.a)("Call back"))):j.a.createElement("div",{className:"mx_CallEvent_content"},Object(Y.a)("The call is in an unknown state!"))}render(){const e=this.props.mxEvent,t=e.sender?e.sender.name:e.getSender(),n=this.props.callEventGrouper.isVoice,r=n?Object(Y.a)("Voice call"):Object(Y.a)("Video call"),o=this.state.callState,i=this.props.callEventGrouper.hangupReason,a=this.renderContent(o),s=Je()({mx_CallEvent:!0,mx_CallEvent_voice:n,mx_CallEvent_video:!n,mx_CallEvent_missed:o===wr.b.Missed||o===Cr.e.Ended&&i===Cr.b.InviteTimeout});return j.a.createElement("div",{className:s},j.a.createElement("div",{className:"mx_CallEvent_info"},j.a.createElement(Fe.a,{member:e.sender,width:32,height:32}),j.a.createElement("div",{className:"mx_CallEvent_info_basic"},j.a.createElement("div",{className:"mx_CallEvent_sender"},t),j.a.createElement("div",{className:"mx_CallEvent_type"},j.a.createElement("div",{className:"mx_CallEvent_type_icon"}),r))),a)}}var Fr=n(482),Or=n(631),Rr=n(225),Dr=n(94),Ir=n(122);var Ar,Nr=Object(L.forwardRef)(({mxEvent:e},t)=>{const n=Object(L.useContext)(Dr.a),r=e.getRoomId(),o=Ge.a.get().isRoomEncrypted(r);if("m.megolm.v1.aes-sha2"===e.getContent().algorithm&&o){let e;const t=Ir.a.shared().getUserIdForRoomId(r);if(t){var i,a;const o=(null==n||null===(i=n.getRoom(r))||void 0===i||null===(a=i.getMember(t))||void 0===a?void 0:a.rawDisplayName)||t;e=Object(Y.a)("Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.",{displayName:o})}else e=Object(Y.a)("Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.");return j.a.createElement(Rr.a,{className:"mx_cryptoEvent mx_cryptoEvent_icon",title:Object(Y.a)("Encryption enabled"),subtitle:e})}return o?j.a.createElement(Rr.a,{className:"mx_cryptoEvent mx_cryptoEvent_icon",title:Object(Y.a)("Encryption enabled"),subtitle:Object(Y.a)("Ignored attempt to disable encryption")}):j.a.createElement(Rr.a,{className:"mx_cryptoEvent mx_cryptoEvent_icon mx_cryptoEvent_icon_warning",title:Object(Y.a)("Encryption not enabled"),subtitle:Object(Y.a)("The encryption used by this room isn't supported."),ref:t})}),Mr=n(92),Pr=n.n(Mr),Lr=n(242),jr=n(895);let Ur=Object(B.a)("views.messages.MAudioBody")(Ar=class extends j.a.PureComponent{constructor(e){super(e),this.state={}}async componentDidMount(){var e,t;let n;try{try{const e=await this.props.mediaEventHelper.sourceBlob.value;n=await e.arrayBuffer()}catch(e){return this.setState({error:e}),void console.warn("Unable to decrypt audio message",e)}}catch(e){return this.setState({error:e}),void console.warn("Unable to decrypt/download audio message",e)}const r=this.props.mxEvent.getContent(),o=null==r||null===(e=r["org.matrix.msc1767.audio"])||void 0===e||null===(t=e.waveform)||void 0===t?void 0:t.map(e=>e/1024),i=jr.a.instance.createPlaybackInstance(n,o);i.clockInfo.populatePlaceholdersFrom(this.props.mxEvent),this.setState({playback:i})}componentWillUnmount(){var e;null===(e=this.state.playback)||void 0===e||e.destroy()}render(){return this.state.error?j.a.createElement("span",{className:"mx_MAudioBody"},j.a.createElement("img",{src:n(245),width:"16",height:"16"}),Object(Y.a)("Error processing audio message")):this.state.playback?j.a.createElement("span",{className:"mx_MAudioBody"},j.a.createElement(ne,{playback:this.state.playback,mediaName:this.props.mxEvent.getContent().body}),this.props.tileShape&&j.a.createElement(Lr.a,Pr()({},this.props,{showGenericPlaceholder:!1}))):j.a.createElement("span",{className:"mx_MAudioBody"},j.a.createElement(Vn.a,null))}})||Ar;var Br,Gr=n(419),Vr=n(607),qr=n(212),Hr=n(172);let zr=Object(B.a)("views.messages.MJitsiWidgetEvent")(Br=class extends j.a.PureComponent{constructor(e){super(e)}render(){var e;const t=this.props.mxEvent.getContent().url,n=this.props.mxEvent.getPrevContent().url,r=(null===(e=this.props.mxEvent.sender)||void 0===e?void 0:e.name)||this.props.mxEvent.getSender(),o=Ge.a.get().getRoom(this.props.mxEvent.getRoomId()),i=this.props.mxEvent.getStateKey(),a=qr.a.instance.getRoom(o.roomId,!0).widgets.find(e=>e.id===i);let s=Object(Y.a)("Join the conference at the top of this room");return a&&Hr.d.instance.isInContainer(o,a,Hr.a.Right)?s=Object(Y.a)("Join the conference from the room information card on the right"):a||(s=null),t?n?j.a.createElement(Rr.a,{className:"mx_MJitsiWidgetEvent",title:Object(Y.a)("Video conference updated by %(senderName)s",{senderName:r}),subtitle:s}):j.a.createElement(Rr.a,{className:"mx_MJitsiWidgetEvent",title:Object(Y.a)("Video conference started by %(senderName)s",{senderName:r}),subtitle:s}):j.a.createElement(Rr.a,{className:"mx_MJitsiWidgetEvent",title:Object(Y.a)("Video conference ended by %(senderName)s",{senderName:r})})}})||Br;var Wr,Kr=n(495),Yr=n(121);let $r=Object(B.a)("views.messages.MKeyVerificationRequest")(Wr=class extends j.a.Component{constructor(...e){super(...e),P()(this,"openRequest",()=>{const{verificationRequest:e}=this.props.mxEvent,t=Ge.a.get().getUser(e.otherUserId);Ve.a.dispatch({action:$e.a.SetRightPanelPhase,phase:Yr.c.EncryptionPanel,refireParams:{verificationRequest:e,member:t}})}),P()(this,"onRequestChanged",()=>{this.forceUpdate()}),P()(this,"onAcceptClicked",async()=>{const e=this.props.mxEvent.verificationRequest;if(e)try{this.openRequest(),await e.accept()}catch(e){console.error(e.message)}}),P()(this,"onRejectClicked",async()=>{const e=this.props.mxEvent.verificationRequest;if(e)try{await e.cancel()}catch(e){console.error(e.message)}})}componentDidMount(){const e=this.props.mxEvent.verificationRequest;e&&e.on("change",this.onRequestChanged)}componentWillUnmount(){const e=this.props.mxEvent.verificationRequest;e&&e.off("change",this.onRequestChanged)}acceptedLabel(e){return e===Ge.a.get().getUserId()?Object(Y.a)("You accepted"):Object(Y.a)("%(name)s accepted",{name:Object(Kr.a)(e,this.props.mxEvent.getRoomId())})}cancelledLabel(e){const t=Ge.a.get().getUserId(),{cancellationCode:n}=this.props.mxEvent.verificationRequest,r="m.user"===n;return e===t?r?Object(Y.a)("You declined"):Object(Y.a)("You cancelled"):r?Object(Y.a)("%(name)s declined",{name:Object(Kr.a)(e,this.props.mxEvent.getRoomId())}):Object(Y.a)("%(name)s cancelled",{name:Object(Kr.a)(e,this.props.mxEvent.getRoomId())})}render(){const{mxEvent:e}=this.props,t=e.verificationRequest;if(!t||t.invalid)return null;let n,r,o;if(!t.canAccept){let e;t.ready||t.started||t.done?e=j.a.createElement(En.a,{onClick:this.openRequest},this.acceptedLabel(t.receivingUserId)):t.cancelled?e=this.cancelledLabel(t.cancellingUserId):t.accepting?e=Object(Y.a)("Accepting …"):t.declining&&(e=Object(Y.a)("Declining …")),o=j.a.createElement("div",{className:"mx_cryptoEvent_state"},e)}if(t.initiatedByMe)n=Object(Y.a)("You sent a verification request"),r=Object(Kr.b)(t.receivingUserId,e.getRoomId());else{const i=Object(Kr.a)(t.requestingUserId,e.getRoomId());n=Object(Y.a)("%(name)s wants to verify",{name:i}),r=Object(Kr.b)(t.requestingUserId,e.getRoomId()),t.canAccept&&(o=j.a.createElement("div",{className:"mx_cryptoEvent_buttons"},j.a.createElement(En.a,{kind:"danger",onClick:this.onRejectClicked},Object(Y.a)("Decline")),j.a.createElement(En.a,{kind:"primary",onClick:this.onAcceptClicked},Object(Y.a)("Accept"))))}return n?j.a.createElement(Rr.a,{className:"mx_cryptoEvent mx_cryptoEvent_icon",title:n,subtitle:r},o):null}})||Wr;var Qr,Jr=n(89),Xr=n(187);let Zr=Object(B.a)("views.messages.MStickerBody")(Qr=class extends Gr.a{constructor(...e){super(...e),P()(this,"onClick",e=>{e.preventDefault(),this.state.showImage||this.showImage()})}wrapImage(e,t){let n=null;return this.state.showImage||(n=this.onClick),j.a.createElement("div",{className:"mx_MStickerBody_wrapper",onClick:n}," ",t," ")}getPlaceholder(e,t){return this.props.mxEvent.getContent().info[Xr.a]?super.getPlaceholder(e,t):j.a.createElement("img",{src:n(1393),width:"75",height:"75"})}getTooltip(){const e=this.props.mxEvent&&this.props.mxEvent.getContent();if(!(e&&e.body&&e.info&&e.info.w))return null;const t=Jr.getComponent("elements.Tooltip");return j.a.createElement("div",{style:{left:e.info.w+"px"},className:"mx_MStickerBody_tooltip"},j.a.createElement(t,{label:e.body}))}getFileBody(){return null}})||Qr;var eo,to=n(609),no=n(84);let ro=Object(B.a)("views.messages.MVideoBody")(eo=class extends j.a.PureComponent{constructor(e){super(e),P()(this,"videoRef",j.a.createRef()),P()(this,"videoOnPlay",async()=>{this.hasContentUrl()||this.state.fetchingData||this.state.error||(this.setState({fetchingData:!0}),this.props.mediaEventHelper.media.isEncrypted?(this.setState({decryptedUrl:await this.props.mediaEventHelper.sourceUrl.value,decryptedBlob:await this.props.mediaEventHelper.sourceBlob.value,fetchingData:!1},()=>{this.videoRef.current&&this.videoRef.current.play()}),this.props.onHeightChanged()):this.setState({error:"No file given in content"}))}),this.state={fetchingData:!1,decryptedUrl:null,decryptedThumbnailUrl:null,decryptedBlob:null,error:null,posterLoading:!1,blurhashUrl:null}}thumbScale(e,t,n=480,r=360){if(!e||!t)return;if(e<n&&t<r)return 1;const o=n/e,i=r/t;return o<i?o:i}getContentUrl(){const e=Object(Xe.a)(this.props.mxEvent.getContent());return e.isEncrypted?this.state.decryptedUrl:e.srcHttp}hasContentUrl(){const e=this.getContentUrl();return e&&!e.startsWith("data:")}getThumbUrl(){const e=this.props.mxEvent.getContent(),t=Object(Xe.a)(e);return t.isEncrypted&&this.state.decryptedThumbnailUrl?this.state.decryptedThumbnailUrl:this.state.posterLoading?this.state.blurhashUrl:t.hasThumbnail?t.thumbnailHttp:null}loadBlurhash(){var e;const t=null===(e=this.props.mxEvent.getContent())||void 0===e?void 0:e.info;if(!t[Xr.a])return;const n=document.createElement("canvas");let r=t.w,o=t.h;const i=this.thumbScale(t.w,t.h);i&&(r=Math.floor(t.w*i),o=Math.floor(t.h*i)),n.width=r,n.height=o;const a=Object(to.decode)(t[Xr.a],r,o),s=n.getContext("2d"),c=s.createImageData(r,o);c.data.set(a),s.putImageData(c,0,0),this.setState({blurhashUrl:n.toDataURL(),posterLoading:!0});const l=this.props.mxEvent.getContent(),u=Object(Xe.a)(l);if(u.hasThumbnail){const e=new Image;e.onload=()=>{this.setState({posterLoading:!1})},e.src=u.thumbnailHttp}}async componentDidMount(){const e=no.b.getValue("autoplayGifsAndVideos");if(this.loadBlurhash(),this.props.mediaEventHelper.media.isEncrypted&&null===this.state.decryptedUrl)try{const r=await this.props.mediaEventHelper.thumbnailUrl.value;if(e)console.log("Preloading video"),this.setState({decryptedUrl:await this.props.mediaEventHelper.sourceUrl.value,decryptedThumbnailUrl:r,decryptedBlob:await this.props.mediaEventHelper.sourceBlob.value}),this.props.onHeightChanged();else{var t,n;console.log("NOT preloading video");const e=this.props.mxEvent.getContent();this.setState({decryptedUrl:`data:${null==e||null===(t=e.info)||void 0===t?void 0:t.mimetype},`,decryptedThumbnailUrl:r||`data:${null==e||null===(n=e.info)||void 0===n?void 0:n.mimetype},`,decryptedBlob:null})}}catch(e){console.warn("Unable to decrypt attachment: ",e),this.setState({error:e})}}render(){const e=this.props.mxEvent.getContent(),t=no.b.getValue("autoplayGifsAndVideos");if(null!==this.state.error)return j.a.createElement("span",{className:"mx_MVideoBody"},j.a.createElement("img",{src:n(245),width:"16",height:"16"}),Object(Y.a)("Error decrypting video"));if(void 0!==e.file&&null===this.state.decryptedUrl&&t)return j.a.createElement("span",{className:"mx_MVideoBody"},j.a.createElement("div",{className:"mx_MImageBody_thumbnail mx_MImageBody_thumbnail_spinner"},j.a.createElement(Vn.a,null)));const r=this.getContentUrl(),o=this.getThumbUrl();let i=null,a=null,s=null,c="metadata";if(e.info){const t=this.thumbScale(e.info.w,e.info.h);t&&(a=Math.floor(e.info.w*t),i=Math.floor(e.info.h*t)),o&&(s=o,c="none")}return j.a.createElement("span",{className:"mx_MVideoBody"},j.a.createElement("video",{className:"mx_MVideoBody",ref:this.videoRef,src:r,title:e.body,controls:!0,preload:c,muted:t,autoPlay:t,height:i,width:a,poster:s,onPlay:this.videoOnPlay}),this.props.tileShape&&j.a.createElement(Lr.a,Pr()({},this.props,{showGenericPlaceholder:!1})))}})||eo;var oo;let io=Object(B.a)("views.messages.MVoiceMessageBody")(oo=class extends Ur{render(){return this.state.error?j.a.createElement("span",{className:"mx_MVoiceMessageBody"},j.a.createElement("img",{src:n(245),width:"16",height:"16"}),Object(Y.a)("Error processing voice message")):this.state.playback?j.a.createElement("span",{className:"mx_MVoiceMessageBody"},j.a.createElement(le.a,{playback:this.state.playback,tileShape:this.props.tileShape}),this.props.tileShape&&j.a.createElement(Lr.a,Pr()({},this.props,{showGenericPlaceholder:!1}))):j.a.createElement("span",{className:"mx_MVoiceMessageBody"},j.a.createElement(Vn.a,null))}})||oo;var ao;let so=Object(B.a)("views.messages.MVoiceOrAudioBody")(ao=class extends j.a.PureComponent{render(){return!!this.props.mxEvent.getContent()["org.matrix.msc2516.voice"]||!!this.props.mxEvent.getContent()["org.matrix.msc3245.voice"]?j.a.createElement(io,this.props):j.a.createElement(Ur,this.props)}})||ao;var co,lo,uo,ho=n(616),po=n(433),mo=n(632),go=n(640),fo=n(641),_o=n(424),bo=n(324),vo=n(1394),yo=n(164),Eo=n(311);let So=Object(B.a)("views.messages.TextualEvent")((uo=lo=class extends j.a.Component{render(){var e;const t=Eo.b(this.props.mxEvent,!0,null===(e=this.context)||void 0===e?void 0:e.showHiddenEventsInTimeline);return t?j.a.createElement("div",{className:"mx_TextualEvent"},t):null}},P()(lo,"contextType",yo.a),co=uo))||co;var wo,Co=n(778),To=n(617);let xo=Object(B.a)("views.messages.ViewSourceEvent")(wo=class extends j.a.PureComponent{constructor(e){super(e),P()(this,"onToggle",e=>{e.preventDefault();const{expanded:t}=this.state;this.setState({expanded:!t})}),this.state={expanded:!1}}componentDidMount(){const{mxEvent:e}=this.props;Ge.a.get().decryptEventIfNeeded(e),e.isBeingDecrypted()&&e.once("Event.decrypted",()=>this.forceUpdate())}render(){const{mxEvent:e}=this.props,{expanded:t}=this.state;let n;n=t?j.a.createElement("pre",null,JSON.stringify(e,null,4)):j.a.createElement("code",null,`{ "type": ${e.getType()} }`);const r=Je()("mx_ViewSourceEvent mx_EventTile_content",{mx_ViewSourceEvent_expanded:t});return j.a.createElement("span",{className:r},n,j.a.createElement("a",{className:"mx_ViewSourceEvent_toggle",href:"#",onClick:this.onToggle}))}})||wo;var ko,Fo=n(190),Oo=n(459),Ro=n(340),Do=n(817),Io=n(483),Ao=n(484),No=n(364),Mo=n(786),Po=n(475),Lo=n(759),jo=n(679),Uo=n(753),Bo=n(661),Go=n(882),Vo=n(871),qo=n(783),Ho=n(505),zo=n(861),Wo=n(278),Ko=n(144),Yo=n(656),$o=n(862),Qo=n(892),Jo=n(754),Xo=n(755),Zo=n(792),ei=n(807),ti=n(766),ni=n(175),ri=n(615),oi=n(425),ii=n(794),ai=n(418),si=n(712),ci=n(785),li=n(437),ui=n(718),di=n(438),hi=n(643),pi=n(781),mi=n(790),gi=n(800),fi=n(761),_i=n(795),bi=n(888),vi=n(775),yi=n(848),Ei=n(227),Si=n(98);let wi=Object(B.a)("views.settings.EventIndexPanel")(ko=class extends j.a.Component{constructor(e){super(e),P()(this,"updateCurrentRoom",async e=>{const t=Ei.a.get();let n;try{n=await t.getStats()}catch{return}this.setState({eventIndexSize:n.size,roomCount:n.roomCount})}),P()(this,"onManage",async()=>{Ft.a.createTrackedDialogAsync("Message search","Message search",n.e(28).then(n.bind(null,1436)),{onFinished:()=>{}},null,!1,!0)}),P()(this,"onEnable",async()=>{this.setState({enabling:!0}),await Ei.a.initEventIndex(),await Ei.a.get().addInitialCheckpoints(),await Ei.a.get().startCrawler(),await no.b.setValue("enableEventIndexing",null,Si.a.DEVICE,!0),await this.updateState()}),P()(this,"confirmEventStoreReset",()=>{const{close:e}=Ft.a.createDialog(Jt,{onFinished:async t=>{t&&(await no.b.setValue("enableEventIndexing",null,Si.a.DEVICE,!1),await Ei.a.deleteEventIndex(),await this.onEnable(),e())}})}),this.state={enabling:!1,eventIndexSize:0,roomCount:0,eventIndexingEnabled:no.b.getValueAt(Si.a.DEVICE,"enableEventIndexing")}}componentWillUnmount(){const e=Ei.a.get();null!==e&&e.removeListener("changedCheckpoint",this.updateCurrentRoom)}componentDidMount(){this.updateState()}async updateState(){const e=Ei.a.get(),t=no.b.getValueAt(Si.a.DEVICE,"enableEventIndexing");let n=0,r=0;if(null!==e){e.on("changedCheckpoint",this.updateCurrentRoom);try{const t=await e.getStats();n=t.size,r=t.roomCount}catch{}}this.setState({enabling:!1,eventIndexSize:n,roomCount:r,eventIndexingEnabled:t})}render(){let e=null;const t=kt.a.get().brand;if(null!==Ei.a.get())e=j.a.createElement("div",null,j.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(Y.a)("Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.",{size:Object(G.a)(this.state.eventIndexSize,0),count:this.state.roomCount,rooms:Object(G.d)(this.state.roomCount)})),j.a.createElement("div",null,j.a.createElement(En.a,{kind:"primary",onClick:this.onManage},Object(Y.a)("Manage"))));else if(!this.state.eventIndexingEnabled&&Ei.a.supportIsInstalled())e=j.a.createElement("div",null,j.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(Y.a)("Securely cache encrypted messages locally for them to appear in search results.")),j.a.createElement("div",null,j.a.createElement(En.a,{kind:"primary",disabled:this.state.enabling,onClick:this.onEnable},Object(Y.a)("Enable")),this.state.enabling?j.a.createElement(Vn.a,null):j.a.createElement("div",null)));else if(Ei.a.platformHasSupport()&&!Ei.a.supportIsInstalled()){const n="https://github.com/vector-im/element-desktop/blob/develop/docs/native-node-modules.md#adding-seshat-for-search-in-e2e-encrypted-rooms";e=j.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(Y.a)("%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with <nativeLink>search components added</nativeLink>.",{brand:t},{nativeLink:e=>j.a.createElement("a",{href:n,target:"_blank",rel:"noreferrer noopener"},e)}))}else e=Ei.a.platformHasSupport()?j.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},j.a.createElement("p",null,this.state.enabling?j.a.createElement(Vn.a,null):Object(Y.a)("Message search initialisation failed")),Ei.a.error&&j.a.createElement("details",null,j.a.createElement("summary",null,Object(Y.a)("Advanced")),j.a.createElement("code",null,Ei.a.error.message),j.a.createElement("p",null,j.a.createElement(En.a,{key:"delete",kind:"danger",onClick:this.confirmEventStoreReset},Object(Y.a)("Reset"))))):j.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(Y.a)("%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> for encrypted messages to appear in search results.",{brand:t},{desktopLink:e=>j.a.createElement("a",{href:"https://element.io/get-started",target:"_blank",rel:"noreferrer noopener"},e)}));return e}})||ko;var Ci,Ti=n(845),xi=n(872),ki=n(841),Fi=n(314);let Oi=Object(B.a)("views.settings.SetIdServer")(Ci=class extends j.a.Component{constructor(e){super(e),P()(this,"dispatcherRef",void 0),P()(this,"onAction",e=>{"id_server_changed"===e.action&&this.setState({currentClientIdServer:Ge.a.get().getIdentityServerUrl()})}),P()(this,"onIdentityServerChanged",e=>{const t=e.target.value;this.setState({idServer:t})}),P()(this,"getTooltip",()=>this.state.checking?j.a.createElement("div",null,j.a.createElement(Vn.a,null),Object(Y.a)("Checking server")):this.state.error?j.a.createElement("span",{className:"warning"},this.state.error):null),P()(this,"idServerChangeEnabled",()=>!!this.state.idServer&&!this.state.busy),P()(this,"saveIdServer",e=>{Ge.a.get().setAccountData("m.identity_server",{base_url:e}),this.setState({busy:!1,error:null,currentClientIdServer:e,idServer:""})}),P()(this,"checkIdServer",async e=>{e.preventDefault();const{idServer:t,currentClientIdServer:n}=this.state;this.setState({busy:!0,checking:!0,error:null});const r=Object(Ye.b)(t);let o=await async function(e){if("https:"!==nn.a.parse(e).protocol)return Object(Y.a)("Identity server URL must be HTTPS");try{const t=await fetch(e+"/_matrix/identity/api/v1");return t.ok?null:t.status<200||t.status>=300?Object(Y.a)("Not a valid identity server (status code %(code)s)",{code:t.status}):Object(Y.a)("Could not connect to identity server")}catch(e){return Object(Y.a)("Could not connect to identity server")}}(r);if(!o)try{this.setState({checking:!1});const e=new We.a(r);await e.getAccessToken();let o=!0;if(!await Object(Ke.b)(r)){const[e]=await this.showNoTermsWarning(r);o=e}if(o&&n&&r!==n){const[e]=await this.showServerChangeWarning({title:Object(Y.a)("Change identity server"),unboundMessage:Object(Y.a)("Disconnect from the identity server <current /> and connect to <new /> instead?",{},{current:e=>j.a.createElement("b",null,Object(Ye.a)(n)),new:e=>j.a.createElement("b",null,Object(Ye.a)(t))}),button:Object(Y.a)("Continue")});o=e}o&&this.saveIdServer(r)}catch(e){console.error(e),o=Object(Y.a)("Terms of service not accepted or the identity server is invalid.")}this.setState({busy:!1,checking:!1,error:o,currentClientIdServer:Ge.a.get().getIdentityServerUrl()})}),P()(this,"onDisconnectClicked",async()=>{this.setState({disconnectBusy:!0});try{const[e]=await this.showServerChangeWarning({title:Object(Y.a)("Disconnect identity server"),unboundMessage:Object(Y.a)("Disconnect from the identity server <idserver />?",{},{idserver:e=>j.a.createElement("b",null,Object(Ye.a)(this.state.currentClientIdServer))}),button:Object(Y.a)("Disconnect")});e&&this.disconnectIdServer()}finally{this.setState({disconnectBusy:!1})}}),P()(this,"disconnectIdServer",()=>{Ge.a.get().setAccountData("m.identity_server",{base_url:null});let e="";Object(Ke.c)()&&(e=Object(Ye.a)(Object(Ke.c)())),this.setState({busy:!1,error:null,currentClientIdServer:Ge.a.get().getIdentityServerUrl(),idServer:e})});let t="";!Ge.a.get().getIdentityServerUrl()&&Object(Ke.c)()&&(t=Object(Ye.a)(Object(Ke.c)())),this.state={defaultIdServer:t,currentClientIdServer:Ge.a.get().getIdentityServerUrl(),idServer:"",error:null,busy:!1,disconnectBusy:!1,checking:!1}}componentDidMount(){this.dispatcherRef=Ve.a.register(this.onAction)}componentWillUnmount(){Ve.a.unregister(this.dispatcherRef)}showNoTermsWarning(e){const{finished:t}=Ft.a.createTrackedDialog("No Terms Warning","",Ot.a,{title:Object(Y.a)("Identity server has no terms of service"),description:j.a.createElement("div",null,j.a.createElement("span",{className:"warning"},Object(Y.a)("The identity server you have chosen does not have any terms of service.")),j.a.createElement("span",null," ",Object(Y.a)("Only continue if you trust the owner of the server."))),button:Object(Y.a)("Continue")});return t}async showServerChangeWarning({title:e,unboundMessage:t,button:n}){const{currentClientIdServer:r}=this.state;let o=[],i=!0;try{o=await Object(Fi.b)(Object(ki.a)(Ge.a.get()),Promise.reject(new Error("Timeout attempting to reach identity server")),1e4)}catch(e){i=!1,console.warn(`Unable to reach identity server at ${r} to check for 3PIDs during IS change flow`),console.warn(e)}const a=o.filter(e=>e.bound);let s,c=!1;const l={idserver:e=>j.a.createElement("b",null,Object(Ye.a)(r)),b:e=>j.a.createElement("b",null,e)};i?a.length?(s=j.a.createElement("div",null,j.a.createElement("p",null,Object(Y.a)("You are still <b>sharing your personal data</b> on the identity server <idserver />.",{},l)),j.a.createElement("p",null,Object(Y.a)("We recommend that you remove your email addresses and phone numbers from the identity server before disconnecting."))),c=!0,n=Object(Y.a)("Disconnect anyway")):s=t:(s=j.a.createElement("div",null,j.a.createElement("p",null,Object(Y.a)("You should <b>remove your personal data</b> from identity server <idserver /> before disconnecting. Unfortunately, identity server <idserver /> is currently offline or cannot be reached.",{},l)),j.a.createElement("p",null,Object(Y.a)("You should:")),j.a.createElement("ul",null,j.a.createElement("li",null,Object(Y.a)("check your browser plugins for anything that might block the identity server (such as Privacy Badger)")),j.a.createElement("li",null,Object(Y.a)("contact the administrators of identity server <idserver />",{},{idserver:l.idserver})),j.a.createElement("li",null,Object(Y.a)("wait and try again later")))),c=!0,n=Object(Y.a)("Disconnect anyway"));const{finished:u}=Ft.a.createTrackedDialog("Identity Server Bound Warning","",Ot.a,{title:e,description:s,button:n,cancelButton:Object(Y.a)("Go back"),danger:c});return u}render(){const e=this.state.currentClientIdServer;let t,n,r;if(e?(t=Object(Y.a)("Identity server (%(server)s)",{server:Object(Ye.a)(e)}),n=Object(Y.a)("You are currently using <server></server> to discover and be discoverable by existing contacts you know. You can change your identity server below.",{},{server:t=>j.a.createElement("b",null,Object(Ye.a)(e))}),this.props.missingTerms&&(n=Object(Y.a)("If you don't want to use <server /> to discover and be discoverable by existing contacts you know, enter another identity server below.",{},{server:t=>j.a.createElement("b",null,Object(Ye.a)(e))}))):(t=Object(Y.a)("Identity server"),n=Object(Y.a)("You are not currently using an identity server. To discover and be discoverable by existing contacts you know, add one below.")),e){let e=Object(Y.a)("Disconnect"),t=Object(Y.a)("Disconnecting from your identity server will mean you won't be discoverable by other users and you won't be able to invite others by email or phone.");this.props.missingTerms&&(t=Object(Y.a)("Using an identity server is optional. If you choose not to use an identity server, you won't be discoverable by other users and you won't be able to invite others by email or phone."),e=Object(Y.a)("Do not use an identity server")),this.state.disconnectBusy&&(e=j.a.createElement(Vn.a,null)),r=j.a.createElement("div",null,j.a.createElement("span",{className:"mx_SettingsTab_subsectionText"},t),j.a.createElement(En.a,{onClick:this.onDisconnectClicked,kind:"danger_sm"},e))}return j.a.createElement("form",{className:"mx_SettingsTab_section mx_SetIdServer",onSubmit:this.checkIdServer},j.a.createElement("span",{className:"mx_SettingsTab_subheading"},t),j.a.createElement("span",{className:"mx_SettingsTab_subsectionText"},n),j.a.createElement(jn.a,{label:Object(Y.a)("Enter a new identity server"),type:"text",autoComplete:"off",placeholder:this.state.defaultIdServer,value:this.state.idServer,onChange:this.onIdentityServerChanged,tooltipContent:this.getTooltip(),tooltipClassName:"mx_SetIdServer_tooltip",disabled:this.state.busy,forceValidity:!this.state.error&&null}),j.a.createElement(En.a,{type:"submit",kind:"primary_sm",onClick:this.checkIdServer,disabled:!this.idServerChangeEnabled()},Object(Y.a)("Change")),r)}})||Ci;var Ri,Di=n(178);let Ii=Object(B.a)("views.settings.SetIntegrationManager")(Ri=class extends j.a.Component{constructor(e){super(e),P()(this,"onProvisioningToggled",()=>{const e=this.state.provisioningEnabled;no.b.setValue("integrationProvisioning",null,Si.a.ACCOUNT,!e).catch(t=>{console.error("Error changing integration manager provisioning"),console.error(t),this.setState({provisioningEnabled:e})}),this.setState({provisioningEnabled:!e})});const t=Di.a.sharedInstance().getPrimaryManager();this.state={currentManager:t,provisioningEnabled:no.b.getValue("integrationProvisioning")}}render(){const e=Jr.getComponent("views.elements.ToggleSwitch"),t=this.state.currentManager;let n,r;return t?(n=`(${t.name})`,r=Object(Y.a)("Use an integration manager <b>(%(serverName)s)</b> to manage bots, widgets, and sticker packs.",{serverName:t.name},{b:e=>j.a.createElement("b",null,e)})):r=Object(Y.a)("Use an integration manager to manage bots, widgets, and sticker packs."),j.a.createElement("div",{className:"mx_SetIntegrationManager"},j.a.createElement("div",{className:"mx_SettingsTab_heading"},j.a.createElement("span",null,Object(Y.a)("Manage integrations")),j.a.createElement("span",{className:"mx_SettingsTab_subheading"},n),j.a.createElement(e,{checked:this.state.provisioningEnabled,onChange:this.onProvisioningToggled})),j.a.createElement("span",{className:"mx_SettingsTab_subsectionText"},r,j.a.createElement("br",null),j.a.createElement("br",null),Object(Y.a)("Integration managers receive configuration data, and can modify widgets, send room invites, and set power levels on your behalf.")))}})||Ri;var Ai,Ni=n(546),Mi=n(854),Pi=n(444),Li=n(774),ji=n(768),Ui=n(771),Bi=n(843),Gi=n(853),Vi=n(857),qi=n(849),Hi=n(851),zi=n(852),Wi=n(443),Ki=n(337),Yi=n(736),$i=n(449),Qi=n(659),Ji=n(660),Xi=n(887),Zi=n(129);let ea=Object(B.a)("views.terms.InlineTermsAgreement")(Ai=class extends j.a.Component{constructor(e){super(e),P()(this,"togglePolicy",e=>{const t=Object(Zi.a)(this.state.policies);t[e].checked=!t[e].checked,this.setState({policies:t})}),P()(this,"onContinue",()=>{!!this.state.policies.some(e=>!e.checked)||(this.setState({busy:!0}),this.props.onFinished(this.state.policies.map(e=>e.url)))}),this.state={policies:[],busy:!1}}componentDidMount(){const e=[];for(const t of this.props.policiesAndServicePairs){const n=Object.values(t.policies);for(const t of n){const n=Object(Y.i)(Object.keys(t).filter(e=>"version"!==e)),r={checked:!1,url:t[n].url,name:t[n].name};e.push(r)}}this.setState({policies:e})}renderCheckboxes(){const e=[];for(let t=0;t<this.state.policies.length;t++){const n=this.state.policies[t],r=Object(Y.a)("Accept <policyLink /> to continue:",{},{policyLink:()=>j.a.createElement("a",{href:n.url,rel:"noreferrer noopener",target:"_blank"},n.name,j.a.createElement("span",{className:"mx_InlineTermsAgreement_link"}))});e.push(j.a.createElement("div",{key:t,className:"mx_InlineTermsAgreement_cbContainer"},j.a.createElement("div",null,r),j.a.createElement("div",{className:"mx_InlineTermsAgreement_checkbox"},j.a.createElement(ir.a,{onChange:()=>this.togglePolicy(t),checked:n.checked},Object(Y.a)("Accept")))))}return e}render(){const e=Jr.getComponent("views.elements.AccessibleButton"),t=!!this.state.policies.some(e=>!e.checked);return j.a.createElement("div",null,this.props.introElement,this.renderCheckboxes(),j.a.createElement(e,{onClick:this.onContinue,disabled:t||this.state.busy,kind:"primary_sm"},Object(Y.a)("Continue")))}})||Ai;var ta,na=n(863),ra=n(158),oa=n(652),ia=n(833);let aa=Object(B.a)("views.verification.VerificationCancelled")(ta=class extends j.a.Component{render(){const e=Jr.getComponent("views.elements.DialogButtons");return j.a.createElement("div",null,j.a.createElement("p",null,Object(Y.a)("The other party cancelled the verification.")),j.a.createElement(e,{primaryButton:Object(Y.a)("OK"),hasCancel:!1,onPrimaryButtonClick:this.props.onDone}))}})||ta;var sa;let ca=Object(B.a)("views.verification.VerificationComplete")(sa=class extends j.a.Component{render(){const e=Jr.getComponent("views.elements.DialogButtons");return j.a.createElement("div",null,j.a.createElement("h2",null,Object(Y.a)("Verified!")),j.a.createElement("p",null,Object(Y.a)("You've successfully verified this user.")),j.a.createElement("p",null,Object(Y.a)("Secure messages with this user are end-to-end encrypted and not able to be read by third parties.")),j.a.createElement(e,{onPrimaryButtonClick:this.props.onDone,primaryButton:Object(Y.a)("Got It"),hasCancel:!1}))}})||sa;var la,ua,da,ha=n(681),pa=n(747),ma=n(746),ga=n(726),fa=n(727),_a=n(471),ba=n(732),va=n(784),ya=n(731),Ea=n(338),Sa=n(691),wa=n(885),Ca=n(472),Ta=n(705),xa=n(864),ka=n(88),Fa=n.n(ka);let Oa=Object(B.a)("structures.GenericErrorPage")((da=ua=class extends j.a.PureComponent{render(){return j.a.createElement("div",{className:"mx_GenericErrorPage"},j.a.createElement("div",{className:"mx_GenericErrorPage_box"},j.a.createElement("h1",null,this.props.title),j.a.createElement("p",null,this.props.message)))}},P()(ua,"propTypes",{title:Fa.a.object.isRequired,message:Fa.a.object.isRequired}),la=da))||la;var Ra,Da,Ia,Aa=n(883),Na=n(816),Ma=n(717),Pa=n(354),La=n(346),ja=n(814),Ua=n(441),Ba=n(216),Ga=n(815),Va=n(622),qa=n(809);let Ha=Object(B.a)("views.context_menus.GenericElementContextMenu")((Ia=Da=class extends j.a.Component{constructor(e){super(e),this.resize=this.resize.bind(this)}componentDidMount(){this.resize=this.resize.bind(this),window.addEventListener("resize",this.resize)}componentWillUnmount(){window.removeEventListener("resize",this.resize)}resize(){this.props.onResize&&this.props.onResize()}render(){return j.a.createElement("div",null,this.props.element)}},P()(Da,"propTypes",{element:Fa.a.element.isRequired,onResize:Fa.a.func}),Ra=Ia))||Ra;var za,Wa,Ka,Ya=n(280),$a=n(229);let Qa=Object(B.a)("views.context_menus.GroupInviteTileContextMenu")((Ka=Wa=class extends j.a.Component{constructor(e){super(e),this._onClickReject=this._onClickReject.bind(this)}componentDidMount(){this._unmounted=!1}componentWillUnmount(){this._unmounted=!0}_onClickReject(){const e=Jr.getComponent("dialogs.QuestionDialog");Ft.a.createTrackedDialog("Reject community invite","",e,{title:Object(Y.a)("Reject invitation"),description:Object(Y.a)("Are you sure you want to reject the invitation?"),onFinished:async e=>{if(!e)return;const t=Jr.getComponent("elements.Spinner"),n=Ft.a.createDialog(t,null,"mx_Dialog_spinner");try{await He.a.leaveGroup(this.props.group.groupId)}catch(e){console.error("Error rejecting community invite: ",e);const t=Jr.getComponent("dialogs.ErrorDialog");Ft.a.createTrackedDialog("Error rejecting invite","",t,{title:Object(Y.a)("Error"),description:Object(Y.a)("Unable to reject invite")})}finally{n.close()}}}),this.props.onFinished&&this.props.onFinished()}render(){return j.a.createElement("div",null,j.a.createElement(i.f,{className:"mx_RoomTileContextMenu_leave",onClick:this._onClickReject},j.a.createElement("img",{className:"mx_RoomTileContextMenu_tag_icon",src:n(1395),width:"15",height:"15",alt:""}),Object(Y.a)("Reject")))}},P()(Wa,"propTypes",{group:Fa.a.instanceOf($a.a).isRequired,onFinished:Fa.a.func}),za=Ka))||za;var Ja,Xa,Za,es=n(810),ts=n(439),ns=n(173),rs=n(381);class os{static moveTag(e,t,n){let r=ns.a.getOrderedTags(),o=ns.a.getRemovedTagsAccountData()||[];if(!r)return;r=r.filter(e=>e!==t),r=[...r.slice(0,n),t,...r.slice(n)],o=o.filter(e=>e!==t);const i=ns.a.getStoreId();return Object(ts.a)("TagOrderActions.moveTag",()=>(wn.a.trackEvent("TagOrderActions","commitTagOrdering"),e.setAccountData("im.vector.web.tag_ordering",{tags:r,removedTags:o,_storeId:i})),()=>({tags:r,removedTags:o}))}static removeTag(e,t){const n=ns.a.getOrderedTags(),r=ns.a.getRemovedTagsAccountData()||[];if(r.includes(t))return new rs.a(()=>{});r.push(t);const o=ns.a.getStoreId();return Object(ts.a)("TagOrderActions.removeTag",()=>(wn.a.trackEvent("TagOrderActions","removeTag"),e.setAccountData("im.vector.web.tag_ordering",{tags:n,removedTags:r,_storeId:o})),()=>({removedTags:r}))}}let is=Object(B.a)("views.context_menus.TagTileContextMenu")((Za=Xa=class extends j.a.Component{constructor(...e){super(...e),P()(this,"_onViewCommunityClick",()=>{Ve.a.dispatch({action:"view_group",group_id:this.props.tag}),this.props.onFinished()}),P()(this,"_onRemoveClick",()=>{Ve.a.dispatch(os.removeTag(this.context,this.props.tag)),this.props.onFinished()}),P()(this,"_onMoveUp",()=>{Ve.a.dispatch(os.moveTag(this.context,this.props.tag,this.props.index-1)),this.props.onFinished()}),P()(this,"_onMoveDown",()=>{Ve.a.dispatch(os.moveTag(this.context,this.props.tag,this.props.index+1)),this.props.onFinished()})}render(){let e,t;return this.props.index>0&&(e=j.a.createElement(i.f,{className:"mx_TagTileContextMenu_item mx_TagTileContextMenu_moveUp",onClick:this._onMoveUp},Object(Y.a)("Move up"))),this.props.index<(ns.a.getOrderedTags()||[]).length-1&&(t=j.a.createElement(i.f,{className:"mx_TagTileContextMenu_item mx_TagTileContextMenu_moveDown",onClick:this._onMoveDown},Object(Y.a)("Move down"))),j.a.createElement("div",null,j.a.createElement(i.f,{className:"mx_TagTileContextMenu_item mx_TagTileContextMenu_viewCommunity",onClick:this._onViewCommunityClick},Object(Y.a)("View Community")),e||t?j.a.createElement("hr",{className:"mx_TagTileContextMenu_separator",role:"separator"}):null,e,t,j.a.createElement("hr",{className:"mx_TagTileContextMenu_separator",role:"separator"}),j.a.createElement(i.f,{className:"mx_TagTileContextMenu_item mx_TagTileContextMenu_hideCommunity",onClick:this._onRemoveClick},Object(Y.a)("Unpin")))}},P()(Xa,"propTypes",{tag:Fa.a.string.isRequired,index:Fa.a.number.isRequired,onFinished:Fa.a.func.isRequired}),P()(Xa,"contextType",Dr.a),Ja=Za))||Ja;var as,ss,cs,ls=n(707),us=n(698),ds=n(563),hs=n(560),ps=n(494),ms=n(697),gs=n(838),fs=n(837),_s=n(751),bs=n(860),vs=n(839);function ys(){return Ge.a.get().idBaseUrl.split("://")[1]}class Es{constructor(){P()(this,"_makeAddThreepidOnlyRequest",e=>Ge.a.get().addThreePidOnly({sid:this.sessionId,client_secret:this.clientSecret,auth:e})),this.clientSecret=Ge.a.get().generateClientSecret(),this.sessionId=null,this.submitUrl=null}addEmailAddress(e){return Ge.a.get().requestAdd3pidEmailToken(e,this.clientSecret,1).then(e=>(this.sessionId=e.sid,e),(function(e){throw"M_THREEPID_IN_USE"===e.errcode?e.message=Object(Y.a)("This email address is already in use"):e.httpStatus&&(e.message=e.message+` (Status ${e.httpStatus})`),e}))}async bindEmailAddress(e){if(this.bind=!0,await Ge.a.get().doesServerSupportSeparateAddAndBind()){const t=new We.a,n=await t.getAccessToken();return Ge.a.get().requestEmailToken(e,this.clientSecret,1,void 0,void 0,n).then(e=>(this.sessionId=e.sid,e),(function(e){throw"M_THREEPID_IN_USE"===e.errcode?e.message=Object(Y.a)("This email address is already in use"):e.httpStatus&&(e.message=e.message+` (Status ${e.httpStatus})`),e}))}return this.addEmailAddress(e)}addMsisdn(e,t){return Ge.a.get().requestAdd3pidMsisdnToken(e,t,this.clientSecret,1).then(e=>(this.sessionId=e.sid,this.submitUrl=e.submit_url,e),(function(e){throw"M_THREEPID_IN_USE"===e.errcode?e.message=Object(Y.a)("This phone number is already in use"):e.httpStatus&&(e.message=e.message+` (Status ${e.httpStatus})`),e}))}async bindMsisdn(e,t){if(this.bind=!0,await Ge.a.get().doesServerSupportSeparateAddAndBind()){const n=new We.a,r=await n.getAccessToken();return Ge.a.get().requestMsisdnToken(e,t,this.clientSecret,1,void 0,void 0,r).then(e=>(this.sessionId=e.sid,e),(function(e){throw"M_THREEPID_IN_USE"===e.errcode?e.message=Object(Y.a)("This phone number is already in use"):e.httpStatus&&(e.message=e.message+` (Status ${e.httpStatus})`),e}))}return this.addMsisdn(e,t)}async checkEmailLinkClicked(){try{if(await Ge.a.get().doesServerSupportSeparateAddAndBind())if(this.bind){const e=new We.a,t=await e.getAccessToken();await Ge.a.get().bindThreePid({sid:this.sessionId,client_secret:this.clientSecret,id_server:ys(),id_access_token:t})}else try{return void await this._makeAddThreepidOnlyRequest()}catch(e){if(401!==e.httpStatus||!e.data||!e.data.flows)throw e;const t=Jr.getComponent("dialogs.InteractiveAuthDialog"),n={[ve.c.PHASE_PREAUTH]:{title:Object(Y.a)("Use Single Sign On to continue"),body:Object(Y.a)("Confirm adding this email address by using Single Sign On to prove your identity."),continueText:Object(Y.a)("Single Sign On"),continueKind:"primary"},[ve.c.PHASE_POSTAUTH]:{title:Object(Y.a)("Confirm adding email"),body:Object(Y.a)("Click the button below to confirm adding this email address."),continueText:Object(Y.a)("Confirm"),continueKind:"primary"}},{finished:r}=Ft.a.createTrackedDialog("Add Email","",t,{title:Object(Y.a)("Add Email Address"),matrixClient:Ge.a.get(),authData:e.data,makeRequest:this._makeAddThreepidOnlyRequest,aestheticsForStagePhases:{[ve.c.LOGIN_TYPE]:n,[ve.c.UNSTABLE_LOGIN_TYPE]:n}});return r}else await Ge.a.get().addThreePid({sid:this.sessionId,client_secret:this.clientSecret,id_server:ys()},this.bind)}catch(e){throw 401===e.httpStatus?e.message=Object(Y.a)("Failed to verify email address: make sure you clicked the link in the email"):e.httpStatus&&(e.message+=` (Status ${e.httpStatus})`),e}}async haveMsisdnToken(e){const t=new We.a,n=await Ge.a.get().doesServerSupportSeparateAddAndBind();let r;if(this.submitUrl)r=await Ge.a.get().submitMsisdnTokenOtherUrl(this.submitUrl,this.sessionId,this.clientSecret,e);else{if(!this.bind&&n)throw new Error("The add / bind with MSISDN flow is misconfigured");r=await Ge.a.get().submitMsisdnToken(this.sessionId,this.clientSecret,e,await t.getAccessToken())}if(r.errcode)throw r;if(n)if(this.bind)await Ge.a.get().bindThreePid({sid:this.sessionId,client_secret:this.clientSecret,id_server:ys(),id_access_token:await t.getAccessToken()});else try{return void await this._makeAddThreepidOnlyRequest()}catch(e){if(401!==e.httpStatus||!e.data||!e.data.flows)throw e;const t=Jr.getComponent("dialogs.InteractiveAuthDialog"),n={[ve.c.PHASE_PREAUTH]:{title:Object(Y.a)("Use Single Sign On to continue"),body:Object(Y.a)("Confirm adding this phone number by using Single Sign On to prove your identity."),continueText:Object(Y.a)("Single Sign On"),continueKind:"primary"},[ve.c.PHASE_POSTAUTH]:{title:Object(Y.a)("Confirm adding phone number"),body:Object(Y.a)("Click the button below to confirm adding this phone number."),continueText:Object(Y.a)("Confirm"),continueKind:"primary"}},{finished:r}=Ft.a.createTrackedDialog("Add MSISDN","",t,{title:Object(Y.a)("Add Phone Number"),matrixClient:Ge.a.get(),authData:e.data,makeRequest:this._makeAddThreepidOnlyRequest,aestheticsForStagePhases:{[ve.c.LOGIN_TYPE]:n,[ve.c.UNSTABLE_LOGIN_TYPE]:n}});return r}else await Ge.a.get().addThreePid({sid:this.sessionId,client_secret:this.clientSecret,id_server:ys()},this.bind)}}let Ss=Object(B.a)("views.dialogs.SetEmailDialog")((cs=ss=class extends j.a.Component{constructor(...e){super(...e),P()(this,"state",{emailAddress:"",emailBusy:!1}),P()(this,"onEmailAddressChanged",e=>{this.setState({emailAddress:e})}),P()(this,"onSubmit",()=>{const e=Jr.getComponent("dialogs.ErrorDialog"),t=Jr.getComponent("dialogs.QuestionDialog"),n=this.state.emailAddress;ze.a(n)?(this._addThreepid=new Es,this._addThreepid.addEmailAddress(n).then(()=>{Ft.a.createTrackedDialog("Verification Pending","",t,{title:Object(Y.a)("Verification Pending"),description:Object(Y.a)("Please check your email and click on the link it contains. Once this is done, click continue."),button:Object(Y.a)("Continue"),onFinished:this.onEmailDialogFinished})},t=>{this.setState({emailBusy:!1}),console.error("Unable to add email address "+n+" "+t),Ft.a.createTrackedDialog("Unable to add email address","",e,{title:Object(Y.a)("Unable to add email address"),description:t&&t.message?t.message:Object(Y.a)("Operation failed")})}),this.setState({emailBusy:!0})):Ft.a.createTrackedDialog("Invalid Email Address","",e,{title:Object(Y.a)("Invalid Email Address"),description:Object(Y.a)("This doesn't appear to be a valid email address")})}),P()(this,"onCancelled",()=>{this.props.onFinished(!1)}),P()(this,"onEmailDialogFinished",e=>{e?this.verifyEmailAddress():this.setState({emailBusy:!1})})}verifyEmailAddress(){this._addThreepid.checkEmailLinkClicked().then(()=>{this.props.onFinished(!0)},e=>{if(this.setState({emailBusy:!1}),"M_THREEPID_AUTH_FAILED"==e.errcode){const e=Jr.getComponent("dialogs.QuestionDialog"),t=Object(Y.a)("Unable to verify email address.")+" "+Object(Y.a)("Please check your email and click on the link it contains. Once this is done, click continue.");Ft.a.createTrackedDialog("Verification Pending","3pid Auth Failed",e,{title:Object(Y.a)("Verification Pending"),description:t,button:Object(Y.a)("Continue"),onFinished:this.onEmailDialogFinished})}else{const t=Jr.getComponent("dialogs.ErrorDialog");console.error("Unable to verify email address: "+e),Ft.a.createTrackedDialog("Unable to verify email address","",t,{title:Object(Y.a)("Unable to verify email address."),description:e&&e.message?e.message:Object(Y.a)("Operation failed")})}})}render(){const e=Jr.getComponent("views.dialogs.BaseDialog"),t=Jr.getComponent("elements.Spinner"),n=Jr.getComponent("elements.EditableText"),r=this.state.emailBusy?j.a.createElement(t,null):j.a.createElement(n,{initialValue:this.state.emailAddress,className:"mx_SetEmailDialog_email_input",autoFocus:"true",placeholder:Object(Y.a)("Email address"),placeholderClassName:"mx_SetEmailDialog_email_input_placeholder",blurToCancel:!1,onValueChanged:this.onEmailAddressChanged});return j.a.createElement(e,{className:"mx_SetEmailDialog",onFinished:this.onCancelled,title:this.props.title,contentId:"mx_Dialog_content"},j.a.createElement("div",{className:"mx_Dialog_content"},j.a.createElement("p",{id:"mx_Dialog_content"},Object(Y.a)("This will allow you to reset your password and receive notifications.")),r),j.a.createElement("div",{className:"mx_Dialog_buttons"},j.a.createElement("input",{className:"mx_Dialog_primary",type:"submit",value:Object(Y.a)("Continue"),onClick:this.onSubmit}),j.a.createElement("input",{type:"submit",value:Object(Y.a)("Skip"),onClick:this.onCancelled})))}},P()(ss,"propTypes",{onFinished:Fa.a.func.isRequired}),as=cs))||as;var ws,Cs,Ts,xs=n(804),ks=n(840),Fs=n(561),Os=n(429),Rs=n(276),Ds=n.n(Rs);let Is=Object(B.a)("views.dialogs.UploadFailureDialog")((Ts=Cs=class extends j.a.Component{constructor(...e){super(...e),P()(this,"_onCancelClick",()=>{this.props.onFinished(!1)}),P()(this,"_onUploadClick",()=>{this.props.onFinished(!0)})}render(){const e=Jr.getComponent("views.dialogs.BaseDialog"),t=Jr.getComponent("views.elements.DialogButtons");let n,r;if(1===this.props.totalFiles&&1===this.props.badFiles.length)n=Object(Y.a)("This file is <b>too large</b> to upload. The file size limit is %(limit)s but this file is %(sizeOfThisFile)s.",{limit:Ds()(this.props.contentMessages.getUploadLimit()),sizeOfThisFile:Ds()(this.props.badFiles[0].size)},{b:e=>j.a.createElement("b",null,e)}),r=j.a.createElement(t,{primaryButton:Object(Y.a)("OK"),hasCancel:!1,onPrimaryButtonClick:this._onCancelClick,focus:!0});else if(this.props.totalFiles===this.props.badFiles.length)n=Object(Y.a)("These files are <b>too large</b> to upload. The file size limit is %(limit)s.",{limit:Ds()(this.props.contentMessages.getUploadLimit())},{b:e=>j.a.createElement("b",null,e)}),r=j.a.createElement(t,{primaryButton:Object(Y.a)("OK"),hasCancel:!1,onPrimaryButtonClick:this._onCancelClick,focus:!0});else{n=Object(Y.a)("Some files are <b>too large</b> to be uploaded. The file size limit is %(limit)s.",{limit:Ds()(this.props.contentMessages.getUploadLimit())},{b:e=>j.a.createElement("b",null,e)});const e=this.props.totalFiles-this.props.badFiles.length;r=j.a.createElement(t,{primaryButton:Object(Y.a)("Upload %(count)s other files",{count:e}),onPrimaryButtonClick:this._onUploadClick,hasCancel:!0,cancelButton:Object(Y.a)("Cancel All"),onCancel:this._onCancelClick,focus:!0})}return j.a.createElement(e,{className:"mx_UploadFailureDialog",onFinished:this._onCancelClick,title:Object(Y.a)("Upload Error"),contentId:"mx_Dialog_content"},j.a.createElement("div",{id:"mx_Dialog_content"},n,void 0),r)}},P()(Cs,"propTypes",{badFiles:Fa.a.arrayOf(Fa.a.object).isRequired,totalFiles:Fa.a.number.isRequired,contentMessages:Fa.a.instanceOf(Xr.b).isRequired,onFinished:Fa.a.func.isRequired}),ws=Ts))||ws;var As,Ns,Ms,Ps=n(721),Ls=n(250),js=n(286),Us=n(720),Bs=n(162);let Gs=Object(B.a)("views.elements.TagTile")((Ms=Ns=class extends j.a.Component{constructor(...e){super(...e),P()(this,"state",{hover:!1,profile:null}),P()(this,"_onFlairStoreUpdated",()=>{this.unmounted||Bs.a.getGroupProfileCached(this.context,this.props.tag).then(e=>{this.unmounted||this.setState({profile:e})}).catch(e=>{console.warn("Could not fetch group profile for "+this.props.tag,e)})}),P()(this,"onClick",e=>{e.preventDefault(),e.stopPropagation(),Ve.a.dispatch({action:"select_tag",tag:this.props.tag,ctrlOrCmdKey:Object(K.c)(e),shiftKey:e.shiftKey}),"+"===this.props.tag[0]&&this._refreshGroup(this.props.tag)}),P()(this,"onMouseOver",()=>{no.b.getValue("feature_communities_v2_prototypes")||this.setState({hover:!0})}),P()(this,"onMouseLeave",()=>{this.setState({hover:!1})}),P()(this,"openMenu",e=>{e.stopPropagation(),e.preventDefault(),no.b.getValue("feature_communities_v2_prototypes")||(this.setState({hover:!1}),this.props.openMenu())})}componentDidMount(){this.unmounted=!1,"+"===this.props.tag[0]&&(Bs.a.addListener("updateGroupProfile",this._onFlairStoreUpdated),this._onFlairStoreUpdated(),this._refreshGroup(this.props.tag))}componentWillUnmount(){this.unmounted=!0,"+"===this.props.tag[0]&&Bs.a.removeListener("updateGroupProfile",this._onFlairStoreUpdated)}_refreshGroup(e){He.a.refreshGroupRooms(e),He.a.refreshGroupMembers(e)}render(){const e=Jr.getComponent("avatars.BaseAvatar"),t=this.state.profile||{},n=t.name||this.props.tag,r=t.avatarUrl?Object(Xe.b)(t.avatarUrl).getSquareThumbnailHttp(32):null,o=no.b.getValue("feature_communities_v2_prototypes"),i=Je()({mx_TagTile:!0,mx_TagTile_prototype:o,mx_TagTile_selected:this.props.selected&&!o,mx_TagTile_selected_prototype:this.props.selected&&o}),a=ns.a.getGroupBadge(this.props.tag);let s;if(a&&!this.state.hover&&!this.props.menuDisplayed){const e=Je()({mx_TagTile_badge:!0,mx_TagTile_badgeHighlight:a.highlight});s=j.a.createElement("div",{className:e},G.c(a.count))}const c=this.state.hover||this.props.menuDisplayed?j.a.createElement(En.a,{className:"mx_TagTile_context_button",onClick:this.openMenu,inputRef:this.props.contextMenuButtonRef},"···"):j.a.createElement("div",{ref:this.props.contextMenuButtonRef}),l=Jr.getComponent("elements.AccessibleTooltipButton");return j.a.createElement(l,{className:i,onClick:this.onClick,onContextMenu:this.openMenu,title:n},j.a.createElement("div",{className:"mx_TagTile_avatar",onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},j.a.createElement(e,{name:n,idName:this.props.tag,url:r,width:32,height:32}),c,s))}},P()(Ns,"propTypes",{tag:Fa.a.string,contextMenuButtonRef:Fa.a.object,openMenu:Fa.a.func,menuDisplayed:Fa.a.bool,selected:Fa.a.bool}),P()(Ns,"contextType",Dr.a),As=Ms))||As;function Vs(e){const[t,n,r,o]=Object(i.q)();let a=null;if(t&&n.current){const t=n.current.getBoundingClientRect(),r=Jr.getComponent("context_menus.TagTileContextMenu");a=j.a.createElement(i.b,Pr()({},Object(i.p)(t),{onFinished:o}),j.a.createElement(r,{tag:e.tag,onFinished:o,index:e.index}))}return j.a.createElement(j.a.Fragment,null,j.a.createElement(Gs,Pr()({},e,{contextMenuButtonRef:n,menuDisplayed:t,openMenu:r})),a)}var qs,Hs,zs,Ws=n(696);let Ks=Object(B.a)("views.elements.EditableText")((zs=Hs=class e extends j.a.Component{constructor(t){super(t),P()(this,"state",{phase:e.Phases.Display}),P()(this,"showPlaceholder",e=>{e?(this._editable_div.current.textContent=this.props.placeholder,this._editable_div.current.setAttribute("class",this.props.className+" "+this.props.placeholderClassName),this.placeholder=!0,this.value=""):(this._editable_div.current.textContent=this.value,this._editable_div.current.setAttribute("class",this.props.className),this.placeholder=!1)}),P()(this,"getValue",()=>this.value),P()(this,"setValue",e=>{this.value=e,this.showPlaceholder(!this.value)}),P()(this,"edit",()=>{this.setState({phase:e.Phases.Edit})}),P()(this,"cancelEdit",()=>{this.setState({phase:e.Phases.Display}),this.value=this.props.initialValue,this.showPlaceholder(!this.value),this.onValueChanged(!1),this._editable_div.current.blur()}),P()(this,"onValueChanged",e=>{this.props.onValueChanged(this.value,e)}),P()(this,"onKeyDown",e=>{this.placeholder&&this.showPlaceholder(!1),e.key===K.a.ENTER&&(e.stopPropagation(),e.preventDefault())}),P()(this,"onKeyUp",e=>{e.target.textContent?this.placeholder||(this.value=e.target.textContent):this.showPlaceholder(!0),e.key===K.a.ENTER?this.onFinish(e):e.key===K.a.ESCAPE&&this.cancelEdit()}),P()(this,"onClickDiv",t=>{this.props.editable&&this.setState({phase:e.Phases.Edit})}),P()(this,"onFocus",e=>{const t=e.target.childNodes[0];if(t){const e=document.createRange();e.setStart(t,0),e.setEnd(t,t.length);const n=window.getSelection();n.removeAllRanges(),n.addRange(e)}}),P()(this,"onFinish",(t,n)=>{const r=this,o=t.key===K.a.ENTER||n;this.setState({phase:e.Phases.Display},()=>{this.value!==this.props.initialValue&&r.onValueChanged(o)})}),P()(this,"onBlur",e=>{window.getSelection().removeAllRanges(),this.props.blurToCancel?this.cancelEdit():this.onFinish(e,this.props.blurToSubmit),this.showPlaceholder(!this.value)}),this.value="",this.placeholder=!1,this._editable_div=Object(L.createRef)()}UNSAFE_componentWillReceiveProps(e){e.initialValue!==this.props.initialValue&&(this.value=e.initialValue,this._editable_div.current&&this.showPlaceholder(!this.value))}componentDidMount(){this.value=this.props.initialValue,this._editable_div.current&&this.showPlaceholder(!this.value)}render(){const{className:t,editable:n,initialValue:r,label:o,labelClassName:i}=this.props;let a;return a=!n||this.state.phase===e.Phases.Display&&(o||i)&&!this.value?j.a.createElement("div",{className:t+" "+i,onClick:this.onClickDiv},o||r):j.a.createElement("div",{ref:this._editable_div,contentEditable:!0,className:t,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onFocus:this.onFocus,onBlur:this.onBlur}),a}},P()(Hs,"propTypes",{onValueChanged:Fa.a.func,initialValue:Fa.a.string,label:Fa.a.string,placeholder:Fa.a.string,className:Fa.a.string,labelClassName:Fa.a.string,placeholderClassName:Fa.a.string,blurToCancel:Fa.a.bool,blurToSubmit:Fa.a.bool,editable:Fa.a.bool}),P()(Hs,"Phases",{Display:"display",Edit:"edit"}),P()(Hs,"defaultProps",{onValueChanged(){},initialValue:"",label:"",placeholder:"",editable:!0,className:"mx_EditableText",placeholderClassName:"mx_EditableText_placeholder",blurToSubmit:!1}),qs=zs))||qs;var Ys;let $s=Object(B.a)("views.elements.EditableTextContainer")(Ys=class extends j.a.Component{constructor(e){super(e),this._unmounted=!1,this.state={busy:!1,errorString:null,value:e.initialValue},this._onValueChanged=this._onValueChanged.bind(this)}componentDidMount(){void 0!==this.props.getInitialValue&&(this.setState({busy:!0}),this.props.getInitialValue().then(e=>{this._unmounted||this.setState({busy:!1,value:e})},e=>{this._unmounted||this.setState({errorString:e.toString(),busy:!1})}))}componentWillUnmount(){this._unmounted=!0}_onValueChanged(e,t){t&&(this.setState({busy:!0,errorString:null}),this.props.onSubmit(e).then(()=>{this._unmounted||this.setState({busy:!1,value:e})},e=>{this._unmounted||this.setState({errorString:e.toString(),busy:!1})}))}render(){if(this.state.busy){const e=Jr.getComponent("elements.Spinner");return j.a.createElement(e,null)}if(this.state.errorString)return j.a.createElement("div",{className:"error"},this.state.errorString);{const e=Jr.getComponent("elements.EditableText");return j.a.createElement(e,{initialValue:this.state.value,placeholder:this.props.placeholder,onValueChanged:this._onValueChanged,blurToSubmit:this.props.blurToSubmit})}}})||Ys;$s.propTypes={getInitialValue:Fa.a.func,initialValue:Fa.a.string,placeholder:Fa.a.string,onSubmit:Fa.a.func,blurToSubmit:Fa.a.bool},$s.defaultProps={initialValue:"",placeholder:"",blurToSubmit:!1,onSubmit:function(e){return Promise.resolve()}};var Qs,Js,Xs,Zs=n(606),ec=n(387),tc=n(639),nc=n(345),rc=n(733),oc=n(331),ic=n(479),ac=n(462),sc=n(859),cc=n(426),lc=n(174),uc=n(680),dc=n(159);let hc=Object(B.a)("views.groups.GroupInviteTile")((Xs=Js=class extends j.a.Component{constructor(e,t){super(e,t),P()(this,"onClick",e=>{Ve.a.dispatch({action:"view_group",group_id:this.props.group.groupId})}),P()(this,"onMouseEnter",()=>{const e={hover:!0};this.context.isGuest()||(e.badgeHover=!0),this.setState(e)}),P()(this,"onMouseLeave",()=>{this.setState({badgeHover:!1,hover:!1})}),P()(this,"onContextMenuButtonClick",e=>{e.stopPropagation(),e.preventDefault(),this._showContextMenu(e.target.getBoundingClientRect())}),P()(this,"onContextMenu",e=>{e.preventDefault(),this._showContextMenu({right:e.clientX,top:e.clientY,height:0})}),P()(this,"closeMenu",()=>{this.setState({contextMenuPosition:null})}),this.state={hover:!1,badgeHover:!1,menuDisplayed:!1,selected:null===this.props.group.groupId}}_showContextMenu(e){if(Ge.a.get().isGuest())return;const t={contextMenuPosition:e};this.props.collapsed&&(t.hover=!1),this.setState(t)}render(){const e=Jr.getComponent("elements.AccessibleButton"),t=Jr.getComponent("avatars.BaseAvatar"),n=this.props.group.name||this.props.group.groupId,r=this.props.group.avatarUrl?Object(Xe.b)(this.props.group.avatarUrl).getSquareThumbnailHttp(24):null,o=j.a.createElement(t,{name:n,width:24,height:24,url:r}),a=Boolean(this.state.contextMenuPosition),s=Je()("mx_RoomTile_name mx_RoomTile_invite mx_RoomTile_badgeShown",{mx_RoomTile_badgeShown:this.state.badgeHover||a}),c=j.a.createElement("div",{title:this.props.group.groupId,className:s,tabIndex:-1,dir:"auto"},n),l=this.state.badgeHover||a,u=Je()("mx_RoomTile_badge mx_RoomTile_highlight",{mx_RoomTile_badgeButton:l}),d=l?"···":"!";let h;if(this.props.collapsed&&this.state.hover){const e=Jr.getComponent("elements.Tooltip");h=j.a.createElement(e,{className:"mx_RoomTile_tooltip",label:n,dir:"auto"})}const p=Je()("mx_RoomTile mx_RoomTile_highlight",{mx_RoomTile_menuDisplayed:a,mx_RoomTile_selected:this.state.selected,mx_GroupInviteTile:!0});let m;if(a){const e=Jr.getComponent("context_menus.GroupInviteTileContextMenu");m=j.a.createElement(i.b,Pr()({},Object(i.p)(this.state.contextMenuPosition),{onFinished:this.closeMenu}),j.a.createElement(e,{group:this.props.group,onFinished:this.closeMenu}))}return j.a.createElement(j.a.Fragment,null,j.a.createElement(dc.d,null,({onFocus:t,isActive:n,ref:r})=>j.a.createElement(e,{onFocus:t,tabIndex:n?0:-1,inputRef:r,className:p,onClick:this.onClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onContextMenu:this.onContextMenu},j.a.createElement("div",{className:"mx_RoomTile_avatar"},o),j.a.createElement("div",{className:"mx_RoomTile_nameContainer"},c,j.a.createElement(i.c,{className:u,onClick:this.onContextMenuButtonClick,label:Object(Y.a)("Options"),isExpanded:a,tabIndex:n?0:-1},d)),h)),m)}},P()(Js,"propTypes",{group:Fa.a.object.isRequired}),P()(Js,"contextType",Dr.a),Qs=Xs))||Qs;var pc,mc,gc,fc=n(756),_c=n(389);let bc=Object(B.a)("views.groups.GroupMemberTile")((gc=mc=class extends j.a.Component{constructor(...e){super(...e),P()(this,"onClick",e=>{Ve.a.dispatch({action:"view_group_user",member:this.props.member,groupId:this.props.groupId})})}render(){const e=Jr.getComponent("avatars.BaseAvatar"),t=Jr.getComponent("rooms.EntityTile"),n=this.props.member.displayname||this.props.member.userId,r=this.props.member.avatarUrl?Object(Xe.b)(this.props.member.avatarUrl).getSquareThumbnailHttp(36):null,o=j.a.createElement(e,{"aria-hidden":"true",name:this.props.member.displayname||this.props.member.userId,idName:this.props.member.userId,width:36,height:36,url:r});return j.a.createElement(t,{name:n,avatarJsx:o,onClick:this.onClick,suppressOnHover:!0,presenceState:"online",powerStatus:this.props.member.isPrivileged?t.POWER_STATUS_ADMIN:null})}},P()(mc,"propTypes",{groupId:Fa.a.string.isRequired,member:_c.a.isRequired}),P()(mc,"contextType",Dr.a),pc=gc))||pc;var vc,yc,Ec;let Sc=Object(B.a)("views.groups.GroupPublicityTile")((Ec=yc=class extends j.a.Component{constructor(...e){super(...e),P()(this,"state",{busy:!1,ready:!1,isGroupPublicised:!1}),P()(this,"_onPublicityToggle",()=>{this.setState({busy:!0,isGroupPublicised:!this.state.isGroupPublicised}),He.a.setGroupPublicity(this.props.groupId,!this.state.isGroupPublicised).then(()=>{this.setState({busy:!1})})})}componentDidMount(){this._initGroupStore(this.props.groupId)}_initGroupStore(e){this._groupStoreToken=He.a.registerListener(e,()=>{this.setState({isGroupPublicised:Boolean(He.a.getGroupPublicity(e)),ready:He.a.isStateReady(e,He.a.STATE_KEY.Summary)})})}componentWillUnmount(){this._groupStoreToken&&this._groupStoreToken.unregister()}render(){const e=Jr.getComponent("groups.GroupTile");return j.a.createElement("div",{className:"mx_GroupPublicity_toggle"},j.a.createElement(e,{groupId:this.props.groupId,showDescription:!1,avatarHeight:40}),j.a.createElement(lr.a,{checked:this.state.isGroupPublicised,disabled:!this.state.ready||this.state.busy,onChange:this._onPublicityToggle}))}},P()(yc,"propTypes",{groupId:Fa.a.string.isRequired}),vc=Ec))||vc;var wc,Cc,Tc,xc=n(758),kc=n(757);var Fc,Oc,Rc,Dc=Object(B.a)("views.groups.GroupRoomTile")((Tc=Cc=class extends j.a.Component{constructor(...e){super(...e),P()(this,"onClick",e=>{Ve.a.dispatch({action:"view_group_room",groupId:this.props.groupId,groupRoomId:this.props.groupRoom.roomId})})}render(){const e=Jr.getComponent("avatars.BaseAvatar"),t=Jr.getComponent("elements.AccessibleButton"),n=this.props.groupRoom.avatarUrl?Object(Xe.b)(this.props.groupRoom.avatarUrl).getSquareThumbnailHttp(36):null,r=j.a.createElement(e,{name:this.props.groupRoom.displayname,width:36,height:36,url:n});return j.a.createElement(t,{className:"mx_GroupRoomTile",onClick:this.onClick},j.a.createElement("div",{className:"mx_GroupRoomTile_avatar"},r),j.a.createElement("div",{className:"mx_GroupRoomTile_name"},this.props.groupRoom.displayname))}},P()(Cc,"propTypes",{groupId:Fa.a.string.isRequired,groupRoom:_c.b.isRequired}),P()(Cc,"contextType",Dr.a),wc=Tc))||wc;var Ic=Object(B.a)("views.groups.GroupTile")((Rc=Oc=class extends j.a.Component{constructor(...e){super(...e),P()(this,"state",{profile:null}),P()(this,"onClick",e=>{e.preventDefault(),Ve.a.dispatch({action:"view_group",group_id:this.props.groupId})}),P()(this,"onPinClick",e=>{e.preventDefault(),e.stopPropagation(),Ve.a.dispatch(os.moveTag(this.context,this.props.groupId,0))}),P()(this,"onUnpinClick",e=>{e.preventDefault(),e.stopPropagation(),Ve.a.dispatch(os.removeTag(this.context,this.props.groupId))})}componentDidMount(){Bs.a.getGroupProfileCached(this.context,this.props.groupId).then(e=>{this.setState({profile:e})}).catch(e=>{console.error("Error whilst getting cached profile for GroupTile",e)})}render(){const e=Jr.getComponent("avatars.BaseAvatar"),t=Jr.getComponent("elements.AccessibleButton"),n=this.state.profile||{},r=n.name||this.props.groupId,o=this.props.avatarHeight,i=this.props.showDescription?j.a.createElement("div",{className:"mx_GroupTile_desc"},n.shortDescription):j.a.createElement("div",null),a=n.avatarUrl?Object(Xe.b)(n.avatarUrl).getSquareThumbnailHttp(o):null,s=j.a.createElement("div",{className:"mx_GroupTile_avatar"},j.a.createElement(e,{name:r,idName:this.props.groupId,url:a,width:o,height:o}));return j.a.createElement(t,{className:"mx_GroupTile",onClick:this.onClick},s,j.a.createElement("div",{className:"mx_GroupTile_profile"},j.a.createElement("div",{className:"mx_GroupTile_name"},r),i,j.a.createElement("div",{className:"mx_GroupTile_groupId"},this.props.groupId),(ns.a.getOrderedTags()||[]).includes(this.props.groupId)?j.a.createElement(t,{kind:"link",onClick:this.onUnpinClick},Object(Y.a)("Unpin")):j.a.createElement(t,{kind:"link",onClick:this.onPinClick},Object(Y.a)("Pin"))))}},P()(Oc,"propTypes",{groupId:Fa.a.string.isRequired,showDescription:Fa.a.bool,avatarHeight:Fa.a.number}),P()(Oc,"contextType",Dr.a),P()(Oc,"defaultProps",{showDescription:!0,avatarHeight:50}),Fc=Rc))||Fc,Ac=n(856),Nc=n(131),Mc=n(1396),Pc=n(1397);const Lc=function(){let e=null;return function(t){return e||(e=document.createElement("textarea")),e.innerHTML=t,e.value}}();function jc(e){const t={stripReplyFallback:!0,returnString:!0};return"org.matrix.custom.html"===e.format?Object(Nc.b)(e,null,t):function(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}(Object(Nc.b)(e,null,t))}function Uc(e){const t=document.createElement(Object(Nc.c)(e)?"div":"span");return t.className="mx_EditHistoryMessage_insertion",t.appendChild(e),t}function Bc(e){const t=document.createElement(Object(Nc.c)(e)?"div":"span");return t.className="mx_EditHistoryMessage_deletion",t.appendChild(e),t}function Gc(e){if("#text"===e.nodeName)return zc(e.data);{const t=document.createElement(e.nodeName);if(e.attributes)for(const[n,r]of Object.entries(e.attributes))t.setAttribute(n,r);if(e.childNodes)for(const n of e.childNodes)t.appendChild(Gc(n));return t}}function Vc(e,t,n){t?e.insertBefore(n,t):e.appendChild(n)}function qc(e,t){for(let n=0;n<e.length-1;++n)if(e[n]!==t[n])return!1;const n=e.length-1;return t[n]>=e[n]}function Hc(e,t){if("removeTextElement"===e.action||"removeElement"===e.action){const n=1;for(const r of t)qc(e.route,r.route)&&(r.route[e.route.length-1]+=n)}}function zc(e){return document.createTextNode(Lc(e))}function Wc(e,t,n){const{refNode:r,refParentNode:o}=function(e,t,n=!1){let r,o=e;const i=n?t.length-1:t.length;for(let e=0;e<i;++e)r=o,o=o.childNodes[t[e]];return{refNode:o,refParentNode:r}}(e,t.route);switch(t.action){case"replaceElement":{const e=document.createElement("span"),n=Bc(Gc(t.oldValue)),o=Uc(Gc(t.newValue));e.appendChild(n),e.appendChild(o),r.parentNode.replaceChild(e,r);break}case"removeTextElement":{const e=Bc(zc(t.value));r.parentNode.replaceChild(e,r);break}case"removeElement":{const e=Bc(Gc(t.element));r.parentNode.replaceChild(e,r);break}case"modifyTextElement":{const e=n.diff_main(t.oldValue,t.newValue);n.diff_cleanupSemantic(e);const o=document.createElement("span");for(const[t,n]of e){let e=zc(n);t<0?e=Bc(e):t>0&&(e=Uc(e)),o.appendChild(e)}r.parentNode.replaceChild(o,r);break}case"addElement":Vc(o,r,Uc(Gc(t.element)));break;case"addTextElement":Vc(o,r,Uc(zc("\n"!==t.value?t.value:"")));break;case"removeAttribute":case"addAttribute":case"modifyAttribute":{const e=Bc(r.cloneNode(!0)),n=r.cloneNode(!0);"addAttribute"===t.action||"modifyAttribute"===t.action?n.setAttribute(t.name,t.newValue):n.removeAttribute(t.name);const o=Uc(n),i=document.createElement(Object(Nc.c)(r)?"div":"span");i.appendChild(e),i.appendChild(o),r.parentNode.replaceChild(i,r);break}default:console.warn("MessageDiffUtils::editBodyDiffToHtml: diff action not supported atm",t)}}function Kc(e,t){return e.length===t.length&&!e.some((e,n)=>e!==t[n])}function Yc(e,t){const n=`<div>${jc(e)}</div>`,r=`<div>${jc(t)}</div>`,o=function(e){const t=e.slice();for(let e=0;e<t.length;++e){const n=t[e];if("removeTextElement"===n.action){const r=t[e+1];r&&"addTextElement"===r.action&&r.text===n.text&&Kc(r.route,n.route)&&t.splice(e,2)}}return t}((new Pc.DiffDOM).diff(n,r)),i=new Mc.diff_match_patch,a=(new DOMParser).parseFromString(n,"text/html").body.children[0];for(let e=0;e<o.length;++e){const t=o[e];Wc(a,t,i),Hc(t,o.slice(e+1))}const s=a.innerHTML,c=Je()({mx_EventTile_body:!0,"markdown-body":!0});return j.a.createElement("span",{key:"body",className:c,dangerouslySetInnerHTML:{__html:s},dir:"auto"})}var $c,Qc,Jc,Xc=n(108),Zc=n(858);function el(e){const t=e.getOriginalContent();return t["m.new_content"]||t}let tl=Object(B.a)("views.messages.EditHistoryMessage")((Jc=Qc=class extends j.a.PureComponent{constructor(e){super(e),P()(this,"_onAssociatedStatusChanged",()=>{this.setState({sendStatus:this.props.mxEvent.getAssociatedStatus()})}),P()(this,"_onRedactClick",async()=>{const e=this.props.mxEvent,t=Ge.a.get(),n=Jr.getComponent("dialogs.ConfirmAndWaitRedactDialog");Ft.a.createTrackedDialog("Confirm Redact Dialog","Edit history",n,{redact:()=>t.redactEvent(e.getRoomId(),e.getId())},"mx_Dialog_confirmredact")}),P()(this,"_onViewSourceClick",()=>{const e=Jr.getComponent("structures.ViewSource");Ft.a.createTrackedDialog("View Event Source","Edit history",e,{mxEvent:this.props.mxEvent},"mx_Dialog_viewsource")});const t=Ge.a.get(),{userId:n}=t.credentials,r=this.props.mxEvent,o=t.getRoom(r.getRoomId());r.localRedactionEvent()&&r.localRedactionEvent().on("status",this._onAssociatedStatusChanged);const i=o.currentState.maySendRedactionForEvent(r,n);this.state={canRedact:i,sendStatus:r.getAssociatedStatus()},this._content=Object(L.createRef)(),this._pills=[]}pillifyLinks(){this._content.current&&Object(Zc.a)(this._content.current.children,this.props.mxEvent,this._pills)}componentDidMount(){this.pillifyLinks()}componentWillUnmount(){Object(Zc.b)(this._pills);const e=this.props.mxEvent;e.localRedactionEvent()&&e.localRedactionEvent().off("status",this._onAssociatedStatusChanged)}componentDidUpdate(){this.pillifyLinks()}_renderActionBar(){const e=Jr.getComponent("elements.AccessibleButton");let t;this.props.mxEvent.isRedacted()||this.props.isBaseEvent||!this.state.canRedact||(t=j.a.createElement(e,{onClick:this._onRedactClick},Object(Y.a)("Remove")));const n=j.a.createElement(e,{onClick:this._onViewSourceClick},Object(Y.a)("View Source"));return j.a.createElement("div",{className:"mx_MessageActionBar"},t,n)}render(){const{mxEvent:e}=this.props,t=el(e);let n;if(e.isRedacted())n=j.a.createElement(_o.a,{mxEvent:this.props.mxEvent});else{let r;if(r=this.props.previousEdit?Yc(el(this.props.previousEdit),t):Nc.b(t,null,{stripReplyFallback:!0}),"m.emote"===e.getContent().msgtype){const t=e.sender?e.sender.name:e.getSender();n=j.a.createElement("div",{className:"mx_EventTile_content",ref:this._content},"* ",j.a.createElement("span",{className:"mx_MEmoteBody_sender"},t)," ",r)}else n=j.a.createElement("div",{className:"mx_EventTile_content",ref:this._content},r)}const r=Object(Tr.f)(new Date(e.getTs()),this.props.isTwelveHour),o=-1!==["sending","queued","encrypting"].indexOf(this.state.sendStatus),i=Je()({mx_EventTile:!0,mx_EventTile_sending:o});return j.a.createElement("li",null,j.a.createElement("div",{className:i},j.a.createElement("div",{className:"mx_EventTile_line"},j.a.createElement("span",{className:"mx_MessageTimestamp"},r),n,this._renderActionBar())))}},P()(Qc,"propTypes",{mxEvent:Fa.a.instanceOf(Xc.b).isRequired,previousEdit:Fa.a.instanceOf(Xc.b),isBaseEvent:Fa.a.bool}),$c=Jc))||$c;var nl;let rl=Object(B.a)("views.messages.MKeyVerificationConclusion")(nl=class extends j.a.Component{constructor(e){super(e),P()(this,"_onRequestChanged",()=>{this.forceUpdate()}),P()(this,"_onTrustChanged",(e,t)=>{const{mxEvent:n}=this.props,r=n.verificationRequest;r&&r.otherUserId===e&&this.forceUpdate()})}componentDidMount(){const e=this.props.mxEvent.verificationRequest;e&&e.on("change",this._onRequestChanged),Ge.a.get().on("userTrustStatusChanged",this._onTrustChanged)}componentWillUnmount(){const e=this.props.mxEvent.verificationRequest;e&&e.off("change",this._onRequestChanged);const t=Ge.a.get();t&&t.removeListener("userTrustStatusChanged",this._onTrustChanged)}_shouldRender(e,t){return!!t&&(!("m.key.verification.cancel"===e.getType()&&!t.cancelled)&&(!("m.key.verification.done"===e.getType()&&!t.done)&&(!t.pending&&!!Ge.a.get().checkUserTrust(t.otherUserId).isCrossSigningVerified())))}render(){const{mxEvent:e}=this.props,t=e.verificationRequest;if(!this._shouldRender(e,t))return null;const n=Ge.a.get().getUserId();let r;if(t.done)r=Object(Y.a)("You verified %(name)s",{name:Object(Kr.a)(t.otherUserId,e)});else if(t.cancelled){const o=t.cancellingUserId;r=o===n?Object(Y.a)("You cancelled verifying %(name)s",{name:Object(Kr.a)(t.otherUserId,e)}):Object(Y.a)("%(name)s cancelled verifying",{name:Object(Kr.a)(o,e)})}if(r){const n=Je()("mx_cryptoEvent mx_cryptoEvent_icon",{mx_cryptoEvent_icon_verified:t.done});return j.a.createElement(Rr.a,{className:n,title:r,subtitle:Object(Kr.b)(t.otherUserId,e.getRoomId())})}return null}})||nl;rl.propTypes={mxEvent:Fa.a.object.isRequired};var ol,il,al,sl=n(629);let cl=Object(B.a)("views.messages.MjolnirBody")((al=il=class extends j.a.Component{constructor(){super(),P()(this,"_onAllowClick",e=>{e.preventDefault(),e.stopPropagation();const t=`mx_mjolnir_render_${this.props.mxEvent.getRoomId()}__${this.props.mxEvent.getId()}`;localStorage.setItem(t,"true"),this.props.onMessageAllowed()})}render(){return j.a.createElement("div",{className:"mx_MjolnirBody"},j.a.createElement("i",null,Object(Y.a)("You have ignored this user, so their message is hidden. <a>Show anyways.</a>",{},{a:e=>j.a.createElement("a",{href:"#",onClick:this._onAllowClick},e)})))}},P()(il,"propTypes",{mxEvent:Fa.a.object.isRequired,onMessageAllowed:Fa.a.func.isRequired}),ol=al))||ol;var ll,ul,dl;let hl=Object(B.a)("views.messages.RoomAvatarEvent")((dl=ul=class extends j.a.Component{constructor(...e){super(...e),P()(this,"onAvatarClick",()=>{const e=Ge.a.get(),t=this.props.mxEvent,n=Object(Xe.b)(t.getContent().url).srcHttp,r=e.getRoom(this.props.mxEvent.getRoomId()),o=Object(Y.a)("%(senderDisplayName)s changed the avatar for %(roomName)s",{senderDisplayName:t.sender&&t.sender.name?t.sender.name:t.getSender(),roomName:r?r.name:""}),i=Jr.getComponent("elements.ImageView"),a={src:n,name:o};Ft.a.createDialog(i,a,"mx_Dialog_lightbox",null,!0)})}render(){const e=this.props.mxEvent,t=e.sender&&e.sender.name?e.sender.name:e.getSender(),n=Jr.getComponent("avatars.RoomAvatar");if(!e.getContent().url||0===e.getContent().url.trim().length)return j.a.createElement("div",{className:"mx_TextualEvent"},Object(Y.a)("%(senderDisplayName)s removed the room avatar.",{senderDisplayName:t}));const r=Ge.a.get().getRoom(e.getRoomId()),o={avatarUrl:e.getContent().url,name:r?r.name:""};return j.a.createElement("div",{className:"mx_RoomAvatarEvent"},Object(Y.a)("%(senderDisplayName)s changed the room avatar to <img/>",{senderDisplayName:t},{img:()=>j.a.createElement(En.a,{key:"avatar",className:"mx_RoomAvatarEvent_avatar",onClick:this.onAvatarClick},j.a.createElement(n,{width:14,height:14,oobData:o}))}))}},P()(ul,"propTypes",{mxEvent:Fa.a.object.isRequired}),ll=dl))||ll;var pl,ml,gl,fl=n(114);let _l=Object(B.a)("views.messages.RoomCreate")((gl=ml=class extends j.a.Component{constructor(...e){super(...e),P()(this,"_onLinkClicked",e=>{e.preventDefault();const t=this.props.mxEvent.getContent().predecessor;Ve.a.dispatch({action:"view_room",event_id:t.event_id,highlighted:!0,room_id:t.room_id})})}render(){const e=this.props.mxEvent.getContent().predecessor;if(void 0===e)return j.a.createElement("div",null);const t=Ge.a.get().getRoom(e.room_id),n=new fl.a(t,e.room_id);n.load();const r=n.forEvent(e.event_id),o=j.a.createElement("a",{href:r,onClick:this._onLinkClicked},Object(Y.a)("Click here to see older messages."));return j.a.createElement(Rr.a,{className:"mx_CreateEvent",title:Object(Y.a)("This room is a continuation of another conversation."),subtitle:o})}},P()(ml,"propTypes",{mxEvent:Fa.a.object.isRequired}),pl=gl))||pl;var bl,vl,yl;const El=/\+\S+:\S+/;let Sl=Object(B.a)("views.room_settings.RelatedGroupSettings")((yl=vl=class extends j.a.Component{constructor(e){super(e),P()(this,"onNewGroupChanged",e=>{this.setState({newGroupId:e})}),P()(this,"onGroupAdded",e=>{if(0===e.length||!this.validateGroupId(e))return;const t=[...this.state.newGroupsList,e];this.setState({newGroupsList:t,newGroupId:""}),this.updateGroups(t)}),P()(this,"onGroupDeleted",e=>{const t=this.state.newGroupsList[e],n=this.state.newGroupsList.filter(e=>e!==t);this.setState({newGroupsList:n}),this.updateGroups(n)}),this.state={newGroupId:"",newGroupsList:e.relatedGroupsEvent&&e.relatedGroupsEvent.getContent().groups||[]}}updateGroups(e){this.context.sendStateEvent(this.props.roomId,"m.room.related_groups",{groups:e},"").catch(e=>{console.error(e),Ft.a.createTrackedDialog("Error updating flair","",bt.a,{title:Object(Y.a)("Error updating flair"),description:Object(Y.a)("There was an error updating the flair for this room. The server may not allow it or a temporary error occurred.")})})}validateGroupId(e){if(!El.test(e)){const t=Jr.getComponent("dialogs.ErrorDialog");return Ft.a.createTrackedDialog("Invalid related community ID","",t,{title:Object(Y.a)("Invalid community ID"),description:Object(Y.a)("'%(groupId)s' is not a valid community ID",{groupId:e})}),!1}return!0}render(){const e=this.context.getDomain(),t=Jr.getComponent("elements.EditableItemList");return j.a.createElement("div",null,j.a.createElement(t,{id:"relatedGroups",items:this.state.newGroupsList,className:"mx_RelatedGroupSettings",newItem:this.state.newGroupId,canRemove:this.props.canSetRelatedGroups,canEdit:this.props.canSetRelatedGroups,onNewItemChanged:this.onNewGroupChanged,onItemAdded:this.onGroupAdded,onItemRemoved:this.onGroupDeleted,itemsLabel:Object(Y.a)("Showing flair for these communities:"),noItemsLabel:Object(Y.a)("This room is not showing flair for any communities"),placeholder:Object(Y.a)("New community ID (e.g. +foo:%(localDomain)s)",{localDomain:e})}))}},P()(vl,"propTypes",{roomId:Fa.a.string.isRequired,canSetRelatedGroups:Fa.a.bool.isRequired,relatedGroupsEvent:Fa.a.instanceOf(Xc.b)}),P()(vl,"contextType",Dr.a),P()(vl,"defaultProps",{canSetRelatedGroups:!1}),bl=yl))||bl;var wl,Cl,Tl,xl=n(770);let kl=Object(B.a)("views.room_settings.UrlPreviewSettings")((Tl=Cl=class extends j.a.Component{constructor(...e){super(...e),P()(this,"_onClickUserSettings",e=>{e.preventDefault(),e.stopPropagation(),Ve.a.fire($e.a.ViewUserSettings)})}render(){const e=Jr.getComponent("elements.SettingsFlag"),t=this.props.room.roomId,n=Ge.a.get().isRoomEncrypted(t);let r=null,o=null;if(n)r=Object(Y.a)("In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.");else{if(r=no.b.getValueAt(Si.a.ACCOUNT,"urlPreviewsEnabled")?Object(Y.a)("You have <a>enabled</a> URL previews by default.",{},{a:e=>j.a.createElement("a",{onClick:this._onClickUserSettings,href:""},e)}):Object(Y.a)("You have <a>disabled</a> URL previews by default.",{},{a:e=>j.a.createElement("a",{onClick:this._onClickUserSettings,href:""},e)}),no.b.canSetValue("urlPreviewsEnabled",t,"room"))o=j.a.createElement("label",null,j.a.createElement(e,{name:"urlPreviewsEnabled",level:Si.a.ROOM,roomId:t,isExplicit:!0}));else{let e=Object(Y.b)("URL previews are enabled by default for participants in this room.");no.b.getValueAt(Si.a.ROOM,"urlPreviewsEnabled",t,!0)||(e=Object(Y.b)("URL previews are disabled by default for participants in this room.")),o=j.a.createElement("label",null,Object(Y.a)(e))}}const i=j.a.createElement(e,{name:n?"urlPreviewsEnabled_e2ee":"urlPreviewsEnabled",level:Si.a.ROOM_ACCOUNT,roomId:t});return j.a.createElement("div",null,j.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},Object(Y.a)("When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.")),j.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},r),o,j.a.createElement("label",null,i))}},P()(Cl,"propTypes",{room:Fa.a.object}),wl=Tl))||wl;var Fl,Ol,Rl,Dl=n(889),Il=n(200),Al=n(811),Nl=n(881),Ml=n(186);function Pl(e){return Object(Ml.a)(e.canonicalAlias,e.aliases)}const Ll=Fa.a.shape({name:Fa.a.string,topic:Fa.a.string,roomId:Fa.a.string,avatarUrl:Fa.a.string,numJoinedMembers:Fa.a.number,canonicalAlias:Fa.a.string,aliases:Fa.a.arrayOf(Fa.a.string),worldReadable:Fa.a.bool,guestCanJoin:Fa.a.bool});let jl=Object(B.a)("views.rooms.RoomDetailRow")((Rl=Ol=class extends j.a.Component{constructor(e){super(e),P()(this,"onClick",e=>{e.preventDefault(),this.props.onClick&&this.props.onClick(e,this.props.room)}),P()(this,"onTopicClick",e=>{e.stopPropagation()}),this._topic=Object(L.createRef)()}componentDidMount(){this._linkifyTopic()}componentDidUpdate(){this._linkifyTopic()}_linkifyTopic(){this._topic.current&&Object(Nc.g)(this._topic.current)}render(){const e=Jr.getComponent("avatars.BaseAvatar"),t=this.props.room,n=t.name||Pl(t)||Object(Y.a)("Unnamed room"),r=t.worldReadable?j.a.createElement("div",{className:"mx_RoomDirectory_perm"},Object(Y.a)("World readable")):j.a.createElement("div",null),o=t.guestCanJoin?j.a.createElement("div",{className:"mx_RoomDirectory_perm"},Object(Y.a)("Guests can join")):j.a.createElement("div",null),i=r||o?j.a.createElement("div",{className:"mx_RoomDirectory_perms"},r," ",o):j.a.createElement("div",null);let a=null;return t.avatarUrl&&(a=Object(Xe.b)(t.avatarUrl).getSquareThumbnailHttp(24)),j.a.createElement("tr",{key:t.roomId,onClick:this.onClick,onMouseDown:this.props.onMouseDown},j.a.createElement("td",{className:"mx_RoomDirectory_roomAvatar"},j.a.createElement(e,{width:24,height:24,resizeMethod:"crop",name:n,idName:n,url:a})),j.a.createElement("td",{className:"mx_RoomDirectory_roomDescription"},j.a.createElement("div",{className:"mx_RoomDirectory_name"},n)," ",i,j.a.createElement("div",{className:"mx_RoomDirectory_topic",ref:this._topic,onClick:this.onTopicClick},t.topic),j.a.createElement("div",{className:"mx_RoomDirectory_alias"},Pl(t))),j.a.createElement("td",{className:"mx_RoomDirectory_roomMemberCount"},t.numJoinedMembers))}},P()(Ol,"propTypes",{room:Ll,onClick:Fa.a.func,onMouseDown:Fa.a.func}),Fl=Rl))||Fl;var Ul,Bl,Gl;let Vl=Object(B.a)("views.rooms.RoomDetailList")((Gl=Bl=class extends j.a.Component{constructor(...e){super(...e),P()(this,"onDetailsClick",(e,t)=>{Ve.a.dispatch({action:"view_room",room_id:t.roomId,room_alias:t.canonicalAlias||(t.aliases||[])[0]})})}getRows(){if(!this.props.rooms)return[];const e=Jr.getComponent("rooms.RoomDetailRow");return this.props.rooms.map((t,n)=>j.a.createElement(e,{key:n,room:t,onClick:this.onDetailsClick}))}render(){let e;return e=0===this.getRows().length?j.a.createElement("i",null,Object(Y.a)("No rooms to show")):j.a.createElement("table",{className:"mx_RoomDirectory_table"},j.a.createElement("tbody",null,this.getRows())),j.a.createElement("div",{className:Je()("mx_RoomDetailList",this.props.className)},e)}},P()(Bl,"propTypes",{rooms:Fa.a.arrayOf(Ll),className:Fa.a.string}),Ul=Gl))||Ul;var ql,Hl,zl,Wl=n(779),Kl=n(782);let Yl=Object(B.a)("views.rooms.SimpleRoomHeader")((zl=Hl=class extends j.a.Component{render(){let e;return this.props.icon&&(e=j.a.createElement("img",{className:"mx_RoomHeader_icon",src:this.props.icon,width:"25",height:"25"})),j.a.createElement("div",{className:"mx_RoomHeader mx_RoomHeader_wrapper"},j.a.createElement("div",{className:"mx_RoomHeader_simpleHeader"},e,this.props.title))}},P()(Hl,"propTypes",{title:Fa.a.string,icon:Fa.a.string}),ql=zl))||ql;var $l=n(793),Ql=n(812);const Jl=({avatarUrl:e,avatarAltText:t,avatarName:n,uploadAvatar:r,removeAvatar:o})=>{const[i,a]=Object(L.useState)(!1),s={onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1)};let c,l,u=j.a.createElement(En.a,Pr()({element:"div",onClick:r,className:"mx_AvatarSetting_avatarPlaceholder"},s));e&&(u=j.a.createElement(En.a,Pr()({element:"img",src:e,alt:t,"aria-label":t,onClick:r},s))),r&&(c=j.a.createElement(En.a,Pr()({onClick:r,className:"mx_AvatarSetting_uploadButton"},s))),e&&o&&(l=j.a.createElement(En.a,{onClick:o,kind:"link_sm"},Object(Y.a)("Remove")));const d=Je()({mx_AvatarSetting_avatar:!0,mx_AvatarSetting_avatar_hovering:i&&r});return j.a.createElement("div",{className:d},u,j.a.createElement("div",{className:"mx_AvatarSetting_hover"},j.a.createElement("div",{className:"mx_AvatarSetting_hoverBg"}),j.a.createElement("span",null,Object(Y.a)("Upload"))),c,l)};Jl.propTypes={avatarUrl:Fa.a.string,avatarName:Fa.a.string.isRequired,uploadAvatar:Fa.a.func,removeAvatar:Fa.a.func,avatarAltText:Fa.a.string.isRequired};var Xl,Zl,eu,tu=Jl;let nu=Object(B.a)("views.settings.ChangeAvatar")((eu=Zl=class e extends j.a.Component{constructor(t){super(t),P()(this,"onRoomStateEvents",e=>{this.props.room&&e.getRoomId()===this.props.room.roomId&&"m.room.avatar"===e.getType()&&e.getSender()===Ge.a.get().getUserId()&&(e.getContent().url||(this.avatarSet=!1,this.setState({})))}),P()(this,"onFileSelected",e=>(this.avatarSet=!0,this.setAvatarFromFile(e.target.files[0]))),P()(this,"onError",e=>{this.setState({errorText:Object(Y.a)("Failed to upload profile picture!")})}),this.state={avatarUrl:this.props.initialAvatarUrl,phase:e.Phases.Display}}componentDidMount(){Ge.a.get().on("RoomState.events",this.onRoomStateEvents)}UNSAFE_componentWillReceiveProps(e){this.avatarSet||this.setState({avatarUrl:e.initialAvatarUrl})}componentWillUnmount(){Ge.a.get()&&Ge.a.get().removeListener("RoomState.events",this.onRoomStateEvents)}setAvatarFromFile(t){let n=null;this.setState({phase:e.Phases.Uploading});const r=this,o=Ge.a.get().uploadContent(t).then((function(e){return n=e,r.props.room?Ge.a.get().sendStateEvent(r.props.room.roomId,"m.room.avatar",{url:e},""):Ge.a.get().setAvatarUrl(e)}));return o.then((function(){r.setState({phase:e.Phases.Display,avatarUrl:Object(Xe.b)(n).srcHttp})}),(function(t){r.setState({phase:e.Phases.Error}),r.onError(t)})),o}render(){let t,n;if(this.props.room&&!this.avatarSet){const e=Jr.getComponent("avatars.RoomAvatar");t=j.a.createElement(e,{room:this.props.room,width:this.props.width,height:this.props.height,resizeMethod:"crop"})}else{const e=Jr.getComponent("avatars.BaseAvatar");t=j.a.createElement(e,{width:this.props.width,height:this.props.height,resizeMethod:"crop",name:"?",idName:Ge.a.get().getUserIdLocalpart(),url:this.state.avatarUrl})}switch(this.props.showUploadSection&&(n=j.a.createElement("div",{className:this.props.className},Object(Y.a)("Upload new:"),j.a.createElement("input",{type:"file",accept:"image/*",onChange:this.onFileSelected}),this.state.errorText)),this.state.phase){case e.Phases.Display:case e.Phases.Error:return j.a.createElement("div",null,j.a.createElement("div",{className:this.props.className},t),n);case e.Phases.Uploading:return j.a.createElement(vt.a,null)}}},P()(Zl,"propTypes",{initialAvatarUrl:Fa.a.string,room:Fa.a.object,showUploadSection:Fa.a.bool,width:Fa.a.number,height:Fa.a.number,className:Fa.a.string}),P()(Zl,"Phases",{Display:"display",Uploading:"uploading",Error:"error"}),P()(Zl,"defaultProps",{showUploadSection:!0,className:"",width:80,height:80}),Xl=eu))||Xl;var ru;let ou=Object(B.a)("views.settings.ChangeDisplayName")(ru=class extends j.a.Component{constructor(...e){super(...e),P()(this,"_getDisplayName",async()=>{const e=Ge.a.get();try{return(await e.getProfileInfo(e.getUserId())).displayname}catch(e){throw new Error("Failed to fetch display name")}}),P()(this,"_changeDisplayName",e=>Ge.a.get().setDisplayName(e).catch((function(e){throw new Error("Failed to set display name",e)})))}render(){const e=Jr.getComponent("elements.EditableTextContainer");return j.a.createElement(e,{getInitialValue:this._getDisplayName,placeholder:Object(Y.a)("No display name"),blurToSubmit:!0,onSubmit:this._changeDisplayName})}})||ru;var iu,au,su,cu=n(112);let lu=Object(B.a)("views.settings.ChangePassword")((su=au=class e extends j.a.Component{constructor(...t){super(...t),P()(this,"state",{fieldValid:{},phase:e.Phases.Edit,oldPassword:"",newPassword:"",newPasswordConfirm:""}),P()(this,"_onExportE2eKeysClicked",()=>{Ft.a.createTrackedDialogAsync("Export E2E Keys","Change Password",n.e(4).then(n.bind(null,866)),{matrixClient:Ge.a.get()})}),P()(this,"onChangeOldPassword",e=>{this.setState({oldPassword:e.target.value})}),P()(this,"onOldPasswordValidate",async e=>{const t=await this.validateOldPasswordRules(e);return this.markFieldValid("field_old_password",t.valid),t}),P()(this,"validateOldPasswordRules",Object(pr.a)({rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(Y.a)("Passwords can't be empty")}]})),P()(this,"onChangeNewPassword",e=>{this.setState({newPassword:e.target.value})}),P()(this,"onNewPasswordValidate",e=>{this.markFieldValid("field_new_password",e.valid)}),P()(this,"onChangeNewPasswordConfirm",e=>{this.setState({newPasswordConfirm:e.target.value})}),P()(this,"onNewPasswordConfirmValidate",async e=>{const t=await this.validatePasswordConfirmRules(e);return this.markFieldValid("field_new_password_confirm",t.valid),t}),P()(this,"validatePasswordConfirmRules",Object(pr.a)({rules:[{key:"required",test:({value:e,allowEmpty:t})=>t||!!e,invalid:()=>Object(Y.a)("Confirm password")},{key:"match",test({value:e}){return!e||e===this.state.newPassword},invalid:()=>Object(Y.a)("Passwords don't match")}]})),P()(this,"onClickChange",async e=>{e.preventDefault();if(!await this.verifyFieldsBeforeSubmit())return void cu.a.instance.track("onboarding_registration_submit_failed");const t=this.state.oldPassword,n=this.state.newPassword,r=this.state.newPasswordConfirm,o=this.props.onCheckPassword(t,n,r);o?this.props.onError(o):this.changePassword(t,n)})}changePassword(e,t){const n=Ge.a.get();if(!this.props.confirm)return void this._changePassword(n,e,t);const r=Jr.getComponent("dialogs.QuestionDialog");Ft.a.createTrackedDialog("Change Password","",r,{title:Object(Y.a)("Warning!"),description:j.a.createElement("div",null,Object(Y.a)("Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.")," ",j.a.createElement("a",{href:"https://github.com/vector-im/element-web/issues/2671",target:"_blank",rel:"noreferrer noopener"},"https://github.com/vector-im/element-web/issues/2671")),button:Object(Y.a)("Continue"),extraButtons:[j.a.createElement("button",{key:"exportRoomKeys",className:"mx_Dialog_primary",onClick:this._onExportE2eKeysClicked},Object(Y.a)("Export E2E room keys"))],onFinished:r=>{r&&this._changePassword(n,e,t)}})}_changePassword(t,n,r){const o={type:"m.login.password",identifier:{type:"m.id.user",user:t.credentials.userId},user:t.credentials.userId,password:n};this.setState({phase:e.Phases.Uploading}),t.setPassword(o,r).then(()=>{if(this.props.shouldAskForEmail)return this._optionallySetEmail().then(e=>{this.props.onFinished({didSetEmail:e})});this.props.onFinished()},e=>{this.props.onError(e)}).finally(()=>{this.setState({phase:e.Phases.Edit,oldPassword:"",newPassword:"",newPasswordConfirm:""})})}_optionallySetEmail(){const e=Jr.getComponent("dialogs.SetEmailDialog");return Ft.a.createTrackedDialog("Do you want to set an email address?","",e,{title:Object(Y.a)("Do you want to set an email address?")}).finished.then(([e])=>e)}markFieldValid(e,t){const{fieldValid:n}=this.state;n[e]=t,this.setState({fieldValid:n})}async verifyFieldsBeforeSubmit(){const e=document.activeElement;e&&e.blur();const t=["field_old_password","field_new_password","field_new_password_confirm"];for(const e of t){const t=this[e];t&&await t.validate({allowEmpty:!1})}if(await new Promise(e=>this.setState({},e)),this.allFieldsValid())return!0;const n=this.findFirstInvalidField(t);return!n||(n.focus(),n.validate({allowEmpty:!1,focused:!0}),!1)}allFieldsValid(){const e=Object.keys(this.state.fieldValid);for(let t=0;t<e.length;++t)if(!this.state.fieldValid[e[t]])return!1;return!0}findFirstInvalidField(e){for(const t of e)if(!this.state.fieldValid[t]&&this[t])return this[t];return null}render(){const t=this.props.rowClassName,n=this.props.buttonClassName;switch(this.state.phase){case e.Phases.Edit:return j.a.createElement("form",{className:this.props.className,onSubmit:this.onClickChange},j.a.createElement("div",{className:t},j.a.createElement(jn.a,{ref:e=>this.field_old_password=e,type:"password",label:Object(Y.a)("Current password"),value:this.state.oldPassword,onChange:this.onChangeOldPassword,onValidate:this.onOldPasswordValidate})),j.a.createElement("div",{className:t},j.a.createElement(Ee.a,{fieldRef:e=>this.field_new_password=e,type:"password",label:"New Password",minScore:we.a,value:this.state.newPassword,autoFocus:this.props.autoFocusNewPasswordInput,onChange:this.onChangeNewPassword,onValidate:this.onNewPasswordValidate,autoComplete:"new-password"})),j.a.createElement("div",{className:t},j.a.createElement(jn.a,{ref:e=>this.field_new_password_confirm=e,type:"password",label:Object(Y.a)("Confirm password"),value:this.state.newPasswordConfirm,onChange:this.onChangeNewPasswordConfirm,onValidate:this.onNewPasswordConfirmValidate,autoComplete:"new-password"})),j.a.createElement(En.a,{className:n,kind:this.props.buttonKind,onClick:this.onClickChange},this.props.buttonLabel||Object(Y.a)("Change Password")));case e.Phases.Uploading:return j.a.createElement("div",{className:"mx_Dialog_content"},j.a.createElement(vt.a,null))}}},P()(au,"propTypes",{onFinished:Fa.a.func,onError:Fa.a.func,onCheckPassword:Fa.a.func,rowClassName:Fa.a.string,buttonClassName:Fa.a.string,buttonKind:Fa.a.string,buttonLabel:Fa.a.string,confirm:Fa.a.bool,autoFocusNewPasswordInput:Fa.a.bool}),P()(au,"Phases",{Edit:"edit",Uploading:"uploading",Error:"error"}),P()(au,"defaultProps",{onFinished(){},onError(){},onCheckPassword:(e,t,n)=>t!==n?{error:Object(Y.a)("New passwords don't match")}:t&&0!==t.length?void 0:{error:Object(Y.a)("Passwords can't be empty")},confirm:!0}),iu=su))||iu;var uu;let du=Object(B.a)("views.settings.CrossSigningPanel")(uu=class extends j.a.PureComponent{constructor(e){super(e),P()(this,"onAccountData",e=>{const t=e.getType();(t.startsWith("m.cross_signing")||t.startsWith("m.secret_storage"))&&this._getUpdatedStatus()}),P()(this,"_onBootstrapClick",()=>{this._bootstrapCrossSigning({forceReset:!1})}),P()(this,"onStatusChanged",()=>{this._getUpdatedStatus()}),P()(this,"_bootstrapCrossSigning",async({forceReset:e=!1})=>{this.setState({error:null});try{const t=Ge.a.get();await t.bootstrapCrossSigning({authUploadDeviceSigningKeys:async e=>{const{finished:n}=Ft.a.createTrackedDialog("Cross-signing keys dialog","",ps.a,{title:Object(Y.a)("Setting up keys"),matrixClient:t,makeRequest:e}),[r]=await n;if(!r)throw new Error("Cross-signing key upload auth canceled")},setupNewCrossSigning:e})}catch(e){this.setState({error:e}),console.error("Error bootstrapping cross-signing",e)}this._unmounted||this._getUpdatedStatus()}),P()(this,"_resetCrossSigning",()=>{Ft.a.createDialog(mn,{onFinished:e=>{e&&this._bootstrapCrossSigning({forceReset:!0})}})}),this._unmounted=!1,this.state={error:null,crossSigningPublicKeysOnDevice:null,crossSigningPrivateKeysInStorage:null,masterPrivateKeyCached:null,selfSigningPrivateKeyCached:null,userSigningPrivateKeyCached:null,homeserverSupportsCrossSigning:null,crossSigningReady:null}}componentDidMount(){const e=Ge.a.get();e.on("accountData",this.onAccountData),e.on("userTrustStatusChanged",this.onStatusChanged),e.on("crossSigning.keysChanged",this.onStatusChanged),this._getUpdatedStatus()}componentWillUnmount(){this._unmounted=!0;const e=Ge.a.get();e&&(e.removeListener("accountData",this.onAccountData),e.removeListener("userTrustStatusChanged",this.onStatusChanged),e.removeListener("crossSigning.keysChanged",this.onStatusChanged))}async _getUpdatedStatus(){const e=Ge.a.get(),t=e.getCrossSigningCacheCallbacks(),n=e.crypto.crossSigningInfo,r=e.crypto.secretStorage,o=n.getId(),i=await n.isStoredInSecretStorage(r),a=!(!t||!await t.getCrossSigningKeyCache("master")),s=!(!t||!await t.getCrossSigningKeyCache("self_signing")),c=!(!t||!await t.getCrossSigningKeyCache("user_signing")),l=await e.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"),u=await e.isCrossSigningReady();this.setState({crossSigningPublicKeysOnDevice:o,crossSigningPrivateKeysInStorage:i,masterPrivateKeyCached:a,selfSigningPrivateKeyCached:s,userSigningPrivateKeyCached:c,homeserverSupportsCrossSigning:l,crossSigningReady:u})}render(){const e=Jr.getComponent("elements.AccessibleButton"),{error:t,crossSigningPublicKeysOnDevice:n,crossSigningPrivateKeysInStorage:r,masterPrivateKeyCached:o,selfSigningPrivateKeyCached:i,userSigningPrivateKeyCached:a,homeserverSupportsCrossSigning:s,crossSigningReady:c}=this.state;let l,u;t&&(l=j.a.createElement("div",{className:"error"},t.toString())),u=void 0===s?j.a.createElement(vt.a,null):s?c?j.a.createElement("p",null,"✅ ",Object(Y.a)("Cross-signing is ready for use.")):r?j.a.createElement("p",null,Object(Y.a)("Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.")):j.a.createElement("p",null,Object(Y.a)("Cross-signing is not set up.")):j.a.createElement("p",null,Object(Y.a)("Your homeserver does not support cross-signing."));const d=n||r||o||i||a,h=[];let p;return!(n&&r&&o&&i&&a)&&s&&h.push(j.a.createElement(e,{key:"setup",kind:"primary",onClick:this._onBootstrapClick},Object(Y.a)("Set up"))),d&&h.push(j.a.createElement(e,{key:"reset",kind:"danger",onClick:this._resetCrossSigning},Object(Y.a)("Reset"))),h.length&&(p=j.a.createElement("div",{className:"mx_CrossSigningPanel_buttonRow"},h)),j.a.createElement("div",null,u,j.a.createElement("details",null,j.a.createElement("summary",null,Object(Y.a)("Advanced")),j.a.createElement("table",{className:"mx_CrossSigningPanel_statusList"},j.a.createElement("tbody",null,j.a.createElement("tr",null,j.a.createElement("td",null,Object(Y.a)("Cross-signing public keys:")),j.a.createElement("td",null,n?Object(Y.a)("in memory"):Object(Y.a)("not found"))),j.a.createElement("tr",null,j.a.createElement("td",null,Object(Y.a)("Cross-signing private keys:")),j.a.createElement("td",null,r?Object(Y.a)("in secret storage"):Object(Y.a)("not found in storage"))),j.a.createElement("tr",null,j.a.createElement("td",null,Object(Y.a)("Master private key:")),j.a.createElement("td",null,o?Object(Y.a)("cached locally"):Object(Y.a)("not found locally"))),j.a.createElement("tr",null,j.a.createElement("td",null,Object(Y.a)("Self signing private key:")),j.a.createElement("td",null,i?Object(Y.a)("cached locally"):Object(Y.a)("not found locally"))),j.a.createElement("tr",null,j.a.createElement("td",null,Object(Y.a)("User signing private key:")),j.a.createElement("td",null,a?Object(Y.a)("cached locally"):Object(Y.a)("not found locally"))),j.a.createElement("tr",null,j.a.createElement("td",null,Object(Y.a)("Homeserver feature support:")),j.a.createElement("td",null,s?Object(Y.a)("exists"):Object(Y.a)("not found")))))),l,p)}})||uu;var hu;let pu=Object(B.a)("views.settings.DevicesPanel")(hu=class extends j.a.Component{constructor(e){super(e),this.state={devices:void 0,deviceLoadError:void 0,selectedDevices:[],deleting:!1},this._unmounted=!1,this._renderDevice=this._renderDevice.bind(this),this._onDeviceSelectionToggled=this._onDeviceSelectionToggled.bind(this),this._onDeleteClick=this._onDeleteClick.bind(this)}componentDidMount(){this._loadDevices()}componentWillUnmount(){this._unmounted=!0}_loadDevices(){Ge.a.get().getDevices().then(e=>{this._unmounted||this.setState({devices:e.devices||[]})},e=>{if(this._unmounted)return;let t;404==e.httpStatus?t=Object(Y.a)("Your homeserver does not support session management."):(console.error("Error loading sessions:",e),t=Object(Y.a)("Unable to load session list")),this.setState({deviceLoadError:t})})}_deviceCompare(e,t){const n=(t.last_seen_ts||0)-(e.last_seen_ts||0);if(0!==n)return n;const r=e.device_id,o=t.device_id;return r<o?-1:r>o?1:0}_onDeviceSelectionToggled(e){if(this._unmounted)return;const t=e.device_id;this.setState((e,n)=>{const r=e.selectedDevices.slice(),o=r.indexOf(t);return-1===o?r.push(t):r.splice(o,1),{selectedDevices:r}})}_onDeleteClick(){this.setState({deleting:!0}),this._makeDeleteRequest(null).catch(e=>{if(this._unmounted)return;if(401!==e.httpStatus||!e.data||!e.data.flows)throw e;const t=Jr.getComponent("dialogs.InteractiveAuthDialog"),n=this.state.selectedDevices.length,r={[ve.c.PHASE_PREAUTH]:{title:Object(Y.a)("Use Single Sign On to continue"),body:Object(Y.a)("Confirm deleting these sessions by using Single Sign On to prove your identity.",{count:n}),continueText:Object(Y.a)("Single Sign On"),continueKind:"primary"},[ve.c.PHASE_POSTAUTH]:{title:Object(Y.a)("Confirm deleting these sessions"),body:Object(Y.a)("Click the button below to confirm deleting these sessions.",{count:n}),continueText:Object(Y.a)("Delete sessions",{count:n}),continueKind:"danger"}};Ft.a.createTrackedDialog("Delete Device Dialog","",t,{title:Object(Y.a)("Authentication"),matrixClient:Ge.a.get(),authData:e.data,makeRequest:this._makeDeleteRequest.bind(this),aestheticsForStagePhases:{[ve.c.LOGIN_TYPE]:r,[ve.c.UNSTABLE_LOGIN_TYPE]:r}})}).catch(e=>{console.error("Error deleting sessions",e),this._unmounted}).finally(()=>{this.setState({deleting:!1})})}_makeDeleteRequest(e){return Ge.a.get().deleteMultipleDevices(this.state.selectedDevices,e).then(()=>{this.setState({devices:this.state.devices.filter(e=>!this.state.selectedDevices.includes(e.device_id)),selectedDevices:[]})})}_renderDevice(e){const t=Jr.getComponent("settings.DevicesPanelEntry");return j.a.createElement(t,{key:e.device_id,device:e,selected:this.state.selectedDevices.includes(e.device_id),onDeviceToggled:this._onDeviceSelectionToggled})}render(){const e=Jr.getComponent("elements.Spinner"),t=Jr.getComponent("elements.AccessibleButton");if(void 0!==this.state.deviceLoadError){const e=Je()(this.props.className,"error");return j.a.createElement("div",{className:e},this.state.deviceLoadError)}const n=this.state.devices;if(void 0===n){const t=this.props.className;return j.a.createElement(e,{className:t})}n.sort(this._deviceCompare);const r=this.state.deleting?j.a.createElement(e,{w:22,h:22}):j.a.createElement(t,{onClick:this._onDeleteClick,kind:"danger_sm"},Object(Y.a)("Delete %(count)s sessions",{count:this.state.selectedDevices.length})),o=Je()(this.props.className,"mx_DevicesPanel");return j.a.createElement("div",{className:o},j.a.createElement("div",{className:"mx_DevicesPanel_header"},j.a.createElement("div",{className:"mx_DevicesPanel_deviceId"},Object(Y.a)("ID")),j.a.createElement("div",{className:"mx_DevicesPanel_deviceName"},Object(Y.a)("Public Name")),j.a.createElement("div",{className:"mx_DevicesPanel_deviceLastSeen"},Object(Y.a)("Last seen")),j.a.createElement("div",{className:"mx_DevicesPanel_deviceButtons"},this.state.selectedDevices.length>0?r:null)),n.map(this._renderDevice))}})||hu;var mu;pu.propTypes={className:Fa.a.string};let gu=Object(B.a)("views.settings.DevicesPanelEntry")(mu=class extends j.a.Component{constructor(e){super(e),this._unmounted=!1,this.onDeviceToggled=this.onDeviceToggled.bind(this),this._onDisplayNameChanged=this._onDisplayNameChanged.bind(this)}componentWillUnmount(){this._unmounted=!0}_onDisplayNameChanged(e){const t=this.props.device;return Ge.a.get().setDeviceDetails(t.device_id,{display_name:e}).catch(e=>{throw console.error("Error setting session display name",e),new Error(Object(Y.a)("Failed to set display name"))})}onDeviceToggled(){this.props.onDeviceToggled(this.props.device)}render(){const e=Jr.getComponent("elements.EditableTextContainer"),t=this.props.device;let n="";if(t.last_seen_ts){const e=Object(Tr.b)(new Date(t.last_seen_ts));n=t.last_seen_ip+" @ "+e.toLocaleString()}let r="";return t.device_id===Ge.a.get().getDeviceId()&&(r=" mx_DevicesPanel_myDevice"),j.a.createElement("div",{className:"mx_DevicesPanel_device"+r},j.a.createElement("div",{className:"mx_DevicesPanel_deviceId"},t.device_id),j.a.createElement("div",{className:"mx_DevicesPanel_deviceName"},j.a.createElement(e,{initialValue:t.display_name,onSubmit:this._onDisplayNameChanged,placeholder:t.device_id})),j.a.createElement("div",{className:"mx_DevicesPanel_lastSeen"},n),j.a.createElement("div",{className:"mx_DevicesPanel_deviceButtons"},j.a.createElement(ir.a,{onChange:this.onDeviceToggled,checked:this.props.selected})))}})||mu;gu.propTypes={device:Fa.a.object.isRequired,onDeviceToggled:Fa.a.func},gu.defaultProps={onDeviceToggled:function(){}};var fu,_u,bu,vu=n(559),yu=n(530),Eu=n(847);class Su extends j.a.Component{constructor(){super(),P()(this,"_onRemove",e=>{e.stopPropagation(),e.preventDefault(),this.setState({verifyRemove:!0})}),P()(this,"_onDontRemove",e=>{e.stopPropagation(),e.preventDefault(),this.setState({verifyRemove:!1})}),P()(this,"_onActuallyRemove",e=>{e.stopPropagation(),e.preventDefault(),Ge.a.get().deleteThreePid(this.props.email.medium,this.props.email.address).then(()=>this.props.onRemoved(this.props.email)).catch(e=>{const t=Jr.getComponent("dialogs.ErrorDialog");console.error("Unable to remove contact information: "+e),Ft.a.createTrackedDialog("Remove 3pid failed","",t,{title:Object(Y.a)("Unable to remove contact information"),description:e&&e.message?e.message:Object(Y.a)("Operation failed")})})}),this.state={verifyRemove:!1}}render(){return this.state.verifyRemove?j.a.createElement("div",{className:"mx_ExistingEmailAddress"},j.a.createElement("span",{className:"mx_ExistingEmailAddress_promptText"},Object(Y.a)("Remove %(email)s?",{email:this.props.email.address})),j.a.createElement(En.a,{onClick:this._onActuallyRemove,kind:"danger_sm",className:"mx_ExistingEmailAddress_confirmBtn"},Object(Y.a)("Remove")),j.a.createElement(En.a,{onClick:this._onDontRemove,kind:"link_sm",className:"mx_ExistingEmailAddress_confirmBtn"},Object(Y.a)("Cancel"))):j.a.createElement("div",{className:"mx_ExistingEmailAddress"},j.a.createElement("span",{className:"mx_ExistingEmailAddress_email"},this.props.email.address),j.a.createElement(En.a,{onClick:this._onRemove,kind:"danger_sm"},Object(Y.a)("Remove")))}}P()(Su,"propTypes",{email:Fa.a.object.isRequired,onRemoved:Fa.a.func.isRequired});let wu=Object(B.a)("views.settings.account.EmailAddresses")((bu=_u=class extends j.a.Component{constructor(e){super(e),P()(this,"_onRemoved",e=>{const t=this.props.emails.filter(t=>t!==e);this.props.onEmailsChange(t)}),P()(this,"_onChangeNewEmailAddress",e=>{this.setState({newEmailAddress:e.target.value})}),P()(this,"_onAddClick",e=>{if(e.stopPropagation(),e.preventDefault(),!this.state.newEmailAddress)return;const t=Jr.getComponent("dialogs.ErrorDialog"),n=this.state.newEmailAddress;if(!ze.a(n))return void Ft.a.createTrackedDialog("Invalid email address","",t,{title:Object(Y.a)("Invalid Email Address"),description:Object(Y.a)("This doesn't appear to be a valid email address")});const r=new Es;this.setState({verifying:!0,continueDisabled:!0,addTask:r}),r.addEmailAddress(n).then(()=>{this.setState({continueDisabled:!1})}).catch(e=>{console.error("Unable to add email address "+n+" "+e),this.setState({verifying:!1,continueDisabled:!1,addTask:null}),Ft.a.createTrackedDialog("Unable to add email address","",t,{title:Object(Y.a)("Unable to add email address"),description:e&&e.message?e.message:Object(Y.a)("Operation failed")})})}),P()(this,"_onContinueClick",e=>{e.stopPropagation(),e.preventDefault(),this.setState({continueDisabled:!0}),this.state.addTask.checkEmailLinkClicked().then(([e])=>{let t=this.state.newEmailAddress;if(e){const e=this.state.newEmailAddress,n=[...this.props.emails,{address:e,medium:"email"}];this.props.onEmailsChange(n),t=""}this.setState({addTask:null,continueDisabled:!1,verifying:!1,newEmailAddress:t})}).catch(e=>{this.setState({continueDisabled:!1});const t=Jr.getComponent("dialogs.ErrorDialog");"M_THREEPID_AUTH_FAILED"===e.errcode?Ft.a.createTrackedDialog("Email hasn't been verified yet","",t,{title:Object(Y.a)("Your email address hasn't been verified yet"),description:Object(Y.a)("Click the link in the email you received to verify and then click continue again.")}):(console.error("Unable to verify email address: ",e),Ft.a.createTrackedDialog("Unable to verify email address","",t,{title:Object(Y.a)("Unable to verify email address."),description:e&&e.message?e.message:Object(Y.a)("Operation failed")}))})}),this.state={verifying:!1,addTask:null,continueDisabled:!1,newEmailAddress:""}}render(){const e=this.props.emails.map(e=>j.a.createElement(Su,{email:e,onRemoved:this._onRemoved,key:e.address}));let t=j.a.createElement(En.a,{onClick:this._onAddClick,kind:"primary"},Object(Y.a)("Add"));return this.state.verifying&&(t=j.a.createElement("div",null,j.a.createElement("div",null,Object(Y.a)("We've sent you an email to verify your address. Please follow the instructions there and then click the button below.")),j.a.createElement(En.a,{onClick:this._onContinueClick,kind:"primary",disabled:this.state.continueDisabled},Object(Y.a)("Continue")))),j.a.createElement("div",{className:"mx_EmailAddresses"},e,j.a.createElement("form",{onSubmit:this._onAddClick,autoComplete:"off",noValidate:!0,className:"mx_EmailAddresses_new"},j.a.createElement(jn.a,{type:"text",label:Object(Y.a)("Email Address"),autoComplete:"off",disabled:this.state.verifying,value:this.state.newEmailAddress,onChange:this._onChangeNewEmailAddress}),t))}},P()(_u,"propTypes",{emails:Fa.a.array.isRequired,onEmailsChange:Fa.a.func.isRequired}),fu=bu))||fu;var Cu,Tu,xu;class ku extends j.a.Component{constructor(){super(),P()(this,"_onRemove",e=>{e.stopPropagation(),e.preventDefault(),this.setState({verifyRemove:!0})}),P()(this,"_onDontRemove",e=>{e.stopPropagation(),e.preventDefault(),this.setState({verifyRemove:!1})}),P()(this,"_onActuallyRemove",e=>{e.stopPropagation(),e.preventDefault(),Ge.a.get().deleteThreePid(this.props.msisdn.medium,this.props.msisdn.address).then(()=>this.props.onRemoved(this.props.msisdn)).catch(e=>{const t=Jr.getComponent("dialogs.ErrorDialog");console.error("Unable to remove contact information: "+e),Ft.a.createTrackedDialog("Remove 3pid failed","",t,{title:Object(Y.a)("Unable to remove contact information"),description:e&&e.message?e.message:Object(Y.a)("Operation failed")})})}),this.state={verifyRemove:!1}}render(){return this.state.verifyRemove?j.a.createElement("div",{className:"mx_ExistingPhoneNumber"},j.a.createElement("span",{className:"mx_ExistingPhoneNumber_promptText"},Object(Y.a)("Remove %(phone)s?",{phone:this.props.msisdn.address})),j.a.createElement(En.a,{onClick:this._onActuallyRemove,kind:"danger_sm",className:"mx_ExistingPhoneNumber_confirmBtn"},Object(Y.a)("Remove")),j.a.createElement(En.a,{onClick:this._onDontRemove,kind:"link_sm",className:"mx_ExistingPhoneNumber_confirmBtn"},Object(Y.a)("Cancel"))):j.a.createElement("div",{className:"mx_ExistingPhoneNumber"},j.a.createElement("span",{className:"mx_ExistingPhoneNumber_address"},"+",this.props.msisdn.address),j.a.createElement(En.a,{onClick:this._onRemove,kind:"danger_sm"},Object(Y.a)("Remove")))}}P()(ku,"propTypes",{msisdn:Fa.a.object.isRequired,onRemoved:Fa.a.func.isRequired});let Fu=Object(B.a)("views.settings.account.PhoneNumbers")((xu=Tu=class extends j.a.Component{constructor(e){super(e),P()(this,"_onRemoved",e=>{const t=this.props.msisdns.filter(t=>t!==e);this.props.onMsisdnsChange(t)}),P()(this,"_onChangeNewPhoneNumber",e=>{this.setState({newPhoneNumber:e.target.value})}),P()(this,"_onChangeNewPhoneNumberCode",e=>{this.setState({newPhoneNumberCode:e.target.value})}),P()(this,"_onAddClick",e=>{if(e.stopPropagation(),e.preventDefault(),!this.state.newPhoneNumber)return;const t=Jr.getComponent("dialogs.ErrorDialog"),n=this.state.newPhoneNumber,r=this.state.phoneCountry,o=new Es;this.setState({verifying:!0,continueDisabled:!0,addTask:o}),o.addMsisdn(r,n).then(e=>{this.setState({continueDisabled:!1,verifyMsisdn:e.msisdn})}).catch(e=>{console.error("Unable to add phone number "+n+" "+e),this.setState({verifying:!1,continueDisabled:!1,addTask:null}),Ft.a.createTrackedDialog("Add Phone Number Error","",t,{title:Object(Y.a)("Error"),description:e&&e.message?e.message:Object(Y.a)("Operation failed")})})}),P()(this,"_onContinueClick",e=>{e.stopPropagation(),e.preventDefault(),this.setState({continueDisabled:!0});const t=this.state.newPhoneNumberCode,n=this.state.verifyMsisdn;this.state.addTask.haveMsisdnToken(t).then(([e])=>{let t=this.state.newPhoneNumber;if(e){const e=[...this.props.msisdns,{address:n,medium:"msisdn"}];this.props.onMsisdnsChange(e),t=""}this.setState({addTask:null,continueDisabled:!1,verifying:!1,verifyMsisdn:"",verifyError:null,newPhoneNumber:t,newPhoneNumberCode:""})}).catch(e=>{if(this.setState({continueDisabled:!1}),"M_THREEPID_AUTH_FAILED"!==e.errcode){const t=Jr.getComponent("dialogs.ErrorDialog");console.error("Unable to verify phone number: "+e),Ft.a.createTrackedDialog("Unable to verify phone number","",t,{title:Object(Y.a)("Unable to verify phone number."),description:e&&e.message?e.message:Object(Y.a)("Operation failed")})}else this.setState({verifyError:Object(Y.a)("Incorrect verification code")})})}),P()(this,"_onCountryChanged",e=>{this.setState({phoneCountry:e.iso2})}),this.state={verifying:!1,verifyError:!1,verifyMsisdn:"",addTask:null,continueDisabled:!1,phoneCountry:"",newPhoneNumber:"",newPhoneNumberCode:""}}render(){const e=this.props.msisdns.map(e=>j.a.createElement(ku,{msisdn:e,onRemoved:this._onRemoved,key:e.address}));let t=j.a.createElement(En.a,{onClick:this._onAddClick,kind:"primary"},Object(Y.a)("Add"));if(this.state.verifying){const e=this.state.verifyMsisdn;t=j.a.createElement("div",null,j.a.createElement("div",null,Object(Y.a)("A text message has been sent to +%(msisdn)s. Please enter the verification code it contains.",{msisdn:e}),j.a.createElement("br",null),this.state.verifyError),j.a.createElement("form",{onSubmit:this._onContinueClick,autoComplete:"off",noValidate:!0},j.a.createElement(jn.a,{type:"text",label:Object(Y.a)("Verification code"),autoComplete:"off",disabled:this.state.continueDisabled,value:this.state.newPhoneNumberCode,onChange:this._onChangeNewPhoneNumberCode}),j.a.createElement(En.a,{onClick:this._onContinueClick,kind:"primary",disabled:this.state.continueDisabled},Object(Y.a)("Continue"))))}const n=j.a.createElement(be.a,{onOptionChange:this._onCountryChanged,className:"mx_PhoneNumbers_country",value:this.state.phoneCountry,disabled:this.state.verifying,isSmall:!0,showPrefix:!0});return j.a.createElement("div",{className:"mx_PhoneNumbers"},e,j.a.createElement("form",{onSubmit:this._onAddClick,autoComplete:"off",noValidate:!0,className:"mx_PhoneNumbers_new"},j.a.createElement("div",{className:"mx_PhoneNumbers_input"},j.a.createElement(jn.a,{type:"text",label:Object(Y.a)("Phone Number"),autoComplete:"off",disabled:this.state.verifying,prefixComponent:n,value:this.state.newPhoneNumber,onChange:this._onChangeNewPhoneNumber}))),t)}},P()(Tu,"propTypes",{msisdns:Fa.a.array.isRequired,onMsisdnsChange:Fa.a.func.isRequired}),Cu=xu))||Cu;var Ou,Ru,Du;class Iu extends j.a.Component{constructor(e){super(e),P()(this,"onRevokeClick",e=>{e.stopPropagation(),e.preventDefault(),this.changeBinding({bind:!1,label:"revoke",errorTitle:Object(Y.a)("Unable to revoke sharing for email address")})}),P()(this,"onShareClick",e=>{e.stopPropagation(),e.preventDefault(),this.changeBinding({bind:!0,label:"share",errorTitle:Object(Y.a)("Unable to share email address")})}),P()(this,"onContinueClick",async e=>{e.stopPropagation(),e.preventDefault(),this.setState({continueDisabled:!0});try{await this.state.addTask.checkEmailLinkClicked(),this.setState({addTask:null,continueDisabled:!1,verifying:!1})}catch(e){this.setState({continueDisabled:!1});const t=Jr.getComponent("dialogs.ErrorDialog");"M_THREEPID_AUTH_FAILED"===e.errcode?Ft.a.createTrackedDialog("E-mail hasn't been verified yet","",t,{title:Object(Y.a)("Your email address hasn't been verified yet"),description:Object(Y.a)("Click the link in the email you received to verify and then click continue again.")}):(console.error("Unable to verify email address: "+e),Ft.a.createTrackedDialog("Unable to verify email address","",t,{title:Object(Y.a)("Unable to verify email address."),description:e&&e.message?e.message:Object(Y.a)("Operation failed")}))}});const{bound:t}=e.email;this.state={verifying:!1,addTask:null,continueDisabled:!1,bound:t}}UNSAFE_componentWillReceiveProps(e){const{bound:t}=e.email;this.setState({bound:t})}async changeBinding({bind:e,label:t,errorTitle:n}){if(!await Ge.a.get().doesServerSupportSeparateAddAndBind())return this.changeBindingTangledAddBind({bind:e,label:t,errorTitle:n});const r=Jr.getComponent("dialogs.ErrorDialog"),{medium:o,address:i}=this.props.email;try{if(e){const e=new Es;this.setState({verifying:!0,continueDisabled:!0,addTask:e}),await e.bindEmailAddress(i),this.setState({continueDisabled:!1})}else await Ge.a.get().unbindThreePid(o,i);this.setState({bound:e})}catch(e){console.error(`Unable to ${t} email address ${i} ${e}`),this.setState({verifying:!1,continueDisabled:!1,addTask:null}),Ft.a.createTrackedDialog(`Unable to ${t} email address`,"",r,{title:n,description:e&&e.message?e.message:Object(Y.a)("Operation failed")})}}async changeBindingTangledAddBind({bind:e,label:t,errorTitle:n}){const r=Jr.getComponent("dialogs.ErrorDialog"),{medium:o,address:i}=this.props.email,a=new Es;this.setState({verifying:!0,continueDisabled:!0,addTask:a});try{await Ge.a.get().deleteThreePid(o,i),e?await a.bindEmailAddress(i):await a.addEmailAddress(i),this.setState({continueDisabled:!1,bound:e})}catch(e){console.error(`Unable to ${t} email address ${i} ${e}`),this.setState({verifying:!1,continueDisabled:!1,addTask:null}),Ft.a.createTrackedDialog(`Unable to ${t} email address`,"",r,{title:n,description:e&&e.message?e.message:Object(Y.a)("Operation failed")})}}render(){const e=Jr.getComponent("elements.AccessibleButton"),{address:t}=this.props.email,{verifying:n,bound:r}=this.state;let o;return o=n?j.a.createElement("span",null,Object(Y.a)("Verify the link in your inbox"),j.a.createElement(e,{className:"mx_ExistingEmailAddress_confirmBtn",kind:"primary_sm",onClick:this.onContinueClick,disabled:this.state.continueDisabled},Object(Y.a)("Complete"))):r?j.a.createElement(e,{className:"mx_ExistingEmailAddress_confirmBtn",kind:"danger_sm",onClick:this.onRevokeClick},Object(Y.a)("Revoke")):j.a.createElement(e,{className:"mx_ExistingEmailAddress_confirmBtn",kind:"primary_sm",onClick:this.onShareClick},Object(Y.a)("Share")),j.a.createElement("div",{className:"mx_ExistingEmailAddress"},j.a.createElement("span",{className:"mx_ExistingEmailAddress_email"},t),o)}}P()(Iu,"propTypes",{email:Fa.a.object.isRequired});let Au=Object(B.a)("views.settings.discovery.EmailAddresses")((Du=Ru=class extends j.a.Component{render(){let e;return e=this.props.emails.length>0?this.props.emails.map(e=>j.a.createElement(Iu,{email:e,key:e.address})):j.a.createElement("span",{className:"mx_SettingsTab_subsectionText"},Object(Y.a)("Discovery options will appear once you have added an email above.")),j.a.createElement("div",{className:"mx_EmailAddresses"},e)}},P()(Ru,"propTypes",{emails:Fa.a.array.isRequired}),Ou=Du))||Ou;var Nu,Mu,Pu;class Lu extends j.a.Component{constructor(e){super(e),P()(this,"onRevokeClick",e=>{e.stopPropagation(),e.preventDefault(),this.changeBinding({bind:!1,label:"revoke",errorTitle:Object(Y.a)("Unable to revoke sharing for phone number")})}),P()(this,"onShareClick",e=>{e.stopPropagation(),e.preventDefault(),this.changeBinding({bind:!0,label:"share",errorTitle:Object(Y.a)("Unable to share phone number")})}),P()(this,"onVerificationCodeChange",e=>{this.setState({verificationCode:e.target.value})}),P()(this,"onContinueClick",async e=>{e.stopPropagation(),e.preventDefault(),this.setState({continueDisabled:!0});const t=this.state.verificationCode;try{await this.state.addTask.haveMsisdnToken(t),this.setState({addTask:null,continueDisabled:!1,verifying:!1,verifyError:null,verificationCode:""})}catch(e){if(this.setState({continueDisabled:!1}),"M_THREEPID_AUTH_FAILED"!==e.errcode){const t=Jr.getComponent("dialogs.ErrorDialog");console.error("Unable to verify phone number: "+e),Ft.a.createTrackedDialog("Unable to verify phone number","",t,{title:Object(Y.a)("Unable to verify phone number."),description:e&&e.message?e.message:Object(Y.a)("Operation failed")})}else this.setState({verifyError:Object(Y.a)("Incorrect verification code")})}});const{bound:t}=e.msisdn;this.state={verifying:!1,verificationCode:"",addTask:null,continueDisabled:!1,bound:t}}UNSAFE_componentWillReceiveProps(e){const{bound:t}=e.msisdn;this.setState({bound:t})}async changeBinding({bind:e,label:t,errorTitle:n}){if(!await Ge.a.get().doesServerSupportSeparateAddAndBind())return this.changeBindingTangledAddBind({bind:e,label:t,errorTitle:n});const r=Jr.getComponent("dialogs.ErrorDialog"),{medium:o,address:i}=this.props.msisdn;try{if(e){const e=new Es;this.setState({verifying:!0,continueDisabled:!0,addTask:e}),await e.bindMsisdn(null,"+"+i),this.setState({continueDisabled:!1})}else await Ge.a.get().unbindThreePid(o,i);this.setState({bound:e})}catch(e){console.error(`Unable to ${t} phone number ${i} ${e}`),this.setState({verifying:!1,continueDisabled:!1,addTask:null}),Ft.a.createTrackedDialog(`Unable to ${t} phone number`,"",r,{title:n,description:e&&e.message?e.message:Object(Y.a)("Operation failed")})}}async changeBindingTangledAddBind({bind:e,label:t,errorTitle:n}){const r=Jr.getComponent("dialogs.ErrorDialog"),{medium:o,address:i}=this.props.msisdn,a=new Es;this.setState({verifying:!0,continueDisabled:!0,addTask:a});try{await Ge.a.get().deleteThreePid(o,i),e?await a.bindMsisdn(null,"+"+i):await a.addMsisdn(null,"+"+i),this.setState({continueDisabled:!1,bound:e})}catch(e){console.error(`Unable to ${t} phone number ${i} ${e}`),this.setState({verifying:!1,continueDisabled:!1,addTask:null}),Ft.a.createTrackedDialog(`Unable to ${t} phone number`,"",r,{title:n,description:e&&e.message?e.message:Object(Y.a)("Operation failed")})}}render(){const e=Jr.getComponent("elements.AccessibleButton"),t=Jr.getComponent("elements.Field"),{address:n}=this.props.msisdn,{verifying:r,bound:o}=this.state;let i;return i=r?j.a.createElement("span",{className:"mx_ExistingPhoneNumber_verification"},j.a.createElement("span",null,Object(Y.a)("Please enter verification code sent via text."),j.a.createElement("br",null),this.state.verifyError),j.a.createElement("form",{onSubmit:this.onContinueClick,autoComplete:"off",noValidate:!0},j.a.createElement(t,{type:"text",label:Object(Y.a)("Verification code"),autoComplete:"off",disabled:this.state.continueDisabled,value:this.state.verificationCode,onChange:this.onVerificationCodeChange}))):o?j.a.createElement(e,{className:"mx_ExistingPhoneNumber_confirmBtn",kind:"danger_sm",onClick:this.onRevokeClick},Object(Y.a)("Revoke")):j.a.createElement(e,{className:"mx_ExistingPhoneNumber_confirmBtn",kind:"primary_sm",onClick:this.onShareClick},Object(Y.a)("Share")),j.a.createElement("div",{className:"mx_ExistingPhoneNumber"},j.a.createElement("span",{className:"mx_ExistingPhoneNumber_address"},"+",n),i)}}P()(Lu,"propTypes",{msisdn:Fa.a.object.isRequired});let ju=Object(B.a)("views.settings.discovery.PhoneNumbers")((Pu=Mu=class extends j.a.Component{render(){let e;return e=this.props.msisdns.length>0?this.props.msisdns.map(e=>j.a.createElement(Lu,{msisdn:e,key:e.address})):j.a.createElement("span",{className:"mx_SettingsTab_subsectionText"},Object(Y.a)("Discovery options will appear once you have added a phone number above.")),j.a.createElement("div",{className:"mx_PhoneNumbers"},e)}},P()(Mu,"propTypes",{msisdns:Fa.a.array.isRequired}),Nu=Pu))||Nu;var Uu=n(769),Bu=n(773),Gu=n(855),Vu=n(529),qu=n(842),Hu=n(846);let zu={};o.a&&(zu["structures.AutoHideScrollbar"]=o.a),i.o&&(zu["structures.ContextMenu"]=i.o),a.a&&(zu["structures.FilePanel"]=a.a),s.a&&(zu["structures.HomePage"]=s.a),c.a&&(zu["structures.HostSignupAction"]=c.a),l.a&&(zu["structures.LeftPanel"]=l.a),u.a&&(zu["structures.LeftPanelWidget"]=u.a),d.a&&(zu["structures.LoggedInView"]=d.a),h.a&&(zu["structures.MatrixChat"]=h.a),p.a&&(zu["structures.MessagePanel"]=p.a),m.a&&(zu["structures.NonUrgentToastContainer"]=m.a),g.a&&(zu["structures.NotificationPanel"]=g.a),f.a&&(zu["structures.RightPanel"]=f.a),_.a&&(zu["structures.RoomDirectory"]=_.a),b.a&&(zu["structures.RoomSearch"]=b.a),v.a&&(zu["structures.RoomView"]=v.a),y.a&&(zu["structures.ScrollPanel"]=y.a),E.b&&(zu["structures.SpaceRoomDirectory"]=E.b),S.a&&(zu["structures.SpaceRoomView"]=S.a),w.c&&(zu["structures.TabbedView"]=w.c),C.a&&(zu["structures.TimelinePanel"]=C.a),T.a&&(zu["structures.ToastContainer"]=T.a),x.a&&(zu["structures.UploadBar"]=x.a),k.a&&(zu["structures.UserMenu"]=k.a),F.a&&(zu["structures.auth.CompleteSecurity"]=F.a),O.a&&(zu["structures.auth.E2eSetup"]=O.a),R.a&&(zu["structures.auth.ForgotPassword"]=R.a),D.a&&(zu["structures.auth.Login"]=D.a),I.a&&(zu["structures.auth.Registration"]=I.a),A.a&&(zu["structures.auth.SetupEncryptionBody"]=A.a),N.a&&(zu["structures.auth.SoftLogout"]=N.a),ne&&(zu["views.audio_messages.AudioPlayer"]=ne),te.a&&(zu["views.audio_messages.AudioPlayerBase"]=te.a),V.a&&(zu["views.audio_messages.Clock"]=V.a),q&&(zu["views.audio_messages.DurationClock"]=q),ae.a&&(zu["views.audio_messages.LiveRecordingClock"]=ae.a),se.a&&(zu["views.audio_messages.LiveRecordingWaveform"]=se.a),U.a&&(zu["views.audio_messages.PlayPauseButton"]=U.a),ee.a&&(zu["views.audio_messages.PlaybackClock"]=ee.a),ce.a&&(zu["views.audio_messages.PlaybackWaveform"]=ce.a),le.a&&(zu["views.audio_messages.RecordingPlayback"]=le.a),X&&(zu["views.audio_messages.SeekBar"]=X),ue.a&&(zu["views.audio_messages.Waveform"]=ue.a),de.a&&(zu["views.auth.AuthBody"]=de.a),he.a&&(zu["views.auth.AuthFooter"]=he.a),pe.a&&(zu["views.auth.AuthHeader"]=pe.a),me.a&&(zu["views.auth.AuthHeaderLogo"]=me.a),ge.a&&(zu["views.auth.AuthPage"]=ge.a),fe.a&&(zu["views.auth.CaptchaForm"]=fe.a),_e.a&&(zu["views.auth.CompleteSecurityBody"]=_e.a),be.a&&(zu["views.auth.CountryDropdown"]=be.a),ve.d&&(zu["views.auth.InteractiveAuthEntryComponents"]=ve.d),ye.a&&(zu["views.auth.LanguageSelector"]=ye.a),Ee.a&&(zu["views.auth.PassphraseField"]=Ee.a),Se.a&&(zu["views.auth.PasswordLogin"]=Se.a),we.b&&(zu["views.auth.RegistrationForm"]=we.b),Ce.a&&(zu["views.auth.Welcome"]=Ce.a),Te.a&&(zu["views.avatars.BaseAvatar"]=Te.a),xe.a&&(zu["views.avatars.DecoratedRoomAvatar"]=xe.a),ke.a&&(zu["views.avatars.GroupAvatar"]=ke.a),Fe.a&&(zu["views.avatars.MemberAvatar"]=Fe.a),Oe.a&&(zu["views.avatars.RoomAvatar"]=Oe.a),Re.a&&(zu["views.avatars.WidgetAvatar"]=Re.a),De.b&&(zu["views.beta.BetaCard"]=De.b),Ie.a&&(zu["views.context_menus.CallContextMenu"]=Ie.a),Ae.a&&(zu["views.context_menus.DialpadContextMenu"]=Ae.a),Ne.e&&(zu["views.context_menus.IconizedContextMenu"]=Ne.e),Me.b&&(zu["views.context_menus.MessageContextMenu"]=Me.b),Pe.a&&(zu["views.context_menus.SpaceContextMenu"]=Pe.a),Le.a&&(zu["views.context_menus.WidgetContextMenu"]=Le.a),je.a&&(zu["views.dialogs.AddExistingSubspaceDialog"]=je.a),Ue.d&&(zu["views.dialogs.AddExistingToSpaceDialog"]=Ue.d),ut&&(zu["views.dialogs.AddressPickerDialog"]=ut),ht.a&&(zu["views.dialogs.AskInviteAnywayDialog"]=ht.a),pt.a&&(zu["views.dialogs.BetaFeedbackDialog"]=pt.a),mt.a&&(zu["views.dialogs.BugReportDialog"]=mt.a),gt.a&&(zu["views.dialogs.ChangelogDialog"]=gt.a),ft.a&&(zu["views.dialogs.CommunityPrototypeInviteDialog"]=ft.a),yt&&(zu["views.dialogs.ConfirmAndWaitRedactDialog"]=yt),_t.a&&(zu["views.dialogs.ConfirmRedactDialog"]=_t.a),Et.a&&(zu["views.dialogs.ConfirmUserActionDialog"]=Et.a),St.a&&(zu["views.dialogs.ConfirmWipeDeviceDialog"]=St.a),wt.a&&(zu["views.dialogs.CreateCommunityPrototypeDialog"]=wt.a),Ct.a&&(zu["views.dialogs.CreateGroupDialog"]=Ct.a),Tt.a&&(zu["views.dialogs.CreateRoomDialog"]=Tt.a),xt.a&&(zu["views.dialogs.CreateSubspaceDialog"]=xt.a),Dt&&(zu["views.dialogs.CryptoStoreTooNewDialog"]=Dt),It.a&&(zu["views.dialogs.DeactivateAccountDialog"]=It.a),At.b&&(zu["views.dialogs.DevtoolsDialog"]=At.b),Nt.a&&(zu["views.dialogs.EditCommunityPrototypeDialog"]=Nt.a),bt.a&&(zu["views.dialogs.ErrorDialog"]=bt.a),Mt.a&&(zu["views.dialogs.ForwardDialog"]=Mt.a),Pt.a&&(zu["views.dialogs.GenericFeatureFeedbackDialog"]=Pt.a),Lt.a&&(zu["views.dialogs.HostSignupDialog"]=Lt.a),jt.a&&(zu["views.dialogs.InfoDialog"]=jt.a),Ut.d&&(zu["views.dialogs.InviteDialog"]=Ut.d),Bt.a&&(zu["views.dialogs.LeaveSpaceDialog"]=Bt.a),Gt.a&&(zu["views.dialogs.LogoutDialog"]=Gt.a),Vt.a&&(zu["views.dialogs.ManageRestrictedJoinRuleDialog"]=Vt.a),qt.a&&(zu["views.dialogs.ModalWidgetDialog"]=qt.a),Ht.a&&(zu["views.dialogs.RegistrationEmailPromptDialog"]=Ht.a),zt.a&&(zu["views.dialogs.ReportEventDialog"]=zt.a),Wt.b&&(zu["views.dialogs.RoomSettingsDialog"]=Wt.b),Kt.a&&(zu["views.dialogs.RoomUpgradeDialog"]=Kt.a),Yt.a&&(zu["views.dialogs.RoomUpgradeWarningDialog"]=Yt.a),$t.a&&(zu["views.dialogs.ServerOfflineDialog"]=$t.a),Qt.a&&(zu["views.dialogs.ServerPickerDialog"]=Qt.a),Jt&&(zu["views.dialogs.SeshatResetDialog"]=Jt),Zt.a&&(zu["views.dialogs.ShareDialog"]=Zt.a),en.a&&(zu["views.dialogs.SpaceSettingsDialog"]=en.a),an&&(zu["views.dialogs.TermsDialog"]=an),cn.a&&(zu["views.dialogs.UntrustedDeviceDialog"]=cn.a),ln.a&&(zu["views.dialogs.UploadConfirmDialog"]=ln.a),un.b&&(zu["views.dialogs.UserSettingsDialog"]=un.b),dn.a&&(zu["views.dialogs.VerificationRequestDialog"]=dn.a),hn.a&&(zu["views.dialogs.WidgetCapabilitiesPromptDialog"]=hn.a),pn.a&&(zu["views.dialogs.security.AccessSecretStorageDialog"]=pn.a),mn&&(zu["views.dialogs.security.ConfirmDestroyCrossSigningDialog"]=mn),bn.a&&(zu["views.dialogs.security.CreateCrossSigningDialog"]=bn.a),vn.a&&(zu["views.dialogs.security.SetupEncryptionDialog"]=vn.a),yn.b&&(zu["views.directory.NetworkDropdown"]=yn.b),En.a&&(zu["views.elements.AccessibleButton"]=En.a),Sn.a&&(zu["views.elements.AccessibleTooltipButton"]=Sn.a),Tn&&(zu["views.elements.ActionButton"]=Tn),rt&&(zu["views.elements.AddressSelector"]=rt),tt&&(zu["views.elements.AddressTile"]=tt),xn.a&&(zu["views.elements.AppPermission"]=xn.a),kn.b&&(zu["views.elements.DesktopBuildsNotice"]=kn.b),Fn.a&&(zu["views.elements.DesktopCapturerSourcePicker"]=Fn.a),On.a&&(zu["views.elements.DialPadBackspaceButton"]=On.a),Rn.a&&(zu["views.elements.Draggable"]=Rn.a),Dn.a&&(zu["views.elements.Dropdown"]=Dn.a),In.a&&(zu["views.elements.EditableItemList"]=In.a),An.a&&(zu["views.elements.EffectsOverlay"]=An.a),Nn.a&&(zu["views.elements.ErrorBoundary"]=Nn.a),Mn.a&&(zu["views.elements.EventListSummary"]=Mn.a),Pn.a&&(zu["views.elements.EventTilePreview"]=Pn.a),Ln.a&&(zu["views.elements.FacePile"]=Ln.a),jn.a&&(zu["views.elements.Field"]=jn.a),Un.a&&(zu["views.elements.IRCTimelineProfileResizer"]=Un.a),Bn.a&&(zu["views.elements.ImageView"]=Bn.a),Gn.b&&(zu["views.elements.InfoTooltip"]=Gn.b),Vn.a&&(zu["views.elements.InlineSpinner"]=Vn.a),qn.a&&(zu["views.elements.InviteReason"]=qn.a),Hn.a&&(zu["views.elements.JoinRuleDropdown"]=Hn.a),zn.a&&(zu["views.elements.LabelledToggleSwitch"]=zn.a),Wn.a&&(zu["views.elements.MemberEventListSummary"]=Wn.a),Kn.b&&(zu["views.elements.MiniAvatarUploader"]=Kn.b),Yn.a&&(zu["views.elements.ProgressBar"]=Yn.a),$n.a&&(zu["views.elements.QRCode"]=$n.a),Qn.a&&(zu["views.elements.ReplyThread"]=Qn.a),Jn.a&&(zu["views.elements.RoomAliasField"]=Jn.a),Xn.a&&(zu["views.elements.RoomName"]=Xn.a),Zn.a&&(zu["views.elements.RoomTopic"]=Zn.a),er.a&&(zu["views.elements.SSOButtons"]=er.a),tr.a&&(zu["views.elements.ServerPicker"]=tr.a),nr.a&&(zu["views.elements.SettingsFlag"]=nr.a),rr.a&&(zu["views.elements.Slider"]=rr.a),or.a&&(zu["views.elements.SpellCheckLanguagesDropdown"]=or.a),vt.a&&(zu["views.elements.Spinner"]=vt.a),ir.a&&(zu["views.elements.StyledCheckbox"]=ir.a),ar.a&&(zu["views.elements.StyledRadioButton"]=ar.a),sr.a&&(zu["views.elements.StyledRadioGroup"]=sr.a),cr.a&&(zu["views.elements.TagComposer"]=cr.a),lr.a&&(zu["views.elements.ToggleSwitch"]=lr.a),Cn.b&&(zu["views.elements.Tooltip"]=Cn.b),ur.a&&(zu["views.elements.TooltipButton"]=ur.a),dr.a&&(zu["views.elements.TruncatedList"]=dr.a),hr.a&&(zu["views.elements.UserTagTile"]=hr.a),pr.a&&(zu["views.elements.Validation"]=pr.a),mr.a&&(zu["views.emojipicker.Category"]=mr.a),gr.a&&(zu["views.emojipicker.Emoji"]=gr.a),fr.d&&(zu["views.emojipicker.EmojiPicker"]=fr.d),_r.a&&(zu["views.emojipicker.Header"]=_r.a),br.a&&(zu["views.emojipicker.Preview"]=br.a),vr.a&&(zu["views.emojipicker.QuickReactions"]=vr.a),yr.a&&(zu["views.emojipicker.ReactionPicker"]=yr.a),Er.a&&(zu["views.emojipicker.Search"]=Er.a),Sr.a&&(zu["views.host_signup.HostSignupContainer"]=Sr.a),kr&&(zu["views.messages.CallEvent"]=kr),Fr.a&&(zu["views.messages.DateSeparator"]=Fr.a),Or.a&&(zu["views.messages.DownloadActionButton"]=Or.a),Nr&&(zu["views.messages.EncryptionEvent"]=Nr),Rr.a&&(zu["views.messages.EventTileBubble"]=Rr.a),Ur&&(zu["views.messages.MAudioBody"]=Ur),Lr.a&&(zu["views.messages.MFileBody"]=Lr.a),Gr.a&&(zu["views.messages.MImageBody"]=Gr.a),Vr.a&&(zu["views.messages.MImageReplyBody"]=Vr.a),zr&&(zu["views.messages.MJitsiWidgetEvent"]=zr),$r&&(zu["views.messages.MKeyVerificationRequest"]=$r),Zr&&(zu["views.messages.MStickerBody"]=Zr),ro&&(zu["views.messages.MVideoBody"]=ro),io&&(zu["views.messages.MVoiceMessageBody"]=io),so&&(zu["views.messages.MVoiceOrAudioBody"]=so),ho.a&&(zu["views.messages.MessageEvent"]=ho.a),po.a&&(zu["views.messages.MessageTimestamp"]=po.a),mo.a&&(zu["views.messages.ReactionsRow"]=mo.a),go.a&&(zu["views.messages.ReactionsRowButton"]=go.a),fo.a&&(zu["views.messages.ReactionsRowButtonTooltip"]=fo.a),_o.a&&(zu["views.messages.RedactedBody"]=_o.a),bo.a&&(zu["views.messages.SenderProfile"]=bo.a),vo.a&&(zu["views.messages.TextualBody"]=vo.a),So&&(zu["views.messages.TextualEvent"]=So),Co.a&&(zu["views.messages.TileErrorBoundary"]=Co.a),To.a&&(zu["views.messages.UnknownBody"]=To.a),xo&&(zu["views.messages.ViewSourceEvent"]=xo),Fo.b&&(zu["views.right_panel.BaseCard"]=Fo.b),Oo.b&&(zu["views.right_panel.EncryptionInfo"]=Oo.b),Ro.a&&(zu["views.right_panel.EncryptionPanel"]=Ro.a),Do.a&&(zu["views.right_panel.GroupHeaderButtons"]=Do.a),Io.a&&(zu["views.right_panel.HeaderButton"]=Io.a),Ao.b&&(zu["views.right_panel.HeaderButtons"]=Ao.b),No.b&&(zu["views.right_panel.PinnedMessagesCard"]=No.b),Mo.a&&(zu["views.right_panel.RoomHeaderButtons"]=Mo.a),Po.a&&(zu["views.right_panel.RoomSummaryCard"]=Po.a),Lo.a&&(zu["views.right_panel.UserInfo"]=Lo.a),jo.a&&(zu["views.right_panel.VerificationPanel"]=jo.a),Uo.a&&(zu["views.right_panel.WidgetCard"]=Uo.a),Bo.a&&(zu["views.room_settings.AliasSettings"]=Bo.a),Go.a&&(zu["views.room_settings.RoomPublishSetting"]=Go.a),Vo.a&&(zu["views.rooms.Autocomplete"]=Vo.a),qo.a&&(zu["views.rooms.AuxPanel"]=qo.a),Ho.a&&(zu["views.rooms.BasicMessageComposer"]=Ho.a),zo.a&&(zu["views.rooms.EditMessageComposer"]=zo.a),Wo.b&&(zu["views.rooms.EntityTile"]=Wo.b),Ko.b&&(zu["views.rooms.EventTile"]=Ko.b),Yo.a&&(zu["views.rooms.ExtraTile"]=Yo.a),$o.a&&(zu["views.rooms.LinkPreviewGroup"]=$o.a),Qo.a&&(zu["views.rooms.LinkPreviewWidget"]=Qo.a),Jo.a&&(zu["views.rooms.MemberList"]=Jo.a),Xo.a&&(zu["views.rooms.MemberTile"]=Xo.a),Zo.a&&(zu["views.rooms.MessageComposer"]=Zo.a),ei.b&&(zu["views.rooms.MessageComposerFormatBar"]=ei.b),ti.a&&(zu["views.rooms.NewRoomIntro"]=ti.a),ni.a&&(zu["views.rooms.NotificationBadge"]=ni.a),ri.a&&(zu["views.rooms.PinnedEventTile"]=ri.a),oi.a&&(zu["views.rooms.PresenceLabel"]=oi.a),ii.a&&(zu["views.rooms.ReplyPreview"]=ii.a),ai.a&&(zu["views.rooms.ReplyTile"]=ai.a),si.a&&(zu["views.rooms.RoomBreadcrumbs"]=si.a),ci.a&&(zu["views.rooms.RoomHeader"]=ci.a),li.b&&(zu["views.rooms.RoomList"]=li.b),ui.a&&(zu["views.rooms.RoomListNumResults"]=ui.a),di.b&&(zu["views.rooms.RoomSublist"]=di.b),hi.a&&(zu["views.rooms.RoomTile"]=hi.a),pi.b&&(zu["views.rooms.SearchBar"]=pi.b),mi.a&&(zu["views.rooms.SearchResultTile"]=mi.a),gi.a&&(zu["views.rooms.SendMessageComposer"]=gi.a),fi.a&&(zu["views.rooms.ThirdPartyMemberInfo"]=fi.a),_i.a&&(zu["views.rooms.VoiceRecordComposerTile"]=_i.a),bi.a&&(zu["views.rooms.WhoIsTypingTile"]=bi.a),vi.a&&(zu["views.settings.BridgeTile"]=vi.a),yi.a&&(zu["views.settings.E2eAdvancedPanel"]=yi.a),wi&&(zu["views.settings.EventIndexPanel"]=wi),Ti.a&&(zu["views.settings.LayoutSwitcher"]=Ti.a),xi.a&&(zu["views.settings.Notifications"]=xi.a),Oi&&(zu["views.settings.SetIdServer"]=Oi),Ii&&(zu["views.settings.SetIntegrationManager"]=Ii),Ni.a&&(zu["views.settings.SpellCheckSettings"]=Ni.a),Mi.a&&(zu["views.settings.UpdateCheckButton"]=Mi.a),Pi.a&&(zu["views.settings.tabs.room.AdvancedRoomSettingsTab"]=Pi.a),Li.a&&(zu["views.settings.tabs.room.BridgeSettingsTab"]=Li.a),ji.a&&(zu["views.settings.tabs.room.RolesRoomSettingsTab"]=ji.a),Ui.a&&(zu["views.settings.tabs.room.SecurityRoomSettingsTab"]=Ui.a),Bi.a&&(zu["views.settings.tabs.user.AppearanceUserSettingsTab"]=Bi.a),Gi.a&&(zu["views.settings.tabs.user.HelpUserSettingsTab"]=Gi.a),Vi.a&&(zu["views.settings.tabs.user.MjolnirUserSettingsTab"]=Vi.a),qi.a&&(zu["views.settings.tabs.user.NotificationUserSettingsTab"]=qi.a),Hi.a&&(zu["views.settings.tabs.user.PreferencesUserSettingsTab"]=Hi.a),zi.a&&(zu["views.settings.tabs.user.VoiceUserSettingsTab"]=zi.a),Wi.b&&(zu["views.spaces.SpaceBasicSettings"]=Wi.b),Ki.c&&(zu["views.spaces.SpaceCreateMenu"]=Ki.c),Yi.a&&(zu["views.spaces.SpacePanel"]=Yi.a),$i.a&&(zu["views.spaces.SpacePublicShare"]=$i.a),Qi.a&&(zu["views.spaces.SpaceSettingsGeneralTab"]=Qi.a),Ji.a&&(zu["views.spaces.SpaceSettingsVisibilityTab"]=Ji.a),Xi.c&&(zu["views.spaces.SpaceTreeLevel"]=Xi.c),ea&&(zu["views.terms.InlineTermsAgreement"]=ea),na.a&&(zu["views.toasts.GenericExpiringToast"]=na.a),ra.a&&(zu["views.toasts.GenericToast"]=ra.a),oa.a&&(zu["views.toasts.NonUrgentEchoFailureToast"]=oa.a),ia.a&&(zu["views.toasts.VerificationRequestToast"]=ia.a),aa&&(zu["views.verification.VerificationCancelled"]=aa),ca&&(zu["views.verification.VerificationComplete"]=ca),ha.a&&(zu["views.verification.VerificationShowSas"]=ha.a),pa.a&&(zu["views.voip.AudioFeed"]=pa.a),ma.a&&(zu["views.voip.AudioFeedArrayForCall"]=ma.a),ga.a&&(zu["views.voip.CallContainer"]=ga.a),fa.a&&(zu["views.voip.CallPreview"]=fa.a),_a.a&&(zu["views.voip.CallView"]=_a.a),ba.a&&(zu["views.voip.CallView.CallViewHeader"]=ba.a),va.a&&(zu["views.voip.CallViewForRoom"]=va.a),ya.a&&(zu["views.voip.CallViewSidebar"]=ya.a),Ea.a&&(zu["views.voip.DialPad"]=Ea.a),Sa.a&&(zu["views.voip.DialPadModal"]=Sa.a),wa.a&&(zu["views.voip.PictureInPictureDragger"]=wa.a),Ca.a&&(zu["views.voip.VideoFeed"]=Ca.a),Ta.a&&(zu["structures.CustomRoomTagPanel"]=Ta.a),xa.a&&(zu["structures.EmbeddedPage"]=xa.a),Oa&&(zu["structures.GenericErrorPage"]=Oa),Aa.a&&(zu["structures.GroupFilterPanel"]=Aa.a),Na.a&&(zu["structures.GroupView"]=Na.a),Ma.a&&(zu["structures.IndicatorScrollbar"]=Ma.a),Pa.b&&(zu["structures.InteractiveAuth"]=Pa.b),La.a&&(zu["structures.MainSplit"]=La.a),ja.a&&(zu["structures.MyGroups"]=ja.a),Ua.a&&(zu["structures.RoomStatusBar"]=Ua.a),Ba.a&&(zu["structures.SearchBox"]=Ba.a),Ga.a&&(zu["structures.UserView"]=Ga.a),Va.a&&(zu["structures.ViewSource"]=Va.a),qa.a&&(zu["views.avatars.MemberStatusMessageAvatar"]=qa.a),Ha&&(zu["views.context_menus.GenericElementContextMenu"]=Ha),Ya.a&&(zu["views.context_menus.GenericTextContextMenu"]=Ya.a),Qa&&(zu["views.context_menus.GroupInviteTileContextMenu"]=Qa),es.a&&(zu["views.context_menus.StatusMessageContextMenu"]=es.a),is&&(zu["views.context_menus.TagTileContextMenu"]=is),st.a&&(zu["views.dialogs.BaseDialog"]=st.a),ls.a&&(zu["views.dialogs.FeedbackDialog"]=ls.a),us.a&&(zu["views.dialogs.IncomingSasDialog"]=us.a),ds.a&&(zu["views.dialogs.IntegrationsDisabledDialog"]=ds.a),hs.a&&(zu["views.dialogs.IntegrationsImpossibleDialog"]=hs.a),ps.a&&(zu["views.dialogs.InteractiveAuthDialog"]=ps.a),ms.a&&(zu["views.dialogs.KeySignatureUploadFailedDialog"]=ms.a),gs.a&&(zu["views.dialogs.LazyLoadingDisabledDialog"]=gs.a),fs.a&&(zu["views.dialogs.LazyLoadingResyncDialog"]=fs.a),_s.a&&(zu["views.dialogs.ManualDeviceKeyVerificationDialog"]=_s.a),bs.a&&(zu["views.dialogs.MessageEditHistoryDialog"]=bs.a),Ot.a&&(zu["views.dialogs.QuestionDialog"]=Ot.a),vs.a&&(zu["views.dialogs.SessionRestoreErrorDialog"]=vs.a),Ss&&(zu["views.dialogs.SetEmailDialog"]=Ss),xs.a&&(zu["views.dialogs.SlashCommandHelpDialog"]=xs.a),ks.a&&(zu["views.dialogs.StorageEvictedDialog"]=ks.a),Fs.a&&(zu["views.dialogs.TabbedIntegrationManagerDialog"]=Fs.a),Os.a&&(zu["views.dialogs.TextInputDialog"]=Os.a),Is&&(zu["views.dialogs.UploadFailureDialog"]=Is),Ps.a&&(zu["views.dialogs.WidgetOpenIDPermissionsDialog"]=Ps.a),Ls.a&&(zu["views.dialogs.security.RestoreKeyBackupDialog"]=Ls.a),js.a&&(zu["views.elements.AppTile"]=js.a),Us.a&&(zu["views.elements.AppWarning"]=Us.a),Vs&&(zu["views.elements.DNDTagTile"]=Vs),ct.a&&(zu["views.elements.DialogButtons"]=ct.a),Ws.a&&(zu["views.elements.DirectorySearchBox"]=Ws.a),Ks&&(zu["views.elements.EditableText"]=Ks),$s&&(zu["views.elements.EditableTextContainer"]=$s),Zs.a&&(zu["views.elements.Flair"]=Zs.a),ec.a&&(zu["views.elements.LanguageDropdown"]=ec.a),tc.a&&(zu["views.elements.LazyRenderList"]=tc.a),nc.a&&(zu["views.elements.PersistedElement"]=nc.a),rc.a&&(zu["views.elements.PersistentApp"]=rc.a),oc.a&&(zu["views.elements.Pill"]=oc.a),ic.a&&(zu["views.elements.PowerSelector"]=ic.a),ac.a&&(zu["views.elements.ResizeHandle"]=ac.a),sc.a&&(zu["views.elements.Spoiler"]=sc.a),cc.a&&(zu["views.elements.SyntaxHighlight"]=cc.a),Gs&&(zu["views.elements.TagTile"]=Gs),lc.a&&(zu["views.elements.TextWithTooltip"]=lc.a),uc.a&&(zu["views.elements.crypto.VerificationQRCode"]=uc.a),hc&&(zu["views.groups.GroupInviteTile"]=hc),fc.a&&(zu["views.groups.GroupMemberList"]=fc.a),bc&&(zu["views.groups.GroupMemberTile"]=bc),Sc&&(zu["views.groups.GroupPublicityToggle"]=Sc),xc.a&&(zu["views.groups.GroupRoomInfo"]=xc.a),kc.a&&(zu["views.groups.GroupRoomList"]=kc.a),Dc&&(zu["views.groups.GroupRoomTile"]=Dc),Ic&&(zu["views.groups.GroupTile"]=Ic),Ac.a&&(zu["views.groups.GroupUserSettings"]=Ac.a),tl&&(zu["views.messages.EditHistoryMessage"]=tl),rl&&(zu["views.messages.MKeyVerificationConclusion"]=rl),sl.a&&(zu["views.messages.MessageActionBar"]=sl.a),cl&&(zu["views.messages.MjolnirBody"]=cl),hl&&(zu["views.messages.RoomAvatarEvent"]=hl),_l&&(zu["views.messages.RoomCreate"]=_l),Sl&&(zu["views.room_settings.RelatedGroupSettings"]=Sl),xl.a&&(zu["views.room_settings.RoomProfileSettings"]=xl.a),kl&&(zu["views.room_settings.UrlPreviewSettings"]=kl),Dl.a&&(zu["views.rooms.AppsDrawer"]=Dl.a),Il.b&&(zu["views.rooms.E2EIcon"]=Il.b),Al.a&&(zu["views.rooms.JumpToBottomButton"]=Al.a),Nl.a&&(zu["views.rooms.ReadReceiptMarker"]=Nl.a),Vl&&(zu["views.rooms.RoomDetailList"]=Vl),jl&&(zu["views.rooms.RoomDetailRow"]=jl),Wl.a&&(zu["views.rooms.RoomPreviewBar"]=Wl.a),Kl.a&&(zu["views.rooms.RoomUpgradeWarningBar"]=Kl.a),Yl&&(zu["views.rooms.SimpleRoomHeader"]=Yl),$l.a&&(zu["views.rooms.Stickerpicker"]=$l.a),Ql.a&&(zu["views.rooms.TopUnreadMessagesBar"]=Ql.a),tu&&(zu["views.settings.AvatarSetting"]=tu),nu&&(zu["views.settings.ChangeAvatar"]=nu),ou&&(zu["views.settings.ChangeDisplayName"]=ou),lu&&(zu["views.settings.ChangePassword"]=lu),du&&(zu["views.settings.CrossSigningPanel"]=du),pu&&(zu["views.settings.DevicesPanel"]=pu),gu&&(zu["views.settings.DevicesPanelEntry"]=gu),vu.a&&(zu["views.settings.IntegrationManager"]=vu.a),yu.a&&(zu["views.settings.ProfileSettings"]=yu.a),Eu.a&&(zu["views.settings.SecureBackupPanel"]=Eu.a),wu&&(zu["views.settings.account.EmailAddresses"]=wu),Fu&&(zu["views.settings.account.PhoneNumbers"]=Fu),Au&&(zu["views.settings.discovery.EmailAddresses"]=Au),ju&&(zu["views.settings.discovery.PhoneNumbers"]=ju),Uu.a&&(zu["views.settings.tabs.room.GeneralRoomSettingsTab"]=Uu.a),Bu.a&&(zu["views.settings.tabs.room.NotificationSettingsTab"]=Bu.a),Gu.a&&(zu["views.settings.tabs.user.FlairUserSettingsTab"]=Gu.a),Vu.a&&(zu["views.settings.tabs.user.GeneralUserSettingsTab"]=Vu.a),qu.a&&(zu["views.settings.tabs.user.LabsUserSettingsTab"]=qu.a),Hu.a&&(zu["views.settings.tabs.user.SecurityUserSettingsTab"]=Hu.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(79),o=n.n(r),i=n(150),a=n(83),s=n(80),c=n(82),l=n(141);function u(e){const t=c.a.get().getUserId();return"m.room.member"===e.getType()?e.getStateKey()===t:e.getSender()===t}function d(e,t){if(t!==l.a.DM)return!0;const n=c.a.get().getRoom(e);return!n||2!==n.currentState.getJoinedMemberCount()}function h(e){return e.sender?e.sender.name:e.getSender()}var p=n(240),m=n(131);var g=n(2);var f=n(84),_=n(122);var b=n(115);const v={"m.room.message":{isState:!1,previewer:new class{getTextFor(e,t){let n=e.getContent();if(e.isRelation("m.replace")&&(n=e.getContent()["m.new_content"]),!n||!n.body)return null;let r=(n.body||"").trim();const o=n.msgtype;if(!r||!o)return null;const i="org.matrix.custom.html"===n.format&&n.formatted_body;i&&(r=n.formatted_body);const a=e.getWireContent()["m.relates_to"];return a&&a["m.in_reply_to"]&&(r=i?(p.a.stripHTMLReply(r)||"").trim():(p.a.stripPlainReply(r)||"").trim(),!r)?null:(i&&(r=Object(m.d)(r)),r=Object(s.j)(r),"m.emote"===o?Object(s.a)("* %(senderName)s %(emote)s",{senderName:h(e),emote:r}):u(e)||!d(e.getRoomId(),t)?r:Object(s.a)("%(senderName)s: %(message)s",{senderName:h(e),message:r}))}}},"m.call.invite":{isState:!1,previewer:new class{getTextFor(e,t){return d(e.getRoomId(),t)?u(e)?Object(s.a)("You started a call"):Object(s.a)("%(senderName)s started a call",{senderName:h(e)}):u(e)?Object(s.a)("Waiting for answer"):Object(s.a)("%(senderName)s is calling",{senderName:h(e)})}}},"m.call.answer":{isState:!1,previewer:new class{getTextFor(e,t){return d(e.getRoomId(),t)?u(e)?Object(s.a)("You joined the call"):Object(s.a)("%(senderName)s joined the call",{senderName:h(e)}):Object(s.a)("Call in progress")}}},"m.call.hangup":{isState:!1,previewer:new class{getTextFor(e,t){return d(e.getRoomId(),t)?u(e)?Object(s.a)("You ended the call"):Object(s.a)("%(senderName)s ended the call",{senderName:h(e)}):Object(s.a)("Call ended")}}},"m.sticker":{isState:!1,previewer:new class{getTextFor(e,t){const n=e.getContent().body;return n?u(e)||!d(e.getRoomId(),t)?n:Object(s.a)("%(senderName)s: %(stickerName)s",{senderName:h(e),stickerName:n}):null}}},"m.reaction":{isState:!1,previewer:new class{getTextFor(e,t){const n=f.b.getValue("feature_roomlist_preview_reactions_dms");if(!(f.b.getValue("feature_roomlist_preview_reactions_all")||n&&_.a.shared().getUserIdForRoomId(e.getRoomId())))return null;const r=e.getRelation();if(!r)return null;const o=r.key;return o?u(e)||!d(e.getRoomId(),t)?o:Object(s.a)("%(senderName)s: %(reaction)s",{senderName:h(e),reaction:o}):null}}}},y="im.vector.any";class E extends i.a{constructor(){super(a.a,{}),o()(this,"previews",new Map)}static get instance(){return E.internalInstance}static getPreviewChangedEventName(e){return"room_preview_changed:"+(null==e?void 0:e.roomId)}async getPreviewForRoom(e,t){if(!e)return null;this.previews.has(e.roomId)||await this.generatePreview(e,t);const n=this.previews.get(e.roomId);return n?n.has(t)?n.get(t):n.get(y):null}async generatePreview(e,t){const n=e.timeline;if(!n)return;let r=this.previews.get(e.roomId);r||(r=new Map,this.previews.set(e.roomId,r)),r.has(y)||r.set(y,null),t&&!r.has(t)&&r.set(t,null);let o=!1;for(let t=n.length-1;t>=0&&t!==n.length-50;t--){const i=n[t];await this.matrixClient.decryptEventIfNeeded(i);const a=v[i.getType()];if(!a)continue;if(a.isState&&Object(g.v)(i.getStateKey()))continue;const s=a.previewer.getTextFor(i,null);if(!s)continue;o=o||s!==r.get(y),r.set(y,s);const c=Array.from(r.keys()).filter(e=>e!==y);for(const e of c){const t=e===y?null:e,n=a.previewer.getTextFor(i,t);n===s?(o=o||s!==r.get(e),r.delete(e)):(o=o||n!==r.get(e),r.set(e,n))}return void(o&&(this.previews.set(e.roomId,r),this.emit(b.b,this),this.emit(E.getPreviewChangedEventName(e),e)))}this.previews.set(e.roomId,new Map),this.emit(b.b,this),this.emit(E.getPreviewChangedEventName(e),e)}async onAction(e){if(this.matrixClient&&("MatrixActions.Room.timeline"===e.action||"MatrixActions.Event.decrypted"===e.action)){const t=e.event,n=e.hasOwnProperty("isLiveEvent")&&!e.isLiveEvent;if(!this.previews.has(t.getRoomId())||n)return;await this.generatePreview(this.matrixClient.getRoom(t.getRoomId()),y)}}}o()(E,"internalInstance",new E)},function(e,t,n){"use strict";n.d(t,"b",(function(){return F})),n.d(t,"a",(function(){return R}));var r=n(79),o=n.n(r),i=n(2),a=n(3),s=n(122),c=n(109),l=n(141),u=n(270),d=n(171),h=n(239);var p=n(393),m=n(130);const g={[h.b.Recent]:new p.a,[h.b.Alphabetic]:new class{sortRooms(e,t){return e.sort((e,t)=>Object(m.a)(e.name,t.name))}},[h.b.Manual]:new class{sortRooms(e,t){const n=e=>e.tags[t].order||0;return e.sort((e,t)=>n(e)-n(t))}}};function f(e,t,n){return function(e){if(!g[e])throw new Error(e+" is not a known algorithm");return g[e]}(n).sortRooms(e,t)}class _{constructor(e,t){this.tagId=e,o()(this,"cachedOrderedRooms",void 0),o()(this,"sortingAlgorithm",void 0),this.setSortAlgorithm(t)}get orderedRooms(){return this.cachedOrderedRooms||[]}setSortAlgorithm(e){if(!e)throw new Error("A sorting algorithm must be defined");this.sortingAlgorithm=e,this.setRooms(this.orderedRooms)}getRoomIndex(e){let t=this.cachedOrderedRooms.indexOf(e);return-1===t&&(console.warn(`Degrading performance to find missing room in "${this.tagId}": ${e.roomId}`),t=this.cachedOrderedRooms.findIndex(t=>t.roomId===e.roomId)),t}}var b=n(183),v=n(167);const y=[b.a.Red,b.a.Grey,b.a.Bold,b.a.None];class E extends _{constructor(e,t){super(e,t),o()(this,"indices",{})}categorizeRooms(e){const t={[b.a.Red]:[],[b.a.Grey]:[],[b.a.Bold]:[],[b.a.None]:[]};for(const n of e){t[this.getRoomCategory(n)].push(n)}return t}getRoomCategory(e){return v.a.instance.getRoomState(e).color}setRooms(e){if(this.sortingAlgorithm===h.b.Manual)this.cachedOrderedRooms=f(e,this.tagId,this.sortingAlgorithm);else{const t=this.categorizeRooms(e);for(const e of Object.keys(t)){const n=t[e];t[e]=f(n,this.tagId,this.sortingAlgorithm)}const n=[],r={};for(const e of y)r[e]=n.length,n.push(...t[e]);this.indices=r,this.cachedOrderedRooms=n}}handleSplice(e,t){if(t===l.c.NewRoom){const t=this.getRoomCategory(e);this.alterCategoryPositionBy(t,1,this.indices),this.cachedOrderedRooms.splice(this.indices[t],0,e),this.sortCategory(t)}else{if(t!==l.c.RoomRemoved)throw new Error("Unhandled splice: "+t);{const t=this.getRoomIndex(e);if(-1===t)return console.warn(`Tried to remove unknown room from ${this.tagId}: ${e.roomId}`),!1;const n=this.getCategoryFromIndices(t,this.indices);this.alterCategoryPositionBy(n,-1,this.indices),this.cachedOrderedRooms.splice(t,1)}}return!0}handleRoomUpdate(e,t){if(t===l.c.NewRoom||t===l.c.RoomRemoved)return this.handleSplice(e,t);if(t!==l.c.Timeline&&t!==l.c.ReadReceipt)throw new Error("Unsupported update cause: "+t);const n=this.getRoomCategory(e);if(this.sortingAlgorithm===h.b.Manual)return;const r=this.getRoomIndex(e);if(-1===r)throw new Error(`Room ${e.roomId} has no index in ${this.tagId}`);const o=this.getCategoryFromIndices(r,this.indices);return o!==n&&(this.moveRoomIndexes(1,o,n,this.indices),this.cachedOrderedRooms.splice(r,1),this.cachedOrderedRooms.splice(this.indices[n],0,e)),this.sortCategory(n),!0}sortCategory(e){const t=e===y[y.length-1]?Number.MAX_SAFE_INTEGER:this.indices[y[y.indexOf(e)+1]],n=this.indices[e],r=t-n,o=f(this.cachedOrderedRooms.splice(n,r),this.tagId,this.sortingAlgorithm);this.cachedOrderedRooms.splice(n,0,...o)}getCategoryFromIndices(e,t){for(let n=0;n<y.length;n++){const r=y[n],o=n===y.length-1,i=t[r],a=o?Number.MAX_SAFE_INTEGER:t[y[n+1]];if(e>=i&&e<a)return r}throw new Error("Programming error: somehow you've ended up with an index that isn't in a category")}moveRoomIndexes(e,t,n,r){this.alterCategoryPositionBy(t,-e,r),this.alterCategoryPositionBy(n,+e,r)}alterCategoryPositionBy(e,t,n){const r=y.indexOf(e)+1;if(t>0)for(let e=r;e<y.length;e++){n[y[e]]+=Math.abs(t)}else if(t<0)for(let e=r;e<y.length;e++){n[y[e]]-=Math.abs(t)}for(let e=1;e<=y.length;e++){const t=y[e-1],r=y[e];n[t]>n[r]&&console.warn(`!! Room list index corruption: ${t} (i:${n[t]}) is greater than ${r} (i:${n[r]}) - category indices are likely desynced from reality`)}}}class S extends _{constructor(e,t){super(e,t)}setRooms(e){this.cachedOrderedRooms=f(e,this.tagId,this.sortingAlgorithm)}handleRoomUpdate(e,t){const n=t===l.c.NewRoom||t===l.c.RoomRemoved,r=t===l.c.Timeline||t===l.c.ReadReceipt;if(!n&&!r)throw new Error("Unsupported update cause: "+t);if(t===l.c.NewRoom)this.cachedOrderedRooms.push(e);else if(t===l.c.RoomRemoved){const t=this.getRoomIndex(e);t>=0?this.cachedOrderedRooms.splice(t,1):console.warn(`Tried to remove unknown room from ${this.tagId}: ${e.roomId}`)}return this.cachedOrderedRooms=f(this.cachedOrderedRooms,this.tagId,this.sortingAlgorithm),!0}}const w={[h.a.Natural]:(e,t)=>new S(e,t),[h.a.Importance]:(e,t)=>new E(e,t)};function C(e,t,n){if(!w[e])throw new Error(e+" is not a known algorithm");return w[e](t,n)}var T=n(84),x=n(507),k=n(102);const F="list_updated_event",O=[l.c.Timeline,l.c.ReadReceipt];class R extends a.EventEmitter{constructor(){super(),o()(this,"_cachedRooms",{}),o()(this,"_cachedStickyRooms",{}),o()(this,"filteredRooms",{}),o()(this,"_stickyRoom",null),o()(this,"_lastStickyRoom",null),o()(this,"sortAlgorithms",void 0),o()(this,"listAlgorithms",void 0),o()(this,"algorithms",void 0),o()(this,"rooms",[]),o()(this,"roomIdsToTags",{}),o()(this,"allowedByFilter",new Map),o()(this,"allowedRoomsByFilters",new Set),o()(this,"updatesInhibited",!1)}get stickyRoom(){return this._stickyRoom?this._stickyRoom.room:null}get knownRooms(){return this.rooms}get hasTagSortingMap(){return!!this.sortAlgorithms}get hasFilters(){return this.allowedByFilter.size>0}set cachedRooms(e){this._cachedRooms=e,this.recalculateFilteredRooms(),this.recalculateStickyRoom()}get cachedRooms(){return this._cachedRooms}setStickyRoom(e){try{this.updateStickyRoom(e)}catch(e){console.warn("Failed to update sticky room",e)}}getTagSorting(e){return this.sortAlgorithms?this.sortAlgorithms[e]:null}setTagSorting(e,t){if(!e)throw new Error("Tag ID must be defined");if(!t)throw new Error("Algorithm must be defined");this.sortAlgorithms[e]=t;const n=this.algorithms[e];n.setSortAlgorithm(t),this._cachedRooms[e]=n.orderedRooms,this.recalculateFilteredRoomsForTag(e),this.recalculateStickyRoom(e)}getListOrdering(e){return this.listAlgorithms?this.listAlgorithms[e]:null}setListOrdering(e,t){if(!e)throw new Error("Tag ID must be defined");if(!t)throw new Error("Algorithm must be defined");this.listAlgorithms[e]=t;const n=C(t,e,this.sortAlgorithms[e]);this.algorithms[e]=n,n.setRooms(this._cachedRooms[e]),this._cachedRooms[e]=n.orderedRooms,this.recalculateFilteredRoomsForTag(e),this.recalculateStickyRoom(e)}addFilterCondition(e){this.allowedByFilter.set(e,this.rooms.filter(t=>e.isVisible(t))),this.recalculateFilteredRooms(),e.on(u.a,this.handleFilterChange.bind(this))}removeFilterCondition(e){e.off(u.a,this.handleFilterChange.bind(this)),this.allowedByFilter.has(e)&&(this.allowedByFilter.delete(e),this.recalculateFilteredRooms(),this.hasFilters||this.updatesInhibited||this.emit(F))}handleFilterChange(){this.recalculateFilteredRooms(),this.updatesInhibited||this.emit(u.a)}updateStickyRoom(e){this.doUpdateStickyRoom(e),this._lastStickyRoom=null}doUpdateStickyRoom(e){var t,n;if(k.g.spacesEnabled&&null!==(t=e)&&void 0!==t&&t.isSpaceRoom()&&"invite"!==e.getMyMembership()&&(e=null),e&&!x.a.instance.isRoomVisible(e)&&(e=null),this._lastStickyRoom=this._stickyRoom||{},!e){if(this._stickyRoom){const e=this._stickyRoom.room;return this._stickyRoom=null,void this.handleRoomUpdate(e,l.c.NewRoom)}return}let r=null===(n=this.roomIdsToTags[e.roomId])||void 0===n?void 0:n[0];if(!r)throw new Error(e.roomId+" does not belong to a tag and cannot be sticky");let o=(this.getOrderedRoomsWithoutSticky()[r]||[]).indexOf(e);const i=!!this._lastStickyRoom.room&&this._lastStickyRoom.room.roomId===e.roomId;if(this._lastStickyRoom.tag&&r!==this._lastStickyRoom.tag&&i&&o<0&&(console.warn(`Sticky room ${e.roomId} changed tags during sticky room handling`),o=0),o<0)throw new Error(e.roomId+" does not appear to be known and cannot be sticky");const a=this._stickyRoom;if(this._stickyRoom=null,this.recalculateStickyRoom(),a&&a.room&&a.room.roomId!==e.roomId&&this.handleRoomUpdate(a.room,l.c.NewRoom),this.handleRoomUpdate(e,l.c.RoomRemoved),this._stickyRoom){if(this._stickyRoom.room!==e){if(this._stickyRoom.room.roomId!==e.roomId)throw new Error("Sticky room changed while the sticky room was changing");console.warn("Sticky room changed references")}console.warn(`Sticky room changed tag & position from ${r} / ${o} to ${this._stickyRoom.tag} / ${this._stickyRoom.position}`),r=this._stickyRoom.tag,o=this._stickyRoom.position}a&&a.tag===r&&a.position<=o&&o++,this._stickyRoom={room:e,position:o,tag:r},this.recalculateFilteredRoomsForTag(r),a&&a.tag!==r&&this.recalculateFilteredRoomsForTag(a.tag),this.recalculateStickyRoom(),this.updatesInhibited||this.emit(F)}recalculateFilteredRooms(){if(!this.hasFilters)return;console.warn("Recalculating filtered room list");const e=Array.from(this.allowedByFilter.keys()),t={};for(const n of Object.keys(this.cachedRooms)){const r=this.cachedRooms[n].map(e=>e);this.tryInsertStickyRoomToFilterSet(r,n);const o=r.map(e=>e),i=[];for(const t of e){const e=o.filter(e=>t.isVisible(e));for(const t of e){const e=o.indexOf(t);e>=0&&o.splice(e,1),i.push(t)}}t[n]=i,T.b.getValue("advancedRoomListLogging")&&console.log(`[DEBUG] ${t[n].length}/${r.length} rooms filtered into ${n}`)}const n=Object.values(t).reduce((e,t)=>(e.push(...t),e),[]);this.allowedRoomsByFilters=new Set(n),this.filteredRooms=t,this.updatesInhibited||this.emit(F)}recalculateFilteredRoomsForTag(e){if(!this.hasFilters)return;T.b.getValue("advancedRoomListLogging")&&console.log("Recalculating filtered rooms for "+e),delete this.filteredRooms[e];const t=this.cachedRooms[e].map(e=>e);this.tryInsertStickyRoomToFilterSet(t,e);const n=t.filter(e=>this.allowedRoomsByFilters.has(e));n.length>0&&(this.filteredRooms[e]=n),T.b.getValue("advancedRoomListLogging")&&console.log(`[DEBUG] ${n.length}/${t.length} rooms filtered into ${e}`)}tryInsertStickyRoomToFilterSet(e,t){if(!this._stickyRoom||!this._stickyRoom.room||this._stickyRoom.tag!==t)return;const n=this._stickyRoom.position;n>=e.length?e.push(this._stickyRoom.room):e.splice(n,0,this._stickyRoom.room)}recalculateStickyRoom(e=null){if(!this._stickyRoom){if(this._cachedStickyRooms){if(this._cachedStickyRooms=null,this.updatesInhibited)return;this.emit(F)}return}if(!this._cachedStickyRooms||!e){T.b.getValue("advancedRoomListLogging")&&console.log("Generating clone of cached rooms for sticky room handling");const e={};for(const t of Object.keys(this.cachedRooms))e[t]=this.cachedRooms[t].map(e=>e);this._cachedStickyRooms=e}e&&(T.b.getValue("advancedRoomListLogging")&&console.log("Replacing cached sticky rooms for "+e),this._cachedStickyRooms[e]=this.cachedRooms[e].map(e=>e));const t=this._stickyRoom;e&&e!==t.tag||(T.b.getValue("advancedRoomListLogging")&&console.log(`Inserting sticky room ${t.room.roomId} at position ${t.position} in ${t.tag}`),this._cachedStickyRooms[t.tag].splice(t.position,0,t.room)),this.updatesInhibited||this.emit(F)}populateTags(e,t){if(!e)throw new Error("Sorting map cannot be null or empty");if(!t)throw new Error("Ordering ma cannot be null or empty");if(Object(c.d)(Object.keys(e),Object.keys(t)))throw new Error("Both maps must contain the exact same tags");this.sortAlgorithms=e,this.listAlgorithms=t,this.algorithms={};for(const t of Object.keys(e))this.algorithms[t]=C(this.listAlgorithms[t],t,this.sortAlgorithms[t]);return this.setKnownRooms(this.rooms)}getOrderedRooms(){return this.hasFilters?this.filteredRooms:this._cachedStickyRooms||this.cachedRooms}getUnfilteredRooms(){return this._cachedStickyRooms||this.cachedRooms}getOrderedRoomsWithoutSticky(){return this.hasFilters?this.filteredRooms:this.cachedRooms}setKnownRooms(e){if(Object(i.v)(e))throw new Error("Array of rooms cannot be null");if(!this.sortAlgorithms)throw new Error("Cannot set known rooms without a tag sorting map");this.updatesInhibited||console.warn("Resetting known rooms, initiating regeneration");const t=this._stickyRoom;t&&this.updateStickyRoom(null),this.rooms=e;const n={};for(const e in this.sortAlgorithms)n[e]=[];if(!e.length)return this.generateFreshTags(n),void(this.cachedRooms=n);const r=Object(d.e)(e);for(const e of r[d.a.Invite])n[l.a.Invite].push(e);for(const e of r[d.a.Leave])n[l.a.Archived].push(e);for(const e of r[d.a.Join]){const t=this.getTagsOfJoinedRoom(e);let r=!1;if(t.length>0)for(const o of t)Object(i.v)(n[o])||(n[o].push(e),r=!0);r||(s.a.shared().getUserIdForRoomId(e.roomId)?n[l.a.DM].push(e):n[l.a.Untagged].push(e))}this.generateFreshTags(n),this.cachedRooms=n,this.updateTagsFromCache(),t&&t.room&&(this.updateStickyRoom(t.room),this._stickyRoom&&this._stickyRoom.room&&this._stickyRoom.tag!==t.tag&&(this._stickyRoom.position=0,this.recalculateStickyRoom(this._stickyRoom.tag)))}getTagsForRoom(e){const t=[],n=Object(d.b)(e.getMyMembership());return n===d.a.Invite?t.push(l.a.Invite):n===d.a.Leave?t.push(l.a.Archived):t.push(...this.getTagsOfJoinedRoom(e)),t.length||t.push(l.a.Untagged),t}getTagsOfJoinedRoom(e){let t=Object.keys(e.tags||{});return 0===t.length&&s.a.shared().getUserIdForRoomId(e.roomId)&&(t=[l.a.DM]),t}updateTagsFromCache(){const e={},t=Object.keys(this.cachedRooms);for(const n of t){const t=this.cachedRooms[n];for(const r of t)e[r.roomId]||(e[r.roomId]=[]),e[r.roomId].push(n)}this.roomIdsToTags=e}generateFreshTags(e){if(!this.algorithms)throw new Error("Not ready: no algorithms to determine tags from");for(const t of Object.keys(e)){const n=this.algorithms[t];if(!n)throw new Error("No algorithm for "+t);n.setRooms(e[t]),e[t]=n.orderedRooms}}handleRoomUpdate(e,t){var n,r;if(T.b.getValue("advancedRoomListLogging")&&console.log(`Handle room update for ${e.roomId} called with cause ${t}`),!this.algorithms)throw new Error("Not ready: no algorithms to determine tags from");const o=(null===(n=this._stickyRoom)||void 0===n||null===(r=n.room)||void 0===r?void 0:r.roomId)===e.roomId;if(t===l.c.NewRoom){var a;const n=(null===(a=this._lastStickyRoom)||void 0===a?void 0:a.room)===e,r=this.roomIdsToTags[e.roomId],i=r&&r.length>0;i&&!n&&(console.warn(e.roomId+" is reportedly new but is already known - assuming TagChange instead"),t=l.c.PossibleTagChange);let s=this.rooms.includes(e);if(i&&!s&&(console.warn(e.roomId+" might be a reference change - attempting to update reference"),this.rooms=this.rooms.map(t=>t.roomId===e.roomId?e:t),s=this.rooms.includes(e),s||console.warn(e.roomId+" is still not referenced. It may be sticky.")),i&&!s&&!o)throw new Error(e.roomId+" is missing from room array but is known - trying to find duplicate");i&&o&&(this._stickyRoom.room=e),t!==l.c.NewRoom||o||s||this.rooms.push(e)}let s=!1;if(t===l.c.PossibleTagChange){const n=this.roomIdsToTags[e.roomId]||[],r=this.getTagsForRoom(e),i=Object(c.a)(n,r);if(i.removed.length>0||i.added.length>0){for(const t of i.removed){T.b.getValue("advancedRoomListLogging")&&console.log(`Removing ${e.roomId} from ${t}`);const n=this.algorithms[t];if(!n)throw new Error("No algorithm for "+t);n.handleRoomUpdate(e,l.c.RoomRemoved),this._cachedRooms[t]=n.orderedRooms,this.recalculateFilteredRoomsForTag(t),this.recalculateStickyRoom(t)}for(const t of i.added){T.b.getValue("advancedRoomListLogging")&&console.log(`Adding ${e.roomId} to ${t}`);const n=this.algorithms[t];if(!n)throw new Error("No algorithm for "+t);n.handleRoomUpdate(e,l.c.NewRoom),this._cachedRooms[t]=n.orderedRooms}this.roomIdsToTags[e.roomId]=r,T.b.getValue("advancedRoomListLogging")&&console.log(`Changing update cause for ${e.roomId} to Timeline to sort rooms`),t=l.c.Timeline,s=!0}else T.b.getValue("advancedRoomListLogging")&&console.log(`Received no-op update for ${e.roomId} - changing to Timeline update`),t=l.c.Timeline;s&&o&&(this._lastStickyRoom?this._stickyRoom={room:e,tag:this.roomIdsToTags[e.roomId][0],position:0}:this.setStickyRoom(e))}if(t!==l.c.NewRoom&&t!==l.c.RoomRemoved&&this.stickyRoom===e)return T.b.getValue("advancedRoomListLogging")&&console.warn(`[RoomListDebug] Received ${t} update for sticky room ${e.roomId} - ignoring`),!1;if(!this.roomIdsToTags[e.roomId]){if(O.includes(t))return T.b.getValue("advancedRoomListLogging")&&console.warn(`Skipping tag update for ${e.roomId} because we don't know about the room`),!1;T.b.getValue("advancedRoomListLogging")&&console.log(`[RoomListDebug] Updating tags for room ${e.roomId} (${e.name})`);const n=this.getTagsForRoom(e).filter(e=>!Object(i.v)(this.cachedRooms[e]));if(!n.length)throw new Error("Tags cannot be determined for "+e.roomId);this.roomIdsToTags[e.roomId]=n,T.b.getValue("advancedRoomListLogging")&&console.log(`[RoomListDebug] Updated tags for ${e.roomId}:`,n)}T.b.getValue("advancedRoomListLogging")&&console.log(`[RoomListDebug] Reached algorithmic handling for ${e.roomId} and cause ${t}`);const u=this.roomIdsToTags[e.roomId];if(!u)return console.warn(`No tags known for "${e.name}" (${e.roomId})`),!1;let d=s;for(const n of u){const r=this.algorithms[n];if(!r)throw new Error("No algorithm for "+n);r.handleRoomUpdate(e,t),this._cachedRooms[n]=r.orderedRooms,this.recalculateFilteredRoomsForTag(n),this.recalculateStickyRoom(n),d=!0}return T.b.getValue("advancedRoomListLogging")&&console.log(`[RoomListDebug] Finished handling ${e.roomId} with cause ${t} (changed=${d})`),d}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(79),o=n.n(r),i=n(82),a=n(83),s=n(80),c=n(158),l=n(133);var u=n(87),d=n(678),h=n(177),p=n(210),m=n(97);const g=e=>{switch(e){case v.SET_UP_ENCRYPTION:return Object(s.a)("Set up Secure Backup");case v.UPGRADE_ENCRYPTION:return Object(s.a)("Encryption upgrade available");case v.VERIFY_THIS_SESSION:return Object(s.a)("Verify this session")}},f=e=>{switch(e){case v.SET_UP_ENCRYPTION:case v.UPGRADE_ENCRYPTION:return"secure_backup";case v.VERIFY_THIS_SESSION:return"verification_warning"}},_=e=>{switch(e){case v.SET_UP_ENCRYPTION:return Object(s.a)("Continue");case v.UPGRADE_ENCRYPTION:return Object(s.a)("Upgrade");case v.VERIFY_THIS_SESSION:return Object(s.a)("Verify")}},b=e=>{switch(e){case v.SET_UP_ENCRYPTION:case v.UPGRADE_ENCRYPTION:return Object(s.a)("Safeguard against losing access to encrypted messages & data");case v.VERIFY_THIS_SESSION:return Object(s.a)("Other users may not trust it")}};let v;!function(e){e.SET_UP_ENCRYPTION="set_up_encryption",e.UPGRADE_ENCRYPTION="upgrade_encryption",e.VERIFY_THIS_SESSION="verify_this_session"}(v||(v={}));const y=()=>{R.sharedInstance().dismissEncryptionSetup()},E=e=>{var t;if(null!==(t=p.a.setupEncryptionNeeded)&&void 0!==t&&t.call(p.a,e))return;l.a.sharedInstance().addOrReplaceToast({key:"setupencryption",title:g(e),icon:f(e),props:{description:b(e),acceptLabel:_(e),onAccept:async()=>{if(e===v.VERIFY_THIS_SESSION)u.a.createTrackedDialog("Verify session","Verify session",d.a,{},null,!1,!0);else{const e=u.a.createDialog(m.a,null,"mx_Dialog_spinner",!1,!0);try{await Object(h.b)()}finally{e.close()}}},rejectLabel:Object(s.a)("Later"),onReject:y},component:c.a,priority:e===v.VERIFY_THIS_SESSION?95:40})},S=()=>{l.a.sharedInstance().dismissToast("setupencryption")};var w=n(91),C=n(192);function T(e){return"unverified_session_"+e}const x=async e=>{const t=i.a.get(),n=await t.getDevice(e);l.a.sharedInstance().addOrReplaceToast({key:T(e),title:Object(s.a)("New login. Was this you?"),icon:"verification_warning",props:{description:n.display_name,detail:Object(s.a)("%(deviceId)s from %(ip)s",{deviceId:e,ip:n.last_seen_ip}),acceptLabel:Object(s.a)("Check your devices"),onAccept:()=>{R.sharedInstance().dismissUnverifiedSessions([e]),a.a.dispatch({action:w.a.ViewUserSettings,initialTabId:C.a.Security})},rejectLabel:Object(s.a)("Later"),onReject:()=>{R.sharedInstance().dismissUnverifiedSessions([e])}},component:c.a,priority:80})},k=e=>{l.a.sharedInstance().dismissToast(T(e))};var F=n(237),O=n(873);class R{constructor(){o()(this,"dispatcherRef",void 0),o()(this,"dismissed",new Set),o()(this,"dismissedThisDeviceToast",!1),o()(this,"keyBackupInfo",null),o()(this,"keyBackupFetchedAt",null),o()(this,"ourDeviceIdsAtStart",null),o()(this,"displayingToastsForDeviceIds",new Set),o()(this,"onWillUpdateDevices",async(e,t)=>{if(t)return;const n=i.a.get().getUserId();e.includes(n)&&this.ensureDeviceIdsAtStartPopulated()}),o()(this,"onDevicesUpdated",e=>{e.includes(i.a.get().getUserId())&&this.recheck()}),o()(this,"onDeviceVerificationChanged",e=>{e===i.a.get().getUserId()&&this.recheck()}),o()(this,"onUserTrustStatusChanged",e=>{e===i.a.get().getUserId()&&this.recheck()}),o()(this,"onCrossSingingKeysChanged",()=>{this.recheck()}),o()(this,"onAccountData",e=>{(e.getType().startsWith("m.secret_storage.")||e.getType().startsWith("m.cross_signing.")||"m.megolm_backup.v1"===e.getType())&&this.recheck()}),o()(this,"onSync",(e,t)=>{"PREPARED"===e&&null===t&&this.recheck()}),o()(this,"onRoomStateEvents",e=>{"m.room.encryption"===e.getType()&&this.recheck()}),o()(this,"onAction",({action:e})=>{"on_logged_in"===e&&this.recheck()})}static sharedInstance(){return window.mxDeviceListener||(window.mxDeviceListener=new R),window.mxDeviceListener}start(){i.a.get().on("crypto.willUpdateDevices",this.onWillUpdateDevices),i.a.get().on("crypto.devicesUpdated",this.onDevicesUpdated),i.a.get().on("deviceVerificationChanged",this.onDeviceVerificationChanged),i.a.get().on("userTrustStatusChanged",this.onUserTrustStatusChanged),i.a.get().on("crossSigning.keysChanged",this.onCrossSingingKeysChanged),i.a.get().on("accountData",this.onAccountData),i.a.get().on("sync",this.onSync),i.a.get().on("RoomState.events",this.onRoomStateEvents),this.dispatcherRef=a.a.register(this.onAction),this.recheck()}stop(){i.a.get()&&(i.a.get().removeListener("crypto.willUpdateDevices",this.onWillUpdateDevices),i.a.get().removeListener("crypto.devicesUpdated",this.onDevicesUpdated),i.a.get().removeListener("deviceVerificationChanged",this.onDeviceVerificationChanged),i.a.get().removeListener("userTrustStatusChanged",this.onUserTrustStatusChanged),i.a.get().removeListener("crossSigning.keysChanged",this.onCrossSingingKeysChanged),i.a.get().removeListener("accountData",this.onAccountData),i.a.get().removeListener("sync",this.onSync),i.a.get().removeListener("RoomState.events",this.onRoomStateEvents)),this.dispatcherRef&&(a.a.unregister(this.dispatcherRef),this.dispatcherRef=null),this.dismissed.clear(),this.dismissedThisDeviceToast=!1,this.keyBackupInfo=null,this.keyBackupFetchedAt=null,this.ourDeviceIdsAtStart=null,this.displayingToastsForDeviceIds=new Set}async dismissUnverifiedSessions(e){for(const t of e)this.dismissed.add(t);this.recheck()}dismissEncryptionSetup(){this.dismissedThisDeviceToast=!0,this.recheck()}ensureDeviceIdsAtStartPopulated(){if(null===this.ourDeviceIdsAtStart){const e=i.a.get();this.ourDeviceIdsAtStart=new Set(e.getStoredDevicesForUser(e.getUserId()).map(e=>e.deviceId))}}async getKeyBackupInfo(){const e=(new Date).getTime();return(!this.keyBackupInfo||this.keyBackupFetchedAt<e-3e5)&&(this.keyBackupInfo=await i.a.get().getKeyBackupVersion(),this.keyBackupFetchedAt=e),this.keyBackupInfo}shouldShowSetupEncryptionToast(){if(Object(h.d)())return!1;const e=i.a.get();return e&&e.getRooms().some(t=>e.isRoomEncrypted(t.roomId))}async recheck(){const e=i.a.get();if(!await e.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"))return;if(!e.isCryptoEnabled())return;if(!e.isInitialSyncComplete())return;const t=await e.isCrossSigningReady(),n=await e.isSecretStorageReady(),r=t&&n;if(this.dismissedThisDeviceToast||r)S();else if(this.shouldShowSetupEncryptionToast())if(await e.downloadKeys([e.getUserId()]),!e.getCrossSigningId()&&e.getStoredCrossSigningForUser(e.getUserId()))E(v.VERIFY_THIS_SESSION);else{await this.getKeyBackupInfo()?E(v.UPGRADE_ENCRYPTION):(await e.waitForClientWellKnown(),Object(F.d)()&&Object(O.b)()?(S(),Object(h.b)()):E(v.SET_UP_ENCRYPTION))}this.ensureDeviceIdsAtStartPopulated();const o=new Set,u=new Set;if(t){const t=e.getStoredDevicesForUser(e.getUserId());for(const n of t){if(n.deviceId===e.deviceId)continue;(await e.checkDeviceTrust(e.getUserId(),n.deviceId)).isCrossSigningVerified()||this.dismissed.has(n.deviceId)||(this.ourDeviceIdsAtStart.has(n.deviceId)?o.add(n.deviceId):u.add(n.deviceId))}}var d;o.size>0?(d=o,l.a.sharedInstance().addOrReplaceToast({key:"reviewsessions",title:Object(s.a)("You have unverified logins"),icon:"verification_warning",props:{description:Object(s.a)("Review to ensure your account is safe"),acceptLabel:Object(s.a)("Review"),onAccept:()=>{R.sharedInstance().dismissUnverifiedSessions(d),a.a.dispatch({action:"view_user_info",userId:i.a.get().getUserId()})},rejectLabel:Object(s.a)("Later"),onReject:()=>{R.sharedInstance().dismissUnverifiedSessions(d)}},component:c.a,priority:50})):l.a.sharedInstance().dismissToast("reviewsessions");for(const e of u)x(e);for(const e of this.displayingToastsForDeviceIds)u.has(e)||k(e);this.displayingToastsForDeviceIds=u}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(79),o=n.n(r),i=n(152);class a{constructor(e){o()(this,"timeline",void 0),o()(this,"ourEventIndex",0),o()(this,"paginateTokens",{[i.a.Backward]:null,[i.a.Forward]:null}),this.timeline=[e]}getEvent(){return this.timeline[this.ourEventIndex]}getTimeline(){return this.timeline}getOurEventIndex(){return this.ourEventIndex}getPaginateToken(e=!1){return this.paginateTokens[e?i.a.Backward:i.a.Forward]}setPaginateToken(e,t=!1){this.paginateTokens[t?i.a.Backward:i.a.Forward]=e}addEvents(e,t=!1){t?(this.timeline=e.concat(this.timeline),this.ourEventIndex+=e.length):this.timeline=this.timeline.concat(e)}}class s{static fromJson(e,t){const n=e.context||{},r=n.events_before||[],o=n.events_after||[],i=new a(t(e.result));return i.setPaginateToken(n.start,!0),i.addEvents(r.map(t),!0),i.addEvents(o.map(t),!1),i.setPaginateToken(n.end,!1),new s(e.rank,i)}constructor(e,t){this.rank=e,this.context=t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return b}));var r=n(79),o=n.n(r),i=n(93),a=n(96),s=n(2);function c(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}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class u{constructor(e,t){this.client=e,this.indexEvent=t}get id(){return this.indexEvent.getStateKey()}get isActive(){return!0===this.indexEvent.getContent().active}get roomId(){return this.indexEvent.getRoomId()}async delete(){await this.client.sendStateEvent(this.roomId,i.i.name,{},this.id),await this.client.redactEvent(this.roomId,this.id)}getName(){return this.indexEvent.getContent().name||"Unnamed File"}async setName(e){await this.client.sendStateEvent(this.roomId,i.i.name,l(l({},this.indexEvent.getContent()),{},{name:e}),this.id)}async getFileInfo(){const e=(await this.getFileEvent()).getContent().file;return{info:e,httpUrl:this.client.mxcUrlToHttp(e.url)}}async getFileEvent(){const e=this.client.getRoom(this.roomId);if(!e)throw new Error("Unknown room");const t=await this.client.getEventTimeline(e.getUnfilteredTimelineSet(),this.id);if(!t)throw new Error("Failed to get timeline for room event");const n=t.getEvents().find(e=>e.getId()===this.id);if(!n)throw new Error("Failed to find event");return await this.client.decryptEventIfNeeded(n,{emit:!1,isRetry:!1}),n}}var d=n(20),h=n.n(d),p=n(516);function m(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}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const f={invite:100,kick:100,ban:100,redact:50,state_default:50,events_default:50,users_default:0,events:{[i.a.RoomPowerLevels]:100,[i.a.RoomHistoryVisibility]:100,[i.a.RoomTombstone]:100,[i.a.RoomEncryption]:100,[i.a.RoomName]:50,[i.a.RoomMessage]:50,[i.a.RoomMessageEncrypted]:50,[i.a.Sticker]:50},users:{}};let _;!function(e){e.Viewer="viewer",e.Editor="editor",e.Owner="owner"}(_||(_={}));class b{constructor(e,t){if(this.client=e,this.roomId=t,o()(this,"room",void 0),this.room=this.client.getRoom(this.roomId),!this.room)throw new Error("Unknown room")}get id(){return this.roomId}get isTopLevel(){const e=this.room.currentState.getStateEvents(i.a.SpaceParent);return null==e||!e.length||e.every(e=>{var t;return!(null!==(t=e.getContent())&&void 0!==t&&t.via)})}async setName(e){await this.client.sendStateEvent(this.roomId,i.a.RoomName,{name:e},"")}async invite(e,t=!0,n=!0){const r=[this.retryInvite(e)];return t&&r.push(...this.getDirectories().map(r=>r.invite(e,t,n))),Promise.all(r).then(()=>{n&&Object(p.a)(this.room)&&this.client.sendSharedHistoryKeys(this.roomId,[e])})}retryInvite(e){return Object(s.G)(async()=>{await this.client.invite(this.roomId,e).catch(e=>{if("M_FORBIDDEN"===(null==e?void 0:e.errcode))throw new h.a.AbortError(e);throw e})})}async setPermissions(e,t){var n;const r=this.room.currentState.getStateEvents(i.a.RoomPowerLevels,"");if(Array.isArray(r))throw new Error("Unexpected return type for power levels");const o=r.getContent()||{},a=o.users_default||0,s=o.events_default||50,c=(null===(n=o.events)||void 0===n?void 0:n[i.a.RoomPowerLevels])||100,l=o.users||{};switch(t){case _.Viewer:l[e]=a;break;case _.Editor:l[e]=s;break;case _.Owner:l[e]=c;break;default:throw new Error("Invalid role: "+t)}o.users=l,await this.client.sendStateEvent(this.roomId,i.a.RoomPowerLevels,o,"")}getPermissions(e){var t,n;const r=this.room.currentState.getStateEvents(i.a.RoomPowerLevels,"");if(Array.isArray(r))throw new Error("Unexpected return type for power levels");const o=r.getContent()||{},a=o.users_default||0,s=o.events_default||50,c=(null===(t=o.events)||void 0===t?void 0:t[i.a.RoomPowerLevels])||100,l=(null===(n=o.users)||void 0===n?void 0:n[e])||a;return l>=c?_.Owner:l>=s?_.Editor:_.Viewer}async createDirectory(e){const t=await this.client.unstableCreateFileTree(e);return await this.client.sendStateEvent(this.roomId,i.a.SpaceChild,{via:[this.client.getDomain()]},t.roomId),await this.client.sendStateEvent(t.roomId,i.a.SpaceParent,{via:[this.client.getDomain()]},this.roomId),t}getDirectories(){const e=[],t=this.room.currentState.getStateEvents(i.a.SpaceChild);for(const n of t)try{const t=this.client.unstableGetFileTreeSpace(n.getStateKey());t&&e.push(t)}catch(e){a.a.warn("Unable to create tree space instance for listing. Are we joined?",e)}return e}getDirectory(e){return this.getDirectories().find(t=>t.roomId===e)}async delete(){const e=this.getDirectories();for(const t of e)await t.delete();const t=["invite","knock","join"],n=this.room.currentState.getStateEvents(i.a.RoomMember);for(const e of n){e.getStateKey()!==this.client.getUserId()&&t.includes(e.getContent().membership)&&await this.client.kick(this.roomId,e.getStateKey(),"Room deleted")}await this.client.leave(this.roomId)}getOrderedChildren(e){const t=e.map(e=>({roomId:e.getStateKey(),order:e.getContent().order}));return t.sort((e,t)=>{if(e.order&&!t.order)return-1;if(!e.order&&t.order)return 1;if(e.order||t.order)return Object(s.x)(e.order,t.order);{var n,r,o,a;const c=this.client.getRoom(e.roomId),l=this.client.getRoom(t.roomId);if(!c||!l)return Object(s.x)(e.roomId,t.roomId);const u=null!==(n=null===(r=c.currentState.getStateEvents(i.a.RoomCreate,""))||void 0===r?void 0:r.getTs())&&void 0!==n?n:0,d=null!==(o=null===(a=l.currentState.getStateEvents(i.a.RoomCreate,""))||void 0===a?void 0:a.getTs())&&void 0!==o?o:0;return u===d?Object(s.x)(e.roomId,t.roomId):u-d}}),t}getParentRoom(){const e=this.room.currentState.getStateEvents(i.a.SpaceParent)[0];if(!e)throw new Error("Expected to have a parent in a non-top level space");const t=this.client.getRoom(e.getStateKey());if(!t)throw new Error("Unable to locate room for parent");return t}getOrder(){if(this.isTopLevel)return-1;const e=this.getParentRoom().currentState.getStateEvents(i.a.SpaceChild);return this.getOrderedChildren(e).findIndex(e=>e.roomId===this.roomId)}async setOrder(e){var t;if(this.isTopLevel)throw new Error("Cannot set order of top level spaces currently");const n=this.getParentRoom(),r=n.currentState.getStateEvents(i.a.SpaceChild),o=this.getOrderedChildren(r);e=Math.max(Math.min(e,o.length-1),0);const a=this.getOrder()<e;a&&e===o.length-1?e--:a||0!==e||e++;const c=o[a?e:e-1],l=o[a?e+1:e];let u=s.a[0],d=!1;if(c)if(e===o.length-1)null!=l&&l.order&&(u=Object(s.y)(l.order));else{const e=null==c?void 0:c.order,t=null==l?void 0:l.order;e&&t?u=e===t?Object(s.y)(e):Object(s.c)(e,t):e?u=Object(s.y)(e):t?u=Object(s.A)(t):d=!0}else null!=l&&l.order&&(u=Object(s.A)(l.order));if(d){let t;for(let r=0;r<=e;r++){const e=o[r];if(0===r&&(t=e.order),e.order)t=e.order;else{var h;t=t?Object(s.y)(t):s.a[0];const r=n.currentState.getStateEvents(i.a.SpaceChild,e.roomId),o=null!==(h=null==r?void 0:r.getContent())&&void 0!==h?h:{via:[this.client.getDomain()]};await this.client.sendStateEvent(n.roomId,i.a.SpaceChild,g(g({},o),{},{order:t}),e.roomId)}}u=Object(s.y)(t)}const p=n.currentState.getStateEvents(i.a.SpaceChild,this.roomId),m=null!==(t=null==p?void 0:p.getContent())&&void 0!==t?t:{via:[this.client.getDomain()]};await this.client.sendStateEvent(n.roomId,i.a.SpaceChild,g(g({},m),{},{order:u}),this.roomId)}async createFile(e,t,n){const r=await this.client.uploadContent(new Blob([t]),{includeFilename:!1,onlyContentUri:!0});n.url=r;const o=await this.client.sendMessage(this.roomId,{msgtype:i.b.File,body:e,url:r,file:n,[i.j.name]:{}});await this.client.sendStateEvent(this.roomId,i.i.name,{active:!0,name:e},o.event_id)}getFile(e){const t=this.room.currentState.getStateEvents(i.i.name,e);return t?new u(this.client,t):null}listFiles(){var e;return(null!==(e=this.room.currentState.getStateEvents(i.i.name))&&void 0!==e?e:[]).map(e=>new u(this.client,e)).filter(e=>e.isActive)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(79),o=n.n(r),i=n(173),a=n(270),s=n(3),c=n(123),l=n(122),u=n(392);class d extends s.EventEmitter{constructor(e){super(),this.community=e,o()(this,"roomIds",new Set),o()(this,"userIds",new Set),o()(this,"onStoreUpdate",async()=>{const e=this.roomIds;this.roomIds=new Set((await c.a.getGroupRooms(this.community.groupId)).map(e=>e.roomId));const t=this.userIds;this.userIds=new Set((await c.a.getGroupMembers(this.community.groupId)).map(e=>e.userId)),(Object(u.a)(e,this.roomIds)||Object(u.a)(t,this.userIds))&&this.emit(a.a)}),c.a.on("update",this.onStoreUpdate),this.onStoreUpdate()}get kind(){return a.b.Prefilter}isVisible(e){return this.roomIds.has(e.roomId)||this.userIds.has(l.a.shared().getUserIdForRoomId(e.roomId))}destroy(){c.a.off("update",this.onStoreUpdate)}}var h=n(109);class p{constructor(e){this.store=e,o()(this,"filters",new Map),o()(this,"onTagsUpdated",()=>{const e=Array.from(this.filters.keys()),t=i.a.getSelectedTags();if(Object(h.d)(e,t)){if(!this.store.matrixClient)return void console.warn("Tag update without an associated matrix client - ignoring");const n=new Map,r=t.filter(e=>e.startsWith("+"));for(const e of r){const t=this.store.matrixClient.getGroup(e);if(!t){console.warn("Group selected with no group object available: "+e);continue}let r=this.filters.get(e);r||(r=new d(t)),n.set(e,r)}const o=Object(h.a)(e,t);for(const e of o.added){const t=n.get(e);t&&this.store.addFilter(t)}for(const e of o.removed){const t=this.filters.get(e);t&&(this.store.removeFilter(t),t.destroy())}this.filters=n}}),i.a.addListener(this.onTagsUpdated)}}}]]);
|