{"version":3,"sources":["webpack:///./app/javascript/packs/public.js","webpack:///./node_modules/rellax/rellax.js"],"names":["start","window","addEventListener","e","data","parent","type","ready","postMessage","id","height","document","getElementsByTagName","scrollHeight","loadPolyfills","then","IntlMessageFormat","require","default","timeAgoString","delegate","emojify","messages","getLocale","ReactDOM","Rellax","createHistory","createBrowserHistory","scrollToDetailedStatus","history","detailedStatuses","querySelectorAll","location","length","state","scrolledToDetailedStatus","scrollIntoView","replace","pathname","Object","_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__","locale","documentElement","lang","dateTimeFormat","Intl","DateTimeFormat","year","month","day","hour","minute","forEach","call","content","innerHTML","datetime","Date","getAttribute","formattedDate","format","title","textContent","now","formatMessage","_ref","values","defaultMessage","formatDate","date","options","getFullYear","reactComponents","__webpack_require__","bind","_ref2","MediaContainer","component","children","child","removeChild","createElement","render","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","components","body","appendChild","catch","error","console","speed","classList","contains","scrollbarWidth","innerWidth","clientWidth","scrollbarWidthStyle","head","sheet","insertRule","_ref3","target","button","href","_ref4","contentEl","parentNode","querySelector","style","display","marginBottom","preventDefault","nodeName","open","_ref5","name","value","escapeTextContentForBrowser","_ref6","avatar","file","files","url","URL","createObjectURL","dataset","originalSrc","src","_ref8","header","_ref10","lock","checked","_ref11","select","_ref12","input","focus","execCommand","blur","add","setTimeout","remove","err","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","define","undefined","el","self","create","prototype","posY","screenY","posX","screenX","blocks","pause","loop","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","oRequestAnimationFrame","callback","loopId","clearLoop","cancelAnimationFrame","mozCancelAnimationFrame","clearTimeout","transformProp","testEl","transform","vendors","vendor","center","wrapper","relativeToWrapper","round","vertical","horizontal","keys","key","elements","Error","elems","nodeType","init","i","cssText","innerHeight","setPosition","block","createBlock","push","cacheBlocks","animate","dataPercentage","dataSpeed","dataZindex","wrapperPosY","scrollTop","pageYOffset","scrollPosY","offsetTop","pageXOffset","scrollLeft","blockTop","getBoundingClientRect","top","blockHeight","clientHeight","offsetHeight","blockLeft","left","blockWidth","offsetWidth","scrollWidth","percentageY","percentageX","bases","updatePosition","indexOf","index","trimmedStyle","slice","delimiter","baseX","x","baseY","y","width","zindex","oldY","oldX","result","valueX","valueY","Math","positions","positionY","positionX","translate","destroy","removeEventListener","update","refresh","apply","exports","module"],"mappings":"8JAKAA,cAEAC,OAAOC,iBAAiB,UAAW,SAAAC,GACjC,IAAMC,EAAOD,EAAEC,MAAQ,GAElBH,OAAOI,QAAwB,cAAdD,EAAKE,MAI3BC,kBAAM,WACJN,OAAOI,OAAOG,YAAY,CACxBF,KAAM,YACNG,GAAIL,EAAKK,GACTC,OAAQC,SAASC,qBAAqB,QAAQ,GAAGC,cAChD,SAuMPC,cAAgBC,KAnMhB,WACE,IAAMC,EAAoBC,EAAQ,IAAsBC,QAChDC,EAAkBF,EAAQ,IAA1BE,cACAC,EAAaH,EAAQ,IAArBG,SACFC,EAAUJ,EAAQ,IAAoCC,QAEpDI,GAAaC,EADCN,EAAQ,GAAtBM,aACAD,SAEFE,GADQP,EAAQ,GACLA,EAAQ,KACnBQ,EAASR,EAAQ,KACjBS,EAAgBT,EAAQ,IAAWU,qBAEnCC,EAAyB,WAC7B,IAAMC,EAAUH,IACVI,EAAmBnB,SAASoB,iBAAiB,mCAC7CC,EAAWH,EAAQG,SAEO,IAA5BF,EAAiBG,QAAkBD,EAASE,OAAUF,EAASE,MAAMC,2BACvEL,EAAiB,GAAGM,iBACpBP,EAAQQ,QAAQL,EAASM,SAAzBC,OAAAC,EAAA,EAAAD,CAAA,GAAwCP,EAASE,MAAjD,CAAwDC,0BAA0B,OAItF5B,kBAAM,WACJ,IAAMkC,EAAS9B,SAAS+B,gBAAgBC,KAElCC,EAAiB,IAAIC,KAA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,EAAS,OAAS5E,EAAOgC,GAAGhB,UACvKvB,EAAKoC,MAAMG,GAAGjF,MAAM+D,GAAiBwE,EAEvC7F,EAAKhF,QAAQ+F,SAAS2E,IA4BxB,OAzBA1F,EAAK8F,QAAU,WACb,IAAK,IAAIvD,EAAI,EAAGA,EAAIvC,EAAKoC,MAAMzJ,OAAQ4J,IACrCvC,EAAKoC,MAAMG,GAAGjF,MAAMkF,QAAUjC,EAAOgC,GAAGjF,MAIrCkD,IACH7J,OAAOoP,oBAAoB,SAAUzD,GACrC9B,GAAQ,GAIVS,EAAUD,GACVA,EAAS,MAIXsB,IAhDa,SAAT0D,IACEtD,MAA2B,IAAVlC,GACnBuC,IAIF/B,EAASP,EAAKuF,GA6ChBA,GAGAhG,EAAKiG,QAAU3D,EAERtC,KAtTDN,EAAAwG,MAAAC,EAAAxG,GAAAD,KAAA0G,EAAAD,QAAAvG","file":"public-91dc55963a366de204a0.js","sourcesContent":["import escapeTextContentForBrowser from 'escape-html';\nimport loadPolyfills from '../mastodon/load_polyfills';\nimport ready from '../mastodon/ready';\nimport { start } from '../mastodon/common';\n\nstart();\n\nwindow.addEventListener('message', e => {\n const data = e.data || {};\n\n if (!window.parent || data.type !== 'setHeight') {\n return;\n }\n\n ready(() => {\n window.parent.postMessage({\n type: 'setHeight',\n id: data.id,\n height: document.getElementsByTagName('html')[0].scrollHeight,\n }, '*');\n });\n});\n\nfunction main() {\n const IntlMessageFormat = require('intl-messageformat').default;\n const { timeAgoString } = require('../mastodon/components/relative_timestamp');\n const { delegate } = require('rails-ujs');\n const emojify = require('../mastodon/features/emoji/emoji').default;\n const { getLocale } = require('../mastodon/locales');\n const { messages } = getLocale();\n const React = require('react');\n const ReactDOM = require('react-dom');\n const Rellax = require('rellax');\n const createHistory = require('history').createBrowserHistory;\n\n const scrollToDetailedStatus = () => {\n const history = createHistory();\n const detailedStatuses = document.querySelectorAll('.public-layout .detailed-status');\n const location = history.location;\n\n if (detailedStatuses.length === 1 && (!location.state || !location.state.scrolledToDetailedStatus)) {\n detailedStatuses[0].scrollIntoView();\n history.replace(location.pathname, { ...location.state, scrolledToDetailedStatus: true });\n }\n };\n\n ready(() => {\n const locale = document.documentElement.lang;\n\n const dateTimeFormat = new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n });\n\n [].forEach.call(document.querySelectorAll('.emojify'), (content) => {\n content.innerHTML = emojify(content.innerHTML);\n });\n\n [].forEach.call(document.querySelectorAll('time.formatted'), (content) => {\n const datetime = new Date(content.getAttribute('datetime'));\n const formattedDate = dateTimeFormat.format(datetime);\n\n content.title = formattedDate;\n content.textContent = formattedDate;\n });\n\n [].forEach.call(document.querySelectorAll('time.time-ago'), (content) => {\n const datetime = new Date(content.getAttribute('datetime'));\n const now = new Date();\n\n content.title = dateTimeFormat.format(datetime);\n content.textContent = timeAgoString({\n formatMessage: ({ id, defaultMessage }, values) => (new IntlMessageFormat(messages[id] || defaultMessage, locale)).format(values),\n formatDate: (date, options) => (new Intl.DateTimeFormat(locale, options)).format(date),\n }, datetime, now, now.getFullYear());\n });\n\n const reactComponents = document.querySelectorAll('[data-component]');\n\n if (reactComponents.length > 0) {\n import(/* webpackChunkName: \"containers/media_container\" */ '../mastodon/containers/media_container')\n .then(({ default: MediaContainer }) => {\n [].forEach.call(reactComponents, (component) => {\n [].forEach.call(component.children, (child) => {\n component.removeChild(child);\n });\n });\n\n const content = document.createElement('div');\n\n ReactDOM.render(, content);\n document.body.appendChild(content);\n scrollToDetailedStatus();\n })\n .catch(error => {\n console.error(error);\n scrollToDetailedStatus();\n });\n } else {\n scrollToDetailedStatus();\n }\n\n const parallaxComponents = document.querySelectorAll('.parallax');\n\n if (parallaxComponents.length > 0 ) {\n new Rellax('.parallax', { speed: -1 });\n }\n\n if (document.body.classList.contains('with-modals')) {\n const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n const scrollbarWidthStyle = document.createElement('style');\n scrollbarWidthStyle.id = 'scrollbar-width';\n document.head.appendChild(scrollbarWidthStyle);\n scrollbarWidthStyle.sheet.insertRule(`body.with-modals--active { margin-right: ${scrollbarWidth}px; }`, 0);\n }\n });\n\n delegate(document, '.webapp-btn', 'click', ({ target, button }) => {\n if (button !== 0) {\n return true;\n }\n window.location.href = target.href;\n return false;\n });\n\n delegate(document, '.status__content__spoiler-link', 'click', ({ target }) => {\n const contentEl = target.parentNode.parentNode.querySelector('.e-content');\n\n if (contentEl.style.display === 'block') {\n contentEl.style.display = 'none';\n target.parentNode.style.marginBottom = 0;\n } else {\n contentEl.style.display = 'block';\n target.parentNode.style.marginBottom = null;\n }\n\n return false;\n });\n\n delegate(document, '.modal-button', 'click', e => {\n e.preventDefault();\n\n let href;\n\n if (e.target.nodeName !== 'A') {\n href = e.target.parentNode.href;\n } else {\n href = e.target.href;\n }\n\n window.open(href, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');\n });\n\n delegate(document, '#account_display_name', 'input', ({ target }) => {\n const name = document.querySelector('.card .display-name strong');\n if (name) {\n if (target.value) {\n name.innerHTML = emojify(escapeTextContentForBrowser(target.value));\n } else {\n name.textContent = document.querySelector('#default_account_display_name').textContent;\n }\n }\n });\n\n delegate(document, '#account_avatar', 'change', ({ target }) => {\n const avatar = document.querySelector('.card .avatar img');\n const [file] = target.files || [];\n const url = file ? URL.createObjectURL(file) : avatar.dataset.originalSrc;\n\n avatar.src = url;\n });\n\n delegate(document, '#account_header', 'change', ({ target }) => {\n const header = document.querySelector('.card .card__img img');\n const [file] = target.files || [];\n const url = file ? URL.createObjectURL(file) : header.dataset.originalSrc;\n\n header.src = url;\n });\n\n delegate(document, '#account_locked', 'change', ({ target }) => {\n const lock = document.querySelector('.card .display-name i');\n\n if (target.checked) {\n lock.style.display = 'inline';\n } else {\n lock.style.display = 'none';\n }\n });\n\n delegate(document, '.input-copy input', 'click', ({ target }) => {\n target.select();\n });\n\n delegate(document, '.input-copy button', 'click', ({ target }) => {\n const input = target.parentNode.querySelector('.input-copy__wrapper input');\n\n input.focus();\n input.select();\n\n try {\n if (document.execCommand('copy')) {\n input.blur();\n target.parentNode.classList.add('copied');\n\n setTimeout(() => {\n target.parentNode.classList.remove('copied');\n }, 700);\n }\n } catch (err) {\n console.error(err);\n }\n });\n}\n\nloadPolyfills().then(main).catch(error => {\n console.error(error);\n});\n","\n// ------------------------------------------\n// Rellax.js\n// Buttery smooth parallax library\n// Copyright (c) 2016 Moe Amaya (@moeamaya)\n// MIT license\n//\n// Thanks to Paraxify.js and Jaime Cabllero\n// for parallax concepts\n// ------------------------------------------\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.Rellax = factory();\n }\n}(this, function () {\n var Rellax = function(el, options){\n \"use strict\";\n\n var self = Object.create(Rellax.prototype);\n\n var posY = 0;\n var screenY = 0;\n var posX = 0;\n var screenX = 0;\n var blocks = [];\n var pause = true;\n\n // check what requestAnimationFrame to use, and if\n // it's not supported, use the onscroll event\n var loop = window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n function(callback){ return setTimeout(callback, 1000 / 60); };\n\n // store the id for later use\n var loopId = null;\n\n // check what cancelAnimation method to use\n var clearLoop = window.cancelAnimationFrame || window.mozCancelAnimationFrame || clearTimeout;\n\n // check which transform property to use\n var transformProp = window.transformProp || (function(){\n var testEl = document.createElement('div');\n if (testEl.style.transform === null) {\n var vendors = ['Webkit', 'Moz', 'ms'];\n for (var vendor in vendors) {\n if (testEl.style[ vendors[vendor] + 'Transform' ] !== undefined) {\n return vendors[vendor] + 'Transform';\n }\n }\n }\n return 'transform';\n })();\n\n // Default Settings\n self.options = {\n speed: -2,\n center: false,\n wrapper: null,\n relativeToWrapper: false,\n round: true,\n vertical: true,\n horizontal: false,\n callback: function() {},\n };\n\n // User defined options (might have more in the future)\n if (options){\n Object.keys(options).forEach(function(key){\n self.options[key] = options[key];\n });\n }\n\n // By default, rellax class\n if (!el) {\n el = '.rellax';\n }\n\n // check if el is a className or a node\n var elements = typeof el === 'string' ? document.querySelectorAll(el) : [el];\n\n // Now query selector\n if (elements.length > 0) {\n self.elems = elements;\n }\n\n // The elements don't exist\n else {\n throw new Error(\"The elements you're trying to select don't exist.\");\n }\n\n // Has a wrapper and it exists\n if (self.options.wrapper) {\n if (!self.options.wrapper.nodeType) {\n var wrapper = document.querySelector(self.options.wrapper);\n\n if (wrapper) {\n self.options.wrapper = wrapper;\n } else {\n throw new Error(\"The wrapper you're trying to use don't exist.\");\n }\n }\n }\n\n\n // Get and cache initial position of all elements\n var cacheBlocks = function() {\n for (var i = 0; i < self.elems.length; i++){\n var block = createBlock(self.elems[i]);\n blocks.push(block);\n }\n };\n\n\n // Let's kick this script off\n // Build array for cached element values\n var init = function() {\n for (var i = 0; i < blocks.length; i++){\n self.elems[i].style.cssText = blocks[i].style;\n }\n\n blocks = [];\n\n screenY = window.innerHeight;\n screenX = window.innerWidth;\n setPosition();\n\n cacheBlocks();\n\n // If paused, unpause and set listener for window resizing events\n if (pause) {\n window.addEventListener('resize', init);\n pause = false;\n }\n animate();\n };\n\n // We want to cache the parallax blocks'\n // values: base, top, height, speed\n // el: is dom object, return: el cache values\n var createBlock = function(el) {\n var dataPercentage = el.getAttribute( 'data-rellax-percentage' );\n var dataSpeed = el.getAttribute( 'data-rellax-speed' );\n var dataZindex = el.getAttribute( 'data-rellax-zindex' ) || 0;\n\n // initializing at scrollY = 0 (top of browser), scrollX = 0 (left of browser)\n // ensures elements are positioned based on HTML layout.\n //\n // If the element has the percentage attribute, the posY and posX needs to be\n // the current scroll position's value, so that the elements are still positioned based on HTML layout\n var wrapperPosY = self.options.wrapper ? self.options.wrapper.scrollTop : (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);\n // If the option relativeToWrapper is true, use the wrappers offset to top, subtracted from the current page scroll.\n if (self.options.relativeToWrapper) {\n var scrollPosY = (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);\n wrapperPosY = scrollPosY - self.options.wrapper.offsetTop;\n }\n var posY = self.options.vertical ? ( dataPercentage || self.options.center ? wrapperPosY : 0 ) : 0;\n var posX = self.options.horizontal ? ( dataPercentage || self.options.center ? (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft) : 0 ) : 0;\n\n var blockTop = posY + el.getBoundingClientRect().top;\n var blockHeight = el.clientHeight || el.offsetHeight || el.scrollHeight;\n\n var blockLeft = posX + el.getBoundingClientRect().left;\n var blockWidth = el.clientWidth || el.offsetWidth || el.scrollWidth;\n\n // apparently parallax equation everyone uses\n var percentageY = dataPercentage ? dataPercentage : (posY - blockTop + screenY) / (blockHeight + screenY);\n var percentageX = dataPercentage ? dataPercentage : (posX - blockLeft + screenX) / (blockWidth + screenX);\n if(self.options.center){ percentageX = 0.5; percentageY = 0.5; }\n\n // Optional individual block speed as data attr, otherwise global speed\n var speed = dataSpeed ? dataSpeed : self.options.speed;\n\n var bases = updatePosition(percentageX, percentageY, speed);\n\n // ~~Store non-translate3d transforms~~\n // Store inline styles and extract transforms\n var style = el.style.cssText;\n var transform = '';\n\n // Check if there's an inline styled transform\n if (style.indexOf('transform') >= 0) {\n // Get the index of the transform\n var index = style.indexOf('transform');\n\n // Trim the style to the transform point and get the following semi-colon index\n var trimmedStyle = style.slice(index);\n var delimiter = trimmedStyle.indexOf(';');\n\n // Remove \"transform\" string and save the attribute\n if (delimiter) {\n transform = \" \" + trimmedStyle.slice(11, delimiter).replace(/\\s/g,'');\n } else {\n transform = \" \" + trimmedStyle.slice(11).replace(/\\s/g,'');\n }\n }\n\n return {\n baseX: bases.x,\n baseY: bases.y,\n top: blockTop,\n left: blockLeft,\n height: blockHeight,\n width: blockWidth,\n speed: speed,\n style: style,\n transform: transform,\n zindex: dataZindex\n };\n };\n\n // set scroll position (posY, posX)\n // side effect method is not ideal, but okay for now\n // returns true if the scroll changed, false if nothing happened\n var setPosition = function() {\n var oldY = posY;\n var oldX = posX;\n\n posY = self.options.wrapper ? self.options.wrapper.scrollTop : (document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset;\n posX = self.options.wrapper ? self.options.wrapper.scrollLeft : (document.documentElement || document.body.parentNode || document.body).scrollLeft || window.pageXOffset;\n // If option relativeToWrapper is true, use relative wrapper value instead.\n if (self.options.relativeToWrapper) {\n var scrollPosY = (document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset;\n posY = scrollPosY - self.options.wrapper.offsetTop;\n }\n\n\n if (oldY != posY && self.options.vertical) {\n // scroll changed, return true\n return true;\n }\n\n if (oldX != posX && self.options.horizontal) {\n // scroll changed, return true\n return true;\n }\n\n // scroll did not change\n return false;\n };\n\n // Ahh a pure function, gets new transform value\n // based on scrollPosition and speed\n // Allow for decimal pixel values\n var updatePosition = function(percentageX, percentageY, speed) {\n var result = {};\n var valueX = (speed * (100 * (1 - percentageX)));\n var valueY = (speed * (100 * (1 - percentageY)));\n\n result.x = self.options.round ? Math.round(valueX) : Math.round(valueX * 100) / 100;\n result.y = self.options.round ? Math.round(valueY) : Math.round(valueY * 100) / 100;\n\n return result;\n };\n\n // Loop\n var update = function() {\n if (setPosition() && pause === false) {\n animate();\n }\n\n // loop again\n loopId = loop(update);\n };\n\n // Transform3d on parallax element\n var animate = function() {\n var positions;\n for (var i = 0; i < self.elems.length; i++){\n var percentageY = ((posY - blocks[i].top + screenY) / (blocks[i].height + screenY));\n var percentageX = ((posX - blocks[i].left + screenX) / (blocks[i].width + screenX));\n\n // Subtracting initialize value, so element stays in same spot as HTML\n positions = updatePosition(percentageX, percentageY, blocks[i].speed);// - blocks[i].baseX;\n var positionY = positions.y - blocks[i].baseY;\n var positionX = positions.x - blocks[i].baseX;\n\n var zindex = blocks[i].zindex;\n\n // Move that element\n // (Set the new translation and append initial inline transforms.)\n var translate = 'translate3d(' + (self.options.horizontal ? positionX : '0') + 'px,' + (self.options.vertical ? positionY : '0') + 'px,' + zindex + 'px) ' + blocks[i].transform;\n self.elems[i].style[transformProp] = translate;\n }\n self.options.callback(positions);\n };\n\n self.destroy = function() {\n for (var i = 0; i < self.elems.length; i++){\n self.elems[i].style.cssText = blocks[i].style;\n }\n\n // Remove resize event listener if not pause, and pause\n if (!pause) {\n window.removeEventListener('resize', init);\n pause = true;\n }\n\n // Clear the animation loop to prevent possible memory leak\n clearLoop(loopId);\n loopId = null;\n };\n\n // Init\n init();\n\n // Start the loop\n update();\n\n // Allow to recalculate the initial values whenever we want\n self.refresh = init;\n\n return self;\n };\n return Rellax;\n}));\n"],"sourceRoot":""}