"use strict";(self.webpackChunkflow_web_extension=self.webpackChunkflow_web_extension||[]).push([["26282"],{237968:function(e,s,t){var i=t(397458);t(652983);var n=t(465031),r=t(940661);s.Z=(0,n.G)((0,i.jsx)(r.r,{}))},812109:function(e,s,t){t.d(s,{tk:()=>r});var i=t(590745),n=t(642494),r=e=>{if(!e)return i.LY.MESSAGE_TYPE_TEXT;if((0,n.qP0)(e))return i.LY.MESSAGE_TYPE_PIC;if((0,n.RkI)(e))return i.LY.MESSAGE_TYPE_VIDEO;if((0,n.vU5)(e))return i.LY.MESSAGE_TYPE_MUSIC;if((0,n.A8i)(e))return i.LY.MESSAGE_TYPE_FILE;if((0,n.s27)(e))return i.LY.MESSAGE_TYPE_SEARCH_CARD;else if((0,n.d8)(e))return i.LY.MESSAGE_TYPE_LYRICS_TO_SONG_LYRIC;else if((0,n.C_i)(e))return i.LY.MESSAGE_TYPE_LYRICS_TO_SONG_MUSIC;else if((0,n.zTh)(e))return i.LY.MESSAGE_TYPE_VIDEO_GENERATION;else return i.LY.MESSAGE_TYPE_TEXT}},865771:function(e,s,t){t.d(s,{Z:()=>l});var i=t(698127),n=t(706790),r=t(181267),a=t(397458),o=t(87608),_=t.n(o),d=t(313389),l=e=>{var{prefix:s,disabled:t,onClick:o,children:l,type:c}=e,u=(0,r._)(e,["prefix","disabled","onClick","children","type"]);return(0,a.jsx)(d.Z.Item,(0,n._)((0,i._)({className:_()("w-full !rounded-4 !text-14 h-32 !p-4 !pr-14"),icon:s,type:c,onClick:o,disabled:t},u),{children:l}))}},302059:function(e,s,t){t.r(s),t.d(s,{MusicDeleteReceiveMessageActionButtonPlugin:()=>v});var i=t(397458),n=t(237968),r=t(340492),a=t(650222),o=t(642494),_=t(865771),d=t(221330),l=()=>window.thirdXgPlayerManager,c=t(337547),u=e=>{var{message:s}=e,t=(0,d.g1)(),{onDeleteClick:c}=(0,a.B)({message:s});return(0,i.jsxs)(_.Z,{"data-testid":"message_action_delete",type:"danger",prefix:(0,i.jsx)(n.Z,{className:"text-16 p-2"}),onClick:()=>{if(c(),(0,o.vU5)(s)){var e,t;!function(e){var s,t=l();if(e&&(null==t?void 0:null===(s=t.playerProperties)||void 0===s?void 0:s.isPlaying)){var{vid:i}=t.currentMusicInfo||{};e===i&&t.requestPlayerHandler().pause()}}(null===(e=(0,r.Z)((null===(t=s.content_obj)||void 0===t?void 0:t.music_list)||[]))||void 0===e?void 0:e.vid)}},children:[t("long_press_delete_message")," "]})};class v{constructor(){this.pluginIdentifier=c.P,this.DropdownItemContentGroups=[u]}}},650222:function(e,s,t){t.d(s,{B:()=>p});var i=t(771197),n=t(698127),r=t(706790),a=t(624682),o=t(642494),_=t(825022),d=t(812109),l=t(481812),c=t(651481),u=t(747597),v=t(441925),g=t(632434),m=t(788704),E=t(221330),f=t(628098),p=e=>{var{message:s,deleteMessages:t,deleteRegenMessages:p}=e,S=(0,E.g1)(),{getPopupContainer:h=()=>document.body}=(0,u.R)(),Y=(0,v.p)(),M=c.GH.getState(),I=()=>{var e;(t||[s]).forEach((e=(0,i._)(function*(e){var t,i={bot_id:s.bot_id,conversation_id:s.conversation_id,message_id:s.message_id,message_type:(0,d.tk)(e),is_onboarding:+!!(0,o.qF)(e),click_from:"long_press_message",is_read:0,voice_id:void 0,user_type:+!!(0,o.Yns)(e)};try{if((null==e?void 0:e.message_id)&&!(0,_.K)(e)){(0,m.L)("message_delete",i),yield(yield(0,l.p)()).deleteMessage({conversation_id:s.conversation_id,message_id:e.message_id,regen_message_ids:null==p?void 0:p.map(e=>e.message_id).filter(a.Z)});var c={isLocalMessage:!1,messageId:e.message_id};M.logicalDeleteMessage({conversationId:s.conversation_id||"",messageLink:c}),M.updateMessageList({conversationId:s.conversation_id||"",immerUpdate:(e,s)=>s.resetMessageLink(c.messageId)}),(0,m.L)("message_delete_result",(0,r._)((0,n._)({},i),{is_success:1})),g.v.emit("chat.message.delete",{conversationId:s.conversation_id||"",messageId:c.messageId})}}catch(e){(0,m.L)("message_delete_result",(0,r._)((0,n._)({},i),{is_success:0,error:(null==e?void 0:null===(t=e.errorOption)||void 0===t?void 0:t.message)||(null==e?void 0:e.message)})),Y.error(S("system_error_toast"))}}),function(s){return e.apply(this,arguments)}))};return{onDeleteClick:()=>{f.Z.warning({centered:!0,title:S("delete_message_toast_text"),content:S("web_deleteChat_desc"),cancelText:S("delete_message_btn_cancel"),okText:S("delete_message_btn_confirm"),okButtonProps:{type:"danger"},onOk:I,getPopupContainer:h})}}}},940661:function(e,s,t){t.d(s,{r:()=>a});var i=t(698127),n=t(706790),r=t(397458);t(652983);var a=e=>(0,r.jsx)("svg",(0,n._)((0,i._)({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24"},e),{children:(0,r.jsx)("path",{fill:"currentColor",d:"M8 4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2h5a1 1 0 1 1 0 2h-1v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6H3a1 1 0 0 1 0-2zM6 6v14h12V6zm4 3a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1m4 0a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1"})}))}}]);
//# sourceMappingURL=26282.js.map