trtc-sdk-v5 5.8.3-beta.1 → 5.8.3-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-sdk-v5",
3
- "version": "5.8.3-beta.1",
3
+ "version": "5.8.3-beta.2",
4
4
  "description": "Tencent Cloud RTC SDK for Web",
5
5
  "main": "trtc.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/cdn-streaming",
3
- "version": "5.8.3-beta.1",
3
+ "version": "5.8.3-beta.2",
4
4
  "description": "TRTC Web SDK 5.x CDN streaming plugin",
5
5
  "main": "./cdn-streaming.esm.js",
6
6
  "author": "longyuqi <longyuqi@tencent.com>",
@@ -1 +1 @@
1
- var N=Object.defineProperty,G=Object.defineProperties,M=Object.getOwnPropertyDescriptor,H=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var O=(i,e,r)=>e in i?N(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,y=(i,e)=>{for(var r in e||(e={}))F.call(e,r)&&O(i,r,e[r]);if(x)for(var r of x(e))K.call(e,r)&&O(i,r,e[r]);return i},A=(i,e)=>G(i,H(e));var I=(i,e,r,o)=>{for(var t=o>1?void 0:o?M(e,r):e,a=i.length-1,n;a>=0;a--)(n=i[a])&&(t=(o?n(e,r,t):n(t))||t);return o&&t&&N(e,r,t),t};var b=(i,e,r)=>(O(i,typeof e!="symbol"?e+"":e,r),r);var P={properties:{roomId:{type:"number"},strRoomId:{type:"string"}}},_={name:"option",required:!0,properties:A(y({},P.properties),{userId:{type:"string"}})},L={name:"option",required:!0,properties:{updateList:{type:"array",required:!0,arrayItem:{required:!0,type:"object",properties:A(y({},_.properties),{userId:{required:!1,type:"string"},muteAudio:{type:"boolean"},muteVideo:{type:"boolean"},muteSubStream:{type:"boolean"}})}}}},k={name:"option",properties:y({},P.properties)};var p=i=>typeof i=="function";var j=0,W=1,V=2;function q({retryFunction:i,settings:e,onError:r,onRetrying:o,onRetryFailed:t,onRetrySuccess:a,context:n}){return function(...d){let{retries:m=5,timeout:u=1e3}=e,s=0,l=-1,c=j,R=async(f,E)=>{let w=n||this;try{let g=await i.apply(w,d);s>0&&a&&a.call(this,s),s=0,f(g)}catch(g){let U=()=>{clearTimeout(l),s=0,c=V,E(g)},h=()=>{c!==V&&s<(p(m)?m():m)?(s++,c=W,p(o)&&o.call(this,s,U),l=window.setTimeout(()=>{l=-1,R(f,E)},p(u)?u(s):u)):(U(),p(t)&&t.call(this,g))};p(r)?r.call(this,{error:g,retry:h,reject:E,retryFuncArgs:d,retriedCount:s}):h()}};return new Promise(R)}}var B=q;var T=new WeakMap;function D({settings:i={retries:5,timeout:2e3},onError:e,onRetrying:r,onRetryFailed:o}){return function(t,a,n){let d=B({retryFunction:n.value,settings:i,onError({error:m,retry:u,reject:s,retryFuncArgs:l}){var c;e?e.call(this,m,()=>{var R;(R=T.get(t))!=null&&R.has(a)?u():s(m)},s,l):(c=T.get(t))!=null&&c.has(a)?u():s(m)},onRetrying(m,u){var s;p(r)&&r.call(this,m,u),(s=T.get(t))!=null&&s.has(a)&&(T.get(t).get(a).stopRetry=u)},onRetryFailed:o});return n.value=function(...m){let u=T.get(t);return u?u.set(a,{args:m}):T.set(t,new Map([[a,{args:m}]])),d.apply(this,m).finally(()=>{var s;return(s=T.get(t))==null?void 0:s.delete(a)})},n}}var S=class S{constructor(e){this.core=e;b(this,"disableRandomCall",!0);b(this,"connectedRoomIdSet",new Set);b(this,"updateSeq",0);b(this,"_log");this._log=this.core.log.createChild({id:`${this.getAlias()}`})}getName(){return S.Name}getAlias(){return"crs-r"}getGroup(e){var o;let r=(e==null?void 0:e.userId)||((o=e==null?void 0:e.updateList)==null?void 0:o[0].userId)||"";return r||(e?e.updateList?String(e.updateList[0].roomId)||e.updateList[0].strRoomId||"":String(e.roomId)||e.strRoomId||"":"*")}getValidateRule(e){switch(e){case"start":return _;case"update":return L;case"stop":return k}}async start({roomId:e,strRoomId:r,userId:o}){let{RtcError:t,ErrorCode:a}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new t({code:a.ENV_NOT_SUPPORTED});let n=e||r,d=await this.core.room.sendSignalMessage({command:"connect_other_room",responseCommand:String(8209),data:{roomId:n,userId:o,localRoomId:o?void 0:this.core.room.roomId},retries:3});if(d.data.code!==0)throw new t({code:a.SERVER_ERROR,extraCode:d.data.code,message:d.data.message});o||this.connectedRoomIdSet.add(n)}async update({updateList:e}){var n;let{RtcError:r,ErrorCode:o}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:o.ENV_NOT_SUPPORTED});let t=e.find(d=>d.userId)?0:1,a=await this.core.room.sendSignalMessage({command:"update_other_room_forward_mode",responseCommand:String(8213),data:{seq:++this.updateSeq,operationType:t,updateList:e.map(({roomId:d,strRoomId:m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c})=>({roomId:d||m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c}))},retries:3});if(a.data.data.expectSeq)return this.updateSeq=a.data.data.expectSeq,this.update({updateList:e});if(a.data.code!==0)throw new r({code:o.SERVER_ERROR,extraCode:a.data.code,message:a.data.message});if(((n=a.data.data.errorList)==null?void 0:n.length)>0)throw new r({code:o.UNKNOWN_ERROR,message:a.data.data.errorList[0].message})}async stop({roomId:e,strRoomId:r}={}){let o=e||r;if(o)await this.doStop(o);else if(this.connectedRoomIdSet.size>0)for(let t of[...this.connectedRoomIdSet.values()])await this.doStop(t);else await this.doStop()}async doStop(e){let{RtcError:r,ErrorCode:o}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:o.ENV_NOT_SUPPORTED});let t=await this.core.room.sendSignalMessage({command:"disconnect_other_room",responseCommand:String(8211),data:{roomId:e,localRoomId:this.core.room.roomId},retries:3});if(t.data.code!==0)throw new r({code:o.SERVER_ERROR,extraCode:t.data.code,message:t.data.message});this.connectedRoomIdSet.delete(e)}destroy(){}};b(S,"Name","CrossRoom"),I([D({settings:{retries:3,timeout:1e3},onRetrying(i){this._log.warn(`retry start: ${i}`)}})],S.prototype,"start",1),I([D({settings:{retries:3,timeout:1e3},onRetrying(i){this._log.warn(`retry update: ${i}`)}})],S.prototype,"update",1);var C=S;var ne=C;export{C as CrossRoom,ne as default};
1
+ var N=Object.defineProperty,G=Object.defineProperties,M=Object.getOwnPropertyDescriptor,H=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var O=(i,e,r)=>e in i?N(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,y=(i,e)=>{for(var r in e||(e={}))K.call(e,r)&&O(i,r,e[r]);if(x)for(var r of x(e))F.call(e,r)&&O(i,r,e[r]);return i},A=(i,e)=>G(i,H(e));var I=(i,e,r,o)=>{for(var t=o>1?void 0:o?M(e,r):e,a=i.length-1,n;a>=0;a--)(n=i[a])&&(t=(o?n(e,r,t):n(t))||t);return o&&t&&N(e,r,t),t};var b=(i,e,r)=>(O(i,typeof e!="symbol"?e+"":e,r),r);var P={properties:{roomId:{type:"number"},strRoomId:{type:"string"}}},_={name:"option",required:!0,properties:A(y({},P.properties),{userId:{type:"string"}})},L={name:"option",required:!0,properties:{updateList:{type:"array",required:!0,arrayItem:{required:!0,type:"object",properties:A(y({},_.properties),{userId:{required:!1,type:"string"},muteAudio:{type:"boolean"},muteVideo:{type:"boolean"},muteSubStream:{type:"boolean"}})}}}},k={name:"option",properties:y({},P.properties)};var p=i=>typeof i=="function";var j=0,W=1,V=2;function q({retryFunction:i,settings:e,onError:r,onRetrying:o,onRetryFailed:t,onRetrySuccess:a,context:n}){return function(...d){let{retries:m=5,timeout:u=1e3}=e,s=0,l=-1,c=j,R=async(f,E)=>{let w=n||this;try{let g=await i.apply(w,d);s>0&&a&&a.call(this,s),s=0,f(g)}catch(g){let U=()=>{clearTimeout(l),s=0,c=V,E(g)},h=()=>{c!==V&&s<(p(m)?m():m)?(s++,c=W,p(o)&&o.call(this,s,U),l=window.setTimeout(()=>{l=-1,R(f,E)},p(u)?u(s):u)):(U(),p(t)&&t.call(this,g))};p(r)?r.call(this,{error:g,retry:h,reject:E,retryFuncArgs:d,retriedCount:s}):h()}};return new Promise(R)}}var B=q;var T=new WeakMap;function D({settings:i={retries:5,timeout:2e3},onError:e,onRetrying:r,onRetryFailed:o}){return function(t,a,n){let d=B({retryFunction:n.value,settings:i,onError({error:m,retry:u,reject:s,retryFuncArgs:l}){var c;e?e.call(this,m,()=>{var R;(R=T.get(t))!=null&&R.has(a)?u():s(m)},s,l):(c=T.get(t))!=null&&c.has(a)?u():s(m)},onRetrying(m,u){var s;p(r)&&r.call(this,m,u),(s=T.get(t))!=null&&s.has(a)&&(T.get(t).get(a).stopRetry=u)},onRetryFailed:o});return n.value=function(...m){let u=T.get(t);return u?u.set(a,{args:m}):T.set(t,new Map([[a,{args:m}]])),d.apply(this,m).finally(()=>{var s;return(s=T.get(t))==null?void 0:s.delete(a)})},n}}var S=class S{constructor(e){this.core=e;b(this,"disableRandomCall",!0);b(this,"connectedRoomIdSet",new Set);b(this,"updateSeq",0);b(this,"_log");this._log=this.core.log.createChild({id:`${this.getAlias()}`})}getName(){return S.Name}getAlias(){return"crs-r"}getGroup(e){var o;let r=(e==null?void 0:e.userId)||((o=e==null?void 0:e.updateList)==null?void 0:o[0].userId)||"";return r||(e?e.updateList?String(e.updateList[0].roomId)||e.updateList[0].strRoomId||"":String(e.roomId)||e.strRoomId||"":"*")}getValidateRule(e){switch(e){case"start":return _;case"update":return L;case"stop":return k}}async start({roomId:e,strRoomId:r,userId:o}){let{RtcError:t,ErrorCode:a}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new t({code:a.ENV_NOT_SUPPORTED});let n=e||r,d=await this.core.room.sendSignalMessage({command:"connect_other_room",responseCommand:String(8209),data:{roomId:n,userId:o,localRoomId:o?void 0:this.core.room.roomId},retries:3});if(d.data.code!==0)throw new t({code:a.SERVER_ERROR,extraCode:d.data.code,message:d.data.message});o||this.connectedRoomIdSet.add(n)}async update({updateList:e}){var n;let{RtcError:r,ErrorCode:o}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:o.ENV_NOT_SUPPORTED});let t=e.find(d=>d.userId)?0:1,a=await this.core.room.sendSignalMessage({command:"update_other_room_forward_mode",responseCommand:String(8213),data:{seq:++this.updateSeq,operationType:t,updateList:e.map(({roomId:d,strRoomId:m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c})=>({roomId:d||m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c}))},retries:3});if(a.data.data.expectSeq)return this.updateSeq=a.data.data.expectSeq,this.update({updateList:e});if(a.data.code!==0)throw new r({code:o.SERVER_ERROR,extraCode:a.data.code,message:a.data.message});if(((n=a.data.data.errorList)==null?void 0:n.length)>0)throw new r({code:o.UNKNOWN_ERROR,message:a.data.data.errorList[0].message})}async stop({roomId:e,strRoomId:r}={}){let o=e||r;if(o)await this.doStop(o);else if(this.connectedRoomIdSet.size>0)for(let t of[...this.connectedRoomIdSet.values()])await this.doStop(t);else await this.doStop()}async doStop(e){let{RtcError:r,ErrorCode:o}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:o.ENV_NOT_SUPPORTED});let t=await this.core.room.sendSignalMessage({command:"disconnect_other_room",responseCommand:String(8211),data:{roomId:e,localRoomId:this.core.room.roomId},retries:3});if(t.data.code!==0)throw new r({code:o.SERVER_ERROR,extraCode:t.data.code,message:t.data.message});this.connectedRoomIdSet.delete(e)}destroy(){}};b(S,"Name","CrossRoom"),I([D({settings:{retries:3,timeout:1e3},onRetrying(i){this._log.warn(`retry start: ${i}`)}})],S.prototype,"start",1),I([D({settings:{retries:3,timeout:1e3},onRetrying(i){this._log.warn(`retry update: ${i}`)}})],S.prototype,"update",1);var C=S;var ne=C;export{C as CrossRoom,ne as default};
@@ -1 +1 @@
1
- "use strict";var CrossRoom=(()=>{var y=Object.defineProperty,H=Object.defineProperties,P=Object.getOwnPropertyDescriptor,F=Object.getOwnPropertyDescriptors,K=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var I=(o,e,r)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,E=(o,e)=>{for(var r in e||(e={}))L.call(e,r)&&I(o,r,e[r]);if(N)for(var r of N(e))j.call(e,r)&&I(o,r,e[r]);return o},_=(o,e)=>H(o,F(e));var W=(o,e)=>{for(var r in e)y(o,r,{get:e[r],enumerable:!0})},q=(o,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of K(e))!L.call(o,t)&&t!==r&&y(o,t,{get:()=>e[t],enumerable:!(a=P(e,t))||a.enumerable});return o};var X=o=>q(y({},"__esModule",{value:!0}),o),D=(o,e,r,a)=>{for(var t=a>1?void 0:a?P(e,r):e,i=o.length-1,n;i>=0;i--)(n=o[i])&&(t=(a?n(e,r,t):n(t))||t);return a&&t&&y(e,r,t),t};var b=(o,e,r)=>(I(o,typeof e!="symbol"?e+"":e,r),r);var Z={};W(Z,{CrossRoom:()=>O,default:()=>Y});var k={properties:{roomId:{type:"number"},strRoomId:{type:"string"}}},C={name:"option",required:!0,properties:_(E({},k.properties),{userId:{type:"string"}})},V={name:"option",required:!0,properties:{updateList:{type:"array",required:!0,arrayItem:{required:!0,type:"object",properties:_(E({},C.properties),{userId:{required:!1,type:"string"},muteAudio:{type:"boolean"},muteVideo:{type:"boolean"},muteSubStream:{type:"boolean"}})}}}},B={name:"option",properties:E({},k.properties)};var p=o=>typeof o=="function";var J=0,$=1,w=2;function z({retryFunction:o,settings:e,onError:r,onRetrying:a,onRetryFailed:t,onRetrySuccess:i,context:n}){return function(...d){let{retries:m=5,timeout:u=1e3}=e,s=0,l=-1,c=J,R=async(U,A)=>{let M=n||this;try{let g=await o.apply(M,d);s>0&&i&&i.call(this,s),s=0,U(g)}catch(g){let h=()=>{clearTimeout(l),s=0,c=w,A(g)},x=()=>{c!==w&&s<(p(m)?m():m)?(s++,c=$,p(a)&&a.call(this,s,h),l=window.setTimeout(()=>{l=-1,R(U,A)},p(u)?u(s):u)):(h(),p(t)&&t.call(this,g))};p(r)?r.call(this,{error:g,retry:x,reject:A,retryFuncArgs:d,retriedCount:s}):x()}};return new Promise(R)}}var G=z;var T=new WeakMap;function f({settings:o={retries:5,timeout:2e3},onError:e,onRetrying:r,onRetryFailed:a}){return function(t,i,n){let d=G({retryFunction:n.value,settings:o,onError({error:m,retry:u,reject:s,retryFuncArgs:l}){var c;e?e.call(this,m,()=>{var R;(R=T.get(t))!=null&&R.has(i)?u():s(m)},s,l):(c=T.get(t))!=null&&c.has(i)?u():s(m)},onRetrying(m,u){var s;p(r)&&r.call(this,m,u),(s=T.get(t))!=null&&s.has(i)&&(T.get(t).get(i).stopRetry=u)},onRetryFailed:a});return n.value=function(...m){let u=T.get(t);return u?u.set(i,{args:m}):T.set(t,new Map([[i,{args:m}]])),d.apply(this,m).finally(()=>{var s;return(s=T.get(t))==null?void 0:s.delete(i)})},n}}var S=class S{constructor(e){this.core=e;b(this,"disableRandomCall",!0);b(this,"connectedRoomIdSet",new Set);b(this,"updateSeq",0);b(this,"_log");this._log=this.core.log.createChild({id:`${this.getAlias()}`})}getName(){return S.Name}getAlias(){return"crs-r"}getGroup(e){var a;let r=(e==null?void 0:e.userId)||((a=e==null?void 0:e.updateList)==null?void 0:a[0].userId)||"";return r||(e?e.updateList?String(e.updateList[0].roomId)||e.updateList[0].strRoomId||"":String(e.roomId)||e.strRoomId||"":"*")}getValidateRule(e){switch(e){case"start":return C;case"update":return V;case"stop":return B}}async start({roomId:e,strRoomId:r,userId:a}){let{RtcError:t,ErrorCode:i}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new t({code:i.ENV_NOT_SUPPORTED});let n=e||r,d=await this.core.room.sendSignalMessage({command:"connect_other_room",responseCommand:String(8209),data:{roomId:n,userId:a,localRoomId:a?void 0:this.core.room.roomId},retries:3});if(d.data.code!==0)throw new t({code:i.SERVER_ERROR,extraCode:d.data.code,message:d.data.message});a||this.connectedRoomIdSet.add(n)}async update({updateList:e}){var n;let{RtcError:r,ErrorCode:a}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:a.ENV_NOT_SUPPORTED});let t=e.find(d=>d.userId)?0:1,i=await this.core.room.sendSignalMessage({command:"update_other_room_forward_mode",responseCommand:String(8213),data:{seq:++this.updateSeq,operationType:t,updateList:e.map(({roomId:d,strRoomId:m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c})=>({roomId:d||m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c}))},retries:3});if(i.data.data.expectSeq)return this.updateSeq=i.data.data.expectSeq,this.update({updateList:e});if(i.data.code!==0)throw new r({code:a.SERVER_ERROR,extraCode:i.data.code,message:i.data.message});if(((n=i.data.data.errorList)==null?void 0:n.length)>0)throw new r({code:a.UNKNOWN_ERROR,message:i.data.data.errorList[0].message})}async stop({roomId:e,strRoomId:r}={}){let a=e||r;if(a)await this.doStop(a);else if(this.connectedRoomIdSet.size>0)for(let t of[...this.connectedRoomIdSet.values()])await this.doStop(t);else await this.doStop()}async doStop(e){let{RtcError:r,ErrorCode:a}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:a.ENV_NOT_SUPPORTED});let t=await this.core.room.sendSignalMessage({command:"disconnect_other_room",responseCommand:String(8211),data:{roomId:e,localRoomId:this.core.room.roomId},retries:3});if(t.data.code!==0)throw new r({code:a.SERVER_ERROR,extraCode:t.data.code,message:t.data.message});this.connectedRoomIdSet.delete(e)}destroy(){}};b(S,"Name","CrossRoom"),D([f({settings:{retries:3,timeout:1e3},onRetrying(o){this._log.warn(`retry start: ${o}`)}})],S.prototype,"start",1),D([f({settings:{retries:3,timeout:1e3},onRetrying(o){this._log.warn(`retry update: ${o}`)}})],S.prototype,"update",1);var O=S;var Y=O;return X(Z);})().default;
1
+ "use strict";var CrossRoom=(()=>{var y=Object.defineProperty,H=Object.defineProperties,P=Object.getOwnPropertyDescriptor,K=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var I=(o,e,r)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,E=(o,e)=>{for(var r in e||(e={}))L.call(e,r)&&I(o,r,e[r]);if(N)for(var r of N(e))j.call(e,r)&&I(o,r,e[r]);return o},_=(o,e)=>H(o,K(e));var W=(o,e)=>{for(var r in e)y(o,r,{get:e[r],enumerable:!0})},q=(o,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of F(e))!L.call(o,t)&&t!==r&&y(o,t,{get:()=>e[t],enumerable:!(a=P(e,t))||a.enumerable});return o};var X=o=>q(y({},"__esModule",{value:!0}),o),D=(o,e,r,a)=>{for(var t=a>1?void 0:a?P(e,r):e,i=o.length-1,n;i>=0;i--)(n=o[i])&&(t=(a?n(e,r,t):n(t))||t);return a&&t&&y(e,r,t),t};var b=(o,e,r)=>(I(o,typeof e!="symbol"?e+"":e,r),r);var Z={};W(Z,{CrossRoom:()=>O,default:()=>Y});var k={properties:{roomId:{type:"number"},strRoomId:{type:"string"}}},C={name:"option",required:!0,properties:_(E({},k.properties),{userId:{type:"string"}})},V={name:"option",required:!0,properties:{updateList:{type:"array",required:!0,arrayItem:{required:!0,type:"object",properties:_(E({},C.properties),{userId:{required:!1,type:"string"},muteAudio:{type:"boolean"},muteVideo:{type:"boolean"},muteSubStream:{type:"boolean"}})}}}},B={name:"option",properties:E({},k.properties)};var p=o=>typeof o=="function";var J=0,$=1,w=2;function z({retryFunction:o,settings:e,onError:r,onRetrying:a,onRetryFailed:t,onRetrySuccess:i,context:n}){return function(...d){let{retries:m=5,timeout:u=1e3}=e,s=0,l=-1,c=J,R=async(U,A)=>{let M=n||this;try{let g=await o.apply(M,d);s>0&&i&&i.call(this,s),s=0,U(g)}catch(g){let h=()=>{clearTimeout(l),s=0,c=w,A(g)},x=()=>{c!==w&&s<(p(m)?m():m)?(s++,c=$,p(a)&&a.call(this,s,h),l=window.setTimeout(()=>{l=-1,R(U,A)},p(u)?u(s):u)):(h(),p(t)&&t.call(this,g))};p(r)?r.call(this,{error:g,retry:x,reject:A,retryFuncArgs:d,retriedCount:s}):x()}};return new Promise(R)}}var G=z;var T=new WeakMap;function f({settings:o={retries:5,timeout:2e3},onError:e,onRetrying:r,onRetryFailed:a}){return function(t,i,n){let d=G({retryFunction:n.value,settings:o,onError({error:m,retry:u,reject:s,retryFuncArgs:l}){var c;e?e.call(this,m,()=>{var R;(R=T.get(t))!=null&&R.has(i)?u():s(m)},s,l):(c=T.get(t))!=null&&c.has(i)?u():s(m)},onRetrying(m,u){var s;p(r)&&r.call(this,m,u),(s=T.get(t))!=null&&s.has(i)&&(T.get(t).get(i).stopRetry=u)},onRetryFailed:a});return n.value=function(...m){let u=T.get(t);return u?u.set(i,{args:m}):T.set(t,new Map([[i,{args:m}]])),d.apply(this,m).finally(()=>{var s;return(s=T.get(t))==null?void 0:s.delete(i)})},n}}var S=class S{constructor(e){this.core=e;b(this,"disableRandomCall",!0);b(this,"connectedRoomIdSet",new Set);b(this,"updateSeq",0);b(this,"_log");this._log=this.core.log.createChild({id:`${this.getAlias()}`})}getName(){return S.Name}getAlias(){return"crs-r"}getGroup(e){var a;let r=(e==null?void 0:e.userId)||((a=e==null?void 0:e.updateList)==null?void 0:a[0].userId)||"";return r||(e?e.updateList?String(e.updateList[0].roomId)||e.updateList[0].strRoomId||"":String(e.roomId)||e.strRoomId||"":"*")}getValidateRule(e){switch(e){case"start":return C;case"update":return V;case"stop":return B}}async start({roomId:e,strRoomId:r,userId:a}){let{RtcError:t,ErrorCode:i}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new t({code:i.ENV_NOT_SUPPORTED});let n=e||r,d=await this.core.room.sendSignalMessage({command:"connect_other_room",responseCommand:String(8209),data:{roomId:n,userId:a,localRoomId:a?void 0:this.core.room.roomId},retries:3});if(d.data.code!==0)throw new t({code:i.SERVER_ERROR,extraCode:d.data.code,message:d.data.message});a||this.connectedRoomIdSet.add(n)}async update({updateList:e}){var n;let{RtcError:r,ErrorCode:a}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:a.ENV_NOT_SUPPORTED});let t=e.find(d=>d.userId)?0:1,i=await this.core.room.sendSignalMessage({command:"update_other_room_forward_mode",responseCommand:String(8213),data:{seq:++this.updateSeq,operationType:t,updateList:e.map(({roomId:d,strRoomId:m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c})=>({roomId:d||m,userId:u,muteAudio:s,muteVideo:l,muteSubStream:c}))},retries:3});if(i.data.data.expectSeq)return this.updateSeq=i.data.data.expectSeq,this.update({updateList:e});if(i.data.code!==0)throw new r({code:a.SERVER_ERROR,extraCode:i.data.code,message:i.data.message});if(((n=i.data.data.errorList)==null?void 0:n.length)>0)throw new r({code:a.UNKNOWN_ERROR,message:i.data.data.errorList[0].message})}async stop({roomId:e,strRoomId:r}={}){let a=e||r;if(a)await this.doStop(a);else if(this.connectedRoomIdSet.size>0)for(let t of[...this.connectedRoomIdSet.values()])await this.doStop(t);else await this.doStop()}async doStop(e){let{RtcError:r,ErrorCode:a}=this.core.errorModule;if(!this.core.room.sendSignalMessage)throw new r({code:a.ENV_NOT_SUPPORTED});let t=await this.core.room.sendSignalMessage({command:"disconnect_other_room",responseCommand:String(8211),data:{roomId:e,localRoomId:this.core.room.roomId},retries:3});if(t.data.code!==0)throw new r({code:a.SERVER_ERROR,extraCode:t.data.code,message:t.data.message});this.connectedRoomIdSet.delete(e)}destroy(){}};b(S,"Name","CrossRoom"),D([f({settings:{retries:3,timeout:1e3},onRetrying(o){this._log.warn(`retry start: ${o}`)}})],S.prototype,"start",1),D([f({settings:{retries:3,timeout:1e3},onRetrying(o){this._log.warn(`retry update: ${o}`)}})],S.prototype,"update",1);var O=S;var Y=O;return X(Z);})().default;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/cross-room",
3
- "version": "5.8.3-beta.1",
3
+ "version": "5.8.3-beta.2",
4
4
  "description": "TRTC Web SDK 5.x Cross Room plugin",
5
5
  "main": "./cross-room.esm.js",
6
6
  "author": "rychouwei <rychouwei@tencent.com>",
@@ -6,10 +6,10 @@ var Lr=Object.defineProperty;var Bo=Object.getOwnPropertyDescriptor;var $o=(e,t,
6
6
  1. \u4E1A\u52A1\u4FA7\u4F20\u5165\u7528\u4E8E\u64AD\u653E\u97F3\u89C6\u9891\u7684 div \u6807\u7B7E\u5BB9\u5668\u88AB\u4E1A\u52A1\u4FA7\u4ECE DOM \u79FB\u9664\u3002
7
7
  2. \u7528\u6237\u5728 Chrome 70 \u53CA\u4EE5\u4E0B\u7248\u672C\uFF0C\u5F53\u79FB\u52A8 div \u5BB9\u5668\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u64AD\u653E\u6682\u505C\u3002`,tips_en:`The remote stream video playback is paused, which usually has two possibilities:
8
8
  1. The business side passes in the div tag container for playing audio and video to be removed by the business side from the DOM.
9
- 2. If the user is in Chrome 70 and below, when the div container is moved, the playback will be paused.`,color:"orange",class:"orange",textColor:"#fff"},'"displaySurface":"window"':{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u4E86\u5E94\u7528\u7A97\u53E3",tips_en:"Screen sharing captures the application window",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"monitor"':{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u4E86\u6574\u4E2A\u5C4F\u5E55",tips_en:"Screen sharing captures the entire screen",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"browser"':{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u4E86\u67D0\u4E2A\u6807\u7B7E\u9875",tips_en:"Screen sharing captures a certain tab page",color:"blue",class:"blue",textColor:"#fff"},updateMediaSettings:{tips_zh:"\u8BE5\u65E5\u5FD7\u4E0B\u7684\u5206\u8FA8\u7387\u3001\u5E27\u7387\u4E3A\u5B9E\u9645\u91C7\u96C6\u51FA\u7684\u5206\u8FA8\u7387\u53CA\u5E27\u7387",tips_en:"The resolution and frame rate below are the actual resolution and frame rate captured",color:"blue",class:"blue",textColor:"#fff"},"main stream start to play with":{tips_zh:"\u8C03\u7528 remoteStream.play \u63A5\u53E3",tips_en:"Call remoteStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"stream start to play with":{tips_zh:"\u8C03\u7528 localStream.play \u63A5\u53E3",tips_en:"Call localStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"main setAudioVolume to 0":{tips_zh:"\u4E1A\u52A1\u4FA7\u8C03\u7528 remoteStream.setAudioVolume(0) \u63A5\u53E3\uFF0C\u5C06\u64AD\u653E\u97F3\u91CF\u8BBE\u7F6E\u4E3A 0\uFF0C\u4F1A\u5BFC\u81F4\u64AD\u653E\u65E0\u58F0",tips_en:"Business side calls remoteStream.setAudioVolume(0) interface to set the playback volume to 0, which will cause the playback to be silent",color:"orange",class:"orange",textColor:"#fff"},"screen sharing was stopped because the video track is ended":{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u505C\u6B62\uFF0C\u53EF\u80FD\u539F\u56E0\uFF1A\u7528\u6237\u70B9\u51FB\u505C\u6B62\u91C7\u96C6\u6309\u94AE\u3001\u5206\u4EAB\u7684\u7A97\u53E3/\u9875\u9762\u88AB\u5173\u95ED\u7B49\u3002",tips_en:"Screen sharing capture stopped, possible reasons: user clicks the stop button, the window/page shared by the user is closed, etc.",color:"orange",class:"orange",textColor:"#fff"},"Join() => joining room":{tips_zh:"\u8C03\u7528 client.join \u63A5\u53E3",tips_en:"Call client.join interface",color:"blue",class:"blue",textColor:"#fff"},"publish() => publishing local stream":{tips_zh:"\u8C03\u7528 client.publish \u63A5\u53E3",tips_en:"Call client.publish interface",color:"blue",class:"blue",textColor:"#fff"},"subscribe() => subscribe to":{tips_zh:"\u8C03\u7528 client.subscribe \u63A5\u53E3",tips_en:"Call client.subscribe interface",color:"blue",class:"blue",textColor:"#fff"},"switchRole() => switch role":{tips_zh:"\u8C03\u7528 client.switchRole \u63A5\u53E3",tips_en:"Call client.switchRole interface",color:"blue",class:"blue",textColor:"#fff"}};["enterRoom","exitRoom","switchRole","destroy","startLocalAudio","updateLocalAudio","stopLocalAudio","startLocalVideo","updateLocalVideo","stopLocalVideo","startScreenShare","updateScreenShare","stopScreenShare","startRemoteVideo","updateRemoteVideo","stopRemoteVideo","muteRemoteAudio","setRemoteAudioVolume"].forEach(e=>{te[`${e}()`]={tips_zh:`\u8C03\u7528 trtc.${e}`,tips_en:`Call trtc.${e}`,color:"blue",class:"blue",textColor:"#fff"}});var Nr=Object.keys(te);function Mr(e){return function(t,r,o){return o.value=e(o.value,r),o}}var kt=new WeakMap;function Zt(e,t){return Mr((r,o)=>function(...i){var c,l;let a=(c=kt.get(this))==null?void 0:c.get(t(...i));a&&a>0&&clearTimeout(a);let s=window.setTimeout(()=>{r.apply(this,i)},e);kt.has(this)?(l=kt.get(this))==null||l.set(t(...i),s):kt.set(this,new Map([[t(...i),s]]))})}var M="top",W="bottom",$="right",B="left",Pt="auto",De=[M,W,$,B],ye="start",Pe="end",Br="clippingParents",It="viewport",Xe="popper",$r="reference",er=De.reduce(function(e,t){return e.concat([t+"-"+ye,t+"-"+Pe])},[]),Ut=[].concat(De,[Pt]).reduce(function(e,t){return e.concat([t,t+"-"+ye,t+"-"+Pe])},[]),Wo="beforeRead",Vo="read",zo="afterRead",jo="beforeMain",qo="main",Go="afterMain",Ko="beforeWrite",Fo="write",Xo="afterWrite",Hr=[Wo,Vo,zo,jo,qo,Go,Ko,Fo,Xo];function j(e){return e?(e.nodeName||"").toLowerCase():null}function k(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function oe(e){var t=k(e).Element;return e instanceof t||e instanceof Element}function V(e){var t=k(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ye(e){if(typeof ShadowRoot=="undefined")return!1;var t=k(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Yo(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!V(a)||!j(a)||(Object.assign(a.style,o),Object.keys(i).forEach(function(s){var c=i[s];c===!1?a.removeAttribute(s):a.setAttribute(s,c===!0?"":c)}))})}function Jo(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var i=t.elements[o],a=t.attributes[o]||{},s=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),c=s.reduce(function(l,d){return l[d]="",l},{});!V(i)||!j(i)||(Object.assign(i.style,c),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}var st={name:"applyStyles",enabled:!0,phase:"write",fn:Yo,effect:Jo,requires:["computeStyles"]};function q(e){return e.split("-")[0]}var se=Math.max,Ie=Math.min,_e=Math.round;function Je(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function lt(){return!/^((?!chrome|android).)*safari/i.test(Je())}function ie(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),i=1,a=1;t&&V(e)&&(i=e.offsetWidth>0&&_e(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&_e(o.height)/e.offsetHeight||1);var s=oe(e)?k(e):window,c=s.visualViewport,l=!lt()&&r,d=(o.left+(l&&c?c.offsetLeft:0))/i,p=(o.top+(l&&c?c.offsetTop:0))/a,S=o.width/i,g=o.height/a;return{width:S,height:g,top:p,right:d+S,bottom:p+g,left:d,x:d,y:p}}function Ue(e){var t=ie(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function ct(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Ye(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Q(e){return k(e).getComputedStyle(e)}function tr(e){return["table","td","th"].indexOf(j(e))>=0}function K(e){return((oe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Te(e){return j(e)==="html"?e:e.assignedSlot||e.parentNode||(Ye(e)?e.host:null)||K(e)}function Wr(e){return!V(e)||Q(e).position==="fixed"?null:e.offsetParent}function Qo(e){var t=/firefox/i.test(Je()),r=/Trident/i.test(Je());if(r&&V(e)){var o=Q(e);if(o.position==="fixed")return null}var i=Te(e);for(Ye(i)&&(i=i.host);V(i)&&["html","body"].indexOf(j(i))<0;){var a=Q(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function le(e){for(var t=k(e),r=Wr(e);r&&tr(r)&&Q(r).position==="static";)r=Wr(r);return r&&(j(r)==="html"||j(r)==="body"&&Q(r).position==="static")?t:r||Qo(e)||t}function Ne(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Me(e,t,r){return se(e,Ie(t,r))}function Vr(e,t,r){var o=Me(e,t,r);return o>r?r:o}function ut(){return{top:0,right:0,bottom:0,left:0}}function pt(e){return Object.assign({},ut(),e)}function dt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Zo=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,pt(typeof t!="number"?t:dt(t,De))};function ei(e){var t,r=e.state,o=e.name,i=e.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,c=q(r.placement),l=Ne(c),d=[B,$].indexOf(c)>=0,p=d?"height":"width";if(!(!a||!s)){var S=Zo(i.padding,r),g=Ue(a),m=l==="y"?M:B,b=l==="y"?W:$,y=r.rects.reference[p]+r.rects.reference[l]-s[l]-r.rects.popper[p],T=s[l]-r.rects.reference[l],D=le(a),E=D?l==="y"?D.clientHeight||0:D.clientWidth||0:0,L=y/2-T/2,n=S[m],x=E-g[p]-S[b],f=E/2-g[p]/2+L,v=Me(n,f,x),A=l;r.modifiersData[o]=(t={},t[A]=v,t.centerOffset=v-f,t)}}function ti(e){var t=e.state,r=e.options,o=r.element,i=o===void 0?"[data-popper-arrow]":o;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||ct(t.elements.popper,i)&&(t.elements.arrow=i))}var zr={name:"arrow",enabled:!0,phase:"main",fn:ei,effect:ti,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ae(e){return e.split("-")[1]}var ri={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oi(e,t){var r=e.x,o=e.y,i=t.devicePixelRatio||1;return{x:_e(r*i)/i||0,y:_e(o*i)/i||0}}function jr(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,c=e.position,l=e.gpuAcceleration,d=e.adaptive,p=e.roundOffsets,S=e.isFixed,g=s.x,m=g===void 0?0:g,b=s.y,y=b===void 0?0:b,T=typeof p=="function"?p({x:m,y}):{x:m,y};m=T.x,y=T.y;var D=s.hasOwnProperty("x"),E=s.hasOwnProperty("y"),L=B,n=M,x=window;if(d){var f=le(r),v="clientHeight",A="clientWidth";if(f===k(r)&&(f=K(r),Q(f).position!=="static"&&c==="absolute"&&(v="scrollHeight",A="scrollWidth")),f=f,i===M||(i===B||i===$)&&a===Pe){n=W;var R=S&&f===x&&x.visualViewport?x.visualViewport.height:f[v];y-=R-o.height,y*=l?1:-1}if(i===B||(i===M||i===W)&&a===Pe){L=$;var U=S&&f===x&&x.visualViewport?x.visualViewport.width:f[A];m-=U-o.width,m*=l?1:-1}}var H=Object.assign({position:c},d&&ri),N=p===!0?oi({x:m,y},k(r)):{x:m,y};if(m=N.x,y=N.y,l){var I;return Object.assign({},H,(I={},I[n]=E?"0":"",I[L]=D?"0":"",I.transform=(x.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",I))}return Object.assign({},H,(t={},t[n]=E?y+"px":"",t[L]=D?m+"px":"",t.transform="",t))}function ii(e){var t=e.state,r=e.options,o=r.gpuAcceleration,i=o===void 0?!0:o,a=r.adaptive,s=a===void 0?!0:a,c=r.roundOffsets,l=c===void 0?!0:c,d={placement:q(t.placement),variation:ae(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,jr(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,jr(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var qr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ii,data:{}};var Nt={passive:!0};function ai(e){var t=e.state,r=e.instance,o=e.options,i=o.scroll,a=i===void 0?!0:i,s=o.resize,c=s===void 0?!0:s,l=k(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&d.forEach(function(p){p.addEventListener("scroll",r.update,Nt)}),c&&l.addEventListener("resize",r.update,Nt),function(){a&&d.forEach(function(p){p.removeEventListener("scroll",r.update,Nt)}),c&&l.removeEventListener("resize",r.update,Nt)}}var Gr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ai,data:{}};var ni={left:"right",right:"left",bottom:"top",top:"bottom"};function Qe(e){return e.replace(/left|right|bottom|top/g,function(t){return ni[t]})}var si={start:"end",end:"start"};function Mt(e){return e.replace(/start|end/g,function(t){return si[t]})}function Be(e){var t=k(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function $e(e){return ie(K(e)).left+Be(e).scrollLeft}function rr(e,t){var r=k(e),o=K(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){a=i.width,s=i.height;var d=lt();(d||!d&&t==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:a,height:s,x:c+$e(e),y:l}}function or(e){var t,r=K(e),o=Be(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=se(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=se(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-o.scrollLeft+$e(e),l=-o.scrollTop;return Q(i||r).direction==="rtl"&&(c+=se(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:c,y:l}}function He(e){var t=Q(e),r=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+o)}function Bt(e){return["html","body","#document"].indexOf(j(e))>=0?e.ownerDocument.body:V(e)&&He(e)?e:Bt(Te(e))}function Ee(e,t){var r;t===void 0&&(t=[]);var o=Bt(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=k(o),s=i?[a].concat(a.visualViewport||[],He(o)?o:[]):o,c=t.concat(s);return i?c:c.concat(Ee(Te(s)))}function Ze(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function li(e,t){var r=ie(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Kr(e,t,r){return t===It?Ze(rr(e,r)):oe(t)?li(t,r):Ze(or(K(e)))}function ci(e){var t=Ee(Te(e)),r=["absolute","fixed"].indexOf(Q(e).position)>=0,o=r&&V(e)?le(e):e;return oe(o)?t.filter(function(i){return oe(i)&&ct(i,o)&&j(i)!=="body"}):[]}function ir(e,t,r,o){var i=t==="clippingParents"?ci(e):[].concat(t),a=[].concat(i,[r]),s=a[0],c=a.reduce(function(l,d){var p=Kr(e,d,o);return l.top=se(p.top,l.top),l.right=Ie(p.right,l.right),l.bottom=Ie(p.bottom,l.bottom),l.left=se(p.left,l.left),l},Kr(e,s,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function ft(e){var t=e.reference,r=e.element,o=e.placement,i=o?q(o):null,a=o?ae(o):null,s=t.x+t.width/2-r.width/2,c=t.y+t.height/2-r.height/2,l;switch(i){case M:l={x:s,y:t.y-r.height};break;case W:l={x:s,y:t.y+t.height};break;case $:l={x:t.x+t.width,y:c};break;case B:l={x:t.x-r.width,y:c};break;default:l={x:t.x,y:t.y}}var d=i?Ne(i):null;if(d!=null){var p=d==="y"?"height":"width";switch(a){case ye:l[d]=l[d]-(t[p]/2-r[p]/2);break;case Pe:l[d]=l[d]+(t[p]/2-r[p]/2);break;default:}}return l}function ce(e,t){t===void 0&&(t={});var r=t,o=r.placement,i=o===void 0?e.placement:o,a=r.strategy,s=a===void 0?e.strategy:a,c=r.boundary,l=c===void 0?Br:c,d=r.rootBoundary,p=d===void 0?It:d,S=r.elementContext,g=S===void 0?Xe:S,m=r.altBoundary,b=m===void 0?!1:m,y=r.padding,T=y===void 0?0:y,D=pt(typeof T!="number"?T:dt(T,De)),E=g===Xe?$r:Xe,L=e.rects.popper,n=e.elements[b?E:g],x=ir(oe(n)?n:n.contextElement||K(e.elements.popper),l,p,s),f=ie(e.elements.reference),v=ft({reference:f,element:L,strategy:"absolute",placement:i}),A=Ze(Object.assign({},L,v)),R=g===Xe?A:f,U={top:x.top-R.top+D.top,bottom:R.bottom-x.bottom+D.bottom,left:x.left-R.left+D.left,right:R.right-x.right+D.right},H=e.modifiersData.offset;if(g===Xe&&H){var N=H[i];Object.keys(U).forEach(function(I){var Z=[$,W].indexOf(I)>=0?1:-1,ee=[M,W].indexOf(I)>=0?"y":"x";U[I]+=N[ee]*Z})}return U}function ar(e,t){t===void 0&&(t={});var r=t,o=r.placement,i=r.boundary,a=r.rootBoundary,s=r.padding,c=r.flipVariations,l=r.allowedAutoPlacements,d=l===void 0?Ut:l,p=ae(o),S=p?c?er:er.filter(function(b){return ae(b)===p}):De,g=S.filter(function(b){return d.indexOf(b)>=0});g.length===0&&(g=S);var m=g.reduce(function(b,y){return b[y]=ce(e,{placement:y,boundary:i,rootBoundary:a,padding:s})[q(y)],b},{});return Object.keys(m).sort(function(b,y){return m[b]-m[y]})}function ui(e){if(q(e)===Pt)return[];var t=Qe(e);return[Mt(e),t,Mt(t)]}function pi(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,s=r.altAxis,c=s===void 0?!0:s,l=r.fallbackPlacements,d=r.padding,p=r.boundary,S=r.rootBoundary,g=r.altBoundary,m=r.flipVariations,b=m===void 0?!0:m,y=r.allowedAutoPlacements,T=t.options.placement,D=q(T),E=D===T,L=l||(E||!b?[Qe(T)]:ui(T)),n=[T].concat(L).reduce(function(he,ne){return he.concat(q(ne)===Pt?ar(t,{placement:ne,boundary:p,rootBoundary:S,padding:d,flipVariations:b,allowedAutoPlacements:y}):ne)},[]),x=t.rects.reference,f=t.rects.popper,v=new Map,A=!0,R=n[0],U=0;U<n.length;U++){var H=n[U],N=q(H),I=ae(H)===ye,Z=[M,W].indexOf(N)>=0,ee=Z?"width":"height",F=ce(t,{placement:H,boundary:p,rootBoundary:S,altBoundary:g,padding:d}),X=Z?I?$:B:I?W:M;x[ee]>f[ee]&&(X=Qe(X));var G=Qe(X),pe=[];if(a&&pe.push(F[N]<=0),c&&pe.push(F[X]<=0,F[G]<=0),pe.every(function(he){return he})){R=H,A=!1;break}v.set(H,pe)}if(A)for(var de=b?3:1,Ce=function(ne){var ge=n.find(function(je){var ve=v.get(je);if(ve)return ve.slice(0,ne).every(function(qe){return qe})});if(ge)return R=ge,"break"},fe=de;fe>0;fe--){var Le=Ce(fe);if(Le==="break")break}t.placement!==R&&(t.modifiersData[o]._skip=!0,t.placement=R,t.reset=!0)}}var Fr={name:"flip",enabled:!0,phase:"main",fn:pi,requiresIfExists:["offset"],data:{_skip:!1}};function Xr(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Yr(e){return[M,$,W,B].some(function(t){return e[t]>=0})}function di(e){var t=e.state,r=e.name,o=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,s=ce(t,{elementContext:"reference"}),c=ce(t,{altBoundary:!0}),l=Xr(s,o),d=Xr(c,i,a),p=Yr(l),S=Yr(d);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:S},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":S})}var Jr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:di};function fi(e,t,r){var o=q(e),i=[B,M].indexOf(o)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=a[0],c=a[1];return s=s||0,c=(c||0)*i,[B,$].indexOf(o)>=0?{x:c,y:s}:{x:s,y:c}}function mi(e){var t=e.state,r=e.options,o=e.name,i=r.offset,a=i===void 0?[0,0]:i,s=Ut.reduce(function(p,S){return p[S]=fi(S,t.rects,a),p},{}),c=s[t.placement],l=c.x,d=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[o]=s}var Qr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:mi};function hi(e){var t=e.state,r=e.name;t.modifiersData[r]=ft({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Zr={name:"popperOffsets",enabled:!0,phase:"read",fn:hi,data:{}};function nr(e){return e==="x"?"y":"x"}function gi(e){var t=e.state,r=e.options,o=e.name,i=r.mainAxis,a=i===void 0?!0:i,s=r.altAxis,c=s===void 0?!1:s,l=r.boundary,d=r.rootBoundary,p=r.altBoundary,S=r.padding,g=r.tether,m=g===void 0?!0:g,b=r.tetherOffset,y=b===void 0?0:b,T=ce(t,{boundary:l,rootBoundary:d,padding:S,altBoundary:p}),D=q(t.placement),E=ae(t.placement),L=!E,n=Ne(D),x=nr(n),f=t.modifiersData.popperOffsets,v=t.rects.reference,A=t.rects.popper,R=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,U=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(f){if(a){var I,Z=n==="y"?M:B,ee=n==="y"?W:$,F=n==="y"?"height":"width",X=f[n],G=X+T[Z],pe=X-T[ee],de=m?-A[F]/2:0,Ce=E===ye?v[F]:A[F],fe=E===ye?-A[F]:-v[F],Le=t.elements.arrow,he=m&&Le?Ue(Le):{width:0,height:0},ne=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ut(),ge=ne[Z],je=ne[ee],ve=Me(0,v[F],he[F]),qe=L?v[F]/2-de-ve-ge-U.mainAxis:Ce-ve-ge-U.mainAxis,Oe=L?-v[F]/2+de+ve+je+U.mainAxis:fe+ve+je+U.mainAxis,Ge=t.elements.arrow&&le(t.elements.arrow),Tt=Ge?n==="y"?Ge.clientTop||0:Ge.clientLeft||0:0,rt=(I=H==null?void 0:H[n])!=null?I:0,St=X+qe-rt-Tt,xt=X+Oe-rt,ot=Me(m?Ie(G,St):G,X,m?se(pe,xt):pe);f[n]=ot,N[n]=ot-X}if(c){var it,Ot=n==="x"?M:B,wt=n==="x"?W:$,be=f[x],we=x==="y"?"height":"width",at=be+T[Ot],Re=be-T[wt],nt=[M,B].indexOf(D)!==-1,Dt=(it=H==null?void 0:H[x])!=null?it:0,Et=nt?at:be-v[we]-A[we]-Dt+U.altAxis,At=nt?be+v[we]+A[we]-Dt-U.altAxis:Re,Ct=m&&nt?Vr(Et,be,At):Me(m?Et:at,be,m?At:Re);f[x]=Ct,N[x]=Ct-be}t.modifiersData[o]=N}}var eo={name:"preventOverflow",enabled:!0,phase:"main",fn:gi,requiresIfExists:["offset"]};function sr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lr(e){return e===k(e)||!V(e)?Be(e):sr(e)}function vi(e){var t=e.getBoundingClientRect(),r=_e(t.width)/e.offsetWidth||1,o=_e(t.height)/e.offsetHeight||1;return r!==1||o!==1}function cr(e,t,r){r===void 0&&(r=!1);var o=V(t),i=V(t)&&vi(t),a=K(t),s=ie(e,i,r),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!r)&&((j(t)!=="body"||He(a))&&(c=lr(t)),V(t)?(l=ie(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=$e(a))),{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function bi(e){var t=new Map,r=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(c){if(!r.has(c)){var l=t.get(c);l&&i(l)}}),o.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),o}function ur(e){var t=bi(e);return Hr.reduce(function(r,o){return r.concat(t.filter(function(i){return i.phase===o}))},[])}function pr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function dr(e){var t=e.reduce(function(r,o){var i=r[o.name];return r[o.name]=i?Object.assign({},i,o,{options:Object.assign({},i.options,o.options),data:Object.assign({},i.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var to={placement:"bottom",modifiers:[],strategy:"absolute"};function ro(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function oo(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,o=r===void 0?[]:r,i=t.defaultOptions,a=i===void 0?to:i;return function(c,l,d){d===void 0&&(d=a);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},to,a),modifiersData:{},elements:{reference:c,popper:l},attributes:{},styles:{}},S=[],g=!1,m={state:p,setOptions:function(D){var E=typeof D=="function"?D(p.options):D;y(),p.options=Object.assign({},a,p.options,E),p.scrollParents={reference:oe(c)?Ee(c):c.contextElement?Ee(c.contextElement):[],popper:Ee(l)};var L=ur(dr([].concat(o,p.options.modifiers)));return p.orderedModifiers=L.filter(function(n){return n.enabled}),b(),m.update()},forceUpdate:function(){if(!g){var D=p.elements,E=D.reference,L=D.popper;if(ro(E,L)){p.rects={reference:cr(E,le(L),p.options.strategy==="fixed"),popper:Ue(L)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(U){return p.modifiersData[U.name]=Object.assign({},U.data)});for(var n=0;n<p.orderedModifiers.length;n++){if(p.reset===!0){p.reset=!1,n=-1;continue}var x=p.orderedModifiers[n],f=x.fn,v=x.options,A=v===void 0?{}:v,R=x.name;typeof f=="function"&&(p=f({state:p,options:A,name:R,instance:m})||p)}}}},update:pr(function(){return new Promise(function(T){m.forceUpdate(),T(p)})}),destroy:function(){y(),g=!0}};if(!ro(c,l))return m;m.setOptions(d).then(function(T){!g&&d.onFirstUpdate&&d.onFirstUpdate(T)});function b(){p.orderedModifiers.forEach(function(T){var D=T.name,E=T.options,L=E===void 0?{}:E,n=T.effect;if(typeof n=="function"){var x=n({state:p,name:D,instance:m,options:L}),f=function(){};S.push(x||f)}})}function y(){S.forEach(function(T){return T()}),S=[]}return m}}var yi=[Gr,Zr,qr,st,Qr,Fr,eo,zr,Jr],fr=oo({defaultModifiers:yi});var _i="tippy-box",mo="tippy-content",Ti="tippy-backdrop",ho="tippy-arrow",go="tippy-svg-arrow",We={passive:!0,capture:!0},vo=function(){return document.body};function mr(e,t,r){if(Array.isArray(e)){var o=e[t];return o==null?Array.isArray(r)?r[t]:r:o}return e}function _r(e,t){var r={}.toString.call(e);return r.indexOf("[object")===0&&r.indexOf(t+"]")>-1}function bo(e,t){return typeof e=="function"?e.apply(void 0,t):e}function io(e,t){if(t===0)return e;var r;return function(o){clearTimeout(r),r=setTimeout(function(){e(o)},t)}}function Si(e){return e.split(/\s+/).filter(Boolean)}function et(e){return[].concat(e)}function ao(e,t){e.indexOf(t)===-1&&e.push(t)}function xi(e){return e.filter(function(t,r){return e.indexOf(t)===r})}function Oi(e){return e.split("-")[0]}function Ht(e){return[].slice.call(e)}function no(e){return Object.keys(e).reduce(function(t,r){return e[r]!==void 0&&(t[r]=e[r]),t},{})}function mt(){return document.createElement("div")}function Wt(e){return["Element","Fragment"].some(function(t){return _r(e,t)})}function wi(e){return _r(e,"NodeList")}function Di(e){return _r(e,"MouseEvent")}function Ei(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Ai(e){return Wt(e)?[e]:wi(e)?Ht(e):Array.isArray(e)?e:Ht(document.querySelectorAll(e))}function hr(e,t){e.forEach(function(r){r&&(r.style.transitionDuration=t+"ms")})}function so(e,t){e.forEach(function(r){r&&r.setAttribute("data-state",t)})}function Ci(e){var t,r=et(e),o=r[0];return o!=null&&(t=o.ownerDocument)!=null&&t.body?o.ownerDocument:document}function Li(e,t){var r=t.clientX,o=t.clientY;return e.every(function(i){var a=i.popperRect,s=i.popperState,c=i.props,l=c.interactiveBorder,d=Oi(s.placement),p=s.modifiersData.offset;if(!p)return!0;var S=d==="bottom"?p.top.y:0,g=d==="top"?p.bottom.y:0,m=d==="right"?p.left.x:0,b=d==="left"?p.right.x:0,y=a.top-o+S>l,T=o-a.bottom-g>l,D=a.left-r+m>l,E=r-a.right-b>l;return y||T||D||E})}function gr(e,t,r){var o=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[o](i,r)})}function lo(e,t){for(var r=t;r;){var o;if(e.contains(r))return!0;r=r.getRootNode==null||(o=r.getRootNode())==null?void 0:o.host}return!1}var me={isTouch:!1},co=0;function Ri(){me.isTouch||(me.isTouch=!0,window.performance&&document.addEventListener("mousemove",yo))}function yo(){var e=performance.now();e-co<20&&(me.isTouch=!1,document.removeEventListener("mousemove",yo)),co=e}function ki(){var e=document.activeElement;if(Ei(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Pi(){document.addEventListener("touchstart",Ri,We),window.addEventListener("blur",ki)}var Ii=typeof window!="undefined"&&typeof document!="undefined",Ui=Ii?!!window.msCrypto:!1;var Ni={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Mi={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ue=Object.assign({appendTo:vo,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ni,Mi),Bi=Object.keys(ue),$i=function(t){var r=Object.keys(t);r.forEach(function(o){ue[o]=t[o]})};function _o(e){var t=e.plugins||[],r=t.reduce(function(o,i){var a=i.name,s=i.defaultValue;if(a){var c;o[a]=e[a]!==void 0?e[a]:(c=ue[a])!=null?c:s}return o},{});return Object.assign({},e,r)}function Hi(e,t){var r=t?Object.keys(_o(Object.assign({},ue,{plugins:t}))):Bi,o=r.reduce(function(i,a){var s=(e.getAttribute("data-tippy-"+a)||"").trim();if(!s)return i;if(a==="content")i[a]=s;else try{i[a]=JSON.parse(s)}catch(c){i[a]=s}return i},{});return o}function uo(e,t){var r=Object.assign({},t,{content:bo(t.content,[e])},t.ignoreAttributes?{}:Hi(e,t.plugins));return r.aria=Object.assign({},ue.aria,r.aria),r.aria={expanded:r.aria.expanded==="auto"?t.interactive:r.aria.expanded,content:r.aria.content==="auto"?t.interactive?null:"describedby":r.aria.content},r}var Wi=function(){return"innerHTML"};function br(e,t){e[Wi()]=t}function po(e){var t=mt();return e===!0?t.className=ho:(t.className=go,Wt(e)?t.appendChild(e):br(t,e)),t}function fo(e,t){Wt(t.content)?(br(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?br(e,t.content):e.textContent=t.content)}function yr(e){var t=e.firstElementChild,r=Ht(t.children);return{box:t,content:r.find(function(o){return o.classList.contains(mo)}),arrow:r.find(function(o){return o.classList.contains(ho)||o.classList.contains(go)}),backdrop:r.find(function(o){return o.classList.contains(Ti)})}}function To(e){var t=mt(),r=mt();r.className=_i,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var o=mt();o.className=mo,o.setAttribute("data-state","hidden"),fo(o,e.props),t.appendChild(r),r.appendChild(o),i(e.props,e.props);function i(a,s){var c=yr(t),l=c.box,d=c.content,p=c.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(a.content!==s.content||a.allowHTML!==s.allowHTML)&&fo(d,e.props),s.arrow?p?a.arrow!==s.arrow&&(l.removeChild(p),l.appendChild(po(s.arrow))):l.appendChild(po(s.arrow)):p&&l.removeChild(p)}return{popper:t,onUpdate:i}}To.$$tippy=!0;var Vi=1,$t=[],vr=[];function zi(e,t){var r=uo(e,Object.assign({},ue,_o(no(t)))),o,i,a,s=!1,c=!1,l=!1,d=!1,p,S,g,m=[],b=io(St,r.interactiveDebounce),y,T=Vi++,D=null,E=xi(r.plugins),L={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},n={id:T,reference:e,popper:mt(),popperInstance:D,props:r,state:L,plugins:E,clearDelayTimeouts:Et,setProps:At,setContent:Ct,show:ko,hide:Po,hideWithInteractivity:Io,enable:nt,disable:Dt,unmount:Uo,destroy:No};if(!r.render)return n;var x=r.render(n),f=x.popper,v=x.onUpdate;f.setAttribute("data-tippy-root",""),f.id="tippy-"+n.id,n.popper=f,e._tippy=n,f._tippy=n;var A=E.map(function(u){return u.fn(n)}),R=e.hasAttribute("aria-expanded");return Ge(),de(),X(),G("onCreate",[n]),r.showOnCreate&&at(),f.addEventListener("mouseenter",function(){n.props.interactive&&n.state.isVisible&&n.clearDelayTimeouts()}),f.addEventListener("mouseleave",function(){n.props.interactive&&n.props.trigger.indexOf("mouseenter")>=0&&Z().addEventListener("mousemove",b)}),n;function U(){var u=n.props.touch;return Array.isArray(u)?u:[u,0]}function H(){return U()[0]==="hold"}function N(){var u;return!!((u=n.props.render)!=null&&u.$$tippy)}function I(){return y||e}function Z(){var u=I().parentNode;return u?Ci(u):document}function ee(){return yr(f)}function F(u){return n.state.isMounted&&!n.state.isVisible||me.isTouch||p&&p.type==="focus"?0:mr(n.props.delay,u?0:1,ue.delay)}function X(u){u===void 0&&(u=!1),f.style.pointerEvents=n.props.interactive&&!u?"":"none",f.style.zIndex=""+n.props.zIndex}function G(u,h,_){if(_===void 0&&(_=!0),A.forEach(function(O){O[u]&&O[u].apply(O,h)}),_){var C;(C=n.props)[u].apply(C,h)}}function pe(){var u=n.props.aria;if(u.content){var h="aria-"+u.content,_=f.id,C=et(n.props.triggerTarget||e);C.forEach(function(O){var J=O.getAttribute(h);if(n.state.isVisible)O.setAttribute(h,J?J+" "+_:_);else{var re=J&&J.replace(_,"").trim();re?O.setAttribute(h,re):O.removeAttribute(h)}})}}function de(){if(!(R||!n.props.aria.expanded)){var u=et(n.props.triggerTarget||e);u.forEach(function(h){n.props.interactive?h.setAttribute("aria-expanded",n.state.isVisible&&h===I()?"true":"false"):h.removeAttribute("aria-expanded")})}}function Ce(){Z().removeEventListener("mousemove",b),$t=$t.filter(function(u){return u!==b})}function fe(u){if(!(me.isTouch&&(l||u.type==="mousedown"))){var h=u.composedPath&&u.composedPath()[0]||u.target;if(!(n.props.interactive&&lo(f,h))){if(et(n.props.triggerTarget||e).some(function(_){return lo(_,h)})){if(me.isTouch||n.state.isVisible&&n.props.trigger.indexOf("click")>=0)return}else G("onClickOutside",[n,u]);n.props.hideOnClick===!0&&(n.clearDelayTimeouts(),n.hide(),c=!0,setTimeout(function(){c=!1}),n.state.isMounted||ge())}}}function Le(){l=!0}function he(){l=!1}function ne(){var u=Z();u.addEventListener("mousedown",fe,!0),u.addEventListener("touchend",fe,We),u.addEventListener("touchstart",he,We),u.addEventListener("touchmove",Le,We)}function ge(){var u=Z();u.removeEventListener("mousedown",fe,!0),u.removeEventListener("touchend",fe,We),u.removeEventListener("touchstart",he,We),u.removeEventListener("touchmove",Le,We)}function je(u,h){qe(u,function(){!n.state.isVisible&&f.parentNode&&f.parentNode.contains(f)&&h()})}function ve(u,h){qe(u,h)}function qe(u,h){var _=ee().box;function C(O){O.target===_&&(gr(_,"remove",C),h())}if(u===0)return h();gr(_,"remove",S),gr(_,"add",C),S=C}function Oe(u,h,_){_===void 0&&(_=!1);var C=et(n.props.triggerTarget||e);C.forEach(function(O){O.addEventListener(u,h,_),m.push({node:O,eventType:u,handler:h,options:_})})}function Ge(){H()&&(Oe("touchstart",rt,{passive:!0}),Oe("touchend",xt,{passive:!0})),Si(n.props.trigger).forEach(function(u){if(u!=="manual")switch(Oe(u,rt),u){case"mouseenter":Oe("mouseleave",xt);break;case"focus":Oe(Ui?"focusout":"blur",ot);break;case"focusin":Oe("focusout",ot);break}})}function Tt(){m.forEach(function(u){var h=u.node,_=u.eventType,C=u.handler,O=u.options;h.removeEventListener(_,C,O)}),m=[]}function rt(u){var h,_=!1;if(!(!n.state.isEnabled||it(u)||c)){var C=((h=p)==null?void 0:h.type)==="focus";p=u,y=u.currentTarget,de(),!n.state.isVisible&&Di(u)&&$t.forEach(function(O){return O(u)}),u.type==="click"&&(n.props.trigger.indexOf("mouseenter")<0||s)&&n.props.hideOnClick!==!1&&n.state.isVisible?_=!0:at(u),u.type==="click"&&(s=!_),_&&!C&&Re(u)}}function St(u){var h=u.target,_=I().contains(h)||f.contains(h);if(!(u.type==="mousemove"&&_)){var C=we().concat(f).map(function(O){var J,re=O._tippy,Ke=(J=re.popperInstance)==null?void 0:J.state;return Ke?{popperRect:O.getBoundingClientRect(),popperState:Ke,props:r}:null}).filter(Boolean);Li(C,u)&&(Ce(),Re(u))}}function xt(u){var h=it(u)||n.props.trigger.indexOf("click")>=0&&s;if(!h){if(n.props.interactive){n.hideWithInteractivity(u);return}Re(u)}}function ot(u){n.props.trigger.indexOf("focusin")<0&&u.target!==I()||n.props.interactive&&u.relatedTarget&&f.contains(u.relatedTarget)||Re(u)}function it(u){return me.isTouch?H()!==u.type.indexOf("touch")>=0:!1}function Ot(){wt();var u=n.props,h=u.popperOptions,_=u.placement,C=u.offset,O=u.getReferenceClientRect,J=u.moveTransition,re=N()?yr(f).arrow:null,Ke=O?{getBoundingClientRect:O,contextElement:O.contextElement||I()}:e,Cr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Lt){var Fe=Lt.state;if(N()){var Mo=ee(),Yt=Mo.box;["placement","reference-hidden","escaped"].forEach(function(Rt){Rt==="placement"?Yt.setAttribute("data-placement",Fe.placement):Fe.attributes.popper["data-popper-"+Rt]?Yt.setAttribute("data-"+Rt,""):Yt.removeAttribute("data-"+Rt)}),Fe.attributes.popper={}}}},ke=[{name:"offset",options:{offset:C}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!J}},Cr];N()&&re&&ke.push({name:"arrow",options:{element:re,padding:3}}),ke.push.apply(ke,(h==null?void 0:h.modifiers)||[]),n.popperInstance=fr(Ke,f,Object.assign({},h,{placement:_,onFirstUpdate:g,modifiers:ke}))}function wt(){n.popperInstance&&(n.popperInstance.destroy(),n.popperInstance=null)}function be(){var u=n.props.appendTo,h,_=I();n.props.interactive&&u===vo||u==="parent"?h=_.parentNode:h=bo(u,[_]),h.contains(f)||h.appendChild(f),n.state.isMounted=!0,Ot()}function we(){return Ht(f.querySelectorAll("[data-tippy-root]"))}function at(u){n.clearDelayTimeouts(),u&&G("onTrigger",[n,u]),ne();var h=F(!0),_=U(),C=_[0],O=_[1];me.isTouch&&C==="hold"&&O&&(h=O),h?o=setTimeout(function(){n.show()},h):n.show()}function Re(u){if(n.clearDelayTimeouts(),G("onUntrigger",[n,u]),!n.state.isVisible){ge();return}if(!(n.props.trigger.indexOf("mouseenter")>=0&&n.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(u.type)>=0&&s)){var h=F(!1);h?i=setTimeout(function(){n.state.isVisible&&n.hide()},h):a=requestAnimationFrame(function(){n.hide()})}}function nt(){n.state.isEnabled=!0}function Dt(){n.hide(),n.state.isEnabled=!1}function Et(){clearTimeout(o),clearTimeout(i),cancelAnimationFrame(a)}function At(u){if(!n.state.isDestroyed){G("onBeforeUpdate",[n,u]),Tt();var h=n.props,_=uo(e,Object.assign({},h,no(u),{ignoreAttributes:!0}));n.props=_,Ge(),h.interactiveDebounce!==_.interactiveDebounce&&(Ce(),b=io(St,_.interactiveDebounce)),h.triggerTarget&&!_.triggerTarget?et(h.triggerTarget).forEach(function(C){C.removeAttribute("aria-expanded")}):_.triggerTarget&&e.removeAttribute("aria-expanded"),de(),X(),v&&v(h,_),n.popperInstance&&(Ot(),we().forEach(function(C){requestAnimationFrame(C._tippy.popperInstance.forceUpdate)})),G("onAfterUpdate",[n,u])}}function Ct(u){n.setProps({content:u})}function ko(){var u=n.state.isVisible,h=n.state.isDestroyed,_=!n.state.isEnabled,C=me.isTouch&&!n.props.touch,O=mr(n.props.duration,0,ue.duration);if(!(u||h||_||C)&&!I().hasAttribute("disabled")&&(G("onShow",[n],!1),n.props.onShow(n)!==!1)){if(n.state.isVisible=!0,N()&&(f.style.visibility="visible"),X(),ne(),n.state.isMounted||(f.style.transition="none"),N()){var J=ee(),re=J.box,Ke=J.content;hr([re,Ke],0)}g=function(){var ke;if(!(!n.state.isVisible||d)){if(d=!0,f.offsetHeight,f.style.transition=n.props.moveTransition,N()&&n.props.animation){var Xt=ee(),Lt=Xt.box,Fe=Xt.content;hr([Lt,Fe],O),so([Lt,Fe],"visible")}pe(),de(),ao(vr,n),(ke=n.popperInstance)==null||ke.forceUpdate(),G("onMount",[n]),n.props.animation&&N()&&ve(O,function(){n.state.isShown=!0,G("onShown",[n])})}},be()}}function Po(){var u=!n.state.isVisible,h=n.state.isDestroyed,_=!n.state.isEnabled,C=mr(n.props.duration,1,ue.duration);if(!(u||h||_)&&(G("onHide",[n],!1),n.props.onHide(n)!==!1)){if(n.state.isVisible=!1,n.state.isShown=!1,d=!1,s=!1,N()&&(f.style.visibility="hidden"),Ce(),ge(),X(!0),N()){var O=ee(),J=O.box,re=O.content;n.props.animation&&(hr([J,re],C),so([J,re],"hidden"))}pe(),de(),n.props.animation?N()&&je(C,n.unmount):n.unmount()}}function Io(u){Z().addEventListener("mousemove",b),ao($t,b),b(u)}function Uo(){n.state.isVisible&&n.hide(),n.state.isMounted&&(wt(),we().forEach(function(u){u._tippy.unmount()}),f.parentNode&&f.parentNode.removeChild(f),vr=vr.filter(function(u){return u!==n}),n.state.isMounted=!1,G("onHidden",[n]))}function No(){n.state.isDestroyed||(n.clearDelayTimeouts(),n.unmount(),Tt(),delete e._tippy,n.state.isDestroyed=!0,G("onDestroy",[n]))}}function ht(e,t){t===void 0&&(t={});var r=ue.plugins.concat(t.plugins||[]);Pi();var o=Object.assign({},t,{plugins:r}),i=Ai(e);if(!1)var a,s;var c=i.reduce(function(l,d){var p=d&&zi(d,o);return p&&l.push(p),l},[]);return Wt(e)?c[0]:c}ht.defaultProps=ue;ht.setDefaultProps=$i;ht.currentInput=me;var Zl=Object.assign({},st,{effect:function(t){var r=t.state,o={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,o.popper),r.styles=o,r.elements.arrow&&Object.assign(r.elements.arrow.style,o.arrow)}});ht.setDefaultProps({render:To});var So=ht;var P="trtc_debug_dialog",Ae=`${P}_activated`,Vt=`${P}_switch`,Tr=`${P}_mask`,zt=`${P}_pannel`,Sr=`${P}_tabber`,jt=`${P}_tab`,xr=`${P}_topbar`,Ve=`${P}_toptab`,Se=`${P}_content`,qt=`${P}_has_topbar`,xo=`${Se}_log`,ze=`${Se}_network`,Gt=`${ze}_title`,Or=`${ze}_basic`,wr=`${ze}_local`,Dr=`${ze}_remote`,Kt=`${P}_banner`,Oo=`${Kt}_item`,wo=`${P}_toolbar`,gt=`${P}_tool`,xe=`${P}_item`,Do=`${xe}_debug`,Eo=`${xe}_info`,Ao=`${xe}_warn`,Co=`${xe}_error`,vt=`${P}_back_top`,bt=`${P}_go_bottom`,Lo="success",ji="failed",Er=!1,yt=class{constructor(t,r){w(this,"_dialogStyle",null);w(this,"_dialogNode",null);w(this,"_switchNode",null);w(this,"_maskNode",null);w(this,"_pannelNode",null);w(this,"_logContentNode",null);w(this,"_networkContentNode",null);w(this,"_tabNodes",[]);w(this,"_toptabNodes",[]);w(this,"_backTopButton",null);w(this,"_goBottomButton",null);w(this,"_hasMove",!1);w(this,"_showDialog",!1);w(this,"_isMobile",!1);w(this,"_showLogType","all");w(this,"prevBytesSent",0);w(this,"prevBytesReceived",0);w(this,"_core");w(this,"_log");w(this,"_logList",[]);w(this,"_networkQuality");w(this,"tippyCount",0);w(this,"isUploading",!1);w(this,"handleNetworkQuality",t=>{this._networkQuality=t});w(this,"handleHeartbeatReport",t=>{var m,b,y,T,D,E,L,n,x,f;let o={2:"big",3:"small",7:"sub"},i={rtt:t.msg_up_stream_info.msg_network_status.uint32_rtt||((m=t.msg_down_stream_info[0])==null?void 0:m.msg_network_status.uint32_rtt)||((b=this._networkQuality)==null?void 0:b.uplinkRTT)||((y=this._networkQuality)==null?void 0:y.downlinkRTT)||0,upLoss:((T=this._networkQuality)==null?void 0:T.uplinkLoss)||0,downLoss:((D=this._networkQuality)==null?void 0:D.downlinkLoss)||0,bytesSent:t.bytes_sent||0,bytesReceived:t.bytes_received||0,localStatistics:{audio:{bitrate:(((E=t.msg_up_stream_info.msg_audio_status)==null?void 0:E.uint32_audio_codec_bitrate)||0)/1e3,audioLevel:(((L=t.msg_up_stream_info.msg_audio_status)==null?void 0:L.uint32_audio_level)||0)/1e8},video:t.msg_up_stream_info.msg_video_status.filter(v=>o[v.uint32_video_stream_type]).map(v=>({bitrate:(v.uint32_video_codec_bitrate||0)/1e3,width:v.uint32_video_width,height:v.uint32_video_height,frameRate:v.uint32_video_enc_fps,videoType:o[v.uint32_video_stream_type]}))},remoteStatistics:t.msg_down_stream_info.map(v=>({userId:v.msg_user_info.str_identifier,audio:{bitrate:(v.msg_audio_status.uint32_audio_codec_bitrate||0)/1e3,audioLevel:(v.msg_audio_status.uint32_audio_level||0)/1e8},video:v.msg_video_status.map(A=>({bitrate:(A.uint32_video_codec_bitrate||0)/1e3,width:A.uint32_video_width,height:A.uint32_video_height,frameRate:A.uint32_video_dec_fps,videoType:o[A.uint32_video_stream_type]}))}))},a=(i.bytesSent-this.prevBytesSent)/2,s=(i.bytesReceived-this.prevBytesReceived)/2;this.prevBytesSent=i.bytesSent,this.prevBytesReceived=i.bytesReceived;let c=(n=this._dialogNode)==null?void 0:n.querySelector(`.${Or}`),l=`rtt: ${i.rtt} ms upLoss: ${i.upLoss} downLoss: ${i.downLoss} <br>
9
+ 2. If the user is in Chrome 70 and below, when the div container is moved, the playback will be paused.`,color:"orange",class:"orange",textColor:"#fff"},'"displaySurface":"window"':{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u4E86\u5E94\u7528\u7A97\u53E3",tips_en:"Screen sharing captures the application window",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"monitor"':{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u4E86\u6574\u4E2A\u5C4F\u5E55",tips_en:"Screen sharing captures the entire screen",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"browser"':{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u4E86\u67D0\u4E2A\u6807\u7B7E\u9875",tips_en:"Screen sharing captures a certain tab page",color:"blue",class:"blue",textColor:"#fff"},updateMediaSettings:{tips_zh:"\u8BE5\u65E5\u5FD7\u4E0B\u7684\u5206\u8FA8\u7387\u3001\u5E27\u7387\u4E3A\u5B9E\u9645\u91C7\u96C6\u51FA\u7684\u5206\u8FA8\u7387\u53CA\u5E27\u7387",tips_en:"The resolution and frame rate below are the actual resolution and frame rate captured",color:"blue",class:"blue",textColor:"#fff"},"main stream start to play with":{tips_zh:"\u8C03\u7528 remoteStream.play \u63A5\u53E3",tips_en:"Call remoteStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"stream start to play with":{tips_zh:"\u8C03\u7528 localStream.play \u63A5\u53E3",tips_en:"Call localStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"main setAudioVolume to 0":{tips_zh:"\u4E1A\u52A1\u4FA7\u8C03\u7528 remoteStream.setAudioVolume(0) \u63A5\u53E3\uFF0C\u5C06\u64AD\u653E\u97F3\u91CF\u8BBE\u7F6E\u4E3A 0\uFF0C\u4F1A\u5BFC\u81F4\u64AD\u653E\u65E0\u58F0",tips_en:"Business side calls remoteStream.setAudioVolume(0) interface to set the playback volume to 0, which will cause the playback to be silent",color:"orange",class:"orange",textColor:"#fff"},"screen sharing was stopped because the video track is ended":{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u505C\u6B62\uFF0C\u53EF\u80FD\u539F\u56E0\uFF1A\u7528\u6237\u70B9\u51FB\u505C\u6B62\u91C7\u96C6\u6309\u94AE\u3001\u5206\u4EAB\u7684\u7A97\u53E3/\u9875\u9762\u88AB\u5173\u95ED\u7B49\u3002",tips_en:"Screen sharing capture stopped, possible reasons: user clicks the stop button, the window/page shared by the user is closed, etc.",color:"orange",class:"orange",textColor:"#fff"},"Join() => joining room":{tips_zh:"\u8C03\u7528 client.join \u63A5\u53E3",tips_en:"Call client.join interface",color:"blue",class:"blue",textColor:"#fff"},"publish() => publishing local stream":{tips_zh:"\u8C03\u7528 client.publish \u63A5\u53E3",tips_en:"Call client.publish interface",color:"blue",class:"blue",textColor:"#fff"},"subscribe() => subscribe to":{tips_zh:"\u8C03\u7528 client.subscribe \u63A5\u53E3",tips_en:"Call client.subscribe interface",color:"blue",class:"blue",textColor:"#fff"},"switchRole() => switch role":{tips_zh:"\u8C03\u7528 client.switchRole \u63A5\u53E3",tips_en:"Call client.switchRole interface",color:"blue",class:"blue",textColor:"#fff"}};["enterRoom","exitRoom","switchRole","destroy","startLocalAudio","updateLocalAudio","stopLocalAudio","startLocalVideo","updateLocalVideo","stopLocalVideo","startScreenShare","updateScreenShare","stopScreenShare","startRemoteVideo","updateRemoteVideo","stopRemoteVideo","muteRemoteAudio","setRemoteAudioVolume"].forEach(e=>{te[`${e}()`]={tips_zh:`\u8C03\u7528 trtc.${e}`,tips_en:`Call trtc.${e}`,color:"blue",class:"blue",textColor:"#fff"}});var Nr=Object.keys(te);function Mr(e){return function(t,r,o){return o.value=e(o.value,r),o}}var kt=new WeakMap;function Zt(e,t){return Mr((r,o)=>function(...i){var c,l;let a=(c=kt.get(this))==null?void 0:c.get(t(...i));a&&a>0&&clearTimeout(a);let s=window.setTimeout(()=>{r.apply(this,i)},e);kt.has(this)?(l=kt.get(this))==null||l.set(t(...i),s):kt.set(this,new Map([[t(...i),s]]))})}var M="top",W="bottom",$="right",B="left",Pt="auto",De=[M,W,$,B],ye="start",Pe="end",Br="clippingParents",It="viewport",Xe="popper",$r="reference",er=De.reduce(function(e,t){return e.concat([t+"-"+ye,t+"-"+Pe])},[]),Ut=[].concat(De,[Pt]).reduce(function(e,t){return e.concat([t,t+"-"+ye,t+"-"+Pe])},[]),Wo="beforeRead",Vo="read",zo="afterRead",jo="beforeMain",qo="main",Go="afterMain",Ko="beforeWrite",Fo="write",Xo="afterWrite",Hr=[Wo,Vo,zo,jo,qo,Go,Ko,Fo,Xo];function j(e){return e?(e.nodeName||"").toLowerCase():null}function k(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function oe(e){var t=k(e).Element;return e instanceof t||e instanceof Element}function V(e){var t=k(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ye(e){if(typeof ShadowRoot=="undefined")return!1;var t=k(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Yo(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!V(a)||!j(a)||(Object.assign(a.style,o),Object.keys(i).forEach(function(s){var c=i[s];c===!1?a.removeAttribute(s):a.setAttribute(s,c===!0?"":c)}))})}function Jo(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var i=t.elements[o],a=t.attributes[o]||{},s=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),c=s.reduce(function(l,d){return l[d]="",l},{});!V(i)||!j(i)||(Object.assign(i.style,c),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}var st={name:"applyStyles",enabled:!0,phase:"write",fn:Yo,effect:Jo,requires:["computeStyles"]};function q(e){return e.split("-")[0]}var se=Math.max,Ie=Math.min,_e=Math.round;function Je(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function lt(){return!/^((?!chrome|android).)*safari/i.test(Je())}function ie(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),i=1,a=1;t&&V(e)&&(i=e.offsetWidth>0&&_e(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&_e(o.height)/e.offsetHeight||1);var s=oe(e)?k(e):window,c=s.visualViewport,l=!lt()&&r,d=(o.left+(l&&c?c.offsetLeft:0))/i,p=(o.top+(l&&c?c.offsetTop:0))/a,S=o.width/i,g=o.height/a;return{width:S,height:g,top:p,right:d+S,bottom:p+g,left:d,x:d,y:p}}function Ue(e){var t=ie(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function ct(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Ye(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Q(e){return k(e).getComputedStyle(e)}function tr(e){return["table","td","th"].indexOf(j(e))>=0}function K(e){return((oe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Te(e){return j(e)==="html"?e:e.assignedSlot||e.parentNode||(Ye(e)?e.host:null)||K(e)}function Wr(e){return!V(e)||Q(e).position==="fixed"?null:e.offsetParent}function Qo(e){var t=/firefox/i.test(Je()),r=/Trident/i.test(Je());if(r&&V(e)){var o=Q(e);if(o.position==="fixed")return null}var i=Te(e);for(Ye(i)&&(i=i.host);V(i)&&["html","body"].indexOf(j(i))<0;){var a=Q(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function le(e){for(var t=k(e),r=Wr(e);r&&tr(r)&&Q(r).position==="static";)r=Wr(r);return r&&(j(r)==="html"||j(r)==="body"&&Q(r).position==="static")?t:r||Qo(e)||t}function Ne(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Me(e,t,r){return se(e,Ie(t,r))}function Vr(e,t,r){var o=Me(e,t,r);return o>r?r:o}function ut(){return{top:0,right:0,bottom:0,left:0}}function pt(e){return Object.assign({},ut(),e)}function dt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Zo=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,pt(typeof t!="number"?t:dt(t,De))};function ei(e){var t,r=e.state,o=e.name,i=e.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,c=q(r.placement),l=Ne(c),d=[B,$].indexOf(c)>=0,p=d?"height":"width";if(!(!a||!s)){var S=Zo(i.padding,r),g=Ue(a),m=l==="y"?M:B,b=l==="y"?W:$,y=r.rects.reference[p]+r.rects.reference[l]-s[l]-r.rects.popper[p],T=s[l]-r.rects.reference[l],D=le(a),A=D?l==="y"?D.clientHeight||0:D.clientWidth||0:0,L=y/2-T/2,n=S[m],x=A-g[p]-S[b],f=A/2-g[p]/2+L,v=Me(n,f,x),E=l;r.modifiersData[o]=(t={},t[E]=v,t.centerOffset=v-f,t)}}function ti(e){var t=e.state,r=e.options,o=r.element,i=o===void 0?"[data-popper-arrow]":o;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||ct(t.elements.popper,i)&&(t.elements.arrow=i))}var zr={name:"arrow",enabled:!0,phase:"main",fn:ei,effect:ti,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ae(e){return e.split("-")[1]}var ri={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oi(e,t){var r=e.x,o=e.y,i=t.devicePixelRatio||1;return{x:_e(r*i)/i||0,y:_e(o*i)/i||0}}function jr(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,c=e.position,l=e.gpuAcceleration,d=e.adaptive,p=e.roundOffsets,S=e.isFixed,g=s.x,m=g===void 0?0:g,b=s.y,y=b===void 0?0:b,T=typeof p=="function"?p({x:m,y}):{x:m,y};m=T.x,y=T.y;var D=s.hasOwnProperty("x"),A=s.hasOwnProperty("y"),L=B,n=M,x=window;if(d){var f=le(r),v="clientHeight",E="clientWidth";if(f===k(r)&&(f=K(r),Q(f).position!=="static"&&c==="absolute"&&(v="scrollHeight",E="scrollWidth")),f=f,i===M||(i===B||i===$)&&a===Pe){n=W;var R=S&&f===x&&x.visualViewport?x.visualViewport.height:f[v];y-=R-o.height,y*=l?1:-1}if(i===B||(i===M||i===W)&&a===Pe){L=$;var U=S&&f===x&&x.visualViewport?x.visualViewport.width:f[E];m-=U-o.width,m*=l?1:-1}}var H=Object.assign({position:c},d&&ri),N=p===!0?oi({x:m,y},k(r)):{x:m,y};if(m=N.x,y=N.y,l){var I;return Object.assign({},H,(I={},I[n]=A?"0":"",I[L]=D?"0":"",I.transform=(x.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",I))}return Object.assign({},H,(t={},t[n]=A?y+"px":"",t[L]=D?m+"px":"",t.transform="",t))}function ii(e){var t=e.state,r=e.options,o=r.gpuAcceleration,i=o===void 0?!0:o,a=r.adaptive,s=a===void 0?!0:a,c=r.roundOffsets,l=c===void 0?!0:c,d={placement:q(t.placement),variation:ae(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,jr(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,jr(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var qr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ii,data:{}};var Nt={passive:!0};function ai(e){var t=e.state,r=e.instance,o=e.options,i=o.scroll,a=i===void 0?!0:i,s=o.resize,c=s===void 0?!0:s,l=k(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&d.forEach(function(p){p.addEventListener("scroll",r.update,Nt)}),c&&l.addEventListener("resize",r.update,Nt),function(){a&&d.forEach(function(p){p.removeEventListener("scroll",r.update,Nt)}),c&&l.removeEventListener("resize",r.update,Nt)}}var Gr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ai,data:{}};var ni={left:"right",right:"left",bottom:"top",top:"bottom"};function Qe(e){return e.replace(/left|right|bottom|top/g,function(t){return ni[t]})}var si={start:"end",end:"start"};function Mt(e){return e.replace(/start|end/g,function(t){return si[t]})}function Be(e){var t=k(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function $e(e){return ie(K(e)).left+Be(e).scrollLeft}function rr(e,t){var r=k(e),o=K(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){a=i.width,s=i.height;var d=lt();(d||!d&&t==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:a,height:s,x:c+$e(e),y:l}}function or(e){var t,r=K(e),o=Be(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=se(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=se(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-o.scrollLeft+$e(e),l=-o.scrollTop;return Q(i||r).direction==="rtl"&&(c+=se(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:c,y:l}}function He(e){var t=Q(e),r=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+o)}function Bt(e){return["html","body","#document"].indexOf(j(e))>=0?e.ownerDocument.body:V(e)&&He(e)?e:Bt(Te(e))}function Ae(e,t){var r;t===void 0&&(t=[]);var o=Bt(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=k(o),s=i?[a].concat(a.visualViewport||[],He(o)?o:[]):o,c=t.concat(s);return i?c:c.concat(Ae(Te(s)))}function Ze(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function li(e,t){var r=ie(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Kr(e,t,r){return t===It?Ze(rr(e,r)):oe(t)?li(t,r):Ze(or(K(e)))}function ci(e){var t=Ae(Te(e)),r=["absolute","fixed"].indexOf(Q(e).position)>=0,o=r&&V(e)?le(e):e;return oe(o)?t.filter(function(i){return oe(i)&&ct(i,o)&&j(i)!=="body"}):[]}function ir(e,t,r,o){var i=t==="clippingParents"?ci(e):[].concat(t),a=[].concat(i,[r]),s=a[0],c=a.reduce(function(l,d){var p=Kr(e,d,o);return l.top=se(p.top,l.top),l.right=Ie(p.right,l.right),l.bottom=Ie(p.bottom,l.bottom),l.left=se(p.left,l.left),l},Kr(e,s,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function ft(e){var t=e.reference,r=e.element,o=e.placement,i=o?q(o):null,a=o?ae(o):null,s=t.x+t.width/2-r.width/2,c=t.y+t.height/2-r.height/2,l;switch(i){case M:l={x:s,y:t.y-r.height};break;case W:l={x:s,y:t.y+t.height};break;case $:l={x:t.x+t.width,y:c};break;case B:l={x:t.x-r.width,y:c};break;default:l={x:t.x,y:t.y}}var d=i?Ne(i):null;if(d!=null){var p=d==="y"?"height":"width";switch(a){case ye:l[d]=l[d]-(t[p]/2-r[p]/2);break;case Pe:l[d]=l[d]+(t[p]/2-r[p]/2);break;default:}}return l}function ce(e,t){t===void 0&&(t={});var r=t,o=r.placement,i=o===void 0?e.placement:o,a=r.strategy,s=a===void 0?e.strategy:a,c=r.boundary,l=c===void 0?Br:c,d=r.rootBoundary,p=d===void 0?It:d,S=r.elementContext,g=S===void 0?Xe:S,m=r.altBoundary,b=m===void 0?!1:m,y=r.padding,T=y===void 0?0:y,D=pt(typeof T!="number"?T:dt(T,De)),A=g===Xe?$r:Xe,L=e.rects.popper,n=e.elements[b?A:g],x=ir(oe(n)?n:n.contextElement||K(e.elements.popper),l,p,s),f=ie(e.elements.reference),v=ft({reference:f,element:L,strategy:"absolute",placement:i}),E=Ze(Object.assign({},L,v)),R=g===Xe?E:f,U={top:x.top-R.top+D.top,bottom:R.bottom-x.bottom+D.bottom,left:x.left-R.left+D.left,right:R.right-x.right+D.right},H=e.modifiersData.offset;if(g===Xe&&H){var N=H[i];Object.keys(U).forEach(function(I){var Z=[$,W].indexOf(I)>=0?1:-1,ee=[M,W].indexOf(I)>=0?"y":"x";U[I]+=N[ee]*Z})}return U}function ar(e,t){t===void 0&&(t={});var r=t,o=r.placement,i=r.boundary,a=r.rootBoundary,s=r.padding,c=r.flipVariations,l=r.allowedAutoPlacements,d=l===void 0?Ut:l,p=ae(o),S=p?c?er:er.filter(function(b){return ae(b)===p}):De,g=S.filter(function(b){return d.indexOf(b)>=0});g.length===0&&(g=S);var m=g.reduce(function(b,y){return b[y]=ce(e,{placement:y,boundary:i,rootBoundary:a,padding:s})[q(y)],b},{});return Object.keys(m).sort(function(b,y){return m[b]-m[y]})}function ui(e){if(q(e)===Pt)return[];var t=Qe(e);return[Mt(e),t,Mt(t)]}function pi(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,s=r.altAxis,c=s===void 0?!0:s,l=r.fallbackPlacements,d=r.padding,p=r.boundary,S=r.rootBoundary,g=r.altBoundary,m=r.flipVariations,b=m===void 0?!0:m,y=r.allowedAutoPlacements,T=t.options.placement,D=q(T),A=D===T,L=l||(A||!b?[Qe(T)]:ui(T)),n=[T].concat(L).reduce(function(he,ne){return he.concat(q(ne)===Pt?ar(t,{placement:ne,boundary:p,rootBoundary:S,padding:d,flipVariations:b,allowedAutoPlacements:y}):ne)},[]),x=t.rects.reference,f=t.rects.popper,v=new Map,E=!0,R=n[0],U=0;U<n.length;U++){var H=n[U],N=q(H),I=ae(H)===ye,Z=[M,W].indexOf(N)>=0,ee=Z?"width":"height",F=ce(t,{placement:H,boundary:p,rootBoundary:S,altBoundary:g,padding:d}),X=Z?I?$:B:I?W:M;x[ee]>f[ee]&&(X=Qe(X));var G=Qe(X),pe=[];if(a&&pe.push(F[N]<=0),c&&pe.push(F[X]<=0,F[G]<=0),pe.every(function(he){return he})){R=H,E=!1;break}v.set(H,pe)}if(E)for(var de=b?3:1,Ce=function(ne){var ge=n.find(function(je){var ve=v.get(je);if(ve)return ve.slice(0,ne).every(function(qe){return qe})});if(ge)return R=ge,"break"},fe=de;fe>0;fe--){var Le=Ce(fe);if(Le==="break")break}t.placement!==R&&(t.modifiersData[o]._skip=!0,t.placement=R,t.reset=!0)}}var Fr={name:"flip",enabled:!0,phase:"main",fn:pi,requiresIfExists:["offset"],data:{_skip:!1}};function Xr(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Yr(e){return[M,$,W,B].some(function(t){return e[t]>=0})}function di(e){var t=e.state,r=e.name,o=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,s=ce(t,{elementContext:"reference"}),c=ce(t,{altBoundary:!0}),l=Xr(s,o),d=Xr(c,i,a),p=Yr(l),S=Yr(d);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:S},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":S})}var Jr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:di};function fi(e,t,r){var o=q(e),i=[B,M].indexOf(o)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=a[0],c=a[1];return s=s||0,c=(c||0)*i,[B,$].indexOf(o)>=0?{x:c,y:s}:{x:s,y:c}}function mi(e){var t=e.state,r=e.options,o=e.name,i=r.offset,a=i===void 0?[0,0]:i,s=Ut.reduce(function(p,S){return p[S]=fi(S,t.rects,a),p},{}),c=s[t.placement],l=c.x,d=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[o]=s}var Qr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:mi};function hi(e){var t=e.state,r=e.name;t.modifiersData[r]=ft({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Zr={name:"popperOffsets",enabled:!0,phase:"read",fn:hi,data:{}};function nr(e){return e==="x"?"y":"x"}function gi(e){var t=e.state,r=e.options,o=e.name,i=r.mainAxis,a=i===void 0?!0:i,s=r.altAxis,c=s===void 0?!1:s,l=r.boundary,d=r.rootBoundary,p=r.altBoundary,S=r.padding,g=r.tether,m=g===void 0?!0:g,b=r.tetherOffset,y=b===void 0?0:b,T=ce(t,{boundary:l,rootBoundary:d,padding:S,altBoundary:p}),D=q(t.placement),A=ae(t.placement),L=!A,n=Ne(D),x=nr(n),f=t.modifiersData.popperOffsets,v=t.rects.reference,E=t.rects.popper,R=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,U=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(f){if(a){var I,Z=n==="y"?M:B,ee=n==="y"?W:$,F=n==="y"?"height":"width",X=f[n],G=X+T[Z],pe=X-T[ee],de=m?-E[F]/2:0,Ce=A===ye?v[F]:E[F],fe=A===ye?-E[F]:-v[F],Le=t.elements.arrow,he=m&&Le?Ue(Le):{width:0,height:0},ne=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ut(),ge=ne[Z],je=ne[ee],ve=Me(0,v[F],he[F]),qe=L?v[F]/2-de-ve-ge-U.mainAxis:Ce-ve-ge-U.mainAxis,Oe=L?-v[F]/2+de+ve+je+U.mainAxis:fe+ve+je+U.mainAxis,Ge=t.elements.arrow&&le(t.elements.arrow),Tt=Ge?n==="y"?Ge.clientTop||0:Ge.clientLeft||0:0,rt=(I=H==null?void 0:H[n])!=null?I:0,St=X+qe-rt-Tt,xt=X+Oe-rt,ot=Me(m?Ie(G,St):G,X,m?se(pe,xt):pe);f[n]=ot,N[n]=ot-X}if(c){var it,Ot=n==="x"?M:B,wt=n==="x"?W:$,be=f[x],we=x==="y"?"height":"width",at=be+T[Ot],Re=be-T[wt],nt=[M,B].indexOf(D)!==-1,Dt=(it=H==null?void 0:H[x])!=null?it:0,At=nt?at:be-v[we]-E[we]-Dt+U.altAxis,Et=nt?be+v[we]+E[we]-Dt-U.altAxis:Re,Ct=m&&nt?Vr(At,be,Et):Me(m?At:at,be,m?Et:Re);f[x]=Ct,N[x]=Ct-be}t.modifiersData[o]=N}}var eo={name:"preventOverflow",enabled:!0,phase:"main",fn:gi,requiresIfExists:["offset"]};function sr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lr(e){return e===k(e)||!V(e)?Be(e):sr(e)}function vi(e){var t=e.getBoundingClientRect(),r=_e(t.width)/e.offsetWidth||1,o=_e(t.height)/e.offsetHeight||1;return r!==1||o!==1}function cr(e,t,r){r===void 0&&(r=!1);var o=V(t),i=V(t)&&vi(t),a=K(t),s=ie(e,i,r),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!r)&&((j(t)!=="body"||He(a))&&(c=lr(t)),V(t)?(l=ie(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=$e(a))),{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function bi(e){var t=new Map,r=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(c){if(!r.has(c)){var l=t.get(c);l&&i(l)}}),o.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),o}function ur(e){var t=bi(e);return Hr.reduce(function(r,o){return r.concat(t.filter(function(i){return i.phase===o}))},[])}function pr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function dr(e){var t=e.reduce(function(r,o){var i=r[o.name];return r[o.name]=i?Object.assign({},i,o,{options:Object.assign({},i.options,o.options),data:Object.assign({},i.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var to={placement:"bottom",modifiers:[],strategy:"absolute"};function ro(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function oo(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,o=r===void 0?[]:r,i=t.defaultOptions,a=i===void 0?to:i;return function(c,l,d){d===void 0&&(d=a);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},to,a),modifiersData:{},elements:{reference:c,popper:l},attributes:{},styles:{}},S=[],g=!1,m={state:p,setOptions:function(D){var A=typeof D=="function"?D(p.options):D;y(),p.options=Object.assign({},a,p.options,A),p.scrollParents={reference:oe(c)?Ae(c):c.contextElement?Ae(c.contextElement):[],popper:Ae(l)};var L=ur(dr([].concat(o,p.options.modifiers)));return p.orderedModifiers=L.filter(function(n){return n.enabled}),b(),m.update()},forceUpdate:function(){if(!g){var D=p.elements,A=D.reference,L=D.popper;if(ro(A,L)){p.rects={reference:cr(A,le(L),p.options.strategy==="fixed"),popper:Ue(L)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(U){return p.modifiersData[U.name]=Object.assign({},U.data)});for(var n=0;n<p.orderedModifiers.length;n++){if(p.reset===!0){p.reset=!1,n=-1;continue}var x=p.orderedModifiers[n],f=x.fn,v=x.options,E=v===void 0?{}:v,R=x.name;typeof f=="function"&&(p=f({state:p,options:E,name:R,instance:m})||p)}}}},update:pr(function(){return new Promise(function(T){m.forceUpdate(),T(p)})}),destroy:function(){y(),g=!0}};if(!ro(c,l))return m;m.setOptions(d).then(function(T){!g&&d.onFirstUpdate&&d.onFirstUpdate(T)});function b(){p.orderedModifiers.forEach(function(T){var D=T.name,A=T.options,L=A===void 0?{}:A,n=T.effect;if(typeof n=="function"){var x=n({state:p,name:D,instance:m,options:L}),f=function(){};S.push(x||f)}})}function y(){S.forEach(function(T){return T()}),S=[]}return m}}var yi=[Gr,Zr,qr,st,Qr,Fr,eo,zr,Jr],fr=oo({defaultModifiers:yi});var _i="tippy-box",mo="tippy-content",Ti="tippy-backdrop",ho="tippy-arrow",go="tippy-svg-arrow",We={passive:!0,capture:!0},vo=function(){return document.body};function mr(e,t,r){if(Array.isArray(e)){var o=e[t];return o==null?Array.isArray(r)?r[t]:r:o}return e}function _r(e,t){var r={}.toString.call(e);return r.indexOf("[object")===0&&r.indexOf(t+"]")>-1}function bo(e,t){return typeof e=="function"?e.apply(void 0,t):e}function io(e,t){if(t===0)return e;var r;return function(o){clearTimeout(r),r=setTimeout(function(){e(o)},t)}}function Si(e){return e.split(/\s+/).filter(Boolean)}function et(e){return[].concat(e)}function ao(e,t){e.indexOf(t)===-1&&e.push(t)}function xi(e){return e.filter(function(t,r){return e.indexOf(t)===r})}function Oi(e){return e.split("-")[0]}function Ht(e){return[].slice.call(e)}function no(e){return Object.keys(e).reduce(function(t,r){return e[r]!==void 0&&(t[r]=e[r]),t},{})}function mt(){return document.createElement("div")}function Wt(e){return["Element","Fragment"].some(function(t){return _r(e,t)})}function wi(e){return _r(e,"NodeList")}function Di(e){return _r(e,"MouseEvent")}function Ai(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Ei(e){return Wt(e)?[e]:wi(e)?Ht(e):Array.isArray(e)?e:Ht(document.querySelectorAll(e))}function hr(e,t){e.forEach(function(r){r&&(r.style.transitionDuration=t+"ms")})}function so(e,t){e.forEach(function(r){r&&r.setAttribute("data-state",t)})}function Ci(e){var t,r=et(e),o=r[0];return o!=null&&(t=o.ownerDocument)!=null&&t.body?o.ownerDocument:document}function Li(e,t){var r=t.clientX,o=t.clientY;return e.every(function(i){var a=i.popperRect,s=i.popperState,c=i.props,l=c.interactiveBorder,d=Oi(s.placement),p=s.modifiersData.offset;if(!p)return!0;var S=d==="bottom"?p.top.y:0,g=d==="top"?p.bottom.y:0,m=d==="right"?p.left.x:0,b=d==="left"?p.right.x:0,y=a.top-o+S>l,T=o-a.bottom-g>l,D=a.left-r+m>l,A=r-a.right-b>l;return y||T||D||A})}function gr(e,t,r){var o=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[o](i,r)})}function lo(e,t){for(var r=t;r;){var o;if(e.contains(r))return!0;r=r.getRootNode==null||(o=r.getRootNode())==null?void 0:o.host}return!1}var me={isTouch:!1},co=0;function Ri(){me.isTouch||(me.isTouch=!0,window.performance&&document.addEventListener("mousemove",yo))}function yo(){var e=performance.now();e-co<20&&(me.isTouch=!1,document.removeEventListener("mousemove",yo)),co=e}function ki(){var e=document.activeElement;if(Ai(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Pi(){document.addEventListener("touchstart",Ri,We),window.addEventListener("blur",ki)}var Ii=typeof window!="undefined"&&typeof document!="undefined",Ui=Ii?!!window.msCrypto:!1;var Ni={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Mi={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ue=Object.assign({appendTo:vo,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ni,Mi),Bi=Object.keys(ue),$i=function(t){var r=Object.keys(t);r.forEach(function(o){ue[o]=t[o]})};function _o(e){var t=e.plugins||[],r=t.reduce(function(o,i){var a=i.name,s=i.defaultValue;if(a){var c;o[a]=e[a]!==void 0?e[a]:(c=ue[a])!=null?c:s}return o},{});return Object.assign({},e,r)}function Hi(e,t){var r=t?Object.keys(_o(Object.assign({},ue,{plugins:t}))):Bi,o=r.reduce(function(i,a){var s=(e.getAttribute("data-tippy-"+a)||"").trim();if(!s)return i;if(a==="content")i[a]=s;else try{i[a]=JSON.parse(s)}catch(c){i[a]=s}return i},{});return o}function uo(e,t){var r=Object.assign({},t,{content:bo(t.content,[e])},t.ignoreAttributes?{}:Hi(e,t.plugins));return r.aria=Object.assign({},ue.aria,r.aria),r.aria={expanded:r.aria.expanded==="auto"?t.interactive:r.aria.expanded,content:r.aria.content==="auto"?t.interactive?null:"describedby":r.aria.content},r}var Wi=function(){return"innerHTML"};function br(e,t){e[Wi()]=t}function po(e){var t=mt();return e===!0?t.className=ho:(t.className=go,Wt(e)?t.appendChild(e):br(t,e)),t}function fo(e,t){Wt(t.content)?(br(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?br(e,t.content):e.textContent=t.content)}function yr(e){var t=e.firstElementChild,r=Ht(t.children);return{box:t,content:r.find(function(o){return o.classList.contains(mo)}),arrow:r.find(function(o){return o.classList.contains(ho)||o.classList.contains(go)}),backdrop:r.find(function(o){return o.classList.contains(Ti)})}}function To(e){var t=mt(),r=mt();r.className=_i,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var o=mt();o.className=mo,o.setAttribute("data-state","hidden"),fo(o,e.props),t.appendChild(r),r.appendChild(o),i(e.props,e.props);function i(a,s){var c=yr(t),l=c.box,d=c.content,p=c.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(a.content!==s.content||a.allowHTML!==s.allowHTML)&&fo(d,e.props),s.arrow?p?a.arrow!==s.arrow&&(l.removeChild(p),l.appendChild(po(s.arrow))):l.appendChild(po(s.arrow)):p&&l.removeChild(p)}return{popper:t,onUpdate:i}}To.$$tippy=!0;var Vi=1,$t=[],vr=[];function zi(e,t){var r=uo(e,Object.assign({},ue,_o(no(t)))),o,i,a,s=!1,c=!1,l=!1,d=!1,p,S,g,m=[],b=io(St,r.interactiveDebounce),y,T=Vi++,D=null,A=xi(r.plugins),L={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},n={id:T,reference:e,popper:mt(),popperInstance:D,props:r,state:L,plugins:A,clearDelayTimeouts:At,setProps:Et,setContent:Ct,show:ko,hide:Po,hideWithInteractivity:Io,enable:nt,disable:Dt,unmount:Uo,destroy:No};if(!r.render)return n;var x=r.render(n),f=x.popper,v=x.onUpdate;f.setAttribute("data-tippy-root",""),f.id="tippy-"+n.id,n.popper=f,e._tippy=n,f._tippy=n;var E=A.map(function(u){return u.fn(n)}),R=e.hasAttribute("aria-expanded");return Ge(),de(),X(),G("onCreate",[n]),r.showOnCreate&&at(),f.addEventListener("mouseenter",function(){n.props.interactive&&n.state.isVisible&&n.clearDelayTimeouts()}),f.addEventListener("mouseleave",function(){n.props.interactive&&n.props.trigger.indexOf("mouseenter")>=0&&Z().addEventListener("mousemove",b)}),n;function U(){var u=n.props.touch;return Array.isArray(u)?u:[u,0]}function H(){return U()[0]==="hold"}function N(){var u;return!!((u=n.props.render)!=null&&u.$$tippy)}function I(){return y||e}function Z(){var u=I().parentNode;return u?Ci(u):document}function ee(){return yr(f)}function F(u){return n.state.isMounted&&!n.state.isVisible||me.isTouch||p&&p.type==="focus"?0:mr(n.props.delay,u?0:1,ue.delay)}function X(u){u===void 0&&(u=!1),f.style.pointerEvents=n.props.interactive&&!u?"":"none",f.style.zIndex=""+n.props.zIndex}function G(u,h,_){if(_===void 0&&(_=!0),E.forEach(function(O){O[u]&&O[u].apply(O,h)}),_){var C;(C=n.props)[u].apply(C,h)}}function pe(){var u=n.props.aria;if(u.content){var h="aria-"+u.content,_=f.id,C=et(n.props.triggerTarget||e);C.forEach(function(O){var J=O.getAttribute(h);if(n.state.isVisible)O.setAttribute(h,J?J+" "+_:_);else{var re=J&&J.replace(_,"").trim();re?O.setAttribute(h,re):O.removeAttribute(h)}})}}function de(){if(!(R||!n.props.aria.expanded)){var u=et(n.props.triggerTarget||e);u.forEach(function(h){n.props.interactive?h.setAttribute("aria-expanded",n.state.isVisible&&h===I()?"true":"false"):h.removeAttribute("aria-expanded")})}}function Ce(){Z().removeEventListener("mousemove",b),$t=$t.filter(function(u){return u!==b})}function fe(u){if(!(me.isTouch&&(l||u.type==="mousedown"))){var h=u.composedPath&&u.composedPath()[0]||u.target;if(!(n.props.interactive&&lo(f,h))){if(et(n.props.triggerTarget||e).some(function(_){return lo(_,h)})){if(me.isTouch||n.state.isVisible&&n.props.trigger.indexOf("click")>=0)return}else G("onClickOutside",[n,u]);n.props.hideOnClick===!0&&(n.clearDelayTimeouts(),n.hide(),c=!0,setTimeout(function(){c=!1}),n.state.isMounted||ge())}}}function Le(){l=!0}function he(){l=!1}function ne(){var u=Z();u.addEventListener("mousedown",fe,!0),u.addEventListener("touchend",fe,We),u.addEventListener("touchstart",he,We),u.addEventListener("touchmove",Le,We)}function ge(){var u=Z();u.removeEventListener("mousedown",fe,!0),u.removeEventListener("touchend",fe,We),u.removeEventListener("touchstart",he,We),u.removeEventListener("touchmove",Le,We)}function je(u,h){qe(u,function(){!n.state.isVisible&&f.parentNode&&f.parentNode.contains(f)&&h()})}function ve(u,h){qe(u,h)}function qe(u,h){var _=ee().box;function C(O){O.target===_&&(gr(_,"remove",C),h())}if(u===0)return h();gr(_,"remove",S),gr(_,"add",C),S=C}function Oe(u,h,_){_===void 0&&(_=!1);var C=et(n.props.triggerTarget||e);C.forEach(function(O){O.addEventListener(u,h,_),m.push({node:O,eventType:u,handler:h,options:_})})}function Ge(){H()&&(Oe("touchstart",rt,{passive:!0}),Oe("touchend",xt,{passive:!0})),Si(n.props.trigger).forEach(function(u){if(u!=="manual")switch(Oe(u,rt),u){case"mouseenter":Oe("mouseleave",xt);break;case"focus":Oe(Ui?"focusout":"blur",ot);break;case"focusin":Oe("focusout",ot);break}})}function Tt(){m.forEach(function(u){var h=u.node,_=u.eventType,C=u.handler,O=u.options;h.removeEventListener(_,C,O)}),m=[]}function rt(u){var h,_=!1;if(!(!n.state.isEnabled||it(u)||c)){var C=((h=p)==null?void 0:h.type)==="focus";p=u,y=u.currentTarget,de(),!n.state.isVisible&&Di(u)&&$t.forEach(function(O){return O(u)}),u.type==="click"&&(n.props.trigger.indexOf("mouseenter")<0||s)&&n.props.hideOnClick!==!1&&n.state.isVisible?_=!0:at(u),u.type==="click"&&(s=!_),_&&!C&&Re(u)}}function St(u){var h=u.target,_=I().contains(h)||f.contains(h);if(!(u.type==="mousemove"&&_)){var C=we().concat(f).map(function(O){var J,re=O._tippy,Ke=(J=re.popperInstance)==null?void 0:J.state;return Ke?{popperRect:O.getBoundingClientRect(),popperState:Ke,props:r}:null}).filter(Boolean);Li(C,u)&&(Ce(),Re(u))}}function xt(u){var h=it(u)||n.props.trigger.indexOf("click")>=0&&s;if(!h){if(n.props.interactive){n.hideWithInteractivity(u);return}Re(u)}}function ot(u){n.props.trigger.indexOf("focusin")<0&&u.target!==I()||n.props.interactive&&u.relatedTarget&&f.contains(u.relatedTarget)||Re(u)}function it(u){return me.isTouch?H()!==u.type.indexOf("touch")>=0:!1}function Ot(){wt();var u=n.props,h=u.popperOptions,_=u.placement,C=u.offset,O=u.getReferenceClientRect,J=u.moveTransition,re=N()?yr(f).arrow:null,Ke=O?{getBoundingClientRect:O,contextElement:O.contextElement||I()}:e,Cr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Lt){var Fe=Lt.state;if(N()){var Mo=ee(),Yt=Mo.box;["placement","reference-hidden","escaped"].forEach(function(Rt){Rt==="placement"?Yt.setAttribute("data-placement",Fe.placement):Fe.attributes.popper["data-popper-"+Rt]?Yt.setAttribute("data-"+Rt,""):Yt.removeAttribute("data-"+Rt)}),Fe.attributes.popper={}}}},ke=[{name:"offset",options:{offset:C}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!J}},Cr];N()&&re&&ke.push({name:"arrow",options:{element:re,padding:3}}),ke.push.apply(ke,(h==null?void 0:h.modifiers)||[]),n.popperInstance=fr(Ke,f,Object.assign({},h,{placement:_,onFirstUpdate:g,modifiers:ke}))}function wt(){n.popperInstance&&(n.popperInstance.destroy(),n.popperInstance=null)}function be(){var u=n.props.appendTo,h,_=I();n.props.interactive&&u===vo||u==="parent"?h=_.parentNode:h=bo(u,[_]),h.contains(f)||h.appendChild(f),n.state.isMounted=!0,Ot()}function we(){return Ht(f.querySelectorAll("[data-tippy-root]"))}function at(u){n.clearDelayTimeouts(),u&&G("onTrigger",[n,u]),ne();var h=F(!0),_=U(),C=_[0],O=_[1];me.isTouch&&C==="hold"&&O&&(h=O),h?o=setTimeout(function(){n.show()},h):n.show()}function Re(u){if(n.clearDelayTimeouts(),G("onUntrigger",[n,u]),!n.state.isVisible){ge();return}if(!(n.props.trigger.indexOf("mouseenter")>=0&&n.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(u.type)>=0&&s)){var h=F(!1);h?i=setTimeout(function(){n.state.isVisible&&n.hide()},h):a=requestAnimationFrame(function(){n.hide()})}}function nt(){n.state.isEnabled=!0}function Dt(){n.hide(),n.state.isEnabled=!1}function At(){clearTimeout(o),clearTimeout(i),cancelAnimationFrame(a)}function Et(u){if(!n.state.isDestroyed){G("onBeforeUpdate",[n,u]),Tt();var h=n.props,_=uo(e,Object.assign({},h,no(u),{ignoreAttributes:!0}));n.props=_,Ge(),h.interactiveDebounce!==_.interactiveDebounce&&(Ce(),b=io(St,_.interactiveDebounce)),h.triggerTarget&&!_.triggerTarget?et(h.triggerTarget).forEach(function(C){C.removeAttribute("aria-expanded")}):_.triggerTarget&&e.removeAttribute("aria-expanded"),de(),X(),v&&v(h,_),n.popperInstance&&(Ot(),we().forEach(function(C){requestAnimationFrame(C._tippy.popperInstance.forceUpdate)})),G("onAfterUpdate",[n,u])}}function Ct(u){n.setProps({content:u})}function ko(){var u=n.state.isVisible,h=n.state.isDestroyed,_=!n.state.isEnabled,C=me.isTouch&&!n.props.touch,O=mr(n.props.duration,0,ue.duration);if(!(u||h||_||C)&&!I().hasAttribute("disabled")&&(G("onShow",[n],!1),n.props.onShow(n)!==!1)){if(n.state.isVisible=!0,N()&&(f.style.visibility="visible"),X(),ne(),n.state.isMounted||(f.style.transition="none"),N()){var J=ee(),re=J.box,Ke=J.content;hr([re,Ke],0)}g=function(){var ke;if(!(!n.state.isVisible||d)){if(d=!0,f.offsetHeight,f.style.transition=n.props.moveTransition,N()&&n.props.animation){var Xt=ee(),Lt=Xt.box,Fe=Xt.content;hr([Lt,Fe],O),so([Lt,Fe],"visible")}pe(),de(),ao(vr,n),(ke=n.popperInstance)==null||ke.forceUpdate(),G("onMount",[n]),n.props.animation&&N()&&ve(O,function(){n.state.isShown=!0,G("onShown",[n])})}},be()}}function Po(){var u=!n.state.isVisible,h=n.state.isDestroyed,_=!n.state.isEnabled,C=mr(n.props.duration,1,ue.duration);if(!(u||h||_)&&(G("onHide",[n],!1),n.props.onHide(n)!==!1)){if(n.state.isVisible=!1,n.state.isShown=!1,d=!1,s=!1,N()&&(f.style.visibility="hidden"),Ce(),ge(),X(!0),N()){var O=ee(),J=O.box,re=O.content;n.props.animation&&(hr([J,re],C),so([J,re],"hidden"))}pe(),de(),n.props.animation?N()&&je(C,n.unmount):n.unmount()}}function Io(u){Z().addEventListener("mousemove",b),ao($t,b),b(u)}function Uo(){n.state.isVisible&&n.hide(),n.state.isMounted&&(wt(),we().forEach(function(u){u._tippy.unmount()}),f.parentNode&&f.parentNode.removeChild(f),vr=vr.filter(function(u){return u!==n}),n.state.isMounted=!1,G("onHidden",[n]))}function No(){n.state.isDestroyed||(n.clearDelayTimeouts(),n.unmount(),Tt(),delete e._tippy,n.state.isDestroyed=!0,G("onDestroy",[n]))}}function ht(e,t){t===void 0&&(t={});var r=ue.plugins.concat(t.plugins||[]);Pi();var o=Object.assign({},t,{plugins:r}),i=Ei(e);if(!1)var a,s;var c=i.reduce(function(l,d){var p=d&&zi(d,o);return p&&l.push(p),l},[]);return Wt(e)?c[0]:c}ht.defaultProps=ue;ht.setDefaultProps=$i;ht.currentInput=me;var Zl=Object.assign({},st,{effect:function(t){var r=t.state,o={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,o.popper),r.styles=o,r.elements.arrow&&Object.assign(r.elements.arrow.style,o.arrow)}});ht.setDefaultProps({render:To});var So=ht;var P="trtc_debug_dialog",Ee=`${P}_activated`,Vt=`${P}_switch`,Tr=`${P}_mask`,zt=`${P}_pannel`,Sr=`${P}_tabber`,jt=`${P}_tab`,xr=`${P}_topbar`,Ve=`${P}_toptab`,Se=`${P}_content`,qt=`${P}_has_topbar`,xo=`${Se}_log`,ze=`${Se}_network`,Gt=`${ze}_title`,Or=`${ze}_basic`,wr=`${ze}_local`,Dr=`${ze}_remote`,Kt=`${P}_banner`,Oo=`${Kt}_item`,wo=`${P}_toolbar`,gt=`${P}_tool`,xe=`${P}_item`,Do=`${xe}_debug`,Ao=`${xe}_info`,Eo=`${xe}_warn`,Co=`${xe}_error`,vt=`${P}_back_top`,bt=`${P}_go_bottom`,Lo="success",ji="failed",Ar=!1,yt=class{constructor(t,r){w(this,"_dialogStyle",null);w(this,"_dialogNode",null);w(this,"_switchNode",null);w(this,"_maskNode",null);w(this,"_pannelNode",null);w(this,"_logContentNode",null);w(this,"_networkContentNode",null);w(this,"_tabNodes",[]);w(this,"_toptabNodes",[]);w(this,"_backTopButton",null);w(this,"_goBottomButton",null);w(this,"_hasMove",!1);w(this,"_showDialog",!1);w(this,"_isMobile",!1);w(this,"_showLogType","all");w(this,"prevBytesSent",0);w(this,"prevBytesReceived",0);w(this,"_core");w(this,"_log");w(this,"_logList",[]);w(this,"_networkQuality");w(this,"tippyCount",0);w(this,"isUploading",!1);w(this,"handleNetworkQuality",t=>{this._networkQuality=t});w(this,"handleHeartbeatReport",t=>{var m,b,y,T,D,A,L,n,x,f;let o={2:"big",3:"small",7:"sub"},i={rtt:t.msg_up_stream_info.msg_network_status.uint32_rtt||((m=t.msg_down_stream_info[0])==null?void 0:m.msg_network_status.uint32_rtt)||((b=this._networkQuality)==null?void 0:b.uplinkRTT)||((y=this._networkQuality)==null?void 0:y.downlinkRTT)||0,upLoss:((T=this._networkQuality)==null?void 0:T.uplinkLoss)||0,downLoss:((D=this._networkQuality)==null?void 0:D.downlinkLoss)||0,bytesSent:t.bytes_sent||0,bytesReceived:t.bytes_received||0,localStatistics:{audio:{bitrate:(((A=t.msg_up_stream_info.msg_audio_status)==null?void 0:A.uint32_audio_codec_bitrate)||0)/1e3,audioLevel:(((L=t.msg_up_stream_info.msg_audio_status)==null?void 0:L.uint32_audio_level)||0)/1e8},video:t.msg_up_stream_info.msg_video_status.filter(v=>o[v.uint32_video_stream_type]).map(v=>({bitrate:(v.uint32_video_codec_bitrate||0)/1e3,width:v.uint32_video_width,height:v.uint32_video_height,frameRate:v.uint32_video_enc_fps,videoType:o[v.uint32_video_stream_type]}))},remoteStatistics:t.msg_down_stream_info.map(v=>({userId:v.msg_user_info.str_identifier,audio:{bitrate:(v.msg_audio_status.uint32_audio_codec_bitrate||0)/1e3,audioLevel:(v.msg_audio_status.uint32_audio_level||0)/1e8},video:v.msg_video_status.map(E=>({bitrate:(E.uint32_video_codec_bitrate||0)/1e3,width:E.uint32_video_width,height:E.uint32_video_height,frameRate:E.uint32_video_dec_fps,videoType:o[E.uint32_video_stream_type]}))}))},a=(i.bytesSent-this.prevBytesSent)/2,s=(i.bytesReceived-this.prevBytesReceived)/2;this.prevBytesSent=i.bytesSent,this.prevBytesReceived=i.bytesReceived;let c=(n=this._dialogNode)==null?void 0:n.querySelector(`.${Or}`),l=`rtt: ${i.rtt} ms upLoss: ${i.upLoss} downLoss: ${i.downLoss} <br>
10
10
  \u2191 ${a/1e3} KB/s (${8*a/1e3} Kb/s) <br>
11
11
  \u2193 ${s/1e3} KB/s (${8*s/1e3} Kb/s) <br>
12
- `;c.innerHTML=l;let d=(x=this._dialogNode)==null?void 0:x.querySelector(`.${wr}`),p="";i.localStatistics.audio.bitrate&&(p=`<li>local audio: ${i.localStatistics.audio.bitrate} Kb/s audioLevel: ${i.localStatistics.audio.audioLevel.toFixed(5)}</li>`),i.localStatistics.video.length>0&&(p+=`${i.localStatistics.video.map(v=>`<li>local ${v.videoType} video: ${v.bitrate} Kb/s ${v.width}*${v.height} ${v.frameRate}fps</li>`).join("")}`),d.innerHTML=p===""?`${Y.NO_DATA}`:p;let S=(f=this._dialogNode)==null?void 0:f.querySelector(`.${Dr}`),g="";i.remoteStatistics.length>0&&i.remoteStatistics.forEach(v=>{let A=`remote ${v.userId}:`;v.audio.bitrate>0&&(A+=`<li>audio: ${v.audio.bitrate} Kb/s audioLevel: ${v.audio.audioLevel.toFixed(5)}</li>`),v.video.length>0&&v.video.forEach(R=>{A+=`<li>${R.videoType} video: ${R.bitrate} Kb/s ${R.width}*${R.height} ${R.frameRate}fps</li>`}),g+=A}),S.innerHTML=g===""?`${Y.NO_DATA}`:g});Er=!0,this._core=t,this._log=r,this.addStyle(),this.addDialog(),this.synchronizeLog(),this.installEvents()}synchronizeLog(){this._core.loggerManager.getQueue().forEach(r=>{this.updateLog(r)})}addStyle(){this._dialogStyle=document.createElement("style"),this._dialogStyle.innerHTML=`
12
+ `;c.innerHTML=l;let d=(x=this._dialogNode)==null?void 0:x.querySelector(`.${wr}`),p="";i.localStatistics.audio.bitrate&&(p=`<li>local audio: ${i.localStatistics.audio.bitrate} Kb/s audioLevel: ${i.localStatistics.audio.audioLevel.toFixed(5)}</li>`),i.localStatistics.video.length>0&&(p+=`${i.localStatistics.video.map(v=>`<li>local ${v.videoType} video: ${v.bitrate} Kb/s ${v.width}*${v.height} ${v.frameRate}fps</li>`).join("")}`),d.innerHTML=p===""?`${Y.NO_DATA}`:p;let S=(f=this._dialogNode)==null?void 0:f.querySelector(`.${Dr}`),g="";i.remoteStatistics.length>0&&i.remoteStatistics.forEach(v=>{let E=`remote ${v.userId}:`;v.audio.bitrate>0&&(E+=`<li>audio: ${v.audio.bitrate} Kb/s audioLevel: ${v.audio.audioLevel.toFixed(5)}</li>`),v.video.length>0&&v.video.forEach(R=>{E+=`<li>${R.videoType} video: ${R.bitrate} Kb/s ${R.width}*${R.height} ${R.frameRate}fps</li>`}),g+=E}),S.innerHTML=g===""?`${Y.NO_DATA}`:g});Ar=!0,this._core=t,this._log=r,this.addStyle(),this.addDialog(),this.synchronizeLog(),this.installEvents()}synchronizeLog(){this._core.loggerManager.getQueue().forEach(r=>{this.updateLog(r)})}addStyle(){this._dialogStyle=document.createElement("style"),this._dialogStyle.innerHTML=`
13
13
  #${P}
14
14
  {--DD-BG-0:#ededed;--DD-BG-1:#f7f7f7;--DD-BG-2:#fff;--DD-BORDER:rgba(0,0,0,0.1);--DD-ERROR:red;--DD-WARN:#fa9d3b;--DD-INFO:#000;--DD-DEBUG:#10aeff;--DD-WARN-BG:#fff3cc;--DD-ERROR-BG:#ffe6e6;}
15
15
  #${P} a,.${Vt}{cursor:pointer;}
@@ -20,10 +20,10 @@ var Lr=Object.defineProperty;var Bo=Object.getOwnPropertyDescriptor;var $o=(e,t,
20
20
  @media (max-width:768px) {.${zt}{left:0;}}
21
21
  .${Sr}{display:flex;height:2rem;border-bottom:1px solid var(--DD-BORDER);}
22
22
  .${jt}{padding:0 20px;border-right:1px solid rgba(0, 0, 0, 0.1);line-height:2rem;color: black;}
23
- .${jt}.${Ae}{background-color:var(--DD-BG-2);}
23
+ .${jt}.${Ee}{background-color:var(--DD-BG-2);}
24
24
  .${xr}{height:2rem;display:flex;flex-direction:row;}
25
25
  .${Ve}{width:20%;text-align:center;line-height:2rem;border-right:1px solid var(--DD-BORDER);border-bottom:1px solid var(--DD-BORDER);color:black;}
26
- .${Ve}.${Ae}{border-bottom:1px solid #1485ee;background-color:var(--DD-BG-2);}
26
+ .${Ve}.${Ee}{border-bottom:1px solid #1485ee;background-color:var(--DD-BG-2);}
27
27
  .${Se}{background-color:#fff;position:absolute;left:0;right:0;top:2rem;bottom:6rem;overflow-y:scroll;overflow-x:hidden;}
28
28
  .${Se}.${qt}{top:4rem;}
29
29
  .${ze}{display:flex;display:none;}
@@ -31,8 +31,8 @@ var Lr=Object.defineProperty;var Bo=Object.getOwnPropertyDescriptor;var $o=(e,t,
31
31
  .${Or},.${wr},.${Dr}{text-align:center;border-bottom:1px solid var(--DD-BORDER);}
32
32
  .${xe}{border-bottom:1px solid var(--DD-BG-0);padding:5px 10px;overflow-wrap: break-word;}
33
33
  .${Co}{color:var(--DD-ERROR);background-color:var(--DD-ERROR-BG);}
34
- .${Ao}{color:var(--DD-WARN);background-color:var(--DD-WARN-BG);}
35
- .${Eo}{color:var(--DD-INFO);}
34
+ .${Eo}{color:var(--DD-WARN);background-color:var(--DD-WARN-BG);}
35
+ .${Ao}{color:var(--DD-INFO);}
36
36
  .${Do}{color:var(--DD-DEBUG);}
37
37
  .${Kt}{position:absolute;left:0;right:0;bottom:2rem;height:4rem;border-bottom:1px solid var(--DD-BORDER);display:flex;flex-direction:column;overflow-y:scroll;background-color:var(--DD-BG-1);}
38
38
  .${Oo}{border-bottom:1px solid var(--DD-BORDER);padding:5px 10px;overflow-wrap: break-word;}
@@ -47,8 +47,8 @@ var Lr=Object.defineProperty;var Bo=Object.getOwnPropertyDescriptor;var $o=(e,t,
47
47
  .tippy-arrow {width: 16px;height: 16px;color: #333;}
48
48
  .tippy-arrow:before {content: "";position: absolute;border-color: transparent;border-style: solid;}.tippy-box[data-placement^=top]>.tippy-arrow:before {bottom: -7px;left: 0;border-width: 8px 8px 0; border-top-color: initial;transform-origin: center top;}
49
49
  .tippy-box[data-placement^=top]>.tippy-arrow {bottom: 0;}
50
- `,document.body.appendChild(this._dialogStyle)}addDialog(){this._dialogNode=this.createDiaLog(),document.body.appendChild(this._dialogNode)}createDiaLog(){var s,c,l,d;this._isMobile=Qt();let t=document.createElement("template");t.innerHTML=`<div id="${P}" class="${P}"><div class="${Vt}">Debug</div><div class="${Tr}"></div><div class="${zt}"><a class="${vt}">${Y.BACK_TOP}</a><a class="${bt}">${Y.GO_BOTTOM}</a><div class="${Sr}"><a class="${jt} ${Ae}" data-tab="log">${Y.LOG_BUTTON}</a><a class="${jt}" data-tab="network">${Y.NETWORK_BUTTON}</a></div><div class="${xr}"><a class="${Ve} ${Ae}" data-type="all">All</a><a class="${Ve}" data-type="debug">Debug</a><a class="${Ve}" data-type="info">Info</a><a class="${Ve}" data-type="warn">Warn</a><a class="${Ve}" data-type="error">Error</a></div><div class="${Se} ${qt}"><div class="${xo}"></div><div class="${ze}"><div class="${Gt}">${Y.BASIC}</div><div class="${Or}">${Y.NO_DATA}</div><div class="${Gt}">${Y.UPLINK}</div><div class="${wr}">${Y.NO_DATA}</div><div class="${Gt}">${Y.DOWNLINK}</div><div class="${Dr}">${Y.NO_DATA}</div></div></div><div class="${Kt}"></div><div class="${wo}"><a id="trtc_upload" class="${gt}">${Y.UPLOAD_BUTTON}</a><a id="trtc_export" class="${gt}">${Y.EXPORT_BUTTON}</a><a id="trtc_hide" class="${gt}">${Y.HIDE_BUTTON}</a></div></div></div>`;let r=t.content.firstChild;this._switchNode=r.querySelector(`.${Vt}`),(s=this._switchNode)==null||s.addEventListener("click",this.onSwitchClick.bind(this)),this.dragable(this._switchNode),this._maskNode=r.querySelector(`.${Tr}`),(c=this._maskNode)==null||c.addEventListener("click",this.onMaskClick.bind(this)),this._pannelNode=r.querySelector(`.${zt}`),(l=r.querySelector(`.${vt}`))==null||l.addEventListener("click",this.onBackTopClick.bind(this)),(d=r.querySelector(`.${bt}`))==null||d.addEventListener("click",this.onGoBottomClick.bind(this)),this._logContentNode=r.querySelector(`.${xo}`),this._networkContentNode=r.querySelector(`.${ze}`),this._tabNodes=Array.from(r.querySelector(`.${Sr}`).children),this._tabNodes.forEach(p=>{p.addEventListener("click",this.onTabClick.bind(this))}),this._toptabNodes=Array.from(r.querySelector(`.${xr}`).children),this._toptabNodes.forEach(p=>{p.addEventListener("click",this.onToptabClick.bind(this))}),this._backTopButton=r.querySelector(`.${vt}`),this._goBottomButton=r.querySelector(`.${bt}`);let o=r.querySelector("#trtc_upload");o==null||o.addEventListener("click",this.onUploadClick.bind(this));let i=r.querySelector("#trtc_export");i==null||i.addEventListener("click",this.onExportClick.bind(this));let a=r.querySelector("#trtc_hide");return a==null||a.addEventListener("click",this.onHideClick.bind(this)),r}deleteDialog(){Er&&(Er=!1,this.uninstallEvents(),this._dialogNode&&(document.body.removeChild(this._dialogNode),this._dialogNode=null),this._dialogStyle&&(document.body.removeChild(this._dialogStyle),this._dialogStyle=null))}updateLog(t){var o;this._logList.push(t);let r=document.createElement("div");switch(r.classList.add(xe),t.level){case 4:r.classList.add(Co);break;case 2:r.classList.add(Eo);break;case 3:r.classList.add(Ao);break;case 1:r.classList.add(Do);break;default:break}r.textContent=t.log,this._showLogType!=="all"&&!r.classList.contains(`${xe}_${this._showLogType}`)&&(r.style.display="none"),(o=this._logContentNode)==null||o.appendChild(r),this.addHelper(r)}onSwitchClick(){if(this._hasMove){this._hasMove=!1;return}this._showDialog?this.hideDialog():(this._isMobile&&(this._maskNode.style.display="block"),this._pannelNode.style.display="block",this._switchNode.style.display="none",this._showDialog=!0)}onTabClick(t){var i,a,s,c,l;let r=t.target;(i=this._tabNodes)==null||i.forEach(d=>{d.classList.remove(Ae)}),r.classList.add(Ae);let o=r.getAttribute("data-tab");o==="log"?((s=(a=this._dialogNode)==null?void 0:a.querySelector(`.${Se}`))==null||s.classList.add(qt),this._logContentNode.style.display="block",this._networkContentNode.style.display="none",this._goBottomButton.style.display="block",this._backTopButton.style.display="block"):o==="network"&&((l=(c=this._dialogNode)==null?void 0:c.querySelector(`.${Se}`))==null||l.classList.remove(qt),this._networkContentNode.style.display="block",this._logContentNode.style.display="none",this._backTopButton.style.display="none",this._goBottomButton.style.display="none")}onToptabClick(t){var a,s;let r=t.target;(a=this._toptabNodes)==null||a.forEach(c=>{c.classList.remove(Ae)}),r.classList.add(Ae),this._showLogType=r.getAttribute("data-type");let o=(s=this._logContentNode)==null?void 0:s.querySelectorAll(`.${xe}`),i=`${xe}_${this._showLogType}`;o.forEach(c=>{c.classList.contains(i)||this._showLogType==="all"?c.style.display="block":c.style.display="none"})}onExportClick(){let t=this._logList.reduce((s,c)=>`${s+c.log}
50
+ `,document.body.appendChild(this._dialogStyle)}addDialog(){this._dialogNode=this.createDiaLog(),document.body.appendChild(this._dialogNode)}createDiaLog(){var s,c,l,d;this._isMobile=Qt();let t=document.createElement("template");t.innerHTML=`<div id="${P}" class="${P}"><div class="${Vt}">Debug</div><div class="${Tr}"></div><div class="${zt}"><a class="${vt}">${Y.BACK_TOP}</a><a class="${bt}">${Y.GO_BOTTOM}</a><div class="${Sr}"><a class="${jt} ${Ee}" data-tab="log">${Y.LOG_BUTTON}</a><a class="${jt}" data-tab="network">${Y.NETWORK_BUTTON}</a></div><div class="${xr}"><a class="${Ve} ${Ee}" data-type="all">All</a><a class="${Ve}" data-type="debug">Debug</a><a class="${Ve}" data-type="info">Info</a><a class="${Ve}" data-type="warn">Warn</a><a class="${Ve}" data-type="error">Error</a></div><div class="${Se} ${qt}"><div class="${xo}"></div><div class="${ze}"><div class="${Gt}">${Y.BASIC}</div><div class="${Or}">${Y.NO_DATA}</div><div class="${Gt}">${Y.UPLINK}</div><div class="${wr}">${Y.NO_DATA}</div><div class="${Gt}">${Y.DOWNLINK}</div><div class="${Dr}">${Y.NO_DATA}</div></div></div><div class="${Kt}"></div><div class="${wo}"><a id="trtc_upload" class="${gt}">${Y.UPLOAD_BUTTON}</a><a id="trtc_export" class="${gt}">${Y.EXPORT_BUTTON}</a><a id="trtc_hide" class="${gt}">${Y.HIDE_BUTTON}</a></div></div></div>`;let r=t.content.firstChild;this._switchNode=r.querySelector(`.${Vt}`),(s=this._switchNode)==null||s.addEventListener("click",this.onSwitchClick.bind(this)),this.dragable(this._switchNode),this._maskNode=r.querySelector(`.${Tr}`),(c=this._maskNode)==null||c.addEventListener("click",this.onMaskClick.bind(this)),this._pannelNode=r.querySelector(`.${zt}`),(l=r.querySelector(`.${vt}`))==null||l.addEventListener("click",this.onBackTopClick.bind(this)),(d=r.querySelector(`.${bt}`))==null||d.addEventListener("click",this.onGoBottomClick.bind(this)),this._logContentNode=r.querySelector(`.${xo}`),this._networkContentNode=r.querySelector(`.${ze}`),this._tabNodes=Array.from(r.querySelector(`.${Sr}`).children),this._tabNodes.forEach(p=>{p.addEventListener("click",this.onTabClick.bind(this))}),this._toptabNodes=Array.from(r.querySelector(`.${xr}`).children),this._toptabNodes.forEach(p=>{p.addEventListener("click",this.onToptabClick.bind(this))}),this._backTopButton=r.querySelector(`.${vt}`),this._goBottomButton=r.querySelector(`.${bt}`);let o=r.querySelector("#trtc_upload");o==null||o.addEventListener("click",this.onUploadClick.bind(this));let i=r.querySelector("#trtc_export");i==null||i.addEventListener("click",this.onExportClick.bind(this));let a=r.querySelector("#trtc_hide");return a==null||a.addEventListener("click",this.onHideClick.bind(this)),r}deleteDialog(){Ar&&(Ar=!1,this.uninstallEvents(),this._dialogNode&&(document.body.removeChild(this._dialogNode),this._dialogNode=null),this._dialogStyle&&(document.body.removeChild(this._dialogStyle),this._dialogStyle=null))}updateLog(t){var o;this._logList.push(t);let r=document.createElement("div");switch(r.classList.add(xe),t.level){case 4:r.classList.add(Co);break;case 2:r.classList.add(Ao);break;case 3:r.classList.add(Eo);break;case 1:r.classList.add(Do);break;default:break}r.textContent=t.log,this._showLogType!=="all"&&!r.classList.contains(`${xe}_${this._showLogType}`)&&(r.style.display="none"),(o=this._logContentNode)==null||o.appendChild(r),this.addHelper(r)}onSwitchClick(){if(this._hasMove){this._hasMove=!1;return}this._showDialog?this.hideDialog():(this._isMobile&&(this._maskNode.style.display="block"),this._pannelNode.style.display="block",this._switchNode.style.display="none",this._showDialog=!0)}onTabClick(t){var i,a,s,c,l;let r=t.target;(i=this._tabNodes)==null||i.forEach(d=>{d.classList.remove(Ee)}),r.classList.add(Ee);let o=r.getAttribute("data-tab");o==="log"?((s=(a=this._dialogNode)==null?void 0:a.querySelector(`.${Se}`))==null||s.classList.add(qt),this._logContentNode.style.display="block",this._networkContentNode.style.display="none",this._goBottomButton.style.display="block",this._backTopButton.style.display="block"):o==="network"&&((l=(c=this._dialogNode)==null?void 0:c.querySelector(`.${Se}`))==null||l.classList.remove(qt),this._networkContentNode.style.display="block",this._logContentNode.style.display="none",this._backTopButton.style.display="none",this._goBottomButton.style.display="none")}onToptabClick(t){var a,s;let r=t.target;(a=this._toptabNodes)==null||a.forEach(c=>{c.classList.remove(Ee)}),r.classList.add(Ee),this._showLogType=r.getAttribute("data-type");let o=(s=this._logContentNode)==null?void 0:s.querySelectorAll(`.${xe}`),i=`${xe}_${this._showLogType}`;o.forEach(c=>{c.classList.contains(i)||this._showLogType==="all"?c.style.display="block":c.style.display="none"})}onExportClick(){let t=this._logList.reduce((s,c)=>`${s+c.log}
51
51
  `,""),r=new Blob([t],{type:"text/plain"}),o=document.createElement("a"),i=URL.createObjectURL(r);o.href=i;let a=`trtc_${this._core.room.sdkAppId===void 0?"EmptySdkAppId":this._core.room.sdkAppId}_${this._core.room.userId===void 0?"EmptyUserId":this._core.room.userId}_${new Date().getTime()}.log`;o.download=a,o.style.display="none",document.body.appendChild(o),o.click(),URL.revokeObjectURL(i),document.body.removeChild(o),this.addInfoToBanner(Lo,z?`\u5BFC\u51FA\u6210\u529F\uFF1A\u65E5\u5FD7\u6587\u4EF6\u540D\u4E3A${a}`:`Export success: The log file name is ${a}`),this._core.kvStatManager.addSuccessEvent({key:592703}),this._log.info("Export success: The log file name is ${fileName}")}addInfoToBanner(t,r){var a;let o=(a=this._dialogNode)==null?void 0:a.querySelector(`.${Kt}`),i=document.createElement("div");i.classList.add(Oo),i.innerText=`${t===Lo?"\u{1F7E9}":"\u{1F7E5} "} [${this.getCurrentTime()}] ${r}`,o.appendChild(i),o.scrollTop=o.scrollHeight}async onUploadClick(){var c;if(this.isUploading)return;this.isUploading=!0;let t=(c=this._dialogNode)==null?void 0:c.querySelector("#trtc_upload");t.innerText=z?"\u4E0A\u4F20\u4E2D...":"Uploading...",t==null||t.classList.add(".disable");let r=this._logList.reduce((l,d)=>`${l+d.log}
52
52
  `,""),o=new Blob([r],{type:"text/plain"}),i=new FormData,a="trtc.log";i.append("file",o,a),i.append("sdkAppId",`${this._core.room.sdkAppId||"EmptySdkAppId"}`),i.append("userId",`${this._core.room.userId||"EmptyUserId"}`),fetch("https://service.trtc.qcloud.com/api/uploadLogFile",{method:"POST",body:i}).then(l=>l.json()).then(l=>{this.addInfoToBanner(l.type,z?l.message_zh:l.message_en),this.isUploading=!1,this._log.info(l.message_en),this._core.kvStatManager.addSuccessEvent({key:592704})}).catch(()=>{this.addInfoToBanner(ji,z?"\u4E0A\u4F20\u5931\u8D25\uFF1A\u8BF7\u4F7F\u7528\u672C\u5730\u5BFC\u51FA":"Upload Failed: Please use local export"),this._log.info("Upload Failed: Please use local export"),this._core.kvStatManager.addFailedEvent({key:592704})}).finally(()=>{t.innerText=z?"\u4E0A\u4F20":"Upload",t==null||t.classList.remove(".disable"),this.isUploading=!1})}onHideClick(){this.hideDialog()}onMaskClick(){this.hideDialog()}hideDialog(){this._isMobile&&(this._maskNode.style.display="none"),this._pannelNode.style.display="none",this._switchNode.style.display="block",this._showDialog=!1}onBackTopClick(){var t,r;(r=(t=this._dialogNode)==null?void 0:t.querySelector(`.${Se}`))==null||r.scrollTo(0,0)}onGoBottomClick(){var r;let t=(r=this._dialogNode)==null?void 0:r.querySelector(`.${Se}`);t==null||t.scrollTo(0,t==null?void 0:t.scrollHeight)}dragable(t){var p,S;let r={x:0,y:0,startX:0,startY:0,endX:0,endY:0,isTouchEnd:!1};r.x=((p=this._switchNode)==null?void 0:p.offsetLeft)||50,r.y=((S=this._switchNode)==null?void 0:S.offsetTop)||150;let o=g=>{g.preventDefault(),r.startX=g.pageX,r.startY=g.pageY,document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)},i=g=>{g.cancelable&&g.preventDefault(),this._hasMove=!0;let m=r.x-(g.pageX-r.startX),b=r.y-(g.pageY-r.startY);[m,b]=d(m,b),this._switchNode.style.right=`${m}px`,this._switchNode.style.bottom=`${b}px`,r.endX=m,r.endY=b},a=()=>{r.startX=0,r.startY=0,r.x=r.endX,r.y=r.endY,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)},s=g=>{r.startX=g.touches[0].pageX,r.startY=g.touches[0].pageY,r.isTouchEnd=!1},c=()=>{r.isTouchEnd&&(r.startX=0,r.startY=0,r.isTouchEnd=!1,r.x=r.endX,r.y=r.endY)},l=g=>{if(g.touches.length<=0)return;let m=g.touches[0].pageX-r.startX,b=g.touches[0].pageY-r.startY,y=Math.floor(r.x-m),T=Math.floor(r.y-b);[y,T]=d(y,T),this._switchNode.style.right=`${y}px`,this._switchNode.style.bottom=`${T}px`,r.endX=y,r.endY=T,r.isTouchEnd=!0,g.cancelable&&g.preventDefault()},d=(g,m)=>{let b=Math.max(document.documentElement.offsetWidth,window.innerWidth),y=Math.max(document.documentElement.offsetHeight,window.innerHeight);return g+this._switchNode.offsetWidth>b&&(g=b-this._switchNode.offsetWidth),m+this._switchNode.offsetHeight>y&&(m=y-this._switchNode.offsetHeight),g<0&&(g=0),m<20&&(m=20),[g,m]};Qt()?(t.addEventListener("touchstart",s,{passive:!1}),t.addEventListener("touchend",c,{passive:!1}),t.addEventListener("touchmove",l,{passive:!1})):t.addEventListener("mousedown",o)}installEvents(){this._core.innerEmitter.on("264",this.handleLog,this),this._core.room.on("network-quality",this.handleNetworkQuality,this),this._core.room.on("heartbeat-report",this.handleHeartbeatReport,this)}uninstallEvents(){this._core.innerEmitter.off("264",this.handleLog,this),this._core.room.off("network-quality",this.handleNetworkQuality,this),this._core.room.off("heartbeat-report",this.handleHeartbeatReport,this)}handleLog(t){this.updateLog(t.log)}addHelper(t){let r=/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/g,o=Nr,i=t.innerText;i=i.split(`
53
53
  `).map(a=>{if(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"),a.includes("failed"))return a.includes("on autoplay-failed")?a:`<span class='red' style="background:red; color:#fff;">${a}</span>`;if(a.includes("clientIp:")){let s=a.match(r);return s==null||s.forEach(c=>{a=a.replace(c,`<a href="javascript:void(0);" target=""><span class='ip' style="background:#e1dfdf">${c}</span></a>`)}),a}return a.includes("URL of current page")&&(a=a.replace(/URL of current page: (.+)/,'URL of current page: <a href="$1">$1</a>')),a}).join(`
54
- `),o.forEach(a=>{if(t.innerText.includes(a)){let s=`tooltip-${this.tippyCount}`;i=i.replace(new RegExp(`${Ur(a)}`,"gi"),`<span id="${s}" class='${te[a].class||te[a].color||"gray"}' style="background:${te[a].color||"#e1dfdf"}; color: ${te[a].textColor||"#000"}">${a}</span>`),setTimeout(()=>{let c="";z?c=typeof te[a].tips_zh=="function"?te[a].tips_zh(t.innerText):te[a].tips_zh:c=typeof te[a].tips_en=="function"?te[a].tips_en(t.innerText):te[a].tips_en;let l=document.getElementById(`${s}`);l&&So(l,{content:c,zIndex:10004,placement:"top"})},500),this.tippyCount+=1}}),t.innerHTML=i}getCurrentTime(){let t=s=>s<10?`0${s}`:`${s}`,r=new Date,o=t(r.getHours()),i=t(r.getMinutes()),a=t(r.getSeconds());return`${o}:${i}:${a}`}};Jt([Zt(300,()=>"export")],yt.prototype,"onExportClick",1),Jt([Zt(300,()=>"upload")],yt.prototype,"onUploadClick",1);var Ro=yt;var tt=null,Ft=null,_t=class _t{constructor(t){this.core=t;w(this,"seq");w(this,"_core");w(this,"log");return Ft||(this._core=t,this.log=t.log.createChild({id:this.getAlias()}),this.log.info("created"),Ft=this,Ft)}getName(){return _t.Name}getAlias(){return"dm"}getGroup(){return"dm"}getValidateRule(t){switch(t){case"start":return Rr();case"update":return kr();case"stop":return Pr()}}start(){Ir&&this._openDebugDiaLog(),new URLSearchParams(location.search).get("trtcDebug")&&this._openDebugDiaLog()}update(){}stop(){this._closeDebugDiaLog()}destroy(){this.log.info("destroyed")}_openDebugDiaLog(){tt||(tt=new Ro(this._core,this.log))}_closeDebugDiaLog(){tt==null||tt.deleteDialog(),tt=null}};w(_t,"Name","Debug"),w(_t,"autoStart",!0);var Ar=_t;var bc=Ar;export{Ar as Debug,bc as default};
54
+ `),o.forEach(a=>{if(t.innerText.includes(a)){let s=`tooltip-${this.tippyCount}`;i=i.replace(new RegExp(`${Ur(a)}`,"gi"),`<span id="${s}" class='${te[a].class||te[a].color||"gray"}' style="background:${te[a].color||"#e1dfdf"}; color: ${te[a].textColor||"#000"}">${a}</span>`),setTimeout(()=>{let c="";z?c=typeof te[a].tips_zh=="function"?te[a].tips_zh(t.innerText):te[a].tips_zh:c=typeof te[a].tips_en=="function"?te[a].tips_en(t.innerText):te[a].tips_en;let l=document.getElementById(`${s}`);l&&So(l,{content:c,zIndex:10004,placement:"top"})},500),this.tippyCount+=1}}),t.innerHTML=i}getCurrentTime(){let t=s=>s<10?`0${s}`:`${s}`,r=new Date,o=t(r.getHours()),i=t(r.getMinutes()),a=t(r.getSeconds());return`${o}:${i}:${a}`}};Jt([Zt(300,()=>"export")],yt.prototype,"onExportClick",1),Jt([Zt(300,()=>"upload")],yt.prototype,"onUploadClick",1);var Ro=yt;var tt=null,Ft=null,_t=class _t{constructor(t){this.core=t;w(this,"seq");w(this,"_core");w(this,"log");return Ft||(this._core=t,this.log=t.log.createChild({id:this.getAlias()}),this.log.info("created"),Ft=this,Ft)}getName(){return _t.Name}getAlias(){return"dm"}getGroup(){return"dm"}getValidateRule(t){switch(t){case"start":return Rr();case"update":return kr();case"stop":return Pr()}}start(){Ir&&this._openDebugDiaLog(),new URLSearchParams(location.search).get("trtcDebug")&&this._openDebugDiaLog()}update(){}stop(){this._closeDebugDiaLog()}destroy(){this.log.info("destroyed")}_openDebugDiaLog(){tt||(tt=new Ro(this._core,this.log))}_closeDebugDiaLog(){tt==null||tt.deleteDialog(),tt=null}};w(_t,"Name","Debug"),w(_t,"autoStart",!0);var Er=_t;var bc=Er;export{Er as Debug,bc as default};