diff --git a/CHANGELOG.md b/CHANGELOG.md index 411b0b46d..772bd34e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - **Breaking:** Elixir >=1.8 is now required (was >= 1.7) +- **Breaking:** attachment links (`config :pleroma, :instance, no_attachment_links` and `config :pleroma, Pleroma.Upload, link_name`) disabled by default - Replaced [pleroma_job_queue](https://git.pleroma.social/pleroma/pleroma_job_queue) and `Pleroma.Web.Federator.RetryQueue` with [Oban](https://github.com/sorentwo/oban) (see [`docs/config.md`](docs/config.md) on migrating customized worker / retry settings) - Introduced [quantum](https://github.com/quantum-elixir/quantum-core) job scheduler - Enabled `:instance, extended_nickname_format` in the default config @@ -62,6 +63,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Pleroma API: `POST /api/v1/pleroma/conversations/read` to mark all conversations as read - Mastodon API: Add `/api/v1/markers` for managing timeline read markers - Mastodon API: Add the `recipients` parameter to `GET /api/v1/conversations` +- Configuration: `feed` option for user atom feed. ### Fixed diff --git a/README.md b/README.md index dd49822e9..7fc1fd381 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,43 @@ -# Pleroma + -**Note**: This readme as well as complete documentation is also available at +## About -## About Pleroma +Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub. What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed. -Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support the same federation standards (OStatus and ActivityPub). What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement either OStatus or ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed. +Pleroma is written in Elixir and uses PostgresSQL for data storage. It's efficient enough to be ran on low-power devices like Raspberry Pi (though we wouldn't recommend storing the database on the internal SD card ;) but can scale well when ran on more powerful hardware (albeit only single-node for now). -Pleroma is written in Elixir, high-performance and can run on small devices like a Raspberry Pi. +For clients it supports the [Mastodon client API](https://docs.joinmastodon.org/api/guidelines/) with Pleroma extensions (see the API section on ). -For clients it supports the [Mastodon client API](https://docs.joinmastodon.org/api/guidelines/) with Pleroma extensions (see "Pleroma's APIs and Mastodon API extensions" section on ). - -- [Client Applications for Pleroma](https://docs-develop.pleroma.social/clients.html) - -If you want to run your own server, feel free to contact us at @lain@pleroma.soykaf.com or in our dev chat at #pleroma on freenode or via matrix at . +- [Client Applications for Pleroma](https://docs-develop.pleroma.social/backend/clients/) ## Installation -**Note:** The guide below may be outdated and in most cases shouldn't be used. Instead check out our [wiki](https://docs.pleroma.social) for platform-specific installation instructions, most likely [Installing on Linux using OTP releases](https://docs.pleroma.social/otp_en.html) is the guide you need. + +### OTP releases (Recommended) +If you are running Linux (glibc or musl) on x86/arm, the recommended way to install Pleroma is by using OTP releases. OTP releases are as close as you can get to binary releases with Erlang/Elixir. The release is self-contained, and provides everything needed to boot it. The installation instructions are available [here](https://docs-develop.pleroma.social/backend/installation/otp_en/). + +### From Source +If your platform is not supported, or you just want to be able to edit the source code easily, you may install Pleroma from source. + +- [Debian-based](https://docs-develop.pleroma.social/backend/installation/debian_based_en/) +- [Debian-based (jp)](https://docs-develop.pleroma.social/backend/installation/debian_based_jp/) +- [Alpine Linux](https://docs-develop.pleroma.social/backend/installation/alpine_linux_en/) +- [Arch Linux](https://docs-develop.pleroma.social/backend/installation/arch_linux_en/) +- [Gentoo Linux](https://docs-develop.pleroma.social/backend/installation/gentoo_en/) +- [NetBSD](https://docs-develop.pleroma.social/backend/installation/netbsd_en/) +- [OpenBSD](https://docs-develop.pleroma.social/backend/installation/openbsd_en/) +- [OpenBSD (fi)](https://docs-develop.pleroma.social/backend/installation/openbsd_fi/) +- [CentOS 7](https://docs-develop.pleroma.social/backend/installation/centos7_en/) ### OS/Distro packages -Currently Pleroma is not packaged by any OS/Distros, but feel free to reach out to us at [#pleroma-dev on freenode](https://webchat.freenode.net/?channels=%23pleroma-dev) or via matrix at for assistance. If you want to change default options in your Pleroma package, please **discuss it with us first**. +Currently Pleroma is not packaged by any OS/Distros, but if you want to package it for one, we can guide you through the process on our [community channels](#community-channels). If you want to change default options in your Pleroma package, please **discuss it with us first**. ### Docker While we don’t provide docker files, other people have written very good ones. Take a look at or . -### Dependencies +## Documentation +- Latest Released revision: +- Latest Git revision: -* Postgresql version 9.6 or newer, including the contrib modules -* Elixir version 1.7 or newer. If your distribution only has an old version available, check [Elixir’s install page](https://elixir-lang.org/install.html) or use a tool like [asdf](https://github.com/asdf-vm/asdf). -* Build-essential tools - -### Configuration - -* Run `mix deps.get` to install elixir dependencies. -* Run `mix pleroma.instance gen`. This will ask you questions about your instance and generate a configuration file in `config/generated_config.exs`. Check that and copy it to either `config/dev.secret.exs` or `config/prod.secret.exs`. It will also create a `config/setup_db.psql`, which you should run as the PostgreSQL superuser (i.e., `sudo -u postgres psql -f config/setup_db.psql`). It will create the database, user, and password you gave `mix pleroma.gen.instance` earlier, as well as set up the necessary extensions in the database. PostgreSQL superuser privileges are only needed for this step. -* For these next steps, the default will be to run pleroma using the dev configuration file, `config/dev.secret.exs`. To run them using the prod config file, prefix each command at the shell with `MIX_ENV=prod`. For example: `MIX_ENV=prod mix phx.server`. Documentation for the config can be found at [`docs/config.md`](docs/config.md) in the repository, or at the "Configuration" page on -* Run `mix ecto.migrate` to run the database migrations. You will have to do this again after certain updates. -* You can check if your instance is configured correctly by running it with `mix phx.server` and checking the instance info endpoint at `/api/v1/instance`. If it shows your uri, name and email correctly, you are configured correctly. If it shows something like `localhost:4000`, your configuration is probably wrong, unless you are running a local development setup. -* The common and convenient way for adding HTTPS is by using Nginx as a reverse proxy. You can look at example Nginx configuration in `installation/pleroma.nginx`. If you need TLS/SSL certificates for HTTPS, you can look get some for free with letsencrypt: . The simplest way to obtain and install a certificate is to use [Certbot.](https://certbot.eff.org) Depending on your specific setup, certbot may be able to get a certificate and configure your web server automatically. - -## Running - -* By default, it listens on port 4000 (TCP), so you can access it on (if you are on the same machine). In case of an error it will restart automatically. - -### Frontends - -Pleroma comes with two frontends. The first one, Pleroma FE, can be reached by normally visiting the site. The other one, based on the Mastodon project, can be found by visiting the /web path of your site. - -### As systemd service (with provided .service file) - -Example .service file can be found in `installation/pleroma.service`. Copy this to `/etc/systemd/system/`. Running `systemctl enable --now pleroma.service` will run Pleroma and enable startup on boot. Logs can be watched by using `journalctl -fu pleroma.service`. - -### As OpenRC service (with provided RC file) - -Copy `installation/init.d/pleroma` to `/etc/init.d/pleroma`. You can add it to the services ran by default with: `rc-update add pleroma` - -### Standalone/run by other means - -Run `mix phx.server` in repository’s root, it will output log into stdout/stderr. - -### Using an upstream proxy for federation - -Add the following to your `dev.secret.exs` or `prod.secret.exs` if you want to proxify all http requests that Pleroma makes to an upstream proxy server: - -```elixir -config :pleroma, :http, - proxy_url: "127.0.0.1:8123" -``` - -This is useful for running Pleroma inside Tor or I2P. - -## Customization and contribution - -The [Pleroma Documentation](https://docs-develop.pleroma.social) offers manuals and guides on how to further customize your instance to your liking and how you can contribute to the project. - -## Troubleshooting - -### No incoming federation - -Check that you correctly forward the `host` header to the backend. It is needed to validate signatures. +## Community Channels +* IRC: **#pleroma** and **#pleroma-dev** on freenode, webchat is available at +* Matrix: and diff --git a/config/config.exs b/config/config.exs index 787809b27..54de8fa9f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -90,7 +90,7 @@ config :pleroma, Pleroma.Upload, uploader: Pleroma.Uploaders.Local, filters: [Pleroma.Upload.Filter.Dedupe], - link_name: true, + link_name: false, proxy_remote: false, proxy_opts: [ redirect_on_failure: false, @@ -257,7 +257,7 @@ mrf_transparency_exclusions: [], autofollowed_nicknames: [], max_pinned_statuses: 1, - no_attachment_links: false, + no_attachment_links: true, welcome_user_nickname: nil, welcome_message: nil, max_report_comment_size: 1000, @@ -276,6 +276,12 @@ external_user_synchronization: true, extended_nickname_format: false +config :pleroma, :feed, + post_title: %{ + max_length: 100, + omission: "..." + } + config :pleroma, :markup, # XXX - unfortunately, inline images must be enabled by default right now, because # of custom emoji. Issue #275 discusses defanging that somehow. diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index 3427ae419..8f609fcfd 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -6,10 +6,370 @@ Pleroma configuration works by first importing the base config (`config/config.e You shouldn't edit the base config directly to avoid breakages and merge conflicts, but it can be used as a reference if you don't understand how an option is supposed to be formatted, the latest version of it can be viewed [here](https://git.pleroma.social/pleroma/pleroma/blob/develop/config/config.exs). +## :instance +* `name`: The instance’s name. +* `email`: Email used to reach an Administrator/Moderator of the instance. +* `notify_email`: Email used for notifications. +* `description`: The instance’s description, can be seen in nodeinfo and ``/api/v1/instance``. +* `limit`: Posts character limit (CW/Subject included in the counter). +* `remote_limit`: Hard character limit beyond which remote posts will be dropped. +* `upload_limit`: File size limit of uploads (except for avatar, background, banner). +* `avatar_upload_limit`: File size limit of user’s profile avatars. +* `background_upload_limit`: File size limit of user’s profile backgrounds. +* `banner_upload_limit`: File size limit of user’s profile banners. +* `poll_limits`: A map with poll limits for **local** polls. + * `max_options`: Maximum number of options. + * `max_option_chars`: Maximum number of characters per option. + * `min_expiration`: Minimum expiration time (in seconds). + * `max_expiration`: Maximum expiration time (in seconds). +* `registrations_open`: Enable registrations for anyone, invitations can be enabled when false. +* `invites_enabled`: Enable user invitations for admins (depends on `registrations_open: false`). +* `account_activation_required`: Require users to confirm their emails before signing in. +* `federating`: Enable federation with other instances. +* `federation_incoming_replies_max_depth`: Max. depth of reply-to activities fetching on incoming federation, to prevent out-of-memory situations while fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes. +* `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it. +* `allow_relay`: Enable Pleroma’s Relay, which makes it possible to follow a whole instance. +* `rewrite_policy`: Message Rewrite Policy, either one or a list. Here are the ones available by default: + * `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`: Doesn’t modify activities (default). + * `Pleroma.Web.ActivityPub.MRF.DropPolicy`: Drops all activities. It generally doesn’t makes sense to use in production. + * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`: Restrict the visibility of activities from certains instances (See [`:mrf_simple`](#mrf_simple)). + * `Pleroma.Web.ActivityPub.MRF.TagPolicy`: Applies policies to individual users based on tags, which can be set using pleroma-fe/admin-fe/any other app that supports Pleroma Admin API. For example it allows marking posts from individual users nsfw (sensitive). + * `Pleroma.Web.ActivityPub.MRF.SubchainPolicy`: Selectively runs other MRF policies when messages match (See [`:mrf_subchain`](#mrf_subchain)). + * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`: Drops posts with non-public visibility settings (See [`:mrf_rejectnonpublic`](#mrf_rejectnonpublic)). + * `Pleroma.Web.ActivityPub.MRF.EnsureRePrepended`: Rewrites posts to ensure that replies to posts with subjects do not have an identical subject and instead begin with re:. + * `Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy`: Rejects posts from likely spambots by rejecting posts from new users that contain links. + * `Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`: Crawls attachments using their MediaProxy URLs so that the MediaProxy cache is primed. + * `Pleroma.Web.ActivityPub.MRF.MentionPolicy`: Drops posts mentioning configurable users. (See [`:mrf_mention`](#mrf_mention)). + * `Pleroma.Web.ActivityPub.MRF.VocabularyPolicy`: Restricts activities to a configured set of vocabulary. (See [`:mrf_vocabulary`](#mrf_vocabulary)). +* `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. +* `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. +* `managed_config`: Whenether the config for pleroma-fe is configured in [:frontend_configurations](#frontend_configurations) or in ``static/config.json``. +* `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML). +* `mrf_transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo). +* `mrf_transparency_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value. +* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with + older software for theses nicknames. +* `max_pinned_statuses`: The maximum number of pinned statuses. `0` will disable the feature. +* `autofollowed_nicknames`: Set to nicknames of (local) users that every new user should automatically follow. +* `no_attachment_links`: Set to true to disable automatically adding attachment link text to statuses. +* `welcome_message`: A message that will be send to a newly registered users as a direct message. +* `welcome_user_nickname`: The nickname of the local user that sends the welcome message. +* `max_report_comment_size`: The maximum size of the report comment (Default: `1000`). +* `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). Default: `false`. +* `healthcheck`: If set to true, system data will be shown on ``/api/pleroma/healthcheck``. +* `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database. +* `user_bio_length`: A user bio maximum length (default: `5000`). +* `user_name_length`: A user name maximum length (default: `100`). +* `skip_thread_containment`: Skip filter out broken threads. The default is `false`. +* `limit_to_local_content`: Limit unauthenticated users to search for local statutes and users only. Possible values: `:unauthenticated`, `:all` and `false`. The default is `:unauthenticated`. +* `max_account_fields`: The maximum number of custom fields in the user profile (default: `10`). +* `max_remote_account_fields`: The maximum number of custom fields in the remote user profile (default: `20`). +* `account_field_name_length`: An account field name maximum length (default: `512`). +* `account_field_value_length`: An account field value maximum length (default: `2048`). +* `external_user_synchronization`: Enabling following/followers counters synchronization for external users. -## Pleroma.Upload -* `uploader`: Select which `Pleroma.Uploaders` to use -* `filters`: List of `Pleroma.Upload.Filter` to use. +!!! danger + This is a Work In Progress, not usable just yet + +* `dynamic_configuration`: Allow transferring configuration to DB with the subsequent customization from Admin api. + +## Federation +### MRF policies + +!!! note + Configuring MRF policies is not enough for them to take effect. You have to enable them by specifying their module in `rewrite_policy` under [:instance](#instance) section. + +#### :mrf_simple +* `media_removal`: List of instances to remove media from. +* `media_nsfw`: List of instances to put media as NSFW(sensitive) from. +* `federated_timeline_removal`: List of instances to remove from Federated (aka The Whole Known Network) Timeline. +* `reject`: List of instances to reject any activities from. +* `accept`: List of instances to accept any activities from. +* `report_removal`: List of instances to reject reports from. +* `avatar_removal`: List of instances to strip avatars from. +* `banner_removal`: List of instances to strip banners from. + +#### :mrf_subchain +This policy processes messages through an alternate pipeline when a given message matches certain criteria. +All criteria are configured as a map of regular expressions to lists of policy modules. + +* `match_actor`: Matches a series of regular expressions against the actor field. + +Example: + +```elixir +config :pleroma, :mrf_subchain, + match_actor: %{ + ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy] + } +``` + +#### :mrf_rejectnonpublic +* `allow_followersonly`: whether to allow followers-only posts. +* `allow_direct`: whether to allow direct messages. + +#### :mrf_hellthread +* `delist_threshold`: Number of mentioned users after which the message gets delisted (the message can still be seen, but it will not show up in public timelines and mentioned users won't get notifications about it). Set to 0 to disable. +* `reject_threshold`: Number of mentioned users after which the messaged gets rejected. Set to 0 to disable. + +#### :mrf_keyword +* `reject`: A list of patterns which result in message being rejected, each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html). +* `federated_timeline_removal`: A list of patterns which result in message being removed from federated timelines (a.k.a unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html). +* `replace`: A list of tuples containing `{pattern, replacement}`, `pattern` can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html). + +#### :mrf_mention +* `actors`: A list of actors, for which to drop any posts mentioning. + +#### :mrf_vocabulary +* `accept`: A list of ActivityStreams terms to accept. If empty, all supported messages are accepted. +* `reject`: A list of ActivityStreams terms to reject. If empty, no messages are rejected. + +#### :mrf_user_allowlist + +The keys in this section are the domain names that the policy should apply to. +Each key should be assigned a list of users that should be allowed through by +their ActivityPub ID. + +An example: + +```elixir +config :pleroma, :mrf_user_allowlist, + "example.org": ["https://example.org/users/admin"] +``` + +### :activitypub +* ``unfollow_blocked``: Whether blocks result in people getting unfollowed +* ``outgoing_blocks``: Whether to federate blocks to other instances +* ``deny_follow_blocked``: Whether to disallow following an account that has blocked the user in question +* ``sign_object_fetches``: Sign object fetches with HTTP signatures + +### :fetch_initial_posts +* `enabled`: if enabled, when a new user is federated with, fetch some of their latest posts +* `pages`: the amount of pages to fetch + +## Pleroma.ScheduledActivity + +* `daily_user_limit`: the number of scheduled activities a user is allowed to create in a single day (Default: `25`) +* `total_user_limit`: the number of scheduled activities a user is allowed to create in total (Default: `300`) +* `enabled`: whether scheduled activities are sent to the job queue to be executed + +## Pleroma.ActivityExpiration + +* `enabled`: whether expired activities will be sent to the job queue to be deleted + +## Frontends + +### :frontend_configurations + +This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` and `masto_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [Pleroma-FE configuration and customization for instance administrators](/frontend/CONFIGURATION/#options). + +Frontends can access these settings at `/api/pleroma/frontend_configurations` + +To add your own configuration for PleromaFE, use it like this: + +```elixir +config :pleroma, :frontend_configurations, + pleroma_fe: %{ + theme: "pleroma-dark", + # ... see /priv/static/static/config.json for the available keys. +}, + masto_fe: %{ + showInstanceSpecificPanel: true + } +``` + +These settings **need to be complete**, they will override the defaults. + +### :assets + +This section configures assets to be used with various frontends. Currently the only option +relates to mascots on the mastodon frontend + +* `mascots`: KeywordList of mascots, each element __MUST__ contain both a `url` and a + `mime_type` key. +* `default_mascot`: An element from `mascots` - This will be used as the default mascot + on MastoFE (default: `:pleroma_fox_tan`). + +### :manifest + +This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE. + +* `icons`: Describe the icons of the app, this a list of maps describing icons in the same way as the + [spec](https://www.w3.org/TR/appmanifest/#imageresource-and-its-members) describes it. + + Example: + + ```elixir + config :pleroma, :manifest, + icons: [ + %{ + src: "/static/logo.png" + }, + %{ + src: "/static/icon.png", + type: "image/png" + }, + %{ + src: "/static/icon.ico", + sizes: "72x72 96x96 128x128 256x256" + } + ] + ``` + +* `theme_color`: Describe the theme color of the app. (Example: `"#282c37"`, `"rebeccapurple"`). +* `background_color`: Describe the background color of the app. (Example: `"#191b22"`, `"aliceblue"`). + +## :emoji +* `shortcode_globs`: Location of custom emoji files. `*` can be used as a wildcard. Example `["/emoji/custom/**/*.png"]` +* `pack_extensions`: A list of file extensions for emojis, when no emoji.txt for a pack is present. Example `[".png", ".gif"]` +* `groups`: Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname and the value the location or array of locations. `*` can be used as a wildcard. Example `[Custom: ["/emoji/*.png", "/emoji/custom/*.png"]]` +* `default_manifest`: Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download. Currently only one manifest can be added (no arrays). +* `shared_pack_cache_seconds_per_file`: When an emoji pack is shared, the archive is created and cached in + memory for this amount of seconds multiplied by the number of files. + +## :media_proxy +* `enabled`: Enables proxying of remote media to the instance’s proxy +* `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts. +* `proxy_opts`: All options defined in `Pleroma.ReverseProxy` documentation, defaults to `[max_body_length: (25*1_048_576)]`. +* `whitelist`: List of domains to bypass the mediaproxy + +## Link previews + +### Pleroma.Web.Metadata (provider) +* `providers`: a list of metadata providers to enable. Providers available: + * `Pleroma.Web.Metadata.Providers.OpenGraph` + * `Pleroma.Web.Metadata.Providers.TwitterCard` + * `Pleroma.Web.Metadata.Providers.RelMe` - add links from user bio with rel=me into the `
` as ``. + * `Pleroma.Web.Metadata.Providers.Feed` - add a link to a user's Atom feed into the `
` as ``. +* `unfurl_nsfw`: If set to `true` nsfw attachments will be shown in previews. + +### :rich_media (consumer) +* `enabled`: if enabled the instance will parse metadata from attached links to generate link previews. +* `ignore_hosts`: list of hosts which will be ignored by the metadata parser. For example `["accounts.google.com", "xss.website"]`, defaults to `[]`. +* `ignore_tld`: list TLDs (top-level domains) which will ignore for parse metadata. default is ["local", "localdomain", "lan"]. +* `parsers`: list of Rich Media parsers. + +## HTTP server + +### Pleroma.Web.Endpoint + +!!! note + `Phoenix` endpoint configuration, all configuration options can be viewed [here](https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#module-dynamic-configuration), only common options are listed here. + +* `http` - a list containing http protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here. For deployment using docker, you need to set this to `[ip: {0,0,0,0}, port: 4000]` to make pleroma accessible from other containers (such as your nginx server). + - `ip` - a tuple consisting of 4 integers + - `port` +* `url` - a list containing the configuration for generating urls, accepts + - `host` - the host without the scheme and a post (e.g `example.com`, not `https://example.com:2020`) + - `scheme` - e.g `http`, `https` + - `port` + - `path` +* `extra_cookie_attrs` - a list of `Key=Value` strings to be added as non-standard cookie attributes. Defaults to `["SameSite=Lax"]`. See the [SameSite article](https://www.owasp.org/index.php/SameSite) on OWASP for more info. + +Example: +```elixir +config :pleroma, Pleroma.Web.Endpoint, + url: [host: "example.com", port: 2020, scheme: "https"], + http: [ + port: 8080, + ip: {127, 0, 0, 1} + ] +``` + +This will make Pleroma listen on `127.0.0.1` port `8080` and generate urls starting with `https://example.com:2020` + +### :http_security +* ``enabled``: Whether the managed content security policy is enabled. +* ``sts``: Whether to additionally send a `Strict-Transport-Security` header. +* ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent. +* ``ct_max_age``: The maximum age for the `Expect-CT` header if sent. +* ``referrer_policy``: The referrer policy to use, either `"same-origin"` or `"no-referrer"`. +* ``report_uri``: Adds the specified url to `report-uri` and `report-to` group in CSP header. + +### Pleroma.Plugs.RemoteIp + +!!! warning + If your instance is not behind at least one reverse proxy, you should not enable this plug. + +`Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration. + +Available options: + +* `enabled` - Enable/disable the plug. Defaults to `false`. +* `headers` - A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Defaults to `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`. +* `proxies` - A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Defaults to `[]`. +* `reserved` - Defaults to [localhost](https://en.wikipedia.org/wiki/Localhost) and [private network](https://en.wikipedia.org/wiki/Private_network). + + +### :rate_limit + +This is an advanced feature and disabled by default. + +If your instance is behind a reverse proxy you must enable and configure [`Pleroma.Plugs.RemoteIp`](#pleroma-plugs-remoteip). + +A keyword list of rate limiters where a key is a limiter name and value is the limiter configuration. The basic configuration is a tuple where: + +* The first element: `scale` (Integer). The time scale in milliseconds. +* The second element: `limit` (Integer). How many requests to limit in the time scale provided. + +It is also possible to have different limits for unauthenticated and authenticated users: the keyword value must be a list of two tuples where the first one is a config for unauthenticated users and the second one is for authenticated. + +Supported rate limiters: + +* `:search` for the search requests (account & status search etc.) +* `:app_account_creation` for registering user accounts from the same IP address +* `:relations_actions` for actions on relations with all users (follow, unfollow) +* `:relation_id_action` for actions on relation with a specific user (follow, unfollow) +* `:statuses_actions` for create / delete / fav / unfav / reblog / unreblog actions on any statuses +* `:status_id_action` for fav / unfav or reblog / unreblog actions on the same status by the same user + +### :web_cache_ttl + +The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration. + +Available caches: + +* `:activity_pub` - activity pub routes (except question activities). Defaults to `nil` (no expiration). +* `:activity_pub_question` - activity pub routes (question activities). Defaults to `30_000` (30 seconds). + +## :hackney_pools + +Advanced. Tweaks Hackney (http client) connections pools. + +There's three pools used: + +* `:federation` for the federation jobs. + You may want this pool max_connections to be at least equal to the number of federator jobs + retry queue jobs. +* `:media` for rich media, media proxy +* `:upload` for uploaded media (if using a remote uploader and `proxy_remote: true`) + +For each pool, the options are: + +* `max_connections` - how much connections a pool can hold +* `timeout` - retention duration for connections + + +## Captcha + +### Pleroma.Captcha +* `enabled`: Whether the captcha should be shown on registration. +* `method`: The method/service to use for captcha. +* `seconds_valid`: The time in seconds for which the captcha is valid. + +### Captcha providers + +#### Pleroma.Captcha.Kocaptcha +Kocaptcha is a very simple captcha service with a single API endpoint, +the source code is here: https://github.com/koto-bank/kocaptcha. The default endpoint +`https://captcha.kotobank.ch` is hosted by the developer. + +* `endpoint`: the Kocaptcha endpoint to use. + +## Uploads + +### Pleroma.Upload +* `uploader`: Which one of the [uploaders](#uploaders) to use. +* `filters`: List of [upload filters](#upload-filters) to use. * `link_name`: When enabled Pleroma will add a `name` parameter to the url of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers when using filters like `Pleroma.Upload.Filter.Dedupe` * `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host. * `proxy_remote`: If you're using a remote uploader, Pleroma will proxy media requests instead of redirecting to it. @@ -18,34 +378,40 @@ You shouldn't edit the base config directly to avoid breakages and merge conflic !!! warning `strip_exif` has been replaced by `Pleroma.Upload.Filter.Mogrify`. -## Pleroma.Uploaders.Local -* `uploads`: Which directory to store the user-uploads in, relative to pleroma’s working directory +### Uploaders +#### Pleroma.Uploaders.Local +* `uploads`: Which directory to store the user-uploads in, relative to pleroma’s working directory. -## Pleroma.Uploaders.S3 -* `bucket`: S3 bucket name -* `bucket_namespace`: S3 bucket namespace +#### Pleroma.Uploaders.S3 +* `bucket`: S3 bucket name. +* `bucket_namespace`: S3 bucket namespace. * `public_endpoint`: S3 endpoint that the user finally accesses(ex. "https://s3.dualstack.ap-northeast-1.amazonaws.com") * `truncated_namespace`: If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or "" etc. For example, when using CDN to S3 virtual host format, set "". At this time, write CNAME to CDN in public_endpoint. * `streaming_enabled`: Enable streaming uploads, when enabled the file will be sent to the server in chunks as it's being read. This may be unsupported by some providers, try disabling this if you have upload problems. -## Pleroma.Upload.Filter.Mogrify + +### Upload filters + +#### Pleroma.Upload.Filter.Mogrify * `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", "auto-orient", {"implode", "1"}]`. -## Pleroma.Upload.Filter.Dedupe +#### Pleroma.Upload.Filter.Dedupe No specific configuration. -## Pleroma.Upload.Filter.AnonymizeFilename +#### Pleroma.Upload.Filter.AnonymizeFilename This filter replaces the filename (not the path) of an upload. For complete obfuscation, add `Pleroma.Upload.Filter.Dedupe` before AnonymizeFilename. * `text`: Text to replace filenames in links. If empty, `{random}.extension` will be used. You can get the original filename extension by using `{extension}`, for example `custom-file-name.{extension}`. -## Pleroma.Emails.Mailer +## Email + +### Pleroma.Emails.Mailer * `adapter`: one of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters), or `Swoosh.Adapters.Local` for in-memory mailbox. * `api_key` / `password` and / or other adapter-specific settings, per the above documentation. * `enabled`: Allows enable/disable send emails. Default: `false`. @@ -72,77 +438,112 @@ config :pleroma, Pleroma.Emails.Mailer, auth: :always ``` -## :uri_schemes -* `valid_schemes`: List of the scheme part that is considered valid to be an URL +### :email_notifications -## :instance -* `name`: The instance’s name -* `email`: Email used to reach an Administrator/Moderator of the instance -* `notify_email`: Email used for notifications. -* `description`: The instance’s description, can be seen in nodeinfo and ``/api/v1/instance`` -* `limit`: Posts character limit (CW/Subject included in the counter) -* `remote_limit`: Hard character limit beyond which remote posts will be dropped. -* `upload_limit`: File size limit of uploads (except for avatar, background, banner) -* `avatar_upload_limit`: File size limit of user’s profile avatars -* `background_upload_limit`: File size limit of user’s profile backgrounds -* `banner_upload_limit`: File size limit of user’s profile banners -* `poll_limits`: A map with poll limits for **local** polls - * `max_options`: Maximum number of options - * `max_option_chars`: Maximum number of characters per option - * `min_expiration`: Minimum expiration time (in seconds) - * `max_expiration`: Maximum expiration time (in seconds) -* `registrations_open`: Enable registrations for anyone, invitations can be enabled when false. -* `invites_enabled`: Enable user invitations for admins (depends on `registrations_open: false`). -* `account_activation_required`: Require users to confirm their emails before signing in. -* `federating`: Enable federation with other instances -* `federation_incoming_replies_max_depth`: Max. depth of reply-to activities fetching on incoming federation, to prevent out-of-memory situations while fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes. -* `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it. -* `allow_relay`: Enable Pleroma’s Relay, which makes it possible to follow a whole instance -* `rewrite_policy`: Message Rewrite Policy, either one or a list. Here are the ones available by default: - * `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`: Doesn’t modify activities (default) - * `Pleroma.Web.ActivityPub.MRF.DropPolicy`: Drops all activities. It generally doesn’t makes sense to use in production - * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`: Restrict the visibility of activities from certains instances (See ``:mrf_simple`` section) - * `Pleroma.Web.ActivityPub.MRF.TagPolicy`: Applies policies to individual users based on tags, which can be set using pleroma-fe/admin-fe/any other app that supports Pleroma Admin API. For example it allows marking posts from individual users nsfw (sensitive) - * `Pleroma.Web.ActivityPub.MRF.SubchainPolicy`: Selectively runs other MRF policies when messages match (see ``:mrf_subchain`` section) - * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`: Drops posts with non-public visibility settings (See ``:mrf_rejectnonpublic`` section) - * `Pleroma.Web.ActivityPub.MRF.EnsureRePrepended`: Rewrites posts to ensure that replies to posts with subjects do not have an identical subject and instead begin with re:. - * `Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy`: Rejects posts from likely spambots by rejecting posts from new users that contain links. - * `Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`: Crawls attachments using their MediaProxy URLs so that the MediaProxy cache is primed. - * `Pleroma.Web.ActivityPub.MRF.MentionPolicy`: Drops posts mentioning configurable users. (see `:mrf_mention` section) - * `Pleroma.Web.ActivityPub.MRF.VocabularyPolicy`: Restricts activities to a configured set of vocabulary. (see `:mrf_vocabulary` section) -* `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. -* `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. -* `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` -* `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML) -* `mrf_transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo). -* `mrf_transparency_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value. -* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with - older software for theses nicknames. -* `max_pinned_statuses`: The maximum number of pinned statuses. `0` will disable the feature. -* `autofollowed_nicknames`: Set to nicknames of (local) users that every new user should automatically follow. -* `no_attachment_links`: Set to true to disable automatically adding attachment link text to statuses -* `welcome_message`: A message that will be send to a newly registered users as a direct message. -* `welcome_user_nickname`: The nickname of the local user that sends the welcome message. -* `max_report_comment_size`: The maximum size of the report comment (Default: `1000`) -* `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). Default: `false`. -* `healthcheck`: If set to true, system data will be shown on ``/api/pleroma/healthcheck``. -* `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database. -* `user_bio_length`: A user bio maximum length (default: `5000`) -* `user_name_length`: A user name maximum length (default: `100`) -* `skip_thread_containment`: Skip filter out broken threads. The default is `false`. -* `limit_to_local_content`: Limit unauthenticated users to search for local statutes and users only. Possible values: `:unauthenticated`, `:all` and `false`. The default is `:unauthenticated`. -* `max_account_fields`: The maximum number of custom fields in the user profile (default: `10`) -* `max_remote_account_fields`: The maximum number of custom fields in the remote user profile (default: `20`) -* `account_field_name_length`: An account field name maximum length (default: `512`) -* `account_field_value_length`: An account field value maximum length (default: `2048`) -* `external_user_synchronization`: Enabling following/followers counters synchronization for external users. +Email notifications settings. -!!! danger - This is a Work In Progress, not usable just yet + - digest - emails of "what you've missed" for users who have been + inactive for a while. + - active: globally enable or disable digest emails + - schedule: When to send digest email, in [crontab format](https://en.wikipedia.org/wiki/Cron). + "0 0 * * 0" is the default, meaning "once a week at midnight on Sunday morning" + - interval: Minimum interval between digest emails to one user + - inactivity_threshold: Minimum user inactivity threshold -* `dynamic_configuration`: Allow transferring configuration to DB with the subsequent customization from Admin api. +### Pleroma.Emails.UserEmail +- `:logo` - a path to a custom logo. Set it to `nil` to use the default Pleroma logo. +- `:styling` - a map with color settings for email templates. +## Background jobs + +### Oban + +[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration. + +Configuration options described in [Oban readme](https://github.com/sorentwo/oban#usage): + +* `repo` - app's Ecto repo (`Pleroma.Repo`) +* `verbose` - logs verbosity +* `prune` - non-retryable jobs [pruning settings](https://github.com/sorentwo/oban#pruning) (`:disabled` / `{:maxlen, value}` / `{:maxage, value}`) +* `queues` - job queues (see below) + +Pleroma has the following queues: + +* `activity_expiration` - Activity expiration +* `federator_outgoing` - Outgoing federation +* `federator_incoming` - Incoming federation +* `mailer` - Email sender, see [`Pleroma.Emails.Mailer`](#pleromaemailsmailer) +* `transmogrifier` - Transmogrifier +* `web_push` - Web push notifications +* `scheduled_activities` - Scheduled activities, see [`Pleroma.ScheduledActivity`](#pleromascheduledactivity) + +Example: + +```elixir +config :pleroma, Oban, + repo: Pleroma.Repo, + verbose: false, + prune: {:maxlen, 1500}, + queues: [ + federator_incoming: 50, + federator_outgoing: 50 + ] +``` + +This config contains two queues: `federator_incoming` and `federator_outgoing`. Both have the number of max concurrent jobs set to `50`. + +#### Migrating `pleroma_job_queue` settings + +`config :pleroma_job_queue, :queues` is replaced by `config :pleroma, Oban, :queues` and uses the same format (keys are queues' names, values are max concurrent jobs numbers). + +### :workers + +Includes custom worker options not interpretable directly by `Oban`. + +* `retries` — keyword lists where keys are `Oban` queues (see above) and values are numbers of max attempts for failed jobs. + +Example: + +```elixir +config :pleroma, :workers, + retries: [ + federator_incoming: 5, + federator_outgoing: 5 + ] +``` + +#### Migrating `Pleroma.Web.Federator.RetryQueue` settings + +* `max_retries` is replaced with `config :pleroma, :workers, retries: [federator_outgoing: 5]` +* `enabled: false` corresponds to `config :pleroma, :workers, retries: [federator_outgoing: 1]` +* deprecated options: `max_jobs`, `initial_timeout` + +### Pleroma.Scheduler + +Configuration for [Quantum](https://github.com/quantum-elixir/quantum-core) jobs scheduler. + +See [Quantum readme](https://github.com/quantum-elixir/quantum-core#usage) for the list of supported options. + +Example: + +```elixir +config :pleroma, Pleroma.Scheduler, + global: true, + overlap: true, + timezone: :utc, + jobs: [{"0 */6 * * * *", {Pleroma.Web.Websub, :refresh_subscriptions, []}}] +``` + +The above example defines a single job which invokes `Pleroma.Web.Websub.refresh_subscriptions()` every 6 hours ("0 */6 * * * *", [crontab format](https://en.wikipedia.org/wiki/Cron)). + +## :web_push_encryption, :vapid_details + +Web Push Notifications configuration. You can use the mix task `mix web_push.gen.keypair` to generate it. + +* ``subject``: a mailto link for the administrative contact. It’s best if this email is not a personal email address, but rather a group email so that if a person leaves an organization, is unavailable for an extended period, or otherwise can’t respond, someone else on the list can. +* ``public_key``: VAPID public key +* ``private_key``: VAPID private key ## :logger * `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog, and `Quack.Logger` to log to Slack @@ -187,430 +588,26 @@ config :quack, See the [Quack Github](https://github.com/azohra/quack) for more details -## :frontend_configurations -This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` and `masto_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [Pleroma-FE configuration and customization for instance administrators](/frontend/CONFIGURATION/#options). -Frontends can access these settings at `/api/pleroma/frontend_configurations` +## Database options -To add your own configuration for PleromaFE, use it like this: +### RUM indexing for full text search +* `rum_enabled`: If RUM indexes should be used. Defaults to `false`. -```elixir -config :pleroma, :frontend_configurations, - pleroma_fe: %{ - theme: "pleroma-dark", - # ... see /priv/static/static/config.json for the available keys. -}, - masto_fe: %{ - showInstanceSpecificPanel: true - } -``` +RUM indexes are an alternative indexing scheme that is not included in PostgreSQL by default. While they may eventually be mainlined, for now they have to be installed as a PostgreSQL extension from https://github.com/postgrespro/rum. -These settings **need to be complete**, they will override the defaults. +Their advantage over the standard GIN indexes is that they allow efficient ordering of search results by timestamp, which makes search queries a lot faster on larger servers, by one or two orders of magnitude. They take up around 3 times as much space as GIN indexes. -NOTE: for versions < 1.0, you need to set [`:fe`](#fe) to false, as shown a few lines below. +To enable them, both the `rum_enabled` flag has to be set and the following special migration has to be run: -## :fe -!!! warning - __THIS IS DEPRECATED__ +`mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/` - If you are using this method, please change it to the [`frontend_configurations`](#frontend_configurations) method. - Please **set this option to false** in your config like this: +This will probably take a long time. - ```elixir - config :pleroma, :fe, false - ``` +## Alternative client protocols -This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:instance`` is set to false. - -* `theme`: Which theme to use, they are defined in ``styles.json`` -* `logo`: URL of the logo, defaults to Pleroma’s logo -* `logo_mask`: Whether to use only the logo's shape as a mask (true) or as a regular image (false) -* `logo_margin`: What margin to use around the logo -* `background`: URL of the background, unless viewing a user profile with a background that is set -* `redirect_root_no_login`: relative URL which indicates where to redirect when a user isn’t logged in. -* `redirect_root_login`: relative URL which indicates where to redirect when a user is logged in. -* `show_instance_panel`: Whenether to show the instance’s specific panel. -* `scope_options_enabled`: Enable setting an notice visibility and subject/CW when posting -* `formatting_options_enabled`: Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to ``:instance, allowed_post_formats`` -* `collapse_message_with_subjects`: When a message has a subject(aka Content Warning), collapse it by default -* `hide_post_stats`: Hide notices statistics(repeats, favorites, …) -* `hide_user_stats`: Hide profile statistics(posts, posts per day, followers, followings, …) - -## :assets - -This section configures assets to be used with various frontends. Currently the only option -relates to mascots on the mastodon frontend - -* `mascots`: KeywordList of mascots, each element __MUST__ contain both a `url` and a - `mime_type` key. -* `default_mascot`: An element from `mascots` - This will be used as the default mascot - on MastoFE (default: `:pleroma_fox_tan`) - -## :manifest - -This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE. - -* `icons`: Describe the icons of the app, this a list of maps describing icons in the same way as the - [spec](https://www.w3.org/TR/appmanifest/#imageresource-and-its-members) describes it. - - Example: - - ```elixir - config :pleroma, :manifest, - icons: [ - %{ - src: "/static/logo.png" - }, - %{ - src: "/static/icon.png", - type: "image/png" - }, - %{ - src: "/static/icon.ico", - sizes: "72x72 96x96 128x128 256x256" - } - ] - ``` - -* `theme_color`: Describe the theme color of the app. (Example: `"#282c37"`, `"rebeccapurple"`) -* `background_color`: Describe the background color of the app. (Example: `"#191b22"`, `"aliceblue"`) - -## :mrf_simple -* `media_removal`: List of instances to remove medias from -* `media_nsfw`: List of instances to put medias as NSFW(sensitive) from -* `federated_timeline_removal`: List of instances to remove from Federated (aka The Whole Known Network) Timeline -* `reject`: List of instances to reject any activities from -* `accept`: List of instances to accept any activities from -* `report_removal`: List of instances to reject reports from -* `avatar_removal`: List of instances to strip avatars from -* `banner_removal`: List of instances to strip banners from - -## :mrf_subchain -This policy processes messages through an alternate pipeline when a given message matches certain criteria. -All criteria are configured as a map of regular expressions to lists of policy modules. - -* `match_actor`: Matches a series of regular expressions against the actor field. - -Example: - -```elixir -config :pleroma, :mrf_subchain, - match_actor: %{ - ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy] - } -``` - -## :mrf_rejectnonpublic -* `allow_followersonly`: whether to allow followers-only posts -* `allow_direct`: whether to allow direct messages - -## :mrf_hellthread -* `delist_threshold`: Number of mentioned users after which the message gets delisted (the message can still be seen, but it will not show up in public timelines and mentioned users won't get notifications about it). Set to 0 to disable. -* `reject_threshold`: Number of mentioned users after which the messaged gets rejected. Set to 0 to disable. - -## :mrf_keyword -* `reject`: A list of patterns which result in message being rejected, each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html) -* `federated_timeline_removal`: A list of patterns which result in message being removed from federated timelines (a.k.a unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html) -* `replace`: A list of tuples containing `{pattern, replacement}`, `pattern` can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html) - -## :mrf_mention -* `actors`: A list of actors, for which to drop any posts mentioning. - -## :mrf_vocabulary -* `accept`: A list of ActivityStreams terms to accept. If empty, all supported messages are accepted. -* `reject`: A list of ActivityStreams terms to reject. If empty, no messages are rejected. - -## :media_proxy -* `enabled`: Enables proxying of remote media to the instance’s proxy -* `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts. -* `proxy_opts`: All options defined in `Pleroma.ReverseProxy` documentation, defaults to `[max_body_length: (25*1_048_576)]`. -* `whitelist`: List of domains to bypass the mediaproxy - -## :gopher -* `enabled`: Enables the gopher interface -* `ip`: IP address to bind to -* `port`: Port to bind to -* `dstport`: Port advertised in urls (optional, defaults to `port`) - -## Pleroma.Web.Endpoint - -!!! note - `Phoenix` endpoint configuration, all configuration options can be viewed [here](https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#module-dynamic-configuration), only common options are listed here. - -* `http` - a list containing http protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here. For deployment using docker, you need to set this to `[ip: {0,0,0,0}, port: 4000]` to make pleroma accessible from other containers (such as your nginx server). - - `ip` - a tuple consisting of 4 integers - - `port` -* `url` - a list containing the configuration for generating urls, accepts - - `host` - the host without the scheme and a post (e.g `example.com`, not `https://example.com:2020`) - - `scheme` - e.g `http`, `https` - - `port` - - `path` -* `extra_cookie_attrs` - a list of `Key=Value` strings to be added as non-standard cookie attributes. Defaults to `["SameSite=Lax"]`. See the [SameSite article](https://www.owasp.org/index.php/SameSite) on OWASP for more info. - - - -!!! warning - If you modify anything inside these lists, default `config.exs` values will be overwritten, which may result in breakage, to make sure this does not happen please copy the default value for the list from `config.exs` and modify/add only what you need - -Example: -```elixir -config :pleroma, Pleroma.Web.Endpoint, - url: [host: "example.com", port: 2020, scheme: "https"], - http: [ - # start copied from config.exs - dispatch: [ - {:_, - [ - {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []}, - {"/websocket", Phoenix.Endpoint.CowboyWebSocket, - {Phoenix.Transports.WebSocket, - {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}}, - {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}} - ]} - # end copied from config.exs - ], - port: 8080, - ip: {127, 0, 0, 1} - ] -``` - -This will make Pleroma listen on `127.0.0.1` port `8080` and generate urls starting with `https://example.com:2020` - -## :activitypub -* ``unfollow_blocked``: Whether blocks result in people getting unfollowed -* ``outgoing_blocks``: Whether to federate blocks to other instances -* ``deny_follow_blocked``: Whether to disallow following an account that has blocked the user in question -* ``sign_object_fetches``: Sign object fetches with HTTP signatures - -## :http_security -* ``enabled``: Whether the managed content security policy is enabled -* ``sts``: Whether to additionally send a `Strict-Transport-Security` header -* ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent -* ``ct_max_age``: The maximum age for the `Expect-CT` header if sent -* ``referrer_policy``: The referrer policy to use, either `"same-origin"` or `"no-referrer"` -* ``report_uri``: Adds the specified url to `report-uri` and `report-to` group in CSP header. - -## :mrf_user_allowlist - -The keys in this section are the domain names that the policy should apply to. -Each key should be assigned a list of users that should be allowed through by -their ActivityPub ID. - -An example: - -```elixir -config :pleroma, :mrf_user_allowlist, - "example.org": ["https://example.org/users/admin"] -``` - -## :web_push_encryption, :vapid_details - -Web Push Notifications configuration. You can use the mix task `mix web_push.gen.keypair` to generate it. - -* ``subject``: a mailto link for the administrative contact. It’s best if this email is not a personal email address, but rather a group email so that if a person leaves an organization, is unavailable for an extended period, or otherwise can’t respond, someone else on the list can. -* ``public_key``: VAPID public key -* ``private_key``: VAPID private key - -## Pleroma.Captcha -* `enabled`: Whether the captcha should be shown on registration -* `method`: The method/service to use for captcha -* `seconds_valid`: The time in seconds for which the captcha is valid - -### Pleroma.Captcha.Kocaptcha -Kocaptcha is a very simple captcha service with a single API endpoint, -the source code is here: https://github.com/koto-bank/kocaptcha. The default endpoint -`https://captcha.kotobank.ch` is hosted by the developer. - -* `endpoint`: the kocaptcha endpoint to use - -## :admin_token - -Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the 'admin_token' parameter. Example: - -```elixir -config :pleroma, :admin_token, "somerandomtoken" -``` - -You can then do - -```sh -curl "http://localhost:4000/api/pleroma/admin/invite_token?admin_token=somerandomtoken" -``` - -## Oban - -[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration. - -Configuration options described in [Oban readme](https://github.com/sorentwo/oban#usage): -* `repo` - app's Ecto repo (`Pleroma.Repo`) -* `verbose` - logs verbosity -* `prune` - non-retryable jobs [pruning settings](https://github.com/sorentwo/oban#pruning) (`:disabled` / `{:maxlen, value}` / `{:maxage, value}`) -* `queues` - job queues (see below) - -Pleroma has the following queues: - -* `activity_expiration` - Activity expiration -* `federator_outgoing` - Outgoing federation -* `federator_incoming` - Incoming federation -* `mailer` - Email sender, see [`Pleroma.Emails.Mailer`](#pleromaemailsmailer) -* `transmogrifier` - Transmogrifier -* `web_push` - Web push notifications -* `scheduled_activities` - Scheduled activities, see [`Pleroma.ScheduledActivity`](#pleromascheduledactivity) - -Example: - -```elixir -config :pleroma, Oban, - repo: Pleroma.Repo, - verbose: false, - prune: {:maxlen, 1500}, - queues: [ - federator_incoming: 50, - federator_outgoing: 50 - ] -``` - -This config contains two queues: `federator_incoming` and `federator_outgoing`. Both have the number of max concurrent jobs set to `50`. - -### Migrating `pleroma_job_queue` settings - -`config :pleroma_job_queue, :queues` is replaced by `config :pleroma, Oban, :queues` and uses the same format (keys are queues' names, values are max concurrent jobs numbers). - -## :workers - -Includes custom worker options not interpretable directly by `Oban`. - -* `retries` — keyword lists where keys are `Oban` queues (see above) and values are numbers of max attempts for failed jobs. - -Example: - -```elixir -config :pleroma, :workers, - retries: [ - federator_incoming: 5, - federator_outgoing: 5 - ] -``` - -### Migrating `Pleroma.Web.Federator.RetryQueue` settings - -* `max_retries` is replaced with `config :pleroma, :workers, retries: [federator_outgoing: 5]` -* `enabled: false` corresponds to `config :pleroma, :workers, retries: [federator_outgoing: 1]` -* deprecated options: `max_jobs`, `initial_timeout` - -## Pleroma.Web.Metadata -* `providers`: a list of metadata providers to enable. Providers available: - * Pleroma.Web.Metadata.Providers.OpenGraph - * Pleroma.Web.Metadata.Providers.TwitterCard - * Pleroma.Web.Metadata.Providers.RelMe - add links from user bio with rel=me into the `
` as `` - * Pleroma.Web.Metadata.Providers.Feed - add a link to a user's Atom feed into the `
` as `` -* `unfurl_nsfw`: If set to `true` nsfw attachments will be shown in previews - -## :rich_media -* `enabled`: if enabled the instance will parse metadata from attached links to generate link previews -* `ignore_hosts`: list of hosts which will be ignored by the metadata parser. For example `["accounts.google.com", "xss.website"]`, defaults to `[]`. -* `ignore_tld`: list TLDs (top-level domains) which will ignore for parse metadata. default is ["local", "localdomain", "lan"] -* `parsers`: list of Rich Media parsers - -## :fetch_initial_posts -* `enabled`: if enabled, when a new user is federated with, fetch some of their latest posts -* `pages`: the amount of pages to fetch - -## :hackney_pools - -Advanced. Tweaks Hackney (http client) connections pools. - -There's three pools used: - -* `:federation` for the federation jobs. - You may want this pool max_connections to be at least equal to the number of federator jobs + retry queue jobs. -* `:media` for rich media, media proxy -* `:upload` for uploaded media (if using a remote uploader and `proxy_remote: true`) - -For each pool, the options are: - -* `max_connections` - how much connections a pool can hold -* `timeout` - retention duration for connections - -## :auto_linker - -Configuration for the `auto_linker` library: - -* `class: "auto-linker"` - specify the class to be added to the generated link. false to clear -* `rel: "noopener noreferrer"` - override the rel attribute. false to clear -* `new_window: true` - set to false to remove `target='_blank'` attribute -* `scheme: false` - Set to true to link urls with schema `http://google.com` -* `truncate: false` - Set to a number to truncate urls longer then the number. Truncated urls will end in `..` -* `strip_prefix: true` - Strip the scheme prefix -* `extra: false` - link urls with rarely used schemes (magnet, ipfs, irc, etc.) - -Example: - -```elixir -config :auto_linker, - opts: [ - scheme: true, - extra: true, - class: false, - strip_prefix: false, - new_window: false, - rel: "ugc" - ] -``` - -## Pleroma.Scheduler - -Configuration for [Quantum](https://github.com/quantum-elixir/quantum-core) jobs scheduler. - -See [Quantum readme](https://github.com/quantum-elixir/quantum-core#usage) for the list of supported options. - -Example: - -```elixir -config :pleroma, Pleroma.Scheduler, - global: true, - overlap: true, - timezone: :utc, - jobs: [{"0 */6 * * * *", {Pleroma.Web.Websub, :refresh_subscriptions, []}}] -``` - -The above example defines a single job which invokes `Pleroma.Web.Websub.refresh_subscriptions()` every 6 hours ("0 */6 * * * *", [crontab format](https://en.wikipedia.org/wiki/Cron)). - -## Pleroma.ScheduledActivity - -* `daily_user_limit`: the number of scheduled activities a user is allowed to create in a single day (Default: `25`) -* `total_user_limit`: the number of scheduled activities a user is allowed to create in total (Default: `300`) -* `enabled`: whether scheduled activities are sent to the job queue to be executed - -## Pleroma.ActivityExpiration - -* `enabled`: whether expired activities will be sent to the job queue to be deleted - -## Pleroma.Web.Auth.Authenticator - -* `Pleroma.Web.Auth.PleromaAuthenticator`: default database authenticator -* `Pleroma.Web.Auth.LDAPAuthenticator`: LDAP authentication - -## :ldap - -Use LDAP for user authentication. When a user logs in to the Pleroma -instance, the name and password will be verified by trying to authenticate -(bind) to an LDAP server. If a user exists in the LDAP directory but there -is no account with the same name yet on the Pleroma instance then a new -Pleroma account will be created with the same name as the LDAP user name. - -* `enabled`: enables LDAP authentication -* `host`: LDAP server hostname -* `port`: LDAP port, e.g. 389 or 636 -* `ssl`: true to use SSL, usually implies the port 636 -* `sslopts`: additional SSL options -* `tls`: true to start TLS, usually implies the port 389 -* `tlsopts`: additional TLS options -* `base`: LDAP base, e.g. "dc=example,dc=com" -* `uid`: LDAP attribute name to authenticate the user, e.g. when "cn", the filter will be "cn=username,base" - -## BBS / SSH access +### BBS / SSH access To enable simple command line interface accessible over ssh, add a setting like this to your configuration file: @@ -628,10 +625,33 @@ config :esshd, Feel free to adjust the priv_dir and port number. Then you will have to create the key for the keys (in the example `priv/ssh_keys`) and create the host keys with `ssh-keygen -m PEM -N "" -b 2048 -t rsa -f ssh_host_rsa_key`. After restarting, you should be able to connect to your Pleroma instance with `ssh username@server -p $PORT` -## :auth +### :gopher +* `enabled`: Enables the gopher interface +* `ip`: IP address to bind to +* `port`: Port to bind to +* `dstport`: Port advertised in urls (optional, defaults to `port`) -* `Pleroma.Web.Auth.PleromaAuthenticator`: default database authenticator -* `Pleroma.Web.Auth.LDAPAuthenticator`: LDAP authentication + +## Authentication + +### :admin_token + +Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the 'admin_token' parameter. Example: + +```elixir +config :pleroma, :admin_token, "somerandomtoken" +``` + +You can then do + +```sh +curl "http://localhost:4000/api/pleroma/admin/invite_token?admin_token=somerandomtoken" +``` + +### :auth + +* `Pleroma.Web.Auth.PleromaAuthenticator`: default database authenticator. +* `Pleroma.Web.Auth.LDAPAuthenticator`: LDAP authentication. Authentication / authorization settings. @@ -639,24 +659,30 @@ Authentication / authorization settings. * `oauth_consumer_template`: OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`. * `oauth_consumer_strategies`: the list of enabled OAuth consumer strategies; by default it's set by `OAUTH_CONSUMER_STRATEGIES` environment variable. Each entry in this space-delimited string should be of format `` or `:` (e.g. `twitter` or `keycloak:ueberauth_keycloak_strategy` in case dependency is named differently than `ueberauth_`). -## :email_notifications +### Pleroma.Web.Auth.Authenticator -Email notifications settings. +* `Pleroma.Web.Auth.PleromaAuthenticator`: default database authenticator. +* `Pleroma.Web.Auth.LDAPAuthenticator`: LDAP authentication. - - digest - emails of "what you've missed" for users who have been - inactive for a while. - - active: globally enable or disable digest emails - - schedule: When to send digest email, in [crontab format](https://en.wikipedia.org/wiki/Cron). - "0 0 * * 0" is the default, meaning "once a week at midnight on Sunday morning" - - interval: Minimum interval between digest emails to one user - - inactivity_threshold: Minimum user inactivity threshold +### :ldap -## Pleroma.Emails.UserEmail +Use LDAP for user authentication. When a user logs in to the Pleroma +instance, the name and password will be verified by trying to authenticate +(bind) to an LDAP server. If a user exists in the LDAP directory but there +is no account with the same name yet on the Pleroma instance then a new +Pleroma account will be created with the same name as the LDAP user name. -- `:logo` - a path to a custom logo. Set it to `nil` to use the default Pleroma logo. -- `:styling` - a map with color settings for email templates. +* `enabled`: enables LDAP authentication +* `host`: LDAP server hostname +* `port`: LDAP port, e.g. 389 or 636 +* `ssl`: true to use SSL, usually implies the port 636 +* `sslopts`: additional SSL options +* `tls`: true to start TLS, usually implies the port 389 +* `tlsopts`: additional TLS options +* `base`: LDAP base, e.g. "dc=example,dc=com" +* `uid`: LDAP attribute name to authenticate the user, e.g. when "cn", the filter will be "cn=username,base" -## OAuth consumer mode +### OAuth consumer mode OAuth consumer mode allows sign in / sign up via external OAuth providers (e.g. Twitter, Facebook, Google, Microsoft, etc.). Implementation is based on Ueberauth; see the list of [available strategies](https://github.com/ueberauth/ueberauth/wiki/List-of-Strategies). @@ -728,7 +754,7 @@ config :ueberauth, Ueberauth, ] ``` -## OAuth 2.0 provider - :oauth2 +### OAuth 2.0 provider - :oauth2 Configure OAuth 2 provider capabilities: @@ -737,70 +763,34 @@ Configure OAuth 2 provider capabilities: * `clean_expired_tokens` - Enable a background job to clean expired oauth tokens. Defaults to `false`. * `clean_expired_tokens_interval` - Interval to run the job to clean expired tokens. Defaults to `86_400_000` (24 hours). -## :emoji -* `shortcode_globs`: Location of custom emoji files. `*` can be used as a wildcard. Example `["/emoji/custom/**/*.png"]` -* `pack_extensions`: A list of file extensions for emojis, when no emoji.txt for a pack is present. Example `[".png", ".gif"]` -* `groups`: Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname and the value the location or array of locations. `*` can be used as a wildcard. Example `[Custom: ["/emoji/*.png", "/emoji/custom/*.png"]]` -* `default_manifest`: Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download. Currently only one manifest can be added (no arrays). -* `shared_pack_cache_seconds_per_file`: When an emoji pack is shared, the archive is created and cached in - memory for this amount of seconds multiplied by the number of files. +## Link parsing -## Database options +### :uri_schemes +* `valid_schemes`: List of the scheme part that is considered valid to be an URL. -### RUM indexing for full text search -* `rum_enabled`: If RUM indexes should be used. Defaults to `false`. +### :auto_linker -RUM indexes are an alternative indexing scheme that is not included in PostgreSQL by default. While they may eventually be mainlined, for now they have to be installed as a PostgreSQL extension from https://github.com/postgrespro/rum. +Configuration for the `auto_linker` library: -Their advantage over the standard GIN indexes is that they allow efficient ordering of search results by timestamp, which makes search queries a lot faster on larger servers, by one or two orders of magnitude. They take up around 3 times as much space as GIN indexes. +* `class: "auto-linker"` - specify the class to be added to the generated link. false to clear. +* `rel: "noopener noreferrer"` - override the rel attribute. false to clear. +* `new_window: true` - set to false to remove `target='_blank'` attribute. +* `scheme: false` - Set to true to link urls with schema `http://google.com`. +* `truncate: false` - Set to a number to truncate urls longer then the number. Truncated urls will end in `..`. +* `strip_prefix: true` - Strip the scheme prefix. +* `extra: false` - link urls with rarely used schemes (magnet, ipfs, irc, etc.). -To enable them, both the `rum_enabled` flag has to be set and the following special migration has to be run: +Example: -`mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/` +```elixir +config :auto_linker, + opts: [ + scheme: true, + extra: true, + class: false, + strip_prefix: false, + new_window: false, + rel: "ugc" + ] +``` -This will probably take a long time. - -## :rate_limit - -This is an advanced feature and disabled by default. - -If your instance is behind a reverse proxy you must enable and configure [`Pleroma.Plugs.RemoteIp`](#pleroma-plugs-remoteip). - -A keyword list of rate limiters where a key is a limiter name and value is the limiter configuration. The basic configuration is a tuple where: - -* The first element: `scale` (Integer). The time scale in milliseconds. -* The second element: `limit` (Integer). How many requests to limit in the time scale provided. - -It is also possible to have different limits for unauthenticated and authenticated users: the keyword value must be a list of two tuples where the first one is a config for unauthenticated users and the second one is for authenticated. - -Supported rate limiters: - -* `:search` for the search requests (account & status search etc.) -* `:app_account_creation` for registering user accounts from the same IP address -* `:relations_actions` for actions on relations with all users (follow, unfollow) -* `:relation_id_action` for actions on relation with a specific user (follow, unfollow) -* `:statuses_actions` for create / delete / fav / unfav / reblog / unreblog actions on any statuses -* `:status_id_action` for fav / unfav or reblog / unreblog actions on the same status by the same user - -## :web_cache_ttl - -The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration. - -Available caches: - -* `:activity_pub` - activity pub routes (except question activities). Defaults to `nil` (no expiration). -* `:activity_pub_question` - activity pub routes (question activities). Defaults to `30_000` (30 seconds). - -## Pleroma.Plugs.RemoteIp - -!!! warning - If your instance is not behind at least one reverse proxy, you should not enable this plug. - -`Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration. - -Available options: - -* `enabled` - Enable/disable the plug. Defaults to `false`. -* `headers` - A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Defaults to `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`. -* `proxies` - A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Defaults to `[]`. -* `reserved` - Defaults to [localhost](https://en.wikipedia.org/wiki/Localhost) and [private network](https://en.wikipedia.org/wiki/Private_network). diff --git a/lib/pleroma/object/containment.ex b/lib/pleroma/object/containment.ex index 68535c09e..a1f9c1250 100644 --- a/lib/pleroma/object/containment.ex +++ b/lib/pleroma/object/containment.ex @@ -64,15 +64,15 @@ def contain_origin(id, %{"actor" => _actor} = params) do def contain_origin(id, %{"attributedTo" => actor} = params), do: contain_origin(id, Map.put(params, "actor", actor)) - def contain_origin_from_id(_id, %{"id" => nil}), do: :error - - def contain_origin_from_id(id, %{"id" => other_id} = _params) do + def contain_origin_from_id(id, %{"id" => other_id} = _params) when is_binary(other_id) do id_uri = URI.parse(id) other_uri = URI.parse(other_id) compare_uris(id_uri, other_uri) end + def contain_origin_from_id(_id, _data), do: :error + def contain_child(%{"object" => %{"id" => id, "attributedTo" => _} = object}), do: contain_origin(id, object) diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 51a9c6169..65dd251f3 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -568,7 +568,6 @@ def fetch_public_activities(opts \\ %{}, pagination \\ :keyset) do |> fetch_activities_query(opts) |> restrict_unlisted() |> Pagination.fetch_paginated(opts, pagination) - |> Enum.reverse() end @valid_visibilities ~w[direct unlisted public private] diff --git a/lib/pleroma/web/feed/feed_controller.ex b/lib/pleroma/web/feed/feed_controller.ex index d91ecef9c..d0e23007d 100644 --- a/lib/pleroma/web/feed/feed_controller.ex +++ b/lib/pleroma/web/feed/feed_controller.ex @@ -33,21 +33,22 @@ def feed_redirect(conn, %{"nickname" => nickname}) do def feed(conn, %{"nickname" => nickname} = params) do with {_, %User{} = user} <- {:fetch_user, User.get_cached_by_nickname(nickname)} do - query_params = - params - |> Map.take(["max_id"]) - |> Map.put("type", ["Create"]) - |> Map.put("whole_db", true) - |> Map.put("actor_id", user.ap_id) - activities = - query_params + %{ + "type" => ["Create"], + "whole_db" => true, + "actor_id" => user.ap_id + } + |> Map.merge(Map.take(params, ["max_id"])) |> ActivityPub.fetch_public_activities() - |> Enum.reverse() conn |> put_resp_content_type("application/atom+xml") - |> render("feed.xml", user: user, activities: activities) + |> render("feed.xml", + user: user, + activities: activities, + feed_config: Pleroma.Config.get([:feed]) + ) end end diff --git a/lib/pleroma/web/feed/feed_view.ex b/lib/pleroma/web/feed/feed_view.ex index 5eef1e757..bb1332fd3 100644 --- a/lib/pleroma/web/feed/feed_view.ex +++ b/lib/pleroma/web/feed/feed_view.ex @@ -6,12 +6,23 @@ defmodule Pleroma.Web.Feed.FeedView do use Phoenix.HTML use Pleroma.Web, :view + alias Pleroma.Formatter alias Pleroma.Object alias Pleroma.User alias Pleroma.Web.MediaProxy require Pleroma.Constants + def prepare_activity(activity) do + object = activity_object(activity) + + %{ + activity: activity, + data: Map.get(object, :data), + object: object + } + end + def most_recent_update(activities, user) do (List.first(activities) || user).updated_at |> NaiveDateTime.to_iso8601() @@ -23,31 +34,23 @@ def logo(user) do |> MediaProxy.url() end - def last_activity(activities) do - List.last(activities) + def last_activity(activities), do: List.last(activities) + + def activity_object(activity), do: Object.normalize(activity) + + def activity_title(%{data: %{"content" => content}}, opts \\ %{}) do + content + |> Formatter.truncate(opts[:max_length], opts[:omission]) + |> escape() end - def activity_object(activity) do - Object.normalize(activity) - end - - def activity_object_data(activity) do - activity - |> activity_object() - |> Map.get(:data) - end - - def activity_content(activity) do - content = activity_object_data(activity)["content"] - + def activity_content(%{data: %{"content" => content}}) do content |> String.replace(~r/[\n\r]/, "") |> escape() end - def activity_context(activity) do - activity.data["context"] - end + def activity_context(activity), do: activity.data["context"] def attachment_href(attachment) do attachment["url"] diff --git a/lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex b/lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex index f2d2d3ccb..384159336 100644 --- a/lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex @@ -71,7 +71,6 @@ def public(%{assigns: %{user: user}} = conn, params) do |> Map.put("blocking_user", user) |> Map.put("muting_user", user) |> ActivityPub.fetch_public_activities() - |> Enum.reverse() conn |> add_link_headers(activities, %{"local" => local_only}) @@ -110,7 +109,6 @@ def hashtag(%{assigns: %{user: user}} = conn, params) do |> Map.put("tag_all", tag_all) |> Map.put("tag_reject", tag_reject) |> ActivityPub.fetch_public_activities() - |> Enum.reverse() conn |> add_link_headers(activities, %{"local" => local_only}) diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex index 192984242..d7ae503f6 100644 --- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex +++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex @@ -58,6 +58,7 @@ def raw_nodeinfo do "polls", "pleroma_explicit_addressing", "shareable_emoji_packs", + "multifetch", if Config.get([:media_proxy, :enabled]) do "media_proxy" end, diff --git a/lib/pleroma/web/templates/feed/feed/_activity.xml.eex b/lib/pleroma/web/templates/feed/feed/_activity.xml.eex index d1f5e903c..514eacaed 100644 --- a/lib/pleroma/web/templates/feed/feed/_activity.xml.eex +++ b/lib/pleroma/web/templates/feed/feed/_activity.xml.eex @@ -2,11 +2,13 @@ http://activitystrea.ms/schema/1.0/note http://activitystrea.ms/schema/1.0/post <%= @data["id"] %> - <%= "New note by #{@user.nickname}" %> - <%= activity_content(@activity) %> + <%= activity_title(@object, Keyword.get(@feed_config, :post_title, %{})) %> + <%= activity_content(@object) %> <%= @data["published"] %> <%= @data["published"] %> - <%= activity_context(@activity) %> + + <%= activity_context(@activity) %> + <%= if @data["summary"] do %> diff --git a/lib/pleroma/web/templates/feed/feed/feed.xml.eex b/lib/pleroma/web/templates/feed/feed/feed.xml.eex index 45df9dc09..5ae36d345 100644 --- a/lib/pleroma/web/templates/feed/feed/feed.xml.eex +++ b/lib/pleroma/web/templates/feed/feed/feed.xml.eex @@ -19,6 +19,6 @@ <% end %> <%= for activity <- @activities do %> - <%= render @view_module, "_activity.xml", Map.merge(assigns, %{activity: activity, data: activity_object_data(activity)}) %> + <%= render @view_module, "_activity.xml", Map.merge(assigns, prepare_activity(activity)) %> <% end %> diff --git a/mix.lock b/mix.lock index 4529506a8..5b471fe3d 100644 --- a/mix.lock +++ b/mix.lock @@ -37,7 +37,7 @@ "ex_syslogger": {:git, "https://github.com/slashmili/ex_syslogger.git", "f3963399047af17e038897c69e20d552e6899e1d", [tag: "1.4.0"]}, "excoveralls": {:hex, :excoveralls, "0.11.2", "0c6f2c8db7683b0caa9d490fb8125709c54580b4255ffa7ad35f3264b075a643", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"}, "fast_html": {:hex, :fast_html, "0.99.3", "e7ce6245fed0635f4719a31cc409091ed17b2091165a4a1cffbf2ceac77abbf4", [:make, :mix], [], "hexpm"}, - "fast_sanitize": {:hex, :fast_sanitize, "0.1.1", "a403c3c09369e23423d3e6beb14068ad07be82741d10b293c71abac445dcc636", [:mix], [{:fast_html, "~> 0.99", [hex: :fast_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, + "fast_sanitize": {:hex, :fast_sanitize, "0.1.3", "e89a743b1679c344abdfcf79778d1499fbc599eca2d8a8cdfaf9ff520986fb72", [:mix], [{:fast_html, "~> 0.99", [hex: :fast_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, "flake_id": {:hex, :flake_id, "0.1.0", "7716b086d2e405d09b647121a166498a0d93d1a623bead243e1f74216079ccb3", [:mix], [{:base62, "~> 1.2", [hex: :base62, repo: "hexpm", optional: false]}, {:ecto, ">= 2.0.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm"}, "floki": {:hex, :floki, "0.23.0", "956ab6dba828c96e732454809fb0bd8d43ce0979b75f34de6322e73d4c917829", [:mix], [{:html_entities, "~> 0.4.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm"}, "gen_smtp": {:hex, :gen_smtp, "0.15.0", "9f51960c17769b26833b50df0b96123605a8024738b62db747fece14eb2fbfcc", [:rebar3], [], "hexpm"}, diff --git a/priv/static/index.html b/priv/static/index.html index fc5eee901..f1a26cc95 100644 --- a/priv/static/index.html +++ b/priv/static/index.html @@ -1 +1 @@ -Pleroma
\ No newline at end of file +Pleroma
\ No newline at end of file diff --git a/priv/static/static/css/app.4e8e80a2f95232cff399.css b/priv/static/static/css/app.fd71461124f3eb029b1b.css similarity index 97% rename from priv/static/static/css/app.4e8e80a2f95232cff399.css rename to priv/static/static/css/app.fd71461124f3eb029b1b.css index ca3d4e41f..6ab9849ec 100644 --- a/priv/static/static/css/app.4e8e80a2f95232cff399.css +++ b/priv/static/static/css/app.fd71461124f3eb029b1b.css @@ -99,4 +99,4 @@ .with-subscription-loading .error { font-size: 14px; } -/*# sourceMappingURL=app.4e8e80a2f95232cff399.css.map*/ \ No newline at end of file +/*# sourceMappingURL=app.fd71461124f3eb029b1b.css.map*/ \ No newline at end of file diff --git a/priv/static/static/css/app.4e8e80a2f95232cff399.css.map b/priv/static/static/css/app.fd71461124f3eb029b1b.css.map similarity index 95% rename from priv/static/static/css/app.4e8e80a2f95232cff399.css.map rename to priv/static/static/css/app.fd71461124f3eb029b1b.css.map index dc2c92ced..660b09d2c 100644 --- a/priv/static/static/css/app.4e8e80a2f95232cff399.css.map +++ b/priv/static/static/css/app.fd71461124f3eb029b1b.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./src/hocs/with_load_more/with_load_more.scss","webpack:///./src/components/tab_switcher/tab_switcher.scss","webpack:///./src/hocs/with_subscription/with_subscription.scss"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;AClFA;AACA;AACA;AACA;AACA;AACA;AACA,C","file":"static/css/app.4e8e80a2f95232cff399.css","sourcesContent":[".with-load-more-footer {\n padding: 10px;\n text-align: center;\n border-top: 1px solid;\n border-top-color: #222;\n border-top-color: var(--border, #222);\n}\n.with-load-more-footer .error {\n font-size: 14px;\n}",".tab-switcher {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.tab-switcher .contents {\n -ms-flex: 1 0 auto;\n flex: 1 0 auto;\n min-height: 0px;\n}\n.tab-switcher .contents .hidden {\n display: none;\n}\n.tab-switcher .contents.scrollable-tabs {\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n overflow-y: auto;\n}\n.tab-switcher .tabs {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n width: 100%;\n overflow-y: hidden;\n overflow-x: auto;\n padding-top: 5px;\n box-sizing: border-box;\n}\n.tab-switcher .tabs::after, .tab-switcher .tabs::before {\n display: block;\n content: \"\";\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}\n.tab-switcher .tabs .tab-wrapper {\n height: 28px;\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.tab-switcher .tabs .tab-wrapper .tab {\n width: 100%;\n min-width: 1px;\n position: relative;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 6px 1em;\n padding-bottom: 99px;\n margin-bottom: -93px;\n white-space: nowrap;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active) {\n z-index: 4;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active):hover {\n z-index: 6;\n}\n.tab-switcher .tabs .tab-wrapper .tab.active {\n background: transparent;\n z-index: 5;\n}\n.tab-switcher .tabs .tab-wrapper .tab img {\n max-height: 26px;\n vertical-align: top;\n margin-top: -5px;\n}\n.tab-switcher .tabs .tab-wrapper:not(.active)::after {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}",".with-subscription-loading {\n padding: 10px;\n text-align: center;\n}\n.with-subscription-loading .error {\n font-size: 14px;\n}"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./src/hocs/with_load_more/with_load_more.scss","webpack:///./src/components/tab_switcher/tab_switcher.scss","webpack:///./src/hocs/with_subscription/with_subscription.scss"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;AClFA;AACA;AACA;AACA;AACA;AACA;AACA,C","file":"static/css/app.fd71461124f3eb029b1b.css","sourcesContent":[".with-load-more-footer {\n padding: 10px;\n text-align: center;\n border-top: 1px solid;\n border-top-color: #222;\n border-top-color: var(--border, #222);\n}\n.with-load-more-footer .error {\n font-size: 14px;\n}",".tab-switcher {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.tab-switcher .contents {\n -ms-flex: 1 0 auto;\n flex: 1 0 auto;\n min-height: 0px;\n}\n.tab-switcher .contents .hidden {\n display: none;\n}\n.tab-switcher .contents.scrollable-tabs {\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n overflow-y: auto;\n}\n.tab-switcher .tabs {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n width: 100%;\n overflow-y: hidden;\n overflow-x: auto;\n padding-top: 5px;\n box-sizing: border-box;\n}\n.tab-switcher .tabs::after, .tab-switcher .tabs::before {\n display: block;\n content: \"\";\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}\n.tab-switcher .tabs .tab-wrapper {\n height: 28px;\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.tab-switcher .tabs .tab-wrapper .tab {\n width: 100%;\n min-width: 1px;\n position: relative;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 6px 1em;\n padding-bottom: 99px;\n margin-bottom: -93px;\n white-space: nowrap;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active) {\n z-index: 4;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active):hover {\n z-index: 6;\n}\n.tab-switcher .tabs .tab-wrapper .tab.active {\n background: transparent;\n z-index: 5;\n}\n.tab-switcher .tabs .tab-wrapper .tab img {\n max-height: 26px;\n vertical-align: top;\n margin-top: -5px;\n}\n.tab-switcher .tabs .tab-wrapper:not(.active)::after {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}",".with-subscription-loading {\n padding: 10px;\n text-align: center;\n}\n.with-subscription-loading .error {\n font-size: 14px;\n}"],"sourceRoot":""} \ No newline at end of file diff --git a/priv/static/static/js/2.48f39bc510b7c0a7fca6.js b/priv/static/static/js/2.48f39bc510b7c0a7fca6.js deleted file mode 100644 index eabbcf690..000000000 --- a/priv/static/static/js/2.48f39bc510b7c0a7fca6.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{987:function(t,e,i){"use strict";i.r(e);var n=i(988),c=i.n(n);for(var r in n)"default"!==r&&function(t){i.d(e,t,function(){return n[t]})}(r);var a=i(991),s=i(0);var o=function(t){i(989)},u=Object(s.a)(c.a,a.a,a.b,!1,o,null,null);e.default=u.exports},988:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=c(i(332));function c(t){return t&&t.__esModule?t:{default:t}}var r={components:{TabSwitcher:c(i(197)).default},data:function(){return{meta:{stickers:[]},path:""}},computed:{pack:function(){return this.$store.state.instance.stickers||[]}},methods:{clear:function(){this.meta={stickers:[]}},pick:function(t,e){var i=this,c=this.$store;fetch(t).then(function(t){t.blob().then(function(t){var r=new File([t],e,{mimetype:"image/png"}),a=new FormData;a.append("file",r),n.default.uploadMedia({store:c,formData:a}).then(function(t){i.$emit("uploaded",t),i.clear()},function(t){console.warn("Can't attach sticker"),console.warn(t),i.$emit("upload-failed","default")})})})}}};e.default=r},989:function(t,e,i){var n=i(990);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,i(2).default)("cc6cdea4",n,!0,{})},990:function(t,e,i){(t.exports=i(1)(!1)).push([t.i,".sticker-picker{width:100%;position:relative}.sticker-picker .tab-switcher{position:absolute;top:0;bottom:0;left:0;right:0}.sticker-picker .sticker-picker-content .sticker{display:inline-block;width:20%;height:20%}.sticker-picker .sticker-picker-content .sticker img{width:100%}.sticker-picker .sticker-picker-content .sticker img:hover{filter:drop-shadow(0 0 5px var(--link,#d8a070))}",""])},991:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return c});var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"sticker-picker"},[i("tab-switcher",{staticClass:"tab-switcher",attrs:{"render-only-focused":!0,"scrollable-tabs":""}},t._l(t.pack,function(e){return i("div",{key:e.path,staticClass:"sticker-picker-content",attrs:{"image-tooltip":e.meta.title,image:e.path+e.meta.tabIcon}},t._l(e.meta.stickers,function(n){return i("div",{key:n,staticClass:"sticker",on:{click:function(i){i.stopPropagation(),i.preventDefault(),t.pick(e.path+n,e.meta.title)}}},[i("img",{attrs:{src:e.path+n}})])}),0)}),0)],1)},c=[]}}]); -//# sourceMappingURL=2.48f39bc510b7c0a7fca6.js.map \ No newline at end of file diff --git a/priv/static/static/js/2.73375b727cef616c59b4.js b/priv/static/static/js/2.73375b727cef616c59b4.js new file mode 100644 index 000000000..ebfd9acbd --- /dev/null +++ b/priv/static/static/js/2.73375b727cef616c59b4.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1012:function(t,e,i){"use strict";i.r(e);var n=i(1013),c=i.n(n);for(var r in n)"default"!==r&&function(t){i.d(e,t,function(){return n[t]})}(r);var a=i(1016),s=i(0);var o=function(t){i(1014)},u=Object(s.a)(c.a,a.a,a.b,!1,o,null,null);e.default=u.exports},1013:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=c(i(348));function c(t){return t&&t.__esModule?t:{default:t}}var r={components:{TabSwitcher:c(i(205)).default},data:function(){return{meta:{stickers:[]},path:""}},computed:{pack:function(){return this.$store.state.instance.stickers||[]}},methods:{clear:function(){this.meta={stickers:[]}},pick:function(t,e){var i=this,c=this.$store;fetch(t).then(function(t){t.blob().then(function(t){var r=new File([t],e,{mimetype:"image/png"}),a=new FormData;a.append("file",r),n.default.uploadMedia({store:c,formData:a}).then(function(t){i.$emit("uploaded",t),i.clear()},function(t){console.warn("Can't attach sticker"),console.warn(t),i.$emit("upload-failed","default")})})})}}};e.default=r},1014:function(t,e,i){var n=i(1015);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,i(2).default)("cc6cdea4",n,!0,{})},1015:function(t,e,i){(t.exports=i(1)(!1)).push([t.i,".sticker-picker{width:100%;position:relative}.sticker-picker .tab-switcher{position:absolute;top:0;bottom:0;left:0;right:0}.sticker-picker .sticker-picker-content .sticker{display:inline-block;width:20%;height:20%}.sticker-picker .sticker-picker-content .sticker img{width:100%}.sticker-picker .sticker-picker-content .sticker img:hover{filter:drop-shadow(0 0 5px var(--link,#d8a070))}",""])},1016:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return c});var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"sticker-picker"},[i("tab-switcher",{staticClass:"tab-switcher",attrs:{"render-only-focused":!0,"scrollable-tabs":""}},t._l(t.pack,function(e){return i("div",{key:e.path,staticClass:"sticker-picker-content",attrs:{"image-tooltip":e.meta.title,image:e.path+e.meta.tabIcon}},t._l(e.meta.stickers,function(n){return i("div",{key:n,staticClass:"sticker",on:{click:function(i){i.stopPropagation(),i.preventDefault(),t.pick(e.path+n,e.meta.title)}}},[i("img",{attrs:{src:e.path+n}})])}),0)}),0)],1)},c=[]}}]); +//# sourceMappingURL=2.73375b727cef616c59b4.js.map \ No newline at end of file diff --git a/priv/static/static/js/2.48f39bc510b7c0a7fca6.js.map b/priv/static/static/js/2.73375b727cef616c59b4.js.map similarity index 92% rename from priv/static/static/js/2.48f39bc510b7c0a7fca6.js.map rename to priv/static/static/js/2.73375b727cef616c59b4.js.map index be87ffa46..d2c864eb3 100644 --- a/priv/static/static/js/2.48f39bc510b7c0a7fca6.js.map +++ b/priv/static/static/js/2.73375b727cef616c59b4.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./src/components/sticker_picker/sticker_picker.vue","webpack:///./src/components/sticker_picker/sticker_picker.js","webpack:///./src/components/sticker_picker/sticker_picker.vue?d6cd","webpack:///./src/components/sticker_picker/sticker_picker.vue?d5ea","webpack:///./src/components/sticker_picker/sticker_picker.vue?8003"],"names":["__webpack_require__","r","__webpack_exports__","_babel_loader_sticker_picker_js__WEBPACK_IMPORTED_MODULE_0__","_babel_loader_sticker_picker_js__WEBPACK_IMPORTED_MODULE_0___default","n","__WEBPACK_IMPORT_KEY__","key","d","_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70972e0c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_sticker_picker_vue__WEBPACK_IMPORTED_MODULE_1__","_node_modules_vue_loader_lib_runtime_component_normalizer__WEBPACK_IMPORTED_MODULE_2__","__vue_styles__","context","Component","Object","a","StickerPicker","components","TabSwitcher","data","meta","stickers","path","computed","pack","this","$store","state","instance","methods","clear","pick","sticker","name","_this","store","fetch","then","res","blob","file","File","mimetype","formData","FormData","append","statusPosterService","uploadMedia","fileData","$emit","error","console","warn","content","module","i","locals","exports","add","default","push","render","staticRenderFns","_vm","_h","$createElement","_c","_self","staticClass","attrs","render-only-focused","scrollable-tabs","_l","stickerpack","image-tooltip","title","image","tabIcon","on","click","$event","stopPropagation","preventDefault","src"],"mappings":"0FAAAA,EAAAC,EAAAC,GAAA,IAAAC,EAAAH,EAAA,KAAAI,EAAAJ,EAAAK,EAAAF,GAAA,QAAAG,KAAAH,EAAA,YAAAG,GAAA,SAAAC,GAAAP,EAAAQ,EAAAN,EAAAK,EAAA,kBAAAJ,EAAAI,KAAA,CAAAD,GAAA,IAAAG,EAAAT,EAAA,KAAAU,EAAAV,EAAA,GAQA,IAEAW,EAVA,SAAAC,GACEZ,EAAQ,MAeVa,EAAgBC,OAAAJ,EAAA,EAAAI,CACdV,EAAAW,EACAN,EAAA,EACAA,EAAA,GAXF,EAaAE,EATA,KAEA,MAYeT,EAAA,QAAAW,EAAiB,2FCzBhC,QAAAb,EAAA,yDAGA,IAAMgB,EAAgB,CACpBC,WAAY,CACVC,cAJJlB,EAAA,MAIIkB,SAEFC,KAJoB,WAKlB,MAAO,CACLC,KAAM,CACJC,SAAU,IAEZC,KAAM,KAGVC,SAAU,CACRC,KADQ,WAEN,OAAOC,KAAKC,OAAOC,MAAMC,SAASP,UAAY,KAGlDQ,QAAS,CACPC,MADO,WAELL,KAAKL,KAAO,CACVC,SAAU,KAGdU,KANO,SAMDC,EAASC,GAAM,IAAAC,EAAAT,KACbU,EAAQV,KAAKC,OAEnBU,MAAMJ,GACHK,KAAK,SAACC,GACLA,EAAIC,OAAOF,KAAK,SAACE,GACf,IAAIC,EAAO,IAAIC,KAAK,CAACF,GAAON,EAAM,CAAES,SAAU,cAC1CC,EAAW,IAAIC,SACnBD,EAASE,OAAO,OAAQL,GACxBM,UAAoBC,YAAY,CAAEZ,QAAOQ,aACtCN,KAAK,SAACW,GACLd,EAAKe,MAAM,WAAYD,GACvBd,EAAKJ,SACJ,SAACoB,GACFC,QAAQC,KAAK,wBACbD,QAAQC,KAAKF,GACbhB,EAAKe,MAAM,gBAAiB,8BAQ7BjC,uBChDf,IAAAqC,EAAcrD,EAAQ,KACtB,iBAAAqD,MAAA,EAA4CC,EAAAC,EAASF,EAAA,MACrDA,EAAAG,SAAAF,EAAAG,QAAAJ,EAAAG,SAGAE,EADU1D,EAAQ,GAAgE2D,SAClF,WAAAN,GAAA,4BCRAC,EAAAG,QAA2BzD,EAAQ,EAARA,EAA0D,IAKrF4D,KAAA,CAAcN,EAAAC,EAAS,oYAAoY,uCCL3ZvD,EAAAQ,EAAAN,EAAA,sBAAA2D,IAAA7D,EAAAQ,EAAAN,EAAA,sBAAA4D,IAAA,IAAAD,EAAA,WAA0B,IAAAE,EAAAtC,KAAauC,EAAAD,EAAAE,eAA0BC,EAAAH,EAAAI,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAiBE,YAAA,kBAA6B,CAAAF,EAAA,gBAAqBE,YAAA,eAAAC,MAAA,CAAkCC,uBAAA,EAAAC,kBAAA,KAAiDR,EAAAS,GAAAT,EAAA,cAAAU,GAAyC,OAAAP,EAAA,OAAiB3D,IAAAkE,EAAAnD,KAAA8C,YAAA,yBAAAC,MAAA,CAAiEK,gBAAAD,EAAArD,KAAAuD,MAAAC,MAAAH,EAAAnD,KAAAmD,EAAArD,KAAAyD,UAA4Fd,EAAAS,GAAAC,EAAArD,KAAA,kBAAAY,GAAsD,OAAAkC,EAAA,OAAiB3D,IAAAyB,EAAAoC,YAAA,UAAAU,GAAA,CAAsCC,MAAA,SAAAC,GAAyBA,EAAAC,kBAAyBD,EAAAE,iBAAwBnB,EAAAhC,KAAA0C,EAAAnD,KAAAU,EAAAyC,EAAArD,KAAAuD,UAA+D,CAAAT,EAAA,OAAYG,MAAA,CAAOc,IAAAV,EAAAnD,KAAAU,SAAsC,KAAK,QAC1vB8B,EAAA","file":"static/js/2.48f39bc510b7c0a7fca6.js","sourcesContent":["function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./sticker_picker.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./sticker_picker.js\"\nimport __vue_script__ from \"!!babel-loader!./sticker_picker.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-70972e0c\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./sticker_picker.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","/* eslint-env browser */\nimport statusPosterService from '../../services/status_poster/status_poster.service.js'\nimport TabSwitcher from '../tab_switcher/tab_switcher.js'\n\nconst StickerPicker = {\n components: {\n TabSwitcher\n },\n data () {\n return {\n meta: {\n stickers: []\n },\n path: ''\n }\n },\n computed: {\n pack () {\n return this.$store.state.instance.stickers || []\n }\n },\n methods: {\n clear () {\n this.meta = {\n stickers: []\n }\n },\n pick (sticker, name) {\n const store = this.$store\n // TODO remove this workaround by finding a way to bypass reuploads\n fetch(sticker)\n .then((res) => {\n res.blob().then((blob) => {\n var file = new File([blob], name, { mimetype: 'image/png' })\n var formData = new FormData()\n formData.append('file', file)\n statusPosterService.uploadMedia({ store, formData })\n .then((fileData) => {\n this.$emit('uploaded', fileData)\n this.clear()\n }, (error) => {\n console.warn(\"Can't attach sticker\")\n console.warn(error)\n this.$emit('upload-failed', 'default')\n })\n })\n })\n }\n }\n}\n\nexport default StickerPicker\n","// style-loader: Adds some css to the DOM by adding a \n","import * as DateUtils from 'src/services/date_utils/date_utils.js'\nimport { uniq } from 'lodash'\n\nexport default {\n name: 'PollForm',\n props: ['visible'],\n data: () => ({\n pollType: 'single',\n options: ['', ''],\n expiryAmount: 10,\n expiryUnit: 'minutes'\n }),\n computed: {\n pollLimits () {\n return this.$store.state.instance.pollLimits\n },\n maxOptions () {\n return this.pollLimits.max_options\n },\n maxLength () {\n return this.pollLimits.max_option_chars\n },\n expiryUnits () {\n const allUnits = ['minutes', 'hours', 'days']\n const expiry = this.convertExpiryFromUnit\n return allUnits.filter(\n unit => this.pollLimits.max_expiration >= expiry(unit, 1)\n )\n },\n minExpirationInCurrentUnit () {\n return Math.ceil(\n this.convertExpiryToUnit(\n this.expiryUnit,\n this.pollLimits.min_expiration\n )\n )\n },\n maxExpirationInCurrentUnit () {\n return Math.floor(\n this.convertExpiryToUnit(\n this.expiryUnit,\n this.pollLimits.max_expiration\n )\n )\n }\n },\n methods: {\n clear () {\n this.pollType = 'single'\n this.options = ['', '']\n this.expiryAmount = 10\n this.expiryUnit = 'minutes'\n },\n nextOption (index) {\n const element = this.$el.querySelector(`#poll-${index + 1}`)\n if (element) {\n element.focus()\n } else {\n // Try adding an option and try focusing on it\n const addedOption = this.addOption()\n if (addedOption) {\n this.$nextTick(function () {\n this.nextOption(index)\n })\n }\n }\n },\n addOption () {\n if (this.options.length < this.maxOptions) {\n this.options.push('')\n return true\n }\n return false\n },\n deleteOption (index, event) {\n if (this.options.length > 2) {\n this.options.splice(index, 1)\n }\n },\n convertExpiryToUnit (unit, amount) {\n // Note: we want seconds and not milliseconds\n switch (unit) {\n case 'minutes': return (1000 * amount) / DateUtils.MINUTE\n case 'hours': return (1000 * amount) / DateUtils.HOUR\n case 'days': return (1000 * amount) / DateUtils.DAY\n }\n },\n convertExpiryFromUnit (unit, amount) {\n // Note: we want seconds and not milliseconds\n switch (unit) {\n case 'minutes': return 0.001 * amount * DateUtils.MINUTE\n case 'hours': return 0.001 * amount * DateUtils.HOUR\n case 'days': return 0.001 * amount * DateUtils.DAY\n }\n },\n expiryAmountChange () {\n this.expiryAmount =\n Math.max(this.minExpirationInCurrentUnit, this.expiryAmount)\n this.expiryAmount =\n Math.min(this.maxExpirationInCurrentUnit, this.expiryAmount)\n this.updatePollToParent()\n },\n updatePollToParent () {\n const expiresIn = this.convertExpiryFromUnit(\n this.expiryUnit,\n this.expiryAmount\n )\n\n const options = uniq(this.options.filter(option => option !== ''))\n if (options.length < 2) {\n this.$emit('update-poll', { error: this.$t('polls.not_enough_options') })\n return\n }\n this.$emit('update-poll', {\n options,\n multiple: this.pollType === 'multiple',\n expiresIn\n })\n }\n }\n}\n","import UserAvatar from '../user_avatar/user_avatar.vue'\nimport RemoteFollow from '../remote_follow/remote_follow.vue'\nimport ProgressButton from '../progress_button/progress_button.vue'\nimport FollowButton from '../follow_button/follow_button.vue'\nimport ModerationTools from '../moderation_tools/moderation_tools.vue'\nimport AccountActions from '../account_actions/account_actions.vue'\nimport { hex2rgb } from '../../services/color_convert/color_convert.js'\nimport generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'\nimport { mapGetters } from 'vuex'\n\nexport default {\n props: [\n 'user', 'switcher', 'selected', 'hideBio', 'rounded', 'bordered', 'allowZoomingAvatar'\n ],\n data () {\n return {\n followRequestInProgress: false,\n betterShadow: this.$store.state.interface.browserSupport.cssFilter\n }\n },\n created () {\n this.$store.dispatch('fetchUserRelationship', this.user.id)\n },\n computed: {\n classes () {\n return [{\n 'user-card-rounded-t': this.rounded === 'top', // set border-top-left-radius and border-top-right-radius\n 'user-card-rounded': this.rounded === true, // set border-radius for all sides\n 'user-card-bordered': this.bordered === true // set border for all sides\n }]\n },\n style () {\n const color = this.$store.getters.mergedConfig.customTheme.colors\n ? this.$store.getters.mergedConfig.customTheme.colors.bg // v2\n : this.$store.getters.mergedConfig.colors.bg // v1\n\n if (color) {\n const rgb = (typeof color === 'string') ? hex2rgb(color) : color\n const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .5)`\n\n return {\n backgroundColor: `rgb(${Math.floor(rgb.r * 0.53)}, ${Math.floor(rgb.g * 0.56)}, ${Math.floor(rgb.b * 0.59)})`,\n backgroundImage: [\n `linear-gradient(to bottom, ${tintColor}, ${tintColor})`,\n `url(${this.user.cover_photo})`\n ].join(', ')\n }\n }\n },\n isOtherUser () {\n return this.user.id !== this.$store.state.users.currentUser.id\n },\n subscribeUrl () {\n // eslint-disable-next-line no-undef\n const serverUrl = new URL(this.user.statusnet_profile_url)\n return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus`\n },\n loggedIn () {\n return this.$store.state.users.currentUser\n },\n dailyAvg () {\n const days = Math.ceil((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000))\n return Math.round(this.user.statuses_count / days)\n },\n userHighlightType: {\n get () {\n const data = this.$store.getters.mergedConfig.highlight[this.user.screen_name]\n return (data && data.type) || 'disabled'\n },\n set (type) {\n const data = this.$store.getters.mergedConfig.highlight[this.user.screen_name]\n if (type !== 'disabled') {\n this.$store.dispatch('setHighlight', { user: this.user.screen_name, color: (data && data.color) || '#FFFFFF', type })\n } else {\n this.$store.dispatch('setHighlight', { user: this.user.screen_name, color: undefined })\n }\n },\n ...mapGetters(['mergedConfig'])\n },\n userHighlightColor: {\n get () {\n const data = this.$store.getters.mergedConfig.highlight[this.user.screen_name]\n return data && data.color\n },\n set (color) {\n this.$store.dispatch('setHighlight', { user: this.user.screen_name, color })\n }\n },\n visibleRole () {\n const rights = this.user.rights\n if (!rights) { return }\n const validRole = rights.admin || rights.moderator\n const roleTitle = rights.admin ? 'admin' : 'moderator'\n return validRole && roleTitle\n },\n ...mapGetters(['mergedConfig'])\n },\n components: {\n UserAvatar,\n RemoteFollow,\n ModerationTools,\n AccountActions,\n ProgressButton,\n FollowButton\n },\n methods: {\n muteUser () {\n this.$store.dispatch('muteUser', this.user.id)\n },\n unmuteUser () {\n this.$store.dispatch('unmuteUser', this.user.id)\n },\n subscribeUser () {\n return this.$store.dispatch('subscribeUser', this.user.id)\n },\n unsubscribeUser () {\n return this.$store.dispatch('unsubscribeUser', this.user.id)\n },\n setProfileView (v) {\n if (this.switcher) {\n const store = this.$store\n store.commit('setProfileView', { v })\n }\n },\n linkClicked ({ target }) {\n if (target.tagName === 'SPAN') {\n target = target.parentNode\n }\n if (target.tagName === 'A') {\n window.open(target.href, '_blank')\n }\n },\n userProfileLink (user) {\n return generateProfileLink(\n user.id, user.screen_name,\n this.$store.state.instance.restrictedNicknames\n )\n },\n zoomAvatar () {\n const attachment = {\n url: this.user.profile_image_url_original,\n mimetype: 'image'\n }\n this.$store.dispatch('setMedia', [attachment])\n this.$store.dispatch('setCurrent', attachment)\n }\n }\n}\n","import StillImage from '../still-image/still-image.vue'\n\nconst UserAvatar = {\n props: [\n 'user',\n 'betterShadow',\n 'compact'\n ],\n data () {\n return {\n showPlaceholder: false\n }\n },\n components: {\n StillImage\n },\n computed: {\n imgSrc () {\n return this.showPlaceholder ? '/images/avi.png' : this.user.profile_image_url_original\n }\n },\n methods: {\n imageLoadError () {\n this.showPlaceholder = true\n }\n },\n watch: {\n src () {\n this.showPlaceholder = false\n }\n }\n}\n\nexport default UserAvatar\n","export default {\n props: [ 'user' ],\n computed: {\n subscribeUrl () {\n // eslint-disable-next-line no-undef\n const serverUrl = new URL(this.user.statusnet_profile_url)\n return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus`\n }\n }\n}\n","\n\n\n","import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate'\nexport default {\n props: ['user', 'labelFollowing', 'buttonClass'],\n data () {\n return {\n inProgress: false\n }\n },\n computed: {\n isPressed () {\n return this.inProgress || this.user.following\n },\n title () {\n if (this.inProgress || this.user.following) {\n return this.$t('user_card.follow_unfollow')\n } else if (this.user.requested) {\n return this.$t('user_card.follow_again')\n } else {\n return this.$t('user_card.follow')\n }\n },\n label () {\n if (this.inProgress) {\n return this.$t('user_card.follow_progress')\n } else if (this.user.following) {\n return this.labelFollowing || this.$t('user_card.following')\n } else if (this.user.requested) {\n return this.$t('user_card.follow_sent')\n } else {\n return this.$t('user_card.follow')\n }\n }\n },\n methods: {\n onClick () {\n this.user.following ? this.unfollow() : this.follow()\n },\n follow () {\n this.inProgress = true\n requestFollow(this.user, this.$store).then(() => {\n this.inProgress = false\n })\n },\n unfollow () {\n const store = this.$store\n this.inProgress = true\n requestUnfollow(this.user, store).then(() => {\n this.inProgress = false\n store.commit('removeStatus', { timeline: 'friends', userId: this.user.id })\n })\n }\n }\n}\n","import DialogModal from '../dialog_modal/dialog_modal.vue'\n\nconst FORCE_NSFW = 'mrf_tag:media-force-nsfw'\nconst STRIP_MEDIA = 'mrf_tag:media-strip'\nconst FORCE_UNLISTED = 'mrf_tag:force-unlisted'\nconst DISABLE_REMOTE_SUBSCRIPTION = 'mrf_tag:disable-remote-subscription'\nconst DISABLE_ANY_SUBSCRIPTION = 'mrf_tag:disable-any-subscription'\nconst SANDBOX = 'mrf_tag:sandbox'\nconst QUARANTINE = 'mrf_tag:quarantine'\n\nconst ModerationTools = {\n props: [\n 'user'\n ],\n data () {\n return {\n showDropDown: false,\n tags: {\n FORCE_NSFW,\n STRIP_MEDIA,\n FORCE_UNLISTED,\n DISABLE_REMOTE_SUBSCRIPTION,\n DISABLE_ANY_SUBSCRIPTION,\n SANDBOX,\n QUARANTINE\n },\n showDeleteUserDialog: false\n }\n },\n components: {\n DialogModal\n },\n computed: {\n tagsSet () {\n return new Set(this.user.tags)\n },\n hasTagPolicy () {\n return this.$store.state.instance.tagPolicyAvailable\n }\n },\n methods: {\n hasTag (tagName) {\n return this.tagsSet.has(tagName)\n },\n toggleTag (tag) {\n const store = this.$store\n if (this.tagsSet.has(tag)) {\n store.state.api.backendInteractor.untagUser(this.user, tag).then(response => {\n if (!response.ok) { return }\n store.commit('untagUser', { user: this.user, tag })\n })\n } else {\n store.state.api.backendInteractor.tagUser(this.user, tag).then(response => {\n if (!response.ok) { return }\n store.commit('tagUser', { user: this.user, tag })\n })\n }\n },\n toggleRight (right) {\n const store = this.$store\n if (this.user.rights[right]) {\n store.state.api.backendInteractor.deleteRight(this.user, right).then(response => {\n if (!response.ok) { return }\n store.commit('updateRight', { user: this.user, right: right, value: false })\n })\n } else {\n store.state.api.backendInteractor.addRight(this.user, right).then(response => {\n if (!response.ok) { return }\n store.commit('updateRight', { user: this.user, right: right, value: true })\n })\n }\n },\n toggleActivationStatus () {\n const store = this.$store\n const status = !!this.user.deactivated\n store.state.api.backendInteractor.setActivationStatus(this.user, status).then(response => {\n if (!response.ok) { return }\n store.commit('updateActivationStatus', { user: this.user, status: status })\n })\n },\n deleteUserDialog (show) {\n this.showDeleteUserDialog = show\n },\n deleteUser () {\n const store = this.$store\n const user = this.user\n const { id, name } = user\n store.state.api.backendInteractor.deleteUser(user)\n .then(e => {\n this.$store.dispatch('markStatusesAsDeleted', status => user.id === status.user.id)\n const isProfile = this.$route.name === 'external-user-profile' || this.$route.name === 'user-profile'\n const isTargetUser = this.$route.params.name === name || this.$route.params.id === id\n if (isProfile && isTargetUser) {\n window.history.back()\n }\n })\n }\n }\n}\n\nexport default ModerationTools\n","const DialogModal = {\n props: {\n darkOverlay: {\n default: true,\n type: Boolean\n },\n onCancel: {\n default: () => {},\n type: Function\n }\n }\n}\n\nexport default DialogModal\n","import ProgressButton from '../progress_button/progress_button.vue'\n\nconst AccountActions = {\n props: [\n 'user'\n ],\n data () {\n return { }\n },\n components: {\n ProgressButton\n },\n methods: {\n showRepeats () {\n this.$store.dispatch('showReblogs', this.user.id)\n },\n hideRepeats () {\n this.$store.dispatch('hideReblogs', this.user.id)\n },\n blockUser () {\n this.$store.dispatch('blockUser', this.user.id)\n },\n unblockUser () {\n this.$store.dispatch('unblockUser', this.user.id)\n },\n reportUser () {\n this.$store.dispatch('openUserReportingModal', this.user.id)\n },\n mentionUser () {\n this.$store.dispatch('openPostStatusModal', { replyTo: true, repliedUser: this.user })\n }\n }\n}\n\nexport default AccountActions\n","import Attachment from '../attachment/attachment.vue'\nimport { chunk, last, dropRight, sumBy } from 'lodash'\n\nconst Gallery = {\n props: [\n 'attachments',\n 'nsfw',\n 'setMedia'\n ],\n data () {\n return {\n sizes: {}\n }\n },\n components: { Attachment },\n computed: {\n rows () {\n if (!this.attachments) {\n return []\n }\n const rows = chunk(this.attachments, 3)\n if (last(rows).length === 1 && rows.length > 1) {\n // if 1 attachment on last row -> add it to the previous row instead\n const lastAttachment = last(rows)[0]\n const allButLastRow = dropRight(rows)\n last(allButLastRow).push(lastAttachment)\n return allButLastRow\n }\n return rows\n },\n useContainFit () {\n return this.$store.getters.mergedConfig.useContainFit\n }\n },\n methods: {\n onNaturalSizeLoad (id, size) {\n this.$set(this.sizes, id, size)\n },\n rowStyle (itemsPerRow) {\n return { 'padding-bottom': `${(100 / (itemsPerRow + 0.6))}%` }\n },\n itemStyle (id, row) {\n const total = sumBy(row, item => this.getAspectRatio(item.id))\n return { flex: `${this.getAspectRatio(id) / total} 1 0%` }\n },\n getAspectRatio (id) {\n const size = this.sizes[id]\n return size ? size.width / size.height : 1\n }\n }\n}\n\nexport default Gallery\n","const LinkPreview = {\n name: 'LinkPreview',\n props: [\n 'card',\n 'size',\n 'nsfw'\n ],\n data () {\n return {\n imageLoaded: false\n }\n },\n computed: {\n useImage () {\n // Currently BE shoudn't give cards if tagged NSFW, this is a bit paranoid\n // as it makes sure to hide the image if somehow NSFW tagged preview can\n // exist.\n return this.card.image && !this.nsfw && this.size !== 'hide'\n },\n useDescription () {\n return this.card.description && /\\S/.test(this.card.description)\n }\n },\n created () {\n if (this.useImage) {\n const newImg = new Image()\n newImg.onload = () => {\n this.imageLoaded = true\n }\n newImg.src = this.card.image\n }\n }\n}\n\nexport default LinkPreview\n","import UserAvatar from '../user_avatar/user_avatar.vue'\nimport generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'\n\nconst AvatarList = {\n props: ['users'],\n computed: {\n slicedUsers () {\n return this.users ? this.users.slice(0, 15) : []\n }\n },\n components: {\n UserAvatar\n },\n methods: {\n userProfileLink (user) {\n return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)\n }\n }\n}\n\nexport default AvatarList\n","import { find } from 'lodash'\n\nconst StatusPopover = {\n name: 'StatusPopover',\n props: [\n 'statusId'\n ],\n data () {\n return {\n popperOptions: {\n modifiers: {\n preventOverflow: { padding: { top: 50 }, boundariesElement: 'viewport' }\n }\n }\n }\n },\n computed: {\n status () {\n return find(this.$store.state.statuses.allStatuses, { id: this.statusId })\n }\n },\n components: {\n Status: () => import('../status/status.vue')\n },\n methods: {\n enter () {\n if (!this.status) {\n this.$store.dispatch('fetchStatus', this.statusId)\n }\n }\n }\n}\n\nexport default StatusPopover\n","import { reduce, filter, findIndex, clone, get } from 'lodash'\nimport Status from '../status/status.vue'\n\nconst sortById = (a, b) => {\n const idA = a.type === 'retweet' ? a.retweeted_status.id : a.id\n const idB = b.type === 'retweet' ? b.retweeted_status.id : b.id\n const seqA = Number(idA)\n const seqB = Number(idB)\n const isSeqA = !Number.isNaN(seqA)\n const isSeqB = !Number.isNaN(seqB)\n if (isSeqA && isSeqB) {\n return seqA < seqB ? -1 : 1\n } else if (isSeqA && !isSeqB) {\n return -1\n } else if (!isSeqA && isSeqB) {\n return 1\n } else {\n return idA < idB ? -1 : 1\n }\n}\n\nconst sortAndFilterConversation = (conversation, statusoid) => {\n if (statusoid.type === 'retweet') {\n conversation = filter(\n conversation,\n (status) => (status.type === 'retweet' || status.id !== statusoid.retweeted_status.id)\n )\n } else {\n conversation = filter(conversation, (status) => status.type !== 'retweet')\n }\n return conversation.filter(_ => _).sort(sortById)\n}\n\nconst conversation = {\n data () {\n return {\n highlight: null,\n expanded: false\n }\n },\n props: [\n 'statusId',\n 'collapsable',\n 'isPage',\n 'pinnedStatusIdsObject',\n 'inProfile'\n ],\n created () {\n if (this.isPage) {\n this.fetchConversation()\n }\n },\n computed: {\n status () {\n return this.$store.state.statuses.allStatusesObject[this.statusId]\n },\n originalStatusId () {\n if (this.status.retweeted_status) {\n return this.status.retweeted_status.id\n } else {\n return this.statusId\n }\n },\n conversationId () {\n return this.getConversationId(this.statusId)\n },\n conversation () {\n if (!this.status) {\n return []\n }\n\n if (!this.isExpanded) {\n return [this.status]\n }\n\n const conversation = clone(this.$store.state.statuses.conversationsObject[this.conversationId])\n const statusIndex = findIndex(conversation, { id: this.originalStatusId })\n if (statusIndex !== -1) {\n conversation[statusIndex] = this.status\n }\n\n return sortAndFilterConversation(conversation, this.status)\n },\n replies () {\n let i = 1\n // eslint-disable-next-line camelcase\n return reduce(this.conversation, (result, { id, in_reply_to_status_id }) => {\n /* eslint-disable camelcase */\n const irid = in_reply_to_status_id\n /* eslint-enable camelcase */\n if (irid) {\n result[irid] = result[irid] || []\n result[irid].push({\n name: `#${i}`,\n id: id\n })\n }\n i++\n return result\n }, {})\n },\n isExpanded () {\n return this.expanded || this.isPage\n }\n },\n components: {\n Status\n },\n watch: {\n statusId (newVal, oldVal) {\n const newConversationId = this.getConversationId(newVal)\n const oldConversationId = this.getConversationId(oldVal)\n if (newConversationId && oldConversationId && newConversationId === oldConversationId) {\n this.setHighlight(this.originalStatusId)\n } else {\n this.fetchConversation()\n }\n },\n expanded (value) {\n if (value) {\n this.fetchConversation()\n }\n }\n },\n methods: {\n fetchConversation () {\n if (this.status) {\n this.$store.state.api.backendInteractor.fetchConversation({ id: this.statusId })\n .then(({ ancestors, descendants }) => {\n this.$store.dispatch('addNewStatuses', { statuses: ancestors })\n this.$store.dispatch('addNewStatuses', { statuses: descendants })\n this.setHighlight(this.originalStatusId)\n })\n } else {\n this.$store.state.api.backendInteractor.fetchStatus({ id: this.statusId })\n .then((status) => {\n this.$store.dispatch('addNewStatuses', { statuses: [status] })\n this.fetchConversation()\n })\n }\n },\n getReplies (id) {\n return this.replies[id] || []\n },\n focused (id) {\n return (this.isExpanded) && id === this.statusId\n },\n setHighlight (id) {\n if (!id) return\n this.highlight = id\n this.$store.dispatch('fetchFavsAndRepeats', id)\n },\n getHighlight () {\n return this.isExpanded ? this.highlight : null\n },\n toggleExpanded () {\n this.expanded = !this.expanded\n },\n getConversationId (statusId) {\n const status = this.$store.state.statuses.allStatusesObject[statusId]\n return get(status, 'retweeted_status.statusnet_conversation_id', get(status, 'statusnet_conversation_id'))\n }\n }\n}\n\nexport default conversation\n","import Timeline from '../timeline/timeline.vue'\nconst PublicAndExternalTimeline = {\n components: {\n Timeline\n },\n computed: {\n timeline () { return this.$store.state.statuses.timelines.publicAndExternal }\n },\n created () {\n this.$store.dispatch('startFetchingTimeline', { timeline: 'publicAndExternal' })\n },\n destroyed () {\n this.$store.dispatch('stopFetching', 'publicAndExternal')\n }\n}\n\nexport default PublicAndExternalTimeline\n","import Timeline from '../timeline/timeline.vue'\nconst FriendsTimeline = {\n components: {\n Timeline\n },\n computed: {\n timeline () { return this.$store.state.statuses.timelines.friends }\n }\n}\n\nexport default FriendsTimeline\n","import Timeline from '../timeline/timeline.vue'\n\nconst TagTimeline = {\n created () {\n this.$store.commit('clearTimeline', { timeline: 'tag' })\n this.$store.dispatch('startFetchingTimeline', { timeline: 'tag', tag: this.tag })\n },\n components: {\n Timeline\n },\n computed: {\n tag () { return this.$route.params.tag },\n timeline () { return this.$store.state.statuses.timelines.tag }\n },\n watch: {\n tag () {\n this.$store.commit('clearTimeline', { timeline: 'tag' })\n this.$store.dispatch('startFetchingTimeline', { timeline: 'tag', tag: this.tag })\n }\n },\n destroyed () {\n this.$store.dispatch('stopFetching', 'tag')\n }\n}\n\nexport default TagTimeline\n","import Conversation from '../conversation/conversation.vue'\n\nconst conversationPage = {\n components: {\n Conversation\n },\n computed: {\n statusId () {\n return this.$route.params.id\n }\n }\n}\n\nexport default conversationPage\n","import Notifications from '../notifications/notifications.vue'\n\nconst tabModeDict = {\n mentions: ['mention'],\n 'likes+repeats': ['repeat', 'like'],\n follows: ['follow']\n}\n\nconst Interactions = {\n data () {\n return {\n filterMode: tabModeDict['mentions']\n }\n },\n methods: {\n onModeSwitch (key) {\n this.filterMode = tabModeDict[key]\n }\n },\n components: {\n Notifications\n }\n}\n\nexport default Interactions\n","import Notification from '../notification/notification.vue'\nimport notificationsFetcher from '../../services/notifications_fetcher/notifications_fetcher.service.js'\nimport {\n notificationsFromStore,\n visibleNotificationsFromStore,\n unseenNotificationsFromStore\n} from '../../services/notification_utils/notification_utils.js'\n\nconst Notifications = {\n props: {\n // Disables display of panel header\n noHeading: Boolean,\n // Disables panel styles, unread mark, potentially other notification-related actions\n // meant for \"Interactions\" timeline\n minimalMode: Boolean,\n // Custom filter mode, an array of strings, possible values 'mention', 'repeat', 'like', 'follow', used to override global filter for use in \"Interactions\" timeline\n filterMode: Array\n },\n data () {\n return {\n bottomedOut: false\n }\n },\n computed: {\n mainClass () {\n return this.minimalMode ? '' : 'panel panel-default'\n },\n notifications () {\n return notificationsFromStore(this.$store)\n },\n error () {\n return this.$store.state.statuses.notifications.error\n },\n unseenNotifications () {\n return unseenNotificationsFromStore(this.$store)\n },\n visibleNotifications () {\n return visibleNotificationsFromStore(this.$store, this.filterMode)\n },\n unseenCount () {\n return this.unseenNotifications.length\n },\n loading () {\n return this.$store.state.statuses.notifications.loading\n }\n },\n components: {\n Notification\n },\n watch: {\n unseenCount (count) {\n if (count > 0) {\n this.$store.dispatch('setPageTitle', `(${count})`)\n } else {\n this.$store.dispatch('setPageTitle', '')\n }\n }\n },\n methods: {\n markAsSeen () {\n this.$store.dispatch('markNotificationsAsSeen')\n },\n fetchOlderNotifications () {\n if (this.loading) {\n return\n }\n\n const store = this.$store\n const credentials = store.state.users.currentUser.credentials\n store.commit('setNotificationsLoading', { value: true })\n notificationsFetcher.fetchAndUpdate({\n store,\n credentials,\n older: true\n }).then(notifs => {\n store.commit('setNotificationsLoading', { value: false })\n if (notifs.length === 0) {\n this.bottomedOut = true\n }\n })\n }\n }\n}\n\nexport default Notifications\n","import Status from '../status/status.vue'\nimport UserAvatar from '../user_avatar/user_avatar.vue'\nimport UserCard from '../user_card/user_card.vue'\nimport Timeago from '../timeago/timeago.vue'\nimport { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'\nimport generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'\n\nconst Notification = {\n data () {\n return {\n userExpanded: false,\n betterShadow: this.$store.state.interface.browserSupport.cssFilter,\n unmuted: false\n }\n },\n props: [ 'notification' ],\n components: {\n Status,\n UserAvatar,\n UserCard,\n Timeago\n },\n methods: {\n toggleUserExpanded () {\n this.userExpanded = !this.userExpanded\n },\n generateUserProfileLink (user) {\n return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)\n },\n getUser (notification) {\n return this.$store.state.users.usersObject[notification.from_profile.id]\n },\n toggleMute () {\n this.unmuted = !this.unmuted\n }\n },\n computed: {\n userClass () {\n return highlightClass(this.notification.from_profile)\n },\n userStyle () {\n const highlight = this.$store.getters.mergedConfig.highlight\n const user = this.notification.from_profile\n return highlightStyle(highlight[user.screen_name])\n },\n userInStore () {\n return this.$store.getters.findUser(this.notification.from_profile.id)\n },\n user () {\n if (this.userInStore) {\n return this.userInStore\n }\n return this.notification.from_profile\n },\n userProfileLink () {\n return this.generateUserProfileLink(this.user)\n },\n needMute () {\n return this.user.muted\n }\n }\n}\n\nexport default Notification\n","import Timeline from '../timeline/timeline.vue'\n\nconst DMs = {\n computed: {\n timeline () {\n return this.$store.state.statuses.timelines.dms\n }\n },\n components: {\n Timeline\n }\n}\n\nexport default DMs\n","import get from 'lodash/get'\nimport UserCard from '../user_card/user_card.vue'\nimport FollowCard from '../follow_card/follow_card.vue'\nimport Timeline from '../timeline/timeline.vue'\nimport Conversation from '../conversation/conversation.vue'\nimport List from '../list/list.vue'\nimport withLoadMore from '../../hocs/with_load_more/with_load_more'\n\nconst FollowerList = withLoadMore({\n fetch: (props, $store) => $store.dispatch('fetchFollowers', props.userId),\n select: (props, $store) => get($store.getters.findUser(props.userId), 'followerIds', []).map(id => $store.getters.findUser(id)),\n destroy: (props, $store) => $store.dispatch('clearFollowers', props.userId),\n childPropName: 'items',\n additionalPropNames: ['userId']\n})(List)\n\nconst FriendList = withLoadMore({\n fetch: (props, $store) => $store.dispatch('fetchFriends', props.userId),\n select: (props, $store) => get($store.getters.findUser(props.userId), 'friendIds', []).map(id => $store.getters.findUser(id)),\n destroy: (props, $store) => $store.dispatch('clearFriends', props.userId),\n childPropName: 'items',\n additionalPropNames: ['userId']\n})(List)\n\nconst defaultTabKey = 'statuses'\n\nconst UserProfile = {\n data () {\n return {\n error: false,\n userId: null,\n tab: defaultTabKey\n }\n },\n created () {\n const routeParams = this.$route.params\n this.load(routeParams.name || routeParams.id)\n this.tab = get(this.$route, 'query.tab', defaultTabKey)\n },\n destroyed () {\n this.stopFetching()\n },\n computed: {\n timeline () {\n return this.$store.state.statuses.timelines.user\n },\n favorites () {\n return this.$store.state.statuses.timelines.favorites\n },\n media () {\n return this.$store.state.statuses.timelines.media\n },\n isUs () {\n return this.userId && this.$store.state.users.currentUser.id &&\n this.userId === this.$store.state.users.currentUser.id\n },\n user () {\n return this.$store.getters.findUser(this.userId)\n },\n isExternal () {\n return this.$route.name === 'external-user-profile'\n },\n followsTabVisible () {\n return this.isUs || !this.user.hide_follows\n },\n followersTabVisible () {\n return this.isUs || !this.user.hide_followers\n }\n },\n methods: {\n load (userNameOrId) {\n const startFetchingTimeline = (timeline, userId) => {\n // Clear timeline only if load another user's profile\n if (userId !== this.$store.state.statuses.timelines[timeline].userId) {\n this.$store.commit('clearTimeline', { timeline })\n }\n this.$store.dispatch('startFetchingTimeline', { timeline, userId })\n }\n\n const loadById = (userId) => {\n this.userId = userId\n startFetchingTimeline('user', userId)\n startFetchingTimeline('media', userId)\n if (this.isUs) {\n startFetchingTimeline('favorites', userId)\n }\n // Fetch all pinned statuses immediately\n this.$store.dispatch('fetchPinnedStatuses', userId)\n }\n\n // Reset view\n this.userId = null\n this.error = false\n\n // Check if user data is already loaded in store\n const user = this.$store.getters.findUser(userNameOrId)\n if (user) {\n loadById(user.id)\n } else {\n this.$store.dispatch('fetchUser', userNameOrId)\n .then(({ id }) => loadById(id))\n .catch((reason) => {\n const errorMessage = get(reason, 'error.error')\n if (errorMessage === 'No user with such user_id') { // Known error\n this.error = this.$t('user_profile.profile_does_not_exist')\n } else if (errorMessage) {\n this.error = errorMessage\n } else {\n this.error = this.$t('user_profile.profile_loading_error')\n }\n })\n }\n },\n stopFetching () {\n this.$store.dispatch('stopFetching', 'user')\n this.$store.dispatch('stopFetching', 'favorites')\n this.$store.dispatch('stopFetching', 'media')\n },\n switchUser (userNameOrId) {\n this.stopFetching()\n this.load(userNameOrId)\n },\n onTabSwitch (tab) {\n this.tab = tab\n this.$router.replace({ query: { tab } })\n }\n },\n watch: {\n '$route.params.id': function (newVal) {\n if (newVal) {\n this.switchUser(newVal)\n }\n },\n '$route.params.name': function (newVal) {\n if (newVal) {\n this.switchUser(newVal)\n }\n },\n '$route.query': function (newVal) {\n this.tab = newVal.tab || defaultTabKey\n }\n },\n components: {\n UserCard,\n Timeline,\n FollowerList,\n FriendList,\n FollowCard,\n Conversation\n }\n}\n\nexport default UserProfile\n","import BasicUserCard from '../basic_user_card/basic_user_card.vue'\nimport RemoteFollow from '../remote_follow/remote_follow.vue'\nimport FollowButton from '../follow_button/follow_button.vue'\n\nconst FollowCard = {\n props: [\n 'user',\n 'noFollowsYou'\n ],\n components: {\n BasicUserCard,\n RemoteFollow,\n FollowButton\n },\n computed: {\n isMe () {\n return this.$store.state.users.currentUser.id === this.user.id\n },\n loggedIn () {\n return this.$store.state.users.currentUser\n }\n }\n}\n\nexport default FollowCard\n","import UserCard from '../user_card/user_card.vue'\nimport UserAvatar from '../user_avatar/user_avatar.vue'\nimport generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'\n\nconst BasicUserCard = {\n props: [\n 'user'\n ],\n data () {\n return {\n userExpanded: false\n }\n },\n components: {\n UserCard,\n UserAvatar\n },\n methods: {\n toggleUserExpanded () {\n this.userExpanded = !this.userExpanded\n },\n userProfileLink (user) {\n return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)\n }\n }\n}\n\nexport default BasicUserCard\n","\n\n\n\n\n","import FollowCard from '../follow_card/follow_card.vue'\nimport Conversation from '../conversation/conversation.vue'\nimport Status from '../status/status.vue'\nimport map from 'lodash/map'\n\nconst Search = {\n components: {\n FollowCard,\n Conversation,\n Status\n },\n props: [\n 'query'\n ],\n data () {\n return {\n loaded: false,\n loading: false,\n searchTerm: this.query || '',\n userIds: [],\n statuses: [],\n hashtags: [],\n currenResultTab: 'statuses'\n }\n },\n computed: {\n users () {\n return this.userIds.map(userId => this.$store.getters.findUser(userId))\n },\n visibleStatuses () {\n const allStatusesObject = this.$store.state.statuses.allStatusesObject\n\n return this.statuses.filter(status =>\n allStatusesObject[status.id] && !allStatusesObject[status.id].deleted\n )\n }\n },\n mounted () {\n this.search(this.query)\n },\n watch: {\n query (newValue) {\n this.searchTerm = newValue\n this.search(newValue)\n }\n },\n methods: {\n newQuery (query) {\n this.$router.push({ name: 'search', query: { query } })\n this.$refs.searchInput.focus()\n },\n search (query) {\n if (!query) {\n this.loading = false\n return\n }\n\n this.loading = true\n this.userIds = []\n this.statuses = []\n this.hashtags = []\n this.$refs.searchInput.blur()\n\n this.$store.dispatch('search', { q: query, resolve: true })\n .then(data => {\n this.loading = false\n this.userIds = map(data.accounts, 'id')\n this.statuses = data.statuses\n this.hashtags = data.hashtags\n this.currenResultTab = this.getActiveTab()\n this.loaded = true\n })\n },\n resultCount (tabName) {\n const length = this[tabName].length\n return length === 0 ? '' : ` (${length})`\n },\n onResultTabSwitch (key) {\n this.currenResultTab = key\n },\n getActiveTab () {\n if (this.visibleStatuses.length > 0) {\n return 'statuses'\n } else if (this.users.length > 0) {\n return 'people'\n } else if (this.hashtags.length > 0) {\n return 'hashtags'\n }\n\n return 'statuses'\n },\n lastHistoryRecord (hashtag) {\n return hashtag.history && hashtag.history[0]\n }\n }\n}\n\nexport default Search\n","/* eslint-env browser */\nimport { filter, trim } from 'lodash'\n\nimport TabSwitcher from '../tab_switcher/tab_switcher.js'\nimport StyleSwitcher from '../style_switcher/style_switcher.vue'\nimport InterfaceLanguageSwitcher from '../interface_language_switcher/interface_language_switcher.vue'\nimport { extractCommit } from '../../services/version/version.service'\nimport { instanceDefaultProperties, defaultState as configDefaultState } from '../../modules/config.js'\nimport Checkbox from '../checkbox/checkbox.vue'\n\nconst pleromaFeCommitUrl = 'https://git.pleroma.social/pleroma/pleroma-fe/commit/'\nconst pleromaBeCommitUrl = 'https://git.pleroma.social/pleroma/pleroma/commit/'\n\nconst multiChoiceProperties = [\n 'postContentType',\n 'subjectLineBehavior'\n]\n\nconst settings = {\n data () {\n const instance = this.$store.state.instance\n\n return {\n loopSilentAvailable:\n // Firefox\n Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') ||\n // Chrome-likes\n Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') ||\n // Future spec, still not supported in Nightly 63 as of 08/2018\n Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks'),\n\n backendVersion: instance.backendVersion,\n frontendVersion: instance.frontendVersion\n }\n },\n components: {\n TabSwitcher,\n StyleSwitcher,\n InterfaceLanguageSwitcher,\n Checkbox\n },\n computed: {\n user () {\n return this.$store.state.users.currentUser\n },\n currentSaveStateNotice () {\n return this.$store.state.interface.settings.currentSaveStateNotice\n },\n postFormats () {\n return this.$store.state.instance.postFormats || []\n },\n instanceSpecificPanelPresent () { return this.$store.state.instance.showInstanceSpecificPanel },\n frontendVersionLink () {\n return pleromaFeCommitUrl + this.frontendVersion\n },\n backendVersionLink () {\n return pleromaBeCommitUrl + extractCommit(this.backendVersion)\n },\n // Getting localized values for instance-default properties\n ...instanceDefaultProperties\n .filter(key => multiChoiceProperties.includes(key))\n .map(key => [\n key + 'DefaultValue',\n function () {\n return this.$store.getters.instanceDefaultConfig[key]\n }\n ])\n .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),\n ...instanceDefaultProperties\n .filter(key => !multiChoiceProperties.includes(key))\n .map(key => [\n key + 'LocalizedValue',\n function () {\n return this.$t('settings.values.' + this.$store.getters.instanceDefaultConfig[key])\n }\n ])\n .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),\n // Generating computed values for vuex properties\n ...Object.keys(configDefaultState)\n .map(key => [key, {\n get () { return this.$store.getters.mergedConfig[key] },\n set (value) {\n this.$store.dispatch('setOption', { name: key, value })\n }\n }])\n .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),\n // Special cases (need to transform values)\n muteWordsString: {\n get () { return this.$store.getters.mergedConfig.muteWords.join('\\n') },\n set (value) {\n this.$store.dispatch('setOption', {\n name: 'muteWords',\n value: filter(value.split('\\n'), (word) => trim(word).length > 0)\n })\n }\n }\n },\n // Updating nested properties\n watch: {\n notificationVisibility: {\n handler (value) {\n this.$store.dispatch('setOption', {\n name: 'notificationVisibility',\n value: this.$store.getters.mergedConfig.notificationVisibility\n })\n },\n deep: true\n }\n }\n}\n\nexport default settings\n","import { rgb2hex, hex2rgb, getContrastRatio, alphaBlend } from '../../services/color_convert/color_convert.js'\nimport { set, delete as del } from 'vue'\nimport { generateColors, generateShadows, generateRadii, generateFonts, composePreset, getThemes } from '../../services/style_setter/style_setter.js'\nimport ColorInput from '../color_input/color_input.vue'\nimport RangeInput from '../range_input/range_input.vue'\nimport OpacityInput from '../opacity_input/opacity_input.vue'\nimport ShadowControl from '../shadow_control/shadow_control.vue'\nimport FontControl from '../font_control/font_control.vue'\nimport ContrastRatio from '../contrast_ratio/contrast_ratio.vue'\nimport TabSwitcher from '../tab_switcher/tab_switcher.js'\nimport Preview from './preview.vue'\nimport ExportImport from '../export_import/export_import.vue'\nimport Checkbox from '../checkbox/checkbox.vue'\n\n// List of color values used in v1\nconst v1OnlyNames = [\n 'bg',\n 'fg',\n 'text',\n 'link',\n 'cRed',\n 'cGreen',\n 'cBlue',\n 'cOrange'\n].map(_ => _ + 'ColorLocal')\n\nexport default {\n data () {\n return {\n availableStyles: [],\n selected: this.$store.getters.mergedConfig.theme,\n\n previewShadows: {},\n previewColors: {},\n previewRadii: {},\n previewFonts: {},\n\n shadowsInvalid: true,\n colorsInvalid: true,\n radiiInvalid: true,\n\n keepColor: false,\n keepShadows: false,\n keepOpacity: false,\n keepRoundness: false,\n keepFonts: false,\n\n textColorLocal: '',\n linkColorLocal: '',\n\n bgColorLocal: '',\n bgOpacityLocal: undefined,\n\n fgColorLocal: '',\n fgTextColorLocal: undefined,\n fgLinkColorLocal: undefined,\n\n btnColorLocal: undefined,\n btnTextColorLocal: undefined,\n btnOpacityLocal: undefined,\n\n inputColorLocal: undefined,\n inputTextColorLocal: undefined,\n inputOpacityLocal: undefined,\n\n panelColorLocal: undefined,\n panelTextColorLocal: undefined,\n panelLinkColorLocal: undefined,\n panelFaintColorLocal: undefined,\n panelOpacityLocal: undefined,\n\n topBarColorLocal: undefined,\n topBarTextColorLocal: undefined,\n topBarLinkColorLocal: undefined,\n\n alertErrorColorLocal: undefined,\n alertWarningColorLocal: undefined,\n\n badgeOpacityLocal: undefined,\n badgeNotificationColorLocal: undefined,\n\n borderColorLocal: undefined,\n borderOpacityLocal: undefined,\n\n faintColorLocal: undefined,\n faintOpacityLocal: undefined,\n faintLinkColorLocal: undefined,\n\n cRedColorLocal: '',\n cBlueColorLocal: '',\n cGreenColorLocal: '',\n cOrangeColorLocal: '',\n\n shadowSelected: undefined,\n shadowsLocal: {},\n fontsLocal: {},\n\n btnRadiusLocal: '',\n inputRadiusLocal: '',\n checkboxRadiusLocal: '',\n panelRadiusLocal: '',\n avatarRadiusLocal: '',\n avatarAltRadiusLocal: '',\n attachmentRadiusLocal: '',\n tooltipRadiusLocal: ''\n }\n },\n created () {\n const self = this\n\n getThemes().then((themesComplete) => {\n self.availableStyles = themesComplete\n })\n },\n mounted () {\n this.normalizeLocalState(this.$store.getters.mergedConfig.customTheme)\n if (typeof this.shadowSelected === 'undefined') {\n this.shadowSelected = this.shadowsAvailable[0]\n }\n },\n computed: {\n selectedVersion () {\n return Array.isArray(this.selected) ? 1 : 2\n },\n currentColors () {\n return {\n bg: this.bgColorLocal,\n text: this.textColorLocal,\n link: this.linkColorLocal,\n\n fg: this.fgColorLocal,\n fgText: this.fgTextColorLocal,\n fgLink: this.fgLinkColorLocal,\n\n panel: this.panelColorLocal,\n panelText: this.panelTextColorLocal,\n panelLink: this.panelLinkColorLocal,\n panelFaint: this.panelFaintColorLocal,\n\n input: this.inputColorLocal,\n inputText: this.inputTextColorLocal,\n\n topBar: this.topBarColorLocal,\n topBarText: this.topBarTextColorLocal,\n topBarLink: this.topBarLinkColorLocal,\n\n btn: this.btnColorLocal,\n btnText: this.btnTextColorLocal,\n\n alertError: this.alertErrorColorLocal,\n alertWarning: this.alertWarningColorLocal,\n badgeNotification: this.badgeNotificationColorLocal,\n\n faint: this.faintColorLocal,\n faintLink: this.faintLinkColorLocal,\n border: this.borderColorLocal,\n\n cRed: this.cRedColorLocal,\n cBlue: this.cBlueColorLocal,\n cGreen: this.cGreenColorLocal,\n cOrange: this.cOrangeColorLocal\n }\n },\n currentOpacity () {\n return {\n bg: this.bgOpacityLocal,\n btn: this.btnOpacityLocal,\n input: this.inputOpacityLocal,\n panel: this.panelOpacityLocal,\n topBar: this.topBarOpacityLocal,\n border: this.borderOpacityLocal,\n faint: this.faintOpacityLocal\n }\n },\n currentRadii () {\n return {\n btn: this.btnRadiusLocal,\n input: this.inputRadiusLocal,\n checkbox: this.checkboxRadiusLocal,\n panel: this.panelRadiusLocal,\n avatar: this.avatarRadiusLocal,\n avatarAlt: this.avatarAltRadiusLocal,\n tooltip: this.tooltipRadiusLocal,\n attachment: this.attachmentRadiusLocal\n }\n },\n preview () {\n return composePreset(this.previewColors, this.previewRadii, this.previewShadows, this.previewFonts)\n },\n previewTheme () {\n if (!this.preview.theme.colors) return { colors: {}, opacity: {}, radii: {}, shadows: {}, fonts: {} }\n return this.preview.theme\n },\n // This needs optimization maybe\n previewContrast () {\n if (!this.previewTheme.colors.bg) return {}\n const colors = this.previewTheme.colors\n const opacity = this.previewTheme.opacity\n if (!colors.bg) return {}\n const hints = (ratio) => ({\n text: ratio.toPrecision(3) + ':1',\n // AA level, AAA level\n aa: ratio >= 4.5,\n aaa: ratio >= 7,\n // same but for 18pt+ texts\n laa: ratio >= 3,\n laaa: ratio >= 4.5\n })\n\n // fgsfds :DDDD\n const fgs = {\n text: hex2rgb(colors.text),\n panelText: hex2rgb(colors.panelText),\n panelLink: hex2rgb(colors.panelLink),\n btnText: hex2rgb(colors.btnText),\n topBarText: hex2rgb(colors.topBarText),\n inputText: hex2rgb(colors.inputText),\n\n link: hex2rgb(colors.link),\n topBarLink: hex2rgb(colors.topBarLink),\n\n red: hex2rgb(colors.cRed),\n green: hex2rgb(colors.cGreen),\n blue: hex2rgb(colors.cBlue),\n orange: hex2rgb(colors.cOrange)\n }\n\n const bgs = {\n bg: hex2rgb(colors.bg),\n btn: hex2rgb(colors.btn),\n panel: hex2rgb(colors.panel),\n topBar: hex2rgb(colors.topBar),\n input: hex2rgb(colors.input),\n alertError: hex2rgb(colors.alertError),\n alertWarning: hex2rgb(colors.alertWarning),\n badgeNotification: hex2rgb(colors.badgeNotification)\n }\n\n /* This is a bit confusing because \"bottom layer\" used is text color\n * This is done to get worst case scenario when background below transparent\n * layer matches text color, making it harder to read the lower alpha is.\n */\n const ratios = {\n bgText: getContrastRatio(alphaBlend(bgs.bg, opacity.bg, fgs.text), fgs.text),\n bgLink: getContrastRatio(alphaBlend(bgs.bg, opacity.bg, fgs.link), fgs.link),\n bgRed: getContrastRatio(alphaBlend(bgs.bg, opacity.bg, fgs.red), fgs.red),\n bgGreen: getContrastRatio(alphaBlend(bgs.bg, opacity.bg, fgs.green), fgs.green),\n bgBlue: getContrastRatio(alphaBlend(bgs.bg, opacity.bg, fgs.blue), fgs.blue),\n bgOrange: getContrastRatio(alphaBlend(bgs.bg, opacity.bg, fgs.orange), fgs.orange),\n\n tintText: getContrastRatio(alphaBlend(bgs.bg, 0.5, fgs.panelText), fgs.text),\n\n panelText: getContrastRatio(alphaBlend(bgs.panel, opacity.panel, fgs.panelText), fgs.panelText),\n panelLink: getContrastRatio(alphaBlend(bgs.panel, opacity.panel, fgs.panelLink), fgs.panelLink),\n\n btnText: getContrastRatio(alphaBlend(bgs.btn, opacity.btn, fgs.btnText), fgs.btnText),\n\n inputText: getContrastRatio(alphaBlend(bgs.input, opacity.input, fgs.inputText), fgs.inputText),\n\n topBarText: getContrastRatio(alphaBlend(bgs.topBar, opacity.topBar, fgs.topBarText), fgs.topBarText),\n topBarLink: getContrastRatio(alphaBlend(bgs.topBar, opacity.topBar, fgs.topBarLink), fgs.topBarLink)\n }\n\n return Object.entries(ratios).reduce((acc, [k, v]) => { acc[k] = hints(v); return acc }, {})\n },\n previewRules () {\n if (!this.preview.rules) return ''\n return [\n ...Object.values(this.preview.rules),\n 'color: var(--text)',\n 'font-family: var(--interfaceFont, sans-serif)'\n ].join(';')\n },\n shadowsAvailable () {\n return Object.keys(this.previewTheme.shadows).sort()\n },\n currentShadowOverriden: {\n get () {\n return !!this.currentShadow\n },\n set (val) {\n if (val) {\n set(this.shadowsLocal, this.shadowSelected, this.currentShadowFallback.map(_ => Object.assign({}, _)))\n } else {\n del(this.shadowsLocal, this.shadowSelected)\n }\n }\n },\n currentShadowFallback () {\n return this.previewTheme.shadows[this.shadowSelected]\n },\n currentShadow: {\n get () {\n return this.shadowsLocal[this.shadowSelected]\n },\n set (v) {\n set(this.shadowsLocal, this.shadowSelected, v)\n }\n },\n themeValid () {\n return !this.shadowsInvalid && !this.colorsInvalid && !this.radiiInvalid\n },\n exportedTheme () {\n const saveEverything = (\n !this.keepFonts &&\n !this.keepShadows &&\n !this.keepOpacity &&\n !this.keepRoundness &&\n !this.keepColor\n )\n\n const theme = {}\n\n if (this.keepFonts || saveEverything) {\n theme.fonts = this.fontsLocal\n }\n if (this.keepShadows || saveEverything) {\n theme.shadows = this.shadowsLocal\n }\n if (this.keepOpacity || saveEverything) {\n theme.opacity = this.currentOpacity\n }\n if (this.keepColor || saveEverything) {\n theme.colors = this.currentColors\n }\n if (this.keepRoundness || saveEverything) {\n theme.radii = this.currentRadii\n }\n\n return {\n // To separate from other random JSON files and possible future theme formats\n _pleroma_theme_version: 2, theme\n }\n }\n },\n components: {\n ColorInput,\n OpacityInput,\n RangeInput,\n ContrastRatio,\n ShadowControl,\n FontControl,\n TabSwitcher,\n Preview,\n ExportImport,\n Checkbox\n },\n methods: {\n setCustomTheme () {\n this.$store.dispatch('setOption', {\n name: 'customTheme',\n value: {\n shadows: this.shadowsLocal,\n fonts: this.fontsLocal,\n opacity: this.currentOpacity,\n colors: this.currentColors,\n radii: this.currentRadii\n }\n })\n },\n onImport (parsed) {\n if (parsed._pleroma_theme_version === 1) {\n this.normalizeLocalState(parsed, 1)\n } else if (parsed._pleroma_theme_version === 2) {\n this.normalizeLocalState(parsed.theme, 2)\n }\n },\n importValidator (parsed) {\n const version = parsed._pleroma_theme_version\n return version >= 1 || version <= 2\n },\n clearAll () {\n const state = this.$store.getters.mergedConfig.customTheme\n const version = state.colors ? 2 : 'l1'\n this.normalizeLocalState(this.$store.getters.mergedConfig.customTheme, version)\n },\n\n // Clears all the extra stuff when loading V1 theme\n clearV1 () {\n Object.keys(this.$data)\n .filter(_ => _.endsWith('ColorLocal') || _.endsWith('OpacityLocal'))\n .filter(_ => !v1OnlyNames.includes(_))\n .forEach(key => {\n set(this.$data, key, undefined)\n })\n },\n\n clearRoundness () {\n Object.keys(this.$data)\n .filter(_ => _.endsWith('RadiusLocal'))\n .forEach(key => {\n set(this.$data, key, undefined)\n })\n },\n\n clearOpacity () {\n Object.keys(this.$data)\n .filter(_ => _.endsWith('OpacityLocal'))\n .forEach(key => {\n set(this.$data, key, undefined)\n })\n },\n\n clearShadows () {\n this.shadowsLocal = {}\n },\n\n clearFonts () {\n this.fontsLocal = {}\n },\n\n /**\n * This applies stored theme data onto form. Supports three versions of data:\n * v2 (version = 2) - newer version of themes.\n * v1 (version = 1) - older version of themes (import from file)\n * v1l (version = l1) - older version of theme (load from local storage)\n * v1 and v1l differ because of way themes were stored/exported.\n * @param {Object} input - input data\n * @param {Number} version - version of data. 0 means try to guess based on data. \"l1\" means v1, locastorage type\n */\n normalizeLocalState (input, version = 0) {\n const colors = input.colors || input\n const radii = input.radii || input\n const opacity = input.opacity\n const shadows = input.shadows || {}\n const fonts = input.fonts || {}\n\n if (version === 0) {\n if (input.version) version = input.version\n // Old v1 naming: fg is text, btn is foreground\n if (typeof colors.text === 'undefined' && typeof colors.fg !== 'undefined') {\n version = 1\n }\n // New v2 naming: text is text, fg is foreground\n if (typeof colors.text !== 'undefined' && typeof colors.fg !== 'undefined') {\n version = 2\n }\n }\n\n // Stuff that differs between V1 and V2\n if (version === 1) {\n this.fgColorLocal = rgb2hex(colors.btn)\n this.textColorLocal = rgb2hex(colors.fg)\n }\n\n if (!this.keepColor) {\n this.clearV1()\n const keys = new Set(version !== 1 ? Object.keys(colors) : [])\n if (version === 1 || version === 'l1') {\n keys\n .add('bg')\n .add('link')\n .add('cRed')\n .add('cBlue')\n .add('cGreen')\n .add('cOrange')\n }\n\n keys.forEach(key => {\n this[key + 'ColorLocal'] = rgb2hex(colors[key])\n })\n }\n\n if (!this.keepRoundness) {\n this.clearRoundness()\n Object.entries(radii).forEach(([k, v]) => {\n // 'Radius' is kept mostly for v1->v2 localstorage transition\n const key = k.endsWith('Radius') ? k.split('Radius')[0] : k\n this[key + 'RadiusLocal'] = v\n })\n }\n\n if (!this.keepShadows) {\n this.clearShadows()\n this.shadowsLocal = shadows\n this.shadowSelected = this.shadowsAvailable[0]\n }\n\n if (!this.keepFonts) {\n this.clearFonts()\n this.fontsLocal = fonts\n }\n\n if (opacity && !this.keepOpacity) {\n this.clearOpacity()\n Object.entries(opacity).forEach(([k, v]) => {\n if (typeof v === 'undefined' || v === null || Number.isNaN(v)) return\n this[k + 'OpacityLocal'] = v\n })\n }\n }\n },\n watch: {\n currentRadii () {\n try {\n this.previewRadii = generateRadii({ radii: this.currentRadii })\n this.radiiInvalid = false\n } catch (e) {\n this.radiiInvalid = true\n console.warn(e)\n }\n },\n shadowsLocal: {\n handler () {\n try {\n this.previewShadows = generateShadows({ shadows: this.shadowsLocal })\n this.shadowsInvalid = false\n } catch (e) {\n this.shadowsInvalid = true\n console.warn(e)\n }\n },\n deep: true\n },\n fontsLocal: {\n handler () {\n try {\n this.previewFonts = generateFonts({ fonts: this.fontsLocal })\n this.fontsInvalid = false\n } catch (e) {\n this.fontsInvalid = true\n console.warn(e)\n }\n },\n deep: true\n },\n currentColors () {\n try {\n this.previewColors = generateColors({\n opacity: this.currentOpacity,\n colors: this.currentColors\n })\n this.colorsInvalid = false\n } catch (e) {\n this.colorsInvalid = true\n console.warn(e)\n }\n },\n currentOpacity () {\n try {\n this.previewColors = generateColors({\n opacity: this.currentOpacity,\n colors: this.currentColors\n })\n } catch (e) {\n console.warn(e)\n }\n },\n selected () {\n if (this.selectedVersion === 1) {\n if (!this.keepRoundness) {\n this.clearRoundness()\n }\n\n if (!this.keepShadows) {\n this.clearShadows()\n }\n\n if (!this.keepOpacity) {\n this.clearOpacity()\n }\n\n if (!this.keepColor) {\n this.clearV1()\n\n this.bgColorLocal = this.selected[1]\n this.fgColorLocal = this.selected[2]\n this.textColorLocal = this.selected[3]\n this.linkColorLocal = this.selected[4]\n this.cRedColorLocal = this.selected[5]\n this.cGreenColorLocal = this.selected[6]\n this.cBlueColorLocal = this.selected[7]\n this.cOrangeColorLocal = this.selected[8]\n }\n } else if (this.selectedVersion >= 2) {\n this.normalizeLocalState(this.selected.theme, 2)\n }\n }\n }\n}\n","\n\n\n\n\n","\n\n\n","\n\n\n","import ColorInput from '../color_input/color_input.vue'\nimport OpacityInput from '../opacity_input/opacity_input.vue'\nimport { getCssShadow } from '../../services/style_setter/style_setter.js'\nimport { hex2rgb } from '../../services/color_convert/color_convert.js'\n\nexport default {\n // 'Value' and 'Fallback' can be undefined, but if they are\n // initially vue won't detect it when they become something else\n // therefore i'm using \"ready\" which should be passed as true when\n // data becomes available\n props: [\n 'value', 'fallback', 'ready'\n ],\n data () {\n return {\n selectedId: 0,\n // TODO there are some bugs regarding display of array (it's not getting updated when deleting for some reason)\n cValue: this.value || this.fallback || []\n }\n },\n components: {\n ColorInput,\n OpacityInput\n },\n methods: {\n add () {\n this.cValue.push(Object.assign({}, this.selected))\n this.selectedId = this.cValue.length - 1\n },\n del () {\n this.cValue.splice(this.selectedId, 1)\n this.selectedId = this.cValue.length === 0 ? undefined : this.selectedId - 1\n },\n moveUp () {\n const movable = this.cValue.splice(this.selectedId, 1)[0]\n this.cValue.splice(this.selectedId - 1, 0, movable)\n this.selectedId -= 1\n },\n moveDn () {\n const movable = this.cValue.splice(this.selectedId, 1)[0]\n this.cValue.splice(this.selectedId + 1, 0, movable)\n this.selectedId += 1\n }\n },\n beforeUpdate () {\n this.cValue = this.value || this.fallback\n },\n computed: {\n selected () {\n if (this.ready && this.cValue.length > 0) {\n return this.cValue[this.selectedId]\n } else {\n return {\n x: 0,\n y: 0,\n blur: 0,\n spread: 0,\n inset: false,\n color: '#000000',\n alpha: 1\n }\n }\n },\n moveUpValid () {\n return this.ready && this.selectedId > 0\n },\n moveDnValid () {\n return this.ready && this.selectedId < this.cValue.length - 1\n },\n present () {\n return this.ready &&\n typeof this.cValue[this.selectedId] !== 'undefined' &&\n !this.usingFallback\n },\n usingFallback () {\n return typeof this.value === 'undefined'\n },\n rgb () {\n return hex2rgb(this.selected.color)\n },\n style () {\n return this.ready ? {\n boxShadow: getCssShadow(this.cValue)\n } : {}\n }\n }\n}\n","import { set } from 'vue'\n\nexport default {\n props: [\n 'name', 'label', 'value', 'fallback', 'options', 'no-inherit'\n ],\n data () {\n return {\n lValue: this.value,\n availableOptions: [\n this.noInherit ? '' : 'inherit',\n 'custom',\n ...(this.options || []),\n 'serif',\n 'monospace',\n 'sans-serif'\n ].filter(_ => _)\n }\n },\n beforeUpdate () {\n this.lValue = this.value\n },\n computed: {\n present () {\n return typeof this.lValue !== 'undefined'\n },\n dValue () {\n return this.lValue || this.fallback || {}\n },\n family: {\n get () {\n return this.dValue.family\n },\n set (v) {\n set(this.lValue, 'family', v)\n this.$emit('input', this.lValue)\n }\n },\n isCustom () {\n return this.preset === 'custom'\n },\n preset: {\n get () {\n if (this.family === 'serif' ||\n this.family === 'sans-serif' ||\n this.family === 'monospace' ||\n this.family === 'inherit') {\n return this.family\n } else {\n return 'custom'\n }\n },\n set (v) {\n this.family = v === 'custom' ? '' : v\n }\n }\n }\n}\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","import { validationMixin } from 'vuelidate'\nimport { required, sameAs } from 'vuelidate/lib/validators'\nimport { mapActions, mapState } from 'vuex'\n\nconst registration = {\n mixins: [validationMixin],\n data: () => ({\n user: {\n email: '',\n fullname: '',\n username: '',\n password: '',\n confirm: ''\n },\n captcha: {}\n }),\n validations: {\n user: {\n email: { required },\n username: { required },\n fullname: { required },\n password: { required },\n confirm: {\n required,\n sameAsPassword: sameAs('password')\n }\n }\n },\n created () {\n if ((!this.registrationOpen && !this.token) || this.signedIn) {\n this.$router.push({ name: 'root' })\n }\n\n this.setCaptcha()\n },\n computed: {\n token () { return this.$route.params.token },\n bioPlaceholder () {\n return this.$t('registration.bio_placeholder').replace(/\\s*\\n\\s*/g, ' \\n')\n },\n ...mapState({\n registrationOpen: (state) => state.instance.registrationOpen,\n signedIn: (state) => !!state.users.currentUser,\n isPending: (state) => state.users.signUpPending,\n serverValidationErrors: (state) => state.users.signUpErrors,\n termsOfService: (state) => state.instance.tos\n })\n },\n methods: {\n ...mapActions(['signUp', 'getCaptcha']),\n async submit () {\n this.user.nickname = this.user.username\n this.user.token = this.token\n\n this.user.captcha_solution = this.captcha.solution\n this.user.captcha_token = this.captcha.token\n this.user.captcha_answer_data = this.captcha.answer_data\n\n this.$v.$touch()\n\n if (!this.$v.$invalid) {\n try {\n await this.signUp(this.user)\n this.$router.push({ name: 'friends' })\n } catch (error) {\n console.warn('Registration failed: ' + error)\n }\n }\n },\n setCaptcha () {\n this.getCaptcha().then(cpt => { this.captcha = cpt })\n }\n }\n}\n\nexport default registration\n","import { mapState } from 'vuex'\nimport passwordResetApi from '../../services/new_api/password_reset.js'\n\nconst passwordReset = {\n data: () => ({\n user: {\n email: ''\n },\n isPending: false,\n success: false,\n throttled: false,\n error: null\n }),\n computed: {\n ...mapState({\n signedIn: (state) => !!state.users.currentUser,\n instance: state => state.instance\n }),\n mailerEnabled () {\n return this.instance.mailerEnabled\n }\n },\n created () {\n if (this.signedIn) {\n this.$router.push({ name: 'root' })\n }\n },\n props: {\n passwordResetRequested: {\n default: false,\n type: Boolean\n }\n },\n methods: {\n dismissError () {\n this.error = null\n },\n submit () {\n this.isPending = true\n const email = this.user.email\n const instance = this.instance.server\n\n passwordResetApi({ instance, email }).then(({ status }) => {\n this.isPending = false\n this.user.email = ''\n\n if (status === 204) {\n this.success = true\n this.error = null\n } else if (status === 404 || status === 400) {\n this.error = this.$t('password_reset.not_found')\n this.$nextTick(() => {\n this.$refs.email.focus()\n })\n } else if (status === 429) {\n this.throttled = true\n this.error = this.$t('password_reset.too_many_requests')\n }\n }).catch(() => {\n this.isPending = false\n this.user.email = ''\n this.error = this.$t('general.generic_error')\n })\n }\n }\n}\n\nexport default passwordReset\n","import unescape from 'lodash/unescape'\nimport get from 'lodash/get'\nimport map from 'lodash/map'\nimport reject from 'lodash/reject'\nimport TabSwitcher from '../tab_switcher/tab_switcher.js'\nimport ImageCropper from '../image_cropper/image_cropper.vue'\nimport StyleSwitcher from '../style_switcher/style_switcher.vue'\nimport ScopeSelector from '../scope_selector/scope_selector.vue'\nimport fileSizeFormatService from '../../services/file_size_format/file_size_format.js'\nimport BlockCard from '../block_card/block_card.vue'\nimport MuteCard from '../mute_card/mute_card.vue'\nimport SelectableList from '../selectable_list/selectable_list.vue'\nimport ProgressButton from '../progress_button/progress_button.vue'\nimport EmojiInput from '../emoji_input/emoji_input.vue'\nimport suggestor from '../emoji_input/suggestor.js'\nimport Autosuggest from '../autosuggest/autosuggest.vue'\nimport Importer from '../importer/importer.vue'\nimport Exporter from '../exporter/exporter.vue'\nimport withSubscription from '../../hocs/with_subscription/with_subscription'\nimport Checkbox from '../checkbox/checkbox.vue'\nimport Mfa from './mfa.vue'\n\nconst BlockList = withSubscription({\n fetch: (props, $store) => $store.dispatch('fetchBlocks'),\n select: (props, $store) => get($store.state.users.currentUser, 'blockIds', []),\n childPropName: 'items'\n})(SelectableList)\n\nconst MuteList = withSubscription({\n fetch: (props, $store) => $store.dispatch('fetchMutes'),\n select: (props, $store) => get($store.state.users.currentUser, 'muteIds', []),\n childPropName: 'items'\n})(SelectableList)\n\nconst UserSettings = {\n data () {\n return {\n newEmail: '',\n newName: this.$store.state.users.currentUser.name,\n newBio: unescape(this.$store.state.users.currentUser.description),\n newLocked: this.$store.state.users.currentUser.locked,\n newNoRichText: this.$store.state.users.currentUser.no_rich_text,\n newDefaultScope: this.$store.state.users.currentUser.default_scope,\n hideFollows: this.$store.state.users.currentUser.hide_follows,\n hideFollowers: this.$store.state.users.currentUser.hide_followers,\n hideFollowsCount: this.$store.state.users.currentUser.hide_follows_count,\n hideFollowersCount: this.$store.state.users.currentUser.hide_followers_count,\n showRole: this.$store.state.users.currentUser.show_role,\n role: this.$store.state.users.currentUser.role,\n discoverable: this.$store.state.users.currentUser.discoverable,\n pickAvatarBtnVisible: true,\n bannerUploading: false,\n backgroundUploading: false,\n banner: null,\n bannerPreview: null,\n background: null,\n backgroundPreview: null,\n bannerUploadError: null,\n backgroundUploadError: null,\n changeEmailError: false,\n changeEmailPassword: '',\n changedEmail: false,\n deletingAccount: false,\n deleteAccountConfirmPasswordInput: '',\n deleteAccountError: false,\n changePasswordInputs: [ '', '', '' ],\n changedPassword: false,\n changePasswordError: false,\n activeTab: 'profile',\n notificationSettings: this.$store.state.users.currentUser.notification_settings\n }\n },\n created () {\n this.$store.dispatch('fetchTokens')\n },\n components: {\n StyleSwitcher,\n ScopeSelector,\n TabSwitcher,\n ImageCropper,\n BlockList,\n MuteList,\n EmojiInput,\n Autosuggest,\n BlockCard,\n MuteCard,\n ProgressButton,\n Importer,\n Exporter,\n Mfa,\n Checkbox\n },\n computed: {\n user () {\n return this.$store.state.users.currentUser\n },\n emojiUserSuggestor () {\n return suggestor({\n emoji: [\n ...this.$store.state.instance.emoji,\n ...this.$store.state.instance.customEmoji\n ],\n users: this.$store.state.users.users,\n updateUsersList: (input) => this.$store.dispatch('searchUsers', input)\n })\n },\n emojiSuggestor () {\n return suggestor({ emoji: [\n ...this.$store.state.instance.emoji,\n ...this.$store.state.instance.customEmoji\n ] })\n },\n pleromaBackend () {\n return this.$store.state.instance.pleromaBackend\n },\n minimalScopesMode () {\n return this.$store.state.instance.minimalScopesMode\n },\n vis () {\n return {\n public: { selected: this.newDefaultScope === 'public' },\n unlisted: { selected: this.newDefaultScope === 'unlisted' },\n private: { selected: this.newDefaultScope === 'private' },\n direct: { selected: this.newDefaultScope === 'direct' }\n }\n },\n currentSaveStateNotice () {\n return this.$store.state.interface.settings.currentSaveStateNotice\n },\n oauthTokens () {\n return this.$store.state.oauthTokens.tokens.map(oauthToken => {\n return {\n id: oauthToken.id,\n appName: oauthToken.app_name,\n validUntil: new Date(oauthToken.valid_until).toLocaleDateString()\n }\n })\n }\n },\n methods: {\n updateProfile () {\n this.$store.state.api.backendInteractor\n .updateProfile({\n params: {\n note: this.newBio,\n locked: this.newLocked,\n // Backend notation.\n /* eslint-disable camelcase */\n display_name: this.newName,\n default_scope: this.newDefaultScope,\n no_rich_text: this.newNoRichText,\n hide_follows: this.hideFollows,\n hide_followers: this.hideFollowers,\n discoverable: this.discoverable,\n hide_follows_count: this.hideFollowsCount,\n hide_followers_count: this.hideFollowersCount,\n show_role: this.showRole\n /* eslint-enable camelcase */\n } }).then((user) => {\n this.$store.commit('addNewUsers', [user])\n this.$store.commit('setCurrentUser', user)\n })\n },\n updateNotificationSettings () {\n this.$store.state.api.backendInteractor\n .updateNotificationSettings({ settings: this.notificationSettings })\n },\n changeVis (visibility) {\n this.newDefaultScope = visibility\n },\n uploadFile (slot, e) {\n const file = e.target.files[0]\n if (!file) { return }\n if (file.size > this.$store.state.instance[slot + 'limit']) {\n const filesize = fileSizeFormatService.fileSizeFormat(file.size)\n const allowedsize = fileSizeFormatService.fileSizeFormat(this.$store.state.instance[slot + 'limit'])\n this[slot + 'UploadError'] = this.$t('upload.error.base') + ' ' + this.$t('upload.error.file_too_big', { filesize: filesize.num, filesizeunit: filesize.unit, allowedsize: allowedsize.num, allowedsizeunit: allowedsize.unit })\n return\n }\n // eslint-disable-next-line no-undef\n const reader = new FileReader()\n reader.onload = ({ target }) => {\n const img = target.result\n this[slot + 'Preview'] = img\n this[slot] = file\n }\n reader.readAsDataURL(file)\n },\n submitAvatar (cropper, file) {\n const that = this\n return new Promise((resolve, reject) => {\n function updateAvatar (avatar) {\n that.$store.state.api.backendInteractor.updateAvatar({ avatar })\n .then((user) => {\n that.$store.commit('addNewUsers', [user])\n that.$store.commit('setCurrentUser', user)\n resolve()\n })\n .catch((err) => {\n reject(new Error(that.$t('upload.error.base') + ' ' + err.message))\n })\n }\n\n if (cropper) {\n cropper.getCroppedCanvas().toBlob(updateAvatar, file.type)\n } else {\n updateAvatar(file)\n }\n })\n },\n clearUploadError (slot) {\n this[slot + 'UploadError'] = null\n },\n submitBanner () {\n if (!this.bannerPreview) { return }\n\n this.bannerUploading = true\n this.$store.state.api.backendInteractor.updateBanner({ banner: this.banner })\n .then((user) => {\n this.$store.commit('addNewUsers', [user])\n this.$store.commit('setCurrentUser', user)\n this.bannerPreview = null\n })\n .catch((err) => {\n this.bannerUploadError = this.$t('upload.error.base') + ' ' + err.message\n })\n .then(() => { this.bannerUploading = false })\n },\n submitBg () {\n if (!this.backgroundPreview) { return }\n let background = this.background\n this.backgroundUploading = true\n this.$store.state.api.backendInteractor.updateBg({ background }).then((data) => {\n if (!data.error) {\n this.$store.commit('addNewUsers', [data])\n this.$store.commit('setCurrentUser', data)\n this.backgroundPreview = null\n } else {\n this.backgroundUploadError = this.$t('upload.error.base') + data.error\n }\n this.backgroundUploading = false\n })\n },\n importFollows (file) {\n return this.$store.state.api.backendInteractor.importFollows(file)\n .then((status) => {\n if (!status) {\n throw new Error('failed')\n }\n })\n },\n importBlocks (file) {\n return this.$store.state.api.backendInteractor.importBlocks(file)\n .then((status) => {\n if (!status) {\n throw new Error('failed')\n }\n })\n },\n generateExportableUsersContent (users) {\n // Get addresses\n return users.map((user) => {\n // check is it's a local user\n if (user && user.is_local) {\n // append the instance address\n // eslint-disable-next-line no-undef\n return user.screen_name + '@' + location.hostname\n }\n return user.screen_name\n }).join('\\n')\n },\n getFollowsContent () {\n return this.$store.state.api.backendInteractor.exportFriends({ id: this.$store.state.users.currentUser.id })\n .then(this.generateExportableUsersContent)\n },\n getBlocksContent () {\n return this.$store.state.api.backendInteractor.fetchBlocks()\n .then(this.generateExportableUsersContent)\n },\n confirmDelete () {\n this.deletingAccount = true\n },\n deleteAccount () {\n this.$store.state.api.backendInteractor.deleteAccount({ password: this.deleteAccountConfirmPasswordInput })\n .then((res) => {\n if (res.status === 'success') {\n this.$store.dispatch('logout')\n this.$router.push({ name: 'root' })\n } else {\n this.deleteAccountError = res.error\n }\n })\n },\n changePassword () {\n const params = {\n password: this.changePasswordInputs[0],\n newPassword: this.changePasswordInputs[1],\n newPasswordConfirmation: this.changePasswordInputs[2]\n }\n this.$store.state.api.backendInteractor.changePassword(params)\n .then((res) => {\n if (res.status === 'success') {\n this.changedPassword = true\n this.changePasswordError = false\n this.logout()\n } else {\n this.changedPassword = false\n this.changePasswordError = res.error\n }\n })\n },\n changeEmail () {\n const params = {\n email: this.newEmail,\n password: this.changeEmailPassword\n }\n this.$store.state.api.backendInteractor.changeEmail(params)\n .then((res) => {\n if (res.status === 'success') {\n this.changedEmail = true\n this.changeEmailError = false\n } else {\n this.changedEmail = false\n this.changeEmailError = res.error\n }\n })\n },\n activateTab (tabName) {\n this.activeTab = tabName\n },\n logout () {\n this.$store.dispatch('logout')\n this.$router.replace('/')\n },\n revokeToken (id) {\n if (window.confirm(`${this.$i18n.t('settings.revoke_token')}?`)) {\n this.$store.dispatch('revokeToken', id)\n }\n },\n filterUnblockedUsers (userIds) {\n return reject(userIds, (userId) => {\n const user = this.$store.getters.findUser(userId)\n return !user || user.statusnet_blocking || user.id === this.$store.state.users.currentUser.id\n })\n },\n filterUnMutedUsers (userIds) {\n return reject(userIds, (userId) => {\n const user = this.$store.getters.findUser(userId)\n return !user || user.muted || user.id === this.$store.state.users.currentUser.id\n })\n },\n queryUserIds (query) {\n return this.$store.dispatch('searchUsers', query)\n .then((users) => map(users, 'id'))\n },\n blockUsers (ids) {\n return this.$store.dispatch('blockUsers', ids)\n },\n unblockUsers (ids) {\n return this.$store.dispatch('unblockUsers', ids)\n },\n muteUsers (ids) {\n return this.$store.dispatch('muteUsers', ids)\n },\n unmuteUsers (ids) {\n return this.$store.dispatch('unmuteUsers', ids)\n },\n identity (value) {\n return value\n }\n }\n}\n\nexport default UserSettings\n","import Cropper from 'cropperjs'\nimport 'cropperjs/dist/cropper.css'\n\nconst ImageCropper = {\n props: {\n trigger: {\n type: [String, window.Element],\n required: true\n },\n submitHandler: {\n type: Function,\n required: true\n },\n cropperOptions: {\n type: Object,\n default () {\n return {\n aspectRatio: 1,\n autoCropArea: 1,\n viewMode: 1,\n movable: false,\n zoomable: false,\n guides: false\n }\n }\n },\n mimes: {\n type: String,\n default: 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon'\n },\n saveButtonLabel: {\n type: String\n },\n saveWithoutCroppingButtonlabel: {\n type: String\n },\n cancelButtonLabel: {\n type: String\n }\n },\n data () {\n return {\n cropper: undefined,\n dataUrl: undefined,\n filename: undefined,\n submitting: false,\n submitError: null\n }\n },\n computed: {\n saveText () {\n return this.saveButtonLabel || this.$t('image_cropper.save')\n },\n saveWithoutCroppingText () {\n return this.saveWithoutCroppingButtonlabel || this.$t('image_cropper.save_without_cropping')\n },\n cancelText () {\n return this.cancelButtonLabel || this.$t('image_cropper.cancel')\n },\n submitErrorMsg () {\n return this.submitError && this.submitError instanceof Error ? this.submitError.toString() : this.submitError\n }\n },\n methods: {\n destroy () {\n if (this.cropper) {\n this.cropper.destroy()\n }\n this.$refs.input.value = ''\n this.dataUrl = undefined\n this.$emit('close')\n },\n submit (cropping = true) {\n this.submitting = true\n this.avatarUploadError = null\n this.submitHandler(cropping && this.cropper, this.file)\n .then(() => this.destroy())\n .catch((err) => {\n this.submitError = err\n })\n .finally(() => {\n this.submitting = false\n })\n },\n pickImage () {\n this.$refs.input.click()\n },\n createCropper () {\n this.cropper = new Cropper(this.$refs.img, this.cropperOptions)\n },\n getTriggerDOM () {\n return typeof this.trigger === 'object' ? this.trigger : document.querySelector(this.trigger)\n },\n readFile () {\n const fileInput = this.$refs.input\n if (fileInput.files != null && fileInput.files[0] != null) {\n this.file = fileInput.files[0]\n let reader = new window.FileReader()\n reader.onload = (e) => {\n this.dataUrl = e.target.result\n this.$emit('open')\n }\n reader.readAsDataURL(this.file)\n this.$emit('changed', this.file, reader)\n }\n },\n clearError () {\n this.submitError = null\n }\n },\n mounted () {\n // listen for click event on trigger\n const trigger = this.getTriggerDOM()\n if (!trigger) {\n this.$emit('error', 'No image make trigger found.', 'user')\n } else {\n trigger.addEventListener('click', this.pickImage)\n }\n // listen for input file changes\n const fileInput = this.$refs.input\n fileInput.addEventListener('change', this.readFile)\n },\n beforeDestroy: function () {\n // remove the event listeners\n const trigger = this.getTriggerDOM()\n if (trigger) {\n trigger.removeEventListener('click', this.pickImage)\n }\n const fileInput = this.$refs.input\n fileInput.removeEventListener('change', this.readFile)\n }\n}\n\nexport default ImageCropper\n","import BasicUserCard from '../basic_user_card/basic_user_card.vue'\n\nconst BlockCard = {\n props: ['userId'],\n data () {\n return {\n progress: false\n }\n },\n computed: {\n user () {\n return this.$store.getters.findUser(this.userId)\n },\n blocked () {\n return this.user.statusnet_blocking\n }\n },\n components: {\n BasicUserCard\n },\n methods: {\n unblockUser () {\n this.progress = true\n this.$store.dispatch('unblockUser', this.user.id).then(() => {\n this.progress = false\n })\n },\n blockUser () {\n this.progress = true\n this.$store.dispatch('blockUser', this.user.id).then(() => {\n this.progress = false\n })\n }\n }\n}\n\nexport default BlockCard\n","import BasicUserCard from '../basic_user_card/basic_user_card.vue'\n\nconst MuteCard = {\n props: ['userId'],\n data () {\n return {\n progress: false\n }\n },\n computed: {\n user () {\n return this.$store.getters.findUser(this.userId)\n },\n muted () {\n return this.user.muted\n }\n },\n components: {\n BasicUserCard\n },\n methods: {\n unmuteUser () {\n this.progress = true\n this.$store.dispatch('unmuteUser', this.user.id).then(() => {\n this.progress = false\n })\n },\n muteUser () {\n this.progress = true\n this.$store.dispatch('muteUser', this.user.id).then(() => {\n this.progress = false\n })\n }\n }\n}\n\nexport default MuteCard\n","import List from '../list/list.vue'\nimport Checkbox from '../checkbox/checkbox.vue'\n\nconst SelectableList = {\n components: {\n List,\n Checkbox\n },\n props: {\n items: {\n type: Array,\n default: () => []\n },\n getKey: {\n type: Function,\n default: item => item.id\n }\n },\n data () {\n return {\n selected: []\n }\n },\n computed: {\n allKeys () {\n return this.items.map(this.getKey)\n },\n filteredSelected () {\n return this.allKeys.filter(key => this.selected.indexOf(key) !== -1)\n },\n allSelected () {\n return this.filteredSelected.length === this.items.length\n },\n noneSelected () {\n return this.filteredSelected.length === 0\n },\n someSelected () {\n return !this.allSelected && !this.noneSelected\n }\n },\n methods: {\n isSelected (item) {\n return this.filteredSelected.indexOf(this.getKey(item)) !== -1\n },\n toggle (checked, item) {\n const key = this.getKey(item)\n const oldChecked = this.isSelected(key)\n if (checked !== oldChecked) {\n if (checked) {\n this.selected.push(key)\n } else {\n this.selected.splice(this.selected.indexOf(key), 1)\n }\n }\n },\n toggleAll (value) {\n if (value) {\n this.selected = this.allKeys.slice(0)\n } else {\n this.selected = []\n }\n }\n }\n}\n\nexport default SelectableList\n","const debounceMilliseconds = 500\n\nexport default {\n props: {\n query: { // function to query results and return a promise\n type: Function,\n required: true\n },\n filter: { // function to filter results in real time\n type: Function\n },\n placeholder: {\n type: String,\n default: 'Search...'\n }\n },\n data () {\n return {\n term: '',\n timeout: null,\n results: [],\n resultsVisible: false\n }\n },\n computed: {\n filtered () {\n return this.filter ? this.filter(this.results) : this.results\n }\n },\n watch: {\n term (val) {\n this.fetchResults(val)\n }\n },\n methods: {\n fetchResults (term) {\n clearTimeout(this.timeout)\n this.timeout = setTimeout(() => {\n this.results = []\n if (term) {\n this.query(term).then((results) => { this.results = results })\n }\n }, debounceMilliseconds)\n },\n onInputClick () {\n this.resultsVisible = true\n },\n onClickOutside () {\n this.resultsVisible = false\n }\n }\n}\n","const Importer = {\n props: {\n submitHandler: {\n type: Function,\n required: true\n },\n submitButtonLabel: {\n type: String,\n default () {\n return this.$t('importer.submit')\n }\n },\n successMessage: {\n type: String,\n default () {\n return this.$t('importer.success')\n }\n },\n errorMessage: {\n type: String,\n default () {\n return this.$t('importer.error')\n }\n }\n },\n data () {\n return {\n file: null,\n error: false,\n success: false,\n submitting: false\n }\n },\n methods: {\n change () {\n this.file = this.$refs.input.files[0]\n },\n submit () {\n this.dismiss()\n this.submitting = true\n this.submitHandler(this.file)\n .then(() => { this.success = true })\n .catch(() => { this.error = true })\n .finally(() => { this.submitting = false })\n },\n dismiss () {\n this.success = false\n this.error = false\n }\n }\n}\n\nexport default Importer\n","const Exporter = {\n props: {\n getContent: {\n type: Function,\n required: true\n },\n filename: {\n type: String,\n default: 'export.csv'\n },\n exportButtonLabel: {\n type: String,\n default () {\n return this.$t('exporter.export')\n }\n },\n processingMessage: {\n type: String,\n default () {\n return this.$t('exporter.processing')\n }\n }\n },\n data () {\n return {\n processing: false\n }\n },\n methods: {\n process () {\n this.processing = true\n this.getContent()\n .then((content) => {\n const fileToDownload = document.createElement('a')\n fileToDownload.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(content))\n fileToDownload.setAttribute('download', this.filename)\n fileToDownload.style.display = 'none'\n document.body.appendChild(fileToDownload)\n fileToDownload.click()\n document.body.removeChild(fileToDownload)\n // Add delay before hiding processing state since browser takes some time to handle file download\n setTimeout(() => { this.processing = false }, 2000)\n })\n }\n }\n}\n\nexport default Exporter\n","import RecoveryCodes from './mfa_backup_codes.vue'\nimport TOTP from './mfa_totp.vue'\nimport Confirm from './confirm.vue'\nimport VueQrcode from '@chenfengyuan/vue-qrcode'\nimport { mapState } from 'vuex'\n\nconst Mfa = {\n data: () => ({\n settings: { // current settings of MFA\n available: false,\n enabled: false,\n totp: false\n },\n setupState: { // setup mfa\n state: '', // state of setup. '' -> 'getBackupCodes' -> 'setupOTP' -> 'complete'\n setupOTPState: '' // state of setup otp. '' -> 'prepare' -> 'confirm' -> 'complete'\n },\n backupCodes: {\n getNewCodes: false,\n inProgress: false, // progress of fetch codes\n codes: []\n },\n otpSettings: { // pre-setup setting of OTP. secret key, qrcode url.\n provisioning_uri: '',\n key: ''\n },\n currentPassword: null,\n otpConfirmToken: null,\n error: null,\n readyInit: false\n }),\n components: {\n 'recovery-codes': RecoveryCodes,\n 'totp-item': TOTP,\n 'qrcode': VueQrcode,\n 'confirm': Confirm\n },\n computed: {\n canSetupOTP () {\n return (\n (this.setupInProgress && this.backupCodesPrepared) ||\n this.settings.enabled\n ) && !this.settings.totp && !this.setupOTPInProgress\n },\n setupInProgress () {\n return this.setupState.state !== '' && this.setupState.state !== 'complete'\n },\n setupOTPInProgress () {\n return this.setupState.state === 'setupOTP' && !this.completedOTP\n },\n prepareOTP () {\n return this.setupState.setupOTPState === 'prepare'\n },\n confirmOTP () {\n return this.setupState.setupOTPState === 'confirm'\n },\n completedOTP () {\n return this.setupState.setupOTPState === 'completed'\n },\n backupCodesPrepared () {\n return !this.backupCodes.inProgress && this.backupCodes.codes.length > 0\n },\n confirmNewBackupCodes () {\n return this.backupCodes.getNewCodes\n },\n ...mapState({\n backendInteractor: (state) => state.api.backendInteractor\n })\n },\n\n methods: {\n activateOTP () {\n if (!this.settings.enabled) {\n this.setupState.state = 'getBackupcodes'\n this.fetchBackupCodes()\n }\n },\n fetchBackupCodes () {\n this.backupCodes.inProgress = true\n this.backupCodes.codes = []\n\n return this.backendInteractor.generateMfaBackupCodes()\n .then((res) => {\n this.backupCodes.codes = res.codes\n this.backupCodes.inProgress = false\n })\n },\n getBackupCodes () { // get a new backup codes\n this.backupCodes.getNewCodes = true\n },\n confirmBackupCodes () { // confirm getting new backup codes\n this.fetchBackupCodes().then((res) => {\n this.backupCodes.getNewCodes = false\n })\n },\n cancelBackupCodes () { // cancel confirm form of new backup codes\n this.backupCodes.getNewCodes = false\n },\n\n // Setup OTP\n setupOTP () { // prepare setup OTP\n this.setupState.state = 'setupOTP'\n this.setupState.setupOTPState = 'prepare'\n this.backendInteractor.mfaSetupOTP()\n .then((res) => {\n this.otpSettings = res\n this.setupState.setupOTPState = 'confirm'\n })\n },\n doConfirmOTP () { // handler confirm enable OTP\n this.error = null\n this.backendInteractor.mfaConfirmOTP({\n token: this.otpConfirmToken,\n password: this.currentPassword\n })\n .then((res) => {\n if (res.error) {\n this.error = res.error\n return\n }\n this.completeSetup()\n })\n },\n\n completeSetup () {\n this.setupState.setupOTPState = 'complete'\n this.setupState.state = 'complete'\n this.currentPassword = null\n this.error = null\n this.fetchSettings()\n },\n cancelSetup () { // cancel setup\n this.setupState.setupOTPState = ''\n this.setupState.state = ''\n this.currentPassword = null\n this.error = null\n },\n // end Setup OTP\n\n // fetch settings from server\n async fetchSettings () {\n let result = await this.backendInteractor.fetchSettingsMFA()\n if (result.error) return\n this.settings = result.settings\n this.settings.available = true\n return result\n }\n },\n mounted () {\n this.fetchSettings().then(() => {\n this.readyInit = true\n })\n }\n}\nexport default Mfa\n","export default {\n props: {\n backupCodes: {\n type: Object,\n default: () => ({\n inProgress: false,\n codes: []\n })\n }\n },\n data: () => ({}),\n computed: {\n inProgress () { return this.backupCodes.inProgress },\n ready () { return this.backupCodes.codes.length > 0 },\n displayTitle () { return this.inProgress || this.ready }\n }\n}\n","import Confirm from './confirm.vue'\nimport { mapState } from 'vuex'\n\nexport default {\n props: ['settings'],\n data: () => ({\n error: false,\n currentPassword: '',\n deactivate: false,\n inProgress: false // progress peform request to disable otp method\n }),\n components: {\n 'confirm': Confirm\n },\n computed: {\n isActivated () {\n return this.settings.totp\n },\n ...mapState({\n backendInteractor: (state) => state.api.backendInteractor\n })\n },\n methods: {\n doActivate () {\n this.$emit('activate')\n },\n cancelDeactivate () { this.deactivate = false },\n doDeactivate () {\n this.error = null\n this.deactivate = true\n },\n confirmDeactivate () { // confirm deactivate TOTP method\n this.error = null\n this.inProgress = true\n this.backendInteractor.mfaDisableOTP({\n password: this.currentPassword\n })\n .then((res) => {\n this.inProgress = false\n if (res.error) {\n this.error = res.error\n return\n }\n this.deactivate = false\n this.$emit('deactivate')\n })\n }\n }\n}\n","const Confirm = {\n props: ['disabled'],\n data: () => ({}),\n methods: {\n confirm () { this.$emit('confirm') },\n cancel () { this.$emit('cancel') }\n }\n}\nexport default Confirm\n","import FollowRequestCard from '../follow_request_card/follow_request_card.vue'\n\nconst FollowRequests = {\n components: {\n FollowRequestCard\n },\n computed: {\n requests () {\n return this.$store.state.api.followRequests\n }\n }\n}\n\nexport default FollowRequests\n","import BasicUserCard from '../basic_user_card/basic_user_card.vue'\n\nconst FollowRequestCard = {\n props: ['user'],\n components: {\n BasicUserCard\n },\n methods: {\n approveUser () {\n this.$store.state.api.backendInteractor.approveUser(this.user.id)\n this.$store.dispatch('removeFollowRequest', this.user)\n },\n denyUser () {\n this.$store.state.api.backendInteractor.denyUser(this.user.id)\n this.$store.dispatch('removeFollowRequest', this.user)\n }\n }\n}\n\nexport default FollowRequestCard\n","import oauth from '../../services/new_api/oauth.js'\n\nconst oac = {\n props: ['code'],\n mounted () {\n if (this.code) {\n const { clientId, clientSecret } = this.$store.state.oauth\n\n oauth.getToken({\n clientId,\n clientSecret,\n instance: this.$store.state.instance.server,\n code: this.code\n }).then((result) => {\n this.$store.commit('setToken', result.access_token)\n this.$store.dispatch('loginUser', result.access_token)\n this.$router.push({ name: 'friends' })\n })\n }\n }\n}\n\nexport default oac\n","import { mapState, mapGetters, mapActions, mapMutations } from 'vuex'\nimport oauthApi from '../../services/new_api/oauth.js'\n\nconst LoginForm = {\n data: () => ({\n user: {},\n error: false\n }),\n computed: {\n isPasswordAuth () { return this.requiredPassword },\n isTokenAuth () { return this.requiredToken },\n ...mapState({\n registrationOpen: state => state.instance.registrationOpen,\n instance: state => state.instance,\n loggingIn: state => state.users.loggingIn,\n oauth: state => state.oauth\n }),\n ...mapGetters(\n 'authFlow', ['requiredPassword', 'requiredToken', 'requiredMFA']\n )\n },\n methods: {\n ...mapMutations('authFlow', ['requireMFA']),\n ...mapActions({ login: 'authFlow/login' }),\n submit () {\n this.isTokenAuth ? this.submitToken() : this.submitPassword()\n },\n submitToken () {\n const { clientId, clientSecret } = this.oauth\n const data = {\n clientId,\n clientSecret,\n instance: this.instance.server,\n commit: this.$store.commit\n }\n\n oauthApi.getOrCreateApp(data)\n .then((app) => { oauthApi.login({ ...app, ...data }) })\n },\n submitPassword () {\n const { clientId } = this.oauth\n const data = {\n clientId,\n oauth: this.oauth,\n instance: this.instance.server,\n commit: this.$store.commit\n }\n this.error = false\n\n oauthApi.getOrCreateApp(data).then((app) => {\n oauthApi.getTokenWithCredentials(\n {\n ...app,\n instance: data.instance,\n username: this.user.username,\n password: this.user.password\n }\n ).then((result) => {\n if (result.error) {\n if (result.error === 'mfa_required') {\n this.requireMFA({ app: app, settings: result })\n } else if (result.identifier === 'password_reset_required') {\n this.$router.push({ name: 'password-reset', params: { passwordResetRequested: true } })\n } else {\n this.error = result.error\n this.focusOnPasswordInput()\n }\n return\n }\n this.login(result).then(() => {\n this.$router.push({ name: 'friends' })\n })\n })\n })\n },\n clearError () { this.error = false },\n focusOnPasswordInput () {\n let passwordInput = this.$refs.passwordInput\n passwordInput.focus()\n passwordInput.setSelectionRange(0, passwordInput.value.length)\n }\n }\n}\n\nexport default LoginForm\n","import mfaApi from '../../services/new_api/mfa.js'\nimport { mapState, mapGetters, mapActions, mapMutations } from 'vuex'\n\nexport default {\n data: () => ({\n code: null,\n error: false\n }),\n computed: {\n ...mapGetters({\n authApp: 'authFlow/app',\n authSettings: 'authFlow/settings'\n }),\n ...mapState({ instance: 'instance' })\n },\n methods: {\n ...mapMutations('authFlow', ['requireTOTP', 'abortMFA']),\n ...mapActions({ login: 'authFlow/login' }),\n clearError () { this.error = false },\n submit () {\n const data = {\n app: this.authApp,\n instance: this.instance.server,\n mfaToken: this.authSettings.mfa_token,\n code: this.code\n }\n\n mfaApi.verifyRecoveryCode(data).then((result) => {\n if (result.error) {\n this.error = result.error\n this.code = null\n return\n }\n\n this.login(result).then(() => {\n this.$router.push({ name: 'friends' })\n })\n })\n }\n }\n}\n","import mfaApi from '../../services/new_api/mfa.js'\nimport { mapState, mapGetters, mapActions, mapMutations } from 'vuex'\nexport default {\n data: () => ({\n code: null,\n error: false\n }),\n computed: {\n ...mapGetters({\n authApp: 'authFlow/app',\n authSettings: 'authFlow/settings'\n }),\n ...mapState({ instance: 'instance' })\n },\n methods: {\n ...mapMutations('authFlow', ['requireRecovery', 'abortMFA']),\n ...mapActions({ login: 'authFlow/login' }),\n clearError () { this.error = false },\n submit () {\n const data = {\n app: this.authApp,\n instance: this.instance.server,\n mfaToken: this.authSettings.mfa_token,\n code: this.code\n }\n\n mfaApi.verifyOTPCode(data).then((result) => {\n if (result.error) {\n this.error = result.error\n this.code = null\n return\n }\n\n this.login(result).then(() => {\n this.$router.push({ name: 'friends' })\n })\n })\n }\n }\n}\n","import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'\n\nconst chatPanel = {\n props: [ 'floating' ],\n data () {\n return {\n currentMessage: '',\n channel: null,\n collapsed: true\n }\n },\n computed: {\n messages () {\n return this.$store.state.chat.messages\n }\n },\n methods: {\n submit (message) {\n this.$store.state.chat.channel.push('new_msg', { text: message }, 10000)\n this.currentMessage = ''\n },\n togglePanel () {\n this.collapsed = !this.collapsed\n },\n userProfileLink (user) {\n return generateProfileLink(user.id, user.username, this.$store.state.instance.restrictedNicknames)\n }\n }\n}\n\nexport default chatPanel\n","import apiService from '../../services/api/api.service.js'\nimport FollowCard from '../follow_card/follow_card.vue'\n\nconst WhoToFollow = {\n components: {\n FollowCard\n },\n data () {\n return {\n users: []\n }\n },\n mounted () {\n this.getWhoToFollow()\n },\n methods: {\n showWhoToFollow (reply) {\n reply.forEach((i, index) => {\n this.$store.state.api.backendInteractor.fetchUser({ id: i.acct })\n .then((externalUser) => {\n if (!externalUser.error) {\n this.$store.commit('addNewUsers', [externalUser])\n this.users.push(externalUser)\n }\n })\n })\n },\n getWhoToFollow () {\n const credentials = this.$store.state.users.currentUser.credentials\n if (credentials) {\n apiService.suggestions({ credentials: credentials })\n .then((reply) => {\n this.showWhoToFollow(reply)\n })\n }\n }\n }\n}\n\nexport default WhoToFollow\n","import InstanceSpecificPanel from '../instance_specific_panel/instance_specific_panel.vue'\nimport FeaturesPanel from '../features_panel/features_panel.vue'\nimport TermsOfServicePanel from '../terms_of_service_panel/terms_of_service_panel.vue'\n\nconst About = {\n components: {\n InstanceSpecificPanel,\n FeaturesPanel,\n TermsOfServicePanel\n },\n computed: {\n showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }\n }\n}\n\nexport default About\n","const InstanceSpecificPanel = {\n computed: {\n instanceSpecificPanelContent () {\n return this.$store.state.instance.instanceSpecificPanelContent\n }\n }\n}\n\nexport default InstanceSpecificPanel\n","const FeaturesPanel = {\n computed: {\n chat: function () { return this.$store.state.instance.chatAvailable },\n gopher: function () { return this.$store.state.instance.gopherAvailable },\n whoToFollow: function () { return this.$store.state.instance.suggestionsEnabled },\n mediaProxy: function () { return this.$store.state.instance.mediaProxyAvailable },\n minimalScopesMode: function () { return this.$store.state.instance.minimalScopesMode },\n textlimit: function () { return this.$store.state.instance.textlimit }\n }\n}\n\nexport default FeaturesPanel\n","const TermsOfServicePanel = {\n computed: {\n content () {\n return this.$store.state.instance.tos\n }\n }\n}\n\nexport default TermsOfServicePanel\n","const RemoteUserResolver = {\n data: () => ({\n error: false\n }),\n mounted () {\n this.redirect()\n },\n methods: {\n redirect () {\n const acct = this.$route.params.username + '@' + this.$route.params.hostname\n this.$store.state.api.backendInteractor.fetchUser({ id: acct })\n .then((externalUser) => {\n if (externalUser.error) {\n this.error = true\n } else {\n this.$store.commit('addNewUsers', [externalUser])\n const id = externalUser.id\n this.$router.replace({\n name: 'external-user-profile',\n params: { id }\n })\n }\n })\n .catch(() => {\n this.error = true\n })\n }\n }\n}\n\nexport default RemoteUserResolver\n","import UserPanel from './components/user_panel/user_panel.vue'\nimport NavPanel from './components/nav_panel/nav_panel.vue'\nimport Notifications from './components/notifications/notifications.vue'\nimport SearchBar from './components/search_bar/search_bar.vue'\nimport InstanceSpecificPanel from './components/instance_specific_panel/instance_specific_panel.vue'\nimport FeaturesPanel from './components/features_panel/features_panel.vue'\nimport WhoToFollowPanel from './components/who_to_follow_panel/who_to_follow_panel.vue'\nimport ChatPanel from './components/chat_panel/chat_panel.vue'\nimport MediaModal from './components/media_modal/media_modal.vue'\nimport SideDrawer from './components/side_drawer/side_drawer.vue'\nimport MobilePostStatusButton from './components/mobile_post_status_button/mobile_post_status_button.vue'\nimport MobileNav from './components/mobile_nav/mobile_nav.vue'\nimport UserReportingModal from './components/user_reporting_modal/user_reporting_modal.vue'\nimport PostStatusModal from './components/post_status_modal/post_status_modal.vue'\nimport { windowWidth } from './services/window_utils/window_utils'\n\nexport default {\n name: 'app',\n components: {\n UserPanel,\n NavPanel,\n Notifications,\n SearchBar,\n InstanceSpecificPanel,\n FeaturesPanel,\n WhoToFollowPanel,\n ChatPanel,\n MediaModal,\n SideDrawer,\n MobilePostStatusButton,\n MobileNav,\n UserReportingModal,\n PostStatusModal\n },\n data: () => ({\n mobileActivePanel: 'timeline',\n searchBarHidden: true,\n supportsMask: window.CSS && window.CSS.supports && (\n window.CSS.supports('mask-size', 'contain') ||\n window.CSS.supports('-webkit-mask-size', 'contain') ||\n window.CSS.supports('-moz-mask-size', 'contain') ||\n window.CSS.supports('-ms-mask-size', 'contain') ||\n window.CSS.supports('-o-mask-size', 'contain')\n )\n }),\n created () {\n // Load the locale from the storage\n this.$i18n.locale = this.$store.getters.mergedConfig.interfaceLanguage\n window.addEventListener('resize', this.updateMobileState)\n },\n destroyed () {\n window.removeEventListener('resize', this.updateMobileState)\n },\n computed: {\n currentUser () { return this.$store.state.users.currentUser },\n background () {\n return this.currentUser.background_image || this.$store.state.instance.background\n },\n enableMask () { return this.supportsMask && this.$store.state.instance.logoMask },\n logoStyle () {\n return {\n 'visibility': this.enableMask ? 'hidden' : 'visible'\n }\n },\n logoMaskStyle () {\n return this.enableMask ? {\n 'mask-image': `url(${this.$store.state.instance.logo})`\n } : {\n 'background-color': this.enableMask ? '' : 'transparent'\n }\n },\n logoBgStyle () {\n return Object.assign({\n 'margin': `${this.$store.state.instance.logoMargin} 0`,\n opacity: this.searchBarHidden ? 1 : 0\n }, this.enableMask ? {} : {\n 'background-color': this.enableMask ? '' : 'transparent'\n })\n },\n logo () { return this.$store.state.instance.logo },\n bgStyle () {\n return {\n 'background-image': `url(${this.background})`\n }\n },\n bgAppStyle () {\n return {\n '--body-background-image': `url(${this.background})`\n }\n },\n sitename () { return this.$store.state.instance.name },\n chat () { return this.$store.state.chat.channel.state === 'joined' },\n suggestionsEnabled () { return this.$store.state.instance.suggestionsEnabled },\n showInstanceSpecificPanel () {\n return this.$store.state.instance.showInstanceSpecificPanel &&\n !this.$store.getters.mergedConfig.hideISP &&\n this.$store.state.instance.instanceSpecificPanelContent\n },\n showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },\n isMobileLayout () { return this.$store.state.interface.mobileLayout }\n },\n methods: {\n scrollToTop () {\n window.scrollTo(0, 0)\n },\n logout () {\n this.$router.replace('/main/public')\n this.$store.dispatch('logout')\n },\n onSearchBarToggled (hidden) {\n this.searchBarHidden = hidden\n },\n updateMobileState () {\n const mobileLayout = windowWidth() <= 800\n const changed = mobileLayout !== this.isMobileLayout\n if (changed) {\n this.$store.dispatch('setMobileLayout', mobileLayout)\n }\n }\n }\n}\n","import AuthForm from '../auth_form/auth_form.js'\nimport PostStatusForm from '../post_status_form/post_status_form.vue'\nimport UserCard from '../user_card/user_card.vue'\nimport { mapState } from 'vuex'\n\nconst UserPanel = {\n computed: {\n signedIn () { return this.user },\n ...mapState({ user: state => state.users.currentUser })\n },\n components: {\n AuthForm,\n PostStatusForm,\n UserCard\n }\n}\n\nexport default UserPanel\n","import followRequestFetcher from '../../services/follow_request_fetcher/follow_request_fetcher.service'\n\nconst NavPanel = {\n created () {\n if (this.currentUser && this.currentUser.locked) {\n const store = this.$store\n const credentials = store.state.users.currentUser.credentials\n\n followRequestFetcher.startFetching({ store, credentials })\n }\n },\n computed: {\n currentUser () {\n return this.$store.state.users.currentUser\n },\n chat () {\n return this.$store.state.chat.channel\n },\n followRequestCount () {\n return this.$store.state.api.followRequests.length\n }\n }\n}\n\nexport default NavPanel\n","const SearchBar = {\n data: () => ({\n searchTerm: undefined,\n hidden: true,\n error: false,\n loading: false\n }),\n watch: {\n '$route': function (route) {\n if (route.name === 'search') {\n this.searchTerm = route.query.query\n }\n }\n },\n methods: {\n find (searchTerm) {\n this.$router.push({ name: 'search', query: { query: searchTerm } })\n this.$refs.searchInput.focus()\n },\n toggleHidden () {\n this.hidden = !this.hidden\n this.$emit('toggled', this.hidden)\n this.$nextTick(() => {\n if (!this.hidden) {\n this.$refs.searchInput.focus()\n }\n })\n }\n }\n}\n\nexport default SearchBar\n","import apiService from '../../services/api/api.service.js'\nimport generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'\nimport { shuffle } from 'lodash'\n\nfunction showWhoToFollow (panel, reply) {\n const shuffled = shuffle(reply)\n\n panel.usersToFollow.forEach((toFollow, index) => {\n let user = shuffled[index]\n let img = user.avatar || '/images/avi.png'\n let name = user.acct\n\n toFollow.img = img\n toFollow.name = name\n\n panel.$store.state.api.backendInteractor.fetchUser({ id: name })\n .then((externalUser) => {\n if (!externalUser.error) {\n panel.$store.commit('addNewUsers', [externalUser])\n toFollow.id = externalUser.id\n }\n })\n })\n}\n\nfunction getWhoToFollow (panel) {\n var credentials = panel.$store.state.users.currentUser.credentials\n if (credentials) {\n panel.usersToFollow.forEach(toFollow => {\n toFollow.name = 'Loading...'\n })\n apiService.suggestions({ credentials: credentials })\n .then((reply) => {\n showWhoToFollow(panel, reply)\n })\n }\n}\n\nconst WhoToFollowPanel = {\n data: () => ({\n usersToFollow: new Array(3).fill().map(x => (\n {\n img: '/images/avi.png',\n name: '',\n id: 0\n }\n ))\n }),\n computed: {\n user: function () {\n return this.$store.state.users.currentUser.screen_name\n },\n suggestionsEnabled () {\n return this.$store.state.instance.suggestionsEnabled\n }\n },\n methods: {\n userProfileLink (id, name) {\n return generateProfileLink(id, name, this.$store.state.instance.restrictedNicknames)\n }\n },\n watch: {\n user: function (user, oldUser) {\n if (this.suggestionsEnabled) {\n getWhoToFollow(this)\n }\n }\n },\n mounted:\n function () {\n if (this.suggestionsEnabled) {\n getWhoToFollow(this)\n }\n }\n}\n\nexport default WhoToFollowPanel\n","import StillImage from '../still-image/still-image.vue'\nimport VideoAttachment from '../video_attachment/video_attachment.vue'\nimport Modal from '../modal/modal.vue'\nimport fileTypeService from '../../services/file_type/file_type.service.js'\nimport GestureService from '../../services/gesture_service/gesture_service'\n\nconst MediaModal = {\n components: {\n StillImage,\n VideoAttachment,\n Modal\n },\n computed: {\n showing () {\n return this.$store.state.mediaViewer.activated\n },\n media () {\n return this.$store.state.mediaViewer.media\n },\n currentIndex () {\n return this.$store.state.mediaViewer.currentIndex\n },\n currentMedia () {\n return this.media[this.currentIndex]\n },\n canNavigate () {\n return this.media.length > 1\n },\n type () {\n return this.currentMedia ? fileTypeService.fileType(this.currentMedia.mimetype) : null\n }\n },\n created () {\n this.mediaSwipeGestureRight = GestureService.swipeGesture(\n GestureService.DIRECTION_RIGHT,\n this.goPrev,\n 50\n )\n this.mediaSwipeGestureLeft = GestureService.swipeGesture(\n GestureService.DIRECTION_LEFT,\n this.goNext,\n 50\n )\n },\n methods: {\n mediaTouchStart (e) {\n GestureService.beginSwipe(e, this.mediaSwipeGestureRight)\n GestureService.beginSwipe(e, this.mediaSwipeGestureLeft)\n },\n mediaTouchMove (e) {\n GestureService.updateSwipe(e, this.mediaSwipeGestureRight)\n GestureService.updateSwipe(e, this.mediaSwipeGestureLeft)\n },\n hide () {\n this.$store.dispatch('closeMediaViewer')\n },\n goPrev () {\n if (this.canNavigate) {\n const prevIndex = this.currentIndex === 0 ? this.media.length - 1 : (this.currentIndex - 1)\n this.$store.dispatch('setCurrent', this.media[prevIndex])\n }\n },\n goNext () {\n if (this.canNavigate) {\n const nextIndex = this.currentIndex === this.media.length - 1 ? 0 : (this.currentIndex + 1)\n this.$store.dispatch('setCurrent', this.media[nextIndex])\n }\n },\n handleKeyupEvent (e) {\n if (this.showing && e.keyCode === 27) { // escape\n this.hide()\n }\n },\n handleKeydownEvent (e) {\n if (!this.showing) {\n return\n }\n\n if (e.keyCode === 39) { // arrow right\n this.goNext()\n } else if (e.keyCode === 37) { // arrow left\n this.goPrev()\n }\n }\n },\n mounted () {\n document.addEventListener('keyup', this.handleKeyupEvent)\n document.addEventListener('keydown', this.handleKeydownEvent)\n },\n destroyed () {\n document.removeEventListener('keyup', this.handleKeyupEvent)\n document.removeEventListener('keydown', this.handleKeydownEvent)\n }\n}\n\nexport default MediaModal\n","\n\n\n\n\n","import UserCard from '../user_card/user_card.vue'\nimport { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils'\nimport GestureService from '../../services/gesture_service/gesture_service'\n\nconst SideDrawer = {\n props: [ 'logout' ],\n data: () => ({\n closed: true,\n closeGesture: undefined\n }),\n created () {\n this.closeGesture = GestureService.swipeGesture(GestureService.DIRECTION_LEFT, this.toggleDrawer)\n },\n components: { UserCard },\n computed: {\n currentUser () {\n return this.$store.state.users.currentUser\n },\n chat () { return this.$store.state.chat.channel.state === 'joined' },\n unseenNotifications () {\n return unseenNotificationsFromStore(this.$store)\n },\n unseenNotificationsCount () {\n return this.unseenNotifications.length\n },\n suggestionsEnabled () {\n return this.$store.state.instance.suggestionsEnabled\n },\n logo () {\n return this.$store.state.instance.logo\n },\n sitename () {\n return this.$store.state.instance.name\n },\n followRequestCount () {\n return this.$store.state.api.followRequests.length\n }\n },\n methods: {\n toggleDrawer () {\n this.closed = !this.closed\n },\n doLogout () {\n this.logout()\n this.toggleDrawer()\n },\n touchStart (e) {\n GestureService.beginSwipe(e, this.closeGesture)\n },\n touchMove (e) {\n GestureService.updateSwipe(e, this.closeGesture)\n }\n }\n}\n\nexport default SideDrawer\n","import { debounce } from 'lodash'\n\nconst MobilePostStatusButton = {\n data () {\n return {\n hidden: false,\n scrollingDown: false,\n inputActive: false,\n oldScrollPos: 0,\n amountScrolled: 0\n }\n },\n created () {\n if (this.autohideFloatingPostButton) {\n this.activateFloatingPostButtonAutohide()\n }\n window.addEventListener('resize', this.handleOSK)\n },\n destroyed () {\n if (this.autohideFloatingPostButton) {\n this.deactivateFloatingPostButtonAutohide()\n }\n window.removeEventListener('resize', this.handleOSK)\n },\n computed: {\n isLoggedIn () {\n return !!this.$store.state.users.currentUser\n },\n isHidden () {\n return this.autohideFloatingPostButton && (this.hidden || this.inputActive)\n },\n autohideFloatingPostButton () {\n return !!this.$store.getters.mergedConfig.autohideFloatingPostButton\n }\n },\n watch: {\n autohideFloatingPostButton: function (isEnabled) {\n if (isEnabled) {\n this.activateFloatingPostButtonAutohide()\n } else {\n this.deactivateFloatingPostButtonAutohide()\n }\n }\n },\n methods: {\n activateFloatingPostButtonAutohide () {\n window.addEventListener('scroll', this.handleScrollStart)\n window.addEventListener('scroll', this.handleScrollEnd)\n },\n deactivateFloatingPostButtonAutohide () {\n window.removeEventListener('scroll', this.handleScrollStart)\n window.removeEventListener('scroll', this.handleScrollEnd)\n },\n openPostForm () {\n this.$store.dispatch('openPostStatusModal')\n },\n handleOSK () {\n // This is a big hack: we're guessing from changed window sizes if the\n // on-screen keyboard is active or not. This is only really important\n // for phones in portrait mode and it's more important to show the button\n // in normal scenarios on all phones, than it is to hide it when the\n // keyboard is active.\n // Guesswork based on https://www.mydevice.io/#compare-devices\n\n // for example, iphone 4 and android phones from the same time period\n const smallPhone = window.innerWidth < 350\n const smallPhoneKbOpen = smallPhone && window.innerHeight < 345\n\n const biggerPhone = !smallPhone && window.innerWidth < 450\n const biggerPhoneKbOpen = biggerPhone && window.innerHeight < 560\n if (smallPhoneKbOpen || biggerPhoneKbOpen) {\n this.inputActive = true\n } else {\n this.inputActive = false\n }\n },\n handleScrollStart: debounce(function () {\n if (window.scrollY > this.oldScrollPos) {\n this.hidden = true\n } else {\n this.hidden = false\n }\n this.oldScrollPos = window.scrollY\n }, 100, { leading: true, trailing: false }),\n\n handleScrollEnd: debounce(function () {\n this.hidden = false\n this.oldScrollPos = window.scrollY\n }, 100, { leading: false, trailing: true })\n }\n}\n\nexport default MobilePostStatusButton\n","import SideDrawer from '../side_drawer/side_drawer.vue'\nimport Notifications from '../notifications/notifications.vue'\nimport { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils'\nimport GestureService from '../../services/gesture_service/gesture_service'\n\nconst MobileNav = {\n components: {\n SideDrawer,\n Notifications\n },\n data: () => ({\n notificationsCloseGesture: undefined,\n notificationsOpen: false\n }),\n created () {\n this.notificationsCloseGesture = GestureService.swipeGesture(\n GestureService.DIRECTION_RIGHT,\n this.closeMobileNotifications,\n 50\n )\n },\n computed: {\n currentUser () {\n return this.$store.state.users.currentUser\n },\n unseenNotifications () {\n return unseenNotificationsFromStore(this.$store)\n },\n unseenNotificationsCount () {\n return this.unseenNotifications.length\n },\n sitename () { return this.$store.state.instance.name }\n },\n methods: {\n toggleMobileSidebar () {\n this.$refs.sideDrawer.toggleDrawer()\n },\n openMobileNotifications () {\n this.notificationsOpen = true\n },\n closeMobileNotifications () {\n if (this.notificationsOpen) {\n // make sure to mark notifs seen only when the notifs were open and not\n // from close-calls.\n this.notificationsOpen = false\n this.markNotificationsAsSeen()\n }\n },\n notificationsTouchStart (e) {\n GestureService.beginSwipe(e, this.notificationsCloseGesture)\n },\n notificationsTouchMove (e) {\n GestureService.updateSwipe(e, this.notificationsCloseGesture)\n },\n scrollToTop () {\n window.scrollTo(0, 0)\n },\n logout () {\n this.$router.replace('/main/public')\n this.$store.dispatch('logout')\n },\n markNotificationsAsSeen () {\n this.$refs.notifications.markAsSeen()\n },\n onScroll ({ target: { scrollTop, clientHeight, scrollHeight } }) {\n if (this.$store.getters.mergedConfig.autoLoad && scrollTop + clientHeight >= scrollHeight) {\n this.$refs.notifications.fetchOlderNotifications()\n }\n }\n },\n watch: {\n $route () {\n // handles closing notificaitons when you press any router-link on the\n // notifications.\n this.closeMobileNotifications()\n }\n }\n}\n\nexport default MobileNav\n","\nimport Status from '../status/status.vue'\nimport List from '../list/list.vue'\nimport Checkbox from '../checkbox/checkbox.vue'\nimport Modal from '../modal/modal.vue'\n\nconst UserReportingModal = {\n components: {\n Status,\n List,\n Checkbox,\n Modal\n },\n data () {\n return {\n comment: '',\n forward: false,\n statusIdsToReport: [],\n processing: false,\n error: false\n }\n },\n computed: {\n isLoggedIn () {\n return !!this.$store.state.users.currentUser\n },\n isOpen () {\n return this.isLoggedIn && this.$store.state.reports.modalActivated\n },\n userId () {\n return this.$store.state.reports.userId\n },\n user () {\n return this.$store.getters.findUser(this.userId)\n },\n remoteInstance () {\n return !this.user.is_local && this.user.screen_name.substr(this.user.screen_name.indexOf('@') + 1)\n },\n statuses () {\n return this.$store.state.reports.statuses\n }\n },\n watch: {\n userId: 'resetState'\n },\n methods: {\n resetState () {\n // Reset state\n this.comment = ''\n this.forward = false\n this.statusIdsToReport = []\n this.processing = false\n this.error = false\n },\n closeModal () {\n this.$store.dispatch('closeUserReportingModal')\n },\n reportUser () {\n this.processing = true\n this.error = false\n const params = {\n userId: this.userId,\n comment: this.comment,\n forward: this.forward,\n statusIds: this.statusIdsToReport\n }\n this.$store.state.api.backendInteractor.reportUser(params)\n .then(() => {\n this.processing = false\n this.resetState()\n this.closeModal()\n })\n .catch(() => {\n this.processing = false\n this.error = true\n })\n },\n clearError () {\n this.error = false\n },\n isChecked (statusId) {\n return this.statusIdsToReport.indexOf(statusId) !== -1\n },\n toggleStatus (checked, statusId) {\n if (checked === this.isChecked(statusId)) {\n return\n }\n\n if (checked) {\n this.statusIdsToReport.push(statusId)\n } else {\n this.statusIdsToReport.splice(this.statusIdsToReport.indexOf(statusId), 1)\n }\n },\n resize (e) {\n const target = e.target || e\n if (!(target instanceof window.Element)) { return }\n // Auto is needed to make textbox shrink when removing lines\n target.style.height = 'auto'\n target.style.height = `${target.scrollHeight}px`\n if (target.value === '') {\n target.style.height = null\n }\n }\n }\n}\n\nexport default UserReportingModal\n","import PostStatusForm from '../post_status_form/post_status_form.vue'\nimport Modal from '../modal/modal.vue'\nimport get from 'lodash/get'\n\nconst PostStatusModal = {\n components: {\n PostStatusForm,\n Modal\n },\n data () {\n return {\n resettingForm: false\n }\n },\n computed: {\n isLoggedIn () {\n return !!this.$store.state.users.currentUser\n },\n modalActivated () {\n return this.$store.state.postStatus.modalActivated\n },\n isFormVisible () {\n return this.isLoggedIn && !this.resettingForm && this.modalActivated\n },\n params () {\n return this.$store.state.postStatus.params || {}\n }\n },\n watch: {\n params (newVal, oldVal) {\n if (get(newVal, 'repliedUser.id') !== get(oldVal, 'repliedUser.id')) {\n this.resettingForm = true\n this.$nextTick(() => {\n this.resettingForm = false\n })\n }\n },\n isFormVisible (val) {\n if (val) {\n this.$nextTick(() => this.$el && this.$el.querySelector('textarea').focus())\n }\n }\n },\n methods: {\n closeModal () {\n this.$store.dispatch('closePostStatusModal')\n }\n }\n}\n\nexport default PostStatusModal\n","import Vue from 'vue'\n\nimport './tab_switcher.scss'\n\nexport default Vue.component('tab-switcher', {\n name: 'TabSwitcher',\n props: {\n renderOnlyFocused: {\n required: false,\n type: Boolean,\n default: false\n },\n onSwitch: {\n required: false,\n type: Function,\n default: undefined\n },\n activeTab: {\n required: false,\n type: String,\n default: undefined\n },\n scrollableTabs: {\n required: false,\n type: Boolean,\n default: false\n }\n },\n data () {\n return {\n active: this.$slots.default.findIndex(_ => _.tag)\n }\n },\n computed: {\n activeIndex () {\n // In case of controlled component\n if (this.activeTab) {\n return this.$slots.default.findIndex(slot => this.activeTab === slot.key)\n } else {\n return this.active\n }\n }\n },\n beforeUpdate () {\n const currentSlot = this.$slots.default[this.active]\n if (!currentSlot.tag) {\n this.active = this.$slots.default.findIndex(_ => _.tag)\n }\n },\n methods: {\n activateTab (index) {\n return (e) => {\n e.preventDefault()\n if (typeof this.onSwitch === 'function') {\n this.onSwitch.call(null, this.$slots.default[index].key)\n }\n this.active = index\n }\n }\n },\n render (h) {\n const tabs = this.$slots.default\n .map((slot, index) => {\n if (!slot.tag) return\n const classesTab = ['tab']\n const classesWrapper = ['tab-wrapper']\n\n if (this.activeIndex === index) {\n classesTab.push('active')\n classesWrapper.push('active')\n }\n if (slot.data.attrs.image) {\n return (\n
\n \n \n {slot.data.attrs.label ? '' : slot.data.attrs.label}\n \n
\n )\n }\n return (\n
\n \n {slot.data.attrs.label}\n
\n )\n })\n\n const contents = this.$slots.default.map((slot, index) => {\n if (!slot.tag) return\n const active = this.activeIndex === index\n if (this.renderOnlyFocused) {\n return active\n ?
{slot}
\n :
\n }\n return
{slot}
\n })\n\n return (\n
\n
\n {tabs}\n
\n
\n {contents}\n
\n
\n )\n }\n})\n","import { set, delete as del } from 'vue'\nimport { setPreset, applyTheme } from '../services/style_setter/style_setter.js'\n\nconst browserLocale = (window.navigator.language || 'en').split('-')[0]\n\nexport const defaultState = {\n colors: {},\n // bad name: actually hides posts of muted USERS\n hideMutedPosts: undefined, // instance default\n collapseMessageWithSubject: undefined, // instance default\n padEmoji: true,\n hideAttachments: false,\n hideAttachmentsInConv: false,\n maxThumbnails: 16,\n hideNsfw: true,\n preloadImage: true,\n loopVideo: true,\n loopVideoSilentOnly: true,\n autoLoad: true,\n streaming: false,\n hoverPreview: true,\n autohideFloatingPostButton: false,\n pauseOnUnfocused: true,\n stopGifs: false,\n replyVisibility: 'all',\n notificationVisibility: {\n follows: true,\n mentions: true,\n likes: true,\n repeats: true\n },\n webPushNotifications: false,\n muteWords: [],\n highlight: {},\n interfaceLanguage: browserLocale,\n hideScopeNotice: false,\n scopeCopy: undefined, // instance default\n subjectLineBehavior: undefined, // instance default\n alwaysShowSubjectInput: undefined, // instance default\n postContentType: undefined, // instance default\n minimalScopesMode: undefined, // instance default\n // This hides statuses filtered via a word filter\n hideFilteredStatuses: undefined, // instance default\n playVideosInModal: false,\n useOneClickNsfw: false,\n useContainFit: false,\n hidePostStats: undefined, // instance default\n hideUserStats: undefined // instance default\n}\n\n// caching the instance default properties\nexport const instanceDefaultProperties = Object.entries(defaultState)\n .filter(([key, value]) => value === undefined)\n .map(([key, value]) => key)\n\nconst config = {\n state: defaultState,\n getters: {\n mergedConfig (state, getters, rootState, rootGetters) {\n const { instance } = rootState\n return {\n ...state,\n ...instanceDefaultProperties\n .map(key => [key, state[key] === undefined\n ? instance[key]\n : state[key]\n ])\n .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {})\n }\n }\n },\n mutations: {\n setOption (state, { name, value }) {\n set(state, name, value)\n },\n setHighlight (state, { user, color, type }) {\n const data = this.state.config.highlight[user]\n if (color || type) {\n set(state.highlight, user, { color: color || data.color, type: type || data.type })\n } else {\n del(state.highlight, user)\n }\n }\n },\n actions: {\n setHighlight ({ commit, dispatch }, { user, color, type }) {\n commit('setHighlight', { user, color, type })\n },\n setOption ({ commit, dispatch }, { name, value }) {\n commit('setOption', { name, value })\n switch (name) {\n case 'theme':\n setPreset(value, commit)\n break\n case 'customTheme':\n applyTheme(value, commit)\n }\n }\n }\n}\n\nexport default config\n","import apiService from '../api/api.service.js'\nimport timelineFetcherService from '../timeline_fetcher/timeline_fetcher.service.js'\nimport notificationsFetcher from '../notifications_fetcher/notifications_fetcher.service.js'\n\nconst backendInteractorService = credentials => {\n const fetchStatus = ({ id }) => {\n return apiService.fetchStatus({ id, credentials })\n }\n\n const fetchConversation = ({ id }) => {\n return apiService.fetchConversation({ id, credentials })\n }\n\n const fetchFriends = ({ id, maxId, sinceId, limit }) => {\n return apiService.fetchFriends({ id, maxId, sinceId, limit, credentials })\n }\n\n const exportFriends = ({ id }) => {\n return apiService.exportFriends({ id, credentials })\n }\n\n const fetchFollowers = ({ id, maxId, sinceId, limit }) => {\n return apiService.fetchFollowers({ id, maxId, sinceId, limit, credentials })\n }\n\n const fetchUser = ({ id }) => {\n return apiService.fetchUser({ id, credentials })\n }\n\n const fetchUserRelationship = ({ id }) => {\n return apiService.fetchUserRelationship({ id, credentials })\n }\n\n const followUser = ({ id, reblogs }) => {\n return apiService.followUser({ credentials, id, reblogs })\n }\n\n const unfollowUser = (id) => {\n return apiService.unfollowUser({ credentials, id })\n }\n\n const blockUser = (id) => {\n return apiService.blockUser({ credentials, id })\n }\n\n const unblockUser = (id) => {\n return apiService.unblockUser({ credentials, id })\n }\n\n const approveUser = (id) => {\n return apiService.approveUser({ credentials, id })\n }\n\n const denyUser = (id) => {\n return apiService.denyUser({ credentials, id })\n }\n\n const startFetchingTimeline = ({ timeline, store, userId = false, tag }) => {\n return timelineFetcherService.startFetching({ timeline, store, credentials, userId, tag })\n }\n\n const startFetchingNotifications = ({ store }) => {\n return notificationsFetcher.startFetching({ store, credentials })\n }\n\n // eslint-disable-next-line camelcase\n const tagUser = ({ screen_name }, tag) => {\n return apiService.tagUser({ screen_name, tag, credentials })\n }\n\n // eslint-disable-next-line camelcase\n const untagUser = ({ screen_name }, tag) => {\n return apiService.untagUser({ screen_name, tag, credentials })\n }\n\n // eslint-disable-next-line camelcase\n const addRight = ({ screen_name }, right) => {\n return apiService.addRight({ screen_name, right, credentials })\n }\n\n // eslint-disable-next-line camelcase\n const deleteRight = ({ screen_name }, right) => {\n return apiService.deleteRight({ screen_name, right, credentials })\n }\n\n // eslint-disable-next-line camelcase\n const setActivationStatus = ({ screen_name }, status) => {\n return apiService.setActivationStatus({ screen_name, status, credentials })\n }\n\n // eslint-disable-next-line camelcase\n const deleteUser = ({ screen_name }) => {\n return apiService.deleteUser({ screen_name, credentials })\n }\n\n const vote = (pollId, choices) => {\n return apiService.vote({ credentials, pollId, choices })\n }\n\n const fetchPoll = (pollId) => {\n return apiService.fetchPoll({ credentials, pollId })\n }\n\n const updateNotificationSettings = ({ settings }) => {\n return apiService.updateNotificationSettings({ credentials, settings })\n }\n\n const fetchMutes = () => apiService.fetchMutes({ credentials })\n const muteUser = (id) => apiService.muteUser({ credentials, id })\n const unmuteUser = (id) => apiService.unmuteUser({ credentials, id })\n const subscribeUser = (id) => apiService.subscribeUser({ credentials, id })\n const unsubscribeUser = (id) => apiService.unsubscribeUser({ credentials, id })\n const fetchBlocks = () => apiService.fetchBlocks({ credentials })\n const fetchFollowRequests = () => apiService.fetchFollowRequests({ credentials })\n const fetchOAuthTokens = () => apiService.fetchOAuthTokens({ credentials })\n const revokeOAuthToken = (id) => apiService.revokeOAuthToken({ id, credentials })\n const fetchPinnedStatuses = (id) => apiService.fetchPinnedStatuses({ credentials, id })\n const pinOwnStatus = (id) => apiService.pinOwnStatus({ credentials, id })\n const unpinOwnStatus = (id) => apiService.unpinOwnStatus({ credentials, id })\n const muteConversation = (id) => apiService.muteConversation({ credentials, id })\n const unmuteConversation = (id) => apiService.unmuteConversation({ credentials, id })\n\n const getCaptcha = () => apiService.getCaptcha()\n const register = (params) => apiService.register({ credentials, params })\n const updateAvatar = ({ avatar }) => apiService.updateAvatar({ credentials, avatar })\n const updateBg = ({ background }) => apiService.updateBg({ credentials, background })\n const updateBanner = ({ banner }) => apiService.updateBanner({ credentials, banner })\n const updateProfile = ({ params }) => apiService.updateProfile({ credentials, params })\n\n const importBlocks = (file) => apiService.importBlocks({ file, credentials })\n const importFollows = (file) => apiService.importFollows({ file, credentials })\n\n const deleteAccount = ({ password }) => apiService.deleteAccount({ credentials, password })\n const changeEmail = ({ email, password }) => apiService.changeEmail({ credentials, email, password })\n const changePassword = ({ password, newPassword, newPasswordConfirmation }) =>\n apiService.changePassword({ credentials, password, newPassword, newPasswordConfirmation })\n\n const fetchSettingsMFA = () => apiService.settingsMFA({ credentials })\n const generateMfaBackupCodes = () => apiService.generateMfaBackupCodes({ credentials })\n const mfaSetupOTP = () => apiService.mfaSetupOTP({ credentials })\n const mfaConfirmOTP = ({ password, token }) => apiService.mfaConfirmOTP({ credentials, password, token })\n const mfaDisableOTP = ({ password }) => apiService.mfaDisableOTP({ credentials, password })\n\n const fetchFavoritedByUsers = (id) => apiService.fetchFavoritedByUsers({ id })\n const fetchRebloggedByUsers = (id) => apiService.fetchRebloggedByUsers({ id })\n const reportUser = (params) => apiService.reportUser({ credentials, ...params })\n\n const favorite = (id) => apiService.favorite({ id, credentials })\n const unfavorite = (id) => apiService.unfavorite({ id, credentials })\n const retweet = (id) => apiService.retweet({ id, credentials })\n const unretweet = (id) => apiService.unretweet({ id, credentials })\n const search2 = ({ q, resolve, limit, offset, following }) =>\n apiService.search2({ credentials, q, resolve, limit, offset, following })\n const searchUsers = (query) => apiService.searchUsers({ query, credentials })\n\n const backendInteractorServiceInstance = {\n fetchStatus,\n fetchConversation,\n fetchFriends,\n exportFriends,\n fetchFollowers,\n followUser,\n unfollowUser,\n blockUser,\n unblockUser,\n fetchUser,\n fetchUserRelationship,\n verifyCredentials: apiService.verifyCredentials,\n startFetchingTimeline,\n startFetchingNotifications,\n fetchMutes,\n muteUser,\n unmuteUser,\n subscribeUser,\n unsubscribeUser,\n fetchBlocks,\n fetchOAuthTokens,\n revokeOAuthToken,\n fetchPinnedStatuses,\n pinOwnStatus,\n unpinOwnStatus,\n muteConversation,\n unmuteConversation,\n tagUser,\n untagUser,\n addRight,\n deleteRight,\n deleteUser,\n setActivationStatus,\n register,\n getCaptcha,\n updateAvatar,\n updateBg,\n updateBanner,\n updateProfile,\n importBlocks,\n importFollows,\n deleteAccount,\n changeEmail,\n changePassword,\n fetchSettingsMFA,\n generateMfaBackupCodes,\n mfaSetupOTP,\n mfaConfirmOTP,\n mfaDisableOTP,\n fetchFollowRequests,\n approveUser,\n denyUser,\n vote,\n fetchPoll,\n fetchFavoritedByUsers,\n fetchRebloggedByUsers,\n reportUser,\n favorite,\n unfavorite,\n retweet,\n unretweet,\n updateNotificationSettings,\n search2,\n searchUsers\n }\n\n return backendInteractorServiceInstance\n}\n\nexport default backendInteractorService\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./still-image.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./still-image.js\"\nimport __vue_script__ from \"!!babel-loader!./still-image.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-1bc509fc\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./still-image.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./timeago.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./timeago.vue\"\n/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-ac499830\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./timeago.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./post_status_form.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./post_status_form.js\"\nimport __vue_script__ from \"!!babel-loader!./post_status_form.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-f350f69c\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./post_status_form.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./progress_button.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./progress_button.vue\"\n/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-9f751ae6\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./progress_button.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","import { filter, sortBy } from 'lodash'\n\nexport const notificationsFromStore = store => store.state.statuses.notifications.data\n\nexport const visibleTypes = store => ([\n store.state.config.notificationVisibility.likes && 'like',\n store.state.config.notificationVisibility.mentions && 'mention',\n store.state.config.notificationVisibility.repeats && 'repeat',\n store.state.config.notificationVisibility.follows && 'follow'\n].filter(_ => _))\n\nconst sortById = (a, b) => {\n const seqA = Number(a.id)\n const seqB = Number(b.id)\n const isSeqA = !Number.isNaN(seqA)\n const isSeqB = !Number.isNaN(seqB)\n if (isSeqA && isSeqB) {\n return seqA > seqB ? -1 : 1\n } else if (isSeqA && !isSeqB) {\n return 1\n } else if (!isSeqA && isSeqB) {\n return -1\n } else {\n return a.id > b.id ? -1 : 1\n }\n}\n\nexport const visibleNotificationsFromStore = (store, types) => {\n // map is just to clone the array since sort mutates it and it causes some issues\n let sortedNotifications = notificationsFromStore(store).map(_ => _).sort(sortById)\n sortedNotifications = sortBy(sortedNotifications, 'seen')\n return sortedNotifications.filter(\n (notification) => (types || visibleTypes(store)).includes(notification.type)\n )\n}\n\nexport const unseenNotificationsFromStore = store =>\n filter(visibleNotificationsFromStore(store), ({ seen }) => !seen)\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./follow_card.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./follow_card.js\"\nimport __vue_script__ from \"!!babel-loader!./follow_card.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-5b90ae69\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./follow_card.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./list.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./list.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./list.vue\"\n/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-c1790f52\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./list.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./modal.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./modal.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./modal.vue\"\n/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-068d175e\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./modal.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","\nconst DIRECTION_LEFT = [-1, 0]\nconst DIRECTION_RIGHT = [1, 0]\nconst DIRECTION_UP = [0, -1]\nconst DIRECTION_DOWN = [0, 1]\n\nconst deltaCoord = (oldCoord, newCoord) => [newCoord[0] - oldCoord[0], newCoord[1] - oldCoord[1]]\n\nconst touchEventCoord = e => ([e.touches[0].screenX, e.touches[0].screenY])\n\nconst vectorLength = v => Math.sqrt(v[0] * v[0] + v[1] * v[1])\n\nconst perpendicular = v => [v[1], -v[0]]\n\nconst dotProduct = (v1, v2) => v1[0] * v2[0] + v1[1] * v2[1]\n\nconst project = (v1, v2) => {\n const scalar = (dotProduct(v1, v2) / dotProduct(v2, v2))\n return [scalar * v2[0], scalar * v2[1]]\n}\n\n// direction: either use the constants above or an arbitrary 2d vector.\n// threshold: how many Px to move from touch origin before checking if the\n// callback should be called.\n// divergentTolerance: a scalar for much of divergent direction we tolerate when\n// above threshold. for example, with 1.0 we only call the callback if\n// divergent component of delta is < 1.0 * direction component of delta.\nconst swipeGesture = (direction, onSwipe, threshold = 30, perpendicularTolerance = 1.0) => {\n return {\n direction,\n onSwipe,\n threshold,\n perpendicularTolerance,\n _startPos: [0, 0],\n _swiping: false\n }\n}\n\nconst beginSwipe = (event, gesture) => {\n gesture._startPos = touchEventCoord(event)\n gesture._swiping = true\n}\n\nconst updateSwipe = (event, gesture) => {\n if (!gesture._swiping) return\n // movement too small\n const delta = deltaCoord(gesture._startPos, touchEventCoord(event))\n if (vectorLength(delta) < gesture.threshold) return\n // movement is opposite from direction\n if (dotProduct(delta, gesture.direction) < 0) return\n // movement perpendicular to direction is too much\n const towardsDir = project(delta, gesture.direction)\n const perpendicularDir = perpendicular(gesture.direction)\n const towardsPerpendicular = project(delta, perpendicularDir)\n if (\n vectorLength(towardsDir) * gesture.perpendicularTolerance <\n vectorLength(towardsPerpendicular)\n ) return\n\n gesture.onSwipe()\n gesture._swiping = false\n}\n\nconst GestureService = {\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n swipeGesture,\n beginSwipe,\n updateSwipe\n}\n\nexport default GestureService\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"still-image\",class:{ animated: _vm.animated }},[(_vm.animated)?_c('canvas',{ref:\"canvas\"}):_vm._e(),_vm._v(\" \"),_c('img',{key:_vm.src,ref:\"src\",attrs:{\"src\":_vm.src,\"referrerpolicy\":_vm.referrerpolicy},on:{\"load\":_vm.onLoad,\"error\":_vm.onError}})])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('video',{staticClass:\"video\",attrs:{\"src\":_vm.attachment.url,\"loop\":_vm.loopVideo,\"controls\":_vm.controls,\"playsinline\":\"\"},on:{\"loadeddata\":_vm.onVideoDataLoad}})}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {\nvar _obj;\nvar _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.usePlaceHolder)?_c('div',{on:{\"click\":_vm.openModal}},[(_vm.type !== 'html')?_c('a',{staticClass:\"placeholder\",attrs:{\"target\":\"_blank\",\"href\":_vm.attachment.url}},[_vm._v(\"\\n [\"+_vm._s(_vm.nsfw ? \"NSFW/\" : \"\")+_vm._s(_vm.type.toUpperCase())+\"]\\n \")]):_vm._e()]):_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.isEmpty),expression:\"!isEmpty\"}],staticClass:\"attachment\",class:( _obj = {}, _obj[_vm.type] = true, _obj.loading = _vm.loading, _obj['fullwidth'] = _vm.fullwidth, _obj['nsfw-placeholder'] = _vm.hidden, _obj )},[(_vm.hidden)?_c('a',{staticClass:\"image-attachment\",attrs:{\"href\":_vm.attachment.url},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleHidden($event)}}},[_c('img',{key:_vm.nsfwImage,staticClass:\"nsfw\",class:{'small': _vm.isSmall},attrs:{\"src\":_vm.nsfwImage}}),_vm._v(\" \"),(_vm.type === 'video')?_c('i',{staticClass:\"play-icon icon-play-circled\"}):_vm._e()]):_vm._e(),_vm._v(\" \"),(_vm.nsfw && _vm.hideNsfwLocal && !_vm.hidden)?_c('div',{staticClass:\"hider\"},[_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleHidden($event)}}},[_vm._v(\"Hide\")])]):_vm._e(),_vm._v(\" \"),(_vm.type === 'image' && (!_vm.hidden || _vm.preloadImage))?_c('a',{staticClass:\"image-attachment\",class:{'hidden': _vm.hidden && _vm.preloadImage },attrs:{\"href\":_vm.attachment.url,\"target\":\"_blank\",\"title\":_vm.attachment.description},on:{\"click\":_vm.openModal}},[_c('StillImage',{attrs:{\"referrerpolicy\":_vm.referrerpolicy,\"mimetype\":_vm.attachment.mimetype,\"src\":_vm.attachment.large_thumb_url || _vm.attachment.url,\"image-load-handler\":_vm.onImageLoad}})],1):_vm._e(),_vm._v(\" \"),(_vm.type === 'video' && !_vm.hidden)?_c('a',{staticClass:\"video-container\",class:{'small': _vm.isSmall},attrs:{\"href\":_vm.allowPlay ? undefined : _vm.attachment.url},on:{\"click\":_vm.openModal}},[_c('VideoAttachment',{staticClass:\"video\",attrs:{\"attachment\":_vm.attachment,\"controls\":_vm.allowPlay}}),_vm._v(\" \"),(!_vm.allowPlay)?_c('i',{staticClass:\"play-icon icon-play-circled\"}):_vm._e()],1):_vm._e(),_vm._v(\" \"),(_vm.type === 'audio')?_c('audio',{attrs:{\"src\":_vm.attachment.url,\"controls\":\"\"}}):_vm._e(),_vm._v(\" \"),(_vm.type === 'html' && _vm.attachment.oembed)?_c('div',{staticClass:\"oembed\",on:{\"click\":function($event){$event.preventDefault();return _vm.linkClicked($event)}}},[(_vm.attachment.thumb_url)?_c('div',{staticClass:\"image\"},[_c('img',{attrs:{\"src\":_vm.attachment.thumb_url}})]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"text\"},[_c('h1',[_c('a',{attrs:{\"href\":_vm.attachment.url}},[_vm._v(_vm._s(_vm.attachment.oembed.title))])]),_vm._v(\" \"),_c('div',{domProps:{\"innerHTML\":_vm._s(_vm.attachment.oembed.oembedHTML)}})])]):_vm._e()])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.loggedIn)?_c('div',[_c('i',{staticClass:\"button-icon favorite-button fav-active\",class:_vm.classes,attrs:{\"title\":_vm.$t('tool_tip.favorite')},on:{\"click\":function($event){$event.preventDefault();_vm.favorite()}}}),_vm._v(\" \"),(!_vm.mergedConfig.hidePostStats && _vm.status.fave_num > 0)?_c('span',[_vm._v(_vm._s(_vm.status.fave_num))]):_vm._e()]):_c('div',[_c('i',{staticClass:\"button-icon favorite-button\",class:_vm.classes,attrs:{\"title\":_vm.$t('tool_tip.favorite')}}),_vm._v(\" \"),(!_vm.mergedConfig.hidePostStats && _vm.status.fave_num > 0)?_c('span',[_vm._v(_vm._s(_vm.status.fave_num))]):_vm._e()])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.loggedIn)?_c('div',[(_vm.visibility !== 'private' && _vm.visibility !== 'direct')?[_c('i',{staticClass:\"button-icon retweet-button icon-retweet rt-active\",class:_vm.classes,attrs:{\"title\":_vm.$t('tool_tip.repeat')},on:{\"click\":function($event){$event.preventDefault();_vm.retweet()}}}),_vm._v(\" \"),(!_vm.mergedConfig.hidePostStats && _vm.status.repeat_num > 0)?_c('span',[_vm._v(_vm._s(_vm.status.repeat_num))]):_vm._e()]:[_c('i',{staticClass:\"button-icon icon-lock\",class:_vm.classes,attrs:{\"title\":_vm.$t('timeline.no_retweet_hint')}})]],2):(!_vm.loggedIn)?_c('div',[_c('i',{staticClass:\"button-icon icon-retweet\",class:_vm.classes,attrs:{\"title\":_vm.$t('tool_tip.repeat')}}),_vm._v(\" \"),(!_vm.mergedConfig.hidePostStats && _vm.status.repeat_num > 0)?_c('span',[_vm._v(_vm._s(_vm.status.repeat_num))]):_vm._e()]):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('time',{attrs:{\"datetime\":_vm.time,\"title\":_vm.localeDateString}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(_vm.relativeTime.key, [_vm.relativeTime.num]))+\"\\n\")])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"poll\",class:_vm.containerClass},[_vm._l((_vm.options),function(option,index){return _c('div',{key:index,staticClass:\"poll-option\"},[(_vm.showResults)?_c('div',{staticClass:\"option-result\",attrs:{\"title\":_vm.resultTitle(option)}},[_c('div',{staticClass:\"option-result-label\"},[_c('span',{staticClass:\"result-percentage\"},[_vm._v(\"\\n \"+_vm._s(_vm.percentageForOption(option.votes_count))+\"%\\n \")]),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(option.title))])]),_vm._v(\" \"),_c('div',{staticClass:\"result-fill\",style:({ 'width': ((_vm.percentageForOption(option.votes_count)) + \"%\") })})]):_c('div',{on:{\"click\":function($event){_vm.activateOption(index)}}},[(_vm.poll.multiple)?_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.loading},domProps:{\"value\":index}}):_c('input',{attrs:{\"type\":\"radio\",\"disabled\":_vm.loading},domProps:{\"value\":index}}),_vm._v(\" \"),_c('label',{staticClass:\"option-vote\"},[_c('div',[_vm._v(_vm._s(option.title))])])])])}),_vm._v(\" \"),_c('div',{staticClass:\"footer faint\"},[(!_vm.showResults)?_c('button',{staticClass:\"btn btn-default poll-vote-button\",attrs:{\"type\":\"button\",\"disabled\":_vm.isDisabled},on:{\"click\":_vm.vote}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('polls.vote'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"total\"},[_vm._v(\"\\n \"+_vm._s(_vm.totalVotesCount)+\" \"+_vm._s(_vm.$t(\"polls.votes\"))+\" · \\n \")]),_vm._v(\" \"),_c('i18n',{attrs:{\"path\":_vm.expired ? 'polls.expired' : 'polls.expires_in'}},[_c('Timeago',{attrs:{\"time\":_vm.expiresAt,\"auto-update\":60,\"now-threshold\":0}})],1)],1)],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.canDelete || _vm.canMute || _vm.canPin)?_c('v-popover',{staticClass:\"extra-button-popover\",attrs:{\"trigger\":\"click\",\"placement\":\"top\"}},[_c('div',{attrs:{\"slot\":\"popover\"},slot:\"popover\"},[_c('div',{staticClass:\"dropdown-menu\"},[(_vm.canMute && !_vm.status.thread_muted)?_c('button',{staticClass:\"dropdown-item dropdown-item-icon\",on:{\"click\":function($event){$event.preventDefault();return _vm.muteConversation($event)}}},[_c('i',{staticClass:\"icon-eye-off\"}),_c('span',[_vm._v(_vm._s(_vm.$t(\"status.mute_conversation\")))])]):_vm._e(),_vm._v(\" \"),(_vm.canMute && _vm.status.thread_muted)?_c('button',{staticClass:\"dropdown-item dropdown-item-icon\",on:{\"click\":function($event){$event.preventDefault();return _vm.unmuteConversation($event)}}},[_c('i',{staticClass:\"icon-eye-off\"}),_c('span',[_vm._v(_vm._s(_vm.$t(\"status.unmute_conversation\")))])]):_vm._e(),_vm._v(\" \"),(!_vm.status.pinned && _vm.canPin)?_c('button',{directives:[{name:\"close-popover\",rawName:\"v-close-popover\"}],staticClass:\"dropdown-item dropdown-item-icon\",on:{\"click\":function($event){$event.preventDefault();return _vm.pinStatus($event)}}},[_c('i',{staticClass:\"icon-pin\"}),_c('span',[_vm._v(_vm._s(_vm.$t(\"status.pin\")))])]):_vm._e(),_vm._v(\" \"),(_vm.status.pinned && _vm.canPin)?_c('button',{directives:[{name:\"close-popover\",rawName:\"v-close-popover\"}],staticClass:\"dropdown-item dropdown-item-icon\",on:{\"click\":function($event){$event.preventDefault();return _vm.unpinStatus($event)}}},[_c('i',{staticClass:\"icon-pin\"}),_c('span',[_vm._v(_vm._s(_vm.$t(\"status.unpin\")))])]):_vm._e(),_vm._v(\" \"),(_vm.canDelete)?_c('button',{directives:[{name:\"close-popover\",rawName:\"v-close-popover\"}],staticClass:\"dropdown-item dropdown-item-icon\",on:{\"click\":function($event){$event.preventDefault();return _vm.deleteStatus($event)}}},[_c('i',{staticClass:\"icon-cancel\"}),_c('span',[_vm._v(_vm._s(_vm.$t(\"status.delete\")))])]):_vm._e()])]),_vm._v(\" \"),_c('div',{staticClass:\"button-icon\"},[_c('i',{staticClass:\"icon-ellipsis\"})])]):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"media-upload\",on:{\"drop\":[function($event){$event.preventDefault();},_vm.fileDrop],\"dragover\":function($event){$event.preventDefault();return _vm.fileDrag($event)}}},[_c('label',{staticClass:\"btn btn-default\",attrs:{\"title\":_vm.$t('tool_tip.media_upload')}},[(_vm.uploading)?_c('i',{staticClass:\"icon-spin4 animate-spin\"}):_vm._e(),_vm._v(\" \"),(!_vm.uploading)?_c('i',{staticClass:\"icon-upload\"}):_vm._e(),_vm._v(\" \"),(_vm.uploadReady)?_c('input',{staticStyle:{\"position\":\"fixed\",\"top\":\"-100em\"},attrs:{\"type\":\"file\",\"multiple\":\"true\"},on:{\"change\":_vm.change}}):_vm._e()])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.showNothing)?_c('div',{staticClass:\"scope-selector\"},[(_vm.showDirect)?_c('i',{staticClass:\"icon-mail-alt\",class:_vm.css.direct,attrs:{\"title\":_vm.$t('post_status.scope.direct')},on:{\"click\":function($event){_vm.changeVis('direct')}}}):_vm._e(),_vm._v(\" \"),(_vm.showPrivate)?_c('i',{staticClass:\"icon-lock\",class:_vm.css.private,attrs:{\"title\":_vm.$t('post_status.scope.private')},on:{\"click\":function($event){_vm.changeVis('private')}}}):_vm._e(),_vm._v(\" \"),(_vm.showUnlisted)?_c('i',{staticClass:\"icon-lock-open-alt\",class:_vm.css.unlisted,attrs:{\"title\":_vm.$t('post_status.scope.unlisted')},on:{\"click\":function($event){_vm.changeVis('unlisted')}}}):_vm._e(),_vm._v(\" \"),(_vm.showPublic)?_c('i',{staticClass:\"icon-globe\",class:_vm.css.public,attrs:{\"title\":_vm.$t('post_status.scope.public')},on:{\"click\":function($event){_vm.changeVis('public')}}}):_vm._e()]):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('label',{staticClass:\"checkbox\",class:{ disabled: _vm.disabled, indeterminate: _vm.indeterminate }},[_c('input',{attrs:{\"type\":\"checkbox\",\"disabled\":_vm.disabled},domProps:{\"checked\":_vm.checked,\"indeterminate\":_vm.indeterminate},on:{\"change\":function($event){_vm.$emit('change', $event.target.checked)}}}),_vm._v(\" \"),_c('i',{staticClass:\"checkbox-indicator\"}),_vm._v(\" \"),(!!_vm.$slots.default)?_c('span',{staticClass:\"label\"},[_vm._t(\"default\")],2):_vm._e()])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"emoji-picker panel panel-default panel-body\"},[_c('div',{staticClass:\"heading\"},[_c('span',{staticClass:\"emoji-tabs\"},_vm._l((_vm.emojis),function(group){return _c('span',{key:group.id,staticClass:\"emoji-tabs-item\",class:{\n active: _vm.activeGroupView === group.id,\n disabled: group.emojis.length === 0\n },attrs:{\"title\":group.text},on:{\"click\":function($event){$event.preventDefault();_vm.highlight(group.id)}}},[_c('i',{class:group.icon})])}),0),_vm._v(\" \"),(_vm.stickerPickerEnabled)?_c('span',{staticClass:\"additional-tabs\"},[_c('span',{staticClass:\"stickers-tab-icon additional-tabs-item\",class:{active: _vm.showingStickers},attrs:{\"title\":_vm.$t('emoji.stickers')},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleStickers($event)}}},[_c('i',{staticClass:\"icon-star\"})])]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"content\"},[_c('div',{staticClass:\"emoji-content\",class:{hidden: _vm.showingStickers}},[_c('div',{staticClass:\"emoji-search\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.keyword),expression:\"keyword\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"placeholder\":_vm.$t('emoji.search_emoji')},domProps:{\"value\":(_vm.keyword)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.keyword=$event.target.value}}})]),_vm._v(\" \"),_c('div',{ref:\"emoji-groups\",staticClass:\"emoji-groups\",class:_vm.groupsScrolledClass,on:{\"scroll\":_vm.onScroll}},_vm._l((_vm.emojisView),function(group){return _c('div',{key:group.id,staticClass:\"emoji-group\"},[_c('h6',{ref:'group-' + group.id,refInFor:true,staticClass:\"emoji-group-title\"},[_vm._v(\"\\n \"+_vm._s(group.text)+\"\\n \")]),_vm._v(\" \"),_vm._l((group.emojis),function(emoji){return _c('span',{key:group.id + emoji.displayText,staticClass:\"emoji-item\",attrs:{\"title\":emoji.displayText},on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();_vm.onEmoji(emoji)}}},[(!emoji.imageUrl)?_c('span',[_vm._v(_vm._s(emoji.replacement))]):_c('img',{attrs:{\"src\":emoji.imageUrl}})])}),_vm._v(\" \"),_c('span',{ref:'group-end-' + group.id,refInFor:true})],2)}),0),_vm._v(\" \"),_c('div',{staticClass:\"keep-open\"},[_c('Checkbox',{model:{value:(_vm.keepOpen),callback:function ($$v) {_vm.keepOpen=$$v},expression:\"keepOpen\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('emoji.keep_open'))+\"\\n \")])],1)]),_vm._v(\" \"),(_vm.showingStickers)?_c('div',{staticClass:\"stickers-content\"},[_c('sticker-picker',{on:{\"uploaded\":_vm.onStickerUploaded,\"upload-failed\":_vm.onStickerUploadFailed}})],1):_vm._e()])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"click-outside\",rawName:\"v-click-outside\",value:(_vm.onClickOutside),expression:\"onClickOutside\"}],staticClass:\"emoji-input\",class:{ 'with-picker': !_vm.hideEmojiButton }},[_vm._t(\"default\"),_vm._v(\" \"),(_vm.enableEmojiPicker)?[(!_vm.hideEmojiButton)?_c('div',{staticClass:\"emoji-picker-icon\",on:{\"click\":function($event){$event.preventDefault();return _vm.togglePicker($event)}}},[_c('i',{staticClass:\"icon-smile\"})]):_vm._e(),_vm._v(\" \"),(_vm.enableEmojiPicker)?_c('EmojiPicker',{ref:\"picker\",staticClass:\"emoji-picker-panel\",class:{ hide: !_vm.showPicker },attrs:{\"enable-sticker-picker\":_vm.enableStickerPicker},on:{\"emoji\":_vm.insert,\"sticker-uploaded\":_vm.onStickerUploaded,\"sticker-upload-failed\":_vm.onStickerUploadFailed}}):_vm._e()]:_vm._e(),_vm._v(\" \"),_c('div',{ref:\"panel\",staticClass:\"autocomplete-panel\",class:{ hide: !_vm.showSuggestions }},[_c('div',{staticClass:\"autocomplete-panel-body\"},_vm._l((_vm.suggestions),function(suggestion,index){return _c('div',{key:index,staticClass:\"autocomplete-item\",class:{ highlighted: suggestion.highlighted },on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();_vm.onClick($event, suggestion)}}},[_c('span',{staticClass:\"image\"},[(suggestion.img)?_c('img',{attrs:{\"src\":suggestion.img}}):_c('span',[_vm._v(_vm._s(suggestion.replacement))])]),_vm._v(\" \"),_c('div',{staticClass:\"label\"},[_c('span',{staticClass:\"displayText\"},[_vm._v(_vm._s(suggestion.displayText))]),_vm._v(\" \"),_c('span',{staticClass:\"detailText\"},[_vm._v(_vm._s(suggestion.detailText))])])])}),0)])],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.visible)?_c('div',{staticClass:\"poll-form\"},[_vm._l((_vm.options),function(option,index){return _c('div',{key:index,staticClass:\"poll-option\"},[_c('div',{staticClass:\"input-container\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.options[index]),expression:\"options[index]\"}],staticClass:\"poll-option-input\",attrs:{\"id\":(\"poll-\" + index),\"type\":\"text\",\"placeholder\":_vm.$t('polls.option'),\"maxlength\":_vm.maxLength},domProps:{\"value\":(_vm.options[index])},on:{\"change\":_vm.updatePollToParent,\"keydown\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }$event.stopPropagation();$event.preventDefault();_vm.nextOption(index)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.options, index, $event.target.value)}}})]),_vm._v(\" \"),(_vm.options.length > 2)?_c('div',{staticClass:\"icon-container\"},[_c('i',{staticClass:\"icon-cancel\",on:{\"click\":function($event){_vm.deleteOption(index)}}})]):_vm._e()])}),_vm._v(\" \"),(_vm.options.length < _vm.maxOptions)?_c('a',{staticClass:\"add-option faint\",on:{\"click\":_vm.addOption}},[_c('i',{staticClass:\"icon-plus\"}),_vm._v(\"\\n \"+_vm._s(_vm.$t(\"polls.add_option\"))+\"\\n \")]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"poll-type-expiry\"},[_c('div',{staticClass:\"poll-type\",attrs:{\"title\":_vm.$t('polls.type')}},[_c('label',{staticClass:\"select\",attrs:{\"for\":\"poll-type-selector\"}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.pollType),expression:\"pollType\"}],staticClass:\"select\",on:{\"change\":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.pollType=$event.target.multiple ? $$selectedVal : $$selectedVal[0]},_vm.updatePollToParent]}},[_c('option',{attrs:{\"value\":\"single\"}},[_vm._v(_vm._s(_vm.$t('polls.single_choice')))]),_vm._v(\" \"),_c('option',{attrs:{\"value\":\"multiple\"}},[_vm._v(_vm._s(_vm.$t('polls.multiple_choices')))])]),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])]),_vm._v(\" \"),_c('div',{staticClass:\"poll-expiry\",attrs:{\"title\":_vm.$t('polls.expiry')}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.expiryAmount),expression:\"expiryAmount\"}],staticClass:\"expiry-amount hide-number-spinner\",attrs:{\"type\":\"number\",\"min\":_vm.minExpirationInCurrentUnit,\"max\":_vm.maxExpirationInCurrentUnit},domProps:{\"value\":(_vm.expiryAmount)},on:{\"change\":_vm.expiryAmountChange,\"input\":function($event){if($event.target.composing){ return; }_vm.expiryAmount=$event.target.value}}}),_vm._v(\" \"),_c('label',{staticClass:\"expiry-unit select\"},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.expiryUnit),expression:\"expiryUnit\"}],on:{\"change\":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.expiryUnit=$event.target.multiple ? $$selectedVal : $$selectedVal[0]},_vm.expiryAmountChange]}},_vm._l((_vm.expiryUnits),function(unit){return _c('option',{key:unit,domProps:{\"value\":unit}},[_vm._v(\"\\n \"+_vm._s(_vm.$t((\"time.\" + unit + \"_short\"), ['']))+\"\\n \")])}),0),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])])])],2):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:\"form\",staticClass:\"post-status-form\"},[_c('form',{attrs:{\"autocomplete\":\"off\"},on:{\"submit\":function($event){$event.preventDefault();_vm.postStatus(_vm.newStatus)}}},[_c('div',{staticClass:\"form-group\"},[(!_vm.$store.state.users.currentUser.locked && _vm.newStatus.visibility == 'private')?_c('i18n',{staticClass:\"visibility-notice\",attrs:{\"path\":\"post_status.account_not_locked_warning\",\"tag\":\"p\"}},[_c('router-link',{attrs:{\"to\":{ name: 'user-settings' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('post_status.account_not_locked_warning_link'))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),(!_vm.hideScopeNotice && _vm.newStatus.visibility === 'public')?_c('p',{staticClass:\"visibility-notice notice-dismissible\"},[_c('span',[_vm._v(_vm._s(_vm.$t('post_status.scope_notice.public')))]),_vm._v(\" \"),_c('a',{staticClass:\"button-icon dismiss\",on:{\"click\":function($event){$event.preventDefault();_vm.dismissScopeNotice()}}},[_c('i',{staticClass:\"icon-cancel\"})])]):(!_vm.hideScopeNotice && _vm.newStatus.visibility === 'unlisted')?_c('p',{staticClass:\"visibility-notice notice-dismissible\"},[_c('span',[_vm._v(_vm._s(_vm.$t('post_status.scope_notice.unlisted')))]),_vm._v(\" \"),_c('a',{staticClass:\"button-icon dismiss\",on:{\"click\":function($event){$event.preventDefault();_vm.dismissScopeNotice()}}},[_c('i',{staticClass:\"icon-cancel\"})])]):(!_vm.hideScopeNotice && _vm.newStatus.visibility === 'private' && _vm.$store.state.users.currentUser.locked)?_c('p',{staticClass:\"visibility-notice notice-dismissible\"},[_c('span',[_vm._v(_vm._s(_vm.$t('post_status.scope_notice.private')))]),_vm._v(\" \"),_c('a',{staticClass:\"button-icon dismiss\",on:{\"click\":function($event){$event.preventDefault();_vm.dismissScopeNotice()}}},[_c('i',{staticClass:\"icon-cancel\"})])]):(_vm.newStatus.visibility === 'direct')?_c('p',{staticClass:\"visibility-notice\"},[(_vm.safeDMEnabled)?_c('span',[_vm._v(_vm._s(_vm.$t('post_status.direct_warning_to_first_only')))]):_c('span',[_vm._v(_vm._s(_vm.$t('post_status.direct_warning_to_all')))])]):_vm._e(),_vm._v(\" \"),(_vm.newStatus.spoilerText || _vm.alwaysShowSubject)?_c('EmojiInput',{staticClass:\"form-control\",attrs:{\"enable-emoji-picker\":\"\",\"suggest\":_vm.emojiSuggestor},model:{value:(_vm.newStatus.spoilerText),callback:function ($$v) {_vm.$set(_vm.newStatus, \"spoilerText\", $$v)},expression:\"newStatus.spoilerText\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newStatus.spoilerText),expression:\"newStatus.spoilerText\"}],staticClass:\"form-post-subject\",attrs:{\"type\":\"text\",\"placeholder\":_vm.$t('post_status.content_warning')},domProps:{\"value\":(_vm.newStatus.spoilerText)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.newStatus, \"spoilerText\", $event.target.value)}}})]):_vm._e(),_vm._v(\" \"),_c('EmojiInput',{ref:\"emoji-input\",staticClass:\"form-control main-input\",attrs:{\"suggest\":_vm.emojiUserSuggestor,\"enable-emoji-picker\":\"\",\"hide-emoji-button\":\"\",\"enable-sticker-picker\":\"\"},on:{\"input\":_vm.onEmojiInputInput,\"sticker-uploaded\":_vm.addMediaFile,\"sticker-upload-failed\":_vm.uploadFailed},model:{value:(_vm.newStatus.status),callback:function ($$v) {_vm.$set(_vm.newStatus, \"status\", $$v)},expression:\"newStatus.status\"}},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newStatus.status),expression:\"newStatus.status\"}],ref:\"textarea\",staticClass:\"form-post-body\",attrs:{\"placeholder\":_vm.$t('post_status.default'),\"rows\":\"1\",\"disabled\":_vm.posting},domProps:{\"value\":(_vm.newStatus.status)},on:{\"keydown\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }if(!$event.metaKey){ return null; }_vm.postStatus(_vm.newStatus)},\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }if(!$event.ctrlKey){ return null; }_vm.postStatus(_vm.newStatus)},\"drop\":_vm.fileDrop,\"dragover\":function($event){$event.preventDefault();return _vm.fileDrag($event)},\"input\":[function($event){if($event.target.composing){ return; }_vm.$set(_vm.newStatus, \"status\", $event.target.value)},_vm.resize],\"compositionupdate\":_vm.resize,\"paste\":_vm.paste}}),_vm._v(\" \"),(_vm.hasStatusLengthLimit)?_c('p',{staticClass:\"character-counter faint\",class:{ error: _vm.isOverLengthLimit }},[_vm._v(\"\\n \"+_vm._s(_vm.charactersLeft)+\"\\n \")]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"visibility-tray\"},[_c('scope-selector',{attrs:{\"show-all\":_vm.showAllScopes,\"user-default\":_vm.userDefaultScope,\"original-scope\":_vm.copyMessageScope,\"initial-scope\":_vm.newStatus.visibility,\"on-scope-change\":_vm.changeVis}}),_vm._v(\" \"),(_vm.postFormats.length > 1)?_c('div',{staticClass:\"text-format\"},[_c('label',{staticClass:\"select\",attrs:{\"for\":\"post-content-type\"}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newStatus.contentType),expression:\"newStatus.contentType\"}],staticClass:\"form-control\",attrs:{\"id\":\"post-content-type\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(_vm.newStatus, \"contentType\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.postFormats),function(postFormat){return _c('option',{key:postFormat,domProps:{\"value\":postFormat}},[_vm._v(\"\\n \"+_vm._s(_vm.$t((\"post_status.content_type[\\\"\" + postFormat + \"\\\"]\")))+\"\\n \")])}),0),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])]):_vm._e(),_vm._v(\" \"),(_vm.postFormats.length === 1 && _vm.postFormats[0] !== 'text/plain')?_c('div',{staticClass:\"text-format\"},[_c('span',{staticClass:\"only-format\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t((\"post_status.content_type[\\\"\" + (_vm.postFormats[0]) + \"\\\"]\")))+\"\\n \")])]):_vm._e()],1)],1),_vm._v(\" \"),(_vm.pollsAvailable)?_c('poll-form',{ref:\"pollForm\",attrs:{\"visible\":_vm.pollFormVisible},on:{\"update-poll\":_vm.setPoll}}):_vm._e(),_vm._v(\" \"),_c('div',{ref:\"bottom\",staticClass:\"form-bottom\"},[_c('div',{staticClass:\"form-bottom-left\"},[_c('media-upload',{ref:\"mediaUpload\",staticClass:\"media-upload-icon\",attrs:{\"drop-files\":_vm.dropFiles},on:{\"uploading\":_vm.disableSubmit,\"uploaded\":_vm.addMediaFile,\"upload-failed\":_vm.uploadFailed}}),_vm._v(\" \"),_c('div',{staticClass:\"emoji-icon\"},[_c('i',{staticClass:\"icon-smile btn btn-default\",attrs:{\"title\":_vm.$t('emoji.add_emoji')},on:{\"click\":_vm.showEmojiPicker}})]),_vm._v(\" \"),(_vm.pollsAvailable)?_c('div',{staticClass:\"poll-icon\",class:{ selected: _vm.pollFormVisible }},[_c('i',{staticClass:\"icon-chart-bar btn btn-default\",attrs:{\"title\":_vm.$t('polls.add_poll')},on:{\"click\":_vm.togglePollForm}})]):_vm._e()],1),_vm._v(\" \"),(_vm.posting)?_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":\"\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('post_status.posting'))+\"\\n \")]):(_vm.isOverLengthLimit)?_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":\"\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")]):_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.submitDisabled,\"type\":\"submit\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")])]),_vm._v(\" \"),(_vm.error)?_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n Error: \"+_vm._s(_vm.error)+\"\\n \"),_c('i',{staticClass:\"button-icon icon-cancel\",on:{\"click\":_vm.clearError}})]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"attachments\"},_vm._l((_vm.newStatus.files),function(file){return _c('div',{key:file.url,staticClass:\"media-upload-wrapper\"},[_c('i',{staticClass:\"fa button-icon icon-cancel\",on:{\"click\":function($event){_vm.removeMediaFile(file)}}}),_vm._v(\" \"),_c('div',{staticClass:\"media-upload-container attachment\"},[(_vm.type(file) === 'image')?_c('img',{staticClass:\"thumbnail media-upload\",attrs:{\"src\":file.url}}):_vm._e(),_vm._v(\" \"),(_vm.type(file) === 'video')?_c('video',{attrs:{\"src\":file.url,\"controls\":\"\"}}):_vm._e(),_vm._v(\" \"),(_vm.type(file) === 'audio')?_c('audio',{attrs:{\"src\":file.url,\"controls\":\"\"}}):_vm._e(),_vm._v(\" \"),(_vm.type(file) === 'unknown')?_c('a',{attrs:{\"href\":file.url}},[_vm._v(_vm._s(file.url))]):_vm._e()])])}),0),_vm._v(\" \"),(_vm.newStatus.files.length > 0)?_c('div',{staticClass:\"upload_settings\"},[_c('Checkbox',{model:{value:(_vm.newStatus.nsfw),callback:function ($$v) {_vm.$set(_vm.newStatus, \"nsfw\", $$v)},expression:\"newStatus.nsfw\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('post_status.attachments_sensitive'))+\"\\n \")])],1):_vm._e()],1)])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('StillImage',{staticClass:\"avatar\",class:{ 'avatar-compact': _vm.compact, 'better-shadow': _vm.betterShadow },attrs:{\"alt\":_vm.user.screen_name,\"title\":_vm.user.screen_name,\"src\":_vm.imgSrc,\"image-load-error\":_vm.imageLoadError}})}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"remote-follow\"},[_c('form',{attrs:{\"method\":\"POST\",\"action\":_vm.subscribeUrl}},[_c('input',{attrs:{\"type\":\"hidden\",\"name\":\"nickname\"},domProps:{\"value\":_vm.user.screen_name}}),_vm._v(\" \"),_c('input',{attrs:{\"type\":\"hidden\",\"name\":\"profile\",\"value\":\"\"}}),_vm._v(\" \"),_c('button',{staticClass:\"remote-button\",attrs:{\"click\":\"submit\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.remote_follow'))+\"\\n \")])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{attrs:{\"disabled\":_vm.progress || _vm.disabled},on:{\"click\":_vm.onClick}},[(_vm.progress && _vm.$slots.progress)?[_vm._t(\"progress\")]:[_vm._t(\"default\")]],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"btn btn-default follow-button\",class:{ pressed: _vm.isPressed },attrs:{\"disabled\":_vm.inProgress,\"title\":_vm.title},on:{\"click\":_vm.onClick}},[_vm._v(\"\\n \"+_vm._s(_vm.label)+\"\\n\")])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{class:{ 'dark-overlay': _vm.darkOverlay },on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }$event.stopPropagation();_vm.onCancel()}}},[_c('div',{staticClass:\"dialog-modal panel panel-default\",on:{\"click\":function($event){$event.stopPropagation();}}},[_c('div',{staticClass:\"panel-heading dialog-modal-heading\"},[_c('div',{staticClass:\"title\"},[_vm._t(\"header\")],2)]),_vm._v(\" \"),_c('div',{staticClass:\"dialog-modal-content\"},[_vm._t(\"default\")],2),_vm._v(\" \"),_c('div',{staticClass:\"dialog-modal-footer user-interactions panel-footer\"},[_vm._t(\"footer\")],2)])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-popover',{staticClass:\"moderation-tools-popover\",attrs:{\"trigger\":\"click\",\"placement\":\"bottom-end\"},on:{\"show\":function($event){_vm.showDropDown = true},\"hide\":function($event){_vm.showDropDown = false}}},[_c('div',{attrs:{\"slot\":\"popover\"},slot:\"popover\"},[_c('div',{staticClass:\"dropdown-menu\"},[(_vm.user.is_local)?_c('span',[_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleRight(\"admin\")}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(!!_vm.user.rights.admin ? 'user_card.admin_menu.revoke_admin' : 'user_card.admin_menu.grant_admin'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleRight(\"moderator\")}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(!!_vm.user.rights.moderator ? 'user_card.admin_menu.revoke_moderator' : 'user_card.admin_menu.grant_moderator'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"dropdown-divider\",attrs:{\"role\":\"separator\"}})]):_vm._e(),_vm._v(\" \"),_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleActivationStatus()}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(!!_vm.user.deactivated ? 'user_card.admin_menu.activate_account' : 'user_card.admin_menu.deactivate_account'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.deleteUserDialog(true)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.delete_account'))+\"\\n \")]),_vm._v(\" \"),(_vm.hasTagPolicy)?_c('div',{staticClass:\"dropdown-divider\",attrs:{\"role\":\"separator\"}}):_vm._e(),_vm._v(\" \"),(_vm.hasTagPolicy)?_c('span',[_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleTag(_vm.tags.FORCE_NSFW)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.force_nsfw'))+\"\\n \"),_c('span',{staticClass:\"menu-checkbox\",class:{ 'menu-checkbox-checked': _vm.hasTag(_vm.tags.FORCE_NSFW) }})]),_vm._v(\" \"),_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleTag(_vm.tags.STRIP_MEDIA)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.strip_media'))+\"\\n \"),_c('span',{staticClass:\"menu-checkbox\",class:{ 'menu-checkbox-checked': _vm.hasTag(_vm.tags.STRIP_MEDIA) }})]),_vm._v(\" \"),_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleTag(_vm.tags.FORCE_UNLISTED)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.force_unlisted'))+\"\\n \"),_c('span',{staticClass:\"menu-checkbox\",class:{ 'menu-checkbox-checked': _vm.hasTag(_vm.tags.FORCE_UNLISTED) }})]),_vm._v(\" \"),_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleTag(_vm.tags.SANDBOX)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.sandbox'))+\"\\n \"),_c('span',{staticClass:\"menu-checkbox\",class:{ 'menu-checkbox-checked': _vm.hasTag(_vm.tags.SANDBOX) }})]),_vm._v(\" \"),(_vm.user.is_local)?_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleTag(_vm.tags.DISABLE_REMOTE_SUBSCRIPTION)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.disable_remote_subscription'))+\"\\n \"),_c('span',{staticClass:\"menu-checkbox\",class:{ 'menu-checkbox-checked': _vm.hasTag(_vm.tags.DISABLE_REMOTE_SUBSCRIPTION) }})]):_vm._e(),_vm._v(\" \"),(_vm.user.is_local)?_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleTag(_vm.tags.DISABLE_ANY_SUBSCRIPTION)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.disable_any_subscription'))+\"\\n \"),_c('span',{staticClass:\"menu-checkbox\",class:{ 'menu-checkbox-checked': _vm.hasTag(_vm.tags.DISABLE_ANY_SUBSCRIPTION) }})]):_vm._e(),_vm._v(\" \"),(_vm.user.is_local)?_c('button',{staticClass:\"dropdown-item\",on:{\"click\":function($event){_vm.toggleTag(_vm.tags.QUARANTINE)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.quarantine'))+\"\\n \"),_c('span',{staticClass:\"menu-checkbox\",class:{ 'menu-checkbox-checked': _vm.hasTag(_vm.tags.QUARANTINE) }})]):_vm._e()]):_vm._e()])]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default btn-block\",class:{ pressed: _vm.showDropDown }},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.moderation'))+\"\\n \")])]),_vm._v(\" \"),_c('portal',{attrs:{\"to\":\"modal\"}},[(_vm.showDeleteUserDialog)?_c('DialogModal',{attrs:{\"on-cancel\":_vm.deleteUserDialog.bind(this, false)}},[_c('template',{slot:\"header\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.delete_user'))+\"\\n \")]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('user_card.admin_menu.delete_user_confirmation')))]),_vm._v(\" \"),_c('template',{slot:\"footer\"},[_c('button',{staticClass:\"btn btn-default\",on:{\"click\":function($event){_vm.deleteUserDialog(false)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.cancel'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default danger\",on:{\"click\":function($event){_vm.deleteUser()}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.admin_menu.delete_user'))+\"\\n \")])])],2):_vm._e()],1)],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"account-actions\"},[_c('v-popover',{staticClass:\"account-tools-popover\",attrs:{\"trigger\":\"click\",\"container\":false,\"placement\":\"bottom-end\",\"offset\":5}},[_c('div',{attrs:{\"slot\":\"popover\"},slot:\"popover\"},[_c('div',{staticClass:\"dropdown-menu\"},[_c('button',{staticClass:\"btn btn-default btn-block dropdown-item\",on:{\"click\":_vm.mentionUser}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.mention'))+\"\\n \")]),_vm._v(\" \"),(_vm.user.following)?[_c('div',{staticClass:\"dropdown-divider\",attrs:{\"role\":\"separator\"}}),_vm._v(\" \"),(_vm.user.showing_reblogs)?_c('button',{staticClass:\"btn btn-default dropdown-item\",on:{\"click\":_vm.hideRepeats}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.hide_repeats'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(!_vm.user.showing_reblogs)?_c('button',{staticClass:\"btn btn-default dropdown-item\",on:{\"click\":_vm.showRepeats}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.show_repeats'))+\"\\n \")]):_vm._e()]:_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"dropdown-divider\",attrs:{\"role\":\"separator\"}}),_vm._v(\" \"),(_vm.user.statusnet_blocking)?_c('button',{staticClass:\"btn btn-default btn-block dropdown-item\",on:{\"click\":_vm.unblockUser}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.unblock'))+\"\\n \")]):_c('button',{staticClass:\"btn btn-default btn-block dropdown-item\",on:{\"click\":_vm.blockUser}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.block'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default btn-block dropdown-item\",on:{\"click\":_vm.reportUser}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.report'))+\"\\n \")])],2)]),_vm._v(\" \"),_c('div',{staticClass:\"btn btn-default ellipsis-button\"},[_c('i',{staticClass:\"icon-ellipsis trigger-button\"})])])],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"user-card\",class:_vm.classes},[_c('div',{staticClass:\"background-image\",class:{ 'hide-bio': _vm.hideBio },style:(_vm.style)}),_vm._v(\" \"),_c('div',{staticClass:\"panel-heading\"},[_c('div',{staticClass:\"user-info\"},[_c('div',{staticClass:\"container\"},[(_vm.allowZoomingAvatar)?_c('a',{staticClass:\"user-info-avatar-link\",on:{\"click\":_vm.zoomAvatar}},[_c('UserAvatar',{attrs:{\"better-shadow\":_vm.betterShadow,\"user\":_vm.user}}),_vm._v(\" \"),_vm._m(0)],1):_c('router-link',{attrs:{\"to\":_vm.userProfileLink(_vm.user)}},[_c('UserAvatar',{attrs:{\"better-shadow\":_vm.betterShadow,\"user\":_vm.user}})],1),_vm._v(\" \"),_c('div',{staticClass:\"user-summary\"},[_c('div',{staticClass:\"top-line\"},[(_vm.user.name_html)?_c('div',{staticClass:\"user-name\",attrs:{\"title\":_vm.user.name},domProps:{\"innerHTML\":_vm._s(_vm.user.name_html)}}):_c('div',{staticClass:\"user-name\",attrs:{\"title\":_vm.user.name}},[_vm._v(\"\\n \"+_vm._s(_vm.user.name)+\"\\n \")]),_vm._v(\" \"),(!_vm.isOtherUser)?_c('router-link',{attrs:{\"to\":{ name: 'user-settings' }}},[_c('i',{staticClass:\"button-icon icon-wrench usersettings\",attrs:{\"title\":_vm.$t('tool_tip.user_settings')}})]):_vm._e(),_vm._v(\" \"),(_vm.isOtherUser && !_vm.user.is_local)?_c('a',{attrs:{\"href\":_vm.user.statusnet_profile_url,\"target\":\"_blank\"}},[_c('i',{staticClass:\"icon-link-ext usersettings\"})]):_vm._e(),_vm._v(\" \"),(_vm.isOtherUser && _vm.loggedIn)?_c('AccountActions',{attrs:{\"user\":_vm.user}}):_vm._e()],1),_vm._v(\" \"),_c('div',{staticClass:\"bottom-line\"},[_c('router-link',{staticClass:\"user-screen-name\",attrs:{\"to\":_vm.userProfileLink(_vm.user)}},[_vm._v(\"\\n @\"+_vm._s(_vm.user.screen_name)+\"\\n \")]),_vm._v(\" \"),(!_vm.hideBio && !!_vm.visibleRole)?_c('span',{staticClass:\"alert staff\"},[_vm._v(_vm._s(_vm.visibleRole))]):_vm._e(),_vm._v(\" \"),(_vm.user.locked)?_c('span',[_c('i',{staticClass:\"icon icon-lock\"})]):_vm._e(),_vm._v(\" \"),(!_vm.mergedConfig.hideUserStats && !_vm.hideBio)?_c('span',{staticClass:\"dailyAvg\"},[_vm._v(_vm._s(_vm.dailyAvg)+\" \"+_vm._s(_vm.$t('user_card.per_day')))]):_vm._e()],1)])],1),_vm._v(\" \"),_c('div',{staticClass:\"user-meta\"},[(_vm.user.follows_you && _vm.loggedIn && _vm.isOtherUser)?_c('div',{staticClass:\"following\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.follows_you'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.isOtherUser && (_vm.loggedIn || !_vm.switcher))?_c('div',{staticClass:\"highlighter\"},[(_vm.userHighlightType !== 'disabled')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.userHighlightColor),expression:\"userHighlightColor\"}],staticClass:\"userHighlightText\",attrs:{\"id\":'userHighlightColorTx'+_vm.user.id,\"type\":\"text\"},domProps:{\"value\":(_vm.userHighlightColor)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.userHighlightColor=$event.target.value}}}):_vm._e(),_vm._v(\" \"),(_vm.userHighlightType !== 'disabled')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.userHighlightColor),expression:\"userHighlightColor\"}],staticClass:\"userHighlightCl\",attrs:{\"id\":'userHighlightColor'+_vm.user.id,\"type\":\"color\"},domProps:{\"value\":(_vm.userHighlightColor)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.userHighlightColor=$event.target.value}}}):_vm._e(),_vm._v(\" \"),_c('label',{staticClass:\"userHighlightSel select\",attrs:{\"for\":\"style-switcher\"}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.userHighlightType),expression:\"userHighlightType\"}],staticClass:\"userHighlightSel\",attrs:{\"id\":'userHighlightSel'+_vm.user.id},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.userHighlightType=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},[_c('option',{attrs:{\"value\":\"disabled\"}},[_vm._v(\"No highlight\")]),_vm._v(\" \"),_c('option',{attrs:{\"value\":\"solid\"}},[_vm._v(\"Solid bg\")]),_vm._v(\" \"),_c('option',{attrs:{\"value\":\"striped\"}},[_vm._v(\"Striped bg\")]),_vm._v(\" \"),_c('option',{attrs:{\"value\":\"side\"}},[_vm._v(\"Side stripe\")])]),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])]):_vm._e()]),_vm._v(\" \"),(_vm.loggedIn && _vm.isOtherUser)?_c('div',{staticClass:\"user-interactions\"},[_c('div',{staticClass:\"btn-group\"},[_c('FollowButton',{attrs:{\"user\":_vm.user}}),_vm._v(\" \"),(_vm.user.following)?[(!_vm.user.subscribed)?_c('ProgressButton',{staticClass:\"btn btn-default\",attrs:{\"click\":_vm.subscribeUser,\"title\":_vm.$t('user_card.subscribe')}},[_c('i',{staticClass:\"icon-bell-alt\"})]):_c('ProgressButton',{staticClass:\"btn btn-default pressed\",attrs:{\"click\":_vm.unsubscribeUser,\"title\":_vm.$t('user_card.unsubscribe')}},[_c('i',{staticClass:\"icon-bell-ringing-o\"})])]:_vm._e()],2),_vm._v(\" \"),_c('div',[(_vm.user.muted)?_c('button',{staticClass:\"btn btn-default btn-block pressed\",on:{\"click\":_vm.unmuteUser}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.muted'))+\"\\n \")]):_c('button',{staticClass:\"btn btn-default btn-block\",on:{\"click\":_vm.muteUser}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.mute'))+\"\\n \")])]),_vm._v(\" \"),(_vm.loggedIn.role === \"admin\")?_c('ModerationTools',{attrs:{\"user\":_vm.user}}):_vm._e()],1):_vm._e(),_vm._v(\" \"),(!_vm.loggedIn && _vm.user.is_local)?_c('div',{staticClass:\"user-interactions\"},[_c('RemoteFollow',{attrs:{\"user\":_vm.user}})],1):_vm._e()])]),_vm._v(\" \"),(!_vm.hideBio)?_c('div',{staticClass:\"panel-body\"},[(!_vm.mergedConfig.hideUserStats && _vm.switcher)?_c('div',{staticClass:\"user-counts\"},[_c('div',{staticClass:\"user-count\",on:{\"click\":function($event){$event.preventDefault();_vm.setProfileView('statuses')}}},[_c('h5',[_vm._v(_vm._s(_vm.$t('user_card.statuses')))]),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.user.statuses_count)+\" \"),_c('br')])]),_vm._v(\" \"),_c('div',{staticClass:\"user-count\",on:{\"click\":function($event){$event.preventDefault();_vm.setProfileView('friends')}}},[_c('h5',[_vm._v(_vm._s(_vm.$t('user_card.followees')))]),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.user.friends_count))])]),_vm._v(\" \"),_c('div',{staticClass:\"user-count\",on:{\"click\":function($event){$event.preventDefault();_vm.setProfileView('followers')}}},[_c('h5',[_vm._v(_vm._s(_vm.$t('user_card.followers')))]),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.user.followers_count))])])]):_vm._e(),_vm._v(\" \"),(!_vm.hideBio && _vm.user.description_html)?_c('p',{staticClass:\"user-card-bio\",domProps:{\"innerHTML\":_vm._s(_vm.user.description_html)},on:{\"click\":function($event){$event.preventDefault();return _vm.linkClicked($event)}}}):(!_vm.hideBio)?_c('p',{staticClass:\"user-card-bio\"},[_vm._v(\"\\n \"+_vm._s(_vm.user.description)+\"\\n \")]):_vm._e()]):_vm._e()])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"user-info-avatar-link-overlay\"},[_c('i',{staticClass:\"button-icon icon-zoom-in\"})])}]\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:\"galleryContainer\",staticStyle:{\"width\":\"100%\"}},_vm._l((_vm.rows),function(row,index){return _c('div',{key:index,staticClass:\"gallery-row\",class:{ 'contain-fit': _vm.useContainFit, 'cover-fit': !_vm.useContainFit },style:(_vm.rowStyle(row.length))},[_c('div',{staticClass:\"gallery-row-inner\"},_vm._l((row),function(attachment){return _c('attachment',{key:attachment.id,style:(_vm.itemStyle(attachment.id, row)),attrs:{\"set-media\":_vm.setMedia,\"nsfw\":_vm.nsfw,\"attachment\":attachment,\"allow-play\":false,\"natural-size-load\":_vm.onNaturalSizeLoad.bind(null, attachment.id)}})}),1)])}),0)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('a',{staticClass:\"link-preview-card\",attrs:{\"href\":_vm.card.url,\"target\":\"_blank\",\"rel\":\"noopener\"}},[(_vm.useImage && _vm.imageLoaded)?_c('div',{staticClass:\"card-image\",class:{ 'small-image': _vm.size === 'small' }},[_c('img',{attrs:{\"src\":_vm.card.image}})]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"card-content\"},[_c('span',{staticClass:\"card-host faint\"},[_vm._v(_vm._s(_vm.card.provider_name))]),_vm._v(\" \"),_c('h4',{staticClass:\"card-title\"},[_vm._v(_vm._s(_vm.card.title))]),_vm._v(\" \"),(_vm.useDescription)?_c('p',{staticClass:\"card-description\"},[_vm._v(_vm._s(_vm.card.description))]):_vm._e()])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"avatars\"},_vm._l((_vm.slicedUsers),function(user){return _c('router-link',{key:user.id,staticClass:\"avatars-item\",attrs:{\"to\":_vm.userProfileLink(user)}},[_c('UserAvatar',{staticClass:\"avatar-small\",attrs:{\"user\":user}})],1)}),1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-popover',{attrs:{\"popover-class\":\"status-popover\",\"placement\":\"top-start\",\"popper-options\":_vm.popperOptions},on:{\"show\":function($event){_vm.enter()}}},[_c('template',{slot:\"popover\"},[(_vm.status)?_c('Status',{attrs:{\"is-preview\":true,\"statusoid\":_vm.status,\"compact\":true}}):_c('div',{staticClass:\"status-preview-loading\"},[_c('i',{staticClass:\"icon-spin4 animate-spin\"})])],1),_vm._v(\" \"),_vm._t(\"default\")],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.hideStatus)?_c('div',{staticClass:\"status-el\",class:[{ 'status-el_focused': _vm.isFocused }, { 'status-conversation': _vm.inlineExpanded }]},[(_vm.error)?_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \"),_c('i',{staticClass:\"button-icon icon-cancel\",on:{\"click\":_vm.clearError}})]):_vm._e(),_vm._v(\" \"),(_vm.muted && !_vm.isPreview)?[_c('div',{staticClass:\"media status container muted\"},[_c('small',[_c('router-link',{attrs:{\"to\":_vm.userProfileLink}},[_vm._v(\"\\n \"+_vm._s(_vm.status.user.screen_name)+\"\\n \")])],1),_vm._v(\" \"),_c('small',{staticClass:\"muteWords\"},[_vm._v(_vm._s(_vm.muteWordHits.join(', ')))]),_vm._v(\" \"),_c('a',{staticClass:\"unmute\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleMute($event)}}},[_c('i',{staticClass:\"button-icon icon-eye-off\"})])])]:[(_vm.showPinned)?_c('div',{staticClass:\"status-pin\"},[_c('i',{staticClass:\"fa icon-pin faint\"}),_vm._v(\" \"),_c('span',{staticClass:\"faint\"},[_vm._v(_vm._s(_vm.$t('status.pinned')))])]):_vm._e(),_vm._v(\" \"),(_vm.retweet && !_vm.noHeading && !_vm.inConversation)?_c('div',{staticClass:\"media container retweet-info\",class:[_vm.repeaterClass, { highlighted: _vm.repeaterStyle }],style:([_vm.repeaterStyle])},[(_vm.retweet)?_c('UserAvatar',{staticClass:\"media-left\",attrs:{\"better-shadow\":_vm.betterShadow,\"user\":_vm.statusoid.user}}):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"media-body faint\"},[_c('span',{staticClass:\"user-name\"},[(_vm.retweeterHtml)?_c('router-link',{attrs:{\"to\":_vm.retweeterProfileLink},domProps:{\"innerHTML\":_vm._s(_vm.retweeterHtml)}}):_c('router-link',{attrs:{\"to\":_vm.retweeterProfileLink}},[_vm._v(_vm._s(_vm.retweeter))])],1),_vm._v(\" \"),_c('i',{staticClass:\"fa icon-retweet retweeted\",attrs:{\"title\":_vm.$t('tool_tip.repeat')}}),_vm._v(\"\\n \"+_vm._s(_vm.$t('timeline.repeated'))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"media status\",class:[_vm.userClass, { highlighted: _vm.userStyle, 'is-retweet': _vm.retweet && !_vm.inConversation }],style:([ _vm.userStyle ]),attrs:{\"data-tags\":_vm.tags}},[(!_vm.noHeading)?_c('div',{staticClass:\"media-left\"},[_c('router-link',{attrs:{\"to\":_vm.userProfileLink},nativeOn:{\"!click\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.toggleUserExpanded($event)}}},[_c('UserAvatar',{attrs:{\"compact\":_vm.compact,\"better-shadow\":_vm.betterShadow,\"user\":_vm.status.user}})],1)],1):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"status-body\"},[(_vm.userExpanded)?_c('UserCard',{staticClass:\"status-usercard\",attrs:{\"user\":_vm.status.user,\"rounded\":true,\"bordered\":true}}):_vm._e(),_vm._v(\" \"),(!_vm.noHeading)?_c('div',{staticClass:\"media-heading\"},[_c('div',{staticClass:\"heading-name-row\"},[_c('div',{staticClass:\"name-and-account-name\"},[(_vm.status.user.name_html)?_c('h4',{staticClass:\"user-name\",domProps:{\"innerHTML\":_vm._s(_vm.status.user.name_html)}}):_c('h4',{staticClass:\"user-name\"},[_vm._v(\"\\n \"+_vm._s(_vm.status.user.name)+\"\\n \")]),_vm._v(\" \"),_c('router-link',{staticClass:\"account-name\",attrs:{\"to\":_vm.userProfileLink}},[_vm._v(\"\\n \"+_vm._s(_vm.status.user.screen_name)+\"\\n \")])],1),_vm._v(\" \"),_c('span',{staticClass:\"heading-right\"},[_c('router-link',{staticClass:\"timeago faint-link\",attrs:{\"to\":{ name: 'conversation', params: { id: _vm.status.id } }}},[_c('Timeago',{attrs:{\"time\":_vm.status.created_at,\"auto-update\":60}})],1),_vm._v(\" \"),(_vm.status.visibility)?_c('div',{staticClass:\"button-icon visibility-icon\"},[_c('i',{class:_vm.visibilityIcon(_vm.status.visibility),attrs:{\"title\":_vm._f(\"capitalize\")(_vm.status.visibility)}})]):_vm._e(),_vm._v(\" \"),(!_vm.status.is_local && !_vm.isPreview)?_c('a',{staticClass:\"source_url\",attrs:{\"href\":_vm.status.external_url,\"target\":\"_blank\",\"title\":\"Source\"}},[_c('i',{staticClass:\"button-icon icon-link-ext-alt\"})]):_vm._e(),_vm._v(\" \"),(_vm.expandable && !_vm.isPreview)?[_c('a',{attrs:{\"href\":\"#\",\"title\":\"Expand\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleExpanded($event)}}},[_c('i',{staticClass:\"button-icon icon-plus-squared\"})])]:_vm._e(),_vm._v(\" \"),(_vm.unmuted)?_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleMute($event)}}},[_c('i',{staticClass:\"button-icon icon-eye-off\"})]):_vm._e()],2)]),_vm._v(\" \"),_c('div',{staticClass:\"heading-reply-row\"},[(_vm.isReply)?_c('div',{staticClass:\"reply-to-and-accountname\"},[(!_vm.isPreview)?_c('StatusPopover',{attrs:{\"status-id\":_vm.status.in_reply_to_status_id}},[_c('a',{staticClass:\"reply-to\",attrs:{\"href\":\"#\",\"aria-label\":_vm.$t('tool_tip.reply')},on:{\"click\":function($event){$event.preventDefault();_vm.gotoOriginal(_vm.status.in_reply_to_status_id)}}},[_c('i',{staticClass:\"button-icon icon-reply\"}),_vm._v(\" \"),_c('span',{staticClass:\"faint-link reply-to-text\"},[_vm._v(_vm._s(_vm.$t('status.reply_to')))])])]):_c('span',{staticClass:\"reply-to\"},[_c('span',{staticClass:\"reply-to-text\"},[_vm._v(_vm._s(_vm.$t('status.reply_to')))])]),_vm._v(\" \"),_c('router-link',{attrs:{\"to\":_vm.replyProfileLink}},[_vm._v(\"\\n \"+_vm._s(_vm.replyToName)+\"\\n \")]),_vm._v(\" \"),(_vm.replies && _vm.replies.length)?_c('span',{staticClass:\"faint replies-separator\"},[_vm._v(\"\\n -\\n \")]):_vm._e()],1):_vm._e(),_vm._v(\" \"),(_vm.inConversation && !_vm.isPreview && _vm.replies && _vm.replies.length)?_c('div',{staticClass:\"replies\"},[_c('span',{staticClass:\"faint\"},[_vm._v(_vm._s(_vm.$t('status.replies_list')))]),_vm._v(\" \"),_vm._l((_vm.replies),function(reply){return _c('StatusPopover',{key:reply.id,attrs:{\"status-id\":reply.id}},[_c('a',{staticClass:\"reply-link\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();_vm.gotoOriginal(reply.id)}}},[_vm._v(_vm._s(reply.name))])])})],2):_vm._e()])]):_vm._e(),_vm._v(\" \"),(_vm.longSubject)?_c('div',{staticClass:\"status-content-wrapper\",class:{ 'tall-status': !_vm.showingLongSubject }},[(!_vm.showingLongSubject)?_c('a',{staticClass:\"tall-status-hider\",class:{ 'tall-status-hider_focused': _vm.isFocused },attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();_vm.showingLongSubject=true}}},[_vm._v(_vm._s(_vm.$t(\"general.show_more\")))]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"status-content media-body\",domProps:{\"innerHTML\":_vm._s(_vm.contentHtml)},on:{\"click\":function($event){$event.preventDefault();return _vm.linkClicked($event)}}}),_vm._v(\" \"),(_vm.showingLongSubject)?_c('a',{staticClass:\"status-unhider\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();_vm.showingLongSubject=false}}},[_vm._v(_vm._s(_vm.$t(\"general.show_less\")))]):_vm._e()]):_c('div',{staticClass:\"status-content-wrapper\",class:{'tall-status': _vm.hideTallStatus}},[(_vm.hideTallStatus)?_c('a',{staticClass:\"tall-status-hider\",class:{ 'tall-status-hider_focused': _vm.isFocused },attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleShowMore($event)}}},[_vm._v(_vm._s(_vm.$t(\"general.show_more\")))]):_vm._e(),_vm._v(\" \"),(!_vm.hideSubjectStatus)?_c('div',{staticClass:\"status-content media-body\",domProps:{\"innerHTML\":_vm._s(_vm.contentHtml)},on:{\"click\":function($event){$event.preventDefault();return _vm.linkClicked($event)}}}):_c('div',{staticClass:\"status-content media-body\",domProps:{\"innerHTML\":_vm._s(_vm.status.summary_html)},on:{\"click\":function($event){$event.preventDefault();return _vm.linkClicked($event)}}}),_vm._v(\" \"),(_vm.hideSubjectStatus)?_c('a',{staticClass:\"cw-status-hider\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleShowMore($event)}}},[_vm._v(_vm._s(_vm.$t(\"general.show_more\")))]):_vm._e(),_vm._v(\" \"),(_vm.showingMore)?_c('a',{staticClass:\"status-unhider\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleShowMore($event)}}},[_vm._v(_vm._s(_vm.$t(\"general.show_less\")))]):_vm._e()]),_vm._v(\" \"),(_vm.status.poll && _vm.status.poll.options)?_c('div',[_c('poll',{attrs:{\"base-poll\":_vm.status.poll}})],1):_vm._e(),_vm._v(\" \"),(_vm.status.attachments && (!_vm.hideSubjectStatus || _vm.showingLongSubject))?_c('div',{staticClass:\"attachments media-body\"},[_vm._l((_vm.nonGalleryAttachments),function(attachment){return _c('attachment',{key:attachment.id,staticClass:\"non-gallery\",attrs:{\"size\":_vm.attachmentSize,\"nsfw\":_vm.nsfwClickthrough,\"attachment\":attachment,\"allow-play\":true,\"set-media\":_vm.setMedia()}})}),_vm._v(\" \"),(_vm.galleryAttachments.length > 0)?_c('gallery',{attrs:{\"nsfw\":_vm.nsfwClickthrough,\"attachments\":_vm.galleryAttachments,\"set-media\":_vm.setMedia()}}):_vm._e()],2):_vm._e(),_vm._v(\" \"),(_vm.status.card && !_vm.hideSubjectStatus && !_vm.noHeading)?_c('div',{staticClass:\"link-preview media-body\"},[_c('link-preview',{attrs:{\"card\":_vm.status.card,\"size\":_vm.attachmentSize,\"nsfw\":_vm.nsfwClickthrough}})],1):_vm._e(),_vm._v(\" \"),_c('transition',{attrs:{\"name\":\"fade\"}},[(!_vm.hidePostStats && _vm.isFocused && _vm.combinedFavsAndRepeatsUsers.length > 0)?_c('div',{staticClass:\"favs-repeated-users\"},[_c('div',{staticClass:\"stats\"},[(_vm.statusFromGlobalRepository.rebloggedBy && _vm.statusFromGlobalRepository.rebloggedBy.length > 0)?_c('div',{staticClass:\"stat-count\"},[_c('a',{staticClass:\"stat-title\"},[_vm._v(_vm._s(_vm.$t('status.repeats')))]),_vm._v(\" \"),_c('div',{staticClass:\"stat-number\"},[_vm._v(\"\\n \"+_vm._s(_vm.statusFromGlobalRepository.rebloggedBy.length)+\"\\n \")])]):_vm._e(),_vm._v(\" \"),(_vm.statusFromGlobalRepository.favoritedBy && _vm.statusFromGlobalRepository.favoritedBy.length > 0)?_c('div',{staticClass:\"stat-count\"},[_c('a',{staticClass:\"stat-title\"},[_vm._v(_vm._s(_vm.$t('status.favorites')))]),_vm._v(\" \"),_c('div',{staticClass:\"stat-number\"},[_vm._v(\"\\n \"+_vm._s(_vm.statusFromGlobalRepository.favoritedBy.length)+\"\\n \")])]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"avatar-row\"},[_c('AvatarList',{attrs:{\"users\":_vm.combinedFavsAndRepeatsUsers}})],1)])]):_vm._e()]),_vm._v(\" \"),(!_vm.noHeading && !_vm.isPreview)?_c('div',{staticClass:\"status-actions media-body\"},[_c('div',[(_vm.loggedIn)?_c('i',{staticClass:\"button-icon icon-reply\",class:{'button-icon-active': _vm.replying},attrs:{\"title\":_vm.$t('tool_tip.reply')},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleReplying($event)}}}):_c('i',{staticClass:\"button-icon button-icon-disabled icon-reply\",attrs:{\"title\":_vm.$t('tool_tip.reply')}}),_vm._v(\" \"),(_vm.status.replies_count > 0)?_c('span',[_vm._v(_vm._s(_vm.status.replies_count))]):_vm._e()]),_vm._v(\" \"),_c('retweet-button',{attrs:{\"visibility\":_vm.status.visibility,\"logged-in\":_vm.loggedIn,\"status\":_vm.status}}),_vm._v(\" \"),_c('favorite-button',{attrs:{\"logged-in\":_vm.loggedIn,\"status\":_vm.status}}),_vm._v(\" \"),_c('extra-buttons',{attrs:{\"status\":_vm.status},on:{\"onError\":_vm.showError,\"onSuccess\":_vm.clearError}})],1):_vm._e()],1)]),_vm._v(\" \"),(_vm.replying)?_c('div',{staticClass:\"container\"},[_c('PostStatusForm',{staticClass:\"reply-body\",attrs:{\"reply-to\":_vm.status.id,\"attentions\":_vm.status.attentions,\"replied-user\":_vm.status.user,\"copy-message-scope\":_vm.status.visibility,\"subject\":_vm.replySubject},on:{\"posted\":_vm.toggleReplying}})],1):_vm._e()]],2):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"timeline panel-default\",class:[_vm.isExpanded ? 'panel' : 'panel-disabled']},[(_vm.isExpanded)?_c('div',{staticClass:\"panel-heading conversation-heading\"},[_c('span',{staticClass:\"title\"},[_vm._v(\" \"+_vm._s(_vm.$t('timeline.conversation'))+\" \")]),_vm._v(\" \"),(_vm.collapsable)?_c('span',[_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleExpanded($event)}}},[_vm._v(_vm._s(_vm.$t('timeline.collapse')))])]):_vm._e()]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.conversation),function(status){return _c('status',{key:status.id,staticClass:\"status-fadein panel-body\",attrs:{\"inline-expanded\":_vm.collapsable && _vm.isExpanded,\"statusoid\":status,\"expandable\":!_vm.isExpanded,\"show-pinned\":_vm.pinnedStatusIdsObject && _vm.pinnedStatusIdsObject[status.id],\"focused\":_vm.focused(status.id),\"in-conversation\":_vm.isExpanded,\"highlight\":_vm.getHighlight(),\"replies\":_vm.getReplies(status.id),\"in-profile\":_vm.inProfile},on:{\"goto\":_vm.setHighlight,\"toggleExpanded\":_vm.toggleExpanded}})})],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.classes.root},[_c('div',{class:_vm.classes.header},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.title)+\"\\n \")]),_vm._v(\" \"),(_vm.timelineError)?_c('div',{staticClass:\"loadmore-error alert error\",on:{\"click\":function($event){$event.preventDefault();}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('timeline.error_fetching'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.timeline.newStatusCount > 0 && !_vm.timelineError)?_c('button',{staticClass:\"loadmore-button\",on:{\"click\":function($event){$event.preventDefault();return _vm.showNewStatuses($event)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('timeline.show_new'))+_vm._s(_vm.newStatusCountStr)+\"\\n \")]):_vm._e(),_vm._v(\" \"),(!_vm.timeline.newStatusCount > 0 && !_vm.timelineError)?_c('div',{staticClass:\"loadmore-text faint\",on:{\"click\":function($event){$event.preventDefault();}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('timeline.up_to_date'))+\"\\n \")]):_vm._e()]),_vm._v(\" \"),_c('div',{class:_vm.classes.body},[_c('div',{staticClass:\"timeline\"},[_vm._l((_vm.pinnedStatusIds),function(statusId){return [(_vm.timeline.statusesObject[statusId])?_c('conversation',{key:statusId + '-pinned',staticClass:\"status-fadein\",attrs:{\"status-id\":statusId,\"collapsable\":true,\"pinned-status-ids-object\":_vm.pinnedStatusIdsObject,\"in-profile\":_vm.inProfile}}):_vm._e()]}),_vm._v(\" \"),_vm._l((_vm.timeline.visibleStatuses),function(status){return [(!_vm.excludedStatusIdsObject[status.id])?_c('conversation',{key:status.id,staticClass:\"status-fadein\",attrs:{\"status-id\":status.id,\"collapsable\":true,\"in-profile\":_vm.inProfile}}):_vm._e()]})],2)]),_vm._v(\" \"),_c('div',{class:_vm.classes.footer},[(_vm.count===0)?_c('div',{staticClass:\"new-status-notification text-center panel-footer faint\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('timeline.no_statuses'))+\"\\n \")]):(_vm.bottomedOut)?_c('div',{staticClass:\"new-status-notification text-center panel-footer faint\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('timeline.no_more_statuses'))+\"\\n \")]):(!_vm.timeline.loading)?_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();_vm.fetchOlderStatuses()}}},[_c('div',{staticClass:\"new-status-notification text-center panel-footer\"},[_vm._v(_vm._s(_vm.$t('timeline.load_older')))])]):_c('div',{staticClass:\"new-status-notification text-center panel-footer\"},[_c('i',{staticClass:\"icon-spin3 animate-spin\"})])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Timeline',{attrs:{\"title\":_vm.$t('nav.public_tl'),\"timeline\":_vm.timeline,\"timeline-name\":'public'}})}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Timeline',{attrs:{\"title\":_vm.$t('nav.twkn'),\"timeline\":_vm.timeline,\"timeline-name\":'publicAndExternal'}})}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Timeline',{attrs:{\"title\":_vm.$t('nav.timeline'),\"timeline\":_vm.timeline,\"timeline-name\":'friends'}})}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Timeline',{attrs:{\"title\":_vm.tag,\"timeline\":_vm.timeline,\"timeline-name\":'tag',\"tag\":_vm.tag}})}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('conversation',{attrs:{\"collapsable\":false,\"is-page\":\"true\",\"status-id\":_vm.statusId}})}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.notification.type === 'mention')?_c('status',{attrs:{\"compact\":true,\"statusoid\":_vm.notification.status}}):_c('div',[(_vm.needMute && !_vm.unmuted)?_c('div',{staticClass:\"container muted\"},[_c('small',[_c('router-link',{attrs:{\"to\":_vm.userProfileLink}},[_vm._v(\"\\n \"+_vm._s(_vm.notification.from_profile.screen_name)+\"\\n \")])],1),_vm._v(\" \"),_c('a',{staticClass:\"unmute\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleMute($event)}}},[_c('i',{staticClass:\"button-icon icon-eye-off\"})])]):_c('div',{staticClass:\"non-mention\",class:[_vm.userClass, { highlighted: _vm.userStyle }],style:([ _vm.userStyle ])},[_c('a',{staticClass:\"avatar-container\",attrs:{\"href\":_vm.notification.from_profile.statusnet_profile_url},on:{\"!click\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.toggleUserExpanded($event)}}},[_c('UserAvatar',{attrs:{\"compact\":true,\"better-shadow\":_vm.betterShadow,\"user\":_vm.notification.from_profile}})],1),_vm._v(\" \"),_c('div',{staticClass:\"notification-right\"},[(_vm.userExpanded)?_c('UserCard',{attrs:{\"user\":_vm.getUser(_vm.notification),\"rounded\":true,\"bordered\":true}}):_vm._e(),_vm._v(\" \"),_c('span',{staticClass:\"notification-details\"},[_c('div',{staticClass:\"name-and-action\"},[(!!_vm.notification.from_profile.name_html)?_c('span',{staticClass:\"username\",attrs:{\"title\":'@'+_vm.notification.from_profile.screen_name},domProps:{\"innerHTML\":_vm._s(_vm.notification.from_profile.name_html)}}):_c('span',{staticClass:\"username\",attrs:{\"title\":'@'+_vm.notification.from_profile.screen_name}},[_vm._v(_vm._s(_vm.notification.from_profile.name))]),_vm._v(\" \"),(_vm.notification.type === 'like')?_c('span',[_c('i',{staticClass:\"fa icon-star lit\"}),_vm._v(\" \"),_c('small',[_vm._v(_vm._s(_vm.$t('notifications.favorited_you')))])]):_vm._e(),_vm._v(\" \"),(_vm.notification.type === 'repeat')?_c('span',[_c('i',{staticClass:\"fa icon-retweet lit\",attrs:{\"title\":_vm.$t('tool_tip.repeat')}}),_vm._v(\" \"),_c('small',[_vm._v(_vm._s(_vm.$t('notifications.repeated_you')))])]):_vm._e(),_vm._v(\" \"),(_vm.notification.type === 'follow')?_c('span',[_c('i',{staticClass:\"fa icon-user-plus lit\"}),_vm._v(\" \"),_c('small',[_vm._v(_vm._s(_vm.$t('notifications.followed_you')))])]):_vm._e()]),_vm._v(\" \"),(_vm.notification.type === 'follow')?_c('div',{staticClass:\"timeago\"},[_c('span',{staticClass:\"faint\"},[_c('Timeago',{attrs:{\"time\":_vm.notification.created_at,\"auto-update\":240}})],1)]):_c('div',{staticClass:\"timeago\"},[(_vm.notification.status)?_c('router-link',{staticClass:\"faint-link\",attrs:{\"to\":{ name: 'conversation', params: { id: _vm.notification.status.id } }}},[_c('Timeago',{attrs:{\"time\":_vm.notification.created_at,\"auto-update\":240}})],1):_vm._e()],1),_vm._v(\" \"),(_vm.needMute)?_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleMute($event)}}},[_c('i',{staticClass:\"button-icon icon-eye-off\"})]):_vm._e()]),_vm._v(\" \"),(_vm.notification.type === 'follow')?_c('div',{staticClass:\"follow-text\"},[_c('router-link',{attrs:{\"to\":_vm.userProfileLink}},[_vm._v(\"\\n @\"+_vm._s(_vm.notification.from_profile.screen_name)+\"\\n \")])],1):[_c('status',{staticClass:\"faint\",attrs:{\"compact\":true,\"statusoid\":_vm.notification.action,\"no-heading\":true}})]],2)])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"notifications\",class:{ minimal: _vm.minimalMode }},[_c('div',{class:_vm.mainClass},[(!_vm.noHeading)?_c('div',{staticClass:\"panel-heading\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('notifications.notifications'))+\"\\n \"),(_vm.unseenCount)?_c('span',{staticClass:\"badge badge-notification unseen-count\"},[_vm._v(_vm._s(_vm.unseenCount))]):_vm._e()]),_vm._v(\" \"),(_vm.error)?_c('div',{staticClass:\"loadmore-error alert error\",on:{\"click\":function($event){$event.preventDefault();}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('timeline.error_fetching'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.unseenCount)?_c('button',{staticClass:\"read-button\",on:{\"click\":function($event){$event.preventDefault();return _vm.markAsSeen($event)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('notifications.read'))+\"\\n \")]):_vm._e()]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},_vm._l((_vm.visibleNotifications),function(notification){return _c('div',{key:notification.id,staticClass:\"notification\",class:{\"unseen\": !_vm.minimalMode && !notification.seen}},[_c('div',{staticClass:\"notification-overlay\"}),_vm._v(\" \"),_c('notification',{attrs:{\"notification\":notification}})],1)}),0),_vm._v(\" \"),_c('div',{staticClass:\"panel-footer\"},[(_vm.bottomedOut)?_c('div',{staticClass:\"new-status-notification text-center panel-footer faint\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('notifications.no_more_notifications'))+\"\\n \")]):(!_vm.loading)?_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();_vm.fetchOlderNotifications()}}},[_c('div',{staticClass:\"new-status-notification text-center panel-footer\"},[_vm._v(\"\\n \"+_vm._s(_vm.minimalMode ? _vm.$t('interactions.load_older') : _vm.$t('notifications.load_older'))+\"\\n \")])]):_c('div',{staticClass:\"new-status-notification text-center panel-footer\"},[_c('i',{staticClass:\"icon-spin3 animate-spin\"})])])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.interactions\"))+\"\\n \")])]),_vm._v(\" \"),_c('tab-switcher',{ref:\"tabSwitcher\",attrs:{\"on-switch\":_vm.onModeSwitch}},[_c('span',{key:\"mentions\",attrs:{\"label\":_vm.$t('nav.mentions')}}),_vm._v(\" \"),_c('span',{key:\"likes+repeats\",attrs:{\"label\":_vm.$t('interactions.favs_repeats')}}),_vm._v(\" \"),_c('span',{key:\"follows\",attrs:{\"label\":_vm.$t('interactions.follows')}})]),_vm._v(\" \"),_c('Notifications',{ref:\"notifications\",attrs:{\"no-heading\":true,\"minimal-mode\":true,\"filter-mode\":_vm.filterMode}})],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Timeline',{attrs:{\"title\":_vm.$t('nav.dms'),\"timeline\":_vm.timeline,\"timeline-name\":'dms'}})}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"basic-user-card\"},[_c('router-link',{attrs:{\"to\":_vm.userProfileLink(_vm.user)}},[_c('UserAvatar',{staticClass:\"avatar\",attrs:{\"user\":_vm.user},nativeOn:{\"click\":function($event){$event.preventDefault();return _vm.toggleUserExpanded($event)}}})],1),_vm._v(\" \"),(_vm.userExpanded)?_c('div',{staticClass:\"basic-user-card-expanded-content\"},[_c('UserCard',{attrs:{\"user\":_vm.user,\"rounded\":true,\"bordered\":true}})],1):_c('div',{staticClass:\"basic-user-card-collapsed-content\"},[_c('div',{staticClass:\"basic-user-card-user-name\",attrs:{\"title\":_vm.user.name}},[(_vm.user.name_html)?_c('span',{staticClass:\"basic-user-card-user-name-value\",domProps:{\"innerHTML\":_vm._s(_vm.user.name_html)}}):_c('span',{staticClass:\"basic-user-card-user-name-value\"},[_vm._v(_vm._s(_vm.user.name))])]),_vm._v(\" \"),_c('div',[_c('router-link',{staticClass:\"basic-user-card-screen-name\",attrs:{\"to\":_vm.userProfileLink(_vm.user)}},[_vm._v(\"\\n @\"+_vm._s(_vm.user.screen_name)+\"\\n \")])],1),_vm._v(\" \"),_vm._t(\"default\")],2)],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('basic-user-card',{attrs:{\"user\":_vm.user}},[_c('div',{staticClass:\"follow-card-content-container\"},[(!_vm.noFollowsYou && _vm.user.follows_you)?_c('span',{staticClass:\"faint\"},[_vm._v(\"\\n \"+_vm._s(_vm.isMe ? _vm.$t('user_card.its_you') : _vm.$t('user_card.follows_you'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(!_vm.loggedIn)?[(!_vm.user.following)?_c('div',{staticClass:\"follow-card-follow-button\"},[_c('RemoteFollow',{attrs:{\"user\":_vm.user}})],1):_vm._e()]:[_c('FollowButton',{staticClass:\"follow-card-follow-button\",attrs:{\"user\":_vm.user,\"label-following\":_vm.$t('user_card.follow_unfollow')}})]],2)])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"list\"},[_vm._l((_vm.items),function(item){return _c('div',{key:_vm.getKey(item),staticClass:\"list-item\"},[_vm._t(\"item\",null,{item:item})],2)}),_vm._v(\" \"),(_vm.items.length === 0 && !!_vm.$slots.empty)?_c('div',{staticClass:\"list-empty-content faint\"},[_vm._t(\"empty\")],2):_vm._e()],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.user)?_c('div',{staticClass:\"user-profile panel panel-default\"},[_c('UserCard',{attrs:{\"user\":_vm.user,\"switcher\":true,\"selected\":_vm.timeline.viewing,\"allow-zooming-avatar\":true,\"rounded\":\"top\"}}),_vm._v(\" \"),_c('tab-switcher',{attrs:{\"active-tab\":_vm.tab,\"render-only-focused\":true,\"on-switch\":_vm.onTabSwitch}},[_c('Timeline',{key:\"statuses\",attrs:{\"label\":_vm.$t('user_card.statuses'),\"count\":_vm.user.statuses_count,\"embedded\":true,\"title\":_vm.$t('user_profile.timeline_title'),\"timeline\":_vm.timeline,\"timeline-name\":\"user\",\"user-id\":_vm.userId,\"pinned-status-ids\":_vm.user.pinnedStatusIds,\"in-profile\":true}}),_vm._v(\" \"),(_vm.followsTabVisible)?_c('div',{key:\"followees\",attrs:{\"label\":_vm.$t('user_card.followees'),\"disabled\":!_vm.user.friends_count}},[_c('FriendList',{attrs:{\"user-id\":_vm.userId},scopedSlots:_vm._u([{key:\"item\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('FollowCard',{attrs:{\"user\":item}})]}}])})],1):_vm._e(),_vm._v(\" \"),(_vm.followersTabVisible)?_c('div',{key:\"followers\",attrs:{\"label\":_vm.$t('user_card.followers'),\"disabled\":!_vm.user.followers_count}},[_c('FollowerList',{attrs:{\"user-id\":_vm.userId},scopedSlots:_vm._u([{key:\"item\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('FollowCard',{attrs:{\"user\":item,\"no-follows-you\":_vm.isUs}})]}}])})],1):_vm._e(),_vm._v(\" \"),_c('Timeline',{key:\"media\",attrs:{\"label\":_vm.$t('user_card.media'),\"disabled\":!_vm.media.visibleStatuses.length,\"embedded\":true,\"title\":_vm.$t('user_card.media'),\"timeline-name\":\"media\",\"timeline\":_vm.media,\"user-id\":_vm.userId,\"in-profile\":true}}),_vm._v(\" \"),(_vm.isUs)?_c('Timeline',{key:\"favorites\",attrs:{\"label\":_vm.$t('user_card.favorites'),\"disabled\":!_vm.favorites.visibleStatuses.length,\"embedded\":true,\"title\":_vm.$t('user_card.favorites'),\"timeline-name\":\"favorites\",\"timeline\":_vm.favorites,\"in-profile\":true}}):_vm._e()],1)],1):_c('div',{staticClass:\"panel user-profile-placeholder\"},[_c('div',{staticClass:\"panel-heading\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.profile_tab'))+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[(_vm.error)?_c('span',[_vm._v(_vm._s(_vm.error))]):_c('i',{staticClass:\"icon-spin3 animate-spin\"})])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('nav.search'))+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"search-input-container\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.searchTerm),expression:\"searchTerm\"}],ref:\"searchInput\",staticClass:\"search-input\",attrs:{\"placeholder\":_vm.$t('nav.search')},domProps:{\"value\":(_vm.searchTerm)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }_vm.newQuery(_vm.searchTerm)},\"input\":function($event){if($event.target.composing){ return; }_vm.searchTerm=$event.target.value}}}),_vm._v(\" \"),_c('button',{staticClass:\"btn search-button\",on:{\"click\":function($event){_vm.newQuery(_vm.searchTerm)}}},[_c('i',{staticClass:\"icon-search\"})])]),_vm._v(\" \"),(_vm.loading)?_c('div',{staticClass:\"text-center loading-icon\"},[_c('i',{staticClass:\"icon-spin3 animate-spin\"})]):(_vm.loaded)?_c('div',[_c('div',{staticClass:\"search-nav-heading\"},[_c('tab-switcher',{ref:\"tabSwitcher\",attrs:{\"on-switch\":_vm.onResultTabSwitch,\"active-tab\":_vm.currenResultTab}},[_c('span',{key:\"statuses\",attrs:{\"label\":_vm.$t('user_card.statuses') + _vm.resultCount('visibleStatuses')}}),_vm._v(\" \"),_c('span',{key:\"people\",attrs:{\"label\":_vm.$t('search.people') + _vm.resultCount('users')}}),_vm._v(\" \"),_c('span',{key:\"hashtags\",attrs:{\"label\":_vm.$t('search.hashtags') + _vm.resultCount('hashtags')}})])],1)]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[(_vm.currenResultTab === 'statuses')?_c('div',[(_vm.visibleStatuses.length === 0 && !_vm.loading && _vm.loaded)?_c('div',{staticClass:\"search-result-heading\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('search.no_results')))])]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.visibleStatuses),function(status){return _c('Status',{key:status.id,staticClass:\"search-result\",attrs:{\"collapsable\":false,\"expandable\":false,\"compact\":false,\"statusoid\":status,\"no-heading\":false}})})],2):(_vm.currenResultTab === 'people')?_c('div',[(_vm.users.length === 0 && !_vm.loading && _vm.loaded)?_c('div',{staticClass:\"search-result-heading\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('search.no_results')))])]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.users),function(user){return _c('FollowCard',{key:user.id,staticClass:\"list-item search-result\",attrs:{\"user\":user}})})],2):(_vm.currenResultTab === 'hashtags')?_c('div',[(_vm.hashtags.length === 0 && !_vm.loading && _vm.loaded)?_c('div',{staticClass:\"search-result-heading\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('search.no_results')))])]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.hashtags),function(hashtag){return _c('div',{key:hashtag.url,staticClass:\"status trend search-result\"},[_c('div',{staticClass:\"hashtag\"},[_c('router-link',{attrs:{\"to\":{ name: 'tag-timeline', params: { tag: hashtag.name } }}},[_vm._v(\"\\n #\"+_vm._s(hashtag.name)+\"\\n \")]),_vm._v(\" \"),(_vm.lastHistoryRecord(hashtag))?_c('div',[(_vm.lastHistoryRecord(hashtag).accounts == 1)?_c('span',[_vm._v(\"\\n \"+_vm._s(_vm.$t('search.person_talking', { count: _vm.lastHistoryRecord(hashtag).accounts }))+\"\\n \")]):_c('span',[_vm._v(\"\\n \"+_vm._s(_vm.$t('search.people_talking', { count: _vm.lastHistoryRecord(hashtag).accounts }))+\"\\n \")])]):_vm._e()],1),_vm._v(\" \"),(_vm.lastHistoryRecord(hashtag))?_c('div',{staticClass:\"count\"},[_vm._v(\"\\n \"+_vm._s(_vm.lastHistoryRecord(hashtag).uses)+\"\\n \")]):_vm._e()])})],2):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"search-result-footer text-center panel-footer faint\"})])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"color-control style-control\",class:{ disabled: !_vm.present || _vm.disabled }},[_c('label',{staticClass:\"label\",attrs:{\"for\":_vm.name}},[_vm._v(\"\\n \"+_vm._s(_vm.label)+\"\\n \")]),_vm._v(\" \"),(typeof _vm.fallback !== 'undefined')?_c('input',{staticClass:\"opt exlcude-disabled\",attrs:{\"id\":_vm.name + '-o',\"type\":\"checkbox\"},domProps:{\"checked\":_vm.present},on:{\"input\":function($event){_vm.$emit('input', typeof _vm.value === 'undefined' ? _vm.fallback : undefined)}}}):_vm._e(),_vm._v(\" \"),(typeof _vm.fallback !== 'undefined')?_c('label',{staticClass:\"opt-l\",attrs:{\"for\":_vm.name + '-o'}}):_vm._e(),_vm._v(\" \"),_c('input',{staticClass:\"color-input\",attrs:{\"id\":_vm.name,\"type\":\"color\",\"disabled\":!_vm.present || _vm.disabled},domProps:{\"value\":_vm.value || _vm.fallback},on:{\"input\":function($event){_vm.$emit('input', $event.target.value)}}}),_vm._v(\" \"),_c('input',{staticClass:\"text-input\",attrs:{\"id\":_vm.name + '-t',\"type\":\"text\",\"disabled\":!_vm.present || _vm.disabled},domProps:{\"value\":_vm.value || _vm.fallback},on:{\"input\":function($event){_vm.$emit('input', $event.target.value)}}})])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"range-control style-control\",class:{ disabled: !_vm.present || _vm.disabled }},[_c('label',{staticClass:\"label\",attrs:{\"for\":_vm.name}},[_vm._v(\"\\n \"+_vm._s(_vm.label)+\"\\n \")]),_vm._v(\" \"),(typeof _vm.fallback !== 'undefined')?_c('input',{staticClass:\"opt exclude-disabled\",attrs:{\"id\":_vm.name + '-o',\"type\":\"checkbox\"},domProps:{\"checked\":_vm.present},on:{\"input\":function($event){_vm.$emit('input', !_vm.present ? _vm.fallback : undefined)}}}):_vm._e(),_vm._v(\" \"),(typeof _vm.fallback !== 'undefined')?_c('label',{staticClass:\"opt-l\",attrs:{\"for\":_vm.name + '-o'}}):_vm._e(),_vm._v(\" \"),_c('input',{staticClass:\"input-number\",attrs:{\"id\":_vm.name,\"type\":\"range\",\"disabled\":!_vm.present || _vm.disabled,\"max\":_vm.max || _vm.hardMax || 100,\"min\":_vm.min || _vm.hardMin || 0,\"step\":_vm.step || 1},domProps:{\"value\":_vm.value || _vm.fallback},on:{\"input\":function($event){_vm.$emit('input', $event.target.value)}}}),_vm._v(\" \"),_c('input',{staticClass:\"input-number\",attrs:{\"id\":_vm.name,\"type\":\"number\",\"disabled\":!_vm.present || _vm.disabled,\"max\":_vm.hardMax,\"min\":_vm.hardMin,\"step\":_vm.step || 1},domProps:{\"value\":_vm.value || _vm.fallback},on:{\"input\":function($event){_vm.$emit('input', $event.target.value)}}})])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"opacity-control style-control\",class:{ disabled: !_vm.present || _vm.disabled }},[_c('label',{staticClass:\"label\",attrs:{\"for\":_vm.name}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.common.opacity'))+\"\\n \")]),_vm._v(\" \"),(typeof _vm.fallback !== 'undefined')?_c('input',{staticClass:\"opt exclude-disabled\",attrs:{\"id\":_vm.name + '-o',\"type\":\"checkbox\"},domProps:{\"checked\":_vm.present},on:{\"input\":function($event){_vm.$emit('input', !_vm.present ? _vm.fallback : undefined)}}}):_vm._e(),_vm._v(\" \"),(typeof _vm.fallback !== 'undefined')?_c('label',{staticClass:\"opt-l\",attrs:{\"for\":_vm.name + '-o'}}):_vm._e(),_vm._v(\" \"),_c('input',{staticClass:\"input-number\",attrs:{\"id\":_vm.name,\"type\":\"number\",\"disabled\":!_vm.present || _vm.disabled,\"max\":\"1\",\"min\":\"0\",\"step\":\".05\"},domProps:{\"value\":_vm.value || _vm.fallback},on:{\"input\":function($event){_vm.$emit('input', $event.target.value)}}})])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"shadow-control\",class:{ disabled: !_vm.present }},[_c('div',{staticClass:\"shadow-preview-container\"},[_c('div',{staticClass:\"y-shift-control\",attrs:{\"disabled\":!_vm.present}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected.y),expression:\"selected.y\"}],staticClass:\"input-number\",attrs:{\"disabled\":!_vm.present,\"type\":\"number\"},domProps:{\"value\":(_vm.selected.y)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.selected, \"y\", $event.target.value)}}}),_vm._v(\" \"),_c('div',{staticClass:\"wrap\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected.y),expression:\"selected.y\"}],staticClass:\"input-range\",attrs:{\"disabled\":!_vm.present,\"type\":\"range\",\"max\":\"20\",\"min\":\"-20\"},domProps:{\"value\":(_vm.selected.y)},on:{\"__r\":function($event){_vm.$set(_vm.selected, \"y\", $event.target.value)}}})])]),_vm._v(\" \"),_c('div',{staticClass:\"preview-window\"},[_c('div',{staticClass:\"preview-block\",style:(_vm.style)})]),_vm._v(\" \"),_c('div',{staticClass:\"x-shift-control\",attrs:{\"disabled\":!_vm.present}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected.x),expression:\"selected.x\"}],staticClass:\"input-number\",attrs:{\"disabled\":!_vm.present,\"type\":\"number\"},domProps:{\"value\":(_vm.selected.x)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.selected, \"x\", $event.target.value)}}}),_vm._v(\" \"),_c('div',{staticClass:\"wrap\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected.x),expression:\"selected.x\"}],staticClass:\"input-range\",attrs:{\"disabled\":!_vm.present,\"type\":\"range\",\"max\":\"20\",\"min\":\"-20\"},domProps:{\"value\":(_vm.selected.x)},on:{\"__r\":function($event){_vm.$set(_vm.selected, \"x\", $event.target.value)}}})])])]),_vm._v(\" \"),_c('div',{staticClass:\"shadow-tweak\"},[_c('div',{staticClass:\"id-control style-control\",attrs:{\"disabled\":_vm.usingFallback}},[_c('label',{staticClass:\"select\",attrs:{\"for\":\"shadow-switcher\",\"disabled\":!_vm.ready || _vm.usingFallback}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedId),expression:\"selectedId\"}],staticClass:\"shadow-switcher\",attrs:{\"id\":\"shadow-switcher\",\"disabled\":!_vm.ready || _vm.usingFallback},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.selectedId=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.cValue),function(shadow,index){return _c('option',{key:index,domProps:{\"value\":index}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.shadows.shadow_id', { value: index }))+\"\\n \")])}),0),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":!_vm.ready || !_vm.present},on:{\"click\":_vm.del}},[_c('i',{staticClass:\"icon-cancel\"})]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":!_vm.moveUpValid},on:{\"click\":_vm.moveUp}},[_c('i',{staticClass:\"icon-up-open\"})]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":!_vm.moveDnValid},on:{\"click\":_vm.moveDn}},[_c('i',{staticClass:\"icon-down-open\"})]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.usingFallback},on:{\"click\":_vm.add}},[_c('i',{staticClass:\"icon-plus\"})])]),_vm._v(\" \"),_c('div',{staticClass:\"inset-control style-control\",attrs:{\"disabled\":!_vm.present}},[_c('label',{staticClass:\"label\",attrs:{\"for\":\"inset\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.shadows.inset'))+\"\\n \")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected.inset),expression:\"selected.inset\"}],staticClass:\"input-inset\",attrs:{\"id\":\"inset\",\"disabled\":!_vm.present,\"name\":\"inset\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.selected.inset)?_vm._i(_vm.selected.inset,null)>-1:(_vm.selected.inset)},on:{\"change\":function($event){var $$a=_vm.selected.inset,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.selected, \"inset\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.selected, \"inset\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.selected, \"inset\", $$c)}}}}),_vm._v(\" \"),_c('label',{staticClass:\"checkbox-label\",attrs:{\"for\":\"inset\"}})]),_vm._v(\" \"),_c('div',{staticClass:\"blur-control style-control\",attrs:{\"disabled\":!_vm.present}},[_c('label',{staticClass:\"label\",attrs:{\"for\":\"spread\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.shadows.blur'))+\"\\n \")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected.blur),expression:\"selected.blur\"}],staticClass:\"input-range\",attrs:{\"id\":\"blur\",\"disabled\":!_vm.present,\"name\":\"blur\",\"type\":\"range\",\"max\":\"20\",\"min\":\"0\"},domProps:{\"value\":(_vm.selected.blur)},on:{\"__r\":function($event){_vm.$set(_vm.selected, \"blur\", $event.target.value)}}}),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected.blur),expression:\"selected.blur\"}],staticClass:\"input-number\",attrs:{\"disabled\":!_vm.present,\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.selected.blur)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.selected, \"blur\", $event.target.value)}}})]),_vm._v(\" \"),_c('div',{staticClass:\"spread-control style-control\",attrs:{\"disabled\":!_vm.present}},[_c('label',{staticClass:\"label\",attrs:{\"for\":\"spread\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.shadows.spread'))+\"\\n \")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected.spread),expression:\"selected.spread\"}],staticClass:\"input-range\",attrs:{\"id\":\"spread\",\"disabled\":!_vm.present,\"name\":\"spread\",\"type\":\"range\",\"max\":\"20\",\"min\":\"-20\"},domProps:{\"value\":(_vm.selected.spread)},on:{\"__r\":function($event){_vm.$set(_vm.selected, \"spread\", $event.target.value)}}}),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected.spread),expression:\"selected.spread\"}],staticClass:\"input-number\",attrs:{\"disabled\":!_vm.present,\"type\":\"number\"},domProps:{\"value\":(_vm.selected.spread)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.selected, \"spread\", $event.target.value)}}})]),_vm._v(\" \"),_c('ColorInput',{attrs:{\"disabled\":!_vm.present,\"label\":_vm.$t('settings.style.common.color'),\"name\":\"shadow\"},model:{value:(_vm.selected.color),callback:function ($$v) {_vm.$set(_vm.selected, \"color\", $$v)},expression:\"selected.color\"}}),_vm._v(\" \"),_c('OpacityInput',{attrs:{\"disabled\":!_vm.present},model:{value:(_vm.selected.alpha),callback:function ($$v) {_vm.$set(_vm.selected, \"alpha\", $$v)},expression:\"selected.alpha\"}}),_vm._v(\" \"),_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.shadows.hint'))+\"\\n \")])],1)])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"font-control style-control\",class:{ custom: _vm.isCustom }},[_c('label',{staticClass:\"label\",attrs:{\"for\":_vm.preset === 'custom' ? _vm.name : _vm.name + '-font-switcher'}},[_vm._v(\"\\n \"+_vm._s(_vm.label)+\"\\n \")]),_vm._v(\" \"),(typeof _vm.fallback !== 'undefined')?_c('input',{staticClass:\"opt exlcude-disabled\",attrs:{\"id\":_vm.name + '-o',\"type\":\"checkbox\"},domProps:{\"checked\":_vm.present},on:{\"input\":function($event){_vm.$emit('input', typeof _vm.value === 'undefined' ? _vm.fallback : undefined)}}}):_vm._e(),_vm._v(\" \"),(typeof _vm.fallback !== 'undefined')?_c('label',{staticClass:\"opt-l\",attrs:{\"for\":_vm.name + '-o'}}):_vm._e(),_vm._v(\" \"),_c('label',{staticClass:\"select\",attrs:{\"for\":_vm.name + '-font-switcher',\"disabled\":!_vm.present}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.preset),expression:\"preset\"}],staticClass:\"font-switcher\",attrs:{\"id\":_vm.name + '-font-switcher',\"disabled\":!_vm.present},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.preset=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.availableOptions),function(option){return _c('option',{key:option,domProps:{\"value\":option}},[_vm._v(\"\\n \"+_vm._s(option === 'custom' ? _vm.$t('settings.style.fonts.custom') : option)+\"\\n \")])}),0),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})]),_vm._v(\" \"),(_vm.isCustom)?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.family),expression:\"family\"}],staticClass:\"custom-font\",attrs:{\"id\":_vm.name,\"type\":\"text\"},domProps:{\"value\":(_vm.family)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.family=$event.target.value}}}):_vm._e()])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.contrast)?_c('span',{staticClass:\"contrast-ratio\"},[_c('span',{staticClass:\"rating\",attrs:{\"title\":_vm.hint}},[(_vm.contrast.aaa)?_c('span',[_c('i',{staticClass:\"icon-thumbs-up-alt\"})]):_vm._e(),_vm._v(\" \"),(!_vm.contrast.aaa && _vm.contrast.aa)?_c('span',[_c('i',{staticClass:\"icon-adjust\"})]):_vm._e(),_vm._v(\" \"),(!_vm.contrast.aaa && !_vm.contrast.aa)?_c('span',[_c('i',{staticClass:\"icon-attention\"})]):_vm._e()]),_vm._v(\" \"),(_vm.contrast && _vm.large)?_c('span',{staticClass:\"rating\",attrs:{\"title\":_vm.hint_18pt}},[(_vm.contrast.laaa)?_c('span',[_c('i',{staticClass:\"icon-thumbs-up-alt\"})]):_vm._e(),_vm._v(\" \"),(!_vm.contrast.laaa && _vm.contrast.laa)?_c('span',[_c('i',{staticClass:\"icon-adjust\"})]):_vm._e(),_vm._v(\" \"),(!_vm.contrast.laaa && !_vm.contrast.laa)?_c('span',[_c('i',{staticClass:\"icon-attention\"})]):_vm._e()]):_vm._e()]):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"import-export-container\"},[_vm._t(\"before\"),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.exportData}},[_vm._v(\"\\n \"+_vm._s(_vm.exportLabel)+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.importData}},[_vm._v(\"\\n \"+_vm._s(_vm.importLabel)+\"\\n \")]),_vm._v(\" \"),_vm._t(\"afterButtons\"),_vm._v(\" \"),(_vm.importFailed)?_c('p',{staticClass:\"alert error\"},[_vm._v(\"\\n \"+_vm._s(_vm.importFailedText)+\"\\n \")]):_vm._e(),_vm._v(\" \"),_vm._t(\"afterError\")],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"style-switcher\"},[_c('div',{staticClass:\"presets-container\"},[_c('div',{staticClass:\"save-load\"},[_c('export-import',{attrs:{\"export-object\":_vm.exportedTheme,\"export-label\":_vm.$t(\"settings.export_theme\"),\"import-label\":_vm.$t(\"settings.import_theme\"),\"import-failed-text\":_vm.$t(\"settings.invalid_theme_imported\"),\"on-import\":_vm.onImport,\"validator\":_vm.importValidator}},[_c('template',{slot:\"before\"},[_c('div',{staticClass:\"presets\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.presets'))+\"\\n \"),_c('label',{staticClass:\"select\",attrs:{\"for\":\"preset-switcher\"}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selected),expression:\"selected\"}],staticClass:\"preset-switcher\",attrs:{\"id\":\"preset-switcher\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.selected=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.availableStyles),function(style){return _c('option',{key:style.name,style:({\n backgroundColor: style[1] || style.theme.colors.bg,\n color: style[3] || style.theme.colors.text\n }),domProps:{\"value\":style}},[_vm._v(\"\\n \"+_vm._s(style[0] || style.name)+\"\\n \")])}),0),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])])])],2)],1),_vm._v(\" \"),_c('div',{staticClass:\"save-load-options\"},[_c('span',{staticClass:\"keep-option\"},[_c('Checkbox',{model:{value:(_vm.keepColor),callback:function ($$v) {_vm.keepColor=$$v},expression:\"keepColor\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.keep_color'))+\"\\n \")])],1),_vm._v(\" \"),_c('span',{staticClass:\"keep-option\"},[_c('Checkbox',{model:{value:(_vm.keepShadows),callback:function ($$v) {_vm.keepShadows=$$v},expression:\"keepShadows\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.keep_shadows'))+\"\\n \")])],1),_vm._v(\" \"),_c('span',{staticClass:\"keep-option\"},[_c('Checkbox',{model:{value:(_vm.keepOpacity),callback:function ($$v) {_vm.keepOpacity=$$v},expression:\"keepOpacity\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.keep_opacity'))+\"\\n \")])],1),_vm._v(\" \"),_c('span',{staticClass:\"keep-option\"},[_c('Checkbox',{model:{value:(_vm.keepRoundness),callback:function ($$v) {_vm.keepRoundness=$$v},expression:\"keepRoundness\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.keep_roundness'))+\"\\n \")])],1),_vm._v(\" \"),_c('span',{staticClass:\"keep-option\"},[_c('Checkbox',{model:{value:(_vm.keepFonts),callback:function ($$v) {_vm.keepFonts=$$v},expression:\"keepFonts\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.keep_fonts'))+\"\\n \")])],1),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.style.switcher.save_load_hint')))])])]),_vm._v(\" \"),_c('div',{staticClass:\"preview-container\"},[_c('preview',{style:(_vm.previewRules)})],1),_vm._v(\" \"),_c('keep-alive',[_c('tab-switcher',{key:\"style-tweak\"},[_c('div',{staticClass:\"color-container\",attrs:{\"label\":_vm.$t('settings.style.common_colors._tab_label')}},[_c('div',{staticClass:\"tab-header\"},[_c('p',[_vm._v(_vm._s(_vm.$t('settings.theme_help')))]),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.clearOpacity}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.clear_opacity'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.clearV1}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.clear_all'))+\"\\n \")])]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.theme_help_v2_1')))]),_vm._v(\" \"),_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.common_colors.main')))]),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('ColorInput',{attrs:{\"name\":\"bgColor\",\"label\":_vm.$t('settings.background')},model:{value:(_vm.bgColorLocal),callback:function ($$v) {_vm.bgColorLocal=$$v},expression:\"bgColorLocal\"}}),_vm._v(\" \"),_c('OpacityInput',{attrs:{\"name\":\"bgOpacity\",\"fallback\":_vm.previewTheme.opacity.bg || 1},model:{value:(_vm.bgOpacityLocal),callback:function ($$v) {_vm.bgOpacityLocal=$$v},expression:\"bgOpacityLocal\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"textColor\",\"label\":_vm.$t('settings.text')},model:{value:(_vm.textColorLocal),callback:function ($$v) {_vm.textColorLocal=$$v},expression:\"textColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.bgText}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"linkColor\",\"label\":_vm.$t('settings.links')},model:{value:(_vm.linkColorLocal),callback:function ($$v) {_vm.linkColorLocal=$$v},expression:\"linkColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.bgLink}})],1),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('ColorInput',{attrs:{\"name\":\"fgColor\",\"label\":_vm.$t('settings.foreground')},model:{value:(_vm.fgColorLocal),callback:function ($$v) {_vm.fgColorLocal=$$v},expression:\"fgColorLocal\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"fgTextColor\",\"label\":_vm.$t('settings.text'),\"fallback\":_vm.previewTheme.colors.fgText},model:{value:(_vm.fgTextColorLocal),callback:function ($$v) {_vm.fgTextColorLocal=$$v},expression:\"fgTextColorLocal\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"fgLinkColor\",\"label\":_vm.$t('settings.links'),\"fallback\":_vm.previewTheme.colors.fgLink},model:{value:(_vm.fgLinkColorLocal),callback:function ($$v) {_vm.fgLinkColorLocal=$$v},expression:\"fgLinkColorLocal\"}}),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.style.common_colors.foreground_hint')))])],1),_vm._v(\" \"),_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.common_colors.rgbo')))]),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('ColorInput',{attrs:{\"name\":\"cRedColor\",\"label\":_vm.$t('settings.cRed')},model:{value:(_vm.cRedColorLocal),callback:function ($$v) {_vm.cRedColorLocal=$$v},expression:\"cRedColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.bgRed}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"cBlueColor\",\"label\":_vm.$t('settings.cBlue')},model:{value:(_vm.cBlueColorLocal),callback:function ($$v) {_vm.cBlueColorLocal=$$v},expression:\"cBlueColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.bgBlue}})],1),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('ColorInput',{attrs:{\"name\":\"cGreenColor\",\"label\":_vm.$t('settings.cGreen')},model:{value:(_vm.cGreenColorLocal),callback:function ($$v) {_vm.cGreenColorLocal=$$v},expression:\"cGreenColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.bgGreen}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"cOrangeColor\",\"label\":_vm.$t('settings.cOrange')},model:{value:(_vm.cOrangeColorLocal),callback:function ($$v) {_vm.cOrangeColorLocal=$$v},expression:\"cOrangeColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.bgOrange}})],1),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.theme_help_v2_2')))])]),_vm._v(\" \"),_c('div',{staticClass:\"color-container\",attrs:{\"label\":_vm.$t('settings.style.advanced_colors._tab_label')}},[_c('div',{staticClass:\"tab-header\"},[_c('p',[_vm._v(_vm._s(_vm.$t('settings.theme_help')))]),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.clearOpacity}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.clear_opacity'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.clearV1}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.clear_all'))+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.advanced_colors.alert')))]),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"alertError\",\"label\":_vm.$t('settings.style.advanced_colors.alert_error'),\"fallback\":_vm.previewTheme.colors.alertError},model:{value:(_vm.alertErrorColorLocal),callback:function ($$v) {_vm.alertErrorColorLocal=$$v},expression:\"alertErrorColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.alertError}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"alertWarning\",\"label\":_vm.$t('settings.style.advanced_colors.alert_warning'),\"fallback\":_vm.previewTheme.colors.alertWarning},model:{value:(_vm.alertWarningColorLocal),callback:function ($$v) {_vm.alertWarningColorLocal=$$v},expression:\"alertWarningColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.alertWarning}})],1),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.advanced_colors.badge')))]),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"badgeNotification\",\"label\":_vm.$t('settings.style.advanced_colors.badge_notification'),\"fallback\":_vm.previewTheme.colors.badgeNotification},model:{value:(_vm.badgeNotificationColorLocal),callback:function ($$v) {_vm.badgeNotificationColorLocal=$$v},expression:\"badgeNotificationColorLocal\"}})],1),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.advanced_colors.panel_header')))]),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"panelColor\",\"fallback\":_vm.fgColorLocal,\"label\":_vm.$t('settings.background')},model:{value:(_vm.panelColorLocal),callback:function ($$v) {_vm.panelColorLocal=$$v},expression:\"panelColorLocal\"}}),_vm._v(\" \"),_c('OpacityInput',{attrs:{\"name\":\"panelOpacity\",\"fallback\":_vm.previewTheme.opacity.panel || 1},model:{value:(_vm.panelOpacityLocal),callback:function ($$v) {_vm.panelOpacityLocal=$$v},expression:\"panelOpacityLocal\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"panelTextColor\",\"fallback\":_vm.previewTheme.colors.panelText,\"label\":_vm.$t('settings.text')},model:{value:(_vm.panelTextColorLocal),callback:function ($$v) {_vm.panelTextColorLocal=$$v},expression:\"panelTextColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.panelText,\"large\":\"1\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"panelLinkColor\",\"fallback\":_vm.previewTheme.colors.panelLink,\"label\":_vm.$t('settings.links')},model:{value:(_vm.panelLinkColorLocal),callback:function ($$v) {_vm.panelLinkColorLocal=$$v},expression:\"panelLinkColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.panelLink,\"large\":\"1\"}})],1),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.advanced_colors.top_bar')))]),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"topBarColor\",\"fallback\":_vm.fgColorLocal,\"label\":_vm.$t('settings.background')},model:{value:(_vm.topBarColorLocal),callback:function ($$v) {_vm.topBarColorLocal=$$v},expression:\"topBarColorLocal\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"topBarTextColor\",\"fallback\":_vm.previewTheme.colors.topBarText,\"label\":_vm.$t('settings.text')},model:{value:(_vm.topBarTextColorLocal),callback:function ($$v) {_vm.topBarTextColorLocal=$$v},expression:\"topBarTextColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.topBarText}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"topBarLinkColor\",\"fallback\":_vm.previewTheme.colors.topBarLink,\"label\":_vm.$t('settings.links')},model:{value:(_vm.topBarLinkColorLocal),callback:function ($$v) {_vm.topBarLinkColorLocal=$$v},expression:\"topBarLinkColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.topBarLink}})],1),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.advanced_colors.inputs')))]),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"inputColor\",\"fallback\":_vm.fgColorLocal,\"label\":_vm.$t('settings.background')},model:{value:(_vm.inputColorLocal),callback:function ($$v) {_vm.inputColorLocal=$$v},expression:\"inputColorLocal\"}}),_vm._v(\" \"),_c('OpacityInput',{attrs:{\"name\":\"inputOpacity\",\"fallback\":_vm.previewTheme.opacity.input || 1},model:{value:(_vm.inputOpacityLocal),callback:function ($$v) {_vm.inputOpacityLocal=$$v},expression:\"inputOpacityLocal\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"inputTextColor\",\"fallback\":_vm.previewTheme.colors.inputText,\"label\":_vm.$t('settings.text')},model:{value:(_vm.inputTextColorLocal),callback:function ($$v) {_vm.inputTextColorLocal=$$v},expression:\"inputTextColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.inputText}})],1),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.advanced_colors.buttons')))]),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"btnColor\",\"fallback\":_vm.fgColorLocal,\"label\":_vm.$t('settings.background')},model:{value:(_vm.btnColorLocal),callback:function ($$v) {_vm.btnColorLocal=$$v},expression:\"btnColorLocal\"}}),_vm._v(\" \"),_c('OpacityInput',{attrs:{\"name\":\"btnOpacity\",\"fallback\":_vm.previewTheme.opacity.btn || 1},model:{value:(_vm.btnOpacityLocal),callback:function ($$v) {_vm.btnOpacityLocal=$$v},expression:\"btnOpacityLocal\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"btnTextColor\",\"fallback\":_vm.previewTheme.colors.btnText,\"label\":_vm.$t('settings.text')},model:{value:(_vm.btnTextColorLocal),callback:function ($$v) {_vm.btnTextColorLocal=$$v},expression:\"btnTextColorLocal\"}}),_vm._v(\" \"),_c('ContrastRatio',{attrs:{\"contrast\":_vm.previewContrast.btnText}})],1),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.advanced_colors.borders')))]),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"borderColor\",\"fallback\":_vm.previewTheme.colors.border,\"label\":_vm.$t('settings.style.common.color')},model:{value:(_vm.borderColorLocal),callback:function ($$v) {_vm.borderColorLocal=$$v},expression:\"borderColorLocal\"}}),_vm._v(\" \"),_c('OpacityInput',{attrs:{\"name\":\"borderOpacity\",\"fallback\":_vm.previewTheme.opacity.border || 1},model:{value:(_vm.borderOpacityLocal),callback:function ($$v) {_vm.borderOpacityLocal=$$v},expression:\"borderOpacityLocal\"}})],1),_vm._v(\" \"),_c('div',{staticClass:\"color-item\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('settings.style.advanced_colors.faint_text')))]),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"faintColor\",\"fallback\":_vm.previewTheme.colors.faint || 1,\"label\":_vm.$t('settings.text')},model:{value:(_vm.faintColorLocal),callback:function ($$v) {_vm.faintColorLocal=$$v},expression:\"faintColorLocal\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"faintLinkColor\",\"fallback\":_vm.previewTheme.colors.faintLink,\"label\":_vm.$t('settings.links')},model:{value:(_vm.faintLinkColorLocal),callback:function ($$v) {_vm.faintLinkColorLocal=$$v},expression:\"faintLinkColorLocal\"}}),_vm._v(\" \"),_c('ColorInput',{attrs:{\"name\":\"panelFaintColor\",\"fallback\":_vm.previewTheme.colors.panelFaint,\"label\":_vm.$t('settings.style.advanced_colors.panel_header')},model:{value:(_vm.panelFaintColorLocal),callback:function ($$v) {_vm.panelFaintColorLocal=$$v},expression:\"panelFaintColorLocal\"}}),_vm._v(\" \"),_c('OpacityInput',{attrs:{\"name\":\"faintOpacity\",\"fallback\":_vm.previewTheme.opacity.faint || 0.5},model:{value:(_vm.faintOpacityLocal),callback:function ($$v) {_vm.faintOpacityLocal=$$v},expression:\"faintOpacityLocal\"}})],1)]),_vm._v(\" \"),_c('div',{staticClass:\"radius-container\",attrs:{\"label\":_vm.$t('settings.style.radii._tab_label')}},[_c('div',{staticClass:\"tab-header\"},[_c('p',[_vm._v(_vm._s(_vm.$t('settings.radii_help')))]),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.clearRoundness}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.clear_all'))+\"\\n \")])]),_vm._v(\" \"),_c('RangeInput',{attrs:{\"name\":\"btnRadius\",\"label\":_vm.$t('settings.btnRadius'),\"fallback\":_vm.previewTheme.radii.btn,\"max\":\"16\",\"hard-min\":\"0\"},model:{value:(_vm.btnRadiusLocal),callback:function ($$v) {_vm.btnRadiusLocal=$$v},expression:\"btnRadiusLocal\"}}),_vm._v(\" \"),_c('RangeInput',{attrs:{\"name\":\"inputRadius\",\"label\":_vm.$t('settings.inputRadius'),\"fallback\":_vm.previewTheme.radii.input,\"max\":\"9\",\"hard-min\":\"0\"},model:{value:(_vm.inputRadiusLocal),callback:function ($$v) {_vm.inputRadiusLocal=$$v},expression:\"inputRadiusLocal\"}}),_vm._v(\" \"),_c('RangeInput',{attrs:{\"name\":\"checkboxRadius\",\"label\":_vm.$t('settings.checkboxRadius'),\"fallback\":_vm.previewTheme.radii.checkbox,\"max\":\"16\",\"hard-min\":\"0\"},model:{value:(_vm.checkboxRadiusLocal),callback:function ($$v) {_vm.checkboxRadiusLocal=$$v},expression:\"checkboxRadiusLocal\"}}),_vm._v(\" \"),_c('RangeInput',{attrs:{\"name\":\"panelRadius\",\"label\":_vm.$t('settings.panelRadius'),\"fallback\":_vm.previewTheme.radii.panel,\"max\":\"50\",\"hard-min\":\"0\"},model:{value:(_vm.panelRadiusLocal),callback:function ($$v) {_vm.panelRadiusLocal=$$v},expression:\"panelRadiusLocal\"}}),_vm._v(\" \"),_c('RangeInput',{attrs:{\"name\":\"avatarRadius\",\"label\":_vm.$t('settings.avatarRadius'),\"fallback\":_vm.previewTheme.radii.avatar,\"max\":\"28\",\"hard-min\":\"0\"},model:{value:(_vm.avatarRadiusLocal),callback:function ($$v) {_vm.avatarRadiusLocal=$$v},expression:\"avatarRadiusLocal\"}}),_vm._v(\" \"),_c('RangeInput',{attrs:{\"name\":\"avatarAltRadius\",\"label\":_vm.$t('settings.avatarAltRadius'),\"fallback\":_vm.previewTheme.radii.avatarAlt,\"max\":\"28\",\"hard-min\":\"0\"},model:{value:(_vm.avatarAltRadiusLocal),callback:function ($$v) {_vm.avatarAltRadiusLocal=$$v},expression:\"avatarAltRadiusLocal\"}}),_vm._v(\" \"),_c('RangeInput',{attrs:{\"name\":\"attachmentRadius\",\"label\":_vm.$t('settings.attachmentRadius'),\"fallback\":_vm.previewTheme.radii.attachment,\"max\":\"50\",\"hard-min\":\"0\"},model:{value:(_vm.attachmentRadiusLocal),callback:function ($$v) {_vm.attachmentRadiusLocal=$$v},expression:\"attachmentRadiusLocal\"}}),_vm._v(\" \"),_c('RangeInput',{attrs:{\"name\":\"tooltipRadius\",\"label\":_vm.$t('settings.tooltipRadius'),\"fallback\":_vm.previewTheme.radii.tooltip,\"max\":\"50\",\"hard-min\":\"0\"},model:{value:(_vm.tooltipRadiusLocal),callback:function ($$v) {_vm.tooltipRadiusLocal=$$v},expression:\"tooltipRadiusLocal\"}})],1),_vm._v(\" \"),_c('div',{staticClass:\"shadow-container\",attrs:{\"label\":_vm.$t('settings.style.shadows._tab_label')}},[_c('div',{staticClass:\"tab-header shadow-selector\"},[_c('div',{staticClass:\"select-container\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.shadows.component'))+\"\\n \"),_c('label',{staticClass:\"select\",attrs:{\"for\":\"shadow-switcher\"}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.shadowSelected),expression:\"shadowSelected\"}],staticClass:\"shadow-switcher\",attrs:{\"id\":\"shadow-switcher\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.shadowSelected=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.shadowsAvailable),function(shadow){return _c('option',{key:shadow,domProps:{\"value\":shadow}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.shadows.components.' + shadow))+\"\\n \")])}),0),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])]),_vm._v(\" \"),_c('div',{staticClass:\"override\"},[_c('label',{staticClass:\"label\",attrs:{\"for\":\"override\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.shadows.override'))+\"\\n \")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.currentShadowOverriden),expression:\"currentShadowOverriden\"}],staticClass:\"input-override\",attrs:{\"id\":\"override\",\"name\":\"override\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.currentShadowOverriden)?_vm._i(_vm.currentShadowOverriden,null)>-1:(_vm.currentShadowOverriden)},on:{\"change\":function($event){var $$a=_vm.currentShadowOverriden,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.currentShadowOverriden=$$a.concat([$$v]))}else{$$i>-1&&(_vm.currentShadowOverriden=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.currentShadowOverriden=$$c}}}}),_vm._v(\" \"),_c('label',{staticClass:\"checkbox-label\",attrs:{\"for\":\"override\"}})]),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.clearShadows}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.clear_all'))+\"\\n \")])]),_vm._v(\" \"),_c('shadow-control',{attrs:{\"ready\":!!_vm.currentShadowFallback,\"fallback\":_vm.currentShadowFallback},model:{value:(_vm.currentShadow),callback:function ($$v) {_vm.currentShadow=$$v},expression:\"currentShadow\"}}),_vm._v(\" \"),(_vm.shadowSelected === 'avatar' || _vm.shadowSelected === 'avatarStatus')?_c('div',[_c('i18n',{attrs:{\"path\":\"settings.style.shadows.filter_hint.always_drop_shadow\",\"tag\":\"p\"}},[_c('code',[_vm._v(\"filter: drop-shadow()\")])]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.style.shadows.filter_hint.avatar_inset')))]),_vm._v(\" \"),_c('i18n',{attrs:{\"path\":\"settings.style.shadows.filter_hint.drop_shadow_syntax\",\"tag\":\"p\"}},[_c('code',[_vm._v(\"drop-shadow\")]),_vm._v(\" \"),_c('code',[_vm._v(\"spread-radius\")]),_vm._v(\" \"),_c('code',[_vm._v(\"inset\")])]),_vm._v(\" \"),_c('i18n',{attrs:{\"path\":\"settings.style.shadows.filter_hint.inset_classic\",\"tag\":\"p\"}},[_c('code',[_vm._v(\"box-shadow\")])]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.style.shadows.filter_hint.spread_zero')))])],1):_vm._e()],1),_vm._v(\" \"),_c('div',{staticClass:\"fonts-container\",attrs:{\"label\":_vm.$t('settings.style.fonts._tab_label')}},[_c('div',{staticClass:\"tab-header\"},[_c('p',[_vm._v(_vm._s(_vm.$t('settings.style.fonts.help')))]),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.clearFonts}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.clear_all'))+\"\\n \")])]),_vm._v(\" \"),_c('FontControl',{attrs:{\"name\":\"ui\",\"label\":_vm.$t('settings.style.fonts.components.interface'),\"fallback\":_vm.previewTheme.fonts.interface,\"no-inherit\":\"1\"},model:{value:(_vm.fontsLocal.interface),callback:function ($$v) {_vm.$set(_vm.fontsLocal, \"interface\", $$v)},expression:\"fontsLocal.interface\"}}),_vm._v(\" \"),_c('FontControl',{attrs:{\"name\":\"input\",\"label\":_vm.$t('settings.style.fonts.components.input'),\"fallback\":_vm.previewTheme.fonts.input},model:{value:(_vm.fontsLocal.input),callback:function ($$v) {_vm.$set(_vm.fontsLocal, \"input\", $$v)},expression:\"fontsLocal.input\"}}),_vm._v(\" \"),_c('FontControl',{attrs:{\"name\":\"post\",\"label\":_vm.$t('settings.style.fonts.components.post'),\"fallback\":_vm.previewTheme.fonts.post},model:{value:(_vm.fontsLocal.post),callback:function ($$v) {_vm.$set(_vm.fontsLocal, \"post\", $$v)},expression:\"fontsLocal.post\"}}),_vm._v(\" \"),_c('FontControl',{attrs:{\"name\":\"postCode\",\"label\":_vm.$t('settings.style.fonts.components.postCode'),\"fallback\":_vm.previewTheme.fonts.postCode},model:{value:(_vm.fontsLocal.postCode),callback:function ($$v) {_vm.$set(_vm.fontsLocal, \"postCode\", $$v)},expression:\"fontsLocal.postCode\"}})],1)])],1),_vm._v(\" \"),_c('div',{staticClass:\"apply-container\"},[_c('button',{staticClass:\"btn submit\",attrs:{\"disabled\":!_vm.themeValid},on:{\"click\":_vm.setCustomTheme}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.apply'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn\",on:{\"click\":_vm.clearAll}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.style.switcher.reset'))+\"\\n \")])])],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('label',{attrs:{\"for\":\"interface-language-switcher\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.interfaceLanguage'))+\"\\n \")]),_vm._v(\" \"),_c('label',{staticClass:\"select\",attrs:{\"for\":\"interface-language-switcher\"}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.language),expression:\"language\"}],attrs:{\"id\":\"interface-language-switcher\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.language=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.languageCodes),function(langCode,i){return _c('option',{key:langCode,domProps:{\"value\":langCode}},[_vm._v(\"\\n \"+_vm._s(_vm.languageNames[i])+\"\\n \")])}),0),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"settings panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.settings'))+\"\\n \")]),_vm._v(\" \"),_c('transition',{attrs:{\"name\":\"fade\"}},[(_vm.currentSaveStateNotice)?[(_vm.currentSaveStateNotice.error)?_c('div',{staticClass:\"alert error\",on:{\"click\":function($event){$event.preventDefault();}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.saving_err'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(!_vm.currentSaveStateNotice.error)?_c('div',{staticClass:\"alert transparent\",on:{\"click\":function($event){$event.preventDefault();}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.saving_ok'))+\"\\n \")]):_vm._e()]:_vm._e()],2)],1),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[_c('keep-alive',[_c('tab-switcher',[_c('div',{attrs:{\"label\":_vm.$t('settings.general')}},[_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.interface')))]),_vm._v(\" \"),_c('ul',{staticClass:\"setting-list\"},[_c('li',[_c('interface-language-switcher')],1),_vm._v(\" \"),(_vm.instanceSpecificPanelPresent)?_c('li',[_c('Checkbox',{model:{value:(_vm.hideISP),callback:function ($$v) {_vm.hideISP=$$v},expression:\"hideISP\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_isp'))+\"\\n \")])],1):_vm._e()])]),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('nav.timeline')))]),_vm._v(\" \"),_c('ul',{staticClass:\"setting-list\"},[_c('li',[_c('Checkbox',{model:{value:(_vm.hideMutedPosts),callback:function ($$v) {_vm.hideMutedPosts=$$v},expression:\"hideMutedPosts\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_muted_posts'))+\" \"+_vm._s(_vm.$t('settings.instance_default', { value: _vm.hideMutedPostsLocalizedValue }))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.collapseMessageWithSubject),callback:function ($$v) {_vm.collapseMessageWithSubject=$$v},expression:\"collapseMessageWithSubject\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.collapse_subject'))+\" \"+_vm._s(_vm.$t('settings.instance_default', { value: _vm.collapseMessageWithSubjectLocalizedValue }))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.streaming),callback:function ($$v) {_vm.streaming=$$v},expression:\"streaming\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.streaming'))+\"\\n \")]),_vm._v(\" \"),_c('ul',{staticClass:\"setting-list suboptions\",class:[{disabled: !_vm.streaming}]},[_c('li',[_c('Checkbox',{attrs:{\"disabled\":!_vm.streaming},model:{value:(_vm.pauseOnUnfocused),callback:function ($$v) {_vm.pauseOnUnfocused=$$v},expression:\"pauseOnUnfocused\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.pause_on_unfocused'))+\"\\n \")])],1)])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.autoLoad),callback:function ($$v) {_vm.autoLoad=$$v},expression:\"autoLoad\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.autoload'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.hoverPreview),callback:function ($$v) {_vm.hoverPreview=$$v},expression:\"hoverPreview\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.reply_link_preview'))+\"\\n \")])],1)])]),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.composing')))]),_vm._v(\" \"),_c('ul',{staticClass:\"setting-list\"},[_c('li',[_c('Checkbox',{model:{value:(_vm.scopeCopy),callback:function ($$v) {_vm.scopeCopy=$$v},expression:\"scopeCopy\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.scope_copy'))+\" \"+_vm._s(_vm.$t('settings.instance_default', { value: _vm.scopeCopyLocalizedValue }))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.alwaysShowSubjectInput),callback:function ($$v) {_vm.alwaysShowSubjectInput=$$v},expression:\"alwaysShowSubjectInput\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.subject_input_always_show'))+\" \"+_vm._s(_vm.$t('settings.instance_default', { value: _vm.alwaysShowSubjectInputLocalizedValue }))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('div',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.subject_line_behavior'))+\"\\n \"),_c('label',{staticClass:\"select\",attrs:{\"for\":\"subjectLineBehavior\"}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.subjectLineBehavior),expression:\"subjectLineBehavior\"}],attrs:{\"id\":\"subjectLineBehavior\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.subjectLineBehavior=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},[_c('option',{attrs:{\"value\":\"email\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.subject_line_email'))+\"\\n \"+_vm._s(_vm.subjectLineBehaviorDefaultValue == 'email' ? _vm.$t('settings.instance_default_simple') : '')+\"\\n \")]),_vm._v(\" \"),_c('option',{attrs:{\"value\":\"masto\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.subject_line_mastodon'))+\"\\n \"+_vm._s(_vm.subjectLineBehaviorDefaultValue == 'mastodon' ? _vm.$t('settings.instance_default_simple') : '')+\"\\n \")]),_vm._v(\" \"),_c('option',{attrs:{\"value\":\"noop\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.subject_line_noop'))+\"\\n \"+_vm._s(_vm.subjectLineBehaviorDefaultValue == 'noop' ? _vm.$t('settings.instance_default_simple') : '')+\"\\n \")])]),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])])]),_vm._v(\" \"),(_vm.postFormats.length > 0)?_c('li',[_c('div',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.post_status_content_type'))+\"\\n \"),_c('label',{staticClass:\"select\",attrs:{\"for\":\"postContentType\"}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.postContentType),expression:\"postContentType\"}],attrs:{\"id\":\"postContentType\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.postContentType=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.postFormats),function(postFormat){return _c('option',{key:postFormat,domProps:{\"value\":postFormat}},[_vm._v(\"\\n \"+_vm._s(_vm.$t((\"post_status.content_type[\\\"\" + postFormat + \"\\\"]\")))+\"\\n \"+_vm._s(_vm.postContentTypeDefaultValue === postFormat ? _vm.$t('settings.instance_default_simple') : '')+\"\\n \")])}),0),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])])]):_vm._e(),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.minimalScopesMode),callback:function ($$v) {_vm.minimalScopesMode=$$v},expression:\"minimalScopesMode\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.minimal_scopes_mode'))+\" \"+_vm._s(_vm.$t('settings.instance_default', { value: _vm.minimalScopesModeLocalizedValue }))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.autohideFloatingPostButton),callback:function ($$v) {_vm.autohideFloatingPostButton=$$v},expression:\"autohideFloatingPostButton\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.autohide_floating_post_button'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.padEmoji),callback:function ($$v) {_vm.padEmoji=$$v},expression:\"padEmoji\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.pad_emoji'))+\"\\n \")])],1)])]),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.attachments')))]),_vm._v(\" \"),_c('ul',{staticClass:\"setting-list\"},[_c('li',[_c('Checkbox',{model:{value:(_vm.hideAttachments),callback:function ($$v) {_vm.hideAttachments=$$v},expression:\"hideAttachments\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_attachments_in_tl'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.hideAttachmentsInConv),callback:function ($$v) {_vm.hideAttachmentsInConv=$$v},expression:\"hideAttachmentsInConv\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_attachments_in_convo'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('label',{attrs:{\"for\":\"maxThumbnails\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.max_thumbnails'))+\"\\n \")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.maxThumbnails),expression:\"maxThumbnails\",modifiers:{\"number\":true}}],staticClass:\"number-input\",attrs:{\"id\":\"maxThumbnails\",\"type\":\"number\",\"min\":\"0\",\"step\":\"1\"},domProps:{\"value\":(_vm.maxThumbnails)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.maxThumbnails=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}})]),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.hideNsfw),callback:function ($$v) {_vm.hideNsfw=$$v},expression:\"hideNsfw\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.nsfw_clickthrough'))+\"\\n \")])],1),_vm._v(\" \"),_c('ul',{staticClass:\"setting-list suboptions\"},[_c('li',[_c('Checkbox',{attrs:{\"disabled\":!_vm.hideNsfw},model:{value:(_vm.preloadImage),callback:function ($$v) {_vm.preloadImage=$$v},expression:\"preloadImage\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.preload_images'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{attrs:{\"disabled\":!_vm.hideNsfw},model:{value:(_vm.useOneClickNsfw),callback:function ($$v) {_vm.useOneClickNsfw=$$v},expression:\"useOneClickNsfw\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.use_one_click_nsfw'))+\"\\n \")])],1)]),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.stopGifs),callback:function ($$v) {_vm.stopGifs=$$v},expression:\"stopGifs\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.stop_gifs'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.loopVideo),callback:function ($$v) {_vm.loopVideo=$$v},expression:\"loopVideo\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.loop_video'))+\"\\n \")]),_vm._v(\" \"),_c('ul',{staticClass:\"setting-list suboptions\",class:[{disabled: !_vm.streaming}]},[_c('li',[_c('Checkbox',{attrs:{\"disabled\":!_vm.loopVideo || !_vm.loopSilentAvailable},model:{value:(_vm.loopVideoSilentOnly),callback:function ($$v) {_vm.loopVideoSilentOnly=$$v},expression:\"loopVideoSilentOnly\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.loop_video_silent_only'))+\"\\n \")]),_vm._v(\" \"),(!_vm.loopSilentAvailable)?_c('div',{staticClass:\"unavailable\"},[_c('i',{staticClass:\"icon-globe\"}),_vm._v(\"! \"+_vm._s(_vm.$t('settings.limited_availability'))+\"\\n \")]):_vm._e()],1)])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.playVideosInModal),callback:function ($$v) {_vm.playVideosInModal=$$v},expression:\"playVideosInModal\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.play_videos_in_modal'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.useContainFit),callback:function ($$v) {_vm.useContainFit=$$v},expression:\"useContainFit\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.use_contain_fit'))+\"\\n \")])],1)])]),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.notifications')))]),_vm._v(\" \"),_c('ul',{staticClass:\"setting-list\"},[_c('li',[_c('Checkbox',{model:{value:(_vm.webPushNotifications),callback:function ($$v) {_vm.webPushNotifications=$$v},expression:\"webPushNotifications\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.enable_web_push_notifications'))+\"\\n \")])],1)])])]),_vm._v(\" \"),_c('div',{attrs:{\"label\":_vm.$t('settings.theme')}},[_c('div',{staticClass:\"setting-item\"},[_c('style-switcher')],1)]),_vm._v(\" \"),_c('div',{attrs:{\"label\":_vm.$t('settings.filtering')}},[_c('div',{staticClass:\"setting-item\"},[_c('div',{staticClass:\"select-multiple\"},[_c('span',{staticClass:\"label\"},[_vm._v(_vm._s(_vm.$t('settings.notification_visibility')))]),_vm._v(\" \"),_c('ul',{staticClass:\"option-list\"},[_c('li',[_c('Checkbox',{model:{value:(_vm.notificationVisibility.likes),callback:function ($$v) {_vm.$set(_vm.notificationVisibility, \"likes\", $$v)},expression:\"notificationVisibility.likes\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.notification_visibility_likes'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.notificationVisibility.repeats),callback:function ($$v) {_vm.$set(_vm.notificationVisibility, \"repeats\", $$v)},expression:\"notificationVisibility.repeats\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.notification_visibility_repeats'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.notificationVisibility.follows),callback:function ($$v) {_vm.$set(_vm.notificationVisibility, \"follows\", $$v)},expression:\"notificationVisibility.follows\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.notification_visibility_follows'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.notificationVisibility.mentions),callback:function ($$v) {_vm.$set(_vm.notificationVisibility, \"mentions\", $$v)},expression:\"notificationVisibility.mentions\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.notification_visibility_mentions'))+\"\\n \")])],1)])]),_vm._v(\" \"),_c('div',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.replies_in_timeline'))+\"\\n \"),_c('label',{staticClass:\"select\",attrs:{\"for\":\"replyVisibility\"}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.replyVisibility),expression:\"replyVisibility\"}],attrs:{\"id\":\"replyVisibility\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.replyVisibility=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},[_c('option',{attrs:{\"value\":\"all\",\"selected\":\"\"}},[_vm._v(_vm._s(_vm.$t('settings.reply_visibility_all')))]),_vm._v(\" \"),_c('option',{attrs:{\"value\":\"following\"}},[_vm._v(_vm._s(_vm.$t('settings.reply_visibility_following')))]),_vm._v(\" \"),_c('option',{attrs:{\"value\":\"self\"}},[_vm._v(_vm._s(_vm.$t('settings.reply_visibility_self')))])]),_vm._v(\" \"),_c('i',{staticClass:\"icon-down-open\"})])]),_vm._v(\" \"),_c('div',[_c('Checkbox',{model:{value:(_vm.hidePostStats),callback:function ($$v) {_vm.hidePostStats=$$v},expression:\"hidePostStats\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_post_stats'))+\" \"+_vm._s(_vm.$t('settings.instance_default', { value: _vm.hidePostStatsLocalizedValue }))+\"\\n \")])],1),_vm._v(\" \"),_c('div',[_c('Checkbox',{model:{value:(_vm.hideUserStats),callback:function ($$v) {_vm.hideUserStats=$$v},expression:\"hideUserStats\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_user_stats'))+\" \"+_vm._s(_vm.$t('settings.instance_default', { value: _vm.hideUserStatsLocalizedValue }))+\"\\n \")])],1)]),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('div',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.filtering_explanation')))]),_vm._v(\" \"),_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.muteWordsString),expression:\"muteWordsString\"}],attrs:{\"id\":\"muteWords\"},domProps:{\"value\":(_vm.muteWordsString)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.muteWordsString=$event.target.value}}})]),_vm._v(\" \"),_c('div',[_c('Checkbox',{model:{value:(_vm.hideFilteredStatuses),callback:function ($$v) {_vm.hideFilteredStatuses=$$v},expression:\"hideFilteredStatuses\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_filtered_statuses'))+\" \"+_vm._s(_vm.$t('settings.instance_default', { value: _vm.hideFilteredStatusesLocalizedValue }))+\"\\n \")])],1)])]),_vm._v(\" \"),_c('div',{attrs:{\"label\":_vm.$t('settings.version.title')}},[_c('div',{staticClass:\"setting-item\"},[_c('ul',{staticClass:\"setting-list\"},[_c('li',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.version.backend_version')))]),_vm._v(\" \"),_c('ul',{staticClass:\"option-list\"},[_c('li',[_c('a',{attrs:{\"href\":_vm.backendVersionLink,\"target\":\"_blank\"}},[_vm._v(_vm._s(_vm.backendVersion))])])])]),_vm._v(\" \"),_c('li',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.version.frontend_version')))]),_vm._v(\" \"),_c('ul',{staticClass:\"option-list\"},[_c('li',[_c('a',{attrs:{\"href\":_vm.frontendVersionLink,\"target\":\"_blank\"}},[_vm._v(_vm._s(_vm.frontendVersion))])])])])])])])])],1)],1)])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"settings panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('registration.registration'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[_c('form',{staticClass:\"registration-form\",on:{\"submit\":function($event){$event.preventDefault();_vm.submit(_vm.user)}}},[_c('div',{staticClass:\"container\"},[_c('div',{staticClass:\"text-fields\"},[_c('div',{staticClass:\"form-group\",class:{ 'form-group--error': _vm.$v.user.username.$error }},[_c('label',{staticClass:\"form--label\",attrs:{\"for\":\"sign-up-username\"}},[_vm._v(_vm._s(_vm.$t('login.username')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.$v.user.username.$model),expression:\"$v.user.username.$model\",modifiers:{\"trim\":true}}],staticClass:\"form-control\",attrs:{\"id\":\"sign-up-username\",\"disabled\":_vm.isPending,\"placeholder\":_vm.$t('registration.username_placeholder')},domProps:{\"value\":(_vm.$v.user.username.$model)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.$v.user.username, \"$model\", $event.target.value.trim())},\"blur\":function($event){_vm.$forceUpdate()}}})]),_vm._v(\" \"),(_vm.$v.user.username.$dirty)?_c('div',{staticClass:\"form-error\"},[_c('ul',[(!_vm.$v.user.username.required)?_c('li',[_c('span',[_vm._v(_vm._s(_vm.$t('registration.validations.username_required')))])]):_vm._e()])]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"form-group\",class:{ 'form-group--error': _vm.$v.user.fullname.$error }},[_c('label',{staticClass:\"form--label\",attrs:{\"for\":\"sign-up-fullname\"}},[_vm._v(_vm._s(_vm.$t('registration.fullname')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.$v.user.fullname.$model),expression:\"$v.user.fullname.$model\",modifiers:{\"trim\":true}}],staticClass:\"form-control\",attrs:{\"id\":\"sign-up-fullname\",\"disabled\":_vm.isPending,\"placeholder\":_vm.$t('registration.fullname_placeholder')},domProps:{\"value\":(_vm.$v.user.fullname.$model)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.$v.user.fullname, \"$model\", $event.target.value.trim())},\"blur\":function($event){_vm.$forceUpdate()}}})]),_vm._v(\" \"),(_vm.$v.user.fullname.$dirty)?_c('div',{staticClass:\"form-error\"},[_c('ul',[(!_vm.$v.user.fullname.required)?_c('li',[_c('span',[_vm._v(_vm._s(_vm.$t('registration.validations.fullname_required')))])]):_vm._e()])]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"form-group\",class:{ 'form-group--error': _vm.$v.user.email.$error }},[_c('label',{staticClass:\"form--label\",attrs:{\"for\":\"email\"}},[_vm._v(_vm._s(_vm.$t('registration.email')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.$v.user.email.$model),expression:\"$v.user.email.$model\"}],staticClass:\"form-control\",attrs:{\"id\":\"email\",\"disabled\":_vm.isPending,\"type\":\"email\"},domProps:{\"value\":(_vm.$v.user.email.$model)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.$v.user.email, \"$model\", $event.target.value)}}})]),_vm._v(\" \"),(_vm.$v.user.email.$dirty)?_c('div',{staticClass:\"form-error\"},[_c('ul',[(!_vm.$v.user.email.required)?_c('li',[_c('span',[_vm._v(_vm._s(_vm.$t('registration.validations.email_required')))])]):_vm._e()])]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"form--label\",attrs:{\"for\":\"bio\"}},[_vm._v(_vm._s(_vm.$t('registration.bio'))+\" (\"+_vm._s(_vm.$t('general.optional'))+\")\")]),_vm._v(\" \"),_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.bio),expression:\"user.bio\"}],staticClass:\"form-control\",attrs:{\"id\":\"bio\",\"disabled\":_vm.isPending,\"placeholder\":_vm.bioPlaceholder},domProps:{\"value\":(_vm.user.bio)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.user, \"bio\", $event.target.value)}}})]),_vm._v(\" \"),_c('div',{staticClass:\"form-group\",class:{ 'form-group--error': _vm.$v.user.password.$error }},[_c('label',{staticClass:\"form--label\",attrs:{\"for\":\"sign-up-password\"}},[_vm._v(_vm._s(_vm.$t('login.password')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.password),expression:\"user.password\"}],staticClass:\"form-control\",attrs:{\"id\":\"sign-up-password\",\"disabled\":_vm.isPending,\"type\":\"password\"},domProps:{\"value\":(_vm.user.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.user, \"password\", $event.target.value)}}})]),_vm._v(\" \"),(_vm.$v.user.password.$dirty)?_c('div',{staticClass:\"form-error\"},[_c('ul',[(!_vm.$v.user.password.required)?_c('li',[_c('span',[_vm._v(_vm._s(_vm.$t('registration.validations.password_required')))])]):_vm._e()])]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"form-group\",class:{ 'form-group--error': _vm.$v.user.confirm.$error }},[_c('label',{staticClass:\"form--label\",attrs:{\"for\":\"sign-up-password-confirmation\"}},[_vm._v(_vm._s(_vm.$t('registration.password_confirm')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.confirm),expression:\"user.confirm\"}],staticClass:\"form-control\",attrs:{\"id\":\"sign-up-password-confirmation\",\"disabled\":_vm.isPending,\"type\":\"password\"},domProps:{\"value\":(_vm.user.confirm)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.user, \"confirm\", $event.target.value)}}})]),_vm._v(\" \"),(_vm.$v.user.confirm.$dirty)?_c('div',{staticClass:\"form-error\"},[_c('ul',[(!_vm.$v.user.confirm.required)?_c('li',[_c('span',[_vm._v(_vm._s(_vm.$t('registration.validations.password_confirmation_required')))])]):_vm._e(),_vm._v(\" \"),(!_vm.$v.user.confirm.sameAsPassword)?_c('li',[_c('span',[_vm._v(_vm._s(_vm.$t('registration.validations.password_confirmation_match')))])]):_vm._e()])]):_vm._e(),_vm._v(\" \"),(_vm.captcha.type != 'none')?_c('div',{staticClass:\"form-group\",attrs:{\"id\":\"captcha-group\"}},[_c('label',{staticClass:\"form--label\",attrs:{\"for\":\"captcha-label\"}},[_vm._v(_vm._s(_vm.$t('captcha')))]),_vm._v(\" \"),(_vm.captcha.type == 'kocaptcha')?[_c('img',{attrs:{\"src\":_vm.captcha.url},on:{\"click\":_vm.setCaptcha}}),_vm._v(\" \"),_c('sub',[_vm._v(_vm._s(_vm.$t('registration.new_captcha')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.captcha.solution),expression:\"captcha.solution\"}],staticClass:\"form-control\",attrs:{\"id\":\"captcha-answer\",\"disabled\":_vm.isPending,\"type\":\"text\",\"autocomplete\":\"off\"},domProps:{\"value\":(_vm.captcha.solution)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.captcha, \"solution\", $event.target.value)}}})]:_vm._e()],2):_vm._e(),_vm._v(\" \"),(_vm.token)?_c('div',{staticClass:\"form-group\"},[_c('label',{attrs:{\"for\":\"token\"}},[_vm._v(_vm._s(_vm.$t('registration.token')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.token),expression:\"token\"}],staticClass:\"form-control\",attrs:{\"id\":\"token\",\"disabled\":\"true\",\"type\":\"text\"},domProps:{\"value\":(_vm.token)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.token=$event.target.value}}})]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.isPending,\"type\":\"submit\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")])])]),_vm._v(\" \"),_c('div',{staticClass:\"terms-of-service\",domProps:{\"innerHTML\":_vm._s(_vm.termsOfService)}})]),_vm._v(\" \"),(_vm.serverValidationErrors.length)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"alert error\"},_vm._l((_vm.serverValidationErrors),function(error){return _c('span',{key:error},[_vm._v(_vm._s(error))])}),0)]):_vm._e()])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"settings panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('password_reset.password_reset'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[_c('form',{staticClass:\"password-reset-form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.submit($event)}}},[_c('div',{staticClass:\"container\"},[(!_vm.mailerEnabled)?_c('div',[(_vm.passwordResetRequested)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('password_reset.password_reset_required_but_mailer_is_disabled'))+\"\\n \")]):_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('password_reset.password_reset_disabled'))+\"\\n \")])]):(_vm.success || _vm.throttled)?_c('div',[(_vm.success)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('password_reset.check_email'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"form-group text-center\"},[_c('router-link',{attrs:{\"to\":{name: 'root'}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('password_reset.return_home'))+\"\\n \")])],1)]):_c('div',[(_vm.passwordResetRequested)?_c('p',{staticClass:\"password-reset-required error\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('password_reset.password_reset_required'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('password_reset.instruction'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.email),expression:\"user.email\"}],ref:\"email\",staticClass:\"form-control\",attrs:{\"disabled\":_vm.isPending,\"placeholder\":_vm.$t('password_reset.placeholder'),\"type\":\"input\"},domProps:{\"value\":(_vm.user.email)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.user, \"email\", $event.target.value)}}})]),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('button',{staticClass:\"btn btn-default btn-block\",attrs:{\"disabled\":_vm.isPending,\"type\":\"submit\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")])])]),_vm._v(\" \"),(_vm.error)?_c('p',{staticClass:\"alert error notice-dismissible\"},[_c('span',[_vm._v(_vm._s(_vm.error))]),_vm._v(\" \"),_c('a',{staticClass:\"button-icon dismiss\",on:{\"click\":function($event){$event.preventDefault();_vm.dismissError()}}},[_c('i',{staticClass:\"icon-cancel\"})])]):_vm._e()])])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"image-cropper\"},[(_vm.dataUrl)?_c('div',[_c('div',{staticClass:\"image-cropper-image-container\"},[_c('img',{ref:\"img\",attrs:{\"src\":_vm.dataUrl,\"alt\":\"\"},on:{\"load\":function($event){$event.stopPropagation();return _vm.createCropper($event)}}})]),_vm._v(\" \"),_c('div',{staticClass:\"image-cropper-buttons-wrapper\"},[_c('button',{staticClass:\"btn\",attrs:{\"type\":\"button\",\"disabled\":_vm.submitting},domProps:{\"textContent\":_vm._s(_vm.saveText)},on:{\"click\":function($event){_vm.submit()}}}),_vm._v(\" \"),_c('button',{staticClass:\"btn\",attrs:{\"type\":\"button\",\"disabled\":_vm.submitting},domProps:{\"textContent\":_vm._s(_vm.cancelText)},on:{\"click\":_vm.destroy}}),_vm._v(\" \"),_c('button',{staticClass:\"btn\",attrs:{\"type\":\"button\",\"disabled\":_vm.submitting},domProps:{\"textContent\":_vm._s(_vm.saveWithoutCroppingText)},on:{\"click\":function($event){_vm.submit(false)}}}),_vm._v(\" \"),(_vm.submitting)?_c('i',{staticClass:\"icon-spin4 animate-spin\"}):_vm._e()]),_vm._v(\" \"),(_vm.submitError)?_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n \"+_vm._s(_vm.submitErrorMsg)+\"\\n \"),_c('i',{staticClass:\"button-icon icon-cancel\",on:{\"click\":_vm.clearError}})]):_vm._e()]):_vm._e(),_vm._v(\" \"),_c('input',{ref:\"input\",staticClass:\"image-cropper-img-input\",attrs:{\"type\":\"file\",\"accept\":_vm.mimes}})])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('basic-user-card',{attrs:{\"user\":_vm.user}},[_c('div',{staticClass:\"block-card-content-container\"},[(_vm.blocked)?_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.progress},on:{\"click\":_vm.unblockUser}},[(_vm.progress)?[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.unblock_progress'))+\"\\n \")]:[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.unblock'))+\"\\n \")]],2):_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.progress},on:{\"click\":_vm.blockUser}},[(_vm.progress)?[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.block_progress'))+\"\\n \")]:[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.block'))+\"\\n \")]],2)])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('basic-user-card',{attrs:{\"user\":_vm.user}},[_c('div',{staticClass:\"mute-card-content-container\"},[(_vm.muted)?_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.progress},on:{\"click\":_vm.unmuteUser}},[(_vm.progress)?[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.unmute_progress'))+\"\\n \")]:[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.unmute'))+\"\\n \")]],2):_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.progress},on:{\"click\":_vm.muteUser}},[(_vm.progress)?[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.mute_progress'))+\"\\n \")]:[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.mute'))+\"\\n \")]],2)])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"selectable-list\"},[(_vm.items.length > 0)?_c('div',{staticClass:\"selectable-list-header\"},[_c('div',{staticClass:\"selectable-list-checkbox-wrapper\"},[_c('Checkbox',{attrs:{\"checked\":_vm.allSelected,\"indeterminate\":_vm.someSelected},on:{\"change\":_vm.toggleAll}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('selectable_list.select_all'))+\"\\n \")])],1),_vm._v(\" \"),_c('div',{staticClass:\"selectable-list-header-actions\"},[_vm._t(\"header\",null,{selected:_vm.filteredSelected})],2)]):_vm._e(),_vm._v(\" \"),_c('List',{attrs:{\"items\":_vm.items,\"get-key\":_vm.getKey},scopedSlots:_vm._u([{key:\"item\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"selectable-list-item-inner\",class:{ 'selectable-list-item-selected-inner': _vm.isSelected(item) }},[_c('div',{staticClass:\"selectable-list-checkbox-wrapper\"},[_c('Checkbox',{attrs:{\"checked\":_vm.isSelected(item)},on:{\"change\":function (checked) { return _vm.toggle(checked, item); }}})],1),_vm._v(\" \"),_vm._t(\"item\",null,{item:item})],2)]}}])},[_c('template',{slot:\"empty\"},[_vm._t(\"empty\")],2)],2)],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"click-outside\",rawName:\"v-click-outside\",value:(_vm.onClickOutside),expression:\"onClickOutside\"}],staticClass:\"autosuggest\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.term),expression:\"term\"}],staticClass:\"autosuggest-input\",attrs:{\"placeholder\":_vm.placeholder},domProps:{\"value\":(_vm.term)},on:{\"click\":_vm.onInputClick,\"input\":function($event){if($event.target.composing){ return; }_vm.term=$event.target.value}}}),_vm._v(\" \"),(_vm.resultsVisible && _vm.filtered.length > 0)?_c('div',{staticClass:\"autosuggest-results\"},[_vm._l((_vm.filtered),function(item){return _vm._t(\"default\",null,{item:item})})],2):_vm._e()])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"importer\"},[_c('form',[_c('input',{ref:\"input\",attrs:{\"type\":\"file\"},on:{\"change\":_vm.change}})]),_vm._v(\" \"),(_vm.submitting)?_c('i',{staticClass:\"icon-spin4 animate-spin importer-uploading\"}):_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.submit}},[_vm._v(\"\\n \"+_vm._s(_vm.submitButtonLabel)+\"\\n \")]),_vm._v(\" \"),(_vm.success)?_c('div',[_c('i',{staticClass:\"icon-cross\",on:{\"click\":_vm.dismiss}}),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.successMessage))])]):(_vm.error)?_c('div',[_c('i',{staticClass:\"icon-cross\",on:{\"click\":_vm.dismiss}}),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.errorMessage))])]):_vm._e()])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"exporter\"},[(_vm.processing)?_c('div',[_c('i',{staticClass:\"icon-spin4 animate-spin exporter-processing\"}),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.processingMessage))])]):_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.process}},[_vm._v(\"\\n \"+_vm._s(_vm.exportButtonLabel)+\"\\n \")])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.displayTitle)?_c('h4',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.mfa.recovery_codes'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.inProgress)?_c('i',[_vm._v(_vm._s(_vm.$t('settings.mfa.waiting_a_recovery_codes')))]):_vm._e(),_vm._v(\" \"),(_vm.ready)?[_c('p',{staticClass:\"alert warning\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.mfa.recovery_codes_warning'))+\"\\n \")]),_vm._v(\" \"),_c('ul',{staticClass:\"backup-codes\"},_vm._l((_vm.backupCodes.codes),function(code){return _c('li',{key:code},[_vm._v(\"\\n \"+_vm._s(code)+\"\\n \")])}),0)]:_vm._e()],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._t(\"default\"),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.confirm}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.confirm'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.cancel}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.cancel'))+\"\\n \")])],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"method-item\"},[_c('strong',[_vm._v(_vm._s(_vm.$t('settings.mfa.otp')))]),_vm._v(\" \"),(!_vm.isActivated)?_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.doActivate}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.enable'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.isActivated)?_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.deactivate},on:{\"click\":_vm.doDeactivate}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.disable'))+\"\\n \")]):_vm._e()]),_vm._v(\" \"),(_vm.deactivate)?_c('confirm',{attrs:{\"disabled\":_vm.inProgress},on:{\"confirm\":_vm.confirmDeactivate,\"cancel\":_vm.cancelDeactivate}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.enter_current_password_to_confirm'))+\":\\n \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.currentPassword),expression:\"currentPassword\"}],attrs:{\"type\":\"password\"},domProps:{\"value\":(_vm.currentPassword)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.currentPassword=$event.target.value}}})]):_vm._e(),_vm._v(\" \"),(_vm.error)?_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \")]):_vm._e()],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.readyInit && _vm.settings.available)?_c('div',{staticClass:\"setting-item mfa-settings\"},[_c('div',{staticClass:\"mfa-heading\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.mfa.title')))])]),_vm._v(\" \"),_c('div',[(!_vm.setupInProgress)?_c('div',{staticClass:\"setting-item\"},[_c('h3',[_vm._v(_vm._s(_vm.$t('settings.mfa.authentication_methods')))]),_vm._v(\" \"),_c('totp-item',{attrs:{\"settings\":_vm.settings},on:{\"deactivate\":_vm.fetchSettings,\"activate\":_vm.activateOTP}}),_vm._v(\" \"),_c('br'),_vm._v(\" \"),(_vm.settings.enabled)?_c('div',[(!_vm.confirmNewBackupCodes)?_c('recovery-codes',{attrs:{\"backup-codes\":_vm.backupCodes}}):_vm._e(),_vm._v(\" \"),(!_vm.confirmNewBackupCodes)?_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.getBackupCodes}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.mfa.generate_new_recovery_codes'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.confirmNewBackupCodes)?_c('div',[_c('confirm',{attrs:{\"disabled\":_vm.backupCodes.inProgress},on:{\"confirm\":_vm.confirmBackupCodes,\"cancel\":_vm.cancelBackupCodes}},[_c('p',{staticClass:\"warning\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.mfa.warning_of_generate_new_codes'))+\"\\n \")])])],1):_vm._e()],1):_vm._e()],1):_vm._e(),_vm._v(\" \"),(_vm.setupInProgress)?_c('div',[_c('h3',[_vm._v(_vm._s(_vm.$t('settings.mfa.setup_otp')))]),_vm._v(\" \"),(!_vm.setupOTPInProgress)?_c('recovery-codes',{attrs:{\"backup-codes\":_vm.backupCodes}}):_vm._e(),_vm._v(\" \"),(_vm.canSetupOTP)?_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.cancelSetup}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.cancel'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.canSetupOTP)?_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.setupOTP}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.mfa.setup_otp'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.setupOTPInProgress)?[(_vm.prepareOTP)?_c('i',[_vm._v(_vm._s(_vm.$t('settings.mfa.wait_pre_setup_otp')))]):_vm._e(),_vm._v(\" \"),(_vm.confirmOTP)?_c('div',[_c('div',{staticClass:\"setup-otp\"},[_c('div',{staticClass:\"qr-code\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('settings.mfa.scan.title')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.mfa.scan.desc')))]),_vm._v(\" \"),_c('qrcode',{attrs:{\"value\":_vm.otpSettings.provisioning_uri,\"options\":{ width: 200 }}}),_vm._v(\" \"),_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.mfa.scan.secret_code'))+\":\\n \"+_vm._s(_vm.otpSettings.key)+\"\\n \")])],1),_vm._v(\" \"),_c('div',{staticClass:\"verify\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('general.verify')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.mfa.verify.desc')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.otpConfirmToken),expression:\"otpConfirmToken\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.otpConfirmToken)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.otpConfirmToken=$event.target.value}}}),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.enter_current_password_to_confirm'))+\":\")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.currentPassword),expression:\"currentPassword\"}],attrs:{\"type\":\"password\"},domProps:{\"value\":(_vm.currentPassword)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.currentPassword=$event.target.value}}}),_vm._v(\" \"),_c('div',{staticClass:\"confirm-otp-actions\"},[_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.doConfirmOTP}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.mfa.confirm_and_enable'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.cancelSetup}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.cancel'))+\"\\n \")])]),_vm._v(\" \"),(_vm.error)?_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \")]):_vm._e()])])]):_vm._e()]:_vm._e()],2):_vm._e()])]):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"settings panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.user_settings'))+\"\\n \")]),_vm._v(\" \"),_c('transition',{attrs:{\"name\":\"fade\"}},[(_vm.currentSaveStateNotice)?[(_vm.currentSaveStateNotice.error)?_c('div',{staticClass:\"alert error\",on:{\"click\":function($event){$event.preventDefault();}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.saving_err'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(!_vm.currentSaveStateNotice.error)?_c('div',{staticClass:\"alert transparent\",on:{\"click\":function($event){$event.preventDefault();}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.saving_ok'))+\"\\n \")]):_vm._e()]:_vm._e()],2)],1),_vm._v(\" \"),_c('div',{staticClass:\"panel-body profile-edit\"},[_c('tab-switcher',[_c('div',{attrs:{\"label\":_vm.$t('settings.profile_tab')}},[_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.name_bio')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.name')))]),_vm._v(\" \"),_c('EmojiInput',{attrs:{\"enable-emoji-picker\":\"\",\"suggest\":_vm.emojiSuggestor},model:{value:(_vm.newName),callback:function ($$v) {_vm.newName=$$v},expression:\"newName\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newName),expression:\"newName\"}],attrs:{\"id\":\"username\",\"classname\":\"name-changer\"},domProps:{\"value\":(_vm.newName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newName=$event.target.value}}})]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.bio')))]),_vm._v(\" \"),_c('EmojiInput',{attrs:{\"enable-emoji-picker\":\"\",\"suggest\":_vm.emojiUserSuggestor},model:{value:(_vm.newBio),callback:function ($$v) {_vm.newBio=$$v},expression:\"newBio\"}},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newBio),expression:\"newBio\"}],attrs:{\"classname\":\"bio\"},domProps:{\"value\":(_vm.newBio)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newBio=$event.target.value}}})]),_vm._v(\" \"),_c('p',[_c('Checkbox',{model:{value:(_vm.newLocked),callback:function ($$v) {_vm.newLocked=$$v},expression:\"newLocked\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.lock_account_description'))+\"\\n \")])],1),_vm._v(\" \"),_c('div',[_c('label',{attrs:{\"for\":\"default-vis\"}},[_vm._v(_vm._s(_vm.$t('settings.default_vis')))]),_vm._v(\" \"),_c('div',{staticClass:\"visibility-tray\",attrs:{\"id\":\"default-vis\"}},[_c('scope-selector',{attrs:{\"show-all\":true,\"user-default\":_vm.newDefaultScope,\"initial-scope\":_vm.newDefaultScope,\"on-scope-change\":_vm.changeVis}})],1)]),_vm._v(\" \"),_c('p',[_c('Checkbox',{model:{value:(_vm.newNoRichText),callback:function ($$v) {_vm.newNoRichText=$$v},expression:\"newNoRichText\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.no_rich_text_description'))+\"\\n \")])],1),_vm._v(\" \"),_c('p',[_c('Checkbox',{model:{value:(_vm.hideFollows),callback:function ($$v) {_vm.hideFollows=$$v},expression:\"hideFollows\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_follows_description'))+\"\\n \")])],1),_vm._v(\" \"),_c('p',{staticClass:\"setting-subitem\"},[_c('Checkbox',{attrs:{\"disabled\":!_vm.hideFollows},model:{value:(_vm.hideFollowsCount),callback:function ($$v) {_vm.hideFollowsCount=$$v},expression:\"hideFollowsCount\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_follows_count_description'))+\"\\n \")])],1),_vm._v(\" \"),_c('p',[_c('Checkbox',{model:{value:(_vm.hideFollowers),callback:function ($$v) {_vm.hideFollowers=$$v},expression:\"hideFollowers\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_followers_description'))+\"\\n \")])],1),_vm._v(\" \"),_c('p',{staticClass:\"setting-subitem\"},[_c('Checkbox',{attrs:{\"disabled\":!_vm.hideFollowers},model:{value:(_vm.hideFollowersCount),callback:function ($$v) {_vm.hideFollowersCount=$$v},expression:\"hideFollowersCount\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.hide_followers_count_description'))+\"\\n \")])],1),_vm._v(\" \"),_c('p',[_c('Checkbox',{model:{value:(_vm.showRole),callback:function ($$v) {_vm.showRole=$$v},expression:\"showRole\"}},[(_vm.role === 'admin')?[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.show_admin_badge'))+\"\\n \")]:_vm._e(),_vm._v(\" \"),(_vm.role === 'moderator')?[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.show_moderator_badge'))+\"\\n \")]:_vm._e()],2)],1),_vm._v(\" \"),_c('p',[_c('Checkbox',{model:{value:(_vm.discoverable),callback:function ($$v) {_vm.discoverable=$$v},expression:\"discoverable\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.discoverable'))+\"\\n \")])],1),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.newName && _vm.newName.length === 0},on:{\"click\":_vm.updateProfile}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")])],1),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.avatar')))]),_vm._v(\" \"),_c('p',{staticClass:\"visibility-notice\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.avatar_size_instruction'))+\"\\n \")]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.current_avatar')))]),_vm._v(\" \"),_c('img',{staticClass:\"current-avatar\",attrs:{\"src\":_vm.user.profile_image_url_original}}),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.set_new_avatar')))]),_vm._v(\" \"),_c('button',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.pickAvatarBtnVisible),expression:\"pickAvatarBtnVisible\"}],staticClass:\"btn\",attrs:{\"id\":\"pick-avatar\",\"type\":\"button\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.upload_a_photo'))+\"\\n \")]),_vm._v(\" \"),_c('image-cropper',{attrs:{\"trigger\":\"#pick-avatar\",\"submit-handler\":_vm.submitAvatar},on:{\"open\":function($event){_vm.pickAvatarBtnVisible=false},\"close\":function($event){_vm.pickAvatarBtnVisible=true}}})],1),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.profile_banner')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.current_profile_banner')))]),_vm._v(\" \"),_c('img',{staticClass:\"banner\",attrs:{\"src\":_vm.user.cover_photo}}),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.set_new_profile_banner')))]),_vm._v(\" \"),(_vm.bannerPreview)?_c('img',{staticClass:\"banner\",attrs:{\"src\":_vm.bannerPreview}}):_vm._e(),_vm._v(\" \"),_c('div',[_c('input',{attrs:{\"type\":\"file\"},on:{\"change\":function($event){_vm.uploadFile('banner', $event)}}})]),_vm._v(\" \"),(_vm.bannerUploading)?_c('i',{staticClass:\" icon-spin4 animate-spin uploading\"}):(_vm.bannerPreview)?_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.submitBanner}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.bannerUploadError)?_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n Error: \"+_vm._s(_vm.bannerUploadError)+\"\\n \"),_c('i',{staticClass:\"button-icon icon-cancel\",on:{\"click\":function($event){_vm.clearUploadError('banner')}}})]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.profile_background')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.set_new_profile_background')))]),_vm._v(\" \"),(_vm.backgroundPreview)?_c('img',{staticClass:\"bg\",attrs:{\"src\":_vm.backgroundPreview}}):_vm._e(),_vm._v(\" \"),_c('div',[_c('input',{attrs:{\"type\":\"file\"},on:{\"change\":function($event){_vm.uploadFile('background', $event)}}})]),_vm._v(\" \"),(_vm.backgroundUploading)?_c('i',{staticClass:\" icon-spin4 animate-spin uploading\"}):(_vm.backgroundPreview)?_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.submitBg}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.backgroundUploadError)?_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n Error: \"+_vm._s(_vm.backgroundUploadError)+\"\\n \"),_c('i',{staticClass:\"button-icon icon-cancel\",on:{\"click\":function($event){_vm.clearUploadError('background')}}})]):_vm._e()])]),_vm._v(\" \"),_c('div',{attrs:{\"label\":_vm.$t('settings.security_tab')}},[_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.change_email')))]),_vm._v(\" \"),_c('div',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.new_email')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newEmail),expression:\"newEmail\"}],attrs:{\"type\":\"email\",\"autocomplete\":\"email\"},domProps:{\"value\":(_vm.newEmail)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newEmail=$event.target.value}}})]),_vm._v(\" \"),_c('div',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.current_password')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.changeEmailPassword),expression:\"changeEmailPassword\"}],attrs:{\"type\":\"password\",\"autocomplete\":\"current-password\"},domProps:{\"value\":(_vm.changeEmailPassword)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.changeEmailPassword=$event.target.value}}})]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.changeEmail}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")]),_vm._v(\" \"),(_vm.changedEmail)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.changed_email'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.changeEmailError !== false)?[_c('p',[_vm._v(_vm._s(_vm.$t('settings.change_email_error')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.changeEmailError))])]:_vm._e()],2),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.change_password')))]),_vm._v(\" \"),_c('div',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.current_password')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.changePasswordInputs[0]),expression:\"changePasswordInputs[0]\"}],attrs:{\"type\":\"password\"},domProps:{\"value\":(_vm.changePasswordInputs[0])},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.changePasswordInputs, 0, $event.target.value)}}})]),_vm._v(\" \"),_c('div',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.new_password')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.changePasswordInputs[1]),expression:\"changePasswordInputs[1]\"}],attrs:{\"type\":\"password\"},domProps:{\"value\":(_vm.changePasswordInputs[1])},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.changePasswordInputs, 1, $event.target.value)}}})]),_vm._v(\" \"),_c('div',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.confirm_new_password')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.changePasswordInputs[2]),expression:\"changePasswordInputs[2]\"}],attrs:{\"type\":\"password\"},domProps:{\"value\":(_vm.changePasswordInputs[2])},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.changePasswordInputs, 2, $event.target.value)}}})]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.changePassword}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")]),_vm._v(\" \"),(_vm.changedPassword)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.changed_password'))+\"\\n \")]):(_vm.changePasswordError !== false)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.change_password_error'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.changePasswordError)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.changePasswordError)+\"\\n \")]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.oauth_tokens')))]),_vm._v(\" \"),_c('table',{staticClass:\"oauth-tokens\"},[_c('thead',[_c('tr',[_c('th',[_vm._v(_vm._s(_vm.$t('settings.app_name')))]),_vm._v(\" \"),_c('th',[_vm._v(_vm._s(_vm.$t('settings.valid_until')))]),_vm._v(\" \"),_c('th')])]),_vm._v(\" \"),_c('tbody',_vm._l((_vm.oauthTokens),function(oauthToken){return _c('tr',{key:oauthToken.id},[_c('td',[_vm._v(_vm._s(oauthToken.appName))]),_vm._v(\" \"),_c('td',[_vm._v(_vm._s(oauthToken.validUntil))]),_vm._v(\" \"),_c('td',{staticClass:\"actions\"},[_c('button',{staticClass:\"btn btn-default\",on:{\"click\":function($event){_vm.revokeToken(oauthToken.id)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.revoke_token'))+\"\\n \")])])])}),0)])]),_vm._v(\" \"),_c('mfa'),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.delete_account')))]),_vm._v(\" \"),(!_vm.deletingAccount)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.delete_account_description'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.deletingAccount)?_c('div',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.delete_account_instructions')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('login.password')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.deleteAccountConfirmPasswordInput),expression:\"deleteAccountConfirmPasswordInput\"}],attrs:{\"type\":\"password\"},domProps:{\"value\":(_vm.deleteAccountConfirmPasswordInput)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.deleteAccountConfirmPasswordInput=$event.target.value}}}),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.deleteAccount}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.delete_account'))+\"\\n \")])]):_vm._e(),_vm._v(\" \"),(_vm.deleteAccountError !== false)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.delete_account_error'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.deleteAccountError)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.deleteAccountError)+\"\\n \")]):_vm._e(),_vm._v(\" \"),(!_vm.deletingAccount)?_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.confirmDelete}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")]):_vm._e()])],1),_vm._v(\" \"),(_vm.pleromaBackend)?_c('div',{attrs:{\"label\":_vm.$t('settings.notifications')}},[_c('div',{staticClass:\"setting-item\"},[_c('div',{staticClass:\"select-multiple\"},[_c('span',{staticClass:\"label\"},[_vm._v(_vm._s(_vm.$t('settings.notification_setting')))]),_vm._v(\" \"),_c('ul',{staticClass:\"option-list\"},[_c('li',[_c('Checkbox',{model:{value:(_vm.notificationSettings.follows),callback:function ($$v) {_vm.$set(_vm.notificationSettings, \"follows\", $$v)},expression:\"notificationSettings.follows\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.notification_setting_follows'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.notificationSettings.followers),callback:function ($$v) {_vm.$set(_vm.notificationSettings, \"followers\", $$v)},expression:\"notificationSettings.followers\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.notification_setting_followers'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.notificationSettings.non_follows),callback:function ($$v) {_vm.$set(_vm.notificationSettings, \"non_follows\", $$v)},expression:\"notificationSettings.non_follows\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.notification_setting_non_follows'))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('Checkbox',{model:{value:(_vm.notificationSettings.non_followers),callback:function ($$v) {_vm.$set(_vm.notificationSettings, \"non_followers\", $$v)},expression:\"notificationSettings.non_followers\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.notification_setting_non_followers'))+\"\\n \")])],1)])]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.notification_mutes')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.notification_blocks')))]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.updateNotificationSettings}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.submit'))+\"\\n \")])])]):_vm._e(),_vm._v(\" \"),(_vm.pleromaBackend)?_c('div',{attrs:{\"label\":_vm.$t('settings.data_import_export_tab')}},[_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.follow_import')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.import_followers_from_a_csv_file')))]),_vm._v(\" \"),_c('Importer',{attrs:{\"submit-handler\":_vm.importFollows,\"success-message\":_vm.$t('settings.follows_imported'),\"error-message\":_vm.$t('settings.follow_import_error')}})],1),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.follow_export')))]),_vm._v(\" \"),_c('Exporter',{attrs:{\"get-content\":_vm.getFollowsContent,\"filename\":\"friends.csv\",\"export-button-label\":_vm.$t('settings.follow_export_button')}})],1),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.block_import')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('settings.import_blocks_from_a_csv_file')))]),_vm._v(\" \"),_c('Importer',{attrs:{\"submit-handler\":_vm.importBlocks,\"success-message\":_vm.$t('settings.blocks_imported'),\"error-message\":_vm.$t('settings.block_import_error')}})],1),_vm._v(\" \"),_c('div',{staticClass:\"setting-item\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('settings.block_export')))]),_vm._v(\" \"),_c('Exporter',{attrs:{\"get-content\":_vm.getBlocksContent,\"filename\":\"blocks.csv\",\"export-button-label\":_vm.$t('settings.block_export_button')}})],1)]):_vm._e(),_vm._v(\" \"),_c('div',{attrs:{\"label\":_vm.$t('settings.blocks_tab')}},[_c('div',{staticClass:\"profile-edit-usersearch-wrapper\"},[_c('Autosuggest',{attrs:{\"filter\":_vm.filterUnblockedUsers,\"query\":_vm.queryUserIds,\"placeholder\":_vm.$t('settings.search_user_to_block')},scopedSlots:_vm._u([{key:\"default\",fn:function(row){return _c('BlockCard',{attrs:{\"user-id\":row.item}})}}])})],1),_vm._v(\" \"),_c('BlockList',{attrs:{\"refresh\":true,\"get-key\":_vm.identity},scopedSlots:_vm._u([{key:\"header\",fn:function(ref){\nvar selected = ref.selected;\nreturn [_c('div',{staticClass:\"profile-edit-bulk-actions\"},[(selected.length > 0)?_c('ProgressButton',{staticClass:\"btn btn-default\",attrs:{\"click\":function () { return _vm.blockUsers(selected); }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.block'))+\"\\n \"),_c('template',{slot:\"progress\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.block_progress'))+\"\\n \")])],2):_vm._e(),_vm._v(\" \"),(selected.length > 0)?_c('ProgressButton',{staticClass:\"btn btn-default\",attrs:{\"click\":function () { return _vm.unblockUsers(selected); }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.unblock'))+\"\\n \"),_c('template',{slot:\"progress\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.unblock_progress'))+\"\\n \")])],2):_vm._e()],1)]}},{key:\"item\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('BlockCard',{attrs:{\"user-id\":item}})]}}])},[_c('template',{slot:\"empty\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.no_blocks'))+\"\\n \")])],2)],1),_vm._v(\" \"),_c('div',{attrs:{\"label\":_vm.$t('settings.mutes_tab')}},[_c('div',{staticClass:\"profile-edit-usersearch-wrapper\"},[_c('Autosuggest',{attrs:{\"filter\":_vm.filterUnMutedUsers,\"query\":_vm.queryUserIds,\"placeholder\":_vm.$t('settings.search_user_to_mute')},scopedSlots:_vm._u([{key:\"default\",fn:function(row){return _c('MuteCard',{attrs:{\"user-id\":row.item}})}}])})],1),_vm._v(\" \"),_c('MuteList',{attrs:{\"refresh\":true,\"get-key\":_vm.identity},scopedSlots:_vm._u([{key:\"header\",fn:function(ref){\nvar selected = ref.selected;\nreturn [_c('div',{staticClass:\"profile-edit-bulk-actions\"},[(selected.length > 0)?_c('ProgressButton',{staticClass:\"btn btn-default\",attrs:{\"click\":function () { return _vm.muteUsers(selected); }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.mute'))+\"\\n \"),_c('template',{slot:\"progress\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.mute_progress'))+\"\\n \")])],2):_vm._e(),_vm._v(\" \"),(selected.length > 0)?_c('ProgressButton',{staticClass:\"btn btn-default\",attrs:{\"click\":function () { return _vm.unmuteUsers(selected); }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.unmute'))+\"\\n \"),_c('template',{slot:\"progress\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.unmute_progress'))+\"\\n \")])],2):_vm._e()],1)]}},{key:\"item\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('MuteCard',{attrs:{\"user-id\":item}})]}}])},[_c('template',{slot:\"empty\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('settings.no_mutes'))+\"\\n \")])],2)],1)])],1)])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('basic-user-card',{attrs:{\"user\":_vm.user}},[_c('div',{staticClass:\"follow-request-card-content-container\"},[_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.approveUser}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.approve'))+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",on:{\"click\":_vm.denyUser}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_card.deny'))+\"\\n \")])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"settings panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('nav.friend_requests'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},_vm._l((_vm.requests),function(request){return _c('FollowRequestCard',{key:request.id,staticClass:\"list-item\",attrs:{\"user\":request}})}),1)])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h1',[_vm._v(\"...\")])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"login panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('login.login'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[_c('form',{staticClass:\"login-form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.submit($event)}}},[(_vm.isPasswordAuth)?[_c('div',{staticClass:\"form-group\"},[_c('label',{attrs:{\"for\":\"username\"}},[_vm._v(_vm._s(_vm.$t('login.username')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.username),expression:\"user.username\"}],staticClass:\"form-control\",attrs:{\"id\":\"username\",\"disabled\":_vm.loggingIn,\"placeholder\":_vm.$t('login.placeholder')},domProps:{\"value\":(_vm.user.username)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.user, \"username\", $event.target.value)}}})]),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('label',{attrs:{\"for\":\"password\"}},[_vm._v(_vm._s(_vm.$t('login.password')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.password),expression:\"user.password\"}],ref:\"passwordInput\",staticClass:\"form-control\",attrs:{\"id\":\"password\",\"disabled\":_vm.loggingIn,\"type\":\"password\"},domProps:{\"value\":(_vm.user.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.user, \"password\", $event.target.value)}}})]),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('router-link',{attrs:{\"to\":{name: 'password-reset'}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('password_reset.forgot_password'))+\"\\n \")])],1)]:_vm._e(),_vm._v(\" \"),(_vm.isTokenAuth)?_c('div',{staticClass:\"form-group\"},[_c('p',[_vm._v(_vm._s(_vm.$t('login.description')))])]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"login-bottom\"},[_c('div',[(_vm.registrationOpen)?_c('router-link',{staticClass:\"register\",attrs:{\"to\":{name: 'registration'}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('login.register'))+\"\\n \")]):_vm._e()],1),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.loggingIn,\"type\":\"submit\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('login.login'))+\"\\n \")])])])],2)]),_vm._v(\" \"),(_vm.error)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \"),_c('i',{staticClass:\"button-icon icon-cancel\",on:{\"click\":_vm.clearError}})])]):_vm._e()])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"login panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('login.heading.recovery'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[_c('form',{staticClass:\"login-form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.submit($event)}}},[_c('div',{staticClass:\"form-group\"},[_c('label',{attrs:{\"for\":\"code\"}},[_vm._v(_vm._s(_vm.$t('login.recovery_code')))]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.code),expression:\"code\"}],staticClass:\"form-control\",attrs:{\"id\":\"code\"},domProps:{\"value\":(_vm.code)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.code=$event.target.value}}})]),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"login-bottom\"},[_c('div',[_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.requireTOTP($event)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('login.enter_two_factor_code'))+\"\\n \")]),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.abortMFA($event)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.cancel'))+\"\\n \")])]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"type\":\"submit\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.verify'))+\"\\n \")])])])])]),_vm._v(\" \"),(_vm.error)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \"),_c('i',{staticClass:\"button-icon icon-cancel\",on:{\"click\":_vm.clearError}})])]):_vm._e()])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"login panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('login.heading.totp'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[_c('form',{staticClass:\"login-form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.submit($event)}}},[_c('div',{staticClass:\"form-group\"},[_c('label',{attrs:{\"for\":\"code\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('login.authentication_code'))+\"\\n \")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.code),expression:\"code\"}],staticClass:\"form-control\",attrs:{\"id\":\"code\"},domProps:{\"value\":(_vm.code)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.code=$event.target.value}}})]),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"login-bottom\"},[_c('div',[_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.requireRecovery($event)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('login.enter_recovery_code'))+\"\\n \")]),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.abortMFA($event)}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.cancel'))+\"\\n \")])]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default\",attrs:{\"type\":\"submit\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('general.verify'))+\"\\n \")])])])])]),_vm._v(\" \"),(_vm.error)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \"),_c('i',{staticClass:\"button-icon icon-cancel\",on:{\"click\":_vm.clearError}})])]):_vm._e()])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.collapsed || !_vm.floating)?_c('div',{staticClass:\"chat-panel\"},[_c('div',{staticClass:\"panel panel-default\"},[_c('div',{staticClass:\"panel-heading timeline-heading\",class:{ 'chat-heading': _vm.floating },on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.togglePanel($event)}}},[_c('div',{staticClass:\"title\"},[_c('span',[_vm._v(_vm._s(_vm.$t('chat.title')))]),_vm._v(\" \"),(_vm.floating)?_c('i',{staticClass:\"icon-cancel\"}):_vm._e()])]),_vm._v(\" \"),_c('div',{directives:[{name:\"chat-scroll\",rawName:\"v-chat-scroll\"}],staticClass:\"chat-window\"},_vm._l((_vm.messages),function(message){return _c('div',{key:message.id,staticClass:\"chat-message\"},[_c('span',{staticClass:\"chat-avatar\"},[_c('img',{attrs:{\"src\":message.author.avatar}})]),_vm._v(\" \"),_c('div',{staticClass:\"chat-content\"},[_c('router-link',{staticClass:\"chat-name\",attrs:{\"to\":_vm.userProfileLink(message.author)}},[_vm._v(\"\\n \"+_vm._s(message.author.username)+\"\\n \")]),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('span',{staticClass:\"chat-text\"},[_vm._v(\"\\n \"+_vm._s(message.text)+\"\\n \")])],1)])}),0),_vm._v(\" \"),_c('div',{staticClass:\"chat-input\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.currentMessage),expression:\"currentMessage\"}],staticClass:\"chat-input-textarea\",attrs:{\"rows\":\"1\"},domProps:{\"value\":(_vm.currentMessage)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }_vm.submit(_vm.currentMessage)},\"input\":function($event){if($event.target.composing){ return; }_vm.currentMessage=$event.target.value}}})])])]):_c('div',{staticClass:\"chat-panel\"},[_c('div',{staticClass:\"panel panel-default\"},[_c('div',{staticClass:\"panel-heading stub timeline-heading chat-heading\",on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.togglePanel($event)}}},[_c('div',{staticClass:\"title\"},[_c('i',{staticClass:\"icon-comment-empty\"}),_vm._v(\"\\n \"+_vm._s(_vm.$t('chat.title'))+\"\\n \")])])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('who_to_follow.who_to_follow'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},_vm._l((_vm.users),function(user){return _c('FollowCard',{key:user.id,staticClass:\"list-item\",attrs:{\"user\":user}})}),1)])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"instance-specific-panel\"},[_c('div',{staticClass:\"panel panel-default\"},[_c('div',{staticClass:\"panel-body\"},[_c('div',{domProps:{\"innerHTML\":_vm._s(_vm.instanceSpecificPanelContent)}})])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"features-panel\"},[_c('div',{staticClass:\"panel panel-default base01-background\"},[_c('div',{staticClass:\"panel-heading timeline-heading base02-background base04\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('features_panel.title'))+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body features-panel\"},[_c('ul',[(_vm.chat)?_c('li',[_vm._v(\"\\n \"+_vm._s(_vm.$t('features_panel.chat'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.gopher)?_c('li',[_vm._v(\"\\n \"+_vm._s(_vm.$t('features_panel.gopher'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.whoToFollow)?_c('li',[_vm._v(\"\\n \"+_vm._s(_vm.$t('features_panel.who_to_follow'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.mediaProxy)?_c('li',[_vm._v(\"\\n \"+_vm._s(_vm.$t('features_panel.media_proxy'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),_c('li',[_vm._v(_vm._s(_vm.$t('features_panel.scope_options')))]),_vm._v(\" \"),_c('li',[_vm._v(_vm._s(_vm.$t('features_panel.text_limit'))+\" = \"+_vm._s(_vm.textlimit))])])])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"panel panel-default\"},[_c('div',{staticClass:\"panel-body\"},[_c('div',{staticClass:\"tos-content\",domProps:{\"innerHTML\":_vm._s(_vm.content)}})])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"sidebar\"},[_c('instance-specific-panel'),_vm._v(\" \"),(_vm.showFeaturesPanel)?_c('features-panel'):_vm._e(),_vm._v(\" \"),_c('terms-of-service-panel')],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('remote_user_resolver.remote_user_resolver'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('remote_user_resolver.searching_for'))+\" @\"+_vm._s(_vm.$route.params.username)+\"@\"+_vm._s(_vm.$route.params.hostname)+\"\\n \")]),_vm._v(\" \"),(_vm.error)?_c('p',[_vm._v(\"\\n \"+_vm._s(_vm.$t('remote_user_resolver.error'))+\"\\n \")]):_vm._e()])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"user-panel\"},[(_vm.signedIn)?_c('div',{key:\"user-panel\",staticClass:\"panel panel-default signed-in\"},[_c('UserCard',{attrs:{\"user\":_vm.user,\"hide-bio\":true,\"rounded\":\"top\"}}),_vm._v(\" \"),_c('div',{staticClass:\"panel-footer\"},[_c('PostStatusForm')],1)],1):_c('auth-form',{key:\"user-panel\"})],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"nav-panel\"},[_c('div',{staticClass:\"panel panel-default\"},[_c('ul',[(_vm.currentUser)?_c('li',[_c('router-link',{attrs:{\"to\":{ name: 'friends' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.timeline\"))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),(_vm.currentUser)?_c('li',[_c('router-link',{attrs:{\"to\":{ name: 'interactions', params: { username: _vm.currentUser.screen_name } }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.interactions\"))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),(_vm.currentUser)?_c('li',[_c('router-link',{attrs:{\"to\":{ name: 'dms', params: { username: _vm.currentUser.screen_name } }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.dms\"))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),(_vm.currentUser && _vm.currentUser.locked)?_c('li',[_c('router-link',{attrs:{\"to\":{ name: 'friend-requests' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.friend_requests\"))+\"\\n \"),(_vm.followRequestCount > 0)?_c('span',{staticClass:\"badge follow-request-count\"},[_vm._v(\"\\n \"+_vm._s(_vm.followRequestCount)+\"\\n \")]):_vm._e()])],1):_vm._e(),_vm._v(\" \"),_c('li',[_c('router-link',{attrs:{\"to\":{ name: 'public-timeline' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.public_tl\"))+\"\\n \")])],1),_vm._v(\" \"),_c('li',[_c('router-link',{attrs:{\"to\":{ name: 'public-external-timeline' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.twkn\"))+\"\\n \")])],1)])])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"search-bar-container\"},[(_vm.loading)?_c('i',{staticClass:\"icon-spin4 finder-icon animate-spin-slow\"}):_vm._e(),_vm._v(\" \"),(_vm.hidden)?_c('a',{attrs:{\"href\":\"#\",\"title\":_vm.$t('nav.search')}},[_c('i',{staticClass:\"button-icon icon-search\",on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.toggleHidden($event)}}})]):[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.searchTerm),expression:\"searchTerm\"}],ref:\"searchInput\",staticClass:\"search-bar-input\",attrs:{\"id\":\"search-bar-input\",\"placeholder\":_vm.$t('nav.search'),\"type\":\"text\"},domProps:{\"value\":(_vm.searchTerm)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }_vm.find(_vm.searchTerm)},\"input\":function($event){if($event.target.composing){ return; }_vm.searchTerm=$event.target.value}}}),_vm._v(\" \"),_c('button',{staticClass:\"btn search-button\",on:{\"click\":function($event){_vm.find(_vm.searchTerm)}}},[_c('i',{staticClass:\"icon-search\"})]),_vm._v(\" \"),_c('i',{staticClass:\"button-icon icon-cancel\",on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.toggleHidden($event)}}})]],2)])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"who-to-follow-panel\"},[_c('div',{staticClass:\"panel panel-default base01-background\"},[_c('div',{staticClass:\"panel-heading timeline-heading base02-background base04\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('who_to_follow.who_to_follow'))+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"who-to-follow\"},[_vm._l((_vm.usersToFollow),function(user){return _c('p',{key:user.id,staticClass:\"who-to-follow-items\"},[_c('img',{attrs:{\"src\":user.img}}),_vm._v(\" \"),_c('router-link',{attrs:{\"to\":_vm.userProfileLink(user.id, user.name)}},[_vm._v(\"\\n \"+_vm._s(user.name)+\"\\n \")]),_c('br')],1)}),_vm._v(\" \"),_c('p',{staticClass:\"who-to-follow-more\"},[_c('router-link',{attrs:{\"to\":{ name: 'who-to-follow' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('who_to_follow.more'))+\"\\n \")])],1)],2)])])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isOpen),expression:\"isOpen\"},{name:\"body-scroll-lock\",rawName:\"v-body-scroll-lock\",value:(_vm.isOpen),expression:\"isOpen\"}],staticClass:\"modal-view\",on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }_vm.$emit('backdropClicked')}}},[_vm._t(\"default\")],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showing)?_c('Modal',{staticClass:\"media-modal-view\",on:{\"backdropClicked\":_vm.hide}},[(_vm.type === 'image')?_c('img',{staticClass:\"modal-image\",attrs:{\"src\":_vm.currentMedia.url},on:{\"touchstart\":function($event){$event.stopPropagation();return _vm.mediaTouchStart($event)},\"touchmove\":function($event){$event.stopPropagation();return _vm.mediaTouchMove($event)}}}):_vm._e(),_vm._v(\" \"),(_vm.type === 'video')?_c('VideoAttachment',{staticClass:\"modal-image\",attrs:{\"attachment\":_vm.currentMedia,\"controls\":true},nativeOn:{\"click\":function($event){$event.stopPropagation();}}}):_vm._e(),_vm._v(\" \"),(_vm.canNavigate)?_c('button',{staticClass:\"modal-view-button-arrow modal-view-button-arrow--prev\",attrs:{\"title\":_vm.$t('media_modal.previous')},on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.goPrev($event)}}},[_c('i',{staticClass:\"icon-left-open arrow-icon\"})]):_vm._e(),_vm._v(\" \"),(_vm.canNavigate)?_c('button',{staticClass:\"modal-view-button-arrow modal-view-button-arrow--next\",attrs:{\"title\":_vm.$t('media_modal.next')},on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.goNext($event)}}},[_c('i',{staticClass:\"icon-right-open arrow-icon\"})]):_vm._e()],1):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"side-drawer-container\",class:{ 'side-drawer-container-closed': _vm.closed, 'side-drawer-container-open': !_vm.closed }},[_c('div',{staticClass:\"side-drawer-darken\",class:{ 'side-drawer-darken-closed': _vm.closed}}),_vm._v(\" \"),_c('div',{staticClass:\"side-drawer\",class:{'side-drawer-closed': _vm.closed},on:{\"touchstart\":_vm.touchStart,\"touchmove\":_vm.touchMove}},[_c('div',{staticClass:\"side-drawer-heading\",on:{\"click\":_vm.toggleDrawer}},[(_vm.currentUser)?_c('UserCard',{attrs:{\"user\":_vm.currentUser,\"hide-bio\":true}}):_c('div',{staticClass:\"side-drawer-logo-wrapper\"},[_c('img',{attrs:{\"src\":_vm.logo}}),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.sitename))])])],1),_vm._v(\" \"),_c('ul',[(!_vm.currentUser)?_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":{ name: 'login' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"login.login\"))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),(_vm.currentUser)?_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":{ name: 'dms', params: { username: _vm.currentUser.screen_name } }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.dms\"))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),(_vm.currentUser)?_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":{ name: 'interactions', params: { username: _vm.currentUser.screen_name } }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.interactions\"))+\"\\n \")])],1):_vm._e()]),_vm._v(\" \"),_c('ul',[(_vm.currentUser)?_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":{ name: 'friends' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.timeline\"))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),(_vm.currentUser && _vm.currentUser.locked)?_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":\"/friend-requests\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.friend_requests\"))+\"\\n \"),(_vm.followRequestCount > 0)?_c('span',{staticClass:\"badge follow-request-count\"},[_vm._v(\"\\n \"+_vm._s(_vm.followRequestCount)+\"\\n \")]):_vm._e()])],1):_vm._e(),_vm._v(\" \"),_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":\"/main/public\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.public_tl\"))+\"\\n \")])],1),_vm._v(\" \"),_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":\"/main/all\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.twkn\"))+\"\\n \")])],1),_vm._v(\" \"),(_vm.currentUser && _vm.chat)?_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":{ name: 'chat' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.chat\"))+\"\\n \")])],1):_vm._e()]),_vm._v(\" \"),_c('ul',[_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":{ name: 'search' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.search\"))+\"\\n \")])],1),_vm._v(\" \"),(_vm.currentUser && _vm.suggestionsEnabled)?_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":{ name: 'who-to-follow' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.who_to_follow\"))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":{ name: 'settings' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"settings.settings\"))+\"\\n \")])],1),_vm._v(\" \"),_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('router-link',{attrs:{\"to\":{ name: 'about'}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.about\"))+\"\\n \")])],1),_vm._v(\" \"),(_vm.currentUser && _vm.currentUser.role === 'admin')?_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('a',{attrs:{\"href\":\"/pleroma/admin/#/login-pleroma\",\"target\":\"_blank\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"nav.administration\"))+\"\\n \")])]):_vm._e(),_vm._v(\" \"),(_vm.currentUser)?_c('li',{on:{\"click\":_vm.toggleDrawer}},[_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":_vm.doLogout}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"login.logout\"))+\"\\n \")])]):_vm._e()])]),_vm._v(\" \"),_c('div',{staticClass:\"side-drawer-click-outside\",class:{'side-drawer-click-outside-closed': _vm.closed},on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.toggleDrawer($event)}}})])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isLoggedIn)?_c('div',[_c('button',{staticClass:\"new-status-button\",class:{ 'hidden': _vm.isHidden },on:{\"click\":_vm.openPostForm}},[_c('i',{staticClass:\"icon-edit\"})])]):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('nav',{staticClass:\"nav-bar container\",attrs:{\"id\":\"nav\"}},[_c('div',{staticClass:\"mobile-inner-nav\",on:{\"click\":function($event){_vm.scrollToTop()}}},[_c('div',{staticClass:\"item\"},[_c('a',{staticClass:\"mobile-nav-button\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();_vm.toggleMobileSidebar()}}},[_c('i',{staticClass:\"button-icon icon-menu\"})]),_vm._v(\" \"),_c('router-link',{staticClass:\"site-name\",attrs:{\"to\":{ name: 'root' },\"active-class\":\"home\"}},[_vm._v(\"\\n \"+_vm._s(_vm.sitename)+\"\\n \")])],1),_vm._v(\" \"),_c('div',{staticClass:\"item right\"},[(_vm.currentUser)?_c('a',{staticClass:\"mobile-nav-button\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();_vm.openMobileNotifications()}}},[_c('i',{staticClass:\"button-icon icon-bell-alt\"}),_vm._v(\" \"),(_vm.unseenNotificationsCount)?_c('div',{staticClass:\"alert-dot\"}):_vm._e()]):_vm._e()])])]),_vm._v(\" \"),(_vm.currentUser)?_c('div',{staticClass:\"mobile-notifications-drawer\",class:{ 'closed': !_vm.notificationsOpen },on:{\"touchstart\":function($event){$event.stopPropagation();return _vm.notificationsTouchStart($event)},\"touchmove\":function($event){$event.stopPropagation();return _vm.notificationsTouchMove($event)}}},[_c('div',{staticClass:\"mobile-notifications-header\"},[_c('span',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.$t('notifications.notifications')))]),_vm._v(\" \"),_c('a',{staticClass:\"mobile-nav-button\",on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();_vm.closeMobileNotifications()}}},[_c('i',{staticClass:\"button-icon icon-cancel\"})])]),_vm._v(\" \"),_c('div',{staticClass:\"mobile-notifications\",on:{\"scroll\":_vm.onScroll}},[_c('Notifications',{ref:\"notifications\",attrs:{\"no-heading\":true}})],1)]):_vm._e(),_vm._v(\" \"),_c('SideDrawer',{ref:\"sideDrawer\",attrs:{\"logout\":_vm.logout}})],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isOpen)?_c('Modal',{on:{\"backdropClicked\":_vm.closeModal}},[_c('div',{staticClass:\"user-reporting-panel panel\"},[_c('div',{staticClass:\"panel-heading\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_reporting.title', [_vm.user.screen_name]))+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[_c('div',{staticClass:\"user-reporting-panel-left\"},[_c('div',[_c('p',[_vm._v(_vm._s(_vm.$t('user_reporting.add_comment_description')))]),_vm._v(\" \"),_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.comment),expression:\"comment\"}],staticClass:\"form-control\",attrs:{\"placeholder\":_vm.$t('user_reporting.additional_comments'),\"rows\":\"1\"},domProps:{\"value\":(_vm.comment)},on:{\"input\":[function($event){if($event.target.composing){ return; }_vm.comment=$event.target.value},_vm.resize]}})]),_vm._v(\" \"),(!_vm.user.is_local)?_c('div',[_c('p',[_vm._v(_vm._s(_vm.$t('user_reporting.forward_description')))]),_vm._v(\" \"),_c('Checkbox',{model:{value:(_vm.forward),callback:function ($$v) {_vm.forward=$$v},expression:\"forward\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_reporting.forward_to', [_vm.remoteInstance]))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),_c('div',[_c('button',{staticClass:\"btn btn-default\",attrs:{\"disabled\":_vm.processing},on:{\"click\":_vm.reportUser}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_reporting.submit'))+\"\\n \")]),_vm._v(\" \"),(_vm.error)?_c('div',{staticClass:\"alert error\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('user_reporting.generic_error'))+\"\\n \")]):_vm._e()])]),_vm._v(\" \"),_c('div',{staticClass:\"user-reporting-panel-right\"},[_c('List',{attrs:{\"items\":_vm.statuses},scopedSlots:_vm._u([{key:\"item\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"status-fadein user-reporting-panel-sitem\"},[_c('Status',{attrs:{\"in-conversation\":false,\"focused\":false,\"statusoid\":item}}),_vm._v(\" \"),_c('Checkbox',{attrs:{\"checked\":_vm.isChecked(item.id)},on:{\"change\":function (checked) { return _vm.toggleStatus(checked, item.id); }}})],1)]}}])})],1)])])]):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isLoggedIn && !_vm.resettingForm)?_c('Modal',{staticClass:\"post-form-modal-view\",attrs:{\"is-open\":_vm.modalActivated},on:{\"backdropClicked\":_vm.closeModal}},[_c('div',{staticClass:\"post-form-modal-panel panel\"},[_c('div',{staticClass:\"panel-heading\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('post_status.new_status'))+\"\\n \")]),_vm._v(\" \"),_c('PostStatusForm',_vm._b({staticClass:\"panel-body\",on:{\"posted\":_vm.closeModal}},'PostStatusForm',_vm.params,false))],1)]):_vm._e()}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{style:(_vm.bgAppStyle),attrs:{\"id\":\"app\"}},[_c('div',{staticClass:\"app-bg-wrapper\",style:(_vm.bgStyle),attrs:{\"id\":\"app_bg_wrapper\"}}),_vm._v(\" \"),(_vm.isMobileLayout)?_c('MobileNav'):_c('nav',{staticClass:\"nav-bar container\",attrs:{\"id\":\"nav\"},on:{\"click\":function($event){_vm.scrollToTop()}}},[_c('div',{staticClass:\"inner-nav\"},[_c('div',{staticClass:\"logo\",style:(_vm.logoBgStyle)},[_c('div',{staticClass:\"mask\",style:(_vm.logoMaskStyle)}),_vm._v(\" \"),_c('img',{style:(_vm.logoStyle),attrs:{\"src\":_vm.logo}})]),_vm._v(\" \"),_c('div',{staticClass:\"item\"},[_c('router-link',{staticClass:\"site-name\",attrs:{\"to\":{ name: 'root' },\"active-class\":\"home\"}},[_vm._v(\"\\n \"+_vm._s(_vm.sitename)+\"\\n \")])],1),_vm._v(\" \"),_c('div',{staticClass:\"item right\"},[_c('search-bar',{staticClass:\"nav-icon mobile-hidden\",on:{\"toggled\":_vm.onSearchBarToggled},nativeOn:{\"click\":function($event){$event.stopPropagation();}}}),_vm._v(\" \"),_c('router-link',{staticClass:\"mobile-hidden\",attrs:{\"to\":{ name: 'settings'}}},[_c('i',{staticClass:\"button-icon icon-cog nav-icon\",attrs:{\"title\":_vm.$t('nav.preferences')}})]),_vm._v(\" \"),(_vm.currentUser && _vm.currentUser.role === 'admin')?_c('a',{staticClass:\"mobile-hidden\",attrs:{\"href\":\"/pleroma/admin/#/login-pleroma\",\"target\":\"_blank\"}},[_c('i',{staticClass:\"button-icon icon-gauge nav-icon\",attrs:{\"title\":_vm.$t('nav.administration')}})]):_vm._e(),_vm._v(\" \"),(_vm.currentUser)?_c('a',{staticClass:\"mobile-hidden\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.logout($event)}}},[_c('i',{staticClass:\"button-icon icon-logout nav-icon\",attrs:{\"title\":_vm.$t('login.logout')}})]):_vm._e()],1)])]),_vm._v(\" \"),_c('div',{staticClass:\"container\",attrs:{\"id\":\"content\"}},[_c('div',{staticClass:\"sidebar-flexer mobile-hidden\"},[_c('div',{staticClass:\"sidebar-bounds\"},[_c('div',{staticClass:\"sidebar-scroller\"},[_c('div',{staticClass:\"sidebar\"},[_c('user-panel'),_vm._v(\" \"),(!_vm.isMobileLayout)?_c('div',[_c('nav-panel'),_vm._v(\" \"),(_vm.showInstanceSpecificPanel)?_c('instance-specific-panel'):_vm._e(),_vm._v(\" \"),(!_vm.currentUser && _vm.showFeaturesPanel)?_c('features-panel'):_vm._e(),_vm._v(\" \"),(_vm.currentUser && _vm.suggestionsEnabled)?_c('who-to-follow-panel'):_vm._e(),_vm._v(\" \"),(_vm.currentUser)?_c('notifications'):_vm._e()],1):_vm._e()],1)])])]),_vm._v(\" \"),_c('div',{staticClass:\"main\"},[(!_vm.currentUser)?_c('div',{staticClass:\"login-hint panel panel-default\"},[_c('router-link',{staticClass:\"panel-body\",attrs:{\"to\":{ name: 'login' }}},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"login.hint\"))+\"\\n \")])],1):_vm._e(),_vm._v(\" \"),_c('transition',{attrs:{\"name\":\"fade\"}},[_c('router-view')],1)],1),_vm._v(\" \"),_c('media-modal')],1),_vm._v(\" \"),(_vm.currentUser && _vm.chat)?_c('chat-panel',{staticClass:\"floating-chat mobile-hidden\",attrs:{\"floating\":true}}):_vm._e(),_vm._v(\" \"),_c('MobilePostStatusButton'),_vm._v(\" \"),_c('UserReportingModal'),_vm._v(\" \"),_c('PostStatusModal'),_vm._v(\" \"),_c('portal-target',{attrs:{\"name\":\"modal\"}})],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","import { map } from 'lodash'\nimport apiService from '../api/api.service.js'\n\nconst postStatus = ({ store, status, spoilerText, visibility, sensitive, poll, media = [], inReplyToStatusId = undefined, contentType = 'text/plain' }) => {\n const mediaIds = map(media, 'id')\n\n return apiService.postStatus({\n credentials: store.state.users.currentUser.credentials,\n status,\n spoilerText,\n visibility,\n sensitive,\n mediaIds,\n inReplyToStatusId,\n contentType,\n poll })\n .then((data) => {\n if (!data.error) {\n store.dispatch('addNewStatuses', {\n statuses: [data],\n timeline: 'friends',\n showImmediately: true,\n noIdUpdate: true // To prevent missing notices on next pull.\n })\n }\n return data\n })\n .catch((err) => {\n return {\n error: err.message\n }\n })\n}\n\nconst uploadMedia = ({ store, formData }) => {\n const credentials = store.state.users.currentUser.credentials\n\n return apiService.uploadMedia({ credentials, formData })\n}\n\nconst statusPosterService = {\n postStatus,\n uploadMedia\n}\n\nexport default statusPosterService\n","import { camelCase } from 'lodash'\n\nimport apiService from '../api/api.service.js'\n\nconst update = ({ store, statuses, timeline, showImmediately, userId }) => {\n const ccTimeline = camelCase(timeline)\n\n store.dispatch('setError', { value: false })\n\n store.dispatch('addNewStatuses', {\n timeline: ccTimeline,\n userId,\n statuses,\n showImmediately\n })\n}\n\nconst fetchAndUpdate = ({\n store,\n credentials,\n timeline = 'friends',\n older = false,\n showImmediately = false,\n userId = false,\n tag = false,\n until\n}) => {\n const args = { timeline, credentials }\n const rootState = store.rootState || store.state\n const { getters } = store\n const timelineData = rootState.statuses.timelines[camelCase(timeline)]\n const hideMutedPosts = getters.mergedConfig.hideMutedPosts\n\n if (older) {\n args['until'] = until || timelineData.minId\n } else {\n args['since'] = timelineData.maxId\n }\n\n args['userId'] = userId\n args['tag'] = tag\n args['withMuted'] = !hideMutedPosts\n\n const numStatusesBeforeFetch = timelineData.statuses.length\n\n return apiService.fetchTimeline(args)\n .then((statuses) => {\n if (!older && statuses.length >= 20 && !timelineData.loading && numStatusesBeforeFetch > 0) {\n store.dispatch('queueFlush', { timeline: timeline, id: timelineData.maxId })\n }\n update({ store, statuses, timeline, showImmediately, userId })\n return statuses\n }, () => store.dispatch('setError', { value: true }))\n}\n\nconst startFetching = ({ timeline = 'friends', credentials, store, userId = false, tag = false }) => {\n const rootState = store.rootState || store.state\n const timelineData = rootState.statuses.timelines[camelCase(timeline)]\n const showImmediately = timelineData.visibleStatuses.length === 0\n timelineData.userId = userId\n fetchAndUpdate({ timeline, credentials, store, showImmediately, userId, tag })\n const boundFetchAndUpdate = () => fetchAndUpdate({ timeline, credentials, store, userId, tag })\n return setInterval(boundFetchAndUpdate, 10000)\n}\nconst timelineFetcher = {\n fetchAndUpdate,\n startFetching\n}\n\nexport default timelineFetcher\n","import apiService from '../api/api.service.js'\n\nconst update = ({ store, notifications, older }) => {\n store.dispatch('setNotificationsError', { value: false })\n\n store.dispatch('addNewNotifications', { notifications, older })\n}\n\nconst fetchAndUpdate = ({ store, credentials, older = false }) => {\n const args = { credentials }\n const { getters } = store\n const rootState = store.rootState || store.state\n const timelineData = rootState.statuses.notifications\n const hideMutedPosts = getters.mergedConfig.hideMutedPosts\n\n args['withMuted'] = !hideMutedPosts\n\n args['timeline'] = 'notifications'\n if (older) {\n if (timelineData.minId !== Number.POSITIVE_INFINITY) {\n args['until'] = timelineData.minId\n }\n return fetchNotifications({ store, args, older })\n } else {\n // fetch new notifications\n if (timelineData.maxId !== Number.POSITIVE_INFINITY) {\n args['since'] = timelineData.maxId\n }\n const result = fetchNotifications({ store, args, older })\n\n // load unread notifications repeatedly to provide consistency between browser tabs\n const notifications = timelineData.data\n const unread = notifications.filter(n => !n.seen).map(n => n.id)\n if (unread.length) {\n args['since'] = Math.min(...unread)\n fetchNotifications({ store, args, older })\n }\n\n return result\n }\n}\n\nconst fetchNotifications = ({ store, args, older }) => {\n return apiService.fetchTimeline(args)\n .then((notifications) => {\n update({ store, notifications, older })\n return notifications\n }, () => store.dispatch('setNotificationsError', { value: true }))\n .catch(() => store.dispatch('setNotificationsError', { value: true }))\n}\n\nconst startFetching = ({ credentials, store }) => {\n fetchAndUpdate({ credentials, store })\n const boundFetchAndUpdate = () => fetchAndUpdate({ credentials, store })\n // Initially there's set flag to silence all desktop notifications so\n // that there won't spam of them when user just opened up the FE we\n // reset that flag after a while to show new notifications once again.\n setTimeout(() => store.dispatch('setNotificationsSilence', false), 10000)\n return setInterval(boundFetchAndUpdate, 10000)\n}\n\nconst notificationsFetcher = {\n fetchAndUpdate,\n startFetching\n}\n\nexport default notificationsFetcher\n","// When contributing, please sort JSON before committing so it would be easier to see what's missing and what's being added compared to English and other languages. It's not obligatory, but just an advice.\n// To sort json use jq https://stedolan.github.io/jq and invoke it like `jq -S . xx.json > xx.sorted.json`, AFAIK, there's no inplace edit option like in sed\n// Also, when adding a new language to \"messages\" variable, please do it alphabetically by language code so that users can search or check their custom language easily.\n\n// For anyone contributing to old huge messages.js and in need to quickly convert it to JSON\n// sed command for converting currently formatted JS to JSON:\n// sed -i -e \"s/'//gm\" -e 's/\"/\\\\\"/gm' -re 's/^( +)(.+?): ((.+?))?(,?)(\\{?)$/\\1\"\\2\": \"\\4\"/gm' -e 's/\\\"\\{\\\"/{/g' -e 's/,\"$/\",/g' file.json\n// There's only problem that apostrophe character ' gets replaced by \\\\ so you have to fix it manually, sorry.\n\nconst messages = {\n ar: require('./ar.json'),\n ca: require('./ca.json'),\n cs: require('./cs.json'),\n de: require('./de.json'),\n en: require('./en.json'),\n eo: require('./eo.json'),\n es: require('./es.json'),\n et: require('./et.json'),\n eu: require('./eu.json'),\n fi: require('./fi.json'),\n fr: require('./fr.json'),\n ga: require('./ga.json'),\n he: require('./he.json'),\n hu: require('./hu.json'),\n it: require('./it.json'),\n ja: require('./ja.json'),\n ja_pedantic: require('./ja_pedantic.json'),\n ko: require('./ko.json'),\n nb: require('./nb.json'),\n nl: require('./nl.json'),\n oc: require('./oc.json'),\n pl: require('./pl.json'),\n pt: require('./pt.json'),\n ro: require('./ro.json'),\n ru: require('./ru.json'),\n te: require('./te.json'),\n zh: require('./zh.json')\n}\n\nexport default messages\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./attachment.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./attachment.js\"\nimport __vue_script__ from \"!!babel-loader!./attachment.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-47ab0ca0\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./attachment.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","/* script */\nexport * from \"!!babel-loader!./video_attachment.js\"\nimport __vue_script__ from \"!!babel-loader!./video_attachment.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-6fce6a82\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./video_attachment.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","export const SECOND = 1000\nexport const MINUTE = 60 * SECOND\nexport const HOUR = 60 * MINUTE\nexport const DAY = 24 * HOUR\nexport const WEEK = 7 * DAY\nexport const MONTH = 30 * DAY\nexport const YEAR = 365.25 * DAY\n\nexport const relativeTime = (date, nowThreshold = 1) => {\n if (typeof date === 'string') date = Date.parse(date)\n const round = Date.now() > date ? Math.floor : Math.ceil\n const d = Math.abs(Date.now() - date)\n let r = { num: round(d / YEAR), key: 'time.years' }\n if (d < nowThreshold * SECOND) {\n r.num = 0\n r.key = 'time.now'\n } else if (d < MINUTE) {\n r.num = round(d / SECOND)\n r.key = 'time.seconds'\n } else if (d < HOUR) {\n r.num = round(d / MINUTE)\n r.key = 'time.minutes'\n } else if (d < DAY) {\n r.num = round(d / HOUR)\n r.key = 'time.hours'\n } else if (d < WEEK) {\n r.num = round(d / DAY)\n r.key = 'time.days'\n } else if (d < MONTH) {\n r.num = round(d / WEEK)\n r.key = 'time.weeks'\n } else if (d < YEAR) {\n r.num = round(d / MONTH)\n r.key = 'time.months'\n }\n // Remove plural form when singular\n if (r.num === 1) r.key = r.key.slice(0, -1)\n return r\n}\n\nexport const relativeTimeShort = (date, nowThreshold = 1) => {\n const r = relativeTime(date, nowThreshold)\n r.key += '_short'\n return r\n}\n","const fileSizeFormat = (num) => {\n var exponent\n var unit\n var units = ['B', 'KiB', 'MiB', 'GiB', 'TiB']\n if (num < 1) {\n return num + ' ' + units[0]\n }\n\n exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1)\n num = (num / Math.pow(1024, exponent)).toFixed(2) * 1\n unit = units[exponent]\n return { num: num, unit: unit }\n}\nconst fileSizeFormatService = {\n fileSizeFormat\n}\nexport default fileSizeFormatService\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./scope_selector.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./scope_selector.js\"\nimport __vue_script__ from \"!!babel-loader!./scope_selector.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-28e8cbf1\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./scope_selector.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./emoji_input.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./emoji_input.js\"\nimport __vue_script__ from \"!!babel-loader!./emoji_input.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-a4078164\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./emoji_input.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","export const findOffset = (child, parent, { top = 0, left = 0 } = {}, ignorePadding = true) => {\n const result = {\n top: top + child.offsetTop,\n left: left + child.offsetLeft\n }\n if (!ignorePadding && child !== window) {\n const { topPadding, leftPadding } = findPadding(child)\n result.top += ignorePadding ? 0 : topPadding\n result.left += ignorePadding ? 0 : leftPadding\n }\n\n if (child.offsetParent && (parent === window || parent.contains(child.offsetParent) || parent === child.offsetParent)) {\n return findOffset(child.offsetParent, parent, result, false)\n } else {\n if (parent !== window) {\n const { topPadding, leftPadding } = findPadding(parent)\n result.top += topPadding\n result.left += leftPadding\n }\n return result\n }\n}\n\nconst findPadding = (el) => {\n const topPaddingStr = window.getComputedStyle(el)['padding-top']\n const topPadding = Number(topPaddingStr.substring(0, topPaddingStr.length - 2))\n const leftPaddingStr = window.getComputedStyle(el)['padding-left']\n const leftPadding = Number(leftPaddingStr.substring(0, leftPaddingStr.length - 2))\n\n return { topPadding, leftPadding }\n}\n","import { debounce } from 'lodash'\n/**\n * suggest - generates a suggestor function to be used by emoji-input\n * data: object providing source information for specific types of suggestions:\n * data.emoji - optional, an array of all emoji available i.e.\n * (state.instance.emoji + state.instance.customEmoji)\n * data.users - optional, an array of all known users\n * updateUsersList - optional, a function to search and append to users\n *\n * Depending on data present one or both (or none) can be present, so if field\n * doesn't support user linking you can just provide only emoji.\n */\n\nconst debounceUserSearch = debounce((data, input) => {\n data.updateUsersList(input)\n}, 500, { leading: true, trailing: false })\n\nexport default data => input => {\n const firstChar = input[0]\n if (firstChar === ':' && data.emoji) {\n return suggestEmoji(data.emoji)(input)\n }\n if (firstChar === '@' && data.users) {\n return suggestUsers(data)(input)\n }\n return []\n}\n\nexport const suggestEmoji = emojis => input => {\n const noPrefix = input.toLowerCase().substr(1)\n return emojis\n .filter(({ displayText }) => displayText.toLowerCase().startsWith(noPrefix))\n .sort((a, b) => {\n let aScore = 0\n let bScore = 0\n\n // Make custom emojis a priority\n aScore += a.imageUrl ? 10 : 0\n bScore += b.imageUrl ? 10 : 0\n\n // Sort alphabetically\n const alphabetically = a.displayText > b.displayText ? 1 : -1\n\n return bScore - aScore + alphabetically\n })\n}\n\nexport const suggestUsers = data => input => {\n const noPrefix = input.toLowerCase().substr(1)\n const users = data.users\n\n const newUsers = users.filter(\n user =>\n user.screen_name.toLowerCase().startsWith(noPrefix) ||\n user.name.toLowerCase().startsWith(noPrefix)\n\n /* taking only 20 results so that sorting is a bit cheaper, we display\n * only 5 anyway. could be inaccurate, but we ideally we should query\n * backend anyway\n */\n ).slice(0, 20).sort((a, b) => {\n let aScore = 0\n let bScore = 0\n\n // Matches on screen name (i.e. user@instance) makes a priority\n aScore += a.screen_name.toLowerCase().startsWith(noPrefix) ? 2 : 0\n bScore += b.screen_name.toLowerCase().startsWith(noPrefix) ? 2 : 0\n\n // Matches on name takes second priority\n aScore += a.name.toLowerCase().startsWith(noPrefix) ? 1 : 0\n bScore += b.name.toLowerCase().startsWith(noPrefix) ? 1 : 0\n\n const diff = (bScore - aScore) * 10\n\n // Then sort alphabetically\n const nameAlphabetically = a.name > b.name ? 1 : -1\n const screenNameAlphabetically = a.screen_name > b.screen_name ? 1 : -1\n\n return diff + nameAlphabetically + screenNameAlphabetically\n /* eslint-disable camelcase */\n }).map(({ screen_name, name, profile_image_url_original }) => ({\n displayText: screen_name,\n detailText: name,\n imageUrl: profile_image_url_original,\n replacement: '@' + screen_name + ' '\n }))\n\n // BE search users if there are no matches\n if (newUsers.length === 0 && data.updateUsersList) {\n debounceUserSearch(data, noPrefix)\n }\n return newUsers\n /* eslint-enable camelcase */\n}\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./remote_follow.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./remote_follow.js\"\nimport __vue_script__ from \"!!babel-loader!./remote_follow.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-e95e446e\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./remote_follow.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","/* script */\nexport * from \"!!babel-loader!./follow_button.js\"\nimport __vue_script__ from \"!!babel-loader!./follow_button.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-3ddddf8d\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./follow_button.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","import { hex2rgb } from '../color_convert/color_convert.js'\nconst highlightStyle = (prefs) => {\n if (prefs === undefined) return\n const { color, type } = prefs\n if (typeof color !== 'string') return\n const rgb = hex2rgb(color)\n if (rgb == null) return\n const solidColor = `rgb(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)})`\n const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .1)`\n const tintColor2 = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .2)`\n if (type === 'striped') {\n return {\n backgroundImage: [\n 'repeating-linear-gradient(135deg,',\n `${tintColor} ,`,\n `${tintColor} 20px,`,\n `${tintColor2} 20px,`,\n `${tintColor2} 40px`\n ].join(' '),\n backgroundPosition: '0 0'\n }\n } else if (type === 'solid') {\n return {\n backgroundColor: tintColor2\n }\n } else if (type === 'side') {\n return {\n backgroundImage: [\n 'linear-gradient(to right,',\n `${solidColor} ,`,\n `${solidColor} 2px,`,\n `transparent 6px`\n ].join(' '),\n backgroundPosition: '0 0'\n }\n }\n}\n\nconst highlightClass = (user) => {\n return 'USER____' + user.screen_name\n .replace(/\\./g, '_')\n .replace(/@/g, '_AT_')\n}\n\nexport {\n highlightClass,\n highlightStyle\n}\n","import isFunction from 'lodash/isFunction'\n\nconst getComponentOptions = (Component) => (isFunction(Component)) ? Component.options : Component\n\nconst getComponentProps = (Component) => getComponentOptions(Component).props\n\nexport {\n getComponentOptions,\n getComponentProps\n}\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!./style_switcher.scss\")\n}\n/* script */\nexport * from \"!!babel-loader!./style_switcher.js\"\nimport __vue_script__ from \"!!babel-loader!./style_switcher.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-1bd287ab\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./style_switcher.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./color_input.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./color_input.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./color_input.vue\"\n/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-a377bb38\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./color_input.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./opacity_input.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./opacity_input.vue\"\n/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-87056ae2\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./opacity_input.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","/* script */\nexport * from \"!!babel-loader!./confirm.js\"\nimport __vue_script__ from \"!!babel-loader!./confirm.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-20b6e7b3\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./confirm.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","import LoginForm from '../login_form/login_form.vue'\nimport MFARecoveryForm from '../mfa_form/recovery_form.vue'\nimport MFATOTPForm from '../mfa_form/totp_form.vue'\nimport { mapGetters } from 'vuex'\n\nconst AuthForm = {\n name: 'AuthForm',\n render (createElement) {\n return createElement('component', { is: this.authForm })\n },\n computed: {\n authForm () {\n if (this.requiredTOTP) { return 'MFATOTPForm' }\n if (this.requiredRecovery) { return 'MFARecoveryForm' }\n return 'LoginForm'\n },\n ...mapGetters('authFlow', ['requiredTOTP', 'requiredRecovery'])\n },\n components: {\n MFARecoveryForm,\n MFATOTPForm,\n LoginForm\n }\n}\n\nexport default AuthForm\n","const verifyOTPCode = ({ app, instance, mfaToken, code }) => {\n const url = `${instance}/oauth/mfa/challenge`\n const form = new window.FormData()\n\n form.append('client_id', app.client_id)\n form.append('client_secret', app.client_secret)\n form.append('mfa_token', mfaToken)\n form.append('code', code)\n form.append('challenge_type', 'totp')\n\n return window.fetch(url, {\n method: 'POST',\n body: form\n }).then((data) => data.json())\n}\n\nconst verifyRecoveryCode = ({ app, instance, mfaToken, code }) => {\n const url = `${instance}/oauth/mfa/challenge`\n const form = new window.FormData()\n\n form.append('client_id', app.client_id)\n form.append('client_secret', app.client_secret)\n form.append('mfa_token', mfaToken)\n form.append('code', code)\n form.append('challenge_type', 'recovery')\n\n return window.fetch(url, {\n method: 'POST',\n body: form\n }).then((data) => data.json())\n}\n\nconst mfa = {\n verifyOTPCode,\n verifyRecoveryCode\n}\n\nexport default mfa\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./chat_panel.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./chat_panel.js\"\nimport __vue_script__ from \"!!babel-loader!./chat_panel.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-7ea51572\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./chat_panel.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","/* script */\nexport * from \"!!babel-loader!./instance_specific_panel.js\"\nimport __vue_script__ from \"!!babel-loader!./instance_specific_panel.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-5b01187b\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./instance_specific_panel.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./features_panel.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./features_panel.js\"\nimport __vue_script__ from \"!!babel-loader!./features_panel.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-3443e05c\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./features_panel.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader?minimize!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./side_drawer.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!./side_drawer.js\"\nimport __vue_script__ from \"!!babel-loader!./side_drawer.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-5c94965a\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./side_drawer.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","\nexport const windowWidth = () =>\n window.innerWidth ||\n document.documentElement.clientWidth ||\n document.body.clientWidth\n","import Vue from 'vue'\nimport VueRouter from 'vue-router'\nimport Vuex from 'vuex'\n\nimport interfaceModule from './modules/interface.js'\nimport instanceModule from './modules/instance.js'\nimport statusesModule from './modules/statuses.js'\nimport usersModule from './modules/users.js'\nimport apiModule from './modules/api.js'\nimport configModule from './modules/config.js'\nimport chatModule from './modules/chat.js'\nimport oauthModule from './modules/oauth.js'\nimport authFlowModule from './modules/auth_flow.js'\nimport mediaViewerModule from './modules/media_viewer.js'\nimport oauthTokensModule from './modules/oauth_tokens.js'\nimport reportsModule from './modules/reports.js'\nimport pollsModule from './modules/polls.js'\nimport postStatusModule from './modules/postStatus.js'\n\nimport VueI18n from 'vue-i18n'\n\nimport createPersistedState from './lib/persisted_state.js'\nimport pushNotifications from './lib/push_notifications_plugin.js'\n\nimport messages from './i18n/messages.js'\n\nimport VueChatScroll from 'vue-chat-scroll'\nimport VueClickOutside from 'v-click-outside'\nimport PortalVue from 'portal-vue'\nimport VBodyScrollLock from './directives/body_scroll_lock'\nimport VTooltip from 'v-tooltip'\n\nimport afterStoreSetup from './boot/after_store.js'\n\nconst currentLocale = (window.navigator.language || 'en').split('-')[0]\n\nVue.use(Vuex)\nVue.use(VueRouter)\nVue.use(VueI18n)\nVue.use(VueChatScroll)\nVue.use(VueClickOutside)\nVue.use(PortalVue)\nVue.use(VBodyScrollLock)\nVue.use(VTooltip, {\n popover: {\n defaultTrigger: 'hover click',\n defaultContainer: false,\n defaultOffset: 5\n }\n})\n\nconst i18n = new VueI18n({\n // By default, use the browser locale, we will update it if neccessary\n locale: currentLocale,\n fallbackLocale: 'en',\n messages\n})\n\nconst persistedStateOptions = {\n paths: [\n 'config',\n 'users.lastLoginName',\n 'oauth'\n ]\n};\n\n(async () => {\n const persistedState = await createPersistedState(persistedStateOptions)\n const store = new Vuex.Store({\n modules: {\n i18n: {\n getters: {\n i18n: () => i18n\n }\n },\n interface: interfaceModule,\n instance: instanceModule,\n statuses: statusesModule,\n users: usersModule,\n api: apiModule,\n config: configModule,\n chat: chatModule,\n oauth: oauthModule,\n authFlow: authFlowModule,\n mediaViewer: mediaViewerModule,\n oauthTokens: oauthTokensModule,\n reports: reportsModule,\n polls: pollsModule,\n postStatus: postStatusModule\n },\n plugins: [persistedState, pushNotifications],\n strict: false // Socket modifies itself, let's ignore this for now.\n // strict: process.env.NODE_ENV !== 'production'\n })\n\n afterStoreSetup({ store, i18n })\n})()\n\n// These are inlined by webpack's DefinePlugin\n/* eslint-disable */\nwindow.___pleromafe_mode = process.env\nwindow.___pleromafe_commit_hash = COMMIT_HASH\nwindow.___pleromafe_dev_overrides = DEV_OVERRIDES\n","import { set, delete as del } from 'vue'\n\nconst defaultState = {\n settings: {\n currentSaveStateNotice: null,\n noticeClearTimeout: null,\n notificationPermission: null\n },\n browserSupport: {\n cssFilter: window.CSS && window.CSS.supports && (\n window.CSS.supports('filter', 'drop-shadow(0 0)') ||\n window.CSS.supports('-webkit-filter', 'drop-shadow(0 0)')\n )\n },\n mobileLayout: false\n}\n\nconst interfaceMod = {\n state: defaultState,\n mutations: {\n settingsSaved (state, { success, error }) {\n if (success) {\n if (state.noticeClearTimeout) {\n clearTimeout(state.noticeClearTimeout)\n }\n set(state.settings, 'currentSaveStateNotice', { error: false, data: success })\n set(state.settings, 'noticeClearTimeout',\n setTimeout(() => del(state.settings, 'currentSaveStateNotice'), 2000))\n } else {\n set(state.settings, 'currentSaveStateNotice', { error: true, errorData: error })\n }\n },\n setNotificationPermission (state, permission) {\n state.notificationPermission = permission\n },\n setMobileLayout (state, value) {\n state.mobileLayout = value\n }\n },\n actions: {\n setPageTitle ({ rootState }, option = '') {\n document.title = `${option} ${rootState.instance.name}`\n },\n settingsSaved ({ commit, dispatch }, { success, error }) {\n commit('settingsSaved', { success, error })\n },\n setNotificationPermission ({ commit }, permission) {\n commit('setNotificationPermission', permission)\n },\n setMobileLayout ({ commit }, value) {\n commit('setMobileLayout', value)\n }\n }\n}\n\nexport default interfaceMod\n","import { set } from 'vue'\nimport { setPreset } from '../services/style_setter/style_setter.js'\nimport { instanceDefaultProperties } from './config.js'\n\nconst defaultState = {\n // Stuff from static/config.json and apiConfig\n name: 'Pleroma FE',\n registrationOpen: true,\n safeDM: true,\n textlimit: 5000,\n server: 'http://localhost:4040/',\n theme: 'pleroma-dark',\n background: '/static/aurora_borealis.jpg',\n logo: '/static/logo.png',\n logoMask: true,\n logoMargin: '.2em',\n redirectRootNoLogin: '/main/all',\n redirectRootLogin: '/main/friends',\n showInstanceSpecificPanel: false,\n alwaysShowSubjectInput: true,\n hideMutedPosts: false,\n collapseMessageWithSubject: false,\n hidePostStats: false,\n hideUserStats: false,\n hideFilteredStatuses: false,\n disableChat: false,\n scopeCopy: true,\n subjectLineBehavior: 'email',\n postContentType: 'text/plain',\n nsfwCensorImage: undefined,\n vapidPublicKey: undefined,\n noAttachmentLinks: false,\n showFeaturesPanel: true,\n minimalScopesMode: false,\n\n // Nasty stuff\n pleromaBackend: true,\n emoji: [],\n emojiFetched: false,\n customEmoji: [],\n customEmojiFetched: false,\n restrictedNicknames: [],\n postFormats: [],\n\n // Feature-set, apparently, not everything here is reported...\n mediaProxyAvailable: false,\n chatAvailable: false,\n gopherAvailable: false,\n suggestionsEnabled: false,\n suggestionsWeb: '',\n\n // Html stuff\n instanceSpecificPanelContent: '',\n tos: '',\n\n // Version Information\n backendVersion: '',\n frontendVersion: '',\n\n pollsAvailable: false,\n pollLimits: {\n max_options: 4,\n max_option_chars: 255,\n min_expiration: 60,\n max_expiration: 60 * 60 * 24\n }\n}\n\nconst instance = {\n state: defaultState,\n mutations: {\n setInstanceOption (state, { name, value }) {\n if (typeof value !== 'undefined') {\n set(state, name, value)\n }\n }\n },\n getters: {\n instanceDefaultConfig (state) {\n return instanceDefaultProperties\n .map(key => [key, state[key]])\n .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {})\n }\n },\n actions: {\n setInstanceOption ({ commit, dispatch }, { name, value }) {\n commit('setInstanceOption', { name, value })\n switch (name) {\n case 'name':\n dispatch('setPageTitle')\n break\n case 'chatAvailable':\n if (value) {\n dispatch('initializeSocket')\n }\n break\n }\n },\n async getStaticEmoji ({ commit }) {\n try {\n const res = await window.fetch('/static/emoji.json')\n if (res.ok) {\n const values = await res.json()\n const emoji = Object.keys(values).map((key) => {\n return {\n displayText: key,\n imageUrl: false,\n replacement: values[key]\n }\n }).sort((a, b) => a.displayText - b.displayText)\n commit('setInstanceOption', { name: 'emoji', value: emoji })\n } else {\n throw (res)\n }\n } catch (e) {\n console.warn(\"Can't load static emoji\")\n console.warn(e)\n }\n },\n\n async getCustomEmoji ({ commit, state }) {\n try {\n const res = await window.fetch('/api/pleroma/emoji.json')\n if (res.ok) {\n const result = await res.json()\n const values = Array.isArray(result) ? Object.assign({}, ...result) : result\n const emoji = Object.entries(values).map(([key, value]) => {\n const imageUrl = value.image_url\n return {\n displayText: key,\n imageUrl: imageUrl ? state.server + imageUrl : value,\n tags: imageUrl ? value.tags.sort((a, b) => a > b ? 1 : 0) : ['utf'],\n replacement: `:${key}: `\n }\n // Technically could use tags but those are kinda useless right now,\n // should have been \"pack\" field, that would be more useful\n }).sort((a, b) => a.displayText.toLowerCase() > b.displayText.toLowerCase() ? 1 : 0)\n commit('setInstanceOption', { name: 'customEmoji', value: emoji })\n } else {\n throw (res)\n }\n } catch (e) {\n console.warn(\"Can't load custom emojis\")\n console.warn(e)\n }\n },\n\n setTheme ({ commit }, themeName) {\n commit('setInstanceOption', { name: 'theme', value: themeName })\n return setPreset(themeName, commit)\n },\n fetchEmoji ({ dispatch, state }) {\n if (!state.customEmojiFetched) {\n state.customEmojiFetched = true\n dispatch('getCustomEmoji')\n }\n if (!state.emojiFetched) {\n state.emojiFetched = true\n dispatch('getStaticEmoji')\n }\n }\n }\n}\n\nexport default instance\n","import { remove, slice, each, findIndex, find, maxBy, minBy, merge, first, last, isArray, omitBy } from 'lodash'\nimport { set } from 'vue'\nimport apiService from '../services/api/api.service.js'\n// import parse from '../services/status_parser/status_parser.js'\n\nconst emptyTl = (userId = 0) => ({\n statuses: [],\n statusesObject: {},\n faves: [],\n visibleStatuses: [],\n visibleStatusesObject: {},\n newStatusCount: 0,\n maxId: 0,\n minId: 0,\n minVisibleId: 0,\n loading: false,\n followers: [],\n friends: [],\n userId,\n flushMarker: 0\n})\n\nconst emptyNotifications = () => ({\n desktopNotificationSilence: true,\n maxId: 0,\n minId: Number.POSITIVE_INFINITY,\n data: [],\n idStore: {},\n loading: false,\n error: false\n})\n\nexport const defaultState = () => ({\n allStatuses: [],\n allStatusesObject: {},\n conversationsObject: {},\n maxId: 0,\n notifications: emptyNotifications(),\n favorites: new Set(),\n error: false,\n timelines: {\n mentions: emptyTl(),\n public: emptyTl(),\n user: emptyTl(),\n favorites: emptyTl(),\n media: emptyTl(),\n publicAndExternal: emptyTl(),\n friends: emptyTl(),\n tag: emptyTl(),\n dms: emptyTl()\n }\n})\n\nexport const prepareStatus = (status) => {\n // Set deleted flag\n status.deleted = false\n\n // To make the array reactive\n status.attachments = status.attachments || []\n\n return status\n}\n\nconst visibleNotificationTypes = (rootState) => {\n return [\n rootState.config.notificationVisibility.likes && 'like',\n rootState.config.notificationVisibility.mentions && 'mention',\n rootState.config.notificationVisibility.repeats && 'repeat',\n rootState.config.notificationVisibility.follows && 'follow'\n ].filter(_ => _)\n}\n\nconst mergeOrAdd = (arr, obj, item) => {\n const oldItem = obj[item.id]\n\n if (oldItem) {\n // We already have this, so only merge the new info.\n // We ignore null values to avoid overwriting existing properties with missing data\n // we also skip 'user' because that is handled by users module\n merge(oldItem, omitBy(item, (v, k) => v === null || k === 'user'))\n // Reactivity fix.\n oldItem.attachments.splice(oldItem.attachments.length)\n return { item: oldItem, new: false }\n } else {\n // This is a new item, prepare it\n prepareStatus(item)\n arr.push(item)\n set(obj, item.id, item)\n return { item, new: true }\n }\n}\n\nconst sortById = (a, b) => {\n const seqA = Number(a.id)\n const seqB = Number(b.id)\n const isSeqA = !Number.isNaN(seqA)\n const isSeqB = !Number.isNaN(seqB)\n if (isSeqA && isSeqB) {\n return seqA > seqB ? -1 : 1\n } else if (isSeqA && !isSeqB) {\n return 1\n } else if (!isSeqA && isSeqB) {\n return -1\n } else {\n return a.id > b.id ? -1 : 1\n }\n}\n\nconst sortTimeline = (timeline) => {\n timeline.visibleStatuses = timeline.visibleStatuses.sort(sortById)\n timeline.statuses = timeline.statuses.sort(sortById)\n timeline.minVisibleId = (last(timeline.visibleStatuses) || {}).id\n return timeline\n}\n\n// Add status to the global storages (arrays and objects maintaining statuses) except timelines\nconst addStatusToGlobalStorage = (state, data) => {\n const result = mergeOrAdd(state.allStatuses, state.allStatusesObject, data)\n if (result.new) {\n // Add to conversation\n const status = result.item\n const conversationsObject = state.conversationsObject\n const conversationId = status.statusnet_conversation_id\n if (conversationsObject[conversationId]) {\n conversationsObject[conversationId].push(status)\n } else {\n set(conversationsObject, conversationId, [status])\n }\n }\n return result\n}\n\n// Remove status from the global storages (arrays and objects maintaining statuses) except timelines\nconst removeStatusFromGlobalStorage = (state, status) => {\n remove(state.allStatuses, { id: status.id })\n\n // TODO: Need to remove from allStatusesObject?\n\n // Remove possible notification\n remove(state.notifications.data, ({ action: { id } }) => id === status.id)\n\n // Remove from conversation\n const conversationId = status.statusnet_conversation_id\n if (state.conversationsObject[conversationId]) {\n remove(state.conversationsObject[conversationId], { id: status.id })\n }\n}\n\nconst addNewStatuses = (state, { statuses, showImmediately = false, timeline, user = {},\n noIdUpdate = false, userId }) => {\n // Sanity check\n if (!isArray(statuses)) {\n return false\n }\n\n const allStatuses = state.allStatuses\n const timelineObject = state.timelines[timeline]\n\n const maxNew = statuses.length > 0 ? maxBy(statuses, 'id').id : 0\n const minNew = statuses.length > 0 ? minBy(statuses, 'id').id : 0\n const newer = timeline && (maxNew > timelineObject.maxId || timelineObject.maxId === 0) && statuses.length > 0\n const older = timeline && (minNew < timelineObject.minId || timelineObject.minId === 0) && statuses.length > 0\n\n if (!noIdUpdate && newer) {\n timelineObject.maxId = maxNew\n }\n if (!noIdUpdate && older) {\n timelineObject.minId = minNew\n }\n\n // This makes sure that user timeline won't get data meant for other\n // user. I.e. opening different user profiles makes request which could\n // return data late after user already viewing different user profile\n if ((timeline === 'user' || timeline === 'media') && timelineObject.userId !== userId) {\n return\n }\n\n const addStatus = (data, showImmediately, addToTimeline = true) => {\n const result = addStatusToGlobalStorage(state, data)\n const status = result.item\n\n if (result.new) {\n // We are mentioned in a post\n if (status.type === 'status' && find(status.attentions, { id: user.id })) {\n const mentions = state.timelines.mentions\n\n // Add the mention to the mentions timeline\n if (timelineObject !== mentions) {\n mergeOrAdd(mentions.statuses, mentions.statusesObject, status)\n mentions.newStatusCount += 1\n\n sortTimeline(mentions)\n }\n }\n if (status.visibility === 'direct') {\n const dms = state.timelines.dms\n\n mergeOrAdd(dms.statuses, dms.statusesObject, status)\n dms.newStatusCount += 1\n\n sortTimeline(dms)\n }\n }\n\n // Decide if we should treat the status as new for this timeline.\n let resultForCurrentTimeline\n // Some statuses should only be added to the global status repository.\n if (timeline && addToTimeline) {\n resultForCurrentTimeline = mergeOrAdd(timelineObject.statuses, timelineObject.statusesObject, status)\n }\n\n if (timeline && showImmediately) {\n // Add it directly to the visibleStatuses, don't change\n // newStatusCount\n mergeOrAdd(timelineObject.visibleStatuses, timelineObject.visibleStatusesObject, status)\n } else if (timeline && addToTimeline && resultForCurrentTimeline.new) {\n // Just change newStatuscount\n timelineObject.newStatusCount += 1\n }\n\n return status\n }\n\n const favoriteStatus = (favorite, counter) => {\n const status = find(allStatuses, { id: favorite.in_reply_to_status_id })\n if (status) {\n // This is our favorite, so the relevant bit.\n if (favorite.user.id === user.id) {\n status.favorited = true\n } else {\n status.fave_num += 1\n }\n }\n return status\n }\n\n const processors = {\n 'status': (status) => {\n addStatus(status, showImmediately)\n },\n 'retweet': (status) => {\n // RetweetedStatuses are never shown immediately\n const retweetedStatus = addStatus(status.retweeted_status, false, false)\n\n let retweet\n // If the retweeted status is already there, don't add the retweet\n // to the timeline.\n if (timeline && find(timelineObject.statuses, (s) => {\n if (s.retweeted_status) {\n return s.id === retweetedStatus.id || s.retweeted_status.id === retweetedStatus.id\n } else {\n return s.id === retweetedStatus.id\n }\n })) {\n // Already have it visible (either as the original or another RT), don't add to timeline, don't show.\n retweet = addStatus(status, false, false)\n } else {\n retweet = addStatus(status, showImmediately)\n }\n\n retweet.retweeted_status = retweetedStatus\n },\n 'favorite': (favorite) => {\n // Only update if this is a new favorite.\n // Ignore our own favorites because we get info about likes as response to like request\n if (!state.favorites.has(favorite.id)) {\n state.favorites.add(favorite.id)\n favoriteStatus(favorite)\n }\n },\n 'deletion': (deletion) => {\n const uri = deletion.uri\n const status = find(allStatuses, { uri })\n if (!status) {\n return\n }\n\n removeStatusFromGlobalStorage(state, status)\n\n if (timeline) {\n remove(timelineObject.statuses, { uri })\n remove(timelineObject.visibleStatuses, { uri })\n }\n },\n 'follow': (follow) => {\n // NOOP, it is known status but we don't do anything about it for now\n },\n 'default': (unknown) => {\n console.log('unknown status type')\n console.log(unknown)\n }\n }\n\n each(statuses, (status) => {\n const type = status.type\n const processor = processors[type] || processors['default']\n processor(status)\n })\n\n // Keep the visible statuses sorted\n if (timeline) {\n sortTimeline(timelineObject)\n }\n}\n\nconst addNewNotifications = (state, { dispatch, notifications, older, visibleNotificationTypes, rootGetters }) => {\n each(notifications, (notification) => {\n if (notification.type !== 'follow') {\n notification.action = addStatusToGlobalStorage(state, notification.action).item\n notification.status = notification.status && addStatusToGlobalStorage(state, notification.status).item\n }\n\n // Only add a new notification if we don't have one for the same action\n if (!state.notifications.idStore.hasOwnProperty(notification.id)) {\n state.notifications.maxId = notification.id > state.notifications.maxId\n ? notification.id\n : state.notifications.maxId\n state.notifications.minId = notification.id < state.notifications.minId\n ? notification.id\n : state.notifications.minId\n\n state.notifications.data.push(notification)\n state.notifications.idStore[notification.id] = notification\n\n if ('Notification' in window && window.Notification.permission === 'granted') {\n const notifObj = {}\n const status = notification.status\n const title = notification.from_profile.name\n notifObj.icon = notification.from_profile.profile_image_url\n let i18nString\n switch (notification.type) {\n case 'like':\n i18nString = 'favorited_you'\n break\n case 'repeat':\n i18nString = 'repeated_you'\n break\n case 'follow':\n i18nString = 'followed_you'\n break\n }\n\n if (i18nString) {\n notifObj.body = rootGetters.i18n.t('notifications.' + i18nString)\n } else {\n notifObj.body = notification.status.text\n }\n\n // Shows first attached non-nsfw image, if any. Should add configuration for this somehow...\n if (status && status.attachments && status.attachments.length > 0 && !status.nsfw &&\n status.attachments[0].mimetype.startsWith('image/')) {\n notifObj.image = status.attachments[0].url\n }\n\n if (!notification.seen && !state.notifications.desktopNotificationSilence && visibleNotificationTypes.includes(notification.type)) {\n let notification = new window.Notification(title, notifObj)\n // Chrome is known for not closing notifications automatically\n // according to MDN, anyway.\n setTimeout(notification.close.bind(notification), 5000)\n }\n }\n } else if (notification.seen) {\n state.notifications.idStore[notification.id].seen = true\n }\n })\n}\n\nconst removeStatus = (state, { timeline, userId }) => {\n const timelineObject = state.timelines[timeline]\n if (userId) {\n remove(timelineObject.statuses, { user: { id: userId } })\n remove(timelineObject.visibleStatuses, { user: { id: userId } })\n timelineObject.minVisibleId = timelineObject.visibleStatuses.length > 0 ? last(timelineObject.visibleStatuses).id : 0\n timelineObject.maxId = timelineObject.statuses.length > 0 ? first(timelineObject.statuses).id : 0\n }\n}\n\nexport const mutations = {\n addNewStatuses,\n addNewNotifications,\n removeStatus,\n showNewStatuses (state, { timeline }) {\n const oldTimeline = (state.timelines[timeline])\n\n oldTimeline.newStatusCount = 0\n oldTimeline.visibleStatuses = slice(oldTimeline.statuses, 0, 50)\n oldTimeline.minVisibleId = last(oldTimeline.visibleStatuses).id\n oldTimeline.minId = oldTimeline.minVisibleId\n oldTimeline.visibleStatusesObject = {}\n each(oldTimeline.visibleStatuses, (status) => { oldTimeline.visibleStatusesObject[status.id] = status })\n },\n resetStatuses (state) {\n const emptyState = defaultState()\n Object.entries(emptyState).forEach(([key, value]) => {\n state[key] = value\n })\n },\n clearTimeline (state, { timeline, excludeUserId = false }) {\n const userId = excludeUserId ? state.timelines[timeline].userId : undefined\n state.timelines[timeline] = emptyTl(userId)\n },\n clearNotifications (state) {\n state.notifications = emptyNotifications()\n },\n setFavorited (state, { status, value }) {\n const newStatus = state.allStatusesObject[status.id]\n\n if (newStatus.favorited !== value) {\n if (value) {\n newStatus.fave_num++\n } else {\n newStatus.fave_num--\n }\n }\n\n newStatus.favorited = value\n },\n setFavoritedConfirm (state, { status, user }) {\n const newStatus = state.allStatusesObject[status.id]\n newStatus.favorited = status.favorited\n newStatus.fave_num = status.fave_num\n const index = findIndex(newStatus.favoritedBy, { id: user.id })\n if (index !== -1 && !newStatus.favorited) {\n newStatus.favoritedBy.splice(index, 1)\n } else if (index === -1 && newStatus.favorited) {\n newStatus.favoritedBy.push(user)\n }\n },\n setMutedStatus (state, status) {\n const newStatus = state.allStatusesObject[status.id]\n newStatus.thread_muted = status.thread_muted\n\n if (newStatus.thread_muted !== undefined) {\n state.conversationsObject[newStatus.statusnet_conversation_id].forEach(status => { status.thread_muted = newStatus.thread_muted })\n }\n },\n setRetweeted (state, { status, value }) {\n const newStatus = state.allStatusesObject[status.id]\n\n if (newStatus.repeated !== value) {\n if (value) {\n newStatus.repeat_num++\n } else {\n newStatus.repeat_num--\n }\n }\n\n newStatus.repeated = value\n },\n setRetweetedConfirm (state, { status, user }) {\n const newStatus = state.allStatusesObject[status.id]\n newStatus.repeated = status.repeated\n newStatus.repeat_num = status.repeat_num\n const index = findIndex(newStatus.rebloggedBy, { id: user.id })\n if (index !== -1 && !newStatus.repeated) {\n newStatus.rebloggedBy.splice(index, 1)\n } else if (index === -1 && newStatus.repeated) {\n newStatus.rebloggedBy.push(user)\n }\n },\n setDeleted (state, { status }) {\n const newStatus = state.allStatusesObject[status.id]\n newStatus.deleted = true\n },\n setManyDeleted (state, condition) {\n Object.values(state.allStatusesObject).forEach(status => {\n if (condition(status)) {\n status.deleted = true\n }\n })\n },\n setLoading (state, { timeline, value }) {\n state.timelines[timeline].loading = value\n },\n setNsfw (state, { id, nsfw }) {\n const newStatus = state.allStatusesObject[id]\n newStatus.nsfw = nsfw\n },\n setError (state, { value }) {\n state.error = value\n },\n setNotificationsLoading (state, { value }) {\n state.notifications.loading = value\n },\n setNotificationsError (state, { value }) {\n state.notifications.error = value\n },\n setNotificationsSilence (state, { value }) {\n state.notifications.desktopNotificationSilence = value\n },\n markNotificationsAsSeen (state) {\n each(state.notifications.data, (notification) => {\n notification.seen = true\n })\n },\n queueFlush (state, { timeline, id }) {\n state.timelines[timeline].flushMarker = id\n },\n addRepeats (state, { id, rebloggedByUsers, currentUser }) {\n const newStatus = state.allStatusesObject[id]\n newStatus.rebloggedBy = rebloggedByUsers.filter(_ => _)\n // repeats stats can be incorrect based on polling condition, let's update them using the most recent data\n newStatus.repeat_num = newStatus.rebloggedBy.length\n newStatus.repeated = !!newStatus.rebloggedBy.find(({ id }) => currentUser.id === id)\n },\n addFavs (state, { id, favoritedByUsers, currentUser }) {\n const newStatus = state.allStatusesObject[id]\n newStatus.favoritedBy = favoritedByUsers.filter(_ => _)\n // favorites stats can be incorrect based on polling condition, let's update them using the most recent data\n newStatus.fave_num = newStatus.favoritedBy.length\n newStatus.favorited = !!newStatus.favoritedBy.find(({ id }) => currentUser.id === id)\n },\n updateStatusWithPoll (state, { id, poll }) {\n const status = state.allStatusesObject[id]\n status.poll = poll\n }\n}\n\nconst statuses = {\n state: defaultState(),\n actions: {\n addNewStatuses ({ rootState, commit }, { statuses, showImmediately = false, timeline = false, noIdUpdate = false, userId }) {\n commit('addNewStatuses', { statuses, showImmediately, timeline, noIdUpdate, user: rootState.users.currentUser, userId })\n },\n addNewNotifications ({ rootState, commit, dispatch, rootGetters }, { notifications, older }) {\n commit('addNewNotifications', { visibleNotificationTypes: visibleNotificationTypes(rootState), dispatch, notifications, older, rootGetters })\n },\n setError ({ rootState, commit }, { value }) {\n commit('setError', { value })\n },\n setNotificationsLoading ({ rootState, commit }, { value }) {\n commit('setNotificationsLoading', { value })\n },\n setNotificationsError ({ rootState, commit }, { value }) {\n commit('setNotificationsError', { value })\n },\n setNotificationsSilence ({ rootState, commit }, { value }) {\n commit('setNotificationsSilence', { value })\n },\n fetchStatus ({ rootState, dispatch }, id) {\n rootState.api.backendInteractor.fetchStatus({ id })\n .then((status) => dispatch('addNewStatuses', { statuses: [status] }))\n },\n deleteStatus ({ rootState, commit }, status) {\n commit('setDeleted', { status })\n apiService.deleteStatus({ id: status.id, credentials: rootState.users.currentUser.credentials })\n },\n markStatusesAsDeleted ({ commit }, condition) {\n commit('setManyDeleted', condition)\n },\n favorite ({ rootState, commit }, status) {\n // Optimistic favoriting...\n commit('setFavorited', { status, value: true })\n rootState.api.backendInteractor.favorite(status.id)\n .then(status => commit('setFavoritedConfirm', { status, user: rootState.users.currentUser }))\n },\n unfavorite ({ rootState, commit }, status) {\n // Optimistic unfavoriting...\n commit('setFavorited', { status, value: false })\n rootState.api.backendInteractor.unfavorite(status.id)\n .then(status => commit('setFavoritedConfirm', { status, user: rootState.users.currentUser }))\n },\n fetchPinnedStatuses ({ rootState, dispatch }, userId) {\n rootState.api.backendInteractor.fetchPinnedStatuses(userId)\n .then(statuses => dispatch('addNewStatuses', { statuses, timeline: 'user', userId, showImmediately: true, noIdUpdate: true }))\n },\n pinStatus ({ rootState, dispatch }, statusId) {\n return rootState.api.backendInteractor.pinOwnStatus(statusId)\n .then((status) => dispatch('addNewStatuses', { statuses: [status] }))\n },\n unpinStatus ({ rootState, dispatch }, statusId) {\n rootState.api.backendInteractor.unpinOwnStatus(statusId)\n .then((status) => dispatch('addNewStatuses', { statuses: [status] }))\n },\n muteConversation ({ rootState, commit }, statusId) {\n return rootState.api.backendInteractor.muteConversation(statusId)\n .then((status) => commit('setMutedStatus', status))\n },\n unmuteConversation ({ rootState, commit }, statusId) {\n return rootState.api.backendInteractor.unmuteConversation(statusId)\n .then((status) => commit('setMutedStatus', status))\n },\n retweet ({ rootState, commit }, status) {\n // Optimistic retweeting...\n commit('setRetweeted', { status, value: true })\n rootState.api.backendInteractor.retweet(status.id)\n .then(status => commit('setRetweetedConfirm', { status: status.retweeted_status, user: rootState.users.currentUser }))\n },\n unretweet ({ rootState, commit }, status) {\n // Optimistic unretweeting...\n commit('setRetweeted', { status, value: false })\n rootState.api.backendInteractor.unretweet(status.id)\n .then(status => commit('setRetweetedConfirm', { status, user: rootState.users.currentUser }))\n },\n queueFlush ({ rootState, commit }, { timeline, id }) {\n commit('queueFlush', { timeline, id })\n },\n markNotificationsAsSeen ({ rootState, commit }) {\n commit('markNotificationsAsSeen')\n apiService.markNotificationsAsSeen({\n id: rootState.statuses.notifications.maxId,\n credentials: rootState.users.currentUser.credentials\n })\n },\n fetchFavsAndRepeats ({ rootState, commit }, id) {\n Promise.all([\n rootState.api.backendInteractor.fetchFavoritedByUsers(id),\n rootState.api.backendInteractor.fetchRebloggedByUsers(id)\n ]).then(([favoritedByUsers, rebloggedByUsers]) => {\n commit('addFavs', { id, favoritedByUsers, currentUser: rootState.users.currentUser })\n commit('addRepeats', { id, rebloggedByUsers, currentUser: rootState.users.currentUser })\n })\n },\n fetchFavs ({ rootState, commit }, id) {\n rootState.api.backendInteractor.fetchFavoritedByUsers(id)\n .then(favoritedByUsers => commit('addFavs', { id, favoritedByUsers, currentUser: rootState.users.currentUser }))\n },\n fetchRepeats ({ rootState, commit }, id) {\n rootState.api.backendInteractor.fetchRebloggedByUsers(id)\n .then(rebloggedByUsers => commit('addRepeats', { id, rebloggedByUsers, currentUser: rootState.users.currentUser }))\n },\n search (store, { q, resolve, limit, offset, following }) {\n return store.rootState.api.backendInteractor.search2({ q, resolve, limit, offset, following })\n .then((data) => {\n store.commit('addNewUsers', data.accounts)\n store.commit('addNewStatuses', { statuses: data.statuses })\n return data\n })\n }\n },\n mutations\n}\n\nexport default statuses\n","const qvitterStatusType = (status) => {\n if (status.is_post_verb) {\n return 'status'\n }\n\n if (status.retweeted_status) {\n return 'retweet'\n }\n\n if ((typeof status.uri === 'string' && status.uri.match(/(fave|objectType=Favourite)/)) ||\n (typeof status.text === 'string' && status.text.match(/favorited/))) {\n return 'favorite'\n }\n\n if (status.text.match(/deleted notice {{tag/) || status.qvitter_delete_notice) {\n return 'deletion'\n }\n\n if (status.text.match(/started following/) || status.activity_type === 'follow') {\n return 'follow'\n }\n\n return 'unknown'\n}\n\nexport const parseUser = (data) => {\n const output = {}\n const masto = data.hasOwnProperty('acct')\n // case for users in \"mentions\" property for statuses in MastoAPI\n const mastoShort = masto && !data.hasOwnProperty('avatar')\n\n output.id = String(data.id)\n\n if (masto) {\n output.screen_name = data.acct\n output.statusnet_profile_url = data.url\n\n // There's nothing else to get\n if (mastoShort) {\n return output\n }\n\n output.name = data.display_name\n output.name_html = addEmojis(data.display_name, data.emojis)\n\n output.description = data.note\n output.description_html = addEmojis(data.note, data.emojis)\n\n // Utilize avatar_static for gif avatars?\n output.profile_image_url = data.avatar\n output.profile_image_url_original = data.avatar\n\n // Same, utilize header_static?\n output.cover_photo = data.header\n\n output.friends_count = data.following_count\n\n output.bot = data.bot\n\n if (data.pleroma) {\n const relationship = data.pleroma.relationship\n\n output.background_image = data.pleroma.background_image\n output.token = data.pleroma.chat_token\n\n if (relationship) {\n output.follows_you = relationship.followed_by\n output.requested = relationship.requested\n output.following = relationship.following\n output.statusnet_blocking = relationship.blocking\n output.muted = relationship.muting\n output.showing_reblogs = relationship.showing_reblogs\n output.subscribed = relationship.subscribing\n }\n\n output.hide_follows = data.pleroma.hide_follows\n output.hide_followers = data.pleroma.hide_followers\n output.hide_follows_count = data.pleroma.hide_follows_count\n output.hide_followers_count = data.pleroma.hide_followers_count\n\n output.rights = {\n moderator: data.pleroma.is_moderator,\n admin: data.pleroma.is_admin\n }\n // TODO: Clean up in UI? This is duplication from what BE does for qvitterapi\n if (output.rights.admin) {\n output.role = 'admin'\n } else if (output.rights.moderator) {\n output.role = 'moderator'\n } else {\n output.role = 'member'\n }\n }\n\n if (data.source) {\n output.description = data.source.note\n output.default_scope = data.source.privacy\n if (data.source.pleroma) {\n output.no_rich_text = data.source.pleroma.no_rich_text\n output.show_role = data.source.pleroma.show_role\n output.discoverable = data.source.pleroma.discoverable\n }\n }\n\n // TODO: handle is_local\n output.is_local = !output.screen_name.includes('@')\n } else {\n output.screen_name = data.screen_name\n\n output.name = data.name\n output.name_html = data.name_html\n\n output.description = data.description\n output.description_html = data.description_html\n\n output.profile_image_url = data.profile_image_url\n output.profile_image_url_original = data.profile_image_url_original\n\n output.cover_photo = data.cover_photo\n\n output.friends_count = data.friends_count\n\n // output.bot = ??? missing\n\n output.statusnet_profile_url = data.statusnet_profile_url\n\n output.statusnet_blocking = data.statusnet_blocking\n\n output.is_local = data.is_local\n output.role = data.role\n output.show_role = data.show_role\n\n output.follows_you = data.follows_you\n\n output.muted = data.muted\n\n if (data.rights) {\n output.rights = {\n moderator: data.rights.delete_others_notice,\n admin: data.rights.admin\n }\n }\n output.no_rich_text = data.no_rich_text\n output.default_scope = data.default_scope\n output.hide_follows = data.hide_follows\n output.hide_followers = data.hide_followers\n output.hide_follows_count = data.hide_follows_count\n output.hide_followers_count = data.hide_followers_count\n output.background_image = data.background_image\n // on mastoapi this info is contained in a \"relationship\"\n output.following = data.following\n // Websocket token\n output.token = data.token\n }\n\n output.created_at = new Date(data.created_at)\n output.locked = data.locked\n output.followers_count = data.followers_count\n output.statuses_count = data.statuses_count\n output.friendIds = []\n output.followerIds = []\n output.pinnedStatusIds = []\n\n if (data.pleroma) {\n output.follow_request_count = data.pleroma.follow_request_count\n\n output.tags = data.pleroma.tags\n output.deactivated = data.pleroma.deactivated\n\n output.notification_settings = data.pleroma.notification_settings\n }\n\n output.tags = output.tags || []\n output.rights = output.rights || {}\n output.notification_settings = output.notification_settings || {}\n\n return output\n}\n\nexport const parseAttachment = (data) => {\n const output = {}\n const masto = !data.hasOwnProperty('oembed')\n\n if (masto) {\n // Not exactly same...\n output.mimetype = data.pleroma ? data.pleroma.mime_type : data.type\n output.meta = data.meta // not present in BE yet\n output.id = data.id\n } else {\n output.mimetype = data.mimetype\n // output.meta = ??? missing\n }\n\n output.url = data.url\n output.description = data.description\n\n return output\n}\nexport const addEmojis = (string, emojis) => {\n const matchOperatorsRegex = /[|\\\\{}()[\\]^$+*?.-]/g\n return emojis.reduce((acc, emoji) => {\n const regexSafeShortCode = emoji.shortcode.replace(matchOperatorsRegex, '\\\\$&')\n return acc.replace(\n new RegExp(`:${regexSafeShortCode}:`, 'g'),\n `${emoji.shortcode}`\n )\n }, string)\n}\n\nexport const parseStatus = (data) => {\n const output = {}\n const masto = data.hasOwnProperty('account')\n\n if (masto) {\n output.favorited = data.favourited\n output.fave_num = data.favourites_count\n\n output.repeated = data.reblogged\n output.repeat_num = data.reblogs_count\n\n output.type = data.reblog ? 'retweet' : 'status'\n output.nsfw = data.sensitive\n\n output.statusnet_html = addEmojis(data.content, data.emojis)\n\n output.tags = data.tags\n\n if (data.pleroma) {\n const { pleroma } = data\n output.text = pleroma.content ? data.pleroma.content['text/plain'] : data.content\n output.summary = pleroma.spoiler_text ? data.pleroma.spoiler_text['text/plain'] : data.spoiler_text\n output.statusnet_conversation_id = data.pleroma.conversation_id\n output.is_local = pleroma.local\n output.in_reply_to_screen_name = data.pleroma.in_reply_to_account_acct\n output.thread_muted = pleroma.thread_muted\n } else {\n output.text = data.content\n output.summary = data.spoiler_text\n }\n\n output.in_reply_to_status_id = data.in_reply_to_id\n output.in_reply_to_user_id = data.in_reply_to_account_id\n output.replies_count = data.replies_count\n\n if (output.type === 'retweet') {\n output.retweeted_status = parseStatus(data.reblog)\n }\n\n output.summary_html = addEmojis(data.spoiler_text, data.emojis)\n output.external_url = data.url\n output.poll = data.poll\n output.pinned = data.pinned\n output.muted = data.muted\n } else {\n output.favorited = data.favorited\n output.fave_num = data.fave_num\n\n output.repeated = data.repeated\n output.repeat_num = data.repeat_num\n\n // catchall, temporary\n // Object.assign(output, data)\n\n output.type = qvitterStatusType(data)\n\n if (data.nsfw === undefined) {\n output.nsfw = isNsfw(data)\n if (data.retweeted_status) {\n output.nsfw = data.retweeted_status.nsfw\n }\n } else {\n output.nsfw = data.nsfw\n }\n\n output.statusnet_html = data.statusnet_html\n output.text = data.text\n\n output.in_reply_to_status_id = data.in_reply_to_status_id\n output.in_reply_to_user_id = data.in_reply_to_user_id\n output.in_reply_to_screen_name = data.in_reply_to_screen_name\n output.statusnet_conversation_id = data.statusnet_conversation_id\n\n if (output.type === 'retweet') {\n output.retweeted_status = parseStatus(data.retweeted_status)\n }\n\n output.summary = data.summary\n output.summary_html = data.summary_html\n output.external_url = data.external_url\n output.is_local = data.is_local\n }\n\n output.id = String(data.id)\n output.visibility = data.visibility\n output.card = data.card\n output.created_at = new Date(data.created_at)\n\n // Converting to string, the right way.\n output.in_reply_to_status_id = output.in_reply_to_status_id\n ? String(output.in_reply_to_status_id)\n : null\n output.in_reply_to_user_id = output.in_reply_to_user_id\n ? String(output.in_reply_to_user_id)\n : null\n\n output.user = parseUser(masto ? data.account : data.user)\n\n output.attentions = ((masto ? data.mentions : data.attentions) || []).map(parseUser)\n\n output.attachments = ((masto ? data.media_attachments : data.attachments) || [])\n .map(parseAttachment)\n\n const retweetedStatus = masto ? data.reblog : data.retweeted_status\n if (retweetedStatus) {\n output.retweeted_status = parseStatus(retweetedStatus)\n }\n\n output.favoritedBy = []\n output.rebloggedBy = []\n\n return output\n}\n\nexport const parseNotification = (data) => {\n const mastoDict = {\n 'favourite': 'like',\n 'reblog': 'repeat'\n }\n const masto = !data.hasOwnProperty('ntype')\n const output = {}\n\n if (masto) {\n output.type = mastoDict[data.type] || data.type\n output.seen = data.pleroma.is_seen\n output.status = output.type === 'follow'\n ? null\n : parseStatus(data.status)\n output.action = output.status // TODO: Refactor, this is unneeded\n output.from_profile = parseUser(data.account)\n } else {\n const parsedNotice = parseStatus(data.notice)\n output.type = data.ntype\n output.seen = Boolean(data.is_seen)\n output.status = output.type === 'like'\n ? parseStatus(data.notice.favorited_status)\n : parsedNotice\n output.action = parsedNotice\n output.from_profile = parseUser(data.from_profile)\n }\n\n output.created_at = new Date(data.created_at)\n output.id = parseInt(data.id)\n\n return output\n}\n\nconst isNsfw = (status) => {\n const nsfwRegex = /#nsfw/i\n return (status.tags || []).includes('nsfw') || !!(status.text || '').match(nsfwRegex)\n}\n","import { humanizeErrors } from '../../modules/errors'\n\nexport function StatusCodeError (statusCode, body, options, response) {\n this.name = 'StatusCodeError'\n this.statusCode = statusCode\n this.message = statusCode + ' - ' + (JSON && JSON.stringify ? JSON.stringify(body) : body)\n this.error = body // legacy attribute\n this.options = options\n this.response = response\n\n if (Error.captureStackTrace) { // required for non-V8 environments\n Error.captureStackTrace(this)\n }\n}\nStatusCodeError.prototype = Object.create(Error.prototype)\nStatusCodeError.prototype.constructor = StatusCodeError\n\nexport class RegistrationError extends Error {\n constructor (error) {\n super()\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this)\n }\n\n try {\n // the error is probably a JSON object with a single key, \"errors\", whose value is another JSON object containing the real errors\n if (typeof error === 'string') {\n error = JSON.parse(error)\n if (error.hasOwnProperty('error')) {\n error = JSON.parse(error.error)\n }\n }\n\n if (typeof error === 'object') {\n // replace ap_id with username\n if (error.ap_id) {\n error.username = error.ap_id\n delete error.ap_id\n }\n this.message = humanizeErrors(error)\n } else {\n this.message = error\n }\n } catch (e) {\n // can't parse it, so just treat it like a string\n this.message = error\n }\n }\n}\n","import { capitalize } from 'lodash'\n\nexport function humanizeErrors (errors) {\n return Object.entries(errors).reduce((errs, [k, val]) => {\n let message = val.reduce((acc, message) => {\n let key = capitalize(k.replace(/_/g, ' '))\n return acc + [key, message].join(' ') + '. '\n }, '')\n return [...errs, message]\n }, [])\n}\n","import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'\nimport oauthApi from '../services/new_api/oauth.js'\nimport { compact, map, each, merge, last, concat, uniq } from 'lodash'\nimport { set } from 'vue'\nimport { registerPushNotifications, unregisterPushNotifications } from '../services/push/push.js'\n\n// TODO: Unify with mergeOrAdd in statuses.js\nexport const mergeOrAdd = (arr, obj, item) => {\n if (!item) { return false }\n const oldItem = obj[item.id]\n if (oldItem) {\n // We already have this, so only merge the new info.\n merge(oldItem, item)\n return { item: oldItem, new: false }\n } else {\n // This is a new item, prepare it\n arr.push(item)\n set(obj, item.id, item)\n if (item.screen_name && !item.screen_name.includes('@')) {\n set(obj, item.screen_name.toLowerCase(), item)\n }\n return { item, new: true }\n }\n}\n\nconst getNotificationPermission = () => {\n const Notification = window.Notification\n\n if (!Notification) return Promise.resolve(null)\n if (Notification.permission === 'default') return Notification.requestPermission()\n return Promise.resolve(Notification.permission)\n}\n\nconst blockUser = (store, id) => {\n return store.rootState.api.backendInteractor.blockUser(id)\n .then((relationship) => {\n store.commit('updateUserRelationship', [relationship])\n store.commit('addBlockId', id)\n store.commit('removeStatus', { timeline: 'friends', userId: id })\n store.commit('removeStatus', { timeline: 'public', userId: id })\n store.commit('removeStatus', { timeline: 'publicAndExternal', userId: id })\n })\n}\n\nconst unblockUser = (store, id) => {\n return store.rootState.api.backendInteractor.unblockUser(id)\n .then((relationship) => store.commit('updateUserRelationship', [relationship]))\n}\n\nconst muteUser = (store, id) => {\n return store.rootState.api.backendInteractor.muteUser(id)\n .then((relationship) => {\n store.commit('updateUserRelationship', [relationship])\n store.commit('addMuteId', id)\n })\n}\n\nconst unmuteUser = (store, id) => {\n return store.rootState.api.backendInteractor.unmuteUser(id)\n .then((relationship) => store.commit('updateUserRelationship', [relationship]))\n}\n\nconst hideReblogs = (store, userId) => {\n return store.rootState.api.backendInteractor.followUser({ id: userId, reblogs: false })\n .then((relationship) => {\n store.commit('updateUserRelationship', [relationship])\n })\n}\n\nconst showReblogs = (store, userId) => {\n return store.rootState.api.backendInteractor.followUser({ id: userId, reblogs: true })\n .then((relationship) => store.commit('updateUserRelationship', [relationship]))\n}\n\nexport const mutations = {\n setMuted (state, { user: { id }, muted }) {\n const user = state.usersObject[id]\n set(user, 'muted', muted)\n },\n tagUser (state, { user: { id }, tag }) {\n const user = state.usersObject[id]\n const tags = user.tags || []\n const newTags = tags.concat([tag])\n set(user, 'tags', newTags)\n },\n untagUser (state, { user: { id }, tag }) {\n const user = state.usersObject[id]\n const tags = user.tags || []\n const newTags = tags.filter(t => t !== tag)\n set(user, 'tags', newTags)\n },\n updateRight (state, { user: { id }, right, value }) {\n const user = state.usersObject[id]\n let newRights = user.rights\n newRights[right] = value\n set(user, 'rights', newRights)\n },\n updateActivationStatus (state, { user: { id }, status }) {\n const user = state.usersObject[id]\n set(user, 'deactivated', !status)\n },\n setCurrentUser (state, user) {\n state.lastLoginName = user.screen_name\n state.currentUser = merge(state.currentUser || {}, user)\n },\n clearCurrentUser (state) {\n state.currentUser = false\n state.lastLoginName = false\n },\n beginLogin (state) {\n state.loggingIn = true\n },\n endLogin (state) {\n state.loggingIn = false\n },\n saveFriendIds (state, { id, friendIds }) {\n const user = state.usersObject[id]\n user.friendIds = uniq(concat(user.friendIds, friendIds))\n },\n saveFollowerIds (state, { id, followerIds }) {\n const user = state.usersObject[id]\n user.followerIds = uniq(concat(user.followerIds, followerIds))\n },\n // Because frontend doesn't have a reason to keep these stuff in memory\n // outside of viewing someones user profile.\n clearFriends (state, userId) {\n const user = state.usersObject[userId]\n if (user) {\n set(user, 'friendIds', [])\n }\n },\n clearFollowers (state, userId) {\n const user = state.usersObject[userId]\n if (user) {\n set(user, 'followerIds', [])\n }\n },\n addNewUsers (state, users) {\n each(users, (user) => mergeOrAdd(state.users, state.usersObject, user))\n },\n updateUserRelationship (state, relationships) {\n relationships.forEach((relationship) => {\n const user = state.usersObject[relationship.id]\n if (user) {\n user.follows_you = relationship.followed_by\n user.following = relationship.following\n user.muted = relationship.muting\n user.statusnet_blocking = relationship.blocking\n user.subscribed = relationship.subscribing\n user.showing_reblogs = relationship.showing_reblogs\n }\n })\n },\n updateBlocks (state, blockedUsers) {\n // Reset statusnet_blocking of all fetched users\n each(state.users, (user) => { user.statusnet_blocking = false })\n each(blockedUsers, (user) => mergeOrAdd(state.users, state.usersObject, user))\n },\n saveBlockIds (state, blockIds) {\n state.currentUser.blockIds = blockIds\n },\n addBlockId (state, blockId) {\n if (state.currentUser.blockIds.indexOf(blockId) === -1) {\n state.currentUser.blockIds.push(blockId)\n }\n },\n updateMutes (state, mutedUsers) {\n // Reset muted of all fetched users\n each(state.users, (user) => { user.muted = false })\n each(mutedUsers, (user) => mergeOrAdd(state.users, state.usersObject, user))\n },\n saveMuteIds (state, muteIds) {\n state.currentUser.muteIds = muteIds\n },\n addMuteId (state, muteId) {\n if (state.currentUser.muteIds.indexOf(muteId) === -1) {\n state.currentUser.muteIds.push(muteId)\n }\n },\n setPinnedToUser (state, status) {\n const user = state.usersObject[status.user.id]\n const index = user.pinnedStatusIds.indexOf(status.id)\n if (status.pinned && index === -1) {\n user.pinnedStatusIds.push(status.id)\n } else if (!status.pinned && index !== -1) {\n user.pinnedStatusIds.splice(index, 1)\n }\n },\n setUserForStatus (state, status) {\n status.user = state.usersObject[status.user.id]\n },\n setUserForNotification (state, notification) {\n if (notification.type !== 'follow') {\n notification.action.user = state.usersObject[notification.action.user.id]\n }\n notification.from_profile = state.usersObject[notification.from_profile.id]\n },\n setColor (state, { user: { id }, highlighted }) {\n const user = state.usersObject[id]\n set(user, 'highlight', highlighted)\n },\n signUpPending (state) {\n state.signUpPending = true\n state.signUpErrors = []\n },\n signUpSuccess (state) {\n state.signUpPending = false\n },\n signUpFailure (state, errors) {\n state.signUpPending = false\n state.signUpErrors = errors\n }\n}\n\nexport const getters = {\n findUser: state => query => {\n const result = state.usersObject[query]\n // In case it's a screen_name, we can try searching case-insensitive\n if (!result && typeof query === 'string') {\n return state.usersObject[query.toLowerCase()]\n }\n return result\n }\n}\n\nexport const defaultState = {\n loggingIn: false,\n lastLoginName: false,\n currentUser: false,\n users: [],\n usersObject: {},\n signUpPending: false,\n signUpErrors: []\n}\n\nconst users = {\n state: defaultState,\n mutations,\n getters,\n actions: {\n fetchUser (store, id) {\n return store.rootState.api.backendInteractor.fetchUser({ id })\n .then((user) => {\n store.commit('addNewUsers', [user])\n return user\n })\n },\n fetchUserRelationship (store, id) {\n if (store.state.currentUser) {\n store.rootState.api.backendInteractor.fetchUserRelationship({ id })\n .then((relationships) => store.commit('updateUserRelationship', relationships))\n }\n },\n fetchBlocks (store) {\n return store.rootState.api.backendInteractor.fetchBlocks()\n .then((blocks) => {\n store.commit('saveBlockIds', map(blocks, 'id'))\n store.commit('updateBlocks', blocks)\n return blocks\n })\n },\n blockUser (store, id) {\n return blockUser(store, id)\n },\n unblockUser (store, id) {\n return unblockUser(store, id)\n },\n blockUsers (store, ids = []) {\n return Promise.all(ids.map(id => blockUser(store, id)))\n },\n unblockUsers (store, ids = []) {\n return Promise.all(ids.map(id => unblockUser(store, id)))\n },\n fetchMutes (store) {\n return store.rootState.api.backendInteractor.fetchMutes()\n .then((mutes) => {\n store.commit('updateMutes', mutes)\n store.commit('saveMuteIds', map(mutes, 'id'))\n return mutes\n })\n },\n muteUser (store, id) {\n return muteUser(store, id)\n },\n unmuteUser (store, id) {\n return unmuteUser(store, id)\n },\n hideReblogs (store, id) {\n return hideReblogs(store, id)\n },\n showReblogs (store, id) {\n return showReblogs(store, id)\n },\n muteUsers (store, ids = []) {\n return Promise.all(ids.map(id => muteUser(store, id)))\n },\n unmuteUsers (store, ids = []) {\n return Promise.all(ids.map(id => unmuteUser(store, id)))\n },\n fetchFriends ({ rootState, commit }, id) {\n const user = rootState.users.usersObject[id]\n const maxId = last(user.friendIds)\n return rootState.api.backendInteractor.fetchFriends({ id, maxId })\n .then((friends) => {\n commit('addNewUsers', friends)\n commit('saveFriendIds', { id, friendIds: map(friends, 'id') })\n return friends\n })\n },\n fetchFollowers ({ rootState, commit }, id) {\n const user = rootState.users.usersObject[id]\n const maxId = last(user.followerIds)\n return rootState.api.backendInteractor.fetchFollowers({ id, maxId })\n .then((followers) => {\n commit('addNewUsers', followers)\n commit('saveFollowerIds', { id, followerIds: map(followers, 'id') })\n return followers\n })\n },\n clearFriends ({ commit }, userId) {\n commit('clearFriends', userId)\n },\n clearFollowers ({ commit }, userId) {\n commit('clearFollowers', userId)\n },\n subscribeUser ({ rootState, commit }, id) {\n return rootState.api.backendInteractor.subscribeUser(id)\n .then((relationship) => commit('updateUserRelationship', [relationship]))\n },\n unsubscribeUser ({ rootState, commit }, id) {\n return rootState.api.backendInteractor.unsubscribeUser(id)\n .then((relationship) => commit('updateUserRelationship', [relationship]))\n },\n registerPushNotifications (store) {\n const token = store.state.currentUser.credentials\n const vapidPublicKey = store.rootState.instance.vapidPublicKey\n const isEnabled = store.rootState.config.webPushNotifications\n const notificationVisibility = store.rootState.config.notificationVisibility\n\n registerPushNotifications(isEnabled, vapidPublicKey, token, notificationVisibility)\n },\n unregisterPushNotifications (store) {\n const token = store.state.currentUser.credentials\n\n unregisterPushNotifications(token)\n },\n addNewUsers ({ commit }, users) {\n commit('addNewUsers', users)\n },\n addNewStatuses (store, { statuses }) {\n const users = map(statuses, 'user')\n const retweetedUsers = compact(map(statuses, 'retweeted_status.user'))\n store.commit('addNewUsers', users)\n store.commit('addNewUsers', retweetedUsers)\n\n each(statuses, (status) => {\n // Reconnect users to statuses\n store.commit('setUserForStatus', status)\n // Set pinned statuses to user\n store.commit('setPinnedToUser', status)\n })\n each(compact(map(statuses, 'retweeted_status')), (status) => {\n // Reconnect users to retweets\n store.commit('setUserForStatus', status)\n // Set pinned retweets to user\n store.commit('setPinnedToUser', status)\n })\n },\n addNewNotifications (store, { notifications }) {\n const users = map(notifications, 'from_profile')\n const notificationIds = notifications.map(_ => _.id)\n store.commit('addNewUsers', users)\n\n const notificationsObject = store.rootState.statuses.notifications.idStore\n const relevantNotifications = Object.entries(notificationsObject)\n .filter(([k, val]) => notificationIds.includes(k))\n .map(([k, val]) => val)\n\n // Reconnect users to notifications\n each(relevantNotifications, (notification) => {\n store.commit('setUserForNotification', notification)\n })\n },\n searchUsers (store, query) {\n return store.rootState.api.backendInteractor.searchUsers(query)\n .then((users) => {\n store.commit('addNewUsers', users)\n return users\n })\n },\n async signUp (store, userInfo) {\n store.commit('signUpPending')\n\n let rootState = store.rootState\n\n try {\n let data = await rootState.api.backendInteractor.register(userInfo)\n store.commit('signUpSuccess')\n store.commit('setToken', data.access_token)\n store.dispatch('loginUser', data.access_token)\n } catch (e) {\n let errors = e.message\n store.commit('signUpFailure', errors)\n throw e\n }\n },\n async getCaptcha (store) {\n return store.rootState.api.backendInteractor.getCaptcha()\n },\n\n logout (store) {\n const { oauth, instance } = store.rootState\n\n const data = {\n ...oauth,\n commit: store.commit,\n instance: instance.server\n }\n\n return oauthApi.getOrCreateApp(data)\n .then((app) => {\n const params = {\n app,\n instance: data.instance,\n token: oauth.userToken\n }\n\n return oauthApi.revokeToken(params)\n })\n .then(() => {\n store.commit('clearCurrentUser')\n store.dispatch('disconnectFromSocket')\n store.commit('clearToken')\n store.dispatch('stopFetching', 'friends')\n store.commit('setBackendInteractor', backendInteractorService(store.getters.getToken()))\n store.dispatch('stopFetching', 'notifications')\n store.commit('clearNotifications')\n store.commit('resetStatuses')\n })\n },\n loginUser (store, accessToken) {\n return new Promise((resolve, reject) => {\n const commit = store.commit\n commit('beginLogin')\n store.rootState.api.backendInteractor.verifyCredentials(accessToken)\n .then((data) => {\n if (!data.error) {\n const user = data\n // user.credentials = userCredentials\n user.credentials = accessToken\n user.blockIds = []\n user.muteIds = []\n commit('setCurrentUser', user)\n commit('addNewUsers', [user])\n\n store.dispatch('fetchEmoji')\n\n getNotificationPermission()\n .then(permission => commit('setNotificationPermission', permission))\n\n // Set our new backend interactor\n commit('setBackendInteractor', backendInteractorService(accessToken))\n\n if (user.token) {\n store.dispatch('setWsToken', user.token)\n\n // Initialize the chat socket.\n store.dispatch('initializeSocket')\n }\n\n // Start getting fresh posts.\n store.dispatch('startFetchingTimeline', { timeline: 'friends' })\n\n // Start fetching notifications\n store.dispatch('startFetchingNotifications')\n\n // Get user mutes\n store.dispatch('fetchMutes')\n\n // Fetch our friends\n store.rootState.api.backendInteractor.fetchFriends({ id: user.id })\n .then((friends) => commit('addNewUsers', friends))\n } else {\n const response = data.error\n // Authentication failed\n commit('endLogin')\n if (response.status === 401) {\n reject(new Error('Wrong username or password'))\n } else {\n reject(new Error('An error occurred, please try again'))\n }\n }\n commit('endLogin')\n resolve()\n })\n .catch((error) => {\n console.log(error)\n commit('endLogin')\n reject(new Error('Failed to connect to server, try again'))\n })\n })\n }\n }\n}\n\nexport default users\n","import runtime from 'serviceworker-webpack-plugin/lib/runtime'\n\nfunction urlBase64ToUint8Array (base64String) {\n const padding = '='.repeat((4 - base64String.length % 4) % 4)\n const base64 = (base64String + padding)\n .replace(/-/g, '+')\n .replace(/_/g, '/')\n\n const rawData = window.atob(base64)\n return Uint8Array.from([...rawData].map((char) => char.charCodeAt(0)))\n}\n\nfunction isPushSupported () {\n return 'serviceWorker' in navigator && 'PushManager' in window\n}\n\nfunction getOrCreateServiceWorker () {\n return runtime.register()\n .catch((err) => console.error('Unable to get or create a service worker.', err))\n}\n\nfunction subscribePush (registration, isEnabled, vapidPublicKey) {\n if (!isEnabled) return Promise.reject(new Error('Web Push is disabled in config'))\n if (!vapidPublicKey) return Promise.reject(new Error('VAPID public key is not found'))\n\n const subscribeOptions = {\n userVisibleOnly: true,\n applicationServerKey: urlBase64ToUint8Array(vapidPublicKey)\n }\n return registration.pushManager.subscribe(subscribeOptions)\n}\n\nfunction unsubscribePush (registration) {\n return registration.pushManager.getSubscription()\n .then((subscribtion) => {\n if (subscribtion === null) { return }\n return subscribtion.unsubscribe()\n })\n}\n\nfunction deleteSubscriptionFromBackEnd (token) {\n return window.fetch('/api/v1/push/subscription/', {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${token}`\n }\n }).then((response) => {\n if (!response.ok) throw new Error('Bad status code from server.')\n return response\n })\n}\n\nfunction sendSubscriptionToBackEnd (subscription, token, notificationVisibility) {\n return window.fetch('/api/v1/push/subscription/', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${token}`\n },\n body: JSON.stringify({\n subscription,\n data: {\n alerts: {\n follow: notificationVisibility.follows,\n favourite: notificationVisibility.likes,\n mention: notificationVisibility.mentions,\n reblog: notificationVisibility.repeats\n }\n }\n })\n }).then((response) => {\n if (!response.ok) throw new Error('Bad status code from server.')\n return response.json()\n }).then((responseData) => {\n if (!responseData.id) throw new Error('Bad response from server.')\n return responseData\n })\n}\n\nexport function registerPushNotifications (isEnabled, vapidPublicKey, token, notificationVisibility) {\n if (isPushSupported()) {\n getOrCreateServiceWorker()\n .then((registration) => subscribePush(registration, isEnabled, vapidPublicKey))\n .then((subscription) => sendSubscriptionToBackEnd(subscription, token, notificationVisibility))\n .catch((e) => console.warn(`Failed to setup Web Push Notifications: ${e.message}`))\n }\n}\n\nexport function unregisterPushNotifications (token) {\n if (isPushSupported()) {\n Promise.all([\n deleteSubscriptionFromBackEnd(token),\n getOrCreateServiceWorker()\n .then((registration) => {\n return unsubscribePush(registration).then((result) => [registration, result])\n })\n .then(([registration, unsubResult]) => {\n if (!unsubResult) {\n console.warn('Push subscription cancellation wasn\\'t successful, killing SW anyway...')\n }\n return registration.unregister().then((result) => {\n if (!result) {\n console.warn('Failed to kill SW')\n }\n })\n })\n ]).catch((e) => console.warn(`Failed to disable Web Push Notifications: ${e.message}`))\n }\n}\n","import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'\nimport { Socket } from 'phoenix'\n\nconst api = {\n state: {\n backendInteractor: backendInteractorService(),\n fetchers: {},\n socket: null,\n followRequests: []\n },\n mutations: {\n setBackendInteractor (state, backendInteractor) {\n state.backendInteractor = backendInteractor\n },\n addFetcher (state, { fetcherName, fetcher }) {\n state.fetchers[fetcherName] = fetcher\n },\n removeFetcher (state, { fetcherName }) {\n delete state.fetchers[fetcherName]\n },\n setWsToken (state, token) {\n state.wsToken = token\n },\n setSocket (state, socket) {\n state.socket = socket\n },\n setFollowRequests (state, value) {\n state.followRequests = value\n }\n },\n actions: {\n startFetchingTimeline (store, { timeline = 'friends', tag = false, userId = false }) {\n // Don't start fetching if we already are.\n if (store.state.fetchers[timeline]) return\n\n const fetcher = store.state.backendInteractor.startFetchingTimeline({ timeline, store, userId, tag })\n store.commit('addFetcher', { fetcherName: timeline, fetcher })\n },\n startFetchingNotifications (store) {\n // Don't start fetching if we already are.\n if (store.state.fetchers['notifications']) return\n\n const fetcher = store.state.backendInteractor.startFetchingNotifications({ store })\n store.commit('addFetcher', { fetcherName: 'notifications', fetcher })\n },\n stopFetching (store, fetcherName) {\n const fetcher = store.state.fetchers[fetcherName]\n window.clearInterval(fetcher)\n store.commit('removeFetcher', { fetcherName })\n },\n setWsToken (store, token) {\n store.commit('setWsToken', token)\n },\n initializeSocket ({ dispatch, commit, state, rootState }) {\n // Set up websocket connection\n const token = state.wsToken\n if (rootState.instance.chatAvailable && typeof token !== 'undefined' && state.socket === null) {\n const socket = new Socket('/socket', { params: { token } })\n socket.connect()\n\n commit('setSocket', socket)\n dispatch('initializeChat', socket)\n }\n },\n disconnectFromSocket ({ commit, state }) {\n state.socket && state.socket.disconnect()\n commit('setSocket', null)\n },\n removeFollowRequest (store, request) {\n let requests = store.state.followRequests.filter((it) => it !== request)\n store.commit('setFollowRequests', requests)\n }\n }\n}\n\nexport default api\n","const chat = {\n state: {\n messages: [],\n channel: { state: '' }\n },\n mutations: {\n setChannel (state, channel) {\n state.channel = channel\n },\n addMessage (state, message) {\n state.messages.push(message)\n state.messages = state.messages.slice(-19, 20)\n },\n setMessages (state, messages) {\n state.messages = messages.slice(-19, 20)\n }\n },\n actions: {\n initializeChat (store, socket) {\n const channel = socket.channel('chat:public')\n channel.on('new_msg', (msg) => {\n store.commit('addMessage', msg)\n })\n channel.on('messages', ({ messages }) => {\n store.commit('setMessages', messages)\n })\n channel.join()\n store.commit('setChannel', channel)\n }\n }\n}\n\nexport default chat\n","import { delete as del } from 'vue'\n\nconst oauth = {\n state: {\n clientId: false,\n clientSecret: false,\n /* App token is authentication for app without any user, used mostly for\n * MastoAPI's registration of new users, stored so that we can fall back to\n * it on logout\n */\n appToken: false,\n /* User token is authentication for app with user, this is for every calls\n * that need authorized user to be successful (i.e. posting, liking etc)\n */\n userToken: false\n },\n mutations: {\n setClientData (state, { clientId, clientSecret }) {\n state.clientId = clientId\n state.clientSecret = clientSecret\n },\n setAppToken (state, token) {\n state.appToken = token\n },\n setToken (state, token) {\n state.userToken = token\n },\n clearToken (state) {\n state.userToken = false\n // state.token is userToken with older name, coming from persistent state\n // let's clear it as well, since it is being used as a fallback of state.userToken\n del(state, 'token')\n }\n },\n getters: {\n getToken: state => () => {\n // state.token is userToken with older name, coming from persistent state\n // added here for smoother transition, otherwise user will be logged out\n return state.userToken || state.token || state.appToken\n },\n getUserToken: state => () => {\n // state.token is userToken with older name, coming from persistent state\n // added here for smoother transition, otherwise user will be logged out\n return state.userToken || state.token\n }\n }\n}\n\nexport default oauth\n","const PASSWORD_STRATEGY = 'password'\nconst TOKEN_STRATEGY = 'token'\n\n// MFA strategies\nconst TOTP_STRATEGY = 'totp'\nconst RECOVERY_STRATEGY = 'recovery'\n\n// initial state\nconst state = {\n app: null,\n settings: {},\n strategy: PASSWORD_STRATEGY,\n initStrategy: PASSWORD_STRATEGY // default strategy from config\n}\n\nconst resetState = (state) => {\n state.strategy = state.initStrategy\n state.settings = {}\n state.app = null\n}\n\n// getters\nconst getters = {\n app: (state, getters) => {\n return state.app\n },\n settings: (state, getters) => {\n return state.settings\n },\n requiredPassword: (state, getters, rootState) => {\n return state.strategy === PASSWORD_STRATEGY\n },\n requiredToken: (state, getters, rootState) => {\n return state.strategy === TOKEN_STRATEGY\n },\n requiredTOTP: (state, getters, rootState) => {\n return state.strategy === TOTP_STRATEGY\n },\n requiredRecovery: (state, getters, rootState) => {\n return state.strategy === RECOVERY_STRATEGY\n }\n}\n\n// mutations\nconst mutations = {\n setInitialStrategy (state, strategy) {\n if (strategy) {\n state.initStrategy = strategy\n state.strategy = strategy\n }\n },\n requirePassword (state) {\n state.strategy = PASSWORD_STRATEGY\n },\n requireToken (state) {\n state.strategy = TOKEN_STRATEGY\n },\n requireMFA (state, { app, settings }) {\n state.settings = settings\n state.app = app\n state.strategy = TOTP_STRATEGY // default strategy of MFA\n },\n requireRecovery (state) {\n state.strategy = RECOVERY_STRATEGY\n },\n requireTOTP (state) {\n state.strategy = TOTP_STRATEGY\n },\n abortMFA (state) {\n resetState(state)\n }\n}\n\n// actions\nconst actions = {\n // eslint-disable-next-line camelcase\n async login ({ state, dispatch, commit }, { access_token }) {\n commit('setToken', access_token, { root: true })\n await dispatch('loginUser', access_token, { root: true })\n resetState(state)\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n mutations,\n actions\n}\n","import fileTypeService from '../services/file_type/file_type.service.js'\n\nconst mediaViewer = {\n state: {\n media: [],\n currentIndex: 0,\n activated: false\n },\n mutations: {\n setMedia (state, media) {\n state.media = media\n },\n setCurrent (state, index) {\n state.activated = true\n state.currentIndex = index\n },\n close (state) {\n state.activated = false\n }\n },\n actions: {\n setMedia ({ commit }, attachments) {\n const media = attachments.filter(attachment => {\n const type = fileTypeService.fileType(attachment.mimetype)\n return type === 'image' || type === 'video'\n })\n commit('setMedia', media)\n },\n setCurrent ({ commit, state }, current) {\n const index = state.media.indexOf(current)\n commit('setCurrent', index || 0)\n },\n closeMediaViewer ({ commit }) {\n commit('close')\n }\n }\n}\n\nexport default mediaViewer\n","const oauthTokens = {\n state: {\n tokens: []\n },\n actions: {\n fetchTokens ({ rootState, commit }) {\n rootState.api.backendInteractor.fetchOAuthTokens().then((tokens) => {\n commit('swapTokens', tokens)\n })\n },\n revokeToken ({ rootState, commit, state }, id) {\n rootState.api.backendInteractor.revokeOAuthToken(id).then((response) => {\n if (response.status === 201) {\n commit('swapTokens', state.tokens.filter(token => token.id !== id))\n }\n })\n }\n },\n mutations: {\n swapTokens (state, tokens) {\n state.tokens = tokens\n }\n }\n}\n\nexport default oauthTokens\n","import filter from 'lodash/filter'\n\nconst reports = {\n state: {\n userId: null,\n statuses: [],\n modalActivated: false\n },\n mutations: {\n openUserReportingModal (state, { userId, statuses }) {\n state.userId = userId\n state.statuses = statuses\n state.modalActivated = true\n },\n closeUserReportingModal (state) {\n state.modalActivated = false\n }\n },\n actions: {\n openUserReportingModal ({ rootState, commit }, userId) {\n const statuses = filter(rootState.statuses.allStatuses, status => status.user.id === userId)\n commit('openUserReportingModal', { userId, statuses })\n },\n closeUserReportingModal ({ commit }) {\n commit('closeUserReportingModal')\n }\n }\n}\n\nexport default reports\n","import { merge } from 'lodash'\nimport { set } from 'vue'\n\nconst polls = {\n state: {\n // Contains key = id, value = number of trackers for this poll\n trackedPolls: {},\n pollsObject: {}\n },\n mutations: {\n mergeOrAddPoll (state, poll) {\n const existingPoll = state.pollsObject[poll.id]\n // Make expired-state change trigger re-renders properly\n poll.expired = Date.now() > Date.parse(poll.expires_at)\n if (existingPoll) {\n set(state.pollsObject, poll.id, merge(existingPoll, poll))\n } else {\n set(state.pollsObject, poll.id, poll)\n }\n },\n trackPoll (state, pollId) {\n const currentValue = state.trackedPolls[pollId]\n if (currentValue) {\n set(state.trackedPolls, pollId, currentValue + 1)\n } else {\n set(state.trackedPolls, pollId, 1)\n }\n },\n untrackPoll (state, pollId) {\n const currentValue = state.trackedPolls[pollId]\n if (currentValue) {\n set(state.trackedPolls, pollId, currentValue - 1)\n } else {\n set(state.trackedPolls, pollId, 0)\n }\n }\n },\n actions: {\n mergeOrAddPoll ({ commit }, poll) {\n commit('mergeOrAddPoll', poll)\n },\n updateTrackedPoll ({ rootState, dispatch, commit }, pollId) {\n rootState.api.backendInteractor.fetchPoll(pollId).then(poll => {\n setTimeout(() => {\n if (rootState.polls.trackedPolls[pollId]) {\n dispatch('updateTrackedPoll', pollId)\n }\n }, 30 * 1000)\n commit('mergeOrAddPoll', poll)\n })\n },\n trackPoll ({ rootState, commit, dispatch }, pollId) {\n if (!rootState.polls.trackedPolls[pollId]) {\n setTimeout(() => dispatch('updateTrackedPoll', pollId), 30 * 1000)\n }\n commit('trackPoll', pollId)\n },\n untrackPoll ({ commit }, pollId) {\n commit('untrackPoll', pollId)\n },\n votePoll ({ rootState, commit }, { id, pollId, choices }) {\n return rootState.api.backendInteractor.vote(pollId, choices).then(poll => {\n commit('mergeOrAddPoll', poll)\n return poll\n })\n }\n }\n}\n\nexport default polls\n","const postStatus = {\n state: {\n params: null,\n modalActivated: false\n },\n mutations: {\n openPostStatusModal (state, params) {\n state.params = params\n state.modalActivated = true\n },\n closePostStatusModal (state) {\n state.modalActivated = false\n }\n },\n actions: {\n openPostStatusModal ({ commit }, params) {\n commit('openPostStatusModal', params)\n },\n closePostStatusModal ({ commit }) {\n commit('closePostStatusModal')\n }\n }\n}\n\nexport default postStatus\n","import merge from 'lodash.merge'\nimport objectPath from 'object-path'\nimport localforage from 'localforage'\nimport { each } from 'lodash'\n\nlet loaded = false\n\nconst defaultReducer = (state, paths) => (\n paths.length === 0 ? state : paths.reduce((substate, path) => {\n objectPath.set(substate, path, objectPath.get(state, path))\n return substate\n }, {})\n)\n\nconst saveImmedeatelyActions = [\n 'markNotificationsAsSeen',\n 'clearCurrentUser',\n 'setCurrentUser',\n 'setHighlight',\n 'setOption',\n 'setClientData',\n 'setToken',\n 'clearToken'\n]\n\nconst defaultStorage = (() => {\n return localforage\n})()\n\nexport default function createPersistedState ({\n key = 'vuex-lz',\n paths = [],\n getState = (key, storage) => {\n let value = storage.getItem(key)\n return value\n },\n setState = (key, state, storage) => {\n if (!loaded) {\n console.log('waiting for old state to be loaded...')\n return Promise.resolve()\n } else {\n return storage.setItem(key, state)\n }\n },\n reducer = defaultReducer,\n storage = defaultStorage,\n subscriber = store => handler => store.subscribe(handler)\n} = {}) {\n return getState(key, storage).then((savedState) => {\n return store => {\n try {\n if (savedState !== null && typeof savedState === 'object') {\n // build user cache\n const usersState = savedState.users || {}\n usersState.usersObject = {}\n const users = usersState.users || []\n each(users, (user) => { usersState.usersObject[user.id] = user })\n savedState.users = usersState\n\n store.replaceState(\n merge({}, store.state, savedState)\n )\n }\n loaded = true\n } catch (e) {\n console.log(\"Couldn't load state\")\n console.error(e)\n loaded = true\n }\n subscriber(store)((mutation, state) => {\n try {\n if (saveImmedeatelyActions.includes(mutation.type)) {\n setState(key, reducer(state, paths), storage)\n .then(success => {\n if (typeof success !== 'undefined') {\n if (mutation.type === 'setOption' || mutation.type === 'setCurrentUser') {\n store.dispatch('settingsSaved', { success })\n }\n }\n }, error => {\n if (mutation.type === 'setOption' || mutation.type === 'setCurrentUser') {\n store.dispatch('settingsSaved', { error })\n }\n })\n }\n } catch (e) {\n console.log(\"Couldn't persist state:\")\n console.log(e)\n }\n })\n }\n })\n}\n","export default (store) => {\n store.subscribe((mutation, state) => {\n const vapidPublicKey = state.instance.vapidPublicKey\n const webPushNotification = state.config.webPushNotifications\n const permission = state.interface.notificationPermission === 'granted'\n const user = state.users.currentUser\n\n const isUserMutation = mutation.type === 'setCurrentUser'\n const isVapidMutation = mutation.type === 'setInstanceOption' && mutation.payload.name === 'vapidPublicKey'\n const isPermMutation = mutation.type === 'setNotificationPermission' && mutation.payload === 'granted'\n const isUserConfigMutation = mutation.type === 'setOption' && mutation.payload.name === 'webPushNotifications'\n const isVisibilityMutation = mutation.type === 'setOption' && mutation.payload.name === 'notificationVisibility'\n\n if (isUserMutation || isVapidMutation || isPermMutation || isUserConfigMutation || isVisibilityMutation) {\n if (user && vapidPublicKey && permission && webPushNotification) {\n return store.dispatch('registerPushNotifications')\n } else if (isUserConfigMutation && !webPushNotification) {\n return store.dispatch('unregisterPushNotifications')\n }\n }\n })\n}\n","import * as bodyScrollLock from 'body-scroll-lock'\n\nlet previousNavPaddingRight\nlet previousAppBgWrapperRight\nconst lockerEls = new Set([])\n\nconst disableBodyScroll = (el) => {\n const scrollBarGap = window.innerWidth - document.documentElement.clientWidth\n bodyScrollLock.disableBodyScroll(el, {\n reserveScrollBarGap: true\n })\n lockerEls.add(el)\n setTimeout(() => {\n if (lockerEls.size <= 1) {\n // If previousNavPaddingRight is already set, don't set it again.\n if (previousNavPaddingRight === undefined) {\n const navEl = document.getElementById('nav')\n previousNavPaddingRight = window.getComputedStyle(navEl).getPropertyValue('padding-right')\n navEl.style.paddingRight = previousNavPaddingRight ? `calc(${previousNavPaddingRight} + ${scrollBarGap}px)` : `${scrollBarGap}px`\n }\n // If previousAppBgWrapeprRight is already set, don't set it again.\n if (previousAppBgWrapperRight === undefined) {\n const appBgWrapperEl = document.getElementById('app_bg_wrapper')\n previousAppBgWrapperRight = window.getComputedStyle(appBgWrapperEl).getPropertyValue('right')\n appBgWrapperEl.style.right = previousAppBgWrapperRight ? `calc(${previousAppBgWrapperRight} + ${scrollBarGap}px)` : `${scrollBarGap}px`\n }\n document.body.classList.add('scroll-locked')\n }\n })\n}\n\nconst enableBodyScroll = (el) => {\n lockerEls.delete(el)\n setTimeout(() => {\n if (lockerEls.size === 0) {\n if (previousNavPaddingRight !== undefined) {\n document.getElementById('nav').style.paddingRight = previousNavPaddingRight\n // Restore previousNavPaddingRight to undefined so disableBodyScroll knows it can be set again.\n previousNavPaddingRight = undefined\n }\n if (previousAppBgWrapperRight !== undefined) {\n document.getElementById('app_bg_wrapper').style.right = previousAppBgWrapperRight\n // Restore previousAppBgWrapperRight to undefined so disableBodyScroll knows it can be set again.\n previousAppBgWrapperRight = undefined\n }\n document.body.classList.remove('scroll-locked')\n }\n })\n bodyScrollLock.enableBodyScroll(el)\n}\n\nconst directive = {\n inserted: (el, binding) => {\n if (binding.value) {\n disableBodyScroll(el)\n }\n },\n componentUpdated: (el, binding) => {\n if (binding.oldValue === binding.value) {\n return\n }\n\n if (binding.value) {\n disableBodyScroll(el)\n } else {\n enableBodyScroll(el)\n }\n },\n unbind: (el) => {\n enableBodyScroll(el)\n }\n}\n\nexport default (Vue) => {\n Vue.directive('body-scroll-lock', directive)\n}\n","import Vue from 'vue'\nimport VueRouter from 'vue-router'\nimport routes from './routes'\nimport App from '../App.vue'\nimport { windowWidth } from '../services/window_utils/window_utils'\nimport { getOrCreateApp, getClientToken } from '../services/new_api/oauth.js'\nimport backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'\n\nconst getStatusnetConfig = async ({ store }) => {\n try {\n const res = await window.fetch('/api/statusnet/config.json')\n if (res.ok) {\n const data = await res.json()\n const { name, closed: registrationClosed, textlimit, uploadlimit, server, vapidPublicKey, safeDMMentionsEnabled } = data.site\n\n store.dispatch('setInstanceOption', { name: 'name', value: name })\n store.dispatch('setInstanceOption', { name: 'registrationOpen', value: (registrationClosed === '0') })\n store.dispatch('setInstanceOption', { name: 'textlimit', value: parseInt(textlimit) })\n store.dispatch('setInstanceOption', { name: 'server', value: server })\n store.dispatch('setInstanceOption', { name: 'safeDM', value: safeDMMentionsEnabled !== '0' })\n\n // TODO: default values for this stuff, added if to not make it break on\n // my dev config out of the box.\n if (uploadlimit) {\n store.dispatch('setInstanceOption', { name: 'uploadlimit', value: parseInt(uploadlimit.uploadlimit) })\n store.dispatch('setInstanceOption', { name: 'avatarlimit', value: parseInt(uploadlimit.avatarlimit) })\n store.dispatch('setInstanceOption', { name: 'backgroundlimit', value: parseInt(uploadlimit.backgroundlimit) })\n store.dispatch('setInstanceOption', { name: 'bannerlimit', value: parseInt(uploadlimit.bannerlimit) })\n }\n\n if (vapidPublicKey) {\n store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey })\n }\n\n return data.site.pleromafe\n } else {\n throw (res)\n }\n } catch (error) {\n console.error('Could not load statusnet config, potentially fatal')\n console.error(error)\n }\n}\n\nconst getStaticConfig = async () => {\n try {\n const res = await window.fetch('/static/config.json')\n if (res.ok) {\n return res.json()\n } else {\n throw (res)\n }\n } catch (error) {\n console.warn('Failed to load static/config.json, continuing without it.')\n console.warn(error)\n return {}\n }\n}\n\nconst setSettings = async ({ apiConfig, staticConfig, store }) => {\n const overrides = window.___pleromafe_dev_overrides || {}\n const env = window.___pleromafe_mode.NODE_ENV\n\n // This takes static config and overrides properties that are present in apiConfig\n let config = {}\n if (overrides.staticConfigPreference && env === 'development') {\n console.warn('OVERRIDING API CONFIG WITH STATIC CONFIG')\n config = Object.assign({}, apiConfig, staticConfig)\n } else {\n config = Object.assign({}, staticConfig, apiConfig)\n }\n\n const copyInstanceOption = (name) => {\n store.dispatch('setInstanceOption', { name, value: config[name] })\n }\n\n copyInstanceOption('nsfwCensorImage')\n copyInstanceOption('background')\n copyInstanceOption('hidePostStats')\n copyInstanceOption('hideUserStats')\n copyInstanceOption('hideFilteredStatuses')\n copyInstanceOption('logo')\n\n store.dispatch('setInstanceOption', {\n name: 'logoMask',\n value: typeof config.logoMask === 'undefined'\n ? true\n : config.logoMask\n })\n\n store.dispatch('setInstanceOption', {\n name: 'logoMargin',\n value: typeof config.logoMargin === 'undefined'\n ? 0\n : config.logoMargin\n })\n store.commit('authFlow/setInitialStrategy', config.loginMethod)\n\n copyInstanceOption('redirectRootNoLogin')\n copyInstanceOption('redirectRootLogin')\n copyInstanceOption('showInstanceSpecificPanel')\n copyInstanceOption('minimalScopesMode')\n copyInstanceOption('hideMutedPosts')\n copyInstanceOption('collapseMessageWithSubject')\n copyInstanceOption('scopeCopy')\n copyInstanceOption('subjectLineBehavior')\n copyInstanceOption('postContentType')\n copyInstanceOption('alwaysShowSubjectInput')\n copyInstanceOption('noAttachmentLinks')\n copyInstanceOption('showFeaturesPanel')\n\n return store.dispatch('setTheme', config['theme'])\n}\n\nconst getTOS = async ({ store }) => {\n try {\n const res = await window.fetch('/static/terms-of-service.html')\n if (res.ok) {\n const html = await res.text()\n store.dispatch('setInstanceOption', { name: 'tos', value: html })\n } else {\n throw (res)\n }\n } catch (e) {\n console.warn(\"Can't load TOS\")\n console.warn(e)\n }\n}\n\nconst getInstancePanel = async ({ store }) => {\n try {\n const res = await window.fetch('/instance/panel.html')\n if (res.ok) {\n const html = await res.text()\n store.dispatch('setInstanceOption', { name: 'instanceSpecificPanelContent', value: html })\n } else {\n throw (res)\n }\n } catch (e) {\n console.warn(\"Can't load instance panel\")\n console.warn(e)\n }\n}\n\nconst getStickers = async ({ store }) => {\n try {\n const res = await window.fetch('/static/stickers.json')\n if (res.ok) {\n const values = await res.json()\n const stickers = (await Promise.all(\n Object.entries(values).map(async ([name, path]) => {\n const resPack = await window.fetch(path + 'pack.json')\n var meta = {}\n if (resPack.ok) {\n meta = await resPack.json()\n }\n return {\n pack: name,\n path,\n meta\n }\n })\n )).sort((a, b) => {\n return a.meta.title.localeCompare(b.meta.title)\n })\n store.dispatch('setInstanceOption', { name: 'stickers', value: stickers })\n } else {\n throw (res)\n }\n } catch (e) {\n console.warn(\"Can't load stickers\")\n console.warn(e)\n }\n}\n\nconst getAppSecret = async ({ store }) => {\n const { state, commit } = store\n const { oauth, instance } = state\n return getOrCreateApp({ ...oauth, instance: instance.server, commit })\n .then((app) => getClientToken({ ...app, instance: instance.server }))\n .then((token) => {\n commit('setAppToken', token.access_token)\n commit('setBackendInteractor', backendInteractorService(store.getters.getToken()))\n })\n}\n\nconst getNodeInfo = async ({ store }) => {\n try {\n const res = await window.fetch('/nodeinfo/2.0.json')\n if (res.ok) {\n const data = await res.json()\n const metadata = data.metadata\n const features = metadata.features\n store.dispatch('setInstanceOption', { name: 'mediaProxyAvailable', value: features.includes('media_proxy') })\n store.dispatch('setInstanceOption', { name: 'chatAvailable', value: features.includes('chat') })\n store.dispatch('setInstanceOption', { name: 'gopherAvailable', value: features.includes('gopher') })\n store.dispatch('setInstanceOption', { name: 'pollsAvailable', value: features.includes('polls') })\n store.dispatch('setInstanceOption', { name: 'pollLimits', value: metadata.pollLimits })\n store.dispatch('setInstanceOption', { name: 'mailerEnabled', value: metadata.mailerEnabled })\n\n store.dispatch('setInstanceOption', { name: 'restrictedNicknames', value: metadata.restrictedNicknames })\n store.dispatch('setInstanceOption', { name: 'postFormats', value: metadata.postFormats })\n\n const suggestions = metadata.suggestions\n store.dispatch('setInstanceOption', { name: 'suggestionsEnabled', value: suggestions.enabled })\n store.dispatch('setInstanceOption', { name: 'suggestionsWeb', value: suggestions.web })\n\n const software = data.software\n store.dispatch('setInstanceOption', { name: 'backendVersion', value: software.version })\n store.dispatch('setInstanceOption', { name: 'pleromaBackend', value: software.name === 'pleroma' })\n\n const frontendVersion = window.___pleromafe_commit_hash\n store.dispatch('setInstanceOption', { name: 'frontendVersion', value: frontendVersion })\n store.dispatch('setInstanceOption', { name: 'tagPolicyAvailable', value: metadata.federation.mrf_policies.includes('TagPolicy') })\n } else {\n throw (res)\n }\n } catch (e) {\n console.warn('Could not load nodeinfo')\n console.warn(e)\n }\n}\n\nconst setConfig = async ({ store }) => {\n // apiConfig, staticConfig\n const configInfos = await Promise.all([getStatusnetConfig({ store }), getStaticConfig()])\n const apiConfig = configInfos[0]\n const staticConfig = configInfos[1]\n\n await setSettings({ store, apiConfig, staticConfig }).then(getAppSecret({ store }))\n}\n\nconst checkOAuthToken = async ({ store }) => {\n return new Promise(async (resolve, reject) => {\n if (store.getters.getUserToken()) {\n try {\n await store.dispatch('loginUser', store.getters.getUserToken())\n } catch (e) {\n console.log(e)\n }\n }\n resolve()\n })\n}\n\nconst afterStoreSetup = async ({ store, i18n }) => {\n if (store.state.config.customTheme) {\n // This is a hack to deal with async loading of config.json and themes\n // See: style_setter.js, setPreset()\n window.themeLoaded = true\n store.dispatch('setOption', {\n name: 'customTheme',\n value: store.state.config.customTheme\n })\n }\n\n const width = windowWidth()\n store.dispatch('setMobileLayout', width <= 800)\n\n // Now we can try getting the server settings and logging in\n await Promise.all([\n checkOAuthToken({ store }),\n setConfig({ store }),\n getTOS({ store }),\n getInstancePanel({ store }),\n getStickers({ store }),\n getNodeInfo({ store })\n ])\n\n const router = new VueRouter({\n mode: 'history',\n routes: routes(store),\n scrollBehavior: (to, _from, savedPosition) => {\n if (to.matched.some(m => m.meta.dontScroll)) {\n return false\n }\n return savedPosition || { x: 0, y: 0 }\n }\n })\n\n /* eslint-disable no-new */\n return new Vue({\n router,\n store,\n i18n,\n el: '#app',\n render: h => h(App)\n })\n}\n\nexport default afterStoreSetup\n","import PublicTimeline from 'components/public_timeline/public_timeline.vue'\nimport PublicAndExternalTimeline from 'components/public_and_external_timeline/public_and_external_timeline.vue'\nimport FriendsTimeline from 'components/friends_timeline/friends_timeline.vue'\nimport TagTimeline from 'components/tag_timeline/tag_timeline.vue'\nimport ConversationPage from 'components/conversation-page/conversation-page.vue'\nimport Interactions from 'components/interactions/interactions.vue'\nimport DMs from 'components/dm_timeline/dm_timeline.vue'\nimport UserProfile from 'components/user_profile/user_profile.vue'\nimport Search from 'components/search/search.vue'\nimport Settings from 'components/settings/settings.vue'\nimport Registration from 'components/registration/registration.vue'\nimport PasswordReset from 'components/password_reset/password_reset.vue'\nimport UserSettings from 'components/user_settings/user_settings.vue'\nimport FollowRequests from 'components/follow_requests/follow_requests.vue'\nimport OAuthCallback from 'components/oauth_callback/oauth_callback.vue'\nimport Notifications from 'components/notifications/notifications.vue'\nimport AuthForm from 'components/auth_form/auth_form.js'\nimport ChatPanel from 'components/chat_panel/chat_panel.vue'\nimport WhoToFollow from 'components/who_to_follow/who_to_follow.vue'\nimport About from 'components/about/about.vue'\nimport RemoteUserResolver from 'components/remote_user_resolver/remote_user_resolver.vue'\n\nexport default (store) => {\n const validateAuthenticatedRoute = (to, from, next) => {\n if (store.state.users.currentUser) {\n next()\n } else {\n next(store.state.instance.redirectRootNoLogin || '/main/all')\n }\n }\n\n return [\n { name: 'root',\n path: '/',\n redirect: _to => {\n return (store.state.users.currentUser\n ? store.state.instance.redirectRootLogin\n : store.state.instance.redirectRootNoLogin) || '/main/all'\n }\n },\n { name: 'public-external-timeline', path: '/main/all', component: PublicAndExternalTimeline },\n { name: 'public-timeline', path: '/main/public', component: PublicTimeline },\n { name: 'friends', path: '/main/friends', component: FriendsTimeline, beforeEnter: validateAuthenticatedRoute },\n { name: 'tag-timeline', path: '/tag/:tag', component: TagTimeline },\n { name: 'conversation', path: '/notice/:id', component: ConversationPage, meta: { dontScroll: true } },\n { name: 'remote-user-profile-acct',\n path: '/remote-users/(@?):username([^/@]+)@:hostname([^/@]+)',\n component: RemoteUserResolver,\n beforeEnter: validateAuthenticatedRoute\n },\n { name: 'remote-user-profile',\n path: '/remote-users/:hostname/:username',\n component: RemoteUserResolver,\n beforeEnter: validateAuthenticatedRoute\n },\n { name: 'external-user-profile', path: '/users/:id', component: UserProfile },\n { name: 'interactions', path: '/users/:username/interactions', component: Interactions, beforeEnter: validateAuthenticatedRoute },\n { name: 'dms', path: '/users/:username/dms', component: DMs, beforeEnter: validateAuthenticatedRoute },\n { name: 'settings', path: '/settings', component: Settings },\n { name: 'registration', path: '/registration', component: Registration },\n { name: 'password-reset', path: '/password-reset', component: PasswordReset, props: true },\n { name: 'registration-token', path: '/registration/:token', component: Registration },\n { name: 'friend-requests', path: '/friend-requests', component: FollowRequests, beforeEnter: validateAuthenticatedRoute },\n { name: 'user-settings', path: '/user-settings', component: UserSettings, beforeEnter: validateAuthenticatedRoute },\n { name: 'notifications', path: '/:username/notifications', component: Notifications, beforeEnter: validateAuthenticatedRoute },\n { name: 'login', path: '/login', component: AuthForm },\n { name: 'chat', path: '/chat', component: ChatPanel, props: () => ({ floating: false }) },\n { name: 'oauth-callback', path: '/oauth-callback', component: OAuthCallback, props: (route) => ({ code: route.query.code }) },\n { name: 'search', path: '/search', component: Search, props: (route) => ({ query: route.query.query }) },\n { name: 'who-to-follow', path: '/who-to-follow', component: WhoToFollow, beforeEnter: validateAuthenticatedRoute },\n { name: 'about', path: '/about', component: About },\n { name: 'user-profile', path: '/(users/)?:name', component: UserProfile }\n ]\n}\n","/* script */\nexport * from \"!!babel-loader!./public_timeline.js\"\nimport __vue_script__ from \"!!babel-loader!./public_timeline.js\"/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-5f2a502e\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./public_timeline.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","// style-loader: Adds some css to the DOM by adding a