diff --git a/antied/index.js b/antied/index.js index 11dc3c9..bade8e2 100644 --- a/antied/index.js +++ b/antied/index.js @@ -1,10 +1,10 @@ -(function(ve,Ee,E,t,le,P,b,e,N,H,Ft,B,oe){"use strict";const{openLazy:Pt,hideActionSheet:Ua}=E.findByProps("openLazy","hideActionSheet");function Re(n,r){if(n!=null&&r!=null)for(const a of Object.keys(r))typeof r[a]=="object"&&!Array.isArray(r[a])?(typeof n[a]!="object"&&(n[a]={}),Re(n[a],r[a])):n[a]??=r[a]}function it(n,r){try{Pt(new Promise(function(a){return a({default:n})}),"ActionSheet",r)}catch(a){Ee.logger.error(a.stack),showToast("Got error when opening ActionSheet! Please check debug logs")}}function Bt(n,r){let a=n+r;a=Math.min(a,255);const f=n.toString(16).padStart(2,"0"),c=a.toString(16).padStart(2,"0");return{main:f,secondary:c}}const ct=function(n,r){return`${n}${Math.floor(r*255).toString(16).padStart(2,0)}`},se={toInt(n){return n=n.replace(/^#/,""),parseInt(n,16)},toHex(n){return"#"+n.toString(16).toUpperCase()},HSLtoHEX(n,r,a){a/=100;const f=r*Math.min(a,1-a)/100,c=function(h){const s=(h+n/30)%12,p=a-f*Math.max(Math.min(s-3,9-s,1),-1);return Math.round(255*p).toString(16).padStart(2,"0")};return`#${c(0)}${c(8)}${c(4)}`}};var dt=Object.freeze({__proto__:null,calculateLighterValue:Bt,colorConverter:se,makeDefaults:Re,openSheet:it,setOpacity:ct});const{ScrollView:Mt,View:ye,Text:$t,TouchableOpacity:ut,TextInput:Oa,Image:xt,Animated:ie}=P.General,{FormLabel:Ut,FormIcon:Ot,FormArrow:ka,FormRow:me,FormSwitch:kt,FormSwitchRow:za,FormSection:zt,FormDivider:Vt,FormInput:gt}=P.Forms,Gt=E.findByName("useIsFocused");E.findByProps("BottomSheetScrollView");const ft=E.findByStoreName("UserStore"),be=E.findByProps("showUserProfile");b.getAssetIDByName("ic_add_24px"),b.getAssetIDByName("ic_arrow"),b.getAssetIDByName("ic_minus_circle_24px"),b.getAssetIDByName("Check"),b.getAssetIDByName("Small");function ht(n){return e.React.createElement(Ot,{style:{opacity:1},source:b.getAssetIDByName(n)})}const Y=e.stylesheet.createThemedStyleSheet({basicPad:{paddingRight:10,marginBottom:10,letterSpacing:.25},header:{color:N.semanticColors.HEADER_SECONDARY,fontFamily:e.constants.Fonts.PRIMARY_BOLD,paddingLeft:"3%",fontSize:24},sub:{color:N.semanticColors.TEXT_POSITIVE,fontFamily:e.constants.Fonts.DISPLAY_NORMAL,paddingLeft:"4%",fontSize:18},flagsText:{color:N.semanticColors.HEADER_SECONDARY,fontFamily:e.constants.Fonts.PRIMARY_BOLD,paddingLeft:"4%",fontSize:16},container:{marginTop:25,marginLeft:"5%",marginBottom:-15,flexDirection:"row"},textContainer:{paddingLeft:15,paddingTop:5,flexDirection:"column",flexWrap:"wrap",shadowColor:"#000",shadowOffset:{width:1,height:4},shadowOpacity:.2,shadowRadius:4.65,elevation:8},image:{width:75,height:75,borderRadius:10,shadowColor:"#000",shadowOffset:{width:1,height:4},shadowOpacity:.2,shadowRadius:4.65,elevation:8},mainText:{opacity:.975,letterSpacing:.25},header:{color:N.semanticColors.HEADER_PRIMARY,fontFamily:e.constants.Fonts.DISPLAY_BOLD,fontSize:25,letterSpacing:.25},subHeader:{color:N.semanticColors.HEADER_SECONDARY,fontSize:12.75}});function vt(n){let{index:r}=n;var a,f,c,h;le.useProxy(t.storage);let s=t.storage===null||t.storage===void 0||(a=t.storage.inputs)===null||a===void 0?void 0:a.ignoredUserList[r];const p=e.React.useRef(new ie.Value(1)).current,S=function(){return ie.spring(p,{toValue:1.1,duration:10,useNativeDriver:!0}).start()},C=function(){return ie.spring(p,{toValue:1,duration:250,useNativeDriver:!0}).start()},w={transform:[{scale:p}]};let u=ft.getUser(s?.id),R=Object.values(ft.getUsers());u||(u=R.find(function(i){return i?.username==s?.username})),u||(u=R.find(function(i){var d,l;return(i==null||(d=i.username)===null||d===void 0?void 0:d.toLowerCase())==(s==null||(l=s.username)===null||l===void 0?void 0:l.toLowerCase())}));const v=e.NavigationNative.useNavigation();return Gt(),e.React.createElement(e.React.Fragment,null,e.React.createElement(Mt,null,e.React.createElement(ye,{style:[Y.basicPad,Y.sub]},e.React.createElement(zt,{title:"User Setting",style:[Y.header]},e.React.createElement(me,{label:"Find User Id or Username",leading:ht("ic_search"),onPress:function(){var i,d;u&&!(!((i=s.username)===null||i===void 0)&&i.length)?s.username=u.username:u&&!(!((d=s.id)===null||d===void 0)&&d.length)?s.id=u.id:H.showToast("Cannot find User Id/Username.")}}),e.React.createElement(gt,{title:"User Username | Case Sensitive",placeholder:"Missing No",value:s?.username,onChange:function(i){return s.username=i}}),e.React.createElement(gt,{title:"User Id",placeholder:"Missing No",value:s?.id,onChange:function(i){return s.id=i}}),e.React.createElement(me,{label:"User is webhook?",subLabel:"User is webhook or system, and not BOT or Normal User.",leading:ht("ic_webhook_24px"),trailing:e.React.createElement(kt,{value:s?.isWebhook||!1,onValueChange:function(i){return s.isWebhook=i}})})),u&&e.React.createElement(ye,{style:[Y.container,{paddingBottom:10}]},e.React.createElement(ut,{onPress:function(){var i;return(i=be.showUserProfile)===null||i===void 0?void 0:i.call(be,{userId:u?.id})},onPressIn:S,onPressOut:C},e.React.createElement(ie.View,{style:w},e.React.createElement(xt,{source:{uri:(u==null||(h=u.getAvatarURL)===null||h===void 0||(c=h.call(u))===null||c===void 0||(f=c.replace)===null||f===void 0?void 0:f.call(c,"webp","png"))||"https://cdn.discordapp.com/embed/avatars/2.png"},style:{width:128,height:128,borderRadius:10}}))),e.React.createElement(ye,{style:Y.textContainer},e.React.createElement(ut,{onPress:function(){return be.showUserProfile({userId:u?.id})}},e.React.createElement($t,{style:[Y.mainText,Y.header]},u?.username||s?.username||"No Name"))),e.React.createElement(Vt,null)),e.React.createElement(me,{label:e.React.createElement(Ut,{text:"Remove User from Ignore List",style:{color:N.rawColors.RED_400}}),onPress:function(){var i,d;v.pop(),t.storage===null||t.storage===void 0||(d=t.storage.inputs)===null||d===void 0||(i=d.ignoredUserList)===null||i===void 0||i.splice(r,1)}}))))}const{ScrollView:Ht,View:Yt,Text:Va,TouchableOpacity:Xt,TextInput:Wt}=P.General,{FormLabel:Ga,FormIcon:jt,FormArrow:Jt,FormRow:pe,FormSwitch:Ha,FormSwitchRow:Ya,FormSection:Kt,FormDivider:Qt,FormInput:Xa}=P.Forms;function Et(n,r){return React.createElement(jt,{style:{opacity:1},source:r?n:b.getAssetIDByName(n)})}const qt=E.findByName("useIsFocused");E.findByProps("BottomSheetScrollView");const{getUser:Zt}=E.findByProps("getUser"),ea=b.getAssetIDByName("ic_add_24px");b.getAssetIDByName("ic_arrow"),b.getAssetIDByName("ic_minus_circle_24px"),b.getAssetIDByName("Check"),b.getAssetIDByName("Small");const ta=b.getAssetIDByName("ic_trash_24px"),Q=e.stylesheet.createThemedStyleSheet({basicPad:{paddingRight:10,marginBottom:10,letterSpacing:.25},header:{color:N.semanticColors.HEADER_SECONDARY,fontFamily:e.constants.Fonts.PRIMARY_BOLD,paddingLeft:"3.5%",fontSize:24},sub:{color:N.semanticColors.TEXT_POSITIVE,fontFamily:e.constants.Fonts.DISPLAY_NORMAL,paddingLeft:"4%",fontSize:18},flagsText:{color:N.semanticColors.HEADER_SECONDARY,fontFamily:e.constants.Fonts.PRIMARY_BOLD,paddingLeft:"4%",fontSize:16},input:{fontSize:16,fontFamily:e.constants.Fonts.PRIMARY_MEDIUM,color:N.semanticColors.TEXT_NORMAL},placeholder:{color:N.semanticColors.INPUT_PLACEHOLDER_TEXT}});function aa(){var n;le.useProxy(t.storage);let[r,a]=React.useState("");const f=e.NavigationNative.useNavigation();qt();let c=(t.storage===null||t.storage===void 0||(n=t.storage.inputs)===null||n===void 0?void 0:n.ignoredUserList)??[];const h=function(){if(r){if(isNaN(parseInt(r)))c.push({id:void 0,username:r});else{let s=Zt(r);if(s)c.push({id:s?.id,username:"",showUser:!1,isWebhook:!1});else return H.showToast("Invalid User Id")}a(""),f.push("VendettaCustomPage",{title:"Adding User to Ignore List",render:function(){return React.createElement(vt,{index:c?.length-1})}})}};return React.createElement(React.Fragment,null,React.createElement(Ht,{style:{flex:1}},React.createElement(Kt,{style:[Q.header,Q.basicPad]},React.createElement(Yt,{style:[Q.header,Q.sub]},c.length>0&&React.createElement(pe,{label:"Clear List",trailing:Et(ta,!0),onPress:function(){c.length!==0&&Ft.showConfirmationAlert({title:"Hol up, wait a minute!",content:`This will removes in total ${c.length} users from ignore list.`,confirmText:"Ye",cancelText:"Nah",confirmColor:"brand",onConfirm:function(){t.storage.inputs.ignoredUserList=[]}})}}),c?.map(function(s,p){return React.createElement(React.Fragment,null,React.createElement(pe,{label:s?.username||s?.id||"No Data",trailing:React.createElement(Jt,null),onPress:function(){return f.push("VendettaCustomPage",{title:"Editing User",render:function(){return React.createElement(vt,{index:p})}})}}),p!==c?.length-1&&React.createElement(Qt,null))}),React.createElement(pe,{label:React.createElement(Wt,{value:r,onChangeText:a,placeholder:"User ID or Username",placeholderTextColor:Q.placeholder.color,selectionColor:e.constants.Colors.PRIMARY_DARK_100,onSubmitEditing:h,returnKeyType:"done",style:Q.input}),trailing:React.createElement(Xt,{onPress:h},Et(ea,!0))})))))}const Rt=E.findByProps("show","confirm","close");E.findByName("StaticSearchBarContainer"),E.findByStoreName("UserStore");const na=E.findByProps("showUserProfile"),ra=E.findByName("useIsFocused"),{openURL:la}=E.findByProps("openURL","openDeeplink"),{ScrollView:oa,View:X,Text:ce,TouchableOpacity:Se,TextInput:Wa,Image:sa,Animated:de}=P.General,{FormLabel:ja,FormIcon:Ja,FormArrow:Ka,FormRow:q,FormSwitch:Qa,FormSwitchRow:qa,FormSection:Za,FormDivider:en,FormInput:tn}=P.Forms,F=e.stylesheet.createThemedStyleSheet({main_text:{opacity:.975,letterSpacing:.25,fontFamily:e.constants.Fonts.DISPLAY_NORMAL},item_container:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:4,paddingBottom:4,width:"100%"},log_header:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",maxWidth:"95%"},log_sub_header:{display:"flex",flexDirection:"row",alignItems:"center",maxWidth:"50%"},log_time:{color:N.semanticColors.TEXT_MUTED,opacity:.99,fontSize:13,paddingLeft:4},log_type:{color:N.semanticColors.TEXT_MUTED,opacity:.45,fontSize:16,marginLeft:"auto"},avatar_container:{alignSelf:"start",justifySelf:"start",marginTop:5},author_avatar:{width:40,height:40,borderRadius:80},author_name:{color:N.semanticColors.HEADER_PRIMARY,fontFamily:e.constants.Fonts.DISPLAY_BOLD,fontSize:14,letterSpacing:.25,paddingBottom:4},old_message:{color:N.semanticColors.TEXT_MUTED,opacity:.89,fontSize:13},message_content:{color:N.semanticColors.TEXT_NORMAL,opacity:.985,fontSize:13},main_container:{paddingLeft:8,paddingRight:4,paddingTop:2,paddingBottom:16,width:"95%"},text_container:{display:"flex",flexDirection:"column",paddingBottom:4,paddingLeft:8,width:"95%"}});function _e(n,r){return n?.length>r?n?.substring(0,r)+"...":n}function Ce(){le.useProxy(t.storage),ra();const n=e.React.useRef(new de.Value(1)).current,r=function(){return de.spring(n,{toValue:1.1,duration:10,useNativeDriver:!0}).start()},a=function(){return de.spring(n,{toValue:1,duration:250,useNativeDriver:!0}).start()},f={transform:[{scale:n}]},[c,h]=e.React.useState([]);return e.React.useEffect(function(){var s;(t.storage===null||t.storage===void 0||(s=t.storage.log)===null||s===void 0?void 0:s.length)>0&&h(t.storage.log.reverse())},[]),c?.length>(t.storage===null||t.storage===void 0?void 0:t.storage.logCount)&&t.storage.logWarning&&Rt.show({title:"Log exceed limit",body:"Clear log?",confirmText:"Yes",cancelText:"NO",confirmColor:"brand",onConfirm:function(){t.storage.log=[],h([]),H.showToast("[ANTIED] Cleared the log")}}),e.React.createElement(e.React.Fragment,null,e.React.createElement(oa,null,e.React.createElement(q,{label:"Nuke logs",trailing:e.React.createElement(q.Icon,{source:b.getAssetIDByName("ic_trash_24px")}),onPress:function(){Rt.show({title:"Nuke logs",body:"Nuke the Log?",confirmText:"Yash",cancelText:"nu uh",confirmColor:"brand",onConfirm:function(){t.storage.log=[],h([]),H.showToast("[ANTIED] hmm yum, i ate all of it")}})}}),e.React.createElement(X,{style:F.main_container},c.length<1?e.React.createElement(e.React.Fragment,null,e.React.createElement(X,{style:F.item_container},e.React.createElement(q,{label:"Only us chicken here, go touch some grass"}))):c.map(function(s){var p,S,C;const{type:w,author:u,content:R,edited:v,where:i}=s;return e.React.createElement(e.React.Fragment,null,e.React.createElement(X,{style:F.item_container},e.React.createElement(Se,{style:F.avatar_container,onPress:function(){return na.showUserProfile({userId:u.id})},onPressIn:r,onPressOut:a},e.React.createElement(de.View,{style:[f]},e.React.createElement(sa,{source:{uri:u.avatar?`https://cdn.discordapp.com/avatars/${u?.id}/${u.avatar}.png`:"https://cdn.discordapp.com/embed/avatars/2.png"},style:F.author_avatar}))),e.React.createElement(X,{style:F.text_container},e.React.createElement(X,{style:F.log_header},e.React.createElement(X,{style:F.log_sub_header},e.React.createElement(ce,{style:[F.main_text,F.author_name]},`${u.username}`),w=="MessageUpdate"?e.React.createElement(q.Icon,{source:b.getAssetIDByName("pencil")}):e.React.createElement(q.Icon,{source:b.getAssetIDByName("ic_message_delete")}),e.React.createElement(Se,{onPress:function(){s.where.guild&&s.where.channel&&s.where.messageLink?la(`https://discord.com/channels/${s.where.guild}/${s.where.channel}/${s.where.messageLink}`):H.showToast("On Direct Message")}},e.React.createElement(q.Icon,{source:b.getAssetIDByName("ic_show_media")})))),e.React.createElement(Se,{onPress:function(){let d=u.username;d+=` (${u.id}): -`,d=+`>>> ${R}`,v&&(d+=` +(function(ve,Ee,v,t,le,P,p,e,N,H,Lt,B,oe){"use strict";const{openLazy:Pt,hideActionSheet:Ua}=v.findByProps("openLazy","hideActionSheet");function Re(n,r){if(n!=null&&r!=null)for(const a of Object.keys(r))typeof r[a]=="object"&&!Array.isArray(r[a])?(typeof n[a]!="object"&&(n[a]={}),Re(n[a],r[a])):n[a]??=r[a]}function st(n,r){try{Pt(new Promise(function(a){return a({default:n})}),"ActionSheet",r)}catch(a){Ee.logger.error(a.stack),showToast("Got error when opening ActionSheet! Please check debug logs")}}function Bt(n,r){let a=n+r;a=Math.min(a,255);const f=n.toString(16).padStart(2,"0"),u=a.toString(16).padStart(2,"0");return{main:f,secondary:u}}const ct=function(n,r){return`${n}${Math.floor(r*255).toString(16).padStart(2,0)}`},ie={toInt(n){return n=n.replace(/^#/,""),parseInt(n,16)},toHex(n){return"#"+n.toString(16).toUpperCase()},HSLtoHEX(n,r,a){a/=100;const f=r*Math.min(a,1-a)/100,u=function(E){const c=(E+n/30)%12,S=a-f*Math.max(Math.min(c-3,9-c,1),-1);return Math.round(255*S).toString(16).padStart(2,"0")};return`#${u(0)}${u(8)}${u(4)}`}};var dt=Object.freeze({__proto__:null,calculateLighterValue:Bt,colorConverter:ie,makeDefaults:Re,openSheet:st,setOpacity:ct});const{ScrollView:Mt,View:ye,Text:$t,TouchableOpacity:ut,TextInput:Oa,Image:xt,Animated:se}=P.General,{FormLabel:Ut,FormIcon:Ot,FormArrow:ka,FormRow:me,FormSwitch:kt,FormSwitchRow:za,FormSection:zt,FormDivider:Vt,FormInput:gt}=P.Forms,Gt=v.findByName("useIsFocused");v.findByProps("BottomSheetScrollView");const ft=v.findByStoreName("UserStore"),be=v.findByProps("showUserProfile");p.getAssetIDByName("ic_add_24px"),p.getAssetIDByName("ic_arrow"),p.getAssetIDByName("ic_minus_circle_24px"),p.getAssetIDByName("Check"),p.getAssetIDByName("Small");function ht(n){return e.React.createElement(Ot,{style:{opacity:1},source:p.getAssetIDByName(n)})}const Y=e.stylesheet.createThemedStyleSheet({basicPad:{paddingRight:10,marginBottom:10,letterSpacing:.25},header:{color:N.semanticColors.HEADER_SECONDARY,fontFamily:e.constants.Fonts.PRIMARY_BOLD,paddingLeft:"3%",fontSize:24},sub:{color:N.semanticColors.TEXT_POSITIVE,fontFamily:e.constants.Fonts.DISPLAY_NORMAL,paddingLeft:"4%",fontSize:18},flagsText:{color:N.semanticColors.HEADER_SECONDARY,fontFamily:e.constants.Fonts.PRIMARY_BOLD,paddingLeft:"4%",fontSize:16},container:{marginTop:25,marginLeft:"5%",marginBottom:-15,flexDirection:"row"},textContainer:{paddingLeft:15,paddingTop:5,flexDirection:"column",flexWrap:"wrap",shadowColor:"#000",shadowOffset:{width:1,height:4},shadowOpacity:.2,shadowRadius:4.65,elevation:8},image:{width:75,height:75,borderRadius:10,shadowColor:"#000",shadowOffset:{width:1,height:4},shadowOpacity:.2,shadowRadius:4.65,elevation:8},mainText:{opacity:.975,letterSpacing:.25},header:{color:N.semanticColors.HEADER_PRIMARY,fontFamily:e.constants.Fonts.DISPLAY_BOLD,fontSize:25,letterSpacing:.25},subHeader:{color:N.semanticColors.HEADER_SECONDARY,fontSize:12.75}});function vt(n){let{index:r}=n;var a,f,u,E;le.useProxy(t.storage);let c=t.storage===null||t.storage===void 0||(a=t.storage.inputs)===null||a===void 0?void 0:a.ignoredUserList[r];const S=e.React.useRef(new se.Value(1)).current,_=function(){return se.spring(S,{toValue:1.1,duration:10,useNativeDriver:!0}).start()},R=function(){return se.spring(S,{toValue:1,duration:250,useNativeDriver:!0}).start()},w={transform:[{scale:S}]};let d=ft.getUser(c?.id),y=Object.values(ft.getUsers());d||(d=y.find(function(i){return i?.username==c?.username})),d||(d=y.find(function(i){var s,l;return(i==null||(s=i.username)===null||s===void 0?void 0:s.toLowerCase())==(c==null||(l=c.username)===null||l===void 0?void 0:l.toLowerCase())}));const h=e.NavigationNative.useNavigation();return Gt(),e.React.createElement(e.React.Fragment,null,e.React.createElement(Mt,null,e.React.createElement(ye,{style:[Y.basicPad,Y.sub]},e.React.createElement(zt,{title:"User Setting",style:[Y.header]},e.React.createElement(me,{label:"Find User Id or Username",leading:ht("ic_search"),onPress:function(){var i,s;d&&!(!((i=c.username)===null||i===void 0)&&i.length)?c.username=d.username:d&&!(!((s=c.id)===null||s===void 0)&&s.length)?c.id=d.id:H.showToast("Cannot find User Id/Username.")}}),e.React.createElement(gt,{title:"User Username | Case Sensitive",placeholder:"Missing No",value:c?.username,onChange:function(i){return c.username=i}}),e.React.createElement(gt,{title:"User Id",placeholder:"Missing No",value:c?.id,onChange:function(i){return c.id=i}}),e.React.createElement(me,{label:"User is webhook?",subLabel:"User is webhook or system, and not BOT or Normal User.",leading:ht("ic_webhook_24px"),trailing:e.React.createElement(kt,{value:c?.isWebhook||!1,onValueChange:function(i){return c.isWebhook=i}})})),d&&e.React.createElement(ye,{style:[Y.container,{paddingBottom:10}]},e.React.createElement(ut,{onPress:function(){var i;return(i=be.showUserProfile)===null||i===void 0?void 0:i.call(be,{userId:d?.id})},onPressIn:_,onPressOut:R},e.React.createElement(se.View,{style:w},e.React.createElement(xt,{source:{uri:(d==null||(E=d.getAvatarURL)===null||E===void 0||(u=E.call(d))===null||u===void 0||(f=u.replace)===null||f===void 0?void 0:f.call(u,"webp","png"))||"https://cdn.discordapp.com/embed/avatars/2.png"},style:{width:128,height:128,borderRadius:10}}))),e.React.createElement(ye,{style:Y.textContainer},e.React.createElement(ut,{onPress:function(){return be.showUserProfile({userId:d?.id})}},e.React.createElement($t,{style:[Y.mainText,Y.header]},d?.username||c?.username||"No Name"))),e.React.createElement(Vt,null)),e.React.createElement(me,{label:e.React.createElement(Ut,{text:"Remove User from Ignore List",style:{color:N.rawColors.RED_400}}),onPress:function(){var i,s;h.pop(),t.storage===null||t.storage===void 0||(s=t.storage.inputs)===null||s===void 0||(i=s.ignoredUserList)===null||i===void 0||i.splice(r,1)}}))))}const{ScrollView:Ht,View:Yt,Text:Va,TouchableOpacity:Xt,TextInput:Wt}=P.General,{FormLabel:Ga,FormIcon:jt,FormArrow:Jt,FormRow:pe,FormSwitch:Ha,FormSwitchRow:Ya,FormSection:Kt,FormDivider:Qt,FormInput:Xa}=P.Forms;function Et(n,r){return React.createElement(jt,{style:{opacity:1},source:r?n:p.getAssetIDByName(n)})}const qt=v.findByName("useIsFocused");v.findByProps("BottomSheetScrollView");const{getUser:Zt}=v.findByProps("getUser"),ea=p.getAssetIDByName("ic_add_24px");p.getAssetIDByName("ic_arrow"),p.getAssetIDByName("ic_minus_circle_24px"),p.getAssetIDByName("Check"),p.getAssetIDByName("Small");const ta=p.getAssetIDByName("ic_trash_24px"),Q=e.stylesheet.createThemedStyleSheet({basicPad:{paddingRight:10,marginBottom:10,letterSpacing:.25},header:{color:N.semanticColors.HEADER_SECONDARY,fontFamily:e.constants.Fonts.PRIMARY_BOLD,paddingLeft:"3.5%",fontSize:24},sub:{color:N.semanticColors.TEXT_POSITIVE,fontFamily:e.constants.Fonts.DISPLAY_NORMAL,paddingLeft:"4%",fontSize:18},flagsText:{color:N.semanticColors.HEADER_SECONDARY,fontFamily:e.constants.Fonts.PRIMARY_BOLD,paddingLeft:"4%",fontSize:16},input:{fontSize:16,fontFamily:e.constants.Fonts.PRIMARY_MEDIUM,color:N.semanticColors.TEXT_NORMAL},placeholder:{color:N.semanticColors.INPUT_PLACEHOLDER_TEXT}});function aa(){var n;le.useProxy(t.storage);let[r,a]=React.useState("");const f=e.NavigationNative.useNavigation();qt();let u=(t.storage===null||t.storage===void 0||(n=t.storage.inputs)===null||n===void 0?void 0:n.ignoredUserList)??[];const E=function(){if(r){if(isNaN(parseInt(r)))u.push({id:void 0,username:r});else{let c=Zt(r);if(c)u.push({id:c?.id,username:"",showUser:!1,isWebhook:!1});else return H.showToast("Invalid User Id")}a(""),f.push("VendettaCustomPage",{title:"Adding User to Ignore List",render:function(){return React.createElement(vt,{index:u?.length-1})}})}};return React.createElement(React.Fragment,null,React.createElement(Ht,{style:{flex:1}},React.createElement(Kt,{style:[Q.header,Q.basicPad]},React.createElement(Yt,{style:[Q.header,Q.sub]},u.length>0&&React.createElement(pe,{label:"Clear List",trailing:Et(ta,!0),onPress:function(){u.length!==0&&Lt.showConfirmationAlert({title:"Hol up, wait a minute!",content:`This will removes in total ${u.length} users from ignore list.`,confirmText:"Ye",cancelText:"Nah",confirmColor:"brand",onConfirm:function(){t.storage.inputs.ignoredUserList=[]}})}}),u?.map(function(c,S){return React.createElement(React.Fragment,null,React.createElement(pe,{label:c?.username||c?.id||"No Data",trailing:React.createElement(Jt,null),onPress:function(){return f.push("VendettaCustomPage",{title:"Editing User",render:function(){return React.createElement(vt,{index:S})}})}}),S!==u?.length-1&&React.createElement(Qt,null))}),React.createElement(pe,{label:React.createElement(Wt,{value:r,onChangeText:a,placeholder:"User ID or Username",placeholderTextColor:Q.placeholder.color,selectionColor:e.constants.Colors.PRIMARY_DARK_100,onSubmitEditing:E,returnKeyType:"done",style:Q.input}),trailing:React.createElement(Xt,{onPress:E},Et(ea,!0))})))))}const Rt=v.findByProps("show","confirm","close");v.findByName("StaticSearchBarContainer"),v.findByStoreName("UserStore");const na=v.findByProps("showUserProfile"),ra=v.findByName("useIsFocused"),{openURL:la}=v.findByProps("openURL","openDeeplink"),{ScrollView:oa,View:X,Text:ce,TouchableOpacity:Se,TextInput:Wa,Image:ia,Animated:de}=P.General,{FormLabel:ja,FormIcon:Ja,FormArrow:Ka,FormRow:q,FormSwitch:Qa,FormSwitchRow:qa,FormSection:Za,FormDivider:en,FormInput:tn}=P.Forms,L=e.stylesheet.createThemedStyleSheet({main_text:{opacity:.975,letterSpacing:.25,fontFamily:e.constants.Fonts.DISPLAY_NORMAL},item_container:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:4,paddingBottom:4,width:"100%"},log_header:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",maxWidth:"95%"},log_sub_header:{display:"flex",flexDirection:"row",alignItems:"center",maxWidth:"50%"},log_time:{color:N.semanticColors.TEXT_MUTED,opacity:.99,fontSize:13,paddingLeft:4},log_type:{color:N.semanticColors.TEXT_MUTED,opacity:.45,fontSize:16,marginLeft:"auto"},avatar_container:{alignSelf:"start",justifySelf:"start",marginTop:5},author_avatar:{width:40,height:40,borderRadius:80},author_name:{color:N.semanticColors.HEADER_PRIMARY,fontFamily:e.constants.Fonts.DISPLAY_BOLD,fontSize:14,letterSpacing:.25,paddingBottom:4},old_message:{color:N.semanticColors.TEXT_MUTED,opacity:.89,fontSize:13},message_content:{color:N.semanticColors.TEXT_NORMAL,opacity:.985,fontSize:13},main_container:{paddingLeft:8,paddingRight:4,paddingTop:2,paddingBottom:16,width:"95%"},text_container:{display:"flex",flexDirection:"column",paddingBottom:4,paddingLeft:8,width:"95%"}});function _e(n,r){return n?.length>r?n?.substring(0,r)+"...":n}function Ce(){var n,r;le.useProxy(t.storage),ra();const a=e.React.useRef(new de.Value(1)).current,f=function(){return de.spring(a,{toValue:1.1,duration:10,useNativeDriver:!0}).start()},u=function(){return de.spring(a,{toValue:1,duration:250,useNativeDriver:!0}).start()},E={transform:[{scale:a}]},[c,S]=e.React.useState([]);e.React.useEffect(function(){var R;(t.storage===null||t.storage===void 0||(R=t.storage.log)===null||R===void 0?void 0:R.length)>0&&S(t.storage.log.reverse())},[]),c?.length>(t.storage===null||t.storage===void 0||(n=t.storage.inputs)===null||n===void 0?void 0:n.logCount)&&t.storage.logWarning&&Rt.show({title:"Log exceed limit",body:"Clear log?",confirmText:"Yes",cancelText:"NO",confirmColor:"brand",onConfirm:function(){t.storage.log=[],S([]),H.showToast("[ANTIED] Cleared the log")}});const _=Number((t.storage===null||t.storage===void 0||(r=t.storage.inputs)===null||r===void 0?void 0:r.logLength)||60);return e.React.createElement(e.React.Fragment,null,e.React.createElement(oa,null,e.React.createElement(q,{label:"Nuke logs",trailing:e.React.createElement(q.Icon,{source:p.getAssetIDByName("ic_trash_24px")}),onPress:function(){Rt.show({title:"Nuke logs",body:"Nuke the Log?",confirmText:"Yash",cancelText:"nu uh",confirmColor:"brand",onConfirm:function(){t.storage.log=[],S([]),H.showToast("[ANTIED] hmm yum, i ate all of it")}})}}),e.React.createElement(X,{style:L.main_container},c.length<1?e.React.createElement(e.React.Fragment,null,e.React.createElement(X,{style:L.item_container},e.React.createElement(q,{label:"Only us chicken here, go touch some grass"}))):c.map(function(R){const{type:w,author:d,content:y,edited:h,where:i}=R;return e.React.createElement(e.React.Fragment,null,e.React.createElement(X,{style:L.item_container},e.React.createElement(Se,{style:L.avatar_container,onPress:function(){return na.showUserProfile({userId:d.id})},onPressIn:f,onPressOut:u},e.React.createElement(de.View,{style:[E]},e.React.createElement(ia,{source:{uri:d.avatar?`https://cdn.discordapp.com/avatars/${d?.id}/${d.avatar}.png`:"https://cdn.discordapp.com/embed/avatars/2.png"},style:L.author_avatar}))),e.React.createElement(X,{style:L.text_container},e.React.createElement(X,{style:L.log_header},e.React.createElement(X,{style:L.log_sub_header},e.React.createElement(ce,{style:[L.main_text,L.author_name]},`${d.username}`),w=="MessageUpdate"?e.React.createElement(q.Icon,{source:p.getAssetIDByName("pencil")}):e.React.createElement(q.Icon,{source:p.getAssetIDByName("ic_message_delete")}),e.React.createElement(Se,{onPress:function(){R.where.guild&&R.where.channel&&R.where.messageLink?la(`https://discord.com/channels/${R.where.guild}/${R.where.channel}/${R.where.messageLink}`):H.showToast("On Direct Message")}},e.React.createElement(q.Icon,{source:p.getAssetIDByName("ic_show_media")})))),e.React.createElement(Se,{onPress:function(){let s=d.username;s+=` (${d.id}): +`,s=+`>>> ${y}`,h&&(s+=` -${v}`),e.clipboard.setString(d),H.showToast("Log content copied")},style:F.text_container},e.React.createElement(X,null,v?.length>0?e.React.createElement(e.React.Fragment,null,e.React.createElement(ce,{style:[F.main_text,F.old_message]},_e(R,t.storage===null||t.storage===void 0||(p=t.storage.inputs)===null||p===void 0?void 0:p.logLength)),e.React.createElement(ce,{style:[F.main_text,F.message_content]},_e(v,t.storage===null||t.storage===void 0||(S=t.storage.inputs)===null||S===void 0?void 0:S.logLength))):e.React.createElement(ce,{style:F.message_content},_e(R,t.storage===null||t.storage===void 0||(C=t.storage.inputs)===null||C===void 0?void 0:C.logLength)))))))}))))}const ia=E.findByName("CustomColorPickerActionSheet"),{ScrollView:ca,View:x,Text:yt,TouchableOpacity:mt,TextInput:an,Pressable:nn,Image:da}=P.General,{FormLabel:rn,FormIcon:te,FormArrow:ln,FormRow:k,FormSwitch:ue,FormSwitchRow:on,FormSection:Z,FormDivider:z,FormInput:ua,FormSliderRow:bt}=P.Forms,U=e.stylesheet.createThemedStyleSheet({text:{color:N.semanticColors.HEADER_SECONDARY,paddingLeft:"5.5%",paddingRight:10,marginBottom:10,letterSpacing:.25,fontFamily:e.constants.Fonts.PRIMARY_BOLD,fontSize:16},subText:{color:N.semanticColors.TEXT_POSITIVE,paddingLeft:"6%",paddingRight:10,marginBottom:10,letterSpacing:.25,fontFamily:e.constants.Fonts.DISPLAY_NORMAL,fontSize:12},input:{fontSize:16,fontFamily:e.constants.Fonts.PRIMARY_MEDIUM,color:N.semanticColors.TEXT_NORMAL},placeholder:{color:N.semanticColors.INPUT_PLACEHOLDER_TEXT},container:{flex:1,justifyContent:"center",alignItems:"center"},colorPreview:{width:"75%",height:100,marginBottom:20},row:{flexDirection:"row",height:80,width:"90%",marginBottom:20},border:{borderRadius:12}}),ga=b.getAssetIDByName("ic_add_24px");E.findByProps("getUser");const fa=E.findByName("useIsFocused"),pt=[{id:"enableMD",default:!0,label:"Toggle Message Delete",subLabel:"Logs deleted message"},{id:"enableMU",default:!0,label:"Toggle Message Update",subLabel:"Logs edited message"},{id:"logWarning",default:!1,label:"Toggle Exceeding Log Limit Warning",subLabel:"Warn if log limit exceed"}],St=[{id:"minimalistic",default:!0,label:"Minimalistic Settings",subLabel:"Removes all Styling (Enabled by Default)"},{id:"useBackgroundColor",default:!1,label:"Enable Background Color",subLabel:"Background Color for Deleted Message, similiar to Mention but Customizeable"},{id:"ignoreBots",default:!1,label:"Ignore Bots",subLabel:"Ignore bot deleted messages."},{id:"removeDismissButton",default:!1,label:"Remove Dissmiss Message",subLabel:"Remove clickable Dismiss Message text from deleted ephemeral messages."},{id:"addTimestampForEdits",default:!1,label:"Add Edit Timestamp",subLabel:"Add Timestamp for edited messages."}],_t=[{id:"textColor",label:"Deleted Message Text Color",subLabel:"Click to customize Deleted Message Text Color",defaultColor:"#E40303"},{id:"backgroundColor",label:"Deleted Message Background Color",subLabel:"Click to customize Background Color",defaultColor:"#FF2C2F"},{id:"gutterColor",label:"Deleted Message Background Gutter Color",subLabel:"Click to customize Background Gutter Color",defaultColor:"#FF2C2F"}],Ct=[{id:"deletedMessageBuffer",title:"Customize Deleted Message",type:"default",placeholder:"This message is deleted"},{id:"editedMessageBuffer",title:"Customize Edited Separator",type:"default",placeholder:"`[ EDITED ]`"},{id:"historyToast",title:"Customize Remove History Toast Message",type:"default",placeholder:"History Removed"},{id:"logLength",title:"Customize Log message length",type:"numeric",placeholder:"60"},{id:"logCount",title:"Customize Log Limit",type:"numeric",placeholder:"1000"}];function ge(n){n=Number(n);const r=Math.min(Math.max(n,0),100),a=Math.round(r/100*255).toString(16).toUpperCase();return a.length===1?"0"+a:a}function It(n){const r=parseInt(n,16);return isNaN(r)?0:Math.round(r/255*100)}const O={toPercentage:function(n){return n=Number(n),n===0?0:n===1?100:Math.round(n*100)},toDecimal:function(n){n=Number(n);const r=Math.min(Math.max(n,0),100);return r===0?0:r===100?1:r/100},formatDecimal:function(n){return n=Number(n),n===0||n===1?n:n.toFixed(2)}};function Ie(){var n,r,a,f,c,h,s,p,S,C,w,u,R,v,i;le.useProxy(t.storage);const[d,l]=e.React.useState(O.toDecimal(It(t.storage===null||t.storage===void 0||(n=t.storage.colors)===null||n===void 0?void 0:n.backgroundColorAlpha)??100)),[m,y]=e.React.useState(O.toDecimal(It(t.storage===null||t.storage===void 0||(r=t.storage.colors)===null||r===void 0?void 0:r.gutterColorAlpha)??100)),_=e.NavigationNative.useNavigation();fa();const D=function(){_.push("VendettaCustomPage",{title:"List of Ignored Users",render:function(){return e.React.createElement(aa,null)}})};return e.React.createElement(ca,null,e.React.createElement(x,{style:{marginTop:20,marginBottom:20}},e.React.createElement(Z,{title:"Plugin Setting",style:[U.header]},e.React.createElement(k,{label:"Antied Logging Page",leading:e.React.createElement(k.Icon,{source:b.getAssetIDByName("ic_edit_24px")}),trailing:k.Arrow,onPress:function(){return _.push("VendettaCustomPage",{title:"Antied Logging Page",render:function(){return e.React.createElement(Ce,null)}})}}),e.React.createElement(k,{label:"Customization",subLabel:"Show customization for the plugin",leading:e.React.createElement(te,{style:{opacity:1},source:b.getAssetIDByName("ic_category_16px")}),trailing:e.React.createElement(ue,{value:(t.storage===null||t.storage===void 0||(a=t.storage.switches)===null||a===void 0?void 0:a.customizeable)??!1,onValueChange:function(o){return t.storage.switches.customizeable=o}})}),(t.storage===null||t.storage===void 0||(f=t.storage.switches)===null||f===void 0?void 0:f.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(Z,{title:"Patches"}),e.React.createElement(z,null)),(t.storage===null||t.storage===void 0||(c=t.storage.switches)===null||c===void 0?void 0:c.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},pt?.map(function(o,I){return e.React.createElement(e.React.Fragment,null,e.React.createElement(k,{label:o?.label,subLabel:o?.subLabel,leading:o?.icon&&e.React.createElement(te,{style:{opacity:1},source:b.getAssetIDByName(o?.icon)}),trailing:"id"in o?e.React.createElement(ue,{value:(t.storage===null||t.storage===void 0?void 0:t.storage.switches[o?.id])??o?.default,onValueChange:function(L){return t.storage.switches[o?.id]=L}}):void 0}),I!==pt?.length-1&&e.React.createElement(z,null))}))),(t.storage===null||t.storage===void 0||(h=t.storage.switches)===null||h===void 0?void 0:h.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(Z,{title:"Switches"}),e.React.createElement(z,null)),(t.storage===null||t.storage===void 0||(s=t.storage.switches)===null||s===void 0?void 0:s.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},St?.map(function(o,I){return e.React.createElement(e.React.Fragment,null,e.React.createElement(k,{label:o?.label,subLabel:o?.subLabel,leading:o?.icon&&e.React.createElement(te,{style:{opacity:1},source:b.getAssetIDByName(o?.icon)}),trailing:"id"in o?e.React.createElement(ue,{value:(t.storage===null||t.storage===void 0?void 0:t.storage.switches[o?.id])??o?.default,onValueChange:function(L){return t.storage.switches[o?.id]=L}}):void 0}),I!==St?.length-1&&e.React.createElement(z,null))}))),(t.storage===null||t.storage===void 0||(p=t.storage.switches)===null||p===void 0?void 0:p.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(Z,{title:"Text Variables"}),e.React.createElement(z,null)),(t.storage===null||t.storage===void 0||(S=t.storage.switches)===null||S===void 0?void 0:S.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},Ct?.map(function(o,I){return e.React.createElement(e.React.Fragment,null,e.React.createElement(ua,{title:o?.title,keyboardType:o?.type,placeholder:o?.placeholder,value:(t.storage===null||t.storage===void 0?void 0:t.storage.inputs[o.id])??o?.placeholder,onChange:function(L){return t.storage.inputs[o.id]=L.toString()}}),I!==Ct.length-1&&e.React.createElement(z,null))}))),(t.storage===null||t.storage===void 0||(C=t.storage.switches)===null||C===void 0?void 0:C.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(Z,{title:"Color Pickers"}),e.React.createElement(z,null)),(t.storage===null||t.storage===void 0||(w=t.storage.switches)===null||w===void 0?void 0:w.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},_t?.map(function(o){var I;const L=function(){var M;return it(ia,{color:dt==null||(M=se)===null||M===void 0?void 0:M.toInt(t.storage.colors[o.id]||o?.defaultColor||"#000"),onSelect:function($){var A;const V=dt==null||(A=se)===null||A===void 0?void 0:A.toHex($);t.storage.colors[o.id]=V}})};return e.React.createElement(e.React.Fragment,null,e.React.createElement(k,{label:o?.label,subLabel:o?.subLabel||"Click to Update",onPress:L,trailing:e.React.createElement(mt,{onPress:L},e.React.createElement(da,{source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mJsrQAAAgwBAJ9P6qYAAAAASUVORK5CYII="},style:{width:32,height:32,borderRadius:10,backgroundColor:(t.storage===null||t.storage===void 0?void 0:t.storage.colors[o.id])||((I=_t.find(function(M){return M?.id==o?.id}))===null||I===void 0?void 0:I.defaultColor)||"#000"}}))}))}))),(t.storage===null||t.storage===void 0||(u=t.storage.switches)===null||u===void 0?void 0:u.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},e.React.createElement(x,{style:U.container},e.React.createElement(k,{style:{justifyContent:"center",alignItems:"center"},label:`Preview Style: ${!(t.storage===null||t.storage===void 0||(R=t.storage.switches)===null||R===void 0)&&R.darkMode?"Light":"Dark"} Mode`,subLabel:"Click to Switch Mode",trailing:e.React.createElement(ue,{value:(t.storage===null||t.storage===void 0||(v=t.storage.switches)===null||v===void 0?void 0:v.darkMode)??!0,onValueChange:function(o){return t.storage.switches.darkMode=o}})}),e.React.createElement(x,{style:[U.row,U.border,{overflow:"hidden",marginRight:10}]},e.React.createElement(x,{style:{width:"2%",backgroundColor:`${t.storage.colors.gutterColor}${ge(O.toPercentage(m))}`}}),e.React.createElement(x,{style:{flex:1,backgroundColor:`${t.storage.colors.backgroundColor}${ge(O.toPercentage(d))}`,justifyContent:"center",alignItems:"center"}},e.React.createElement(yt,{style:{fontSize:20,color:!(t.storage===null||t.storage===void 0||(i=t.storage.switches)===null||i===void 0)&&i.darkMode?"black":"white"}}," Low Effort Normal Example Message "),e.React.createElement(yt,{style:{fontSize:20,color:t.storage.colors.textColor||"#000000"}}," Low Effort Deleted Example Message "))),e.React.createElement(bt,{label:`Background Color Alpha: ${O.toPercentage(d)}%`,value:d,style:{width:"90%"},onValueChange:function(o){l(Number(O.formatDecimal(o))),t.storage.colors.backgroundColorAlpha=ge(O.toPercentage(o))}}),e.React.createElement(z,null),e.React.createElement(bt,{label:`Background Gutter Alpha: ${O.toPercentage(m)}%`,value:m,style:{width:"90%"},onValueChange:function(o){y(Number(O.formatDecimal(o))),t.storage.colors.gutterColorAlpha=ge(O.toPercentage(o))}}))))),e.React.createElement(Z,{title:"Ignore List Setting",style:[U.header]},e.React.createElement(k,{label:"Add User to List",subLabel:"List of ignored users for the plugin",leading:e.React.createElement(te,{style:{opacity:1},source:b.getAssetIDByName("ic_members")}),onPress:D,trailing:e.React.createElement(mt,{onPress:D},e.React.createElement(te,{style:{opacity:1},source:ga}))}),e.React.createElement(z,null))))}E.findByProps("openLazy","hideActionSheet");const W=E.findByProps("getChannel","getDMFromUserId"),ha=E.findByProps("_channelMessages"),va=E.findByProps("getMessage","getMessages");function Ea(n){return B.before("dispatch",e.FluxDispatcher,function(r){const[a]=r,f=a?.type;if(f=="MESSAGE_DELETE"){var c,h,s,p,S,C,w,u,R,v,i,d,l,m,y,_,D,o,I,L;if(t.storage.switches.enableMD==!1||a?.otherPluginBypass)return r;const T=ha.get(a.channelId),g=T?.get(a.id);if(!g||a?.id&&((c=n[a?.id])===null||c===void 0?void 0:c.stage)==2)return r;if(a?.id&&((h=n[a?.id])===null||h===void 0?void 0:h.stage)==1){var M;return n[a?.id].stage=2,((M=n[a?.id])===null||M===void 0?void 0:M.message)??r}const lt=g==null||(s=g.author)===null||s===void 0?void 0:s.id,ot=g==null||(p=g.author)===null||p===void 0?void 0:p.username,ee=!g?.content&&(g==null||(S=g.attachments)===null||S===void 0?void 0:S.length)==0&&(g==null||(C=g.embeds)===null||C===void 0?void 0:C.length)==0;return!lt||!ot||ee||!(t.storage===null||t.storage===void 0||(w=t.storage.switches)===null||w===void 0)&&w.ignoreBots&&!(g==null||(u=g.author)===null||u===void 0)&&u.bot||(t.storage===null||t.storage===void 0||(v=t.storage.inputs)===null||v===void 0||(R=v.ignoredUserList)===null||R===void 0?void 0:R.length)>0&&!((i=t.storage.inputs.ignoredUserList)===null||i===void 0)&&i.some(function(fe){var K;return fe?.id==(g==null||(K=g.author)===null||K===void 0?void 0:K.id)||fe.username==g.author.username})||(r[0]={type:"MESSAGE_UPDATE",channelId:g?.channel_id||a?.channelId,message:{...g,content:g?.content,type:0,flags:64,channel_id:g?.channel_id||a?.channelId,guild_id:W==null||(d=W.getChannel(g?.channel_id))===null||d===void 0?void 0:d.guild_id,timestamp:`${new Date().toJSON()}`,state:"SENT",was_deleted:!0},optimistic:!1,sendMessageOptions:{},isPushNotification:!1},n[a?.id||g?.id]={message:r,stage:1},t.storage.log.push({type:"MessageDelete",author:{id:g==null||(l=g.author)===null||l===void 0?void 0:l.id,username:`${(g==null||(m=g.author)===null||m===void 0?void 0:m.discriminator)=="0"?`@${g==null||(y=g.author)===null||y===void 0?void 0:y.username}`:`${g==null||(_=g.author)===null||_===void 0?void 0:_.username}#${g==null||(D=g.author)===null||D===void 0?void 0:D.discriminator}`}`,avatar:g==null||(o=g.author)===null||o===void 0?void 0:o.avatar,bot:g==null||(I=g.author)===null||I===void 0?void 0:I.bot},content:g?.content,where:{channel:g?.channel_id||a?.channelId,guild:W==null||(L=W.getChannel(g?.channel_id))===null||L===void 0?void 0:L.guild_id,messageLink:g?.id}})),r}if(f=="MESSAGE_UPDATE"){var $,A,V,j,J,ae,G,ne,De,Te,Ne,Le,Fe,Pe,Be,Me,$e,xe,Ue,Oe,ke,ze,Ve,Ge,He,Ye,Xe,We,je,Je,Ke,Qe,qe,Ze,et,tt,at;if(t.storage.switches.enableMU==!1||a?.otherPluginBypass||!(a==null||(A=a.message)===null||A===void 0||($=A.author)===null||$===void 0)&&$.bot)return r;const T=va.getMessage((a==null||(V=a.message)===null||V===void 0?void 0:V.channel_id)||a?.channelId,(a==null||(j=a.message)===null||j===void 0?void 0:j.id)||a?.id),g=T==null||(J=T.author)===null||J===void 0?void 0:J.id,lt=T==null||(ae=T.author)===null||ae===void 0?void 0:ae.username,ot=!T?.content&&(T==null||(G=T.attachments)===null||G===void 0?void 0:G.length)==0&&(T==null||(ne=T.embeds)===null||ne===void 0?void 0:ne.length)==0;if(!T||!g||!lt||ot||!(!(a==null||(De=a.message)===null||De===void 0)&&De.content)||!T?.content||(a==null||(Te=a.message)===null||Te===void 0?void 0:Te.content)==T?.content||(t.storage===null||t.storage===void 0||(Le=t.storage.inputs)===null||Le===void 0||(Ne=Le.ignoredUserList)===null||Ne===void 0?void 0:Ne.length)>0&&!(t.storage===null||t.storage===void 0||(Pe=t.storage.inputs)===null||Pe===void 0||(Fe=Pe.ignoredUserList)===null||Fe===void 0)&&Fe.some(function(he){var re,st;return he?.id==(T==null||(re=T.author)===null||re===void 0?void 0:re.id)||he?.username==(T==null||(st=T.author)===null||st===void 0?void 0:st.username)}))return r;let ee=(t.storage===null||t.storage===void 0||(Be=t.storage.inputs)===null||Be===void 0?void 0:Be.editedMessageBuffer)||"`[ EDITED ]`";ee=ee+` +${h}`),e.clipboard.setString(s),H.showToast("Log content copied")},style:L.text_container},e.React.createElement(X,null,h?.length>0?e.React.createElement(e.React.Fragment,null,e.React.createElement(ce,{style:[L.main_text,L.old_message]},_e(y,_)),e.React.createElement(ce,{style:[L.main_text,L.message_content]},_e(h,_))):e.React.createElement(ce,{style:L.message_content},_e(y,_)))))))}))))}const sa=v.findByName("CustomColorPickerActionSheet"),{ScrollView:ca,View:x,Text:yt,TouchableOpacity:mt,TextInput:an,Pressable:nn,Image:da}=P.General,{FormLabel:rn,FormIcon:te,FormArrow:ln,FormRow:k,FormSwitch:ue,FormSwitchRow:on,FormSection:Z,FormDivider:z,FormInput:ua,FormSliderRow:bt}=P.Forms,U=e.stylesheet.createThemedStyleSheet({text:{color:N.semanticColors.HEADER_SECONDARY,paddingLeft:"5.5%",paddingRight:10,marginBottom:10,letterSpacing:.25,fontFamily:e.constants.Fonts.PRIMARY_BOLD,fontSize:16},subText:{color:N.semanticColors.TEXT_POSITIVE,paddingLeft:"6%",paddingRight:10,marginBottom:10,letterSpacing:.25,fontFamily:e.constants.Fonts.DISPLAY_NORMAL,fontSize:12},input:{fontSize:16,fontFamily:e.constants.Fonts.PRIMARY_MEDIUM,color:N.semanticColors.TEXT_NORMAL},placeholder:{color:N.semanticColors.INPUT_PLACEHOLDER_TEXT},container:{flex:1,justifyContent:"center",alignItems:"center"},colorPreview:{width:"75%",height:100,marginBottom:20},row:{flexDirection:"row",height:80,width:"90%",marginBottom:20},border:{borderRadius:12}}),ga=p.getAssetIDByName("ic_add_24px");v.findByProps("getUser");const fa=v.findByName("useIsFocused"),pt=[{id:"enableMD",default:!0,label:"Toggle Message Delete",subLabel:"Logs deleted message"},{id:"enableMU",default:!0,label:"Toggle Message Update",subLabel:"Logs edited message"},{id:"logWarning",default:!1,label:"Toggle Exceeding Log Limit Warning",subLabel:"Warn if log limit exceed"}],St=[{id:"minimalistic",default:!0,label:"Minimalistic Settings",subLabel:"Removes all Styling (Enabled by Default)"},{id:"useBackgroundColor",default:!1,label:"Enable Background Color",subLabel:"Background Color for Deleted Message, similiar to Mention but Customizeable"},{id:"ignoreBots",default:!1,label:"Ignore Bots",subLabel:"Ignore bot deleted messages."},{id:"removeDismissButton",default:!1,label:"Remove Dissmiss Message",subLabel:"Remove clickable Dismiss Message text from deleted ephemeral messages."},{id:"addTimestampForEdits",default:!1,label:"Add Edit Timestamp",subLabel:"Add Timestamp for edited messages."}],_t=[{id:"textColor",label:"Deleted Message Text Color",subLabel:"Click to customize Deleted Message Text Color",defaultColor:"#E40303"},{id:"backgroundColor",label:"Deleted Message Background Color",subLabel:"Click to customize Background Color",defaultColor:"#FF2C2F"},{id:"gutterColor",label:"Deleted Message Background Gutter Color",subLabel:"Click to customize Background Gutter Color",defaultColor:"#FF2C2F"}],Ct=[{id:"deletedMessageBuffer",title:"Customize Deleted Message",type:"default",placeholder:"This message is deleted"},{id:"editedMessageBuffer",title:"Customize Edited Separator",type:"default",placeholder:"`[ EDITED ]`"},{id:"historyToast",title:"Customize Remove History Toast Message",type:"default",placeholder:"History Removed"},{id:"logLength",title:"Customize Log message length",type:"numeric",placeholder:"60"},{id:"logCount",title:"Customize Log Limit",type:"numeric",placeholder:"1000"}];function ge(n){n=Number(n);const r=Math.min(Math.max(n,0),100),a=Math.round(r/100*255).toString(16).toUpperCase();return a.length===1?"0"+a:a}function It(n){const r=parseInt(n,16);return isNaN(r)?0:Math.round(r/255*100)}const O={toPercentage:function(n){return n=Number(n),n===0?0:n===1?100:Math.round(n*100)},toDecimal:function(n){n=Number(n);const r=Math.min(Math.max(n,0),100);return r===0?0:r===100?1:r/100},formatDecimal:function(n){return n=Number(n),n===0||n===1?n:n.toFixed(2)}};function Ie(){var n,r,a,f,u,E,c,S,_,R,w,d,y,h,i;le.useProxy(t.storage);const[s,l]=e.React.useState(O.toDecimal(It(t.storage===null||t.storage===void 0||(n=t.storage.colors)===null||n===void 0?void 0:n.backgroundColorAlpha)??100)),[b,m]=e.React.useState(O.toDecimal(It(t.storage===null||t.storage===void 0||(r=t.storage.colors)===null||r===void 0?void 0:r.gutterColorAlpha)??100)),C=e.NavigationNative.useNavigation();fa();const D=function(){C.push("VendettaCustomPage",{title:"List of Ignored Users",render:function(){return e.React.createElement(aa,null)}})};return e.React.createElement(ca,null,e.React.createElement(x,{style:{marginTop:20,marginBottom:20}},e.React.createElement(Z,{title:"Plugin Setting",style:[U.header]},e.React.createElement(k,{label:"Antied Logging Page",leading:e.React.createElement(k.Icon,{source:p.getAssetIDByName("ic_edit_24px")}),trailing:k.Arrow,onPress:function(){return C.push("VendettaCustomPage",{title:"Antied Logging Page",render:function(){return e.React.createElement(Ce,null)}})}}),e.React.createElement(k,{label:"Customization",subLabel:"Show customization for the plugin",leading:e.React.createElement(te,{style:{opacity:1},source:p.getAssetIDByName("ic_category_16px")}),trailing:e.React.createElement(ue,{value:(t.storage===null||t.storage===void 0||(a=t.storage.switches)===null||a===void 0?void 0:a.customizeable)??!1,onValueChange:function(o){return t.storage.switches.customizeable=o}})}),(t.storage===null||t.storage===void 0||(f=t.storage.switches)===null||f===void 0?void 0:f.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(Z,{title:"Patches"}),e.React.createElement(z,null)),(t.storage===null||t.storage===void 0||(u=t.storage.switches)===null||u===void 0?void 0:u.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},pt?.map(function(o,I){return e.React.createElement(e.React.Fragment,null,e.React.createElement(k,{label:o?.label,subLabel:o?.subLabel,leading:o?.icon&&e.React.createElement(te,{style:{opacity:1},source:p.getAssetIDByName(o?.icon)}),trailing:"id"in o?e.React.createElement(ue,{value:(t.storage===null||t.storage===void 0?void 0:t.storage.switches[o?.id])??o?.default,onValueChange:function(F){return t.storage.switches[o?.id]=F}}):void 0}),I!==pt?.length-1&&e.React.createElement(z,null))}))),(t.storage===null||t.storage===void 0||(E=t.storage.switches)===null||E===void 0?void 0:E.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(Z,{title:"Switches"}),e.React.createElement(z,null)),(t.storage===null||t.storage===void 0||(c=t.storage.switches)===null||c===void 0?void 0:c.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},St?.map(function(o,I){return e.React.createElement(e.React.Fragment,null,e.React.createElement(k,{label:o?.label,subLabel:o?.subLabel,leading:o?.icon&&e.React.createElement(te,{style:{opacity:1},source:p.getAssetIDByName(o?.icon)}),trailing:"id"in o?e.React.createElement(ue,{value:(t.storage===null||t.storage===void 0?void 0:t.storage.switches[o?.id])??o?.default,onValueChange:function(F){return t.storage.switches[o?.id]=F}}):void 0}),I!==St?.length-1&&e.React.createElement(z,null))}))),(t.storage===null||t.storage===void 0||(S=t.storage.switches)===null||S===void 0?void 0:S.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(Z,{title:"Text Variables"}),e.React.createElement(z,null)),(t.storage===null||t.storage===void 0||(_=t.storage.switches)===null||_===void 0?void 0:_.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},Ct?.map(function(o,I){return e.React.createElement(e.React.Fragment,null,e.React.createElement(ua,{title:o?.title,keyboardType:o?.type,placeholder:o?.placeholder,value:(t.storage===null||t.storage===void 0?void 0:t.storage.inputs[o.id])??o?.placeholder,onChange:function(F){return t.storage.inputs[o.id]=F.toString()}}),I!==Ct.length-1&&e.React.createElement(z,null))}))),(t.storage===null||t.storage===void 0||(R=t.storage.switches)===null||R===void 0?void 0:R.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(Z,{title:"Color Pickers"}),e.React.createElement(z,null)),(t.storage===null||t.storage===void 0||(w=t.storage.switches)===null||w===void 0?void 0:w.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},_t?.map(function(o){var I;const F=function(){var M;return st(sa,{color:dt==null||(M=ie)===null||M===void 0?void 0:M.toInt(t.storage.colors[o.id]||o?.defaultColor||"#000"),onSelect:function($){var A;const V=dt==null||(A=ie)===null||A===void 0?void 0:A.toHex($);t.storage.colors[o.id]=V}})};return e.React.createElement(e.React.Fragment,null,e.React.createElement(k,{label:o?.label,subLabel:o?.subLabel||"Click to Update",onPress:F,trailing:e.React.createElement(mt,{onPress:F},e.React.createElement(da,{source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mJsrQAAAgwBAJ9P6qYAAAAASUVORK5CYII="},style:{width:32,height:32,borderRadius:10,backgroundColor:(t.storage===null||t.storage===void 0?void 0:t.storage.colors[o.id])||((I=_t.find(function(M){return M?.id==o?.id}))===null||I===void 0?void 0:I.defaultColor)||"#000"}}))}))}))),(t.storage===null||t.storage===void 0||(d=t.storage.switches)===null||d===void 0?void 0:d.customizeable)&&e.React.createElement(e.React.Fragment,null,e.React.createElement(x,{style:[U.subText]},e.React.createElement(x,{style:U.container},e.React.createElement(k,{style:{justifyContent:"center",alignItems:"center"},label:`Preview Style: ${!(t.storage===null||t.storage===void 0||(y=t.storage.switches)===null||y===void 0)&&y.darkMode?"Light":"Dark"} Mode`,subLabel:"Click to Switch Mode",trailing:e.React.createElement(ue,{value:(t.storage===null||t.storage===void 0||(h=t.storage.switches)===null||h===void 0?void 0:h.darkMode)??!0,onValueChange:function(o){return t.storage.switches.darkMode=o}})}),e.React.createElement(x,{style:[U.row,U.border,{overflow:"hidden",marginRight:10}]},e.React.createElement(x,{style:{width:"2%",backgroundColor:`${t.storage.colors.gutterColor}${ge(O.toPercentage(b))}`}}),e.React.createElement(x,{style:{flex:1,backgroundColor:`${t.storage.colors.backgroundColor}${ge(O.toPercentage(s))}`,justifyContent:"center",alignItems:"center"}},e.React.createElement(yt,{style:{fontSize:20,color:!(t.storage===null||t.storage===void 0||(i=t.storage.switches)===null||i===void 0)&&i.darkMode?"black":"white"}}," Low Effort Normal Example Message "),e.React.createElement(yt,{style:{fontSize:20,color:t.storage.colors.textColor||"#000000"}}," Low Effort Deleted Example Message "))),e.React.createElement(bt,{label:`Background Color Alpha: ${O.toPercentage(s)}%`,value:s,style:{width:"90%"},onValueChange:function(o){l(Number(O.formatDecimal(o))),t.storage.colors.backgroundColorAlpha=ge(O.toPercentage(o))}}),e.React.createElement(z,null),e.React.createElement(bt,{label:`Background Gutter Alpha: ${O.toPercentage(b)}%`,value:b,style:{width:"90%"},onValueChange:function(o){m(Number(O.formatDecimal(o))),t.storage.colors.gutterColorAlpha=ge(O.toPercentage(o))}}))))),e.React.createElement(Z,{title:"Ignore List Setting",style:[U.header]},e.React.createElement(k,{label:"Add User to List",subLabel:"List of ignored users for the plugin",leading:e.React.createElement(te,{style:{opacity:1},source:p.getAssetIDByName("ic_members")}),onPress:D,trailing:e.React.createElement(mt,{onPress:D},e.React.createElement(te,{style:{opacity:1},source:ga}))}),e.React.createElement(z,null))))}v.findByProps("openLazy","hideActionSheet");const W=v.findByProps("getChannel","getDMFromUserId"),ha=v.findByProps("_channelMessages"),va=v.findByProps("getMessage","getMessages");function Ea(n){return B.before("dispatch",e.FluxDispatcher,function(r){const[a]=r,f=a?.type;if(f=="MESSAGE_DELETE"){var u,E,c,S,_,R,w,d,y,h,i,s,l,b,m,C,D,o,I,F;if(t.storage.switches.enableMD==!1||a?.otherPluginBypass)return r;const T=ha.get(a.channelId),g=T?.get(a.id);if(!g||a?.id&&((u=n[a?.id])===null||u===void 0?void 0:u.stage)==2)return r;if(a?.id&&((E=n[a?.id])===null||E===void 0?void 0:E.stage)==1){var M;return n[a?.id].stage=2,((M=n[a?.id])===null||M===void 0?void 0:M.message)??r}const lt=g==null||(c=g.author)===null||c===void 0?void 0:c.id,ot=g==null||(S=g.author)===null||S===void 0?void 0:S.username,ee=!g?.content&&(g==null||(_=g.attachments)===null||_===void 0?void 0:_.length)==0&&(g==null||(R=g.embeds)===null||R===void 0?void 0:R.length)==0;return!lt||!ot||ee||!(t.storage===null||t.storage===void 0||(w=t.storage.switches)===null||w===void 0)&&w.ignoreBots&&!(g==null||(d=g.author)===null||d===void 0)&&d.bot||(t.storage===null||t.storage===void 0||(h=t.storage.inputs)===null||h===void 0||(y=h.ignoredUserList)===null||y===void 0?void 0:y.length)>0&&!((i=t.storage.inputs.ignoredUserList)===null||i===void 0)&&i.some(function(fe){var K;return fe?.id==(g==null||(K=g.author)===null||K===void 0?void 0:K.id)||fe.username==g.author.username})||(r[0]={type:"MESSAGE_UPDATE",channelId:g?.channel_id||a?.channelId,message:{...g,content:g?.content,type:0,flags:64,channel_id:g?.channel_id||a?.channelId,guild_id:W==null||(s=W.getChannel(g?.channel_id))===null||s===void 0?void 0:s.guild_id,timestamp:`${new Date().toJSON()}`,state:"SENT",was_deleted:!0},optimistic:!1,sendMessageOptions:{},isPushNotification:!1},n[a?.id||g?.id]={message:r,stage:1},t.storage.log.push({type:"MessageDelete",author:{id:g==null||(l=g.author)===null||l===void 0?void 0:l.id,username:`${(g==null||(b=g.author)===null||b===void 0?void 0:b.discriminator)=="0"?`@${g==null||(m=g.author)===null||m===void 0?void 0:m.username}`:`${g==null||(C=g.author)===null||C===void 0?void 0:C.username}#${g==null||(D=g.author)===null||D===void 0?void 0:D.discriminator}`}`,avatar:g==null||(o=g.author)===null||o===void 0?void 0:o.avatar,bot:g==null||(I=g.author)===null||I===void 0?void 0:I.bot},content:g?.content,where:{channel:g?.channel_id||a?.channelId,guild:W==null||(F=W.getChannel(g?.channel_id))===null||F===void 0?void 0:F.guild_id,messageLink:g?.id}})),r}if(f=="MESSAGE_UPDATE"){var $,A,V,j,J,ae,G,ne,De,Te,Ne,Fe,Le,Pe,Be,Me,$e,xe,Ue,Oe,ke,ze,Ve,Ge,He,Ye,Xe,We,je,Je,Ke,Qe,qe,Ze,et,tt,at;if(t.storage.switches.enableMU==!1||a?.otherPluginBypass||!(a==null||(A=a.message)===null||A===void 0||($=A.author)===null||$===void 0)&&$.bot)return r;const T=va.getMessage((a==null||(V=a.message)===null||V===void 0?void 0:V.channel_id)||a?.channelId,(a==null||(j=a.message)===null||j===void 0?void 0:j.id)||a?.id),g=T==null||(J=T.author)===null||J===void 0?void 0:J.id,lt=T==null||(ae=T.author)===null||ae===void 0?void 0:ae.username,ot=!T?.content&&(T==null||(G=T.attachments)===null||G===void 0?void 0:G.length)==0&&(T==null||(ne=T.embeds)===null||ne===void 0?void 0:ne.length)==0;if(!T||!g||!lt||ot||!(!(a==null||(De=a.message)===null||De===void 0)&&De.content)||!T?.content||(a==null||(Te=a.message)===null||Te===void 0?void 0:Te.content)==T?.content||(t.storage===null||t.storage===void 0||(Fe=t.storage.inputs)===null||Fe===void 0||(Ne=Fe.ignoredUserList)===null||Ne===void 0?void 0:Ne.length)>0&&!(t.storage===null||t.storage===void 0||(Pe=t.storage.inputs)===null||Pe===void 0||(Le=Pe.ignoredUserList)===null||Le===void 0)&&Le.some(function(he){var re,it;return he?.id==(T==null||(re=T.author)===null||re===void 0?void 0:re.id)||he?.username==(T==null||(it=T.author)===null||it===void 0?void 0:it.username)}))return r;let ee=(t.storage===null||t.storage===void 0||(Be=t.storage.inputs)===null||Be===void 0?void 0:Be.editedMessageBuffer)||"`[ EDITED ]`";ee=ee+` -`;const fe=a?.message||T;let K=`${T?.content}`;if(!(t.storage===null||t.storage===void 0||(Me=t.storage.switches)===null||Me===void 0)&&Me.addTimestampForEdits){var nt;const he=Date.now(),re=``;K+=` (${re}) ${ee}${(a==null||(nt=a.message)===null||nt===void 0?void 0:nt.content)??""}`}else{var rt;K+=` ${ee}${(a==null||(rt=a.message)===null||rt===void 0?void 0:rt.content)??""}`}return r[0]={type:"MESSAGE_UPDATE",message:{...fe,content:K,guild_id:($e=W.getChannel(a?.channelId||(a==null||(xe=a.message)===null||xe===void 0?void 0:xe.channel_id)||T?.channel_id))===null||$e===void 0?void 0:$e.guild_id,edited_timestamp:"invalid_timestamp"}},t.storage.log.push({type:"MessageUpdate",author:{id:a==null||(Oe=a.message)===null||Oe===void 0||(Ue=Oe.author)===null||Ue===void 0?void 0:Ue.id,username:`${(a==null||(ze=a.message)===null||ze===void 0||(ke=ze.author)===null||ke===void 0?void 0:ke.discriminator)=="0"?`@${a==null||(Ge=a.message)===null||Ge===void 0||(Ve=Ge.author)===null||Ve===void 0?void 0:Ve.username}`:`${a==null||(Ye=a.message)===null||Ye===void 0||(He=Ye.author)===null||He===void 0?void 0:He.username}#${a==null||(We=a.message)===null||We===void 0||(Xe=We.author)===null||Xe===void 0?void 0:Xe.discriminator}`}`,avatar:a==null||(Je=a.message)===null||Je===void 0||(je=Je.author)===null||je===void 0?void 0:je.avatar,bot:a==null||(Qe=a.message)===null||Qe===void 0||(Ke=Qe.author)===null||Ke===void 0?void 0:Ke.bot},content:T?.content,edited:a==null||(qe=a.message)===null||qe===void 0?void 0:qe.content,where:{channel:a?.channelId||(a==null||(Ze=a.message)===null||Ze===void 0?void 0:Ze.channel_id)||T?.channel_id,guild:W==null||(et=W.getChannel(a?.channelId||(a==null||(tt=a.message)===null||tt===void 0?void 0:tt.channel_id)||T?.channel_id))===null||et===void 0?void 0:et.guild_id,messageLink:a==null||(at=a.message)===null||at===void 0?void 0:at.id}}),r}return r})}const Ra=E.findByProps("startEditMessage");function ya(){return B.before("startEditMessage",Ra,function(n){var r;let a=(t.storage===null||t.storage===void 0||(r=t.storage.inputs)===null||r===void 0?void 0:r.editedMessageBuffer)||"`[ EDITED ]`";a=a+` +`;const fe=a?.message||T;let K=`${T?.content}`;if(!(t.storage===null||t.storage===void 0||(Me=t.storage.switches)===null||Me===void 0)&&Me.addTimestampForEdits){var nt;const he=Date.now(),re=``;K+=` (${re}) ${ee}${(a==null||(nt=a.message)===null||nt===void 0?void 0:nt.content)??""}`}else{var rt;K+=` ${ee}${(a==null||(rt=a.message)===null||rt===void 0?void 0:rt.content)??""}`}return r[0]={type:"MESSAGE_UPDATE",message:{...fe,content:K,guild_id:($e=W.getChannel(a?.channelId||(a==null||(xe=a.message)===null||xe===void 0?void 0:xe.channel_id)||T?.channel_id))===null||$e===void 0?void 0:$e.guild_id,edited_timestamp:"invalid_timestamp"}},t.storage.log.push({type:"MessageUpdate",author:{id:a==null||(Oe=a.message)===null||Oe===void 0||(Ue=Oe.author)===null||Ue===void 0?void 0:Ue.id,username:`${(a==null||(ze=a.message)===null||ze===void 0||(ke=ze.author)===null||ke===void 0?void 0:ke.discriminator)=="0"?`@${a==null||(Ge=a.message)===null||Ge===void 0||(Ve=Ge.author)===null||Ve===void 0?void 0:Ve.username}`:`${a==null||(Ye=a.message)===null||Ye===void 0||(He=Ye.author)===null||He===void 0?void 0:He.username}#${a==null||(We=a.message)===null||We===void 0||(Xe=We.author)===null||Xe===void 0?void 0:Xe.discriminator}`}`,avatar:a==null||(Je=a.message)===null||Je===void 0||(je=Je.author)===null||je===void 0?void 0:je.avatar,bot:a==null||(Qe=a.message)===null||Qe===void 0||(Ke=Qe.author)===null||Ke===void 0?void 0:Ke.bot},content:T?.content,edited:a==null||(qe=a.message)===null||qe===void 0?void 0:qe.content,where:{channel:a?.channelId||(a==null||(Ze=a.message)===null||Ze===void 0?void 0:Ze.channel_id)||T?.channel_id,guild:W==null||(et=W.getChannel(a?.channelId||(a==null||(tt=a.message)===null||tt===void 0?void 0:tt.channel_id)||T?.channel_id))===null||et===void 0?void 0:et.guild_id,messageLink:a==null||(at=a.message)===null||at===void 0?void 0:at.id}}),r}return r})}const Ra=v.findByProps("startEditMessage");function ya(){return B.before("startEditMessage",Ra,function(n){var r;let a=(t.storage===null||t.storage===void 0||(r=t.storage.inputs)===null||r===void 0?void 0:r.editedMessageBuffer)||"`[ EDITED ]`";a=a+` -`;const[f,c,h]=n,s=h.split(a);return n[2]=s[s.length-1],n})}const{DCDChatManager:ma}=e.ReactNative.NativeModules;function ba(n){return B.before("updateRows",ma,function(r){var a;let f=JSON.parse(r[1]);const{textColor:c,backgroundColor:h,backgroundColorAlpha:s,gutterColor:p,gutterColorAlpha:S}=t.storage.colors,C=(a=t.storage.inputs)===null||a===void 0?void 0:a.deletedMessageBuffer,{useBackgroundColor:w,minimalistic:u,removeDismissButton:R}=t.storage.switches;function v(l,m){l||(l=m);const y=l?.trim();if(y.startsWith("#")){const _=y.slice(1);if(/^[0-9A-Fa-f]{6}$/.test(_))return"#"+_.toUpperCase()}else if(/^[0-9A-Fa-f]{6}$/.test(y))return"#"+y.toUpperCase();return m||"#000"}function i(l,m){const y=m?.toString(),_=["text","heading","s","u","em","strong","list","blockQuote"];if(Array.isArray(l))return l.map(function(D){return i(D,y)});if(typeof l=="object"&&l!==null){const{content:D,type:o,target:I,items:L}=l;if(!_.includes(o))return l;if(o==="text"&&D&&D.length>=1)return{content:[{content:D,type:"text"}],target:"usernameOnClick",type:"link",context:{username:1,medium:!0,usernameOnClick:{action:"0",userId:"0",linkColor:e.ReactNative.processColor(y),messageChannelId:"0"}}};const M=i(D,y),$=L?L.map(i,y):void 0;if(M!==D||$!==L||!_.includes(o)){const A={...l,content:M};return o==="blockQuote"&&I&&(A.content=M,A.target=I),o==="list"&&A?.content&&delete A.content,L&&(A.items=$),A}}return l}function d(l,m,y){return l&&(m!=null&&(l.content[0].content[0].content=m+" "),y==null&&l.content[0].content.splice(1)),l}return f.forEach(function(l){if(l?.type==1){var m;if(n[l==null||(m=l.message)===null||m===void 0?void 0:m.id]){if((C?.length>0||C!="")&&(l.message.edited=C),u==!1){var y;const _=v(c,"#E40303"),D=i(l==null||(y=l.message)===null||y===void 0?void 0:y.content,_);l.message.content=D}if(R&&(l.message.ephemeralIndication=d(l.message.ephemeralIndication,void 0,void 0)),u==!1&&w==!0){const _=v(`${h}`,"#FF2C2F"),D=v(`${p}`,"#FF2C2F");l.backgroundHighlight??={},l.backgroundHighlight={backgroundColor:e.ReactNative.processColor(`${_}${s}`),gutterColor:e.ReactNative.processColor(`${D}${S}`)}}}}}),r[1]=JSON.stringify(f),r[1]})}const pa=E.findByProps("updateMessageRecord","createMessageRecord");function Sa(){return B.after("createMessageRecord",pa,function(n,r){let[a]=n;r.was_deleted=a.was_deleted})}const _a=E.findByName("MessageRecord",!1);function Ca(){return B.after("default",_a,function(n,r){let[a]=n;r.was_deleted=!!a.was_deleted})}const At=E.findByProps("updateMessageRecord","createMessageRecord");function Ia(){return B.instead("updateMessageRecord",At,function(n,r){let[a,f]=n;return f.was_deleted?At.createMessageRecord(f,a.reactions):r.apply(this,[a,f])})}const{FormSection:Aa}=P.Forms,wa=E.findByName("getScreens"),Da=E.findByName("UserSettingsOverviewWrapper",!1),Ta=e.stylesheet.createThemedStyleSheet({container:{flex:1,backgroundColor:N.semanticColors.BACKGROUND_MOBILE_PRIMARY}});function wt(n,r,a){const f=[],c=B.after("default",Da,function(h,s){c();const p=oe.findInReactTree(s.props.children,function(S){return S.type&&S.type.name==="UserSettingsOverview"});f.push(B.after("render",p.type.prototype,function(S,C){let{props:{children:w}}=C;const u=[e.i18n.Messages.BILLING_SETTINGS,e.i18n.Messages.PREMIUM_SETTINGS];w=oe.findInReactTree(w,function(v){return v.children[1].type===Aa}).children;const R=w.findIndex(function(v){return u.includes(v?.props.label)});n()&&w.splice(R===-1?4:R,0,r({}))}))},!0);if(f.push(c),wa&&a){const h=`VENDETTA_PLUGIN_${e.lodash.snakeCase(a.key).toUpperCase()}`,s=a.page.render,p=e.React.memo(function(u){let{navigation:R}=u;const v=R.addListener("focus",function(){v(),R.setOptions(oe.without(a.page,"noErrorBoundary","render"))});return e.React.createElement(e.ReactNative.View,{style:Ta.container},a.page.noErrorBoundary?e.React.createElement(s,null):e.React.createElement(P.ErrorBoundary,null,e.React.createElement(s,null)))}),S={[h]:{type:"route",title:function(){return a.title},icon:a.icon,parent:null,screen:{route:`VendettaPlugin${e.lodash.chain(a.key).camelCase().upperFirst().value()}`,getComponent:function(){return p}}}},C=function(u,R){var v,i;const d=[...u],l=R?d==null||(v=d[0])===null||v===void 0?void 0:v.sections:d;if(!Array.isArray(l))return l;const m="Vendetta",y=l.find(function(_){return _?.title===m||_?.label===m});return y&&!(!(y==null||(i=y.settings)===null||i===void 0)&&i.includes(h))&&y.settings.push(h),d},w=function(){const u=E.findByProps("useOverviewSettings"),R=E.findByProps("getSettingTitleConfig"),v=E.findByProps("SETTING_RELATIONSHIPS","SETTING_RENDERER_CONFIGS"),i="getSettingSearchListItems",d="getSettingListItems",l=E.findByProps(i),m=l?i:d,y=l??E.findByProps(d);if(!y||!u)return!1;f.push(B.after("useOverviewSettings",u,function(o,I){return C(I)})),f.push(B.after("getSettingTitleConfig",R,function(o,I){return{...I,[h]:a.title}})),f.push(B.after(m,y,function(o,I){let[L]=o;return[...L.includes(h)?[{type:"setting_search_result",ancestorRendererData:S[h],setting:h,title:function(){return a.title},breadcrumbs:["Vendetta"],icon:S[h].icon}]:[],...I]}));const _=v.SETTING_RELATIONSHIPS,D=v.SETTING_RENDERER_CONFIGS;return v.SETTING_RELATIONSHIPS={..._,[h]:null},v.SETTING_RENDERER_CONFIGS={...D,...S},f.push(function(){v.SETTING_RELATIONSHIPS=_,v.SETTING_RENDERER_CONFIGS=_}),!0};(function(){const u=E.findByProps("SearchableSettingsList"),R=E.findByProps("SETTING_RENDERER_CONFIG"),v=E.findByProps("getSettingListItems");if(!v||!u||!R)return!1;f.push(B.before("type",u.SearchableSettingsList,function(d){return C(d,!0)})),f.push(B.after("getSettingListSearchResultItems",v,function(d,l){for(const m of l)m.setting===h&&(m.breadcrumbs=["Vendetta"])}));const i=R.SETTING_RENDERER_CONFIG;return R.SETTING_RENDERER_CONFIG={...i,...S},f.push(function(){R.SETTING_RENDERER_CONFIG=i}),!0})()||w()}return function(){return f.forEach(function(h){return h()})}}const{FormRow:Ae}=P.Forms;function Na(){const n=e.NavigationNative.useNavigation();return React.createElement(P.ErrorBoundary,null,React.createElement(Ae,{label:"Antied",leading:React.createElement(Ae.Icon,{source:b.getAssetIDByName("ic_edit_24px")}),trailing:Ae.Arrow,onPress:function(){return n.push("VendettaCustomPage",{title:"Anti Edit & Delete Setting",render:Ie})}}))}const{FormRow:we}=P.Forms;function La(){const n=e.NavigationNative.useNavigation();return React.createElement(P.ErrorBoundary,null,React.createElement(we,{label:"Anti Edit & Delete Logs",leading:React.createElement(we.Icon,{source:b.getAssetIDByName("ic_edit_24px")}),trailing:we.Arrow,onPress:function(){return n.push("VendettaCustomPage",{title:"Anti Edit & Delete Logs",render:Ce})}}))}function Fa(){const n=[];return n.push(wt(function(){return!0},function(){return React.createElement(Na,null)},{key:Ee.plugin.manifest.name,icon:b.getAssetIDByName("ic_edit_24px"),title:"Anti Edit & Delete",page:{title:"Anti Edit & Delete",render:Ie}}),wt(function(){return!0},function(){return React.createElement(La,null)},{key:Ee.plugin.manifest.name,icon:b.getAssetIDByName("ic_message_delete"),title:"Anti Edit & Delete Logs",page:{title:"Anti Edit & Delete Logs",render:Ce}})),function(){return n.forEach(function(r){return r()})}}const Dt=E.findByProps("openLazy","hideActionSheet"),Pa=E.findByProps("getMessage","getMessages"),Ba=E.findByProps("getChannel","getDMFromUserId"),Tt=E.findByProps("_channelMessages"),{FormRow:Ma,FormIcon:$a}=P.Forms;Re(t.storage,{switches:{customizeable:!1,enableMD:!0,enableMU:!0,useBackgroundColor:!1,ignoreBots:!1,minimalistic:!0,alwaysAdd:!1,darkMode:!0,removeDismissButton:!1,addTimestampForEdits:!1,timestampStyle:"R"},colors:{textColor:"#E40303",backgroundColor:"#FF2C2F",backgroundColorAlpha:"33",gutterColor:"#FF2C2F",gutterColorAlpha:"CC"},inputs:{deletedMessageBuffer:"This message is deleted",editedMessageBuffer:"`[ EDITED ]`",historyToast:"History Removed",logLength:60,ignoredUserList:[]},log:[],logCount:1e3,logWarning:!1});let Nt=[],Lt={};var xa={onLoad:function(){Nt.push(Fa(),Ea(Lt),ba(Lt),ya(),Sa(),Ca(),Ia(),B.before("openLazy",Dt,function(n){let[r,a,f]=n;const c=f?.message;a!=="MessageLongPressActionSheet"||!c||r.then(function(h){const s=B.after("default",h,function(p,S){var C;e.React.useEffect(function(){return function(){s()}},[]);const w=oe.findInReactTree(S,function(i){var d,l;return(i==null||(l=i[0])===null||l===void 0||(d=l.type)===null||d===void 0?void 0:d.name)==="ButtonRow"});if(!w)return S;const u=Math.max(w.findIndex(function(i){var d,l;return(i==null||(d=i.props)===null||d===void 0?void 0:d.message)===(e.i18n===null||e.i18n===void 0||(l=e.i18n.Messages)===null||l===void 0?void 0:l.MESSAGE_ACTION_REPLY)}),0),R=Pa.getMessage(c.channel_id,c?.id),v=function(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}((t.storage===null||t.storage===void 0||(C=t.storage.inputs)===null||C===void 0?void 0:C.editedMessageBuffer)||"`[ EDITED ]`");if(new RegExp(v,"gmi").test(c.content)){const i=u||1;w.splice(i,0,e.React.createElement(Ma,{label:"Remove Edit History",leading:e.React.createElement($a,{style:{opacity:1},source:b.getAssetIDByName("ic_edit_24px")}),onPress:function(){var d,l,m,y,_,D;let o=(t.storage===null||t.storage===void 0||(d=t.storage.inputs)===null||d===void 0?void 0:d.editedMessageBuffer)||"`[ EDITED ]`";o=o+` +`;const[f,u,E]=n,c=E.split(a);return n[2]=c[c.length-1],n})}const{DCDChatManager:ma}=e.ReactNative.NativeModules;function ba(n){return B.before("updateRows",ma,function(r){var a;let f=JSON.parse(r[1]);const{textColor:u,backgroundColor:E,backgroundColorAlpha:c,gutterColor:S,gutterColorAlpha:_}=t.storage.colors,R=(a=t.storage.inputs)===null||a===void 0?void 0:a.deletedMessageBuffer,{useBackgroundColor:w,minimalistic:d,removeDismissButton:y}=t.storage.switches;function h(l,b){l||(l=b);const m=l?.trim();if(m.startsWith("#")){const C=m.slice(1);if(/^[0-9A-Fa-f]{6}$/.test(C))return"#"+C.toUpperCase()}else if(/^[0-9A-Fa-f]{6}$/.test(m))return"#"+m.toUpperCase();return b||"#000"}function i(l,b){const m=b?.toString(),C=["text","heading","s","u","em","strong","list","blockQuote"];if(Array.isArray(l))return l.map(function(D){return i(D,m)});if(typeof l=="object"&&l!==null){const{content:D,type:o,target:I,items:F}=l;if(!C.includes(o))return l;if(o==="text"&&D&&D.length>=1)return{content:[{content:D,type:"text"}],target:"usernameOnClick",type:"link",context:{username:1,medium:!0,usernameOnClick:{action:"0",userId:"0",linkColor:e.ReactNative.processColor(m),messageChannelId:"0"}}};const M=i(D,m),$=F?F.map(i,m):void 0;if(M!==D||$!==F||!C.includes(o)){const A={...l,content:M};return o==="blockQuote"&&I&&(A.content=M,A.target=I),o==="list"&&A?.content&&delete A.content,F&&(A.items=$),A}}return l}function s(l,b,m){return l&&(b!=null&&(l.content[0].content[0].content=b+" "),m==null&&l.content[0].content.splice(1)),l}return f.forEach(function(l){if(l?.type==1){var b;if(n[l==null||(b=l.message)===null||b===void 0?void 0:b.id]){if((R?.length>0||R!="")&&(l.message.edited=R),d==!1){var m;const C=h(u,"#E40303"),D=i(l==null||(m=l.message)===null||m===void 0?void 0:m.content,C);l.message.content=D}if(y&&(l.message.ephemeralIndication=s(l.message.ephemeralIndication,void 0,void 0)),d==!1&&w==!0){const C=h(`${E}`,"#FF2C2F"),D=h(`${S}`,"#FF2C2F");l.backgroundHighlight??={},l.backgroundHighlight={backgroundColor:e.ReactNative.processColor(`${C}${c}`),gutterColor:e.ReactNative.processColor(`${D}${_}`)}}}}}),r[1]=JSON.stringify(f),r[1]})}const pa=v.findByProps("updateMessageRecord","createMessageRecord");function Sa(){return B.after("createMessageRecord",pa,function(n,r){let[a]=n;r.was_deleted=a.was_deleted})}const _a=v.findByName("MessageRecord",!1);function Ca(){return B.after("default",_a,function(n,r){let[a]=n;r.was_deleted=!!a.was_deleted})}const At=v.findByProps("updateMessageRecord","createMessageRecord");function Ia(){return B.instead("updateMessageRecord",At,function(n,r){let[a,f]=n;return f.was_deleted?At.createMessageRecord(f,a.reactions):r.apply(this,[a,f])})}const{FormSection:Aa}=P.Forms,wa=v.findByName("getScreens"),Da=v.findByName("UserSettingsOverviewWrapper",!1),Ta=e.stylesheet.createThemedStyleSheet({container:{flex:1,backgroundColor:N.semanticColors.BACKGROUND_MOBILE_PRIMARY}});function wt(n,r,a){const f=[],u=B.after("default",Da,function(E,c){u();const S=oe.findInReactTree(c.props.children,function(_){return _.type&&_.type.name==="UserSettingsOverview"});f.push(B.after("render",S.type.prototype,function(_,R){let{props:{children:w}}=R;const d=[e.i18n.Messages.BILLING_SETTINGS,e.i18n.Messages.PREMIUM_SETTINGS];w=oe.findInReactTree(w,function(h){return h.children[1].type===Aa}).children;const y=w.findIndex(function(h){return d.includes(h?.props.label)});n()&&w.splice(y===-1?4:y,0,r({}))}))},!0);if(f.push(u),wa&&a){const E=`VENDETTA_PLUGIN_${e.lodash.snakeCase(a.key).toUpperCase()}`,c=a.page.render,S=e.React.memo(function(d){let{navigation:y}=d;const h=y.addListener("focus",function(){h(),y.setOptions(oe.without(a.page,"noErrorBoundary","render"))});return e.React.createElement(e.ReactNative.View,{style:Ta.container},a.page.noErrorBoundary?e.React.createElement(c,null):e.React.createElement(P.ErrorBoundary,null,e.React.createElement(c,null)))}),_={[E]:{type:"route",title:function(){return a.title},icon:a.icon,parent:null,screen:{route:`VendettaPlugin${e.lodash.chain(a.key).camelCase().upperFirst().value()}`,getComponent:function(){return S}}}},R=function(d,y){var h,i;const s=[...d],l=y?s==null||(h=s[0])===null||h===void 0?void 0:h.sections:s;if(!Array.isArray(l))return l;const b="Vendetta",m=l.find(function(C){return C?.title===b||C?.label===b});return m&&!(!(m==null||(i=m.settings)===null||i===void 0)&&i.includes(E))&&m.settings.push(E),s},w=function(){const d=v.findByProps("useOverviewSettings"),y=v.findByProps("getSettingTitleConfig"),h=v.findByProps("SETTING_RELATIONSHIPS","SETTING_RENDERER_CONFIGS"),i="getSettingSearchListItems",s="getSettingListItems",l=v.findByProps(i),b=l?i:s,m=l??v.findByProps(s);if(!m||!d)return!1;f.push(B.after("useOverviewSettings",d,function(o,I){return R(I)})),f.push(B.after("getSettingTitleConfig",y,function(o,I){return{...I,[E]:a.title}})),f.push(B.after(b,m,function(o,I){let[F]=o;return[...F.includes(E)?[{type:"setting_search_result",ancestorRendererData:_[E],setting:E,title:function(){return a.title},breadcrumbs:["Vendetta"],icon:_[E].icon}]:[],...I]}));const C=h.SETTING_RELATIONSHIPS,D=h.SETTING_RENDERER_CONFIGS;return h.SETTING_RELATIONSHIPS={...C,[E]:null},h.SETTING_RENDERER_CONFIGS={...D,..._},f.push(function(){h.SETTING_RELATIONSHIPS=C,h.SETTING_RENDERER_CONFIGS=C}),!0};(function(){const d=v.findByProps("SearchableSettingsList"),y=v.findByProps("SETTING_RENDERER_CONFIG"),h=v.findByProps("getSettingListItems");if(!h||!d||!y)return!1;f.push(B.before("type",d.SearchableSettingsList,function(s){return R(s,!0)})),f.push(B.after("getSettingListSearchResultItems",h,function(s,l){for(const b of l)b.setting===E&&(b.breadcrumbs=["Vendetta"])}));const i=y.SETTING_RENDERER_CONFIG;return y.SETTING_RENDERER_CONFIG={...i,..._},f.push(function(){y.SETTING_RENDERER_CONFIG=i}),!0})()||w()}return function(){return f.forEach(function(E){return E()})}}const{FormRow:Ae}=P.Forms;function Na(){const n=e.NavigationNative.useNavigation();return React.createElement(P.ErrorBoundary,null,React.createElement(Ae,{label:"Antied",leading:React.createElement(Ae.Icon,{source:p.getAssetIDByName("ic_edit_24px")}),trailing:Ae.Arrow,onPress:function(){return n.push("VendettaCustomPage",{title:"Anti Edit & Delete Setting",render:Ie})}}))}const{FormRow:we}=P.Forms;function Fa(){const n=e.NavigationNative.useNavigation();return React.createElement(P.ErrorBoundary,null,React.createElement(we,{label:"Anti Edit & Delete Logs",leading:React.createElement(we.Icon,{source:p.getAssetIDByName("ic_edit_24px")}),trailing:we.Arrow,onPress:function(){return n.push("VendettaCustomPage",{title:"Anti Edit & Delete Logs",render:Ce})}}))}function La(){const n=[];return n.push(wt(function(){return!0},function(){return React.createElement(Na,null)},{key:Ee.plugin.manifest.name,icon:p.getAssetIDByName("ic_edit_24px"),title:"Anti Edit & Delete",page:{title:"Anti Edit & Delete",render:Ie}}),wt(function(){return!0},function(){return React.createElement(Fa,null)},{key:Ee.plugin.manifest.name,icon:p.getAssetIDByName("ic_message_delete"),title:"Anti Edit & Delete Logs",page:{title:"Anti Edit & Delete Logs",render:Ce}})),function(){return n.forEach(function(r){return r()})}}const Dt=v.findByProps("openLazy","hideActionSheet"),Pa=v.findByProps("getMessage","getMessages"),Ba=v.findByProps("getChannel","getDMFromUserId"),Tt=v.findByProps("_channelMessages"),{FormRow:Ma,FormIcon:$a}=P.Forms;Re(t.storage,{switches:{customizeable:!1,enableMD:!0,enableMU:!0,useBackgroundColor:!1,ignoreBots:!1,minimalistic:!0,alwaysAdd:!1,darkMode:!0,removeDismissButton:!1,addTimestampForEdits:!1,timestampStyle:"R"},colors:{textColor:"#E40303",backgroundColor:"#FF2C2F",backgroundColorAlpha:"33",gutterColor:"#FF2C2F",gutterColorAlpha:"CC"},inputs:{deletedMessageBuffer:"This message is deleted",editedMessageBuffer:"`[ EDITED ]`",historyToast:"History Removed",logLength:60,ignoredUserList:[]},log:[],logCount:1e3,logWarning:!1});let Nt=[],Ft={};var xa={onLoad:function(){Nt.push(La(),Ea(Ft),ba(Ft),ya(),Sa(),Ca(),Ia(),B.before("openLazy",Dt,function(n){let[r,a,f]=n;const u=f?.message;a!=="MessageLongPressActionSheet"||!u||r.then(function(E){const c=B.after("default",E,function(S,_){var R;e.React.useEffect(function(){return function(){c()}},[]);const w=oe.findInReactTree(_,function(i){var s,l;return(i==null||(l=i[0])===null||l===void 0||(s=l.type)===null||s===void 0?void 0:s.name)==="ButtonRow"});if(!w)return _;const d=Math.max(w.findIndex(function(i){var s,l;return(i==null||(s=i.props)===null||s===void 0?void 0:s.message)===(e.i18n===null||e.i18n===void 0||(l=e.i18n.Messages)===null||l===void 0?void 0:l.MESSAGE_ACTION_REPLY)}),0),y=Pa.getMessage(u.channel_id,u?.id),h=function(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}((t.storage===null||t.storage===void 0||(R=t.storage.inputs)===null||R===void 0?void 0:R.editedMessageBuffer)||"`[ EDITED ]`");if(new RegExp(h,"gmi").test(u.content)){const i=d||1;w.splice(i,0,e.React.createElement(Ma,{label:"Remove Edit History",leading:e.React.createElement($a,{style:{opacity:1},source:p.getAssetIDByName("ic_edit_24px")}),onPress:function(){var s,l,b,m,C,D;let o=(t.storage===null||t.storage===void 0||(s=t.storage.inputs)===null||s===void 0?void 0:s.editedMessageBuffer)||"`[ EDITED ]`";o=o+` -`;const I=c==null||(l=c.content)===null||l===void 0?void 0:l.split(o),L=I[I.length-1],M=c==null||(m=c.embeds)===null||m===void 0?void 0:m.map(function(A){var V,j,J;const ae=A==null||(J=A.color)===null||J===void 0||(j=J.replace(/.+\(/,""))===null||j===void 0||(V=j.replace(/\%/g,""))===null||V===void 0?void 0:V.replace(")",""),G=ae?.split(", "),ne=e.ReactNative.processColor(`${ct(se.HSLtoHEX(G[0],G[1],G[2]),G[3])}`);return{...A,author:A.author,title:A.rawTitle,description:A.rawDescription,url:A.url,type:A.type,image:A.image,thumbnail:A.thumbnail,color:ne,content_scan_version:1}});if(e.FluxDispatcher.dispatch({type:"MESSAGE_UPDATE",message:{...c,content:`${L}`,embeds:M??[],attachments:c.attachments??[],mentions:c.mentions??[],guild_id:Ba.getChannel(R.channel_id).guild_id},otherPluginBypass:!0}),Dt.hideActionSheet(),(t.storage===null||t.storage===void 0||(_=t.storage.inputs)===null||_===void 0||(y=_.historyToast)===null||y===void 0?void 0:y.length)>0||(t.storage===null||t.storage===void 0||(D=t.storage.inputs)===null||D===void 0?void 0:D.historyToast)!=""){var $;H.showToast(`[ANTI ED] ${t.storage===null||t.storage===void 0||($=t.storage.inputs)===null||$===void 0?void 0:$.historyToast}`,b.getAssetIDByName("ic_edit_24px"))}}}))}})})}))},onUnload:function(){for(const n of Nt)n();for(const n in Tt._channelMessages)for(const r of Tt._channelMessages[n]._array)r.was_deleted&&e.FluxDispatcher.dispatch({type:"MESSAGE_DELETE",id:r.id,channelId:r.channel_id,otherPluginBypass:!0})},settings:Ie};return ve.default=xa,Object.defineProperty(ve,"__esModule",{value:!0}),ve})({},vendetta,vendetta.metro,vendetta.plugin,vendetta.storage,vendetta.ui.components,vendetta.ui.assets,vendetta.metro.common,vendetta.ui,vendetta.ui.toasts,vendetta.ui.alerts,vendetta.patcher,vendetta.utils); +`;const I=u==null||(l=u.content)===null||l===void 0?void 0:l.split(o),F=I[I.length-1],M=u==null||(b=u.embeds)===null||b===void 0?void 0:b.map(function(A){var V,j,J;const ae=A==null||(J=A.color)===null||J===void 0||(j=J.replace(/.+\(/,""))===null||j===void 0||(V=j.replace(/\%/g,""))===null||V===void 0?void 0:V.replace(")",""),G=ae?.split(", "),ne=e.ReactNative.processColor(`${ct(ie.HSLtoHEX(G[0],G[1],G[2]),G[3])}`);return{...A,author:A.author,title:A.rawTitle,description:A.rawDescription,url:A.url,type:A.type,image:A.image,thumbnail:A.thumbnail,color:ne,content_scan_version:1}});if(e.FluxDispatcher.dispatch({type:"MESSAGE_UPDATE",message:{...u,content:`${F}`,embeds:M??[],attachments:u.attachments??[],mentions:u.mentions??[],guild_id:Ba.getChannel(y.channel_id).guild_id},otherPluginBypass:!0}),Dt.hideActionSheet(),(t.storage===null||t.storage===void 0||(C=t.storage.inputs)===null||C===void 0||(m=C.historyToast)===null||m===void 0?void 0:m.length)>0||(t.storage===null||t.storage===void 0||(D=t.storage.inputs)===null||D===void 0?void 0:D.historyToast)!=""){var $;H.showToast(`[ANTI ED] ${t.storage===null||t.storage===void 0||($=t.storage.inputs)===null||$===void 0?void 0:$.historyToast}`,p.getAssetIDByName("ic_edit_24px"))}}}))}})})}))},onUnload:function(){for(const n of Nt)n();for(const n in Tt._channelMessages)for(const r of Tt._channelMessages[n]._array)r.was_deleted&&e.FluxDispatcher.dispatch({type:"MESSAGE_DELETE",id:r.id,channelId:r.channel_id,otherPluginBypass:!0})},settings:Ie};return ve.default=xa,Object.defineProperty(ve,"__esModule",{value:!0}),ve})({},vendetta,vendetta.metro,vendetta.plugin,vendetta.storage,vendetta.ui.components,vendetta.ui.assets,vendetta.metro.common,vendetta.ui,vendetta.ui.toasts,vendetta.ui.alerts,vendetta.patcher,vendetta.utils); diff --git a/antied/manifest.json b/antied/manifest.json index f140424..0fe6786 100644 --- a/antied/manifest.json +++ b/antied/manifest.json @@ -1 +1 @@ -{"name":"Anti [Edit|Delete] v1.0.0","description":"Keeps deleted messages and logs edited messages, until you restart/reloads the app","authors":[{"name":"Angelica","id":"692632336961110087"}],"main":"index.js","vendetta":{"icon":"ic_edit_24px"},"hash":"aa84c88cf483b89897f37a2b2cbf82cafb5e5417aa9f32bda249e69095da3d05"} \ No newline at end of file +{"name":"Anti [Edit|Delete] v1.0.0","description":"Keeps deleted messages and logs edited messages, until you restart/reloads the app","authors":[{"name":"Angelica","id":"692632336961110087"}],"main":"index.js","vendetta":{"icon":"ic_edit_24px"},"hash":"0a6da0722dc36c51c7a5400eeb6f269eb3b262e9116c864310043581033765d2"} \ No newline at end of file