Build 533169stable
Module 263063
2,803 characters · in no known chunkDependencies
Required by (74)
2077025287431365194355926579309291196304131929134638143154146528150639153331175335216595226694228855241989244625250493264409279871293865322223325272333672353428360549360563362311365940369790376352383302399143400297406140430506447253455067458739464035494566529200565447572448586068618167642737659242663111687021692617698154717612743987767143769015770101787001807396827693845202851091854378880392883471888848906754910607910692922611933171
Lazily required by (0)none
Requires (16)
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{Ay:()=>C,DN:()=>I,iu:()=>T,s:()=>S});var r=n(627968),i=n(64700),s=n(503698),a=n.n(s),o=n(936504),l=n(311907),u=n(827734),c=n(435371),d=n(397927),_=n(162532),f=n(624793),p=n(714991),h=n(260509),m=n(531685),E=n(515718),g=n(821589),A=n(645206);let I={SMOL:"Smol",MINI:"Mini",SMALLER:"Smaller",SMALL:"Small",MEDIUM:"Medium",LARGE:"Large",LARGER:"Larger",XLARGE:"XLarge"},T={[I.SMOL]:16,[I.MINI]:20,[I.SMALLER]:24,[I.SMALL]:30,[I.MEDIUM]:40,[I.LARGE]:50,[I.LARGER]:64,[I.XLARGE]:100},S={[I.SMOL]:[10,10,8,6,6,4],[I.MINI]:[12,12,10,10,8,6,4],[I.SMALLER]:[13,13,11,11,9,7,5],[I.SMALL]:[14,14,12,12,10,8,6],[I.MEDIUM]:[16,16,14,14,12,10,8],[I.LARGE]:[18,18,16,16,14,12,10],[I.LARGER]:[19,19,17,17,15,13,11],[I.XLARGE]:[20,20,18,18,16,14,12]};class y extends i.PureComponent{renderAcronym(){let{guild:e,iconSrc:t}=this.props;return null!=e.icon||null!=t?null:(0,r.jsx)("div",{className:A.acronym,children:(0,h.Rb)(e)})}renderBadge(){let{showBadge:e,guild:t,badgeStrokeColor:n,badgeTooltipColor:i,badgeTooltipDelay:s}=this.props;return e?(0,r.jsx)(p.A,{className:A.guildIconBadge,guild:t,badgeStrokeColor:n,tooltipColor:i,tooltipDelay:s}):null}renderIcon(){let{guild:e,className:t,showBadge:n,active:i,size:s,style:o={},textScale:l,showTooltip:u,tooltipPosition:c,onClick:_,to:f,badgeStrokeColor:p,animate:m,tabIndex:E,iconSrc:I,"aria-hidden":T,lossless:y,iconSize:v,...N}=this.props,C=S[s],R=null!=_?d.DUT:"div",O=(0,h.Rb)(e);return(0,r.jsxs)(R,{className:a()(A.icon,t,(0,g.t)(A,"iconSize",s),{[(0,g.t)(A,"iconActive",s)??""]:i,[A.iconInactive]:!i,[A.noIcon]:null==e.icon}),"aria-hidden":T,style:null==e.icon?{fontSize:(C[O.length]??C[C.length-1])*l,...o}:o,onClick:null!=f||null==_?void 0:_,tabIndex:E,...N,children:[this.renderAcronym(),this.renderBadge()]})}renderTooltip(){let{guild:e,showTooltip:t,tooltipPosition:n}=this.props;return t?(0,r.jsx)(c.m_,{text:e.name,position:n,"aria-label":!1,children:this.renderIcon()}):this.renderIcon()}render(){let{to:e,guild:t,source:n,tabIndex:i,"aria-hidden":s}=this.props;return null!=e?(0,r.jsx)(o.N_,{"aria-hidden":s,to:{pathname:e,state:null!=n?{analyticsSource:n}:null},"aria-label":t.name,tabIndex:i,children:this.renderTooltip()}):this.renderTooltip()}}let v=l.Ay.connectStores([m.A],e=>{let{guild:t,animate:n,iconSrc:r,style:i,size:s,iconSize:a,lossless:o}=e;return null==r&&(r=t instanceof f.GO?t.getIconURL(a??T[s],n&&m.A.isFocused()):(0,h.Iv)(t,a??T[s],n&&m.A.isFocused(),o)),{style:{...i,backgroundImage:(0,E.wU)(r)}}})((0,_.Y)(e=>(0,r.jsx)(y,{...e})));class N extends i.PureComponent{static Sizes=I;static defaultProps={size:I.LARGE,textScale:1,showBadge:!1,showTooltip:!1,active:!1,tooltipPosition:"top",badgeStrokeColor:u.A.unsafe_rawColors.WHITE.css,animate:!1};render(){return(0,r.jsx)(v,{...this.props})}}let C=N}