pleroma/priv/static/packs/core/settings.js.map

1 line
69 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/initial_state.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/emoji/unicode_to_filename.js","webpack:///./node_modules/process/browser.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/emoji/emoji.js","webpack:///./node_modules/substring-trie/index.js","webpack:///./node_modules/rails-ujs/lib/assets/compiled/rails-ujs.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/core/settings.js","webpack:///./node_modules/escape-html/index.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js"],"names":["__webpack_require__","d","__webpack_exports__","reduceMotion","autoPlayGif","displayMedia","expandSpoilers","unfollowModal","boostModal","deleteModal","me","searchEnabled","maxChars","invitesEnabled","profile_directory","isStaff","deleteOthersNotice","prop","element","document","getElementById","initialState","JSON","parse","textContent","getMeta","meta","rights","exports","unicodeToFilename","str","result","charCode","p","i","length","charCodeAt","toString","cachedSetTimeout","cachedClearTimeout","process","module","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","setTimeout","e","call","this","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","concat","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","args","Array","arguments","push","prototype","apply","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","name","binding","cwd","chdir","dir","umask","r","buildCustomEmojis","_initial_state__WEBPACK_IMPORTED_MODULE_0__","_emoji_unicode_mapping_light__WEBPACK_IMPORTED_MODULE_1__","_emoji_unicode_mapping_light__WEBPACK_IMPORTED_MODULE_1___default","n","substring_trie__WEBPACK_IMPORTED_MODULE_2__","trie","Trie","Object","keys","unicodeMapping","assetHost","CDN_HOST","emojify","customEmojis","tagCharsWithEmojis","rtn","tagChars","invisible","_loop","match","tag","indexOf","search","slice","codePointAt","rend","replacement","lt","shortname","filename","url","static_url","startsWith","_unicodeMapping$match","shortCode","emojis","forEach","emoji","shortcode","get","replace","id","short_names","text","emoticons","keywords","imageUrl","custom","MiniTrie","words","_dict","word","dict","j","len2","char","charAt","stack","pop","substring","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_RESULT__","Rails","linkClickSelector","buttonClickSelector","selector","exclude","inputChangeSelector","formSubmitSelector","formInputClickSelector","formDisableSelector","formEnableSelector","fileInputSelector","linkDisableSelector","buttonDisableSelector","cspNonce","querySelector","content","expando","m","Element","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","getData","key","ref","setData","value","$","querySelectorAll","csrfParam","csrfToken","CSRFProtection","xhr","token","setRequestHeader","refreshCSRFTokens","param","input","CustomEvent","fire","preventDefault","window","event","params","evt","createEvent","initCustomEvent","bubbles","cancelable","detail","Event","defaultPrevented","defineProperty","obj","data","dispatchEvent","stopEverything","target","stopPropagation","stopImmediatePropagation","delegate","eventType","handler","addEventListener","parentNode","AcceptHeaders","createXHR","prepareOptions","processResponse","*","html","xml","json","script","ajax","options","response","responseText","getResponseHeader","Math","floor","status","success","statusText","error","complete","beforeSend","readyState","XMLHttpRequest","OPENED","send","location","href","type","toUpperCase","dataType","accept","done","open","crossDomain","withCredentials","onreadystatechange","DONE","parser","createElement","setAttribute","head","appendChild","removeChild","DOMParser","parseFromString","isCrossDomain","originAnchor","urlAnchor","protocol","host","toArray","serializeElement","additionalParam","inputs","elements","disabled","option","selected","checked","map","encodeURIComponent","join","formElements","form","filter","el","allowAction","handleConfirm","answer","callback","message","getAttribute","confirm","disableFormElement","disableFormElements","disableLinkElement","enableFormElement","enableFormElements","enableLinkElement","handleDisabledElement","enableElement","disableElement","innerHTML","originalText","removeEventListener","handleMethod","formContent","method","action","style","display","body","click","isRemote","handleRemote","button","enctype","FormData","append","formSubmitButtonClick","formNoValidate","handleMetaClick","metaKey","ctrlKey","jQuery","rails","ajaxPrefilter","originalOptions","start","_rails_loaded","undefined","define","escape_html__WEBPACK_IMPORTED_MODULE_0__","escape_html__WEBPACK_IMPORTED_MODULE_0___default","_mastodon_features_emoji_emoji__WEBPACK_IMPORTED_MODULE_1__","require","_ref","escapeTextContentForBrowser","_ref2","avatar","file","files","URL","createObjectURL","dataset","originalSrc","src","_ref4","header","_ref6","lock","_ref7","select","_ref8","focus","execCommand","blur","classList","add","remove","err","console","matchHtmlRegExp","string","escape","exec","index","lastIndex","shortCodesToEmojiData","emojisWithoutShortCodes","processEmojiMapData","emojiMapData","native"],"mappings":"m92KAAAA,EAAAC,EAAAC,EAAA,sBAAAC,IAAAH,EAAAC,EAAAC,EAAA,sBAAAE,IAAAJ,EAAAC,EAAAC,EAAA,sBAAAG,IAAAL,EAAAC,EAAAC,EAAA,sBAAAI,IAAAN,EAAAC,EAAAC,EAAA,sBAAAK,IAAAP,EAAAC,EAAAC,EAAA,sBAAAM,IAAAR,EAAAC,EAAAC,EAAA,sBAAAO,IAAAT,EAAAC,EAAAC,EAAA,sBAAAQ,IAAAV,EAAAC,EAAAC,EAAA,sBAAAS,IAAAX,EAAAC,EAAAC,EAAA,sBAAAU,IAAAZ,EAAAC,EAAAC,EAAA,sBAAAW,IAAAb,EAAAC,EAAAC,EAAA,sBAAAY,IAAAd,EAAAC,EAAAC,EAAA,sBAAAa,IAAAf,EAAAC,EAAAC,EAAA,sBAAAc,IAAA,IAIkBC,EAJZC,EAAUC,SAASC,eAAe,iBAClCC,EAAeH,GAAWI,KAAKC,MAAML,EAAQM,aAE7CC,EAAU,SAACR,GAAD,OAAUI,GAAgBA,EAAaK,MAAQL,EAAaK,KAAKT,IAGpEd,EAAesB,EAAQ,iBACvBrB,EAAcqB,EAAQ,iBACtBpB,EAAeoB,EAAQ,iBACvBnB,EAAiBmB,EAAQ,mBACzBlB,EAAgBkB,EAAQ,kBACxBjB,EAAaiB,EAAQ,eACrBhB,EAAcgB,EAAQ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U,CACvBzP,UAAWA,EACXL,SAAUA,GAIdtB,OAAOC,KAAK+Q,GAAuBnP,QAAQ,SAACF,GACnBqP,EAAsBrP,GADW,GAE3CE,QAAQ,SAAAsP,GAAY,OAAID,EAAoBC,EAAcxP,OAEzEsP,EAAwBpP,QAAQ,SAAAsP,GAAY,OAAID,EAAoBC,KAEpEnV,EAAOb,QAAU+E","file":"core/settings.js","sourcesContent":["const element = document.getElementById('initial-state');\nconst initialState = element && JSON.parse(element.textContent);\n\nconst getMeta = (prop) => initialState && initialState.meta && initialState.meta[prop];\nconst getRight = (prop) => initialState && initialState.rights && initialState.rights[prop];\n\nexport const reduceMotion = getMeta('reduce_motion');\nexport const autoPlayGif = getMeta('auto_play_gif');\nexport const displayMedia = getMeta('display_media');\nexport const expandSpoilers = getMeta('expand_spoilers');\nexport const unfollowModal = getMeta('unfollow_modal');\nexport const boostModal = getMeta('boost_modal');\nexport const deleteModal = getMeta('delete_modal');\nexport const me = getMeta('me');\nexport const searchEnabled = getMeta('search_enabled');\nexport const maxChars = getMeta('max_toot_chars') || getMeta('char_limit') || 5000;\nexport const invitesEnabled = getMeta('invites_enabled');\nexport const version = getMeta('version');\nexport const mascot = getMeta('mascot');\nexport const profile_directory = getMeta('profile_directory');\nexport const isStaff = getMeta('is_staff');\n\nexport const deleteOthersNotice = getRight('delete_others_notice');\n\nexport default initialState;\n","// taken from:\n// https://github.com/twitter/twemoji/blob/47732c7/twemoji-generator.js#L848-L866\nexports.unicodeToFilename = (str) => {\n let result = '';\n let charCode = 0;\n let p = 0;\n let i = 0;\n while (i < str.length) {\n charCode = str.charCodeAt(i++);\n if (p) {\n if (result.length > 0) {\n result += '-';\n }\n result += (0x10000 + ((p - 0xD800) << 10) + (charCode - 0xDC00)).toString(16);\n p = 0;\n } else if (0xD800 <= charCode && charCode <= 0xDBFF) {\n p = charCode;\n } else {\n if (result.length > 0) {\n result += '-';\n }\n result += charCode.toString(16);\n }\n }\n return result;\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import { autoPlayGif } from '../../initial_state';\nimport unicodeMapping from './emoji_unicode_mapping_light';\nimport Trie from 'substring-trie';\n\nconst trie = new Trie(Object.keys(unicodeMapping));\n\nconst assetHost = process.env.CDN_HOST || '';\n\nconst emojify = (str, customEmojis = {}) => {\n const tagCharsWithoutEmojis = '<&';\n const tagCharsWithEmojis = Object.keys(customEmojis).length ? '<&:' : '<&';\n let rtn = '', tagChars = tagCharsWithEmojis, invisible = 0;\n for (;;) {\n let match, i = 0, tag;\n while (i < str.length && (tag = tagChars.indexOf(str[i])) === -1 && (invisible || !(match = trie.search(str.slice(i))))) {\n i += str.codePointAt(i) < 65536 ? 1 : 2;\n }\n let rend, replacement = '';\n if (i === str.length) {\n break;\n } else if (str[i] === ':') {\n if (!(() => {\n rend = str.indexOf(':', i + 1) + 1;\n if (!rend) return false; // no pair of ':'\n const lt = str.indexOf('<', i + 1);\n if (!(lt === -1 || lt >= rend)) return false; // tag appeared before closing ':'\n const shortname = str.slice(i, rend);\n // now got a replacee as ':shortname:'\n // if you want additional emoji handler, add statements below which set replacement and return true.\n if (shortname in customEmojis) {\n const filename = autoPlayGif ? customEmojis[shortname].url : customEmojis[shortname].static_url;\n replacement = `<img draggable=\"false\" class=\"emojione\" alt=\"${shortname}\" title=\"${shortname}\" src=\"${filename}\" />`;\n return true;\n }\n return false;\n })()) rend = ++i;\n } else if (tag >= 0) { // <, &\n rend = str.indexOf('>;'[tag], i + 1) + 1;\n if (!rend) {\n break;\n }\n if (tag === 0) {\n if (invisible) {\n if (str[i + 1] === '/') { // closing tag\n if (!--invisible) {\n tagChars = tagCharsWithEmojis;\n }\n } else if (str[rend - 2] !== '/') { // opening tag\n invisible++;\n }\n } else {\n if (str.startsWith('<span class=\"invisible\">', i)) {\n // avoid emojifying on invisible text\n invisible = 1;\n tagChars = tagCharsWithoutEmojis;\n }\n }\n }\n i = rend;\n } else { // matched to unicode emoji\n const { filename, shortCode } = unicodeMapping[match];\n const title = shortCode ? `:${shortCode}:` : '';\n replacement = `<img draggable=\"false\" class=\"emojione\" alt=\"${match}\" title=\"${title}\" src=\"${assetHost}/emoji/${filename}.svg\" />`;\n rend = i + match.length;\n // If the matched character was followed by VS15 (for selecting text presentation), skip it.\n if (str.codePointAt(rend) === 65038) {\n rend += 1;\n }\n }\n rtn += str.slice(0, i) + replacement;\n str = str.slice(rend);\n }\n return rtn + str;\n};\n\nexport default emojify;\n\nexport const buildCustomEmojis = (customEmojis) => {\n const emojis = [];\n\n customEmojis.forEach(emoji => {\n const shortcode = emoji.get('shortcode');\n const url = autoPlayGif ? emoji.get('url') : emoji.get('static_url');\n const name = shortcode.replace(':', '');\n\n emojis.push({\n id: name,\n name,\n short_names: [name],\n text: '',\n emoticons: [],\n keywords: [name],\n imageUrl: url,\n custom: true,\n });\n });\n\n return emojis;\n};\n","'use strict'\n\nvar CODA_MARKER = '$$' // marks the end of the string\n\nfunction MiniTrie (words) {\n this._dict = {}\n for (var i = 0, len = words.length; i < len; i++) {\n var word = words[i]\n var dict = this._dict\n for (var j = 0, len2 = word.length; j < len2; j++) {\n var char = word.charAt(j)\n dict = (dict[char] = dict[char] || {})\n }\n dict[CODA_MARKER] = true\n }\n}\n\nMiniTrie.prototype.search = function (str) {\n var i = -1\n var len = str.length\n var stack = [this._dict]\n while (++i < len) {\n var dict = stack[i]\n var char = str.charAt(i)\n if (char in dict) {\n stack.push(dict[char])\n } else {\n break\n }\n }\n while (stack.length) {\n if (stack.pop()[CODA_MARKER]) {\n return str.substring(0, stack.length)\n }\n }\n}\n\nmodule.exports = MiniTrie\n","/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/master/actionview/app/assets/javascripts\nReleased under the MIT license\n */\n\n(function() {\n var context = this;\n\n (function() {\n (function() {\n this.Rails = {\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n buttonClickSelector: {\n selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n exclude: 'form button'\n },\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n formSubmitSelector: 'form',\n formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n };\n\n }).call(this);\n }).call(context);\n\n var Rails = context.Rails;\n\n (function() {\n (function() {\n var cspNonce;\n\n cspNonce = Rails.cspNonce = function() {\n var meta;\n meta = document.querySelector('meta[name=csp-nonce]');\n return meta && meta.content;\n };\n\n }).call(this);\n (function() {\n var expando, m;\n\n m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n Rails.matches = function(element, selector) {\n if (selector.exclude != null) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n };\n\n expando = '_ujsData';\n\n Rails.getData = function(element, key) {\n var ref;\n return (ref = element[expando]) != null ? ref[key] : void 0;\n };\n\n Rails.setData = function(element, key, value) {\n if (element[expando] == null) {\n element[expando] = {};\n }\n return element[expando][key] = value;\n };\n\n Rails.$ = function(selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n };\n\n }).call(this);\n (function() {\n var $, csrfParam, csrfToken;\n\n $ = Rails.$;\n\n csrfToken = Rails.csrfToken = function() {\n var meta;\n meta = document.querySelector('meta[name=csrf-token]');\n return meta && meta.content;\n };\n\n csrfParam = Rails.csrfParam = function() {\n var meta;\n meta = document.querySelector('meta[name=csrf-param]');\n return meta && meta.content;\n };\n\n Rails.CSRFProtection = function(xhr) {\n var token;\n token = csrfToken();\n if (token != null) {\n return xhr.setRequestHeader('X-CSRF-Token', token);\n }\n };\n\n Rails.refreshCSRFTokens = function() {\n var param, token;\n token = csrfToken();\n param = csrfParam();\n if ((token != null) && (param != null)) {\n return $('form input[name=\"' + param + '\"]').forEach(function(input) {\n return input.value = token;\n });\n }\n };\n\n }).call(this);\n (function() {\n var CustomEvent, fire, matches, preventDefault;\n\n matches = Rails.matches;\n\n CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function(event, params) {\n var evt;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n CustomEvent.prototype = window.Event.prototype;\n preventDefault = CustomEvent.prototype.preventDefault;\n CustomEvent.prototype.preventDefault = function() {\n var result;\n result = preventDefault.call(this);\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function() {\n return true;\n }\n });\n }\n return result;\n };\n }\n\n fire = Rails.fire = function(obj, name, data) {\n var event;\n event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n };\n\n Rails.stopEverything = function(e) {\n fire(e.target, 'ujs:everythingStopped');\n e.preventDefault();\n e.stopPropagation();\n return e.stopImmediatePropagation();\n };\n\n Rails.delegate = function(element, selector, eventType, handler) {\n return element.addEventListener(eventType, function(e) {\n var target;\n target = e.target;\n while (!(!(target instanceof Element) || matches(target, selector))) {\n target = target.parentNode;\n }\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n return e.stopPropagation();\n }\n });\n };\n\n }).call(this);\n (function() {\n var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n\n cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n\n AcceptHeaders = {\n '*': '*/*',\n text: 'text/plain',\n html: 'text/html',\n xml: 'application/xml, text/xml',\n json: 'application/json, text/javascript',\n script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n };\n\n Rails.ajax = function(options) {\n var xhr;\n options = prepareOptions(options);\n xhr = createXHR(options, function() {\n var ref, response;\n response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n });\n if ((options.beforeSend != null) && !options.beforeSend(xhr, options)) {\n return false;\n }\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n };\n\n prepareOptions = function(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n if (options.type === 'GET' && options.data) {\n if (options.url.indexOf('?') < 0) {\n options.url += '?' + options.data;\n } else {\n options.url += '&' + options.data;\n }\n }\n if (AcceptHeaders[options.dataType] == null) {\n options.dataType = '*';\n }\n options.accept = AcceptHeaders[options.dataType];\n if (options.dataType !== '*') {\n options.accept += ', */*; q=0.01';\n }\n return options;\n };\n\n createXHR = function(options, done) {\n var xhr;\n xhr = new XMLHttpRequest();\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader('Accept', options.accept);\n if (typeof options.data === 'string') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n }\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n }\n CSRFProtection(xhr);\n xhr.withCredentials = !!options.withCredentials;\n xhr.onreadystatechange = function() {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n return xhr;\n };\n\n processResponse = function(response, type) {\n var parser, script;\n if (typeof response === 'string' && typeof type === 'string') {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n script = document.createElement('script');\n script.setAttribute('nonce', cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n parser = new DOMParser();\n type = type.replace(/;.+/, '');\n try {\n response = parser.parseFromString(response, type);\n } catch (error) {}\n }\n }\n return response;\n };\n\n Rails.href = function(element) {\n return element.href;\n };\n\n Rails.isCrossDomain = function(url) {\n var e, originAnchor, urlAnchor;\n originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n urlAnchor = document.createElement('a');\n try {\n urlAnchor.href = url;\n return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host));\n } catch (error) {\n e = error;\n return true;\n }\n };\n\n }).call(this);\n (function() {\n var matches, toArray;\n\n matches = Rails.matches;\n\n toArray = function(e) {\n return Array.prototype.slice.call(e);\n };\n\n Rails.serializeElement = function(element, additionalParam) {\n var inputs, params;\n inputs = [element];\n if (matches(element, 'form')) {\n inputs = toArray(element.elements);\n }\n params = [];\n inputs.forEach(function(input) {\n if (!input.name || input.disabled) {\n return;\n }\n if (matches(input, 'select')) {\n return toArray(input.options).forEach(function(option) {\n if (option.selected) {\n return params.push({\n name: input.name,\n value: option.value\n });\n }\n });\n } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n return params.push({\n name: input.name,\n value: input.value\n });\n }\n });\n if (additionalParam) {\n params.push(additionalParam);\n }\n return params.map(function(param) {\n if (param.name != null) {\n return (encodeURIComponent(param.name)) + \"=\" + (encodeURIComponent(param.value));\n } else {\n return param;\n }\n }).join('&');\n };\n\n Rails.formElements = function(form, selector) {\n if (matches(form, 'form')) {\n return toArray(form.elements).filter(function(el) {\n return matches(el, selector);\n });\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n };\n\n }).call(this);\n (function() {\n var allowAction, fire, stopEverything;\n\n fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n Rails.handleConfirm = function(e) {\n if (!allowAction(this)) {\n return stopEverything(e);\n }\n };\n\n allowAction = function(element) {\n var answer, callback, message;\n message = element.getAttribute('data-confirm');\n if (!message) {\n return true;\n }\n answer = false;\n if (fire(element, 'confirm')) {\n try {\n answer = confirm(message);\n } catch (error) {}\n callback = fire(element, 'confirm:complete', [answer]);\n }\n return answer && callback;\n };\n\n }).call(this);\n (function() {\n var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, matches, setData, stopEverything;\n\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n Rails.handleDisabledElement = function(e) {\n var element;\n element = this;\n if (element.disabled) {\n return stopEverything(e);\n }\n };\n\n Rails.enableElement = function(e) {\n var element;\n element = e instanceof Event ? e.target : e;\n if (matches(element, Rails.linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return enableFormElements(element);\n }\n };\n\n Rails.disableElement = function(e) {\n var element;\n element = e instanceof Event ? e.target : e;\n if (matches(element, Rails.linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return disableFormElements(element);\n }\n };\n\n disableLinkElement = function(element) {\n var replacement;\n replacement = element.getAttribute('data-disable-with');\n if (replacement != null) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n }\n element.addEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', true);\n };\n\n enableLinkElement = function(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, 'ujs:enable-with', null);\n }\n element.removeEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', null);\n };\n\n disableFormElements = function(form) {\n return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n };\n\n disableFormElement = function(element) {\n var replacement;\n replacement = element.getAttribute('data-disable-with');\n if (replacement != null) {\n if (matches(element, 'button')) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, 'ujs:enable-with', element.value);\n element.value = replacement;\n }\n }\n element.disabled = true;\n return setData(element, 'ujs:disabled', true);\n };\n\n enableFormElements = function(form) {\n return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n };\n\n enableFormElement = function(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n if (originalText != null) {\n if (matches(element, 'button')) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n setData(element, 'ujs:enable-with', null);\n }\n element.disabled = false;\n return setData(element, 'ujs:disabled', null);\n };\n\n }).call(this);\n (function() {\n var stopEverything;\n\n stopEverything = Rails.stopEverything;\n\n Rails.handleMethod = function(e) {\n var csrfParam, csrfToken, form, formContent, href, link, method;\n link = this;\n method = link.getAttribute('data-method');\n if (!method) {\n return;\n }\n href = Rails.href(link);\n csrfToken = Rails.csrfToken();\n csrfParam = Rails.csrfParam();\n form = document.createElement('form');\n formContent = \"<input name='_method' value='\" + method + \"' type='hidden' />\";\n if ((csrfParam != null) && (csrfToken != null) && !Rails.isCrossDomain(href)) {\n formContent += \"<input name='\" + csrfParam + \"' value='\" + csrfToken + \"' type='hidden' />\";\n }\n formContent += '<input type=\"submit\" />';\n form.method = 'post';\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = 'none';\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n return stopEverything(e);\n };\n\n }).call(this);\n (function() {\n var ajax, fire, getData, isCrossDomain, isRemote, matches, serializeElement, setData, stopEverything,\n slice = [].slice;\n\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n isRemote = function(element) {\n var value;\n value = element.getAttribute('data-remote');\n return (value != null) && value !== 'false';\n };\n\n Rails.handleRemote = function(e) {\n var button, data, dataType, element, method, url, withCredentials;\n element = this;\n if (!isRemote(element)) {\n return true;\n }\n if (!fire(element, 'ajax:before')) {\n fire(element, 'ajax:stopped');\n return false;\n }\n withCredentials = element.getAttribute('data-with-credentials');\n dataType = element.getAttribute('data-type') || 'script';\n if (matches(element, Rails.formSubmitSelector)) {\n button = getData(element, 'ujs:submit-button');\n method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n if (method.toUpperCase() === 'GET') {\n url = url.replace(/\\?.*$/, '');\n }\n if (element.enctype === 'multipart/form-data') {\n data = new FormData(element);\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n setData(element, 'ujs:submit-button', null);\n setData(element, 'ujs:submit-button-formmethod', null);\n setData(element, 'ujs:submit-button-formaction', null);\n } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n method = element.getAttribute('data-method');\n url = element.getAttribute('data-url');\n data = serializeElement(element, element.getAttribute('data-params'));\n } else {\n method = element.getAttribute('data-method');\n url = Rails.href(element);\n data = element.getAttribute('data-params');\n }\n ajax({\n type: method || 'GET',\n url: url,\n data: data,\n dataType: dataType,\n beforeSend: function(xhr, options) {\n if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n return fire(element, 'ajax:send', [xhr]);\n } else {\n fire(element, 'ajax:stopped');\n return false;\n }\n },\n success: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:success', args);\n },\n error: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:error', args);\n },\n complete: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:complete', args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: (withCredentials != null) && withCredentials !== 'false'\n });\n return stopEverything(e);\n };\n\n Rails.formSubmitButtonClick = function(e) {\n var button, form;\n button = this;\n form = button.form;\n if (!form) {\n return;\n }\n if (button.name) {\n setData(form, 'ujs:submit-button', {\n name: button.name,\n value: button.value\n });\n }\n setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n };\n\n Rails.handleMetaClick = function(e) {\n var data, link, metaClick, method;\n link = this;\n method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n data = link.getAttribute('data-params');\n metaClick = e.metaKey || e.ctrlKey;\n if (metaClick && method === 'GET' && !data) {\n return e.stopImmediatePropagation();\n }\n };\n\n }).call(this);\n (function() {\n var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMetaClick, handleMethod, handleRemote, refreshCSRFTokens;\n\n fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMetaClick = Rails.handleMetaClick, handleMethod = Rails.handleMethod;\n\n if ((typeof jQuery !== \"undefined\" && jQuery !== null) && (jQuery.ajax != null)) {\n if (jQuery.rails) {\n throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n }\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter(function(options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n });\n }\n\n Rails.start = function() {\n if (window._rails_loaded) {\n throw new Error('rails-ujs has already been loaded!');\n }\n window.addEventListener('pageshow', function() {\n $(Rails.formEnableSelector).forEach(function(el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n return $(Rails.linkDisableSelector).forEach(function(el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n });\n delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n delegate(document, Rails.linkClickSelector, 'click', handleMetaClick);\n delegate(document, Rails.linkClickSelector, 'click', disableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', function(e) {\n return setTimeout((function() {\n return disableElement(e);\n }), 13);\n });\n delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n return window._rails_loaded = true;\n };\n\n if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n Rails.start();\n }\n\n }).call(this);\n }).call(this);\n\n if (typeof module === \"object\" && module.exports) {\n module.exports = Rails;\n } else if (typeof define === \"function\" && define.amd) {\n define(Rails);\n }\n}).call(this);\n","// This file will be loaded on settings pages, regardless of theme.\n\nimport escapeTextContentForBrowser from 'escape-html';\nconst { delegate } = require('rails-ujs');\nimport emojify from '../mastodon/features/emoji/emoji';\n\ndelegate(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\ndelegate(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\ndelegate(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\ndelegate(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\ndelegate(document, '.input-copy input', 'click', ({ target }) => {\n target.select();\n});\n\ndelegate(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 * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '&quot;';\n break;\n case 38: // &\n escape = '&amp;';\n break;\n case 39: // '\n escape = '&#39;';\n break;\n case 60: // <\n escape = '&lt;';\n break;\n case 62: // >\n escape = '&gt;';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n","// A mapping of unicode strings to an object containing the filename\n// (i.e. the svg filename) and a shortCode intended to be shown\n// as a \"title\" attribute in an HTML element (aka tooltip).\n\nconst [\n shortCodesToEmojiData,\n skins, // eslint-disable-line no-unused-vars\n categories, // eslint-disable-line no-unused-vars\n short_names, // eslint-disable-line no-unused-vars\n emojisWithoutShortCodes,\n] = require('./emoji_compressed');\nconst { unicodeToFilename } = require('./unicode_to_filename');\n\n// decompress\nconst unicodeMapping = {};\n\nfunction processEmojiMapData(emojiMapData, shortCode) {\n let [ native, filename ] = emojiMapData;\n if (!filename) {\n // filename name can be derived from unicodeToFilename\n filename = unicodeToFilename(native);\n }\n unicodeMapping[native] = {\n shortCode: shortCode,\n filename: filename,\n };\n}\n\nObject.keys(shortCodesToEmojiData).forEach((shortCode) => {\n let [ filenameData ] = shortCodesToEmojiData[shortCode];\n filenameData.forEach(emojiMapData => processEmojiMapData(emojiMapData, shortCode));\n});\nemojisWithoutShortCodes.forEach(emojiMapData => processEmojiMapData(emojiMapData));\n\nmodule.exports = unicodeMapping;\n"],"sourceRoot":""}