@tencentcloud/tuiroom-engine-wx
Version:
TUIRoomEngine MiniProgram SDK
2 lines • 225 kB
JavaScript
import e from"@tencentcloud/chat";export{default as TIM,default as TencentCloudChat}from"@tencentcloud/chat";import t from"@tencentcloud/trtc-component-wx";export{default as TRTCCloud}from"@tencentcloud/trtc-component-wx";function n(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}function r(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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,d(r.key),r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(){u=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),s=new k(r||[]);return o(a,"_invoke",{value:b(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",v="suspendedYield",p="executing",g="completed",m={};function y(){}function R(){}function T(){}var E={};l(E,a,(function(){return this}));var C=Object.getPrototypeOf,_=C&&C(C(N([])));_&&_!==n&&r.call(_,a)&&(E=_);var S=T.prototype=y.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function n(o,i,a,s){var u=f(e[o],e,i);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function b(t,n,r){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=w(s,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var c=f(t,n,r);if("normal"===c.type){if(o=r.done?g:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function w(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,w(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return R.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:R,configurable:!0}),R.displayName=l(T,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===R||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,l(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},A(I.prototype),l(I.prototype,s,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new I(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(S),l(S,c,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||h(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 l(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function f(e){return f="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},f(e)}function h(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.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)?o(e,t):void 0}}"function"==typeof SuppressedError&&SuppressedError;var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},p=function(e){return e&&e.Math===Math&&e},g=p("object"==typeof globalThis&&globalThis)||p("object"==typeof window&&window)||p("object"==typeof self&&self)||p("object"==typeof v&&v)||p("object"==typeof v&&v)||function(){return this}()||Function("return this")(),m={},y=function(e){try{return!!e()}catch(t){return!0}},R=!y((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),T=!y((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),E=T,C=Function.prototype.call,_=E?C.bind(C):function(){return C.apply(C,arguments)},S={},A={}.propertyIsEnumerable,I=Object.getOwnPropertyDescriptor,b=I&&!A.call({1:2},1);S.f=b?function(e){var t=I(this,e);return!!t&&t.enumerable}:A;var w,O,M=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},k=T,N=Function.prototype,D=N.call,P=k&&N.bind.bind(D,D),L=k?P:function(e){return function(){return D.apply(e,arguments)}},V=L,x=V({}.toString),U=V("".slice),F=function(e){return U(x(e),8,-1)},j=y,$=F,q=Object,B=L("".split),W=j((function(){return!q("z").propertyIsEnumerable(0)}))?function(e){return"String"===$(e)?B(e,""):q(e)}:q,J=function(e){return null==e},Q=J,H=TypeError,Y=function(e){if(Q(e))throw new H("Can't call method on "+e);return e},G=W,K=Y,z=function(e){return G(K(e))},X="object"==typeof document&&document.all,Z=void 0===X&&void 0!==X?function(e){return"function"==typeof e||e===X}:function(e){return"function"==typeof e},ee=Z,te=function(e){return"object"==typeof e?null!==e:ee(e)},ne=g,re=Z,oe=function(e,t){return arguments.length<2?(n=ne[e],re(n)?n:void 0):ne[e]&&ne[e][t];var n},ie=L({}.isPrototypeOf),ae=g.navigator,se=ae&&ae.userAgent,ue=se?String(se):"",ce=g,le=ue,de=ce.process,fe=ce.Deno,he=de&&de.versions||fe&&fe.version,ve=he&&he.v8;ve&&(O=(w=ve.split("."))[0]>0&&w[0]<4?1:+(w[0]+w[1])),!O&&le&&(!(w=le.match(/Edge\/(\d+)/))||w[1]>=74)&&(w=le.match(/Chrome\/(\d+)/))&&(O=+w[1]);var pe=O,ge=pe,me=y,ye=g.String,Re=!!Object.getOwnPropertySymbols&&!me((function(){var e=Symbol("symbol detection");return!ye(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),Te=Re&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ee=oe,Ce=Z,_e=ie,Se=Object,Ae=Te?function(e){return"symbol"==typeof e}:function(e){var t=Ee("Symbol");return Ce(t)&&_e(t.prototype,Se(e))},Ie=String,be=function(e){try{return Ie(e)}catch(t){return"Object"}},we=Z,Oe=be,Me=TypeError,ke=function(e){if(we(e))return e;throw new Me(Oe(e)+" is not a function")},Ne=ke,De=J,Pe=function(e,t){var n=e[t];return De(n)?void 0:Ne(n)},Le=_,Ve=Z,xe=te,Ue=TypeError,Fe={},je={get exports(){return Fe},set exports(e){Fe=e}},$e=g,qe=Object.defineProperty,Be=function(e,t){try{qe($e,e,{value:t,configurable:!0,writable:!0})}catch(n){$e[e]=t}return t},We=g,Je=Be,Qe="__core-js_shared__",He=je.exports=We[Qe]||Je(Qe,{});(He.versions||(He.versions=[])).push({version:"3.41.0",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ye=Fe,Ge=function(e,t){return Ye[e]||(Ye[e]=t||{})},Ke=Y,ze=Object,Xe=function(e){return ze(Ke(e))},Ze=Xe,et=L({}.hasOwnProperty),tt=Object.hasOwn||function(e,t){return et(Ze(e),t)},nt=L,rt=0,ot=Math.random(),it=nt(1..toString),at=function(e){return"Symbol("+(void 0===e?"":e)+")_"+it(++rt+ot,36)},st=Ge,ut=tt,ct=at,lt=Re,dt=Te,ft=g.Symbol,ht=st("wks"),vt=dt?ft.for||ft:ft&&ft.withoutSetter||ct,pt=function(e){return ut(ht,e)||(ht[e]=lt&&ut(ft,e)?ft[e]:vt("Symbol."+e)),ht[e]},gt=_,mt=te,yt=Ae,Rt=Pe,Tt=function(e,t){var n,r;if("string"===t&&Ve(n=e.toString)&&!xe(r=Le(n,e)))return r;if(Ve(n=e.valueOf)&&!xe(r=Le(n,e)))return r;if("string"!==t&&Ve(n=e.toString)&&!xe(r=Le(n,e)))return r;throw new Ue("Can't convert object to primitive value")},Et=TypeError,Ct=pt("toPrimitive"),_t=function(e,t){if(!mt(e)||yt(e))return e;var n,r=Rt(e,Ct);if(r){if(void 0===t&&(t="default"),n=gt(r,e,t),!mt(n)||yt(n))return n;throw new Et("Can't convert object to primitive value")}return void 0===t&&(t="number"),Tt(e,t)},St=_t,At=Ae,It=function(e){var t=St(e,"string");return At(t)?t:t+""},bt=te,wt=g.document,Ot=bt(wt)&&bt(wt.createElement),Mt=function(e){return Ot?wt.createElement(e):{}},kt=Mt,Nt=!R&&!y((function(){return 7!==Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Dt=R,Pt=_,Lt=S,Vt=M,xt=z,Ut=It,Ft=tt,jt=Nt,$t=Object.getOwnPropertyDescriptor;m.f=Dt?$t:function(e,t){if(e=xt(e),t=Ut(t),jt)try{return $t(e,t)}catch(n){}if(Ft(e,t))return Vt(!Pt(Lt.f,e,t),e[t])};var qt={},Bt=R&&y((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Wt=te,Jt=String,Qt=TypeError,Ht=function(e){if(Wt(e))return e;throw new Qt(Jt(e)+" is not an object")},Yt=R,Gt=Nt,Kt=Bt,zt=Ht,Xt=It,Zt=TypeError,en=Object.defineProperty,tn=Object.getOwnPropertyDescriptor,nn="enumerable",rn="configurable",on="writable";qt.f=Yt?Kt?function(e,t,n){if(zt(e),t=Xt(t),zt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&on in n&&!n[on]){var r=tn(e,t);r&&r[on]&&(e[t]=n.value,n={configurable:rn in n?n[rn]:r[rn],enumerable:nn in n?n[nn]:r[nn],writable:!1})}return en(e,t,n)}:en:function(e,t,n){if(zt(e),t=Xt(t),zt(n),Gt)try{return en(e,t,n)}catch(r){}if("get"in n||"set"in n)throw new Zt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var an=qt,sn=M,un=R?function(e,t,n){return an.f(e,t,sn(1,n))}:function(e,t,n){return e[t]=n,e},cn={},ln={get exports(){return cn},set exports(e){cn=e}},dn=R,fn=tt,hn=Function.prototype,vn=dn&&Object.getOwnPropertyDescriptor,pn=fn(hn,"name"),gn={EXISTS:pn,PROPER:pn&&"something"===function(){}.name,CONFIGURABLE:pn&&(!dn||dn&&vn(hn,"name").configurable)},mn=Z,yn=Fe,Rn=L(Function.toString);mn(yn.inspectSource)||(yn.inspectSource=function(e){return Rn(e)});var Tn,En,Cn,_n=yn.inspectSource,Sn=Z,An=g.WeakMap,In=Sn(An)&&/native code/.test(String(An)),bn=at,wn=Ge("keys"),On=function(e){return wn[e]||(wn[e]=bn(e))},Mn={},kn=In,Nn=g,Dn=te,Pn=un,Ln=tt,Vn=Fe,xn=On,Un=Mn,Fn="Object already initialized",jn=Nn.TypeError,$n=Nn.WeakMap;if(kn||Vn.state){var qn=Vn.state||(Vn.state=new $n);qn.get=qn.get,qn.has=qn.has,qn.set=qn.set,Tn=function(e,t){if(qn.has(e))throw new jn(Fn);return t.facade=e,qn.set(e,t),t},En=function(e){return qn.get(e)||{}},Cn=function(e){return qn.has(e)}}else{var Bn=xn("state");Un[Bn]=!0,Tn=function(e,t){if(Ln(e,Bn))throw new jn(Fn);return t.facade=e,Pn(e,Bn,t),t},En=function(e){return Ln(e,Bn)?e[Bn]:{}},Cn=function(e){return Ln(e,Bn)}}var Wn={set:Tn,get:En,has:Cn,enforce:function(e){return Cn(e)?En(e):Tn(e,{})},getterFor:function(e){return function(t){var n;if(!Dn(t)||(n=En(t)).type!==e)throw new jn("Incompatible receiver, "+e+" required");return n}}},Jn=L,Qn=y,Hn=Z,Yn=tt,Gn=R,Kn=gn.CONFIGURABLE,zn=_n,Xn=Wn.enforce,Zn=Wn.get,er=String,tr=Object.defineProperty,nr=Jn("".slice),rr=Jn("".replace),or=Jn([].join),ir=Gn&&!Qn((function(){return 8!==tr((function(){}),"length",{value:8}).length})),ar=String(String).split("String"),sr=ln.exports=function(e,t,n){"Symbol("===nr(er(t),0,7)&&(t="["+rr(er(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Yn(e,"name")||Kn&&e.name!==t)&&(Gn?tr(e,"name",{value:t,configurable:!0}):e.name=t),ir&&n&&Yn(n,"arity")&&e.length!==n.arity&&tr(e,"length",{value:n.arity});try{n&&Yn(n,"constructor")&&n.constructor?Gn&&tr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(o){}var r=Xn(e);return Yn(r,"source")||(r.source=or(ar,"string"==typeof t?t:"")),e};Function.prototype.toString=sr((function(){return Hn(this)&&Zn(this).source||zn(this)}),"toString");var ur=Z,cr=qt,lr=cn,dr=Be,fr=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;if(ur(n)&&lr(n,i,r),r.global)o?e[t]=n:dr(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(a){}o?e[t]=n:cr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},hr={},vr=Math.ceil,pr=Math.floor,gr=Math.trunc||function(e){var t=+e;return(t>0?pr:vr)(t)},mr=function(e){var t=+e;return t!=t||0===t?0:gr(t)},yr=mr,Rr=Math.max,Tr=Math.min,Er=function(e,t){var n=yr(e);return n<0?Rr(n+t,0):Tr(n,t)},Cr=mr,_r=Math.min,Sr=function(e){var t=Cr(e);return t>0?_r(t,9007199254740991):0},Ar=Sr,Ir=function(e){return Ar(e.length)},br=z,wr=Er,Or=Ir,Mr=function(e){return function(t,n,r){var o=br(t),i=Or(o);if(0===i)return!e&&-1;var a,s=wr(r,i);if(e&&n!=n){for(;i>s;)if((a=o[s++])!=a)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},kr={includes:Mr(!0),indexOf:Mr(!1)},Nr=tt,Dr=z,Pr=kr.indexOf,Lr=Mn,Vr=L([].push),xr=function(e,t){var n,r=Dr(e),o=0,i=[];for(n in r)!Nr(Lr,n)&&Nr(r,n)&&Vr(i,n);for(;t.length>o;)Nr(r,n=t[o++])&&(~Pr(i,n)||Vr(i,n));return i},Ur=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Fr=xr,jr=Ur.concat("length","prototype");hr.f=Object.getOwnPropertyNames||function(e){return Fr(e,jr)};var $r={};$r.f=Object.getOwnPropertySymbols;var qr=oe,Br=hr,Wr=$r,Jr=Ht,Qr=L([].concat),Hr=qr("Reflect","ownKeys")||function(e){var t=Br.f(Jr(e)),n=Wr.f;return n?Qr(t,n(e)):t},Yr=tt,Gr=Hr,Kr=m,zr=qt,Xr=function(e,t,n){for(var r=Gr(t),o=zr.f,i=Kr.f,a=0;a<r.length;a++){var s=r[a];Yr(e,s)||n&&Yr(n,s)||o(e,s,i(t,s))}},Zr=y,eo=Z,to=/#|\.prototype\./,no=function(e,t){var n=oo[ro(e)];return n===ao||n!==io&&(eo(t)?Zr(t):!!t)},ro=no.normalize=function(e){return String(e).replace(to,".").toLowerCase()},oo=no.data={},io=no.NATIVE="N",ao=no.POLYFILL="P",so=no,uo=g,co=m.f,lo=un,fo=fr,ho=Be,vo=Xr,po=so,go=function(e,t){var n,r,o,i,a,s=e.target,u=e.global,c=e.stat;if(n=u?uo:c?uo[s]||ho(s,{}):uo[s]&&uo[s].prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(a=co(n,r))&&a.value:n[r],!po(u?r:s+(c?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;vo(i,o)}(e.sham||o&&o.sham)&&lo(i,"sham",!0),fo(n,r,i,e)}},mo={};mo[pt("toStringTag")]="z";var yo="[object z]"===String(mo),Ro=yo,To=Z,Eo=F,Co=pt("toStringTag"),_o=Object,So="Arguments"===Eo(function(){return arguments}()),Ao=Ro?Eo:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=_o(e),Co))?n:So?Eo(t):"Object"===(r=Eo(t))&&To(t.callee)?"Arguments":r},Io=Ao,bo=String,wo=function(e){if("Symbol"===Io(e))throw new TypeError("Cannot convert a Symbol value to a string");return bo(e)},Oo={},Mo=xr,ko=Ur,No=Object.keys||function(e){return Mo(e,ko)},Do=R,Po=Bt,Lo=qt,Vo=Ht,xo=z,Uo=No;Oo.f=Do&&!Po?Object.defineProperties:function(e,t){Vo(e);for(var n,r=xo(t),o=Uo(t),i=o.length,a=0;i>a;)Lo.f(e,n=o[a++],r[n]);return e};var Fo,jo=oe("document","documentElement"),$o=Ht,qo=Oo,Bo=Ur,Wo=Mn,Jo=jo,Qo=Mt,Ho="prototype",Yo="script",Go=On("IE_PROTO"),Ko=function(){},zo=function(e){return"<"+Yo+">"+e+"</"+Yo+">"},Xo=function(e){e.write(zo("")),e.close();var t=e.parentWindow.Object;return e=null,t},Zo=function(){try{Fo=new ActiveXObject("htmlfile")}catch(o){}var e,t,n;Zo="undefined"!=typeof document?document.domain&&Fo?Xo(Fo):(t=Qo("iframe"),n="java"+Yo+":",t.style.display="none",Jo.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(zo("document.F=Object")),e.close(),e.F):Xo(Fo);for(var r=Bo.length;r--;)delete Zo[Ho][Bo[r]];return Zo()};Wo[Go]=!0;var ei=Object.create||function(e,t){var n;return null!==e?(Ko[Ho]=$o(e),n=new Ko,Ko[Ho]=null,n[Go]=e):n=Zo(),void 0===t?n:qo.f(n,t)},ti={},ni=L([].slice),ri=F,oi=z,ii=hr.f,ai=ni,si="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ti.f=function(e){return si&&"Window"===ri(e)?function(e){try{return ii(e)}catch(t){return ai(si)}}(e):ii(oi(e))};var ui=cn,ci=qt,li=function(e,t,n){return n.get&&ui(n.get,t,{getter:!0}),n.set&&ui(n.set,t,{setter:!0}),ci.f(e,t,n)},di={},fi=pt;di.f=fi;var hi=g,vi=hi,pi=tt,gi=di,mi=qt.f,yi=_,Ri=oe,Ti=pt,Ei=fr,Ci=qt.f,_i=tt,Si=pt("toStringTag"),Ai=function(e,t,n){e&&!n&&(e=e.prototype),e&&!_i(e,Si)&&Ci(e,Si,{configurable:!0,value:t})},Ii=F,bi=L,wi=function(e){if("Function"===Ii(e))return bi(e)},Oi=ke,Mi=T,ki=wi(wi.bind),Ni=function(e,t){return Oi(e),void 0===t?e:Mi?ki(e,t):function(){return e.apply(t,arguments)}},Di=F,Pi=Array.isArray||function(e){return"Array"===Di(e)},Li=L,Vi=y,xi=Z,Ui=Ao,Fi=_n,ji=function(){},$i=oe("Reflect","construct"),qi=/^\s*(?:class|function)\b/,Bi=Li(qi.exec),Wi=!qi.test(ji),Ji=function(e){if(!xi(e))return!1;try{return $i(ji,[],e),!0}catch(t){return!1}},Qi=function(e){if(!xi(e))return!1;switch(Ui(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Wi||!!Bi(qi,Fi(e))}catch(t){return!0}};Qi.sham=!0;var Hi=!$i||Vi((function(){var e;return Ji(Ji.call)||!Ji(Object)||!Ji((function(){e=!0}))||e}))?Qi:Ji,Yi=Pi,Gi=Hi,Ki=te,zi=pt("species"),Xi=Array,Zi=function(e){var t;return Yi(e)&&(t=e.constructor,(Gi(t)&&(t===Xi||Yi(t.prototype))||Ki(t)&&null===(t=t[zi]))&&(t=void 0)),void 0===t?Xi:t},ea=function(e,t){return new(Zi(e))(0===t?0:t)},ta=Ni,na=W,ra=Xe,oa=Ir,ia=ea,aa=L([].push),sa=function(e){var t=1===e,n=2===e,r=3===e,o=4===e,i=6===e,a=7===e,s=5===e||i;return function(u,c,l,d){for(var f,h,v=ra(u),p=na(v),g=oa(p),m=ta(c,l),y=0,R=d||ia,T=t?R(u,g):n||a?R(u,0):void 0;g>y;y++)if((s||y in p)&&(h=m(f=p[y],y,v),e))if(t)T[y]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:aa(T,f)}else switch(e){case 4:return!1;case 7:aa(T,f)}return i?-1:r||o?o:T}},ua={forEach:sa(0),map:sa(1),filter:sa(2),some:sa(3),every:sa(4),find:sa(5),findIndex:sa(6),filterReject:sa(7)},ca=go,la=g,da=_,fa=L,ha=R,va=Re,pa=y,ga=tt,ma=ie,ya=Ht,Ra=z,Ta=It,Ea=wo,Ca=M,_a=ei,Sa=No,Aa=hr,Ia=ti,ba=$r,wa=m,Oa=qt,Ma=Oo,ka=S,Na=fr,Da=li,Pa=Ge,La=Mn,Va=at,xa=pt,Ua=di,Fa=function(e){var t=vi.Symbol||(vi.Symbol={});pi(t,e)||mi(t,e,{value:gi.f(e)})},ja=function(){var e=Ri("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Ti("toPrimitive");t&&!t[r]&&Ei(t,r,(function(e){return yi(n,this)}),{arity:1})},$a=Ai,qa=Wn,Ba=ua.forEach,Wa=On("hidden"),Ja="Symbol",Qa="prototype",Ha=qa.set,Ya=qa.getterFor(Ja),Ga=Object[Qa],Ka=la.Symbol,za=Ka&&Ka[Qa],Xa=la.RangeError,Za=la.TypeError,es=la.QObject,ts=wa.f,ns=Oa.f,rs=Ia.f,os=ka.f,is=fa([].push),as=Pa("symbols"),ss=Pa("op-symbols"),us=Pa("wks"),cs=!es||!es[Qa]||!es[Qa].findChild,ls=function(e,t,n){var r=ts(Ga,t);r&&delete Ga[t],ns(e,t,n),r&&e!==Ga&&ns(Ga,t,r)},ds=ha&&pa((function(){return 7!==_a(ns({},"a",{get:function(){return ns(this,"a",{value:7}).a}})).a}))?ls:ns,fs=function(e,t){var n=as[e]=_a(za);return Ha(n,{type:Ja,tag:e,description:t}),ha||(n.description=t),n},hs=function(e,t,n){e===Ga&&hs(ss,t,n),ya(e);var r=Ta(t);return ya(n),ga(as,r)?(n.enumerable?(ga(e,Wa)&&e[Wa][r]&&(e[Wa][r]=!1),n=_a(n,{enumerable:Ca(0,!1)})):(ga(e,Wa)||ns(e,Wa,Ca(1,_a(null))),e[Wa][r]=!0),ds(e,r,n)):ns(e,r,n)},vs=function(e,t){ya(e);var n=Ra(t),r=Sa(n).concat(ys(n));return Ba(r,(function(t){ha&&!da(ps,n,t)||hs(e,t,n[t])})),e},ps=function(e){var t=Ta(e),n=da(os,this,t);return!(this===Ga&&ga(as,t)&&!ga(ss,t))&&(!(n||!ga(this,t)||!ga(as,t)||ga(this,Wa)&&this[Wa][t])||n)},gs=function(e,t){var n=Ra(e),r=Ta(t);if(n!==Ga||!ga(as,r)||ga(ss,r)){var o=ts(n,r);return!o||!ga(as,r)||ga(n,Wa)&&n[Wa][r]||(o.enumerable=!0),o}},ms=function(e){var t=rs(Ra(e)),n=[];return Ba(t,(function(e){ga(as,e)||ga(La,e)||is(n,e)})),n},ys=function(e){var t=e===Ga,n=rs(t?ss:Ra(e)),r=[];return Ba(n,(function(e){!ga(as,e)||t&&!ga(Ga,e)||is(r,as[e])})),r};va||(Na(za=(Ka=function(){if(ma(za,this))throw new Za("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Ea(arguments[0]):void 0,t=Va(e),n=function(e){var r=void 0===this?la:this;r===Ga&&da(n,ss,e),ga(r,Wa)&&ga(r[Wa],t)&&(r[Wa][t]=!1);var o=Ca(1,e);try{ds(r,t,o)}catch(i){if(!(i instanceof Xa))throw i;ls(r,t,o)}};return ha&&cs&&ds(Ga,t,{configurable:!0,set:n}),fs(t,e)})[Qa],"toString",(function(){return Ya(this).tag})),Na(Ka,"withoutSetter",(function(e){return fs(Va(e),e)})),ka.f=ps,Oa.f=hs,Ma.f=vs,wa.f=gs,Aa.f=Ia.f=ms,ba.f=ys,Ua.f=function(e){return fs(xa(e),e)},ha&&(Da(za,"description",{configurable:!0,get:function(){return Ya(this).description}}),Na(Ga,"propertyIsEnumerable",ps,{unsafe:!0}))),ca({global:!0,constructor:!0,wrap:!0,forced:!va,sham:!va},{Symbol:Ka}),Ba(Sa(us),(function(e){Fa(e)})),ca({target:Ja,stat:!0,forced:!va},{useSetter:function(){cs=!0},useSimple:function(){cs=!1}}),ca({target:"Object",stat:!0,forced:!va,sham:!ha},{create:function(e,t){return void 0===t?_a(e):vs(_a(e),t)},defineProperty:hs,defineProperties:vs,getOwnPropertyDescriptor:gs}),ca({target:"Object",stat:!0,forced:!va},{getOwnPropertyNames:ms}),ja(),$a(Ka,Ja),La[Wa]=!0;var Rs=Re&&!!Symbol.for&&!!Symbol.keyFor,Ts=go,Es=oe,Cs=tt,_s=wo,Ss=Ge,As=Rs,Is=Ss("string-to-symbol-registry"),bs=Ss("symbol-to-string-registry");Ts({target:"Symbol",stat:!0,forced:!As},{for:function(e){var t=_s(e);if(Cs(Is,t))return Is[t];var n=Es("Symbol")(t);return Is[t]=n,bs[n]=t,n}});var ws=go,Os=tt,Ms=Ae,ks=be,Ns=Rs,Ds=Ge("symbol-to-string-registry");ws({target:"Symbol",stat:!0,forced:!Ns},{keyFor:function(e){if(!Ms(e))throw new TypeError(ks(e)+" is not a symbol");if(Os(Ds,e))return Ds[e]}});var Ps=T,Ls=Function.prototype,Vs=Ls.apply,xs=Ls.call,Us="object"==typeof Reflect&&Reflect.apply||(Ps?xs.bind(Vs):function(){return xs.apply(Vs,arguments)}),Fs=Pi,js=Z,$s=F,qs=wo,Bs=L([].push),Ws=go,Js=oe,Qs=Us,Hs=_,Ys=L,Gs=y,Ks=Z,zs=Ae,Xs=ni,Zs=function(e){if(js(e))return e;if(Fs(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];"string"==typeof o?Bs(n,o):"number"!=typeof o&&"Number"!==$s(o)&&"String"!==$s(o)||Bs(n,qs(o))}var i=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Fs(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},eu=Re,tu=String,nu=Js("JSON","stringify"),ru=Ys(/./.exec),ou=Ys("".charAt),iu=Ys("".charCodeAt),au=Ys("".replace),su=Ys(1..toString),uu=/[\uD800-\uDFFF]/g,cu=/^[\uD800-\uDBFF]$/,lu=/^[\uDC00-\uDFFF]$/,du=!eu||Gs((function(){var e=Js("Symbol")("stringify detection");return"[null]"!==nu([e])||"{}"!==nu({a:e})||"{}"!==nu(Object(e))})),fu=Gs((function(){return'"\\udf06\\ud834"'!==nu("\udf06\ud834")||'"\\udead"'!==nu("\udead")})),hu=function(e,t){var n=Xs(arguments),r=Zs(t);if(Ks(r)||void 0!==e&&!zs(e))return n[1]=function(e,t){if(Ks(r)&&(t=Hs(r,this,tu(e),t)),!zs(t))return t},Qs(nu,null,n)},vu=function(e,t,n){var r=ou(n,t-1),o=ou(n,t+1);return ru(cu,e)&&!ru(lu,o)||ru(lu,e)&&!ru(cu,r)?"\\u"+su(iu(e,0),16):e};nu&&Ws({target:"JSON",stat:!0,arity:3,forced:du||fu},{stringify:function(e,t,n){var r=Xs(arguments),o=Qs(du?hu:nu,null,r);return fu&&"string"==typeof o?au(o,uu,vu):o}});var pu=$r,gu=Xe;go({target:"Object",stat:!0,forced:!Re||y((function(){pu.f(1)}))},{getOwnPropertySymbols:function(e){var t=pu.f;return t?t(gu(e)):[]}});var mu=go,yu=R,Ru=L,Tu=tt,Eu=Z,Cu=ie,_u=wo,Su=li,Au=Xr,Iu=g.Symbol,bu=Iu&&Iu.prototype;if(yu&&Eu(Iu)&&(!("description"in bu)||void 0!==Iu().description)){var wu={},Ou=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:_u(arguments[0]),t=Cu(bu,this)?new Iu(e):void 0===e?Iu():Iu(e);return""===e&&(wu[t]=!0),t};Au(Ou,Iu),Ou.prototype=bu,bu.constructor=Ou;var Mu="Symbol(description detection)"===String(Iu("description detection")),ku=Ru(bu.valueOf),Nu=Ru(bu.toString),Du=/^Symbol\((.*)\)[^)]+$/,Pu=Ru("".replace),Lu=Ru("".slice);Su(bu,"description",{configurable:!0,get:function(){var e=ku(this);if(Tu(wu,e))return"";var t=Nu(e),n=Mu?Lu(t,7,-1):Pu(t,Du,"$1");return""===n?void 0:n}}),mu({global:!0,constructor:!0,forced:!0},{Symbol:Ou})}var Vu=TypeError,xu=function(e){if(e>9007199254740991)throw Vu("Maximum allowed index exceeded");return e},Uu=R,Fu=qt,ju=M,$u=function(e,t,n){Uu?Fu.f(e,t,ju(0,n)):e[t]=n},qu=y,Bu=pe,Wu=pt("species"),Ju=function(e){return Bu>=51||!qu((function(){var t=[];return(t.constructor={})[Wu]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Qu=go,Hu=y,Yu=Pi,Gu=te,Ku=Xe,zu=Ir,Xu=xu,Zu=$u,ec=ea,tc=Ju,nc=pe,rc=pt("isConcatSpreadable"),oc=nc>=51||!Hu((function(){var e=[];return e[rc]=!1,e.concat()[0]!==e})),ic=function(e){if(!Gu(e))return!1;var t=e[rc];return void 0!==t?!!t:Yu(e)};Qu({target:"Array",proto:!0,arity:1,forced:!oc||!tc("concat")},{concat:function(e){var t,n,r,o,i,a=Ku(this),s=ec(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(ic(i=-1===t?a:arguments[t]))for(o=zu(i),Xu(u+o),n=0;n<o;n++,u++)n in i&&Zu(s,u,i[n]);else Xu(u+1),Zu(s,u++,i);return s.length=u,s}});var ac=be,sc=TypeError,uc=function(e,t){if(!delete e[t])throw new sc("Cannot delete property "+ac(t)+" of "+ac(e))},cc=Xe,lc=Er,dc=Ir,fc=uc,hc=Math.min,vc=[].copyWithin||function(e,t){var n=cc(this),r=dc(n),o=lc(e,r),i=lc(t,r),a=arguments.length>2?arguments[2]:void 0,s=hc((void 0===a?r:lc(a,r))-i,r-o),u=1;for(i<o&&o<i+s&&(u=-1,i+=s-1,o+=s-1);s-- >0;)i in n?n[o]=n[i]:fc(n,o),o+=u,i+=u;return n},pc=pt,gc=ei,mc=qt.f,yc=pc("unscopables"),Rc=Array.prototype;void 0===Rc[yc]&&mc(Rc,yc,{configurable:!0,value:gc(null)});var Tc=function(e){Rc[yc][e]=!0},Ec=Tc;go({target:"Array",proto:!0},{copyWithin:vc}),Ec("copyWithin");var Cc=y,_c=function(e,t){var n=[][e];return!!n&&Cc((function(){n.call(null,t||function(){return 1},1)}))},Sc=ua.every;go({target:"Array",proto:!0,forced:!_c("every")},{every:function(e){return Sc(this,e,arguments.length>1?arguments[1]:void 0)}});var Ac=ua.filter;go({target:"Array",proto:!0,forced:!Ju("filter")},{filter:function(e){return Ac(this,e,arguments.length>1?arguments[1]:void 0)}});var Ic=go,bc=ua.findIndex,wc=Tc,Oc="findIndex",Mc=!0;Oc in[]&&Array(1)[Oc]((function(){Mc=!1})),Ic({target:"Array",proto:!0,forced:Mc},{findIndex:function(e){return bc(this,e,arguments.length>1?arguments[1]:void 0)}}),wc(Oc);var kc=ua.forEach,Nc=_c("forEach")?[].forEach:function(e){return kc(this,e,arguments.length>1?arguments[1]:void 0)};go({target:"Array",proto:!0,forced:[].forEach!==Nc},{forEach:Nc});var Dc=kr.includes,Pc=Tc;go({target:"Array",proto:!0,forced:y((function(){return!Array(1).includes()}))},{includes:function(e){return Dc(this,e,arguments.length>1?arguments[1]:void 0)}}),Pc("includes");var Lc=go,Vc=kr.indexOf,xc=_c,Uc=wi([].indexOf),Fc=!!Uc&&1/Uc([1],1,-0)<0;Lc({target:"Array",proto:!0,forced:Fc||!xc("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Fc?Uc(this,e,t)||0:Vc(this,e,t)}}),go({target:"Array",stat:!0},{isArray:Pi});var jc,$c,qc,Bc={},Wc=!y((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Jc=tt,Qc=Z,Hc=Xe,Yc=Wc,Gc=On("IE_PROTO"),Kc=Object,zc=Kc.prototype,Xc=Yc?Kc.getPrototypeOf:function(e){var t=Hc(e);if(Jc(t,Gc))return t[Gc];var n=t.constructor;return Qc(n)&&t instanceof n?n.prototype:t instanceof Kc?zc:null},Zc=y,el=Z,tl=te,nl=Xc,rl=fr,ol=pt("iterator"),il=!1;[].keys&&("next"in(qc=[].keys())?($c=nl(nl(qc)))!==Object.prototype&&(jc=$c):il=!0);var al=!tl(jc)||Zc((function(){var e={};return jc[ol].call(e)!==e}));al&&(jc={}),el(jc[ol])||rl(jc,ol,(function(){return this}));var sl={IteratorPrototype:jc,BUGGY_SAFARI_ITERATORS:il},ul=sl.IteratorPrototype,cl=ei,ll=M,dl=Ai,fl=Bc,hl=function(){return this},vl=L,pl=ke,gl=te,ml=function(e){return gl(e)||null===e},yl=String,Rl=TypeError,Tl=function(e,t,n){try{return vl(pl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},El=te,Cl=Y,_l=function(e){if(ml(e))return e;throw new Rl("Can't set "+yl(e)+" as a prototype")},Sl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Tl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return Cl(n),_l(r),El(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0),Al=go,Il=_,bl=Z,wl=function(e,t,n,r){var o=t+" Iterator";return e.prototype=cl(ul,{next:ll(+!r,n)}),dl(e,o,!1),fl[o]=hl,e},Ol=Xc,Ml=Sl,kl=Ai,Nl=un,Dl=fr,Pl=Bc,Ll=gn.PROPER,Vl=gn.CONFIGURABLE,xl=sl.IteratorPrototype,Ul=sl.BUGGY_SAFARI_ITERATORS,Fl=pt("iterator"),jl="keys",$l="values",ql="entries",Bl=function(){return this},Wl=function(e,t,n,r,o,i,a){wl(n,t,r);var s,u,c,l=function(e){if(e===o&&p)return p;if(!Ul&&e&&e in h)return h[e];switch(e){case jl:case $l:case ql:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,h=e.prototype,v=h[Fl]||h["@@iterator"]||o&&h[o],p=!Ul&&v||l(o),g="Array"===t&&h.entries||v;if(g&&(s=Ol(g.call(new e)))!==Object.prototype&&s.next&&(Ol(s)!==xl&&(Ml?Ml(s,xl):bl(s[Fl])||Dl(s,Fl,Bl)),kl(s,d,!0)),Ll&&o===$l&&v&&v.name!==$l&&(Vl?Nl(h,"name",$l):(f=!0,p=function(){return Il(v,this)})),o)if(u={values:l($l),keys:i?p:l(jl),entries:l(ql)},a)for(c in u)(Ul||f||!(c in h))&&Dl(h,c,u[c]);else Al({target:t,proto:!0,forced:Ul||f},u);return h[Fl]!==p&&Dl(h,Fl,p,{name:o}),Pl[t]=p,u},Jl=function(e,t){return{value:e,done:t}},Ql=z,Hl=Tc,Yl=Bc,Gl=Wn,Kl=qt.f,zl=Wl,Xl=Jl,Zl=R,ed="Array Iterator",td=Gl.set,nd=Gl.getterFor(ed),rd=zl(Array,"Array",(function(e,t){td(this,{type:ed,target:Ql(e),index:0,kind:t})}),(function(){var e=nd(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Xl(void 0,!0);switch(e.kind){case"keys":return Xl(n,!1);case"values":return Xl(t[n],!1)}return Xl([n,t[n]],!1)}),"values"),od=Yl.Arguments=Yl.Array;if(Hl("keys"),Hl("values"),Hl("entries"),Zl&&"values"!==od.name)try{Kl(od,"name",{value:"values"})}catch(UN){}var id=go,ad=W,sd=z,ud=_c,cd=L([].join);id({target:"Array",proto:!0,forced:ad!==Object||!ud("join",",")},{join:function(e){return cd(sd(this),void 0===e?",":e)}});var ld=Us,dd=z,fd=mr,hd=Ir,vd=_c,pd=Math.min,gd=[].lastIndexOf,md=!!gd&&1/[1].lastIndexOf(1,-0)<0,yd=vd("lastIndexOf"),Rd=md||!yd?function(e){if(md)return ld(gd,this,arguments)||0;var t=dd(this),n=hd(t);if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=pd(r,fd(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:gd;go({target:"Array",proto:!0,forced:Rd!==[].lastIndexOf},{lastIndexOf:Rd});var Td=ua.map;go({target:"Array",proto:!0,forced:!Ju("map")},{map:function(e){return Td(this,e,arguments.length>1?arguments[1]:void 0)}});var Ed=go,Cd=Pi,_d=Hi,Sd=te,Ad=Er,Id=Ir,bd=z,wd=$u,Od=pt,Md=ni,kd=Ju("slice"),Nd=Od("species"),Dd=Array,Pd=Math.max;Ed({target:"Array",proto:!0,forced:!kd},{slice:function(e,t){var n,r,o,i=bd(this),a=Id(i),s=Ad(e,a),u=Ad(void 0===t?a:t,a);if(Cd(i)&&(n=i.constructor,(_d(n)&&(n===Dd||Cd(n.prototype))||Sd(n)&&null===(n=n[Nd]))&&(n=void 0),n===Dd||void 0===n))return Md(i,s,u);for(r=new(void 0===n?Dd:n)(Pd(u-s,0)),o=0;s<u;s++,o++)s in i&&wd(r,o,i[s]);return r.length=o,r}});var Ld=R,Vd=Pi,xd=TypeError,Ud=Object.getOwnPropertyDescriptor,Fd=Ld&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(UN){return UN instanceof TypeError}}(),jd=go,$d=Xe,qd=Er,Bd=mr,Wd=Ir,Jd=Fd?function(e,t){if(Vd(e)&&!Ud(e,"length").writable)throw new xd("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Qd=xu,Hd=ea,Yd=$u,Gd=uc,Kd=Ju("splice"),zd=Math.max,Xd=Math.min;jd({target:"Array",proto:!0,forced:!Kd},{splice:function(e,t){var n,r,o,i,a,s,u=$d(this),c=Wd(u),l=qd(e,c),d=arguments.length;for(0===d?n=r=0:1===d?(n=0,r=c-l):(n=d-2,r=Xd(zd(Bd(t),0),c-l)),Qd(c+n-r),o=Hd(u,r),i=0;i<r;i++)(a=l+i)in u&&Yd(o,i,u[a]);if(o.length=r,n<r){for(i=l;i<c-r;i++)s=i+n,(a=i+r)in u?u[s]=u[a]:Gd(u,s);for(i=c;i>c-r+n;i--)Gd(u,i-1)}else if(n>r)for(i=c-r;i>l;i--)s=i+n-1,(a=i+r-1)in u?u[s]=u[a]:Gd(u,s);for(i=0;i<n;i++)u[i+l]=arguments[i+2];return Jd(u,c-r+n),o}});var Zd="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,ef=fr,tf=function(e,t,n){for(var r in t)ef(e,r,t[r],n);return e},nf=ie,rf=TypeError,of=function(e,t){if(nf(t,e))return e;throw new rf("Incorrect invocation")},af=mr,sf=Sr,uf=RangeError,cf=function(e){if(void 0===e)return 0;var t=af(e),n=sf(t);if(t!==n)throw new uf("Wrong length or index");return n},lf=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1},df=4503599627370496,ff=lf,hf=function(e){return e+df-df},vf=Math.abs,pf=function(e,t,n,r){var o=+e,i=vf(o),a=ff(o);if(i<r)return a*hf(i/r/t)*r*t;var s=(1+t/2220446049250313e-31)*i,u=s-(s-i);return u>n||u!=u?Infinity*a:a*u},gf=Math.fround||function(e){return pf(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)},mf=Array,yf=Math.abs,Rf=Math.pow,Tf=Math.floor,Ef=Math.log,Cf=Math.LN2,_f={pack:function(e,t,n){var r,o,i,a=mf(n),s=8*n-t-1,u=(1<<s)-1,c=u>>1,l=23===t?Rf(2,-24)-Rf(2,-77):0,d=e<0||0===e&&1/e<0?1:0,f=0;for((e=yf(e))!=e||Infinity===e?(o=e!=e?1:0,r=u):(r=Tf(Ef(e)/Cf),e*(i=Rf(2,-r))<1&&(r--,i*=2),(e+=r+c>=1?l/i:l*Rf(2,1-c))*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(e*i-1)*Rf(2,t),r+=c):(o=e*Rf(2,c-1)*Rf(2,t),r=0));t>=8;)a[f++]=255&o,o/=256,t-=8;for(r=r<<t|o,s+=t;s>0;)a[f++]=255&r,r/=256,s-=8;return a[f-1]|=128*d,a},unpack:function(e,t){var n,r=e.length,o=8*r-t-1,i=(1<<o)-1,a=i>>1,s=o-7,u=r-1,c=e[u--],l=127&c;for(c>>=7;s>0;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===i)return n?NaN:c?-Infinity:Infinity;n+=Rf(2,t),l-=a}return(c?-1:1)*n*Rf(2,l-t)}},Sf=Xe,Af=Er,If=Ir,bf=function(e){for(var t=Sf(this),n=If(t),r=arguments.length,o=Af(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:Af(i,n);a>o;)t[o++]=e;return t},wf=Z,Of=te,Mf=Sl,kf=function(e,t,n){var r,o;return Mf&&wf(r=t.constructor)&&r!==n&&Of(o=r.prototype)&&o!==n.prototype&&Mf(e,o),e},Nf=g,Df=L,Pf=R,Lf=Zd,Vf=un,xf=li,Uf=tf,Ff=y,jf=of,$f=mr,qf=Sr,Bf=cf,Wf=gf,Jf=_f,Qf=Xc,Hf=Sl,Yf=bf,Gf=ni,Kf=kf,zf=Xr,Xf=Ai,Zf=Wn,eh=gn.PROPER,th=gn.CONFIGURABLE,nh="ArrayBuffer",rh="DataView",oh="prototype",ih="Wrong index",ah=Zf.getterFor(nh),sh=Zf.getterFor(rh),uh=Zf.set,ch=Nf[nh],lh=ch,dh=lh&&lh[oh],fh=Nf[rh],hh=fh&&fh[oh],vh=Object.prototype,ph=Nf.Array,gh=Nf.RangeError,mh=Df(Yf),yh=Df([].reverse),Rh=Jf.pack,Th=Jf.unpack,Eh=function(e){return[255&e]},Ch=function(e){return[255&e,e>>8&255]},_h=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Sh=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ah=function(e){return Rh(Wf(e),23,4)},Ih=function(e){return Rh(e,52,8)},bh=function(e,t,n){xf(e[oh],t,{configurable:!0,get:function(){return n(this)[t]}})},wh=function(e,t,n,r){var o=sh(e),i=Bf(n),a=!!r;if(i+t>o.byteLength)throw new gh(ih);var s=o.bytes,u=i+o.byteOffset,c=Gf(s,u,u+t);return a?c:yh(c)},Oh=function(e,t,n,r,o,i){var a=sh(e),s=Bf(n),u=r(+o),c=!!i;if(s+t>a.byteLength)throw new gh(ih);for(var l=a.bytes,d=s+a.byteOffset,f=0;f<t;f++)l[d+f]=u[c?f:t-f-1]};if(Lf){var Mh=eh&&ch.name!==nh;Ff((function(){ch(1)}))&&Ff((function(){new ch(-1)}))&&!Ff((function(){return new ch,new ch(1.5),new ch(NaN),1!==ch.length||Mh&&!th}))?Mh&&th&&Vf(ch,"name",nh):((lh=function(e){return jf(this,dh),Kf(new ch(Bf(e)),this,lh)})[oh]=dh,dh.constructor=lh,zf(lh,ch)),Hf&&Qf(hh)!==vh&&Hf(hh,vh);var kh=new fh(new lh(2)),Nh=Df(hh.setInt8);kh.setInt8(0,2147483648),kh.setInt8(1,2147483649),!kh.getInt8(0)&&kh.getInt8(1)||Uf(hh,{setInt8:function(e,t){Nh(this,e,t<<24>>24)},setUint8:function(e,t){Nh(this,e,t<<24>>24)}},{unsafe:!0})}else dh=(lh=function(e){jf(this,dh);var t=Bf(e);uh(this,{type:nh,bytes:mh(ph(t),0),byteLength:t}),Pf||(this.byteLength=t,this.detached=!1)})[oh],hh=(fh=function(e,t,n){jf(this,hh),jf(e,dh);var r=ah(e),o=r.byteLength,i=$f(t);if(i<0||i>o)throw new gh("Wrong offset");if(i+(n=void 0===n?o-i:qf(n))>o)throw new gh("Wrong length");uh(this,{type:rh,buffer:e,byteLength:n,byteOffset:i,bytes:r.bytes}),Pf||(this.buffer=e,this.byteLength=n,this.byteOffset=i)})[oh],Pf&&(bh(lh,"byteLength",ah),bh(fh,"buffer",sh),bh(fh,"byteLength",sh),bh(fh,"byteOffset",sh)),Uf(hh,{getInt8:function(e){return wh(this,1,e)[0]<<24>>24},getUint8:function(e){return wh(this,1,e)[0]},getInt16:function(e){var t=wh(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=wh(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return Sh(wh(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return Sh(wh(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return Th(wh(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return Th(wh(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){Oh(this,1,e,Eh,t)},setUint8:function(e,t){Oh(this,1,e,Eh,t)},setInt16:function(e,t){Oh(this,2,e,Ch,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){Oh(this,2,e,Ch,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){Oh(this,4,e,_h,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){Oh(this,4,e,_h,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){Oh(this,4,e,Ah,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){Oh(this,8,e,Ih,t,arguments.length>2&&arguments[2])}});Xf(lh,nh),Xf(fh,rh);var Dh={ArrayBuffer:lh,DataView:fh},Ph=oe,Lh=li,Vh=R,xh=pt("species"),Uh=function(e){var t=Ph(e);Vh&&t&&!t[xh]&&Lh(t,xh,{configurable:!0,get:function(){return this}})},Fh=Uh,jh="ArrayBuffer",$h=Dh[jh];go({global:!0,constructor:!0,forced:g[jh]!==$h},{ArrayBuffer:$h}),Fh(jh);var qh=go,Bh=wi,Wh=y,Jh=Ht,Qh=Er,Hh=Sr,Yh=Dh.ArrayBuffer,Gh=Dh.DataView,Kh=Gh.prototype,zh=Bh(Yh.prototype.slice),Xh=Bh(Kh.getUint8),Zh=Bh(Kh.setUint8);qh({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:Wh((function(){return!new Yh(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(zh&&void 0===t)return zh(Jh(this),e);for(var n=Jh(this).byteLength,r=Qh(e,n),o=Qh(void 0===t?n:t,n),i=new Yh(Hh(o-r)),a=new Gh(this),s=new Gh(i),u=0;r<o;)Zh(s,u++,Xh(a,r++));return i}}),go({global:!0,constructor:!0,forced:!Zd},{DataView:Dh.DataView});var ev=go,tv=Date,nv=L(tv.prototype.getTime);ev({target:"Date",stat:!0},{now:function(){return nv(new tv)}});var rv=Xe,ov=_t;go({target:"Date",proto:!0,arity:1,forced:y((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=rv(this),n=ov(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}});var iv=L,av=fr,sv=Date.prototype,uv="Invalid Date",cv="toString",lv=iv(sv[cv]),dv=iv(sv.getTime);String(new Date(NaN))!==uv&&av(sv,cv,(function(){var e=dv(this);return e==e?lv(this):uv}));var fv=L,hv=ke,vv=te,pv=tt,gv=ni,mv=T,yv=Function,Rv=fv([].concat),Tv=fv([].join),Ev={},Cv=mv?yv.bind:function(e){var t=hv(this),n=t.prototype,r=gv(arguments,1),o=function(){var n=Rv(r,gv(arguments));return this instanceof o?function(e,t,n){if(!pv(Ev,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";Ev[t]=yv("C,a","return new C("+Tv(r,",")+")")}return Ev[t](e,n)}(t,n.length,n):t.apply(e,n)};return vv(n)&&(o.prototype=n),o},_v=Cv;go({target:"Function",proto:!0,forced:Function.bind!==_v},{bind:_v});var Sv=R,Av=gn.EXISTS,Iv=L,bv=li,wv=Function.prototype,Ov=Iv(wv.toString),Mv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,kv=Iv(Mv.exec);Sv&&!Av&&bv(wv,"name",{configurable:!0,get:function(){try{return kv(Mv,Ov(this))[1]}catch(UN){return""}}});var Nv={},Dv={get exports(){return Nv},set exports(e){Nv=e}},Pv=y((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Lv=y,Vv=te,xv=F,Uv=Pv,Fv=Object.isExtensible,jv=Lv((function(){Fv(1)}))||Uv?function(e){return!!Vv(e)&&((!Uv||"ArrayBuffer"!==xv(e))&&(!Fv||Fv(e)))}:Fv,$v=!y((function(){return Object.isExtensible(Object.preventExtensions({}))})),qv=go,Bv=L,Wv=Mn,Jv=te,Qv=tt,Hv=qt.f,Yv=hr,Gv=ti,Kv=jv,zv=$v,Xv=!1,Zv=at("meta"),ep=0,tp=function(e){Hv(e,Zv,{value:{objectID:"O"+ep++,weakData:{}}})},np=Dv.exports={enable:function(){np.enable=function(){},Xv=!0;var e=Yv.f,t=Bv([].splice),n={};n[Zv]=1,e(n).length&&(Yv.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===Zv){t(r,o,1);break}return r},qv({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Gv.f}))},fastKey:function(e,t){if(!Jv(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Qv(e,Zv)){if(!Kv(e))return"F";if(!t)return"E";tp(e)}return e[Zv].objectID},getWeakData:function(e,t){if(!Qv(e,Zv)){if(!Kv(e))return!0;if(!t)return!1;tp(e)}return e[Zv].weakData},onFreeze:function(e){return zv&&Xv&&Kv(e)&&!Qv(e,Zv)&&tp(e),e}};Wv[Zv]=!0;var rp=Bc,op=pt("iterator"),ip=Array.prototype,ap=function(e){return void 0!==e&&(rp.Array===e||ip[op]===e)},sp=Ao,up=Pe,cp=J,lp=Bc,dp=pt("iterator"),fp=function(e){if(!cp(e))return up(e,dp)||up(e,"@@iterator")||lp[sp(e)]},hp=_,vp=ke,pp=Ht,gp=be,mp=fp,yp=TypeError,Rp=function(e,t){var n=arguments.length<2?mp(e):t;if(vp(n))return pp(hp(n,e));throw new yp(gp(e)+" is not iterable")},Tp=_,Ep=Ht,Cp=Pe,_p=Ni,Sp=_,Ap=Ht,Ip=be,bp=ap,wp=Ir,Op=ie,Mp=Rp,kp=fp,Np=function(e,t,n){var r,o;Ep(e);try{if(!(r=Cp(e,"return"))){if("throw"===t)throw n;return n}r=Tp(r,e)}catch(UN){o=!0,r=UN}if("throw"===t)throw n;if(o)throw r;return Ep(r),n},Dp=TypeError,Pp=function(e,t){this.stopped=e,this.result=t},Lp=Pp.prototype,Vp=function(e,t,n){var r,o,i,a,s,u,c,l=n&&n.that,d=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),p=_p(t,l),g=function(e){return r&&Np(r,"normal",e),new Pp(!0,e)},m=function(e){return d?(Ap(e),v?p(e[0],e[1],g):p(e[0],e[1])):v?p(e,g):p(e)};if(f)r=e.iterator;else if(h)r=e;else{if(!(o=kp(e)))throw new Dp(Ip(e)+" is not iterable");if(bp(o)){for(i=0,a=wp(e);a>i;i++)if((s=m(e[i]))&&Op(Lp,s))return s;return new Pp(!1)}r=Mp(e,o)}for(u=f?e.next:r.next;!(c=Sp(u,r)).done;){try{s=m(c.value)}catch(UN){Np(r,"throw",UN)}if("object"==typeof s&&s&&Op(Lp,s))return s}return new Pp(!1)},xp=pt("iterator"),Up=!1;try{var Fp=0,jp={next:function(){return{done:!!Fp++}},return:function(){Up=!0}};jp[xp]=function(){return this},Array.from(jp,(function(){throw 2}))}catch(UN){}var $p=function(e,t){try{if(!t&&!Up)return!1}catch(UN){return!1}var n=!1;try{var r={};r[xp]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(UN){}return n},qp=go,Bp=g,Wp=L,Jp=so,Qp=fr,Hp=Nv,Yp=Vp,Gp=of,Kp=Z,zp=J,Xp=te,Zp=y,eg=$p,tg=Ai,ng=kf,rg=function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",a=Bp[e],s=a&&a.prototype,u=a,c={},l=function(e){var t=Wp(s[e]);Qp(s,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(o&&!Xp(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return o&&!Xp(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(o&&!Xp(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(Jp(e,!Kp(a)||!(o||s.forEach&&!Zp((function(){(new a).entries().next()})))))u=n.getConstructor(t,e,r,i),Hp.enable();else if(Jp(e,!0)){var d=new u,f=d[i](o?{}:-0,1)!==d,h=Zp((function(){d.has(1)})),v=eg((function(e){new a(e)})),p=!o&&Zp((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));v||((u=t((function(e,t){Gp(e,s);var n=ng(new a,e,u);return zp(t)||Yp(t,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=s,s.constructor=u),(h||p)&&(l("delete"),l("has"),r&&l("get")),(p||f)&&l(i),o&&s.clear&&delete s.clear}return c[e]=u,qp({global:!0,constructor:!0,forced:u!==a},c),tg(u,e),o||n.setStrong(u,e,r),u},og=ei,ig=li,ag=tf,sg=Ni,ug=of,cg=J,lg=Vp,dg=Wl,fg=Jl,hg=Uh,vg=R,pg=Nv.fastKey,gg=Wn.set,mg=Wn.getterFor,yg={getConstructor:function(e,t,n,r){var o=e((function(e,o){ug(e,i),gg(e,{type:t,index:og(null),first:null,last:null,size:0}),vg||(e.size=0),cg(o)||lg(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=mg(t),s=function(e,t,n){var r,o,i=a(e),s=u(e,t);return s?s.value=n:(i.last=s={index:o=pg(t,!0),key:t,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=s),r&&(r.next=s),vg?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},u=function(e,t){var n,r=a(e),o=pg(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===t)return n};return ag(i,{clear:function(){for(var e=a(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=og(null),vg?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),vg?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=sg(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),ag(i,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),vg&&ig(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=mg(t),i=mg(r);dg(e,t,(function(e,t){gg(this,{type:r,target:e,state:o(e),kind:t,last:null})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?fg("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,fg(void 0,!0))}),n?"entries":"values",!n,!0),hg(t)}};rg("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),yg);var Rg=L(1..valueOf),Tg=Y,Eg=wo,Cg="\t\n\v\f\r \u2028\u2029\ufeff",_g=L("".replace),Sg=RegExp("^["+Cg+"]+"),Ag=RegExp("(^|[^"+Cg+"])["+Cg+"]+$"),Ig=function(e){return function(t){var n=Eg(Tg(t));return 1&e&&(n=_g(n,Sg,"")),2&e&&(n=_g(n,Ag,"$1")),n}},bg={start:Ig(1),end:Ig(2),trim:Ig(3)},wg=go,Og=R,Mg=g,kg=hi,Ng=L,Dg=so,Pg=tt,Lg=kf,Vg=ie,xg=Ae,Ug=_t,Fg=y,jg=hr.f,$g=m.f,qg=qt.f,Bg=Rg,Wg=bg.trim,Jg="Number",Qg=Mg[Jg];kg[Jg];var Hg=Qg.prototype,Yg=Mg.TypeError,Gg=Ng("".slice),Kg=Ng("".charCodeAt),zg=function(e){var t,n,r,o,i,a,s,u,c=Ug(e,"number");if(xg(c))throw new Yg("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=Wg(c),43===(t=Kg(c,0))||45===t){if(88===(n=Kg(c,2))||120===n)return NaN}else if(48===t){switch(Kg(c,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+c}for(a=(i=Gg(c,2)).length,s=0;s<a;s++)if((u=Kg(i,s))<48||u>o)return NaN;return parseInt(i,r)}return+c},Xg=Dg(Jg,!Qg(" 0o1")||!Qg("0b1")||Qg("+0x1")),Zg=function(e){var t,n=arguments.length<1?0:Qg(function(e){var t=Ug(e,"number");return"bigint"==typeof t?t:zg(t)}(e));return Vg(Hg,t=this)&&Fg((function(){Bg(t)}))?Lg(Object(n),this,Zg):n};Zg.prototype=Hg,Xg&&(Hg.constructor=Zg),wg({global:!0,constructor:!0,wrap:!0,forced:Xg},{Number:Zg});Xg&&function(e,t){for(var n,r=Og?jg(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;r.length>o;o++)Pg(t,n=r[o])&&!Pg(e,n)&&qg(e,n,$g(t,n))}(kg[Jg],Qg);var em=R,tm=L,nm=_,rm=y,om=No,im=$r,am=S,sm=Xe,um=W,cm=Object.assign,lm=Object.defineProperty,dm=tm([].concat),fm=!cm||rm((function(){if(em&&1!==cm({b:1},cm(lm({},"a",{enumerable:!0,get:function(){lm(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!==cm({},e)[n]||om(cm({},t)).join("")!==r}))?function(e,t){for(var n=sm(e),r=arguments.length,o=1,i=im.f,a=am.f;r>o;)for(var s,u=um(arguments[o++]),c=i?dm(om(u),i(u)):om(u),l=c.length,d=0;l>d;)s=c[d++],em&&!nm(a,u,s)||(n[s]=u[s]);return n}:cm,hm=fm;go({target:"Object",stat:!0,arity:2,forced:Object.assign!==hm},{assign:hm}),go({target:"Object",stat:!0,sham:!R},{create:ei});var vm=Xe,pm=Xc,gm=Wc;go({target:"Object",stat:!0,forced:y((function(){pm(1)})),sham:!gm},{getPrototypeOf:function(e){return pm(vm(e))}});var mm=Xe,ym=No;go({target:"Object",stat:!0,forced:y((function(){ym(1)}))},{keys:function(e){return ym(mm(e))}});var Rm=Ao,Tm=yo?{}.toString:function(){return"[object "+Rm(this)+"]"};yo||fr(Object.prototype,"toString",Tm,{unsafe:!0});var Em,Cm,_m,Sm,Am=g,Im=ue,bm=F,wm=function(e){return Im.slice(0,e.length)===e},Om=wm("Bun/")?"BUN":wm("Cloudflare-Workers")?"CLOUDFLARE":wm("Deno/")?"DENO":wm("Node.js/")?"NODE":Am.Bun&&"string"==typeof Bun.version?"BUN":Am.Deno&&"object"==typeof Deno.version?"DENO":"process"===bm(Am.process)?"NODE":Am.window&&Am.document?"BROWSER":"REST",Mm="NODE"===Om,km=Hi,Nm=be,Dm=TypeError,Pm=function(e){if(km(e))return e;throw new Dm(Nm(e)+" is not a constructor")},Lm=Ht,Vm=Pm,xm=J,Um=pt("species"),Fm=TypeError,jm=function(e,t){if(e<t)throw new Fm("Not enough arguments");return e},$m=/(?:ipad|iphone|ipod).*applewebkit/i.test(ue),qm=g,Bm=Us,Wm=Ni,Jm=Z,Qm=tt,Hm=y,Ym=jo,Gm=ni,Km=Mt,zm=jm,Xm=$m,Zm=Mm,ey=qm.setImmediate,ty=qm.clearImmediate,ny=qm.process,ry=qm.Dispatch,oy=qm.Function,iy=qm.MessageChannel,ay=qm.String,sy=0,uy={},cy="onreadystatechange";Hm((function(){Em=qm.location}));var ly=function(e){if(Qm(uy,e)){var t=uy[e];delete uy[e],t()}},dy=function(e){return function(){ly(e)}},fy=function(e){ly(e.data)},hy=function(e){qm.postMessage(ay(e),Em.protocol+"//"+Em.host)};ey&&ty||(ey=function(e){zm(arguments.length,1);var t=Jm(e)?e:oy(e),n=Gm(arguments,1);return uy[++sy]=function(){Bm(t,void 0,n)},Cm(sy),sy},ty=function(e){delete uy[e]},Zm?Cm=function(e){ny.nextTick(dy(e))}:ry&&ry.now?Cm=function(e){ry.now(dy(e))}:iy&&!Xm?(Sm=(_m=new iy).port2,_m.port1.onmessage=fy,Cm=Wm(Sm.postMessage,Sm)):qm.addEventListener&&Jm(qm.postMessage)&&!qm.importScripts&&Em&&"file:"!==Em.protocol&&!Hm(hy)?(Cm=hy,qm.addEventListener("message",fy,!1)):Cm=cy in Km("script")?function(e){Ym.appendChild(Km("script"))[cy]=function(){Ym.removeChild(this),ly(e)}}:function(e){setTimeout(dy(e),0)});var vy={set:ey,clear:ty},py=g,gy=R,my=Object.getOwnPropertyDescriptor,yy=function(){this.head=null,this.tail=null};yy.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Ry,Ty,Ey,Cy,_y,Sy=yy,Ay=/ipad|iphone|ipod/i.test(ue)&&"undefined"!=typeof Pebble,Iy=/web0s(?!.*chrome)/i.test(ue),by=g,wy=function(e){if(!gy)return py[e];var t=my(py,e);return t&&t.value},Oy=Ni,My=vy.set,ky=Sy,Ny=$m,Dy=Ay,Py=Iy,Ly=Mm,Vy=by.MutationObserver||by.WebKitMutationObserver,xy=by.document,Uy=by.process,Fy=by.Promise,jy=wy("queueMicrotask");if(!jy){var $y=new ky,qy=function(){var e,t;for(Ly&&(e=Uy.domain)&&e.exit();t=$y.get();)try{t()}catch(UN){throw $y.head&&Ry(),UN}e&&e.enter()};Ny||Ly||Py||!Vy||!xy?!Dy&&Fy&&Fy.resolve?((Cy=Fy.resolve(void 0)).constructor=Fy,_y=Oy(Cy.then,Cy),Ry=function(){_y(qy)}):Ly?Ry=function(){Uy.nextTick(qy)}:(My=Oy(My,by),Ry=function(){My(qy)}):(Ty=!0,Ey=xy.createTextNode(""),new Vy(qy).observe(Ey,{characterData:!0}),Ry=function(){Ey.data=Ty=!Ty}),jy=function(e){$y.head||Ry(),$y.add(e)}}var By=jy,Wy=function(e){try{return{error:!1,value:e()}}catch(UN){return{error:!0,value:UN}}},Jy=g.Promise,Qy=g,Hy=Jy,Yy=Z,Gy=so,Ky=_n,zy=pt,Xy=Om,Zy=pe;Hy&&Hy.prototype;var eR=zy("species"),tR=!1,nR=Yy(Qy.PromiseRejectionEvent),rR=Gy("Promise",(function(){var e=Ky(Hy),t=e!==String(Hy);if(!t&&66===Zy)return!0;if(!Zy||Zy<51||!/native code/.test(e)){var n=new Hy((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[eR]=r,!(tR=n.then((function(){}))instanceof r))return!0}return!(t||"BROWSER"!==Xy&&"DENO"!==Xy||nR)})),oR={CONSTRUCTOR:rR,REJECTION_EVENT:nR,SUBCLASSING:tR},iR={},aR=ke,sR=TypeError,uR=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new sR("Bad Promise constructor");t=e,n=r})),this.resolve=aR(t),this.reject=aR(n)};iR.f=function(e){return new uR(e)};var cR,lR,dR,fR=go,hR=Mm,vR=g,pR=_,gR=fr,mR=Sl,yR=Ai,RR=Uh,TR=ke,ER=Z,CR=te,_R=of,SR=function(e,t){var n,r=Lm(e).constructor;return void 0===r||xm(n=Lm(r)[Um])?t:Vm(n)},AR=vy.set,IR=By,bR=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(UN){}},wR=Wy,OR=Sy,MR=Wn,kR=Jy,NR=iR,DR="Promise",PR=oR.CONSTRUCTOR,LR=oR.REJECTION_EVENT,VR=oR.SUBCLASSING,xR=MR.getterFor(DR),UR=MR.set,FR=kR&&kR.prototype,jR=kR,$R=FR,qR=vR.TypeError,BR=vR.document,WR=vR.process,JR=NR.f,QR=JR,HR=!!(BR&&BR.createEvent&&vR.dispatchEvent),YR="unhandledrejection",GR=function(e){var t;return!(!CR(e)||!ER(t=e.then))&&t},KR=function(e,t){var n,r,o,i=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&tT(t),t.rejection=1),!0===s?n=i:(l&&l.enter(),n=s(i),l&&(l.exit(),o=!0)),n===e.promise?c(new qR("Promise-chain cycle")):(r=GR(n))?pR(r,n,u,c):u(n)):c(i)}catch(UN){l&&!o&&l.exit(),c(UN)}},zR=function(e,t){e.notified||(e.notified=!0,IR((function(){for(var n,r=e.reactions;n=r.get();)KR(n,e);e.notified=!1,t&&!e.rejection&&ZR(e)})))},XR=function(e,t,n){var r,o;HR?((r=BR.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),vR.dispatchEvent(r)):r={promise:t,reason:n},!LR&&(o=vR["on"+e])?o(r):e===YR&&bR("Unhandled promise rejection",n)},ZR=function(e){pR(AR,vR,(function(){var t,n=e.facade,r=e.value;if(eT(e)&&(t=wR((function(){hR?WR.emit("unhandledRejection",r,n):XR(YR,n,r)})),e.rejection=hR||eT(e)?2:1,t.error))throw t.value}))},eT=function(e){return 1!==e.rejection&&!e.parent},tT=function(e){pR(AR,vR,(function(){var t=e.facade;hR?WR.emit("rejectionHandled",t):XR("rejectionhandled",t,e.value)}))},nT=function(e,t,n){return function(r){e(t,r,n)}},rT=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,zR(e,!0))},oT=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new qR("Promise can't be resolved itself");var r=GR(t);r?IR((function(){var n={done:!1};try{pR(r,t,nT(oT,n,e),nT(rT,n,e))}catch(UN){rT(n,UN,e)}})):(e.value=t,e.state=1,zR(e,!1))}catch(UN){rT({done:!1},UN,e)}}};if(PR&&($R=(jR=function(e){_R(this,$R),TR(e),pR(cR,this);var t=xR(this);try{e(nT(oT,t),nT(rT,t))}catch(UN){rT(t,UN)}}).prototype,(cR=function(e){UR(this,{type:DR,done:!1,notified:!1,parent:!1,reactions:new OR,rejection:!1,state:0,value:null})}).prototype=gR($R,"then",(function(e,t){var n=xR(this),r=JR(SR(this,jR));return n.parent=!0,r.ok=!ER(e)||e,r.fail=ER(t)&&t,r.domain=hR?WR.domain:void 0,0===n.state?n.reactions.add(r):IR((function(){KR(r,n)})),r.promise})),lR=function(){var e=new cR,t=xR(e);this.promise=e,this.resolve=nT(oT,t),this.reject=nT(rT,t)},NR.f=JR=function(e){return e===jR||undefined===e?new lR(e):QR(e)},ER(kR)&&FR!==Object.prototype)){dR=FR.then,VR||gR(FR,"then",(function(e,t){var n=this;return new jR((function(e,t){pR(dR,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete FR.constructor}catch(UN){}mR&&mR(FR,$R)}fR({global:!0,constructor:!0,wrap:!0,forced:PR},{Promise:jR}),yR(jR,DR,!1),RR(DR);var iT=Jy,aT=oR.CONSTRUCTOR||!$p((function(e){iT.all(e).then(void 0,(function(){}))})),sT=_,uT=ke,cT=iR,lT=Wy,dT=Vp;go({target:"Promise",stat:!0,forced:aT},{all:function(e){var t=this,n=cT.f(t),r=n.resolve,o=n.reject,i=lT((function(){var n=uT(t.resolve),i=[],a=0,s=1;dT(e,(function(e){var u=a++,c=!1;s++,sT(n,t,e).then((function(e){c||(c=!0,i[u]=e,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise}});var fT=go,hT=oR.CONSTRUCTOR,vT=Jy,pT=oe,gT=Z,mT=fr,yT=vT&&vT.prototype;if(fT({target:"Promise",proto:!0,forced:hT,real:!0},{catch:function(e){return this.then(void 0,e)}}),gT(vT)){var RT=pT("Promise").prototype.catch;yT.catch!==RT&&mT(yT,"catch",RT,{unsafe:!0})}var TT=_,ET=ke,CT=iR,_T=Wy,ST=Vp;go({target:"Promise",stat:!0,forced:aT},{race:function(e){var t=this,n=CT.f(t),r=n.reject,o=_T((function(){var o=ET(t.resolve);ST(e,(function(e){TT(o,t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var AT=iR;go({target:"Promise",stat:!0,forced:oR.CONSTRUCTOR},{reject:function(e){var t=AT.f(this);return(0,t.reject)(e),t.promise}});var IT=Ht,bT=te,wT=iR,OT=go,MT=oR.CONSTRUCTOR,kT=function(e,t){if(IT(e),bT(t)&&t.constructor===e)return t;var n=wT.f(e);return(0,n.resolve)(t),n.promise};oe("Promise"),OT({target:"Promise",stat:!0,forced:MT},{resolve:function(e){return kT(this,e)}});var NT=te,DT=F,PT=pt("match"),LT=function(e){var t;return NT(e)&&(void 0!==(t=e[PT])?!!t:"RegExp"===DT(e))},VT=Ht,xT=function(){var e=VT(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},UT=_,FT=tt,jT=ie,$T=xT,qT=RegExp.prototype,BT=function(e){var t=e.flags;return void 0!==t||"flags"in qT||FT(e,"flags")||!jT(qT,e)?t:UT($T,e)},WT=y,JT=g.RegExp,QT=WT((function(){var e=JT("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),HT=QT||WT((function(){return!JT("a","y").sticky})),YT={BROKEN_CARET:QT||WT((function(){var e=JT("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:HT,UNSUPPORTED_Y:QT},GT=qt.f,KT=y,zT=g.RegExp,XT=KT((function(){var e=zT(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),ZT=y,eE=g.RegExp,tE=ZT((function(){var e=eE("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),nE=R,rE=g,oE=L,iE=so,aE=kf,sE=un,uE=ei,cE=hr.f,lE=ie,dE=LT,fE=wo,hE=BT,vE=YT,pE=function(e,t,n){n in e||GT(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},gE=fr,mE=y,yE=tt,RE=Wn.enforce,TE=Uh,EE=XT,CE=tE,_E=pt("match"),SE=rE.RegExp,AE=SE.prototype,IE=rE.SyntaxError,bE=oE(AE.exec),wE=oE("".charAt),OE=oE("".replace),ME=oE("".indexOf),kE=oE("".slice),NE=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,DE=/a/g,PE=/a/g,LE=new SE(DE)!==DE,VE=vE.MISSED_STICKY,xE=vE.UNSUPPORTED_Y,UE=nE&&(!LE||VE||EE||CE||mE((function(){return PE[_E]=!1,SE(DE)!==DE||SE(PE)===PE||"/a/i"!==String(SE(DE,"i"))})));if(iE("RegExp",UE)){for(var FE=function(e,t){var n,r,o,i,a,s,u=lE(AE,this),c=dE(e),l=void 0===t,d=[],f=e;if(!u&&c&&l&&e.constructor===FE)return e;if((c||lE(AE,e))&&(e=e.source,l&&(t=hE(f))),e=void 0===e?"":fE(e),t=void 0===t?"":fE(t),f=e,EE&&"dotAll"in DE&&(r=!!t&&ME(t,"s")>-1)&&(t=OE(t,/s/g,"")),n=t,VE&&"sticky"in DE&&(o=!!t&&ME(t,"y")>-1)&&xE&&(t=OE(t,/y/g,"")),CE&&(i=function(e){for(var t,n=e.length,r=0,o="",i=[],a=uE(null),s=!1,u=!1,c=0,l="";r<=n;r++){if("\\"===(t=wE(e,r)))t+=wE(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:if(o+=t,"?:"===kE(e,r+1,r+3))continue;bE(NE,kE(e,r+1))&&(r+=2,u=!0),c++;continue;case">"===t&&u:if(""===l||yE(a,l))throw new IE("Invalid capture group name");a[l]=!0,i[i.length]=[l,c],u=!1,l="";continue}u?l+=t:o+=t}return[o,i]}(e),e=i[0],d=i[1]),a=aE(SE(e,t),u?this:AE,FE),(r||o||d.length)&&(s=RE(a),r&&(s.dotAll=!0,s.raw=FE(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=wE(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+wE(e,++r);return o}(e),n)),o&&(s.sticky=!0),d.length&&(s.groups=d)),e!==f)try{sE(a,"source",""===f?"(?:)":f)}catch(UN){}return a},jE=cE(SE),$E=0;jE.length>$E;)pE(FE,SE,jE[$E++]);AE.constructor=FE,FE.prototype=AE,gE(rE,"RegExp",FE,{constructor:!0})}TE("RegExp");var qE=_,BE=L,WE=wo,JE=xT,QE=YT,HE=ei,YE=Wn.get,GE=XT,KE=tE,zE=Ge("native-string-replace",String.prototype.replace),XE=RegExp.prototype.exec,ZE=XE,eC=BE("".charAt),tC=BE("".indexOf),nC=BE("".replace),rC=BE("".slice),oC=function(){var e=/a/,t=/b*/g;return qE(XE,e,"a"),qE(XE,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),iC=QE.BROKEN_CARET,aC=void 0!==/()??/.exec("")[1];(oC||aC||iC||GE||KE)&&(ZE=function(e){var t,n,r,o,i,a,s,u=this,c=YE(u),l=WE(e),d=c.raw;if(d)return d.lastIndex=u.lastIndex,t=qE(ZE,d,l),u.lastIndex=d.lastIndex,t;var f=c.groups,h=iC&&u.sticky,v=qE(JE,u),p=u.source,g=0,m=l;if(h&&(v=nC(v,"y",""),-1===tC(v,"g")&&(v+="g"),m=rC(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==eC(l,u.lastIndex-1))&&(p="(?: "+p+")",m=" "+m,g++),n=new RegExp("^(?:"+p+")",v)),aC&&(n=new RegExp("^"+p+"$(?!\\s)",v)),oC&&(r=u.lastIndex),o=qE(XE,h?n:u,m),h?o?(o.input=rC(o.input,g),o[0]=rC(o[0],g),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:oC&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),aC&&o&&o.length>1&&qE(zE,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&f)for(o.groups=a=HE(null),i=0;i<f.length;i++)a[(s=f[i])[0]]=o[s[1]];return o});var sC=ZE;go({target:"RegExp",proto:!0,forced:/./.exec!==sC},{exec:sC});var uC=gn.PROPER,cC=fr,lC=Ht,dC=wo,fC=y,hC=BT,vC="toString",pC=RegExp.prototype,gC=pC[vC],mC=fC((function(){return"/a/b"!==gC.call({source:"a",flags:"b"})})),yC=uC&&gC.name!==vC;(mC||yC)&&cC(pC,vC,(function(){var e=lC(this);return"/"+dC(e.source)+"/"+dC(hC(e))}),{unsafe:!0});var RC,TC=LT,EC=TypeError,CC=function(e){if(TC(e))throw new EC("The method doesn't accept regular expressions");return e},_C=pt("match"),SC=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[_C]=!1,"/./"[e](t)}catch(r){}}return!1},AC=go,IC=wi,bC=m.f,wC=Sr,OC=wo,MC=CC,kC=Y,NC=SC,DC=IC("".slice),PC=Math.min,LC=NC("endsWith");AC({target:"String",proto:!0,forced:!!(LC||(RC=bC(String.prototype,"endsWith"),!RC||RC.writable))&&!LC},{endsWith:function(e){var t=OC(kC(this));MC(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:PC(wC(n),r),i=OC(e);return DC(t,o-i.length,o)===i}});var VC=go,xC=CC,UC=Y,FC=wo,jC=SC,$C=L("".indexOf);VC({target:"String",proto:!0,forced:!jC("includes")},{includes:function(e){return!!~$C(FC(UC(this)),FC(xC(e)),arguments.length>1?arguments[1]:void 0)}});var qC=L,BC=mr,WC=wo,JC=Y,QC=qC("".charAt),HC=qC("".charCodeAt),YC=qC("".slice),GC=function(e){return function(t,n){var r,o,i=WC(JC(t)),a=BC(n),s=i.length;return a<0||a>=s?e?"":void 0:(r=HC(i,a))<55296||r>56319||a+1===s||(o=HC(i,a+1))<56320||o>57343?e?QC(i,a):r:e?YC(i,a,a+2):o-56320+(r-55296<<10)+65536}},KC={codeAt:GC(!1),charAt:GC(!0)},zC=KC.charAt,XC=wo,ZC=Wn,e_=Wl,t_=Jl,n_="String Iterator",r_=ZC.set,o_=ZC.getterFor(n_);e_(String,"String",(function(e){r_(this,{type:n_,string:XC(e),index:0})}),(function(){var e,t=o_(this),n=t.string,r=t.index;return r>=n.length?t_(void 0,!0):(e=zC(n,r),t.index+=e.length,t_(e,!1))}));var i_=_,a_=fr,s_=sC,u_=y,c_=pt,l_=un,d_=c_("species"),f_=RegExp.prototype,h_=KC.charAt,v_=L,p_=Xe,g_=Math.floor,m_=v_("".charAt),y_=v_("".replace),R_=v_("".slice),T_=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,E_=/\$([$&'`]|\d{1,2})/g,C_=_,__=Ht,S_=Z,A_=F,I_=sC,b_=TypeError,w_=Us,O_=_,M_=L,k_=function(e,t,n,r){var o=c_(e),i=!u_((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!u_((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[d_]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||n){var s=/./[o],u=t(o,""[e],(function(e,t,n,r,o){var a=t.exec;return a===s_||a===f_.exec?i&&!o?{done:!0,value:i_(s,t,n,r)}:{done:!0,value:i_(e,n,t,r)}:{done:!1}}));a_(String.prototype,e,u[0]),a_(f_,o,u[1])}r&&l_(f_[o],"sham",!0)},N_=y,D_=Ht,P_=Z,L_=J,V_=mr,x_=Sr,U_=wo,F_=Y,j_=function(e,t,n){return t+(n?h_(e,t).length:1)},$_=Pe,q_=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,u=E_;return void 0!==o&&(o=p_(o),u=T_),y_(i,u,(function(i,u){var c;switch(m_(u,0)){case"$":return"$";case"&":return e;case"`":return R_(t,0,n);case"'":return R_(t,a);case"<":c=o[R_(u,1,-1)];break;default:var l=+u;if(0===l)return i;if(l>s){var d=g_(l/10);return 0===d?i:d<=s?void 0===r[d-1]?m_(u,1):r[d-1]+m_(u,1):i}c=r[l-1]}return void 0===c?"":c}))},B_=function(e,t){var n=e.exec;if(S_(n)){var r=C_(n,e,t);return null!==r&&__(r),r}if("RegExp"===A_(e))return C_(I_,e,t);throw new b_("RegExp#exec called on incompatible receiver")},W_=pt("replace"),J_=Math.max,Q_=Math.min,H_=M_([].concat),Y_=M_([].push),G_=M_("".indexOf),K_=M_("".slice),z_="$0"==="a".replace(/./,"$0"),X_=!!/./[W_]&&""===/./[W_]("a","$0");k_("replace",(function(e,t,n){var r=X_?"$":"$0";return[function(e,n){var r=F_(this),o=L_(e)?void 0:$_(e,W_);return o?O_(o,e,r,n):O_(t,U_(r),e,n)},function(e,o){var i=D_(this),a=U_(e);if("string"==typeof o&&-1===G_(o,r)&&-1===G_(o,"$<")){var s=n(t,i,a,o);if(s.done)return s.value}var u=P_(o);u||(o=U_(o));var c,l=i.global;l&&(c=i.unicode,i.lastIndex=0);for(var d,f=[];null!==(d=B_(i,a))&&(Y_(f,d),l);){""===U_(d[0])&&(i.lastIndex=j_(a,x_(i.lastIndex),c))}for(var h,v="",p=0,g=0;g<f.length;g++){for(var m,y=U_((d=f[g])[0]),R=J_(Q_(V_(d.index),a.length),0),T=[],E=1;E<d.length;E++)Y_(T,void 0===(h=d[E])?h:String(h));var C=d.groups;if(u){var _=H_([y],T,R,a);void 0!==C&&Y_(_,C),m=U_(w_(o,void 0,_))}else m=q_(y,a,R,T,C,o);R>=p&&(v+=K_(a,p,R)+m,p=R+y.length)}return v+K_(a,p)}]}),!!N_((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!z_||X_);var Z_=go,eS=wi,tS=m.f,nS=Sr,rS=wo,oS=CC,iS=Y,aS=SC,sS=eS("".slice),uS=Math.min,cS=aS("startsWith"),lS=!cS&&!!function(){var e=tS(String.prototype,"startsWith");return e&&!e.writable}();Z_({target:"String",proto:!0,forced:!lS&&!cS},{startsWith:function(e){var t=rS(iS(this));oS(e);var n=nS(uS(arguments.length>1?arguments[1]:void 0,t.length)),r=rS(e);return sS(t,n,n+r.length)===r}});var dS,fS,hS,vS={},pS={get exports(){return vS},set exports(e){vS=e}},gS=Zd,mS=R,yS=g,RS=Z,TS=te,ES=tt,CS=Ao,_S=be,SS=un,AS=fr,IS=li,bS=ie,wS=Xc,OS=Sl,MS=pt,kS=at,NS=Wn.enforce,DS=Wn.get,PS=yS.Int8Array,LS=PS&&PS.prototype,VS=yS.Uint8ClampedArray,xS=VS&&VS.prototype,US=PS&&wS(PS),FS=LS&&wS(LS),jS=Object.prototype,$S=yS.TypeError,qS=MS("toStringTag"),BS=kS("TYPED_ARRAY_TAG"),WS="TypedArrayConstructor",JS=gS&&!!OS&&"Opera"!==CS(yS.opera),QS=!1,HS={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},YS={BigInt64Array:8,BigUint64Array:8},GS=function(e){var t=wS(e);if(TS(t)){var n=DS(t);return n&&ES(n,WS)?n[WS]:GS(t)}},KS=function(e){if(!TS(e))return!1;var t=CS(e);return ES(HS,t)||ES(YS,t)};for(dS in HS)(hS=(fS=yS[dS])&&fS.prototype)?NS(hS)[WS]=fS:JS=!1;for(dS in YS)(hS=(fS=yS[dS])&&fS.prototype)&&(NS(hS)[WS]=fS);if((!JS||!RS(US)||US===Function.prototype)&&(US=function(){throw new $S("Incorrect invocation")},JS))for(dS in HS)yS[dS]&&OS(yS[dS],US);if((!JS||!FS||FS===jS)&&(FS=US.prototype,JS))for(dS in HS)yS[dS]&&OS(yS[dS].prototype,FS);if(JS&&wS(xS)!==FS&&OS(xS,FS),mS&&!ES(FS,qS))for(dS in QS=!0,IS(FS,qS,{configurable:!0,get:function(){return TS(this)?this[BS]:void 0}}),HS)yS[dS]&&SS(yS[dS],BS,dS);var zS={NATIVE_ARRAY_BUFFER_VIEWS:JS,TYPED_ARRAY_TAG:QS&&BS,aTypedArray:function(e){if(KS(e))return e;throw new $S("Target is not a typed array")},aTypedArrayConstructor:function(e){if(RS(e)&&(!OS||bS(US,e)))return e;throw new $S(_S(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(mS){if(n)for(var o in HS){var i=yS[o];if(i&&ES(i.prototype,e))try{delete i.prototype[e]}catch(UN){try{i.prototype[e]=t}catch(a){}}}FS[e]&&!n||AS(FS,e,n?t:JS&&LS[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(mS){if(OS){if(n)for(r in HS)if((o=yS[r])&&ES(o,e))try{delete o[e]}catch(UN){}if(US[e]&&!n)return;try{return AS(US,e,n?t:JS&&US[e]||t)}catch(UN){}}for(r in HS)!(o=yS[r])||o[e]&&!n||AS(o,e,t)}},getTypedArrayConstructor:GS,isView:function(e){if(!TS(e))return!1;var t=CS(e);return"DataView"===t||ES(HS,t)||ES(YS,t)},isTypedArray:KS,TypedArray:US,TypedArrayPrototype:FS},XS=g,ZS=y,eA=$p,tA=zS.NATIVE_ARRAY_BUFFER_VIEWS,nA=XS.ArrayBuffer,rA=XS.Int8Array,oA=!tA||!ZS((function(){rA(1)}))||!ZS((function(){new rA(-1)}))||!eA((function(e){new rA,new rA(null),new rA(1.5),new rA(e)}),!0)||ZS((function(){return 1!==new rA(new nA(2),1,void 0).length})),iA=te,aA=Math.floor,sA=Number.isInteger||function(e){return!iA(e)&&isFinite(e)&&aA(e)===e},uA=mr,cA=RangeError,lA=function(e){var t=uA(e);if(t<0)throw new cA("The argument can't be less than 0");return t},dA=RangeError,fA=function(e,t){var n=lA(e);if(n%t)throw new dA("Wrong offset");return n},hA=Math.round,vA=Ao,pA=_t,gA=TypeError,mA=function(e){var t=pA(e,"number");if("number"==typeof t)throw new gA("Can't convert number to bigint");return BigInt(t)},yA=Ni,RA=_,TA=Pm,EA=Xe,CA=Ir,_A=Rp,SA=fp,AA=ap,IA=function(e){var t=vA(e);return"BigInt64Array"===t||"BigUint64Array"===t},bA=zS.aTypedArrayConstructor,wA=mA,OA=Ir,MA=function(e,t,n){for(var r=0,o=arguments.length>2?n:OA(t),i=new e(o);o>r;)i[r]=t[r++];return i},kA=go,NA=g,DA=_,PA=R,LA=oA,VA=zS,xA=Dh,UA=of,FA=M,jA=un,$A=sA,qA=Sr,BA=cf,WA=fA,JA=function(e){var t=hA(e);return t<0?0:t>255?255:255&t},QA=It,HA=tt,YA=Ao,GA=te,KA=Ae,zA=ei,XA=ie,ZA=Sl,eI=hr.f,tI=function(e){var t,n,r,o,i,a,s,u,c=TA(this),l=EA(e),d=arguments.length,f=d>1?arguments[1]:void 0,h=void 0!==f,v=SA(l);if(v&&!AA(v))for(u=(s=_A(l,v)).next,l=[];!(a=RA(u,s)).done;)l.push(a.value);for(h&&d>2&&(f=yA(f,arguments[2])),n=CA(l),r=new(bA(c))(n),o=IA(r),t=0;n>t;t++)i=h?f(l[t],t):l[t],r[t]=o?wA(i):+i;return r},nI=ua.forEach,rI=Uh,oI=li,iI=qt,aI=m,sI=MA,uI=kf,cI=Wn.get,lI=Wn.set,dI=Wn.enforce,fI=iI.f,hI=aI.f,vI=NA.RangeError,pI=xA.ArrayBuffer,gI=pI.prototype,mI=xA.DataView,yI=VA.NATIVE_ARRAY_BUFFER_VIEWS,RI=VA.TYPED_ARRAY_TAG,TI=VA.TypedArray,EI=VA.TypedArrayPrototype,CI=VA.isTypedArray,_I="BYTES_PER_ELEMENT",SI="Wrong length",AI=function(e,t){oI(e,t,{configurable:!0,get:function(){return cI(this)[t]}})},II=function(e){var t;return XA(gI,e)||"ArrayBuffer"===(t=YA(e))||"SharedArrayBuffer"===t},bI=function(e,t){return CI(e)&&!KA(t)&&t in e&&$A(+t)&&t>=0},wI=function(e,t){return t=QA(t),bI(e,t)?FA(2,e[t]):hI(e,t)},OI=function(e,t,n){return t=QA(t),!(bI(e,t)&&GA(n)&&HA(n,"value"))||HA(n,"get")||HA(n,"set")||n.configurable||HA(n,"writable")&&!n.writable||HA(n,"enumerable")&&!n.enumerable?fI(e,t,n):(e[t]=n.value,e)};PA?(yI||(aI.f=wI,iI.f=OI,AI(EI,"buffer"),AI(EI,"byteOffset"),AI(EI,"byteLength"),AI(EI,"length")),kA({target:"Object",stat:!0,forced:!yI},{getOwnPropertyDescriptor:wI,defineProperty:OI}),pS.exports=function(e,t,n){var r=e.match(/\d+/)[0]/8,o=e+(n?"Clamped":"")+"Array",i="get"+e,a="set"+e,s=NA[o],u=s,c=u&&u.prototype,l={},d=function(e,t){fI(e,t,{get:function(){return function(e,t){var n=cI(e);return n.view[i](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var i=cI(e);i.view[a](t*r+i.byteOffset,n?JA(o):o,!0)}(this,t,e)},enumerable:!0})};yI?LA&&(u=t((function(e,t,n,o){return UA(e,c),uI(GA(t)?II(t)?void 0!==o?new s(t,WA(n,r),o):void 0!==n?new s(t,WA(n,r)):new s(t):CI(t)?sI(u,t):DA(tI,u,t):new s(BA(t)),e,u)})),ZA&&ZA(u,TI),nI(eI(s),(function(e){e in u||jA(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,n,o){UA(e,c);var i,a,s,l=0,f=0;if(GA(t)){if(!II(t))return CI(t)?sI(u,t):DA(tI,u,t);i=t,f=WA(n,r);var h=t.byteLength;if(void 0===o){if(h%r)throw new vI(SI);if((a=h-f)<0)throw new vI(SI)}else if((a=qA(o)*r)+f>h)throw new vI(SI);s=a/r}else s=BA(t),i=new pI(a=s*r);for(lI(e,{buffer:i,byteOffset:f,byteLength:a,length:s,view:new mI(i)});l<s;)d(e,l++)})),ZA&&ZA(u,TI),c=u.prototype=zA(EI)),c.constructor!==u&&jA(c,"constructor",u),dI(c).TypedArrayConstructor=u,RI&&jA(c,RI,o);var f=u!==s;l[o]=u,kA({global:!0,constructor:!0,forced:f,sham:!yI},l),_I in u||jA(u,_I,r),_I in c||jA(c,_I,r),rI(o)}):pS.exports=function(){},vS("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),vS("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}})),vS("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),vS("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),vS("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),vS("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),vS("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0),vS("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),vS("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var MI=zS,kI=L(vc),NI=MI.aTypedArray;(0,MI.exportTypedArrayMethod)("copyWithin",(function(e,t){return kI(NI(this),e,t,arguments.length>2?arguments[2]:void 0)}));var DI=ua.every,PI=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("every",(function(e){return DI(PI(this),e,arguments.length>1?arguments[1]:void 0)}));var LI=bf,VI=mA,xI=Ao,UI=_,FI=y,jI=zS.aTypedArray,$I=zS.exportTypedArrayMethod,qI=L("".slice);$I("fill",(function(e){var t=arguments.length;jI(this);var n="Big"===qI(xI(this),0,3)?VI(e):+e;return UI(LI,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),FI((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var BI=MA,WI=zS.getTypedArrayConstructor,JI=ua.filter,QI=function(e,t){return BI(WI(e),t)},HI=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("filter",(function(e){var t=JI(HI(this),e,arguments.length>1?arguments[1]:void 0);return QI(this,t)}));var YI=ua.find,GI=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("find",(function(e){return YI(GI(this),e,arguments.length>1?arguments[1]:void 0)}));var KI=ua.findIndex,zI=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("findIndex",(function(e){return KI(zI(this),e,arguments.length>1?arguments[1]:void 0)}));var XI=ua.forEach,ZI=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("forEach",(function(e){XI(ZI(this),e,arguments.length>1?arguments[1]:void 0)}));var eb=kr.includes,tb=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("includes",(function(e){return eb(tb(this),e,arguments.length>1?arguments[1]:void 0)}));var nb=kr.indexOf,rb=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("indexOf",(function(e){return nb(rb(this),e,arguments.length>1?arguments[1]:void 0)}));var ob=g,ib=y,ab=L,sb=zS,ub=rd,cb=pt("iterator"),lb=ob.Uint8Array,db=ab(ub.values),fb=ab(ub.keys),hb=ab(ub.entries),vb=sb.aTypedArray,pb=sb.exportTypedArrayMethod,gb=lb&&lb.prototype,mb=!ib((function(){gb[cb].call([1])})),yb=!!gb&&gb.values&&gb[cb]===gb.values&&"values"===gb.values.name,Rb=function(){return db(vb(this))};pb("entries",(function(){return hb(vb(this))}),mb),pb("keys",(function(){return fb(vb(this))}),mb),pb("values",Rb,mb||!yb,{name:"values"}),pb(cb,Rb,mb||!yb,{name:"values"});var Tb=zS.aTypedArray,Eb=zS.exportTypedArrayMethod,Cb=L([].join);Eb("join",(function(e){return Cb(Tb(this),e)}));var _b=Us,Sb=Rd,Ab=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return _b(Sb,Ab(this),t>1?[e,arguments[1]]:[e])}));var Ib=ua.map,bb=zS.aTypedArray,wb=zS.getTypedArrayConstructor;(0,zS.exportTypedArrayMethod)("map",(function(e){return Ib(bb(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(wb(e))(t)}))}));var Ob=ke,Mb=Xe,kb=W,Nb=Ir,Db=TypeError,Pb="Reduce of empty array with no initial value",Lb=function(e){return function(t,n,r,o){var i=Mb(t),a=kb(i),s=Nb(i);if(Ob(n),0===s&&r<2)throw new Db(Pb);var u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){o=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw new Db(Pb)}for(;e?u>=0:s>u;u+=c)u in a&&(o=n(o,a[u],u,i));return o}},Vb={left:Lb(!1),right:Lb(!0)},xb=Vb.left,Ub=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return xb(Ub(this),e,t,t>1?arguments[1]:void 0)}));var Fb=Vb.right,jb=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Fb(jb(this),e,t,t>1?arguments[1]:void 0)}));var $b=zS.aTypedArray,qb=zS.exportTypedArrayMethod,Bb=Math.floor;qb("reverse",(function(){for(var e,t=this,n=$b(t).length,r=Bb(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t}));var Wb=g,Jb=_,Qb=zS,Hb=Ir,Yb=fA,Gb=Xe,Kb=y,zb=Wb.RangeError,Xb=Wb.Int8Array,Zb=Xb&&Xb.prototype,ew=Zb&&Zb.set,tw=Qb.aTypedArray,nw=Qb.exportTypedArrayMethod,rw=!Kb((function(){var e=new Uint8ClampedArray(2);return Jb(ew,e,{length:1,0:3},1),3!==e[1]})),ow=rw&&Qb.NATIVE_ARRAY_BUFFER_VIEWS&&Kb((function(){var e=new Xb(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));nw("set",(function(e){tw(this);var t=Yb(arguments.length>1?arguments[1]:void 0,1),n=Gb(e);if(rw)return Jb(ew,this,n,t);var r=this.length,o=Hb(n),i=0;if(o+t>r)throw new zb("Wrong length");for(;i<o;)this[t+i]=n[i++]}),!rw||ow);var iw=ni,aw=zS.aTypedArray,sw=zS.getTypedArrayConstructor;(0,zS.exportTypedArrayMethod)("slice",(function(e,t){for(var n=iw(aw(this),e,t),r=sw(this),o=0,i=n.length,a=new r(i);i>o;)a[o]=n[o++];return a}),y((function(){new Int8Array(1).slice()})));var uw=ua.some,cw=zS.aTypedArray;(0,zS.exportTypedArrayMethod)("some",(function(e){return uw(cw(this),e,arguments.length>1?arguments[1]:void 0)}));var lw=ni,dw=Math.floor,fw=function(e,t){var n=e.length;if(n<8)for(var r,o,i=1;i<n;){for(o=i,r=e[i];o&&t(e[o-1],r)>0;)e[o]=e[--o];o!==i++&&(e[o]=r)}else for(var a=dw(n/2),s=fw(lw(e,0,a),t),u=fw(lw(e,a),t),c=s.length,l=u.length,d=0,f=0;d<c||f<l;)e[d+f]=d<c&&f<l?t(s[d],u[f])<=0?s[d++]:u[f++]:d<c?s[d++]:u[f++];return e},hw=fw,vw=ue.match(/firefox\/(\d+)/i),pw=!!vw&&+vw[1],gw=/MSIE|Trident/.test(ue),mw=ue.match(/AppleWebKit\/(\d+)\./),yw=!!mw&&+mw[1],Rw=wi,Tw=y,Ew=ke,Cw=hw,_w=pw,Sw=gw,Aw=pe,Iw=yw,bw=zS.aTypedArray,ww=zS.exportTypedArrayMethod,Ow=g.Uint16Array,Mw=Ow&&Rw(Ow.prototype.sort),kw=!(!Mw||Tw((function(){Mw(new Ow(2),null)}))&&Tw((function(){Mw(new Ow(2),{})}))),Nw=!!Mw&&!Tw((function(){if(Aw)return Aw<74;if(_w)return _w<67;if(Sw)return!0;if(Iw)return Iw<602;var e,t,n=new Ow(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(Mw(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));ww("sort",(function(e){return void 0!==e&&Ew(e),Nw?Mw(this,e):Cw(bw(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!Nw||kw);var Dw=Sr,Pw=Er,Lw=zS.aTypedArray,Vw=zS.getTypedArrayConstructor;(0,zS.exportTypedArrayMethod)("subarray",(function(e,t){var n=Lw(this),r=n.length,o=Pw(e,r);return new(Vw(n))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,Dw((void 0===t?r:Pw(t,r))-o))}));var xw=Us,Uw=zS,Fw=y,jw=ni,$w=g.Int8Array,qw=Uw.aTypedArray,Bw=Uw.exportTypedArrayMethod,Ww=[].toLocaleString,Jw=!!$w&&Fw((function(){Ww.call(new $w(1))}));Bw("toLocaleString",(function(){return xw(Ww,Jw?jw(qw(this)):qw(this),jw(arguments))}),Fw((function(){return[1,2].toLocaleString()!==new $w([1,2]).toLocaleString()}))||!Fw((function(){$w.prototype.toLocaleString.call([1,2])})));var Qw=zS.exportTypedArrayMethod,Hw=y,Yw=L,Gw=g.Uint8Array,Kw=Gw&&Gw.prototype||{},zw=[].toString,Xw=Yw([].join);Hw((function(){zw.call({})}))&&(zw=function(){return Xw(this)});var Zw=Kw.toString!==zw;Qw("toString",zw,Zw);var eO=L,tO=tf,nO=Nv.getWeakData,rO=of,oO=Ht,iO=J,aO=te,sO=Vp,uO=tt,cO=Wn.set,lO=Wn.getterFor,dO=ua.find,fO=ua.findIndex,hO=eO([].splice),vO=0,pO=function(e){return e.frozen||(e.frozen=new gO)},gO=function(){this.entries=[]},mO=function(e,t){return dO(e.entries,(function(e){return e[0]===t}))};gO.prototype={get:function(e){var t=mO(this,e);if(t)return t[1]},has:function(e){return!!mO(this,e)},set:function(e,t){var n=mO(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=fO(this.entries,(function(t){return t[0]===e}));return~t&&hO(this.entries,t,1),!!~t}};var yO,RO={getConstructor:function(e,t,n,r){var o=e((function(e,o){rO(e,i),cO(e,{type:t,id:vO++,frozen:null}),iO(o)||sO(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=lO(t),s=function(e,t,n){var r=a(e),o=nO(oO(t),!0);return!0===o?pO(r).set(t,n):o[r.id]=n,e};return tO(i,{delete:function(e){var t=a(this);if(!aO(e))return!1;var n=nO(e);return!0===n?pO(t).delete(e):n&&uO(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!aO(e))return!1;var n=nO(e);return!0===n?pO(t).has(e):n&&uO(n,t.id)}}),tO(i,n?{get:function(e){var t=a(this);if(aO(e)){var n=nO(e);if(!0===n)return pO(t).get(e);if(n)return n[t.id]}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),o}},TO=$v,EO=g,CO=L,_O=tf,SO=Nv,AO=rg,IO=RO,bO=te,wO=Wn.enforce,OO=y,MO=In,kO=Object,NO=Array.isArray,DO=kO.isExtensible,PO=kO.isFrozen,LO=kO.isSealed,VO=kO.freeze,xO=kO.seal,UO=!EO.ActiveXObject&&"ActiveXObject"in EO,FO=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},jO=AO("WeakMap",FO,IO),$O=jO.prototype,qO=CO($O.set);if(MO)if(UO){yO=IO.getConstructor(FO,"WeakMap",!0),SO.enable();var BO=CO($O.delete),WO=CO($O.has),JO=CO($O.get);_O($O,{delete:function(e){if(bO(e)&&!DO(e)){var t=wO(this);return t.frozen||(t.frozen=new yO),BO(this,e)||t.frozen.delete(e)}return BO(this,e)},has:function(e){if(bO(e)&&!DO(e)){var t=wO(this);return t.frozen||(t.frozen=new yO),WO(this,e)||t.frozen.has(e)}return WO(this,e)},get:function(e){if(bO(e)&&!DO(e)){var t=wO(this);return t.frozen||(t.frozen=new yO),WO(this,e)?JO(this,e):t.frozen.get(e)}return JO(this,e)},set:function(e,t){if(bO(e)&&!DO(e)){var n=wO(this);n.frozen||(n.frozen=new yO),WO(this,e)?qO(this,e,t):n.frozen.set(e,t)}else qO(this,e,t);return this}})}else TO&&OO((function(){var e=VO([]);return qO(new jO,e,1),!PO(e)}))&&_O($O,{set:function(e,t){var n;return NO(e)&&(PO(e)?n=VO:LO(e)&&(n=xO)),qO(this,e,t),n&&n(e),this}});var QO=g;go({global:!0,forced:QO.globalThis!==QO},{globalThis:QO});var HO={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},YO=Mt("span").classList,GO=YO&&YO.constructor&&YO.constructor.prototype,KO=GO===Object.prototype?void 0:GO,zO=g,XO=HO,ZO=KO,eM=Nc,tM=un,nM=function(e){if(e&&e.forEach!==eM)try{tM(e,"forEach",eM)}catch(UN){e.forEach=eM}};for(var rM in XO)XO[rM]&&nM(zO[rM]&&zO[rM].prototype);nM(ZO);var oM=g,iM=HO,aM=KO,sM=rd,uM=un,cM=Ai,lM=pt("iterator"),dM=sM.values,fM=function(e,t){if(e){if(e[lM]!==dM)try{uM(e,lM,dM)}catch(UN){e[lM]=dM}if(cM(e,t,!0),iM[t])for(var n in sM)if(e[n]!==sM[n])try{uM(e,n,sM[n])}catch(UN){e[n]=sM[n]}}};for(var hM in iM)fM(oM[hM]&&oM[hM].prototype,hM);fM(aM,"DOMTokenList");var vM=g,pM=Us,gM=Z,mM=Om,yM=ue,RM=ni,TM=jm,EM=vM.Function,CM=/MSIE .\./.test(yM)||"BUN"===mM&&function(){var e=vM.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}(),_M=function(e,t){var n=t?2:1;return CM?function(r,o){var i=TM(arguments.length,1)>n,a=gM(r)?r:EM(r),s=i?RM(arguments,n):[],u=i?function(){pM(a,this,s)}:a;return t?e(u,o):e(u)}:e},SM=go,AM=g,IM=_M(AM.setInterval,!0);SM({global:!0,bind:!0,forced:AM.setInterval!==IM},{setInterval:IM});var bM=go,wM=g,OM=_M(wM.setTimeout,!0);bM({global:!0,bind:!0,forced:wM.setTimeout!==OM},{setTimeout:OM});var MM,kM=(MM="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){e=void 0!==(e=e||{})?e:{};var t,n,r=WXWebAssembly;e.ready=new Promise((function(e,r){t=e,n=r}));var o=Object.assign({},e),a="./this.program",d="object"==("undefined"==typeof window?"undefined":f(window)),h="function"==typeof importScripts;"object"==("undefined"==typeof process?"undefined":f(process))&&"object"==f(process.versions)&&process.versions.node;var v="";(d||h)&&(h?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),MM&&(v=MM),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"");var p,g=e.print||console.log.bind(console),m=e.printErr||console.warn.bind(console);Object.assign(e,o),o=null,e.arguments&&e.arguments,e.thisProgram&&(a=e.thisProgram),e.quit&&e.quit,e.wasmBinary&&e.wasmBinary,e.noExitRuntime,"object"!=f(r)&&j("no native wasm support detected");var y,R,T,E,C,_,S,A,I,b,w=!1,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function M(e,t,n){for(var r=t+n,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&O)return O.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function k(e,t){return e?M(T,e,t):""}function N(e,t,n,r){if(!(r>0))return 0;for(var o=n,i=n+r-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=i)break;t[n++]=s}else if(s<=2047){if(n+1>=i)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=i)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=i)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}return t[n]=0,n-o}function D(e){for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r>=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}e.INITIAL_MEMORY;var P,L=[],V=[],x=[],U=0,F=null;function j(t){e.onAbort&&e.onAbort(t),m(t="Aborted("+t+")"),w=!0,t+=". Build with -sASSERTIONS for more info.";var r=new Error(t);throw n(r),r}function $(t){for(;t.length>0;)t.shift()(e)}function q(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}(P="RTCRoomEngine.wasm").startsWith("data:application/octet-stream;base64,")||(P=function(t){return e.locateFile?e.locateFile(t,v):v+t}(P));var B=void 0;function W(e){for(var t="",n=e;T[n];)t+=B[T[n++]];return t}var J={},Q={},H={};function Y(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function G(e,t){return e=Y(e),function(){return t.apply(this,arguments)}}function K(e,t){var n=G(t,(function(e){this.name=t,this.message=e;var n=new Error(e).stack;void 0!==n&&(this.stack=this.toString()+"\n"+n.replace(/^Error(:[^\n]*)?\n/,""))}));return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},n}var z=void 0;function X(e){throw new z(e)}var Z=void 0;function ee(e){throw new Z(e)}function te(e,t,n){function r(t){var r=n(t);r.length!==e.length&&ee("Mismatched type converter count");for(var o=0;o<e.length;++o)ne(e[o],r[o])}e.forEach((function(e){H[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){Q.hasOwnProperty(e)?o[t]=Q[e]:(i.push(e),J.hasOwnProperty(e)||(J[e]=[]),J[e].push((function(){o[t]=Q[e],++a===i.length&&r(o)})))})),0===i.length&&r(o)}function ne(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=t.name;if(e||X('type "'+r+'" must have a positive integer typeid pointer'),Q.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;X("Cannot register type '"+r+"' twice")}if(Q[e]=t,delete H[e],J.hasOwnProperty(e)){var o=J[e];delete J[e],o.forEach((function(e){return e()}))}}function re(e){if(!(this instanceof Ae))return!1;if(!(e instanceof Ae))return!1;for(var t=this.$$.ptrType.registeredClass,n=this.$$.ptr,r=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)o=r.upcast(o),r=r.baseClass;return t===r&&n===o}function oe(e){X(e.$$.ptrType.registeredClass.name+" instance already deleted")}var ie=!1;function ae(e){}function se(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function ue(e,t,n){if(t===n)return e;if(void 0===n.baseClass)return null;var r=ue(e,t,n.baseClass);return null===r?null:n.downcast(r)}var ce={};function le(){return Object.keys(ge).length}function de(){var e=[];for(var t in ge)ge.hasOwnProperty(t)&&e.push(ge[t]);return e}var fe=[];function he(){for(;fe.length;){var e=fe.pop();e.$$.deleteScheduled=!1,e.delete()}}var ve=void 0;function pe(e){ve=e,fe.length&&ve&&ve(he)}var ge={};function me(e,t){return t=function(e,t){for(void 0===t&&X("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),ge[t]}function ye(e,t){return t.ptrType&&t.ptr||ee("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&ee("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Te(Object.create(e,{$$:{value:t}}))}function Re(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=me(this.registeredClass,t);if(void 0!==n){if(0===n.$$.count.value)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function o(){return this.isSmartPointer?ye(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ye(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=ce[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=ue(t,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?ye(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:e}):ye(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Te(e){return"undefined"==typeof FinalizationRegistry?(Te=function(e){return e},e):(ie=new FinalizationRegistry((function(e){se(e.$$)})),Te=function(e){var t=e.$$;if(t.smartPtr){var n={$$:t};ie.register(e,n,e)}return e},ae=function(e){return ie.unregister(e)},Te(e))}function Ee(){if(this.$$.ptr||oe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Te(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Ce(){this.$$.ptr||oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&X("Object already scheduled for deletion"),ae(this),se(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function _e(){return!this.$$.ptr}function Se(){return this.$$.ptr||oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&X("Object already scheduled for deletion"),fe.push(this),1===fe.length&&ve&&ve(he),this.$$.deleteScheduled=!0,this}function Ae(){}function Ie(e,t,n){if(void 0===e[t].overloadTable){var r=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||X("Function '"+n+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}}function be(e,t,n,r,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function we(e,t,n){for(;t!==n;)t.upcast||X("Expected null or instance of "+n.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Oe(e,t){if(null===t)return this.isReference&&X("null is not a valid "+this.name),0;t.$$||X('Cannot pass "'+Ze(t)+'" as a '+this.name),t.$$.ptr||X("Cannot pass deleted object as a pointer of type "+this.name);var n=t.$$.ptrType.registeredClass;return we(t.$$.ptr,n,this.registeredClass)}function Me(e,t){var n;if(null===t)return this.isReference&&X("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,n),n):0;t.$$||X('Cannot pass "'+Ze(t)+'" as a '+this.name),t.$$.ptr||X("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&X("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;if(n=we(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&X("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:X("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,Xe.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,n)}break;default:X("Unsupporting sharing policy")}return n}function ke(e,t){if(null===t)return this.isReference&&X("null is not a valid "+this.name),0;t.$$||X('Cannot pass "'+Ze(t)+'" as a '+this.name),t.$$.ptr||X("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&X("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;return we(t.$$.ptr,n,this.registeredClass)}function Ne(e){return this.fromWireType(_[e>>2])}function De(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Pe(e){this.rawDestructor&&this.rawDestructor(e)}function Le(e){null!==e&&e.delete()}function Ve(e,t,n,r,o,i,a,s,u,c,l){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==t.baseClass?this.toWireType=Me:r?(this.toWireType=Oe,this.destructorFunction=null):(this.toWireType=ke,this.destructorFunction=null)}var xe=[];function Ue(e){var t=xe[e];return t||(e>=xe.length&&(xe.length=e+1),xe[e]=t=b.get(e)),t}function Fe(t,n,r){return t.includes("j")?function(t,n,r){var o=e["dynCall_"+t];return r&&r.length?o.apply(null,[n].concat(r)):o.call(null,n)}(t,n,r):Ue(n).apply(null,r)}function je(e,t){var n,r,o,i=(e=W(e)).includes("j")?(n=e,r=t,o=[],function(){return o.length=0,Object.assign(o,arguments),Fe(n,r,o)}):Ue(t);return"function"!=typeof i&&X("unknown function pointer with signature "+e+": "+t),i}var $e=void 0;function qe(e){var t=Mt(e),n=W(t);return wt(t),n}function Be(e,t){var n=[],r={};throw t.forEach((function e(t){r[t]||Q[t]||(H[t]?H[t].forEach(e):(n.push(t),r[t]=!0))})),new $e(e+": "+n.map(qe).join([", "]))}function We(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Je(e,t,n,r,o){var i=t.length;i<2&&X("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==n,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,l=i-2,d=new Array(l),f=[],h=[];return function(){var n;arguments.length!==l&&X("function "+e+" called with "+arguments.length+" arguments, expected "+l+" args!"),h.length=0,f.length=a?2:1,f[0]=o,a&&(n=t[1].toWireType(h,this),f[1]=n);for(var i=0;i<l;++i)d[i]=t[i+2].toWireType(h,arguments[i]),f.push(d[i]);return function(e){if(s)We(h);else for(var r=a?1:2;r<t.length;r++){var o=1===r?n:d[r-2];null!==t[r].destructorFunction&&t[r].destructorFunction(o)}if(c)return t[0].fromWireType(e)}(r.apply(null,f))}}function Qe(e,t){for(var n=[],r=0;r<e;r++)n.push(S[t+4*r>>2]);return n}var He=[],Ye=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ge(e){e>4&&0==--Ye[e].refcount&&(Ye[e]=void 0,He.push(e))}function Ke(){for(var e=0,t=5;t<Ye.length;++t)void 0!==Ye[t]&&++e;return e}function ze(){for(var e=5;e<Ye.length;++e)if(void 0!==Ye[e])return Ye[e];return null}var Xe={toValue:function(e){return e||X("Cannot use deleted val. handle = "+e),Ye[e].value},toHandle:function(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=He.length?He.pop():Ye.length;return Ye[t]={refcount:1,value:e},t}}};function Ze(e){if(null===e)return"null";var t=f(e);return"object"===t||"array"===t||"function"===t?e.toString():""+e}function et(e,t){switch(t){case 2:return function(e){return this.fromWireType(A[e>>2])};case 3:return function(e){return this.fromWireType(I[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function tt(e,t,n){switch(t){case 0:return n?function(e){return R[e]}:function(e){return T[e]};case 1:return n?function(e){return E[e>>1]}:function(e){return C[e>>1]};case 2:return n?function(e){return _[e>>2]}:function(e){return S[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var nt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function rt(e,t){for(var n=e,r=n>>1,o=r+t/2;!(r>=o)&&C[r];)++r;if((n=r<<1)-e>32&&nt)return nt.decode(T.subarray(e,n));for(var i="",a=0;!(a>=t/2);++a){var s=E[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ot(e,t,n){if(void 0===n&&(n=2147483647),n<2)return 0;for(var r=t,o=(n-=2)<2*e.length?n/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);E[t>>1]=a,t+=2}return E[t>>1]=0,t-r}function it(e){return 2*e.length}function at(e,t){for(var n=0,r="";!(n>=t/4);){var o=_[e+4*n>>2];if(0==o)break;if(++n,o>=65536){var i=o-65536;r+=String.fromCharCode(55296|i>>10,56320|1023&i)}else r+=String.fromCharCode(o)}return r}function st(e,t,n){if(void 0===n&&(n=2147483647),n<4)return 0;for(var r=t,o=r+n-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),_[t>>2]=a,(t+=4)+4>o)break}return _[t>>2]=0,t-r}function ut(e){for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r>=55296&&r<=57343&&++n,t+=4}return t}function ct(e,t){var n=Q[e];return void 0===n&&X(t+" has unknown type "+qe(e)),n}function lt(e,t){for(var n=new Array(e),r=0;r<e;++r)n[r]=ct(S[t+4*r>>2],"parameter "+r);return n}var dt={};function ft(e){var t=dt[e];return void 0===t?W(e):t}var ht=[];function vt(){if("object"==("undefined"==typeof globalThis?"undefined":f(globalThis)))return globalThis;function e(e){e.$$$embind_global$$$=e;var t="object"==("undefined"==typeof $$$embind_global$$$?"undefined":f($$$embind_global$$$))&&e.$$$embind_global$$$==e;return t||delete e.$$$embind_global$$$,t}if("object"==("undefined"==typeof $$$embind_global$$$?"undefined":f($$$embind_global$$$)))return $$$embind_global$$$;if("object"==("undefined"==typeof global?"undefined":f(global))&&e(global)?$$$embind_global$$$=global:"object"==("undefined"==typeof self?"undefined":f(self))&&e(self)&&($$$embind_global$$$=self),"object"==("undefined"==typeof $$$embind_global$$$?"undefined":f($$$embind_global$$$)))return $$$embind_global$$$;throw Error("unable to get global object.")}var pt,gt=[],mt={};pt=function(){return performance.now()};var yt={};function Rt(){if(!Rt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==("undefined"==typeof navigator?"undefined":f(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:a||"./this.program"};for(var t in yt)void 0===yt[t]?delete e[t]:e[t]=yt[t];var n=[];for(var t in e)n.push(t+"="+e[t]);Rt.strings=n}return Rt.strings}var Tt=[null,[],[]];function Et(e,t){var n=Tt[e];0===t||10===t?((1===e?g:m)(M(n,0)),n.length=0):n.push(t)}function Ct(e){return e%4==0&&(e%100!=0||e%400==0)}var _t=[31,29,31,30,31,30,31,31,30,31,30,31],St=[31,28,31,30,31,30,31,31,30,31,30,31];function At(e,t,n,r){var o=_[r+40>>2],i={tm_sec:_[r>>2],tm_min:_[r+4>>2],tm_hour:_[r+8>>2],tm_mday:_[r+12>>2],tm_mon:_[r+16>>2],tm_year:_[r+20>>2],tm_wday:_[r+24>>2],tm_yday:_[r+28>>2],tm_isdst:_[r+32>>2],tm_gmtoff:_[r+36>>2],tm_zone:o?k(o):""},a=k(n),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,n){for(var r="number"==typeof e?e.toString():e||"";r.length<t;)r=n[0]+r;return r}function f(e,t){return d(e,t,"0")}function h(e,t){function n(e){return e<0?-1:e>0?1:0}var r;return 0===(r=n(e.getFullYear()-t.getFullYear()))&&0===(r=n(e.getMonth()-t.getMonth()))&&(r=n(e.getDate()-t.getDate())),r}function v(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var t=function(e,t){for(var n=new Date(e.getTime());t>0;){var r=Ct(n.getFullYear()),o=n.getMonth(),i=(r?_t:St)[o];if(!(t>i-n.getDate()))return n.setDate(n.getDate()+t),n;t-=i-n.getDate()+1,n.setDate(1),o<11?n.setMonth(o+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1))}return n}(new Date(e.tm_year+1900,0,1),e.tm_yday),n=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),o=v(n),i=v(r);return h(o,t)<=0?h(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+function(e,t){for(var n=0,r=0;r<=t;n+=e[r++]);return n}(Ct(e.tm_year+1900)?_t:St,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return f(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var n=(e.tm_wday+371-e.tm_yday)%7;4==n||3==n&&Ct(e.tm_year)||(t=1)}}else{t=52;var r=(e.tm_wday+7-e.tm_yday-1)%7;(4==r||5==r&&Ct(e.tm_year%400-1))&&t++}return f(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,n=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(n?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),g)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),g[u](i)));a=a.replace(/\0\0/g,"%");var m,y,T,E,C,S,A=(m=a,y=!1,E=T>0?T:D(m)+1,C=new Array(E),S=N(m,C,0,C.length),y&&(C.length=S),C);return A.length>t?0:(function(e,t){R.set(e,t)}(A,e),A.length-1)}!function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);B=e}(),z=e.BindingError=K(Error,"BindingError"),Z=e.InternalError=K(Error,"InternalError"),Ae.prototype.isAliasOf=re,Ae.prototype.clone=Ee,Ae.prototype.delete=Ce,Ae.prototype.isDeleted=_e,Ae.prototype.deleteLater=Se,e.getInheritedInstanceCount=le,e.getLiveInheritedInstances=de,e.flushPendingDeletes=he,e.setDelayFunction=pe,Ve.prototype.getPointee=De,Ve.prototype.destructor=Pe,Ve.prototype.argPackAdvance=8,Ve.prototype.readValueFromPointer=Ne,Ve.prototype.deleteObject=Le,Ve.prototype.fromWireType=Re,$e=e.UnboundTypeError=K(Error,"UnboundTypeError"),e.count_emval_handles=Ke,e.get_first_emval=ze;var It={__assert_fail:function(e,t,n,r){j("Assertion failed: "+k(e)+", at: "+[t?k(t):"unknown filename",n,r?k(r):"unknown function"])},_embind_register_bigint:function(e,t,n,r,o){},_embind_register_bool:function(e,t,n,r,o){var i=q(n);ne(e,{name:t=W(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:o},argPackAdvance:8,readValueFromPointer:function(e){var r;if(1===n)r=R;else if(2===n)r=E;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+t);r=_}return this.fromWireType(r[e>>i])},destructorFunction:null})},_embind_register_class:function(t,n,r,o,i,a,s,u,c,l,d,f,h){d=W(d),a=je(i,a),u&&(u=je(s,u)),l&&(l=je(c,l)),h=je(f,h);var v=Y(d);!function(t,n,r){e.hasOwnProperty(t)?((void 0===r||void 0!==e[t].overloadTable&&void 0!==e[t].overloadTable[r])&&X("Cannot register public name '"+t+"' twice"),Ie(e,t,t),e.hasOwnProperty(r)&&X("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),e[t].overloadTable[r]=n):(e[t]=n,void 0!==r&&(e[t].numArguments=r))}(v,(function(){Be("Cannot construct "+d+" due to unbound types",[o])})),te([t,n,r],o?[o]:[],(function(n){var r,i;n=n[0],i=o?(r=n.registeredClass).instancePrototype:Ae.prototype;var s=G(v,(function(){if(Object.getPrototypeOf(this)!==c)throw new z("Use 'new' to construct "+d);if(void 0===f.constructor_body)throw new z(d+" has no accessible constructor");var e=f.constructor_body[arguments.length];if(void 0===e)throw new z("Tried to invoke ctor of "+d+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:s}});s.prototype=c;var f=new be(d,s,c,h,r,a,u,l),p=new Ve(d,f,!0,!1,!1),g=new Ve(d+"*",f,!1,!1,!1),m=new Ve(d+" const*",f,!1,!0,!1);return ce[t]={pointerType:g,constPointerType:m},function(t,n,r){e.hasOwnProperty(t)||ee("Replacing nonexistant public symbol"),void 0!==e[t].overloadTable&&void 0!==r?e[t].overloadTable[r]=n:(e[t]=n,e[t].argCount=r)}(v,s),[p,g,m]}))},_embind_register_class_class_function:function(e,t,n,r,o,i,a){var s=Qe(n,r);t=W(t),i=je(o,i),te([],[e],(function(e){var r=(e=e[0]).name+"."+t;function o(){Be("Cannot call "+r+" due to unbound types",s)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.registeredClass.constructor;return void 0===u[t]?(o.argCount=n-1,u[t]=o):(Ie(u,t,r),u[t].overloadTable[n-1]=o),te([],s,(function(e){var o=[e[0],null].concat(e.slice(1)),s=Je(r,o,null,i,a);return void 0===u[t].overloadTable?(s.argCount=n-1,u[t]=s):u[t].overloadTable[n-1]=s,[]})),[]}))},_embind_register_class_constructor:function(e,t,n,r,o,i){var a;t>0||j(a);var s=Qe(t,n);o=je(r,o),te([],[e],(function(e){var n="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new z("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){Be("Cannot construct "+e.name+" due to unbound types",s)},te([],s,(function(r){return r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Je(n,r,null,o,i),[]})),[]}))},_embind_register_class_function:function(e,t,n,r,o,i,a,s){var u=Qe(n,r);t=W(t),i=je(o,i),te([],[e],(function(e){var r=(e=e[0]).name+"."+t;function o(){Be("Cannot call "+r+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,l=c[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===n-2?(o.argCount=n-2,o.className=e.name,c[t]=o):(Ie(c,t,r),c[t].overloadTable[n-2]=o),te([],u,(function(o){var s=Je(r,o,e,i,a);return void 0===c[t].overloadTable?(s.argCount=n-2,c[t]=s):c[t].overloadTable[n-2]=s,[]})),[]}))},_embind_register_emval:function(e,t){ne(e,{name:t=W(t),fromWireType:function(e){var t=Xe.toValue(e);return Ge(e),t},toWireType:function(e,t){return Xe.toHandle(t)},argPackAdvance:8,readValueFromPointer:Ne,destructorFunction:null})},_embind_register_float:function(e,t,n){var r=q(n);ne(e,{name:t=W(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:et(t,r),destructorFunction:null})},_embind_register_integer:function(e,t,n,r,o){t=W(t);var i=q(n),a=function(e){return e};if(0===r){var s=32-8*n;a=function(e){return e<<s>>>s}}var u=t.includes("unsigned");ne(e,{name:t,fromWireType:a,toWireType:u?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:tt(t,i,0!==r),destructorFunction:null})},_embind_register_memory_view:function(e,t,n){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=S,n=t[e>>=2],o=t[e+1];return new r(y,o,n)}ne(e,{name:n=W(n),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},_embind_register_smart_ptr:function(e,t,n,r,o,i,a,s,u,c,l,d){n=W(n),i=je(o,i),s=je(a,s),c=je(u,c),d=je(l,d),te([e],[t],(function(e){return e=e[0],[new Ve(n,e.registeredClass,!1,!1,!0,e,r,i,s,c,d)]}))},_embind_register_std_string:function(e,t){var n="std::string"===(t=W(t));ne(e,{name:t,fromWireType:function(e){var t,r=S[e>>2],o=e+4;if(n)for(var i=o,a=0;a<=r;++a){var s=o+a;if(a==r||0==T[s]){var u=k(i,s-i);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),i=s+1}}else{var c=new Array(r);for(a=0;a<r;++a)c[a]=String.fromCharCode(T[o+a]);t=c.join("")}return wt(e),t},toWireType:function(e,t){var r;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||X("Cannot pass non-string to std::string"),r=n&&o?D(t):t.length;var i=Ot(4+r+1),a=i+4;if(S[i>>2]=r,n&&o)N(t,T,a,r+1);else if(o)for(var s=0;s<r;++s){var u=t.charCodeAt(s);u>255&&(wt(a),X("String has UTF-16 code units that do not fit in 8 bits")),T[a+s]=u}else for(s=0;s<r;++s)T[a+s]=t[s];return null!==e&&e.push(wt,i),i},argPackAdvance:8,readValueFromPointer:Ne,destructorFunction:function(e){wt(e)}})},_embind_register_std_wstring:function(e,t,n){var r,o,i,a,s;n=W(n),2===t?(r=rt,o=ot,a=it,i=function(){return C},s=1):4===t&&(r=at,o=st,a=ut,i=function(){return S},s=2),ne(e,{name:n,fromWireType:function(e){for(var n,o=S[e>>2],a=i(),u=e+4,c=0;c<=o;++c){var l=e+4+c*t;if(c==o||0==a[l>>s]){var d=r(u,l-u);void 0===n?n=d:(n+=String.fromCharCode(0),n+=d),u=l+t}}return wt(e),n},toWireType:function(e,r){"string"!=typeof r&&X("Cannot pass non-string to C++ string type "+n);var i=a(r),u=Ot(4+i+t);return S[u>>2]=i>>s,o(r,u+4,i+t),null!==e&&e.push(wt,u),u},argPackAdvance:8,readValueFromPointer:Ne,destructorFunction:function(e){wt(e)}})},_embind_register_void:function(e,t){ne(e,{isVoid:!0,name:t=W(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},_emscripten_date_now:function(){return Date.now()},_emscripten_get_now_is_monotonic:function(){return!0},_emval_as:function(e,t,n){e=Xe.toValue(e),t=ct(t,"emval::as");var r=[],o=Xe.toHandle(r);return S[n>>2]=o,t.toWireType(r,e)},_emval_call:function(e,t,n,r){e=Xe.toValue(e);for(var o=lt(t,n),i=new Array(t),a=0;a<t;++a){var s=o[a];i[a]=s.readValueFromPointer(r),r+=s.argPackAdvance}var u=e.apply(void 0,i);return Xe.toHandle(u)},_emval_call_method:function(e,t,n,r,o){return(e=ht[e])(t=Xe.toValue(t),n=ft(n),function(e){var t=[];return S[e>>2]=Xe.toHandle(t),t}(r),o)},_emval_call_void_method:function(e,t,n,r){(e=ht[e])(t=Xe.toValue(t),n=ft(n),null,r)},_emval_decref:Ge,_emval_get_global:function(e){return 0===e?Xe.toHandle(vt()):(e=ft(e),Xe.toHandle(vt()[e]))},_emval_get_method_caller:function(e,t){var n=lt(e,t),r=n[0],o=r.name+"_$"+n.slice(1).map((function(e){return e.name})).join("_")+"$",i=gt[o];if(void 0!==i)return i;var a=new Array(e-1);return i=function(e){var t=ht.length;return ht.push(e),t}((function(t,o,i,s){for(var u=0,c=0;c<e-1;++c)a[c]=n[c+1].readValueFromPointer(s+u),u+=n[c+1].argPackAdvance;var l=t[o].apply(t,a);for(c=0;c<e-1;++c)n[c+1].deleteObject&&n[c+1].deleteObject(a[c]);if(!r.isVoid)return r.toWireType(i,l)})),gt[o]=i,i},_emval_get_module_property:function(t){return t=ft(t),Xe.toHandle(e[t])},_emval_get_property:function(e,t){return e=Xe.toValue(e),t=Xe.toValue(t),Xe.toHandle(e[t])},_emval_incref:function(e){e>4&&(Ye[e].refcount+=1)},_emval_instanceof:function(e,t){return(e=Xe.toValue(e))instanceof(t=Xe.toValue(t))},_emval_is_number:function(e){return"number"==typeof(e=Xe.toValue(e))},_emval_is_string:function(e){return"string"==typeof(e=Xe.toValue(e))},_emval_new:function(e,t,n,r){e=Xe.toValue(e);var o=mt[t];return o||(o=function(e){var t=new Array(e+1);return function(n,r,o){t[0]=n;for(var i=0;i<e;++i){var a=ct(S[r+4*i>>2],"parameter "+i);t[i+1]=a.readValueFromPointer(o),o+=a.argPackAdvance}var s=new(n.bind.apply(n,t));return Xe.toHandle(s)}}(t),mt[t]=o),o(e,n,r)},_emval_new_cstring:function(e){return Xe.toHandle(ft(e))},_emval_run_destructors:function(e){We(Xe.toValue(e)),Ge(e)},_emval_take_value:function(e,t){var n=(e=ct(e,"_emval_take_value")).readValueFromPointer(t);return Xe.toHandle(n)},abort:function(){j("")},emscripten_get_now:pt,emscripten_memcpy_big:function(e,t,n){T.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){T.length,j("OOM")},environ_get:function(e,t){var n=0;return Rt().forEach((function(r,o){var i=t+n;S[e+4*o>>2]=i,function(e,t,n){for(var r=0;r<e.length;++r)R[0|t++]=e.charCodeAt(r);n||(R[0|t]=0)}(r,i),n+=r.length+1})),0},environ_sizes_get:function(e,t){var n=Rt();S[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),S[t>>2]=r,0},fd_close:function(e){return 52},fd_seek:function(e,t,n,r,o){return 70},fd_write:function(e,t,n,r){for(var o=0,i=0;i<n;i++){var a=S[t>>2],s=S[t+4>>2];t+=8;for(var u=0;u<s;u++)Et(e,T[a+u]);o+=s}return S[r>>2]=o,0},setTempRet0:function(e){},strftime_l:function(e,t,n,r){return At(e,t,n,r)}};!function(){var t,r={env:It,wasi_snapshot_preview1:It};function o(t,n){var r,o,i=t.exports;e.asm=i,p=e.asm.memory,r=p.buffer,y=r,e.HEAP8=R=new Int8Array(r),e.HEAP16=E=new Int16Array(r),e.HEAP32=_=new Int32Array(r),e.HEAPU8=T=new Uint8Array(r),e.HEAPU16=C=new Uint16Array(r),e.HEAPU32=S=new Uint32Array(r),e.HEAPF32=A=new Float32Array(r),e.HEAPF64=I=new Float64Array(r),b=e.asm.__indirect_function_table,o=e.asm.__wasm_call_ctors,V.unshift(o),function(){if(U--,e.monitorRunDependencies&&e.monitorRunDependencies(U),0==U&&F){var t=F;F=null,t()}}()}function i(e){o(e.instance)}if(U++,e.monitorRunDependencies&&e.monitorRunDependencies(U),e.instantiateWasm)try{return e.instantiateWasm(r,o)}catch(a){return m("Module.instantiateWasm callback failed with error: "+a),!1}(t=i,WXWebAssembly.instantiate("/static/RTCRoomEngine.wasm.br",r).then((function(e){return e})).then(t,(function(e){m("failed to asynchronously prepare wasm: "+e),j(e)}))).catch(n)}(),e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.__wasm_call_ctors).apply(null,arguments)};var bt,wt=e._free=function(){return(wt=e._free=e.asm.free).apply(null,arguments)},Ot=e._malloc=function(){return(Ot=e._malloc=e.asm.malloc).apply(null,arguments)},Mt=e.___getTypeName=function(){return(Mt=e.___getTypeName=e.asm.__getTypeName).apply(null,arguments)};function kt(n){function r(){bt||(bt=!0,e.calledRun=!0,w||($(V),t(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)t=e.postRun.shift(),x.unshift(t);var t;$(x)}()))}U>0||(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)t=e.preRun.shift(),L.unshift(t);var t;$(L)}(),U>0||(e.setStatus?(e.setStatus("Running..."),setTimeout((function(){setTimeout((function(){e.setStatus("")}),1),r()}),1)):r()))}if(e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.__embind_register_native_and_builtin_types).apply(null,arguments)},e.___errno_location=function(){return(e.___errno_location=e.asm.__errno_location).apply(null,arguments)},e.stackSave=function(){return(e.stackSave=e.asm.stackSave).apply(null,arguments)},e.stackRestore=function(){return(e.stackRestore=e.asm.stackRestore).apply(null,arguments)},e.stackAlloc=function(){return(e.stackAlloc=e.asm.stackAlloc).apply(null,arguments)},e.dynCall_vijii=function(){return(e.dynCall_vijii=e.asm.dynCall_vijii).apply(null,arguments)},e.dynCall_viji=function(){return(e.dynCall_viji=e.asm.dynCall_viji).apply(null,arguments)},e.dynCall_vijiiii=function(){return(e.dynCall_vijiiii=e.asm.dynCall_vijiiii).apply(null,arguments)},e.dynCall_viijii=function(){return(e.dynCall_viijii=e.asm.dynCall_viijii).apply(null,arguments)},e.dynCall_viij=function(){return(e.dynCall_viij=e.asm.dynCall_viij).apply(null,arguments)},e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.dynCall_jiji).apply(null,arguments)},e.dynCall_iiiiij=function(){return(e.dynCall_iiiiij=e.asm.dynCall_iiiiij).apply(null,arguments)},e.dynCall_iiiiijj=function(){return(e.dynCall_iiiiijj=e.asm.dynCall_iiiiijj).apply(null,arguments)},e.dynCall_iiiiiijj=function(){return(e.dynCall_iiiiiijj=e.asm.dynCall_iiiiiijj).apply(null,arguments)},F=function e(){bt||kt(),bt||(F=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();kt();var Nt,Dt=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};function Pt(e){if("string"!=typeof e)return e;var t;try{var n=JSON.parse(e);t="object"===f(n)&&n?n:e}catch(UN){t=e}return t}!function(e){e[e.APNs=0]="APNs",e[e.VoIP=1]="VoIP"}(Nt||(Nt={}));var Lt=function(){return s((function e(){i(this,e)}),null,[{key:"getDeviceInfo",value:function(){var t={osName:"",osVersion:"",deviceName:"",framework:""};if(e.isWXMiniProgram){var n=wx.getSystemInfoSync(),r=c(n.system.split(" "),2),o=r[0],i=r[1];return t.osName=o,t.osVersion=i,t.deviceName=n.model,t.framework="wxMiniProgram",t}var a=e.rtcDetect.getSystem().browser,s=e.rtcDetect.getSystem().OS,u=e.isElectron?"electron":"web";return t.osName=a.name,t.osVersion=a.version,t.deviceName=s,t.framework=u,t}}])}(),Vt=function(){function e(){i(this,e)}return s(e,null,[{key:"startInterval",value:function(t,n,r){var o=setInterval((function(){var n;(null===(n=null==e?void 0:e.timerMap)||void 0===n?void 0:n.has(t))&&e.timerMap.get(t).callback.onInterval(t)}),n);e.timerMap.set(t,{timer:o,callback:r})}},{key:"stopInterval",value:function(t){var n;if(null===(n=null==e?void 0:e.timerMap)||void 0===n?void 0:n.has(t)){var r=e.timerMap.get(t);r&&r.timer&&(clearInterval(r.timer),r.callback.delete(),e.timerMap.delete(t))}}},{key:"startTimeout",value:function(e,t){return Dt(this,void 0,void 0,u().mark((function n(){return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:setTimeout((function(){t.onTimeout(),t.delete()}),e);case 1:case"end":return n.stop()}}),n)})))}}])}();Vt.timerMap=new Map,e.JSTimer=Vt,e.JSSystemInfo=Lt,Dt=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var xt=e.TIM,Ut=function(){function e(t){return i(this,e),this.waitingReadyQueue=[],this.logger=t&&t.logger||console,this.onTIMReadyStateUpdate=this.onTIMReadyStateUpdate.bind(this),e.chatLoginManager||(e.chatLoginManager=this),e.chatLoginManager}return s(e,[{key:"login",value:function(t){return Dt(this,void 0,void 0,u().mark((function n(){var r,o,i,a,s,c=this;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=Object.assign({},t),o=r.userId,i=r.userSig,a=r.chat,!this.isTIMVersionBelowV3(a)){n.next=3;break}throw new Error("Current chat version is not supported, please use v3.");case 3:if(e.chat=a,this.bindTIMEvent(),!(s=e.chat.getLoginUser())){n.next=21;break}if(s!==o){n.next=15;break}if(!e.chat.isReady()){n.next=12;break}return n.abrupt("return");case 12:return n.abrupt("return",new Promise((function(e,t){c.addLoginHandler({userId:o,resolve:e,reject:t})})));case 13:n.next=19;break;case 15:return n.next=17,this.doLogout();case 17:return n.next=19,this.doLogin({userId:o,userSig:i});case 19:n.next=23;break;case 21:return n.next=23,this.doLogin({userId:o,userSig:i});case 23:case"end":return n.stop()}}),n,this)})))}},{key:"doLogin",value:function(t){return Dt(this,void 0,void 0,u().mark((function n(){var r,o,i,a=this;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=Object.assign({},t),o=r.userId,i=r.userSig,n.abrupt("return",new Promise((function(t,n){return Dt(a,void 0,void 0,u().mark((function r(){var a;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,this.logger.debug("[tim] chat.login with userId: ",o),r.next=4,e.chat.login({userID:o,userSig:i});case 4:if(a=r.sent,this.logger.info("[tim] chat.login success:",a),!a.data.repeatLogin||!e.chat.isReady()){r.next=9;break}return t(!0),r.abrupt("return");case 9:this.addLoginHandler({userId:o,resolve:t,reject:n}),r.next=16;break;case 12:r.prev=12,r.t0=r.catch(0),this.logger.debug("[tim] chat.login error: ",r.t0,r.t0.code),2025===r.t0.code?this.addLoginHandler({userId:o,resolve:t,reject:n}):n(r.t0);case 16:case"end":return r.stop()}}),r,this,[[0,12]])})))})));case 2:case"end":return n.stop()}}),n)})))}},{key:"logout",value:function(){return Dt(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.doLogout();case 2:e.chat=null;case 3:case"end":return t.stop()}}),t,this)})))}},{key:"doLogout",value:function(){return Dt(this,void 0,void 0,u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.chat){t.next=2;break}return t.abrupt("return");case 2:return this.logger.debug("[tim] chat.logout."),t.next=5,e.chat.logout();case 5:this.logger.info("[tim] chat.logout success.");case 6:case"end":return t.stop()}}),t,this)})))}},{key:"isTIMVersionBelowV3",value:function(e){return e&&"function"!=typeof e.addSignalingListener}},{key:"addLoginHandler",value:function(e){var t=this;this.waitingReadyQueue.push(e),setTimeout((function(){var n=t.waitingReadyQueue.findIndex((function(t){return t===e}));n<0||(t.waitingReadyQueue.splice(n,1),e.reject(new Error("login timeout")))}),2e3)}},{key:"onTIMReadyStateUpdate",value:function(t){if(this.logger.debug("onTIMReadyStateUpdate event:",t.name),t.name===xt.EVENT.SDK_READY){var n=e.chat.getLoginUser();this.waitingReadyQueue.forEach((function(e){e.userId===n?e.resolve():e.reject(new Error("user ".concat(n," has Logged")))}))}else this.waitingReadyQueue.forEach((function(e){return e.reject(new Error("sdk not ready"))}));this.waitingReadyQueue=[]}},{key:"bindTIMEvent",value:function(){var t,n,r,o;null===(t=e.chat)||void 0===t||t.off(xt.EVENT.SDK_READY,this.onTIMReadyStateUpdate),null===(n=e.chat)||void 0===n||n.off(xt.EVENT.SDK_NOT_READY,this.onTIMReadyStateUpdate),null===(r=e.chat)||void 0===r||r.on(xt.EVENT.SDK_READY,this.onTIMReadyStateUpdate),null===(o=e.chat)||void 0===o||o.on(xt.EVENT.SDK_NOT_READY,this.onTIMReadyStateUpdate)}}])}(),Ft=(Dt=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},e.TIM),jt=Ft.TSignaling,$t=["callExperimentalAPI","invite","inviteInGroup","accept","reject","cancel","modifyInvitation","getUserStatus"],qt=function(){return s((function t(){i(this,t),this.chatLoginManager=new Ut({logger:e.logger}),this.isExternalIncomingTim=!1,this.onError=this.onError.bind(this),this.onRoomCustomDataReceived=this.onRoomCustomDataReceived.bind(this),this.onKickedOut=this.onKickedOut.bind(this),this.onNetStateChange=this.onNetStateChange.bind(this),this.onServerConfigUpdated=this.onServerConfigUpdated.bind(this),this.onNewMessageReceived=this.onNewMessageReceived.bind(this),this.onNewInvitationReceived=this.onNewInvitationReceived.bind(this),this.onInviteeAccepted=this.onInviteeAccepted.bind(this),this.onInviteeRejected=this.onInviteeRejected.bind(this),this.onInvitationCancelled=this.onInvitationCancelled.bind(this),this.onInvitationTimeout=this.onInvitationTimeout.bind(this)}),[{key:"bindObserver",value:function(e){this.nativeObserver=e}},{key:"unBindObserver",value:function(){this.nativeObserver&&this.nativeObserver.delete(),this.nativeObserver=null}},{key:"getLoginUser",value:function(){var e,t=null===(e=this.tim)||void 0===e?void 0:e.getLoginUser();return null!=t?t:""}},{key:"callJS",value:function(t,n,r){return Dt(this,void 0,void 0,u().mark((function o(){var i;return u().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,!(a=e.tim)||"function"==typeof a.addSignalingListener){o.next=4;break}return r.onError(-1,"The current npm package you are using, tim-js-sdk, does not match the current dependency version of TUIRoom. We recommend upgrading to the new npm package @tencentCloud/chat for continued support and updates."),o.abrupt("return");case 4:if(e.tim||"login"===t){o.next=7;break}return r.onError(2024,"please login firstly"),o.abrupt("return");case 7:i=Pt(n),"invite"!==t&&"inviteInGroup"!==t||(i.offlinePushInfo=Pt(i.offlinePushInfo)||{}),"callExperimentalAPI"!==t&&e.logger.debug("[tim] ".concat(t," with params"),i),"getUserStatus"==t&&(i.userIDList=Pt(i.userIDList)),o.t0=t,o.next="logout"===o.t0?14:"login"===o.t0||"updateMyProfile"===o.t0?17:20;break;case 14:return o.next=16,this.logout(r);case 16:case 19:return o.abrupt("break",22);case 17:return o.next=19,this[t](i,r);case 20:return o.next=22,this.timFunction(t,i,r);case 22:return o.prev=22,r.delete(),o.finish(22);case 25:case"end":return o.stop()}var a}),o,this,[[0,,22,25]])})))}},{key:"login",value:function(t,n){return Dt(this,void 0,void 0,u().mark((function r(){var o,i,a,s,c;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=Object.assign({},t),i=o.sdkAppId,a=o.userId,s=o.userSig,c=o.testEnv,e.logger.debug("[tim] login with params",i,a),this.tim||(e.tim?(this.tim=e.tim,this.isExternalIncomingTim=!0):(this.tim=Ft.create({SDKAppID:i,testEnv:c}),e.tim=this.tim,this.isExternalIncomingTim=!1),this.bindTIMEvent()),r.prev=3,r.next=6,this.chatLoginManager.login({sdkAppId:i,userId:a,userSig:s,testEnv:c,chat:this.tim});case 6:n.onSuccess(null),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(3),n.onError(r.t0.code||-1,r.t0.message);case 12:case"end":return r.stop()}}),r,this,[[3,9]])})))}},{key:"logout",value:function(t){return Dt(this,void 0,void 0,u().mark((function n(){return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.logger.debug("[tim] logout. isExternalIncomingTim: ",this.isExternalIncomingTim),!this.isExternalIncomingTim){n.next=6;break}e.tim=this.tim=null,t.onSuccess(null),n.next=17;break;case 6:return n.prev=6,n.next=9,this.chatLoginManager.logout();case 9:this.unbindTIMEvent(),e.tim=this.tim=null,t.onSuccess(null),n.next=17;break;case 14:n.prev=14,n.t0=n.catch(6),t.onError(n.t0.code||-1,n.t0.message);case 17:case"end":return n.stop()}}),n,this,[[6,14]])})))}},{key:"updateMyProfile",value:function(e,t){return Dt(this,void 0,void 0,u().mark((function n(){var r,o,i;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=Object.assign({},e),o=r.nick,i=r.avatar,n.prev=1,n.next=4,this.tim.updateMyProfile({nick:o,avatar:i,gender:Ft.TYPES.GENDER_UNKNOWN,allowType:Ft.TYPES.ALLOW_TYPE_ALLOW_ANY});case 4:t.onSuccess(null),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(1),t.onError(n.t0.code||-1,n.t0.message);case 10:case"end":return n.stop()}}),n,this,[[1,7]])})))}},{key:"timFunction",value:function(t,n,r){return Dt(this,void 0,void 0,u().mark((function o(){var i,a,s,c;return u().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,s=null,!(n instanceof Array)){o.next=8;break}return o.next=5,(c=this.tim)[t].apply(c,l(n));case 5:s=o.sent,o.next=11;break;case 8:return o.next=10,this.tim[t](n);case 10:s=o.sent;case 11:"callExperimentalAPI"!==t&&e.logger.info("[tim] call ".concat(t," success")),"invite"!==t&&"inviteInGroup"!==t&&"modifyInvitation"!==t||(s=(null===(a=null===(i=null==s?void 0:s.data)||void 0===i?void 0:i.message)||void 0===a?void 0:a.payload)||{data:""}),this.handleTimFunctionResponse(t,s.data,r),o.next=20;break;case 16:o.prev=16,o.t0=o.catch(0),e.logger.warn("[tim] ".concat(t," error:"),o.t0),r.onError(o.t0.code||-1,o.t0.message);case 20:case"end":return o.stop()}}),o,this,[[0,16]])})))}},{key:"handleTimFunctionResponse",value:function(e,t,n){$t.includes(e)&&t?"string"==typeof t?n.onSuccess({response:t}):n.onSuccess({response:JSON.stringify(t)}):n.onSuccess(t)}},{key:"onKickedOut",value:function(e){var t,n;switch(e.data.type){case Ft.TYPES.KICKED_OUT_MULT_ACCOUNT:case Ft.TYPES.KICKED_OUT_MULT_DEVICE:case Ft.TYPES.KICKED_OUT_REST_API:null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onKickedOffline",{});break;case Ft.TYPES.KICKED_OUT_USERSIG_EXPIRED:null===(n=this.nativeObserver)||void 0===n||n.onJSEvent("onUserSigExpired",{})}}},{key:"onNetStateChange",value:function(e){var t,n;switch(e.data.state){case Ft.TYPES.NET_STATE_CONNECTED:null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onConnectSuccess",{});break;case Ft.TYPES.NET_STATE_DISCONNECTED:null===(n=this.nativeObserver)||void 0===n||n.onJSEvent("onConnectFailed",{})}}},{key:"onRoomCustomDataReceived",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onRoomCustomDataReceived",e)}},{key:"onError",value:function(e){console.error("".concat(TIMService.logPrefix," onError error:"),e)}},{key:"onServerConfigUpdated",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onServerConfigUpdated",JSON.stringify(null==e?void 0:e.data)||"")}},{key:"onNewMessageReceived",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onNewMessageReceived",JSON.stringify(null==e?void 0:e.data)||"")}},{key:"onNewInvitationReceived",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onNewInvitationReceived",(null==e?void 0:e.data)||{})}},{key:"onInviteeAccepted",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onInviteeAccepted",(null==e?void 0:e.data)||{})}},{key:"onInviteeRejected",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onInviteeRejected",(null==e?void 0:e.data)||{})}},{key:"onInvitationCancelled",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onInvitationCancelled",(null==e?void 0:e.data)||{})}},{key:"onInvitationTimeout",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onInvitationTimeout",(null==e?void 0:e.data)||{})}},{key:"bindTIMEvent",value:function(){var e,t,n,r,o,i,a,s,u,c,l;null===(e=this.tim)||void 0===e||e.on(Ft.EVENT.ERROR,this.onError),null===(t=this.tim)||void 0===t||t.on(Ft.EVENT.KICKED_OUT,this.onKickedOut),null===(n=this.tim)||void 0===n||n.on(Ft.EVENT.NET_STATE_CHANGE,this.onNetStateChange),null===(r=this.tim)||void 0===r||r.on(Ft.EVENT.ROOM_CUSTOM_DATA_RECEIVED,this.onRoomCustomDataReceived),null===(o=this.tim)||void 0===o||o.on(Ft.EVENT.SERVER_CONFIG_UPDATED,this.onServerConfigUpdated),null===(i=this.tim)||void 0===i||i.on(Ft.EVENT.MESSAGE_RECEIVED,this.onNewMessageReceived),null===(a=this.tim)||void 0===a||a.addSignalingListener(jt.NEW_INVITATION_RECEIVED,this.onNewInvitationReceived),null===(s=this.tim)||void 0===s||s.addSignalingListener(jt.INVITEE_ACCEPTED,this.onInviteeAccepted),null===(u=this.tim)||void 0===u||u.addSignalingListener(jt.INVITEE_REJECTED,this.onInviteeRejected),null===(c=this.tim)||void 0===c||c.addSignalingListener(jt.INVITATION_CANCELLED,this.onInvitationCancelled),null===(l=this.tim)||void 0===l||l.addSignalingListener(jt.INVITATION_TIMEOUT,this.onInvitationTimeout)}},{key:"unbindTIMEvent",value:function(){var e,t,n,r,o,i,a,s,u,c,l;null===(e=this.tim)||void 0===e||e.off(Ft.EVENT.ERROR,this.onError),null===(t=this.tim)||void 0===t||t.off(Ft.EVENT.KICKED_OUT,this.onKickedOut),null===(n=this.tim)||void 0===n||n.off(Ft.EVENT.NET_STATE_CHANGE,this.onNetStateChange),null===(r=this.tim)||void 0===r||r.off(Ft.EVENT.ROOM_CUSTOM_DATA_RECEIVED,this.onRoomCustomDataReceived),null===(o=this.tim)||void 0===o||o.off(Ft.EVENT.SERVER_CONFIG_UPDATED,this.onServerConfigUpdated),null===(i=this.tim)||void 0===i||i.off(Ft.EVENT.MESSAGE_RECEIVED,this.onNewMessageReceived),null===(a=this.tim)||void 0===a||a.removeSignalingListener(jt.NEW_INVITATION_RECEIVED,this.onNewInvitationReceived),null===(s=this.tim)||void 0===s||s.removeSignalingListener(jt.INVITEE_ACCEPTED,this.onInviteeAccepted),null===(u=this.tim)||void 0===u||u.removeSignalingListener(jt.INVITEE_REJECTED,this.onInviteeRejected),null===(c=this.tim)||void 0===c||c.removeSignalingListener(jt.INVITATION_CANCELLED,this.onInvitationCancelled),null===(l=this.tim)||void 0===l||l.removeSignalingListener(jt.INVITATION_TIMEOUT,this.onInvitationTimeout)}}],[{key:"getSDKVersion",value:function(){return Ft.VERSION}}])}();qt.logPrefix="[JSTim]",e.JSTim=qt;var Bt=e.TRTCDefine.TRTCVideoResolutionMode;function Wt(e){return"string"==typeof e?e.split(",").length>1?e.split(",").map((function(e){return document.getElementById(e)})).filter((function(e){return Boolean(e)})):Gt?document.getElementById(e):e:e}function Jt(e,t){var n=t;return"startLocalPreview"===e&&(1===n.length&&(n[0]=Wt(n[0])),2===n.length&&(n[1]=Wt(n[1]))),"updateLocalView"!==e&&"startScreenCapture"!==e||(n[0]=Wt(n[0])),"startRemoteView"!==e&&"updateRemoteView"!==e||(n[1]=Wt(n[1])),n}function Qt(t,n){var r=n;if("enterRoom"===t&&e.TRTCDefine.TRTCParams&&n instanceof Array&&n.length>0&&(r[0]=new e.TRTCDefine.TRTCParams(n[0].sdkAppId,n[0].userId,n[0].userSig,n[0].roomId,n[0].strRoomId,n[0].role)),"setVideoEncoderParam"===t&&e.TRTCDefine.TRTCVideoEncParam&&n instanceof Array&&n.length>0&&(r[0]=new e.TRTCDefine.TRTCVideoEncParam(n[0].videoResolution,Bt.TRTCVideoResolutionModeLandscape,n[0].videoFps,n[0].videoBitrate,n[0].minVideoBitrate)),"selectScreenCaptureTarget"===t&&e.TRTCDefine.TRTCScreenCaptureSourceInfo&&e.TRTCDefine.TRTCScreenCaptureProperty&&n instanceof Array&&3===n.length&&e.tempResult.screenSharingTargetList&&e.tempResult.screenSharingTargetList.length>0){var o=e.tempResult.screenSharingTargetList.filter((function(e){return e.sourceId===n[0].sourceId}));o.length>0&&(r[0]=o[0],r[1]=new e.TRTCDefine.Rect(n[1].left,n[1].top,n[1].right,n[1].bottom),r[2]=new e.TRTCDefine.TRTCScreenCaptureProperty(n[2].enableCaptureMouse,n[2].enableHighLight,n[2].enableHighPerformance,n[2].highLightColor,n[2].highLightWidth,n[2].enableCaptureChildWindow))}return"startScreenCapture"===t&&e.TRTCDefine.TRTCVideoEncParam&&n instanceof Array&&3===n.length&&(r[2]=new e.TRTCDefine.TRTCVideoEncParam(n[2].videoResolution,n[2].resMode,n[2].videoFps,n[2].videoBitrate,n[2].minVideoBitrate,n[2].enableAdjustRes)),"enableSmallVideoStream"===t&&e.TRTCDefine.TRTCVideoEncParam&&n instanceof Array&&2===n.length&&(r[1]=new e.TRTCDefine.TRTCVideoEncParam(n[1].videoResolution,n[1].resMode,n[1].videoFps,n[1].videoBitrate,n[1].minVideoBitrate,!1)),r}function Ht(t,n){"getScreenCaptureSources"===t&&(e.tempResult.screenSharingTargetList=n)}Dt=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var Yt=e.TRTCCloud,Gt=e.currentFrameWork===e.FRAMEWORK.ELECTRON,Kt=function(){function t(e){i(this,t),this.trtcCloud=e?Yt.getTRTCShareInstance():Yt.getTRTCShareInstance().createSubCloud(),this.isMainTRTCCloud=e,this.nativeObserver=null,this.onError=this.onError.bind(this),this.onWarning=this.onWarning.bind(this),this.onEnterRoom=this.onEnterRoom.bind(this),this.onExitRoom=this.onExitRoom.bind(this),this.onSwitchRole=this.onSwitchRole.bind(this),this.onUserVideoAvailable=this.onUserVideoAvailable.bind(this),this.onUserSubStreamAvailable=this.onUserSubStreamAvailable.bind(this),this.onUserAudioAvailable=this.onUserAudioAvailable.bind(this),this.onScreenCapturePaused=this.onScreenCapturePaused.bind(this),this.onScreenCaptureResumed=this.onScreenCaptureResumed.bind(this),this.onScreenCaptureStopped=this.onScreenCaptureStopped.bind(this),this.onFirstVideoFrame=this.onFirstVideoFrame.bind(this),this.onRemoteUserEnterRoom=this.onRemoteUserEnterRoom.bind(this),this.onRemoteUserLeaveRoom=this.onRemoteUserLeaveRoom.bind(this),this.onUserVoiceVolume=this.onUserVoiceVolume.bind(this),this.onNetworkQuality=this.onNetworkQuality.bind(this),this.onStatistics=this.onStatistics.bind(this),this.onMicDidReady=this.onMicDidReady.bind(this),this.onCameraDidReady=this.onCameraDidReady.bind(this),this.onSendFirstLocalAudioFrame=this.onSendFirstLocalAudioFrame.bind(this),this.onSendFirstLocalVideoFrame=this.onSendFirstLocalVideoFrame.bind(this),this.onReceiveSEIMessage=this.onReceiveSEIMessage.bind(this),this.onConnectionLost=this.onConnectionLost.bind(this),this.onConnectionRecovery=this.onConnectionRecovery.bind(this),this.bindTRTCEvent()}return s(t,[{key:"destroyTRTC",value:function(){this.unbindTRTCEvent(),this.isMainTRTCCloud||this.trtcCloud.destroy()}},{key:"getTRTCCloud",value:function(){return this.trtcCloud}},{key:"bindObserver",value:function(e){this.nativeObserver=e}},{key:"unBindObserver",value:function(){this.nativeObserver&&this.nativeObserver.delete(),this.nativeObserver=null}},{key:"callJS",value:function(t,n,r){return Dt(this,void 0,void 0,u().mark((function o(){var i,a,s,c,d,h;return u().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,i=Pt(n),a=Jt(t,i),a=Gt?Qt(t,a):a,e.logger.debug("[trtcCloud] ".concat(t," params"),a,f(a)),s=null,!(a instanceof Array)){o.next=12;break}return o.next=9,(c=this.trtcCloud)[t].apply(c,l(a));case 9:s=o.sent,o.next=15;break;case 12:return o.next=14,this.trtcCloud[t](a);case 14:s=o.sent;case 15:e.logger.info("[trtcCloud] ".concat(t," success")),Gt&&Ht(t,s),r&&r.onSuccess(s),o.next=27;break;case 20:o.prev=20,o.t0=o.catch(0),e.logger&&e.logger.warn("[trtcCloud] ".concat(t," error"),o.t0),d=o.t0&&o.t0.code,h=o.t0&&o.t0.message,"startScreenShare"===t&&(d=o.t0&&o.t0.extraCode,h=JSON.stringify({name:o.t0.originError.name,message:h})),r&&r.onError(d,h);case 27:r.delete();case 28:case"end":return o.stop()}}),o,this,[[0,20]])})))}},{key:"onError",value:function(t,n){var r;e.logger.warn("[trtcCloud] onError",t,n),null===(r=this.nativeObserver)||void 0===r||r.onJSEvent("onError",{errCode:t,errMsg:n})}},{key:"onWarning",value:function(e,t,n){var r;null===(r=this.nativeObserver)||void 0===r||r.onJSEvent("onWarning",{warningCode:e,warningMsg:t,extraInfo:JSON.stringify({extraInfo:n})})}},{key:"onEnterRoom",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onEnterRoom",{result:e})}},{key:"onExitRoom",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onExitRoom",{reason:e})}},{key:"onSwitchRole",value:function(e,t){var n;null===(n=this.nativeObserver)||void 0===n||n.onJSEvent("onSwitchRole",{errorCode:e,errorMessage:t})}},{key:"onUserVideoAvailable",value:function(e,t){var n;null===(n=this.nativeObserver)||void 0===n||n.onJSEvent("onUserVideoAvailable",{userId:e,available:Boolean(t)})}},{key:"onUserSubStreamAvailable",value:function(e,t){var n;null===(n=this.nativeObserver)||void 0===n||n.onJSEvent("onUserSubStreamAvailable",{userId:e,available:Boolean(t)})}},{key:"onUserAudioAvailable",value:function(e,t){var n;null===(n=this.nativeObserver)||void 0===n||n.onJSEvent("onUserAudioAvailable",{userId:e,available:Boolean(t)})}},{key:"onFirstVideoFrame",value:function(e,t,n,r){var o;null===(o=this.nativeObserver)||void 0===o||o.onJSEvent("onFirstVideoFrame",{userId:e,streamType:t,width:n,height:r})}},{key:"onRemoteUserEnterRoom",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onRemoteUserEnterRoom",{userId:e})}},{key:"onRemoteUserLeaveRoom",value:function(e,t){var n;null===(n=this.nativeObserver)||void 0===n||n.onJSEvent("onRemoteUserLeaveRoom",{userId:e,reason:t})}},{key:"onUserVoiceVolume",value:function(e,t,n){var r;null===(r=this.nativeObserver)||void 0===r||r.onJSEvent("onUserVoiceVolume",{userVolumes:e,userVolumesCount:t,totalVolume:n})}},{key:"onNetworkQuality",value:function(e,t){var n;null===(n=this.nativeObserver)||void 0===n||n.onJSEvent("onNetworkQuality",{localQuality:e,remoteQuality:t,remoteQualityCount:t.length})}},{key:"onStatistics",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onStatistics",{statistics:e})}},{key:"onMicDidReady",value:function(){var e;null===(e=this.nativeObserver)||void 0===e||e.onJSEvent("onMicDidReady",{})}},{key:"onCameraDidReady",value:function(){var e;null===(e=this.nativeObserver)||void 0===e||e.onJSEvent("onCameraDidReady",{})}},{key:"onScreenCapturePaused",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onScreenCapturePaused",{reason:e})}},{key:"onScreenCaptureResumed",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onScreenCaptureResumed",{reason:e})}},{key:"onScreenCaptureStopped",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onScreenCaptureStopped",{reason:e})}},{key:"onSendFirstLocalAudioFrame",value:function(){var e;null===(e=this.nativeObserver)||void 0===e||e.onJSEvent("onSendFirstLocalAudioFrame",{})}},{key:"onSendFirstLocalVideoFrame",value:function(e){var t;null===(t=this.nativeObserver)||void 0===t||t.onJSEvent("onSendFirstLocalVideoFrame",{streamType:e})}},{key:"onReceiveSEIMessage",value:function(t,n){var r;try{var o=JSON.parse(n);null===(r=this.nativeObserver)||void 0===r||r.onJSEvent("onReceiveSEIMessage",{message:JSON.stringify(Object.assign(Object.assign({},o),{userId:t,data:o.stringData}))})}catch(UN){e.logger&&e.logger.warn("[trtcCloud] onReceiveSEIMessage error",UN)}}},{key:"onConnectionLost",value:function(){var e;null===(e=this.nativeObserver)||void 0===e||e.onJSEvent("onConnectionLost",{})}},{key:"onConnectionRecovery",value:function(){var e;null===(e=this.nativeObserver)||void 0===e||e.onJSEvent("onConnectionRecovery",{})}},{key:"bindTRTCEvent",value:function(){this.trtcCloud.on("onError",this.onError),this.trtcCloud.on("onWarning",this.onWarning),this.trtcCloud.on("onEnterRoom",this.onEnterRoom),this.trtcCloud.on("onExitRoom",this.onExitRoom),this.trtcCloud.on("onSwitchRole",this.onSwitchRole),this.trtcCloud.on("onUserVideoAvailable",this.onUserVideoAvailable),this.trtcCloud.on("onUserSubStreamAvailable",this.onUserSubStreamAvailable),this.trtcCloud.on("onUserAudioAvailable",this.onUserAudioAvailable),this.trtcCloud.on("onScreenCapturePaused",this.onScreenCapturePaused),this.trtcCloud.on("onScreenCaptureResumed",this.onScreenCaptureResumed),this.trtcCloud.on("onScreenCaptureStopped",this.onScreenCaptureStopped),this.trtcCloud.on("onFirstVideoFrame",this.onFirstVideoFrame),this.trtcCloud.on("onRemoteUserEnterRoom",this.onRemoteUserEnterRoom),this.trtcCloud.on("onRemoteUserLeaveRoom",this.onRemoteUserLeaveRoom),this.trtcCloud.on("onUserVoiceVolume",this.onUserVoiceVolume),this.trtcCloud.on("onNetworkQuality",this.onNetworkQuality),this.trtcCloud.on("onStatistics",this.onStatistics),this.trtcCloud.on("onMicDidReady",this.onMicDidReady),this.trtcCloud.on("onCameraDidReady",this.onCameraDidReady),this.trtcCloud.on("onSendFirstLocalAudioFrame",this.onSendFirstLocalAudioFrame),this.trtcCloud.on("onSendFirstLocalVideoFrame",this.onSendFirstLocalVideoFrame),this.trtcCloud.on("onRecvSEIMsg",this.onReceiveSEIMessage),this.trtcCloud.on("onConnectionLost",this.onConnectionLost),this.trtcCloud.on("onConnectionRecovery",this.onConnectionRecovery)}},{key:"unbindTRTCEvent",value:function(){this.trtcCloud.off("onError",this.onError),this.trtcCloud.off("onWarning",this.onWarning),this.trtcCloud.off("onEnterRoom",this.onEnterRoom),this.trtcCloud.off("onExitRoom",this.onExitRoom),this.trtcCloud.off("onSwitchRole",this.onSwitchRole),this.trtcCloud.off("onUserVideoAvailable",this.onUserVideoAvailable),this.trtcCloud.off("onUserSubStreamAvailable",this.onUserSubStreamAvailable),this.trtcCloud.off("onUserAudioAvailable",this.onUserAudioAvailable),this.trtcCloud.off("onScreenCapturePaused",this.onScreenCapturePaused),this.trtcCloud.off("onScreenCaptureResumed",this.onScreenCaptureResumed),this.trtcCloud.off("onScreenCaptureStopped",this.onScreenCaptureStopped),this.trtcCloud.off("onFirstVideoFrame",this.onFirstVideoFrame),this.trtcCloud.off("onRemoteUserEnterRoom",this.onRemoteUserEnterRoom),this.trtcCloud.off("onRemoteUserLeaveRoom",this.onRemoteUserLeaveRoom),this.trtcCloud.off("onUserVoiceVolume",this.onUserVoiceVolume),this.trtcCloud.off("onNetworkQuality",this.onNetworkQuality),this.trtcCloud.off("onStatistics",this.onStatistics),this.trtcCloud.off("onMicDidReady",this.onMicDidReady),this.trtcCloud.off("onCameraDidReady",this.onCameraDidReady),this.trtcCloud.off("onSendFirstLocalAudioFrame",this.onSendFirstLocalAudioFrame),this.trtcCloud.off("onSendFirstLocalVideoFrame",this.onSendFirstLocalVideoFrame),this.trtcCloud.off("onRecvSEIMsg",this.onReceiveSEIMessage),this.trtcCloud.off("onConnectionLost",this.onConnectionLost),this.trtcCloud.off("onConnectionRecovery",this.onConnectionRecovery)}}],[{key:"createTRTC",value:function(e){return new t(e)}},{key:"getSDKVersion",value:function(){return Yt.getTRTCShareInstance().getSDKVersion()}},{key:"log",value:function(n){return Dt(this,void 0,void 0,u().mark((function r(){var o,i,a;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("object"===f(o=Pt(n))){r.next=3;break}return r.abrupt("return");case 3:if(i="[".concat(o.file,": ").concat(o.line,"] ").concat(o.message),!e.isElectron){r.next=11;break}return a={api:"TuikitLog",params:o},e.logger.info(i),r.next=9,t.callExperimentalAPI(JSON.stringify(a));case 9:r.next=12;break;case 11:2===o.level?e.logger.error(i):console.log("[tuikit engine wasm] ["+o.file+":"+o.line+"] "+o.message);case 12:case"end":return r.stop()}}),r)})))}},{key:"callExperimentalAPI",value:function(e){return Dt(this,void 0,void 0,u().mark((function t(){var n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Yt.getTRTCShareInstance(),t.next=3,n.callExperimentalAPI(e);case 3:case"end":return t.stop()}}),t)})))}}])}();return e.JSTRTC=Kt,e.ready}),NM={};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,o),!0;case 5:return l.fn.call(l.context,t,r,o,i),!0;case 6:return l.fn.call(l.context,t,r,o,i,a),!0}for(c=1,u=new Array(d-1);c<d;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,h=l.length;for(c=0;c<h;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),d){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,r);break;case 4:l[c].fn.call(l[c].context,t,r,o);break;default:if(!u)for(f=1,u=new Array(d-1);f<d;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||o&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}({get exports(){return NM},set exports(e){NM=e}});var DM,PM,LM,VM,xM,UM,FM,jM,$M,qM,BM,WM,JM,QM,HM,YM,GM,KM,zM,XM,ZM,ek,tk,nk,rk,ok,ik,ak,sk,uk=NM;!function(e){e[e.ERR_SUCC=0]="ERR_SUCC",e[e.ERR_FAILED=-1]="ERR_FAILED",e[e.ERR_FREQ_LIMIT=-2]="ERR_FREQ_LIMIT",e[e.ERR_REPEAT_OPERATION=-3]="ERR_REPEAT_OPERATION",e[e.ERR_SDKAPPID_NOT_FOUND=-1e3]="ERR_SDKAPPID_NOT_FOUND",e[e.ERR_INVALID_PARAMETER=-1001]="ERR_INVALID_PARAMETER",e[e.ERR_SDK_NOT_INITIALIZED=-1002]="ERR_SDK_NOT_INITIALIZED",e[e.ERR_PERMISSION_DENIED=-1003]="ERR_PERMISSION_DENIED",e[e.ERR_REQUIRE_PAYMENT=-1004]="ERR_REQUIRE_PAYMENT",e[e.ERR_CAMERA_START_FAILED=-1100]="ERR_CAMERA_START_FAILED",e[e.ERR_CAMERA_NOT_AUTHORIZED=-1101]="ERR_CAMERA_NOT_AUTHORIZED",e[e.ERR_CAMERA_OCCUPIED=-1102]="ERR_CAMERA_OCCUPIED",e[e.ERR_CAMERA_DEVICE_EMPTY=-1103]="ERR_CAMERA_DEVICE_EMPTY",e[e.ERR_MICROPHONE_START_FAILED=-1104]="ERR_MICROPHONE_START_FAILED",e[e.ERR_MICROPHONE_NOT_AUTHORIZED=-1105]="ERR_MICROPHONE_NOT_AUTHORIZED",e[e.ERR_MICROPHONE_OCCUPIED=-1106]="ERR_MICROPHONE_OCCUPIED",e[e.ERR_MICROPHONE_DEVICE_EMPTY=-1107]="ERR_MICROPHONE_DEVICE_EMPTY",e[e.ERR_GET_SCREEN_SHARING_TARGET_FAILED=-1108]="ERR_GET_SCREEN_SHARING_TARGET_FAILED",e[e.ERR_START_SCREEN_SHARING_FAILED=-1109]="ERR_START_SCREEN_SHARING_FAILED",e[e.ERR_ALREADY_ROOM_OWNER=-1200]="ERR_ALREADY_ROOM_OWNER",e[e.ERR_IM_ATTRIBUTE_WRITE_CONFLICT=-1201]="ERR_IM_ATTRIBUTE_WRITE_CONFLICT",e[e.ERR_ALREADY_ROOM_ENTER=-1202]="ERR_ALREADY_ROOM_ENTER",e[e.ERR_DESTROY_ROOM_NO_PERMISSION=-1203]="ERR_DESTROY_ROOM_NO_PERMISSION",e[e.ERR_LIVE_REQUEST_SERVER_TIMEOUT=-1300]="ERR_LIVE_REQUEST_SERVER_TIMEOUT",e[e.ERR_LIVE_SERVER_PROCESS_FAILED=-1301]="ERR_LIVE_SERVER_PROCESS_FAILED",e[e.ERR_LIVE_DISCONNECTED=-1302]="ERR_LIVE_DISCONNECTED",e[e.ERR_LIVE_NO_AVAILABLE_HEVC_DECODERS=-1303]="ERR_LIVE_NO_AVAILABLE_HEVC_DECODERS",e[e.ERR_OPERATION_INVALID_BEFORE_ENTER_ROOM=-2101]="ERR_OPERATION_INVALID_BEFORE_ENTER_ROOM",e[e.ERR_EXIT_NOT_SUPPORTED_FOR_ROOM_OWNER=-2102]="ERR_EXIT_NOT_SUPPORTED_FOR_ROOM_OWNER",e[e.ERR_OPERATION_NOT_SUPPORTED_IN_CURRENT_ROOM_TYPE=-2103]="ERR_OPERATION_NOT_SUPPORTED_IN_CURRENT_ROOM_TYPE",e[e.ERR_ROOM_ID_INVALID=-2105]="ERR_ROOM_ID_INVALID",e[e.ERR_ROOM_NAME_INVALID=-2107]="ERR_ROOM_NAME_INVALID",e[e.ERR_ALREADY_IN_OTHER_ROOM=-2108]="ERR_ALREADY_IN_OTHER_ROOM",e[e.ERR_USER_NOT_EXIST=-2200]="ERR_USER_NOT_EXIST",e[e.ERR_NEED_OWNER_PERMISSION=-2300]="ERR_NEED_OWNER_PERMISSION",e[e.ERR_NEED_ADMIN_PERMISSION=-2301]="ERR_NEED_ADMIN_PERMISSION",e[e.ERR_REQUEST_NO_PERMISSION=-2310]="ERR_REQUEST_NO_PERMISSION",e[e.ERR_REQUEST_ID_INVALID=-2311]="ERR_REQUEST_ID_INVALID",e[e.ERR_REQUEST_ID_REPEAT=-2312]="ERR_REQUEST_ID_REPEAT",e[e.ERR_MAX_SEAT_COUNT_LIMIT=-2340]="ERR_MAX_SEAT_COUNT_LIMIT",e[e.ERR_SEAT_INDEX_NOT_EXIST=-2344]="ERR_SEAT_INDEX_NOT_EXIST",e[e.ERR_OPEN_MICROPHONE_NEED_SEAT_UNLOCK=-2360]="ERR_OPEN_MICROPHONE_NEED_SEAT_UNLOCK",e[e.ERR_OPEN_MICROPHONE_NEED_PERMISSION_FROM_ADMIN=-2361]="ERR_OPEN_MICROPHONE_NEED_PERMISSION_FROM_ADMIN",e[e.ERR_OPEN_CAMERA_NEED_SEAT_UNLOCK=-2370]="ERR_OPEN_CAMERA_NEED_SEAT_UNLOCK",e[e.ERR_OPEN_CAMERA_NEED_PERMISSION_FROM_ADMIN=-2371]="ERR_OPEN_CAMERA_NEED_PERMISSION_FROM_ADMIN",e[e.ERR_OPEN_SCREEN_SHARE_NEED_SEAT_UNLOCK=-2372]="ERR_OPEN_SCREEN_SHARE_NEED_SEAT_UNLOCK",e[e.ERR_OPEN_SCREEN_SHARE_NEED_PERMISSION_FROM_ADMIN=-2373]="ERR_OPEN_SCREEN_SHARE_NEED_PERMISSION_FROM_ADMIN",e[e.ERR_SEND_MESSAGE_DISABLED_FOR_ALL=-2380]="ERR_SEND_MESSAGE_DISABLED_FOR_ALL",e[e.ERR_SEND_MESSAGE_DISABLED_FOR_CURRENT=-2381]="ERR_SEND_MESSAGE_DISABLED_FOR_CURRENT",e[e.ERR_ROOM_ID_OCCUPIED=100003]="ERR_ROOM_ID_OCCUPIED",e[e.ERR_ROOM_ID_NOT_EXIST=100004]="ERR_ROOM_ID_NOT_EXIST",e[e.ERR_USER_NOT_ENTERED=100005]="ERR_USER_NOT_ENTERED",e[e.ERR_NEED_PASSWORD=100018]="ERR_NEED_PASSWORD",e[e.ERR_WRONG_PASSWORD=100019]="ERR_WRONG_PASSWORD",e[e.ERR_ROOM_USER_FULL=100008]="ERR_ROOM_USER_FULL",e[e.ERR_REQUEST_CONFLICT=100102]="ERR_REQUEST_CONFLICT",e[e.ERR_SEAT_OCCUPIED=100210]="ERR_SEAT_OCCUPIED",e[e.ERR_ALREADY_IN_SEAT=100203]="ERR_ALREADY_IN_SEAT",e[e.ERR_SEAT_LOCKED=100200]="ERR_SEAT_LOCKED",e[e.ERR_ALL_SEAT_OCCUPIED=100205]="ERR_ALL_SEAT_OCCUPIED",e[e.ERR_USER_NOT_IN_SEAT=100206]="ERR_USER_NOT_IN_SEAT",e[e.ERR_SEAT_NOT_SUPPORT_LINK_MIC=100211]="ERR_SEAT_NOT_SUPPORT_LINK_MIC",e[e.ERR_ROOM_ALREADY_CONNECTED=100401]="ERR_ROOM_ALREADY_CONNECTED",e[e.ERR_ROOM_CONNECTED_IN_OTHER=100403]="ERR_ROOM_CONNECTED_IN_OTHER",e[e.ERR_MAX_CONNECTED_COUNT_LIMIT=100404]="ERR_MAX_CONNECTED_COUNT_LIMIT",e[e.ERR_BATTLE_IN_RUNNING=100419]="ERR_BATTLE_IN_RUNNING",e[e.ERR_BATTLE_ID_NOT_EXIST=100411]="ERR_BATTLE_ID_NOT_EXIST",e[e.ERR_ROOM_BATTLEID_IN_OTHER=100415]="ERR_ROOM_BATTLEID_IN_OTHER",e[e.ERR_ROOM_METADATA_EXCEED_KEY_COUNT_LIMIT=100500]="ERR_ROOM_METADATA_EXCEED_KEY_COUNT_LIMIT",e[e.ERR_ROOM_METADATA_EXCEED_VALUE_SIZE_LIMIT=100501]="ERR_ROOM_METADATA_EXCEED_VALUE_SIZE_LIMIT"}(DM||(DM={})),function(e){e[e.kRoomOwner=0]="kRoomOwner",e[e.kAdministrator=1]="kAdministrator",e[e.kGeneralUser=2]="kGeneralUser"}(PM||(PM={})),function(e){e[e.kVideoQuality_360p=1]="kVideoQuality_360p",e[e.kVideoQuality_540p=2]="kVideoQuality_540p",e[e.kVideoQuality_720p=3]="kVideoQuality_720p",e[e.kVideoQuality_1080p=4]="kVideoQuality_1080p"}(LM||(LM={})),function(e){e[e.kAudioProfileSpeech=0]="kAudioProfileSpeech",e[e.kAudioProfileDefault=1]="kAudioProfileDefault",e[e.kAudioProfileMusic=2]="kAudioProfileMusic"}(VM||(VM={})),function(e){e[e.kCameraStream=0]="kCameraStream",e[e.kScreenStream=1]="kScreenStream",e[e.kCameraStreamLow=2]="kCameraStreamLow"}(xM||(xM={})),function(e){e[e.kQualityUnknown=0]="kQualityUnknown",e[e.kQualityExcellent=1]="kQualityExcellent",e[e.kQualityGood=2]="kQualityGood",e[e.kQualityPoor=3]="kQualityPoor",e[e.kQualityBad=4]="kQualityBad",e[e.kQualityVeryBad=5]="kQualityVeryBad",e[e.kQualityDown=6]="kQualityDown"}(UM||(UM={})),function(e){e[e.kConference=1]="kConference",e[e.kLive=2]="kLive"}(FM||(FM={})),function(e){e[e.kFreeToTake=1]="kFreeToTake",e[e.kApplyToTake=2]="kApplyToTake"}(jM||(jM={})),function(e){e[e.kMicrophone=1]="kMicrophone",e[e.kCamera=2]="kCamera",e[e.kScreen=3]="kScreen"}($M||($M={})),function(e){e[e.kWindow=0]="kWindow",e[e.kScreen=1]="kScreen"}(qM||(qM={})),function(e){e[e.kChangedBySelf=0]="kChangedBySelf",e[e.kChangedByAdmin=1]="kChangedByAdmin"}(BM||(BM={})),function(e){e[e.kKickedByAdmin=0]="kKickedByAdmin",e[e.kKickedByLoggedOnOtherDevice=1]="kKickedByLoggedOnOtherDevice",e[e.kKickedByServer=2]="kKickedByServer",e[e.kNetworkDisconnected=3]="kNetworkDisconnected",e[e.kJoinRoomStatusInvalidDuringOffline=4]="kJoinRoomStatusInvalidDuringOffline",e[e.kCountOfJoinedRoomsExceedLimit=5]="kCountOfJoinedRoomsExceedLimit"}(WM||(WM={})),function(e){e[e.kInvalidAction=0]="kInvalidAction",e[e.kRequestToOpenRemoteCamera=1]="kRequestToOpenRemoteCamera",e[e.kRequestToOpenRemoteMicrophone=2]="kRequestToOpenRemoteMicrophone",e[e.kRequestToConnectOtherRoom=3]="kRequestToConnectOtherRoom",e[e.kRequestToTakeSeat=4]="kRequestToTakeSeat",e[e.kRequestRemoteUserOnSeat=5]="kRequestRemoteUserOnSeat",e[e.kApplyToAdminToOpenLocalCamera=6]="kApplyToAdminToOpenLocalCamera",e[e.kApplyToAdminToOpenLocalMicrophone=7]="kApplyToAdminToOpenLocalMicrophone",e[e.kApplyToAdminToOpenLocalScreenShare=8]="kApplyToAdminToOpenLocalScreenShare"}(JM||(JM={})),function(e){e[e.kRequestAccepted=0]="kRequestAccepted",e[e.kRequestRejected=1]="kRequestRejected",e[e.kRequestCancelled=2]="kRequestCancelled",e[e.kRequestTimeout=3]="kRequestTimeout",e[e.kRequestError=4]="kRequestError"}(QM||(QM={})),function(e){e[e.kAnchor=0]="kAnchor",e[e.kAudience=1]="kAudience"}(HM||(HM={})),function(e){e[e.kResolutionMode_Landscape=0]="kResolutionMode_Landscape",e[e.kResolutionMode_Portrait=1]="kResolutionMode_Portrait"}(YM||(YM={})),function(e){e[e.kByOwner=1]="kByOwner",e[e.kByServer=2]="kByServer"}(GM||(GM={})),function(e){e[e.kMediaDeviceTypeUnknown=-1]="kMediaDeviceTypeUnknown",e[e.kMediaDeviceTypeAudioInput=0]="kMediaDeviceTypeAudioInput",e[e.kMediaDeviceTypeAudioOutput=1]="kMediaDeviceTypeAudioOutput",e[e.kMediaDeviceTypeVideoCamera=2]="kMediaDeviceTypeVideoCamera"}(KM||(KM={})),function(e){e[e.kMediaDeviceStateAdd=0]="kMediaDeviceStateAdd",e[e.kMediaDeviceStateRemove=1]="kMediaDeviceStateRemove",e[e.kMediaDeviceStateActive=2]="kMediaDeviceStateActive"}(zM||(zM={})),function(e){e[e.kAudioRouteSpeakerphone=0]="kAudioRouteSpeakerphone",e[e.kAudioRouteEarpiece=1]="kAudioRouteEarpiece"}(XM||(XM={})),function(e){e[e.kConferenceStatusNone=0]="kConferenceStatusNone",e[e.kConferenceStatusNotStarted=1]="kConferenceStatusNotStarted",e[e.kConferenceStatusRunning=2]="kConferenceStatusRunning"}(ZM||(ZM={})),function(e){e[e.kConferenceCancelReasonCancelledByAdmin=0]="kConferenceCancelReasonCancelledByAdmin",e[e.kConferenceCancelReasonRemovedFromAttendees=1]="kConferenceCancelReasonRemovedFromAttendees"}(ek||(ek={})),function(e){e[e.kNone=0]="kNone",e[e.kPending=1]="kPending",e[e.kTimeout=2]="kTimeout",e[e.kAccepted=3]="kAccepted",e[e.kRejected=4]="kRejected"}(tk||(tk={})),function(e){e[e.kSuccess=0]="kSuccess",e[e.kAlreadyInInvitationList=1]="kAlreadyInInvitationList",e[e.kAlreadyInConference=2]="kAlreadyInConference"}(nk||(nk={})),function(e){e[e.kRejectToEnter=0]="kRejectToEnter",e[e.kInOtherConference=1]="kInOtherConference"}(rk||(rk={})),function(e){e.onError="onError",e.onKickedOutOfRoom="onKickedOutOfRoom",e.onKickedOffLine="onKickedOffLine",e.onUserSigExpired="onUserSigExpired",e.onRoomDismissed="onRoomDismissed",e.onRoomNameChanged="onRoomNameChanged",e.onRoomSeatModeChanged="onRoomSeatModeChanged",e.onRoomUserCountChanged="onRoomUserCountChanged",e.onAllUserCameraDisableChanged="onAllUserCameraDisableChanged",e.onAllUserMicrophoneDisableChanged="onAllUserMicrophoneDisableChanged",e.onScreenShareForAllUserDisableChanged="onScreenShareForAllUserDisableChanged",e.onSendMessageForAllUserDisableChanged="onSendMessageForAllUserDisableChanged",e.onRoomMaxSeatCountChanged="onRoomMaxSeatCountChanged",e.onRemoteUserEnterRoom="onRemoteUserEnterRoom",e.onRemoteUserLeaveRoom="onRemoteUserLeaveRoom",e.onUserInfoChanged="onUserInfoChanged",e.onUserRoleChanged="onUserRoleChanged",e.onUserVideoStateChanged="onUserVideoStateChanged",e.onUserAudioStateChanged="onUserAudioStateChanged",e.onSendMessageForUserDisableChanged="onSendMessageForUserDisableChanged",e.onUserVoiceVolumeChanged="onUserVoiceVolumeChanged",e.onUserNetworkQualityChanged="onUserNetworkQualityChanged",e.onSeatListChanged="onSeatListChanged",e.onKickedOffSeat="onKickedOffSeat",e.onRequestReceived="onRequestReceived",e.onRequestCancelled="onRequestCancelled",e.onRequestProcessed="onRequestProcessed",e.onReceiveTextMessage="onReceiveTextMessage",e.onReceiveCustomMessage="onReceiveCustomMessage",e.onDeviceChange="onDeviceChange",e.onUserScreenCaptureStopped="onUserScreenCaptureStopped"}(ok||(ok={})),function(e){e.onDeviceChanged="onDeviceChanged",e.onTestMicVolume="onTestMicVolume",e.onTestSpeakerVolume="onTestSpeakerVolume"}(ik||(ik={})),function(e){e.onConferenceScheduled="onConferenceScheduled",e.onConferenceWillStart="onConferenceWillStart",e.onConferenceCancelled="onConferenceCancelled",e.onConferenceInfoChanged="onConferenceInfoChanged",e.onScheduleAttendeesChanged="onScheduleAttendeesChanged",e.onConferenceStatusChanged="onConferenceStatusChanged"}(ak||(ak={})),function(e){e.onReceiveInvitation="onReceiveInvitation",e.onInvitationHandledByOtherDevice="onInvitationHandledByOtherDevice",e.onInvitationCancelled="onInvitationCancelled",e.onInvitationAccepted="onInvitationAccepted",e.onInvitationRejected="onInvitationRejected",e.onInvitationTimeout="onInvitationTimeout",e.onInvitationRevokedByAdmin="onInvitationRevokedByAdmin",e.onInvitationAdded="onInvitationAdded",e.onInvitationRemoved="onInvitationRemoved",e.onInvitationStatusChanged="onInvitationStatusChanged"}(sk||(sk={}));const ck=e=>"function"==typeof e,lk=e=>void 0===e,dk=e=>"string"==typeof e,fk=e=>"number"==typeof e;function hk(e){return Reflect.apply(Object.prototype.toString,e,[]).replace(/^\[object\s(\w+)\]$/,"$1").toLowerCase()}const vk=function(e){if(!e||"object"!=typeof e||"[object Object]"!=Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=Object.prototype.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Function.prototype.toString.call(n)===Function.prototype.toString.call(Object)};function pk(e){if("string"!=typeof e)return e;let t;try{const n=JSON.parse(e);t="object"==typeof n&&n?n:e}catch(UN){t=e}return t}const gk={[ok.onError]:["code","message"],[ok.onKickedOutOfRoom]:["roomId","reason","message"],[ok.onKickedOffLine]:["message"],[ok.onUserSigExpired]:[],[ok.onRoomDismissed]:["roomId","reason"],[ok.onRoomNameChanged]:["roomId","roomName"],[ok.onRoomSeatModeChanged]:["roomId","seatMode"],[ok.onRoomUserCountChanged]:["roomId","userCount"],[ok.onAllUserCameraDisableChanged]:["roomId","isDisable"],[ok.onAllUserMicrophoneDisableChanged]:["roomId","isDisable"],[ok.onScreenShareForAllUserDisableChanged]:["roomId","isDisable"],[ok.onSendMessageForAllUserDisableChanged]:["roomId","isDisable"],[ok.onRoomMaxSeatCountChanged]:["roomId","maxSeatNumber"],[ok.onRemoteUserEnterRoom]:["roomId","userInfo"],[ok.onRemoteUserLeaveRoom]:["roomId","userInfo"],[ok.onUserInfoChanged]:["userInfo"],[ok.onUserRoleChanged]:["userInfo"],[ok.onUserVideoStateChanged]:["userId","streamType","hasVideo","reason"],[ok.onUserAudioStateChanged]:["userId","hasAudio","reason"],[ok.onSendMessageForUserDisableChanged]:["roomId","userId","isDisable"],[ok.onUserVoiceVolumeChanged]:["userVolumeList"],[ok.onUserNetworkQualityChanged]:["userNetworkList"],[ok.onSeatListChanged]:["seatList","seatedList","leftList"],[ok.onKickedOffSeat]:["seatIndex","userInfo"],[ok.onRequestReceived]:["request"],[ok.onRequestCancelled]:["request","userInfo"],[ok.onRequestProcessed]:["request","userInfo"],[ok.onReceiveTextMessage]:["roomId","message"],[ok.onReceiveCustomMessage]:["roomId","message"],[ok.onUserScreenCaptureStopped]:["reason"],[ok.onDeviceChange]:["deviceId","type","state"],[ik.onDeviceChanged]:["deviceId","type","state"],[ik.onTestMicVolume]:["volume"],[ik.onTestSpeakerVolume]:["volume"],[ak.onConferenceScheduled]:["conferenceInfo"],[ak.onConferenceWillStart]:["conferenceInfo"],[ak.onConferenceCancelled]:["roomId","reason","operateUser"],[ak.onConferenceInfoChanged]:["conferenceInfo","modifyFlag"],[ak.onScheduleAttendeesChanged]:["roomId","leftUsers","joinedUsers"],[ak.onConferenceStatusChanged]:["roomId","status"],[sk.onReceiveInvitation]:["roomInfo","invitation","extensionInfo"],[sk.onInvitationHandledByOtherDevice]:["roomInfo","accepted"],[sk.onInvitationCancelled]:["roomInfo","invitation"],[sk.onInvitationAccepted]:["roomInfo","invitation"],[sk.onInvitationRejected]:["roomInfo","invitation","reason"],[sk.onInvitationTimeout]:["roomInfo","invitation"],[sk.onInvitationRevokedByAdmin]:["roomInfo","invitation","operateUser"],[sk.onInvitationAdded]:["roomInfo","invitation"],[sk.onInvitationRemoved]:["roomInfo","invitation"],[sk.onInvitationStatusChanged]:["roomInfo","invitation"]};function mk(e,t){const n=pk(t),r={};return gk[e].forEach(((e,t)=>{r[e]=n[t]})),r}class yk extends Error{constructor(e){const{code:t,message:n,name:r}=e;super(n),this.code=t,this.message=n,this.name=r||""}}const Rk="INVALID_PARAMETER_REQUIRED",Tk="INVALID_PARAMETER_TYPE",Ek="INVALID_PARAMETER_EMPTY",Ck="INVALID_PARAMETER_INSTANCE",_k="INVALID_PARAMETER_RANGE",Sk="CANNOT_LESS_THAN_ZERO",Ak={INVALID_PARAMETER_REQUIRED:e=>{const{key:t,rule:n,fnName:r,value:o}=e;return`'${t||n.name}' is a required param when calling ${r}(), received: ${o}.`},INVALID_PARAMETER_TYPE:e=>{const{key:t,rule:n,fnName:r,value:o}=e,i=`${t||n.name}`;let a="";return a=Array.isArray(n.type)?n.type.join("|"):n.type,`'${i}' must be type of ${a} when calling ${r}(), received type: ${hk(o)}.`},INVALID_PARAMETER_EMPTY:e=>{const{key:t,rule:n,fnName:r,value:o}=e;return`'${t||n.name}' cannot be '${o}' when calling ${r}().`},INVALID_PARAMETER_INSTANCE:e=>{const{key:t,rule:n,fnName:r,value:o}=e;return`'${`${t||n.name}`}' must be instanceof ${`${n.instanceOf.name||n.instanceOf}`} when calling ${r}(), received type: ${hk(o)}.`},INVALID_PARAMETER_RANGE:e=>{const{key:t,rule:n,fnName:r,value:o}=e;return`'${t||n.name}' must be one of ${n.values.join("|")} when calling ${r}(), received: ${o}.`},CANNOT_LESS_THAN_ZERO:e=>{const{key:t,rule:n,fnName:r,value:o}=e;return`'${t||n.name}' cannot be less than 0 when calling ${r}().`},xxx:"lajfl "};function Ik(e){const{key:t,data:n}=e;return Ak[t]?ck(Ak[t])?Ak[t](n):dk(Ak[t])?Ak[t]:"":""}function bk(...e){return function(t,n,r){const o=r.value;return r.value=function(...t){return Ok.call(this,e,t,n,this.className),o.apply(this,t)},r}}function wk(...e){return function(t,n,o){const i=o.value;return o.value=function(...t){return r(this,void 0,void 0,(function*(){return Ok.call(this,e,t,n,this.className),i.apply(this,t)}))},o}}function Ok(e,t,n,r){try{for(let o=0;o<e.length;o++)Mk.call(this,{rule:e[o],value:t[o],key:e[o].name,fnName:n,className:r})}catch(UN){throw console.error(UN,UN.code,UN.message),UN}}function Mk(e){const{rule:t,value:n,key:r,fnName:o,className:i}=e;if(lk(n)){if(t.required)throw new yk({code:DM.ERR_INVALID_PARAMETER,message:Ik({key:Rk,data:{key:r,rule:t,fnName:o,value:n}})});return}if(Array.isArray(t.type)){if(!t.type.map((e=>e.toLowerCase())).includes(hk(n)))throw new yk({code:DM.ERR_INVALID_PARAMETER,message:Ik({key:Tk,data:{key:r,rule:t,fnName:o,value:n}})})}else if(!lk(t.type)&&hk(n)!==t.type)throw new yk({code:DM.ERR_INVALID_PARAMETER,message:Ik({key:Tk,data:{key:r,rule:t,fnName:o,value:n}})});if(!1===t.allowEmpty){const e=fk(n)&&(0===n||Number.isNaN(n)),i=dk(n)&&""===n.trim();if(e||i)throw new yk({code:DM.ERR_INVALID_PARAMETER,message:Ik({key:Ek,data:{key:r,rule:t,fnName:o,value:n}})})}if(t.notLessThanZero&&fk(n)&&n<0)throw new yk({code:DM.ERR_INVALID_PARAMETER,message:Ik({key:Sk,data:{key:r,rule:t,fnName:o,value:n}})});if(dk(t.instanceOf)){if(!n||n.name_!==t.instanceOf)throw new yk({code:DM.ERR_INVALID_PARAMETER,message:Ik({key:Ck,data:{key:r,rule:t,fnName:o,value:n}})})}else if(ck(t.instanceOf)&&!(n instanceof t.instanceOf))throw new yk({code:DM.ERR_INVALID_PARAMETER,message:Ik({key:Ck,data:{key:r,rule:t,fnName:o,value:n}})});if(t.values&&!t.values.includes(n))throw new yk({code:DM.ERR_INVALID_PARAMETER,message:Ik({key:_k,data:{key:r,rule:t,fnName:o,value:n}})});const{properties:a}=t;vk(a)&&"object"===hk(n)&&Object.keys(a).forEach((e=>{Mk.call(this,{rule:a[e],value:n&&n[e],key:`${r}.${e}`,fnName:o,className:i})}));const{arrayItem:s}=t;vk(s)&&(e=>"array"===hk(e))(n)&&n.forEach(((e,t)=>{Mk.call(this,{rule:s,value:e,key:`${r}[${t}]`,fnName:o,className:i})})),ck(t.validate)&&t.validate.call(this,n,r,o,i,this)}const kk=new WeakMap;function Nk(){return function(e,t,n){const r=n.value,o=e=>{const{fn:t,args:n,context:r,resolve:i,reject:a}=e;t.apply(r,n).then(i,a).finally((()=>{const e=kk.get(r);e&&(e.shift(),e[0]&&o(Object.assign({},e[0])))}))};return n.value=function(...e){return new Promise(((n,i)=>{if(kk.has(this)){const a=kk.get(this),{length:s}=a;a.push({fn:r,args:e,context:this,resolve:n,reject:i,name:t}),0===s&&o({fn:r,args:e,context:this,resolve:n,reject:i})}else kk.set(this,[{fn:r,args:e,context:this,resolve:n,reject:i,name:t}]),o({fn:r,args:e,context:this,resolve:n,reject:i})}))},n}}const Dk="string",Pk="number",Lk="boolean",Vk="array",xk="object",Uk={ELECTRON:"electron",WEB:"web",MINI_PROGRAM:"miniProgram"},Fk={login:{name:"options",required:!0,type:xk,properties:{sdkAppId:{required:!0,type:Pk,allowEmpty:!1},userId:{required:!0,type:Dk,allowEmpty:!1},userSig:{required:!0,type:Dk,allowEmpty:!1}}},setSelfInfo:{name:"options",required:!0,type:xk,properties:{userName:{required:!0,type:Dk},avatarUrl:{required:!0,type:Dk},customInfo:{required:!1,type:xk,allowEmpty:!1}}},createRoom:{name:"options",required:!0,type:xk,properties:{roomId:{required:!0,type:Dk,allowEmpty:!1},roomName:{type:Dk,allowEmpty:!1},roomType:{instanceof:FM},isMicrophoneDisableForAllUser:{type:Lk},isScreenShareDisableForAllUser:{type:Lk},isCameraDisableForAllUser:{type:Lk},isMessageDisableForAllUser:{type:Lk},maxSeatCount:{type:Pk},password:{type:Dk}}},enterRoom:{name:"options",required:!0,type:xk,properties:{roomId:{required:!0,type:Dk,allowEmpty:!1},roomType:{instanceof:FM},options:{type:xk,properties:{password:{type:Dk}}}}},updateRoomNameByAdmin:{name:"options",require:!0,type:xk,properties:{roomName:{require:!0,type:Dk,allowEmpty:!1}}},setRoomMaxSeatCount:{name:"options",require:!0,type:xk,properties:{maxSeatCount:{require:!0,type:Pk}}},getUserList:{name:"options",required:!1,type:xk,properties:{nextSequence:{type:Pk}}},getUserInfo:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1}}},setCustomInfoForUser:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1},customInfo:{required:!0,type:xk,allowEmpty:!1}}},takeSeat:{name:"options",required:!0,type:xk,properties:{seatIndex:{required:!0,type:Pk},timeout:{required:!0,type:Pk},requestCallback:{instanceof:Function}}},getSeatList:{},openRemoteDeviceByAdmin:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1},timeout:{required:!0,type:Pk},device:{require:!0,instanceof:$M}}},closeRemoteDeviceByAdmin:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1},device:{required:!0,instanceof:$M}}},takeUserOnSeatByAdmin:{name:"options",required:!0,type:xk,properties:{seatIndex:{required:!0,type:Pk},userId:{required:!0,type:Dk,allowEmpty:!1},timeout:{required:!0,type:Pk},requestCallback:{instanceof:Function}}},kickUserOffSeatByAdmin:{name:"options",required:!0,type:xk,properties:{seatIndex:{required:!0,type:Pk},userId:{required:!0,type:Dk,allowEmpty:!1}}},cancelRequest:{name:"options",required:!0,type:xk,properties:{requestId:{required:!0,type:Dk,allowEmpty:!1}}},responseRemoteRequest:{name:"options",required:!0,type:xk,properties:{requestId:{required:!0,type:Dk,allowEmpty:!1},agree:{required:!0,type:Lk}}},setLocalVideoView:{name:"options",required:!0,type:xk,properties:{view:{required:!0,type:[Dk,Vk,"null"],allowEmpty:!1,validate:e=>{if(e instanceof Array){if(e.some((e=>null===e)))throw new yk({code:DM.ERR_INVALID_PARAMETER,message:"When calling the setLocalVideoView interface with the view parameter as an array, the array content cannot contain null."})}}}}},openLocalCamera:{name:"options",type:xk,properties:{isFrontCamera:{type:Lk,allowEmpty:!1}}},closeLocalCamera:{},openLocalMicrophone:{},closeLocalMicrophone:{},setVideoResolutionMode:{name:"options",required:!0,type:xk,properties:{streamType:{required:!0,instanceof:xM},resolutionMode:{required:!0,instanceof:YM}}},updateVideoQuality:{name:"options",required:!0,type:xk,properties:{quality:{required:!0,instanceof:LM}}},updateVideoQualityEx:{name:"options",required:!0,type:xk,properties:{streamType:{required:!0,instanceof:xM},encoderParams:{required:!0,properties:{quality:{instanceof:LM},fps:{type:Pk},bitrate:{type:Pk},resolutionMode:{instanceof:YM}}}}},updateAudioQuality:{name:"options",required:!0,type:xk,properties:{quality:{required:!0,instanceof:VM}}},muteRemoteAudioStream:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1},isMute:{required:!0,type:Lk}}},startPushLocalVideo:{},stopPushLocalVideo:{},setRemoteVideoView:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1},streamType:{required:!0,instanceof:xM},view:{required:!0,type:[Dk,Vk],allowEmpty:!1}}},startPlayRemoteVideo:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1},streamType:{required:!0,instanceof:xM}}},stopPlayRemoteVideo:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1},streamType:{required:!0,instanceof:xM}}},changeUserRole:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1},userRole:{required:!0,instanceof:PM}}},changeUserNameCard:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1},nameCard:{required:!0,type:Dk}}},kickRemoteUserOutOfRoom:{name:"options",required:!0,type:xk,properties:{userId:{required:!0,type:Dk,allowEmpty:!1}}},sendTextMessage:{name:"options",required:!0,type:xk,properties:{messageText:{require:!0,type:Dk,allowEmpty:!1}}},sendCustomMessage:{name:"options",required:!0,type:xk,properties:{messageText:{require:!0,type:Dk,allowEmpty:!1}}},startScreenSharing:{name:"options",type:xk,properties:{screenAudio:{type:Lk}}},stopScreenSharing:{},startScreenSharingElectron:{name:"targetId",required:!0,type:Dk},selectScreenSharingTarget:{name:"targetId",required:!0,type:Dk},setCurrentCameraDevice:{name:"options",required:!0,type:xk,properties:{deviceId:{require:!0,type:Dk}}},setCurrentMicDevice:{name:"options",required:!0,type:xk,properties:{deviceId:{require:!0,type:Dk}}},setCurrentSpeakerDevice:{name:"options",required:!0,type:xk,properties:{deviceId:{require:!0,type:Dk}}},disableDeviceForAllUserByAdmin:{name:"options",required:!0,type:xk,properties:{isDisable:{require:!0,type:Lk},device:{require:!0,instanceof:$M}}},disableSendingMessageForAllUser:{name:"options",required:!0,type:xk,properties:{isDisable:{require:!0,type:Lk}}},disableSendingMessageByAdmin:{name:"options",required:!0,type:xk,properties:{userId:{require:!0,instanceof:Dk},isDisable:{require:!0,type:Lk}}},updateRoomSeatModeByAdmin:{name:"options",required:!0,type:xk,properties:{seatMode:{require:!0,instanceof:jM}}},updateRoomPasswordByAdmin:{name:"options",required:!0,type:xk,properties:{password:{required:!0,type:Dk,allowEmpty:!1}}},applyToAdminToOpenLocalDevice:{name:"options",required:!0,type:xk,properties:{timeout:{required:!0,type:Pk},device:{require:!0,instanceof:$M}}},lockSeatByAdmin:{name:"options",required:!0,type:xk,properties:{seatIndex:{required:!0,type:Pk},lockParams:{require:!0,type:xk,properties:{lockSeat:{require:!0,type:Lk},lockVideo:{require:!0,type:Lk},lockAudio:{require:!0,type:Lk}}}}}};class jk{constructor(e,t){if(this.trtcCloud=e,t){const{userId:n,sdkAppId:r,seq:o}=t;this.seq=o,e._log&&(this.logger=e._log.createLogger({id:`roomEngine${o}`,userId:n,sdkAppId:r}))}else this.logger=e._log;this.logger||(this.logger={debug:t=>{e.logger&&e.logger.debug?e.logger.debug(t):console.debug(this.getTime(),t)},info:t=>{e.logger&&e.logger.info?e.logger.info(t):console.info(this.getTime(),t)},warn:t=>{e.logger&&e.logger.warn?e.logger.warn(t):console.warn(this.getTime(),t)},error:t=>{e.logger&&e.logger.error?e.logger.error(t):console.error(this.getTime(),t)}})}getLogMessage(e){try{return e.map((e=>"string"!=typeof e?JSON.stringify(e):e)).join(" ")}catch(UN){return e}}update(e){const{userId:t,sdkAppId:n}=e;this.trtcCloud._log&&this.trtcCloud._log.createLogger&&(this.logger=this.trtcCloud._log.createLogger({id:`roomEngine${this.seq}`,userId:t,sdkAppId:n}))}debug(...e){const t=this.getLogMessage(e);this.logger.debug(t)}info(...e){const t=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(t)}warn(...e){const t=this.getLogMessage(e);this.logger&&this.logger.warn&&this.logger.warn(t)}error(...e){const t=this.getLogMessage(e);this.logger&&this.logger.error&&this.logger.error(t)}getTime(){const e=new Date;return`${e.toLocaleTimeString("en-US",{hour12:!1})}.${function(e){let t;switch(e.toString().length){case 1:t=`00${e}`;break;case 2:t=`0${e}`;break;default:t=e}return t}(e.getMilliseconds())}`}}const $k=new uk;class qk{constructor(e){const{logger:t,trtcCloud:n}=e;return qk.deviceManager||(this.logger=t,this.trtcCloud=n,qk.deviceManager=this),qk.deviceManager}setDeviceManagerWASM(e){this.deviceManagerWASM=e.getExtensionManager("TUIRoomDeviceManagerWASM")}JSCallNativeFunctionPromise(e,...t){return new Promise(((n,r)=>{const o=t=>{this.logger.info(`deviceManager.${e} success`,pk(t)),n(pk(t))},i=(t,n)=>{this.logger.warn(`deviceManager.${e} fail. `,t,n),r(new yk({code:t,message:n}))};try{t.length>0?this.deviceManagerWASM[e](...t,o,i):this.deviceManagerWASM[e](o,i)}catch(UN){this.logger.warn(`deviceManager.${e} error. `,UN.code,UN.message),r(new yk({code:UN.code||DM.ERR_FAILED,message:UN.message}))}}))}getDevicesList(e){return r(this,void 0,void 0,(function*(){return[]}))}setCurrentDevice(e){return r(this,void 0,void 0,(function*(){}))}getCurrentDevice(e){}startCameraDeviceTest(e){return r(this,void 0,void 0,(function*(){}))}stopCameraDeviceTest(){return r(this,void 0,void 0,(function*(){}))}startMicDeviceTest(e){return r(this,void 0,void 0,(function*(){}))}stopMicDeviceTest(){return r(this,void 0,void 0,(function*(){}))}startSpeakerDeviceTest(e){return r(this,void 0,void 0,(function*(){}))}stopSpeakerDeviceTest(){return r(this,void 0,void 0,(function*(){}))}isFrontCamera(){return!!ck(this.trtcCloud.isFrontCamera)&&this.trtcCloud.isFrontCamera()}switchCamera(e){return r(this,void 0,void 0,(function*(){this.logger.info("deviceManager.switchCamera with options: ",e);const{isFrontCamera:t}=e;this.deviceManagerWASM?yield this.JSCallNativeFunctionPromise("switchCamera",t):yield this.trtcCloud.switchCamera(t)}))}isAutoFocusEnabled(){return!!ck(this.trtcCloud.isAutoFocusEnabled)&&this.trtcCloud.isAutoFocusEnabled()}enableCameraTorch(e){ck(this.trtcCloud.enableCameraTorch)&&this.trtcCloud.enableCameraTorch(e.enabled)}setAudioRoute(e){ck(this.trtcCloud.setAudioRoute)&&this.trtcCloud.setAudioRoute(e.route)}on(e,t){$k.on(e,t),this.handleTrtcCloudBindEvent(e)}handleTrtcCloudBindEvent(e){const t={[ik.onDeviceChanged]:"onDeviceChange",[ik.onTestMicVolume]:"onTestMicVolume",[ik.onTestSpeakerVolume]:"onTestSpeakerVolume"}[e]||e;this.trtcCloud.removeAllListeners&&this.trtcCloud.removeAllListeners(t),this.trtcCloud.on(t,((...t)=>{const n=mk(e,t);"{}"===JSON.stringify(n)?$k.emit(e):$k.emit(e,n);[ik.onTestMicVolume,ik.onTestSpeakerVolume].includes(e)||this.logger.info(`DeviceManager received event: [${e}] ${JSON.stringify(n)}`)}))}off(e,t){$k.off(e,t)}}var Bk;const Wk=(null===(Bk=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===Bk?void 0:Bk.toLowerCase().indexOf(" electron/"))>-1,Jk="undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting),Qk=new uk;class Hk{constructor(e){const{logger:t,roomEngineWASM:n}=e;return Hk.conferenceListManager||(this.logger=t,this.conferenceListManagerWASM=n.getExtensionManager("TUIConferenceListManagerWASM"),Hk.conferenceListManager=this,this.observerFunction=this.observerFunction.bind(this),this.conferenceListManagerWASM.setObserver(this.observerFunction)),Hk.conferenceListManager}JSCallNativeFunctionPromise(e,...t){return new Promise(((n,r)=>{const o=t=>{this.logger.info(`ConferenceListManager.${e} success`,pk(t)),n(pk(t))},i=(t,n)=>{this.logger.warn(`ConferenceListManager.${e} fail. `,t,n),r(new yk({code:t,message:n}))};try{t.length>0?this.conferenceListManagerWASM[e](...t,o,i):this.conferenceListManagerWASM[e](o,i)}catch(UN){this.logger.warn(`ConferenceListManager.${e} error. `,UN.code,UN.message),r(new yk({code:UN.code||DM.ERR_FAILED,message:UN.message}))}}))}scheduleConference(e){return r(this,void 0,void 0,(function*(){const{scheduleStartTime:t,scheduleEndTime:n,scheduleAttendees:r=[],reminderSecondsBeforeStart:o=0,roomId:i,roomName:a,roomType:s,maxSeatCount:u,isSeatEnabled:c=!1,seatMode:l=jM.kFreeToTake,isMicrophoneDisableForAllUser:d,isScreenShareDisableForAllUser:f,isCameraDisableForAllUser:h,isMessageDisableForAllUser:v,password:p=""}=e;delete e.password,this.logger.info("conferenceListManager.scheduleConference with options: ",e);const g={scheduleStartTime:t,scheduleEndTime:n,scheduleAttendees:r,reminderSecondsBeforeStart:o,roomId:i,roomType:s,roomName:a,isSeatEnabled:c,seatMode:l,isMicrophoneDisableForAllUser:d,isScreenShareDisableForAllUser:f,isCameraDisableForAllUser:h,isMessageDisableForAllUser:v,maxSeatCount:u,password:p};yield this.JSCallNativeFunctionPromise("scheduleConference",g)}))}cancelConference(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceListManager.cancelConference with options: ",e);const{roomId:t}=e;yield this.JSCallNativeFunctionPromise("cancelConference",t)}))}updateConferenceInfo(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceListManager.updateConferenceInfo with options: ",e),yield this.JSCallNativeFunctionPromise("updateConferenceInfo",e)}))}fetchScheduledConferenceList(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceListManager.fetchScheduledConferenceList with options: ",e);const{cursor:t,count:n}=e,r=e&&e.statusArray||[ZM.kConferenceStatusNotStarted,ZM.kConferenceStatusRunning];let o=0;for(let e=0;e<r.length;e++)o|=r[e];return yield this.JSCallNativeFunctionPromise("fetchScheduledConferenceList",o,t,n)}))}fetchAttendeeList(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceListManager.fetchAttendeeList with options: ",e);const{roomId:t,cursor:n,count:r}=e;return yield this.JSCallNativeFunctionPromise("fetchAttendeeList",t,n,r)}))}addAttendeesByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceListManager.addAttendeesByAdmin with options: ",e);const{roomId:t,userIdList:n}=e;yield this.JSCallNativeFunctionPromise("addAttendeesByAdmin",t,n)}))}removeAttendeesByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceListManager.removeAttendeesByAdmin with options: ",e);const{roomId:t,userIdList:n}=e;yield this.JSCallNativeFunctionPromise("removeAttendeesByAdmin",t,n)}))}on(e,t){this.logger.info(`listen for event: ${e}`),Qk.on(e,t)}observerFunction(e,t){const n=mk(e,t);"{}"===JSON.stringify(n)?Qk.emit(e):(this.handleConferenceChangedEvent(e,n),Qk.emit(e,n)),this.logger.info(`ConferenceListManager received event: [${e}] ${JSON.stringify(n)}`)}handleConferenceChangedEvent(e,t){if(e===ak.onConferenceInfoChanged){const e=t.modifyFlag,{conferenceInfo:n}=t,r={basicRoomInfo:{roomId:n.basicRoomInfo.roomId}};e&Hk.ROOM_NAME&&(r.basicRoomInfo.roomName=n.basicRoomInfo.roomName),e&Hk.SCHEDULED_START_TIME&&(r.scheduleStartTime=n.scheduleStartTime),e&Hk.SCHEDULED_END_TIME&&(r.scheduleEndTime=n.scheduleEndTime),delete t.modifyFlag,delete t.conferenceInfo,t.conferenceModifyInfo=r}}off(e,t){Qk.off(e,t)}}Hk.ROOM_NAME=1,Hk.SCHEDULED_START_TIME=65536,Hk.SCHEDULED_END_TIME=1<<17;const Yk=new uk;class Gk{constructor(e){const{logger:t,roomEngineWASM:n}=e;return Gk.conferenceInvitationManager||(this.logger=t,this.conferenceInvitationManagerWASM=n.getExtensionManager("TUIConferenceInvitationManagerWASM"),Gk.conferenceInvitationManager=this,this.observerFunction=this.observerFunction.bind(this),this.conferenceInvitationManagerWASM.setObserver(this.observerFunction)),Gk.conferenceInvitationManager}JSCallNativeFunctionPromise(e,...t){return new Promise(((n,r)=>{const o=t=>{this.logger.info(`ConferenceInvitationManager.${e} success`,pk(t)),n(pk(t))},i=(t,n)=>{this.logger.warn(`ConferenceInvitationManager.${e} fail. `,t,n),r(new yk({code:t,message:n}))};try{t.length>0?this.conferenceInvitationManagerWASM[e](...t,o,i):this.conferenceInvitationManagerWASM[e](o,i)}catch(UN){this.logger.warn(`ConferenceInvitationManager.${e} error. `,UN.code,UN.message),r(new yk({code:UN.code||DM.ERR_FAILED,message:UN.message}))}}))}inviteUsers(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceInvitationManager.inviteUsers with options: ",e);const{roomId:t,userIdList:n,timeout:r,extensionInfo:o=""}=e;yield this.JSCallNativeFunctionPromise("inviteUsers",t,n,r,o)}))}cancelInvitation(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceInvitationManager.cancelInvitation with options: ",e);const{roomId:t,userIdList:n}=e;yield this.JSCallNativeFunctionPromise("cancelInvitation",t,n)}))}accept(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceInvitationManager.accept with options: ",e);const{roomId:t}=e;yield this.JSCallNativeFunctionPromise("accept",t)}))}reject(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceInvitationManager.reject with options: ",e);const{roomId:t,reason:n}=e;yield this.JSCallNativeFunctionPromise("reject",t,n)}))}getInvitationList(e){return r(this,void 0,void 0,(function*(){this.logger.info("conferenceInvitationManager.getInvitationList with options: ",e);const{roomId:t,cursor:n,count:r}=e;return yield this.JSCallNativeFunctionPromise("getInvitationList",t,n,r)}))}on(e,t){this.logger.info(`listen for event: ${e}`),Yk.on(e,t)}observerFunction(e,t){const n=mk(e,t);"{}"===JSON.stringify(n)?Yk.emit(e):Yk.emit(e,n),this.logger.info(`ConferenceListManager received event: [${e}] ${JSON.stringify(n)}`)}off(e,t){Yk.off(e,t)}}var Kk,zk,Xk,Zk,eN,tN,nN,rN,oN,iN,aN,sN,uN,cN,lN,dN,fN,hN,vN;!function(e){e[e.TRTCVideoResolution_120_120=1]="TRTCVideoResolution_120_120",e[e.TRTCVideoResolution_160_160=3]="TRTCVideoResolution_160_160",e[e.TRTCVideoResolution_270_270=5]="TRTCVideoResolution_270_270",e[e.TRTCVideoResolution_480_480=7]="TRTCVideoResolution_480_480",e[e.TRTCVideoResolution_160_120=50]="TRTCVideoResolution_160_120",e[e.TRTCVideoResolution_240_180=52]="TRTCVideoResolution_240_180",e[e.TRTCVideoResolution_280_210=54]="TRTCVideoResolution_280_210",e[e.TRTCVideoResolution_320_240=56]="TRTCVideoResolution_320_240",e[e.TRTCVideoResolution_400_300=58]="TRTCVideoResolution_400_300",e[e.TRTCVideoResolution_480_360=60]="TRTCVideoResolution_480_360",e[e.TRTCVideoResolution_640_480=62]="TRTCVideoResolution_640_480",e[e.TRTCVideoResolution_960_720=64]="TRTCVideoResolution_960_720",e[e.TRTCVideoResolution_160_90=100]="TRTCVideoResolution_160_90",e[e.TRTCVideoResolution_256_144=102]="TRTCVideoResolution_256_144",e[e.TRTCVideoResolution_320_180=104]="TRTCVideoResolution_320_180",e[e.TRTCVideoResolution_480_270=106]="TRTCVideoResolution_480_270",e[e.TRTCVideoResolution_640_360=108]="TRTCVideoResolution_640_360",e[e.TRTCVideoResolution_960_540=110]="TRTCVideoResolution_960_540",e[e.TRTCVideoResolution_1280_720=112]="TRTCVideoResolution_1280_720",e[e.TRTCVideoResolution_1920_1080=114]="TRTCVideoResolution_1920_1080"}(Kk||(Kk={})),function(e){e[e.TRTCVideoStreamTypeBig=0]="TRTCVideoStreamTypeBig",e[e.TRTCVideoStreamTypeSmall=1]="TRTCVideoStreamTypeSmall",e[e.TRTCVideoStreamTypeSub=2]="TRTCVideoStreamTypeSub"}(zk||(zk={})),function(e){e[e.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",e[e.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit"}(Xk||(Xk={})),function(e){e[e.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",e[e.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",e[e.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable"}(Zk||(Zk={})),function(e){e[e.TRTCBeautyStyleSmooth=0]="TRTCBeautyStyleSmooth",e[e.TRTCBeautyStyleNature=1]="TRTCBeautyStyleNature"}(eN||(eN={})),function(e){e[e.TRTCAppSceneVideoCall=0]="TRTCAppSceneVideoCall",e[e.TRTCAppSceneLIVE=1]="TRTCAppSceneLIVE",e[e.TRTCAppSceneAudioCall=2]="TRTCAppSceneAudioCall",e[e.TRTCAppSceneVoiceChatRoom=3]="TRTCAppSceneVoiceChatRoom"}(tN||(tN={})),function(e){e[e.TRTCRoleAnchor=20]="TRTCRoleAnchor",e[e.TRTCRoleAudience=21]="TRTCRoleAudience"}(nN||(nN={})),function(e){e[e.TRTCAudioQualityDefault=0]="TRTCAudioQualityDefault",e[e.TRTCAudioQualitySpeech=1]="TRTCAudioQualitySpeech",e[e.TRTCAudioQualityMusic=3]="TRTCAudioQualityMusic"}(rN||(rN={}));class pN{constructor(e="",t="",n="",r="",o=""){this.deviceId=e,this.deviceName=t,this.kind=n,this.label=r,this.groupId=o}}!function(e){e[e.TRTCDeviceStateAdd=0]="TRTCDeviceStateAdd",e[e.TRTCDeviceStateRemove=1]="TRTCDeviceStateRemove",e[e.TRTCDeviceStateActive=2]="TRTCDeviceStateActive"}(oN||(oN={})),function(e){e[e.TRTCDeviceTypeUnknow=-1]="TRTCDeviceTypeUnknow",e[e.TRTCDeviceTypeMic=0]="TRTCDeviceTypeMic",e[e.TRTCDeviceTypeSpeaker=1]="TRTCDeviceTypeSpeaker",e[e.TRTCDeviceTypeCamera=2]="TRTCDeviceTypeCamera"}(iN||(iN={}));class gN{constructor(e=0,t="",n="",r=0,o="",i=nN.TRTCRoleAnchor,a=null,s=null,u=null,c=null,l=30){this.sdkAppId=e,this.userId=t,this.userSig=n,this.roomId=r,this.strRoomId=o,this.role=i,this.privateMapKey=a,this.streamId=u,this.userDefineRecordId=c,this.frameWorkType=l}}class mN{constructor(e=Kk.TRTCVideoResolution_640_360,t=15,n=550){this.videoResolution=e,this.videoFps=t,this.videoBitrate=n}}!function(e){e[e.TRTCVideoRotation0=0]="TRTCVideoRotation0",e[e.TRTCVideoRotation90=1]="TRTCVideoRotation90",e[e.TRTCVideoRotation180=2]="TRTCVideoRotation180",e[e.TRTCVideoRotation270=3]="TRTCVideoRotation270"}(aN||(aN={}));class yN{constructor(e=aN.TRTCVideoRotation0,t=Xk.TRTCVideoFillMode_Fit,n=Zk.TRTCVideoMirrorType_Disable){this.rotation=e,this.fillMode=t,this.mirrorType=n}}!function(e){e[e.TRTCQuality_Unknown=0]="TRTCQuality_Unknown",e[e.TRTCQuality_Excellent=1]="TRTCQuality_Excellent",e[e.TRTCQuality_Good=2]="TRTCQuality_Good",e[e.TRTCQuality_Poor=3]="TRTCQuality_Poor",e[e.TRTCQuality_Bad=4]="TRTCQuality_Bad",e[e.TRTCQuality_Vbad=5]="TRTCQuality_Vbad",e[e.TRTCQuality_Down=6]="TRTCQuality_Down"}(sN||(sN={}));class RN{constructor(e="",t=sN.TRTCQuality_Unknown){this.userId=e,this.quality=t}}class TN{constructor(e="",t=0){this.userId=e,this.volume=t}}class EN{constructor(e=0,t=0,n=null){this.appId=e,this.bizId=t,this.url=n}}class CN{constructor(e=0,t=0,n=0,r=0,o=0,i=0,a=zk.TRTCVideoStreamTypeBig){this.width=e,this.height=t,this.frameRate=n,this.videoBitrate=r,this.audioSampleRate=o,this.audioBitrate=i,this.streamType=a}}class _N{constructor(e=0,t=0,n=0,r=0,o=0,i=0,a=0,s=[],u=0,c=0){this.upLoss=e,this.downLoss=t,this.appCpu=n,this.systemCpu=r,this.rtt=o,this.receivedBytes=i,this.sentBytes=a,this.localStatisticsArray=s,this.localStatisticsArraySize=u,this.remoteStatisticsArraySize=c}}!function(e){e[e.TRTCVideoResolutionModeLandscape=0]="TRTCVideoResolutionModeLandscape",e[e.TRTCVideoResolutionModePortrait=1]="TRTCVideoResolutionModePortrait"}(uN||(uN={})),function(e){e[e.TRTCVideoQosPreferenceSmooth=1]="TRTCVideoQosPreferenceSmooth",e[e.TRTCVideoQosPreferenceClear=2]="TRTCVideoQosPreferenceClear"}(cN||(cN={})),function(e){e[e.TRTCQosControlModeClient=0]="TRTCQosControlModeClient",e[e.TRTCQosControlModeServer=1]="TRTCQosControlModeServer"}(lN||(lN={}));class SN{constructor(e=cN.TRTCVideoQosPreferenceClear,t=lN.TRTCQosControlModeServer){this.preference=e,this.controlMode=t}}class AN{constructor(e=new ArrayBuffer(0),t=0,n=0,r=0){this.buffer=e,this.length=t,this.width=n,this.height=r}}!function(e){e[e.TRTCLogLevelVerbose=0]="TRTCLogLevelVerbose",e[e.TRTCLogLevelDebug=1]="TRTCLogLevelDebug",e[e.TRTCLogLevelInfo=2]="TRTCLogLevelInfo",e[e.TRTCLogLevelWarn=3]="TRTCLogLevelWarn",e[e.TRTCLogLevelError=4]="TRTCLogLevelError",e[e.TRTCLogLevelFatal=5]="TRTCLogLevelFatal",e[e.TRTCLogLevelNone=6]="TRTCLogLevelNone"}(dN||(dN={})),function(e){e[e.TRTCScreenCaptureSourceTypeUnknown=-1]="TRTCScreenCaptureSourceTypeUnknown",e[e.TRTCScreenCaptureSourceTypeWindow=0]="TRTCScreenCaptureSourceTypeWindow",e[e.TRTCScreenCaptureSourceTypeScreen=1]="TRTCScreenCaptureSourceTypeScreen",e[e.TRTCScreenCaptureSourceTypeCustom=2]="TRTCScreenCaptureSourceTypeCustom"}(fN||(fN={}));class IN{constructor(e=fN.TRTCScreenCaptureSourceTypeUnknown,t="",n="",r=new AN,o=new AN,i=!1){this.type=e,this.sourceId=t,this.sourceName=n,this.thumbBGRA=r,this.iconBGRA=o,this.isMinimizeWindow=i}}class bN{constructor(e=0,t=0,n=0,r=0){this.left=e,this.top=t,this.right=n,this.bottom=r}}class wN{constructor(e=hN.TRTCTranscodingConfigMode_Unknown,t=0,n=0,r=0,o=0,i=0,a=15,s=2,u=0,c="",l=64,d=48e3,f=1,h=[],v=""){this.mode=e,this.appId=t,this.bizId=n,this.videoWidth=r,this.videoHeight=o,this.videoBitrate=i,this.videoFramerate=a,this.videoGOP=s,this.backgroundColor=u,this.backgroundImage=c,this.audioSampleRate=l,this.audioBitrate=d,this.audioChannels=f,this.mixUsersArray=h,this.mixUsersArraySize=h.length,this.streamId=v}}!function(e){e[e.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",e[e.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",e[e.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",e[e.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",e[e.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",e[e.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",e[e.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",e[e.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",e[e.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",e[e.TRTC_TranscodingConfigMode_Template_ScreenSharing=9]="TRTC_TranscodingConfigMode_Template_ScreenSharing"}(hN||(hN={}));class ON{constructor(e="",t="",n=null,r=0,o=!1,i=zk.TRTCVideoStreamTypeBig,a=vN.TRTCMixInputTypeUndefined,s=0){this.userId=e,this.roomId=t,this.rect=n,this.zOrder=r,this.pureAudio=o,this.streamType=i,this.inputType=a,this.renderMode=s}}!function(e){e[e.TRTCMixInputTypeUndefined=0]="TRTCMixInputTypeUndefined",e[e.TRTCMixInputTypeAudioVideo=1]="TRTCMixInputTypeAudioVideo",e[e.TRTCMixInputTypePureVideo=2]="TRTCMixInputTypePureVideo",e[e.TRTCMixInputTypePureAudio=3]="TRTCMixInputTypePureAudio"}(vN||(vN={}));const MN={TRTCDeviceInfo:pN,TRTCAudioQuality:rN,TRTCScreenCaptureSourceInfo:IN,Rect:bN,TRTCScreenCaptureSourceType:fN,TRTCVideoEncParam:mN,TRTCVideoResolution:Kk,TRTCVideoResolutionMode:uN,TRTCVideoQosPreference:cN,TRTCBeautyStyle:eN,TRTCVideoStreamType:zk,TRTCVolumeInfo:TN,TRTCDeviceType:iN,TRTCDeviceState:oN,TRTCQualityInfo:RN,TRTCStatistics:_N,TRTCVideoFillMode:Xk,TRTCAppScene:tN,TRTCRoleType:nN,TRTCParams:gN,TRTCQuality:sN},kN=Wk?Uk.ELECTRON:Jk?Uk.MINI_PROGRAM:Uk.WEB,NN={};NN.TIM=e,NN.TRTCCloud=t,NN.TRTCDefine=MN,NN.TIMDefine=e.TYPES,NN.FRAMEWORK=Uk,NN.currentFrameWork=kN;const DN=t.getTRTCShareInstance();NN.isWXMiniProgram=!0;const PN=new jk(DN);NN.loggerManager=PN,NN.logger=PN,PN.info("TUIRoomEngine WX SDK Version:","3.1.1"),NN.roomInstanceMap=new Map;let LN=1;!function(){r(this,void 0,void 0,(function*(){yield kM(NN),xN.setModule(NN)}))}();const VN=new uk;class xN{static setModule(e){PN.info("TUIRoomEngineWASM ready!"),this.Module=e,this.isReady=!0,VN.emit("ready")}static once(e,t){VN.once(e,t),"ready"===e&&xN.isReady&&VN.emit("ready")}static getInstance(){return this.shareInstance||(this.shareInstance=new xN),this.shareInstance}constructor(){if(this.deviceManager=null,this.conferenceListManager=null,this.conferenceInvitationManager=null,this.roomId="",this.localVideoQuality=LM.kVideoQuality_720p,this.localAudioQuality=VM.kAudioProfileDefault,!xN.isReady)throw new yk({code:DM.ERR_FAILED,message:"Please listen to the ready event and then execute the constructor method. ref: https://cloud.tencent.com/document/product/647/98556#once"});if(!xN.shareInstance){const e=!0;this.roomEngineWASM=new xN.Module.TUIRoomEngineWASM(e),this.trtcCloud=this.roomEngineWASM.getTRTCCloud(),this.observerFunction=this.observerFunction.bind(this),this.roomEngineWASM.setObserver(this.observerFunction),this.logger=new jk(this.trtcCloud,{sdkAppId:xN.sdkAppId,userId:xN.userId,seq:LN}),LN+=1,NN.logger=this.logger,NN.wxMessageChannel=this.wxMessageChannel,xN.shareInstance=this}return xN.shareInstance}wxMessageChannel(e,t){"updatePusher"===e&&VN.emit("updatePusher",t)}static JSCallNativeFunctionPromise(e,...t){if(!this.Module||!this.Module.TUIRoomEngineWASM)throw new yk({code:-1,message:`TUIRoomEngine is not ready, please listen to the ready event and re-execute the TUIRoomEngine.${e} method.`});return new Promise(((n,r)=>{const o=t=>{PN.info(`TUIRoomEngine.${e} success.`),n(pk(t))},i=(t,n)=>{PN.warn(`TUIRoomEngine.${e} fail. `,t,n),r(new yk({code:t,message:n}))};try{this.Module.TUIRoomEngineWASM[e](...t,o,i)}catch(UN){PN.warn(`TUIRoomEngine.${e} error. `,UN.code,UN.message),r(new yk({code:UN.code||DM.ERR_FAILED,message:UN.message}))}}))}JSCallNativeFunctionPromise(e,...t){return new Promise(((n,r)=>{const o=t=>{this.logger.info(`roomEngine.${e} success`,pk(t)),n(pk(t))},i=(t,n)=>{this.logger.warn(`roomEngine.${e} fail. `,t,n),r(new yk({code:t,message:n}))};try{t.length>0?this.roomEngineWASM[e](...t,o,i):this.roomEngineWASM[e](o,i)}catch(UN){this.logger.warn(`roomEngine.${e} error. `,UN.code,UN.message),r(new yk({code:UN.code||DM.ERR_FAILED,message:UN.message}))}}))}JSCallNativeRequestFunctionPromise(e,...t){const n=t.splice(t.length-1,1)[0];return new Promise(((r,o)=>{const i=t=>{this.logger.info(`roomEngine.${e} success with request:`,pk(t)),r(pk(t))},a=(e,t,r,i,a)=>{e===QM.kRequestError?(n({requestCallbackType:e,requestId:r,userId:i,code:t,message:a}),o(new yk({code:t,message:a}))):n({requestCallbackType:e,requestId:r,userId:i,code:t,message:a})};try{this.roomEngineWASM[e](...t,i,a)}catch(UN){console.error(`roomEngine.${e} error. `,UN.code,UN.message),o(new yk({code:UN.code||DM.ERR_FAILED,message:UN.message}))}}))}static login(e){return r(this,void 0,void 0,(function*(){xN.isReady||(yield NN.ready);const{sdkAppId:t,userId:n,userSig:r,tim:o}=e;xN.userId=n,xN.sdkAppId=t,o&&(NN.tim=o),PN.info("TUIRoomEngine.login with options: ",e),yield this.JSCallNativeFunctionPromise("login",t,n,r)}))}static setSelfInfo(e){return r(this,void 0,void 0,(function*(){PN.info("TUIRoomEngine.setSelfInfo with options: ",e);const{userName:t,avatarUrl:n,customInfo:r}=e,o={userName:t,avatarUrl:n,customInfo:JSON.stringify(r)};yield this.JSCallNativeFunctionPromise("setSelfInfo",o)}))}static getSelfInfo(){return r(this,void 0,void 0,(function*(){return yield this.JSCallNativeFunctionPromise("getSelfInfo")}))}static logout(){return r(this,void 0,void 0,(function*(){PN.info("TUIRoomEngine.logout."),yield this.JSCallNativeFunctionPromise("logout")}))}createRoom(e){return r(this,void 0,void 0,(function*(){const{roomId:t,roomName:n,roomType:r,maxSeatCount:o,isSeatEnabled:i=!1,seatMode:a=jM.kFreeToTake,isMicrophoneDisableForAllUser:s,isScreenShareDisableForAllUser:u,isCameraDisableForAllUser:c,isMessageDisableForAllUser:l,password:d=""}=e;this.roomId=t,this.logger.update({sdkAppId:xN.sdkAppId,userId:xN.userId}),NN.roomInstanceMap.get(t)||NN.roomInstanceMap.set(t,{roomEngineWASM:this.roomEngineWASM,logger:this.logger}),delete e.password,this.logger.info("roomEngine.createRoom with options: ",e);const f={roomId:t,roomType:r,roomName:n,isSeatEnabled:i,seatMode:a,isMicrophoneDisableForAllUser:s,isScreenShareDisableForAllUser:u,isCameraDisableForAllUser:c,isMessageDisableForAllUser:l,maxSeatCount:o,password:d};yield this.JSCallNativeFunctionPromise("createRoom",f)}))}enterRoom(e){return r(this,void 0,void 0,(function*(){const{roomId:t,roomType:n=FM.kConference,options:r={}}=e;delete e.options,this.logger.info("roomEngine.enterRoom with options: ",e),this.roomId=t,this.logger.update({sdkAppId:xN.sdkAppId,userId:xN.userId}),NN.roomInstanceMap.get(t)||NN.roomInstanceMap.set(t,{roomEngineWASM:this.roomEngineWASM,logger:this.logger});const o=yield this.JSCallNativeFunctionPromise("enterRoom",t,n,r);return this.handleDeviceManagerWASM(),o}))}destroyRoom(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.destroyRoom"),yield this.JSCallNativeFunctionPromise("destroyRoom"),this.roomId&&NN.roomInstanceMap.get(this.roomId)&&NN.roomInstanceMap.delete(this.roomId)}))}exitRoom(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.exitRoom"),yield this.JSCallNativeFunctionPromise("exitRoom",!1),this.roomId&&NN.roomInstanceMap.get(this.roomId)&&NN.roomInstanceMap.delete(this.roomId)}))}fetchRoomInfo(e){return r(this,void 0,void 0,(function*(){if(!e)return yield this.JSCallNativeFunctionPromise("fetchRoomInfo");const{roomId:t,roomType:n}=e;return yield this.JSCallNativeFunctionPromise("fetchRoomInfoById",t,n)}))}updateRoomNameByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.updateRoomNameByAdmin with options: ",e);const{roomName:t}=e;yield this.JSCallNativeFunctionPromise("updateRoomNameByAdmin",t)}))}updateRoomSeatModeByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.updateRoomSeatModeByAdmin with options: ",e);const{seatMode:t}=e;yield this.JSCallNativeFunctionPromise("updateRoomSeatModeByAdmin",t)}))}updateRoomPasswordByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.updateRoomPasswordByAdmin");const{password:t}=e;yield this.JSCallNativeFunctionPromise("updateRoomPasswordByAdmin",t)}))}getUserList(e){return r(this,void 0,void 0,(function*(){const t=e&&e.nextSequence||0;return yield this.JSCallNativeFunctionPromise("getUserList",t)}))}getUserInfo(e){return r(this,void 0,void 0,(function*(){const{userId:t}=e;return yield this.JSCallNativeFunctionPromise("getUserInfo",t)}))}setCustomInfoForUser(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.setCustomInfoForUser with options: ",e);const{userId:t,customInfo:n}=e;return yield this.JSCallNativeFunctionPromise("setCustomInfoForUser",t,JSON.stringify(n))}))}setLocalVideoView(e){this.logger.info("roomEngine.setLocalVideoView with options: ",e);const{view:t}=e;this.JSCallNativeFunctionPromise("setLocalVideoView",t instanceof Array?t.join():t)}openLocalCamera(e={isFrontCamera:!0}){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.openLocalCamera",e);const{isFrontCamera:t}=e,n=t?1:0;yield this.JSCallNativeFunctionPromise("openLocalCamera",n,this.localVideoQuality)}))}closeLocalCamera(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.closeLocalCamera"),yield this.JSCallNativeFunctionPromise("closeLocalCamera")}))}openLocalMicrophone(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.openLocalMicrophone");try{yield this.JSCallNativeFunctionPromise("openLocalMicrophone",this.localAudioQuality)}catch(e){if("you have been muted the audio"===e.message||"open microphone need apply to admin"===e.message)return void this.logger.warn(e);throw e}}))}closeLocalMicrophone(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.closeLocalMicrophone"),yield this.JSCallNativeFunctionPromise("closeLocalMicrophone")}))}updateVideoQuality(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.updateVideoQuality with options: ",e);const{quality:t}=e;this.localVideoQuality=t,yield this.JSCallNativeFunctionPromise("updateVideoQuality",t)}))}setVideoResolutionMode(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.setVideoResolutionMode with options: ",e);const{streamType:t,resolutionMode:n}=e;yield this.JSCallNativeFunctionPromise("setVideoResolutionMode",t,n)}))}updateVideoQualityEx(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.updateVideoQualityEx with options: ",e);const{streamType:t,encoderParams:n}=e;n&&n.videoResolution&&t===xM.kCameraStream?this.localVideoQuality=n&&n.videoResolution:n&&n.quality&&(this.localVideoQuality=n&&n.quality,n.videoResolution=n.quality),yield this.JSCallNativeFunctionPromise("updateVideoQualityEx",t,n)}))}updateAudioQuality(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.updateAudioQuality with options: ",e);const{quality:t}=e;this.localAudioQuality=t,yield this.JSCallNativeFunctionPromise("updateAudioQuality",t)}))}startPushLocalVideo(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.startPushLocalVideo"),yield this.JSCallNativeFunctionPromise("startPushLocalVideo")}))}stopPushLocalVideo(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.stopPushLocalVideo"),yield this.JSCallNativeFunctionPromise("stopPushLocalVideo")}))}muteLocalAudio(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.muteLocalAudio"),yield this.JSCallNativeFunctionPromise("muteLocalAudio")}))}unmuteLocalAudio(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.unmuteLocalAudio"),yield this.JSCallNativeFunctionPromise("unmuteLocalAudio")}))}setRemoteVideoView(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.setRemoteVideoView with options: ",e);const{userId:t,streamType:n,view:r}=e;yield this.JSCallNativeFunctionPromise("setRemoteVideoView",t,n,r instanceof Array?r.join():r)}))}startPlayRemoteVideo(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.startPlayRemoteVideo with options: ",e);const{userId:t,streamType:n}=e;return new Promise(((e,r)=>{const o=(...t)=>{console.log("roomEngine startPlayRemoteVideo playingCallback",...t),e()},i=(...e)=>{console.log("roomEngine startPlayRemoteVideo loadingCallback",...e)},a=(...e)=>{console.log("roomEngine startPlayRemoteVideo errorCallback",...e),r()};try{this.roomEngineWASM.startPlayRemoteVideo(t,n,o,i,a)}catch(UN){console.error("roomEngine.startPlayRemoteVideo error. ",UN.code,UN.message);const t=new yk({code:UN.code||DM.ERR_FAILED,message:UN.message});r(t)}}))}))}stopPlayRemoteVideo(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.stopPlayRemoteVideo with options: ",e);const{userId:t,streamType:n}=e;yield this.JSCallNativeFunctionPromise("stopPlayRemoteVideo",t,n)}))}muteRemoteAudioStream(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.muteRemoteAudioStream with options",e);const{userId:t,isMute:n}=e;yield this.JSCallNativeFunctionPromise("muteRemoteAudioStream",t,n)}))}openRemoteDeviceByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.openRemoteDeviceByAdmin with options: ",e),e.requestCallback||(e.requestCallback=()=>{});const{userId:t,device:n,timeout:r,requestCallback:o}=e;return yield this.JSCallNativeRequestFunctionPromise("openRemoteDeviceByAdmin",t,n,r,o)}))}applyToAdminToOpenLocalDevice(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.applyToAdminToOpenLocalDevice with options: ",e),e.requestCallback||(e.requestCallback=()=>{});const{device:t,timeout:n,requestCallback:r}=e;return yield this.JSCallNativeRequestFunctionPromise("applyToAdminToOpenLocalDevice",t,n,r)}))}closeRemoteDeviceByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.closeRemoteDeviceByAdmin with options: ",e);const{userId:t,device:n}=e;yield this.JSCallNativeFunctionPromise("closeRemoteDeviceByAdmin",t,n)}))}cancelRequest(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.cancelRequest with options: ",e);const{requestId:t}=e;return yield this.JSCallNativeFunctionPromise("cancelRequest",t)}))}responseRemoteRequest(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.responseRemoteRequest with options: ",e);const{requestId:t,agree:n}=e;return yield this.JSCallNativeFunctionPromise("responseRemoteRequest",t,n)}))}disableDeviceForAllUserByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.disableDeviceForAllUserByAdmin with options: ",e);const{device:t,isDisable:n}=e;yield this.JSCallNativeFunctionPromise("disableDeviceForAllUserByAdmin",t,n)}))}disableSendingMessageForAllUser(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.disableSendingMessageForAllUser with options: ",e);const{isDisable:t}=e;yield this.JSCallNativeFunctionPromise("disableSendingMessageForAllUser",t)}))}disableSendingMessageByAdmin(e){return r(this,void 0,void 0,(function*(){const{userId:t,isDisable:n}=e;yield this.JSCallNativeFunctionPromise("disableSendingMessageByAdmin",t,n)}))}changeUserRole(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.changeUserRole with options: ",e);const{userId:t,userRole:n}=e;yield this.JSCallNativeFunctionPromise("changeUserRole",t,n)}))}changeUserNameCard(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.changeUserNameCard with options: ",e);const{userId:t,nameCard:n}=e;yield this.JSCallNativeFunctionPromise("changeUserNameCard",t,n)}))}kickRemoteUserOutOfRoom(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.kickRemoteUserOutOfRoom with options: ",e);const{userId:t}=e;yield this.JSCallNativeFunctionPromise("kickRemoteUserOutOfRoom",t)}))}getSeatList(){return r(this,void 0,void 0,(function*(){return yield this.JSCallNativeFunctionPromise("getSeatList")}))}takeSeat(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.takeSeat with options: ",e),e.requestCallback||(e.requestCallback=()=>{});const{seatIndex:t,timeout:n,requestCallback:r}=e;let o=!0,i={content:"",requestAction:0,requestId:"",timestamp:0,userId:"",userName:"",nameCard:"",avatarUrl:""};return new Promise(((e,a)=>{const s=t=>{const n=pk(t);""===n.requestId?(o=!1,i=n):(this.logger.info("roomEngine.takeSeat success with requestId:",n.requestId),e(n))},u=(t,n,s,u,c)=>{const l={requestCallbackType:t,requestId:s,userId:u,code:n,message:c};if(r(l),t===QM.kRequestAccepted&&!o)return this.logger.info("roomEngine.takeSeat success without request."),void e(i);this.logger.info("roomEngine.takeSeat response data:",l),t===QM.kRequestError&&a(new yk({code:n,message:c}))};try{this.roomEngineWASM.takeSeat(t,n,s,u)}catch(UN){console.error("roomEngine.takeSeat error. ",UN.code,UN.message),a(new yk({code:UN.code||DM.ERR_FAILED,message:UN.message}))}}))}))}leaveSeat(){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.leaveSeat"),yield this.JSCallNativeFunctionPromise("leaveSeat")}))}moveToSeat(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.moveToSeat with options:",e);const{targetSeatIndex:t}=e;yield this.JSCallNativeFunctionPromise("moveToSeat",t)}))}takeUserOnSeatByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.takeUserOnSeatByAdmin with options: ",e),e.requestCallback||(e.requestCallback=()=>{});const{seatIndex:t,userId:n,timeout:r,requestCallback:o}=e;return yield this.JSCallNativeRequestFunctionPromise("takeUserOnSeatByAdmin",t,n,r,o)}))}kickUserOffSeatByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.kickUserOffSeatByAdmin with options: ",e);const{seatIndex:t,userId:n}=e;yield this.JSCallNativeFunctionPromise("kickUserOffSeatByAdmin",t,n)}))}lockSeatByAdmin(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.lockSeatByAdmin with options: ",e);const{seatIndex:t,lockParams:n}=e;return yield this.JSCallNativeFunctionPromise("lockSeatByAdmin",t,n)}))}getSeatApplicationList(){return r(this,void 0,void 0,(function*(){return yield this.JSCallNativeFunctionPromise("getSeatApplicationList")}))}sendTextMessage(e){return r(this,void 0,void 0,(function*(){this.logger.warn("roomEngine.sendTextMessage is deprecated since v2.0.0, Please use roomEngine.getTIM.")}))}sendCustomMessage(e){return r(this,void 0,void 0,(function*(){this.logger.warn("roomEngine.sendCustomMessage is deprecated since v2.0.0, Please use roomEngine.getTIM.")}))}on(e,t){this.logger.info(`listen for event: ${e}`),VN.on(e,t)}observerFunction(e,t){const n=mk(e,t);"{}"===JSON.stringify(n)?VN.emit(e):(this.supportForDeprecatedEvents(e,n),VN.emit(e,n));[ok.onUserVoiceVolumeChanged,ok.onUserNetworkQualityChanged,ok.onReceiveTextMessage,ok.onReceiveCustomMessage].includes(e)||(e!==ok.onSeatListChanged?this.logger.info(`RoomEngine received event: [${e}] ${JSON.stringify(n)}`):this.logger.info(`RoomEngine received event: [onSeatListChanged] {seatedList: ${JSON.stringify(n.seatedList)}, leftList: ${JSON.stringify(n.leftList)}}`))}supportForDeprecatedEvents(e,t){switch(e){case ok.onUserRoleChanged:t.userId=t.userInfo.userId,t.userRole=t.userInfo.userRole;break;case ok.onKickedOffSeat:t.userId=t.userInfo.userId;break;case ok.onRequestCancelled:case ok.onRequestProcessed:t.userId=t.userInfo.userId,t.requestId=t.request.requestId}}off(e,t){VN.off(e,t)}getCameraDevicesList(){return r(this,void 0,void 0,(function*(){return[]}))}getMicDevicesList(){return r(this,void 0,void 0,(function*(){return[]}))}getSpeakerDevicesList(){return r(this,void 0,void 0,(function*(){return[]}))}setCurrentCameraDevice(e){return r(this,void 0,void 0,(function*(){}))}switchCamera(e){return r(this,void 0,void 0,(function*(){this.logger.info("roomEngine.switchCamera with options: ",e);const{isFrontCamera:t}=e;yield this.trtcCloud.switchCamera(t)}))}setCurrentMicDevice(e){return r(this,void 0,void 0,(function*(){}))}setCurrentSpeakerDevice(e){return r(this,void 0,void 0,(function*(){}))}getCurrentCameraDevice(){}getCurrentMicDevice(){}getCurrentSpeakerDevice(){}startCameraDeviceTest(e){return r(this,void 0,void 0,(function*(){}))}stopCameraDeviceTest(){return r(this,void 0,void 0,(function*(){}))}startMicDeviceTest(e){return r(this,void 0,void 0,(function*(){}))}stopMicDeviceTest(){return r(this,void 0,void 0,(function*(){}))}getMediaDeviceManager(){return this.deviceManager||(this.deviceManager=new qk({logger:this.logger,Module:xN.Module,trtcCloud:this.trtcCloud}),this.deviceManagerWASM&&this.deviceManager.setDeviceManagerWASM(this.deviceManagerWASM)),this.deviceManager}handleDeviceManagerWASM(){try{this.deviceManagerWASM=this.roomEngineWASM.getMediaDeviceManager(),this.deviceManager&&this.deviceManager.setDeviceManagerWASM(this.deviceManagerWASM)}catch(UN){this.logger.error("handleDeviceManagerWASM error",UN)}}getConferenceListManager(){return this.conferenceListManager||(this.conferenceListManager=new Hk({logger:this.logger,Module:xN.Module,roomEngineWASM:this.roomEngineWASM})),this.conferenceListManager}getConferenceInvitationManager(){return this.conferenceInvitationManager||(this.conferenceInvitationManager=new Gk({logger:this.logger,Module:xN.Module,roomEngineWASM:this.roomEngineWASM})),this.conferenceInvitationManager}getTRTCCloud(){return this.trtcCloud}getTIM(){return NN.tim}destroy(){this.logger.info("roomEngine.destroy"),this.roomEngineWASM.delete()}static callExperimentalAPI(e){return r(this,void 0,void 0,(function*(){PN.info("TUIRoomEngine.callExperimentalAPI",e);const t=pk(e);if(t===e)return;const{api:n,params:r}=t;if(n&&r)if("setFramework"===n)yield xN.handleSetFramework(r);else yield xN.JSCallNativeFunctionPromise("callExperimentalAPI",e)}))}static handleSetFramework(e){return r(this,void 0,void 0,(function*(){const{component:t,language:n}=e,r={[Uk.ELECTRON]:2,[Uk.MINI_PROGRAM]:3,[Uk.WEB]:30},o={TUIRoomEngine:16,TUIRoomKit:18,TIMRoomKit:19,TUILiveKit:21,VoiceRoom:22,EngineLive:23,Classroom:24},i={vue2:5,vue3:6};if(o[t]&&i[n]){const e=JSON.stringify({api:"setFramework",params:{framework:r[kN],component:o[t],language:i[n]}});yield xN.JSCallNativeFunctionPromise("callExperimentalAPI",e)}}))}}xN.className="TUIRoomEngine",xN.isReady=!1,n([wk(Fk.createRoom)],xN.prototype,"createRoom",null),n([wk(Fk.enterRoom)],xN.prototype,"enterRoom",null),n([wk(Fk.updateRoomNameByAdmin)],xN.prototype,"updateRoomNameByAdmin",null),n([wk(Fk.updateRoomSeatModeByAdmin)],xN.prototype,"updateRoomSeatModeByAdmin",null),n([wk(Fk.updateRoomPasswordByAdmin)],xN.prototype,"updateRoomPasswordByAdmin",null),n([wk(Fk.getUserList)],xN.prototype,"getUserList",null),n([wk(Fk.getUserInfo)],xN.prototype,"getUserInfo",null),n([wk(Fk.setCustomInfoForUser)],xN.prototype,"setCustomInfoForUser",null),n([bk(Fk.setLocalVideoView)],xN.prototype,"setLocalVideoView",null),n([wk(Fk.openLocalCamera)],xN.prototype,"openLocalCamera",null),n([wk(Fk.updateVideoQuality)],xN.prototype,"updateVideoQuality",null),n([wk(Fk.setVideoResolutionMode)],xN.prototype,"setVideoResolutionMode",null),n([wk(Fk.updateVideoQualityEx)],xN.prototype,"updateVideoQualityEx",null),n([wk(Fk.updateAudioQuality)],xN.prototype,"updateAudioQuality",null),n([bk(Fk.setRemoteVideoView)],xN.prototype,"setRemoteVideoView",null),n([bk(Fk.startPlayRemoteVideo)],xN.prototype,"startPlayRemoteVideo",null),n([wk(Fk.stopPlayRemoteVideo)],xN.prototype,"stopPlayRemoteVideo",null),n([bk(Fk.muteRemoteAudioStream)],xN.prototype,"muteRemoteAudioStream",null),n([wk(Fk.openRemoteDeviceByAdmin)],xN.prototype,"openRemoteDeviceByAdmin",null),n([wk(Fk.applyToAdminToOpenLocalDevice)],xN.prototype,"applyToAdminToOpenLocalDevice",null),n([wk(Fk.closeRemoteDeviceByAdmin)],xN.prototype,"closeRemoteDeviceByAdmin",null),n([wk(Fk.cancelRequest)],xN.prototype,"cancelRequest",null),n([wk(Fk.responseRemoteRequest)],xN.prototype,"responseRemoteRequest",null),n([wk(Fk.disableDeviceForAllUserByAdmin)],xN.prototype,"disableDeviceForAllUserByAdmin",null),n([wk(Fk.disableSendingMessageForAllUser)],xN.prototype,"disableSendingMessageForAllUser",null),n([wk(Fk.disableSendingMessageByAdmin)],xN.prototype,"disableSendingMessageByAdmin",null),n([wk(Fk.changeUserRole)],xN.prototype,"changeUserRole",null),n([wk(Fk.changeUserNameCard)],xN.prototype,"changeUserNameCard",null),n([wk(Fk.kickRemoteUserOutOfRoom)],xN.prototype,"kickRemoteUserOutOfRoom",null),n([wk(Fk.takeSeat)],xN.prototype,"takeSeat",null),n([wk(Fk.takeUserOnSeatByAdmin)],xN.prototype,"takeUserOnSeatByAdmin",null),n([wk(Fk.kickUserOffSeatByAdmin)],xN.prototype,"kickUserOffSeatByAdmin",null),n([wk(Fk.lockSeatByAdmin)],xN.prototype,"lockSeatByAdmin",null),n([wk(Fk.setCurrentCameraDevice)],xN.prototype,"setCurrentCameraDevice",null),n([wk(Fk.setCurrentMicDevice)],xN.prototype,"setCurrentMicDevice",null),n([wk(Fk.setCurrentSpeakerDevice)],xN.prototype,"setCurrentSpeakerDevice",null),n([wk(Fk.login),Nk()],xN,"login",null),n([wk(Fk.setSelfInfo)],xN,"setSelfInfo",null),n([Nk()],xN,"logout",null);export{bN as Rect,tN as TRTCAppScene,rN as TRTCAudioQuality,eN as TRTCBeautyStyle,pN as TRTCDeviceInfo,oN as TRTCDeviceState,iN as TRTCDeviceType,AN as TRTCImageBuffer,CN as TRTCLocalStatistics,dN as TRTCLogLevel,vN as TRTCMixInputType,ON as TRTCMixUser,SN as TRTCNetworkQosParam,gN as TRTCParams,EN as TRTCPublishCDNParam,lN as TRTCQosControlMode,sN as TRTCQuality,RN as TRTCQualityInfo,yN as TRTCRenderParams,HM as TRTCRole,nN as TRTCRoleType,IN as TRTCScreenCaptureSourceInfo,fN as TRTCScreenCaptureSourceType,_N as TRTCStatistics,wN as TRTCTranscodingConfig,hN as TRTCTranscodingConfigMode,mN as TRTCVideoEncParam,Xk as TRTCVideoFillMode,Zk as TRTCVideoMirrorType,cN as TRTCVideoQosPreference,Kk as TRTCVideoResolution,uN as TRTCVideoResolutionMode,aN as TRTCVideoRotation,zk as TRTCVideoStreamType,TN as TRTCVolumeInfo,VM as TUIAudioQuality,XM as TUIAudioRoute,qM as TUICaptureSourceType,BM as TUIChangeReason,ek as TUIConferenceCancelReason,Gk as TUIConferenceInvitationManager,sk as TUIConferenceInvitationManagerEvents,Hk as TUIConferenceListManager,ak as TUIConferenceListManagerEvents,ZM as TUIConferenceStatus,DM as TUIErrorCode,nk as TUIInvitationCode,rk as TUIInvitationRejectedReason,tk as TUIInvitationStatus,WM as TUIKickedOutOfRoomReason,$M as TUIMediaDevice,zM as TUIMediaDeviceState,KM as TUIMediaDeviceType,UM as TUINetworkQuality,JM as TUIRequestAction,QM as TUIRequestCallbackType,YM as TUIResolutionMode,PM as TUIRole,qk as TUIRoomDeviceManager,ik as TUIRoomDeviceMangerEvents,GM as TUIRoomDismissedReason,xN as TUIRoomEngine,ok as TUIRoomEvents,FM as TUIRoomType,jM as TUISeatMode,LM as TUIVideoQuality,xM as TUIVideoStreamType,xN as default};