jiuyiUniapp/jiuyi/node_modules/tuicall-engine-wx/tuicall-engine-wx.js

10 lines
255 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import*as t from"@tencentcloud/chat";import e from"trtc-wx-sdk";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function r(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function i(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function s(t){i(o,r,a,s,c,"next",t)}function c(t){i(o,r,a,s,c,"throw",t)}s(void 0)}))}}function o(t,e,n){return e=p(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,g()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){return t.get(r(t,e))}function u(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,R(r.key),r)}}function h(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function d(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=D(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function f(t,e,n){return(e=R(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&E(t,e)}function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(g=function(){return!!t})()}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function I(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.includes(n)||{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function _(){_=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var a=e&&e.prototype instanceof y?e:y,o=Object.create(a.prototype),s=new k(r||[]);return i(o,"_invoke",{value:S(t,n,s)}),o}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",f="suspendedYield",p="executing",v="completed",g={};function y(){}function I(){}function m(){}var E={};u(E,o,(function(){return this}));var T=Object.getPrototypeOf,R=T&&T(T(A([])));R&&R!==n&&r.call(R,o)&&(E=R);var b=m.prototype=y.prototype=Object.create(E);function D(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,a,o,s){var c=h(t[i],t,a);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(l).then((function(t){u.value=t,o(u)}),(function(t){return n("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,n,r){var i=d;return function(a,o){if(i===p)throw Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:t,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=w(s,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var u=h(e,n,r);if("normal"===u.type){if(i=r.done?v:f,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function w(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,w(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=h(i,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return I.prototype=m,i(b,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:I,configurable:!0}),I.displayName=u(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},D(C.prototype),u(C.prototype,s,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new C(l(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},D(b),u(b,c,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(x),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function E(t,e){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},E(t,e)}function T(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||D(t)||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 R(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function D(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}function C(t){var e="function"==typeof Map?new Map:void 0;return C=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(g())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&E(i,n.prototype),i}(t,arguments,p(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),E(n,t)},C(t)}var S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var O=function(t){return t&&t.Math===Math&&t},x=O("object"==typeof globalThis&&globalThis)||O("object"==typeof window&&window)||O("object"==typeof self&&self)||O("object"==typeof S&&S)||O("object"==typeof S&&S)||function(){return this}()||Function("return this")(),k={},A=function(t){try{return!!t()}catch(t){return!0}},L=!A((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),N=!A((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),U=N,P=Function.prototype.call,M=U?P.bind(P):function(){return P.apply(P,arguments)},j={},V={}.propertyIsEnumerable,G=Object.getOwnPropertyDescriptor,H=G&&!V.call({1:2},1);j.f=H?function(t){var e=G(this,t);return!!e&&e.enumerable}:V;var F,B,K=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},z=N,W=Function.prototype,q=W.call,J=z&&W.bind.bind(q,q),Y=z?J:function(t){return function(){return q.apply(t,arguments)}},$=Y,Q=$({}.toString),X=$("".slice),Z=function(t){return X(Q(t),8,-1)},tt=A,et=Z,nt=Object,rt=Y("".split),it=tt((function(){return!nt("z").propertyIsEnumerable(0)}))?function(t){return"String"===et(t)?rt(t,""):nt(t)}:nt,at=function(t){return null==t},ot=at,st=TypeError,ct=function(t){if(ot(t))throw new st("Can't call method on "+t);return t},ut=it,lt=ct,ht=function(t){return ut(lt(t))},dt="object"==typeof document&&document.all,ft=void 0===dt&&void 0!==dt?function(t){return"function"==typeof t||t===dt}:function(t){return"function"==typeof t},pt=ft,vt=function(t){return"object"==typeof t?null!==t:pt(t)},gt=x,yt=ft,It=function(t,e){return arguments.length<2?(n=gt[t],yt(n)?n:void 0):gt[t]&&gt[t][e];var n},mt=Y({}.isPrototypeOf),_t=x.navigator,Et=_t&&_t.userAgent,Tt=Et?String(Et):"",Rt=x,bt=Tt,Dt=Rt.process,Ct=Rt.Deno,St=Dt&&Dt.versions||Ct&&Ct.version,wt=St&&St.v8;wt&&(B=(F=wt.split("."))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!B&&bt&&(!(F=bt.match(/Edge\/(\d+)/))||F[1]>=74)&&(F=bt.match(/Chrome\/(\d+)/))&&(B=+F[1]);var Ot=B,xt=Ot,kt=A,At=x.String,Lt=!!Object.getOwnPropertySymbols&&!kt((function(){var t=Symbol("symbol detection");return!At(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&xt&&xt<41})),Nt=Lt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ut=It,Pt=ft,Mt=mt,jt=Object,Vt=Nt?function(t){return"symbol"==typeof t}:function(t){var e=Ut("Symbol");return Pt(e)&&Mt(e.prototype,jt(t))},Gt=String,Ht=function(t){try{return Gt(t)}catch(t){return"Object"}},Ft=ft,Bt=Ht,Kt=TypeError,zt=function(t){if(Ft(t))return t;throw new Kt(Bt(t)+" is not a function")},Wt=zt,qt=at,Jt=function(t,e){var n=t[e];return qt(n)?void 0:Wt(n)},Yt=M,$t=ft,Qt=vt,Xt=TypeError,Zt={exports:{}},te=x,ee=Object.defineProperty,ne=function(t,e){try{ee(te,t,{value:e,configurable:!0,writable:!0})}catch(n){te[t]=e}return e},re=x,ie=ne,ae="__core-js_shared__",oe=Zt.exports=re[ae]||ie(ae,{});(oe.versions||(oe.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var se=Zt.exports,ce=function(t,e){return se[t]||(se[t]=e||{})},ue=ct,le=Object,he=function(t){return le(ue(t))},de=he,fe=Y({}.hasOwnProperty),pe=Object.hasOwn||function(t,e){return fe(de(t),e)},ve=Y,ge=0,ye=Math.random(),Ie=ve(1..toString),me=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Ie(++ge+ye,36)},_e=ce,Ee=pe,Te=me,Re=Lt,be=Nt,De=x.Symbol,Ce=_e("wks"),Se=be?De.for||De:De&&De.withoutSetter||Te,we=function(t){return Ee(Ce,t)||(Ce[t]=Re&&Ee(De,t)?De[t]:Se("Symbol."+t)),Ce[t]},Oe=M,xe=vt,ke=Vt,Ae=Jt,Le=function(t,e){var n,r;if("string"===e&&$t(n=t.toString)&&!Qt(r=Yt(n,t)))return r;if($t(n=t.valueOf)&&!Qt(r=Yt(n,t)))return r;if("string"!==e&&$t(n=t.toString)&&!Qt(r=Yt(n,t)))return r;throw new Xt("Can't convert object to primitive value")},Ne=TypeError,Ue=we("toPrimitive"),Pe=function(t,e){if(!xe(t)||ke(t))return t;var n,r=Ae(t,Ue);if(r){if(void 0===e&&(e="default"),n=Oe(r,t,e),!xe(n)||ke(n))return n;throw new Ne("Can't convert object to primitive value")}return void 0===e&&(e="number"),Le(t,e)},Me=Pe,je=Vt,Ve=function(t){var e=Me(t,"string");return je(e)?e:e+""},Ge=vt,He=x.document,Fe=Ge(He)&&Ge(He.createElement),Be=function(t){return Fe?He.createElement(t):{}},Ke=Be,ze=!L&&!A((function(){return 7!==Object.defineProperty(Ke("div"),"a",{get:function(){return 7}}).a})),We=L,qe=M,Je=j,Ye=K,$e=ht,Qe=Ve,Xe=pe,Ze=ze,tn=Object.getOwnPropertyDescriptor;k.f=We?tn:function(t,e){if(t=$e(t),e=Qe(e),Ze)try{return tn(t,e)}catch(t){}if(Xe(t,e))return Ye(!qe(Je.f,t,e),t[e])};var en={},nn=L&&A((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),rn=vt,an=String,on=TypeError,sn=function(t){if(rn(t))return t;throw new on(an(t)+" is not an object")},cn=L,un=ze,ln=nn,hn=sn,dn=Ve,fn=TypeError,pn=Object.defineProperty,vn=Object.getOwnPropertyDescriptor,gn="enumerable",yn="configurable",In="writable";en.f=cn?ln?function(t,e,n){if(hn(t),e=dn(e),hn(n),"function"==typeof t&&"prototype"===e&&"value"in n&&In in n&&!n[In]){var r=vn(t,e);r&&r[In]&&(t[e]=n.value,n={configurable:yn in n?n[yn]:r[yn],enumerable:gn in n?n[gn]:r[gn],writable:!1})}return pn(t,e,n)}:pn:function(t,e,n){if(hn(t),e=dn(e),hn(n),un)try{return pn(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new fn("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var mn=en,_n=K,En=L?function(t,e,n){return mn.f(t,e,_n(1,n))}:function(t,e,n){return t[e]=n,t},Tn={exports:{}},Rn=L,bn=pe,Dn=Function.prototype,Cn=Rn&&Object.getOwnPropertyDescriptor,Sn=bn(Dn,"name"),wn={EXISTS:Sn,PROPER:Sn&&"something"===function(){}.name,CONFIGURABLE:Sn&&(!Rn||Rn&&Cn(Dn,"name").configurable)},On=Y,xn=ft,kn=Zt.exports,An=On(Function.toString);xn(kn.inspectSource)||(kn.inspectSource=function(t){return An(t)});var Ln,Nn,Un,Pn=kn.inspectSource,Mn=ft,jn=x.WeakMap,Vn=Mn(jn)&&/native code/.test(String(jn)),Gn=me,Hn=ce("keys"),Fn=function(t){return Hn[t]||(Hn[t]=Gn(t))},Bn={},Kn=Vn,zn=x,Wn=vt,qn=En,Jn=pe,Yn=Zt.exports,$n=Fn,Qn=Bn,Xn="Object already initialized",Zn=zn.TypeError,tr=zn.WeakMap;if(Kn||Yn.state){var er=Yn.state||(Yn.state=new tr);er.get=er.get,er.has=er.has,er.set=er.set,Ln=function(t,e){if(er.has(t))throw new Zn(Xn);return e.facade=t,er.set(t,e),e},Nn=function(t){return er.get(t)||{}},Un=function(t){return er.has(t)}}else{var nr=$n("state");Qn[nr]=!0,Ln=function(t,e){if(Jn(t,nr))throw new Zn(Xn);return e.facade=t,qn(t,nr,e),e},Nn=function(t){return Jn(t,nr)?t[nr]:{}},Un=function(t){return Jn(t,nr)}}var rr={set:Ln,get:Nn,has:Un,enforce:function(t){return Un(t)?Nn(t):Ln(t,{})},getterFor:function(t){return function(e){var n;if(!Wn(e)||(n=Nn(e)).type!==t)throw new Zn("Incompatible receiver, "+t+" required");return n}}},ir=Y,ar=A,or=ft,sr=pe,cr=L,ur=wn.CONFIGURABLE,lr=Pn,hr=rr.enforce,dr=rr.get,fr=String,pr=Object.defineProperty,vr=ir("".slice),gr=ir("".replace),yr=ir([].join),Ir=cr&&!ar((function(){return 8!==pr((function(){}),"length",{value:8}).length})),mr=String(String).split("String"),_r=Tn.exports=function(t,e,n){"Symbol("===vr(fr(e),0,7)&&(e="["+gr(fr(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!sr(t,"name")||ur&&t.name!==e)&&(cr?pr(t,"name",{value:e,configurable:!0}):t.name=e),Ir&&n&&sr(n,"arity")&&t.length!==n.arity&&pr(t,"length",{value:n.arity});try{n&&sr(n,"constructor")&&n.constructor?cr&&pr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=hr(t);return sr(r,"source")||(r.source=yr(mr,"string"==typeof e?e:"")),t};Function.prototype.toString=_r((function(){return or(this)&&dr(this).source||lr(this)}),"toString");var Er=ft,Tr=en,Rr=Tn.exports,br=ne,Dr=function(t,e,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:e;if(Er(n)&&Rr(n,a,r),r.global)i?t[e]=n:br(e,n);else{try{r.unsafe?t[e]&&(i=!0):delete t[e]}catch(t){}i?t[e]=n:Tr.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Cr={},Sr=Math.ceil,wr=Math.floor,Or=Math.trunc||function(t){var e=+t;return(e>0?wr:Sr)(e)},xr=function(t){var e=+t;return e!=e||0===e?0:Or(e)},kr=xr,Ar=Math.max,Lr=Math.min,Nr=function(t,e){var n=kr(t);return n<0?Ar(n+e,0):Lr(n,e)},Ur=xr,Pr=Math.min,Mr=function(t){var e=Ur(t);return e>0?Pr(e,9007199254740991):0},jr=Mr,Vr=function(t){return jr(t.length)},Gr=ht,Hr=Nr,Fr=Vr,Br=function(t){return function(e,n,r){var i=Gr(e),a=Fr(i);if(0===a)return!t&&-1;var o,s=Hr(r,a);if(t&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===n)return t||s||0;return!t&&-1}},Kr={includes:Br(!0),indexOf:Br(!1)},zr=pe,Wr=ht,qr=Kr.indexOf,Jr=Bn,Yr=Y([].push),$r=function(t,e){var n,r=Wr(t),i=0,a=[];for(n in r)!zr(Jr,n)&&zr(r,n)&&Yr(a,n);for(;e.length>i;)zr(r,n=e[i++])&&(~qr(a,n)||Yr(a,n));return a},Qr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Xr=$r,Zr=Qr.concat("length","prototype");Cr.f=Object.getOwnPropertyNames||function(t){return Xr(t,Zr)};var ti={};ti.f=Object.getOwnPropertySymbols;var ei=It,ni=Cr,ri=ti,ii=sn,ai=Y([].concat),oi=ei("Reflect","ownKeys")||function(t){var e=ni.f(ii(t)),n=ri.f;return n?ai(e,n(t)):e},si=pe,ci=oi,ui=k,li=en,hi=function(t,e,n){for(var r=ci(e),i=li.f,a=ui.f,o=0;o<r.length;o++){var s=r[o];si(t,s)||n&&si(n,s)||i(t,s,a(e,s))}},di=A,fi=ft,pi=/#|\.prototype\./,vi=function(t,e){var n=yi[gi(t)];return n===mi||n!==Ii&&(fi(e)?di(e):!!e)},gi=vi.normalize=function(t){return String(t).replace(pi,".").toLowerCase()},yi=vi.data={},Ii=vi.NATIVE="N",mi=vi.POLYFILL="P",_i=vi,Ei=x,Ti=k.f,Ri=En,bi=Dr,Di=ne,Ci=hi,Si=_i,wi=function(t,e){var n,r,i,a,o,s=t.target,c=t.global,u=t.stat;if(n=c?Ei:u?Ei[s]||Di(s,{}):Ei[s]&&Ei[s].prototype)for(r in e){if(a=e[r],i=t.dontCallGetSet?(o=Ti(n,r))&&o.value:n[r],!Si(c?r:s+(u?".":"#")+r,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ci(a,i)}(t.sham||i&&i.sham)&&Ri(a,"sham",!0),bi(n,r,a,t)}},Oi=Z,xi=Array.isArray||function(t){return"Array"===Oi(t)},ki=TypeError,Ai=function(t){if(t>9007199254740991)throw ki("Maximum allowed index exceeded");return t},Li=L,Ni=en,Ui=K,Pi=function(t,e,n){Li?Ni.f(t,e,Ui(0,n)):t[e]=n},Mi={};Mi[we("toStringTag")]="z";var ji="[object z]"===String(Mi),Vi=ji,Gi=ft,Hi=Z,Fi=we("toStringTag"),Bi=Object,Ki="Arguments"===Hi(function(){return arguments}()),zi=Vi?Hi:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Bi(t),Fi))?n:Ki?Hi(e):"Object"===(r=Hi(e))&&Gi(e.callee)?"Arguments":r},Wi=Y,qi=A,Ji=ft,Yi=zi,$i=Pn,Qi=function(){},Xi=It("Reflect","construct"),Zi=/^\s*(?:class|function)\b/,ta=Wi(Zi.exec),ea=!Zi.test(Qi),na=function(t){if(!Ji(t))return!1;try{return Xi(Qi,[],t),!0}catch(t){return!1}},ra=function(t){if(!Ji(t))return!1;switch(Yi(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ea||!!ta(Zi,$i(t))}catch(t){return!0}};ra.sham=!0;var ia=!Xi||qi((function(){var t;return na(na.call)||!na(Object)||!na((function(){t=!0}))||t}))?ra:na,aa=xi,oa=ia,sa=vt,ca=we("species"),ua=Array,la=function(t){var e;return aa(t)&&(e=t.constructor,(oa(e)&&(e===ua||aa(e.prototype))||sa(e)&&null===(e=e[ca]))&&(e=void 0)),void 0===e?ua:e},ha=function(t,e){return new(la(t))(0===e?0:e)},da=A,fa=Ot,pa=we("species"),va=function(t){return fa>=51||!da((function(){var e=[];return(e.constructor={})[pa]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ga=wi,ya=A,Ia=xi,ma=vt,_a=he,Ea=Vr,Ta=Ai,Ra=Pi,ba=ha,Da=va,Ca=Ot,Sa=we("isConcatSpreadable"),wa=Ca>=51||!ya((function(){var t=[];return t[Sa]=!1,t.concat()[0]!==t})),Oa=function(t){if(!ma(t))return!1;var e=t[Sa];return void 0!==e?!!e:Ia(t)};ga({target:"Array",proto:!0,arity:1,forced:!wa||!Da("concat")},{concat:function(t){var e,n,r,i,a,o=_a(this),s=ba(o,0),c=0;for(e=-1,r=arguments.length;e<r;e++)if(Oa(a=-1===e?o:arguments[e]))for(i=Ea(a),Ta(c+i),n=0;n<i;n++,c++)n in a&&Ra(s,c,a[n]);else Ta(c+1),Ra(s,c++,a);return s.length=c,s}});var xa=Z,ka=Y,Aa=function(t){if("Function"===xa(t))return ka(t)},La=zt,Na=N,Ua=Aa(Aa.bind),Pa=function(t,e){return La(t),void 0===e?t:Na?Ua(t,e):function(){return t.apply(e,arguments)}},Ma=Pa,ja=it,Va=he,Ga=Vr,Ha=ha,Fa=Y([].push),Ba=function(t){var e=1===t,n=2===t,r=3===t,i=4===t,a=6===t,o=7===t,s=5===t||a;return function(c,u,l,h){for(var d,f,p=Va(c),v=ja(p),g=Ga(v),y=Ma(u,l),I=0,m=h||Ha,_=e?m(c,g):n||o?m(c,0):void 0;g>I;I++)if((s||I in v)&&(f=y(d=v[I],I,p),t))if(e)_[I]=f;else if(f)switch(t){case 3:return!0;case 5:return d;case 6:return I;case 2:Fa(_,d)}else switch(t){case 4:return!1;case 7:Fa(_,d)}return a?-1:r||i?i:_}},Ka={forEach:Ba(0),map:Ba(1),filter:Ba(2),some:Ba(3),every:Ba(4),find:Ba(5),findIndex:Ba(6),filterReject:Ba(7)},za=Ka.filter;wi({target:"Array",proto:!0,forced:!va("filter")},{filter:function(t){return za(this,t,arguments.length>1?arguments[1]:void 0)}});var Wa={},qa=$r,Ja=Qr,Ya=Object.keys||function(t){return qa(t,Ja)},$a=L,Qa=nn,Xa=en,Za=sn,to=ht,eo=Ya;Wa.f=$a&&!Qa?Object.defineProperties:function(t,e){Za(t);for(var n,r=to(e),i=eo(e),a=i.length,o=0;a>o;)Xa.f(t,n=i[o++],r[n]);return t};var no,ro=It("document","documentElement"),io=sn,ao=Wa,oo=Qr,so=Bn,co=ro,uo=Be,lo="prototype",ho="script",fo=Fn("IE_PROTO"),po=function(){},vo=function(t){return"<"+ho+">"+t+"</"+ho+">"},go=function(t){t.write(vo("")),t.close();var e=t.parentWindow.Object;return t=null,e},yo=function(){try{no=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;yo="undefined"!=typeof document?document.domain&&no?go(no):(e=uo("iframe"),n="java"+ho+":",e.style.display="none",co.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(vo("document.F=Object")),t.close(),t.F):go(no);for(var r=oo.length;r--;)delete yo[lo][oo[r]];return yo()};so[fo]=!0;var Io=Object.create||function(t,e){var n;return null!==t?(po[lo]=io(t),n=new po,po[lo]=null,n[fo]=t):n=yo(),void 0===e?n:ao.f(n,e)},mo=we,_o=Io,Eo=en.f,To=mo("unscopables"),Ro=Array.prototype;void 0===Ro[To]&&Eo(Ro,To,{configurable:!0,value:_o(null)});var bo=function(t){Ro[To][t]=!0},Do=wi,Co=Ka.find,So=bo,wo="find",Oo=!0;wo in[]&&Array(1)[wo]((function(){Oo=!1})),Do({target:"Array",proto:!0,forced:Oo},{find:function(t){return Co(this,t,arguments.length>1?arguments[1]:void 0)}}),So(wo);var xo=A,ko=function(t,e){var n=[][t];return!!n&&xo((function(){n.call(null,e||function(){return 1},1)}))},Ao=Ka.forEach,Lo=ko("forEach")?[].forEach:function(t){return Ao(this,t,arguments.length>1?arguments[1]:void 0)};wi({target:"Array",proto:!0,forced:[].forEach!==Lo},{forEach:Lo});var No=M,Uo=sn,Po=Jt,Mo=function(t,e,n){var r,i;Uo(t);try{if(!(r=Po(t,"return"))){if("throw"===e)throw n;return n}r=No(r,t)}catch(t){i=!0,r=t}if("throw"===e)throw n;if(i)throw r;return Uo(r),n},jo=sn,Vo=Mo,Go={},Ho=Go,Fo=we("iterator"),Bo=Array.prototype,Ko=function(t){return void 0!==t&&(Ho.Array===t||Bo[Fo]===t)},zo=zi,Wo=Jt,qo=at,Jo=Go,Yo=we("iterator"),$o=function(t){if(!qo(t))return Wo(t,Yo)||Wo(t,"@@iterator")||Jo[zo(t)]},Qo=M,Xo=zt,Zo=sn,ts=Ht,es=$o,ns=TypeError,rs=function(t,e){var n=arguments.length<2?es(t):e;if(Xo(n))return Zo(Qo(n,t));throw new ns(ts(t)+" is not iterable")},is=Pa,as=M,os=he,ss=function(t,e,n,r){try{return r?e(jo(n)[0],n[1]):e(n)}catch(e){Vo(t,"throw",e)}},cs=Ko,us=ia,ls=Vr,hs=Pi,ds=rs,fs=$o,ps=Array,vs=we("iterator"),gs=!1;try{var ys=0,Is={next:function(){return{done:!!ys++}},return:function(){gs=!0}};Is[vs]=function(){return this},Array.from(Is,(function(){throw 2}))}catch(t){}var ms=function(t,e){try{if(!e&&!gs)return!1}catch(t){return!1}var n=!1;try{var r={};r[vs]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},_s=function(t){var e=os(t),n=us(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=is(i,r>2?arguments[2]:void 0));var o,s,c,u,l,h,d=fs(e),f=0;if(!d||this===ps&&cs(d))for(o=ls(e),s=n?new this(o):ps(o);o>f;f++)h=a?i(e[f],f):e[f],hs(s,f,h);else for(s=n?new this:[],l=(u=ds(e,d)).next;!(c=as(l,u)).done;f++)h=a?ss(u,i,[c.value,f],!0):c.value,hs(s,f,h);return s.length=f,s};wi({target:"Array",stat:!0,forced:!ms((function(t){Array.from(t)}))},{from:_s});var Es=wi,Ts=Kr.indexOf,Rs=ko,bs=Aa([].indexOf),Ds=!!bs&&1/bs([1],1,-0)<0;Es({target:"Array",proto:!0,forced:Ds||!Rs("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Ds?bs(this,t,e)||0:Ts(this,t,e)}});var Cs,Ss,ws,Os=!A((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),xs=pe,ks=ft,As=he,Ls=Os,Ns=Fn("IE_PROTO"),Us=Object,Ps=Us.prototype,Ms=Ls?Us.getPrototypeOf:function(t){var e=As(t);if(xs(e,Ns))return e[Ns];var n=e.constructor;return ks(n)&&e instanceof n?n.prototype:e instanceof Us?Ps:null},js=A,Vs=ft,Gs=vt,Hs=Ms,Fs=Dr,Bs=we("iterator"),Ks=!1;[].keys&&("next"in(ws=[].keys())?(Ss=Hs(Hs(ws)))!==Object.prototype&&(Cs=Ss):Ks=!0);var zs=!Gs(Cs)||js((function(){var t={};return Cs[Bs].call(t)!==t}));zs&&(Cs={}),Vs(Cs[Bs])||Fs(Cs,Bs,(function(){return this}));var Ws={IteratorPrototype:Cs,BUGGY_SAFARI_ITERATORS:Ks},qs=en.f,Js=pe,Ys=we("toStringTag"),$s=function(t,e,n){t&&!n&&(t=t.prototype),t&&!Js(t,Ys)&&qs(t,Ys,{configurable:!0,value:e})},Qs=Ws.IteratorPrototype,Xs=Io,Zs=K,tc=$s,ec=Go,nc=function(){return this},rc=Y,ic=zt,ac=vt,oc=function(t){return ac(t)||null===t},sc=String,cc=TypeError,uc=function(t,e,n){try{return rc(ic(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}},lc=vt,hc=ct,dc=function(t){if(oc(t))return t;throw new cc("Can't set "+sc(t)+" as a prototype")},fc=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=uc(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return hc(n),dc(r),lc(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),pc=wi,vc=M,gc=ft,yc=function(t,e,n,r){var i=e+" Iterator";return t.prototype=Xs(Qs,{next:Zs(+!r,n)}),tc(t,i,!1),ec[i]=nc,t},Ic=Ms,mc=fc,_c=$s,Ec=En,Tc=Dr,Rc=Go,bc=wn.PROPER,Dc=wn.CONFIGURABLE,Cc=Ws.IteratorPrototype,Sc=Ws.BUGGY_SAFARI_ITERATORS,wc=we("iterator"),Oc="keys",xc="values",kc="entries",Ac=function(){return this},Lc=function(t,e,n,r,i,a,o){yc(n,e,r);var s,c,u,l=function(t){if(t===i&&v)return v;if(!Sc&&t&&t in f)return f[t];switch(t){case Oc:case xc:case kc:return function(){return new n(this,t)}}return function(){return new n(this)}},h=e+" Iterator",d=!1,f=t.prototype,p=f[wc]||f["@@iterator"]||i&&f[i],v=!Sc&&p||l(i),g="Array"===e&&f.entries||p;if(g&&(s=Ic(g.call(new t)))!==Object.prototype&&s.next&&(Ic(s)!==Cc&&(mc?mc(s,Cc):gc(s[wc])||Tc(s,wc,Ac)),_c(s,h,!0)),bc&&i===xc&&p&&p.name!==xc&&(Dc?Ec(f,"name",xc):(d=!0,v=function(){return vc(p,this)})),i)if(c={values:l(xc),keys:a?v:l(Oc),entries:l(kc)},o)for(u in c)(Sc||d||!(u in f))&&Tc(f,u,c[u]);else pc({target:e,proto:!0,forced:Sc||d},c);return f[wc]!==v&&Tc(f,wc,v,{name:i}),Rc[e]=v,c},Nc=function(t,e){return{value:t,done:e}},Uc=ht,Pc=bo,Mc=Go,jc=rr,Vc=en.f,Gc=Lc,Hc=Nc,Fc=L,Bc="Array Iterator",Kc=jc.set,zc=jc.getterFor(Bc),Wc=Gc(Array,"Array",(function(t,e){Kc(this,{type:Bc,target:Uc(t),index:0,kind:e})}),(function(){var t=zc(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,Hc(void 0,!0);switch(t.kind){case"keys":return Hc(n,!1);case"values":return Hc(e[n],!1)}return Hc([n,e[n]],!1)}),"values"),qc=Mc.Arguments=Mc.Array;if(Pc("keys"),Pc("values"),Pc("entries"),Fc&&"values"!==qc.name)try{Vc(qc,"name",{value:"values"})}catch(t){}var Jc=Ka.map;wi({target:"Array",proto:!0,forced:!va("map")},{map:function(t){return Jc(this,t,arguments.length>1?arguments[1]:void 0)}});var Yc=Y([].slice),$c=wi,Qc=xi,Xc=ia,Zc=vt,tu=Nr,eu=Vr,nu=ht,ru=Pi,iu=we,au=Yc,ou=va("slice"),su=iu("species"),cu=Array,uu=Math.max;$c({target:"Array",proto:!0,forced:!ou},{slice:function(t,e){var n,r,i,a=nu(this),o=eu(a),s=tu(t,o),c=tu(void 0===e?o:e,o);if(Qc(a)&&(n=a.constructor,(Xc(n)&&(n===cu||Qc(n.prototype))||Zc(n)&&null===(n=n[su]))&&(n=void 0),n===cu||void 0===n))return au(a,s,c);for(r=new(void 0===n?cu:n)(uu(c-s,0)),i=0;s<c;s++,i++)s in a&&ru(r,i,a[s]);return r.length=i,r}});var lu=wi,hu=Date,du=Y(hu.prototype.getTime);lu({target:"Date",stat:!0},{now:function(){return du(new hu)}});var fu=he,pu=Pe;wi({target:"Date",proto:!0,arity:1,forced:A((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=fu(this),n=pu(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}});var vu=Y,gu=Dr,yu=Date.prototype,Iu="Invalid Date",mu="toString",_u=vu(yu[mu]),Eu=vu(yu.getTime);String(new Date(NaN))!==Iu&&gu(yu,mu,(function(){var t=Eu(this);return t==t?_u(this):Iu}));var Tu=Tn.exports,Ru=en,bu=function(t,e,n){return n.get&&Tu(n.get,e,{getter:!0}),n.set&&Tu(n.set,e,{setter:!0}),Ru.f(t,e,n)},Du=L,Cu=wn.EXISTS,Su=Y,wu=bu,Ou=Function.prototype,xu=Su(Ou.toString),ku=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Au=Su(ku.exec);Du&&!Cu&&wu(Ou,"name",{configurable:!0,get:function(){try{return Au(ku,xu(this))[1]}catch(t){return""}}});var Lu=he,Nu=Ya;wi({target:"Object",stat:!0,forced:A((function(){Nu(1)}))},{keys:function(t){return Nu(Lu(t))}});var Uu=zi,Pu=ji?{}.toString:function(){return"[object "+Uu(this)+"]"};ji||Dr(Object.prototype,"toString",Pu,{unsafe:!0});var Mu,ju,Vu,Gu,Hu=x,Fu=Tt,Bu=Z,Ku=function(t){return Fu.slice(0,t.length)===t},zu=Ku("Bun/")?"BUN":Ku("Cloudflare-Workers")?"CLOUDFLARE":Ku("Deno/")?"DENO":Ku("Node.js/")?"NODE":Hu.Bun&&"string"==typeof Bun.version?"BUN":Hu.Deno&&"object"==typeof Deno.version?"DENO":"process"===Bu(Hu.process)?"NODE":Hu.window&&Hu.document?"BROWSER":"REST",Wu="NODE"===zu,qu=It,Ju=bu,Yu=L,$u=we("species"),Qu=function(t){var e=qu(t);Yu&&e&&!e[$u]&&Ju(e,$u,{configurable:!0,get:function(){return this}})},Xu=mt,Zu=TypeError,tl=function(t,e){if(Xu(e,t))return t;throw new Zu("Incorrect invocation")},el=ia,nl=Ht,rl=TypeError,il=sn,al=function(t){if(el(t))return t;throw new rl(nl(t)+" is not a constructor")},ol=at,sl=we("species"),cl=N,ul=Function.prototype,ll=ul.apply,hl=ul.call,dl="object"==typeof Reflect&&Reflect.apply||(cl?hl.bind(ll):function(){return hl.apply(ll,arguments)}),fl=TypeError,pl=function(t,e){if(t<e)throw new fl("Not enough arguments");return t},vl=/(?:ipad|iphone|ipod).*applewebkit/i.test(Tt),gl=x,yl=dl,Il=Pa,ml=ft,_l=pe,El=A,Tl=ro,Rl=Yc,bl=Be,Dl=pl,Cl=vl,Sl=Wu,wl=gl.setImmediate,Ol=gl.clearImmediate,xl=gl.process,kl=gl.Dispatch,Al=gl.Function,Ll=gl.MessageChannel,Nl=gl.String,Ul=0,Pl={},Ml="onreadystatechange";El((function(){Mu=gl.location}));var jl=function(t){if(_l(Pl,t)){var e=Pl[t];delete Pl[t],e()}},Vl=function(t){return function(){jl(t)}},Gl=function(t){jl(t.data)},Hl=function(t){gl.postMessage(Nl(t),Mu.protocol+"//"+Mu.host)};wl&&Ol||(wl=function(t){Dl(arguments.length,1);var e=ml(t)?t:Al(t),n=Rl(arguments,1);return Pl[++Ul]=function(){yl(e,void 0,n)},ju(Ul),Ul},Ol=function(t){delete Pl[t]},Sl?ju=function(t){xl.nextTick(Vl(t))}:kl&&kl.now?ju=function(t){kl.now(Vl(t))}:Ll&&!Cl?(Gu=(Vu=new Ll).port2,Vu.port1.onmessage=Gl,ju=Il(Gu.postMessage,Gu)):gl.addEventListener&&ml(gl.postMessage)&&!gl.importScripts&&Mu&&"file:"!==Mu.protocol&&!El(Hl)?(ju=Hl,gl.addEventListener("message",Gl,!1)):ju=Ml in bl("script")?function(t){Tl.appendChild(bl("script"))[Ml]=function(){Tl.removeChild(this),jl(t)}}:function(t){setTimeout(Vl(t),0)});var Fl={set:wl,clear:Ol},Bl=x,Kl=L,zl=Object.getOwnPropertyDescriptor,Wl=function(){this.head=null,this.tail=null};Wl.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var ql,Jl,Yl,$l,Ql,Xl=Wl,Zl=/ipad|iphone|ipod/i.test(Tt)&&"undefined"!=typeof Pebble,th=/web0s(?!.*chrome)/i.test(Tt),eh=x,nh=function(t){if(!Kl)return Bl[t];var e=zl(Bl,t);return e&&e.value},rh=Pa,ih=Fl.set,ah=Xl,oh=vl,sh=Zl,ch=th,uh=Wu,lh=eh.MutationObserver||eh.WebKitMutationObserver,hh=eh.document,dh=eh.process,fh=eh.Promise,ph=nh("queueMicrotask");if(!ph){var vh=new ah,gh=function(){var t,e;for(uh&&(t=dh.domain)&&t.exit();e=vh.get();)try{e()}catch(t){throw vh.head&&ql(),t}t&&t.enter()};oh||uh||ch||!lh||!hh?!sh&&fh&&fh.resolve?(($l=fh.resolve(void 0)).constructor=fh,Ql=rh($l.then,$l),ql=function(){Ql(gh)}):uh?ql=function(){dh.nextTick(gh)}:(ih=rh(ih,eh),ql=function(){ih(gh)}):(Jl=!0,Yl=hh.createTextNode(""),new lh(gh).observe(Yl,{characterData:!0}),ql=function(){Yl.data=Jl=!Jl}),ph=function(t){vh.head||ql(),vh.add(t)}}var yh=ph,Ih=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},mh=x.Promise,_h=x,Eh=mh,Th=ft,Rh=_i,bh=Pn,Dh=we,Ch=zu,Sh=Ot;Eh&&Eh.prototype;var wh=Dh("species"),Oh=!1,xh=Th(_h.PromiseRejectionEvent),kh=Rh("Promise",(function(){var t=bh(Eh),e=t!==String(Eh);if(!e&&66===Sh)return!0;if(!Sh||Sh<51||!/native code/.test(t)){var n=new Eh((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[wh]=r,!(Oh=n.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==Ch&&"DENO"!==Ch||xh)})),Ah={CONSTRUCTOR:kh,REJECTION_EVENT:xh,SUBCLASSING:Oh},Lh={},Nh=zt,Uh=TypeError,Ph=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new Uh("Bad Promise constructor");e=t,n=r})),this.resolve=Nh(e),this.reject=Nh(n)};Lh.f=function(t){return new Ph(t)};var Mh,jh,Vh,Gh=wi,Hh=Wu,Fh=x,Bh=M,Kh=Dr,zh=fc,Wh=$s,qh=Qu,Jh=zt,Yh=ft,$h=vt,Qh=tl,Xh=function(t,e){var n,r=il(t).constructor;return void 0===r||ol(n=il(r)[sl])?e:al(n)},Zh=Fl.set,td=yh,ed=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},nd=Ih,rd=Xl,id=rr,ad=mh,od=Lh,sd="Promise",cd=Ah.CONSTRUCTOR,ud=Ah.REJECTION_EVENT,ld=Ah.SUBCLASSING,hd=id.getterFor(sd),dd=id.set,fd=ad&&ad.prototype,pd=ad,vd=fd,gd=Fh.TypeError,yd=Fh.document,Id=Fh.process,md=od.f,_d=md,Ed=!!(yd&&yd.createEvent&&Fh.dispatchEvent),Td="unhandledrejection",Rd=function(t){var e;return!(!$h(t)||!Yh(e=t.then))&&e},bd=function(t,e){var n,r,i,a=e.value,o=1===e.state,s=o?t.ok:t.fail,c=t.resolve,u=t.reject,l=t.domain;try{s?(o||(2===e.rejection&&Od(e),e.rejection=1),!0===s?n=a:(l&&l.enter(),n=s(a),l&&(l.exit(),i=!0)),n===t.promise?u(new gd("Promise-chain cycle")):(r=Rd(n))?Bh(r,n,c,u):c(n)):u(a)}catch(t){l&&!i&&l.exit(),u(t)}},Dd=function(t,e){t.notified||(t.notified=!0,td((function(){for(var n,r=t.reactions;n=r.get();)bd(n,t);t.notified=!1,e&&!t.rejection&&Sd(t)})))},Cd=function(t,e,n){var r,i;Ed?((r=yd.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),Fh.dispatchEvent(r)):r={promise:e,reason:n},!ud&&(i=Fh["on"+t])?i(r):t===Td&&ed("Unhandled promise rejection",n)},Sd=function(t){Bh(Zh,Fh,(function(){var e,n=t.facade,r=t.value;if(wd(t)&&(e=nd((function(){Hh?Id.emit("unhandledRejection",r,n):Cd(Td,n,r)})),t.rejection=Hh||wd(t)?2:1,e.error))throw e.value}))},wd=function(t){return 1!==t.rejection&&!t.parent},Od=function(t){Bh(Zh,Fh,(function(){var e=t.facade;Hh?Id.emit("rejectionHandled",e):Cd("rejectionhandled",e,t.value)}))},xd=function(t,e,n){return function(r){t(e,r,n)}},kd=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Dd(t,!0))},Ad=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new gd("Promise can't be resolved itself");var r=Rd(e);r?td((function(){var n={done:!1};try{Bh(r,e,xd(Ad,n,t),xd(kd,n,t))}catch(e){kd(n,e,t)}})):(t.value=e,t.state=1,Dd(t,!1))}catch(e){kd({done:!1},e,t)}}};if(cd&&(vd=(pd=function(t){Qh(this,vd),Jh(t),Bh(Mh,this);var e=hd(this);try{t(xd(Ad,e),xd(kd,e))}catch(t){kd(e,t)}}).prototype,(Mh=function(t){dd(this,{type:sd,done:!1,notified:!1,parent:!1,reactions:new rd,rejection:!1,state:0,value:null})}).prototype=Kh(vd,"then",(function(t,e){var n=hd(this),r=md(Xh(this,pd));return n.parent=!0,r.ok=!Yh(t)||t,r.fail=Yh(e)&&e,r.domain=Hh?Id.domain:void 0,0===n.state?n.reactions.add(r):td((function(){bd(r,n)})),r.promise})),jh=function(){var t=new Mh,e=hd(t);this.promise=t,this.resolve=xd(Ad,e),this.reject=xd(kd,e)},od.f=md=function(t){return t===pd||undefined===t?new jh(t):_d(t)},Yh(ad)&&fd!==Object.prototype)){Vh=fd.then,ld||Kh(fd,"then",(function(t,e){var n=this;return new pd((function(t,e){Bh(Vh,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete fd.constructor}catch(t){}zh&&zh(fd,vd)}Gh({global:!0,constructor:!0,wrap:!0,forced:cd},{Promise:pd}),Wh(pd,sd,!1),qh(sd);var Ld=Pa,Nd=M,Ud=sn,Pd=Ht,Md=Ko,jd=Vr,Vd=mt,Gd=rs,Hd=$o,Fd=Mo,Bd=TypeError,Kd=function(t,e){this.stopped=t,this.result=e},zd=Kd.prototype,Wd=function(t,e,n){var r,i,a,o,s,c,u,l=n&&n.that,h=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=Ld(e,l),g=function(t){return r&&Fd(r,"normal",t),new Kd(!0,t)},y=function(t){return h?(Ud(t),p?v(t[0],t[1],g):v(t[0],t[1])):p?v(t,g):v(t)};if(d)r=t.iterator;else if(f)r=t;else{if(!(i=Hd(t)))throw new Bd(Pd(t)+" is not iterable");if(Md(i)){for(a=0,o=jd(t);o>a;a++)if((s=y(t[a]))&&Vd(zd,s))return s;return new Kd(!1)}r=Gd(t,i)}for(c=d?t.next:r.next;!(u=Nd(c,r)).done;){try{s=y(u.value)}catch(t){Fd(r,"throw",t)}if("object"==typeof s&&s&&Vd(zd,s))return s}return new Kd(!1)},qd=mh,Jd=Ah.CONSTRUCTOR||!ms((function(t){qd.all(t).then(void 0,(function(){}))})),Yd=M,$d=zt,Qd=Lh,Xd=Ih,Zd=Wd;wi({target:"Promise",stat:!0,forced:Jd},{all:function(t){var e=this,n=Qd.f(e),r=n.resolve,i=n.reject,a=Xd((function(){var n=$d(e.resolve),a=[],o=0,s=1;Zd(t,(function(t){var c=o++,u=!1;s++,Yd(n,e,t).then((function(t){u||(u=!0,a[c]=t,--s||r(a))}),i)})),--s||r(a)}));return a.error&&i(a.value),n.promise}});var tf=wi,ef=Ah.CONSTRUCTOR,nf=mh,rf=It,af=ft,of=Dr,sf=nf&&nf.prototype;if(tf({target:"Promise",proto:!0,forced:ef,real:!0},{catch:function(t){return this.then(void 0,t)}}),af(nf)){var cf=rf("Promise").prototype.catch;sf.catch!==cf&&of(sf,"catch",cf,{unsafe:!0})}var uf=M,lf=zt,hf=Lh,df=Ih,ff=Wd;wi({target:"Promise",stat:!0,forced:Jd},{race:function(t){var e=this,n=hf.f(e),r=n.reject,i=df((function(){var i=lf(e.resolve);ff(t,(function(t){uf(i,e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var pf=Lh;wi({target:"Promise",stat:!0,forced:Ah.CONSTRUCTOR},{reject:function(t){var e=pf.f(this);return(0,e.reject)(t),e.promise}});var vf=sn,gf=vt,yf=Lh,If=wi,mf=Ah.CONSTRUCTOR,_f=function(t,e){if(vf(t),gf(e)&&e.constructor===t)return e;var n=yf.f(t);return(0,n.resolve)(e),n.promise};It("Promise"),If({target:"Promise",stat:!0,forced:mf},{resolve:function(t){return _f(this,t)}});var Ef={exports:{}},Tf={},Rf=Z,bf=ht,Df=Cr.f,Cf=Yc,Sf="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Tf.f=function(t){return Sf&&"Window"===Rf(t)?function(t){try{return Df(t)}catch(t){return Cf(Sf)}}(t):Df(bf(t))};var wf=A((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Of=A,xf=vt,kf=Z,Af=wf,Lf=Object.isExtensible,Nf=Of((function(){Lf(1)}))||Af?function(t){return!!xf(t)&&((!Af||"ArrayBuffer"!==kf(t))&&(!Lf||Lf(t)))}:Lf,Uf=!A((function(){return Object.isExtensible(Object.preventExtensions({}))})),Pf=wi,Mf=Y,jf=Bn,Vf=vt,Gf=pe,Hf=en.f,Ff=Cr,Bf=Tf,Kf=Nf,zf=Uf,Wf=!1,qf=me("meta"),Jf=0,Yf=function(t){Hf(t,qf,{value:{objectID:"O"+Jf++,weakData:{}}})},$f=Ef.exports={enable:function(){$f.enable=function(){},Wf=!0;var t=Ff.f,e=Mf([].splice),n={};n[qf]=1,t(n).length&&(Ff.f=function(n){for(var r=t(n),i=0,a=r.length;i<a;i++)if(r[i]===qf){e(r,i,1);break}return r},Pf({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Bf.f}))},fastKey:function(t,e){if(!Vf(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Gf(t,qf)){if(!Kf(t))return"F";if(!e)return"E";Yf(t)}return t[qf].objectID},getWeakData:function(t,e){if(!Gf(t,qf)){if(!Kf(t))return!0;if(!e)return!1;Yf(t)}return t[qf].weakData},onFreeze:function(t){return zf&&Wf&&Kf(t)&&!Gf(t,qf)&&Yf(t),t}};jf[qf]=!0;var Qf=ft,Xf=vt,Zf=fc,tp=function(t,e,n){var r,i;return Zf&&Qf(r=e.constructor)&&r!==n&&Xf(i=r.prototype)&&i!==n.prototype&&Zf(t,i),t},ep=wi,np=x,rp=Y,ip=_i,ap=Dr,op=Ef.exports,sp=Wd,cp=tl,up=ft,lp=at,hp=vt,dp=A,fp=ms,pp=$s,vp=tp,gp=function(t,e,n){var r=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),a=r?"set":"add",o=np[t],s=o&&o.prototype,c=o,u={},l=function(t){var e=rp(s[t]);ap(s,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(i&&!hp(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return i&&!hp(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(i&&!hp(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(ip(t,!up(o)||!(i||s.forEach&&!dp((function(){(new o).entries().next()})))))c=n.getConstructor(e,t,r,a),op.enable();else if(ip(t,!0)){var h=new c,d=h[a](i?{}:-0,1)!==h,f=dp((function(){h.has(1)})),p=fp((function(t){new o(t)})),v=!i&&dp((function(){for(var t=new o,e=5;e--;)t[a](e,e);return!t.has(-0)}));p||((c=e((function(t,e){cp(t,s);var n=vp(new o,t,c);return lp(e)||sp(e,n[a],{that:n,AS_ENTRIES:r}),n}))).prototype=s,s.constructor=c),(f||v)&&(l("delete"),l("has"),r&&l("get")),(v||d)&&l(a),i&&s.clear&&delete s.clear}return u[t]=c,ep({global:!0,constructor:!0,forced:c!==o},u),pp(c,t),i||n.setStrong(c,t,r),c},yp=Dr,Ip=function(t,e,n){for(var r in e)yp(t,r,e[r],n);return t},mp=Io,_p=bu,Ep=Ip,Tp=Pa,Rp=tl,bp=at,Dp=Wd,Cp=Lc,Sp=Nc,wp=Qu,Op=L,xp=Ef.exports.fastKey,kp=rr.set,Ap=rr.getterFor,Lp={getConstructor:function(t,e,n,r){var i=t((function(t,i){Rp(t,a),kp(t,{type:e,index:mp(null),first:null,last:null,size:0}),Op||(t.size=0),bp(i)||Dp(i,t[r],{that:t,AS_ENTRIES:n})})),a=i.prototype,o=Ap(e),s=function(t,e,n){var r,i,a=o(t),s=c(t,e);return s?s.value=n:(a.last=s={index:i=xp(e,!0),key:e,value:n,previous:r=a.last,next:null,removed:!1},a.first||(a.first=s),r&&(r.next=s),Op?a.size++:t.size++,"F"!==i&&(a.index[i]=s)),t},c=function(t,e){var n,r=o(t),i=xp(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key===e)return n};return Ep(a,{clear:function(){for(var t=o(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=mp(null),Op?t.size=0:this.size=0},delete:function(t){var e=this,n=o(e),r=c(e,t);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),Op?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=o(this),r=Tp(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!c(this,t)}}),Ep(a,n?{get:function(t){var e=c(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),Op&&_p(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=Ap(e),a=Ap(r);Cp(t,e,(function(t,e){kp(this,{type:r,target:t,state:i(t),kind:e,last:null})}),(function(){for(var t=a(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?Sp("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=null,Sp(void 0,!0))}),n?"entries":"values",!n,!0),wp(e)}};gp("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Lp);var Np=zi,Up=String,Pp=function(t){if("Symbol"===Np(t))throw new TypeError("Cannot convert a Symbol value to a string");return Up(t)},Mp=Y,jp=xr,Vp=Pp,Gp=ct,Hp=Mp("".charAt),Fp=Mp("".charCodeAt),Bp=Mp("".slice),Kp=function(t){return function(e,n){var r,i,a=Vp(Gp(e)),o=jp(n),s=a.length;return o<0||o>=s?t?"":void 0:(r=Fp(a,o))<55296||r>56319||o+1===s||(i=Fp(a,o+1))<56320||i>57343?t?Hp(a,o):r:t?Bp(a,o,o+2):i-56320+(r-55296<<10)+65536}},zp={codeAt:Kp(!1),charAt:Kp(!0)},Wp=zp.charAt,qp=Pp,Jp=rr,Yp=Lc,$p=Nc,Qp="String Iterator",Xp=Jp.set,Zp=Jp.getterFor(Qp);Yp(String,"String",(function(t){Xp(this,{type:Qp,string:qp(t),index:0})}),(function(){var t,e=Zp(this),n=e.string,r=e.index;return r>=n.length?$p(void 0,!0):(t=Wp(n,r),e.index+=t.length,$p(t,!1))}));var tv={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},ev=Be("span").classList,nv=ev&&ev.constructor&&ev.constructor.prototype,rv=nv===Object.prototype?void 0:nv,iv=x,av=tv,ov=rv,sv=Lo,cv=En,uv=function(t){if(t&&t.forEach!==sv)try{cv(t,"forEach",sv)}catch(e){t.forEach=sv}};for(var lv in av)av[lv]&&uv(iv[lv]&&iv[lv].prototype);uv(ov);var hv=x,dv=tv,fv=rv,pv=Wc,vv=En,gv=$s,yv=we("iterator"),Iv=pv.values,mv=function(t,e){if(t){if(t[yv]!==Iv)try{vv(t,yv,Iv)}catch(e){t[yv]=Iv}if(gv(t,e,!0),dv[e])for(var n in pv)if(t[n]!==pv[n])try{vv(t,n,pv[n])}catch(e){t[n]=pv[n]}}};for(var _v in dv)mv(hv[_v]&&hv[_v].prototype,_v);mv(fv,"DOMTokenList");var Ev=x,Tv=dl,Rv=ft,bv=zu,Dv=Tt,Cv=Yc,Sv=pl,wv=Ev.Function,Ov=/MSIE .\./.test(Dv)||"BUN"===bv&&function(){var t=Ev.Bun.version.split(".");return t.length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2])}(),xv=function(t,e){var n=e?2:1;return Ov?function(r,i){var a=Sv(arguments.length,1)>n,o=Rv(r)?r:wv(r),s=a?Cv(arguments,n):[],c=a?function(){Tv(o,this,s)}:o;return e?t(c,i):t(c)}:t},kv=wi,Av=x,Lv=xv(Av.setInterval,!0);kv({global:!0,bind:!0,forced:Av.setInterval!==Lv},{setInterval:Lv});var Nv=wi,Uv=x,Pv=xv(Uv.setTimeout,!0);Nv({global:!0,bind:!0,forced:Uv.setTimeout!==Pv},{setTimeout:Pv});var Mv="2.2.8",jv={INVITED:"INVITED",ON_CALL_RECEIVED:"onCallReceived",GROUP_CALL_INVITEE_LIST_UPDATE:"GROUP_CALL_INVITEE_LIST_UPDATE",USER_ENTER:"USER_ENTER",USER_LEAVE:"USER_LEAVE",USER_ACCEPT:"USER_ACCEPT",USER_UPDATE:"USER_UPDATE",REJECT:"REJECT",NO_RESP:"NO_RESP",LINE_BUSY:"LINE_BUSY",CALLING_CANCEL:"CALLING_CANCEL",ON_CALL_CANCELED:"onCallCancelled",CALLING_TIMEOUT:"CALLING_TIMEOUT",ON_CALL_BEGIN:"onCallBegin",CALL_END:"CALL_END",USER_VIDEO_AVAILABLE:"USER_VIDEO_AVAILABLE",USER_AUDIO_AVAILABLE:"USER_AUDIO_AVAILABLE",USER_VOICE_VOLUME:"USER_VOICE_VOLUME",SDK_READY:"SDK_READY",KICKED_OUT:"KICKED_OUT",CALL_MODE:"CALL_MODE",HANG_UP:"HANG_UP",ON_USER_NETWORK_QUALITY_CHANGED:"ON_USER_NETWORK_QUALITY_CHANGED",MESSAGE_SENT_BY_ME:"onMessageSentByMe",ERROR:"ERROR",CALL_MESSAGE:"CALL_MESSAGE"},Vv={IDLE:"idle",CALLING:"calling",CONNECTED:"connected"},Gv=1,Hv=2,Fv=3,Bv=4,Kv=5,zv=1,Wv={AUDIO:1,VIDEO:2},qv="",Jv="inviter",Yv="invitee",$v=0,Qv=1,Xv=2,Zv=["","audioCall","videoCall"],tg="audio",eg="video",ng={EAR:"ear",SPEAKER:"speaker"},rg={BASE:Math.pow(2,16),PRO:Math.pow(2,17),ULTIMATE:Math.pow(2,18)},ig=2147483647,ag="video",og="audio",sg="function",cg="inviter",ug="invitee",lg="normal",hg="reject",dg="timeout",fg="raf",pg="interval",vg="cancel",gg="busyline",yg="unknown",Ig="SingleCall",mg="groupCall",_g="caller",Eg="callee",Tg="devtools",Rg="av_call",bg="callkit_records_svr",Dg="single",Cg="group",Sg="start_call",wg="receive_call",Og="call_accepted",xg="accept_call",kg="call_missed",Ag="not_answer_call",Lg="call_rejected",Ng="reject_call",Ug="call_busy",Pg="ignore_call",Mg="cancel_call",jg="call_canceled",Vg="call_failed",Gg="call_end",Hg="invite_user",Fg="join_in_group_call",Bg="event_report",Kg="heartbeat",zg="calling",Wg="miniProgram",qg="banned",Jg="waiting",Yg="userId",$g={MIC_TITLE:"麦克风权限授权",MIC_CONTENT:"使用语音通话,需要在设置中对麦克风进行授权允许",CAMERA_TITLE:"麦克风、摄像头权限授权",CAMERA_CONTENT:"使用视频通话,需要在设置中对麦克风、摄像头进行授权允许",CONFIRM_TEXT:"去设置"},Qg={AUDIO_CALL_MODAL_TITLE:"麦克风权限未开启",AUDIO_CALL_MODAL_CONTENT:"在设置-应用-微信-权限中开启麦克风权限,以正常使用音视频通话功能",VIDEO_CALL_MODAL_TITLE:"麦克风/摄像头权限未开启",VIDEO_CALL_MODAL_CONTENT:"在设置-应用-微信-权限中开启麦克风/摄像头权限,以正常使用音视频通话功能",CONFIRM_MODAL_TEXT:"前往设置"},Xg={AUTHORIZED:"authorized",DENIED:"denied",NOT_DETERMINED:"not determined"},Zg="微信开发者工具不支持原生推拉流组件(即 <live-pusher> 和 <live-player> 标签),请使用真机调试或者扫码预览。",ty={RECORD:"scope.record",CAMERA:"scope.camera"},ey={CAMERA_AUTHORIZED:"cameraAuthorized",MICROPHONE_AUTHORIZED:"microphoneAuthorized"},ny="",ry="call_wait",iy="call_accept",ay={"":Vv.IDLE,call_wait:Vv.CALLING,call_accept:Vv.CONNECTED},oy="https://buy.cloud.tencent.com/avc?addRavLicense=1",sy="https://buy.tencentcloud.com/avc?addRavLicense=1",cy=1,uy=9,ly=17,hy=18,dy=21,fy=15,py={exports:{}};self;var vy=w(py.exports=(()=>(()=>{var t={902:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{c(r.next(t))}catch(t){a(t)}}function s(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(266),c=n(466),u=n(402),l=n(882),h=n(271),d=n(884),f=n(900),p=n(172);!function(t){t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARING=2]="WARING",t[t.ERROR=3]="ERROR"}(o||(o={}));var v={metric:!0,context:!0},g=function(t,e,n){return void 0===n&&(n=0),(0,s.isPlainObject)(t)?(0,s.isPlainObject)(e)?(Object.keys(e).forEach((function(r){var i=t[r],a=e[r];t[r]=v[r]&&0===n?g(i,a,1):a})),t):t:(0,s.isPlainObject)(e)?e:{}},y={clsConfig:{endpoint:"",topicId:""}},I=function(){function t(t){var e=this;this.url="",this.uploadChannel="",this.sendClsPipe=null,this.sendEsPipe=null,this._logLevel=o.INFO,this._getReportDataList=[],this._blacklist=[];var n=t||y,r=n.clsConfig,s=n.esConfig,c=r.endpoint,p=r.topicId;this.esConfig=s,this.endpoint=c,this.topicId=p;var v=this.buildUploadUrl();this.url=v,this.initPageUnloadMonitor(),v&&(this.sendClsPipe=(0,u.createPipeline)([(0,f.filterSdkappIdPipe)(this),(0,d.createThrottlePipe)(this,5),(0,l.formatClsLog)(),(0,h.limitLengthPipe)(),function(t){return i(e,void 0,void 0,(function(){var e,n,r=this;return a(this,(function(o){return e=0,n=function(){return i(r,void 0,void 0,(function(){var r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.send({url:v,data:t})];case 1:return i.sent(),[3,3];case 2:return r=i.sent(),e<=2?(e++,setTimeout((function(){n()}),1e3)):console.debug(r),[3,3];case 3:return[2]}}))}))},n(),[2]}))}))}])),this.updateBlacklist()}return t.prototype.initPageUnloadMonitor=function(){var t=this,e=this;!(0,s.isMiniProgram)()&&document&&"function"==typeof document.addEventListener&&document.addEventListener("visibilitychange",(function(){if("hidden"===document.visibilityState){var n=t.getCommonReportData(),r=g(n,{level:o.WARING,method:"PAGE_UNLOAD",type:"event"});if(e.esConfig)try{var s=e.esConfig,c=s.url,p=s.table;(0,u.createPipeline)([(0,f.filterSdkappIdPipe)(e),(0,d.createThrottlePipe)(e,1),(0,l.formatESLog)({table:p}),(0,h.limitLengthPipe)(),function(e){return i(t,void 0,void 0,(function(){var t;return a(this,(function(n){try{t=new Blob([JSON.stringify(e)],{type:"application/x-www-form-urlencoded"}),null===navigator||void 0===navigator||navigator.sendBeacon(c,t)}catch(t){console.debug(t)}return[2]}))}))}])(r)}catch(t){console.debug(t)}}}))},t.prototype.updateEsConfig=function(t){var e=this;try{if(t){this.esConfig=t;var n=t.url,r=t.table;n&&r&&(this.uploadChannel=n,this.sendEsPipe=(0,u.createPipeline)([(0,f.filterSdkappIdPipe)(this),(0,d.createThrottlePipe)(this,5),(0,l.formatESLog)({table:r}),(0,h.limitLengthPipe)(),function(t){return i(e,void 0,void 0,(function(){var e,r,o=this;return a(this,(function(s){return e=0,r=function(){return i(o,void 0,void 0,(function(){var i;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.send({url:n,data:t})];case 1:return a.sent(),[3,3];case 2:return i=a.sent(),e<=2?(e++,setTimeout((function(){r()}),1e3)):console.debug(i),[3,3];case 3:return[2]}}))}))},r(),[2]}))}))}]))}}catch(t){console.debug(t)}},t.prototype.updateGetReportData=function(t){"function"==typeof t&&this._getReportDataList.push(t)},t.prototype.updateBlacklist=function(){return i(this,void 0,void 0,(function(){var t,e,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,(0,c.request)({url:p.RAINBOW_BLACK_LIST_API})];case 1:return t=r.sent().data,"string"==typeof(e=null==t?void 0:t.blackList)&&(this._blacklist=e.split(",")),[3,3];case 2:return n=r.sent(),console.debug("update blacklist fail",n),[3,3];case 3:return[2]}}))}))},t.prototype.getBlackList=function(){return this._blacklist},t.prototype.setLogLevel=function(t){"number"!=typeof t&&(t=o.INFO),this._logLevel=t},t.prototype.createLogFunc=function(t){var e=this;return function(n,r){e.log(n,r,{level:t})}},t.prototype.buildUploadUrl=function(){return this.endpoint&&this.topicId?"".concat(this.endpoint,"/tracklog?topic_id=").concat(this.topicId):""},t.prototype.sendPipe=function(t){"function"==typeof this.sendClsPipe&&this.sendClsPipe(t),"function"==typeof this.sendEsPipe&&this.sendEsPipe(t)},t.prototype.info=function(t,e){this.log(t,e,{level:o.INFO})},t.prototype.debug=function(t,e){this.log(t,e,{level:o.DEBUG})},t.prototype.warn=function(t,e){this.log(t,e,{level:o.WARING})},t.prototype.error=function(t,e){this.log(t,e,{level:o.ERROR})},t.prototype.log=function(t,e,n){try{var i=n||{},a=i.level;if(i.topicId,this._logLevel<=a){var o=this.getCommonReportData(),s=g(o,r({level:a,method:t},e));this.sendPipe(s)}}catch(t){console.debug(t)}},t.prototype.getCommonReportData=function(){for(var t={},e=0;e<this._getReportDataList.length;e++)t=g(t,this._getReportDataList[e]());return t},t.prototype.send=function(t){return i(this,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(a){switch(a.label){case 0:n=(e=t||{}).url,r=e.data,a.label=1;case 1:return a.trys.push([1,4,,5]),n?[4,(0,c.request)({url:n,data:r,method:"post"})]:[3,3];case 2:a.sent(),a.label=3;case 3:return[3,5];case 4:throw i=a.sent(),console.debug(i),new Error(i);case 5:return[2]}}))}))},t}();e.default=I},900:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.filterSdkappIdPipe=void 0,e.filterSdkappIdPipe=function(t){return function(e,n){try{var r=e.sdkappid,i=t.getBlackList();if(null==i?void 0:i.includes(String(r)))throw new Error("this sdkappid in blacklist");n(e)}catch(t){console.debug(t)}}}},793:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatClsLog=void 0;var r=n(266);e.formatClsLog=function(){return function(t,e){try{e({logs:null==t?void 0:t.map((function(t){var e={};return Object.keys(t).forEach((function(n){if((0,r.isPlainObject)(t[n]))try{e[n]=(0,r.stringifyPlus)(t[n])}catch(t){console.debug(t)}else"time"===n&&(e[n]=new Date(t[n]).toISOString()),e[n]=t[n]+""})),{contents:e,time:t.time}})),source:""})}catch(t){console.debug(t)}}}},713:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatESLog=void 0;var r=n(266);e.formatESLog=function(t){var e=t.table;return function(t,n){try{var i=null==t?void 0:t.map((function(t){var e={};return Object.keys(t).forEach((function(n){if((0,r.isPlainObject)(t[n]))try{e[n]=(0,r.stringifyPlus)(t[n])}catch(t){console.debug(t)}else e[n]="level"===n?t[n]+"":"time"===n?new Date(t[n]).toISOString():t[n]})),e}));n({table:e,report:i})}catch(t){console.debug(t)}}}},882:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatClsLog=e.formatESLog=void 0;var r=n(793);Object.defineProperty(e,"formatClsLog",{enumerable:!0,get:function(){return r.formatClsLog}});var i=n(713);Object.defineProperty(e,"formatESLog",{enumerable:!0,get:function(){return i.formatESLog}})},402:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createPipeline=void 0;var r=n(266);e.createPipeline=function(t){if(!t||!t.reduce||!t.length)throw new TypeError("createPipeline need at least one function param");return 1===t.length?function(e,n){t[0](e,n||r.noop)}:t.reduce((function(t,e){return function(n,i){return void 0===i&&(i=r.noop),t(n,(function(t){return null==e?void 0:e(t,i)}))}}))}},271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.limitLengthPipe=e.MAX_LOG_LENGTH=void 0;var r=n(266);e.MAX_LOG_LENGTH=102400,e.limitLengthPipe=function(){return function(t,n){try{var i=(t=t||{}).logs,a=void 0===i?[]:i;t.logs=null==a?void 0:a.map((function(t){var n=e.MAX_LOG_LENGTH,i=t.contents;return Object.keys(i).forEach((function(t){var e=i[t];try{e&&e.length>n&&(i[t]=null==e?void 0:e.substring(0,n))}catch(a){console.debug("size of content > limitSize"),i[t]=(0,r.stringifyPlus)(e).substring(0,n)}})),t})),n(t)}catch(t){console.debug(t)}}}},884:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createThrottlePipe=void 0,e.createThrottlePipe=function(t,e){var n,r=[];return function(i,a){if(Array.isArray(i)?r=r.concat(i):r.push(i),e&&r.length>=e||t.sendNow&&r.length>0)return a(r.splice(0,r.length)),void(n&&clearTimeout(n));n&&clearTimeout(n),n=setTimeout((function(){n=null,r.length>0&&a(r.splice(0,r.length))}),t.delay||1e3)}}},466:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{c(r.next(t))}catch(t){a(t)}}function s(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},o=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.request=void 0;var s=n(732),c=n(377),u=n(266);e.request=function(t){return i(void 0,void 0,void 0,(function(){var e=t.url,n=t.data,i=t.header,l=void 0===i?{}:i,h=t.method,d=void 0===h?"GET":h,f=t.dataType,p=t.responseType,v=o(t,["url","data","header","method","dataType","responseType"]);return a(this,(function(t){return(0,u.isBrowser)()?[2,(0,c.requestXHR)(e,n,{headers:l,method:d,responseType:p,dataType:f})]:(0,u.isMiniProgram)()?[2,(0,s.requestWeapp)(r({url:e,data:n,header:l,method:d,dataType:f,responseType:p},v))]:(console.debug("unsupport env"),[2])}))}))}},732:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{c(r.next(t))}catch(t){a(t)}}function s(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.requestWeapp=function(t){return i(this,void 0,void 0,(function(){var e;return a(this,(function(n){switch(n.label){case 0:n.trys.push([0,5,6,7]),n.label=1;case 1:return c>=s?[4,(0,o.startBlocking)()]:[3,3];case 2:return n.sent(),[3,1];case 3:return c++,[4,new Promise((function(e,n){wx.request(r(r({},t),{success:function(t){e(t)},fail:function(t){n(t)}}))}))];case 4:return[2,n.sent()];case 5:return e=n.sent(),[2,Promise.reject(e)];case 6:return c--,(0,o.resolveFirstBlock)(),[7];case 7:return[2]}}))}))};var o=n(640),s=2,c=0},377:function(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{c(r.next(t))}catch(t){a(t)}}function s(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}c((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=u,e.requestXHR=function(t){return r(this,arguments,void 0,(function(t,e,n){var l,h=this;return void 0===e&&(e={}),void 0===n&&(n={}),i(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,3,4]),[4,new Promise((function(l,d){return r(h,void 0,void 0,(function(){var r,h,f,p,v,g;return i(this,(function(i){switch(i.label){case 0:return c>=s?[4,(0,o.startBlocking)()]:[3,2];case 1:return i.sent(),[3,0];case 2:return c++,r=n.method,h=n.headers,f=void 0===h?{}:h,p=n.responseType,v=void 0===p?"json":p,r=(r||"get").toUpperCase(),Object.assign(f,{"Content-type":"application/json"}),(g=new window.XMLHttpRequest).responseType=v,g.timeout=1e4,g.onreadystatechange=function(){4===g.readyState&&(200===g.status?l({data:g.response}):d({code:g.status,msg:g.statusText}))},g.ontimeout=function(t){d({code:g.status,msg:g.statusText})},g.onloadend=function(){g&&(u((function(t){l(t)}),(function(t){d(t)}),{status:g.status,statusText:g.statusText}),g=null)},g.onabort=function(){g&&(d(new Error("Request aborted")),g=null)},g.onerror=function(){d(new Error("Network Error")),g=null},"GET"===r?t="".concat(t).concat(-1===t.indexOf("?")?"?":"&").concat(a.default.stringify(e)):"POST"===r&&(e=JSON.stringify(e)),g.open(r,t,!0),Object.keys(f).forEach((function(t){g.setRequestHeader(t,f[t])})),g.send("POST"===r?e:null),[2]}}))}))}))];case 1:return[2,d.sent()];case 2:throw l=d.sent(),new Error(l);case 3:return c--,(0,o.resolveFirstBlock)(),[7];case 4:return[2]}}))}))};var a=n(383),o=n(640),s=2,c=0;function u(t,e,n){n.status?e(new Error("Request failed with status code "+n.status)):t(n)}},172:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RAINBOW_BLACK_LIST_API=void 0,e.RAINBOW_BLACK_LIST_API="https://jsonschema.qpic.cn/87084b1b6d263426b92926cfa5fa23af/18f29786d25587b5eb162d5e9f724b1e/blackList"},266:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.date2ISOString=e.stringifyPlus=e.noop=e.isBrowser=e.isMiniProgram=e.isPlainObject=e.appendParams=void 0,e.appendParams=function(t,n){void 0===n&&(n={});var r=[];return Object.keys(n).forEach((function(t){var i=n[t];if(void 0!==i){if((0,e.isPlainObject)(i))try{i=JSON.stringify(i)}catch(t){}r.push("".concat(t,"=").concat(encodeURIComponent(i)))}})),r.length?(t.indexOf("?")>-1?"".concat(t,"&"):"".concat(t,"?"))+r.join("&"):t},e.isPlainObject=function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n},e.isMiniProgram=function(){try{return!(!(null===wx||void 0===wx?void 0:wx.request)||!(null===wx||void 0===wx?void 0:wx.connectSocket))}catch(t){return!1}},e.isBrowser=function(){try{return!(0,e.isMiniProgram)()&&"undefined"!=typeof window&&void 0!==window.document}catch(t){return!1}},e.noop=function(){};var n=function(){var t=new WeakSet;return function(e,n){if(n instanceof Error)return"Error.message: ".concat(n.message," \n Error.stack: ").concat(n.stack);if("object"==typeof n&&null!==n){if(t.has(n))return"[Circular ".concat(e||"root","]");t.add(n)}return n}};e.stringifyPlus=function(t){if("string"==typeof t)return t;try{return t instanceof Error?(JSON.stringify(t,n())||"undefined").replace(/"/gim,""):JSON.stringify(t,n())||"undefined"}catch(t){return"error happen when aegis stringify: \n ".concat(t.message," \n ").concat(t.stack)}},e.date2ISOString=function(){var t,e=new Date,n=e.toISOString(),r=e.getTimezoneOffset()/60;return t=r<0?r>-10?"+0".concat(Math.abs(100*r)):"+".concat(Math.abs(100*r)):r>=10?"-".concat(100*r):"-0".concat(100*r),n.replace("Z",t)}},383:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});var r=n(266);e.default={stringify:function(t){return t?Object.keys(t).map((function(e){var n=t[e];if((0,r.isPlainObject)(n))n=JSON.stringify(n);else{if("string"!=typeof n&&"number"!=typeof n)return"";n=+n}return encodeURIComponent(e)+"="+encodeURIComponent(n)})).filter((function(t){return t.length>0})).join("&"):""}}},640:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.startBlocking=e.resolveFirstBlock=void 0;var n=[];e.startBlocking=function(){var t,e=new Promise((function(e){t=e}));return n.push({promise:e,resolve:t}),e},e.resolveFirstBlock=function(){n.length&&(n[0].resolve(),n.shift())}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={exports:{}};return t[r].call(a.exports,a,a.exports,n),a.exports}var r={};return(()=>{var t=r;Object.defineProperty(t,"__esModule",{value:!0});var e=n(902),i=null;t.default=function(t){return i||(i=new e.default(t)),i}})(),r})())()),gy=function(){return h((function t(e){s(this,t),this._emitter=e.emitter,this._logger=vy()}),[{key:"onError",value:function(t){this._logger.error("TUICallEvent.onError",{text:{error:t},type:"event"}),this._emitter.emit(jv.ERROR,t)}},{key:"onCallBegin",value:function(t){this._logger.info("TUICallEvent.onCallBegin",{text:{data:t},type:"event"}),this._emitter.emit(jv.ON_CALL_BEGIN,t)}},{key:"onCallEnd",value:function(t){this._logger.info("TUICallEvent.onCallEnd",{text:{data:t},type:"event"});var e=t.userID,n=t.callEnd,r=t.message,i=t.roomID,a=t.callMediaType,o=t.callRole,s=t.totalTime;this._emitter.emit(jv.CALL_END,{userID:e,callEnd:n,message:r,roomID:i,callMediaType:a,callRole:o,totalTime:s})}},{key:"onInvited",value:function(t){this._logger.info("TUICallEvent.onInvited",{text:{data:t},type:"event"}),this._emitter.emit(jv.INVITED,t),this._emitter.emit(jv.ON_CALL_RECEIVED,t)}},{key:"onLineBusy",value:function(t){this._logger.info("TUICallEvent.onLineBusy",{text:{data:t},type:"event"});var e=t.inviteID,n=t.invitee,r=t.userID;this._emitter.emit(jv.LINE_BUSY,{inviteID:e,invitee:n,userID:r,reason:"line busy"})}},{key:"onReject",value:function(t){var e=t.inviteID,n=t.invitee,r=t.userID;this._emitter.emit(jv.REJECT,{inviteID:e,invitee:n,userID:r,reason:"reject"})}},{key:"onNoResp",value:function(t){this._logger.info("TUICallEvent.onNoResp",{text:{data:t},type:"event"});var e=t.groupID,n=void 0===e?"":e,r=t.inviteID,i=t.sponsor,a=t.timeoutUserList,o=t.userIDList;this._emitter.emit(jv.NO_RESP,{groupID:n,inviteID:r,sponsor:i,timeoutUserList:a,userIDList:o})}},{key:"onCancel",value:function(t){this._emitter.emit(jv.CALLING_CANCEL,t),this._emitter.emit(jv.ON_CALL_CANCELED,t)}},{key:"onTimeout",value:function(t){this._logger.info("TUICallEvent.onTimeout",{text:{data:t},type:"event"});var e=t.inviteID,n=t.groupID,r=t.sponsor,i=t.timeoutUserList;this._emitter.emit(jv.CALLING_TIMEOUT,{groupID:n,inviteID:e,sponsor:r,timeoutUserList:i})}},{key:"onUserAccept",value:function(t){this._logger.info("TUICallEvent.onUserAccept",{text:{data:t},type:"event"});var e=t.userID,n=t.userList;this._emitter.emit(jv.USER_ACCEPT,{userID:e,userList:n})}},{key:"onUserEnter",value:function(t){this._logger.info("TUICallEvent.onUserEnter",{text:{data:t},type:"event"});var e=t.userID,n=t.playerList;this._emitter.emit(jv.USER_ENTER,{userID:e,playerList:n})}},{key:"onUserLeave",value:function(t){this._logger.info("TUICallEvent.onUserLeave",{text:{data:t},type:"event"});var e=t.userID,n=t.playerList;this._emitter.emit(jv.USER_LEAVE,{userID:e,playerList:n})}},{key:"onUserUpdate",value:function(t){var e=t.pusher,n=t.playerList;this._emitter.emit(jv.USER_UPDATE,{pusher:e,playerList:n})}},{key:"onUserNetworkQualityChanged",value:function(t){this._emitter.emit(jv.ON_USER_NETWORK_QUALITY_CHANGED,{networkQualityList:t})}},{key:"onSdkReady",value:function(t){this._logger.info("TUICallEvent.onSdkReady",{text:{data:t},type:"event"}),this._emitter.emit(jv.SDK_READY,t)}},{key:"onKickedOut",value:function(t){this._logger.info("TUICallEvent.onKickedOut",{text:{data:t},type:"event"}),this._emitter.emit(jv.KICKED_OUT,t)}},{key:"onCallMode",value:function(t){this._logger.info("TUICallEvent.onCallMode",{text:{data:t},type:"event"}),this._emitter.emit(jv.CALL_MODE,t)}},{key:"onMessageSentByMe",value:function(t){this._logger.info("TUICallEvent.onMessageSentByMe",{text:{data:t},type:"event"}),this._emitter.emit(jv.MESSAGE_SENT_BY_ME,t)}},{key:"onCallMessage",value:function(t){var e;this._logger.info("TUICallEvent.onCallMessage",{text:{data:t},type:"event"}),this._emitter.emit(jv.CALL_MESSAGE,null==t||null===(e=t.data)||void 0===e?void 0:e.message)}},{key:"destroyed",value:function(){this._logger.info("TUICallEvent.destroyed",{type:"api"}),this._emitter=null}}])}(),yy={},Iy=we;yy.f=Iy;var my=x,_y=my,Ey=pe,Ty=yy,Ry=en.f,by=M,Dy=It,Cy=we,Sy=Dr,wy=wi,Oy=x,xy=M,ky=Y,Ay=L,Ly=Lt,Ny=A,Uy=pe,Py=mt,My=sn,jy=ht,Vy=Ve,Gy=Pp,Hy=K,Fy=Io,By=Ya,Ky=Cr,zy=Tf,Wy=ti,qy=k,Jy=en,Yy=Wa,$y=j,Qy=Dr,Xy=bu,Zy=ce,tI=Bn,eI=me,nI=we,rI=yy,iI=function(t){var e=_y.Symbol||(_y.Symbol={});Ey(e,t)||Ry(e,t,{value:Ty.f(t)})},aI=function(){var t=Dy("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,r=Cy("toPrimitive");e&&!e[r]&&Sy(e,r,(function(t){return by(n,this)}),{arity:1})},oI=$s,sI=rr,cI=Ka.forEach,uI=Fn("hidden"),lI="Symbol",hI="prototype",dI=sI.set,fI=sI.getterFor(lI),pI=Object[hI],vI=Oy.Symbol,gI=vI&&vI[hI],yI=Oy.RangeError,II=Oy.TypeError,mI=Oy.QObject,_I=qy.f,EI=Jy.f,TI=zy.f,RI=$y.f,bI=ky([].push),DI=Zy("symbols"),CI=Zy("op-symbols"),SI=Zy("wks"),wI=!mI||!mI[hI]||!mI[hI].findChild,OI=function(t,e,n){var r=_I(pI,e);r&&delete pI[e],EI(t,e,n),r&&t!==pI&&EI(pI,e,r)},xI=Ay&&Ny((function(){return 7!==Fy(EI({},"a",{get:function(){return EI(this,"a",{value:7}).a}})).a}))?OI:EI,kI=function(t,e){var n=DI[t]=Fy(gI);return dI(n,{type:lI,tag:t,description:e}),Ay||(n.description=e),n},AI=function(t,e,n){t===pI&&AI(CI,e,n),My(t);var r=Vy(e);return My(n),Uy(DI,r)?(n.enumerable?(Uy(t,uI)&&t[uI][r]&&(t[uI][r]=!1),n=Fy(n,{enumerable:Hy(0,!1)})):(Uy(t,uI)||EI(t,uI,Hy(1,Fy(null))),t[uI][r]=!0),xI(t,r,n)):EI(t,r,n)},LI=function(t,e){My(t);var n=jy(e),r=By(n).concat(MI(n));return cI(r,(function(e){Ay&&!xy(NI,n,e)||AI(t,e,n[e])})),t},NI=function(t){var e=Vy(t),n=xy(RI,this,e);return!(this===pI&&Uy(DI,e)&&!Uy(CI,e))&&(!(n||!Uy(this,e)||!Uy(DI,e)||Uy(this,uI)&&this[uI][e])||n)},UI=function(t,e){var n=jy(t),r=Vy(e);if(n!==pI||!Uy(DI,r)||Uy(CI,r)){var i=_I(n,r);return!i||!Uy(DI,r)||Uy(n,uI)&&n[uI][r]||(i.enumerable=!0),i}},PI=function(t){var e=TI(jy(t)),n=[];return cI(e,(function(t){Uy(DI,t)||Uy(tI,t)||bI(n,t)})),n},MI=function(t){var e=t===pI,n=TI(e?CI:jy(t)),r=[];return cI(n,(function(t){!Uy(DI,t)||e&&!Uy(pI,t)||bI(r,DI[t])})),r};Ly||(Qy(gI=(vI=function(){if(Py(gI,this))throw new II("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Gy(arguments[0]):void 0,e=eI(t),n=function(t){var r=void 0===this?Oy:this;r===pI&&xy(n,CI,t),Uy(r,uI)&&Uy(r[uI],e)&&(r[uI][e]=!1);var i=Hy(1,t);try{xI(r,e,i)}catch(t){if(!(t instanceof yI))throw t;OI(r,e,i)}};return Ay&&wI&&xI(pI,e,{configurable:!0,set:n}),kI(e,t)})[hI],"toString",(function(){return fI(this).tag})),Qy(vI,"withoutSetter",(function(t){return kI(eI(t),t)})),$y.f=NI,Jy.f=AI,Yy.f=LI,qy.f=UI,Ky.f=zy.f=PI,Wy.f=MI,rI.f=function(t){return kI(nI(t),t)},Ay&&(Xy(gI,"description",{configurable:!0,get:function(){return fI(this).description}}),Qy(pI,"propertyIsEnumerable",NI,{unsafe:!0}))),wy({global:!0,constructor:!0,wrap:!0,forced:!Ly,sham:!Ly},{Symbol:vI}),cI(By(SI),(function(t){iI(t)})),wy({target:lI,stat:!0,forced:!Ly},{useSetter:function(){wI=!0},useSimple:function(){wI=!1}}),wy({target:"Object",stat:!0,forced:!Ly,sham:!Ay},{create:function(t,e){return void 0===e?Fy(t):LI(Fy(t),e)},defineProperty:AI,defineProperties:LI,getOwnPropertyDescriptor:UI}),wy({target:"Object",stat:!0,forced:!Ly},{getOwnPropertyNames:PI}),aI(),oI(vI,lI),tI[uI]=!0;var jI=Lt&&!!Symbol.for&&!!Symbol.keyFor,VI=wi,GI=It,HI=pe,FI=Pp,BI=ce,KI=jI,zI=BI("string-to-symbol-registry"),WI=BI("symbol-to-string-registry");VI({target:"Symbol",stat:!0,forced:!KI},{for:function(t){var e=FI(t);if(HI(zI,e))return zI[e];var n=GI("Symbol")(e);return zI[e]=n,WI[n]=e,n}});var qI=wi,JI=pe,YI=Vt,$I=Ht,QI=jI,XI=ce("symbol-to-string-registry");qI({target:"Symbol",stat:!0,forced:!QI},{keyFor:function(t){if(!YI(t))throw new TypeError($I(t)+" is not a symbol");if(JI(XI,t))return XI[t]}});var ZI=xi,tm=ft,em=Z,nm=Pp,rm=Y([].push),im=wi,am=It,om=dl,sm=M,cm=Y,um=A,lm=ft,hm=Vt,dm=Yc,fm=function(t){if(tm(t))return t;if(ZI(t)){for(var e=t.length,n=[],r=0;r<e;r++){var i=t[r];"string"==typeof i?rm(n,i):"number"!=typeof i&&"Number"!==em(i)&&"String"!==em(i)||rm(n,nm(i))}var a=n.length,o=!0;return function(t,e){if(o)return o=!1,e;if(ZI(this))return e;for(var r=0;r<a;r++)if(n[r]===t)return e}}},pm=Lt,vm=String,gm=am("JSON","stringify"),ym=cm(/./.exec),Im=cm("".charAt),mm=cm("".charCodeAt),_m=cm("".replace),Em=cm(1..toString),Tm=/[\uD800-\uDFFF]/g,Rm=/^[\uD800-\uDBFF]$/,bm=/^[\uDC00-\uDFFF]$/,Dm=!pm||um((function(){var t=am("Symbol")("stringify detection");return"[null]"!==gm([t])||"{}"!==gm({a:t})||"{}"!==gm(Object(t))})),Cm=um((function(){return'"\\udf06\\ud834"'!==gm("\udf06\ud834")||'"\\udead"'!==gm("\udead")})),Sm=function(t,e){var n=dm(arguments),r=fm(e);if(lm(r)||void 0!==t&&!hm(t))return n[1]=function(t,e){if(lm(r)&&(e=sm(r,this,vm(t),e)),!hm(e))return e},om(gm,null,n)},wm=function(t,e,n){var r=Im(n,e-1),i=Im(n,e+1);return ym(Rm,t)&&!ym(bm,i)||ym(bm,t)&&!ym(Rm,r)?"\\u"+Em(mm(t,0),16):t};gm&&im({target:"JSON",stat:!0,arity:3,forced:Dm||Cm},{stringify:function(t,e,n){var r=dm(arguments),i=om(Dm?Sm:gm,null,r);return Cm&&"string"==typeof i?_m(i,Tm,wm):i}});var Om=ti,xm=he;wi({target:"Object",stat:!0,forced:!Lt||A((function(){Om.f(1)}))},{getOwnPropertySymbols:function(t){var e=Om.f;return e?e(xm(t)):[]}});var km=wi,Am=L,Lm=Y,Nm=pe,Um=ft,Pm=mt,Mm=Pp,jm=bu,Vm=hi,Gm=x.Symbol,Hm=Gm&&Gm.prototype;if(Am&&Um(Gm)&&(!("description"in Hm)||void 0!==Gm().description)){var Fm={},Bm=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:Mm(arguments[0]),e=Pm(Hm,this)?new Gm(t):void 0===t?Gm():Gm(t);return""===t&&(Fm[e]=!0),e};Vm(Bm,Gm),Bm.prototype=Hm,Hm.constructor=Bm;var Km="Symbol(description detection)"===String(Gm("description detection")),zm=Lm(Hm.valueOf),Wm=Lm(Hm.toString),qm=/^Symbol\((.*)\)[^)]+$/,Jm=Lm("".replace),Ym=Lm("".slice);jm(Hm,"description",{configurable:!0,get:function(){var t=zm(this);if(Nm(Fm,t))return"";var e=Wm(t),n=Km?Ym(e,7,-1):Jm(e,qm,"$1");return""===n?void 0:n}}),km({global:!0,constructor:!0,forced:!0},{Symbol:Bm})}var $m={UNKNOWN:65535,NO_NETWORK:2805,FAILURE_SWITCH_TO_AUDIO:60001,FAILURE_SWITCH_TO_VIDEO:60002,ERROR_PACKAGE_NOT_PURCHASED:-1001,ERROR_PACKAGE_NOT_SUPPORTED:-1002,ERROR_TIM_VERSION_OUTDATED:-1003,ERROR_PERMISSION_DENIED:-1101,ERROR_GET_DEVICE_LIST_FAIL:-1102,ERROR_INIT_FAIL:-1201,ERROR_PARAM_INVALID:-1202,ERROR_REQUEST_REFUSED:-1203,ERROR_REQUEST_REPEATED:-1204,ERROR_SCENE_NOT_SUPPORTED:-1205,INVALID_PARAMETER_REQUIRED:-120200,INVALID_PARAMETER_TYPE:-120201,INVALID_PARAMETER_EMPTY:-120202,INVALID_PARAMETER_RANGE:-120203,ERROR_SIGNALING_SEND_FAIL:-1401,ERROR_INVALID_INVITEID:8010,ERROR_INVALID_SEND_FAIL:8021,ERROR_BLACKLIST:20007};wi({target:"Array",stat:!0},{isArray:xi});var Qm=wi,Xm=it,Zm=ht,t_=ko,e_=Y([].join);Qm({target:"Array",proto:!0,forced:Xm!==Object||!t_("join",",")},{join:function(t){return e_(Zm(this),void 0===t?",":t)}});var n_=sn,r_=function(){var t=n_(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},i_=M,a_=pe,o_=mt,s_=r_,c_=RegExp.prototype,u_=wn.PROPER,l_=Dr,h_=sn,d_=Pp,f_=A,p_=function(t){var e=t.flags;return void 0!==e||"flags"in c_||a_(t,"flags")||!o_(c_,t)?e:i_(s_,t)},v_="toString",g_=RegExp.prototype,y_=g_[v_],I_=f_((function(){return"/a/b"!==y_.call({source:"a",flags:"b"})})),m_=u_&&y_.name!==v_;(I_||m_)&&l_(g_,v_,(function(){var t=h_(this);return"/"+d_(t.source)+"/"+d_(p_(t))}),{unsafe:!0});var __=wi,E_=Ka.findIndex,T_=bo,R_="findIndex",b_=!0;R_ in[]&&Array(1)[R_]((function(){b_=!1})),__({target:"Array",proto:!0,forced:b_},{findIndex:function(t){return E_(this,t,arguments.length>1?arguments[1]:void 0)}}),T_(R_);var D_=xr,C_=Pp,S_=ct,w_=RangeError,O_=function(t){var e=C_(S_(this)),n="",r=D_(t);if(r<0||r===1/0)throw new w_("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n},x_=Y,k_=Mr,A_=Pp,L_=ct,N_=x_(O_),U_=x_("".slice),P_=Math.ceil,M_=function(t){return function(e,n,r){var i,a,o=A_(L_(e)),s=k_(n),c=o.length,u=void 0===r?" ":A_(r);return s<=c||""===u?o:((a=N_(u,P_((i=s-c)/u.length))).length>i&&(a=U_(a,0,i)),t?o+a:a+o)}},j_=Y,V_=A,G_={start:M_(!1),end:M_(!0)}.start,H_=RangeError,F_=isFinite,B_=Math.abs,K_=Date.prototype,z_=K_.toISOString,W_=j_(K_.getTime),q_=j_(K_.getUTCDate),J_=j_(K_.getUTCFullYear),Y_=j_(K_.getUTCHours),$_=j_(K_.getUTCMilliseconds),Q_=j_(K_.getUTCMinutes),X_=j_(K_.getUTCMonth),Z_=j_(K_.getUTCSeconds),tE=V_((function(){return"0385-07-25T07:06:39.999Z"!==z_.call(new Date(-50000000000001))}))||!V_((function(){z_.call(new Date(NaN))}))?function(){if(!F_(W_(this)))throw new H_("Invalid time value");var t=this,e=J_(t),n=$_(t),r=e<0?"-":e>9999?"+":"";return r+G_(B_(e),r?6:4,0)+"-"+G_(X_(t)+1,2,0)+"-"+G_(q_(t),2,0)+"T"+G_(Y_(t),2,0)+":"+G_(Q_(t),2,0)+":"+G_(Z_(t),2,0)+"."+G_(n,3,0)+"Z"}:z_;wi({target:"Date",proto:!0,forced:Date.prototype.toISOString!==tE},{toISOString:tE});var eE=Y(1..valueOf),nE="\t\n\v\f\r    \u2028\u2029\ufeff",rE=ct,iE=Pp,aE=nE,oE=Y("".replace),sE=RegExp("^["+aE+"]+"),cE=RegExp("(^|[^"+aE+"])["+aE+"]+$"),uE=function(t){return function(e){var n=iE(rE(e));return 1&t&&(n=oE(n,sE,"")),2&t&&(n=oE(n,cE,"$1")),n}},lE={start:uE(1),end:uE(2),trim:uE(3)},hE=wi,dE=L,fE=x,pE=my,vE=Y,gE=_i,yE=pe,IE=tp,mE=mt,_E=Vt,EE=Pe,TE=A,RE=Cr.f,bE=k.f,DE=en.f,CE=eE,SE=lE.trim,wE="Number",OE=fE[wE];pE[wE];var xE=OE.prototype,kE=fE.TypeError,AE=vE("".slice),LE=vE("".charCodeAt),NE=function(t){var e,n,r,i,a,o,s,c,u=EE(t,"number");if(_E(u))throw new kE("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=SE(u),43===(e=LE(u,0))||45===e){if(88===(n=LE(u,2))||120===n)return NaN}else if(48===e){switch(LE(u,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+u}for(o=(a=AE(u,2)).length,s=0;s<o;s++)if((c=LE(a,s))<48||c>i)return NaN;return parseInt(a,r)}return+u},UE=gE(wE,!OE(" 0o1")||!OE("0b1")||OE("+0x1")),PE=function(t){var e,n=arguments.length<1?0:OE(function(t){var e=EE(t,"number");return"bigint"==typeof e?e:NE(e)}(t));return mE(xE,e=this)&&TE((function(){CE(e)}))?IE(Object(n),this,PE):n};PE.prototype=xE,UE&&(xE.constructor=PE),hE({global:!0,constructor:!0,wrap:!0,forced:UE},{Number:PE});UE&&function(t,e){for(var n,r=dE?RE(e):"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(","),i=0;r.length>i;i++)yE(e,n=r[i])&&!yE(t,n)&&DE(t,n,bE(e,n))}(pE[wE],OE);var ME=dl,jE=zt,VE=sn;wi({target:"Reflect",stat:!0,forced:!A((function(){Reflect.apply((function(){}))}))},{apply:function(t,e,n){return ME(jE(t),e,VE(n))}});var GE,HE,FE=A,BE=x.RegExp,KE=FE((function(){var t=BE("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),zE=KE||FE((function(){return!BE("a","y").sticky})),WE={BROKEN_CARET:KE||FE((function(){var t=BE("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:zE,UNSUPPORTED_Y:KE},qE=A,JE=x.RegExp,YE=qE((function(){var t=JE(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),$E=A,QE=x.RegExp,XE=$E((function(){var t=QE("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),ZE=M,tT=Y,eT=Pp,nT=r_,rT=WE,iT=Io,aT=rr.get,oT=YE,sT=XE,cT=ce("native-string-replace",String.prototype.replace),uT=RegExp.prototype.exec,lT=uT,hT=tT("".charAt),dT=tT("".indexOf),fT=tT("".replace),pT=tT("".slice),vT=(HE=/b*/g,ZE(uT,GE=/a/,"a"),ZE(uT,HE,"a"),0!==GE.lastIndex||0!==HE.lastIndex),gT=rT.BROKEN_CARET,yT=void 0!==/()??/.exec("")[1];(vT||yT||gT||oT||sT)&&(lT=function(t){var e,n,r,i,a,o,s,c=this,u=aT(c),l=eT(t),h=u.raw;if(h)return h.lastIndex=c.lastIndex,e=ZE(lT,h,l),c.lastIndex=h.lastIndex,e;var d=u.groups,f=gT&&c.sticky,p=ZE(nT,c),v=c.source,g=0,y=l;if(f&&(p=fT(p,"y",""),-1===dT(p,"g")&&(p+="g"),y=pT(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==hT(l,c.lastIndex-1))&&(v="(?: "+v+")",y=" "+y,g++),n=new RegExp("^(?:"+v+")",p)),yT&&(n=new RegExp("^"+v+"$(?!\\s)",p)),vT&&(r=c.lastIndex),i=ZE(uT,f?n:c,y),f?i?(i.input=pT(i.input,g),i[0]=pT(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:vT&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),yT&&i&&i.length>1&&ZE(cT,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&d)for(i.groups=o=iT(null),a=0;a<d.length;a++)o[(s=d[a])[0]]=i[s[1]];return i});var IT=lT;wi({target:"RegExp",proto:!0,forced:/./.exec!==IT},{exec:IT});var mT=M,_T=Dr,ET=IT,TT=A,RT=we,bT=En,DT=RT("species"),CT=RegExp.prototype,ST=function(t,e,n,r){var i=RT(t),a=!TT((function(){var e={};return e[i]=function(){return 7},7!==""[t](e)})),o=a&&!TT((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[DT]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](""),!e}));if(!a||!o||n){var s=/./[i],c=e(i,""[t],(function(t,e,n,r,i){var o=e.exec;return o===ET||o===CT.exec?a&&!i?{done:!0,value:mT(s,e,n,r)}:{done:!0,value:mT(t,n,e,r)}:{done:!1}}));_T(String.prototype,t,c[0]),_T(CT,i,c[1])}r&&bT(CT[i],"sham",!0)},wT=zp.charAt,OT=function(t,e,n){return e+(n?wT(t,e).length:1)},xT=M,kT=sn,AT=ft,LT=Z,NT=IT,UT=TypeError,PT=function(t,e){var n=t.exec;if(AT(n)){var r=xT(n,t,e);return null!==r&&kT(r),r}if("RegExp"===LT(t))return xT(NT,t,e);throw new UT("RegExp#exec called on incompatible receiver")},MT=M,jT=sn,VT=at,GT=Mr,HT=Pp,FT=ct,BT=Jt,KT=OT,zT=PT;ST("match",(function(t,e,n){return[function(e){var n=FT(this),r=VT(e)?void 0:BT(e,t);return r?MT(r,e,n):new RegExp(e)[t](HT(n))},function(t){var r=jT(this),i=HT(t),a=n(e,r,i);if(a.done)return a.value;if(!r.global)return zT(r,i);var o=r.unicode;r.lastIndex=0;for(var s,c=[],u=0;null!==(s=zT(r,i));){var l=HT(s[0]);c[u]=l,""===l&&(r.lastIndex=KT(i,GT(r.lastIndex),o)),u++}return 0===u?null:c}]}));var WT=Y,qT=he,JT=Math.floor,YT=WT("".charAt),$T=WT("".replace),QT=WT("".slice),XT=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ZT=/\$([$&'`]|\d{1,2})/g,tR=dl,eR=M,nR=Y,rR=ST,iR=A,aR=sn,oR=ft,sR=at,cR=xr,uR=Mr,lR=Pp,hR=ct,dR=OT,fR=Jt,pR=function(t,e,n,r,i,a){var o=n+t.length,s=r.length,c=ZT;return void 0!==i&&(i=qT(i),c=XT),$T(a,c,(function(a,c){var u;switch(YT(c,0)){case"$":return"$";case"&":return t;case"`":return QT(e,0,n);case"'":return QT(e,o);case"<":u=i[QT(c,1,-1)];break;default:var l=+c;if(0===l)return a;if(l>s){var h=JT(l/10);return 0===h?a:h<=s?void 0===r[h-1]?YT(c,1):r[h-1]+YT(c,1):a}u=r[l-1]}return void 0===u?"":u}))},vR=PT,gR=we("replace"),yR=Math.max,IR=Math.min,mR=nR([].concat),_R=nR([].push),ER=nR("".indexOf),TR=nR("".slice),RR="$0"==="a".replace(/./,"$0"),bR=!!/./[gR]&&""===/./[gR]("a","$0");rR("replace",(function(t,e,n){var r=bR?"$":"$0";return[function(t,n){var r=hR(this),i=sR(t)?void 0:fR(t,gR);return i?eR(i,t,r,n):eR(e,lR(r),t,n)},function(t,i){var a=aR(this),o=lR(t);if("string"==typeof i&&-1===ER(i,r)&&-1===ER(i,"$<")){var s=n(e,a,o,i);if(s.done)return s.value}var c=oR(i);c||(i=lR(i));var u,l=a.global;l&&(u=a.unicode,a.lastIndex=0);for(var h,d=[];null!==(h=vR(a,o))&&(_R(d,h),l);){""===lR(h[0])&&(a.lastIndex=dR(o,uR(a.lastIndex),u))}for(var f,p="",v=0,g=0;g<d.length;g++){for(var y,I=lR((h=d[g])[0]),m=yR(IR(cR(h.index),o.length),0),_=[],E=1;E<h.length;E++)_R(_,void 0===(f=h[E])?f:String(f));var T=h.groups;if(c){var R=mR([I],_,m,o);void 0!==T&&_R(R,T),y=lR(tR(i,void 0,R))}else y=pR(I,o,m,_,T,i);m>=v&&(p+=TR(o,v,m)+y,v=m+I.length)}return p+TR(o,v)}]}),!!iR((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!RR||bR);var DR,CR=vt,SR=Z,wR=we("match"),OR=function(t){var e;return CR(t)&&(void 0!==(e=t[wR])?!!e:"RegExp"===SR(t))},xR=TypeError,kR=function(t){if(OR(t))throw new xR("The method doesn't accept regular expressions");return t},AR=we("match"),LR=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[AR]=!1,"/./"[t](e)}catch(t){}}return!1},NR=wi,UR=Aa,PR=k.f,MR=Mr,jR=Pp,VR=kR,GR=ct,HR=LR,FR=UR("".slice),BR=Math.min,KR=HR("startsWith");NR({target:"String",proto:!0,forced:!!(KR||(DR=PR(String.prototype,"startsWith"),!DR||DR.writable))&&!KR},{startsWith:function(t){var e=jR(GR(this));VR(t);var n=MR(BR(arguments.length>1?arguments[1]:void 0,e.length)),r=jR(t);return FR(e,n,n+r.length)===r}});var zR=x,WR=A,qR=Y,JR=Pp,YR=lE.trim,$R=nE,QR=zR.parseInt,XR=zR.Symbol,ZR=XR&&XR.iterator,tb=/^[+-]?0x/i,eb=qR(tb.exec),nb=8!==QR($R+"08")||22!==QR($R+"0x16")||ZR&&!WR((function(){QR(Object(ZR))}))?function(t,e){var n=YR(JR(t));return QR(n,e>>>0||(eb(tb,n)?16:10))}:QR;function rb(t,e){t=t.split("."),e=e.split(".");for(var n=Math.max(t.length,e.length);t.length<n;)t.push("0");for(;e.length<n;)e.push("0");for(var r=0;r<n;r++){var i=parseInt(t[r],10),a=parseInt(e[r],10);if(i>a)return 1;if(i<a)return-1}return 0}wi({global:!0,forced:parseInt!==nb},{parseInt:nb});var ib="TRTC-ROOM",ab=wx||qq;ab||console.error(ib,"不支持当前小程序环境");var ob,sb=ab.getSystemInfoSync(),cb=sb.safeArea;("iOS 13.3"===sb.system||"iPhoneX"===sb.model&&"iOS 13.3.1"===sb.system)&&console.log("use media audio volume type"),console.log(ib,"SystemInfo",sb),"undefined"!=typeof qq?ob=!0:"undefined"!=typeof wx&&(ob=rb(sb.version,"7.0.8")>=0||rb(sb.version,"2.4.0")>=0&&rb(sb.version,"6.0.0")<0&&rb(sb.SDKVersion,"2.10.0")>=0);var ub=ob,lb="undefined"!=typeof uni,hb=/iOS/i.test(sb.system),db=/Android/i.test(sb.system);/mac/i.test(sb.system);var fb=sb.version,pb=sb.SDKBuild?"".concat(sb.SDKVersion,"-").concat(sb.SDKBuild):sb.SDKVersion;sb.screenHeight,cb.bottom,console.log(ib,"APP_VERSION:",fb," LIB_VERSION:",pb," is new version:",ub);var vb=L,gb=xi,yb=TypeError,Ib=Object.getOwnPropertyDescriptor,mb=vb&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}()?function(t,e){if(gb(t)&&!Ib(t,"length").writable)throw new yb("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},_b=Ht,Eb=TypeError,Tb=wi,Rb=he,bb=Nr,Db=xr,Cb=Vr,Sb=mb,wb=Ai,Ob=ha,xb=Pi,kb=function(t,e){if(!delete t[e])throw new Eb("Cannot delete property "+_b(e)+" of "+_b(t))},Ab=va("splice"),Lb=Math.max,Nb=Math.min;Tb({target:"Array",proto:!0,forced:!Ab},{splice:function(t,e){var n,r,i,a,o,s,c=Rb(this),u=Cb(c),l=bb(t,u),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=u-l):(n=h-2,r=Nb(Lb(Db(e),0),u-l)),wb(u+n-r),i=Ob(c,r),a=0;a<r;a++)(o=l+a)in c&&xb(i,a,c[o]);if(i.length=r,n<r){for(a=l;a<u-r;a++)s=a+n,(o=a+r)in c?c[s]=c[o]:kb(c,s);for(a=u;a>u-r+n;a--)kb(c,a-1)}else if(n>r)for(a=u-r;a>l;a--)s=a+n-1,(o=a+r-1)in c?c[s]=c[o]:kb(c,s);for(a=0;a<n;a++)c[a+l]=arguments[a+2];return Sb(c,u-r+n),i}}),gp("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Lp);var Ub,Pb,Mb=Nf;wi({target:"Object",stat:!0,forced:Object.isExtensible!==Mb},{isExtensible:Mb}),Ub="undefined"!=typeof console?console:"undefined"!=typeof global&&global.console?global.console:"undefined"!=typeof window&&window.console?window.console:{};for(var jb=function(){},Vb=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],Gb=Vb.length-1;Gb;)Pb=Vb[Gb],console[Pb]||(Ub[Pb]=jb),Gb-=1;Object.isExtensible(Ub)&&(Ub.methods=Vb);var Hb=Ub,Fb=0,Bb=new Map,Kb="CallEngine";function zb(){var t=new Date;return"[".concat(t.toLocaleTimeString("en-US",{hour12:!1}),".").concat(function(t){var e;switch(t.toString().length){case 1:e="00".concat(t);break;case 2:e="0".concat(t);break;default:e=t}return e}(t.getMilliseconds()),"]")}var Wb={_data:[],_length:0,_visible:!1,arguments2String:function(t,e){var n;if(1===e.length)n="【".concat(Kb,"】").concat(zb()," <").concat(t,"> ").concat(e[0]);else{n="【".concat(Kb,"】").concat(zb()," <").concat(t,"> ");for(var r=0,i=e.length;r<i;r++)Xb(e[r])?nD(e[r])?n+=rD(e[r]):n+=JSON.stringify(e[r]):n+=e[r],n+=" "}return n},debug:function(){if(Fb<=-1){var t=this.arguments2String("DEBUG",arguments);Wb.record(t,"debug"),Hb.debug(t)}},log:function(){if(Fb<=0){var t=this.arguments2String("LOG",arguments);Wb.record(t,"log"),Hb.log(t)}},info:function(){if(Fb<=1){var t=this.arguments2String("INFO",arguments);Wb.record(t,"info"),Hb.info(t)}},warn:function(){if(Fb<=2){var t=this.arguments2String("WARN",arguments);Wb.record(t,"warn"),Hb.warn(t)}},error:function(){if(Fb<=3){var t=this.arguments2String("ERROR",arguments);Wb.record(t,"error"),Hb.error(t)}},time:function(t){Bb.set(t,eD.now())},timeEnd:function(t){if(Bb.has(t)){var e=eD.now()-Bb.get(t);return Bb.delete(t),e}return Hb.warn("未找到对应label: ".concat(t,", 请在调用 logger.timeEnd 前,调用 logger.time")),0},setLevel:function(t){t<4&&Hb.log("".concat(zb(),"set level from ").concat(Fb," to ").concat(t)),Fb=t},getLevel:function(){return Fb},record:function(t,e){1100===Wb._length&&(Wb._data.splice(0,100),Wb._length=1e3),Wb._length+=1,Wb._data.push("".concat(t," [").concat(e,"] \n"))},getLog:function(){return Wb._data}},qb=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"array"===function(t){return Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase()}(t)},Jb=function(t){return null!==t&&("number"==typeof t&&!isNaN(t-0)||"object"===b(t)&&t.constructor===Number)},Yb=function(t){return"string"==typeof t},$b=function(t){return null!==t&&"object"===b(t)},Qb=function(t){return void 0===t},Xb=function(t){return qb(t)||$b(t)},Zb=function(t){return b(t)===sg},tD=0;Date.now||(Date.now=function(){return(new Date).getTime()});var eD={now:function(){0===tD&&(tD=Date.now()-1);var t=Date.now()-tD;return t>4294967295?(tD+=4294967295,Date.now()-tD):t},utc:function(){return Math.round(Date.now()/1e3)}},nD=function(t){return t instanceof Error},rD=function(t){return JSON.stringify(t,["message","code"])};function iD(){var t="unknown";return hb&&(t="ios"),db&&(t="android"),t}function aD(t){return oD.apply(this,arguments)}function oD(){return oD=a(_().mark((function t(e){var n,r,i,o,s,c,u;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return",!1);case 2:return n=e.microphone,r=void 0!==n&&n,i=e.camera,o=void 0!==i&&i,t.prev=3,t.next=6,new Promise(function(){var t=a(_().mark((function t(e,n){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:wx.getSetting({success:function(t){var n=null;n=wx.$TUICallKitPlugin?t.miniprogramAuthSetting:t.authSetting,e(n)},fail:function(t){n(t)}});case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}());case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0=!1;case 9:if(s=t.t0,c=s[ty.RECORD],u=s[ty.CAMERA],!r||!o){t.next=14;break}return t.abrupt("return",c&&u);case 14:if(!r){t.next=16;break}return t.abrupt("return",c);case 16:if(!o){t.next=18;break}return t.abrupt("return",u);case 18:return t.abrupt("return",!1);case 21:return t.prev=21,t.t1=t.catch(3),t.abrupt("return",!1);case 24:case"end":return t.stop()}}),t,null,[[3,21]])}))),oD.apply(this,arguments)}function sD(t){if(!t)return!1;var e=t.microphone,n=void 0!==e&&e,r=t.camera,i=void 0!==r&&r,a=wx.getAppAuthorizeSetting(),o=a[ey.MICROPHONE_AUTHORIZED]===Xg.AUTHORIZED,s=a[ey.CAMERA_AUTHORIZED]===Xg.AUTHORIZED;return n&&i?o&&s:n?o:!!i&&s}function cD(t){return t===Rg}function uD(){return performance&&performance.now?Math.floor(performance.now()):Date.now()}function lD(t){var e=String(t);return e.startsWith("14")||e.startsWith("16")||e.startsWith("17")}function hD(t){var e=lD(t)?oy:sy;return"".concat(e,"&position=").concat(t,"&regionId=").concat(function(t){return t>=2e7&&t<3e7||t>=172e7&&t<173e7?uy:t>=3e7&&t<4e7||t>=173e7&&t<174e7?hy:t>=4e7&&t<5e7||t>=174e7&&t<175e7?ly:t>=5e7&&t<6e7||t>=175e7&&t<176e7?dy:t>=7e7&&t<8e7||t>=177e7&&t<178e7?fy:cy}(t))}function dD(t){return Reflect.apply(Object.prototype.toString,t,[]).replace(/^\[object\s(\w+)\]$/,"$1").toLowerCase()}function fD(t,e){return Jb(t)&&t>0?t:0===t&&e?e:Math.floor(2147483646*Math.random()+1)}function pD(t,e,n){if(0===Object.keys(e).length)return t;var r=t.findIndex((function(t){return t[n]===e[n]}));return-1!==r?t[r]=e:t.push(e),t}function vD(t){return gD.apply(this,arguments)}function gD(){return gD=a(_().mark((function t(e){var n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.map(function(){var t=a(_().mark((function t(e){var n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return n=t.sent,t.abrupt("return",{status:"fulfilled",value:n});case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",{status:"rejected",reason:t.t0});case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}()));case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)}))),gD.apply(this,arguments)}function yD(t){if("string"!=typeof t)return t;var e;try{var n=JSON.parse(t);e="object"===b(n)&&n?n:t}catch(n){e=t}return e}function ID(t){t=t||32;for(var e="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",n="",r=0;r<t;r++)n+=e.charAt(Math.floor(48*Math.random()));return n}var mD={NO_NETWORK:"未连接到网络",FAILURE_SWITCH_TO_AUDIO:"switch to audio call error",FAILURE_SWITCH_TO_VIDEO:"switch to video call error",ERROR_NULL:"success",ERROR_PACKAGE_NOT_PURCHASED:"You do not have TUICallKit package, please open the free experience in the console: https://console.intl.cloud.tencent.com/im/detail or purchase the official package: ${purchaseAddress}",ERROR_PACKAGE_NOT_SUPPORTED:"The package you purchased does not support this ability. You can refer to here to purchase: ${purchaseAddress}",ERROR_TIM_VERSION_OUTDATED:"TIM SDK version is too old. Please upgrade version",ERROR_PERMISSION_DENIED:"camera / microphone permission refused. Please go to: https://cloud.tencent.com/document/product/647/78770",ERROR_GET_DEVICE_LIST_FAIL:"Failed to get device list",ERROR_INIT_FAIL:"init is not complete, this API needs to be used after init. To solve the problem, please go to: https://cloud.tencent.com/document/product/647/78769#3a61f42b-e06f-49af-88bf-362d40025887",ERROR_REQUEST_REFUSED:"The API is not support use in the current state. Please go to: https://cloud.tencent.com/document/product/647/78769#5e65043d-e3dc-4bd3-8220-3ac7694dfa42",ERROR_REQUEST_REPEATED:"The current method is being executed, please do not call it repeatedly",ERROR_REQUEST_REPEATED_SWITCH:"Consistent with the current call type, please do not switch repeatedly",ERROR_SCENE_NOT_SUPPORTED:"In the current call scene, this function is not supported",ERROR_SIGNALING_SEND_FAIL:"signaling failed to send",ERROR_INVALID_INVITEID:"Failed to send message, common reasons: the called userID or groupID does not exist. To solve the problem, please go to: https://cloud.tencent.com/document/product/647/84363#e97ea97b-7812-42ed-89b7-2a3840ac0e3f",ERROR_INVALID_SEND_FAIL:"Invalid sender or receiver identifier! To solve the problem, please go to: https://cloud.tencent.com/document/product/647/84363#661be1b0-f649-4199-a343-958c3f4f4bbb",ERROR_PARAM_INVALID:"invalid parameter"},_D={NO_NETWORK:"未连接到网络",FAILURE_SWITCH_TO_AUDIO:"切换语音通话失败",FAILURE_SWITCH_TO_VIDEO:"切换视频通话失败",ERROR_NULL:"成功",ERROR_PACKAGE_NOT_PURCHASED:"您的应用还未开通音视频通话TUICallKit能力您可以去控制台申请免费体验: https://console.cloud.tencent.com/im/detail 或购买通话能力套餐包: ${purchaseAddress}",ERROR_PACKAGE_NOT_SUPPORTED:"您暂不支持使用该能力,请前往如下购买页购买开通: ${purchaseAddress}",ERROR_TIM_VERSION_OUTDATED:"TIM SDK 版本太旧,请升级版本",ERROR_PERMISSION_DENIED:"摄像头/麦克风权限被拒绝。解决方案请前往: https://cloud.tencent.com/document/product/647/78770",ERROR_GET_DEVICE_LIST_FAIL:"获取设备列表失败",ERROR_INIT_FAIL:"TUICallEngine init 未完成,需要在 init 完成后使用此 API。解决方案请前往: https://cloud.tencent.com/document/product/647/78769#3a61f42b-e06f-49af-88bf-362d40025887",ERROR_REQUEST_REFUSED:"当前通话状态无法使用该API。解决方案请前往: https://cloud.tencent.com/document/product/647/78769#5e65043d-e3dc-4bd3-8220-3ac7694dfa42",ERROR_REQUEST_REPEATED:"当前方法正在执行中,请勿重复调用",ERROR_REQUEST_REPEATED_SWITCH:"与当前通话类型一致,请勿重复切换",ERROR_SCENE_NOT_SUPPORTED:"当前通话场景不支持该功能",ERROR_SIGNALING_SEND_FAIL:"信令发送失败",ERROR_INVALID_INVITEID:"inviteID 无效或邀请已处理。解决方案请前往: https://cloud.tencent.com/document/product/647/84363#e97ea97b-7812-42ed-89b7-2a3840ac0e3f",ERROR_INVALID_SEND_FAIL:"消息发送失败,常见原因:被叫用户 userID 或群 groupID 不存在。解决方案请前往: https://cloud.tencent.com/document/product/647/84363#661be1b0-f649-4199-a343-958c3f4f4bbb",ERROR_PARAM_INVALID:"参数错误"};function ED(t){var e,n,r,i,a=t.code,o=t.params,s=t.enableDocLink,c=void 0!==s&&s,u=t.languageList,l=void 0===u?["en","zh-CN"]:u,h="",d=(n=$m,r=a,i="",Object.keys(n).forEach((function(t){n[t]===r&&(i=t)})),i);try{l.forEach((function(t){switch(t){case"en":e=TD[d];break;case"zh-CN":e=RD[d]}Zb(e)?(h=h?"".concat(h," "):h,h+=e(o)):Yb(e)&&(h=e)}))}catch(t){e=TD.UNKNOWN_ERROR}return c&&(h+=" doc:"),h}var TD={ERROR_INIT_FAIL:function(t){var e=t.fnName;return"".concat(e,": ").concat(mD.ERROR_INIT_FAIL,".")},ERROR_SCENE_NOT_SUPPORTED:function(t){var e=t.fnName;return"".concat(e,": ").concat(mD.ERROR_SCENE_NOT_SUPPORTED,".")},ERROR_REQUEST_REFUSED:function(t){var e=t.value;return"".concat(mD.ERROR_REQUEST_REFUSED,". customStatus: ").concat(e,".")},ERROR_PARAM_INVALID:function(t){var e=t.fnName;return"the parameters of the '".concat(e,"' you called does not meet the requirements, please check the API documentation.")},INVALID_PARAMETER_REQUIRED:function(t){var e=t.key,n=t.rule,r=t.fnName,i=t.value;return"'".concat(e||n.name,"' is a required param when calling ").concat(r,"(), received: ").concat(i,".")},INVALID_PARAMETER_TYPE:function(t){var e=t.key,n=t.rule,r=t.fnName,i=t.value,a="".concat(e||n.name),o="";return o=Array.isArray(n.type)?n.type.join("|"):n.type,"'".concat(a,"' must be type of ").concat(o," when calling ").concat(r,"(), received type: ").concat(dD(i),".")},INVALID_PARAMETER_EMPTY:function(t){var e=t.key,n=t.rule,r=t.fnName;return"'".concat(e||n.name,"' cannot be empty when calling ").concat(r,"().")},INVALID_PARAMETER_RANGE:function(t){var e=t.key,n=t.rule,r=t.fnName,i=t.value;return qb(n.values)?"'".concat(e||n.name,"' must be one of ").concat(n.values.join("|")," when calling ").concat(r,"(), received: ").concat(i,"."):Yb(n.values)&&-1!==n.values.indexOf("~")?"'".concat(e||n.name,"' must be the range of ").concat(n.values," when calling ").concat(r,"(), received: ").concat(i,"."):void 0},ERROR_REQUEST_REPEATED:function(t){var e=t.fnName;return"you are already ".concat(e,"(), cannot repeated call '").concat(e,"'.")},ERROR_HTTP:function(){return"".concat(mD.ERROR_HTTP,".")},ERROR_TIM_VERSION_OUTDATED:function(){return"".concat(mD.ERROR_TIM_VERSION_OUTDATED," >= 2.21.2.")},ERROR_PACKAGE_NOT_SUPPORTED:function(){return"".concat(mD.ERROR_PACKAGE_NOT_SUPPORTED,".")},FAILURE_SWITCH_TO_AUDIO:function(){return"".concat(mD.FAILURE_SWITCH_TO_AUDIO,".")},NOT_MICROPHONE_LIST:function(t){var e=t.fnName,n=t.error;return"NotFoundError, no microphone detected, please check your device and the configuration on '".concat(e,"'").concat(n?", error: ".concat(n.toString(),"."):".")},NOT_CAMERA_LIST:function(t){var e=t.fnName,n=t.error;return"NotFoundError, no camera detected, please check your device and the configuration on '".concat(e,"'").concat(n?", error: ".concat(n.toString(),"."):".")},ERROR_PERMISSION_DENIED:function(t){var e=t.fnName,n=t.error;return"NotAllowedError, you have disabled camera/microphone access, please allow the current application ".concat(e," to use the camera/microphone. ").concat(n?", error: ".concat(n.toString(),"."):".")},ERROR_INVALID_SEND_FAIL:function(){return"".concat(mD.ERROR_INVALID_SEND_FAIL,".")},UNKNOWN_ERROR:function(t){var e=t.fnName,n=t.error;return"'".concat(e,"' throw unknown exception").concat(n?", error: ".concat(n.toString(),"."):".")}},RD={ERROR_INIT_FAIL:function(t){var e=t.fnName;return"".concat(e,": ").concat(_D.ERROR_INIT_FAIL,"。")},ERROR_SCENE_NOT_SUPPORTED:function(t){var e=t.fnName;return"".concat(e,": ").concat(_D.ERROR_SCENE_NOT_SUPPORTED,"。")},ERROR_REQUEST_REFUSED:function(t){var e=t.value;return"".concat(_D.ERROR_REQUEST_REFUSED,". customStatus: ").concat(e,"。")},ERROR_PARAM_INVALID:function(t){var e=t.fnName;return"the parameters of the '".concat(e,"' you called does not meet the requirements, please check the API documentation.")},INVALID_PARAMETER_REQUIRED:function(t){var e=t.key,n=t.rule,r=t.fnName,i=t.value;return"调用 ".concat(r,"() 方法的时候 '").concat(e||n.name,"' 是必须的参数, 收到的值为: ").concat(i,"。")},INVALID_PARAMETER_TYPE:function(t){var e=t.key,n=t.rule,r=t.fnName,i=t.value,a="".concat(e||n.name),o="";return o=Array.isArray(n.type)?n.type.join("|"):n.type,"调用 ".concat(r,"() 方法的时候 '").concat(a,"' 必须是 ").concat(o," 类型, 收到的类型是: ").concat(dD(i),"。")},INVALID_PARAMETER_EMPTY:function(t){var e=t.key,n=t.rule,r=t.fnName;return t.value,"调用 ".concat(r,"() 的时候 '").concat(e||n.name,"' 不能是空。")},INVALID_PARAMETER_RANGE:function(t){var e=t.key,n=t.rule,r=t.fnName,i=t.value;return qb(n.values)?"调用 ".concat(r,"() 的时候 '").concat(e||n.name,"' 必须是 ").concat(n.values.join("|")," 的其中一种, 收到的是: ").concat(i,"。"):Yb(n.values)&&-1!==n.values.indexOf("~")?"调用 ".concat(r,"() 的时候 '").concat(e||n.name,"' 范围是 ").concat(n.values,", 收到的是: ").concat(i,"。"):void 0},ERROR_REQUEST_REPEATED:function(t){var e=t.fnName;return"你已经调用 ".concat(e,"(), 请勿重复调用 '").concat(e,"'。")},ERROR_HTTP:function(){return"".concat(_D.ERROR_HTTP,"。")},ERROR_TIM_VERSION_OUTDATED:function(){return"".concat(_D.ERROR_TIM_VERSION_OUTDATED," >= 2.21.2。")},ERROR_PACKAGE_NOT_SUPPORTED:function(){return"".concat(_D.ERROR_PACKAGE_NOT_SUPPORTED,"。")},FAILURE_SWITCH_TO_AUDIO:function(){return"".concat(_D.FAILURE_SWITCH_TO_AUDIO,"。")},NOT_MICROPHONE_LIST:function(t){var e=t.fnName,n=t.error;return"NotFoundError未检测到麦克风设备请检查您的设备和麦克风上的配置 '".concat(e,"'").concat(n?", error: ".concat(n.toString(),"."):".")},NOT_CAMERA_LIST:function(t){var e=t.fnName,n=t.error;return"NotFoundError未检测到摄像头设备请检查您的设备和摄像头上的配置 '".concat(e,"'").concat(n?", error: ".concat(n.toString(),"."):".")},ERROR_PERMISSION_DENIED:function(t){t.fnName;var e=t.error;return"NotAllowedError, 您已禁用摄像头/麦克风访问权限,请允许当前应用程序使用摄像头/麦克风。".concat(e?", error: ".concat(e.toString(),"."):".")},ERROR_INVALID_SEND_FAIL:function(){return"".concat(_D.ERROR_INVALID_SEND_FAIL,".")}},bD=function(){function t(e){var n,r=e.name,i=void 0===r?"":r,a=e.code,c=void 0===a?$m.UNKNOWN:a,u=e.message,l=void 0===u?"":u,h=e.messageParams,d=void 0===h?{}:h;e.extraCode;var f=e.fnName,p=void 0===f?"":f;return s(this,t),(n=o(this,t,[l||ED({code:c,params:I({fnName:p},d)})])).name=i||n.name,n.code=c,n.functionName=p||n.functionName,n}return v(t,C(Error)),h(t,[{key:"getCode",value:function(){return this.code}}])}(),DD=["inviteID","type"],CD=function(){return h((function t(e){s(this,t),f(this,"_tuiCallEngine",null),this._tuiCallEngine=e.tuiCallEngine,this._chat=e.chat,this._logger=vy()}),[{key:"handleNewSignaling",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this._logger.info("TSignaling.handleNewSignaling.start",{text:{data:{data:t,params:e,userData:n}},type:"api"});var r=I(I({userData:n||""},t),{},{version:4,businessID:"av_call",platform:"MiniApp",data:I({cmd:Zv[t.call_type],room_id:t.room_id,str_room_id:t.str_room_id,inviter:this._tuiCallEngine.getInviterID(),message:""},e)});return void 0!==this._tuiCallEngine.getExcludeFromHistoryMessage()&&(this._tuiCallEngine.getExcludeFromHistoryMessage()?r.data.excludeFromHistoryMessage=!0:delete r.data.excludeFromHistoryMessage),delete r.str_room_id,r}},{key:"extractCallingInfoFromMessage",value:function(t){if(!t||"TIMCustomElem"!==t.type)return"";var e=JSON.parse(t.payload.data);if(e.businessID!==zv)return"";switch(e.actionType){case Gv:var n=JSON.parse(e.data);return n.call_end>0&&!e.groupID?n.call_end:0!==n.call_end&&n.room_id?"发起通话":"结束群聊";case Hv:return"取消通话";case Fv:return"已接听";case Bv:return"拒绝通话";case Kv:return"无应答";default:return""}}},{key:"handleError",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.code,n=void 0===e?"":e,r=t.message;if(n)throw new bD({message:void 0===r?"":r,code:n})}},{key:"_handleInviteData",value:function(t){var e=t.type,n=t.roomID,r=t.strRoomId,i=t.userIDList,a=t.hangup,o=t.switchMode,s=t.userData;if(a)return JSON.stringify(this.handleNewSignaling({version:0,call_type:e,call_end:a.callEnd},{cmd:"hangup"}));if(o){var c={version:0,call_type:e,room_id:n},u={cmd:"switchToVideo"};return o===tg&&(c.switch_to_audio_call="switch_to_audio_call",u.cmd="switchToAudio"),JSON.stringify(this.handleNewSignaling(c,u))}var l=this.handleNewSignaling({version:0,call_type:e,room_id:n,str_room_id:r},{userIDs:i,excludeFromHistoryMessage:!0},s);return this._tuiCallEngine.setInitialInviteData(l),JSON.stringify(l)}},{key:"_handleInviteGroupData",value:function(t){var e=t.type,n=t.roomID,r=t.strRoomId,i=t.hangup,a=t.userData;return i?JSON.stringify(this.handleNewSignaling({version:0,call_type:e,call_end:i.call_end},{cmd:"hangup"},a)):JSON.stringify(this.handleNewSignaling({version:0,call_type:e,room_id:n,str_room_id:r},{},a))}},{key:"invite",value:(c=a(_().mark((function t(e){var n,r,i,a;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("TSignaling.invite.start",{text:{data:{params:e}},type:"api"}),n=e.userID,r=e.offlinePushInfo,i=e.timeout,a=e.switchMode,t.prev=2,t.next=5,this._chat.invite({userID:n,data:this._handleInviteData(e),timeout:i,offlinePushInfo:this._convertOfflinePushParams(r)});case 5:return t.abrupt("return",t.sent);case 8:if(t.prev=8,t.t0=t.catch(2),this._logger.error("TSignaling.invite.fail",{text:{data:{params:e},error:t.t0},type:"api"}),!a){t.next=13;break}return t.abrupt("return",this.handleError(t.t0,a));case 13:return t.abrupt("return",this.handleError(t.t0,"invite"));case 14:case"end":return t.stop()}}),t,this,[[2,8]])}))),function(t){return c.apply(this,arguments)})},{key:"inviteGroup",value:(o=a(_().mark((function t(e){var n,r,i,a,o,s;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("TSignaling.inviteGroup.start",{text:{data:{params:e}},type:"api"}),n=e.groupID,r=e.userIDList,i=e.offlinePushInfo,a=e.timeout,o=e.inCallUserIDs,s=void 0===o?[]:o,t.prev=2,t.next=5,this._chat.inviteInGroup({groupID:n,inviteeList:r,timeout:a,data:this._handleInviteGroupData(e),offlinePushInfo:this._convertOfflinePushParams(i),inCallUserIDs:s});case 5:return t.abrupt("return",t.sent);case 8:return t.prev=8,t.t0=t.catch(2),this._logger.error("TSignaling.inviteGroup.fail",{text:{data:{params:e},error:t.t0},type:"api"}),t.abrupt("return",this.handleError(t.t0,"inviteGroup"));case 12:case"end":return t.stop()}}),t,this,[[2,8]])}))),function(t){return o.apply(this,arguments)})},{key:"accept",value:(i=a(_().mark((function t(e,n){var r,i,a;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("TSignaling.accept.start",{text:{data:{params:e,supportParams:n}},type:"api"}),r=e.inviteID,i=e.type,a=m(e,DD),t.prev=2,t.next=5,this._chat.accept({inviteID:r,data:JSON.stringify(this.handleNewSignaling(I({version:0,call_type:i},a),I(I({},n),{},{excludeFromHistoryMessage:!0})))});case 5:return t.abrupt("return",t.sent);case 8:return t.prev=8,t.t0=t.catch(2),this._logger.error("TSignaling.accept.fail",{text:{error:t.t0},type:"api"}),t.abrupt("return",this.handleError(t.t0,"accept"));case 12:case"end":return t.stop()}}),t,this,[[2,8]])}))),function(t,e){return i.apply(this,arguments)})},{key:"reject",value:(r=a(_().mark((function t(e){var n,r,i,a,o;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("TSignaling.reject.start",{text:{data:{params:e}},type:"api"}),n=e.inviteID,r=e.type,i=e.lineBusy,a={version:0,call_type:r},o=null,i?(a.line_busy=i,o=JSON.stringify(this.handleNewSignaling(a,{message:"lineBusy"}))):o=JSON.stringify(this.handleNewSignaling(a)),t.prev=5,t.next=8,this._tuiCallEngine.modifyInvitation(n);case 8:return t.next=10,this._chat.reject({inviteID:n,data:o});case 10:return t.abrupt("return",t.sent);case 13:if(t.prev=13,t.t0=t.catch(5),this._logger.error("TSignaling.reject.fail",{text:{error:t.t0},type:"api"}),!i){t.next=18;break}return t.abrupt("return",this.handleError(t.t0,"line_busy"));case 18:return t.abrupt("return",this.handleError(t.t0,"reject"));case 19:case"end":return t.stop()}}),t,this,[[5,13]])}))),function(t){return r.apply(this,arguments)})},{key:"cancel",value:(n=a(_().mark((function t(e){var n,r,i;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("TSignaling.cancel.start",{text:{data:{params:e}},type:"api"}),n=e.inviteID,r=e.callType,t.prev=2,t.next=5,this._chat.cancel({inviteID:n,data:JSON.stringify(this.handleNewSignaling({version:0,call_type:r}))});case 5:return i=t.sent,t.abrupt("return",i);case 9:return t.prev=9,t.t0=t.catch(2),this._logger.error("TSignaling.cancel.fail",{text:{error:t.t0},type:"api"}),t.abrupt("return",this.handleError(t.t0,"cancel"));case 13:case"end":return t.stop()}}),t,this,[[2,9]])}))),function(t){return n.apply(this,arguments)})},{key:"hangup",value:(e=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h,d,f;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("TSignaling.hangup.start",{text:{data:{params:e}},type:"api"}),n=e.userIDList,r=e.callType,i=e.callEnd,a=void 0===i?0:i,o=e.isGroupCall,s=void 0!==o&&o,c=e.groupID,u=void 0===c?"":c,l={version:0,call_type:r,call_end:a},h={cmd:"hangup"},d=JSON.stringify(this.handleNewSignaling(l,h)),f={},!s||!u){t.next=12;break}return t.next=9,this._chat.inviteInGroup({inviteeList:n,groupID:u,data:d,timeout:0});case 9:f=t.sent,t.next=15;break;case 12:return t.next=14,this._chat.invite({userID:n[0],data:d,timeout:0});case 14:f=t.sent;case 15:return this._tuiCallEngine.TRTCCallingDelegate.onCallMessage(f),t.abrupt("return",f);case 17:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"switchCallMode",value:(t=a(_().mark((function t(e){var n,r,i,a;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("TSignaling.switchCallMode.start",{text:{data:{params:e}},type:"api"}),n=e.userID,r=e.callType,i=e.roomID,a=e.mode,t.abrupt("return",this.invite({userID:n,type:r,roomID:i,switchMode:a}));case 3:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"destroyed",value:function(){this._logger.info("TSignaling.destroyed.start",{type:"api"}),this._chat=null}},{key:"setLogLevel",value:function(t){this._chat.setLogLevel(t)}},{key:"_convertOfflinePushParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(t).length)return{};var e=t.title,n=t.description,r=t.androidOPPOChannelID,i=t.extension,a=t.isDisablePush,o=t.iOSPushType,s=void 0===o?0:o,c=t.ignoreIOSBadge,u=t.iOSSound,l=t.androidSound,h=t.androidVIVOClassification;return{title:e||"",description:n||"",extension:i||"",disablePush:a||!1,androidInfo:{sound:l,XiaoMiChannelID:t.androidXiaoMiChannelID,OPPOChannelID:r,FCMChannelID:t.androidFCMChannelID,VIVOClassification:h,HuaWeiCategory:t.androidHuaWeiCategory},apnsInfo:{sound:u,ignoreIOSBadge:c||!1,disableVoipPush:1!==s}}}}]);var t,e,n,r,i,o,c}(),SD=function(){return h((function t(){s(this,t),this._table="timweb-trtccalling",this._report=[]}),[{key:"pushIn",value:function(t){Wb.debug("SSOLogBody.pushIn",this._report.length,t),this._report.push(t)}},{key:"backfill",value:function(t){var e;qb(t)&&0!==t.length&&(Wb.debug("SSOLogBody.backfill",this._report.length,t.length),(e=this._report).unshift.apply(e,T(t)))}},{key:"getLogsNumInMemory",value:function(){return this._report.length}},{key:"isEmpty",value:function(){return 0===this._report.length}},{key:"_reset",value:function(){this._report.length=0,this._report=[]}},{key:"getTable",value:function(){return this._table}},{key:"getLogsInMemory",value:function(){var t=this._report.slice();return this._reset(),t}}])}(),wD=function(){function t(e){s(this,t),this.sdkappid="",this.version="",this.userid="",this.platform="",this.useragent="",this.method=e,this.codeint=1,this.calltype=1,this.talktime=0,this.message="",this.text="",this.startts=Date.now(),this.endts=0,this.timespan=0,this.time="",this.networktype="",this.host=iD()}return h(t,[{key:"setCommonInfo",value:function(t){var e,n,r,i,a=t.SDKAppID,o=t.version,s=t.userID,c=t.platform,u=t.scene;this.sdkappid=a,this.version="".concat(o),this.userid=s,this.platform=c,this.scene=u,this.time=(e=new Date,n=e.toISOString(),r=e.getTimezoneOffset()/60,i="",i=r<0?r>-10?"+0".concat(Math.abs(100*r)):"+".concat(Math.abs(100*r)):r>=10?"-".concat(100*r):"-0".concat(100*r),n.replace("Z",i)),this.startts&&this.endts&&!this.timespan&&(this.timespan=Math.abs(this.endts-this.startts))}},{key:"setEnd",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.endts=Date.now(),e?this._eventStatController.pushIn(this):setTimeout((function(){t._eventStatController.pushIn(t)}),0)}},{key:"setError",value:function(t,e,n){return this.setNetworkType(n),e?(t.code&&this.setCode(t.code),t.message&&this.setMessage(t.message)):(this.setCode($m.NO_NETWORK),this.setMessage(mD.NO_NETWORK)),this}},{key:"setCode",value:function(t){return"ECONNABORTED"===t&&(this.codeint=103),Jb(t)?this.codeint=t:Wb.warn("SSOLogData.setCode value not a number, please check!",t,b(t)),this}},{key:"setMessage",value:function(t){return Yb(t)?(this.message=t,this):this}},{key:"setText",value:function(t){return Jb(t)?this.text=t.toString():Yb(t)&&(this.text=t),this}},{key:"setTalkTime",value:function(t){return this.talktime=t,this}},{key:"setMessageType",value:function(t){return this.msgType=t,this}},{key:"setCallType",value:function(t){return this.calltype=t,this}},{key:"setNetworkType",value:function(t){return Qb(t)?Wb.warn("SSOLogData.setNetworkType value is undefined, please check!"):this.networktype=t,this}}],[{key:"bindController",value:function(e){t.prototype._eventStatController=e}}])}(),OD={CURRENT:{COMMON:"https://webim.tim.qq.com"},PRODUCTION:{COMMON:"https://webim.tim.qq.com"}},xD={IM_OPEN_STAT:"imopenstat"},kD={TIM_WEB_TRTCCALLING_REPORT:"tweb_trtccalling_report"},AD={imopenstat:"v4"},LD=function(){return h((function t(){s(this,t),this.TAG="trtccalling-ssolog-event",this._reportBody=new SD,this._version=Mv,this.MIN_THRESHOLD=20,this.MAX_THRESHOLD=100,this.WAITING_TIME=6e4,this.INTERVAL=2e4,this._timerID=0,this._resetLastReportTime(),this._startReportTimer(),this._retryCount=0,this.MAX_RETRY_COUNT=3}),[{key:"reportAtOnce",value:function(){Wb.debug("EventStatController.reportAtOnce"),this._report()}},{key:"pushIn",value:function(t){t instanceof wD&&(t.setCommonInfo({SDKAppID:Number(wx.getStorageSync("sdkAppId")),version:this._version,userID:wx.getStorageSync("userId")}),this._reportBody.pushIn(t),this._report())}},{key:"_resetLastReportTime",value:function(){this._lastReportTime=Date.now()}},{key:"_startReportTimer",value:function(){var t=this;this._timerID=setInterval((function(){Date.now()<t._lastReportTime+t.WAITING_TIME||t._reportBody.isEmpty()||t._report()}),this.INTERVAL)}},{key:"_stopReportTimer",value:function(){this._timerID>0&&(clearInterval(this._timerID),this._timerID=0)}},{key:"_report",value:function(){var t=this;if(!this._reportBody.isEmpty()){var e=Math.ceil(+new Date/1e3),n=wx.getStorageSync("sdkAppId"),r=this._reportBody.getLogsInMemory(),i={table:this._reportBody.getTable(),report:r},a=OD.CURRENT.COMMON,o=AD.imopenstat,s=xD.IM_OPEN_STAT,c=kD.TIM_WEB_TRTCCALLING_REPORT,u="".concat(a,"/").concat(o,"/").concat(s,"/").concat(c,"/?sdkappid=").concat(n,"&reqtime=").concat(e);wx.request({url:u,method:"POST",data:JSON.stringify(i),header:{"content-type":"application/json"},success:function(e){t._retryCount>0&&(Wb.debug("EventStatController.report retry success"),t._retryCount=0)},fail:function(e){Wb.warn("EventStatController.report, error:".concat(rD(e))),t._reportBody.backfill(r),t._reportBody.getLogsNumInMemory()>t.MAX_THRESHOLD||t._retryCount===t.MAX_RETRY_COUNT||0===t._timerID?t._retryCount=0:t._retryCount+=1}})}}},{key:"reset",value:function(){Wb.log("EventStatController.reset"),this._stopReportTimer(),this._report()}}])}(),ND=function(){return h((function t(){s(this,t)}),[{key:"on",value:function(t,e,n){"function"==typeof e?(this._stores=this._stores||{},(this._stores[t]=this._stores[t]||[]).push({cb:e,ctx:n})):console.error("listener must be a function")}},{key:"emit",value:function(t){this._stores=this._stores||{};var e,n=this._stores[t];if(n){n=n.slice(0),(e=[].slice.call(arguments,1))[0]={eventCode:t,data:e[0]};for(var r=0,i=n.length;r<i;r++)n[r].cb.apply(n[r].ctx,e)}}},{key:"off",value:function(t,e){if(this._stores=this._stores||{},arguments.length){var n=this._stores[t];if(n)if(1!==arguments.length){for(var r=0,i=n.length;r<i;r++)if(n[r].cb===e){n.splice(r,1);break}}else delete this._stores[t]}else this._stores={}}}])}();function UD(t){var e=new Date(t);return"".concat(e.getFullYear(),"-")+"".concat(e.getMonth()+1<10?"0".concat(e.getMonth()+1):e.getMonth()+1,"-")+PD(e.getDate()," ")+PD(e.getHours(),":")+PD(e.getMinutes(),":")+PD(e.getSeconds(),"")}function PD(t,e){return"".concat(t<10?"0".concat(t).concat(e):"".concat(t).concat(e))}var MD="sdkConstruct",jD="quality_report",VD=Kr.includes,GD=bo;wi({target:"Array",proto:!0,forced:A((function(){return!Array(1).includes()}))},{includes:function(t){return VD(this,t,arguments.length>1?arguments[1]:void 0)}}),GD("includes");var HD=wi,FD=kR,BD=ct,KD=Pp,zD=LR,WD=Y("".indexOf);HD({target:"String",proto:!0,forced:!zD("includes")},{includes:function(t){return!!~WD(KD(BD(this)),KD(FD(t)),arguments.length>1?arguments[1]:void 0)}});var qD=Y,JD=Ip,YD=Ef.exports.getWeakData,$D=tl,QD=sn,XD=at,ZD=vt,tC=Wd,eC=pe,nC=rr.set,rC=rr.getterFor,iC=Ka.find,aC=Ka.findIndex,oC=qD([].splice),sC=0,cC=function(t){return t.frozen||(t.frozen=new uC)},uC=function(){this.entries=[]},lC=function(t,e){return iC(t.entries,(function(t){return t[0]===e}))};uC.prototype={get:function(t){var e=lC(this,t);if(e)return e[1]},has:function(t){return!!lC(this,t)},set:function(t,e){var n=lC(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=aC(this.entries,(function(e){return e[0]===t}));return~e&&oC(this.entries,e,1),!!~e}};var hC,dC={getConstructor:function(t,e,n,r){var i=t((function(t,i){$D(t,a),nC(t,{type:e,id:sC++,frozen:null}),XD(i)||tC(i,t[r],{that:t,AS_ENTRIES:n})})),a=i.prototype,o=rC(e),s=function(t,e,n){var r=o(t),i=YD(QD(e),!0);return!0===i?cC(r).set(e,n):i[r.id]=n,t};return JD(a,{delete:function(t){var e=o(this);if(!ZD(t))return!1;var n=YD(t);return!0===n?cC(e).delete(t):n&&eC(n,e.id)&&delete n[e.id]},has:function(t){var e=o(this);if(!ZD(t))return!1;var n=YD(t);return!0===n?cC(e).has(t):n&&eC(n,e.id)}}),JD(a,n?{get:function(t){var e=o(this);if(ZD(t)){var n=YD(t);if(!0===n)return cC(e).get(t);if(n)return n[e.id]}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},fC=Uf,pC=x,vC=Y,gC=Ip,yC=Ef.exports,IC=gp,mC=dC,_C=vt,EC=rr.enforce,TC=A,RC=Vn,bC=Object,DC=Array.isArray,CC=bC.isExtensible,SC=bC.isFrozen,wC=bC.isSealed,OC=bC.freeze,xC=bC.seal,kC=!pC.ActiveXObject&&"ActiveXObject"in pC,AC=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},LC=IC("WeakMap",AC,mC),NC=LC.prototype,UC=vC(NC.set);if(RC)if(kC){hC=mC.getConstructor(AC,"WeakMap",!0),yC.enable();var PC=vC(NC.delete),MC=vC(NC.has),jC=vC(NC.get);gC(NC,{delete:function(t){if(_C(t)&&!CC(t)){var e=EC(this);return e.frozen||(e.frozen=new hC),PC(this,t)||e.frozen.delete(t)}return PC(this,t)},has:function(t){if(_C(t)&&!CC(t)){var e=EC(this);return e.frozen||(e.frozen=new hC),MC(this,t)||e.frozen.has(t)}return MC(this,t)},get:function(t){if(_C(t)&&!CC(t)){var e=EC(this);return e.frozen||(e.frozen=new hC),MC(this,t)?jC(this,t):e.frozen.get(t)}return jC(this,t)},set:function(t,e){if(_C(t)&&!CC(t)){var n=EC(this);n.frozen||(n.frozen=new hC),MC(this,t)?UC(this,t,e):n.frozen.set(t,e)}else UC(this,t,e);return this}})}else fC&&TC((function(){var t=OC([]);return UC(new LC,t,1),!SC(t)}))&&gC(NC,{set:function(t,e){var n;return DC(t)&&(SC(t)?n=OC:wC(t)&&(n=xC)),UC(this,t,e),n&&n(t),this}});var VC={exports:{}};
/*!
* validate.js 0.13.1
*
* (c) 2013-2019 Nicklas Ansman, 2013 Wrapp
* Validate.js may be freely distributed under the MIT license.
* For all details and documentation:
* http://validatejs.org/
*/(function(t,e,n){var r=function(t,e,n){n=i.extend({},i.options,n);var a=i.runValidations(t,e,n);if(a.some((function(t){return i.isPromise(t.error)})))throw new Error("Use validate.async if you want support for promises");return r.processValidationResults(a,n)},i=r;i.extend=function(t){return[].slice.call(arguments,1).forEach((function(e){for(var n in e)t[n]=e[n]})),t},i.extend(r,{version:{major:0,minor:13,patch:1,metadata:null,toString:function(){var t=i.format("%{major}.%{minor}.%{patch}",i.version);return i.isEmpty(i.version.metadata)||(t+="+"+i.version.metadata),t}},Promise:"undefined"!=typeof Promise?Promise:null,EMPTY_STRING_REGEXP:/^\s*$/,runValidations:function(t,e,n){var r,a,o,s,c,u,l,h=[];for(r in(i.isDomElement(t)||i.isJqueryElement(t))&&(t=i.collectFormValues(t)),e)for(a in o=i.getDeepObjectValue(t,r),s=i.result(e[r],o,t,r,n,e)){if(!(c=i.validators[a]))throw l=i.format("Unknown validator %{name}",{name:a}),new Error(l);u=s[a],(u=i.result(u,o,t,r,n,e))&&h.push({attribute:r,value:o,validator:a,globalOptions:n,attributes:t,options:u,error:c.call(c,o,u,r,t,n)})}return h},processValidationResults:function(t,e){t=i.pruneEmptyErrors(t,e),t=i.expandMultipleErrors(t,e),t=i.convertErrorMessages(t,e);var n=e.format||"grouped";if("function"!=typeof i.formatters[n])throw new Error(i.format("Unknown format %{format}",e));return t=i.formatters[n](t),i.isEmpty(t)?void 0:t},async:function(t,e,n){var r=(n=i.extend({},i.async.options,n)).wrapErrors||function(t){return t};!1!==n.cleanAttributes&&(t=i.cleanAttributes(t,e));var a=i.runValidations(t,e,n);return new i.Promise((function(o,s){i.waitForResults(a).then((function(){var c=i.processValidationResults(a,n);c?s(new r(c,n,t,e)):o(t)}),(function(t){s(t)}))}))},single:function(t,e,n){return n=i.extend({},i.single.options,n,{format:"flat",fullMessages:!1}),i({single:t},{single:e},n)},waitForResults:function(t){return t.reduce((function(t,e){return i.isPromise(e.error)?t.then((function(){return e.error.then((function(t){e.error=t||null}))})):t}),new i.Promise((function(t){t()})))},result:function(t){var e=[].slice.call(arguments,1);return"function"==typeof t&&(t=t.apply(null,e)),t},isNumber:function(t){return"number"==typeof t&&!isNaN(t)},isFunction:function(t){return"function"==typeof t},isInteger:function(t){return i.isNumber(t)&&t%1==0},isBoolean:function(t){return"boolean"==typeof t},isObject:function(t){return t===Object(t)},isDate:function(t){return t instanceof Date},isDefined:function(t){return null!=t},isPromise:function(t){return!!t&&i.isFunction(t.then)},isJqueryElement:function(t){return t&&i.isString(t.jquery)},isDomElement:function(t){return!!t&&!(!t.querySelectorAll||!t.querySelector)&&(!(!i.isObject(document)||t!==document)||("object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName))},isEmpty:function(t){var e;if(!i.isDefined(t))return!0;if(i.isFunction(t))return!1;if(i.isString(t))return i.EMPTY_STRING_REGEXP.test(t);if(i.isArray(t))return 0===t.length;if(i.isDate(t))return!1;if(i.isObject(t)){for(e in t)return!1;return!0}return!1},format:i.extend((function(t,e){return i.isString(t)?t.replace(i.format.FORMAT_REGEXP,(function(t,n,r){return"%"===n?"%{"+r+"}":String(e[r])})):t}),{FORMAT_REGEXP:/(%?)%\{([^\}]+)\}/g}),prettify:function(t){return i.isNumber(t)?100*t%1==0?""+t:parseFloat(Math.round(100*t)/100).toFixed(2):i.isArray(t)?t.map((function(t){return i.prettify(t)})).join(", "):i.isObject(t)?i.isDefined(t.toString)?t.toString():JSON.stringify(t):(t=""+t).replace(/([^\s])\.([^\s])/g,"$1 $2").replace(/\\+/g,"").replace(/[_-]/g," ").replace(/([a-z])([A-Z])/g,(function(t,e,n){return e+" "+n.toLowerCase()})).toLowerCase()},stringifyValue:function(t,e){return(e&&e.prettify||i.prettify)(t)},isString:function(t){return"string"==typeof t},isArray:function(t){return"[object Array]"==={}.toString.call(t)},isHash:function(t){return i.isObject(t)&&!i.isArray(t)&&!i.isFunction(t)},contains:function(t,e){return!!i.isDefined(t)&&(i.isArray(t)?-1!==t.indexOf(e):e in t)},unique:function(t){return i.isArray(t)?t.filter((function(t,e,n){return n.indexOf(t)==e})):t},forEachKeyInKeypath:function(t,e,n){if(i.isString(e)){var r,a="",o=!1;for(r=0;r<e.length;++r)switch(e[r]){case".":o?(o=!1,a+="."):(t=n(t,a,!1),a="");break;case"\\":o?(o=!1,a+="\\"):o=!0;break;default:o=!1,a+=e[r]}return n(t,a,!0)}},getDeepObjectValue:function(t,e){if(i.isObject(t))return i.forEachKeyInKeypath(t,e,(function(t,e){if(i.isObject(t))return t[e]}))},collectFormValues:function(t,e){var n,r,a,o,s,c,u={};if(i.isJqueryElement(t)&&(t=t[0]),!t)return u;for(e=e||{},o=t.querySelectorAll("input[name], textarea[name]"),n=0;n<o.length;++n)if(a=o.item(n),!i.isDefined(a.getAttribute("data-ignored"))){var l=a.name.replace(/\./g,"\\\\.");c=i.sanitizeFormValue(a.value,e),"number"===a.type?c=c?+c:null:"checkbox"===a.type?a.attributes.value?a.checked||(c=u[l]||null):c=a.checked:"radio"===a.type&&(a.checked||(c=u[l]||null)),u[l]=c}for(o=t.querySelectorAll("select[name]"),n=0;n<o.length;++n)if(a=o.item(n),!i.isDefined(a.getAttribute("data-ignored"))){if(a.multiple)for(r in c=[],a.options)(s=a.options[r])&&s.selected&&c.push(i.sanitizeFormValue(s.value,e));else{var h=void 0!==a.options[a.selectedIndex]?a.options[a.selectedIndex].value:"";c=i.sanitizeFormValue(h,e)}u[a.name]=c}return u},sanitizeFormValue:function(t,e){return e.trim&&i.isString(t)&&(t=t.trim()),!1!==e.nullify&&""===t?null:t},capitalize:function(t){return i.isString(t)?t[0].toUpperCase()+t.slice(1):t},pruneEmptyErrors:function(t){return t.filter((function(t){return!i.isEmpty(t.error)}))},expandMultipleErrors:function(t){var e=[];return t.forEach((function(t){i.isArray(t.error)?t.error.forEach((function(n){e.push(i.extend({},t,{error:n}))})):e.push(t)})),e},convertErrorMessages:function(t,e){var n=[],r=(e=e||{}).prettify||i.prettify;return t.forEach((function(t){var a=i.result(t.error,t.value,t.attribute,t.options,t.attributes,t.globalOptions);i.isString(a)?("^"===a[0]?a=a.slice(1):!1!==e.fullMessages&&(a=i.capitalize(r(t.attribute))+" "+a),a=a.replace(/\\\^/g,"^"),a=i.format(a,{value:i.stringifyValue(t.value,e)}),n.push(i.extend({},t,{error:a}))):n.push(t)})),n},groupErrorsByAttribute:function(t){var e={};return t.forEach((function(t){var n=e[t.attribute];n?n.push(t):e[t.attribute]=[t]})),e},flattenErrorsToArray:function(t){return t.map((function(t){return t.error})).filter((function(t,e,n){return n.indexOf(t)===e}))},cleanAttributes:function(t,e){function n(t,e,n){return i.isObject(t[e])?t[e]:t[e]=!!n||{}}return i.isObject(e)&&i.isObject(t)?function t(e,n){if(!i.isObject(e))return e;var r,a,o=i.extend({},e);for(a in e)r=n[a],i.isObject(r)?o[a]=t(o[a],r):r||delete o[a];return o}(t,e=function(t){var e,r={};for(e in t)t[e]&&i.forEachKeyInKeypath(r,e,n);return r}(e)):{}},exposeModule:function(t,e,n,r,i){n?(r&&r.exports&&(n=r.exports=t),n.validate=t):(e.validate=t,t.isFunction(i)&&i.amd&&i([],(function(){return t})))},warn:function(t){"undefined"!=typeof console&&console.warn&&console.warn("[validate.js] "+t)},error:function(t){"undefined"!=typeof console&&console.error&&console.error("[validate.js] "+t)}}),r.validators={presence:function(t,e){if(!1!==(e=i.extend({},this.options,e)).allowEmpty?!i.isDefined(t):i.isEmpty(t))return e.message||this.message||"can't be blank"},length:function(t,e,n){if(i.isDefined(t)){var r,a=(e=i.extend({},this.options,e)).is,o=e.maximum,s=e.minimum,c=[],u=(t=(e.tokenizer||function(t){return t})(t)).length;return i.isNumber(u)?(i.isNumber(a)&&u!==a&&(r=e.wrongLength||this.wrongLength||"is the wrong length (should be %{count} characters)",c.push(i.format(r,{count:a}))),i.isNumber(s)&&u<s&&(r=e.tooShort||this.tooShort||"is too short (minimum is %{count} characters)",c.push(i.format(r,{count:s}))),i.isNumber(o)&&u>o&&(r=e.tooLong||this.tooLong||"is too long (maximum is %{count} characters)",c.push(i.format(r,{count:o}))),c.length>0?e.message||c:void 0):e.message||this.notValid||"has an incorrect length"}},numericality:function(t,e,n,r,a){if(i.isDefined(t)){var o,s,c=[],u={greaterThan:function(t,e){return t>e},greaterThanOrEqualTo:function(t,e){return t>=e},equalTo:function(t,e){return t===e},lessThan:function(t,e){return t<e},lessThanOrEqualTo:function(t,e){return t<=e},divisibleBy:function(t,e){return t%e==0}},l=(e=i.extend({},this.options,e)).prettify||a&&a.prettify||i.prettify;if(i.isString(t)&&e.strict){var h="^-?(0|[1-9]\\d*)";if(e.onlyInteger||(h+="(\\.\\d+)?"),h+="$",!new RegExp(h).test(t))return e.message||e.notValid||this.notValid||this.message||"must be a valid number"}if(!0!==e.noStrings&&i.isString(t)&&!i.isEmpty(t)&&(t=+t),!i.isNumber(t))return e.message||e.notValid||this.notValid||this.message||"is not a number";if(e.onlyInteger&&!i.isInteger(t))return e.message||e.notInteger||this.notInteger||this.message||"must be an integer";for(o in u)if(s=e[o],i.isNumber(s)&&!u[o](t,s)){var d="not"+i.capitalize(o),f=e[d]||this[d]||this.message||"must be %{type} %{count}";c.push(i.format(f,{count:s,type:l(o)}))}return e.odd&&t%2!=1&&c.push(e.notOdd||this.notOdd||this.message||"must be odd"),e.even&&t%2!=0&&c.push(e.notEven||this.notEven||this.message||"must be even"),c.length?e.message||c:void 0}},datetime:i.extend((function(t,e){if(!i.isFunction(this.parse)||!i.isFunction(this.format))throw new Error("Both the parse and format functions needs to be set to use the datetime/date validator");if(i.isDefined(t)){var n,r=[],a=(e=i.extend({},this.options,e)).earliest?this.parse(e.earliest,e):NaN,o=e.latest?this.parse(e.latest,e):NaN;return t=this.parse(t,e),isNaN(t)||e.dateOnly&&t%864e5!=0?(n=e.notValid||e.message||this.notValid||"must be a valid date",i.format(n,{value:arguments[0]})):(!isNaN(a)&&t<a&&(n=e.tooEarly||e.message||this.tooEarly||"must be no earlier than %{date}",n=i.format(n,{value:this.format(t,e),date:this.format(a,e)}),r.push(n)),!isNaN(o)&&t>o&&(n=e.tooLate||e.message||this.tooLate||"must be no later than %{date}",n=i.format(n,{date:this.format(o,e),value:this.format(t,e)}),r.push(n)),r.length?i.unique(r):void 0)}}),{parse:null,format:null}),date:function(t,e){return e=i.extend({},e,{dateOnly:!0}),i.validators.datetime.call(i.validators.datetime,t,e)},format:function(t,e){(i.isString(e)||e instanceof RegExp)&&(e={pattern:e});var n,r=(e=i.extend({},this.options,e)).message||this.message||"is invalid",a=e.pattern;if(i.isDefined(t))return i.isString(t)?(i.isString(a)&&(a=new RegExp(e.pattern,e.flags)),(n=a.exec(t))&&n[0].length==t.length?void 0:r):r},inclusion:function(t,e){if(i.isDefined(t)&&(i.isArray(e)&&(e={within:e}),e=i.extend({},this.options,e),!i.contains(e.within,t))){var n=e.message||this.message||"^%{value} is not included in the list";return i.format(n,{value:t})}},exclusion:function(t,e){if(i.isDefined(t)&&(i.isArray(e)&&(e={within:e}),e=i.extend({},this.options,e),i.contains(e.within,t))){var n=e.message||this.message||"^%{value} is restricted";return i.isString(e.within[t])&&(t=e.within[t]),i.format(n,{value:t})}},email:i.extend((function(t,e){var n=(e=i.extend({},this.options,e)).message||this.message||"is not a valid email";if(i.isDefined(t))return i.isString(t)&&this.PATTERN.exec(t)?void 0:n}),{PATTERN:/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i}),equality:function(t,e,n,r,a){if(i.isDefined(t)){i.isString(e)&&(e={attribute:e});var o=(e=i.extend({},this.options,e)).message||this.message||"is not equal to %{attribute}";if(i.isEmpty(e.attribute)||!i.isString(e.attribute))throw new Error("The attribute must be a non empty string");var s=i.getDeepObjectValue(r,e.attribute),c=e.comparator||function(t,e){return t===e},u=e.prettify||a&&a.prettify||i.prettify;return c(t,s,e,n,r)?void 0:i.format(o,{attribute:u(e.attribute)})}},url:function(t,e){if(i.isDefined(t)){var n=(e=i.extend({},this.options,e)).message||this.message||"is not a valid url",r=e.schemes||this.schemes||["http","https"],a=e.allowLocal||this.allowLocal||!1,o=e.allowDataUrl||this.allowDataUrl||!1;if(!i.isString(t))return n;var s="^(?:(?:"+r.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",c="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";return a?c+="?":s+="(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})",s+="(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"+c+")(?::\\d{2,5})?(?:[/?#]\\S*)?$",o&&(s="(?:"+s+")|(?:^data:(?:\\w+\\/[-+.\\w]+(?:;[\\w=]+)*)?(?:;base64)?,[A-Za-z0-9-_.!~\\*'();\\/?:@&=+$,%]*$)"),new RegExp(s,"i").exec(t)?void 0:n}},type:i.extend((function(t,e,n,r,a){if(i.isString(e)&&(e={type:e}),i.isDefined(t)){var o,s=i.extend({},this.options,e),c=s.type;if(!i.isDefined(c))throw new Error("No type was specified");if(o=i.isFunction(c)?c:this.types[c],!i.isFunction(o))throw new Error("validate.validators.type.types."+c+" must be a function.");if(!o(t,s,n,r,a)){var u=e.message||this.messages[c]||this.message||s.message||(i.isFunction(c)?"must be of the correct type":"must be of type %{type}");return i.isFunction(u)&&(u=u(t,e,n,r,a)),i.format(u,{attribute:i.prettify(n),type:c})}}}),{types:{object:function(t){return i.isObject(t)&&!i.isArray(t)},array:i.isArray,integer:i.isInteger,number:i.isNumber,string:i.isString,date:i.isDate,boolean:i.isBoolean},messages:{}})},r.formatters={detailed:function(t){return t},flat:i.flattenErrorsToArray,grouped:function(t){var e;for(e in t=i.groupErrorsByAttribute(t))t[e]=i.flattenErrorsToArray(t[e]);return t},constraint:function(t){var e;for(e in t=i.groupErrorsByAttribute(t))t[e]=t[e].map((function(t){return t.validator})).sort();return t}},r.exposeModule(r,this,t,e,n)}).call(S,VC.exports,VC,null);var GC=VC.exports,HC="number",FC="string",BC="object",KC="function",zC="array",WC={createInstance:{sdkAppID:{presence:!0,type:HC},tim:{type:BC}},destroyInstance:{},init:{userID:{presence:!0,type:FC},userSig:{presence:!0,type:FC}},on:{eventCode:{presence:!0,type:FC},handler:{presence:!0,type:KC},context:{presence:!0,type:BC}},off:{eventCode:{presence:!0,type:FC},handler:{presence:!0,type:KC}},call:{userID:{presence:!0,type:FC},type:{presence:!0,type:HC},roomID:{presence:!1,type:HC,numericality:{onlyInteger:!0,greaterThanOrEqualTo:0,lessThanOrEqualTo:ig}},strRoomID:{presence:!1,type:FC}},groupCall:{groupID:{presence:!0,type:FC},type:{presence:!0,type:HC},userIDList:{presence:!0,type:zC},roomID:{presence:!1,type:HC,numericality:{onlyInteger:!0,greaterThanOrEqualTo:0,lessThanOrEqualTo:ig}},strRoomID:{presence:!1,type:FC}},joinInGroupCall:{groupID:{presence:!0,type:FC},type:{presence:!0,type:HC},roomID:{presence:!0,type:HC},strRoomID:{presence:!1,type:FC}},inviteUser:{userIDList:{presence:!0,type:zC}},accept:{},reject:{},hangup:{},switchCallMediaType:{type:{presence:!0,type:HC}},openCamera:{},closeCamera:{},switchCamera:{},openMicrophone:{},closeMicrophone:{},selectAudioPlaybackDevice:{type:{presence:!0,type:FC}},setSelfInfo:{nickName:{presence:!0,type:FC},avatar:{presence:!0,type:FC}},setBeautyLevel:{level:{presence:!0,type:HC,numericality:{onlyInteger:!0,greaterThan:-1,lessThanOrEqualTo:9}}},enableMultiDeviceAbility:{enable:{presence:!0,type:"boolean"}}},qC={createInstance:"",destroyInstance:"",init:"",on:"",off:"",call:[Vv.IDLE],groupCall:[Vv.IDLE],accept:[Vv.CALLING],reject:[Vv.CALLING],hangup:[Vv.CALLING,Vv.CONNECTED],switchCallMediaType:[Vv.CALLING,Vv.CONNECTED],joinInGroupCall:[Vv.IDLE],inviteUser:[Vv.CALLING,Vv.CONNECTED],openCamera:[Vv.CALLING,Vv.CONNECTED],closeCamera:[Vv.CALLING,Vv.CONNECTED],switchCamera:[Vv.CALLING,Vv.CONNECTED],openMicrophone:[Vv.CALLING,Vv.CONNECTED],closeMicrophone:[Vv.CALLING,Vv.CONNECTED],selectAudioPlaybackDevice:[Vv.CALLING,Vv.CONNECTED],setSelfInfo:"",setBeautyLevel:""},JC={createInstance:!1,destroyInstance:!0,init:!1,off:!0,call:!0,groupCall:!0,joinInGroupCall:!0,inviteUser:!0,accept:!0,reject:!0,hangup:!0,switchCallMediaType:!0,openCamera:!0,closeCamera:!0,switchCamera:!0,openMicrophone:!0,closeMicrophone:!0,selectAudioPlaybackDevice:!0,setSelfInfo:!0,setBeautyLevel:!1,enableMultiDeviceAbility:!0};function YC(t){var e=lD(t)?"".concat(_D.ERROR_PACKAGE_NOT_PURCHASED):"".concat(mD.ERROR_PACKAGE_NOT_PURCHASED);return e=e.replace("${purchaseAddress}",hD(t))}GC.validators.type.types.function=function(t){return t instanceof Function};var $C=function(){return h((function t(){s(this,t),f(this,"paramsMatchedRule",WC),f(this,"statusMatchedRule",qC),f(this,"requireInit",JC)}),[{key:"getParamsMatchedRule",value:function(t){return this.paramsMatchedRule[t]}},{key:"getStatusMatchedRule",value:function(t){return this.statusMatchedRule[t]}},{key:"getInitReadyRule",value:function(t){return this.requireInit[t]}}])}(),QC=function(){return h((function t(){s(this,t),this._logger=vy()}),[{key:"notify",value:function(t,e,n){this._logger.error("check:".concat(t.api),{text:{data:t,error:{code:e,message:n}}});var r={code:e,fnName:t.api};throw r=n?I(I({},r),{},{message:n}):r,new bD(r)}}])}(),XC=h((function t(e){s(this,t),f(this,"api",""),f(this,"attributes",{}),f(this,"callStatus",""),f(this,"capabilityCode",void 0),f(this,"initReady",void 0),this.api=e.api,this.attributes=e.attributes,this.callStatus=e.callStatus,this.capabilityCode=e.capabilityCode,this.initReady=e.initReady,this.sdkAppID=e.sdkAppID})),ZC=new WeakMap,tS=function(){return h((function t(){var e,n,i;s(this,t),u(this,ZC,void 0),n=this,i=[],(e=ZC).set(r(e,n),i)}),[{key:"addAlertHandler",value:function(t){c(ZC,this).push(t)}},{key:"check",value:(t=a(_().mark((function t(e,n){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0;case 1:if(!(r<c(ZC,this).length)){t.next=7;break}return t.next=4,c(ZC,this)[r].check(e,n);case 4:r++,t.next=1;break;case 7:case"end":return t.stop()}}),t,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"checkSync",value:function(t,e){for(var n=0;n<c(ZC,this).length;n++)c(ZC,this)[n].check(t,e)}}]);var t}(),eS=function(){return h((function t(e,n){s(this,t),f(this,"rule",void 0),f(this,"notification",void 0),this.rule=e,this.notification=n}),[{key:"check",value:(t=a(_().mark((function t(e){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]);var t}(),nS=function(){function t(e,n){return s(this,t),o(this,t,[e,n])}return v(t,eS),h(t,[{key:"check",value:function(t){var e=this.rule.getParamsMatchedRule(t.api);if(e&&t.attributes){var n=GC(t.attributes,e);if(void 0!==n)for(var r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];Object.prototype.hasOwnProperty.call(n,a)&&this.notification.notify(t,$m.ERROR_PARAM_INVALID,n[a])}}}}])}(),rS=function(){function t(e,n){return s(this,t),o(this,t,[e,n])}return v(t,eS),h(t,[{key:"check",value:function(t){if(t.callStatus){var e=this.rule.getStatusMatchedRule(t.api);e&&!e.includes(t.callStatus)&&this.notification.notify(t,$m.ERROR_REQUEST_REFUSED)}}}])}(),iS=function(){function t(e,n){return s(this,t),o(this,t,[e,n])}return v(t,eS),h(t,[{key:"check",value:(e=a(_().mark((function t(e){var n,r,i,a=arguments;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:{},!e.capabilityCode){t.next=19;break}return t.prev=2,t.next=5,n.tim.callExperimentalAPI("isCommercialAbilityEnabled",e.capabilityCode);case 5:!1===t.sent.data.enabled&&this.notification.notify(e,$m.ERROR_PACKAGE_NOT_SUPPORTED),t.next=19;break;case 9:if(t.prev=9,t.t0=t.catch(2),2905!==t.t0.code){t.next=15;break}this.notification.notify(e,$m.ERROR_TIM_VERSION_OUTDATED),t.next=19;break;case 15:throw r=null,i=0,e.capabilityCode===rg.PRO?(r="".concat((o=e.sdkAppID,s=void 0,s=lD(o)?"".concat(_D.ERROR_PACKAGE_NOT_SUPPORTED):"".concat(mD.ERROR_PACKAGE_NOT_SUPPORTED),s=s.replace("${purchaseAddress}",hD(o)))," <ERROR_PACKAGE_NOT_SUPPORTED: ").concat($m.ERROR_PACKAGE_NOT_SUPPORTED,">"),i=$m.ERROR_PACKAGE_NOT_SUPPORTED):(r="".concat(YC(e.sdkAppID)," <ERROR_PACKAGE_NOT_PURCHASED: ").concat($m.ERROR_PACKAGE_NOT_PURCHASED,">"),i=$m.ERROR_PACKAGE_NOT_PURCHASED),new bD({code:i,message:r});case 19:case"end":return t.stop()}var o,s}),t,this,[[2,9]])}))),function(t){return e.apply(this,arguments)})}]);var e}(),aS=function(){function t(e,n){return s(this,t),o(this,t,[e,n])}return v(t,eS),h(t,[{key:"check",value:function(t,e){void 0!==t.initReady&&this.rule.getInitReadyRule(t.api)!==t.initReady&&this.notification.notify(t,$m.ERROR_INIT_FAIL)}}])}(),oS=function(){function t(){s(this,t),f(this,"alertRule",void 0),f(this,"notification",void 0),f(this,"alert",void 0)}return h(t,[{key:"initializeBeans",value:function(){this.alertRule=new $C,this.notification=new QC,this.alert=new tS,this.alert.addAlertHandler(new nS(this.alertRule,this.notification)),this.alert.addAlertHandler(new aS(this.alertRule,this.notification)),this.alert.addAlertHandler(new iS(this.alertRule,this.notification)),this.alert.addAlertHandler(new rS(this.alertRule,this.notification))}},{key:"getAlert",value:function(){return this.alert}}],[{key:"getInstance",value:function(){return this.instance||(this.instance=new t,this.instance.initializeBeans()),this.instance}}])}();f(oS,"instance",void 0);var sS=Y,cS=zt,uS=vt,lS=pe,hS=Yc,dS=N,fS=Function,pS=sS([].concat),vS=sS([].join),gS={},yS=dS?fS.bind:function(t){var e=cS(this),n=e.prototype,r=hS(arguments,1),i=function(){var n=pS(r,hS(arguments));return this instanceof i?function(t,e,n){if(!lS(gS,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";gS[e]=fS("C,a","return new C("+vS(r,",")+")")}return gS[e](t,n)}(e,n.length,n):e.apply(t,n)};return uS(n)&&(i.prototype=n),i};function IS(t){var e=yg;switch(t){case Qv:e=og;break;case Xv:e=ag}return e}function mS(t){var e=t;return e===Jv?e=_g:e===Yv&&(e=Eg),e}wi({target:"Function",proto:!0,forced:Function.bind!==yS},{bind:yS});var _S=function(){return h((function t(e){s(this,t),f(this,"_eventStatController",void 0),f(this,"_callData",void 0),f(this,"_ssoLog",void 0),this._eventStatController=new LD,wD.bindController(this._eventStatController),this.initializeCallData(e),this._ssoLog=new wD(jD)}),[{key:"setCallData",value:function(t){this._callData=t}},{key:"getCallData",value:function(){return this._callData}},{key:"setInviteID",value:function(t){this._callData.inviteID=t}},{key:"setTotalTime",value:function(t){this._callData.totalTime="".concat(t)}},{key:"setAbilityBit",value:function(t){this._callData.abilityBit=!!t}},{key:"setEnterRoomTime",value:function(t){this._callData.enterRoomTime=UD(t)}},{key:"setSendSignalingTime",value:function(t){this._callData.sendSignalingTime=UD(t)}},{key:"setCallAcceptTime",value:function(t){this._callData.callAcceptTime=UD(t)}},{key:"setExitRoomTime",value:function(t){this._callData.exitRoomTime=UD(t)}},{key:"setCallEndTime",value:function(t){this._callData.callEndTime=UD(t)}},{key:"setCodeAndMessage",value:function(t,e){this._callData.code=t||0,this._callData.message=e||""}},{key:"setCallScene",value:function(t){this._callData.callScene=t||""}},{key:"getResult",value:function(){return this._callData.result}},{key:"setResult",value:function(t){this._callData.result=t||""}},{key:"setUserID",value:function(t){this._callData.userID=t||""}},{key:"packageCallDataToKibana",value:function(){var t=IS(this._callData.callType),e=mS(this._callData.callRole);return"".concat("CallData{version='").concat(this._callData.version,", platform=").concat(this._callData.platform,", framework=").concat(this._callData.framework,", sdk_app_id=").concat(this._callData.sdkAppId,", user_id=").concat(this._callData.userID,", room_id=").concat(this._callData.roomID,", invite_id=").concat(this._callData.inviteID,", invitee_list=").concat(this._callData.inviteeList,", media_type=").concat(t,", role=").concat(e,", call_scene=").concat(this._callData.callScene,", result=").concat(this._callData.result,", total_time=").concat(this._callData.totalTime,", total_score=").concat(this._callData.totalScore,", ability_bit=").concat(this._callData.abilityBit,", enter_room=").concat(this._callData.enterRoomTime,", send_signaling=").concat(this._callData.sendSignalingTime,", call_accept=").concat(this._callData.callAcceptTime,", exit_room=").concat(this._callData.exitRoomTime,", call_end=").concat(this._callData.callEndTime,", code=").concat(this._callData.code,", message=").concat(this._callData.message,", network=").concat(this._callData.network,", audio=").concat(this._callData.audio,", video=").concat(this._callData.video,"}")}},{key:"initializeCallData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.version,n=void 0===e?"":e,r=t.sdkAppId,i=void 0===r?0:r,a=t.userID,o=void 0===a?"":a,s=iD(),c=lb?"uniminiprogram":"wxminiprogram";this._callData={version:n,platform:s,framework:c,sdkAppId:i,userID:o,roomID:0,inviteID:"",callRole:qv,callScene:"",callType:$v,inviteeList:[],result:yg,totalTime:0,totalScore:0,code:0,message:"",abilityBit:!1,enterRoomTime:"",sendSignalingTime:"",callAcceptTime:"",exitRoomTime:"",callEndTime:"",network:0,audio:0,video:0}}},{key:"reset",value:function(){this.initializeCallData(),this._ssoLog=null}},{key:"clearCallDataAfterUpload",value:function(){var t=this.getCallData(),e=t.version,n=t.sdkAppId,r=t.userID;this.initializeCallData({version:e,sdkAppId:n,userID:r})}},{key:"uploadToKibana",value:function(){try{this._ssoLog.setText(this.packageCallDataToKibana()).setEnd(),this.clearCallDataAfterUpload()}catch(t){}}}])}(),ES=function(){return h((function t(e,n){s(this,t),f(this,"_eventEmitter",void 0),f(this,"_callDataReport",void 0),this._eventEmitter=e.emitter,this._callDataReport=n,this.registerListener()}),[{key:"registerListener",value:function(){this._eventEmitter.on(jv.CALL_END,this.onCallEnd.bind(this)),this._eventEmitter.on(jv.CALLING_CANCEL,this.onCallingCancel.bind(this)),this._eventEmitter.on(jv.NO_RESP,this.onNoResponse.bind(this)),this._eventEmitter.on(jv.LINE_BUSY,this.onLineBusy.bind(this)),this._eventEmitter.on(jv.REJECT,this.onReject.bind(this))}},{key:"removeLister",value:function(){this._eventEmitter.off(jv.CALL_END,this.onCallEnd.bind(this)),this._eventEmitter.off(jv.CALLING_CANCEL,this.onCallingCancel.bind(this)),this._eventEmitter.off(jv.NO_RESP,this.onNoResponse.bind(this)),this._eventEmitter.off(jv.LINE_BUSY,this.onLineBusy.bind(this)),this._eventEmitter.off(jv.REJECT,this.onReject.bind(this))}},{key:"onCallEnd",value:function(t){var e=t.data.totalTime,n=void 0===e?0:e;this._callDataReport.setTotalTime(n),this._callDataReport.setCallEndTime((new Date).getTime()),this._callDataReport.setResult(lg),this._callDataReport.setCodeAndMessage(),this._callDataReport.uploadToKibana()}},{key:"onCallingCancel",value:function(){this._callDataReport.getResult()||this._callDataReport.setResult(vg),this._callDataReport.setCodeAndMessage(),this._callDataReport.uploadToKibana()}},{key:"onNoResponse",value:function(){this._callDataReport.setResult(dg)}},{key:"onLineBusy",value:function(){this._callDataReport.setResult(gg)}},{key:"onReject",value:function(){this._callDataReport.setResult(hg)}}])}();function TS(t){return RS.apply(this,arguments)}function RS(){return RS=a(_().mark((function t(e){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e===Wv.AUDIO||e===Wv.VIDEO){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise(function(){var t=a(_().mark((function t(n,r){var i,a,o,s,c,u,l,h,d,f,p;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={microphone:!0,camera:e===Wv.VIDEO},(a=sD(i))||e!==Wv.AUDIO||(o=Qg.AUDIO_CALL_MODAL_TITLE,s=Qg.AUDIO_CALL_MODAL_CONTENT,DS(o,s),r({callType:e,hasAppDevicePermission:a})),a||e!==Wv.VIDEO||(c=Qg.VIDEO_CALL_MODAL_TITLE,u=Qg.VIDEO_CALL_MODAL_CONTENT,DS(c,u),r({callType:e,hasAppDevicePermission:a})),t.next=6,aD(i);case 6:if((l=t.sent)||e!==Wv.AUDIO){t.next=19;break}return t.prev=8,t.next=11,CS({scope:ty.RECORD});case 11:t.next=19;break;case 13:t.prev=13,t.t0=t.catch(8),h=$g.MIC_TITLE,d=$g.MIC_CONTENT,bS(h,d),r({callType:e,text:h});case 19:if(l||e!==Wv.VIDEO){t.next=30;break}return t.prev=20,t.next=23,vD([CS({scope:ty.RECORD}),CS({scope:ty.CAMERA})]);case 23:t.sent.find((function(t){return"rejected"===(null==t?void 0:t.status)}))&&(f=$g.CAMERA_TITLE,p=$g.CAMERA_CONTENT,bS(f,p),r({callType:e,text:f})),t.next=30;break;case 27:t.prev=27,t.t1=t.catch(20),console.debug(t.t1);case 30:n();case 31:case"end":return t.stop()}}),t,null,[[8,13],[20,27]])})));return function(e,n){return t.apply(this,arguments)}}()));case 3:case"end":return t.stop()}}),t)}))),RS.apply(this,arguments)}function bS(t,e){wx.showModal({title:t,content:e,confirmText:$g.CONFIRM_TEXT,success:function(t){t.confirm&&wx.openSetting()}})}function DS(t,e){wx.showModal({title:t,content:e,confirmText:Qg.CONFIRM_MODAL_TEXT,success:function(t){t.confirm&&wx.openAppAuthorizeSetting()}})}function CS(t){return SS.apply(this,arguments)}function SS(){return(SS=a(_().mark((function t(e){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(wx.$TUICallKitPlugin){t.next=5;break}return t.next=3,wx.authorize(e);case 3:t.next=7;break;case 5:return t.next=7,wx.authorizeForMiniProgram(e);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var wS=wi,OS=Y,xS=xr,kS=eE,AS=O_,LS=A,NS=RangeError,US=String,PS=Math.floor,MS=OS(AS),jS=OS("".slice),VS=OS(1..toFixed),GS=function(t,e,n){return 0===e?n:e%2==1?GS(t,e-1,n*t):GS(t*t,e/2,n)},HS=function(t,e,n){for(var r=-1,i=n;++r<6;)i+=e*t[r],t[r]=i%1e7,i=PS(i/1e7)},FS=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=PS(r/e),r=r%e*1e7},BS=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=US(t[e]);n=""===n?r:n+MS("0",7-r.length)+r}return n};wS({target:"Number",proto:!0,forced:LS((function(){return"0.000"!==VS(8e-5,3)||"1"!==VS(.9,0)||"1.25"!==VS(1.255,2)||"1000000000000000128"!==VS(0xde0b6b3a7640080,0)}))||!LS((function(){VS({})}))},{toFixed:function(t){var e,n,r,i,a=kS(this),o=xS(t),s=[0,0,0,0,0,0],c="",u="0";if(o<0||o>20)throw new NS("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return US(a);if(a<0&&(c="-",a=-a),a>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(a*GS(2,69,1))-69)<0?a*GS(2,-e,1):a/GS(2,e,1),n*=4503599627370496,(e=52-e)>0){for(HS(s,0,n),r=o;r>=7;)HS(s,1e7,0),r-=7;for(HS(s,GS(10,r,1),0),r=e-1;r>=23;)FS(s,1<<23),r-=23;FS(s,1<<r),HS(s,1,1),FS(s,2),u=BS(s)}else HS(s,0,n),HS(s,1<<-e,0),u=BS(s)+MS("0",o);return u=o>0?c+((i=u.length)<=o?"0."+MS("0",o-i)+u:jS(u,0,i-o)+"."+jS(u,i-o)):c+u}});var KS=function(){return h((function t(){s(this,t)}),null,[{key:"generateTaskID",value:function(){return this.currentTaskID+=1}},{key:"run",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dg,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;n=I(I({},t===pg?{delay:2e3,count:0,backgroundTask:!0}:t===fg?{fps:60,delay:16.6,count:0,backgroundTask:!0}:{delay:2e3,count:0,backgroundTask:!0}),n),$b(e)&&(n=I(I({},n),e)),Zb(t)&&(e=t,t=dg);var r=I({taskID:this.generateTaskID(),loopCount:0,intervalID:null,timeoutID:null,rafID:null,taskName:t,callback:e},n);return this.taskMap.set(r.taskID,r),this[t](r),r.taskID}},{key:"interval",value:function(t){var e=this;return t.intervalID=setInterval((function(){t.callback(),t.loopCount+=1,e.isBreakLoop(t)}),t.delay)}},{key:"timeout",value:function(t){var e=this,n=function(){if(t.callback(),t.loopCount+=1,!e.isBreakLoop(t))return t.timeoutID=setTimeout(n,t.delay)};return t.timeoutID=setTimeout(n,t.delay)}},{key:"raf",value:function(t){var e=this;t.delay=(1e3/t.fps).toFixed(2);var n,r=uD(),i=function(){if(document.hidden&&t.backgroundTask){if(n=uD()-r,r=uD(),t.callback(),t.loopCount+=1,e.isBreakLoop(t))return;return t.timeoutID=setTimeout(i,t.delay-Math.floor(n%t.delay))}if((n=uD()-r)>=t.delay&&(r=uD()-Math.floor(n%t.delay),t.callback(),t.loopCount+=1),!e.isBreakLoop(t))return t.rafID=requestAnimationFrame(i)};if(t.rafID=requestAnimationFrame(i),t.backgroundTask){var a=function(){if(document.hidden){var e=uD()-r;e>=t.delay?i():t.timeoutID=setTimeout(i,t.delay-e)}};document.addEventListener("visibilitychange",a),t.onVisibilitychange=a,document.hidden&&a()}return t.taskID}},{key:"hasTask",value:function(t){return this.taskMap.has(t)}},{key:"clearTask",value:function(t){if(!this.taskMap.has(t))return!0;var e=this.taskMap.get(t),n=e.intervalID,r=e.timeoutID,i=e.onVisibilitychange;return n&&clearInterval(n),r&&clearTimeout(r),i&&document.removeEventListener("visibilitychange",i),this.taskMap.delete(t),!0}},{key:"isBreakLoop",value:function(t){return!this.taskMap.has(t.taskID)||0!==t.count&&t.loopCount>=t.count&&(this.clearTask(t.taskID),!0)}}])}();f(KS,"taskMap",new Map),f(KS,"currentTaskID",1);var zS={serviceCommand:"".concat(bg,".*")},WS="sendTRTCCustomData",qS=function(){return h((function t(e){s(this,t),f(this,"_callRecordData",void 0),f(this,"_tim",void 0),f(this,"_heartbeat",void 0),f(this,"_lastHeartBeatTime",void 0),f(this,"_bodyStatus",void 0),this._tim=e.tim,this._heartbeat=-1,this._lastHeartBeatTime=-1,this._bodyStatus=Jg,this.initializeCallData(e)}),[{key:"getCallRecordData",value:function(){return this._callRecordData}},{key:"initializeCallData",value:function(t){var e=t||{},n=e.version,r=void 0===n?"":n,i=e.userID,a=void 0===i?"":i,o={name:sb.platform,version:sb.version},s={version:1,command:Bg,sdk_version:r,seq:0,os_name:Wg,os_version:o.version||"",device_name:o.name||"",framework:Wg,call_type:"",media_type:"",client_ts:0,role:qv,user_id:a,room_id:"",call_id:"",group_id:"",room_id_type:1};this._callRecordData={head:s,body:{event_type:"",code:0,message:"",invitee_list:[]}}}},{key:"reset",value:function(){this.initializeCallData()}},{key:"_setCallType",value:function(t){t&&(this._callRecordData.head=I(I({},this._callRecordData.head),{},{call_type:t}))}},{key:"_setMediaType",value:function(t){t&&(this._callRecordData.head=I(I({},this._callRecordData.head),{},{media_type:IS(t)}))}},{key:"_setCallRole",value:function(t){t&&(this._callRecordData.head=I(I({},this._callRecordData.head),{},{role:t}))}},{key:"_setUserID",value:function(t){t&&(this._callRecordData.head=I(I({},this._callRecordData.head),{},{user_id:t}))}},{key:"_setRoomID",value:function(t){t&&(this._callRecordData.head=I(I({},this._callRecordData.head),{},{room_id:"".concat(t)}))}},{key:"_setInviteID",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t&&(this._callRecordData.head=I(I({},this._callRecordData.head),{},{call_id:t}))}},{key:"_setGroupId",value:function(t){Qb(t)||(this._callRecordData.head=I(I({},this._callRecordData.head),{},{group_id:t}))}},{key:"_getGroupId",value:function(){return this._callRecordData.head.group_id}},{key:"_setRoomIdType",value:function(t){t&&(this._callRecordData.head=I(I({},this._callRecordData.head),{},{room_id_type:t}))}},{key:"_setEventType",value:function(t){t&&(this._callRecordData.body=I(I({},this._callRecordData.body),{},{event_type:t}))}},{key:"_setInviteeList",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._callRecordData.body=I(I({},this._callRecordData.body),{},{invitee_list:t})}},{key:"_setSeq",value:function(){var t=this.getCallRecordData().head.seq;this._callRecordData.head=I(I({},this._callRecordData.head),{},{seq:t+1})}},{key:"setBodyStatus",value:function(t){if(t){var e=Jg;switch(t){case Vv.CALLING:e=Jg;break;case Vv.CONNECTED:e=zg}this._bodyStatus=e}}},{key:"eventUpload",value:(r=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h,d,f,p,v,g,y,m,E;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.eventType,i=e.callType,a=e.mediaType,o=e.callRole,s=e.userID,c=e.roomID,u=e.inviteID,l=e.groupId,h=e.strRoomId,d=void 0===h?"":h,f=e.inviteeList,p=void 0===f?[]:f,r){t.next=3;break}return t.abrupt("return");case 3:return this._callRecordData.head=I(I({},this._callRecordData.head),{},{command:Bg,client_ts:Math.floor(Date.now()/1e3)}),this._setCallType(i),this._setMediaType(a),this._setCallRole(o),this._setUserID(s),this._setInviteID(u),this._setGroupId(l),c>0?(this._setRoomID("".concat(c)),this._setRoomIdType(1)):0===c&&Yb(d)&&d.length>0&&(this._setRoomID(d),this._setRoomIdType(2)),this._setEventType(r),this._setInviteeList(p),this._setSeq(),v=this.getCallRecordData(),g=v.head,y=v.body,m={head:I(I({},g),{},{role:mS(g.role)}),body:y},E=I(I({},zS),{},{data:JSON.stringify(m)}),t.next=19,null==this||null===(n=this._tim)||void 0===n?void 0:n.callExperimentalAPI(WS,E);case 19:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"eventUploadNotSave",value:(n=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h,d,f,p,v,g,y;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.eventType,i=e.callType,a=e.mediaType,o=e.callRole,s=e.roomID,c=e.groupId,u=e.strRoomId,l=void 0===u?"":u,h=e.inviteID,this._setSeq(),d=this.getCallRecordData(),f=d.head,p=d.body,v=f.room_id_type,s>0&&(v=1),0===s&&l&&(v=2),g={head:I(I({},f),{},{role:mS(o),call_id:h,call_type:i,media_type:IS(a),room_id:1===v?"".concat(s):l,client_ts:Math.floor(Date.now()/1e3),group_id:c||this._getGroupId(),room_id_type:v}),body:I(I({},p),{},{event_type:r})},y=I(I({},zS),{},{data:JSON.stringify(g)}),t.next=10,null==this||null===(n=this._tim)||void 0===n?void 0:n.callExperimentalAPI(WS,y);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"heartBeatUpload",value:(e=a(_().mark((function t(){var e,n,r,i;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._setSeq(),n=this._callRecordData.head,r={head:I(I({},n),{},{role:mS(n.role),clientTs:Date.now(),command:Kg}),body:{status:this._bodyStatus}},i=I(I({},zS),{},{data:r}),t.next=6,null==this||null===(e=this._tim)||void 0===e?void 0:e.callExperimentalAPI(WS,i);case 6:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"startHeartbeat",value:function(){-1===this._heartbeat&&(Wb.info("start heart beat..."),this.heartBeatUpload(),this._heartbeat=KS.run(dg,this.doHeartbeat.bind(this),{delay:2e3,count:0,backgroundTask:!0}))}},{key:"stopHeartbeat",value:function(){-1!==this._heartbeat&&(Wb.info("stop heart beat"),KS.clearTask(this._heartbeat),this._heartbeat=-1,this._lastHeartBeatTime=-1,this._bodyStatus=Jg)}},{key:"doHeartbeat",value:(t=a(_().mark((function t(){var e;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.heartBeatUpload(),e=Date.now(),this._lastHeartBeatTime>0&&e-this._lastHeartBeatTime>1e4&&Wb.warn("heartbeat took ".concat(e-this._lastHeartBeatTime)),this._lastHeartBeatTime=e;case 4:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}]);var t,e,n,r}(),JS=function(){return h((function t(e,n){s(this,t),f(this,"_eventEmitter",void 0),f(this,"_callRecordDataReport",void 0),f(this,"_isCallAccepted",void 0),this._eventEmitter=e,this._callRecordDataReport=n,this._isCallAccepted=!1,this.registerListener()}),[{key:"registerListener",value:function(){this._eventEmitter.on(jv.ON_CALL_RECEIVED,this.onCallReceived.bind(this)),this._eventEmitter.on(jv.USER_ACCEPT,this.onCallAccepted.bind(this)),this._eventEmitter.on(jv.CALL_END,this.onCallEnd.bind(this)),this._eventEmitter.on(jv.CALLING_CANCEL,this.onCallingCancel.bind(this)),this._eventEmitter.on(jv.NO_RESP,this.onNoResponse.bind(this)),this._eventEmitter.on(jv.LINE_BUSY,this.onLineBusy.bind(this)),this._eventEmitter.on(jv.REJECT,this.onReject.bind(this))}},{key:"removeLister",value:function(){this._eventEmitter.off(jv.ON_CALL_RECEIVED,this.onCallReceived),this._eventEmitter.off(jv.USER_ACCEPT,this.onCallAccepted),this._eventEmitter.off(jv.CALL_END,this.onCallEnd),this._eventEmitter.off(jv.CALLING_CANCEL,this.onCallingCancel),this._eventEmitter.off(jv.NO_RESP,this.onNoResponse),this._eventEmitter.off(jv.LINE_BUSY,this.onLineBusy),this._eventEmitter.off(jv.REJECT,this.onReject)}},{key:"onCallReceived",value:function(){this._callRecordDataReport.startHeartbeat()}},{key:"onCallAccepted",value:function(){var t=this._callRecordDataReport.getCallRecordData().head;if((null==t?void 0:t.role)===cg){if(this._isCallAccepted&&t.call_type===Cg)return;this._isCallAccepted=!0;var e={eventType:Og};this._callRecordDataReport.eventUpload(e),this._callRecordDataReport.setBodyStatus(Vv.CONNECTED)}}},{key:"onCallEnd",value:function(){var t={eventType:Gg};this._isCallAccepted=!1,this._callRecordDataReport.eventUpload(t),this._callRecordDataReport.stopHeartbeat()}},{key:"onCallingCancel",value:function(t){var e=this._callRecordDataReport.getCallRecordData().head,n=e.role===cg?Mg:jg;this._isCallAccepted=!1;var r=(t.data||{}).reason;((void 0===r?"":r)===lg||e.role===cg&&e.call_type===Cg)&&this._callRecordDataReport.eventUpload({eventType:n}),this._callRecordDataReport.stopHeartbeat()}},{key:"onNoResponse",value:function(){this._uploadInC2C(dg)}},{key:"onLineBusy",value:function(){this._uploadInC2C(gg)}},{key:"onReject",value:function(){this._uploadInC2C(hg)}},{key:"_uploadInC2C",value:function(t){var e=this._callRecordDataReport.getCallRecordData().head;if((null==e?void 0:e.call_type)===Dg){var n="";switch(t){case dg:n=e.role===cg?kg:Ag;break;case hg:n=e.role===cg&&Lg;break;case gg:n=e.role===cg?Ug:Ag;break;default:return}this._callRecordDataReport.eventUpload({eventType:n})}}}])}(),YS={};function $S(t){var e=t.key,n=t.timeout,r=void 0===n?0:n,i=t.errorMessage,a=void 0===i?"":i,o=null,s=null,c=null,u=new Promise((function(t,e){o=function(){c&&clearTimeout(c),t()},s=function(t){c&&clearTimeout(c),e(t)}}));return r>0&&(c=setTimeout((function(){Zb(s)&&s({message:a})}),r)),YS[e]={resolve:o,reject:s,promise:u},u}function QS(t){return YS[t]||{}}var XS=vy(),ZS=function(){function n(r){s(this,n),f(this,"_initReady",!1),f(this,"_timExternal",!1),f(this,"_initialCallId",""),f(this,"_beautyLevel",4),f(this,"_isEnableMultiDeviceAbility",!1),f(this,"_loginResolveList",[]),f(this,"_logLevel",1),f(this,"_excludeFromHistoryMessage",void 0),f(this,"_uniqueLoginId",""),this.data={config:{sdkAppID:r.sdkAppID,userID:"",userSig:"",type:1}},this.initData(),this.EVENT=jv,this.MEDIA_TYPE=Wv,this.CALL_TYPE=Wv,this._emitter=new ND,this.TRTC=new e(this,{TUIScene:"TUICallEngine"});var i="TUICallEngine";14===(null==r?void 0:r.component)&&(i="TUICallKit"),15===(null==r?void 0:r.component)&&(i="TIMCallKit"),this._initLogger(r);try{(wx&&wx._isTIMCallKit||wx&&wx.getStorageSync&&wx.getStorageSync("_isTIMCallKit")||getApp&&getApp()&&getApp().globalData&&getApp().globalData._isTIMCallKit)&&(i="TIMCallKit")}catch(t){console.error(t)}wx.TUIScene=i,this._callDataReport=new _S({version:Mv,sdkAppId:r.sdkAppID}),this._dataReportObserver=new ES({emitter:this._emitter},this._callDataReport),r.tim?(this._chat=r.tim,this._timExternal=!0,Zb(r.tim.addSignalingListener)||(this._logger.info("constructor.start",{text:{data:r},type:"api"}),Wb.error("constructor.start, you need to pass in an instance of @tencentcloud/chat, \n please use @tencentcloud/chat instead of tim-js-sdk. 需要传入 @tencentcloud/chat 的实例"))):wx.$TIM?(this._chat=wx.$TIM,this._timExternal=!0):this._chat=t.create({SDKAppID:r.sdkAppID}),this._callRecordReport=new qS({version:Mv,tim:this._chat}),this._recordReportObserver=new JS(this._emitter,this._callRecordReport),wx.getSystemInfoSync().platform===Tg&&Wb.warn("".concat(Zg)),wx.setStorageSync("sdkAppId",r.sdkAppID),this.TSignalingClient=new CD({chat:this._chat,tuiCallEngine:this}),this.TRTCCallingDelegate=new gy({emitter:this._emitter}),this._eventStatController=new LD,this.setLogLevel(this._logLevel);var a=new wD(MD);wD.bindController(this._eventStatController),a.setText("version=".concat(Mv)).setEnd(),this._logger.info("constructor.start",{text:{data:r},type:"api"}),Wb.info("SDK Version:".concat(Mv,", SDKAppID:").concat(r.sdkAppID))}return h(n,[{key:"destroyInstance",value:(nt=a(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.instance){t.next=2;break}return t.abrupt("return");case 2:return this._callDataReport&&this._callDataReport.reset&&this._callDataReport.reset(),this._dataReportObserver&&this._dataReportObserver.reset&&this._dataReportObserver.removeLister(),this._callRecordReport&&this._callRecordReport.reset(),this._recordReportObserver&&this._recordReportObserver.removeLister(),t.next=8,n.instance.destroyed();case 8:n.instance=null;try{wx.removeStorageSync("sdkAppId"),wx.removeStorageSync("userId")}catch(t){console.error(t)}case 10:case"end":return t.stop()}}),t,this)}))),function(){return nt.apply(this,arguments)})},{key:"_initLogger",value:function(t){var e=this;wx.getSystemInfo({success:function(t){var e=t.brand,n=t.model,r=t.language,i=t.platform,a=t.version;XS.updateGetReportData((function(){return{useragent:{brand:e,model:n,language:r,platform:i,version:a}}}))}}),this._logger=XS,this._logger.updateGetReportData((function(){return{app:"TUICallEngine-mini",version:Mv,platform:Wg,sdkappid:t.sdkAppID,time:+new Date,userid:e.getUserID(),uniqueloginid:e._uniqueLoginId,roomid:String(e.getRoomId()||e.getStrRoomId()),callinfo:{inviteid:e.getInitialCallId(),callrole:e.isInviter()?cg:ug,groupid:e.getGroupId(),calltype:e.getCallType(),handledInviteeList:e.getHandledInviteeList(),unHandledInviteeList:e.getUnHandledInviteeList()},callkitversion:t.callkitVersion||yg,framework:t.frameWork||yg,isfromchat:t.chat?"true":"false"}}))}},{key:"setLogLevel",value:function(t){"number"!=typeof t||isNaN(t)?Wb.error("setLogLevel parameter must be a number(0~4)"):(this._logLevel=t,Wb.setLevel(t),this.TSignalingClient.setLogLevel(t),this.TRTC&&this.TRTC.setLogLevel(t))}},{key:"initData",value:function(){var t={callStatus:Vv.IDLE,soundMode:this.data.config.type===Wv.AUDIO?ng.EAR:ng.SPEAKER,active:!1,invitation:{inviteID:"",inviter:"",type:"",roomID:""},startTalkTime:0,localUser:null,remoteUsers:[],remoteID:"",roomId:0,strRoomId:"",timer:null,chatTimeNum:0,chatTime:"00:00:00",screen:"pusher",_callTimeout:30,pusher:{},playerList:[],isInviter:!0,unHandledInviteeList:[],handledInviteeList:[],_inviterInviteID:{},_audioVideoSwitchIdList:[],_acceptedUserObject:{},isGroupCall:!1,groupID:"",switchCallModeStatus:!0,enterRoomStatus:!1,devicePermission:!1,_initialInviteData:{},netWorkQualityList:[]};this.setIsEnableMultiDeviceAbility(!1),this.data=I(I({},this.data),t)}},{key:"handleNewInvitationReceived",value:(et=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h,d,f,p,v,g;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=this.getCallStatus(),this._logger.info("TSignaling.NEW_INVITATION_RECEIVED",{text:{data:I(I({},e),{},{currentCallStatus:a})},type:"event"}),Wb.info("onNewInvitationReceived - params:",e,"currentCallStatus:".concat(a)),o=e.data,s=o.inviter,c=o.inviteeList,u=o.data,l=o.inviteID,h=o.groupID,this.setInitialInviteData(JSON.parse(u)),cD((d=JSON.parse(u)).businessID)){t.next=8;break}return t.abrupt("return");case 8:if(f=(null==d||null===(n=d.data)||void 0===n?void 0:n.initialCallId)||"",this.getUserID()!==s){t.next=11;break}return t.abrupt("return");case 11:if((p=!!h)||!(null!=d&&null!==(r=d.data)&&void 0!==r&&r.consumed||null!=d&&d.consumed)){t.next=14;break}return t.abrupt("return");case 14:if(v={inviter:s,inviteeList:c,inviteID:l,isGroupCall:p,inviteData:d,groupID:h,initialCallId:f,currentCallStatus:a,inCallUserIDs:(null==d?void 0:d.inCallUserIDs)||[]},"hangup"!==(null==d||null===(i=d.data)||void 0===i?void 0:i.cmd)){t.next=22;break}if(Wb.info("hangup - params:",s,d,this.getHandledInviteeList(),this.getUnHandledInviteeList(),a,p),a!==Vv.IDLE){t.next=19;break}return t.abrupt("return");case 19:return t.next=21,this.handleHangupSignal(v);case 21:return t.abrupt("return");case 22:if(p||!this.judgeSwitchCallMode(d)){t.next=28;break}if(a===Vv.IDLE||d.room_id!==this.data.invitation.roomID){t.next=27;break}return t.next=26,this.handleSwitchCallModeTSignaling(l,d);case 26:this.addAudioVideoSwitchIdList(l);case 27:return t.abrupt("return");case 28:if(a===Vv.IDLE){t.next=35;break}return t.next=31,this.TSignalingClient.reject({inviteID:l,type:u.call_type,lineBusy:"line_busy"});case 31:return g=t.sent,this.TRTCCallingDelegate.onCallMessage(g),this.getCallRecordReport().eventUploadNotSave({inviteID:f||l,callRole:ug,eventType:Pg,roomID:d.room_id,mediaType:d.call_type,callType:h?Cg:Dg,groupId:h,strRoomId:d.str_room_id||d.data.str_room_id}),t.abrupt("return");case 35:this.handleInvitedSignal(v);case 36:case"end":return t.stop()}}),t,this)}))),function(t){return et.apply(this,arguments)})},{key:"handleHangupSignal",value:(tt=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h,d,f,p;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.inviter,r=e.currentCallStatus,i=e.inviteData,a=e.inviteeList,o=this.isGroupCall(),s=this.isInviter(),r!==Vv.CALLING){t.next=11;break}if(c=this.getUnHandledInviteeList(),u=this.getHandledInviteeList(),-1!==c.indexOf(n)&&this.deleteUnHandledInviteeList([n]),-1!==u.indexOf(n)){t.next=9;break}return t.abrupt("return");case 9:t.next=15;break;case 11:if(this.deleteHandledInviteeList([n]),!(-1===(l=this.getHandledInviteeList()).indexOf(n)&&l.length>1)){t.next=15;break}return t.abrupt("return");case 15:if(h=this.generateCallEndData({totalTime:i.call_end||0}),o){t.next=22;break}return this.TRTCCallingDelegate.onCallEnd(h),t.next=20,this._resetTUICallEngine();case 20:case 31:t.next=46;break;case 22:if(this.deleteHandledInviteeList([n]),this.data.playerList=this.data.playerList.filter((function(t){return t.userID!==n})),d=this.getHandledInviteeList(),f=this.getUnHandledInviteeList(),!s){t.next=33;break}if(1!==d.length||0!==f.length){t.next=31;break}return this.TRTCCallingDelegate.onCallEnd(h),t.next=31,this._resetTUICallEngine();case 33:if(r!==Vv.CALLING){t.next=41;break}if(-1!==a.indexOf(this.getUserID())&&this.TRTCCallingDelegate.onUserLeave({userID:n,playerList:this.data.playerList}),0!==d.length||1!==f.length){t.next=41;break}return p=this.generateEventData(),this.TRTCCallingDelegate.onCancel(I(I({inviteID:this.data.invitation.inviteID,invitee:this.getUserID(),userID:this.getUserID()},p),{},{reason:lg})),t.next=41,this._resetTUICallEngine();case 41:if(r!==Vv.CONNECTED){t.next=46;break}if(1!==d.length||0!==f.length){t.next=46;break}return this.TRTCCallingDelegate.onCallEnd(h),t.next=46,this._resetTUICallEngine();case 46:case"end":return t.stop()}}),t,this)}))),function(t){return tt.apply(this,arguments)})},{key:"handleSwitchCallModeTSignaling",value:(Z=a(_().mark((function t(e,n){var r,i,a;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={inviteID:e,type:n.call_type},i={cmd:"switchToVideo"},n.call_type===Wv.VIDEO&&(r.switch_to_audio_call="switch_to_audio_call",i.cmd="switchToAudio"),t.next=5,this.TSignalingClient.accept(r,i);case 5:a=t.sent,this.setSwitchCallModeStatus(!1),this.handleCallMode(n.call_type,a);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return Z.apply(this,arguments)})},{key:"judgeSwitchCallMode",value:function(t){return t.switch_to_audio_call&&"switch_to_audio_call"===t.switch_to_audio_call||t.data&&"switchToAudio"===t.data.cmd||t.data&&"switchToVideo"===t.data.cmd}},{key:"handleCallMode",value:function(t,e){Wb.info("handleCallMode - type",t);var n=t!==Wv.VIDEO;this.setPusherAttributesHandler({enableCamera:n}),n?(this.data.config.type=Wv.VIDEO,this.data.invitation.type=Wv.VIDEO):(this.data.config.type=Wv.AUDIO,this.data.invitation.type=Wv.AUDIO),this.TRTCCallingDelegate.onCallMode({type:this.data.config.type,message:e.data.message}),this.setSwitchCallModeStatus(!0)}},{key:"handleInvitedSignal",value:(X=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h,d,f,p,v,g,y,m,E;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.inviter,r=e.inviteeList,i=e.isGroupCall,a=e.groupID,o=e.inviteID,s=e.inviteData,c=e.inCallUserIDs,u=void 0===c?[]:c,l=e.initialCallId,h=void 0===l?"":l,this.data.remoteID=n,this.data.config.type=s.call_type,this.data.invitation.inviteID=o,this.data.invitation.inviter=n,this.data.invitation.type=s.call_type,this.data.invitation.roomID=s.room_id,this.data.isInviter=!1,this.data.isGroupCall=i,this.setRoomId(s.room_id),this.setStrRoomId(s.str_room_id||s.data.str_room_id),this.addHandledInviteeList([n]),this.addUnHandledInviteeList([].concat(T(r),T(u))),this.addAcceptedUserList(o,[n]),this.addInviterInviteId(o,[n].concat(T(r))),this.setInitialCallId(h),d=u.filter((function(t){return-1===r.indexOf(t)})),i&&this.setGroupId(a),this.changeCallStatus(Vv.CALLING),Wb.info("NEW_INVITATION_RECEIVED invitation: ",this.data.callStatus,this.data.invitation),f={sponsor:n,inviteeList:r,userIDList:[].concat(T(r),T(d)),isFromGroup:i,inviteID:o,groupID:a,inviteData:{version:s.version,callType:s.call_type,roomID:s.room_id},userData:s.userData,calleeIdList:r,callMediaType:s.call_type},this.setPusherAttributesHandler({enableCamera:this.data.config.type===Wv.VIDEO}),p=I(I({},p=this.getCallDataReport().getCallData()),{},{userId:this.getUserID(),roomID:s.room_id,inviteID:o,callRole:Yv,callType:s.call_type,inviteeList:r}),v={eventType:wg,callType:a?Cg:Dg,mediaType:s.call_type,callRole:ug,userID:this.getUserID(),roomID:s.room_id,inviteID:h||o,groupId:this.getGroupId(),strRoomId:this.getStrRoomId()},this.getCallRecordReport().eventUpload(v),this.getCallDataReport().setCallData(p),g=this.generateEventData()||{},this.TRTCCallingDelegate.onInvited(I(I({},g),f)),y=(new Date).getTime(),m=y;case 31:if(!(m-y<100)){t.next=42;break}return t.next=34,new Promise((function(t,e){return setTimeout(t,10)}));case 34:if(-1!==this.getInviterInviteIdList().indexOf(o)){t.next=39;break}return this._logger.warn("onNewInvitationReceived border case",{text:{data:{handleParams:e}},type:"api"}),t.next=38,this._resetTUICallEngine();case 38:return t.abrupt("return");case 39:m=(new Date).getTime(),t.next=31;break;case 42:return t.next=44,this.getSelfIMCallStatus([this.getUserID()]);case 44:if((E=t.sent)===Vv.IDLE){t.next=48;break}return this._logger.error("onNewInvitationReceived",{text:{data:{handleParams:e,customStatus:E}},type:"event"}),t.abrupt("return");case 48:return t.next=50,this.setSelfIMCallStatus(Vv.CALLING);case 50:return t.next=52,aD({camera:!0});case 52:this.data.devicePermission=t.sent,this.data.devicePermission&&this.data.config.type===Wv.VIDEO&&this.setPusherAttributesHandler({enableCamera:!0});case 54:case"end":return t.stop()}}),t,this)}))),function(t){return X.apply(this,arguments)})},{key:"addInviterInviteId",value:function(t,e){0!==e.length&&(0===(this.data._inviterInviteID[t]||[]).length?this.data._inviterInviteID[t]=e:this.data._inviterInviteID[t]=[].concat(T(this.data._inviterInviteID[t]),T(e)))}},{key:"handleInviteeAccepted",value:(Q=a(_().mark((function t(e){var n,r,i,a,o,s;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("TSignaling.INVITEE_ACCEPTED",{text:{data:I(I({},e),{},{currentCallStatus:this.data.callStatus}),type:"event"}}),Wb.info("onInviteeAccepted - params:",e),cD(null==(n=JSON.parse(e.data.data))?void 0:n.businessID)){t.next=5;break}return t.abrupt("return");case 5:if(r=e.data.invitee,i=e.data.inviteID,-1!==this.getTotalInviterInviteIdList().indexOf(i)){t.next=9;break}return t.abrupt("return");case 9:if(this.data.callStatus!==Vv.IDLE){t.next=11;break}return t.abrupt("return");case 11:if(this.isGroupCall()||!this.judgeSwitchCallMode(n)||this.data.switchCallModeStatus){t.next=14;break}return this.handleCallMode(this.data.invitation.type),t.abrupt("return");case 14:if(a=this.getCallStatus(),r!==this.getUserID()||a!==Vv.CALLING){t.next=21;break}return o=this.generateEventData(),this.TRTCCallingDelegate.onCancel(I({inviteID:this.data.invitation.inviteID,invitee:r,userID:r},o)),t.next=20,this._resetTUICallEngine();case 20:return t.abrupt("return");case 21:return this.isInviter()&&this.data.callStatus===Vv.CALLING&&this.changeCallStatus(Vv.CONNECTED),this.getCallDataReport().setCallAcceptTime((new Date).getTime()),this.addHandledInviteeList([r]),this.deleteUnHandledInviteeList([r]),this.addAcceptedUserList(i,[r]),t.next=28,this.getUserProfile(this.data.unHandledInviteeList.map((function(t){return{userID:t}})));case 28:s=t.sent,this.TRTCCallingDelegate.onUserAccept({userID:r,userList:s});case 30:case"end":return t.stop()}}),t,this)}))),function(t){return Q.apply(this,arguments)})},{key:"handleInviteeRejected",value:($=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h,d,f,p,v,g,y;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("TSignaling.INVITEE_REJECTED",{text:{data:e},type:"event"}),Wb.info("onInviteeRejected - params",e),r=e.data.inviteID,cD(null==(i=JSON.parse(e.data.data))?void 0:i.businessID)){t.next=6;break}return t.abrupt("return");case 6:if(this.isGroupCall()||this.getSwitchCallModeStatus()||-1===this.getAudioVideoSwitchIdList().indexOf(r)){t.next=10;break}return Wb.info("onInviteeRejected - Audio and video switching is not available"),this.setSwitchCallModeStatus(!0),t.abrupt("return");case 10:if(a=e.data.invitee,o=e.data.inviter,s=this.getUserID(),c=this.getCallStatus(),-1!==this.getInviterInviteIdList().indexOf(r)){t.next=19;break}if(!this.isInviter()||-1===this.getInviterInviteIdUserList().indexOf(a)){t.next=17;break}return t.abrupt("return");case 17:return this.deleteUnHandledInviteeList([a]),t.abrupt("return");case 19:if(c!==Vv.IDLE){t.next=21;break}return t.abrupt("return");case 21:if(u=this.generateEventData(),s!==a||c!==Vv.CALLING){t.next=27;break}return this.TRTCCallingDelegate.onCancel(I({inviteID:this.data.invitation.inviteID,invitee:a,userID:a},u)),t.next=26,this._resetTUICallEngine();case 26:return t.abrupt("return");case 27:if(l=this.isGroupCall(),h=this.isInviter(),this.deleteUnHandledInviteeList([a]),d=this.getUnHandledInviteeList(),f=this.getHandledInviteeList(),p=I({inviteID:this.data.invitation.inviteID,invitee:s,userID:s},u),v={inviteID:this.data.invitation.inviteID,invitee:a,userID:a},g=this.data.invitation,c!==Vv.CONNECTED){t.next=38;break}if(-1===f.indexOf(a)){t.next=38;break}return t.abrupt("return");case 38:if(!("line_busy"===i.line_busy||""===i.line_busy||null!=i&&null!==(n=i.data)&&void 0!==n&&n.message&&"lineBusy"===i.data.message)){t.next=52;break}if(o===g.inviter&&this.TRTCCallingDelegate.onLineBusy({inviteID:this.data.invitation.inviteID,invitee:a,userID:a}),l){t.next=46;break}return this.TRTCCallingDelegate.onCancel(I(I({},p),{},{reason:gg})),t.next=44,this._resetTUICallEngine();case 44:t.next=50;break;case 46:if(0!==d.length||1!==f.length){t.next=50;break}return this.TRTCCallingDelegate.onCancel(I(I({},p),{},{reason:gg})),t.next=50,this._resetTUICallEngine();case 50:case 57:t.next=78;break;case 52:if(l){t.next=59;break}return this.TRTCCallingDelegate.onReject(v),this.TRTCCallingDelegate.onCancel(I(I({},p),{},{reason:hg})),t.next=57,this._resetTUICallEngine();case 59:if(this.TRTCCallingDelegate.onReject(v),c!==Vv.CALLING){t.next=72;break}if(!h){t.next=68;break}if(0!==d.length||1!==f.length){t.next=66;break}return this.TRTCCallingDelegate.onCancel(I(I({},p),{},{reason:hg})),t.next=66,this._resetTUICallEngine();case 66:t.next=72;break;case 68:if(1!==d.length||0!==f.length){t.next=72;break}return this.TRTCCallingDelegate.onCancel(I(I({},p),{},{reason:hg})),t.next=72,this._resetTUICallEngine();case 72:if(c!==Vv.CONNECTED){t.next=78;break}if(0!==d.length||1!==f.length){t.next=78;break}return y=this.generateCallEndData(),this.TRTCCallingDelegate.onCallEnd(y),t.next=78,this._resetTUICallEngine();case 78:case"end":return t.stop()}}),t,this)}))),function(t){return $.apply(this,arguments)})},{key:"handleInvitationCancelled",value:(Y=a(_().mark((function t(e){var n,r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("TSignaling.INVITATION_CANCELLED",{text:{data:e,type:"event"}}),this.data.invitation.inviteID===e.data.inviteID){t.next=3;break}return t.abrupt("return");case 3:if(cD(null==(n=JSON.parse(e.data.data))?void 0:n.businessID)){t.next=6;break}return t.abrupt("return");case 6:if(this.data.callStatus!==Vv.IDLE){t.next=8;break}return t.abrupt("return");case 8:if(-1!==this.getInviterInviteIdList().indexOf(e.data.inviteID)){t.next=10;break}return t.abrupt("return");case 10:return Wb.info("onInvitationCancelled","inviteID:".concat(e.data.inviteID," inviter:").concat(e.data.inviter," data:").concat(e.data.data)),r=this.generateEventData(),this.TRTCCallingDelegate.onCancel(I(I({inviteID:this.data.invitation.inviteID,invitee:e.data.inviter,userID:e.data.inviter},r),{},{reason:lg})),t.next=15,this._resetTUICallEngine();case 15:case"end":return t.stop()}}),t,this)}))),function(t){return Y.apply(this,arguments)})},{key:"handleInvitationTimeout",value:(J=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h,d,f,p,v,g,y,m,E;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("TSignaling.INVITATION_TIMEOUT",{text:{data:e,type:"event"}}),r=e.data,i=r.inviter,a=r.inviteeList,o=void 0===a?[]:a,s=r.inviteID,c=this.getUserID(),u=this.isGroupCall(),l=this.isInviter(),h=this.getCallStatus(),this.deleteUnHandledInviteeList(o),Wb.warn("onInvitationTimeout - params:",e,"currentUserID:".concat(c," isInviter:").concat(l," isGroupCall:").concat(u," \n currentCallStatus:").concat(h," inviteID:").concat(null==this||null===(n=this._newInvitationData)||void 0===n?void 0:n.inviteID)),-1!==this.getInviterInviteIdList().indexOf(s)){t.next=10;break}return t.abrupt("return");case 10:if(h!==Vv.IDLE){t.next=12;break}return t.abrupt("return");case 12:if(h!==Vv.CONNECTED||u){t.next=14;break}return t.abrupt("return");case 14:if(d=this.getHandledInviteeList(),f=this.getUnHandledInviteeList(),p={groupID:this.getGroupId(),inviteID:this.data.invitation.inviteID,sponsor:i,timeoutUserList:o,userIDList:o},v=this.generateEventData(),g=I(I({inviteID:this.data.invitation.inviteID,invitee:c,userID:c},v),{},{reason:dg}),u){t.next=25;break}return l?(this.TRTCCallingDelegate.onNoResp(p),this.TRTCCallingDelegate.onCancel(g)):(this.TRTCCallingDelegate.onCancel(g),y=this.getCallRecordReport().getCallRecordData().head,this.getCallRecordReport().eventUpload(I(I({},y),{},{eventType:Ag,inviteID:this.getInitialCallId()}))),t.next=23,this._resetTUICallEngine();case 23:t.next=50;break;case 25:if(h!==Vv.CALLING){t.next=43;break}if(!l){t.next=34;break}if(this.TRTCCallingDelegate.onNoResp(p),0!==f.length){t.next=32;break}return this.TRTCCallingDelegate.onCancel(g),t.next=32,this._resetTUICallEngine();case 32:t.next=43;break;case 34:if(-1!==o.indexOf(c)){t.next=38;break}this.TRTCCallingDelegate.onNoResp(p),t.next=41;break;case 38:return this.TRTCCallingDelegate.onCancel(g),t.next=41,this._resetTUICallEngine();case 41:m=this.getCallRecordReport().getCallRecordData().head,this.getCallRecordReport().eventUpload(I(I({},m),{},{eventType:Ag,inviteID:this.getInitialCallId()}));case 43:if(h!==Vv.CONNECTED){t.next=50;break}if(this.TRTCCallingDelegate.onNoResp(p),1!==d.length||0!==f.length){t.next=50;break}return E=this.generateCallEndData(),this.TRTCCallingDelegate.onCallEnd(E),t.next=50,this._resetTUICallEngine();case 50:case"end":return t.stop()}}),t,this)}))),function(t){return J.apply(this,arguments)})},{key:"handleSDKReady",value:(q=a(_().mark((function t(){var e=this;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("ChatSdkEvent.SDK_READY",{text:{type:"event"}}),Wb.info("TSignaling SDK ready"),this._loginResolveList.forEach((function(t){return t.resolve(t.value)})),this._loginResolveList=[],this.TRTCCallingDelegate.onSdkReady({message:"SDK ready"}),t.next=7,this.setSelfIMCallStatus(Vv.IDLE);case 7:this._chat.getMyProfile().then((function(t){e.data.localUser=t.data})).catch((function(t){Wb.warn("getMyProfile error:",t)}));case 9:case"end":return t.stop()}}),t,this)}))),function(){return q.apply(this,arguments)})},{key:"handleKickedOut",value:(W=a(_().mark((function t(){var e,n,r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("ChatSdkEvent.KICKED_OUT",{text:{type:"event"}}),this.getCallStatus()!==Vv.CONNECTED){t.next=6;break}return e=this.generateCallEndData(),this.TRTCCallingDelegate.onCallEnd(e),t.next=6,this._resetTUICallEngine();case 6:if(this.getCallStatus()!==Vv.CALLING){t.next=14;break}return n=this.getUserID(),r=this.generateEventData(),this.TRTCCallingDelegate.onCancel(I(I({inviteID:this.data.invitation.inviteID,invitee:n,userID:n},r),{},{reason:qg})),t.next=12,this.cancel();case 12:return t.next=14,this._resetTUICallEngine();case 14:this._initReady=!1,this.TRTCCallingDelegate.onKickedOut({message:"kicked out"});case 16:case"end":return t.stop()}}),t,this)}))),function(){return W.apply(this,arguments)})},{key:"_addTSignalingEvent",value:function(){var e,n,r,i,a,o=t.EVENT,s=t.TSignaling;null===(e=this._chat)||void 0===e||e.addSignalingListener(s.NEW_INVITATION_RECEIVED,this.handleNewInvitationReceived,this),null===(n=this._chat)||void 0===n||n.addSignalingListener(s.INVITEE_ACCEPTED,this.handleInviteeAccepted,this),null===(r=this._chat)||void 0===r||r.addSignalingListener(s.INVITEE_REJECTED,this.handleInviteeRejected,this),null===(i=this._chat)||void 0===i||i.addSignalingListener(s.INVITATION_CANCELLED,this.handleInvitationCancelled,this),null===(a=this._chat)||void 0===a||a.addSignalingListener(s.INVITATION_TIMEOUT,this.handleInvitationTimeout,this),this._chat.on(o.SDK_READY,this.handleSDKReady,this),this._chat.on(o.KICKED_OUT,this.handleKickedOut,this),this._chat.on(o.USER_STATUS_UPDATED,this.onUserStatusUpdated,this)}},{key:"_removeTSignalingEvent",value:function(){var e,n,r,i,a,o=t.EVENT,s=t.TSignaling;null===(e=this._chat)||void 0===e||e.removeSignalingListener(s.NEW_INVITATION_RECEIVED,this.handleNewInvitationReceived),null===(n=this._chat)||void 0===n||n.removeSignalingListener(s.INVITEE_ACCEPTED,this.handleInviteeAccepted),null===(r=this._chat)||void 0===r||r.removeSignalingListener(s.INVITEE_REJECTED,this.handleInviteeRejected),null===(i=this._chat)||void 0===i||i.removeSignalingListener(s.INVITATION_CANCELLED,this.handleInvitationCancelled),null===(a=this._chat)||void 0===a||a.removeSignalingListener(s.INVITATION_TIMEOUT,this.handleInvitationTimeout),this._chat.off(o.SDK_READY,this.handleSDKReady),this._chat.off(o.KICKED_OUT,this.handleKickedOut),this._chat.off(o.USER_STATUS_UPDATED,this.onUserStatusUpdated)}},{key:"onLocalJoin",value:function(){var t=QS("enterRoom").resolve;this._logger.info("TRTC.EVENT.LOCAL_JOIN",{text:{type:"event",data:{userId:this.getUserID()}}});var e=this.generateEventData();this.TRTCCallingDelegate.onCallBegin(e),Zb(t)&&t()}},{key:"onRemoteUserJoin",value:(z=a(_().mark((function t(e){var n,r,i,a;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("TRTC.EVENT.REMOTE_USER_JOIN",{text:{type:"event",data:null==e?void 0:e.data}}),n=e.data,r=n.userID,i=n.userList,a=n.playerList,Wb.info("REMOTE_USER_JOIN",e,r),this.getCallStatus()===Vv.CONNECTED||!this.isInviter()){t.next=6;break}return t.next=6,this.setSelfIMCallStatus(Vv.CONNECTED);case 6:if(this.addHandledInviteeList([r]),this.deleteUnHandledInviteeList([r]),this.changeCallStatus(Vv.CONNECTED),!(a.length>0)){t.next=15;break}return t.next=12,this.getUserProfile(a);case 12:t.t0=t.sent,t.next=16;break;case 15:t.t0=this.data.playerList;case 16:this.data.playerList=t.t0,this.data.startTalkTime||(this.data.startTalkTime=Date.now()),this.TRTCCallingDelegate.onUserEnter({userID:e.data.userID,playerList:this.data.playerList}),Wb.log("REMOTE_USER_JOIN","playerList:",this.data.playerList,"userList:",i);case 20:case"end":return t.stop()}}),t,this)}))),function(t){return z.apply(this,arguments)})},{key:"onRemoteUserLeave",value:(K=a(_().mark((function t(e){var n,r,i,a,o,s;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("TRTC.EVENT.REMOTE_USER_LEAVE",{text:{type:"event",data:null==e?void 0:e.data}}),this.getCallStatus()!==Vv.IDLE){t.next=3;break}return t.abrupt("return");case 3:if(n=e.data.userID,Wb.info("REMOTE_USER_LEAVE",e,e.data.userID),this.deleteHandledInviteeList([n]),this.data.playerList=this.data.playerList.filter((function(t){return t.userID!==n})),this.TRTCCallingDelegate.onUserLeave({userID:n,playerList:this.data.playerList}),this.getCallDataReport().setExitRoomTime((new Date).getTime()),this.data.isGroupCall){t.next=18;break}return t.next=12,this.TSignalingClient.hangup({userIDList:[n],callType:this.data.config.type,callEnd:this.generateCallTotalTime()});case 12:return r=this.generateCallEndData(),this.TRTCCallingDelegate.onCallEnd(r),Wb.log("REMOTE_USER_LEAVE","playerList:"),t.next=17,this._resetTUICallEngine();case 17:return t.abrupt("return");case 18:if(i=this.getHandledInviteeList(),a=this.getUnHandledInviteeList(),o=this.getUserID(),1!==i.length||i[0]!==o||0!==a.length){t.next=26;break}return s=this.generateCallEndData(),this.TRTCCallingDelegate.onCallEnd(s),t.next=26,this._resetTUICallEngine();case 26:case"end":return t.stop()}}),t,this)}))),function(t){return K.apply(this,arguments)})},{key:"onLocalNetStateUpdate",value:function(t){this.data.pusher=t.data.pusher;var e=this.data.pusher,n=e.userID,r=void 0===n?"":n,i=e.netStatus,a=void 0===i?{}:i,o={userId:r,quality:null==a?void 0:a.netQualityLevel};this.data.netWorkQualityList=pD(this.data.netWorkQualityList,o,Yg),this.TRTCCallingDelegate.onUserNetworkQualityChanged(this.data.netWorkQualityList),this.TRTCCallingDelegate.onUserUpdate({pusher:this.data.pusher,playerList:this.data.playerList})}},{key:"onRemoteNetStateUpdate",value:(B=a(_().mark((function t(e){var n,r,i,a,o,s,c,u;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.data.playerList=e.data.playerList,n=d(this.data.playerList);try{for(n.s();!(r=n.n()).done;)i=r.value,a=i.userID,o=void 0===a?"":a,s=i.netStatus,u={userId:o,quality:null==(c=void 0===s?{}:s)?void 0:c.netQualityLevel},this.data.netWorkQualityList=pD(this.data.netWorkQualityList,u,Yg)}catch(t){n.e(t)}finally{n.f()}this.TRTCCallingDelegate.onUserNetworkQualityChanged(this.data.netWorkQualityList),this.TRTCCallingDelegate.onUserUpdate({pusher:this.data.pusher,playerList:this.data.playerList});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return B.apply(this,arguments)})},{key:"onUserStatusUpdated",value:(F=a(_().mark((function t(e){var n,r,i,a=this;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("onUserStatusUpdated",{text:{data:e},type:"event"}),n=(e.data||[]).find((function(t){return t.userID===a.getUserID()}))){t.next=4;break}return t.abrupt("return");case 4:if(r=ay[n.customStatus],(i=this.getCallStatus())===Vv.IDLE){t.next=10;break}if(r===i){t.next=10;break}return t.next=10,this.setSelfIMCallStatus(i);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return F.apply(this,arguments)})},{key:"onError",value:function(t){Wb.warn("onError",t),this.TRTCCallingDelegate.onError(t)}},{key:"onRemoteVideoAdd",value:function(t){this._logger.info("TRTC.EVENT.REMOTE_VIDEO_ADD",{text:{type:"event",data:null==t?void 0:t.data}}),Wb.info("* room REMOTE_VIDEO_ADD",t);var e=t.data.player;this.setPlayerAttributesHandler(e,{muteVideo:!1})}},{key:"onRemoteVideoRemove",value:function(t){this._logger.info("TRTC.EVENT.REMOTE_VIDEO_REMOVE",{text:{type:"event",data:null==t?void 0:t.data}}),Wb.info("* room REMOTE_VIDEO_REMOVE",t);var e=t.data.player;this.setPlayerAttributesHandler(e,{muteVideo:!0})}},{key:"onRemoteAudioAdd",value:(H=a(_().mark((function t(e){var n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("TRTC.EVENT.REMOTE_AUDIO_ADD",{text:{type:"event",data:null==e?void 0:e.data}}),Wb.info("* room REMOTE_AUDIO_ADD",e),t.next=4,this.getUserProfile([e.data.player]);case 4:n=t.sent,this.setPlayerAttributesHandler(n[0],{muteAudio:!1});case 6:case"end":return t.stop()}}),t,this)}))),function(t){return H.apply(this,arguments)})},{key:"onRemoteAudioRemove",value:function(t){this._logger.info("TRTC.EVENT.REMOTE_AUDIO_REMOVE",{text:{type:"event",data:null==t?void 0:t.data}}),Wb.info("* room REMOTE_AUDIO_REMOVE",t);var e=t.data.player;this.setPlayerAttributesHandler(e,{muteAudio:!0})}},{key:"onRemoteAudioVolumeUpdate",value:(G=a(_().mark((function t(e){var n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Wb.info("* room REMOTE_AUDIO_VOLUME_UPDATE",e),n=e.data.playerList,this.data.playerList=this._updateUserProfile(this.data.playerList,n),this.TRTCCallingDelegate.onUserUpdate({pusher:this.data.pusher,playerList:this.data.playerList});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return G.apply(this,arguments)})},{key:"onLocalAudioVolumeUpdate",value:function(t){var e=t.data.pusher;this.data.pusher=e,this.TRTCCallingDelegate.onUserUpdate({pusher:this.data.pusher,playerList:this.data.playerList})}},{key:"onMessageSentByMe",value:function(t){this.TRTCCallingDelegate.onMessageSentByMe(t)}},{key:"_addTRTCEvent",value:function(){this.TRTC.on(this.TRTC.EVENT.LOCAL_JOIN,this.onLocalJoin,this),this.TRTC.on(this.TRTC.EVENT.REMOTE_USER_JOIN,this.onRemoteUserJoin,this),this.TRTC.on(this.TRTC.EVENT.REMOTE_USER_LEAVE,this.onRemoteUserLeave,this),this.TRTC.on(this.TRTC.EVENT.LOCAL_NET_STATE_UPDATE,this.onLocalNetStateUpdate,this),this.TRTC.on(this.TRTC.EVENT.REMOTE_NET_STATE_UPDATE,this.onRemoteNetStateUpdate,this),this.TRTC.on(this.TRTC.EVENT.ERROR,this.onError,this),this.TRTC.on(this.TRTC.EVENT.REMOTE_VIDEO_ADD,this.onRemoteVideoAdd,this),this.TRTC.on(this.TRTC.EVENT.REMOTE_VIDEO_REMOVE,this.onRemoteVideoRemove,this),this.TRTC.on(this.TRTC.EVENT.REMOTE_AUDIO_ADD,this.onRemoteAudioAdd,this),this.TRTC.on(this.TRTC.EVENT.REMOTE_AUDIO_REMOVE,this.onRemoteAudioRemove,this),this.TRTC.on(this.TRTC.EVENT.REMOTE_AUDIO_VOLUME_UPDATE,this.onRemoteAudioVolumeUpdate,this),this.TRTC.on(this.TRTC.EVENT.LOCAL_AUDIO_VOLUME_UPDATE,this.onLocalAudioVolumeUpdate,this)}},{key:"_removeTRTCEvent",value:function(){this.TRTC.off(this.TRTC.EVENT.LOCAL_JOIN,this.onLocalJoin),this.TRTC.off(this.TRTC.EVENT.REMOTE_USER_JOIN,this.onRemoteUserJoin),this.TRTC.off(this.TRTC.EVENT.REMOTE_USER_LEAVE,this.onRemoteUserLeave),this.TRTC.off(this.TRTC.EVENT.LOCAL_NET_STATE_UPDATE,this.onLocalNetStateUpdate),this.TRTC.off(this.TRTC.EVENT.REMOTE_NET_STATE_UPDATE,this.onRemoteNetStateUpdate),this.TRTC.off(this.TRTC.EVENT.ERROR,this.onError),this.TRTC.off(this.TRTC.EVENT.REMOTE_VIDEO_ADD,this.onRemoteVideoAdd),this.TRTC.off(this.TRTC.EVENT.REMOTE_VIDEO_REMOVE,this.onRemoteVideoRemove),this.TRTC.off(this.TRTC.EVENT.REMOTE_AUDIO_ADD,this.onRemoteAudioAdd),this.TRTC.off(this.TRTC.EVENT.REMOTE_AUDIO_REMOVE,this.onRemoteAudioRemove),this.TRTC.off(this.TRTC.EVENT.REMOTE_AUDIO_VOLUME_UPDATE,this.onRemoteAudioVolumeUpdate),this.TRTC.off(this.TRTC.EVENT.LOCAL_AUDIO_VOLUME_UPDATE,this.onLocalAudioVolumeUpdate)}},{key:"initTRTC",value:function(){this._logger.info("initTRTC.start",{type:"api"});var t=this.TRTC.createPusher();this.setBeautyLevel(this._beautyLevel),this.data.pusher=t.pusherAttributes}},{key:"enterRoom",value:(V=a(_().mark((function t(e){var n,r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("enterRoom.start",{text:{data:e},type:"api"}),n=$S({key:"enterRoom",timeout:15e3,errorMessage:"enter room timeout"}),this._addTRTCEvent(),r=I(I({},this.data.config),{},{roomID:this.getRoomId(),enableMic:!0,autopush:!0,enableAgc:!0,enableAns:!0,enableCamera:e.callType===Wv.VIDEO}),Yb(fD(this.getRoomId(),this.getStrRoomId()))&&(r.strRoomID=this.getStrRoomId()),this.data.enterRoomStatus=!0,this.data.pusher=this.TRTC.enterRoom(r),this.setPusherAttributesHandler({enableCamera:e.callType===Wv.VIDEO}),this.getCurrentPusherInstance().start(),this._logger.info("enterRoom.updatePusher.start"),this.TRTCCallingDelegate.onUserUpdate({pusher:this.data.pusher}),t.abrupt("return",n);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return V.apply(this,arguments)})},{key:"setBeautyLevel",value:function(t){oS.getInstance().getAlert().checkSync(new XC({api:"setBeautyLevel",attributes:{level:t}})),this._beautyLevel=t,this._initReady&&this.setPusherAttributesHandler({beautyLevel:this._beautyLevel})}},{key:"exitRoom",value:(j=a(_().mark((function t(){var e;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("exitRoom.start",{type:"api"}),t.next=3,this.getCurrentPusherInstance().stop();case 3:return t.next=5,this.TRTC.exitRoom();case 5:e=t.sent,this.data.pusher=e.pusher,this.data.playerList=e.playerList,this.data.unHandledInviteeList=[],this.data.enterRoomStatus=!1,this.initTRTC(),this._removeTRTCEvent();case 12:case"end":return t.stop()}}),t,this)}))),function(){return j.apply(this,arguments)})},{key:"setPusherAttributesHandler",value:function(t){this._logger.info("setPusherAttributesHandler.start",{text:{data:t},type:"api"}),this.data.pusher=this.TRTC.setPusherAttributes(t),this.TRTCCallingDelegate.onUserUpdate({pusher:this.data.pusher,playerList:this.data.playerList})}},{key:"setPlayerAttributesHandler",value:(M=a(_().mark((function t(e,n){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this._logger.info("setPlayerAttributesHandler.start",{text:{data:n},type:"api"}),r=this.TRTC.setPlayerAttributes(e.streamID,n),Wb.warn("setPlayerAttributesHandler",r),this.data.playerList=r.length>0?this._updateUserProfile(this.data.playerList,r):this.data.playerList,this.data.playerList.length>0&&0===r.length&&(this.data.playerList[0].hasAudio=!1,this.data.playerList[0].hasVideo=!1),this.TRTCCallingDelegate.onUserUpdate({pusher:this.data.pusher,playerList:this.data.playerList});case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return M.apply(this,arguments)})},{key:"_mutePlayerAudio",value:function(t){this._logger.info("_mutePlayerAudio.start",{text:{data:t},type:"api"});var e=t.currentTarget.dataset.value;e.hasAudio&&e.muteAudio?this.setPlayerAttributesHandler(e,{muteAudio:!1}):!e.hasAudio||e.muteAudio||this.setPlayerAttributesHandler(e,{muteAudio:!0})}},{key:"_mutePlayerVideo",value:function(t){this._logger.info("_mutePlayerVideo.start",{text:{data:t},type:"api"});var e=t.currentTarget.dataset.value;e.hasVideo&&e.muteVideo?this.setPlayerAttributesHandler(e,{muteVideo:!1}):!e.hasVideo||e.muteVideo||this.setPlayerAttributesHandler(e,{muteVideo:!0})}},{key:"_pusherAudioHandler",value:function(){this._logger.info("_pusherAudioHandler.start",{type:"api",text:{data:{enableMic:this.data.pusher.enableMic}}}),this.data.pusher.enableMic?(this.setPusherAttributesHandler({enableMic:!1}),this.getCurrentPusherInstance().setMICVolume({volume:0})):(this.setPusherAttributesHandler({enableMic:!0}),this.getCurrentPusherInstance().setMICVolume({volume:100}))}},{key:"_pusherVideoHandler",value:function(){this._logger.info("_pusherVideoHandler.start",{type:"api",text:{data:{enableCamera:this.data.pusher.enableCamera}}}),this.data.pusher.enableCamera?this.setPusherAttributesHandler({enableCamera:!1}):this.setPusherAttributesHandler({enableCamera:!0})}},{key:"init",value:(P=a(_().mark((function t(e){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return oS.getInstance().getAlert().checkSync(new XC({api:"init",attributes:e})),t.next=3,this.login(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"login",value:(U=a(_().mark((function t(e){var n=this;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._uniqueLoginId=ID(6),this._logger.updateGetReportData((function(){return{userid:e.userID,uniqueloginid:n._uniqueLoginId}})),this._logger.info("login.start",{type:"api",text:{data:I(I({},e),{},{userSig:""})}}),this.data.config.userID=e.userID,this.data.config.userSig=e.userSig,t.abrupt("return",new Promise((function(t,r){n._chat.login({userID:e.userID,userSig:e.userSig}).then(function(){var r=a(_().mark((function r(i){var a;return _().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return wx.setStorageSync("userId","".concat(e.userID)),n._callDataReport.setUserID(e.userID),n._initReady=!0,r.next=5,n._resetTUICallEngine();case 5:n._addTSignalingEvent(),n.initTRTC(),null!==(a=i.data)&&void 0!==a&&a.repeatLogin&&(n._logger.info("login.success",{text:{error:"The TIM login status has been inherited into Call"},type:"api"}),Wb.info("login - success: The TIM login status has been inherited into Call. IM 登录状态已成功被 Call 继承。"),n._chat.isReady()&&n.TRTCCallingDelegate.onSdkReady({message:"SDK ready"}),t()),n._loginResolveList.push({resolve:t,value:i});case 9:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}()).catch((function(e){var i=e||{},a=i.code,o=i.message;2024===a||2025===a?(n._logger.warn("login.fail",{text:{error:"".concat(a,", ").concat(o)},type:"api"}),Wb.warn("login failed: ".concat(a,", ").concat(o,".")),n._loginResolveList.push({resolve:t,value:{code:0,message:"success"}})):(n._logger.error("login.fail",{text:{error:"".concat(a,", ").concat(o)},type:"api"}),r(e))}))})));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return U.apply(this,arguments)})},{key:"logout",value:(N=a(_().mark((function t(){var e,n,r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("logout.start",{type:"api",text:{data:{userID:this.data.config.userID,initReady:this._initReady}}}),this._initReady){t.next=3;break}return t.abrupt("return");case 3:return this._loginResolveList=[],this._uniqueLoginId="",e=this.data.config,n=e.userID,r=e.userSig,t.prev=6,t.next=9,this._chat.logout({userID:n,userSig:r});case 9:Wb.info("logout","IM logout success"),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(6),this._logger.error("logout.fail",{type:"api",text:{error:t.t0}}),Wb.error("logout","IM logout failure");case 16:case"end":return t.stop()}}),t,this,[[6,12]])}))),function(){return N.apply(this,arguments)})},{key:"on",value:function(t,e,n){oS.getInstance().getAlert().checkSync(new XC({api:"on",attributes:{eventCode:t,handler:e,context:n}})),this._emitter.on(t,e,n)}},{key:"off",value:function(t,e){oS.getInstance().getAlert().checkSync(new XC({api:"off",attributes:{eventCode:t,handler:e}})),this._emitter.off(t,e)}},{key:"call",value:(L=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h,d;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("call.start",{type:"api",text:{data:e}}),n=e.userID,r=e.type,i=e.roomID,a=e.strRoomID,o=e.timeout,t.next=4,oS.getInstance().getAlert().check(new XC({api:"call",attributes:e,initReady:this._initReady,callStatus:this.data.callStatus,capabilityCode:rg.BASE,sdkAppID:this.data.config.sdkAppID}),{tim:this._chat});case 4:return t.prev=4,t.next=7,TS(r);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(4),this._logger.error("call.fail",{text:{error:t.t0},type:"api"}),t.abrupt("return");case 13:if(this.getUserID()!==n){t.next=17;break}throw this._logger.error("call.fail",{text:{error:"Called id can not be yourself. userId:".concat(this.getUserID(),", inviteeId:").concat(n)},type:"api"}),Wb.error("call failed. Called id can't be yourself. userId:".concat(this.getUserID(),", inviteeId:").concat(n)),new Error("call failed. Called id can't be yourself. userId:".concat(this.getUserID(),", inviteeId:").concat(n));case 17:return t.next=19,this.getSelfIMCallStatus([this.getUserID()]);case 19:if((s=t.sent)===Vv.IDLE){t.next=23;break}throw this._logger.error("call.failed",{text:{data:{params:e,customStatus:s}},type:"api"}),new bD({code:$m.ERROR_REQUEST_REFUSED,messageParams:{value:s},fnName:"call"});case 23:return this._callDataReport.setAbilityBit(!0),this._callDataReport.setCallScene(Ig),c={callType:Dg,mediaType:r,inviteeList:[n]},t.prev=26,this.analyzeAndSetRoomId(i,a),this.data.config.type=r,this.data.invitation.inviter=this.data.config.userID,this.data.invitation.type=r,this.data.invitation.roomID=this.getRoomId(),this.data.isInviter=!0,this.data.remoteID=n,this.setGroupId(""),this.setCallTimeout(Qb(o)?this.getCallTimeout():o),this.changeCallStatus(Vv.CALLING),u=+new Date,t.next=40,this.enterRoom({callType:r});case 40:return l=+new Date,this._logger.info("enterRoom.success",{text:{data:{roomID:i,callType:r,cost:l-u}},type:"api"}),t.next=44,this.TSignalingClient.invite(I(I({},e),{},{roomID:this.getRoomId(),strRoomId:this.getStrRoomId(),timeout:this.getCallTimeout()}));case 44:if(h=t.sent,this._callDataReport.setEnterRoomTime((new Date).getTime()),d=I(I({},d=this._callDataReport.getCallData()),{},{userId:n,roomID:this.getRoomId(),timeout:this.getCallTimeout(),callRole:Jv,callType:r,inviteeList:[n]}),this._callDataReport.setCallData(d),this._callDataReport.setSendSignalingTime((new Date).getTime()),Wb.info("call(userID: ".concat(n,", type: ").concat(r,") success, ").concat(h)),0!==h.code){t.next=62;break}this.data.invitation.inviteID=h.inviteID,this.addInviterInviteId(h.inviteID,[this.data.config.userID,n]),this.addUnHandledInviteeList([n]),this.addHandledInviteeList([this.getUserID()]),this._callDataReport.setInviteID(h.inviteID),this.setInitialCallId(h.inviteID),this._callRecordUpload(I({eventType:Sg},c)),this._callRecordReport.startHeartbeat(),t.next=68;break;case 62:return this._callDataReport.setCodeAndMessage(h.code,h.message),this._callDataReport.uploadToKibana(),this._callRecordUpload(I({eventType:Vg},c)),this._logger.error("call.fail",{text:{error:h},type:"api"}),t.next=68,this._resetTUICallEngine();case 68:return t.abrupt("return",{data:h.data,pusher:this.data.pusher,roomID:this.getRoomId(),strRoomID:this.getStrRoomId()});case 71:return t.prev=71,t.t1=t.catch(26),t.t1.code===$m.ERROR_BLACKLIST?(this.TRTCCallingDelegate.onError($m.ERROR_BLACKLIST,t.t1.message),this._callDataReport.setCodeAndMessage($m.ERROR_BLACKLIST,t.t1.message)):this._callDataReport.setCodeAndMessage($m.UNKNOWN,JSON.stringify(t.t1)),this._callDataReport.uploadToKibana(),this._callRecordUpload(I({eventType:Vg},c)),this._logger.error("call.fail",{text:{error:t.t1},type:"api"}),Wb.error("call(userID:".concat(n,",type:").concat(r,") failed', error: ").concat(t.t1)),t.next=80,this._resetTUICallEngine();case 80:throw new Error(t.t1);case 81:case"end":return t.stop()}}),t,this,[[4,9],[26,71]])}))),function(t){return L.apply(this,arguments)})},{key:"groupCall",value:(A=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("groupCall.start",{type:"api",text:{data:e}}),n=e.type,r=e.roomID,i=e.strRoomID,a=e.userIDList,o=e.timeout,t.next=4,oS.getInstance().getAlert().check(new XC({api:"groupCall",attributes:e,initReady:this._initReady,callStatus:this.data.callStatus,capabilityCode:rg.PRO,sdkAppID:this.data.config.sdkAppID}),{tim:this._chat});case 4:return t.prev=4,t.next=7,TS(n);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(4),this._logger.error("groupCall.fail",{type:"api",text:{error:t.t0}}),t.abrupt("return");case 13:if(-1===a.indexOf(this.getUserID())){t.next=16;break}throw this._logger.error("groupCall.fail",{type:"api",text:{error:"Called list can not contain yourself"}}),new Error("groupCall failed. Called list can't contain yourself. userID:".concat(this.getUserID(),", inviteeIDList:").concat(a));case 16:return t.next=18,this.getSelfIMCallStatus([this.getUserID()]);case 18:if((s=t.sent)===Vv.IDLE){t.next=22;break}throw this._logger.error("groupCall.fail",{text:{data:{params:e,customStatus:s}},type:"api"}),new bD({code:$m.ERROR_REQUEST_REFUSED,messageParams:{value:s},fnName:"groupCall"});case 22:return this._callDataReport.setCallScene(mg),this.analyzeAndSetRoomId(r,i),c={callType:Cg,mediaType:n,inviteeList:e.userIDList},this.data.config.type=e.type,this.data.invitation.inviter=this.data.config.userID,this.data.invitation.type=n,this.data.invitation.roomID=this.getRoomId(),this.data.isInviter=!0,this.data.isGroupCall=!0,this.setGroupId(e.groupID),this.setCallTimeout(Qb(o)?this.getCallTimeout():o),this.changeCallStatus(Vv.CALLING),t.prev=34,u=+new Date,t.next=38,this.enterRoom({callType:n});case 38:return l=+new Date,this._logger.info("enterRoom.success",{text:{data:{roomID:r,callType:n,cost:l-u}},type:"api"}),t.next=42,this.TSignalingClient.inviteGroup(I(I({},e),{},{roomID:this.getRoomId(),strRoomID:this.getStrRoomId(),timeout:this.getCallTimeout()}));case 42:return h=t.sent,this.data.invitation.inviteID=h.inviteID,this.addUnHandledInviteeList(e.userIDList),this.addHandledInviteeList([this.getUserID()]),this.addInviterInviteId(h.inviteID,[this.data.config.userID].concat(T(e.userIDList))),this.setInitialCallId(h.inviteID),this._callRecordUpload(I({eventType:Sg},c)),this._callRecordReport.startHeartbeat(),Wb.log("groupCall OK",h),t.abrupt("return",{data:h.data,pusher:this.data.pusher,roomID:this.getRoomId(),strRoomID:this.getStrRoomId()});case 54:return t.prev=54,t.t1=t.catch(34),this._logger.error("groupCall.fail",{text:{error:t.t1},type:"api"}),Wb.error("groupCall failed",t.t1),this._callRecordUpload(I({eventType:Vg},c)),t.next=61,this._resetTUICallEngine();case 61:throw new Error(t.t1);case 62:case"end":return t.stop()}}),t,this,[[4,9],[34,54]])}))),function(t){return A.apply(this,arguments)})},{key:"joinInGroupCall",value:(k=a(_().mark((function t(e){var n,r,i,a,o,s,c,u;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("joinInGroupCall.start",{text:{data:e},type:"api"}),n=e.roomID,r=e.strRoomID,i=e.type,a=e.groupID,t.next=4,oS.getInstance().getAlert().check(new XC({api:"joinInGroupCall",attributes:e,initReady:this._initReady,capabilityCode:rg.PRO,sdkAppID:this.data.config.sdkAppID}),{tim:this._chat});case 4:return t.next=6,this.getSelfIMCallStatus([this.getUserID()]);case 6:if((o=t.sent)===Vv.IDLE){t.next=10;break}throw this._logger.error("joinInGroupCall.failed",{text:{data:{params:e,customStatus:o}},type:"api"}),new bD({code:$m.ERROR_REQUEST_REFUSED,messageParams:{value:o},fnName:"joinInGroupCall"});case 10:return t.prev=10,t.next=13,TS(i);case 13:t.next=19;break;case 15:return t.prev=15,t.t0=t.catch(10),this._logger.error("joinInGroupCall.failed",{text:{error:t.t0},type:"api"}),t.abrupt("return");case 19:return t.prev=19,this.data.config.type=i,this.data.invitation.type=i,Wb.info("joinInGroupCall roomID:".concat(n,",type:").concat(i,",userID:").concat(this.getUserID())),this.changeCallStatus(Vv.CALLING),this.addHandledInviteeList([this.getUserID()]),this.setGroupId(a),this.analyzeAndSetRoomId(n,r),this.data.isGroupCall=!0,this.data.isInviter=!1,s=+new Date,t.next=32,this.enterRoom({callType:i});case 32:return c=+new Date,this._logger.info("enterRoom.success",{text:{data:{roomID:n,callType:i,cost:c-s}},type:"api"}),t.next=36,this.setSelfIMCallStatus(Vv.CONNECTED);case 36:return this.changeCallStatus(Vv.CONNECTED),this.getCallRecordReport().setBodyStatus(Vv.CONNECTED),u={eventType:Fg,callType:Cg,mediaType:this._callType},this._callRecordUpload(u),this._callRecordReport.startHeartbeat(),t.abrupt("return",this.data.pusher);case 44:return t.prev=44,t.t1=t.catch(19),this._logger.error("joinInGroupCall.failed",{text:{error:t.t1},type:"api"}),t.next=49,this._resetTUICallEngine();case 49:throw new Error("joinInGroupCall failed error: ".concat(t.t1));case 50:case"end":return t.stop()}}),t,this,[[10,15],[19,44]])}))),function(t){return k.apply(this,arguments)})},{key:"inviteUser",value:(x=a(_().mark((function t(e){var n,r,i,a,o,s,c,u,l,h=this;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("inviteUser.start",{text:{data:e},type:"api"}),t.next=3,oS.getInstance().getAlert().check(new XC({api:"inviteUser",attributes:e,initReady:this._initReady,capabilityCode:rg.PRO,sdkAppID:this.data.config.sdkAppID}),{tim:this._chat});case 3:if(n=e.userIDList,r=void 0===n?[]:n,this.isGroupCall()){t.next=8;break}throw this._logger.error("inviteUser.fail",{text:{error:"inviteUser - groupID:".concat(this.getGroupId(),", roomID:").concat(this.data.roomID,", type:").concat(this.data.callType)},type:"api"}),Wb.error("inviteUser - groupID:".concat(this.getGroupId(),", roomID:").concat(this.data.roomID,", type:").concat(this.data.callType)),new Error("inviteUser - groupID:".concat(this.getGroupId(),", roomID:").concat(this.data.roomID,", type:").concat(this.data.callType));case 8:if(this.isInviter()||this.data.callStatus===Vv.CONNECTED){t.next=12;break}throw this._logger.error("inviteUser.fail",{text:{error:"inviteUser - current status:".concat(this.data.callStatus," not support")},type:"api"}),Wb.error("inviteUser - current status:".concat(this.data.callStatus," not support")),new Error("inviteUser - current status:".concat(this.data.callStatus," not support"));case 12:if(0!==r.length){t.next=16;break}throw this._logger.error("inviteUser.fail",{text:{error:"userIDList is empty"},type:"api"}),Wb.error("inviteUser - userIDList is empty"),new Error("inviteUser - userIDList is empty");case 16:if(i=this.getHandledInviteeList(),a=this.getUnHandledInviteeList(),o=[].concat(T(i),T(a)),0!==(s=r.filter((function(t){return-1===o.indexOf(t)}))).length){t.next=24;break}return this._logger.error("inviteUser.fail",{text:{data:{userIDList:r},error:"userIDList in call list"},type:"api"}),Wb.error("inviteUser failed - userIDList in call list. userIDList:".concat(JSON.stringify(r))),t.abrupt("return",Promise.reject("inviteUser failed - userIDList in call list. userIDList:".concat(JSON.stringify(r))));case 24:return r=s,t.prev=25,c=this.data.handledInviteeList.filter((function(t){return t!==h.getUserID()})),t.next=29,this.TSignalingClient.inviteGroup({groupID:this.getGroupId(),userIDList:r,type:this.data.invitation.type,roomID:this.getRoomId(),strRoomId:this.getStrRoomId(),timeout:this.getCallTimeout(),inCallUserIDs:[].concat(T(this.data.unHandledInviteeList),T(c)),initialCallId:this.getInitialCallId()});case 29:if(u=t.sent,Wb.log("inviteUser res",u),0!==u.code){t.next=38;break}return this.addUnHandledInviteeList(r),this.addInviterInviteId(u.inviteID,[this.data.config.userID].concat(T(r))),l={eventType:Hg,callType:Cg,mediaType:this._callType,inviteeList:r},this._callRecordUpload(l),this._callRecordReport.startHeartbeat(),t.abrupt("return",u);case 38:t.next=44;break;case 40:throw t.prev=40,t.t0=t.catch(25),this._logger.error("inviteUser.fail",{text:{error:t.t0},type:"api"}),new Error("inviteUser failed, userId:".concat(this.getUserID(),", inviteeIdList:").concat(r,", error: ").concat(t.t0));case 44:case"end":return t.stop()}}),t,this,[[25,40]])}))),function(t){return x.apply(this,arguments)})},{key:"accept",value:(O=a(_().mark((function t(){var e=this;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("accept.start",{type:"api"}),t.next=3,oS.getInstance().getAlert().check(new XC({api:"accept",initReady:this._initReady,callStatus:this.data.callStatus,sdkAppID:this.data.config.sdkAppID}));case 3:return t.prev=3,t.next=6,TS(this.data.config.type);case 6:t.next=12;break;case 8:return t.prev=8,t.t0=t.catch(3),this._logger.error("accept.fail",{text:{error:t.t0},type:"api"}),t.abrupt("return");case 12:return t.abrupt("return",new Promise((function(t,n){if(Wb.info("accept() inviteID: ",e.data.invitation.inviteID),e.data.config.type!==Wv.VIDEO||e.data.isGroupCall)e.handleAccept(t,n);else if(e.data.devicePermission){e.setPusherAttributesHandler({enableCamera:!1});var r=setTimeout(a(_().mark((function i(){return _().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:clearTimeout(r),e.handleAccept(t,n);case 2:case"end":return i.stop()}}),i)}))),0)}else e.handleAccept(t,n)})));case 13:case"end":return t.stop()}}),t,this,[[3,8]])}))),function(){return O.apply(this,arguments)})},{key:"handleAccept",value:(w=a(_().mark((function t(e,n){var r,i,a,o;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("handleAccept.start",{type:"api"}),this._callDataReport.setEnterRoomTime((new Date).getTime()),r=this.data.invitation.inviteID,i=+new Date,t.prev=4,t.next=7,this.enterRoom({callType:this.data.config.type});case 7:t.next=17;break;case 9:return t.prev=9,t.t0=t.catch(4),this._logger.error("accept.fail",{text:{error:t.t0},type:"api"}),Wb.error("accept failed",t.t0),t.next=15,this._resetTUICallEngine();case 15:return n(t.t0),t.abrupt("return");case 17:return a=+new Date,this._logger.info("enterRoom.success",{text:{data:{roomID:this.data.invitation.roomID,callType:this.data.config.type,cost:a-i}},type:"api"}),t.next=21,this.modifyInvitation(r);case 21:return t.next=23,this.TSignalingClient.accept({inviteID:r,type:this.data.config.type});case 23:if(0!==(o=t.sent).code){t.next=37;break}return Wb.log("accept OK"),t.next=28,this.setSelfIMCallStatus(Vv.CONNECTED);case 28:this.addHandledInviteeList([this.getUserID()]),this.deleteUnHandledInviteeList([this.getUserID()]),this.addAcceptedUserList(r,[this.getUserID()]),this._callRecordUpload({eventType:xg}),e({message:o.data.message,pusher:this.data.pusher}),this.changeCallStatus(Vv.CONNECTED),this.getCallRecordReport().setBodyStatus(Vv.CONNECTED),t.next=43;break;case 37:return this.isGroupCall()&&(this._callDataReport.setCodeAndMessage($m.NOT_MEDIA_ACCESS,JSON.stringify(o.data.message)),this._callDataReport.uploadToKibana()),this._logger.error("accept.fail",{text:{error:o},type:"api"}),Wb.error("accept failed",o),n(o),t.next=43,this._resetTUICallEngine();case 43:case"end":return t.stop()}}),t,this,[[4,9]])}))),function(t,e){return w.apply(this,arguments)})},{key:"reject",value:(S=a(_().mark((function t(){var e,n,r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("reject.start",{text:{data:{invitation:this.data.invitation,type:this.data.config.type}},type:"api"}),t.next=3,oS.getInstance().getAlert().checkSync(new XC({api:"reject",callStatus:this.data.callStatus,initReady:this._initReady}));case 3:if(!(e=this.data.invitation.inviteID)){t.next=15;break}return t.next=7,this.TSignalingClient.reject({inviteID:e,type:this.data.config.type});case 7:return n=t.sent,Wb.log("reject OK",n),r=this.generateEventData(),this.TRTCCallingDelegate.onCancel(I(I({inviteID:e,invitee:this.getUserID(),userID:this.getUserID()},r),{},{reason:hg})),this._callRecordUpload({eventType:Ng}),t.next=14,this._resetTUICallEngine();case 14:return t.abrupt("return",n);case 15:return this._logger.error("reject.fail",{text:{error:"未收到邀请,无法拒绝"},type:"api"}),Wb.warn("未收到邀请,无法拒绝"),t.abrupt("return","未收到邀请,无法拒绝");case 18:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{key:"hangup",value:(C=a(_().mark((function t(){var e,n,r,i,a,o,s,c,u,l,h,d,f,p,v,g,y,m,E=this;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("hangup.start",{text:{data:{isGroupCall:this.isGroupCall(),isInviter:this.isInviter(),currentUserID:this.getUserID(),totalTime:this.generateCallTotalTime(),callType:this.getCallType()}},type:"api"}),t.next=3,oS.getInstance().getAlert().checkSync(new XC({api:"hangup",callStatus:this.data.callStatus,initReady:this._initReady}));case 3:if(Wb.warn(" - callStatus:".concat(this.data.callStatus," _inviterInviteID:").concat(JSON.stringify(this.data.invitation))),this.data.callStatus!==Vv.IDLE){t.next=7;break}throw this._logger.error("hangup.fail",{text:{data:{currentStatus:this.data.callStatus},error:"hangup failed. current status:"},type:"api"}),new Error("hangup failed. current status:".concat(this.data.callStatus));case 7:if(this.data.callStatus!==Vv.CALLING||0!==this.getInviterInviteIdList().length){t.next=10;break}throw this._logger.error("hangup.fail",{text:{error:"call/groupCall incomplete。please wait cancel"},type:"api"}),new Error("call/groupCall incomplete。please wait cancel");case 10:if(e=this.isGroupCall(),n=this.isInviter(),r=this.getUserID(),i=this.generateCallTotalTime(),a=this.getCallType(),s=this.getInviterInviteIdList(),this.data.callStatus!==Vv.CONNECTED){t.next=31;break}if(t.prev=17,0!==s.length){t.next=23;break}return c=this.generateCallEndData({callMediaType:a,totalTime:i}),this.TRTCCallingDelegate.onCallEnd(c),t.next=23,this._resetTUICallEngine();case 23:t.next=31;break;case 25:return t.prev=25,t.t0=t.catch(17),t.next=29,this._resetTUICallEngine();case 29:throw this._logger.error("hangup.fail",{text:{error:t.t0},type:"api"}),new Error(t.t0);case 31:if(u=this.getHandledInviteeList(),l=this.getUnHandledInviteeList(),h=this.generateEventData(),t.prev=34,e){t.next=53;break}if(d=this.generateCallEndData(),!n){t.next=48;break}if(1!==l.length){t.next=45;break}return t.next=41,this.cancel();case 41:o=t.sent,this.TRTCCallingDelegate.onCancel(I(I({inviteID:this.data.invitation.inviteID,invitee:r,userID:r},h),{},{reason:lg})),t.next=46;break;case 45:this.TRTCCallingDelegate.onCallEnd(d);case 46:t.next=49;break;case 48:this.TRTCCallingDelegate.onCallEnd(d);case 49:return t.next=51,this._resetTUICallEngine();case 51:t.next=82;break;case 53:if(f=this.getCallStatus(),p={callType:this.getCallType(),isGroupCall:this.isGroupCall(),groupID:this.getGroupId(),userIDList:[].concat(T(u.filter((function(t){return t!==r}))),T(l)),callEnd:this.generateCallTotalTime()},!n){t.next=73;break}if(f!==Vv.CALLING){t.next=63;break}return t.next=59,this.cancel(this.getInviterInviteIdList());case 59:return o=t.sent,this.TRTCCallingDelegate.onCancel(I(I({inviteID:this.data.invitation.inviteID,invitee:r,userID:r},h),{},{reason:lg})),t.next=63,this._resetTUICallEngine();case 63:if(f!==Vv.CONNECTED){t.next=71;break}v=_().mark((function t(){var e,n,i,a,c,h,d;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=s[g],n=E.getInviterInviteIdUserList(e),!((i=E.getAcceptedUserList(e)).length>0)){t.next=22;break}if(a=i.filter((function(t){return-1!==u.indexOf(t)})),c=n.filter((function(t){return-1!==l.indexOf(t)})),p.userIDList=[].concat(T(a),T(c)).filter((function(t){return t!==r})),Wb.warn("inviter emit hangup signal, notify userIDList:".concat(JSON.stringify(p.userIDList))),h=E.generateCallEndData(),E.TRTCCallingDelegate.onCallEnd(h),0===p.userIDList.length){t.next=15;break}return t.next=12,E.TSignalingClient.hangup(p);case 12:o=t.sent,t.next=20;break;case 15:if(!(u.length>1)){t.next=20;break}return p.userIDList=u.filter((function(t){return t!==r})),t.next=19,E.TSignalingClient.hangup(p);case 19:o=t.sent;case 20:t.next=29;break;case 22:if(d=E.getUnHandledInviteeList(),!(n.filter((function(t){return-1!==d.indexOf(t)})).length>0)){t.next=29;break}return Wb.warn("inviter emit cancel signal, userIdList:".concat(n)),t.next=28,E.cancel([e]);case 28:o=t.sent;case 29:case"end":return t.stop()}}),t)})),g=0;case 66:if(!(g<s.length)){t.next=71;break}return t.delegateYield(v(),"t1",68);case 68:g++,t.next=66;break;case 71:t.next=80;break;case 73:y=_().mark((function t(){var e,n,i,a,c,h,d;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=s[m],n=E.getInviterInviteIdUserList(e),!((i=E.getAcceptedUserList(e)).length>0)){t.next=22;break}if(a=i.filter((function(t){return-1!==u.indexOf(t)})),c=n.filter((function(t){return-1!==l.indexOf(t)})),p.userIDList=[].concat(T(a),T(c)).filter((function(t){return t!==r})),Wb.warn("invitee emit hangup signal, notify userIDList:".concat(JSON.stringify(p.userIDList))),h=E.generateCallEndData(),E.TRTCCallingDelegate.onCallEnd(h),0===p.userIDList.length){t.next=15;break}return t.next=12,E.TSignalingClient.hangup(p);case 12:o=t.sent,t.next=20;break;case 15:if(!(u.length>1)){t.next=20;break}return p.userIDList=u.filter((function(t){return t!==r})),t.next=19,E.TSignalingClient.hangup(p);case 19:o=t.sent;case 20:t.next=29;break;case 22:if(d=E.getUnHandledInviteeList(),!(n.filter((function(t){return-1!==d.indexOf(t)})).length>0)){t.next=29;break}return Wb.warn("invitee emit cancel signal, inviteID:".concat(e)),t.next=28,E.cancel([e]);case 28:o=t.sent;case 29:case"end":return t.stop()}}),t)})),m=0;case 75:if(!(m<s.length)){t.next=80;break}return t.delegateYield(y(),"t2",77);case 77:m++,t.next=75;break;case 80:return t.next=82,this._resetTUICallEngine();case 82:return t.abrupt("return",o);case 85:throw t.prev=85,t.t3=t.catch(34),this._logger.error("hangup.fail",{text:{error:t.t3},type:"api"}),Wb.warn("hangup failed, error: ".concat(t.t3)),new Error("hangup failed, error: ".concat(t.t3));case 90:case"end":return t.stop()}}),t,this,[[17,25],[34,85]])}))),function(){return C.apply(this,arguments)})},{key:"cancel",value:(D=a(_().mark((function t(e){var n,r,i,a,o;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("cancel.start",{text:{data:{inviteIDList:e}},type:"api"}),Wb.info("cancel _inviterInviteID",this.data_inviterInviteID),n=[],t.prev=3,0===(e||[]).length&&(e=this.getInviterInviteIdList().slice(0,1)),t.next=7,this.modifyInvitation(e[0]);case 7:r=0;case 8:if(!(r<e.length)){t.next=17;break}return i=e[r],t.next=12,this.TSignalingClient.cancel({inviteID:i,callType:this.data.invitation.type});case 12:a=t.sent,n.push(a);case 14:r++,t.next=8;break;case 17:t.next=23;break;case 19:throw t.prev=19,t.t0=t.catch(3),this._logger.error("cancel.fail",{text:{error:t.t0},type:"api"}),new Error("_cancel failed, error: ".concat(t.t0));case 23:return o="cancel ".concat(JSON.stringify(n)," succeeded"),Wb.log("cancel ".concat(o)),t.abrupt("return",n);case 26:case"end":return t.stop()}}),t,this,[[3,19]])}))),function(t){return D.apply(this,arguments)})},{key:"setRoomId",value:function(t){this.data.roomId=t}},{key:"getRoomId",value:function(){return this.data.roomId}},{key:"setStrRoomId",value:function(t){this.data.strRoomId=t}},{key:"getStrRoomId",value:function(){return this.data.strRoomId||""}},{key:"getCallType",value:function(){return this.data.invitation.type}},{key:"setGroupId",value:function(t){this.data.groupID=t}},{key:"getGroupId",value:function(){return this.data.groupID}},{key:"isGroupCall",value:function(){return this.data.isGroupCall}},{key:"getUserID",value:function(){return this.data.config.userID}},{key:"isInviter",value:function(){return this.data.isInviter}},{key:"getHandledInviteeList",value:function(){return this.data.handledInviteeList||[]}},{key:"getCallDataReport",value:function(){return this._callDataReport}},{key:"getCallRecordReport",value:function(){return this._callRecordReport}},{key:"getUnHandledInviteeList",value:function(){return this.data.unHandledInviteeList||[]}},{key:"getCallStatus",value:function(){return this.data.callStatus}},{key:"setInitialInviteData",value:function(t){this._initialInviteData=t}},{key:"modifyInvitation",value:(b=a(_().mark((function t(e){var n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isGroupCall()){t.next=2;break}return t.abrupt("return");case 2:return n=I(I({},this._initialInviteData.data),{},{consumed:!0}),t.prev=3,t.next=6,this._chat.modifyInvitation({inviteID:e,data:JSON.stringify(I(I({},this._initialInviteData),{},{data:n}))});case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(3),Wb.error("modifyInvitation fail ".concat(t.t0));case 11:case"end":return t.stop()}}),t,this,[[3,8]])}))),function(t){return b.apply(this,arguments)})},{key:"getInviterInviteID",value:function(t){return this.data._inviterInviteID[t]||[]}},{key:"addAcceptedUserList",value:function(t,e){var n=this;if(0!==e.length)if(t)0===(this.data._acceptedUserObject[t]||[]).length?this.data._acceptedUserObject[t]=e:e.forEach((function(e){-1===n.data._acceptedUserObject[t].indexOf(e)&&n.data._acceptedUserObject[t].push(e)}));else for(var r=this.getInviterInviteIdList(),i=function(){var t=r[a],i=n.getInviterInviteIdUserList(t),o=e.filter((function(t){return-1!==i.indexOf(t)}));0===(n._acceptedUserObject[t]||[]).length?n.data._acceptedUserObject[t]=o:o.forEach((function(e){-1===n.data._acceptedUserObject[t].indexOf(e)&&n.data._acceptedUserObject[t].push(e)}))},a=0;a<r.length;a++)i()}},{key:"getAcceptedUserList",value:function(t){return this.data._acceptedUserObject[t]||[]}},{key:"getInviterInviteIdList",value:function(){return Object.keys(this.data._inviterInviteID||{})}},{key:"getTotalInviterInviteIdList",value:function(){var t=this.getInviterInviteIdList();return[].concat(T(this.data._audioVideoSwitchIdList),T(t))}},{key:"getInviterInviteIdUserList",value:function(t){var e=this,n=[];return t?n=this.data._inviterInviteID[t]||[]:this.getInviterInviteIdList().forEach((function(t){n=[].concat(T(n),T(e.getInviterInviteIdUserList(t)))})),n}},{key:"addAudioVideoSwitchIdList",value:function(t){t&&this.data._audioVideoSwitchIdList.push(t)}},{key:"getAudioVideoSwitchIdList",value:function(){return this.data._audioVideoSwitchIdList||[]}},{key:"addUnHandledInviteeList",value:function(t){var e=this;0!==t.length&&(t.forEach((function(t){-1===e.data.unHandledInviteeList.indexOf(t)&&e.data.unHandledInviteeList.push(t)})),this.data.unHandledInviteeList=Array.from(new Set(this.data.unHandledInviteeList)))}},{key:"deleteUnHandledInviteeList",value:function(t){var e=this;0!==t.length&&t.forEach((function(t){e.data.unHandledInviteeList=e.data.unHandledInviteeList.filter((function(e){return e!==t}))}))}},{key:"addHandledInviteeList",value:function(t){var e=this;0!==t.length&&(t.forEach((function(t){-1===e.data.handledInviteeList.indexOf(t)&&e.data.handledInviteeList.push(t)})),this.data.handledInviteeList=Array.from(new Set(this.data.handledInviteeList)))}},{key:"deleteHandledInviteeList",value:function(t){var e=this;0!==t.length&&t.forEach((function(t){e.data.handledInviteeList=e.data.handledInviteeList.filter((function(e){return e!==t}))}))}},{key:"getSwitchCallModeStatus",value:function(){return this.data.switchCallModeStatus}},{key:"changeCallStatus",value:function(t){var e=this;switch(this._logger.info("changeCallStatus.start",{text:{data:{status:t}},type:"api"}),this.data.callStatus=t,t){case Vv.CONNECTED:if(this.data.timer)return;this.data.timer=setInterval((function(){var t,n,r,i,a,o;e.data.chatTime=(t=e.data.chatTimeNum,(o=t)>=3600?(r=parseInt(o/3600)<10?"0".concat(parseInt(o/3600)):parseInt(o/3600),i=parseInt(o%60/60)<10?"0".concat(parseInt(o%60/60)):parseInt(o%60/60),(a=o%3600<10?"0".concat(o%3600):o%3600)>60&&(i=parseInt(a/60)<10?"0".concat(parseInt(a/60)):parseInt(a/60),a=a%60<10?"0".concat(a%60):a%60),n="".concat(r,":").concat(i,":").concat(a)):o>=60&&o<3600?(i=parseInt(o/60)<10?"0".concat(parseInt(o/60)):parseInt(o/60),a=o%60<10?"0".concat(o%60):o%60,n="00:".concat(i,":").concat(a)):o<60&&(a=o<10?"0".concat(o):o,n="00:00:".concat(a)),n),e.data.chatTimeNum+=1,e.data.pusher.chatTime=e.data.chatTime,e.data.pusher.chatTimeNum=e.data.chatTimeNum,e.TRTCCallingDelegate.onUserUpdate({pusher:e.data.pusher,playerList:e.data.playerList})}),1e3);break;case Vv.IDLE:clearInterval(this.data.timer),this.data.timer=null,this.data.chatTime="00:00:00",this.data.chatTimeNum=0}}},{key:"_resetTUICallEngine",value:(R=a(_().mark((function t(e,n){var r,i;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=QS("enterRoom"),i=r.reject,Zb(i)&&(this._logger.info("_resetTUICallEngine.resolve",{text:{data:{callEnd:e,type:n}},type:"api"}),i({message:"enter room reset"})),this.getCallStatus()===Vv.IDLE){t.next=7;break}if(this.data.callStatus=Vv.IDLE,!this.getIsLogin()){t.next=7;break}return t.next=7,this.setSelfIMCallStatus(Vv.IDLE);case 7:if(this._logger.info("_resetTUICallEngine.start",{text:{data:{callEnd:e,type:n}},type:"api"}),this.changeCallStatus(Vv.IDLE),Wb.info(" _resetTUICallEngine()",this.data.enterRoomStatus),!this.data.enterRoomStatus){t.next=13;break}return t.next=13,this.exitRoom(e,n);case 13:this.data.config.type=Wv.AUDIO,this._initialCallId="",this.initData();case 16:case"end":return t.stop()}}),t,this)}))),function(t,e){return R.apply(this,arguments)})},{key:"startRemoteView",value:(E=a(_().mark((function t(e){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this._logger.info("startRemoteView.start",{text:{data:{userID:e}},type:"api"}),this.data.playerList.forEach((function(t){if(t.userID===e)return t.muteVideo=!1,void Wb.info("startRemoteView(".concat(e,")"))}));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"stopRemoteView",value:function(t){this._logger.info("stopRemoteView.start",{text:{data:{userID:t}},type:"api"}),this.data.playerList.forEach((function(e){if(e.userID===t)return e.muteVideo=!0,void Wb.info("stopRemoteView(".concat(t,")"))}))}},{key:"openCamera",value:function(){this._logger.info("openCamera.start",{text:{data:{enableCamera:this.data.pusher.enableCamera}},type:"api"}),oS.getInstance().getAlert().checkSync(new XC({api:"openCamera",callStatus:this.data.callStatus,initReady:this._initReady})),this.data.pusher.enableCamera||this._pusherVideoHandler(),Wb.info("openCamera() pusher: ".concat(this.data.pusher))}},{key:"closeCamera",value:function(){this._logger.info("closeCamera.start",{text:{data:{enableCamera:this.data.pusher.enableCamera}},type:"api"}),oS.getInstance().getAlert().checkSync(new XC({api:"closeCamera",callStatus:this.data.callStatus,initReady:this._initReady})),this.data.pusher.enableCamera&&this._pusherVideoHandler(),Wb.info("closeCamera() pusher: ".concat(this.data.pusher))}},{key:"switchCamera",value:function(){this._logger.info("switchCamera.start",{text:{data:{frontCamera:this.data.pusher.frontCamera}},type:"api"}),oS.getInstance().getAlert().checkSync(new XC({api:"switchCamera",callStatus:this.data.callStatus,initReady:this._initReady})),this.getCurrentPusherInstance().switchCamera(),Wb.info("switchCamera(), frontCamera".concat(this.data.pusher.frontCamera))}},{key:"openMicrophone",value:function(){this._logger.info("openMicrophone.start",{text:{data:{enableMic:this.data.pusher.enableMic}},type:"api"}),oS.getInstance().getAlert().checkSync(new XC({api:"openMicrophone",callStatus:this.data.callStatus,initReady:this._initReady})),this.data.pusher.enableMic||this._pusherAudioHandler(),Wb.info("openMicrophone() pusher: ".concat(this.data.pusher))}},{key:"closeMicrophone",value:function(){this._logger.info("closeMicrophone.start",{text:{data:{enableMic:this.data.pusher.enableMic}},type:"api"}),oS.getInstance().getAlert().checkSync(new XC({api:"closeMicrophone",callStatus:this.data.callStatus,initReady:this._initReady})),this.data.pusher.enableMic&&this._pusherAudioHandler(),Wb.info("closeMicrophone() pusher: ".concat(this.data.pusher))}},{key:"selectAudioPlaybackDevice",value:function(t){this._logger.info("selectAudioPlaybackDevice.start",{text:{data:{type:t}},type:"api"}),oS.getInstance().getAlert().checkSync(new XC({api:"selectAudioPlaybackDevice",callStatus:this.data.callStatus,attributes:{type:t},initReady:this._initReady}));var e=!1;switch(t){case"speaker":e=!0;break;case"ear":e=!1}return this.setHandsFree(e)}},{key:"setHandsFree",value:function(t){return this.data.soundMode=t?"speaker":"ear",Wb.info("setHandsFree() result: ".concat(this.data.soundMode)),this.data.soundMode}},{key:"switchAudioCall",value:(m=a(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("switchAudioCall.start",{type:"api"}),!this.isGroupCall()){t.next=5;break}return this._logger.error("switchAudioCall.fail",{text:{error:"switchToAudioCall is not applicable to groupCall"},type:"api"}),Wb.warn("switchToAudioCall is not applicable to groupCall."),t.abrupt("return");case 5:if(this.data.invitation.type!==Wv.AUDIO){t.next=9;break}return this._logger.error("switchAudioCall.fail",{text:{error:"the call mode is audio call"},type:"api"}),Wb.warn("Now the call mode is audio call."),t.abrupt("return");case 9:if(this.data.switchCallModeStatus){t.next=13;break}return this._logger.error("switchAudioCall.fail",{text:{error:"audio and video call switching"},type:"api"}),Wb.warn("audio and video call switching."),t.abrupt("return");case 13:return this.setSwitchCallModeStatus(!1),this.setPusherAttributesHandler({enableCamera:!1}),t.abrupt("return",this.TSignalingClient.switchCallMode({userID:this.data.unHandledInviteeList[0]||this.data.playerList[0].userID,callType:this.data.invitation.type,roomID:this.data.invitation.roomID,mode:tg}));case 16:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})},{key:"switchCallMediaType",value:(y=a(_().mark((function t(e){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("closeMicrophone.start",{text:{data:{type:e}},type:"api"}),t.next=3,oS.getInstance().getAlert().check(new XC({api:"switchCallMediaType",attributes:{type:e},callStatus:this.data.callStatus,initReady:this._initReady,sdkAppID:this.data.config.sdkAppID}));case 3:if(!this.isGroupCall()){t.next=7;break}throw this._logger.error("switchAudioCall.fail",{text:{error:"switchToAudioCall is not applicable to groupCall"},type:"api"}),Wb.error("switchToAudioCall is not applicable to groupCall."),new bD($m.ERROR_SCENE_NOT_SUPPORTED,"switchToAudioCall is not applicable to groupCall.");case 7:if(this.data.switchCallModeStatus){t.next=11;break}return this._logger.error("switchAudioCall.fail",{text:{error:"audio and video call switching"},type:"api"}),Wb.warn("audio and video call switching."),t.abrupt("return");case 11:t.t0=e,t.next=t.t0===Wv.AUDIO?14:t.t0===Wv.VIDEO?17:20;break;case 14:return this.setSwitchCallModeStatus(!1),this.setPusherAttributesHandler({enableCamera:!1}),t.abrupt("return",this.TSignalingClient.switchCallMode({userID:this.data.unHandledInviteeList[0]||this.data.playerList[0].userID,callType:this.data.invitation.type,roomID:this.data.invitation.roomID,timeout:this.getCallTimeout(),mode:tg}));case 17:throw this._logger.error("switchAudioCall.fail",{text:{error:"Audio switching Video is not supported yet"},type:"api"}),Wb.warn("Audio switching Video is not supported yet"),new Error("Audio switching Video is not supported yet");case 20:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"setSwitchCallModeStatus",value:function(t){this.data.switchCallModeStatus=t}},{key:"switchVideoCall",value:(g=a(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("switchVideoCall.start",{type:"api"}),!this.isGroupCall()){t.next=5;break}return this._logger.error("switchAudioCall.fail",{text:{error:"switchToAudioCall is not applicable to groupCall"},type:"api"}),Wb.warn("switchToVideoCall is not applicable to groupCall."),t.abrupt("return");case 5:if(this.data.invitation.type!==Wv.VIDEO){t.next=9;break}return this._logger.error("switchAudioCall.fail",{text:{error:"Now the call mode is video call"},type:"api"}),Wb.warn("Now the call mode is video call."),t.abrupt("return");case 9:if(this.data.switchCallModeStatus){t.next=13;break}return this._logger.error("switchAudioCall.fail",{text:{error:"audio and video call switching"},type:"api"}),Wb.warn("audio and video call switching."),t.abrupt("return");case 13:return this.setSwitchCallModeStatus(!1),this.setPusherAttributesHandler({enableCamera:!0}),t.abrupt("return",this.TSignalingClient.switchCallMode({userID:this.data.playerList[0].userID,callType:this.data.invitation.type,roomID:this.data.invitation.roomID,mode:eg}));case 16:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"setSoundMode",value:function(t){var e=!1,n=!1;switch(t||(n=!0,t=this.data.soundMode),t){case"speaker":e=!0;break;case"ear":e=!1}return this.setHandsFree(n?!e:e)}},{key:"_hangUp",value:function(){this.hangup()}},{key:"getCurrentPusherInstance",value:function(){return this.TRTC.getPusherInstance().context=wx.createLivePusherContext(),this.TRTC.getPusherInstance()}},{key:"_pusherStateChangeHandler",value:function(t){this.TRTC.pusherEventHandler(t)}},{key:"_playerStateChange",value:function(t){this._emitter.emit(jv.REMOTE_STATE_UPDATE,t)}},{key:"_playerAudioVolumeNotify",value:function(t){this.data.playerList.length>0&&this.TRTC.playerAudioVolumeNotify(t)}},{key:"_pusherAudioVolumeNotify",value:function(t){this.TRTC.pusherAudioVolumeNotify(t)}},{key:"_updateUserProfile",value:function(t,e){return 0===e.length||0===t.length?e:e.map((function(e){var n=e,r=t.filter((function(t){return t.userID===e.userID}));return n.avatar=r[0]&&r[0].avatar?r[0].avatar:"",n.nick=r[0]&&r[0].nick?r[0].nick:"",n}))}},{key:"_getUserProfile",value:function(t){var e=this;this._chat.getUserProfile({userIDList:t}).then((function(t){Wb.log("getUserProfile success",t),e.data.remoteUsers=t.data})).catch((function(t){Wb.warn("getUserProfile error:",t)}))}},{key:"getUserProfile",value:(v=a(_().mark((function t(e){var n,r,i,a,o=arguments;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=o.length>1&&void 0!==o[1]?o[1]:"array",0!==e.length){t.next=3;break}return t.abrupt("return",[]);case 3:return r=e.map((function(t){return t.userID})),t.next=6,this._chat.getUserProfile({userIDList:r});case 6:i=t.sent,a=null,t.t0=n,t.next="array"===t.t0?11:"map"===t.t0?13:16;break;case 11:return a=e.map((function(t,e){return t.avatar=i.data[e].avatar,t.nick=i.data[e].nick,t})),t.abrupt("break",16);case 13:return a={},e.forEach((function(t,e){t.avatar=i.data[e].avatar,t.nick=i.data[e].nick,a[t.userID]=t})),t.abrupt("break",16);case 16:return t.abrupt("return",a);case 17:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"setSelfInfo",value:function(t,e){return this._logger.info("setSelfInfo.start",{text:{data:{nickName:t,avatar:e}},type:"api"}),oS.getInstance().getAlert().checkSync(new XC({api:"setSelfInfo",attributes:{nickName:t,avatar:e},initReady:this._initReady})),this._chat.updateMyProfile({nick:t,avatar:e})}},{key:"deviceCheck",value:(p=a(_().mark((function t(e){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,aD(e);case 2:if(t.t0=t.sent,!t.t0){t.next=5;break}t.t0=sD(e);case 5:return t.abrupt("return",t.t0);case 6:case"end":return t.stop()}}),t)}))),function(t){return p.apply(this,arguments)})},{key:"_pusherNetStatus",value:function(t){this.TRTC.pusherNetStatusHandler(t)}},{key:"_playNetStatus",value:function(t){this.TRTC.playerNetStatus(t)}},{key:"_toggleViewSize",value:function(t){var e=t.currentTarget.dataset.screen;return Wb.log("get screen",e,t),1===this.data.playerList.length&&e!==this.data.screen&&this.data.invitation.type===Wv.VIDEO&&(this.data.screen=e),this.data.screen}},{key:"getTim",value:function(){return this._chat}},{key:"destroyed",value:(l=a(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("destroyed.start",{type:"api"}),this.getCallStatus()===Vv.IDLE){t.next=4;break}return t.next=4,this.handleExceptionExit();case 4:return t.next=6,this._resetTUICallEngine();case 6:if(this._removeTSignalingEvent(),this._removeTRTCEvent(),this._timExternal){t.next=11;break}return t.next=11,this.logout();case 11:this._initReady=!1;case 12:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"handleExceptionExit",value:(u=a(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("handleExceptionExit.start",{text:{data:{callStatus:this.getCallStatus()}},type:"api"}),t.prev=1,this.getCallStatus()!==Vv.CALLING){t.next=10;break}if(!this.isInviter()){t.next=8;break}return t.next=6,this.hangup();case 6:t.next=10;break;case 8:return t.next=10,this.reject();case 10:if(this.getCallStatus()!==Vv.CONNECTED){t.next=13;break}return t.next=13,this.hangup();case 13:t.next=19;break;case 15:throw t.prev=15,t.t0=t.catch(1),this._logger.error("handleExceptionExit.fail",{text:{data:{error:t.t0}},type:"api"}),t.t0;case 19:case"end":return t.stop()}}),t,this,[[1,15]])}))),function(){return u.apply(this,arguments)})},{key:"_callRecordUpload",value:function(t){var e=I(I({},t),{},{callRole:this.isInviter()?cg:ug,userID:this.getUserID(),roomID:this.getRoomId(),inviteID:this.getInitialCallId(),strRoomId:this.getStrRoomId(),groupId:this.getGroupId()});this._callRecordReport.eventUpload(e)}},{key:"generateCallEndData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.roomId,n=t.callMediaType,r=t.callRole,i=t.totalTime,a=t.userId;return e=e||this.getRoomId(),n=n||this.getCallType(),r||(r=this.isInviter()?Jv:Yv),i=Qb(i)?this.generateCallTotalTime():i,a=a||this.getUserID(),{roomID:e,strRoomID:this.getStrRoomId(),callMediaType:n,callRole:r,totalTime:i,userID:a,callEnd:i,message:t.message||""}}},{key:"generateEventData",value:function(){return{callID:this.getInviterInviteIdList()[0],roomID:this.getRoomId(),strRoomID:this.getStrRoomId(),callRole:this.isInviter()?cg:ug,callMediaType:this.getCallType()}}},{key:"enableMultiDeviceAbility",value:(c=a(_().mark((function t(e){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("enableMultiDeviceAbility.start",{text:{data:{enable:e}},type:"api"}),t.next=3,oS.getInstance().getAlert().check(new XC({api:"enableMultiDeviceAbility",attributes:{enable:e},initReady:this._initReady,capabilityCode:rg.PRO,sdkAppID:this.data.config.sdkAppID}),{tim:this._chat});case 3:this.setIsEnableMultiDeviceAbility(e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"setInitialCallId",value:function(t){this._initialCallId=t}},{key:"getInitialCallId",value:function(){return this._initialCallId}},{key:"getConnectStartTime",value:function(){return this.data.startTalkTime}},{key:"getIsLogin",value:function(){return this._initReady}},{key:"setIsEnableMultiDeviceAbility",value:function(t){this._isEnableMultiDeviceAbility=!!t}},{key:"getIsEnableMultiDeviceAbility",value:function(){return this._isEnableMultiDeviceAbility}},{key:"getInviterID",value:function(){return this.data.invitation.inviter}},{key:"setCallTimeout",value:function(t){this.data._callTimeout=t}},{key:"getCallTimeout",value:function(){return this.data._callTimeout}},{key:"getExcludeFromHistoryMessage",value:function(){return this._excludeFromHistoryMessage}},{key:"generateCallTotalTime",value:function(){return 0===this.getConnectStartTime()?0:Math.round((Date.now()-this.getConnectStartTime())/1e3)}},{key:"setSelfIMCallStatus",value:(o=a(_().mark((function t(e){var n,r,i;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.getIsEnableMultiDeviceAbility(),this._logger.info("setSelfIMCallStatus.start",{text:{data:{callStatus:e,isEnableMultiDeviceAbility:n}},type:"api"}),n){t.next=4;break}return t.abrupt("return");case 4:if(this._chat&&e&&this.getIsLogin()){t.next=6;break}return t.abrupt("return");case 6:r=ny,t.prev=7,t.t0=e,t.next=t.t0===Vv.CALLING?11:t.t0===Vv.CONNECTED?13:15;break;case 11:return r=ry,t.abrupt("break",15);case 13:return r=iy,t.abrupt("break",15);case 15:return t.next=17,null===(i=this._chat)||void 0===i?void 0:i.setSelfStatus({customStatus:r});case 17:t.next=22;break;case 19:t.prev=19,t.t1=t.catch(7),this._logger.error("setSelfIMCallStatus.fail",{text:{error:t.t1},type:"api"});case 22:case"end":return t.stop()}}),t,this,[[7,19]])}))),function(t){return o.apply(this,arguments)})},{key:"getSelfIMCallStatus",value:(i=a(_().mark((function t(){var e,n,r,i,a,o,s,c,u=arguments;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:[],n=Vv.IDLE,this.getIsEnableMultiDeviceAbility()){t.next=4;break}return t.abrupt("return",n);case 4:if(t.prev=4,this._logger.info("getSelfIMCallStatus.start",{text:{data:e},type:"api"}),this._chat&&0!==e.length&&this.getIsLogin()){t.next=8;break}return t.abrupt("return",n);case 8:return t.next=10,null===(r=this._chat)||void 0===r?void 0:r.getUserStatus({userIDList:e});case 10:if(0!==(i=t.sent).code){t.next=21;break}a=i.data||{},o=a.successUserList,s=(void 0===o?[]:o)[0]||{},c=s.customStatus,t.t0=c,t.next=t.t0===ry?17:t.t0===iy?19:21;break;case 17:return n=Vv.CALLING,t.abrupt("break",21);case 19:return n=Vv.CONNECTED,t.abrupt("break",21);case 21:t.next=26;break;case 23:t.prev=23,t.t1=t.catch(4),this._logger.error("getSelfIMCallStatus.fail",{text:{error:t.t1},type:"api"});case 26:return t.abrupt("return",n);case 27:case"end":return t.stop()}}),t,this,[[4,23]])}))),function(){return i.apply(this,arguments)})},{key:"reportLog",value:function(t){try{if($b(t)){var e,n,r=t||{},i=r.name,a=void 0===i?"":i,o=r.data,s=r.error,c=r.type,u=void 0===c?"api":c,l=r.level,h=void 0===l?"info":l,d="error"===h?{error:s,data:o}:{data:o};null===(e=this._logger)||void 0===e||null===(n=e[h])||void 0===n||n.call(e,a,{text:d,type:u})}}catch(s){console.debug("reportLog fail: ",s)}}},{key:"analyzeAndSetRoomId",value:function(t,e){var n=fD(t,e);Jb(n)&&this.setRoomId(n),e&&this.setStrRoomId(e)}},{key:"callExperimentalAPI",value:(r=a(_().mark((function t(e){var n,r,i,a,o,s;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._logger.info("callExperimentalAPI",{text:{data:e},type:"api"}),(n=yD(e))!==e){t.next=4;break}return t.abrupt("return");case 4:if(r=n.api,i=n.params,a=void 0===i?{}:i,r&&a){t.next=7;break}return t.abrupt("return");case 7:t.prev=7,t.t0=r,t.next="setExcludeFromHistoryMessage"===t.t0?11:14;break;case 11:return o=a.excludeFromHistoryMessage,s=void 0!==o&&o,this._excludeFromHistoryMessage=s,t.abrupt("break",15);case 14:return t.abrupt("break",15);case 15:t.next=20;break;case 17:throw t.prev=17,t.t1=t.catch(7),t.t1;case 20:case"end":return t.stop()}}),t,this,[[7,17]])}))),function(t){return r.apply(this,arguments)})}],[{key:"createInstance",value:function(t){return XS.updateEsConfig({url:"".concat("https://webim.tim.qq.com/v4/imopenstat/tweb_trtccalling_report","?sdkappid=").concat(null==t?void 0:t.sdkAppID),table:"timweb-trtccalling"}),oS.getInstance().getAlert().checkSync(new XC({api:"createInstance",attributes:t})),n.instance||(n.instance=new n(t)),n.instance.initData(),n.instance}}]);var r,i,o,c,u,l,p,v,g,y,m,E,R,b,D,C,S,w,O,x,k,A,L,N,U,P,M,j,V,G,H,F,B,K,z,W,q,J,Y,$,Q,X,Z,tt,et,nt}();f(ZS,"instance",null),f(ZS,"AUDIO_PLAYBACK_DEVICE",ng),f(ZS,"MEDIA_TYPE",Wv),f(ZS,"EVENT",jv),f(ZS,"STATUS",Vv);export{ng as AUDIO_PLAYBACK_DEVICE,jv as EVENT,Wv as MEDIA_TYPE,Vv as STATUS,ZS as TUICallEngine,ZS as default};