1 line
39 KiB
Plaintext
1 line
39 KiB
Plaintext
"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["26003"],{547850:function(e,t,n){var i=n(101199),o=n(793571);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}t.Z=function(e,t){var n,r,s=(r=2,function(e){if(Array.isArray(e))return e}(n=(0,i.useState)(e))||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,o=!1,l=void 0;try{for(var r,s=e[Symbol.iterator]();!(i=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);i=!0);}catch(e){o=!0,l=e}finally{try{!i&&null!=s.return&&s.return()}finally{if(o)throw l}}return n}}(n,2)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}}(n,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],a=s[1];return(0,o.Z)(function(){a(e)},t,[e]),u}},793571:function(e,t,n){var i=n(101199),o=n(280647);function l(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}(e)||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 r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=r.immediately,u=void 0!==s&&s,a=r.trailing,d=void 0===a||a,c=r.leading,v=void 0!==c&&c,m=(0,i.useRef)(),f=(0,i.useRef)(!1),h=(0,i.useRef)(!1),p=(0,i.useRef)(e);p.current=e;var _=(0,i.useRef)([]),g=(0,i.useCallback)(function(){m.current&&clearTimeout(m.current)},[]),y=(0,i.useCallback)(function(){for(var e,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];if(_.current=i,u&&!f.current){p.current.apply(p,l(_.current)),f.current=!0;return}g(),v&&!1==h.current&&(p.current.apply(p,l(_.current)),h.current=!0),m.current=(e=d,window.setTimeout(function(){e&&p.current.apply(p,l(_.current)),h.current=!1},t))},[t,g]);return(0,o.Z)(function(){return y(),g},[].concat(l(n),[y])),(0,i.useEffect)(function(){return g},[]),{run:y,cancel:g}}},895629:function(e,t,n){n.d(t,{Z:function(){return S}});var i=n("320165"),o=n("101199"),l=n("849023"),r=n("469935"),s=n.n(r),u=n("720709"),a=n("405110"),d=n("176449"),c=n("9895"),v=n("383955");n("706056");var m=n("797194"),f=n("286066"),h=n("998629");let{ConversationType:p}=u.m,{GROUP_CHAT:_,ONE_TO_ONE_CHAT:g}=p;var y=n("399989"),w=n("81849");let{ConversationType:I}=u.m,{ONE_TO_ONE_CHAT:C}=I;var S=(0,l.inject)("imStore")((0,l.observer)(e=>{var t;let n;let{imStore:l,className:r,converSation:u,lastMessage:p,ext:g,flightStatus:I,participantType:S=v.tQ.REGULAR,showDraft:E=!0,isNeedFilterDraftMessage:P=!1}=e,{id:b}=u||{},{unSendMsgConversationMap:T,userInfoFromServerMap:x,userInfoFromSdkMap:k}=l,N=null==T?void 0:T[b],{visible:L,isFromMe:Z,content:j,sender:M,conversationId:U,conversationType:A}=p||{},O=I===a.b3.Failed||I===a.b3.Rejected,R=null==k?void 0:null===(t=k[U])||void 0===t?void 0:t[M],B=null==x?void 0:x[M];if(!p&&(null==u?void 0:u.type)===C){let{toParticipantUserId:e}=u||{};n=null==x?void 0:x[e]}let G=(0,o.useMemo)(()=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.tQ.REGULAR,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],{id:o,lastVisibleMessage:l,toParticipantUserId:r}=e||{};if(!l){let{userInfoFromServerMap:e}=f.Z,t=(null==e?void 0:e[r])||{},n=(null==t?void 0:t.remark_name)||(null==t?void 0:t.nickname)||r||"",i=n?`和“${n}”`:"";return`${i}打个招呼吧`}let{type:s,visible:u,isFromMe:a,content:d,sender:c,conversationId:p,conversationType:g,flightStatus:y}=l,{unSendMsgConversationMap:w,userInfoFromSdkMap:I,userInfoFromServerMap:C,abTestData:S}=f.Z,E=w[p],P="";if(E&&n&&!i)return`[草稿]${E.text}`;P=(0,m.gc)(l,!0);let b="";t===v.tQ.STRANGER?b=function(e){var t;let n="";if(!e)return n;let{type:i,visible:o,isFromMe:l,content:r,sender:s,conversationId:u,conversationType:a,isRecalled:d}=e,{unSendMsgConversationMap:c,userInfoFromSdkMap:v,userInfoFromServerMap:m}=f.Z,h=null==v?void 0:null===(t=v[u])||void 0===t?void 0:t[s],p=null==m?void 0:m[s],_=(null==p?void 0:p.remark_name)||(null==h?void 0:h.alias)||(null==p?void 0:p.nickname)||"";return n=d?`“${_}”`:`${_}:`}(l):t===v.tQ.REGULAR&&(b=function(e){let t="";if(!e)return t;let{type:n,visible:i,isFromMe:o,content:l,sender:r,conversationId:s,conversationType:u,isRecalled:a}=e,{unSendMsgConversationMap:d,userInfoFromSdkMap:c,userInfoFromServerMap:v}=f.Z,m=[h.pp.GROUP_NOTICE_MESSAGE,h.pp.GROUP_GREET_MESSAGE,h.pp.GROUP_ANNOUNCEMENT_MESSAGE];if(u===_&&!m.includes(n)||a&&!o){var p;let e=null==c?void 0:null===(p=c[s])||void 0===p?void 0:p[r],n=null==v?void 0:v[r],i=(null==n?void 0:n.remark_name)||(null==e?void 0:e.alias)||(null==n?void 0:n.nickname)||"";t=a?`“${i}”`:`${i}:`}return t}(l));let T="";return b&&(T+=b),P&&(T+=P),T||""})(u,S,E,P),[R,B,u,p,g,I,null==N?void 0:N.text,E,n]),D=(0,o.useMemo)(()=>y.O.getIsSaasPopup()?(0,m.gc)(p,!0):"",[p]);return(0,i.jsxs)("div",{className:s()(r,c.default.Hint),children:[O&&(0,i.jsx)(d.Z,{className:c.default.failIcon,src:w.Z,viewBox:"0 0 14 14"}),(0,i.jsx)("pre",{className:c.default.textBox,children:y.O.getIsSaasPopup()?D:G})]})}))},265881:function(e,t,n){n.r(t),n.d(t,{default:function(){return ee}});var i=n("629686"),o=n("320165"),l=n("101199"),r=n("849023"),s=n("469935"),u=n.n(s),a=n("426038"),d=n("19277"),c=n("414061"),v=n("173379"),m=n("168792");n("679308"),n("490629"),n("362051"),n("374954");var f=n("855436"),h=n("547850"),p=n("720709"),_=n("48795"),g=n("612582"),y=n("960496"),w=n("759894"),I=n("661444"),C=n("391302"),S=n("995898"),E=n("103680"),P=n("618759"),b=n("462478"),T=n("472570"),x=n("611311"),k=n("542046"),N=n("920161"),L=n("428601"),Z=n("746517"),j=n("549998"),M=n("915268"),U=n("471843"),A=n("203085"),O=n("732352"),R=n("802309"),B=n("724622");let G=(0,f.ZP)(()=>Promise.all([n.e("74792"),n.e("96537"),n.e("85614"),n.e("28161"),n.e("35148"),n.e("52165"),n.e("82727"),n.e("34994")]).then(n.bind(n,715892)),{resolveComponent:e=>e.PopDialog,ssr:!1}),D="dlg-active",H="dlb-login-guide-active",V=l.forwardRef((e,t)=>{let{hoverTimes:n,newHeaderIsNew:i,changeType:l}=e,r=("boolean"==typeof i?i:1===n)?"1":"0";return(0,o.jsx)("div",{className:T.default.imLoginGuidePanelWrapper,children:(0,o.jsxs)("div",{ref:t,className:T.default.imLoginGuidePanel,children:[(0,o.jsx)("p",{className:T.default.desc,children:"登录后即可查看私信消息"}),(0,o.jsx)("div",{className:T.default.loginBtn,onClick:()=>{var e,t;null==l||l("",!0),(0,Z.navShowAccount)({success:()=>{window.location.reload()},headerText:"登录后即可查看私信消息",next:`${y.tJ}${null===(t=window)||void 0===t?void 0:null===(e=t.location)||void 0===e?void 0:e.host}`,enterMethod:"IM",teaEvtParams:{is_new:r,is_guide:"1",enter_method:"IM"}})},children:"立即登录"})]})})}),F=(0,r.inject)("imStore")((0,r.observer)(e=>{let{isLogin:t,imStore:n={},abTestData:i,customProps:r,transparent:s,uInfo:a}=e,{allUnReadCount:d,curConversation:v={},maskIsTestGroupClickConversionListItem:m}=n,f=(0,h.Z)(t?d:0,300),{type:y,changeType:Z,clearShowTimer:F}=(0,x.P)({delayDisappear:200,delayShow:100}),$=(0,l.useRef)(),K=(0,l.useRef)(null),Q=(0,l.useRef)(null),[W,z]=(0,l.useState)(0);(0,l.useEffect)(()=>{n.setAbTestData(i)},[i]),(0,l.useEffect)(()=>{f>0&&(0,k.G)("chat_notif_show",{badge_num:f})},[f]);let Y=(0,l.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(t){if(Z(D),n.clearAllPushList(),c.emit(c.EVENT.showPushList,{from:"im",isShow:!1}),c.emit(c.EVENT.showHeaderPopUp,{type:"im",isShow:!0}),y!==D){var i,o,l;R.Z.mark("im_dialog_open",{detail:e});let t=R.Z.measure("lazy_load_im_entry_old_end_time","im_dialog_open");e&&n.setEnterConversation(e),(0,k.G)("chat_notif_hover",{duration:t,badge_num:f,enter_method:e||n.enterConversation||"",enter_from:(0,w.vM)()||"",url_source:null!==(l=null===(i=(0,I.pf)(null===(o=location)||void 0===o?void 0:o.href))||void 0===i?void 0:i.urlSource)&&void 0!==l?l:""})}}else Z(H),c.emit(c.EVENT.showHeaderPopUp,{type:"im",isShow:!0});let r=K.current;r&&clearTimeout(r),K.current=null},[t,y]),J=(0,l.useCallback)(async e=>{let{uid:t,enterMethod:i,groupInfo:o,callback:l}=e||{};if((0,C.sF)()&&!(0,C.kB)()&&!(0,S.Nr)(location.pathname)){E.asyncCall("webview:im:sendImUserMsg",{uid:t,enterMethod:i,groupInfo:o});return}if(o){let{id:e,shortId:t,type:r=2,inboxType:s=0,invitorUserId:u,sourceType:d=7,isAutoAdd:c}=o,v=!1;if(c){let n=await j.ImSdk.addParticipants({conversation:{id:e,shortId:t,type:r,inboxType:s,coreInfo:{inboxType:s}},participant:[`${a.uid}`],bizExt:{track_enter_from:"pc-im",invitation:JSON.stringify({invitee:{source_app_id:6383},invitor:{im_user_id:u},source_type:d})}});if(null==n?void 0:n.checkMsg)try{let e=JSON.parse(n.checkMsg);(null==e?void 0:e.status_code)===0||(null==e?void 0:e.status_code)===7549?(null==l||l({isSuccess:!0,result:n,errorMessage:""}),v=!0):null==l||l({isSuccess:!1,result:n,errorMessage:"checkMsg.status_code error"})}catch(e){null==l||l({isSuccess:!1,result:n,errorMessage:"parse checkMsg json error"})}else null==l||l({isSuccess:!1,result:n,errorMessage:"not success"})}else v=!0;if(v){let t=await j.ImSdk.getConversationByIdWithOnline({conversationId:e,shortId:e,type:p.m.ConversationType.GROUP_CHAT});if(t){if(j.ImSdk.setCurConversation(),n.setIsInStrangerConversationList(!1),j.ImSdk.setCurConversation(t,"openOrCreateConversationDetail1"))return;i&&n.setEnterConversation(i),n.setConversationPullUp(t),n.setSelectChatUserShortId(t.shortId),Y(i)}}}else t&&(j.ImSdk.setCurConversation(),n.setIsInStrangerConversationList(!1),j.ImSdk.getConversationWithUid(t).then(e=>{if(e){if(i&&n.setEnterConversation(i),!j.ImSdk.setCurConversation(e,"openOrCreateConversationDetail2"))n.setConversationPullUp(e),n.setSelectChatUserShortId(e.shortId),Y(i)}}))},[Y]);(0,O.Z)({openOrCreateConversationDetail:J,openDlg:Y});let X=(0,M.w)();(0,l.useEffect)(()=>{R.Z.mark("im_content_component_mount")},[]),(0,l.useEffect)(()=>{(0,k.G)("chat_entry_perf",{duration_im_before_load:performance.now(),is_popup_page:2,launch_from:(0,P.DT)()?"aweme_desktop":"aweme_web"})},[]),l.useLayoutEffect(()=>{R.Z.mark("im_entry_component_mount");let e=performance.now(),t=R.Z.get("set_sdk_ready");(0,k.G)("pc_im_entry_show",{duration:e,domComplete:R.Z.performanceNavigationTiming.domComplete,ready_type:null==t?void 0:t.detail})},[]),(0,l.useEffect)(()=>{let e=c.listen(c.EVENT.sendImUserMsg,J),t=c.listen(c.EVENT.openImConversation,e=>{let{conversationId:t,enterMethod:i}=e;try{if((0,C.sF)()&&!(0,C.kB)()&&!(0,S.Nr)(location.pathname)){E.asyncCall("webview:im:openImConversation",{conversationId:t,enterMethod:i});return}if(j.ImSdk.setCurConversation(),t){if("stranger"!==t){n.setIsInStrangerConversationList(!1);let e=j.ImSdk.getConversationById(t);if(e&&j.ImSdk.setCurConversation(e,"openImModalHandler"))return;i&&n.setEnterConversation(i),Y(i)}else t&&(n.setIsOpenMessageList(!0),n.setMaskIsTestGroupClickConversionListItem(!0),n.setIsInStrangerConversationList(!0),Y(i))}else n.setIsOpenMessageList(!0),Y(i);X(),j.ImSdk.syncToTray()}catch(e){}}),i=c.listen(c.EVENT.closeImConversation,()=>{Z(void 0,!0)});return()=>{e(),t(),i()}},[Y]),(0,l.useEffect)(()=>{y!==H||t||(0,k.G)("im_login_notify",{is_new:0===W?"1":"0"})},[y]),(0,l.useEffect)(()=>{n.setDlgShow(y===D)},[y]);let q=(0,l.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!y){c.emit(c.EVENT.showPushList,{from:"im",isShow:!0}),F();return}Z(void 0,!0===e),R.Z.mark("im_dialog_close"),z(e=>e+1);let t=setTimeout(()=>{c.emit(c.EVENT.showPushList,{from:"im",isShow:!0})},230);K.current=t,g.YY.finishTask(g.BE.HoverTaskId),j.ImSdk.syncToTray()},[y]);return(0,l.useEffect)(()=>{let e=e=>{j.ImSdk.syncToTray()};return document.addEventListener("visibilitychange",e),window.addEventListener("focus",e),window.addEventListener("blur",e),()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("focus",e),window.removeEventListener("blur",e)}},[]),(0,l.useEffect)(()=>{y||c.emit(c.EVENT.showHeaderPopUp,{type:"im",isShow:!1})},[y]),(0,l.useEffect)(()=>{let e=c.listen(c.EVENT.showHeaderPopUp,e=>{let{type:t,isShow:n}=e||{};n&&"im"!==t&&!v&&q(!0),n&&("im"===t?Q.current&&clearTimeout(Q.current):q(!0))});return()=>e()},[v,q]),(0,l.useEffect)(()=>{let e=c.listen(c.EVENT.clickPush,e=>{let{type:n}=e||{};if("im"===n){if(t&&(0,B.Z)()){c.emit(c.EVENT.showPushList,{from:"im",isShow:!1});return}Y(A.Q.push)}});return()=>e()},[Y]),(0,l.useEffect)(()=>()=>{Q.current&&clearTimeout(Q.current)},[]),(0,l.useEffect)(()=>{if(!!v)!m&&n.setMaskIsTestGroupClickConversionListItem(!0),n.setSelectChatUserShortId(null==v?void 0:v.shortId)},[v]),(0,l.useEffect)(()=>{(0,C.x1)()&&E.asyncCall("webview:im:setUnReadCount",{unReadCount:f})},[f]),(0,o.jsx)("div",{"data-e2e":"im-entry",className:T.default.cicleButtonWithText,children:(0,o.jsxs)(U.Y,{needRenderInSSR:!0,type:"circleButtonWithText",text:"消息",onMouseEnter:e=>{!(0,N.i)(e.target,e=>(null==e?void 0:e.id)==="pushListBoxId")&&Y(A.Q.hover_icon)},onMouseLeave:()=>{if(!v)Q.current&&clearTimeout(Q.current),q()},svg:(0,o.jsx)(b.Z,{}),activityName:null==r?void 0:r.activityName,headerPopupName:"im",className:T.default.polymorphicButton,transparent:s,children:[(0,o.jsx)("div",{className:u()(T.default.popNum,{isLight:(null==r?void 0:r.isActivity)||s}),children:!!f&&(0,o.jsx)(_.Badge,{countClassName:u()(T.default.PopStyle,{[T.default.digitsNumberPop]:f<10,[T.default.numberPoint]:f>=10}),countStyle:{color:"#e4e7f5",backgroundColor:"rgb(254, 44, 85)"},count:f,overflowCount:99})}),y===H?(0,o.jsx)(V,{ref:$,newHeaderIsNew:1===W,changeType:Z,abTestData:i}):y===D?(0,o.jsx)(G,{closeFn:q,customProps:r}):null,(0,o.jsx)(L.Z,{})]})})}));var $=n("409250"),K=n("286066"),Q=n("383955"),W=n("263070"),z=n("227219"),Y=n("352974"),J=n("587554"),X=n("806904"),q=()=>{(0,l.useEffect)(()=>{(async()=>{var e,t;(null===(t=K.Z.abTestData)||void 0===t?void 0:null===(e=t.pc_im_new_window)||void 0===e?void 0:e.open_type)&&(await j.ImSdk.bytedIMInstanceDeferred.promise,(0,X.l)(()=>{(0,J.At)().preloadRemote([{nameOrAlias:"im"}])}))})()},[K.Z.abTestData])},ee=e=>{let{isLogin:t,uInfo:n,className:s,abTestData:f,initImSDK:h=!0}=e,p=l.useRef();return(0,l.useEffect)(()=>{K.Z.setCurUserInfo(n)},[t,n,h]),(0,Y.Z)({isLogin:t,info:n},h&&!(null==f?void 0:f.imSaasPopup)&&(null==f?void 0:f.__isLoaded)),(0,z.Z)(f),q(),(0,l.useEffect)(()=>(W.Z.log("ImEntry load"),()=>{if(W.Z.log("ImEntry unload"),p.current){var e,t;null===(t=p.current)||void 0===t||null===(e=t.tryStart)||void 0===e||e.call(t,!1,{})}}),[]),(0,l.useEffect)(()=>{K.Z.setDownloadInfo({showDownload:!0})},[]),(0,l.useEffect)(()=>{let e=(0,d.Dr)($.Q.getItem({sKey:a.CookieKeys.Theme}));e!==Q.rS.light&&e!==Q.rS.dark?K.Z.setTheme(Q.rS.dark):K.Z.setTheme(e);let t=c.listen(c.EVENT.changeTheme,e=>{let{theme:t}=e;K.Z.setTheme(t)});return()=>{t()}},[]),(0,l.useEffect)(()=>{let e=c.listen(c.EVENT.userBlockEvent,e=>{let{uid:t,isBlock:n}=e;K.Z.setUserInfoBlockStatus(t,n)});return()=>{e()}},[]),(0,l.useEffect)(()=>(v.m.startInterval(),()=>{v.m.stopInterval()}),[]),(0,o.jsx)("li",{className:u()(m.default.entryContent,s),children:(0,o.jsx)(r.Provider,{imStore:K.Z,children:(0,o.jsx)(F,(0,i._)({},e))})})}},920161:function(e,t,n){n.d(t,{i:function(){return i}});let i=(e,t)=>{let n=(null==e?void 0:e.parentElement)||(null==e?void 0:e.parentNode);return!!n&&n!==document&&n!==window&&((null==t?!!void 0:!!t(n))||i(n,t))}},732352:function(e,t,n){n.d(t,{Z:function(){return d}}),n(490629),n(112459),n(759943);var i=n(121998),o=n(101199),l=n(119778),r=n(598444),s=n(286066),u=n(724622);let a=!1;function d(e){let{openOrCreateConversationDetail:t,openDlg:n}=e,{isShowGetConversaionListLoading:d,curUserInfo:c}=s.Z,[v,m]=(0,o.useState)(null),[f,h]=(0,o.useMemo)(()=>{let e=(0,i.parse)(window.location.search);return[null==e?void 0:e.imToSecUid,null==e?void 0:e.nextLoginSecUid]},[]);(0,o.useEffect)(()=>{if(!h||h===(null==c?void 0:c.secUid))f&&!a&&(0,r.Z)((0,l.fetchUserProfile)(f)).then(e=>{var t;let[n,i]=e;m(null==i?void 0:null===(t=i.user)||void 0===t?void 0:t.uid)})},[f,null==c?void 0:c.secUid]),(0,o.useEffect)(()=>{v&&((0,u.Z)()&&!a?(t({uid:v,enterMethod:"openByUrlParams"}),a=!0):(n(),!d&&!a&&(t({uid:v,enterMethod:"openByUrlParams"}),a=!0)))},[v,d])}},352974:function(e,t,n){n.d(t,{Z:function(){return c}});var i=n("629686");n("679308"),n("490629");var o=n("66948"),l=n("528937"),r=n("802309"),s=n("542046"),u=n("355286"),a=n("101199");let d=async()=>{let e={pullInterval:o.TCC_DEFAULT_VALUE_MAP.get(o.TccKey.ImConfig)};try{e=await l.get({key:o.TccKey.ImConfig,defaultValue:o.TCC_DEFAULT_VALUE_MAP.get(o.TccKey.ImConfig)})}catch(e){}return e};function c(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{info:o,isLogin:l}=e||{};(0,a.useEffect)(()=>{if(!t)return;let e=r.Z.get("set_sdk_ready");r.Z.mark("imsdk_load_module_start"),Promise.all([Promise.resolve().then(n.bind(n,549998)),n.e("4750").then(n.bind(n,872839)),d()]).then(t=>{let{ImSdk:n}=t[0]||{};if(!(n&&t[1])||n.bytedIMInstance)return;r.Z.mark("imsdk_load_module_end"),(0,s.G)("pc_im_sdk_import_time",{duration:r.Z.measure("imsdk_load_module_start","imsdk_load_module_end"),ready_type:null==e?void 0:e.detail});let{default:a}=t[1],d=u.Z.getInstance().get("imPerformanceOptimization.pc_im_message_storage");n.tryStart(l,o,(0,i._)({},t[2]),{encryption:d,storage:d,debug:!1}),(null==o?void 0:o.uid)&&a.init(o.uid),setTimeout(()=>{n.conversationChange()},500)})},[l,o,t])}},368932:function(e,t,n){n.d(t,{a5:function(){return c},cl:function(){return a},iY:function(){return u},uX:function(){return d}}),n(679308);var i=n(131653),o=n(31584),l=n(399989);let r=new i.Z,s=new i.Z;function u(e){r.resolve(e)}function a(e){s.resolve(e)}let d=()=>s.promise,c=()=>(0,o.Z)()?r.promise:l.O.getIsSaasPopup()?s.promise:Promise.resolve(void 0);t.ZP=c},31584:function(e,t){t.Z=()=>"/chat"===window.location.pathname},355286:function(e,t,n){n.d(t,{Z:function(){return r}});var i=n(480333);n(490629);var o=n(198412),l=n.n(o);class r{static getInstance(){return!this.instance&&(this.instance=new r),this.instance}setAbTest(e){this.abTest=e}get(e){if(this.cacheKeyMap[e])return this.cacheKeyMap[e];let t=!!(!localStorage.getItem(e)&&l()(this.abTest,e));return this.cacheKeyMap.set(e,t),t}set(e,t){this.cacheKeyMap[e]=t,localStorage.setItem(e,t)}clear(e){this.cacheKeyMap.delete(e),localStorage.removeItem(e)}clearAll(){this.cacheKeyMap=new Map,localStorage.clear()}constructor(){(0,i._)(this,"cacheKeyMap",new Map),(0,i._)(this,"abTest",void 0)}}(0,i._)(r,"instance",void 0)},915268:function(e,t,n){n.d(t,{w:function(){return r}});var i=n(414061),o=n(63601),l=n(332009);function r(){let{clickMethod:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.n)();return()=>{var n;null==t||null===(n=t.exitFullscreen)||void 0===n||n.call(t),i.emit(i.EVENT.triggerModalPlayerClose,{}),l.s.setPageFullscreen({playerId:t.playerId,isPageFullscreen:!1}),i.emit(i.EVENT.pageFullScreen,{clickMethod:e,fullScreen:!1,playerId:t.playerId})}}},227219:function(e,t,n){var i=n(101199),o=n(286066);t.Z=e=>{(0,i.useEffect)(()=>{if(!!Object.keys(e||{}).length)o.Z.getEmojiList(),o.Z.getEmojiGifListAsync(),o.Z.getShowSugEmoji(),o.Z.getCustomEmojiListAsync(),o.Z.getRecentEmojiAsync(),o.Z.getRecentGifAsync(),o.Z.getInteractiveEmojiListAsync()},[e])}},428601:function(e,t,n){n.d(t,{Z:function(){return ei}}),n("490629"),n("112459"),n("759943");var i=n("320165"),o=n("101199"),l=n("849023"),r=n("890710"),s=n("469935"),u=n.n(s),a=n("339808"),d=n("995898"),c=n("391302"),v=n("414061"),m=n("103680"),f=n("396549"),h=n("798016"),p=n("720709"),_=n("176449"),g=n("785413"),y=n("795653"),w=n("171084"),I=n("383955"),C=n("549998"),S=n("542046"),E=n("232900"),P=n("209998"),b=n("34841"),T=n("895629"),x=n("503479"),k=n("219976"),N=n("399989"),L=n("480333"),Z=n("368932"),j=n("131653");let M=new class e{getConversationById(e){var t,n;return null===(n=this.imContext)||void 0===n?void 0:null===(t=n.saasApi)||void 0===t?void 0:t.getConversationById(e)}setCurConversation(e,t){var n,i;null===(i=this.imContext)||void 0===i||null===(n=i.saasApi)||void 0===n||n.setCurConversation(e,t)}constructor(){(0,L._)(this,"imContext",null),(0,L._)(this,"imSdkInstanceReadyDeferred",new j.Z),N.O.getIsSaasPopup()&&(0,Z.a5)().then(e=>{this.imContext=e,this.imSdkInstanceReadyDeferred.resolve()})}},{ConversationType:U}=p.m,{GROUP_CHAT:A,ONE_TO_ONE_CHAT:O}=U,R=(0,l.inject)("imStore")((0,l.observer)(e=>{var t;let{msg:n,imStore:l,openDlg:r}=e,{conversationInfoMap:s,setSelectChatUserShortId:a}=l,{serverId:v,conversationId:m,conversationType:f,ext:h,sender:p}=n,L=(0,y.O)(),Z=(null==s?void 0:s[m])||(N.O.getIsSaasPopup()?M.getConversationById(m):C.ImSdk.getConversationById(m)),j=(0,o.useRef)(null),U=async()=>{let e=await (0,E.p)(p);j.current=e};(0,o.useEffect)(()=>{(async()=>{let e={conversation_id:m,chat_type:P.n[f],message_type:(0,P.G)(n)};if(f===O&&p){!(j.current||0===j.current)&&await U();let t=j.current;e.personal_relation=String(t)}(0,S.G)("im_push_show",e)})()},[m]),(0,o.useEffect)(()=>{let e=setTimeout(()=>{l.clearOldMsgListToPush()},300);return()=>{clearTimeout(e)}},[]);let R=(0,o.useRef)(0);(0,o.useEffect)(()=>(clearTimeout(R.current),R.current=setTimeout(()=>{l.closeMsgPushPop(m)},5e3),()=>{clearTimeout(R.current)}),[m]);let{headIcon:B,title:G}=(0,k.v)(Z),D=(0,o.useCallback)(async e=>{if(clearTimeout(R.current),l.clearAllPushList(),e){let e={conversation_id:m,chat_type:P.n[f]};if(f===O&&p){!(j.current||0===j.current)&&await U();let t=j.current;e.personal_relation=String(t)}(0,S.G)("im_push_close",e)}},[]),H=(0,o.useCallback)(async()=>{null==r||r({conversationId:m});let e=(0,d.Nr)(location.pathname),t=(0,c.sF)()&&!(0,c.kB)();if(t&&!e){D();let e={conversation_id:m,chat_type:P.n[f],message_type:(0,P.G)(n)};if(f===O&&p){!(j.current||0===j.current)&&await U();let t=j.current;e.personal_relation=String(t)}(0,S.G)("im_push_click",e);return}let i=!1;if(N.O.getIsSaasPopup()?(i=!1,M.setCurConversation(Z,I.eY.PUSH)):i=C.ImSdk.setCurConversation(Z,"PushItem"),i)return;!N.O.getIsSaasPopup()&&(l.setEnterConversation(I.eY.PUSH),a(Z.shortId)),D();let o={conversation_id:m,chat_type:P.n[f],message_type:(0,P.G)(n)};if(f===O&&p){!(j.current||0===j.current)&&await U();let e=j.current;o.personal_relation=String(e)}(0,S.G)("im_push_click",o)},[]),V=(0,o.useCallback)(()=>{clearTimeout(R.current)},[]),F=(0,o.useCallback)(()=>{R.current=setTimeout(()=>{l.closeMsgPushPop(m)},5e3)},[m]),$=null!==(t=l.uidSecUidMap[null==Z?void 0:Z.toParticipantUserId])&&void 0!==t?t:"",K=(0,g.V)({enable:!0,secUid:$}),Q=null==K?void 0:K.isOnline;return(0,i.jsxs)("div",{className:w.default.pushItem,onMouseEnter:V,onMouseLeave:F,children:[(0,i.jsx)("div",{className:w.default.headBox,onClick:H,children:(0,i.jsx)(b.n,{srcList:B,className:u()(w.default.headIcon,f===A?w.default.isGroup:"")})}),(0,i.jsxs)("div",{className:w.default.userInfo,onClick:H,children:[(0,i.jsxs)("div",{className:w.default.titleBox,children:[(0,i.jsx)("div",{className:w.default.titleTxt,children:G}),Q&&(0,i.jsx)("div",{className:w.default.onlineTag,children:"在线"})]}),(0,i.jsx)("div",{className:w.default.contentBox,children:(0,i.jsx)(T.Z,{className:w.default.msgTxt,converSation:Z,lastMessage:n,ext:h,isNeedFilterDraftMessage:!0})})]}),(0,i.jsx)("div",{className:u()(w.default.operateBox,{[w.default.isOhosOperateBox]:L}),children:(0,i.jsx)("div",{className:w.default.replyBtn,onClick:H,children:"回复"})}),(0,i.jsx)(_.Z,{src:x.Z,className:w.default.closeBtn,viewBox:"0 0 13 13",onClick:()=>{D(!0)}})]})})),B=(0,l.inject)("imStore")((0,l.observer)(e=>{let{imStore:t,openDlg:n}=e,{msgListToPush:o}=t;return(0,i.jsx)("div",{className:u()(h.default.pushList,{[h.default.hidePushList]:!(null==o?void 0:o.length)}),id:"IMpushListBoxId",children:null==o?void 0:o.map(e=>{let{conversationId:t}=e;return(0,i.jsx)(R,{msg:e,openDlg:n},t)})})}));var G=n("629686"),D=n("402748");n("706056");var H=n("595572"),V=n("696492"),F=n("319053"),$=n("534321"),K=n("603217"),Q=n("580251"),W=n("499329");let z=(0,l.inject)("noticeStore")((0,l.observer)(e=>{let{noticeStore:t,notice:n,handleClickPush:l=()=>{}}=e,{nid_str:r="",type:s}=n,u=(0,o.useRef)(null),a=(0,K.e)(n,V._q.NOTICE_PUSH),d=(0,o.useCallback)(()=>{u.current&&clearTimeout(u.current)},[]),c=(0,o.useCallback)(()=>{u.current=setTimeout(()=>{t.closeNoticePushPop(r)},5e3)},[]),m=(0,o.useCallback)(e=>{var n;u.current&&clearTimeout(u.current),null===(n=t.clearNoticePushList)||void 0===n||n.call(t),e&&(0,Q.Gb)("interact_push_close",a)},[]),f=(0,o.useCallback)(e=>{if((null===F.p0||void 0===F.p0?void 0:F.p0.includes(s))&&e){let{personal_relation:t,interact_type:n}=a;v.emit(v.EVENT.openNoticeAwemeModal,(0,D._)((0,G._)({},e),{logParams:{enter_from:$.QZ[V.DL.NOTICE_PUSH],personal_relation:t,interact_type:n}})),null==l||l()}m(),(0,Q.Gb)("interact_push_click",a)},[s]);return(0,o.useEffect)(()=>{(0,Q.Gb)("interact_push_show",a)},[]),(0,o.useEffect)(()=>{let e=setTimeout(()=>{t.clearOldNoticeInPushList()},300);return u.current=setTimeout(()=>{t.closeNoticePushPop(r)},5e3),()=>{e&&clearTimeout(e),u.current&&clearTimeout(u.current)}},[]),(0,i.jsx)("div",{className:H.default.pushItem,onMouseEnter:d,onMouseLeave:c,children:(0,i.jsx)(W.Z,{className:H.default.noticeCell,notice:n,showScene:V.DL.NOTICE_PUSH,handleClickInPush:f,handleClosePush:()=>m(!0)})})}));var Y=n("455749");let J=(0,l.inject)("noticeStore")((0,l.observer)(e=>{let{noticeStore:t,clickNoticePush:n}=e,{noticePushList:o=[]}=t;return(null==o?void 0:o.length)?(0,i.jsx)("div",{className:Y.default.pushList,id:"NoticepushListBoxId",children:null==o?void 0:o.map(e=>(0,i.jsx)(z,{notice:e,handleClickPush:n},null==e?void 0:e.nid_str))}):null}));var X=n("286066"),q=n("654047"),ee=n("409554");let et={IMShowByPushClick:"webview:im:showByPushClick",PushHide:"webview:push:hide",PushShow:"webview:push:show"},en=(0,l.inject)("noticeStore","imStore")((0,l.observer)(function(e){var t,n;let{setTopOffset:i,noticeStore:l,imStore:r}=e,s=null==l?void 0:null===(t=l.noticePushList)||void 0===t?void 0:t.length,u=null==r?void 0:null===(n=r.msgListToPush)||void 0===n?void 0:n.length;return(0,o.useLayoutEffect)(()=>{if(s||u){var e,t,n;let o=null===(n=document.getElementById("douyin-header"))||void 0===n?void 0:null===(t=n.getBoundingClientRect)||void 0===t?void 0:null===(e=t.call(n))||void 0===e?void 0:e.bottom;o>0?null==i||i(o+2):null==i||i(void 0)}},[s,u]),null}));var ei=()=>{let[e,t]=(0,o.useState)(!0),[n,s]=(0,o.useState)(0),{pathname:h,search:p}=(0,a.a)(),_=(0,o.useRef)(null),g=(0,o.useRef)(null),y=(0,d.Nr)(h),w=(0,c.sF)(p)&&!(0,c.kB)(p)&&!y,I=(0,o.useCallback)((e,t)=>{if(!!e)w?m.asyncCall(et.IMShowByPushClick,t):null==v||v.emit(v.EVENT.clickPush,{type:e,params:t})},[w]),C=function(){var e,t,n,i,o,l;let r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=(t=(0,q.getImStore)()).setCanShowImPush)||void 0===e||e.call(t,r),null===(n=ee.Z.setCanShowNoticePush)||void 0===n||n.call(ee.Z,r),!r&&(null===(i=(o=(0,q.getImStore)()).clearAllPushList)||void 0===i||i.call(o),null===(l=ee.Z.clearNoticePushList)||void 0===l||l.call(ee.Z))};(0,o.useEffect)(()=>{let e=null==v?void 0:v.listen(v.EVENT.showPushList,async e=>{if(!0==!!(document.hidden&&"hidden"===document.visibilityState)){t(!1);return}let{isShow:n=!1,from:i}=e||{};switch(i){case V.No.IM:_.current=!n;break;case V.No.NOTICE:g.current=!n}_.current||g.current?(t(!1),C(!1)):(t(n),C(n))}),n=null==v?void 0:v.listen(v.EVENT.clickPush,()=>{var e,t,n;null===(e=(t=(0,q.getImStore)()).clearAllPushList)||void 0===e||e.call(t),null===(n=ee.Z.clearNoticePushList)||void 0===n||n.call(ee.Z)});return()=>{null==e||e(),null==n||n()}},[]);let{noticePushList:S=[]}=ee.Z,{msgListToPush:E}=(0,q.getImStore)();(0,o.useEffect)(()=>{let t;let n=document.getElementById("pushListBoxId");if(w&&n&&"/LynxLoading"===h&&!e&&m.asyncCall(et.PushHide),e&&w&&n&&"/LynxLoading"===h){let e=()=>{clearTimeout(t),t=setTimeout(()=>{if(n.clientHeight){let e=function e(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(t instanceof HTMLElement))return null;for(let i of Array.from(t.children)){let t=i.offsetWidth,o=i.offsetHeight;if(t>0&&o>0)return i;if(n&&i.children.length>0){let t=e(i,!0);if(t)return t}}return null}(n,!0);e?m.asyncCall(et.PushShow,{style:`width:${e.offsetWidth}px; height:${e.offsetHeight}px;`}):m.asyncCall(et.PushHide)}else m.asyncCall(et.PushHide)},100)},i=new MutationObserver(()=>{e()});return i.observe(n,{childList:!0,subtree:!0,attributes:!0}),(null==S?void 0:S.length)||(null==E?void 0:E.length)?e():m.asyncCall(et.PushHide),()=>{i.disconnect()}}},[e,w,h,null==S?void 0:S.length,null==E?void 0:E.length]);let P="/LynxLoading"===h;return(0,c.kB)(p)?null:e&&w?(0,r.createPortal)((0,i.jsx)(l.Provider,{imStore:X.Z,noticeStore:ee.Z,children:(0,i.jsxs)("div",{className:u()(f.default.pushList,P?f.default.inLynxWindowLoading:f.default.inLynxWindow),id:"pushListBoxId",children:[(0,i.jsx)(en,{setTopOffset:s}),(0,i.jsx)(B,{openDlg:e=>I(V.No.IM,e)}),(0,i.jsx)(J,{clickNoticePush:()=>I(V.No.NOTICE)})]})}),document.body):e?(0,i.jsx)(l.Provider,{imStore:(0,q.getImStore)(),noticeStore:ee.Z,children:(0,i.jsxs)("div",{className:f.default.pushList,id:"pushListBoxId",style:{top:n||void 0},children:[(0,i.jsx)(en,{setTopOffset:s}),(0,i.jsx)(B,{openDlg:e=>I(V.No.IM,e)}),(0,i.jsx)(J,{clickNoticePush:()=>I(V.No.NOTICE)})]})}):null}},988736:function(e,t,n){n.d(t,{L:function(){return o}}),n(679308),n(490629);var i=n(746546);let o=e=>{let{promotionId:t,originType:n,secAuthorId:o,roomId:l,itemId:r}=e;return Promise.all([(0,i.y3)({promotionId:t,originType:n,secAuthorId:o,roomId:l,itemId:r}),(0,i.$P)({promotionId:t,originType:n})])}},746546:function(e,t,n){n.d(t,{$P:function(){return N},FE:function(){return L},G:function(){return Z},N7:function(){return j},Q2:function(){return C},Sn:function(){return x},Ws:function(){return b},XK:function(){return w},XQ:function(){return I},YB:function(){return P},du:function(){return E},jZ:function(){return T},w:function(){return S},y3:function(){return k}});var i=n(629686),o=n(402748),l=n(811603);n(679308),n(362051);var r=n(30995),s=n(987826),u=n(911429),a=n(732199),d=n(431940),c=n.n(d);let{COMMON_SEARCH_PARAMS:v}=r;function m(e){var t,n,i;return{text:null!==(t=null==e?void 0:e.text)&&void 0!==t?t:"",iconUrl:null!==(n=null==e?void 0:e.icon_url)&&void 0!==n?n:"",jumpUrl:null!==(i=null==e?void 0:e.jump_url)&&void 0!==i?i:""}}function f(e){var t,n,i,o;return{userAvatar:null!==(t=null==e?void 0:e.user_avatar)&&void 0!==t?t:"",userNickname:null!==(n=null==e?void 0:e.user_nickname)&&void 0!==n?n:"",text:null!==(i=null==e?void 0:e.text)&&void 0!==i?i:"",imageList:null!==(o=null==e?void 0:e.image_list)&&void 0!==o?o:[]}}function h(e){var t,n,i,o,l;return{image:null!==(t=null==e?void 0:e.image)&&void 0!==t?t:"",name:null!==(n=null==e?void 0:e.name)&&void 0!==n?n:"",price:(i=Number(null==e?void 0:e.price)/100,i),sales:null!==(o=null==e?void 0:e.sales)&&void 0!==o?o:0,productUrl:null!==(l=null==e?void 0:e.product_url)&&void 0!==l?l:""}}function p(e){var t,n,i,o,l,r,s,u,a,d,c,v,h,p,_,g,y,w,I,C,S,E,P,b,T,x,k,N,L,Z,j,M,U,A,O,R,B,G,D,H,V,F,$,K,Q,W;let{item_info:z,status_code:Y,log_pb:J}=e;return{statusCode:Y,logPb:null!==(N=null==J?void 0:J.impr_id)&&void 0!==N?N:"",itemInfo:{productInfo:{name:null!==(L=null==z?void 0:null===(t=z.product_info)||void 0===t?void 0:t.name)&&void 0!==L?L:"",price:(Z=Number(null==z?void 0:null===(n=z.product_info)||void 0===n?void 0:n.price)/100,Z),promiseTextList:null!==(j=null==z?void 0:null===(i=z.product_info)||void 0===i?void 0:i.promise_text_list)&&void 0!==j?j:[],logisticsTextList:null!==(M=null==z?void 0:null===(o=z.product_info)||void 0===o?void 0:o.logistics_text_list)&&void 0!==M?M:[],imageUrlList:null!==(U=null==z?void 0:null===(l=z.product_info)||void 0===l?void 0:l.image_url_list)&&void 0!==U?U:[],scheme:null!==(A=null==z?void 0:null===(r=z.product_info)||void 0===r?void 0:r.scheme)&&void 0!==A?A:"",schemeQRcodeBase64:null!==(O=null==z?void 0:null===(s=z.product_info)||void 0===s?void 0:s.scheme_qrcode_base64)&&void 0!==O?O:""},shopInfo:{name:null!==(R=null==z?void 0:null===(u=z.shop_info)||void 0===u?void 0:u.name)&&void 0!==R?R:"",image:null!==(B=null==z?void 0:null===(a=z.shop_info)||void 0===a?void 0:a.image)&&void 0!==B?B:"",label:m(null==z?void 0:null===(d=z.shop_info)||void 0===d?void 0:d.label),score:null!==(G=null==z?void 0:null===(c=z.shop_info)||void 0===c?void 0:c.score)&&void 0!==G?G:0,percent:null!==(D=null==z?void 0:null===(v=z.shop_info)||void 0===v?void 0:v.percent)&&void 0!==D?D:0,tagList:null!==(H=null==z?void 0:null===(_=z.shop_info)||void 0===_?void 0:null===(p=_.tag_list)||void 0===p?void 0:null===(h=p.map)||void 0===h?void 0:h.call(p,m))&&void 0!==H?H:[],accountName:null!==(V=null==z?void 0:null===(g=z.shop_info)||void 0===g?void 0:g.account_name)&&void 0!==V?V:""},commentInfo:{totalCount:null!==(F=null==z?void 0:null===(y=z.comment_info)||void 0===y?void 0:y.total_count)&&void 0!==F?F:0,tagList:null!==($=null==z?void 0:null===(w=z.comment_info)||void 0===w?void 0:w.tag_list)&&void 0!==$?$:[],commentList:null!==(K=null==z?void 0:null===(S=z.comment_info)||void 0===S?void 0:null===(C=S.comment_list)||void 0===C?void 0:null===(I=C.map)||void 0===I?void 0:I.call(C,f))&&void 0!==K?K:[]},extraInfo:{productParams:null!==(Q=null==z?void 0:null===(b=z.extra_info)||void 0===b?void 0:null===(P=b.product_params)||void 0===P?void 0:null===(E=P.map)||void 0===E?void 0:E.call(P,e=>{var t,n;return{name:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.value)&&void 0!==n?n:""}}))&&void 0!==Q?Q:[],detailImageList:null!==(W=null==z?void 0:null===(k=z.extra_info)||void 0===k?void 0:null===(x=k.detail_image_list)||void 0===x?void 0:null===(T=x.map)||void 0===T?void 0:T.call(x,e=>null!=e?e:""))&&void 0!==W?W:[]}}}}function _(e){var t;let{status_code:n,product_preview_list:i,log_pb:o}=e;return{statusCode:n,logPb:null!==(t=null==o?void 0:o.impr_id)&&void 0!==t?t:"",productPreviewList:null==i?void 0:i.map(e=>h(e))}}function g(e){var t,n;let{status_code:i,video_info_list:o,has_product_data:l,product_card:r,log_pb:s}=e;return{statusCode:i,logPb:null!==(t=null==s?void 0:s.impr_id)&&void 0!==t?t:"",videoInfoList:null!==(n=null==o?void 0:o.map(e=>(0,a.s0)(e)))&&void 0!==n?n:[],hasProductData:null!=l&&l,productCard:l?h(r):void 0}}function y(e){let{promotions:t=[],top_promotion:n,target_promotions:i=[],status_code:o,next_offset:l=-1,log_id:r,page_header:s,page_hint:u}=e||{};return{statusCode:o,promotions:t,topPromotion:n,targetPromotions:i,nextOffset:l,logId:r,pageHeader:s,pageHint:u}}async function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=await (0,u.U2)("/aweme/v1/web/seo/ecom/detail/product_meta",(0,o._)((0,i._)({},v),{product_id:e}),{},void 0,t,{});return(0,a.RL)(n,p)}async function I(e){let{productId:t="0",itemId:n,needProductCard:l=!1}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=await (0,u.U2)("/aweme/v1/web/seo/ecom/detail/related_video",(0,o._)((0,i._)({},v),{product_id:t,item_id:n,need_product_card:l}),{},void 0,r,{});return(0,a.RL)(s,g)}async function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=await (0,u.U2)("/aweme/v1/web/seo/ecom/detail/recommend_product",(0,o._)((0,i._)({},v),{product_id:e}),{},void 0,t,{});return(0,a.RL)(n,_)}async function S(e){let{roomId:t,authorId:n,offset:l,limit:r=20}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=await (0,u.v_)("/live/promotions/page/",(0,o._)((0,i._)({},v),{room_id:t,author_id:n,offset:l,limit:r}),{},void 0,s);return(0,a.RL)(d,y)}async function E(e){let{roomId:t,authorId:n}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return await (0,u.v_)("/live/promotions/page/top/",(0,o._)((0,i._)({},v),{room_id:t,author_id:n}),{},void 0,l)}async function P(e,t){let{roomId:n,authorId:r,productId:s}=e;return(0,l._)(e,["roomId","authorId","productId"]),await (0,u.U2)(t,(0,i._)((0,o._)((0,i._)({},v),{room_id:n,author_id:r,product_infos:JSON.stringify([{product_id:s}])}),e),{},void 0,null)}async function b(e){return(0,u.U2)("/aweme/v1/commerce/order/getUserAuth/",(0,o._)((0,i._)({},v),{user_id:e,app_id:s.APP_ID}))}async function T(e){return(0,u.U2)("/aweme/v1/commerce/order/saveUserAuth/",(0,o._)((0,i._)({},v),{user_id:e,app_id:s.APP_ID,auth_flag:1}))}async function x(e){let{roomId:t,authorId:n,liveSceneId:l=0,entranceInfo:r}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return await (0,u.U2)("/live/promotions/pop/v3/",(0,o._)((0,i._)({},v),{room_id:t,author_id:n,live_scene_id:l,entrance_info:r}),{},void 0,s)}async function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{promotionId:n,originType:o,roomId:l,secAuthorId:r,itemId:s}=e||{};return await (0,u.v_)("/ecom/product/detail/saas/pc/",(0,i._)({is_h5:1,origin_type:o},v),{is_h5:1,use_new_price:1,bff_type:2,room_id:l,live_room_id:l,item_id:s,sec_author_id:r,origin_type:o,promotion_ids:String(n),ec_promotion_id:n},void 0,t)}async function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{promotionId:n,originType:i}=e||{};return await (0,u.v_)("/aweme/v2/shop/promotion/pack/detail/",{is_h5:1,origin_type:i},{is_h5:1,bff_type:2,origin_type:i,promotion_id:n},void 0,t)}async function L(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{productId:n,shopId:l,cursor:r,count:s,statId:a,tagId:d,sortType:m}=e||{};return await (0,u.U2)("/aweme/v1/web/ecom/product/comments/",(0,o._)((0,i._)({},v),{product_id:n,shop_id:l,cursor:r,count:s,stat_id:a,tag_id:d,sort_type:m}),{transformResponse:e=>c().parse(e)},void 0,t)}async function Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{productId:n,shopId:l,statId:r}=e||{};return await (0,u.U2)("/aweme/v1/web/ecom/product/comment/counter/",(0,o._)((0,i._)({},v),{product_id:n,shop_id:l,stat_id:r}),{},void 0,t)}async function j(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{commentId:n,action:i}=e;return await (0,u.v_)("/aweme/v1/web/ecom/comment/action/",v,{comment_id:n,action:i},void 0,t)}},503479:function(e,t,n){var i=n(629686),o=n(402748),l=n(320165),r=n(101199);let s=(0,r.forwardRef)((e,t)=>(0,l.jsx)("svg",(0,o._)((0,i._)({width:13,height:13,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,l.jsx)("path",{d:"M11.867 11.867a1.211 1.211 0 0 1-1.712 0l-3.71-3.71-3.711 3.71a1.211 1.211 0 1 1-1.713-1.712l3.71-3.71-3.71-3.711A1.21 1.21 0 1 1 2.734 1.02l3.71 3.71 3.71-3.71a1.211 1.211 0 0 1 1.713 1.713l-3.71 3.71 3.71 3.71c.473.474.473 1.24 0 1.713z",fill:"#2F3035",fillOpacity:".7"})})));t.Z=s},81849:function(e,t,n){var i=n(629686),o=n(402748),l=n(320165),r=n(101199);let s=(0,r.forwardRef)((e,t)=>(0,l.jsx)("svg",(0,o._)((0,i._)({width:14,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14A7 7 0 1 0 7 0a7 7 0 0 0 0 14zM6 3.678C6 3.301 6.41 3 6.924 3h.205c.514 0 .924.301.924.678v4.343c0 .377-.41.679-.924.679h-.205C6.411 8.7 6 8.398 6 8.02V3.678zm.3 7.878a.95.95 0 0 1-.3-.683.95.95 0 0 1 .3-.684 1.073 1.073 0 0 1 1.453 0c.19.179.3.43.3.684a.95.95 0 0 1-.3.683 1.073 1.073 0 0 1-1.452 0z",fill:"#FE3824"})})));t.Z=s}}]); |