-/******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "/packs/";
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-(function () {
- var waitUntil = ExtendableEvent.prototype.waitUntil;
- var respondWith = FetchEvent.prototype.respondWith;
- var promisesMap = new WeakMap();
-
- ExtendableEvent.prototype.waitUntil = function (promise) {
- var extendableEvent = this;
- var promises = promisesMap.get(extendableEvent);
-
- if (promises) {
- promises.push(Promise.resolve(promise));
- return;
- }
-
- promises = [Promise.resolve(promise)];
- promisesMap.set(extendableEvent, promises);
-
- // call original method
- return waitUntil.call(extendableEvent, Promise.resolve().then(function processPromises() {
- var len = promises.length;
-
- // wait for all to settle
- return Promise.all(promises.map(function (p) {
- return p["catch"](function () {});
- })).then(function () {
- // have new items been added? If so, wait again
- if (promises.length != len) return processPromises();
- // we're done!
- promisesMap["delete"](extendableEvent);
- // reject if one of the promises rejected
- return Promise.all(promises);
- });
- }));
- };
-
- FetchEvent.prototype.respondWith = function (promise) {
- this.waitUntil(promise);
- return respondWith.call(this, promise);
- };
-})();;
- 'use strict';
-
-if (typeof DEBUG === 'undefined') {
- var DEBUG = false;
-}
-
-function WebpackServiceWorker(params, helpers) {
- var loaders = helpers.loaders;
- var cacheMaps = helpers.cacheMaps;
-
- var strategy = params.strategy;
- var responseStrategy = params.responseStrategy;
-
- var assets = params.assets;
- var loadersMap = params.loaders || {};
-
- var hashesMap = params.hashesMap;
- var externals = params.externals;
-
- // Not used yet
- // const alwaysRevalidate = params.alwaysRevalidate;
- // const ignoreSearch = params.ignoreSearch;
- // const preferOnline = params.preferOnline;
-
- var CACHE_PREFIX = params.name;
- var CACHE_TAG = params.version;
- var CACHE_NAME = CACHE_PREFIX + ':' + CACHE_TAG;
-
- var STORED_DATA_KEY = '__offline_webpack__data';
-
- mapAssets();
-
- var allAssets = [].concat(assets.main, assets.additional, assets.optional);
- var navigateFallbackURL = params.navigateFallbackURL;
- var navigateFallbackForRedirects = params.navigateFallbackForRedirects;
-
- self.addEventListener('install', function (event) {
- console.log('[SW]:', 'Install event');
-
- var installing = undefined;
-
- if (strategy === 'changed') {
- installing = cacheChanged('main');
- } else {
- installing = cacheAssets('main');
- }
-
- event.waitUntil(installing);
- });
-
- self.addEventListener('activate', function (event) {
- console.log('[SW]:', 'Activate event');
-
- var activation = cacheAdditional();
-
- // Delete all assets which name starts with CACHE_PREFIX and
- // is not current cache (CACHE_NAME)
- activation = activation.then(storeCacheData);
- activation = activation.then(deleteObsolete);
- activation = activation.then(function () {
- if (self.clients && self.clients.claim) {
- return self.clients.claim();
- }
- });
-
- event.waitUntil(activation);
- });
-
- function cacheAdditional() {
- if (!assets.additional.length) {
- return Promise.resolve();
- }
-
- if (DEBUG) {
- console.log('[SW]:', 'Caching additional');
- }
-
- var operation = undefined;
-
- if (strategy === 'changed') {
- operation = cacheChanged('additional');
- } else {
- operation = cacheAssets('additional');
- }
-
- // Ignore fail of `additional` cache section
- return operation['catch'](function (e) {
- console.error('[SW]:', 'Cache section `additional` failed to load');
- });
- }
-
- function cacheAssets(section) {
- var batch = assets[section];
-
- return caches.open(CACHE_NAME).then(function (cache) {
- return addAllNormalized(cache, batch, {
- bust: params.version,
- request: params.prefetchRequest
- });
- }).then(function () {
- logGroup('Cached assets: ' + section, batch);
- })['catch'](function (e) {
- console.error(e);
- throw e;
- });
- }
-
- function cacheChanged(section) {
- return getLastCache().then(function (args) {
- if (!args) {
- return cacheAssets(section);
- }
-
- var lastCache = args[0];
- var lastKeys = args[1];
- var lastData = args[2];
-
- var lastMap = lastData.hashmap;
- var lastVersion = lastData.version;
-
- if (!lastData.hashmap || lastVersion === params.version) {
- return cacheAssets(section);
- }
-
- var lastHashedAssets = Object.keys(lastMap).map(function (hash) {
- return lastMap[hash];
- });
-
- var lastUrls = lastKeys.map(function (req) {
- var url = new URL(req.url);
- url.search = '';
- url.hash = '';
-
- return url.toString();
- });
-
- var sectionAssets = assets[section];
- var moved = [];
- var changed = sectionAssets.filter(function (url) {
- if (lastUrls.indexOf(url) === -1 || lastHashedAssets.indexOf(url) === -1) {
- return true;
- }
-
- return false;
- });
-
- Object.keys(hashesMap).forEach(function (hash) {
- var asset = hashesMap[hash];
-
- // Return if not in sectionAssets or in changed or moved array
- if (sectionAssets.indexOf(asset) === -1 || changed.indexOf(asset) !== -1 || moved.indexOf(asset) !== -1) return;
-
- var lastAsset = lastMap[hash];
-
- if (lastAsset && lastUrls.indexOf(lastAsset) !== -1) {
- moved.push([lastAsset, asset]);
- } else {
- changed.push(asset);
- }
- });
-
- logGroup('Changed assets: ' + section, changed);
- logGroup('Moved assets: ' + section, moved);
-
- var movedResponses = Promise.all(moved.map(function (pair) {
- return lastCache.match(pair[0]).then(function (response) {
- return [pair[1], response];
- });
- }));
-
- return caches.open(CACHE_NAME).then(function (cache) {
- var move = movedResponses.then(function (responses) {
- return Promise.all(responses.map(function (pair) {
- return cache.put(pair[0], pair[1]);
- }));
- });
-
- return Promise.all([move, addAllNormalized(cache, changed, {
- bust: params.version,
- request: params.prefetchRequest
- })]);
- });
- });
- }
-
- function deleteObsolete() {
- return caches.keys().then(function (keys) {
- var all = keys.map(function (key) {
- if (key.indexOf(CACHE_PREFIX) !== 0 || key.indexOf(CACHE_NAME) === 0) return;
-
- console.log('[SW]:', 'Delete cache:', key);
- return caches['delete'](key);
- });
-
- return Promise.all(all);
- });
- }
-
- function getLastCache() {
- return caches.keys().then(function (keys) {
- var index = keys.length;
- var key = undefined;
-
- while (index--) {
- key = keys[index];
-
- if (key.indexOf(CACHE_PREFIX) === 0) {
- break;
- }
- }
-
- if (!key) return;
-
- var cache = undefined;
-
- return caches.open(key).then(function (_cache) {
- cache = _cache;
- return _cache.match(new URL(STORED_DATA_KEY, location).toString());
- }).then(function (response) {
- if (!response) return;
-
- return Promise.all([cache, cache.keys(), response.json()]);
- });
- });
- }
-
- function storeCacheData() {
- return caches.open(CACHE_NAME).then(function (cache) {
- var data = new Response(JSON.stringify({
- version: params.version,
- hashmap: hashesMap
- }));
-
- return cache.put(new URL(STORED_DATA_KEY, location).toString(), data);
- });
- }
-
- self.addEventListener('fetch', function (event) {
- var url = new URL(event.request.url);
- url.hash = '';
-
- var urlString = url.toString();
-
- // Not external, so search part of the URL should be stripped,
- // if it's external URL, the search part should be kept
- if (externals.indexOf(urlString) === -1) {
- url.search = '';
- urlString = url.toString();
- }
-
- // Handle only GET requests
- var isGET = event.request.method === 'GET';
- var assetMatches = allAssets.indexOf(urlString) !== -1;
- var cacheUrl = urlString;
-
- if (!assetMatches) {
- var cacheRewrite = matchCacheMap(event.request);
-
- if (cacheRewrite) {
- cacheUrl = cacheRewrite;
- assetMatches = true;
- }
- }
-
- if (!assetMatches && isGET) {
- // If isn't a cached asset and is a navigation request,
- // fallback to navigateFallbackURL if available
- if (navigateFallbackURL && isNavigateRequest(event.request)) {
- event.respondWith(handleNavigateFallback(fetch(event.request)));
-
- return;
- }
- }
-
- if (!assetMatches || !isGET) {
- // Fix for https://twitter.com/wanderview/status/696819243262873600
- if (url.origin !== location.origin && navigator.userAgent.indexOf('Firefox/44.') !== -1) {
- event.respondWith(fetch(event.request));
- }
-
- return;
- }
-
- // Logic of caching / fetching is here
- // * urlString -- url to match from the CACHE_NAME
- // * event.request -- original Request to perform fetch() if necessary
- var resource = undefined;
-
- if (responseStrategy === 'network-first') {
- resource = networkFirstResponse(event, urlString, cacheUrl);
- }
- // 'cache-first'
- // (responseStrategy has been validated before)
- else {
- resource = cacheFirstResponse(event, urlString, cacheUrl);
- }
-
- if (navigateFallbackURL && isNavigateRequest(event.request)) {
- resource = handleNavigateFallback(resource);
- }
-
- event.respondWith(resource);
- });
-
- self.addEventListener('message', function (e) {
- var data = e.data;
- if (!data) return;
-
- switch (data.action) {
- case 'skipWaiting':
- {
- if (self.skipWaiting) self.skipWaiting();
- }break;
- }
- });
-
- function cacheFirstResponse(event, urlString, cacheUrl) {
- return cachesMatch(cacheUrl, CACHE_NAME).then(function (response) {
- if (response) {
- if (DEBUG) {
- console.log('[SW]:', 'URL [' + cacheUrl + '](' + urlString + ') from cache');
- }
-
- return response;
- }
-
- // Load and cache known assets
- var fetching = fetch(event.request).then(function (response) {
- if (!response.ok) {
- if (DEBUG) {
- console.log('[SW]:', 'URL [' + urlString + '] wrong response: [' + response.status + '] ' + response.type);
- }
-
- return response;
- }
-
- if (DEBUG) {
- console.log('[SW]:', 'URL [' + urlString + '] from network');
- }
-
- if (cacheUrl === urlString) {
- (function () {
- var responseClone = response.clone();
- var storing = caches.open(CACHE_NAME).then(function (cache) {
- return cache.put(urlString, responseClone);
- }).then(function () {
- console.log('[SW]:', 'Cache asset: ' + urlString);
- });
-
- event.waitUntil(storing);
- })();
- }
-
- return response;
- });
-
- return fetching;
- });
- }
-
- function networkFirstResponse(event, urlString, cacheUrl) {
- return fetch(event.request).then(function (response) {
- if (response.ok) {
- if (DEBUG) {
- console.log('[SW]:', 'URL [' + urlString + '] from network');
- }
-
- return response;
- }
-
- // Throw to reach the code in the catch below
- throw new Error('Response is not ok');
- })
- // This needs to be in a catch() and not just in the then() above
- // cause if your network is down, the fetch() will throw
- ['catch'](function () {
- if (DEBUG) {
- console.log('[SW]:', 'URL [' + urlString + '] from cache if possible');
- }
-
- return cachesMatch(cacheUrl, CACHE_NAME);
- });
- }
-
- function handleNavigateFallback(fetching) {
- return fetching['catch'](function () {}).then(function (response) {
- var isOk = response && response.ok;
- var isRedirect = response && response.type === 'opaqueredirect';
-
- if (isOk || isRedirect && !navigateFallbackForRedirects) {
- return response;
- }
-
- if (DEBUG) {
- console.log('[SW]:', 'Loading navigation fallback [' + navigateFallbackURL + '] from cache');
- }
-
- return cachesMatch(navigateFallbackURL, CACHE_NAME);
- });
- }
-
- function mapAssets() {
- Object.keys(assets).forEach(function (key) {
- assets[key] = assets[key].map(function (path) {
- var url = new URL(path, location);
-
- url.hash = '';
-
- if (externals.indexOf(path) === -1) {
- url.search = '';
- }
-
- return url.toString();
- });
- });
-
- Object.keys(loadersMap).forEach(function (key) {
- loadersMap[key] = loadersMap[key].map(function (path) {
- var url = new URL(path, location);
-
- url.hash = '';
-
- if (externals.indexOf(path) === -1) {
- url.search = '';
- }
-
- return url.toString();
- });
- });
-
- hashesMap = Object.keys(hashesMap).reduce(function (result, hash) {
- var url = new URL(hashesMap[hash], location);
- url.search = '';
- url.hash = '';
-
- result[hash] = url.toString();
- return result;
- }, {});
-
- externals = externals.map(function (path) {
- var url = new URL(path, location);
- url.hash = '';
-
- return url.toString();
- });
- }
-
- function addAllNormalized(cache, requests, options) {
- var allowLoaders = options.allowLoaders !== false;
- var bustValue = options && options.bust;
- var requestInit = options.request || {
- credentials: 'omit',
- mode: 'cors'
- };
-
- return Promise.all(requests.map(function (request) {
- if (bustValue) {
- request = applyCacheBust(request, bustValue);
- }
-
- return fetch(request, requestInit).then(fixRedirectedResponse);
- })).then(function (responses) {
- if (responses.some(function (response) {
- return !response.ok;
- })) {
- return Promise.reject(new Error('Wrong response status'));
- }
-
- var extracted = [];
- var addAll = responses.map(function (response, i) {
- if (allowLoaders) {
- extracted.push(extractAssetsWithLoaders(requests[i], response));
- }
-
- return cache.put(requests[i], response);
- });
-
- if (extracted.length) {
- (function () {
- var newOptions = copyObject(options);
- newOptions.allowLoaders = false;
-
- var waitAll = addAll;
-
- addAll = Promise.all(extracted).then(function (all) {
- var extractedRequests = [].concat.apply([], all);
-
- if (requests.length) {
- waitAll = waitAll.concat(addAllNormalized(cache, extractedRequests, newOptions));
- }
-
- return Promise.all(waitAll);
- });
- })();
- } else {
- addAll = Promise.all(addAll);
- }
-
- return addAll;
- });
- }
-
- function extractAssetsWithLoaders(request, response) {
- var all = Object.keys(loadersMap).map(function (key) {
- var loader = loadersMap[key];
-
- if (loader.indexOf(request) !== -1 && loaders[key]) {
- return loaders[key](response.clone());
- }
- }).filter(function (a) {
- return !!a;
- });
-
- return Promise.all(all).then(function (all) {
- return [].concat.apply([], all);
- });
- }
-
- function matchCacheMap(request) {
- var urlString = request.url;
- var url = new URL(urlString);
-
- var requestType = undefined;
-
- if (request.mode === 'navigate') {
- requestType = 'navigate';
- } else if (url.origin === location.origin) {
- requestType = 'same-origin';
- } else {
- requestType = 'cross-origin';
- }
-
- for (var i = 0; i < cacheMaps.length; i++) {
- var map = cacheMaps[i];
-
- if (!map) continue;
- if (map.requestTypes && map.requestTypes.indexOf(requestType) === -1) {
- continue;
- }
-
- var newString = undefined;
-
- if (typeof map.match === 'function') {
- newString = map.match(url, request);
- } else {
- newString = urlString.replace(map.match, map.to);
- }
-
- if (newString && newString !== urlString) {
- return newString;
- }
- }
- }
-}
-
-function cachesMatch(request, cacheName) {
- return caches.match(request, {
- cacheName: cacheName
- }).then(function (response) {
- if (isNotRedirectedResponse()) {
- return response;
- }
-
- // Fix already cached redirected responses
- return fixRedirectedResponse(response).then(function (fixedResponse) {
- return caches.open(cacheName).then(function (cache) {
- return cache.put(request, fixedResponse);
- }).then(function () {
- return fixedResponse;
- });
- });
- })
- // Return void if error happened (cache not found)
- ['catch'](function () {});
-}
-
-function applyCacheBust(asset, key) {
- var hasQuery = asset.indexOf('?') !== -1;
- return asset + (hasQuery ? '&' : '?') + '__uncache=' + encodeURIComponent(key);
-}
-
-function getClientsURLs() {
- if (!self.clients) {
- return Promise.resolve([]);
- }
-
- return self.clients.matchAll({
- includeUncontrolled: true
- }).then(function (clients) {
- if (!clients.length) return [];
-
- var result = [];
-
- clients.forEach(function (client) {
- var url = new URL(client.url);
- url.search = '';
- url.hash = '';
- var urlString = url.toString();
-
- if (!result.length || result.indexOf(urlString) === -1) {
- result.push(urlString);
- }
- });
-
- return result;
- });
-}
-
-function isNavigateRequest(request) {
- return request.mode === 'navigate' || request.headers.get('Upgrade-Insecure-Requests') || (request.headers.get('Accept') || '').indexOf('text/html') !== -1;
-}
-
-function isNotRedirectedResponse(response) {
- return !response || !response.redirected || !response.ok || response.type === 'opaqueredirect';
-}
-
-// Based on https://github.com/GoogleChrome/sw-precache/pull/241/files#diff-3ee9060dc7a312c6a822cac63a8c630bR85
-function fixRedirectedResponse(response) {
- if (isNotRedirectedResponse(response)) {
- return Promise.resolve(response);
- }
-
- var body = 'body' in response ? Promise.resolve(response.body) : response.blob();
-
- return body.then(function (data) {
- return new Response(data, {
- headers: response.headers,
- status: response.status
- });
- });
-}
-
-function copyObject(original) {
- return Object.keys(original).reduce(function (result, key) {
- result[key] = original[key];
- return result;
- }, {});
-}
-
-function logGroup(title, assets) {
- console.groupCollapsed('[SW]:', title);
-
- assets.forEach(function (asset) {
- console.log('Asset:', asset);
- });
-
- console.groupEnd();
-}
- WebpackServiceWorker(__wpo, {
-loaders: {},
-cacheMaps: [],
-});
- module.exports = __webpack_require__(1)
-
-
-/***/ }),
-/* 1 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__storage_modifier__ = __webpack_require__(2);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__web_push_notifications__ = __webpack_require__(4);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__web_push_notifications___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__web_push_notifications__);
-/*** IMPORTS FROM imports-loader ***/
-var process = (process || {});
-process.env = {"npm_config_cache_lock_stale":"60000","npm_config_ham_it_up":"","npm_package_dependencies_mark_loader":"^0.1.6","npm_config_legacy_bundling":"","npm_config_sign_git_tag":"","npm_package_dependencies_autoprefixer":"^7.1.6","npm_package_dependencies_mkdirp":"^0.5.1","npm_package_dependencies_node_sass":"^4.7.2","npm_package_devDependencies_jest":"^21.2.1","npm_config_user_agent":"npm/5.6.0 node/v9.11.1 linux x64","npm_config_always_auth":"","npm_package_dependencies_detect_passive_events":"^1.0.2","npm_package_dependencies_immutable":"^3.8.2","npm_package_bugs_url":"https://github.com/tootsuite/mastodon/issues","npm_config_bin_links":"true","npm_config_key":"","npm_package_dependencies_react_overlays":"^0.8.3","npm_config_allow_same_version":"","npm_config_description":"true","npm_config_fetch_retries":"2","npm_config_heading":"npm","npm_config_if_present":"","npm_config_init_version":"1.0.0","npm_config_user":"","npm_node_execpath":"/usr/bin/node","npm_package_scripts_manage_translations":"node ./config/webpack/translationRunner.js","npm_package_dependencies_babel_plugin_transform_class_properties":"^6.24.1","npm_package_dependencies_babel_plugin_transform_es2015_modules_commonjs":"^6.24.1","npm_package_dependencies_escape_html":"^1.0.3","npm_package_dependencies_imports_loader":"^0.8.0","npm_package_optionalDependencies_node_zopfli":"^2.0.2","npm_config_prefer_online":"","HOME":"/home/howl","npm_package_dependencies_postcss_loader":"^2.0.9","npm_config_force":"","npm_package_dependencies_react_redux_loading_bar":"^2.9.3","npm_package_dependencies_redis":"^2.7.1","npm_config_only":"","npm_config_read_only":"","npm_package_engines_node":">=6","npm_package_dependencies_babel_plugin_react_intl":"^2.3.1","npm_package_dependencies_npmlog":"^4.1.2","npm_package_devDependencies_enzyme_adapter_react_16":"^1.1.0","npm_config_cache_min":"10","npm_config_init_license":"ISC","npm_package_scripts_build_production":"cross-env NODE_ENV=production webpack --config config/webpack/production.js","npm_package_dependencies_glob":"^7.1.1","npm_package_dependencies_webpack_merge":"^4.1.1","npm_config_editor":"vi","npm_config_rollback":"true","npm_config_tag_version_prefix":"v","npm_package_dependencies_redux_thunk":"^2.2.0","npm_package_dependencies_webpack":"^3.9.1","npm_config_cache_max":"Infinity","npm_config_timing":"","npm_config_userconfig":"/home/howl/.npmrc","npm_package_dependencies_babel_plugin_lodash":"^3.3.2","npm_package_dependencies_dotenv":"^4.0.0","npm_package_dependencies_precss":"^2.0.0","npm_package_dependencies_react_hotkeys":"^0.10.0","npm_config_engine_strict":"","npm_config_init_author_name":"","npm_config_init_author_url":"","npm_config_tmp":"/tmp","npm_package_description":"mastodon","npm_package_dependencies_react_router_dom":"^4.1.1","npm_config_depth":"Infinity","npm_config_package_lock_only":"","npm_config_save_dev":"","npm_config_usage":"","npm_package_scripts_test_jest":"cross-env NODE_ENV=test jest --coverage","npm_package_dependencies_throng":"^4.0.0","npm_package_devDependencies_react_intl_translations_manager":"^5.0.0","npm_package_readmeFilename":"README.md","npm_package_homepage":"https://github.com/tootsuite/mastodon#readme","npm_config_metrics_registry":"https://registry.npmjs.org/","npm_config_cafile":"","npm_config_otp":"","npm_config_package_lock":"true","npm_config_progress":"true","npm_config_https_proxy":"","npm_config_save_prod":"","npm_package_scripts_dev":"cross-env NODE_ENV=development webpack-dev-server --config config/webpack/development.js --progress --color","npm_package_scripts_test_lint":"eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ streaming/","npm_package_dependencies_babel_plugin_transform_react_remove_prop_types":"^0.4.10","npm_package_dependencies_websocket_js":"^0.1.12","npm_config_cidr":"","npm_config_onload_script":"","npm_config_sso_type":"oauth","npm_package_dependencies_babel_plugin_syntax_dynamic_import":"^6.18.0","npm_package_dependencies_rails_ujs":"^5.1.2","npm_package_dependencies_react_immutable_pure_component":"^1.1.1","npm_package_dependencies_react_motion":"^0.5.2","npm_package_dependencies_reselect":"^3.0.1","npm_package_devDependencies_eslint_plugin_import":"^2.8.0","npm_config_rebuild_bundle":"true","npm_config_save_bundle":"","npm_config_shell":"bash","npm_package_private":"true","npm_package_dependencies_express":"^4.16.2","npm_package_dependencies_react_notification":"^6.8.2","npm_package_dependencies_sass_loader":"^6.0.6","npm_config_dry_run":"","npm_config_prefix":"/usr","npm_config_scope":"","npm_config_browser":"","npm_config_cache_lock_wait":"10000","npm_config_ignore_prepublish":"","npm_config_registry":"https://registry.npmjs.org/","npm_config_save_optional":"","npm_config_searchopts":"","npm_config_versions":"","npm_package_dependencies_font_awesome":"^4.7.0","npm_package_dependencies_postcss_object_fit_images":"^1.1.2","npm_package_dependencies_react_immutable_proptypes":"^2.1.0","npm_package_dependencies_style_loader":"^0.19.0","npm_package_dependencies_uws":"^8.14.0","npm_package_optionalDependencies_fsevents":"*","npm_config_cache":"/home/howl/.npm","npm_config_proxy":"","npm_config_send_metrics":"","npm_package_scripts_start":"node ./streaming/index.js","npm_config_global_style":"","npm_config_ignore_scripts":"","npm_config_version":"","npm_package_dependencies_axios":"~0.16.2","npm_package_dependencies_css_loader":"^0.28.4","npm_package_dependencies_marky":"^1.2.0","npm_config_local_address":"","npm_config_viewer":"man","npm_config_node_gyp":"/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js","PATH":"/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/howl/oc/mastofe/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games","npm_package_name":"mastodon","npm_package_repository_type":"git","npm_package_dependencies_babel_preset_env":"^1.6.1","npm_package_dependencies_cross_env":"^5.1.1","npm_package_dependencies_extract_text_webpack_plugin":"^3.0.2","npm_package_dependencies_substring_trie":"^1.0.2","npm_config_prefer_offline":"","NODE":"/usr/bin/node","npm_package_dependencies_babel_plugin_transform_runtime":"^6.23.0","npm_package_dependencies_react_redux":"^5.0.4","npm_package_dependencies_tiny_queue":"^0.2.1","npm_package_devDependencies_eslint_plugin_jsx_a11y":"^5.1.1","npm_config_color":"true","npm_package_scripts_build_development":"cross-env NODE_ENV=development webpack --config config/webpack/development.js","npm_package_dependencies_npm_run_all":"^4.1.2","npm_package_dependencies_stringz":"^0.3.0","npm_config_fetch_retry_mintimeout":"10000","npm_config_maxsockets":"50","npm_config_offline":"","npm_config_sso_poll_frequency":"500","npm_package_dependencies_babel_plugin_transform_react_inline_elements":"^6.22.0","npm_package_dependencies_babel_preset_react":"^6.24.1","npm_package_dependencies_object_assign":"^4.1.1","npm_package_dependencies_react_dom":"^16.2.0","npm_package_dependencies_react_textarea_autosize":"^5.2.1","npm_package_dependencies_redux":"^3.7.1","npm_package_devDependencies_eslint":"^4.15.0","npm_package_devDependencies_react_test_renderer":"^16.2.0","npm_config_umask":"0022","npm_package_dependencies_babel_plugin_transform_object_rest_spread":"^6.23.0","npm_package_dependencies_offline_plugin":"^4.8.3","npm_package_dependencies_path_complete_extname":"^0.1.0","npm_package_dependencies_postcss_smart_import":"^0.7.5","npm_package_dependencies_node_zopfli":"^2.0.2","npm_package_gitHead":"bbbb8e40f52cd05e8bbeec1901990144b87fea55","npm_config_fetch_retry_maxtimeout":"60000","npm_config_loglevel":"notice","npm_config_logs_max":"10","npm_config_message":"%s","npm_lifecycle_script":"cross-env NODE_ENV=production webpack --config config/webpack/production.js","npm_package_scripts_postversion":"git push --tags","npm_package_scripts_test":"npm-run-all test:lint test:jest","npm_package_dependencies_babel_core":"^6.25.0","npm_package_dependencies_babel_plugin_preval":"^1.6.1","npm_package_dependencies_http_link_header":"^0.8.0","npm_package_dependencies_intersection_observer":"^0.5.0","npm_package_dependencies_is_nan":"^1.2.1","npm_package_dependencies_react_intl":"^2.4.0","npm_package_dependencies_react_router_scroll_4":"^1.0.0-beta.1","npm_package_dependencies_react_swipeable_views":"^0.12.3","npm_package_dependencies_redux_immutable":"^4.0.0","npm_package_devDependencies_webpack_dev_server":"^2.9.5","npm_config_ca":"","npm_config_cert":"","npm_config_global":"","npm_config_link":"","npm_package_repository_url":"git+https://github.com/tootsuite/mastodon.git","npm_package_dependencies_webpack_bundle_analyzer":"^2.9.1","npm_package_version":"","npm_config_access":"","npm_config_also":"","npm_config_save":"true","npm_config_unicode":"","npm_lifecycle_event":"build","npm_package_scripts_build":"cross-env NODE_ENV=production webpack --config config/webpack/production.js","npm_package_dependencies_emoji_mart":"github:Gargron/emoji-mart#build","npm_package_dependencies_intl":"^1.2.5","npm_package_dependencies_js_yaml":"^3.9.0","npm_package_dependencies_uuid":"^3.1.0","npm_config_argv":"{\"remain\":[],\"cooked\":[\"run\",\"build\"],\"original\":[\"run\",\"build\"]}","npm_config_long":"","npm_config_production":"","npm_config_searchlimit":"20","npm_config_unsafe_perm":"true","npm_package_dependencies_array_includes":"^3.0.3","npm_package_dependencies_babel_plugin_transform_react_jsx_source":"^6.22.0","npm_package_dependencies_compression_webpack_plugin":"^1.0.1","npm_package_dependencies_file_loader":"^0.11.2","npm_package_dependencies_lodash":"^4.17.4","npm_config_auth_type":"legacy","npm_config_node_version":"9.11.1","npm_config_tag":"latest","npm_config_git_tag_version":"true","npm_config_commit_hooks":"true","npm_config_script_shell":"","npm_config_shrinkwrap":"true","npm_package_license":"AGPL-3.0-or-later","npm_package_dependencies_classnames":"^2.2.5","npm_package_dependencies_es6_symbol":"^3.1.1","npm_package_dependencies_intl_messageformat":"^2.2.0","npm_package_dependencies_punycode":"^2.1.0","npm_package_devDependencies_eslint_plugin_react":"^7.5.1","npm_config_fetch_retry_factor":"10","npm_config_save_exact":"","npm_config_strict_ssl":"true","npm_package_dependencies_babel_plugin_transform_react_jsx_self":"^6.22.0","npm_config_dev":"","npm_config_globalconfig":"/usr/etc/npmrc","npm_config_init_module":"/home/howl/.npm-init.js","npm_config_parseable":"","npm_package_dependencies_intl_relativeformat":"^2.1.0","npm_package_dependencies_requestidlecallback":"^0.3.0","npm_package_dependencies_webpack_manifest_plugin":"^1.2.1","npm_package_devDependencies_enzyme":"^3.2.0","npm_package_devDependencies_raf":"^3.4.0","npm_config_globalignorefile":"/usr/etc/npmignore","npm_execpath":"/usr/lib/node_modules/npm/bin/npm-cli.js","PWD":"/home/howl/oc/mastofe","npm_package_dependencies_react_toggle":"^4.0.1","npm_config_cache_lock_retries":"10","npm_config_searchstaleness":"900","npm_package_dependencies_object_values":"^1.0.4","npm_package_dependencies_prop_types":"^15.5.10","npm_package_dependencies_resolve_url_loader":"^2.2.0","npm_package_dependencies_rimraf":"^2.6.1","npm_config_node_options":"","npm_config_save_prefix":"^","npm_config_scripts_prepend_node_path":"warn-only","npm_package_devDependencies_babel_eslint":"^8.2.1","npm_package_devDependencies_yargs":"^8.0.2","npm_config_group":"1000","npm_config_init_author_email":"","npm_config_searchexclude":"","npm_package_dependencies_babel_loader":"^7.1.1","npm_package_dependencies_object_fit_images":"^3.2.3","npm_package_devDependencies_eslint_plugin_promise":"^3.7.0","npm_config_git":"git","npm_config_optional":"true","npm_package_dependencies_babel_plugin_transform_decorators_legacy":"^1.3.4","npm_package_dependencies_pg":"^6.4.0","npm_package_dependencies_react":"^16.2.0","npm_package_dependencies_fsevents":"*","npm_config_json":"","INIT_CWD":"/home/howl/oc/mastofe","NODE_ENV":"production"};
-
-
-
-
-function openSystemCache() {
- return caches.open('mastodon-system');
-}
-
-function openWebCache() {
- return caches.open('mastodon-web');
-}
-
-function fetchRoot() {
- return fetch('/web', { credentials: 'include' });
-}
-
-// Cause a new version of a registered Service Worker to replace an existing one
-// that is already installed, and replace the currently active worker on open pages.
-self.addEventListener('install', function (event) {
- event.waitUntil(Promise.all([openWebCache(), fetchRoot()]).then(function (_ref) {
- var cache = _ref[0],
- root = _ref[1];
- return cache.put('/web', root);
- }));
-});
-self.addEventListener('activate', function (event) {
- event.waitUntil(self.clients.claim());
-});
-self.addEventListener('fetch', function (event) {
- var url = new URL(event.request.url);
-
- if (url.pathname.startsWith('/web')) {
- // we always make /web/login go through
- if (url.pathname.startsWith('/web/login')) {
- return;
- }
- var asyncResponse = fetchRoot();
- var asyncCache = openWebCache();
-
- event.respondWith(asyncResponse.then(async function (response) {
- // response was redirected - let's actually do the request from the event
- // and return its response
- if (response.redirected || response.type === 'opaqueredirect') {
- return await fetch(event.request);
- }
- if (response.ok) {
- var cache = await asyncCache;
- await cache.put('/web', response);
- return response.clone();
- }
-
- throw null;
- }).catch(function () {
- return asyncCache.then(function (cache) {
- return cache.match('/web');
- });
- }));
- } else if (url.pathname === '/auth/sign_out') {
- var _asyncResponse = fetch(event.request);
- var _asyncCache = openWebCache();
-
- event.respondWith(_asyncResponse.then(async function (response) {
- if (response.ok || response.type === 'opaqueredirect') {
- await Promise.all([_asyncCache.then(function (cache) {
- return cache.delete('/web');
- }), indexedDB.deleteDatabase('mastodon')]);
- }
-
- return response;
- }));
- } else if (process.env.CDN_HOST ? url.host === process.env.CDN_HOST : url.pathname.startsWith('/system/')) {
- event.respondWith(openSystemCache().then(async function (cache) {
- var cached = await cache.match(event.request.url);
-
- if (cached === undefined) {
- var fetched = await fetch(event.request);
-
- if (fetched.ok) {
- try {
- await cache.put(event.request.url, fetched.clone());
- } finally {
- Object(__WEBPACK_IMPORTED_MODULE_0__storage_modifier__["a" /* freeStorage */])();
- }
- }
-
- return fetched;
- }
-
- return cached;
- }));
- }
-});
-
-
-/***/ }),
-/* 2 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* unused harmony export evictStatus */
-/* unused harmony export evictStatuses */
-/* unused harmony export putAccounts */
-/* unused harmony export putStatuses */
-/* harmony export (immutable) */ __webpack_exports__["a"] = freeStorage;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__db__ = __webpack_require__(3);
-
-
-var accountAssetKeys = ['avatar', 'avatar_static', 'header', 'header_static'];
-var storageMargin = 8388608;
-var storeLimit = 1024;
-
-function openCache() {
- // ServiceWorker and Cache API is not available on iOS 11
- // https://webkit.org/status/#specification-service-workers
- return self.caches ? caches.open('mastodon-system') : Promise.reject();
-}
-
-function printErrorIfAvailable(error) {
- if (error) {
- console.warn(error);
- }
-}
-
-function put(name, objects, onupdate, oncreate) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__db__["a" /* default */])().then(function (db) {
- return new Promise(function (resolve, reject) {
- var putTransaction = db.transaction(name, 'readwrite');
- var putStore = putTransaction.objectStore(name);
- var putIndex = putStore.index('id');
-
- objects.forEach(function (object) {
- putIndex.getKey(object.id).onsuccess = function (retrieval) {
- function addObject() {
- putStore.add(object);
- }
-
- function deleteObject() {
- putStore.delete(retrieval.target.result).onsuccess = addObject;
- }
-
- if (retrieval.target.result) {
- if (onupdate) {
- onupdate(object, retrieval.target.result, putStore, deleteObject);
- } else {
- deleteObject();
- }
- } else {
- if (oncreate) {
- oncreate(object, addObject);
- } else {
- addObject();
- }
- }
- };
- });
-
- putTransaction.oncomplete = function () {
- var readTransaction = db.transaction(name, 'readonly');
- var readStore = readTransaction.objectStore(name);
- var count = readStore.count();
-
- count.onsuccess = function () {
- var excess = count.result - storeLimit;
-
- if (excess > 0) {
- var retrieval = readStore.getAll(null, excess);
-
- retrieval.onsuccess = function () {
- return resolve(retrieval.result);
- };
- retrieval.onerror = reject;
- } else {
- resolve([]);
- }
- };
-
- count.onerror = reject;
- };
-
- putTransaction.onerror = reject;
- }).then(function (resolved) {
- db.close();
- return resolved;
- }, function (error) {
- db.close();
- throw error;
- });
- });
-}
-
-function evictAccountsByRecords(records) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__db__["a" /* default */])().then(function (db) {
- var transaction = db.transaction(['accounts', 'statuses'], 'readwrite');
- var accounts = transaction.objectStore('accounts');
- var accountsIdIndex = accounts.index('id');
- var accountsMovedIndex = accounts.index('moved');
- var statuses = transaction.objectStore('statuses');
- var statusesIndex = statuses.index('account');
-
- function evict(toEvict) {
- toEvict.forEach(function (record) {
- openCache().then(function (cache) {
- return accountAssetKeys.forEach(function (key) {
- return cache.delete(records[key]);
- });
- }).catch(printErrorIfAvailable);
-
- accountsMovedIndex.getAll(record.id).onsuccess = function (_ref) {
- var target = _ref.target;
- return evict(target.result);
- };
-
- statusesIndex.getAll(record.id).onsuccess = function (_ref2) {
- var target = _ref2.target;
- return evictStatusesByRecords(target.result);
- };
-
- accountsIdIndex.getKey(record.id).onsuccess = function (_ref3) {
- var target = _ref3.target;
- return target.result && accounts.delete(target.result);
- };
- });
- }
-
- evict(records);
-
- db.close();
- }).catch(printErrorIfAvailable);
-}
-
-function evictStatus(id) {
- evictStatuses([id]);
-}
-
-function evictStatuses(ids) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__db__["a" /* default */])().then(function (db) {
- var transaction = db.transaction('statuses', 'readwrite');
- var store = transaction.objectStore('statuses');
- var idIndex = store.index('id');
- var reblogIndex = store.index('reblog');
-
- ids.forEach(function (id) {
- reblogIndex.getAllKeys(id).onsuccess = function (_ref4) {
- var target = _ref4.target;
- return target.result.forEach(function (reblogKey) {
- return store.delete(reblogKey);
- });
- };
-
- idIndex.getKey(id).onsuccess = function (_ref5) {
- var target = _ref5.target;
- return target.result && store.delete(target.result);
- };
- });
-
- db.close();
- }).catch(printErrorIfAvailable);
-}
-
-function evictStatusesByRecords(records) {
- return evictStatuses(records.map(function (_ref6) {
- var id = _ref6.id;
- return id;
- }));
-}
-
-function putAccounts(records, avatarStatic) {
- var avatarKey = avatarStatic ? 'avatar_static' : 'avatar';
- var newURLs = [];
-
- put('accounts', records, function (newRecord, oldKey, store, oncomplete) {
- store.get(oldKey).onsuccess = function (_ref7) {
- var target = _ref7.target;
-
- accountAssetKeys.forEach(function (key) {
- var newURL = newRecord[key];
- var oldURL = target.result[key];
-
- if (newURL !== oldURL) {
- openCache().then(function (cache) {
- return cache.delete(oldURL);
- }).catch(printErrorIfAvailable);
- }
- });
-
- var newURL = newRecord[avatarKey];
- var oldURL = target.result[avatarKey];
-
- if (newURL !== oldURL) {
- newURLs.push(newURL);
- }
-
- oncomplete();
- };
- }, function (newRecord, oncomplete) {
- newURLs.push(newRecord[avatarKey]);
- oncomplete();
- }).then(function (records) {
- return Promise.all([evictAccountsByRecords(records), openCache().then(function (cache) {
- return cache.addAll(newURLs);
- })]);
- }).then(freeStorage, function (error) {
- freeStorage();
- throw error;
- }).catch(printErrorIfAvailable);
-}
-
-function putStatuses(records) {
- put('statuses', records).then(evictStatusesByRecords).catch(printErrorIfAvailable);
-}
-
-function freeStorage() {
- return navigator.storage.estimate().then(function (_ref8) {
- var quota = _ref8.quota,
- usage = _ref8.usage;
-
- if (usage + storageMargin < quota) {
- return null;
- }
-
- return Object(__WEBPACK_IMPORTED_MODULE_0__db__["a" /* default */])().then(function (db) {
- return new Promise(function (resolve, reject) {
- var retrieval = db.transaction('accounts', 'readonly').objectStore('accounts').getAll(null, 1);
-
- retrieval.onsuccess = function () {
- if (retrieval.result.length > 0) {
- resolve(evictAccountsByRecords(retrieval.result).then(freeStorage));
- } else {
- resolve(caches.delete('mastodon-system'));
- }
- };
-
- retrieval.onerror = reject;
-
- db.close();
- });
- });
- });
-}
-
-/***/ }),
-/* 3 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony default export */ __webpack_exports__["a"] = (function () {
- return new Promise(function (resolve, reject) {
- // ServiceWorker is required to synchronize the login state.
- // Microsoft Edge 17 does not support getAll according to:
- // Catalog of standard and vendor APIs across browsers - Microsoft Edge Development
- // https://developer.microsoft.com/en-us/microsoft-edge/platform/catalog/?q=specName%3Aindexeddb
- if (!('caches' in self && 'getAll' in IDBObjectStore.prototype)) {
- reject();
- return;
- }
-
- var request = indexedDB.open('mastodon');
-
- request.onerror = reject;
- request.onsuccess = function (_ref) {
- var target = _ref.target;
- return resolve(target.result);
- };
-
- request.onupgradeneeded = function (_ref2) {
- var target = _ref2.target;
-
- var accounts = target.result.createObjectStore('accounts', { autoIncrement: true });
- var statuses = target.result.createObjectStore('statuses', { autoIncrement: true });
-
- accounts.createIndex('id', 'id', { unique: true });
- accounts.createIndex('moved', 'moved');
-
- statuses.createIndex('id', 'id', { unique: true });
- statuses.createIndex('account', 'account');
- statuses.createIndex('reblog', 'reblog');
- };
- });
-});
-
-/***/ }),
-/* 4 */
-/***/ (function(module, exports) {
-
-var MAX_NOTIFICATIONS = 5;
-var GROUP_TAG = 'tag';
-
-// Avoid loading intl-messageformat and dealing with locales in the ServiceWorker
-var formatGroupTitle = function formatGroupTitle(message, count) {
- return message.replace('%{count}', count);
-};
-
-var notify = function notify(options) {
- return self.registration.getNotifications().then(function (notifications) {
- if (notifications.length === MAX_NOTIFICATIONS) {
- // Reached the maximum number of notifications, proceed with grouping
- var group = {
- title: formatGroupTitle(options.data.message, notifications.length + 1),
- body: notifications.sort(function (n1, n2) {
- return n1.timestamp < n2.timestamp;
- }).map(function (notification) {
- return notification.title;
- }).join('\n'),
- badge: '/badge.png',
- icon: '/android-chrome-192x192.png',
- tag: GROUP_TAG,
- data: {
- url: new URL('/web/notifications', self.location).href,
- count: notifications.length + 1,
- message: options.data.message
- }
- };
-
- notifications.forEach(function (notification) {
- return notification.close();
- });
-
- return self.registration.showNotification(group.title, group);
- } else if (notifications.length === 1 && notifications[0].tag === GROUP_TAG) {
- // Already grouped, proceed with appending the notification to the group
- var _group = cloneNotification(notifications[0]);
-
- _group.title = formatGroupTitle(_group.data.message, _group.data.count + 1);
- _group.body = options.title + '\n' + _group.body;
- _group.data = Object.assign({}, _group.data, { count: _group.data.count + 1 });
-
- return self.registration.showNotification(_group.title, _group);
- }
-
- return self.registration.showNotification(options.title, options);
- });
-};
-
-var handlePush = function handlePush(event) {
- var options = event.data.json();
-
- options.body = options.data.nsfw || options.data.content;
- options.dir = options.data.dir;
- options.image = options.image || undefined; // Null results in a network request (404)
- options.timestamp = options.timestamp && new Date(options.timestamp);
-
- var expandAction = options.data.actions.find(function (action) {
- return action.todo === 'expand';
- });
-
- if (expandAction) {
- options.actions = [expandAction];
- options.hiddenActions = options.data.actions.filter(function (action) {
- return action !== expandAction;
- });
- options.data.hiddenImage = options.image;
- options.image = undefined;
- } else {
- options.actions = options.data.actions;
- }
-
- event.waitUntil(notify(options));
-};
-
-var cloneNotification = function cloneNotification(notification) {
- var clone = {};
-
- for (var k in notification) {
- clone[k] = notification[k];
- }
-
- return clone;
-};
-
-var expandNotification = function expandNotification(notification) {
- var nextNotification = cloneNotification(notification);
-
- nextNotification.body = notification.data.content;
- nextNotification.image = notification.data.hiddenImage;
- nextNotification.actions = notification.data.actions.filter(function (action) {
- return action.todo !== 'expand';
- });
-
- return self.registration.showNotification(nextNotification.title, nextNotification);
-};
-
-var makeRequest = function makeRequest(notification, action) {
- return fetch(action.action, {
- headers: {
- 'Authorization': 'Bearer ' + notification.data.access_token,
- 'Content-Type': 'application/json'
- },
- method: action.method,
- credentials: 'include'
- });
-};
-
-var findBestClient = function findBestClient(clients) {
- var focusedClient = clients.find(function (client) {
- return client.focused;
- });
- var visibleClient = clients.find(function (client) {
- return client.visibilityState === 'visible';
- });
-
- return focusedClient || visibleClient || clients[0];
-};
-
-var openUrl = function openUrl(url) {
- return self.clients.matchAll({ type: 'window' }).then(function (clientList) {
- if (clientList.length !== 0) {
- var webClients = clientList.filter(function (client) {
- return (/\/web\//.test(client.url)
- );
- });
-
- if (webClients.length !== 0) {
- var client = findBestClient(webClients);
-
- var _ref = new URL(url),
- pathname = _ref.pathname;
-
- if (pathname.startsWith('/web/')) {
- return client.focus().then(function (client) {
- return client.postMessage({
- type: 'navigate',
- path: pathname.slice('/web/'.length - 1)
- });
- });
- }
- } else if ('navigate' in clientList[0]) {
- // Chrome 42-48 does not support navigate
- var _client = findBestClient(clientList);
-
- return _client.navigate(url).then(function (client) {
- return client.focus();
- });
- }
- }
-
- return self.clients.openWindow(url);
- });
-};
-
-var removeActionFromNotification = function removeActionFromNotification(notification, action) {
- var actions = notification.actions.filter(function (act) {
- return act.action !== action.action;
- });
- var nextNotification = cloneNotification(notification);
-
- nextNotification.actions = actions;
-
- return self.registration.showNotification(nextNotification.title, nextNotification);
-};
-
-var handleNotificationClick = function handleNotificationClick(event) {
- var reactToNotificationClick = new Promise(function (resolve, reject) {
- if (event.action) {
- var action = event.notification.data.actions.find(function (_ref2) {
- var action = _ref2.action;
- return action === event.action;
- });
-
- if (action.todo === 'expand') {
- resolve(expandNotification(event.notification));
- } else if (action.todo === 'request') {
- resolve(makeRequest(event.notification, action).then(function () {
- return removeActionFromNotification(event.notification, action);
- }));
- } else {
- reject('Unknown action: ' + action.todo);
- }
- } else {
- event.notification.close();
- resolve(openUrl(event.notification.data.url));
- }
- });
-
- event.waitUntil(reactToNotificationClick);
-};
-
-self.addEventListener('push', handlePush);
-self.addEventListener('notificationclick', handleNotificationClick);
-
-/***/ })
-/******/ ]);
\ No newline at end of file
+!function(n){var e={};function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(t,o,n){i.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(o,t){if(1&t&&(o=i(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var e in o)i.d(n,e,function(t){return o[t]}.bind(null,e));return n},i.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(o,"a",o),o},i.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},i.p="/packs/",i(i.s=5)}([function(t,o,n){var e=n(8).Symbol;t.exports=e},function(t,o,n){"use strict";o.extend=function(t){var o,n,e,i,a=Array.prototype.slice.call(arguments,1);for(o=0,n=a.length;o<n;o+=1)if(e=a[o])for(i in e)r.call(e,i)&&(t[i]=e[i]);return t};var r=Object.prototype.hasOwnProperty;o.hop=r},function(t,o,n){var e=n(6),i=n(18),a=/&(?:amp|lt|gt|quot|#39);/g,r=RegExp(a.source);t.exports=function(t){return(t=e(t))&&r.test(t)?t.replace(a,i):t}},function(t,o,n){"use strict";var e=n(20).default;n(27),(o=t.exports=e).default=o},function(t,o){t.exports={ar:{"notification.favourite":"أُعجِب {name} بمنشورك","notification.follow":"{name} يتابعك","notification.mention":"{name} ذكرك","notification.reblog":"{name} قام بترقية تبويقك","notification.poll":"A poll you have voted in has ended","status.show_more":"أظهر المزيد","status.reblog":"رَقِّي","status.favourite":"أضف إلى المفضلة","notifications.group":"{count} إشعارات"},ast:{"notification.favourite":"{name} favourited your status","notification.follow":"{name} siguióte","notification.mention":"{name} mentóte","notification.reblog":"{name} compartió'l to estáu","notification.poll":"A poll you have voted in has ended","status.show_more":"Amosar más","status.reblog":"Compartir","status.favourite":"Favourite","notifications.group":"{count} avisos"},bg:{"notification.favourite":"{name} хареса твоята публикация","notification.follow":"{name} те последва","notification.mention":"{name} те спомена","notification.reblog":"{name} сподели твоята публикация","notification.poll":"A poll you have voted in has ended","status.show_more":"Show more","status.reblog":"Споделяне","status.favourite":"Предпочитани","notifications.group":"{count} notifications"},bn:{"notification.favourite":"{name} favourited your status","notification.follow":"{name} followed you","notification.mention":"{name} mentioned you","notification.reblog":"{name} boosted your status","notification.poll":"A poll you have voted in has ended","status.show_more":"Show more","status.reblog":"Boost","status.favourite":"Favourite","notifications.group":"{count} notifications"},ca:{"notification.favourite":"{name} ha afavorit el teu estat","notification.follow":"{name} et segueix","notification.mention":"{name} t'ha esmentat","notification.reblog":"{name} ha impulsat el teu estat","notification.poll":"Ha finalitzat una enquesta en la que has votat","status.show_more":"Mostra més","status.reblog":"Impuls","status.favourite":"Favorit","notifications.group":"{count} notificacions"},co:{"notification.favourite":"{name} hà aghjuntu u vostru statutu à i so favuriti","notification.follow":"{name} v'hà seguitatu","notification.mention":"{name} v'hà mintuvatu","notification.reblog":"{name} hà spartutu u vostru statutu","notification.poll":"Un scandagliu induve avete vutatu hè finitu","status.show_more":"Slibrà","status.reblog":"Sparte","status.favourite":"Aghjunghje à i favuriti","notifications.group":"{count} nutificazione"},cs:{"notification.favourite":"{name} si oblíbil/a váš toot","notification.follow":"{name} vás začal/a sledovat","notification.mention":"{name} vás zmínil/a","notification.reblog":"{name} boostnul/a váš toot","notification.poll":"Anketa, ve které jste hlasoval/a, skončila","status.show_more":"Zobrazit více","status.reblog":"Boostnout","status.favourite":"Oblíbit","notifications.group":"{count} oznámení"},cy:{"notification.favourite":"hoffodd {name} eich tŵt","notification.follow":"dilynodd {name} chi","notification.mention":"Soniodd {name} amdanoch chi","notification.reblog":"Hysbysebodd {name} eich tŵt","notification.poll":"A poll you have voted in has ended","status.show_more":"Dangos mwy","status.reblog":"Hybu","status.favourite":"Hoffi","notifications.group":"{count} o hysbysiadau"},da:{"notification.favourite":"{name} favoriserede din status","notification.follow":"{name} fulgte dig","notification.mention":"{name} nævnte dig","notification.reblog":"{name} fremhævede din status","notification.poll":"A poll you have voted in has ended","status.show_more":"Vis mere","status.reblog":"Fremhæv","status.favourite":"Favorit","notifications.group":"{count} notifikationer"},de:{"notification.favourite":"{name} hat deinen Beitrag favorisiert","notification.follow":"{name} folgt dir","notification.mention":"{name} hat dich erwähnt","notification.reblog":"{name} hat deinen Beitrag geteilt","notification.poll":"Eine Umfrage in der du abgestimmt hast ist vorbei","status.show_more":"Mehr anzeigen","status.reblog":"Teilen","status.favourite":"Favorisieren","notifications.group":"{count} Benachrichtigungen"},el:{"notification.favourite":"Ο/Η {name} σημείωσε ως αγαπημένη την κατάστασή σου","notification.follow":"Ο/Η {name} σε ακολούθησε","notification.mention":"Ο/Η {name} σε ανέφερε","notification.reblog":"Ο/Η {name} προώθησε την κατάστασή σου","notification.poll":"Έλαβε τέλος μια από τις ψηφοφορίες που συμμετείχες","status.show_more":"Δείξε περισσότερα","status.reblog":"Προώθησε","status.favourite":"Σημείωσε ως αγαπημένο","notifications.group":"{count} ειδοποιήσεις"},en:{"notification.favourite":"{name} favourited your status","notification.follow":"{name} followed you","notification.mention":"{name} mentioned you","notification.reblog":"{name} boosted your status","notification.poll":"A poll you have voted in has ended","status.show_more":"Show more","status.reblog":"Boost","status.favourite":"Favourite","notifications.group":"{count} notifications"},eo:{"notification.favourite":"{name} stelumis vian mesaĝon","notification.follow":"{name} eksekvis vin","notification.mention":"{name} menciis vin","notification.reblog":"{name} diskonigis vian mesaĝon","notification.poll":"Balotenketo ke vi balotis estas finita","status.show_more":"Grandigi","status.reblog":"Diskonigi","status.favourite":"Stelumi","notifications.group":"{count} sciigoj"},es:{"notification.favourite":"{name} marcó tu estado como favorito","notification.follow":"{name} te empezó a seguir","notification.mention":"{name} te ha mencionado","notification.reblog":"{name} ha retooteado tu estado","notification.poll":"A poll you have voted in has ended","status.show_more":"Mostrar más","status.reblog":"Retootear","status.favourite":"Favorito","notifications.group":"{count} notificaciones"},eu:{"notification.favourite":"{name}(e)k zure mezua gogoko du","notification.follow":"{name}(e)k jarraitzen zaitu","notification.mention":"{name}(e)k aipatu zaitu","notification.reblog":"{name}(e)k bultzada eman dio zure mezuari","notification.poll":"A poll you have voted in has ended","status.show_more":"Erakutsi gehiago","status.reblog":"Bultzada","status.favourite":"Gogokoa","notifications.group":"{count} jakinarazpen"},fa:{"notification.favourite":"{name} نوشتهٔ شما را پسندید","notification.follow":"{name} پیگیر شما شد","notification.mention":"{name} از شما نام برد","notification.reblog":"{name} نوشتهٔ شما را بازبوقید","notification.poll":"نظرسنجیای که در آن رأی دادید به پایان رسیده است","status.show_more":"نمایش","status.reblog":"بازبوقیدن","status.favourite":"پسندیدن","notifications.group":"{count} اعلان"},fi:{"notification.favourite":"{name} tykkäsi tilastasi","notification.follow":"{name} seurasi sinua","notification.mention":"{name} mainitsi sinut","notification.reblog":"{name} buustasi tilaasi","notification.poll":"A poll you have voted in has ended","status.show_more":"Näytä lisää","status.reblog":"Buustaa","status.favourite":"Tykkää","notifications.group":"{count} notifications"},fr:{"notification.favourite":"{name} a ajouté à ses favoris :","notification.follow":"{name} vous suit","notification.mention":"{name} vous a mentionné :","notification.reblog":"{name} a partagé votre statut :","notification.poll":"Un sondage auquel vous avez participé vient de se terminer","status.show_more":"Déplier","status.reblog":"Partager","status.favourite":"Ajouter aux favoris","notifications.group":"{count} notifications"},gl:{"notification.favourite":"{name} marcou como favorito o seu estado","notification.follow":"{name} está a seguila","notification.mention":"{name} mencionoute","notification.reblog":"{name} promoveu o seu estado","notification.poll":"Unha sondaxe na que votou xa rematou","status.show_more":"Mostrar máis","status.reblog":"Promover","status.favourite":"Favorita","notifications.group":"{count} notificacións"},he:{"notification.favourite":"חצרוצך חובב על ידי {name}","notification.follow":"{name} במעקב אחרייך","notification.mention":"אוזכרת על ידי {name}","notification.reblog":"חצרוצך הודהד על ידי {name}","notification.poll":"A poll you have voted in has ended","status.show_more":"הראה יותר","status.reblog":"הדהוד","status.favourite":"חיבוב","notifications.group":"{count} notifications"},hi:{"notification.favourite":"{name} favourited your status","notification.follow":"{name} followed you","notification.mention":"{name} mentioned you","notification.reblog":"{name} boosted your status","notification.poll":"A poll you have voted in has ended","status.show_more":"Show more","status.reblog":"Boost","status.favourite":"Favourite","notifications.group":"{count} notifications"},hr:{"notification.favourite":"{name} je lajkao tvoj status","notification.follow":"{name} te sada slijedi","notification.mention":"{name} te je spomenuo","notification.reblog":"{name} je podigao tvoj status","notification.poll":"A poll you have voted in has ended","status.show_more":"Pokaži više","status.reblog":"Podigni","status.favourite":"Označi omiljenim","notifications.group":"{count} notifications"},hu:{"notification.favourite":"{name} kedvencnek jelölte az állapotod","notification.follow":"{name} követ téged","notification.mention":"{name} megemlített","notification.reblog":"{name} rebloggolta az állapotod","notification.poll":"A poll you have voted in has ended","status.show_more":"Többet","status.reblog":"Reblog","status.favourite":"Kedvenc","notifications.group":"{count} notifications"},hy:{"notification.favourite":"{name} հավանեց թութդ","notification.follow":"{name} սկսեց հետեւել քեզ","notification.mention":"{name} նշեց քեզ","notification.reblog":"{name} տարածեց թութդ","notification.poll":"A poll you have voted in has ended","status.show_more":"Ավելին","status.reblog":"Տարածել","status.favourite":"Հավանել","notifications.group":"{count} notifications"},id:{"notification.favourite":"{name} menyukai status anda","notification.follow":"{name} mengikuti anda","notification.mention":"{name} mentioned you","notification.reblog":"{name} mem-boost status anda","notification.poll":"A poll you have voted in has ended","status.show_more":"Tampilkan semua","status.reblog":"Boost","status.favourite":"Difavoritkan","notifications.group":"{count} notifications"},io:{"notification.favourite":"{name} favorizis tua mesajo","notification.follow":"{name} sequeskis tu","notification.mention":"{name} mencionis tu","notification.reblog":"{name} repetis tua mesajo","notification.poll":"A poll you have voted in has ended","status.show_more":"Montrar plue","status.reblog":"Repetar","status.favourite":"Favorizar","notifications.group":"{count} notifications"},it:{"notification.favourite":"{name} ha apprezzato il tuo post","notification.follow":"{name} ha iniziato a seguirti","notification.mention":"{name} ti ha menzionato","notification.reblog":"{name} ha condiviso il tuo post","notification.poll":"A poll you have voted in has ended","status.show_more":"Mostra di più","status.reblog":"Condividi","status.favourite":"Apprezzato","notifications.group":"{count} notifiche"},ja:{"notification.favourite":"{name}さんがあなたのトゥートをお気に入りに登録しました","notification.follow":"{name}さんにフォローされました","notification.mention":"{name}さんがあなたに返信しました","notification.reblog":"{name}さんがあなたのトゥートをブーストしました","notification.poll":"アンケートが終了しました","status.show_more":"もっと見る","status.reblog":"ブースト","status.favourite":"お気に入り","notifications.group":"{count} 件の通知"},ka:{"notification.favourite":"{name}-მა თქვენი სტატუსი აქცია ფავორიტად","notification.follow":"{name} გამოგყვათ","notification.mention":"{name}-მა გასახელათ","notification.reblog":"{name}-მა დაბუსტა თქვენი სტატუსი","notification.poll":"A poll you have voted in has ended","status.show_more":"აჩვენე მეტი","status.reblog":"ბუსტი","status.favourite":"ფავორიტი","notifications.group":"{count} შეტყობინება"},kk:{"notification.favourite":"{name} жазбаңызды таңдаулыға қосты","notification.follow":"{name} сізге жазылды","notification.mention":"{name} сізді атап өтті","notification.reblog":"{name} жазбаңызды бөлісті","notification.poll":"Бұл сауалнаманың мерзімі аяқталыпты","status.show_more":"Толығырақ","status.reblog":"Бөлісу","status.favourite":"Таңдаулы","notifications.group":"{count} ескертпе"},ko:{"notification.favourite":"{name}님이 즐겨찾기 했습니다","notification.follow":"{name}님이 나를 팔로우 했습니다","notification.mention":"{name}님이 답글을 보냈습니다","notification.reblog":"{name}님이 부스트 했습니다","notification.poll":"당신이 참여 한 투표가 종료되었습니다","status.show_more":"더 보기","status.reblog":"부스트","status.favourite":"즐겨찾기","notifications.group":"{count} 개의 알림"},lv:{"notification.favourite":"{name} favourited your status","notification.follow":"{name} followed you","notification.mention":"{name} mentioned you","notification.reblog":"{name} boosted your status","notification.poll":"A poll you have voted in has ended","status.show_more":"Show more","status.reblog":"Boost","status.favourite":"Favourite","notifications.group":"{count} notifications"},ms:{"notification.favourite":"{name} favourited your status","notification.follow":"{name} followed you","notification.mention":"{name} mentioned you","notification.reblog":"{name} boosted your status","notification.poll":"A poll you have voted in has ended","status.show_more":"Show more","status.reblog":"Boost","status.favourite":"Favourite","notifications.group":"{count} notifications"},nl:{"notification.favourite":"{name} voegde jouw toot als favoriet toe","notification.follow":"{name} volgt jou nu","notification.mention":"{name} vermeldde jou","notification.reblog":"{name} boostte jouw toot","notification.poll":"Een poll waaraan jij hebt meegedaan is beëindigd","status.show_more":"Meer tonen","status.reblog":"Boost","status.favourite":"Favoriet","notifications.group":"{count} meldingen"},no:{"notification.favourite":"{name} likte din status","notification.follow":"{name} fulgte deg","notification.mention":"{name} nevnte deg","notification.reblog":"{name} fremhevde din status","notification.poll":"A poll you have voted in has ended","status.show_more":"Vis mer","status.reblog":"Fremhev","status.favourite":"Lik","notifications.group":"{count} notifications"},oc:{"notification.favourite":"{name} a ajustat a sos favorits","notification.follow":"{name} vos sèc","notification.mention":"{name} vos a mencionat","notification.reblog":"{name} a partejat vòstre estatut","notification.poll":"Avètz participat a un sondatge que ven de s’acabar","status.show_more":"Desplegar","status.reblog":"Partejar","status.favourite":"Apondre als favorits","notifications.group":"{count} notificacions"},pl:{"notification.favourite":"{name} dodał(a) Twój wpis do ulubionych","notification.follow":"{name} zaczął(-ęła) Cię śledzić","notification.mention":"{name} wspomniał(a) o tobie","notification.reblog":"{name} podbił(a) Twój wpis","notification.poll":"Głosowanie w którym brałeś(-aś) udział zakończyła się","status.show_more":"Rozwiń","status.reblog":"Podbij","status.favourite":"Dodaj do ulubionych","notifications.group":"{count, number} {count, plural, one {powiadomienie} few {powiadomienia} many {powiadomień} more {powiadomień}}"},"pt-BR":{"notification.favourite":"{name} adicionou a sua postagem aos favoritos","notification.follow":"{name} te seguiu","notification.mention":"{name} te mencionou","notification.reblog":"{name} compartilhou a sua postagem","notification.poll":"Uma enquete em que você votou chegou ao fim","status.show_more":"Mostrar mais","status.reblog":"Compartilhar","status.favourite":"Adicionar aos favoritos","notifications.group":"{count} notificações"},pt:{"notification.favourite":"{name} adicionou o teu post aos favoritos","notification.follow":"{name} seguiu-te","notification.mention":"{name} mencionou-te","notification.reblog":"{name} partilhou o teu post","notification.poll":"A poll you have voted in has ended","status.show_more":"Mostrar mais","status.reblog":"Partilhar","status.favourite":"Adicionar aos favoritos","notifications.group":"{count} notificações"},ro:{"notification.favourite":"{name} a adăugat statusul tău la favorite","notification.follow":"{name} te urmărește","notification.mention":"{name} te-a menționat","notification.reblog":"{name} a redistribuit postarea ta","notification.poll":"A poll you have voted in has ended","status.show_more":"Arată mai mult","status.reblog":"Redistribuie","status.favourite":"Favorite","notifications.group":"{count} notificări"},ru:{"notification.favourite":"{name} понравился Ваш статус","notification.follow":"{name} подписался(-лась) на Вас","notification.mention":"{name} упомянул(а) Вас","notification.reblog":"{name} продвинул(а) Ваш статус","notification.poll":"Опрос, в котором вы приняли участие, завершился","status.show_more":"Развернуть","status.reblog":"Продвинуть","status.favourite":"Нравится","notifications.group":"{count} уведомл."},sk:{"notification.favourite":"{name} si obľúbil/a tvoj príspevok","notification.follow":"{name} ťa začal/a následovať","notification.mention":"{name} ťa spomenul/a","notification.reblog":"{name} zdieľal/a tvoj príspevok","notification.poll":"Anketa v ktorej si hlasoval/a sa skončila","status.show_more":"Ukáž viac","status.reblog":"Vyzdvihni","status.favourite":"Páči sa mi","notifications.group":"{count} oboznámení"},sl:{"notification.favourite":"{name} favourited your status","notification.follow":"{name} followed you","notification.mention":"{name} mentioned you","notification.reblog":"{name} boosted your status","notification.poll":"A poll you have voted in has ended","status.show_more":"Prikaži več","status.reblog":"Suni","status.favourite":"Favourite","notifications.group":"{count} notifications"},sq:{"notification.favourite":"{name} parapëlqeu gjendjen tuaj","notification.follow":"{name} zuri t’ju ndjekë","notification.mention":"{name} ju ka përmendur","notification.reblog":"përforcoi gjendjen tuaj","notification.poll":"A poll you have voted in has ended","status.show_more":"Shfaq më tepër","status.reblog":"Përforcojeni","status.favourite":"I parapëlqyer","notifications.group":"%(count)s njoftime"},"sr-Latn":{"notification.favourite":"{name} je stavio Vaš status kao omiljeni","notification.follow":"{name} Vas je zapratio","notification.mention":"{name} Vas je pomenuo","notification.reblog":"{name} je podržao(la) Vaš status","notification.poll":"A poll you have voted in has ended","status.show_more":"Prikaži više","status.reblog":"Podrži","status.favourite":"Omiljeno","notifications.group":"{count} notifications"},sr:{"notification.favourite":"{name} је ставио/ла Ваш статус као омиљени","notification.follow":"{name} Вас је запратио/ла","notification.mention":"{name} Вас је поменуо/ла","notification.reblog":"{name} је подржао/ла Ваш статус","notification.poll":"A poll you have voted in has ended","status.show_more":"Прикажи више","status.reblog":"Подржи","status.favourite":"Омиљено","notifications.group":"{count} обавештења"},sv:{"notification.favourite":"{name} favoriserade din status","notification.follow":"{name} följer dig","notification.mention":"{name} nämnde dig","notification.reblog":"{name} knuffade din status","notification.poll":"A poll you have voted in has ended","status.show_more":"Visa mer","status.reblog":"Knuff","status.favourite":"Favorit","notifications.group":"{count} aviseringar"},ta:{"notification.favourite":"{name} favourited your status","notification.follow":"{name} followed you","notification.mention":"{name} mentioned you","notification.reblog":"{name} boosted your status","notification.poll":"A poll you have voted in has ended","status.show_more":"Show more","status.reblog":"Boost","status.favourite":"Favourite","notifications.group":"{count} notifications"},te:{"notification.favourite":"{name} మీ స్టేటస్ ను ఇష్టపడ్డారు","notification.follow":"{name} మిమ్మల్ని అనుసరిస్తున్నారు","notification.mention":"{name} మిమ్మల్ని ప్రస్తావించారు","notification.reblog":"{name} మీ స్టేటస్ ను బూస్ట్ చేసారు","notification.poll":"మీరు పాల్గొనిన ఎన్సిక ముగిసినది","status.show_more":"ఇంకా చూపించు","status.reblog":"బూస్ట్","status.favourite":"ఇష్టపడు","notifications.group":"{count} ప్రకటనలు"},th:{"notification.favourite":"{name} ได้ชื่นชอบสถานะของคุณ","notification.follow":"{name} ได้ติดตามคุณ","notification.mention":"{name} ได้กล่าวถึงคุณ","notification.reblog":"{name} ได้ดันสถานะของคุณ","notification.poll":"A poll you have voted in has ended","status.show_more":"แสดงเพิ่มเติม","status.reblog":"ดัน","status.favourite":"ชื่นชอบ","notifications.group":"{count} การแจ้งเตือน"},tr:{"notification.favourite":"{name} senin durumunu favorilere ekledi","notification.follow":"{name} seni takip ediyor","notification.mention":"{name} mentioned you","notification.reblog":"{name} senin durumunu boost etti","notification.poll":"Oy verdiğiniz bir anket bitti","status.show_more":"Daha fazla göster","status.reblog":"Boostla","status.favourite":"Favorilere ekle","notifications.group":"{count} bildirim"},uk:{"notification.favourite":"{name} вподобав(-ла) ваш допис","notification.follow":"{name} підписався(-лась) на Вас","notification.mention":"{name} згадав(-ла) Вас","notification.reblog":"{name} передмухнув(-ла) Ваш допис","notification.poll":"A poll you have voted in has ended","status.show_more":"Розгорнути","status.reblog":"Передмухнути","status.favourite":"Подобається","notifications.group":"{count} сповіщень"},"zh-CN":{"notification.favourite":"{name} 收藏了你的嘟文","notification.follow":"{name} 开始关注你","notification.mention":"{name} 提及你","notification.reblog":"{name} 转嘟了你的嘟文","notification.poll":"A poll you have voted in has ended","status.show_more":"显示内容","status.reblog":"转嘟","status.favourite":"收藏","notifications.group":"{count} 条通知"},"zh-HK":{"notification.favourite":"{name} 收藏了你的文章","notification.follow":"{name} 開始關注你","notification.mention":"{name} 提及你","notification.reblog":"{name} 轉推你的文章","notification.poll":"A poll you have voted in has ended","status.show_more":"顯示更多","status.reblog":"轉推","status.favourite":"收藏","notifications.group":"{count} 條通知"},"zh-TW":{"notification.favourite":"{name} 把你的嘟文加入了最愛","notification.follow":"{name} 關注了你","notification.mention":"{name} 提到了你","notification.reblog":"{name}轉嘟了你的嘟文","notification.poll":"您投過的投票已經結束","status.show_more":"顯示更多","status.reblog":"轉嘟","status.favourite":"最愛","notifications.group":"{count} 條通知"}}},function(t,o,n){"use strict";var i,e,a;if(i=ExtendableEvent.prototype.waitUntil,e=FetchEvent.prototype.respondWith,a=new WeakMap,ExtendableEvent.prototype.waitUntil=function(t){var n=this,e=a.get(n);if(!e)return e=[Promise.resolve(t)],a.set(n,e),i.call(n,Promise.resolve().then(function t(){var o=e.length;return Promise.all(e.map(function(t){return t.catch(function(){})})).then(function(){return e.length!=o?t():(a.delete(n),Promise.all(e))})}));e.push(Promise.resolve(t))},FetchEvent.prototype.respondWith=function(t){return this.waitUntil(t),e.call(this,t)},void 0===r)var r=!1;function P(n,e){return caches.match(n,{cacheName:e}).then(function(t){return s(t)?t:u(t).then(function(o){return caches.open(e).then(function(t){return t.put(n,o)}).then(function(){return o})})}).catch(function(){})}function s(t){return!t||!t.redirected||!t.ok||"opaqueredirect"===t.type}function u(o){return s(o)?Promise.resolve(o):("body"in o?Promise.resolve(o.body):o.blob()).then(function(t){return new Response(t,{headers:o.headers,status:o.status})})}function O(t,o){o.forEach(function(t){})}!function(p,t){var m=t.cacheMaps,d=t.navigationPreload,n=p.strategy,h=p.responseStrategy,v=p.assets,g=p.hashesMap,b=p.externals,w=p.prefetchRequest||{credentials:"same-origin",mode:"cors"},i=p.name,o=p.version,y=i+":"+o,_=i+"$preload",a="__offline_webpack__data";Object.keys(v).forEach(function(t){v[t]=v[t].map(function(t){var o=new URL(t,location);return o.hash="",-1===b.indexOf(t)&&(o.search=""),o.toString()})}),g=Object.keys(g).reduce(function(t,o){var n=new URL(g[o],location);return n.search="",n.hash="",t[o]=n.toString(),t},{}),b=b.map(function(t){var o=new URL(t,location);return o.hash="",o.toString()});var j=[].concat(v.main,v.additional,v.optional);function k(o){var n=v[o];return caches.open(y).then(function(t){return x(t,n,{bust:p.version,request:w,failAll:"main"===o})}).then(function(){O(0,n)}).catch(function(t){throw t})}function e(m){return caches.keys().then(function(t){for(var o=t.length,n=void 0;o--&&0!==(n=t[o]).indexOf(i););if(n){var e=void 0;return caches.open(n).then(function(t){return(e=t).match(new URL(a,location).toString())}).then(function(t){if(t)return Promise.all([e,e.keys(),t.json()])})}}).then(function(t){if(!t)return k(m);var n=t[0],o=t[1],e=t[2],i=e.hashmap,a=e.version;if(!e.hashmap||a===p.version)return k(m);var r=Object.keys(i).map(function(t){return i[t]}),s=o.map(function(t){var o=new URL(t.url);return o.search="",o.hash="",o.toString()}),u=v[m],c=[],l=u.filter(function(t){return-1===s.indexOf(t)||-1===r.indexOf(t)});Object.keys(g).forEach(function(t){var o=g[t];if(-1!==u.indexOf(o)&&-1===l.indexOf(o)&&-1===c.indexOf(o)){var n=i[t];n&&-1!==s.indexOf(n)?c.push([n,o]):l.push(o)}}),O(0,l),O(0,c);var f=Promise.all(c.map(function(o){return n.match(o[0]).then(function(t){return[o[1],t]})}));return caches.open(y).then(function(o){var t=f.then(function(t){return Promise.all(t.map(function(t){return o.put(t[0],t[1])}))});return Promise.all([t,x(o,l,{bust:p.version,request:w,failAll:"main"===m,deleteFirst:"main"!==m})])})})}function r(){return caches.keys().then(function(t){var o=t.map(function(t){if(0===t.indexOf(i)&&0!==t.indexOf(y))return caches.delete(t)});return Promise.all(o)})}function s(){return caches.open(y).then(function(t){var o=new Response(JSON.stringify({version:p.version,hashmap:g}));return t.put(new URL(a,location).toString(),o)})}self.addEventListener("install",function(t){var o=void 0;o="changed"===n?e("main"):k("main"),t.waitUntil(o)}),self.addEventListener("activate",function(t){var o=function(){if(!v.additional.length)return Promise.resolve();return("changed"===n?e("additional"):k("additional")).catch(function(t){})}();o=(o=(o=o.then(s)).then(r)).then(function(){if(self.clients&&self.clients.claim)return self.clients.claim()}),d&&self.registration.navigationPreload&&(o=Promise.all([o,self.registration.navigationPreload.enable()])),t.waitUntil(o)}),self.addEventListener("fetch",function(t){if("GET"===t.request.method&&("only-if-cached"!==t.request.cache||"same-origin"===t.request.mode)){var o=new URL(t.request.url);o.hash="";var n=o.toString();-1===b.indexOf(n)&&(o.search="",n=o.toString());var e=-1!==j.indexOf(n),i=n;if(!e){var a=function(t){var o,n=t.url,e=new URL(n),i=void 0;i="navigate"===(o=t).mode||o.headers.get("Upgrade-Insecure-Requests")||-1!==(o.headers.get("Accept")||"").indexOf("text/html")?"navigate":e.origin===location.origin?"same-origin":"cross-origin";for(var a=0;a<m.length;a++){var r=m[a];if(r&&(!r.requestTypes||-1!==r.requestTypes.indexOf(i))){var s=void 0;if((s="function"==typeof r.match?r.match(e,t):n.replace(r.match,r.to))&&s!==n)return s}}}(t.request);a&&(i=a,e=!0)}if(e){var r,s,u,c,l=void 0;l="network-first"===h?(c=i,F(t).then(function(t){if(t.ok)return t;throw t}).catch(function(o){return P(c,y).then(function(t){if(t)return t;if(o instanceof Response)return o;throw o})})):(s=n,u=i,function(t){if(d&&"function"==typeof d.map&&t.preloadResponse&&"navigate"===t.request.mode){var o=d.map(new URL(t.request.url),t.request);o&&function(t,o){var n=new URL(t,location),e=o.preloadResponse;A.set(e,{url:n,response:e});var i=function(){return A.has(e)},a=e.then(function(t){if(t&&i()){var o=t.clone();return caches.open(_).then(function(t){if(i())return t.put(n,o).then(function(){if(!i())return caches.open(_).then(function(t){return t.delete(n)})})})}});o.waitUntil(a)}(o,t)}}(r=t),P(u,y).then(function(t){return t||fetch(r.request).then(function(t){return t.ok&&u===s&&(o=t.clone(),n=caches.open(y).then(function(t){return t.put(s,o)}).then(function(){}),r.waitUntil(n)),t;var o,n})})),t.respondWith(l)}else{if("navigate"===t.request.mode&&!0===d)return void t.respondWith(F(t));if(d){var f=function(o){var t=new URL(o.request.url);if(self.registration.navigationPreload&&d&&d.test&&d.test(t,o.request)){var n=function(n){if(A){var e=void 0,i=void 0;return A.forEach(function(t,o){t.url.href===n.href&&(e=t.response,i=o)}),e?(A.delete(i),e):void 0}}(t),e=o.request;return n?(o.waitUntil(caches.open(_).then(function(t){return t.delete(e)})),n):P(e,_).then(function(t){return t&&o.waitUntil(caches.open(_).then(function(t){return t.delete(e)})),t||fetch(o.request)})}}(t);if(f)return void t.respondWith(f)}}}}),self.addEventListener("message",function(t){var o=t.data;if(o)switch(o.action){case"skipWaiting":self.skipWaiting&&self.skipWaiting()}});var A=new Map;function x(e,i,t){var a=t.bust,n=!1!==t.failAll,o=!0===t.deleteFirst,r=t.request||{credentials:"omit",mode:"cors"},s=Promise.resolve();return o&&(s=Promise.all(i.map(function(t){return e.delete(t).catch(function(){})}))),Promise.all(i.map(function(t){var o,n,e;return a&&(n=a,e=-1!==(o=t).indexOf("?"),t=o+(e?"&":"?")+"__uncache="+encodeURIComponent(n)),fetch(t,r).then(u).then(function(t){return t.ok?{response:t}:{error:!0}},function(){return{error:!0}})})).then(function(o){return n&&o.some(function(t){return t.error})?Promise.reject(new Error("Wrong response status")):(n||(o=o.filter(function(t){return!t.error})),s.then(function(){var t=o.map(function(t,o){var n=t.response;return e.put(i[o],n)});return Promise.all(t)}))})}function F(o){return o.preloadResponse&&!0===d?o.preloadResponse.then(function(t){return t||fetch(o.request)}):fetch(o.request)}}(__wpo,{loaders:{},cacheMaps:[],navigationPreload:!1}),t.exports=n(28)},function(t,o,n){var e=n(7);t.exports=function(t){return null==t?"":e(t)}},function(t,o,n){var e=n(0),i=n(11),a=n(12),r=n(13),s=1/0,u=e?e.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(o){if("string"==typeof o)return o;if(a(o))return i(o,t)+"";if(r(o))return c?c.call(o):"";var n=o+"";return"0"==n&&1/o==-s?"-0":n}},function(t,o,n){var e=n(9),i="object"==typeof self&&self&&self.Object===Object&&self,a=e||i||Function("return this")();t.exports=a},function(n,t,o){(function(t){var o="object"==typeof t&&t&&t.Object===Object&&t;n.exports=o}).call(this,o(10))},function(t,o){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,o){t.exports=function(t,o){for(var n=-1,e=null==t?0:t.length,i=Array(e);++n<e;)i[n]=o(t[n],n,t);return i}},function(t,o){var n=Array.isArray;t.exports=n},function(t,o,n){var e=n(14),i=n(17);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==e(t)}},function(t,o,n){var e=n(0),i=n(15),a=n(16),r=e?e.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?i(t):a(t)}},function(t,o,n){var e=n(0),i=Object.prototype,a=i.hasOwnProperty,r=i.toString,s=e?e.toStringTag:void 0;t.exports=function(t){var o=a.call(t,s),n=t[s];try{var e=!(t[s]=void 0)}catch(t){}var i=r.call(t);return e&&(o?t[s]=n:delete t[s]),i}},function(t,o){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,o){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,o,n){var e=n(19)({"&":"&","<":"<",">":">",""":'"',"'":"'"});t.exports=e},function(t,o){t.exports=function(o){return function(t){return null==o?void 0:o[t]}}},function(t,o,n){"use strict";var e=n(21),i=n(26);e.default.__addLocaleData(i.default),e.default.defaultLocale="en",o.default=e.default},function(t,o,n){"use strict";var c=n(1),s=n(22),i=n(23),e=n(24);function u(o,t,n){var e="string"==typeof o?u.__parse(o):o;if(!e||"messageFormatPattern"!==e.type)throw new TypeError("A message must be provided as a String or AST.");n=this._mergeFormats(u.formats,n),s.defineProperty(this,"_locale",{value:this._resolveLocale(t)});var i=this._findPluralRuleFunction(this._locale),a=this._compilePattern(e,t,n,i),r=this;this.format=function(t){try{return r._format(a,t)}catch(t){throw t.variableId?new Error("The intl string context variable '"+t.variableId+"' was not provided to the string '"+o+"'"):t}}}o.default=u,s.defineProperty(u,"formats",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),s.defineProperty(u,"__localeData__",{value:s.objCreate(null)}),s.defineProperty(u,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");u.__localeData__[t.locale.toLowerCase()]=t}}),s.defineProperty(u,"__parse",{value:e.default.parse}),s.defineProperty(u,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),u.prototype.resolvedOptions=function(){return{locale:this._locale}},u.prototype._compilePattern=function(t,o,n,e){return new i.default(o,n,e).compile(t)},u.prototype._findPluralRuleFunction=function(t){for(var o=u.__localeData__,n=o[t.toLowerCase()];n;){if(n.pluralRuleFunction)return n.pluralRuleFunction;n=n.parentLocale&&o[n.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+t)},u.prototype._format=function(t,o){var n,e,i,a,r,s,u="";for(n=0,e=t.length;n<e;n+=1)if("string"!=typeof(i=t[n])){if(a=i.id,!o||!c.hop.call(o,a))throw(s=new Error("A value must be provided for: "+a)).variableId=a,s;r=o[a],i.options?u+=this._format(i.getOption(r),o):u+=i.format(r)}else u+=i;return u},u.prototype._mergeFormats=function(t,o){var n,e,i={};for(n in t)c.hop.call(t,n)&&(i[n]=e=s.objCreate(t[n]),o&&c.hop.call(o,n)&&c.extend(e,o[n]));return i},u.prototype._resolveLocale=function(t){"string"==typeof t&&(t=[t]),t=(t||[]).concat(u.defaultLocale);var o,n,e,i,a=u.__localeData__;for(o=0,n=t.length;o<n;o+=1)for(e=t[o].toLowerCase().split("-");e.length;){if(i=a[e.join("-")])return i.locale;e.pop()}var r=t.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+t.join(", ")+", or the default locale: "+r)}},function(t,o,n){"use strict";var a=n(1),e=function(){try{return!!Object.defineProperty({},"a",{})}catch(t){return!1}}(),r=(!e&&Object.prototype.__defineGetter__,e?Object.defineProperty:function(t,o,n){"get"in n&&t.__defineGetter__?t.__defineGetter__(o,n.get):(!a.hop.call(t,o)||"value"in n)&&(t[o]=n.value)}),i=Object.create||function(t,o){var n,e;function i(){}for(e in i.prototype=t,n=new i,o)a.hop.call(o,e)&&r(n,e,o[e]);return n};o.defineProperty=r,o.objCreate=i},function(t,o,n){"use strict";function e(t,o,n){this.locales=t,this.formats=o,this.pluralFn=n}function r(t){this.id=t}function s(t,o,n,e,i){this.id=t,this.useOrdinal=o,this.offset=n,this.options=e,this.pluralFn=i}function i(t,o,n,e){this.id=t,this.offset=o,this.numberFormat=n,this.string=e}function u(t,o){this.id=t,this.options=o}(o.default=e).prototype.compile=function(t){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(t)},e.prototype.compileMessage=function(t){if(!t||"messageFormatPattern"!==t.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var o,n,e,i=t.elements,a=[];for(o=0,n=i.length;o<n;o+=1)switch((e=i[o]).type){case"messageTextElement":a.push(this.compileMessageText(e));break;case"argumentElement":a.push(this.compileArgument(e));break;default:throw new Error("Message element does not have a valid type")}return a},e.prototype.compileMessageText=function(t){return this.currentPlural&&/(^|[^\\])#/g.test(t.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new i(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,t.value)):t.value.replace(/\\#/g,"#")},e.prototype.compileArgument=function(t){var o=t.format;if(!o)return new r(t.id);var n,e=this.formats,i=this.locales,a=this.pluralFn;switch(o.type){case"numberFormat":return n=e.number[o.style],{id:t.id,format:new Intl.NumberFormat(i,n).format};case"dateFormat":return n=e.date[o.style],{id:t.id,format:new Intl.DateTimeFormat(i,n).format};case"timeFormat":return n=e.time[o.style],{id:t.id,format:new Intl.DateTimeFormat(i,n).format};case"pluralFormat":return n=this.compileOptions(t),new s(t.id,o.ordinal,o.offset,n,a);case"selectFormat":return n=this.compileOptions(t),new u(t.id,n);default:throw new Error("Message element does not have a valid format type")}},e.prototype.compileOptions=function(t){var o,n,e,i=t.format,a=i.options,r={};for(this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===i.type?t:null,o=0,n=a.length;o<n;o+=1)r[(e=a[o]).selector]=this.compileMessage(e.value);return this.currentPlural=this.pluralStack.pop(),r},r.prototype.format=function(t){return t||"number"==typeof t?"string"==typeof t?t:String(t):""},s.prototype.getOption=function(t){var o=this.options;return o["="+t]||o[this.pluralFn(t-this.offset,this.useOrdinal)]||o.other},i.prototype.format=function(t){var o=this.numberFormat.format(t-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+o).replace(/\\#/g,"#")},u.prototype.getOption=function(t){var o=this.options;return o[t]||o.other}},function(t,o,n){"use strict";(o=t.exports=n(25).default).default=o},function(t,o,n){"use strict";o.default=function(){function Dt(t,o,n,e){this.message=t,this.expected=o,this.found=n,this.location=e,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Dt)}return function(t,o){function n(){this.constructor=t}n.prototype=o.prototype,t.prototype=new n}(Dt,Error),{SyntaxError:Dt,parse:function(x){var t,o=1<arguments.length?arguments[1]:{},F={},n={start:St},e=St,i=function(t){return{type:"messageFormatPattern",elements:t,location:At()}},P=function(t){var o,n,e,i,a,r="";for(o=0,e=t.length;o<e;o+=1)for(n=0,a=(i=t[o]).length;n<a;n+=1)r+=i[n];return r},O=function(t){return{type:"messageTextElement",value:t,location:At()}},S=/^[^ \t\n\r,.+={}#]/,z={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},E="{",R={type:"literal",value:"{",description:'"{"'},q=",",L={type:"literal",value:",",description:'","'},U="}",C={type:"literal",value:"}",description:'"}"'},M=function(t,o){return{type:"argumentElement",id:t,format:o&&o[2],location:At()}},T="number",B={type:"literal",value:"number",description:'"number"'},N="date",D={type:"literal",value:"date",description:'"date"'},I="time",W={type:"literal",value:"time",description:'"time"'},V=function(t,o){return{type:t+"Format",style:o&&o[2],location:At()}},G="plural",H={type:"literal",value:"plural",description:'"plural"'},K=function(t){return{type:t.type,ordinal:!1,offset:t.offset||0,options:t.options,location:At()}},Z="selectordinal",$={type:"literal",value:"selectordinal",description:'"selectordinal"'},J=function(t){return{type:t.type,ordinal:!0,offset:t.offset||0,options:t.options,location:At()}},Q="select",X={type:"literal",value:"select",description:'"select"'},Y=function(t){return{type:"selectFormat",options:t,location:At()}},c="=",l={type:"literal",value:"=",description:'"="'},f=function(t,o){return{type:"optionalFormatPattern",selector:t,value:o,location:At()}},s="offset:",u={type:"literal",value:"offset:",description:'"offset:"'},m=function(t){return t},p=function(t,o){return{type:"pluralFormat",offset:t,options:o,location:At()}},a={type:"other",description:"whitespace"},r=/^[ \t\n\r]/,d={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},h={type:"other",description:"optionalWhitespace"},v=/^[0-9]/,g={type:"class",value:"[0-9]",description:"[0-9]"},b=/^[0-9a-f]/i,w={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},y="0",_={type:"literal",value:"0",description:'"0"'},j=/^[1-9]/,k={type:"class",value:"[1-9]",description:"[1-9]"},A=function(t){return parseInt(t,10)},tt=/^[^{}\\\0-\x1F\7f \t\n\r]/,ot={type:"class",value:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F\\x7f \\t\\n\\r]"},nt="\\\\",et={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},it=function(){return"\\"},at="\\#",rt={type:"literal",value:"\\#",description:'"\\\\#"'},st=function(){return"\\#"},ut="\\{",ct={type:"literal",value:"\\{",description:'"\\\\{"'},lt=function(){return"{"},ft="\\}",mt={type:"literal",value:"\\}",description:'"\\\\}"'},pt=function(){return"}"},dt="\\u",ht={type:"literal",value:"\\u",description:'"\\\\u"'},vt=function(t){return String.fromCharCode(parseInt(t,16))},gt=function(t){return t.join("")},bt=0,wt=0,yt=[{line:1,column:1,seenCR:!1}],_t=0,jt=[],kt=0;if("startRule"in o){if(!(o.startRule in n))throw new Error("Can't start parsing from rule \""+o.startRule+'".');e=n[o.startRule]}function At(){return Ft(wt,bt)}function xt(t){var o,n,e=yt[t];if(e)return e;for(o=t-1;!yt[o];)o--;for(e={line:(e=yt[o]).line,column:e.column,seenCR:e.seenCR};o<t;)n=x.charAt(o),e.seenCR="\n"===n?(e.seenCR||e.line++,!(e.column=1)):"\r"===n||"\u2028"===n||"\u2029"===n?(e.line++,e.column=1,!0):(e.column++,!1),o++;return yt[t]=e}function Ft(t,o){var n=xt(t),e=xt(o);return{start:{offset:t,line:n.line,column:n.column},end:{offset:o,line:e.line,column:e.column}}}function Pt(t){bt<_t||(_t<bt&&(_t=bt,jt=[]),jt.push(t))}function Ot(t,o,n,e){return null!==o&&function(t){var o=1;for(t.sort(function(t,o){return t.description<o.description?-1:t.description>o.description?1:0});o<t.length;)t[o-1]===t[o]?t.splice(o,1):o++}(o),new Dt(null!==t?t:function(t,o){var n,e=new Array(t.length);for(n=0;n<t.length;n++)e[n]=t[n].description;return"Expected "+(1<t.length?e.slice(0,-1).join(", ")+" or "+e[t.length-1]:e[0])+" but "+(o?'"'+function(t){function o(t){return t.charCodeAt(0).toString(16).toUpperCase()}return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(t){return"\\x0"+o(t)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(t){return"\\x"+o(t)}).replace(/[\u0100-\u0FFF]/g,function(t){return"\\u0"+o(t)}).replace(/[\u1000-\uFFFF]/g,function(t){return"\\u"+o(t)})}(o)+'"':"end of input")+" found."}(o,n),o,n,e)}function St(){return zt()}function zt(){var t,o,n;for(t=bt,o=[],n=Et();n!==F;)o.push(n),n=Et();return o!==F&&(wt=t,o=i(o)),t=o}function Et(){var t,o,n,e,i,a,r,s,u,c,l,f,m,p,d,h,v,g,b,w,y,_,j,k,A;return k=bt,(A=function(){var t,o,n,e,i,a;if(o=[],n=t=bt,(n=(e=Ut())!==F&&(i=Nt())!==F&&(a=Ut())!==F?e=[e,i,a]:(bt=n,F))!==F)for(;n!==F;)o.push(n),n=bt,e=Ut(),n=e!==F&&(i=Nt())!==F&&(a=Ut())!==F?e=[e,i,a]:(bt=n,F);else o=F;return o!==F&&(wt=t,o=P(o)),(t=o)===F&&(t=bt,o=Lt(),t=o!==F?x.substring(t,bt):o),t}())!==F&&(wt=k,A=O(A)),(t=k=A)===F&&(o=bt,123===x.charCodeAt(bt)?(n=E,bt++):(n=F,0===kt&&Pt(R)),t=o=n!==F&&Ut()!==F&&(e=function(){var t,o,n;if((t=Tt())===F){if(t=bt,o=[],S.test(x.charAt(bt))?(n=x.charAt(bt),bt++):(n=F,0===kt&&Pt(z)),n!==F)for(;n!==F;)o.push(n),S.test(x.charAt(bt))?(n=x.charAt(bt),bt++):(n=F,0===kt&&Pt(z));else o=F;t=o!==F?x.substring(t,bt):o}return t}())!==F&&Ut()!==F?(i=bt,44===x.charCodeAt(bt)?(a=q,bt++):(a=F,0===kt&&Pt(L)),(i=a!==F&&(r=Ut())!==F?(g=bt,x.substr(bt,6)===T?(b=T,bt+=6):(b=F,0===kt&&Pt(B)),b===F&&(x.substr(bt,4)===N?(b=N,bt+=4):(b=F,0===kt&&Pt(D)),b===F&&(x.substr(bt,4)===I?(b=I,bt+=4):(b=F,0===kt&&Pt(W)))),(u=g=b!==F&&Ut()!==F?(w=bt,44===x.charCodeAt(bt)?(y=q,bt++):(y=F,0===kt&&Pt(L)),(w=y!==F&&(_=Ut())!==F&&(j=Nt())!==F?y=[y,_,j]:(bt=w,F))===F&&(w=null),w!==F?(wt=g,b=V(b,w)):(bt=g,F)):(bt=g,F))===F&&(p=bt,x.substr(bt,6)===G?(d=G,bt+=6):(d=F,0===kt&&Pt(H)),(u=p=d!==F&&Ut()!==F?(44===x.charCodeAt(bt)?(h=q,bt++):(h=F,0===kt&&Pt(L)),h!==F&&Ut()!==F&&(v=qt())!==F?(wt=p,d=K(v)):(bt=p,F)):(bt=p,F))===F)&&(c=bt,x.substr(bt,13)===Z?(l=Z,bt+=13):(l=F,0===kt&&Pt($)),(u=c=l!==F&&Ut()!==F?(44===x.charCodeAt(bt)?(f=q,bt++):(f=F,0===kt&&Pt(L)),f!==F&&Ut()!==F&&(m=qt())!==F?(wt=c,l=J(m)):(bt=c,F)):(bt=c,F))===F)&&(u=function(){var t,o,n,e,i;if(t=bt,x.substr(bt,6)===Q?(o=Q,bt+=6):(o=F,0===kt&&Pt(X)),o!==F)if(Ut()!==F)if(44===x.charCodeAt(bt)?(n=q,bt++):(n=F,0===kt&&Pt(L)),n!==F)if(Ut()!==F){if(e=[],(i=Rt())!==F)for(;i!==F;)e.push(i),i=Rt();else e=F;t=e!==F?(wt=t,o=Y(e)):(bt=t,F)}else bt=t,t=F;else bt=t,t=F;else bt=t,t=F;else bt=t,t=F;return t}()),(s=u)!==F?a=[a,r,s]:(bt=i,F)):(bt=i,F))===F&&(i=null),i!==F&&(a=Ut())!==F?(125===x.charCodeAt(bt)?(r=U,bt++):(r=F,0===kt&&Pt(C)),r!==F?(wt=o,n=M(e,i)):(bt=o,F)):(bt=o,F)):(bt=o,F)),t}function Rt(){var t,o,n,e,i,a,r,s,u;return t=bt,t=Ut()!==F?(r=a=bt,61===x.charCodeAt(bt)?(s=c,bt++):(s=F,0===kt&&Pt(l)),(a=(r=s!==F&&(u=Tt())!==F?s=[s,u]:(bt=r,F))!==F?x.substring(a,bt):r)===F&&(a=Nt()),(o=a)!==F&&Ut()!==F?(123===x.charCodeAt(bt)?(n=E,bt++):(n=F,0===kt&&Pt(R)),n!==F&&Ut()!==F&&(e=zt())!==F&&Ut()!==F?(125===x.charCodeAt(bt)?(i=U,bt++):(i=F,0===kt&&Pt(C)),i!==F?(wt=t,f(o,e)):(bt=t,F)):(bt=t,F)):(bt=t,F)):(bt=t,F)}function qt(){var t,o,n,e,i,a,r;if(i=t=bt,x.substr(bt,7)===s?(a=s,bt+=7):(a=F,0===kt&&Pt(u)),(o=i=a!==F&&Ut()!==F&&(r=Tt())!==F?(wt=i,a=m(r)):(bt=i,F))===F&&(o=null),o!==F)if(Ut()!==F){if(n=[],(e=Rt())!==F)for(;e!==F;)n.push(e),e=Rt();else n=F;t=n!==F?(wt=t,o=p(o,n)):(bt=t,F)}else bt=t,t=F;else bt=t,t=F;return t}function Lt(){var t,o;if(kt++,t=[],r.test(x.charAt(bt))?(o=x.charAt(bt),bt++):(o=F,0===kt&&Pt(d)),o!==F)for(;o!==F;)t.push(o),r.test(x.charAt(bt))?(o=x.charAt(bt),bt++):(o=F,0===kt&&Pt(d));else t=F;return kt--,t===F&&(o=F,0===kt&&Pt(a)),t}function Ut(){var t,o,n;for(kt++,t=bt,o=[],n=Lt();n!==F;)o.push(n),n=Lt();return t=o!==F?x.substring(t,bt):o,kt--,t===F&&(o=F,0===kt&&Pt(h)),t}function Ct(){var t;return v.test(x.charAt(bt))?(t=x.charAt(bt),bt++):(t=F,0===kt&&Pt(g)),t}function Mt(){var t;return b.test(x.charAt(bt))?(t=x.charAt(bt),bt++):(t=F,0===kt&&Pt(w)),t}function Tt(){var t,o,n,e,i,a;if(t=bt,48===x.charCodeAt(bt)?(o=y,bt++):(o=F,0===kt&&Pt(_)),o===F){if(n=o=bt,j.test(x.charAt(bt))?(e=x.charAt(bt),bt++):(e=F,0===kt&&Pt(k)),e!==F){for(i=[],a=Ct();a!==F;)i.push(a),a=Ct();n=i!==F?e=[e,i]:(bt=n,F)}else bt=n,n=F;o=n!==F?x.substring(o,bt):n}return o!==F&&(wt=t,o=A(o)),t=o}function Bt(){var t,o,n,e,i,a,r,s;return tt.test(x.charAt(bt))?(t=x.charAt(bt),bt++):(t=F,0===kt&&Pt(ot)),t===F&&(t=bt,x.substr(bt,2)===nt?(o=nt,bt+=2):(o=F,0===kt&&Pt(et)),o!==F&&(wt=t,o=it()),(t=o)===F&&(t=bt,x.substr(bt,2)===at?(o=at,bt+=2):(o=F,0===kt&&Pt(rt)),o!==F&&(wt=t,o=st()),(t=o)===F&&(t=bt,x.substr(bt,2)===ut?(o=ut,bt+=2):(o=F,0===kt&&Pt(ct)),o!==F&&(wt=t,o=lt()),(t=o)===F&&(t=bt,x.substr(bt,2)===ft?(o=ft,bt+=2):(o=F,0===kt&&Pt(mt)),o!==F&&(wt=t,o=pt()),(t=o)===F&&(t=bt,x.substr(bt,2)===dt?(o=dt,bt+=2):(o=F,0===kt&&Pt(ht)),t=o!==F?(e=n=bt,(n=(e=(i=Mt())!==F&&(a=Mt())!==F&&(r=Mt())!==F&&(s=Mt())!==F?i=[i,a,r,s]:(bt=e,F))!==F?x.substring(n,bt):e)!==F?(wt=t,o=vt(n)):(bt=t,F)):(bt=t,F)))))),t}function Nt(){var t,o,n;if(t=bt,o=[],(n=Bt())!==F)for(;n!==F;)o.push(n),n=Bt();else o=F;return o!==F&&(wt=t,o=gt(o)),t=o}if((t=e())!==F&&bt===x.length)return t;throw t!==F&&bt<x.length&&Pt({type:"end",description:"end of input"}),Ot(null,jt,_t<x.length?x.charAt(_t):null,_t<x.length?Ft(_t,_t+1):Ft(_t,_t))}}}()},function(t,o,n){"use strict";o.default={locale:"en",pluralRuleFunction:function(t,o){var n=String(t).split("."),e=!n[1],i=Number(n[0])==t,a=i&&n[0].slice(-1),r=i&&n[0].slice(-2);return o?1==a&&11!=r?"one":2==a&&12!=r?"two":3==a&&13!=r?"few":"other":1==t&&e?"one":"other"}}},function(t,o){},function(t,o,n){"use strict";n.r(o);var e=n(2),i=n.n(e),a=n(3),r=n.n(a),s=n(4),u=n.n(s),c=function(e){return self.registration.getNotifications().then(function(t){if(5<=t.length){var o={title:m("notifications.group",e.data.preferred_locale,{count:t.length+1}),body:t.sort(function(t,o){return t.timestamp<o.timestamp}).map(function(t){return t.title}).join("\n"),badge:"/badge.png",icon:"/android-chrome-192x192.png",tag:"tag",data:{url:new URL("/web/notifications",self.location).href,count:t.length+1,preferred_locale:e.data.preferred_locale}};return t.forEach(function(t){return t.close()}),self.registration.showNotification(o.title,o)}if(1!==t.length||"tag"!==t[0].tag)return self.registration.showNotification(e.title,e);var n=f(t[0]);return n.title=m("notifications.group",e.data.preferred_locale,{count:n.data.count+1}),n.body=e.title+"\n"+n.body,n.data=function(i){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},o=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(a).filter(function(t){return Object.getOwnPropertyDescriptor(a,t).enumerable}))),o.forEach(function(t){var o,n,e;o=i,e=a[n=t],n in o?Object.defineProperty(o,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[n]=e})}return i}({},n.data,{count:n.data.count+1}),self.registration.showNotification(n.title,n)})},l=function(t,o,n){var e=new URL(t,self.location).href;return fetch(e,{headers:{Authorization:"Bearer "+n,"Content-Type":"application/json"},method:o,credentials:"include"}).then(function(t){if(t.ok)return t;throw new Error(t.status)}).then(function(t){return t.json()})},f=function(t){var o,n={};for(o in t)n[o]=t[o];return n},m=function(t,o,n){return void 0===n&&(n={}),new r.a(u.a[o][t],o).format(n)},p=function(t){return i()(t.replace(/<br\s*\/?>/g,"\n").replace(/<\/p><p>/g,"\n\n").replace(/<[^>]*>/g,""))},d=function(t){return{action:"expand",icon:"/web-push-icon_expand.png",title:m("status.show_more",t)}},h=function(t){return{action:"reblog",icon:"/web-push-icon_reblog.png",title:m("status.reblog",t)}},v=function(t){return{action:"favourite",icon:"/web-push-icon_favourite.png",title:m("status.favourite",t)}},g=function(t){var o=t.find(function(t){return t.focused}),n=t.find(function(t){return"visible"===t.visibilityState});return o||n||t[0]},b=function(t,o){var n=f(t);return n.actions=n.actions.filter(function(t){return t.action!==o}),self.registration.showNotification(n.title,n)};self.addEventListener("push",function(t){var o=t.data.json(),n=o.access_token,e=o.notification_id,i=o.preferred_locale,a=o.title,r=o.body,s=o.icon;t.waitUntil(l("/api/v1/notifications/"+e,"get",n).then(function(t){var o={};return o.title=m("notification."+t.type,i,{name:0<t.account.display_name.length?t.account.display_name:t.account.username}),o.body=t.status&&p(t.status.content),o.icon=t.account.avatar_static,o.timestamp=t.created_at&&new Date(t.created_at),o.tag=t.id,o.badge="/badge.png",o.image=t.status&&0<t.status.media_attachments.length&&t.status.media_attachments[0].preview_url||void 0,o.data={access_token:n,preferred_locale:i,id:t.status?t.status.id:t.account.id,url:t.status?"/web/statuses/"+t.status.id:"/web/accounts/"+t.account.id},t.status&&t.status.spoiler_text||t.status.sensitive?(o.data.hiddenBody=p(t.status.content),o.data.hiddenImage=0<t.status.media_attachments.length&&t.status.media_attachments[0].preview_url,t.status.spoiler_text&&(o.body=t.status.spoiler_text),o.image=void 0,o.actions=[d(i)]):"mention"===t.type&&(o.actions=[h(i),v(i)]),c(o)}).catch(function(){return c({title:a,body:r,icon:s,tag:e,timestamp:new Date,badge:"/badge.png",data:{access_token:n,preferred_locale:i,url:"/web/notifications"}})}))}),self.addEventListener("notificationclick",function(s){var t=new Promise(function(t,o){if(s.action)if("expand"===s.action)t((a=s.notification,(r=f(a)).body=r.data.hiddenBody,r.image=r.data.hiddenImage,r.actions=[h(a.data.preferred_locale),v(a.data.preferred_locale)],self.registration.showNotification(r.title,r)));else if("reblog"===s.action){var n=s.notification.data;t(l("/api/v1/statuses/"+n.id+"/reblog","post",n.access_token).then(function(){return b(s.notification,"reblog")}))}else if("favourite"===s.action){var e=s.notification.data;t(l("/api/v1/statuses/"+e.id+"/favourite","post",e.access_token).then(function(){return b(s.notification,"favourite")}))}else o("Unknown action: "+s.action);else s.notification.close(),t((i=s.notification.data.url,self.clients.matchAll({type:"window"}).then(function(t){if(0!==t.length){var o=t.filter(function(t){return/\/web\//.test(t.url)});if(0!==o.length){var n=g(o),e=new URL(i,self.location).pathname;if(e.startsWith("/web/"))return n.focus().then(function(t){return t.postMessage({type:"navigate",path:e.slice("/web/".length-1)})})}else if("navigate"in t[0])return g(t).navigate(i).then(function(t){return t.focus()})}return self.clients.openWindow(i)})));var i,a,r});s.waitUntil(t)});function w(){return caches.open("mastodon-web")}function y(){return fetch("/web",{credentials:"include",redirect:"manual"})}self.addEventListener("install",function(t){t.waitUntil(Promise.all([w(),y()]).then(function(t){var o=t[0],n=t[1];return o.put("/web",n)}))}),self.addEventListener("activate",function(t){t.waitUntil(self.clients.claim())}),self.addEventListener("fetch",function(t){var o=new URL(t.request.url);if(o.pathname.startsWith("/web")){if(o.pathname.startsWith("/web/login"))return;var n=y(),e=w();t.respondWith(n.then(function(t){var o=t.clone();return e.then(function(t){return t.put("/web",o)}).catch(),t},function(){return e.then(function(t){return t.match("/web")})}))}else if("/auth/sign_out"===o.pathname){var i=fetch(t.request),a=w();t.respondWith(i.then(function(t){return t.ok||"opaqueredirect"===t.type?Promise.all([a.then(function(t){return t.delete("/web")}),indexedDB.deleteDatabase("mastodon")]).then(function(){return t}):t}))}})}]);
\ No newline at end of file