{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/account_gallery/index.js"],"names":["MediaItem","visible","displayMedia","_this","props","media","getIn","state","setState","render","label","icon","title","this","status","get","x","y","style","Object","jsx","className","backgroundImage","backgroundPosition","permalink","to","href","onInterceptClick","handleClick","ImmutablePureComponent","ImmutablePropTypes","map","isRequired","LoadMoreMedia","onLoadMore","maxId","load_more","disabled","onClick","handleLoadMore","PropTypes","string","func","AccountGallery","connect","isAccount","params","accountId","medias","getAccountGallery","isLoading","hasMore","_this2","column","scrollTop","size","last","undefined","e","_e$target","target","scrollHeight","clientHeight","handleScrollToBottom","dispatch","expandAccountMediaTimeline","preventDefault","prevRouterProps","_ref","location","mastodonModalOpen","c","componentDidMount","fetchAccount","componentWillReceiveProps","nextProps","_this3","_this$props","missing_indicator","loadOlder","loading_indicator","handleLoadOlder","react_default","a","createElement","ref","setRef","profile_column_header","handleHeaderClick","react_router_scroll_4_es","scrollKey","shouldUpdateScroll","onScroll","handleScroll","header_container","role","index","account_gallery_LoadMoreMedia","media_item_MediaItem","object","list","bool"],"mappings":"wQAMqBA,wLAMX,CACNC,QAA0B,aAAjBC,MAAgCC,EAAKC,MAAMC,MAAMC,MAAM,CAAC,SAAU,eAAkC,aAAjBJ,+CAGhF,WACZ,OAAKC,EAAKI,MAAMN,UACdE,EAAKK,SAAS,CAAEP,SAAS,KAClB,2CAMXQ,OAAA,WAAU,IAUJC,EAAOC,EAAMC,EATTP,EAAUQ,KAAKT,MAAfC,MACAJ,EAAYY,KAAKN,MAAjBN,QACFa,EAAST,EAAMU,IAAI,UAGnBC,EAA2B,KAFlBX,EAAMC,MAAM,CAAC,OAAQ,QAAS,MAEvB,EAAK,IACrBW,EAA2B,KAFlBZ,EAAMC,MAAM,CAAC,OAAQ,QAAS,OAEvB,EAAK,IACrBY,EAAQ,GAqBd,MAjB0B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,2BAAf,EACEF,OAAAC,EAAA,EAAAD,CAAC6D,EAAA,EAAD,aA/G4BnD,+BAEvB,CACjBiB,OAAQN,IAAU2D,OAAOnE,WACzBgC,SAAUxB,IAAUE,KAAKV,WACzBgB,OAAQlB,IAAmBsE,KAAKpE,WAChCkB,UAAWV,IAAU6D,KACrBlD,QAASX,IAAU6D,KACnBxD,UAAWL,IAAU6D","file":"flavours/glitch/async/account_gallery.js","sourcesContent":["import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Permalink from 'flavours/glitch/components/permalink';\nimport { displayMedia } from 'flavours/glitch/util/initial_state';\n\nexport default class MediaItem extends ImmutablePureComponent {\n\n static propTypes = {\n media: ImmutablePropTypes.map.isRequired,\n };\n\n state = {\n visible: displayMedia !== 'hide_all' && !this.props.media.getIn(['status', 'sensitive']) || displayMedia === 'show_all',\n };\n\n handleClick = () => {\n if (!this.state.visible) {\n this.setState({ visible: true });\n return true;\n }\n\n return false;\n }\n\n render () {\n const { media } = this.props;\n const { visible } = this.state;\n const status = media.get('status');\n const focusX = media.getIn(['meta', 'focus', 'x']);\n const focusY = media.getIn(['meta', 'focus', 'y']);\n const x = ((focusX / 2) + .5) * 100;\n const y = ((focusY / -2) + .5) * 100;\n const style = {};\n\n let label, icon, title;\n\n if (media.get('type') === 'gifv') {\n label = GIF;\n }\n\n if (visible) {\n style.backgroundImage = `url(${media.get('preview_url')})`;\n style.backgroundPosition = `${x}% ${y}%`;\n title = media.get('description');\n } else {\n icon = (\n \n \n \n );\n title = status.get('spoiler_text') || media.get('description');\n }\n\n return (\n