@polyv/live-watch-sdk
Version:
SDK for creating a live stream viewing page using Polyv's services.
1 lines • 1.03 MB
JavaScript
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(n=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new n(e)}function r(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,c,"next",e)}function c(e){r(o,i,a,s,c,"throw",e)}s(void 0)})}}function a(e,t,n){var r;return t=d(t),(r=I()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))&&("object"===S(r)||"function"==typeof r)?r:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function s(e,t,n){return(s=I()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&m(i,n.prototype),i}).apply(null,arguments)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function h(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function p(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){l(e,t,n[t])})}return e}function y(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,n){return t(e)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}(e,n)||C(e,n)||p()}function k(e){return t(e)||v(e)||C(e)||p()}function x(t){return function(t){if(Array.isArray(t))return e(t)}(t)||v(t)||C(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function C(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}}function w(e){var t="function"==typeof Map?new Map:void 0;return(w=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),m(n,e)})(e)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}function E(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function P(){var e;try{e="2.17.0"}catch(e){}return e}var M,T,A,L,R,D,O,W,N,U,j,B,F,V,q,z,H,G,Q,K,$,J,X,Y,Z,ee,et,en,er,ei,ea,eo,es,ec,eu,el,ed,ef,eh,ev,ep,eg,ey,e_,em,eb,ek,ex,eS,eC,ew,eI,eE,eP,eM,eT,eA,eL,eR,eD,eO,eW,eN,eU,ej,eB,eF,eV,eq,ez,eH,eG,eQ,eK,e$,eJ,eX,eY,eZ,e0,e1,e2,e4,e3,e5,e6,e8,e7,e9,te,tt,tn,tr,ti,ta,to,ts,tc,tu,tl,td,tf,th,tv,tp,tg,ty,t_,tm,tb,tk,tx,tS,tC,tw,tI,tE,tP,tM,tT,tA,tL,tR,tD,tO,tW,tN,tU,tj,tB,tF,tV,tq,tz,tH,tG,tQ,tK,t$,tJ,tX,tY,tZ,t0,t1,t2,t4,t3,t5,t6,t8,t7,t9,ne,nt,nn,nr,ni,na,no,ns,nc,nu,nl,nd,nf,nh,nv,np,ng,ny,n_,nm,nb,nk,nx,nS,nC,nw,nI,nE,nP,nM,nT,nA,nL,nR,nD,nO,nW,nN,nU,nj,nB,nF,nV,nq,nz,nH,nG,nQ,nK,n$,nJ,nX,nY,nZ,n0,n1,n2,n4,n3,n5,n6,n8,n7,n9,re,rt,rn,rr,ri,ra,ro,rs,rc,ru,rl,rd,rf,rh,rv,rp,rg,ry,r_,rm,rb,rk,rx,rS,rC,rw,rI,rE,rP,rM,rT,rA,rL,rR,rD,rO,rW,rN,rU,rj,rB,rF,rV,rq,rz,rH=['"',"'","&","<",">"," "],rG=[""","'","&","<",">"," "],rQ=Object.create(null),rK=Object.create(null);rH.forEach(function(e,t){rQ[e]=rG[t],rK[rG[t]]=e});var r$=RegExp("["+rH.join("")+"]","g"),rJ=RegExp("("+rG.join("|")+")","g");function rX(e){return null==e?e:String(e).replace(r$,function(e){return rQ[e]})}function rY(e){return null==e?e:String(e).replace(rJ,function(e){return rK[e]})}function rZ(){var e=Date.now();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)})}var r0=function(){function e(){o(this,e),this.__eventStore={}}return u(e,[{key:"__addOnEvent",value:function(e,t,n,r){if(t&&n){var i=this.__eventStore[t];i||(i=[]),i.push({type:e,handler:n,callbackHandler:n.bind(r)}),this.__eventStore[t]=i}}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this.__addOnEvent("normal",e,t,n)}},{key:"once",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this.__addOnEvent("once",e,t,n)}},{key:"off",value:function(e,t){var n=this.__eventStore[e];n&&(n=n.filter(function(e){return e.handler!==t}),this.__eventStore[e]=n)}},{key:"emit",value:function(e,t,n){var r=this,i=this.__eventStore[e];i&&i.forEach(function(i){try{var a=i.type,o=i.handler,s=i.callbackHandler;"function"==typeof s&&s(t,n),"once"===a&&r.off(e,o)}catch(e){console.error(e)}})}},{key:"destroy",value:function(){this.__eventStore={}}}]),e}(),r1=((j={}).LoginRefuse="LOGIN_REFUSE",j.OnSliceStart="onSliceStart",j.OnSliceId="onSliceID",j.SeminarRestartLive="restartLive",j.SeminarStopLive="stopLive",j.TokenExpired="TOKEN_EXPIRED",j.ProductMessage="PRODUCT_MESSAGE",j.ImageTextMenuChange="IMAGE_TEXT_FOR_SHUNFENG",j.Speak="SPEAK",j.Likes="LIKES",j.IsUnderstand="isUnderstand",j.Login="LOGIN",j.Logout="LOGOUT",j.ExitWhenIsMain="EXIT_WHEN_IS_MAIN",j.SetNick="SET_NICK",j.ChatImg="CHAT_IMG",j.StudentQuestion="S_QUESTION",j.TeacherAnswer="T_ANSWER",j.GetFullMessage="GET_FULL_MESSAGE",j.FinanceRiskEvaluationReset="RESET",j.ProductClick="PRODUCT_CLICK",j.ProductBuyTimes="PRODUCT_BUY_TIMES",j.SignInTimes="SIGN_IN_TIMES",j.TeacherSetPermission="TEACHER_SET_PERMISSION",j.ChangeVideoAndPPTPosition="changeVideoAndPPTPosition",j.AddTimeAxisMarkPoint="ADD_DOT",j.DeleteTimeAxisMarkPoint="DELETE_DOT",j.EditTimeAxisMarkPoint="EDIT_DOT",j.SubtitlesEnable="ENABLE",j.SubtitlesRealCC="ADD",j.SubtitlesTranslate="TRANSLATE",j.ChangeDoubleMode="changeDoubleMode",j.FinishClass="finishClass",j.TransmitChannelSwitch="SWITCH_TRANSMIT_CHANNEL",j.MotivationLikes="LIKES",j.InviteActivityOver="OVER",j.InviteActivityChangeEndTimer="CHANGE_TIMMER",j.RemoveUser="REMOVE_USER",j.SpeakToTop="TO_TOP",j.SpeakCancelTop="CANCEL_TOP",j.ListenLanguage="LISTEN_LANGUAGE",j.ToggleGongGao="TOGGLE_GONGGAO",j.Debug="DEBUG",j.GuideStreamVideoSizeChange="videoSize",j),r2=((B={}).Bubble="bubble",B.Emotion="emotion",B.Message="message",B.Speak="speak",B.FinanceRiskEvaluation="evaluation",B.Product="product",B.JoinRequest="joinRequest",B.JoinResponse="joinResponse",B.JoinLeave="joinLeave",B.JoinSuccess="joinSuccess",B.Video="video",B.Subtitles="subtitles",B.Transmit="transmit",B.CustomMessage="customMessage",B.Motivation="motivation",B.Invite="invite",B.WhiteList="whiteList",B.InteractEvent="interactEvent",B.Withdrawal="withdrawal",B),r4=((F={}).GetChatHistory="/front/getChatHistory",F.GetHistoryBySessionId="/front/getHistoryBySessionId",F.GetEmotionImage="/front/getEmotionImages",F.GetEnEmotionImage="/front/getEmotionImages/en",F.TemporarySaveUserMsg="/front/temporarySaveUserMsg",F.GetUserListNew="/front/viewer/user-list",F.GetUserListSession="/front/viewer/user-list/session",F.GetAskHistoryNew="/front/channel/question-list-by-user/get",F.GetSubtitlesHistory="/front/channel/subtitles/get",F.GetHistoryByTime="/front/channel/chat-history-by-timestamp/get",F.GetHistoryByTimeEncrypt="/front/channel/chat-history-list-by-timestamp/get",F.GetChannelFileList="/front/channel/file-list/get",F),r3=((V={}).ChatSdkV2Setuped="ChatSdkV2Setuped",V.ChatInfoChange="ChatInfoChange",V.ChatReconnectSuccess="ChatReconnectSuccess",V.ChatConnectFail="ChatConnectFail",V.ChatMessage="ChatMessage",V.ReplaceChatMessage="ReplaceChatMessage",V.ChatLike="ChatLike",V.ChatLikeCountChange="ChatLikeCountChange",V.ChatEmotionalFeedback="ChatEmotionalFeedback",V.ChatUserLogin="ChatUserLogin",V.ChatUserLogout="ChatUserLogout",V.CurrentUserRelogin="CurrentUserRelogin",V.ClearMsgHistory="ClearMsgHistory",V.RemoveChatMsg="RemoveChatMsg",V.CloseChatRoom="CloseChatRoom",V.OpenChatRoom="OpenChatRoom",V.OnlineUserCountChange="OnlineUserCountChange",V.OnlineUserListChange="OnlineUserListChange",V.ChatMsgReplayReload="ChatMsgReplayReload",V.ChatMsgReplayStatusChange="ChatMsgReplayStatusChange",V.ChatMsgReplaying="ChatMsgReplaying",V.ChatMsgReplayCurrentDetailList="ChatMsgReplayCurrentDetailList",V.ChatMsgReplayTimeUpdate="ChatMsgReplayTimeUpdate",V.SelfSpeak="SelfSpeak",V.OverMaxOnlineCount="OverMaxOnlineCount",V.WhiteListRemoveUser="WhiteListRemoveUser",V.SpeakToTop="SpeakToTop",V.SpeakCancelTop="SpeakCancelTop",V.OverLoginLimit="OverLoginLimit",V),r5=((q={}).Top="top",q.CancelTop="cancelTop",q),r6=((z={}).File="file",z),r8=((H={}).Student="student",H.Slice="slice",H.Viewer="viewer",H.Teacher="teacher",H.Assistant="assistant",H.Manager="manager",H.Guest="guest",H.Attendee="attendee",H.Listener="listener",H.Host="host",H.Dummy="dummy",H),r7=((G={}).TokenExpired="TokenExpired",G.SocketConnectError="SocketConnectError",G.SocketConnectTimeout="SocketConnectTimeout",G.SocketReconnectAttempt="SocketReconnectAttempt",G),r9=((Q={}).Speak="speak",Q.Image="image",Q.Emotion="emotion",Q.Reward="reward",Q.File="file",Q.Redpaper="redpaper",Q.RedpaperReceive="redpaperReceive",Q.CustomerMessage="customerMessage",Q.CustomMessage="customMessage",Q.System="system",Q.MotivationLike="motivationLike",Q.SpeakTop="speakTop",Q.SpeakCancelTop="speakCancelTop",Q.Effect="effect",Q.IarPushCard="iarPushCard",Q.IarCheckIn="iarCheckIn",Q.IarAnswerCard="iarAnswerCard",Q.IarQuestionnaire="iarQuestionnaire",Q.Unknown="unknown",Q),ie=((K={})[K.No=0]="No",K[K.Yes=1]="Yes",K),it=(($={}).Prev="prev",$.Next="next",$),ir=((J={}).Loading="loading",J.Fail="fail",J.Default="default",J),ii=((X={}).Compact="compact",X.Loose="loose",X),ia=((Y={}).System="SYSTEM",Y.Festival="FESTIVAL",Y.Custom="CUSTOM",Y),io=((Z={}).Speak="speak",Z.Mic="mic",Z),is=((ee={})[ee.Init=0]="Init",ee[ee.Pre=1]="Pre",ee[ee.Next=2]="Next",ee),ic=((et={}).Wait="Wait",et.InitFail="InitFail",et.InitSuccess="InitSuccess",et.RequestHistoryFail="RequestHistoryFail",et),iu=/^(?:([a-z]+):)?\/{2,3}/i;function il(e,t){return iu.test(t)||(t+="://"),iu.test(e)?e.replace(iu,t):t+e}var id=function(){function e(t){o(this,e),l(this,"__watchCore",void 0),this.__watchCore=t}return u(e,[{key:"getWatchCore",value:function(){return this.__watchCore}},{key:"updateAppConfig",value:function(e){}},{key:"setup",value:function(){}},{key:"bindSocketEvents",value:function(){}},{key:"destroy",value:function(){}}]),e}(),ih=function(e){function t(e){var n;return o(this,t),l(n=a(this,t,[e]),"eventEmitter",new r0),l(n,"__chatCoreConfig",{}),l(n,"__chatCore",void 0),l(n,"socketTarget",void 0),l(n,"chatTarget",void 0),n}return f(t,e),u(t,[{key:"getChatCoreConfig",value:function(){return this.__chatCoreConfig}},{key:"updateChatCoreConfig",value:function(e){this.__chatCoreConfig=g({},this.__chatCoreConfig,e)}},{key:"_setChatCore",value:function(e){this.__chatCore=e}},{key:"_setupChatCoreModule",value:function(){var e=this;return i(function(){return E(this,function(t){switch(t.label){case 0:if(!e.__chatCore)throw Error("[chat-module] please setChatCore");return[4,e.__chatCore.setup()];case 1:return t.sent(),[2]}})})()}},{key:"getChatCore",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(e&&!this.__chatCore)throw Error("未创建 chatCore");return this.__chatCore}},{key:"getSocket",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=this.getChatCore(!1);if(e&&!(null==t?void 0:t.socket))throw Error("未创建 chatCore 或未创建 socket");return null==t?void 0:t.socket}},{key:"emitChatWs",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.getChatCore(!0);return new Promise(function(a){r.emitWs(e,JSON.stringify(t),i(function(){var e,t,r,i=arguments;return E(this,function(o){for(t=Array(e=i.length),r=0;r<e;r++)t[r]=i[r];return n?a(t=t.map(function(e){return JSON.parse(e)})):a(t),[2]})}))})}},{key:"_destroyChatCore",value:function(){var e=this;return i(function(){return E(this,function(t){switch(t.label){case 0:if(!e.__chatCore)return[3,2];return[4,e.__chatCore.destroy()];case 1:t.sent(),e.__chatCore=void 0,t.label=2;case 2:return[2]}})})()}},{key:"_destroyChatCoreModule",value:function(){this._destroyChatCore(),this.eventEmitter.destroy()}}]),t}(id),iv=((en={}).Cash="cash",en.Good="good",en);function ip(e,t){var n=String(e).toUpperCase();if("Y"!==n&&"N"!==n){if(null==t)throw Error('The value argument must be "Y" or "N"');n=String(t).toUpperCase()}return"Y"===n}var ig=((er={}).GetApiToken="/v3/common/channel/viewer/get-api-token",er.VerifyViewerLoginToken="/v3/common/auth/api-auth/viewer/set-info",er.GetChannelDetail="/v3/common/channel/detail",er.GetViewerInfo="/v3/common/channel/viewer",er.GetViewerPlaybackInfo="/v3/common/channel/viewer/playback-info",er.VerifyViewerUnique="/v3/watch/channel/verify/unique",er.GetPlayToken="/v3/watch/playback/video/get-play-token",er.VerifyNoneAuth="/v3/common/auth/none-auth/viewer/set-info",er.VerifyPhoneAuth="/v3/common/auth/phone-auth/check",er.GetAuthPayData="/v3/common/auth/pay-auth/check",er.CheckAuthPayStatus="/v3/common/auth/pay-auth/check-status",er.GetWechatPayCheckData="/v3/common/auth/pay-auth/get-pay-check",er.CheckAuthWechatPayStatus="/v3/common/auth/pay-auth/pay-check",er.VerifyCodeAuth="/v3/common/auth/code-auth/check-auth-code",er.VerifyInfoAuth="/v3/common/auth/info-auth/save",er.LoginInfoAuth="/v3/common/auth/info-auth/check",er.GetCustomAuthUrl="/v3/common/auth/custom-auth/get-url",er.VerifyCustomAuth="/v3/common/auth/custom-auth/check",er.VerifyExternalAuth="/v3/common/auth/external-auth/check",er.VerifyDirectAuth="/v3/common/auth/direct-auth/check",er.VerifyInviteWatchAuth="/v3/common/auth/invite-auth/check",er.GetInviteWatchAuthInfo="/v3/common/auth/invite-auth/get-info-status",er.CreateImageCaptcha="/v3/common/kaptcha",er.SendSmsVerifyCode="/v3/common/sms/verify-code/send",er.GetMultiMeetingLiveStatus="/v3/watch/channel/multi-meeting/live-status",er.GetWechatAuthUrl="/v3/common/wx/auth",er.GetWorkWechatAuthUrl="/v3/common/wx-work/auth",er.GetWorkWeixinCode="/v3/common/wx-work/code",er.GetWeixinSdkSign="/v3/secure/wx/get-share-sign",er.GetWorkWeixinSdkSign="/v3/secure/wx-work/get-share-sign",er.SubmitEnrollForm="/v3/watch/channel/enroll/save",er.CheckEnrollMobile="/v3/watch/channel/enroll/check-mobile",er.LoginEnroll="/v3/watch/channel/enroll/login",er.InviteCurrentRank="/v3/watch/channel/invite/current-rank",er.InviteDetailList="/v3/watch/channel/invite/list",er.InviteDetailStatus="/v3/watch/channel/invite/export-status",er.InviteDetailExport="/v3/watch/channel/invite/export",er.SendLike="/v3/watch/channel/like",er.SetNick="/v3/watch/channel/viewer/set-nickname",er.PayDonate="/v3/watch/channel/donate/donate",er.CheckDonatePayStatus="/v3/watch/channel/donate/check-status",er.PayDonatePoint="/v3/watch/channel/point-donate/donate",er.GetDonateSurplusPoint="/v3/watch/channel/point-donate/get-point",er.SubmitLiveBooking="/v3/common/channel/booking",er.CancelLiveBooking="/v3/common/channel/booking/cancel",er.SubmitSmsLiveBooking="/v3/common/channel/booking/sms",er.CancelSmsLiveBooking="/v3/common/channel/booking/sms/cancel",er.WxLiveBooking="/v3/common/channel/booking/wx",er.CancelWxLiveBooking="/v3/common/channel/booking/wx/cancel",er.SendRedpack="/v3/watch/channel/redpack/send",er.ApplyWithdraw="/v3/watch/channel/withdraw/apply",er.ApplyWithdrawTransferBill="/v3/watch/channel/withdraw/transfer/bill",er.CancelApplyWithdrawTransferBill="/v3/watch/channel/withdraw/transfer/bill/cancel",er.CheckWithdrawStatus="/v3/watch/channel/withdraw/transfer/bill/out-bill-no",er.GetUserWithdrawStatistics="/v3/watch/channel/withdraw/user/statistics",er.GetWithdrawRecord="/v3/watch/channel/withdraw/list",er.TranslateText="/v3/watch/channel/translate",er.GetPlaybackList="/v3/watch/playback/video/list",er.GetPlaybackId="/v3/watch/playback/video/get",er.GetPushInfo="/v3/common/channel/push/get",er.GetMicroActivityDetail="/v3/watch/channel/micro-activity/get",er.PostChannelTrialInfo="/v3/common/channel/trial",er.GetChannelRiskConfirmInfo="/v3/watch/channel/risk-confirm/get",er.PostChannelRiskConfirmSave="/v3/watch/channel/risk-confirm/save",er.GetMultiMeetingList="/v3/watch/channel/multi-meeting/page",er.ResaveRealNameUserId="/v3/watch/channel/viewer-verification/re-save",er.GetRealNameStatus="/v3/watch/channel/viewer-verification/verification",er.SaveRealNameData="/v3/watch/channel/viewer-verification/save",er.GetInvitePoster="/v3/watch/channel/invite/get",er.GetChannelAgreement="/v3/common/channel/agreement",er.PostInviteCustomerAuthCheck="/v3/common/auth/invite-customer-auth/check",er.GetTaskActivityStatus="/v3/common/channel/task-reward/activity-task-status",er.GetTaskRewardList="/v3/common/channel/task-reward/get",er.SubmitTaskQuestionnaire="/v3/common/channel/task-reward/submit-questionnaire-answer",er.SubmitTaskRewardReceive="/v3/common/channel/task-reward/submit-accept-info",er.CreateOrder="/v3/watch/channel/product/order/create",er.OrderPay="/v3/watch/channel/product/order/pay",er.SubtitleLanguageListAll="/v3/common/channel/subtitle/language/list-all",er.TaskActivityOnlineTaskReach="/v3/common/channel/task-reward/online-task/reach",er.GetPayProviders="/v3/watch/channel/product/order/payment-providers/get",er.GetChannelSessionList="/v3/watch/channel/session/list",er.GetAnchorInfo="/v3/common/channel/anchor/detail",er.GetAnchorChannelList="/v3/common/channel/anchor/channel-list",er.SmallClassLoginCheck="/v3/common/channel/login-check",er),iy=function(e){var t=e.channelId,n=e.pageNumber,r=e.pageSize;return"/v3/common/channel/invite/rank/list-".concat(t,"-").concat(n,"-").concat(r)},i_=((ei={}).Y="Y",ei.N="N",ei),im=function(e){function t(){return o(this,t),a(this,t,arguments)}return f(t,e),u(t,[{key:"getDonateConfig",value:function(){var e=this.getWatchCore().channel.getChannelDetail(!1);if(!e||!e.donateSetting)return console.warn("[donate-module] getDonateConfig will return default value"),t.generateDefaultDonateConfig();var n=e.donateSetting;return{donateCashEnabled:ip(n.donateCashEnabled,i_.N),donateGoodEnabled:ip(n.donateGoodEnabled,i_.N),donatePointEnabled:ip(n.donatePointEnabled,i_.N),donateCashMin:n.cashMin||0,donateCashQuickOptions:n.cashes||[],donatePointUnit:n.pointUnit||"",donateScoreUnit:n.scoreUnit||""}}},{key:"isShowDonateCash",value:function(){var e=this.getWatchCore(),t=e.weixin.getWeixinAccountFunctionEnabled(),n=e.weixin.getWeixinPayEnabled();return this.getDonateConfig().donateCashEnabled&&t&&n}},{key:"isShowDonateCashGood",value:function(){var e=this.getWatchCore(),t=e.weixin.getWeixinAccountFunctionEnabled(),n=e.weixin.getWeixinPayEnabled();return this.getDonateConfig().donateGoodEnabled&&t&&(n||this._isExistFreeGood())}},{key:"isShowDonatePointGood",value:function(){return this.getDonateConfig().donatePointEnabled}},{key:"_isExistFreeGood",value:function(){return -1!==this._getCashGoods().findIndex(function(e){return 0===e.goodPrice&&ip(e.goodEnabled,i_.Y)})}},{key:"isFreeReward",value:function(e){var t=this._getCashGoods().find(function(t){return t.goodName===e});return!!t&&0===t.goodPrice}},{key:"__formateGoodList",value:function(e){return e.map(function(e,t){return y(g({},e),{goodId:"".concat(t+1),goodImage:e.dynamicImg||e.goodImg})})}},{key:"_getPointGoods",value:function(){var e,t=this.getWatchCore().channel.getChannelDetail(!1);return this.__formateGoodList((null==t?void 0:null===(e=t.donateSetting)||void 0===e?void 0:e.pointGoods)||[])}},{key:"_getCashGoods",value:function(){var e,t=this.getWatchCore().channel.getChannelDetail(!1);return this.__formateGoodList((null==t?void 0:null===(e=t.donateSetting)||void 0===e?void 0:e.goods)||[])}},{key:"getDonateGoods",value:function(){var e=this,t=this._getCashGoods(),n=this.isShowDonateCash(),r=this.isShowDonateCashGood();!n&&r&&(t=t.filter(function(t){return e.isFreeReward(t.goodName)}));var i=this._getPointGoods();return{goods:this.isShowDonatePointGood()?i:t,cashGoods:t,pointGoods:i}}},{key:"payDonate",value:function(e){var t=this;return i(function(){var n,r,i,a,o,s,c;return E(this,function(u){switch(u.label){case 0:return i=t.getWatchCore(),o=void 0===(a=e.goodCount)?1:a,[4,i.polyvWatchApi.post(ig.PayDonate,{roomId:i.chat.getChatRoomId(),sessionId:i.getCurrentTargetSessionId(),donateType:e.donateType,goodId:e.goodId,goodNum:o,amount:e.amount})];case 1:return s=u.sent(),c={goodId:e.goodId,goodCount:o,amount:e.amount,logId:s.logId,donateType:s.donateType,isFree:ip(s.freeDonate,i_.N)},(null===(n=s.wxPayOrder)||void 0===n?void 0:n.payId)&&(c.logId=s.wxPayOrder.payId),(null===(r=s.wxPayOrder)||void 0===r?void 0:r.codeUrl)&&(c.codeUrl=s.wxPayOrder.codeUrl,c.qrCodeUrl=i.utils.generateQrcodeUrl(s.wxPayOrder.codeUrl)),s.wxPayOrder&&s.wxPayOrder.timeStamp&&s.wxPayOrder.nonceStr&&s.wxPayOrder.prepayId&&s.wxPayOrder.signType&&s.wxPayOrder.paySign&&(c.wxPaySignData={timestamp:Number(s.wxPayOrder.timeStamp),nonceStr:s.wxPayOrder.nonceStr,package:s.wxPayOrder.prepayId,signType:s.wxPayOrder.signType,paySign:s.wxPayOrder.paySign}),[2,c]}})})()}},{key:"checkDonatePayStatus",value:function(e){var t=this;return i(function(){return E(this,function(n){switch(n.label){case 0:return[4,t.getWatchCore().polyvWatchApi.post(ig.CheckDonatePayStatus,{logId:e.logId,donateType:e.donateType})];case 1:return[2,{paySuccess:ip(n.sent().hasPay,i_.N)}]}})})()}},{key:"getDonateSurplusPoint",value:function(){var e=this;return i(function(){var t;return E(this,function(n){switch(n.label){case 0:return[4,(t=e.getWatchCore()).polyvWatchApi.get(ig.GetDonateSurplusPoint,{channelId:t.channel.getChannelId()})];case 1:return[2,n.sent().point||0]}})})()}},{key:"payDonatePoint",value:function(e){var t=this;return i(function(){var n;return E(this,function(r){switch(r.label){case 0:return[4,(n=t.getWatchCore()).polyvWatchApi.post(ig.PayDonatePoint,{roomId:n.chat.getChatRoomId(),sessionId:n.getCurrentTargetSessionId(),goodId:e.goodId,goodNum:e.goodCount})];case 1:return[2,r.sent().point||0]}})})()}},{key:"__getDefaultSvgaDir",value:function(){var e=this.getWatchCore().domain.getDomainInfo();return"".concat(e.resourceDomain,"/default-img/donate-svga")}},{key:"getDonateSvgaUrl",value:function(e){var n=t.svgaMap,r=document.createElement("a");r.href=e;var i=r.pathname.split("/"),a=i[i.length-1].split(".")[0];if(n[a])return"".concat(this.__getDefaultSvgaDir(),"/").concat(n[a])}}],[{key:"generateDefaultDonateConfig",value:function(){return{donateCashEnabled:!1,donateGoodEnabled:!1,donatePointEnabled:!1,donateCashMin:0,donateCashQuickOptions:[],donatePointUnit:"",donateScoreUnit:""}}}]),t}(id);function ib(e){return"string"==typeof e}function ik(e){return"number"==typeof e}function ix(e){return"boolean"==typeof e}function iS(e){return void 0===e}function iC(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",n="",r=0;r<e;r++)n+=t.charAt(Math.floor(Math.random()*t.length));return n}function iw(e,t){return Math.floor(Math.random()*(t-e+1))+e}function iI(e,t){var n=t.replace(/^\+/,"");return"".concat(n,"-").concat(e)}function iE(e){var t=e.match(/[^.]+$/);return t?t[0]:""}function iP(e){if("string"!=typeof e||!e.trim())return 0;var t=e.split(":");return 3600*Number(t[0])+60*Number(t[1])+Number(t[2])}function iM(e){var t=e;try{return t=JSON.parse(t),{success:!0,data:t}}catch(e){return{success:!1,data:t}}}function iT(e,t,n){var r,i=n||{},a=i.maxCount,o=void 0===a?1/0:a,s=i.immediate,c=0,u=function(){r=window.setTimeout(function(){e(),++c<o?u():window.clearTimeout(r)},"function"==typeof t?t():t)};return void 0!==s&&s&&e(),u(),{clear:function(){window.setTimeout(function(){window.clearTimeout(r)},0)}}}function iA(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;return new Promise(function(t){setTimeout(function(){t()},e)})}function iL(e){return 0===e.length?null:e[e.length-1]}function iR(e,t){var n=function(e){var t=b(e.split("-")[0].split(".").map(Number),3);return{major:t[0],minor:t[1],patch:t[2]}},r=n(e),i=n(t);return r.major!==i.major?r.major>i.major:r.minor!==i.minor?r.minor>i.minor:r.patch===i.patch||r.patch>i.patch}l(im,"svgaMap",{coffee:"coffee.svga",like:"like.svga",handclap:"handclap.svga",666:"666.svga",star:"star.svga",diamond:"diamond.svga",car:"car.svga",rocket:"rocket.svga",bear:"bear.svga",crown:"crown.svga",cup:"cup.svga",microphone:"microphone.svga",villa:"villa.svga",house:"villa.svga"});var iD=["ppt","pptx","pdf","xlsx","xls","doc","docx"];function iO(e){return iD.includes(e.toLocaleLowerCase())}function iW(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return e.replace(/<|>|"|&/g,function(e){switch(e){case"<":return"<";case">":return">";case""":return'""';case"&":return"&";default:return""}}).length>t}var iN=function(){function e(t,n){o(this,e),l(this,"__chatModule",void 0),l(this,"__watchCore",void 0),this.__chatModule=t,this.__watchCore=n}return u(e,[{key:"__getMsgUid",value:function(e){var t=e.user;if("uid"in t)return t.uid}},{key:"filterApiMsgList",value:function(e){var t=this,n=[];return e.forEach(function(e){var r;switch(e.msgSource){case"chatImg":r=t.filterImgApiMsg(e);break;case"reward":r=t.filterRewardApiMsg(e);break;case"file":r=t.filterFileApiMsg(e);break;case"redpaper":r=t.filterRedpaperApiMsg(e);break;case"customerMessage":r=t.filterCustomerApiMsg(e);break;case"custom":r=t.filterCustomApiMsg(e);break;default:var i=t.__getMsgUid(e);i&&(r=t.__filterApiMsgByUid(i,e)),r||(r=t.filterSpeakApiMsg(e))}r&&n.push(r)}),n}},{key:"__filterApiMsgByUid",value:function(e,t){if("1"===e)return this.filterRewardApiMsg(t)}},{key:"filterApiQuote",value:function(e){if(void 0!==e){var t,n=e.user?this.__filterUser(e.user).nick:e.nick;switch(e.msgType){case"chatImg":t={msgSource:r9.Image,imageUrl:e.image.url,size:{width:e.image.width,height:e.image.height},userId:e.userId,nick:n};break;case"redpaper":var r=JSON.parse(e.content);t=y(g({msgSource:r9.Redpaper},r),{nick:n});break;case"customerMessage":t={msgSource:r9.CustomerMessage,content:e.content,nick:n};break;default:t={msgSource:r9.Speak,content:e.content,userId:e.userId,nick:n}}return t}}},{key:"__filterUser",value:function(e){if(e&&!e.userId&&(e.userId="system"),e&&e.nick){var t=this.__chatModule.getWatchCore(),n=t.user.isSpecialUserType(e.userType,e.actor),r=t.user.isCurrentUser(e.userId);n||r||(e.nick=t.utils.processForceHiddenNickname(e.nick))}return e}},{key:"filterCommonApiMsg",value:function(e,t){var n=this.__filterUser(e.user);return{id:e.id,msgSource:t,time:e.time,user:n}}},{key:"filterSpeakApiMsg",value:function(e){return y(g({},this.filterCommonApiMsg(e,r9.Speak)),{content:e.content,quote:this.filterApiQuote(e.quote),isOverLength:!!e.overLen||iW(e.content),overLen:!!e.overLen})}},{key:"filterImgApiMsg",value:function(e){return"chatImg"===e.content.type?y(g({},this.filterCommonApiMsg(e,r9.Image)),{imageId:e.content.id,imageUrl:e.content.uploadImgUrl,size:e.content.size}):y(g({},this.filterCommonApiMsg(e,r9.Emotion)),{emotionId:e.content.id,emotionUrl:e.content.uploadImgUrl,size:e.content.size})}},{key:"filterRewardApiMsg",value:function(e){return y(g({},this.filterCommonApiMsg(e,r9.Reward)),{gimg:e.content.gimg,goodNum:e.content.goodNum,donateType:e.content.gimg?iv.Good:iv.Cash,rewardContent:e.content.rewardContent,isSelf:this.__watchCore.user.isCurrentUser(e.user.userId),isFree:this.__watchCore.donate.isFreeReward(e.content.rewardContent)})}},{key:"filterFileApiMsg",value:function(e){var t=JSON.parse(e.content);return iO(iE(t.name))?y(g({},this.filterCommonApiMsg(e,r9.File)),{fileUrl:t.url,fileName:t.name}):y(g({},this.filterCommonApiMsg(e,r9.Image)),{imageId:rZ(),imageUrl:t.url})}},{key:"filterRedpaperApiMsg",value:function(e){var t,n=null===(t=e.userTags)||void 0===t?void 0:t.map(function(e){return Number(e)}),r=g(y(g({},e),{userLabels:n}),this.filterCommonApiMsg(e,r9.Redpaper));return delete r.userTags,r}},{key:"filterCustomerApiMsg",value:function(e){return y(g({},this.filterCommonApiMsg(e,r9.CustomerMessage)),{content:e.content})}},{key:"filterCustomApiMsg",value:function(e){return g({},e,this.filterCommonApiMsg(e,r9.CustomMessage))}}]),e}(),iU=function(){function e(t,n){o(this,e),l(this,"__chatModule",void 0),l(this,"__watchCore",void 0),this.__chatModule=t,this.__watchCore=n}return u(e,[{key:"__filterMsgUser",value:function(e){if(!e)return e;if(e.userId||(e.userId="system"),e&&e.nick){var t=this.__chatModule.getWatchCore(),n=t.user.isSpecialUserType(e.userType,e.actor),r=t.user.isCurrentUser(e.userId);n||r||(e.nick=t.utils.processForceHiddenNickname(e.nick))}return e}},{key:"filterMsgOriginQuote",value:function(e){var t,n=this.__filterMsgUser(e.user).nick;switch(e.msgSource){case r9.Speak:t={msgSource:r9.Speak,content:e.content,userId:e.user.userId,nick:n};break;case r9.Image:t={msgSource:r9.Image,imageUrl:e.imageUrl,size:e.size,userId:e.user.userId,nick:n};break;case r9.Redpaper:t=y(g({},e),{nick:n,msgSource:r9.Redpaper});break;case r9.CustomerMessage:t={msgSource:r9.CustomerMessage,nick:n,content:e.content}}return t}},{key:"filterSdkQuote",value:function(e){if(void 0!==e){var t,n=e.user?this.__filterMsgUser(e.user).nick:e.nick;switch(e.msgType){case"CHAT_IMG":t={msgSource:r9.Image,imageUrl:e.image.url,size:{width:e.image.width,height:e.image.height},userId:e.userId,nick:n};break;case"REDPAPER":t=y(g({},e.content),{nick:n,msgSource:r9.Redpaper});break;case"NORMAL":t={msgSource:r9.Speak,content:e.content,userId:e.userId,nick:n}}return t}}},{key:"filterSpeakSdkMsg",value:function(e){return"FILE"===e.msgType?this.filterFileSdkMsg(e):{msgSource:r9.Speak,id:e.id,time:e.time,user:this.__filterMsgUser(e.user),content:e.content,quote:this.filterSdkQuote(e.quote),isOverLength:!!e.overLen||iW(e.content),overLen:!!e.overLen}}},{key:"filterFileSdkMsg",value:function(e){return iO(iE(e.content.name))?{msgSource:r9.File,id:e.id,time:e.time,user:this.__filterMsgUser(e.user),fileName:e.content.name,fileUrl:e.content.url}:{msgSource:r9.Image,id:e.id,time:e.time,user:this.__filterMsgUser(e.user),imageId:rZ(),imageUrl:e.content.url}}},{key:"filterChatImgSdkMsg",value:function(e){var t={msgSource:r9.Image,id:e.id,time:e.time,user:this.__filterMsgUser(e.user),imageId:e.content.id,imageUrl:e.content.uploadImgUrl,size:e.content.size};return ix(e.result)&&!1===e.result&&(t.isIllegal=!0),t}},{key:"filterEmotionSdkMsg",value:function(e){return{msgSource:r9.Emotion,id:e.id,time:Date.now(),emotionUrl:e.content.uploadImgUrl,user:this.__filterMsgUser(e.user)}}},{key:"filterRewardSdkMsg",value:function(e){return{msgSource:r9.Reward,id:rZ(),time:Date.now(),gimg:e.content.gimg,goodNum:e.content.goodNum,rewardContent:e.content.rewardContent,donateType:e.content.gimg?iv.Good:iv.Cash,isSelf:this.__watchCore.user.isCurrentUser(e.content.rewardUser.userId),isFree:this.__watchCore.donate.isFreeReward(e.content.rewardContent),user:this.__filterMsgUser({userId:e.content.rewardUser.userId,nick:e.content.unick,pic:e.content.uimg,userType:this.__watchCore.user.getUserType()})}}},{key:"filterRedpaperSdkMsg",value:function(e){return y(g({},e),{msgSource:r9.Redpaper,id:rZ(),time:e.timestamp,user:this.__filterMsgUser(e.user)})}},{key:"filterRedpaperReceiveSdkMsg",value:function(e){var t="redpaper-receive-msg-"+rZ();return{msgSource:r9.RedpaperReceive,id:t,time:Date.now(),nick:this.__filterMsgUser({userId:e.redpackId,nick:e.nick,userType:r8.Viewer}).nick,type:e.type,isOver:ip(e.isOver,i_.N)}}},{key:"filterCustomerSdkMsg",value:function(e){return{msgSource:r9.CustomerMessage,id:e.id,time:Date.now(),user:this.__filterMsgUser(e.user),content:e.content}}},{key:"filterCustomSdkMsg",value:function(e){return y(g({},e),{msgSource:r9.CustomMessage,user:this.__filterMsgUser(e.user)})}}]),e}(),ij=((ea={}).ChannelSetupFail="ChannelSetupFail",ea.LiveStatusChange="LiveStatusChange",ea.SessionIdChange="SessionIdChange",ea.SeminarHostJoinInGroup="SeminarHostJoinInGroup",ea.SeminarHostLeaveGroup="SeminarHostLeaveGroup",ea.ForceChangePlaybackStatus="ForceChangePlaybackStatus",ea.ViewerWatchDuration="ViewerWatchDuration",ea.TransmitDoubleRoomChange="TransmitDoubleRoomChange",ea.TransmitChannelSwitch="TransmitChannelSwitch",ea.ManagerBulletinMarquee="ManagerBulletinMarquee",ea.TestModeChange="TestModeChange",ea.AuthExpired="AuthExpired",ea),iB=((eo={}).Alone="alone",eo.Ppt="ppt",eo.Seminar="seminar",eo),iF=((es={}).Undefined="undefined",es.TopClass="topclass",es.Train="train",es.Double="double",es.Seminar="seminar",es.Alone="alone",es.Portrait="portrait",es.Meeting="meeting",es.Mr="mr",es.SmallClass="smallclass",es),iV=((ec={}).Live="live",ec.Waiting="waiting",ec.End="end",ec.Playback="playback",ec.Stop="stop",ec.UnStart="unStart",ec),iq=((eu={}).Desc="desc",eu.Chat="chat",eu.Text="text",eu.Seat="seat",eu.Quiz="quiz",eu.Iframe="iframe",eu.Previous="previous",eu.Tuwen="tuwen",eu.QA="qa",eu.Buy="buy",eu.Subtitle="realTimeSubtitle",eu.Invite="invite",eu.Members="members",eu.Vote="vote",eu.MicroActivity="microActivity",eu.MultiMeeting="multiMeeting",eu.AIAssistant="aiAssistant",eu.AISummary="aiSummary",eu),iz=((el={}).MenuDisplay="menuDisplay",el.CurrentPage="currentPage",el.NewPage="newPage",el),iH=((ed={}).Player="player",ed.Desc="desc",ed),iG=((ef={}).Single="single",ef.Double="double",ef),iQ=((eh={}).Normal="normal",eh.Transmit="transmit",eh.Receive="receive",eh),iK=((ev={}).Warm="warm",ev.Record="record",ev.Playback="playback",ev.Live="live",ev.End="end",ev),i$=((ep={}).Normal="normal",ep.Portrait="portrait",ep),iJ=((eg={}).Ppt="ppt",eg.Video="video",eg.FollowTeacher="followTeacher",eg.OnlyVideo="only-video",eg),iX=((ey={}).Player="player",ey.Doc="doc",ey),iY=((e_={}).Normal="normal",e_.Large="large",e_),iZ=((em={}).Black="black",em.Red="red",em.Blue="blue",em.White="white",em.Green="green",em.Golden="golden",em.Freshblue="freshblue",em),i0=((eb={}).Skin="skin",eb.Theme="theme",eb),i1=((ek={}).Unknow="Unknow",ek.RemoteLogin="RemoteLogin",ek),i2=((ex={}).CustomLiveAudio="CustomLiveAudio",ex.NormalAudio="NormalAudio",ex.OnlyAudio="OnlyAudio",ex.VrAudio="VrAudio",ex),i4=((eS={}).NetworkError="NetworkError",eS.NetworkRequestTimeout="NetworkRequestTimeout",eS.NotAllowDomain="NotAllowDomain",eS.NotAllowAccess="NotAllowAccess",eS.NotAvailableSession="NotAvailableSession",eS.Unknown="Unknown",eS),i3=((eC={}).Client="client",eC.Pull="pull",eC.ThirdPull="thirdpull",eC.Disk="disk",eC.Audio="audio",eC.Vr="vr",eC),i5=((ew={}).Cover="0",ew.Contain="2",ew),i6=((eI={}).UnStart="unStart",eI.End="end",eI.Live="live",eI.Playback="playback",eI.Expired="expired",eI),i8=((eE={}).LiveScreenshot="liveScreenshot",eE.SystemDefault="systemDefault",eE.Custom="custom",eE),i7=((eP={}).COMMON="common",eP.MULTI_PLATFORM="multiplatform",eP),i9=((eM={}).Single="Single",eM.Normal="Normal",eM.MultiLanguageTrack="MultiLanguageTrack",eM),ae=((eT={}).Text="text",eT.Image="image",eT),at=((eA={}).LivePlayback="livePlayback",eA.Live="live",eA.Playback="playback",eA);function an(e,t){return e===t||e!=e&&t!=t}function ar(e,t){for(var n=e.length;n--;)if(an(e[n][0],t))return n;return -1}var ai=Array.prototype.splice;function aa(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}aa.prototype.clear=function(){this.__data__=[],this.size=0},aa.prototype.delete=function(e){var t=this.__data__,n=ar(t,e);return!(n<0)&&(n==t.length-1?t.pop():ai.call(t,n,1),--this.size,!0)},aa.prototype.get=function(e){var t=this.__data__,n=ar(t,e);return n<0?void 0:t[n][1]},aa.prototype.has=function(e){return ar(this.__data__,e)>-1},aa.prototype.set=function(e,t){var n=this.__data__,r=ar(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ao=("undefined"==typeof global?"undefined":S(global))=="object"&&global&&global.Object===Object&&global,as=("undefined"==typeof self?"undefined":S(self))=="object"&&self&&self.Object===Object&&self,ac=ao||as||Function("return this")(),au=ac.Symbol,al=Object.prototype,ad=al.hasOwnProperty,af=al.toString,ah=au?au.toStringTag:void 0,av=Object.prototype.toString,ap=au?au.toStringTag:void 0;function ag(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ap&&ap in Object(e)?function(e){var t=ad.call(e,ah),n=e[ah];try{e[ah]=void 0;var r=!0}catch(e){}var i=af.call(e);return r&&(t?e[ah]=n:delete e[ah]),i}(e):av.call(e)}function ay(e){var t=void 0===e?"undefined":S(e);return null!=e&&("object"==t||"function"==t)}function a_(e){if(!ay(e))return!1;var t=ag(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var am=ac["__core-js_shared__"],ab=(eL=/[^.]+$/.exec(am&&am.keys&&am.keys.IE_PROTO||""))?"Symbol(src)_1."+eL:"",ak=Function.prototype.toString;function ax(e){if(null!=e){try{return ak.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var aS=/^\[object .+?Constructor\]$/,aC=Object.prototype,aw=Function.prototype.toString,aI=aC.hasOwnProperty,aE=RegExp("^"+aw.call(aI).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function aP(e,t){var n=null==e?void 0:e[t];return ay(n)&&(!ab||!(ab in n))&&(a_(n)?aE:aS).test(ax(n))?n:void 0}var aM=aP(ac,"Map"),aT=aP(Object,"create"),aA=Object.prototype.hasOwnProperty,aL=Object.prototype.hasOwnProperty;function aR(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function aD(e,t){var n,r=e.__data__;return("string"==(n=void 0===t?"undefined":S(t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?r["string"==typeof t?"string":"hash"]:r.map}function aO(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function aW(e){var t=this.__data__=new aa(e);this.size=t.size}aR.prototype.clear=function(){this.__data__=aT?aT(null):{},this.size=0},aR.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},aR.prototype.get=function(e){var t=this.__data__;if(aT){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return aA.call(t,e)?t[e]:void 0},aR.prototype.has=function(e){var t=this.__data__;return aT?void 0!==t[e]:aL.call(t,e)},aR.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=aT&&void 0===t?"__lodash_hash_undefined__":t,this},aO.prototype.clear=function(){this.size=0,this.__data__={hash:new aR,map:new(aM||aa),string:new aR}},aO.prototype.delete=function(e){var t=aD(this,e).delete(e);return this.size-=t?1:0,t},aO.prototype.get=function(e){return aD(this,e).get(e)},aO.prototype.has=function(e){return aD(this,e).has(e)},aO.prototype.set=function(e,t){var n=aD(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},aW.prototype.clear=function(){this.__data__=new aa,this.size=0},aW.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},aW.prototype.get=function(e){return this.__data__.get(e)},aW.prototype.has=function(e){return this.__data__.has(e)},aW.prototype.set=function(e,t){var n=this.__data__;if(h(n,aa)){var r=n.__data__;if(!aM||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new aO(r)}return n.set(e,t),this.size=n.size,this};var aN=function(){try{var e=aP(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function aU(e,t,n){"__proto__"==t&&aN?aN(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var aj=Object.prototype.hasOwnProperty;function aB(e,t,n){var r=e[t];aj.call(e,t)&&an(r,n)&&(void 0!==n||t in e)||aU(e,t,n)}function aF(e){return null!=e&&(void 0===e?"undefined":S(e))=="object"}function aV(e){return aF(e)&&"[object Arguments]"==ag(e)}var aq=Object.prototype,az=aq.hasOwnProperty,aH=aq.propertyIsEnumerable,aG=aV(function(){return arguments}())?aV:function(e){return aF(e)&&az.call(e,"callee")&&!aH.call(e,"callee")},aQ=Array.isArray,aK=("undefined"==typeof exports?"undefined":S(exports))=="object"&&exports&&!exports.nodeType&&exports,a$=aK&&("undefined"==typeof module?"undefined":S(module))=="object"&&module&&!module.nodeType&&module,aJ=a$&&a$.exports===aK?ac.Buffer:void 0,aX=(aJ?aJ.isBuffer:void 0)||function(){return!1},aY=/^(?:0|[1-9]\d*)$/;function aZ(e,t){var n=void 0===e?"undefined":S(e);return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&aY.test(e))&&e>-1&&e%1==0&&e<t}function a0(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}var a1={};function a2(e){return function(t){return e(t)}}a1["[object Float32Array]"]=a1["[object Float64Array]"]=a1["[object Int8Array]"]=a1["[object Int16Array]"]=a1["[object Int32Array]"]=a1["[object Uint8Array]"]=a1["[object Uint8ClampedArray]"]=a1["[object Uint16Array]"]=a1["[object Uint32Array]"]=!0,a1["[object Arguments]"]=a1["[object Array]"]=a1["[object ArrayBuffer]"]=a1["[object Boolean]"]=a1["[object DataView]"]=a1["[object Date]"]=a1["[object Error]"]=a1["[object Function]"]=a1["[object Map]"]=a1["[object Number]"]=a1["[object Object]"]=a1["[object RegExp]"]=a1["[object Set]"]=a1["[object String]"]=a1["[object WeakMap]"]=!1;var a4=("undefined"==typeof exports?"undefined":S(exports))=="object"&&exports&&!exports.nodeType&&exports,a3=a4&&("undefined"==typeof module?"undefined":S(module))=="object"&&module&&!module.nodeType&&module,a5=a3&&a3.exports===a4&&ao.process,a6=function(){try{var e=a3&&a3.require&&a3.require("util").types;if(e)return e;return a5&&a5.binding&&a5.binding("util")}catch(e){}}(),a8=a6&&a6.isTypedArray,a7=a8?a2(a8):function(e){return aF(e)&&a0(e.length)&&!!a1[ag(e)]},a9=Object.prototype.hasOwnProperty;function oe(e,t){var n=aQ(e),r=!n&&aG(e),i=!n&&!r&&aX(e),a=!n&&!r&&!i&&a7(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)(t||a9.call(e,u))&&!(o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||aZ(u,c)))&&s.push(u);return s}var ot=Object.prototype;function on(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ot)}function or(e,t){return function(n){return e(t(n))}}var oi=or(Object.keys,Object),oa=Object.prototype.hasOwnProperty;function oo(e){return null!=e&&a0(e.length)&&!a_(e)}function os(e){return oo(e)?oe(e):function(e){if(!on(e))return oi(e);var t=[];for(var n in Object(e))oa.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var oc=Object.prototype.hasOwnProperty;function ou(e){return oo(e)?oe(e,!0):function(e){if(!ay(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=on(e),n=[];for(var r in e)"constructor"==r&&(t||!oc.call(e,r))||n.push(r);return n}(e)}var ol=("undefined"==typeof exports?"undefined":S(exports))=="object"&&exports&&!exports.nodeType&&exports,od=ol&&("undefined"==typeof module?"undefined":S(module))=="object"&&module&&!module.nodeType&&module,of=od&&od.exports===ol?ac.Buffer:void 0,oh=of?of.allocUnsafe:void 0;function ov(e,t){if(t)return e.slice();var n=e.length,r=oh?oh(n):new e.constructor(n);return e.copy(r),r}var op=Object.prototype.propertyIsEnumerable,og=Object.getOwnPropertySymbols,oy=og?function(e){return null==e?[]:function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(og(e=Object(e)),function(t){return op.call(e,t)})}:function(){return[]},o_=or(Object.getPrototypeOf,Object);function om(e){var t;return t=os(e),aQ(e)?t:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(t,oy(e))}var ob=aP(ac,"DataView"),ok=aP(ac,"Promise"),ox=aP(ac,"Set"),oS=aP(ac,"WeakMap"),oC="[object Map]",ow="[object Promise]",oI="[object Set]",oE="[object WeakMap]",oP="[object DataView]",oM=ax(ob),oT=ax(aM),oA=ax(ok),oL=ax(ox),oR=ax(oS),oD=ag;(ob&&oD(new ob(new ArrayBuffer(1)))!=oP||aM&&oD(new aM)!=oC||ok&&oD(ok.resolve())!=ow||ox&&oD(new ox)!=oI||oS&&oD(new oS)!=oE)&&(oD=function(e){var t=ag(e),n="[object Object]"==t?e.constructor:void 0,r=n?ax(n):"";if(r)switch(r){case oM:return oP;case oT:return oC;case oA:return ow;case oL:return oI;case oR:return oE}return t});var oO=Object.prototype.hasOwnProperty,oW=ac.Uint8Array;function oN(e){var t=new e.constructor(e.byteLength);return new oW(t).set(new oW(e)),t}var oU=/\w*$/,oj=au?au.prototype:void 0,oB=oj?oj.valueOf:void 0;function oF(e,t){var n=t?oN(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var oV=Object.create,oq=function(){function e(){}return function(t){if(!ay(t))return{};if(oV)return oV(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function oz(e){return"function"!=typeof e.constructor||on(e)?{}:oq(o_(e))}var oH=a6&&a6.isMap,oG=oH?a2(oH):function(e){return aF(e)&&"[object Map]"==oD(e)},oQ=a6&&a6.isSet,oK=oQ?a2(oQ):function(e){return aF(e)&&"[object Set]"==oD(e)},o$="[object Arguments]",oJ="[object Function]",oX="[object Object]",oY={};function oZ(e){return function e(t,n,r,i,a,o){var s,c,u,l=1&n;if(void 0!==u)return u;if(!ay(t))return t;var d=aQ(t);if(d)s=t.length,c=new t.constructor(s),s&&"string"==typeof t[0]&&oO.call(t,"index")&&(c.index=t.index,c.input=t.input),u=c;else{var f=oD(t),h=f==oJ||"[object GeneratorFunction]"==f;if(aX(t))return ov(t,l);if(f==oX||f==o$||h&&!a)u=h?{}:oz(t);else{if(!oY[f])return a?t:{};u=function(e,t,n){var r,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return oN(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return r=oN(e.buffer),new e.constructor(r,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return oF(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new e.constructor(e.source,oU.exec(e))).lastIndex=e.lastIndex,i;case"[object Symbol]":return oB?Object(oB.call(e)):{}}}(t,f,l)}}o||(o=new aW);var v=o.get(t);if(v