Module 923121

1,512 characters · in 60ac2cfa4d77c964.js
Dependencies
Required by (2)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){n.d(t,{Bq:()=>x,fH:()=>N,p2:()=>h,q3:()=>E,sF:()=>u,yM:()=>g,zN:()=>m}),n(321073);var i=n(228366),l=n(157559),s=n(913122),r=n(403362),a=n(352821),o=n(107795),d=n(539916),c=n(375708);function u(e){i.h.dispatch({type:"GUILD_SETTINGS_ONBOARDING_CONNECTIONS_ADD",connection:e})}function m(e){i.h.dispatch({type:"GUILD_SETTINGS_ONBOARDING_CONNECTIONS_REMOVE",index:e})}function g(e,t){i.h.dispatch({type:"GUILD_SETTINGS_ONBOARDING_CONNECTIONS_UPDATE",index:e,updates:t})}function x(e){i.h.dispatch({type:"GUILD_SETTINGS_ONBOARDING_CONNECTIONS_REORDER",connections:e})}function h(){i.h.dispatch({type:"GUILD_SETTINGS_ONBOARDING_CONNECTIONS_RESET"})}async function E(e){let t=a.A.getEditedConnections(),n=[];if(t.forEach(e=>{let t=(0,d.Ii)(e);n.push(...t)}),n.length>0)throw j(n),l.A.show({title:c.intl.string(c.t.ISppXw),body:n.join("\n")}),Error("failed to validate connections");i.h.dispatch({type:"GUILD_SETTINGS_ONBOARDING_CONNECTIONS_SUBMIT"});try{var u,m;await (0,o.YN)(e,{connections:t}),u=e,m=t,i.h.dispatch({type:"GUILD_SETTINGS_ONBOARDING_CONNECTIONS_SAVE_SUCCESS",guildId:u,connections:m})}catch(i){let{fieldName:e,error:t}=new s.LG(i).getAnyErrorMessageAndField()??{},n=[e,t].filter(r.Vq).join(": ");throw j([n]),l.A.show({title:c.intl.string(c.t.iLdiqY),body:n}),i}}function j(e){i.h.dispatch({type:"GUILD_SETTINGS_ONBOARDING_CONNECTIONS_SAVE_FAILED",errors:e})}function N(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t||a.A.hasChanges()?E(e):Promise.resolve()}}