{"version":3,"sources":["webpack:///app/javascript/build/mastodon-5e6f150/app/javascript/flavours/glitch/components/server_hero_image.tsx","webpack:///app/javascript/build/mastodon-5e6f150/app/javascript/flavours/glitch/features/about/index.jsx"],"names":["ServerHeroImage","_ref","src","srcSet","blurhash","className","loaded","setLoaded","useState","handleLoad","useCallback","_jsx","classNames","role","Blurhash","hash","alt","onLoad","messages","defineMessages","title","id","defaultMessage","rules","blocks","silenced","silencedExplanation","suspended","suspendedExplanation","severityMessages","silence","explanation","suspend","Section","PureComponent","constructor","arguments","state","collapsed","this","props","open","handleClick","onOpen","setState","render","children","active","tabIndex","onClick","Icon","fixedWidth","About","handleDomainBlocksOpen","dispatch","fetchDomainBlocks","componentDidMount","fetchServer","fetchExtendedDescription","_server$getIn","_extendedDescription$","multiColumn","intl","server","extendedDescription","domainBlocks","isLoading","get","Column","bindToDocument","label","formatMessage","getIn","map","value","key","replace","join","Skeleton","width","FormattedMessage","values","mastodon","href","target","Account","size","_jsxs","_Fragment","length","dangerouslySetInnerHTML","__html","isEmpty","rule","block","LinkFooter","Helmet","name","content","connect","injectIntl"],"mappings":"0KAcO,MAAMA,EAAmCC,IAKzC,IAL0C,IAC/CC,EAAG,OACHC,EAAM,SACNC,EAAQ,UACRC,GACDJ,EACC,MAAOK,EAAQC,GAAaC,oBAAS,GAE/BC,EAAaC,uBAAY,KAC7BH,GAAU,EAAK,GACd,CAACA,IAEJ,OACEI,YAAA,OACEN,UAAWO,IAAW,QAAS,CAAEN,UAAUD,GAC3CQ,KAAK,qBAAc,EAElBT,GAAYO,YAACG,IAAQ,CAACC,KAAMX,EAAUC,UAAU,mBACjDM,YAAA,OAAKT,IAAKA,EAAKC,OAAQA,EAAQa,IAAI,GAAGC,OAAQR,IAC1C,C,6LCdV,MAAMS,EAAWC,YAAe,CAC9BC,MAAO,CAAEC,GAAG,eAAiBC,eAAe,SAC5CC,MAAO,CAAEF,GAAG,cAAgBC,eAAe,gBAC3CE,OAAQ,CAAEH,GAAG,eAA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,OAAKN,UAAU,6BAAsB,EAClC4D,EAAaE,IAAI,SAASM,KAAIqB,GAC7BnF,YAAA,OAAKN,UAAU,gCAAoCyF,EAAM3B,IAAI,UAC3DxD,YAAA,OAAKN,UAAU,6CAAsC,EACnDM,YAAA,eAAIA,YAAA,QAAMS,MAAQ,YAAW0E,EAAM3B,IAAI,kBAAY,EAAE2B,EAAM3B,IAAI,YAC/DxD,YAAA,QAAMN,UAAU,qCAAqCe,MAAO0C,EAAKS,cAAc1C,EAAiBiE,EAAM3B,IAAI,aAAapC,mBAAa,EAAE+B,EAAKS,cAAc1C,EAAiBiE,EAAM3B,IAAI,aAAa/C,SAGnMT,YAAA,eAAKmF,EAAM3B,IAAI,YAAc,IAAIsB,OAAS,EAAIK,EAAM3B,IAAI,WAAaxD,YAACqE,IAAgB,CAAC3D,GAAE,0CAA2CC,eAAe,iCAM3JX,YAAA,cAAGA,YAACqE,IAAgB,CAAC3D,GAAE,sBAAuBC,eAAe,mEAIjEX,YAACoF,IAAU,IAEXpF,YAAA,OAAKN,UAAU,sBAAe,EAC5BM,YAAA,cAAGA,YAACqE,IAAgB,CAAC3D,GAAE,wBAAyBC,eAAe,mEAC/DX,YAAA,cAAGA,YAACqE,IAAgB,CAAC3D,GAAE,mBAAoBC,eAAe,kFAI9DX,YAACqF,IAAM,UACLrF,YAAA,kBAAQmD,EAAKS,cAAcrD,EAASE,QACpCT,YAAA,QAAMsF,KAAK,SAASC,QAAQ,SAIpC,EAIaC,6BAtLS9D,IAAK,CAC3B0B,OAAQ1B,EAAMmC,MAAM,CAAC,SAAU,WAC/BR,oBAAqB3B,EAAMmC,MAAM,CAAC,SAAU,wBAC5CP,aAAc5B,EAAMmC,MAAM,CAAC,SAAU,oBAmLxB2B,CAAyBC,YAAWhD,G","file":"js/features/glitch/async/about-e2b65d6ba724f4695f79.chunk.js","sourcesContent":["import { useCallback, useState } from 'react';\nimport * as React from 'react';\n\nimport classNames from 'classnames';\n\nimport { Blurhash } from './blurhash';\n\ninterface Props {\n src: string;\n srcSet?: string;\n blurhash?: string;\n className?: string;\n}\n\nexport const ServerHeroImage: React.FC = ({\n src,\n srcSet,\n blurhash,\n className,\n}) => {\n const [loaded, setLoaded] = useState(false);\n\n const handleLoad = useCallback(() => {\n setLoaded(true);\n }, [setLoaded]);\n\n return (\n \n {blurhash && }\n \n \n );\n};\n","import PropTypes from 'prop-types';\nimport { PureComponent } from 'react';\n\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\n\nimport classNames from 'classnames';\nimport { Helmet } from 'react-helmet';\n\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { connect } from 'react-redux';\n\nimport { fetchServer, fetchExtendedDescription, fetchDomainBlocks } from 'flavours/glitch/actions/server';\nimport Column from 'flavours/glitch/components/column';\nimport { Icon } from 'flavours/glitch/components/icon';\nimport { ServerHeroImage } from 'flavours/glitch/components/server_hero_image';\nimport { Skeleton } from 'flavours/glitch/components/skeleton';\nimport Account from 'flavours/glitch/containers/account_container';\nimport LinkFooter from 'flavours/glitch/features/ui/components/link_footer';\n\nconst messages = defineMessages({\n title: { id: 'column.about', defaultMessage: 'About' },\n rules: { id: 'about.rules', defaultMessage: 'Server rules' },\n blocks: { id: 'about.blocks', defaultMessage: 'Moderated servers' },\n silenced: { id: 'about.domain_blocks.silenced.title', defaultMessage: 'Limited' },\n silencedExplanation: { id: 'about.domain_blocks.silenced.explanation', defaultMessage: 'You will generally not see profiles and content from this server, unless you explicitly look it up or opt into it by following.' },\n suspended: { id: 'about.domain_blocks.suspended.title', defaultMessage: 'Suspended' },\n suspendedExplanation: { id: 'about.domain_blocks.suspended.explanation', defaultMessage: 'No data from this server will be processed, stored or exchanged, making any interaction or communication with users from this server impossible.' },\n});\n\nconst severityMessages = {\n silence: {\n title: messages.silenced,\n explanation: messages.silencedExplanation,\n },\n\n suspend: {\n title: messages.suspended,\n explanation: messages.suspendedExplanation,\n },\n};\n\nconst mapStateToProps = state => ({\n server: state.getIn(['server', 'server']),\n extendedDescription: state.getIn(['server', 'extendedDescription']),\n domainBlocks: state.getIn(['server', 'domainBlocks']),\n});\n\nclass Section extends PureComponent {\n\n static propTypes = {\n title: PropTypes.string,\n children: PropTypes.node,\n open: PropTypes.bool,\n onOpen: PropTypes.func,\n };\n\n state = {\n collapsed: !this.props.open,\n };\n\n handleClick = () => {\n const { onOpen } = this.props;\n const { collapsed } = this.state;\n\n this.setState({ collapsed: !collapsed }, () => onOpen && onOpen());\n };\n\n render () {\n const { title, children } = this.props;\n const { collapsed } = this.state;\n\n return (\n
\n
\n {title}\n
\n\n {!collapsed && (\n
{children}
\n )}\n
\n );\n }\n\n}\n\nclass About extends PureComponent {\n\n static propTypes = {\n server: ImmutablePropTypes.map,\n extendedDescription: ImmutablePropTypes.map,\n domainBlocks: ImmutablePropTypes.contains({\n isLoading: PropTypes.bool,\n isAvailable: PropTypes.bool,\n items: ImmutablePropTypes.list,\n }),\n dispatch: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n multiColumn: PropTypes.bool,\n };\n\n componentDidMount () {\n const { dispatch } = this.props;\n dispatch(fetchServer());\n dispatch(fetchExtendedDescription());\n }\n\n handleDomainBlocksOpen = () => {\n const { dispatch } = this.props;\n dispatch(fetchDomainBlocks());\n };\n\n render () {\n const { multiColumn, intl, server, extendedDescription, domainBlocks } = this.props;\n const isLoading = server.get('isLoading');\n\n return (\n \n
\n
\n `${value} ${key.replace('@', '')}`).join(', ')} className='about__header__hero' />\n

{isLoading ? : server.get('domain')}

\n

Mastodon }} />

\n
\n\n
\n
\n

\n\n \n
\n\n
\n\n
\n

\n\n {isLoading ? : {server.getIn(['contact', 'email'])}}\n
\n
\n\n
\n {extendedDescription.get('isLoading') ? (\n <>\n \n
\n \n
\n \n
\n \n \n ) : (extendedDescription.get('content')?.length > 0 ? (\n \n ) : (\n

\n ))}\n
\n\n
\n {!isLoading && (server.get('rules', []).isEmpty() ? (\n

\n ) : (\n
    \n {server.get('rules').map(rule => (\n
  1. \n {rule.get('text')}\n
  2. \n ))}\n
\n ))}\n
\n\n
\n {domainBlocks.get('isLoading') ? (\n <>\n \n
\n \n \n ) : (domainBlocks.get('isAvailable') ? (\n <>\n

\n\n
\n {domainBlocks.get('items').map(block => (\n
\n
\n
{block.get('domain')}
\n {intl.formatMessage(severityMessages[block.get('severity')].title)}\n
\n\n

{(block.get('comment') || '').length > 0 ? block.get('comment') : }

\n
\n ))}\n
\n \n ) : (\n

\n ))}\n
\n\n \n\n
\n

\n

\n
\n
\n\n \n {intl.formatMessage(messages.title)}\n \n \n
\n );\n }\n\n}\n\nexport default connect(mapStateToProps)(injectIntl(About));\n"],"sourceRoot":""}