diff --git a/.env.example b/.env.example index 725299e2..335af878 100644 --- a/.env.example +++ b/.env.example @@ -42,7 +42,6 @@ API_BASE="/api/1/" API_SEARCH="/api/search" OPEN_REGISTRATION=true -RECAPTCHA_ENABLED=false ENFORCE_EMAIL_VERIFICATION=true MAX_PHOTO_SIZE=15000 diff --git a/.env.testing b/.env.testing index ef7f69cf..e2831617 100644 --- a/.env.testing +++ b/.env.testing @@ -41,7 +41,6 @@ API_BASE="/api/1/" API_SEARCH="/api/search" OPEN_REGISTRATION=false -RECAPTCHA_ENABLED=false ENFORCE_EMAIL_VERIFICATION=true MAX_PHOTO_SIZE=15000 diff --git a/app/Http/Controllers/Api/BaseApiController.php b/app/Http/Controllers/Api/BaseApiController.php index 5ae8f9f6..3110aad7 100644 --- a/app/Http/Controllers/Api/BaseApiController.php +++ b/app/Http/Controllers/Api/BaseApiController.php @@ -32,6 +32,7 @@ use App\Jobs\VideoPipeline\{ VideoPostProcess, VideoThumbnail }; +use App\Services\NotificationService; class BaseApiController extends Controller { @@ -47,13 +48,28 @@ class BaseApiController extends Controller public function notifications(Request $request) { $pid = Auth::user()->profile->id; - $timeago = Carbon::now()->subMonths(6); - $notifications = Notification::whereProfileId($pid) - ->whereDate('created_at', '>', $timeago) - ->latest() - ->simplePaginate(10); - $resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer()); - $res = $this->fractal->createData($resource)->toArray(); + if(config('exp.ns') == false) { + $timeago = Carbon::now()->subMonths(6); + $notifications = Notification::whereProfileId($pid) + ->whereDate('created_at', '>', $timeago) + ->latest() + ->simplePaginate(10); + $resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer()); + $res = $this->fractal->createData($resource)->toArray(); + } else { + $this->validate($request, [ + 'page' => 'nullable|integer|min:1', + 'limit' => 'nullable|integer|min:1|max:10' + ]); + $limit = $request->input('limit') ?? 10; + $page = $request->input('page') ?? 1; + if($page > 3) { + return response()->json([]); + } + $end = (int) $page * $limit; + $start = (int) $end - $limit; + $res = NotificationService::get($pid, $start, $end); + } return response()->json($res); } diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 6cea5e8a..c47bf9ab 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -53,10 +53,6 @@ class LoginController extends Controller 'password' => 'required|string|min:6', ]; - if (config('pixelfed.recaptcha')) { - $rules['g-recaptcha-response'] = 'required|recaptcha'; - } - $this->validate($request, $rules); } diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 4ce5538e..d40c855d 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -76,10 +76,6 @@ class RegisterController extends Controller 'password' => 'required|string|min:6|confirmed', ]; - if (config('pixelfed.recaptcha')) { - $rules['g-recaptcha-response'] = 'required|recaptcha'; - } - return Validator::make($data, $rules); } diff --git a/app/Http/Controllers/FederationController.php b/app/Http/Controllers/FederationController.php index ccba79d2..b6918fc4 100644 --- a/app/Http/Controllers/FederationController.php +++ b/app/Http/Controllers/FederationController.php @@ -118,7 +118,6 @@ class FederationController extends Controller 'homepage' => 'https://pixelfed.org', 'repo' => 'https://github.com/pixelfed/pixelfed', ], - 'captcha' => (bool) config('pixelfed.recaptcha'), ], 'protocols' => [ 'activitypub', diff --git a/app/Observers/NotificationObserver.php b/app/Observers/NotificationObserver.php new file mode 100644 index 00000000..7cc91a85 --- /dev/null +++ b/app/Observers/NotificationObserver.php @@ -0,0 +1,64 @@ +profile_id, $notification->id); + } + + /** + * Handle the notification "updated" event. + * + * @param \App\Notification $notification + * @return void + */ + public function updated(Notification $notification) + { + NotificationService::set($notification->profile_id, $notification->id); + } + + /** + * Handle the notification "deleted" event. + * + * @param \App\Notification $notification + * @return void + */ + public function deleted(Notification $notification) + { + NotificationService::del($notification->profile_id, $notification->id); + } + + /** + * Handle the notification "restored" event. + * + * @param \App\Notification $notification + * @return void + */ + public function restored(Notification $notification) + { + NotificationService::set($notification->profile_id, $notification->id); + } + + /** + * Handle the notification "force deleted" event. + * + * @param \App\Notification $notification + * @return void + */ + public function forceDeleted(Notification $notification) + { + NotificationService::del($notification->profile_id, $notification->id); + } +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 85979131..cf52e7fd 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -4,9 +4,14 @@ namespace App\Providers; use App\Observers\{ AvatarObserver, + NotificationObserver, UserObserver }; -use App\{Avatar,User}; +use App\{ + Avatar, + Notification, + User +}; use Auth, Horizon, URL; use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\Schema; @@ -25,6 +30,7 @@ class AppServiceProvider extends ServiceProvider Schema::defaultStringLength(191); Avatar::observe(AvatarObserver::class); + Notification::observe(NotificationObserver::class); User::observe(UserObserver::class); Horizon::auth(function ($request) { diff --git a/app/Services/NotificationService.php b/app/Services/NotificationService.php new file mode 100644 index 00000000..91b2d21c --- /dev/null +++ b/app/Services/NotificationService.php @@ -0,0 +1,98 @@ + 300 ? 300 : $stop; + $ids = Redis::zrangebyscore($key, $start, $stop); + if(empty($ids)) { + $ids = self::coldGet($id, $start, $stop); + } + foreach($ids as $id) { + $res->push(self::getNotification($id)); + } + return $res; + } + + public static function coldGet($id, $start = 0, $stop = 300) + { + $stop = $stop > 300 ? 300 : $stop; + $ids = Notification::whereProfileId($id) + ->latest() + ->skip($start) + ->take($stop) + ->pluck('id'); + foreach($ids as $key) { + self::set($id, $key); + } + return $ids; + } + + public static function set($id, $val) + { + return Redis::zadd(self::CACHE_KEY . $id, $val, $val); + } + + public static function del($id, $val) + { + return Redis::zrem(self::CACHE_KEY . $id, $val); + } + + public static function add($id, $val) + { + return self::set($id, $val); + } + + public static function rem($id, $val) + { + return self::del($id, $val); + } + + public static function count($id) + { + return Redis::zcount(self::CACHE_KEY . $id, '-inf', '+inf'); + } + + public static function getNotification($id) + { + return Cache::remember('service:notification:'.$id, now()->addDays(7), function() use($id) { + $n = Notification::findOrFail($id); + $fractal = new Fractal\Manager(); + $fractal->setSerializer(new ArraySerializer()); + $resource = new Fractal\Resource\Item($n, new NotificationTransformer()); + return $fractal->createData($resource)->toArray(); + }); + } + + public static function warmCache($id, $stop = 100, $force = false) + { + if(self::count($id) == 0 || $force == true) { + $ids = Notification::whereProfileId($id) + ->latest() + ->limit($stop) + ->pluck('id'); + foreach($ids as $key) { + self::set($id, $key); + } + return 1; + } + return 0; + } +} \ No newline at end of file diff --git a/app/Transformer/Api/NotificationTransformer.php b/app/Transformer/Api/NotificationTransformer.php index ce1ae74c..5a9e4cf4 100644 --- a/app/Transformer/Api/NotificationTransformer.php +++ b/app/Transformer/Api/NotificationTransformer.php @@ -17,7 +17,7 @@ class NotificationTransformer extends Fractal\TransformerAbstract return [ 'id' => (string) $notification->id, 'type' => $this->replaceTypeVerb($notification->action), - 'created_at' => (string) $notification->created_at, + 'created_at' => (string) $notification->created_at->format('c'), 'account' => null, 'status' => null ]; diff --git a/composer.json b/composer.json index 9d942579..0e7e1e84 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,6 @@ "beyondcode/laravel-self-diagnosis": "^1.0.2", "doctrine/dbal": "^2.7", "fideloper/proxy": "^4.0", - "greggilbert/recaptcha": "dev-master", "intervention/image": "^2.4", "jenssegers/agent": "^2.6", "laravel/framework": "5.8.*", diff --git a/composer.lock b/composer.lock index f8741864..731ff762 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "702a3ed0b8499d50323723eb4fb41965", + "content-hash": "f11a1ada5d055b3fb00a5f3aeab6e49a", "packages": [ { "name": "alchemy/binary-driver", @@ -71,16 +71,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.91.4", + "version": "3.93.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "41b67dce3c86da61137b47054d9d52c6ef57b5ec" + "reference": "021c540f24391e883e15c801d03cbebee1206df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/41b67dce3c86da61137b47054d9d52c6ef57b5ec", - "reference": "41b67dce3c86da61137b47054d9d52c6ef57b5ec", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/021c540f24391e883e15c801d03cbebee1206df1", + "reference": "021c540f24391e883e15c801d03cbebee1206df1", "shasum": "" }, "require": { @@ -104,7 +104,8 @@ "ext-sockets": "*", "nette/neon": "^2.3", "phpunit/phpunit": "^4.8.35|^5.4.3", - "psr/cache": "^1.0" + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0" }, "suggest": { "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", @@ -149,7 +150,7 @@ "s3", "sdk" ], - "time": "2019-04-05T18:10:20+00:00" + "time": "2019-04-30T18:24:07+00:00" }, { "name": "beyondcode/laravel-self-diagnosis", @@ -215,16 +216,16 @@ }, { "name": "cakephp/chronos", - "version": "1.2.4", + "version": "1.2.5", "source": { "type": "git", "url": "https://github.com/cakephp/chronos.git", - "reference": "ebda7326d4a65e53bc5bb915ebbbeee98f1926b0" + "reference": "8a2b005a2db173e1b5493002afb8e1e13c71a62a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/ebda7326d4a65e53bc5bb915ebbbeee98f1926b0", - "reference": "ebda7326d4a65e53bc5bb915ebbbeee98f1926b0", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/8a2b005a2db173e1b5493002afb8e1e13c71a62a", + "reference": "8a2b005a2db173e1b5493002afb8e1e13c71a62a", "shasum": "" }, "require": { @@ -268,7 +269,7 @@ "datetime", "time" ], - "time": "2019-02-11T02:08:31+00:00" + "time": "2019-04-23T19:00:57+00:00" }, { "name": "composer/semver", @@ -1165,58 +1166,6 @@ "description": "A PHP class to ping hosts.", "time": "2017-02-02T15:38:40+00:00" }, - { - "name": "greggilbert/recaptcha", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/greggilbert/recaptcha.git", - "reference": "c2ed383785a4fe20467ce470c97c303e5c5b85de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/greggilbert/recaptcha/zipball/c2ed383785a4fe20467ce470c97c303e5c5b85de", - "reference": "c2ed383785a4fe20467ce470c97c303e5c5b85de", - "shasum": "" - }, - "require": { - "illuminate/support": "~5.1", - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/migrations" - ], - "psr-4": { - "Greggilbert\\Recaptcha\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Greg Gilbert", - "email": "greg@greg-gilbert.com" - } - ], - "description": "reCAPTCHA Validator for Laravel 5", - "homepage": "http://github.com/greggilbert/recaptcha", - "keywords": [ - "captcha", - "laravel", - "laravel5", - "recaptcha" - ], - "time": "2017-08-31T03:39:47+00:00" - }, { "name": "guzzlehttp/guzzle", "version": "6.3.3", @@ -1560,16 +1509,16 @@ }, { "name": "jaybizzle/crawler-detect", - "version": "v1.2.80", + "version": "v1.2.81", "source": { "type": "git", "url": "https://github.com/JayBizzle/Crawler-Detect.git", - "reference": "af6a36e6d69670df3f0a3ed8e21d4b8cc67a7847" + "reference": "ffb1880f8e9610569d3bc70dc90bf07db311471d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/af6a36e6d69670df3f0a3ed8e21d4b8cc67a7847", - "reference": "af6a36e6d69670df3f0a3ed8e21d4b8cc67a7847", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/ffb1880f8e9610569d3bc70dc90bf07db311471d", + "reference": "ffb1880f8e9610569d3bc70dc90bf07db311471d", "shasum": "" }, "require": { @@ -1605,7 +1554,7 @@ "crawlerdetect", "php crawler detect" ], - "time": "2019-04-05T19:52:02+00:00" + "time": "2019-04-23T20:02:21+00:00" }, { "name": "jenssegers/agent", @@ -1678,16 +1627,16 @@ }, { "name": "laravel/framework", - "version": "v5.8.10", + "version": "v5.8.15", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "505325b4577968750e622d7a5a271cf8785a7a1a" + "reference": "8a34004aed6ff0aa4072360e3e5bd875edebc223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/505325b4577968750e622d7a5a271cf8785a7a1a", - "reference": "505325b4577968750e622d7a5a271cf8785a7a1a", + "url": "https://api.github.com/repos/laravel/framework/zipball/8a34004aed6ff0aa4072360e3e5bd875edebc223", + "reference": "8a34004aed6ff0aa4072360e3e5bd875edebc223", "shasum": "" }, "require": { @@ -1821,20 +1770,20 @@ "framework", "laravel" ], - "time": "2019-04-04T13:39:49+00:00" + "time": "2019-04-30T14:05:03+00:00" }, { "name": "laravel/horizon", - "version": "v3.1.1", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/laravel/horizon.git", - "reference": "62ba971c2b180fe54dd3e0cde418c7181a481460" + "reference": "32313d787a7a7575c1866e8ed12ec944c1513b7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/horizon/zipball/62ba971c2b180fe54dd3e0cde418c7181a481460", - "reference": "62ba971c2b180fe54dd3e0cde418c7181a481460", + "url": "https://api.github.com/repos/laravel/horizon/zipball/32313d787a7a7575c1866e8ed12ec944c1513b7f", + "reference": "32313d787a7a7575c1866e8ed12ec944c1513b7f", "shasum": "" }, "require": { @@ -1890,7 +1839,7 @@ "laravel", "queue" ], - "time": "2019-04-02T16:09:07+00:00" + "time": "2019-04-30T15:20:11+00:00" }, { "name": "laravel/passport", @@ -2624,16 +2573,16 @@ }, { "name": "nesbot/carbon", - "version": "2.16.3", + "version": "2.17.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "373d9f0d58651af366435148c39beb702c2b7ef4" + "reference": "96acbc0c03782e8115156dd4dd8b736267155066" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/373d9f0d58651af366435148c39beb702c2b7ef4", - "reference": "373d9f0d58651af366435148c39beb702c2b7ef4", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/96acbc0c03782e8115156dd4dd8b736267155066", + "reference": "96acbc0c03782e8115156dd4dd8b736267155066", "shasum": "" }, "require": { @@ -2643,9 +2592,9 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", - "kylekatarnls/multi-tester": "^0.1", + "kylekatarnls/multi-tester": "^1.1", "phpmd/phpmd": "^2.6", - "phpstan/phpstan": "^0.10.8", + "phpstan/phpstan": "^0.11", "phpunit/phpunit": "^7.5 || ^8.0", "squizlabs/php_codesniffer": "^3.4" }, @@ -2680,7 +2629,7 @@ "datetime", "time" ], - "time": "2019-04-06T17:09:23+00:00" + "time": "2019-04-27T18:04:27+00:00" }, { "name": "neutron/temporary-filesystem", @@ -3701,16 +3650,16 @@ }, { "name": "psr/http-factory", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c" + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/378bfe27931ecc54ff824a20d6f6bfc303bbd04c", - "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "shasum": "" }, "require": { @@ -3749,7 +3698,7 @@ "request", "response" ], - "time": "2018-07-30T21:54:04+00:00" + "time": "2019-04-30T12:38:16+00:00" }, { "name": "psr/http-message", @@ -4094,16 +4043,16 @@ }, { "name": "spatie/db-dumper", - "version": "2.13.2", + "version": "2.14.0", "source": { "type": "git", "url": "https://github.com/spatie/db-dumper.git", - "reference": "c0eb0e16d73af665e23bf5b92d1ab2079ab8df91" + "reference": "eec21c55012b02fb8453c9929fa1c3150ca184ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/db-dumper/zipball/c0eb0e16d73af665e23bf5b92d1ab2079ab8df91", - "reference": "c0eb0e16d73af665e23bf5b92d1ab2079ab8df91", + "url": "https://api.github.com/repos/spatie/db-dumper/zipball/eec21c55012b02fb8453c9929fa1c3150ca184ac", + "reference": "eec21c55012b02fb8453c9929fa1c3150ca184ac", "shasum": "" }, "require": { @@ -4140,7 +4089,7 @@ "mysqldump", "spatie" ], - "time": "2019-03-03T10:52:00+00:00" + "time": "2019-04-17T07:03:19+00:00" }, { "name": "spatie/image-optimizer", @@ -4194,16 +4143,16 @@ }, { "name": "spatie/laravel-backup", - "version": "6.1.2", + "version": "6.2.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-backup.git", - "reference": "3b223bf8355d97c4bb9c0afbd7b4c4f7952fc529" + "reference": "d706e64c2500fda276d421551c140693156c0195" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-backup/zipball/3b223bf8355d97c4bb9c0afbd7b4c4f7952fc529", - "reference": "3b223bf8355d97c4bb9c0afbd7b4c4f7952fc529", + "url": "https://api.github.com/repos/spatie/laravel-backup/zipball/d706e64c2500fda276d421551c140693156c0195", + "reference": "d706e64c2500fda276d421551c140693156c0195", "shasum": "" }, "require": { @@ -4264,7 +4213,7 @@ "laravel-backup", "spatie" ], - "time": "2019-04-05T13:08:54+00:00" + "time": "2019-04-25T11:01:00+00:00" }, { "name": "spatie/laravel-image-optimizer", @@ -4433,16 +4382,16 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.0", + "version": "v6.2.1", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707" + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707", - "reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", "shasum": "" }, "require": { @@ -4491,20 +4440,20 @@ "mail", "mailer" ], - "time": "2019-03-10T07:52:41+00:00" + "time": "2019-04-21T09:21:45+00:00" }, { "name": "symfony/console", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "24206aff3efe6962593297e57ef697ebb220e384" + "reference": "e2840bb38bddad7a0feaf85931e38fdcffdb2f81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/24206aff3efe6962593297e57ef697ebb220e384", - "reference": "24206aff3efe6962593297e57ef697ebb220e384", + "url": "https://api.github.com/repos/symfony/console/zipball/e2840bb38bddad7a0feaf85931e38fdcffdb2f81", + "reference": "e2840bb38bddad7a0feaf85931e38fdcffdb2f81", "shasum": "" }, "require": { @@ -4563,7 +4512,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-04-01T07:32:59+00:00" + "time": "2019-04-08T14:23:48+00:00" }, { "name": "symfony/contracts", @@ -4635,7 +4584,7 @@ }, { "name": "symfony/css-selector", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -4688,16 +4637,16 @@ }, { "name": "symfony/debug", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "43ce8ab34c734dcc8a4af576cb86711daab964c5" + "reference": "2d279b6bb1d582dd5740d4d3251ae8c18812ed37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/43ce8ab34c734dcc8a4af576cb86711daab964c5", - "reference": "43ce8ab34c734dcc8a4af576cb86711daab964c5", + "url": "https://api.github.com/repos/symfony/debug/zipball/2d279b6bb1d582dd5740d4d3251ae8c18812ed37", + "reference": "2d279b6bb1d582dd5740d4d3251ae8c18812ed37", "shasum": "" }, "require": { @@ -4740,20 +4689,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2019-03-10T17:09:50+00:00" + "time": "2019-04-11T11:27:41+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "ca5af306fbc37f3cf597e91bc9cfa0c7d3f33544" + "reference": "fbce53cd74ac509cbe74b6f227622650ab759b02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ca5af306fbc37f3cf597e91bc9cfa0c7d3f33544", - "reference": "ca5af306fbc37f3cf597e91bc9cfa0c7d3f33544", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/fbce53cd74ac509cbe74b6f227622650ab759b02", + "reference": "fbce53cd74ac509cbe74b6f227622650ab759b02", "shasum": "" }, "require": { @@ -4804,11 +4753,11 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-03-30T15:58:42+00:00" + "time": "2019-04-06T13:51:08+00:00" }, { "name": "symfony/filesystem", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -4858,16 +4807,16 @@ }, { "name": "symfony/finder", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "267b7002c1b70ea80db0833c3afe05f0fbde580a" + "reference": "e45135658bd6c14b61850bf131c4f09a55133f69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/267b7002c1b70ea80db0833c3afe05f0fbde580a", - "reference": "267b7002c1b70ea80db0833c3afe05f0fbde580a", + "url": "https://api.github.com/repos/symfony/finder/zipball/e45135658bd6c14b61850bf131c4f09a55133f69", + "reference": "e45135658bd6c14b61850bf131c4f09a55133f69", "shasum": "" }, "require": { @@ -4903,20 +4852,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-02-23T15:42:05+00:00" + "time": "2019-04-06T13:51:08+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "5b7ab6beaa5b053b8d3c9b13367ada9b292e12e1" + "reference": "6ebbe61f48069033225c9d3fa7eb5ed116d766d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5b7ab6beaa5b053b8d3c9b13367ada9b292e12e1", - "reference": "5b7ab6beaa5b053b8d3c9b13367ada9b292e12e1", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6ebbe61f48069033225c9d3fa7eb5ed116d766d6", + "reference": "6ebbe61f48069033225c9d3fa7eb5ed116d766d6", "shasum": "" }, "require": { @@ -4957,20 +4906,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-03-30T15:58:42+00:00" + "time": "2019-04-17T14:56:00+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "e8b940bbeebf0f96789b5d17d9d77f8b2613960b" + "reference": "3db83303dbc1da9777e5ff63423b8b7fde423a1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e8b940bbeebf0f96789b5d17d9d77f8b2613960b", - "reference": "e8b940bbeebf0f96789b5d17d9d77f8b2613960b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3db83303dbc1da9777e5ff63423b8b7fde423a1b", + "reference": "3db83303dbc1da9777e5ff63423b8b7fde423a1b", "shasum": "" }, "require": { @@ -5046,7 +4995,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2019-04-02T19:03:51+00:00" + "time": "2019-04-17T16:17:13+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5451,16 +5400,16 @@ }, { "name": "symfony/process", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1e6cbb41dadcaf29e0db034d6ad0d039a9df06e6" + "reference": "8cf39fb4ccff793340c258ee7760fd40bfe745fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1e6cbb41dadcaf29e0db034d6ad0d039a9df06e6", - "reference": "1e6cbb41dadcaf29e0db034d6ad0d039a9df06e6", + "url": "https://api.github.com/repos/symfony/process/zipball/8cf39fb4ccff793340c258ee7760fd40bfe745fe", + "reference": "8cf39fb4ccff793340c258ee7760fd40bfe745fe", "shasum": "" }, "require": { @@ -5496,7 +5445,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-03-10T20:07:02+00:00" + "time": "2019-04-10T16:20:36+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -5565,16 +5514,16 @@ }, { "name": "symfony/routing", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "319f600c1ea0f981f6bdc2f042cfc1690957c0e0" + "reference": "0e5719d216017b1a0342fa48e86467cedca1c954" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/319f600c1ea0f981f6bdc2f042cfc1690957c0e0", - "reference": "319f600c1ea0f981f6bdc2f042cfc1690957c0e0", + "url": "https://api.github.com/repos/symfony/routing/zipball/0e5719d216017b1a0342fa48e86467cedca1c954", + "reference": "0e5719d216017b1a0342fa48e86467cedca1c954", "shasum": "" }, "require": { @@ -5637,20 +5586,20 @@ "uri", "url" ], - "time": "2019-03-30T15:58:42+00:00" + "time": "2019-04-14T18:04:59+00:00" }, { "name": "symfony/translation", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e46933cc31b68f51f7fc5470fb55550407520f56" + "reference": "46c0dede1f925383d13dc783857be2c41efd0b24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e46933cc31b68f51f7fc5470fb55550407520f56", - "reference": "e46933cc31b68f51f7fc5470fb55550407520f56", + "url": "https://api.github.com/repos/symfony/translation/zipball/46c0dede1f925383d13dc783857be2c41efd0b24", + "reference": "46c0dede1f925383d13dc783857be2c41efd0b24", "shasum": "" }, "require": { @@ -5672,7 +5621,9 @@ "symfony/console": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/http-kernel": "~3.4|~4.0", "symfony/intl": "~3.4|~4.0", + "symfony/var-dumper": "~3.4|~4.0", "symfony/yaml": "~3.4|~4.0" }, "suggest": { @@ -5710,20 +5661,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2019-04-01T14:13:08+00:00" + "time": "2019-04-10T16:20:36+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.2.5", + "version": "v4.2.7", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "9f87189ac10b42edf7fb8edc846f1937c6d157cf" + "reference": "e760a38e12b15032325e64be63f7ffc1817af617" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9f87189ac10b42edf7fb8edc846f1937c6d157cf", - "reference": "9f87189ac10b42edf7fb8edc846f1937c6d157cf", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e760a38e12b15032325e64be63f7ffc1817af617", + "reference": "e760a38e12b15032325e64be63f7ffc1817af617", "shasum": "" }, "require": { @@ -5786,20 +5737,20 @@ "debug", "dump" ], - "time": "2019-02-23T15:17:42+00:00" + "time": "2019-04-17T14:57:01+00:00" }, { "name": "tightenco/collect", - "version": "v5.8.10", + "version": "v5.8.15", "source": { "type": "git", "url": "https://github.com/tightenco/collect.git", - "reference": "1e4120c90b3536a9ebd080d50ecaae7b75719054" + "reference": "d1d78dbdd8884c35a79f9750743177297e7f31a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tightenco/collect/zipball/1e4120c90b3536a9ebd080d50ecaae7b75719054", - "reference": "1e4120c90b3536a9ebd080d50ecaae7b75719054", + "url": "https://api.github.com/repos/tightenco/collect/zipball/d1d78dbdd8884c35a79f9750743177297e7f31a9", + "reference": "d1d78dbdd8884c35a79f9750743177297e7f31a9", "shasum": "" }, "require": { @@ -5836,7 +5787,7 @@ "collection", "laravel" ], - "time": "2019-04-02T20:31:59+00:00" + "time": "2019-04-18T18:52:05+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5939,16 +5890,16 @@ }, { "name": "zendframework/zend-diactoros", - "version": "2.1.1", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "c3c330192bc9cc51b7e9ce968ff721dc32ffa986" + "reference": "37bf68b428850ee26ed7c3be6c26236dd95a95f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/c3c330192bc9cc51b7e9ce968ff721dc32ffa986", - "reference": "c3c330192bc9cc51b7e9ce968ff721dc32ffa986", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/37bf68b428850ee26ed7c3be6c26236dd95a95f1", + "reference": "37bf68b428850ee26ed7c3be6c26236dd95a95f1", "shasum": "" }, "require": { @@ -6001,7 +5952,7 @@ "psr", "psr-7" ], - "time": "2019-01-05T20:13:32+00:00" + "time": "2019-04-29T21:11:00+00:00" } ], "packages-dev": [ @@ -6287,16 +6238,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.8.1", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", "shasum": "" }, "require": { @@ -6331,7 +6282,7 @@ "object", "object graph" ], - "time": "2018-06-11T23:09:50+00:00" + "time": "2019-04-07T13:18:21+00:00" }, { "name": "nunomaduro/collision", @@ -6555,16 +6506,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "shasum": "" }, "require": { @@ -6602,7 +6553,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" + "time": "2019-04-30T17:48:53+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -6968,16 +6919,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.8", + "version": "7.5.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c29c0525cf4572c11efe1db49a8b8aee9dfac58a" + "reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c29c0525cf4572c11efe1db49a8b8aee9dfac58a", - "reference": "c29c0525cf4572c11efe1db49a8b8aee9dfac58a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/134669cf0eeac3f79bc7f0c793efbc158bffc160", + "reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160", "shasum": "" }, "require": { @@ -7048,7 +6999,7 @@ "testing", "xunit" ], - "time": "2019-03-26T13:23:54+00:00" + "time": "2019-04-19T15:50:46+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -7217,16 +7168,16 @@ }, { "name": "sebastian/environment", - "version": "4.1.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656" + "reference": "3095910f0f0fb155ac4021fc51a4a7a39ac04e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656", - "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/3095910f0f0fb155ac4021fc51a4a7a39ac04e8a", + "reference": "3095910f0f0fb155ac4021fc51a4a7a39ac04e8a", "shasum": "" }, "require": { @@ -7241,7 +7192,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -7266,7 +7217,7 @@ "environment", "hhvm" ], - "time": "2019-02-01T05:27:49+00:00" + "time": "2019-04-25T07:55:20+00:00" }, { "name": "sebastian/exporter", @@ -7710,9 +7661,7 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "greggilbert/recaptcha": 20 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -7720,6 +7669,7 @@ "ext-bcmath": "*", "ext-ctype": "*", "ext-curl": "*", + "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*" diff --git a/config/app.php b/config/app.php index 5bcac1d3..5aa786fb 100644 --- a/config/app.php +++ b/config/app.php @@ -150,7 +150,6 @@ return [ /* * Package Service Providers... */ - Greggilbert\Recaptcha\RecaptchaServiceProvider::class, Jackiedo\DotenvEditor\DotenvEditorServiceProvider::class, /* @@ -211,7 +210,6 @@ return [ 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, - 'Recaptcha' => Greggilbert\Recaptcha\Facades\Recaptcha::class, 'DotenvEditor' => Jackiedo\DotenvEditor\Facades\DotenvEditor::class, 'PrettyNumber' => App\Util\Lexer\PrettyNumber::class, 'Purify' => Stevebauman\Purify\Facades\Purify::class, diff --git a/config/exp.php b/config/exp.php index 8101428c..3c8d7f8a 100644 --- a/config/exp.php +++ b/config/exp.php @@ -3,6 +3,7 @@ return [ 'lc' => env('EXP_LC', false), - 'rec' => env('EXP_REC', false) + 'rec' => env('EXP_REC', false), + 'ns' => env('EXP_NS', false) ]; \ No newline at end of file diff --git a/config/pixelfed.php b/config/pixelfed.php index 10df3377..b9156cd5 100644 --- a/config/pixelfed.php +++ b/config/pixelfed.php @@ -74,15 +74,15 @@ return [ /* |-------------------------------------------------------------------------- - | Enable Google Recaptcha v2 + | ActivityPub |-------------------------------------------------------------------------- | - | Enable/disable recaptcha on login/registration forms. API Keys required. - | */ - 'recaptcha' => env('RECAPTCHA_ENABLED', false), - - + 'ap_inbox' => env('ACTIVITYPUB_INBOX', false), + 'ap_shared' => env('ACTIVITYPUB_SHAREDINBOX', false), + 'ap_delivery_timeout' => env('ACTIVITYPUB_DELIVERY_TIMEOUT', 2.0), + 'ap_delivery_concurrency' => env('ACTIVITYPUB_DELIVERY_CONCURRENCY', 10), + 'remote_follow_enabled' => env('REMOTE_FOLLOW', false), 'activitypub_enabled' => env('ACTIVITY_PUB', false), @@ -262,11 +262,6 @@ return [ 'enforce_account_limit' => env('LIMIT_ACCOUNT_SIZE', true), - 'ap_inbox' => env('ACTIVITYPUB_INBOX', false), - 'ap_shared' => env('ACTIVITYPUB_SHAREDINBOX', false), - 'ap_delivery_timeout' => env('ACTIVITYPUB_DELIVERY_TIMEOUT', 2.0), - 'ap_delivery_concurrency' => env('ACTIVITYPUB_DELIVERY_CONCURRENCY', 10), - 'import' => [ 'instagram' => [ 'enabled' => false, diff --git a/config/recaptcha.php b/config/recaptcha.php deleted file mode 100644 index 049af6d5..00000000 --- a/config/recaptcha.php +++ /dev/null @@ -1,66 +0,0 @@ - env('RECAPTCHA_PUBLIC_KEY', ''), - 'private_key' => env('RECAPTCHA_PRIVATE_KEY', ''), - - /* - |-------------------------------------------------------------------------- - | Template - |-------------------------------------------------------------------------- - | - | Set a template to use if you don't want to use the standard one. - | - */ - 'template' => '', - - /* - |-------------------------------------------------------------------------- - | Driver - |-------------------------------------------------------------------------- - | - | Determine how to call out to get response; values are 'curl' or 'native'. - | Only applies to v2. - | - */ - 'driver' => 'curl', - - /* - |-------------------------------------------------------------------------- - | Options - |-------------------------------------------------------------------------- - | - | Various options for the driver - | - */ - 'options' => [ - - 'curl_timeout' => 1, - 'curl_verify' => true, - - ], - - /* - |-------------------------------------------------------------------------- - | Version - |-------------------------------------------------------------------------- - | - | Set which version of ReCaptcha to use. - | - */ - - 'version' => 2, - -]; diff --git a/public/js/timeline.js b/public/js/timeline.js index 5b9d3fab..140d3f5f 100644 --- a/public/js/timeline.js +++ b/public/js/timeline.js @@ -1 +1 @@ -!function(t){var e={};function s(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,s),a.l=!0,a.exports}s.m=t,s.c=e,s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)s.d(i,a,function(e){return t[e]}.bind(null,a));return i},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/",s(s.s=6)}({"2Jpm":function(t,e,s){"use strict";s.r(e);var i={props:["status"]},a=s("KHd+"),o=Object(a.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",[s("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("div",{staticClass:"embed-responsive embed-responsive-16by9"},[s("video",{staticClass:"video",attrs:{preload:"none",controls:"",loop:""}},[s("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])])]):s("div",{staticClass:"embed-responsive embed-responsive-16by9"},[s("video",{staticClass:"video",attrs:{preload:"none",controls:"",loop:""}},[s("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])},[],!1,null,null,null);e.default=o.exports},"4khY":function(t,e,s){var i=s("V/1n");"string"==typeof i&&(i=[[t.i,i,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(i,a);i.locals&&(t.exports=i.locals)},6:function(t,e,s){t.exports=s("KqaD")},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var s=e.protocol+"//"+e.host,i=s+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var a,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(a=0===o.indexOf("//")?o:0===o.indexOf("/")?s+o:i+o.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")})}},"9wGH":function(t,e,s){"use strict";s.r(e);var i={props:["status"]},a=s("KHd+"),o=Object(a.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",[s("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carousel",controls:"","img-blank":"",background:"#ffffff",interval:0}},t._l(t.status.media_attachments,function(t,e){return s("b-carousel-slide",{key:t.id+"-media"},[s("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:t.description,width:"100%",height:"100%"},slot:"img"},[s("source",{attrs:{src:t.url,type:t.mime}})])])}),1)],1)]):s("div",[s("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carousel",controls:"","img-blank":"",background:"#ffffff",interval:0}},t._l(t.status.media_attachments,function(t,e){return s("b-carousel-slide",{key:t.id+"-media"},[s("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:t.description,width:"100%",height:"100%"},slot:"img"},[s("source",{attrs:{src:t.url,type:t.mime}})])])}),1)],1)},[],!1,null,null,null);e.default=o.exports},EUWT:function(t,e,s){var i=s("fb7v");"string"==typeof i&&(i=[[t.i,i,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(i,a);i.locals&&(t.exports=i.locals)},Ht21:function(t,e,s){"use strict";var i=s("IJk2");s.n(i).a},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var s=function(t,e){var s=t[1]||"",i=t[3];if(!i)return s;if(e&&"function"==typeof btoa){var a=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[s].concat(o).concat([a]).join("\n")}var n;return[s].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s}).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},a=0;a767&&t.fetchProfile()})},mounted:function(){0!=$('link[data-stylesheet="dark"]').length&&(this.modes.dark=!0),this.$nextTick(function(){$('[data-toggle="tooltip"]').tooltip()})},updated:function(){pixelfed.readmore()},methods:{fetchProfile:function(){var t=this;axios.get("/api/v1/accounts/verify_credentials").then(function(e){t.profile=e.data,$(".profile-card .loader").addClass("d-none"),$(".profile-card .contents").removeClass("d-none"),$(".profile-card .card-footer").removeClass("d-none")}).catch(function(t){swal("Oops, something went wrong","Please reload the page.","error")})},fetchTimelineApi:function(){var t=this,e=!1;switch(this.scope){case"home":e="/api/v1/timelines/home";break;case"local":e="/api/v1/timelines/public";break;case"network":e="/api/v1/timelines/network"}axios.get(e,{params:{max_id:this.max_id,limit:6}}).then(function(e){var s,a=e.data;(s=t.feed).push.apply(s,i(a));var o=a.map(function(t){return t.id});t.min_id=Math.max.apply(Math,i(o)),t.max_id=Math.min.apply(Math,i(o)),$(".timeline .pagination").removeClass("d-none"),t.loading=!1,window.outerWidth>767&&t.expRec()}).catch(function(t){})},infiniteTimeline:function(t){var e=this;if(!this.loading){var s=!1;switch(this.scope){case"home":s="/api/v1/timelines/home";break;case"local":s="/api/v1/timelines/public";break;case"network":s="/api/v1/timelines/network"}axios.get(s,{params:{max_id:this.max_id,limit:6}}).then(function(s){if(s.data.length&&0==e.loading){var a,o=s.data;(a=e.feed).push.apply(a,i(o));var n=o.map(function(t){return t.id});e.min_id=Math.max.apply(Math,i(n)),e.max_id=Math.min.apply(Math,i(n)),e.page+=1,t.loaded(),e.loading=!1}else t.complete()})}},loadMore:function(t){var e=this,s="home"==this.scope?"/api/v1/timelines/home":"/api/v1/timelines/public";t.target.innerText="Loading...",axios.get(s,{params:{page:this.page}}).then(function(s){if(s.data.length&&0==e.loading){var a,o=s.data,n=o.map(function(t){return t.id});e.min_id=Math.min.apply(Math,i(n)),1==e.page&&(e.max_id=Math.max.apply(Math,i(n))),(a=e.feed).push.apply(a,i(o)),e.page+=1,e.loading=!1,t.target.innerText="Load more posts"}})},reportUrl:function(t){return"/i/report?type="+(t.in_reply_to?"comment":"post")+"&id="+t.id},commentFocus:function(t,e){this.replyId==t.id||t.comments_disabled||(this.replies={},this.replyId=t.id,this.fetchStatusComments(t,""))},likeStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/like",{item:t.id}).then(function(e){t.favourites_count=e.data.count,t.favourited=!t.favourited}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},shareStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/share",{item:t.id}).then(function(e){t.reblogs_count=e.data.count,t.reblogged=!t.reblogged}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},timestampFormat:function(t){var e=new Date(t);return e.toDateString()+" "+e.toLocaleTimeString()},editUrl:function(t){return t.url+"/edit"},redirect:function(t){window.location.href=t},replyUrl:function(t){return"/p/"+this.profile.username+"/"+(t.account.id==this.profile.id?t.id:t.in_reply_to_id)},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},statusOwner:function(t){return t.account.id==this.profile.id},fetchStatusComments:function(t,e){var s=this;axios.get("/api/v2/status/"+t.id+"/replies").then(function(t){var e=t.data;s.replies=_.reverse(e)}).catch(function(t){})},muteProfile:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/mute",{type:"user",item:t.account.id}).then(function(s){e.feed=e.feed.filter(function(e){return e.account.id!==t.account.id}),swal("Success","You have successfully muted "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},blockProfile:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:t.account.id}).then(function(s){e.feed=e.feed.filter(function(e){return e.account.id!==t.account.id}),swal("Success","You have successfully blocked "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},deletePost:function(t,e){var s=this;0!=$("body").hasClass("loggedIn")&&t.account.id===this.profile.id&&0!=window.confirm("Are you sure you want to delete this post?")&&axios.post("/i/delete",{type:"status",item:t.id}).then(function(t){s.feed.splice(e,1),swal("Success","You have successfully deleted this post","success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},commentSubmit:function(t,e){var s=this,i=t.id,a=e.target,o=$(a).find('input[name="comment"]').val();a.parentElement.parentElement.getElementsByClassName("comments")[0];axios.post("/i/comment",{item:i,comment:o}).then(function(t){a.reset(),a.blur(),s.replies.push(t.data.entity)})},moderatePost:function(t,e,s){var i=t.account.username;switch(console.log("action: "+e+" status id"+t.id),e){case"autocw":var a="Are you sure you want to enforce CW for "+i+" ?";swal({title:"Confirm",text:a,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully enforced CW for "+i,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"noautolink":a="Are you sure you want to disable auto linking for "+i+" ?",swal({title:"Confirm",text:a,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully disabled autolinking for "+i,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"unlisted":a="Are you sure you want to unlist from timelines for "+i+" ?",swal({title:"Confirm",text:a,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully unlisted for "+i,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"disable":a="Are you sure you want to disable "+i+"’s account ?",swal({title:"Confirm",text:a,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully disabled "+i+"’s account","success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"suspend":a="Are you sure you want to suspend "+i+"’s account ?",swal({title:"Confirm",text:a,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully suspend "+i+"’s account","success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})})}},toggleOptionsMenu:function(){this.optionMenuState=!this.optionMenuState},modeModToggle:function(){this.modes.mod=!this.modes.mod,window.ls.set("pixelfed-classicui-settings",this.modes)},modeNotifyToggle:function(){this.modes.notify=!this.modes.notify,window.ls.set("pixelfed-classicui-settings",this.modes)},modeDarkToggle:function(){var t=this;1==this.modes.dark?axios.post("/i/metro/dark-mode",{mode:"light"}).then(function(e){$("link[data-stylesheet=dark]").attr("data-stylesheet","light").attr("href","/css/app.css?v="+Date.now()),t.modes.dark=!1}):axios.post("/i/metro/dark-mode",{mode:"dark"}).then(function(e){$("link[data-stylesheet=light]").attr("data-stylesheet","dark").attr("href","/css/appdark.css?v="+Date.now()),t.modes.dark=!0}),window.ls.set("pixelfed-classicui-settings",this.modes)},modeInfiniteToggle:function(){this.modes.infinite=!this.modes.infinite,window.ls.set("pixelfed-classicui-settings",this.modes)},followingModal:function(){var t=this;this.following.length>0?this.$refs.followingModal.show():(axios.get("/api/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor}}).then(function(e){t.following=e.data,t.followingCursor++}),res.data.length<10&&(this.followingMore=!1),this.$refs.followingModal.show())},followersModal:function(){var t=this;this.followers.length>0?this.$refs.followerModal.show():(axios.get("/api/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then(function(e){t.followers=e.data,t.followerCursor++}),res.data.length<10&&(this.followerMore=!1),this.$refs.followerModal.show())},followingLoadMore:function(){var t=this;axios.get("/api/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor}}).then(function(e){var s;e.data.length>0&&((s=t.following).push.apply(s,i(e.data)),t.followingCursor++);e.data.length<10&&(t.followingMore=!1)})},followersLoadMore:function(){var t=this;axios.get("/api/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then(function(e){var s;e.data.length>0&&((s=t.followers).push.apply(s,i(e.data)),t.followerCursor++);e.data.length<10&&(t.followerMore=!1)})},lightbox:function(t){this.lightboxMedia=t,this.$refs.lightboxModal.show()},expLc:function(t){return 0==this.config.ab.lc||1==this.statusOwner(t)},expRec:function(){var t=this;0!=this.config.ab.rec&&axios.get("/api/local/exp/rec").then(function(e){t.suggestions=e.data})},expRecFollow:function(t,e){var s=this;0!=this.config.ab.rec&&axios.post("/i/follow",{item:t}).then(function(t){s.suggestions.splice(e,1)})},followModalAction:function(t,e){var s=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"following";axios.post("/i/follow",{item:t}).then(function(t){"following"==i&&s.following.splice(e,1)})}}},o=(s("vr/F"),s("KHd+")),n=Object(o.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-md-8 col-lg-8 pt-sm-2 px-0 my-sm-3 timeline order-2 order-md-1"},[s("div",{staticStyle:{"padding-top":"10px"}},[t.loading?s("div",{staticClass:"text-center"},[t._m(0)]):t._e(),t._v(" "),t._l(t.feed,function(e,i){return s("div",{key:i+"-"+e.id,staticClass:"card mb-sm-4 status-card card-md-rounded-0",attrs:{"data-status-id":e.id}},[s("div",{staticClass:"card-header d-inline-flex align-items-center bg-white"},[s("img",{staticStyle:{"border-radius":"32px"},attrs:{src:e.account.avatar,width:"32px",height:"32px"}}),t._v(" "),s("a",{staticClass:"username font-weight-bold pl-2 text-dark",attrs:{href:e.account.url}},[t._v("\n\t\t\t\t\t\t\t"+t._s(e.account.username)+"\n\t\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"text-right",staticStyle:{"flex-grow":"1"}},[t._m(1,!0),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right"},[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:e.url}},[t._v("Go to post")]),t._v(" "),0==t.statusOwner(e)?s("span",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl(e)}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.muteProfile(e)}}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.blockProfile(e)}}},[t._v("Block Profile")])]):t._e(),t._v(" "),1==t.statusOwner(e)?s("span",[s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:function(s){return t.deletePost(e)}}},[t._v("Delete")])]):t._e(),t._v(" "),1==t.profile.is_admin&&1==t.modes.mod?s("span",[s("div",{staticClass:"dropdown-divider"}),t._v(" "),t.statusOwner(e)?t._e():s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:function(s){return t.deletePost(e)}}},[t._v("Delete")]),t._v(" "),s("div",{staticClass:"dropdown-divider"}),t._v(" "),s("h6",{staticClass:"dropdown-header"},[t._v("Mod Tools")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"autocw")}}},[s("p",{staticClass:"mb-0",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:"Adds a CW to every post made by this account."}},[t._v("Enforce CW")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"noautolink")}}},[s("p",{staticClass:"mb-0",attrs:{title:"Do not transform mentions, hashtags or urls into HTML."}},[t._v("No Autolinking")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"unlisted")}}},[s("p",{staticClass:"mb-0",attrs:{title:"Removes account from public/network timelines."}},[t._v("Unlisted Posts")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"disable")}}},[s("p",{staticClass:"mb-0",attrs:{title:"Temporarily disable account until next time user log in."}},[t._v("Disable Account")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"suspend")}}},[s("p",{staticClass:"mb-0",attrs:{title:"This prevents any new interactions, without deleting existing data."}},[t._v("Suspend Account")])])]):t._e()])])]),t._v(" "),s("div",{staticClass:"postPresenterContainer"},["photo"===e.pf_type?s("div",{staticClass:"w-100"},[s("photo-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):"video"===e.pf_type?s("div",{staticClass:"w-100"},[s("video-presenter",{attrs:{status:e}})],1):"photo:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("photo-album-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):"video:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("video-album-presenter",{attrs:{status:e}})],1):"photo:video:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("mixed-album-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):s("div",{staticClass:"w-100"},[s("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])]),t._v(" "),s("div",{staticClass:"card-body"},[s("div",{staticClass:"reactions my-1"},[s("h3",{class:[e.favourited?"fas fa-heart text-danger pr-3 m-0 cursor-pointer":"far fa-heart pr-3 m-0 like-btn cursor-pointer"],attrs:{title:"Like"},on:{click:function(s){return t.likeStatus(e,s)}}}),t._v(" "),e.comments_disabled?t._e():s("h3",{staticClass:"far fa-comment pr-3 m-0 cursor-pointer",attrs:{title:"Comment"},on:{click:function(s){return t.commentFocus(e,s)}}}),t._v(" "),s("h3",{class:[e.reblogged?"far fa-share-square pr-3 m-0 text-primary cursor-pointer":"far fa-share-square pr-3 m-0 share-btn cursor-pointer"],attrs:{title:"Share"},on:{click:function(s){return t.shareStatus(e,s)}}})]),t._v(" "),1==t.expLc(e)?s("div",{staticClass:"likes font-weight-bold"},[s("span",{staticClass:"like-count"},[t._v(t._s(e.favourites_count))]),t._v(" "+t._s(1==e.favourites_count?"like":"likes")+"\n\t\t\t\t\t\t")]):t._e(),t._v(" "),s("div",{staticClass:"caption"},[s("p",{staticClass:"mb-2 read-more",staticStyle:{overflow:"hidden"}},[s("span",{staticClass:"username font-weight-bold"},[s("bdi",[s("a",{staticClass:"text-dark",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))])])]),t._v(" "),s("span",{domProps:{innerHTML:t._s(e.content)}})])]),t._v(" "),e.id!=t.replyId||e.comments_disabled?t._e():s("div",{staticClass:"comments"},t._l(t.replies,function(e,i){return s("p",{staticClass:"mb-0 d-flex justify-content-between align-items-top read-more",staticStyle:{"overflow-y":"hidden"}},[s("span",[s("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" "),s("span",{domProps:{innerHTML:t._s(e.content)}})]),t._v(" "),s("span",{staticClass:"mb-0",staticStyle:{"min-width":"38px"}},[s("span",{on:{click:function(s){return t.likeStatus(e,s)}}},[s("i",{class:[e.favourited?"fas fa-heart fa-sm text-danger":"far fa-heart fa-sm text-lighter"]})]),t._v(" "),s("post-menu",{staticClass:"d-inline-flex pl-2",attrs:{status:e,profile:t.profile,size:"sm",modal:"true",feed:t.feed}})],1)])}),0),t._v(" "),s("div",{staticClass:"timestamp mt-2"},[s("p",{staticClass:"small text-uppercase mb-0"},[s("a",{staticClass:"text-muted",attrs:{href:e.url}},[s("timeago",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.bottom",modifiers:{hover:!0,bottom:!0}}],attrs:{datetime:e.created_at,"auto-update":60,"converter-options":{includeSeconds:!0},title:t.timestampFormat(e.created_at)}})],1)])])]),t._v(" "),e.id==t.replyId?s("div",{staticClass:"card-footer bg-white"},[s("form",{on:{submit:function(s){return s.preventDefault(),t.commentSubmit(e,s)}}},[s("input",{attrs:{type:"hidden",name:"item",value:""}}),t._v(" "),s("input",{staticClass:"form-control status-reply-input",attrs:{name:"comment",placeholder:"Add a comment…",autocomplete:"off"}})])]):t._e()])}),t._v(" "),1==t.modes.infinite&&!t.loading&&t.feed.length>0?s("div",[s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[s("infinite-loading",{attrs:{distance:"800"},on:{infinite:t.infiniteTimeline}},[s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"},[t._v("No more posts to load")]),t._v(" "),s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"},[t._v("No posts found")])])],1)])]):t._e(),t._v(" "),0==t.modes.infinite&&!t.loading&&t.feed.length>0?s("div",{staticClass:"pagination"},[s("p",{staticClass:"btn btn-outline-secondary font-weight-bold btn-block",on:{click:t.loadMore}},[t._v("Load more posts")])]):t._e(),t._v(" "),t.loading||"home"!=t.scope||0!=t.feed.length?t._e():s("div",[s("div",{staticClass:"card"},[s("div",{staticClass:"card-body text-center"},[s("p",{staticClass:"h2 font-weight-lighter p-5"},[t._v("Hello, "+t._s(t.profile.acct))]),t._v(" "),t._m(2),t._v(" "),s("p",{staticClass:"h3 font-weight-lighter p-5"},[t._v("Start following people to build your timeline.")]),t._v(" "),t._m(3)])])])],2)]),t._v(" "),s("div",{staticClass:"col-md-4 col-lg-4 pt-2 my-3 order-1 order-md-2 d-none d-md-block"},[s("div",{staticClass:"position-sticky",staticStyle:{top:"68px"}},[s("div",{staticClass:"mb-4"},[s("div",{},[s("div",{},[s("div",{staticClass:"media d-flex align-items-center"},[s("a",{attrs:{href:t.profile.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:t.profile.avatar||"/storage/avatars/default.png",alt:"avatar",width:"64px",height:"64px"}})]),t._v(" "),s("div",{staticClass:"media-body d-flex justify-content-between word-break"},[s("div",[s("p",{staticClass:"mb-0 px-0 font-weight-bold"},[s("a",{staticClass:"text-dark",attrs:{href:t.profile.url}},[t._v(t._s(t.profile.username||"loading..."))])]),t._v(" "),s("p",{staticClass:"my-0 text-muted pb-0"},[t._v(t._s(t.profile.display_name||"loading..."))])]),t._v(" "),s("div",{staticClass:"ml-2"},[s("a",{class:[1==t.optionMenuState?"text-primary":"text-muted"],on:{click:function(e){return t.toggleOptionsMenu()}}},[s("i",{staticClass:"fas fa-cog"})])])])])])])]),t._v(" "),1==t.optionMenuState?s("div",{staticClass:"mb-4"},[s("div",{staticClass:"card options-card"},[s("div",{staticClass:"card-body small"},[t.profile.is_admin?s("div",{staticClass:"custom-control custom-switch mb-3"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.modes.mod,expression:"modes.mod"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"mode-mod"},domProps:{checked:Array.isArray(t.modes.mod)?t._i(t.modes.mod,null)>-1:t.modes.mod},on:{click:function(e){return t.modeModToggle()},change:function(e){var s=t.modes.mod,i=e.target,a=!!i.checked;if(Array.isArray(s)){var o=t._i(s,null);i.checked?o<0&&t.$set(t.modes,"mod",s.concat([null])):o>-1&&t.$set(t.modes,"mod",s.slice(0,o).concat(s.slice(o+1)))}else t.$set(t.modes,"mod",a)}}}),t._v(" "),s("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"mode-mod"}},[t._v("Moderator Mode")])]):t._e(),t._v(" "),s("div",{staticClass:"custom-control custom-switch"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.modes.infinite,expression:"modes.infinite"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"mode-infinite"},domProps:{checked:Array.isArray(t.modes.infinite)?t._i(t.modes.infinite,null)>-1:t.modes.infinite},on:{click:function(e){return t.modeInfiniteToggle()},change:function(e){var s=t.modes.infinite,i=e.target,a=!!i.checked;if(Array.isArray(s)){var o=t._i(s,null);i.checked?o<0&&t.$set(t.modes,"infinite",s.concat([null])):o>-1&&t.$set(t.modes,"infinite",s.slice(0,o).concat(s.slice(o+1)))}else t.$set(t.modes,"infinite",a)}}}),t._v(" "),s("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"mode-infinite"}},[t._v("Enable Infinite Scroll")])]),t._v(" "),s("hr"),t._v(" "),s("p",{staticClass:"font-weight-bold"},[t._v("BETA FEATURES")]),t._v(" "),t._m(4)])])]):t._e(),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.modes.notify,expression:"modes.notify == true"}],staticClass:"mb-4"},[s("notification-card")],1),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.suggestions.length&&t.config.ab&&1==t.config.ab.rec,expression:"suggestions.length && config.ab && config.ab.rec == true"}],staticClass:"mb-4"},[s("div",{staticClass:"card"},[t._m(5),t._v(" "),s("div",{staticClass:"card-body pt-0"},t._l(t.suggestions,function(e,i){return s("div",{staticClass:"media align-items-center mt-3"},[s("a",{attrs:{href:"/"+e.username}},[s("img",{staticClass:"rounded-circle mr-3",attrs:{src:e.avatar,width:"32px",height:"32px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0 font-weight-bold small"},[s("a",{staticClass:"text-decoration-none text-dark",attrs:{href:"/"+e.username}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v(t._s(e.message))])]),t._v(" "),s("a",{staticClass:"font-weight-bold small",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.expRecFollow(e.id,i)}}},[t._v("Follow")])])}),0)])]),t._v(" "),t._m(6)])])]),t._v(" "),s("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":"","hide-footer":"",centered:"",size:"lg","body-class":"p-0"}},[t.lightboxMedia?s("div",{class:t.lightboxMedia.filter_class},[s("img",{staticClass:"img-fluid",staticStyle:{"min-height":"100%","min-width":"100%"},attrs:{src:t.lightboxMedia.url}})]):t._e()])],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle py-0",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[e("span",{staticClass:"fas fa-ellipsis-v fa-lg text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"text-lighter"},[e("i",{staticClass:"fas fa-camera-retro fa-5x"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("a",{staticClass:"btn btn-primary font-weight-bold py-0",attrs:{href:"/discover"}},[this._v("Discover new people and posts")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"alert alert-primary font-weight-bold text-center"},[this._v("Experimental features have been moved to the "),e("a",{attrs:{href:"/settings/labs"}},[this._v("Labs")]),this._v(" settings page.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header bg-white text-muted d-flex justify-content-between align-items-center"},[e("div",[this._v("Suggestions For You")]),this._v(" "),e("div",{staticClass:"small text-dark"})])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("footer",[s("div",{staticClass:"container pb-5"},[s("p",{staticClass:"mb-0 text-uppercase font-weight-bold text-muted small"},[s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/about"}},[t._v("About Us")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/help"}},[t._v("Help")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/open-source"}},[t._v("Open Source")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/language"}},[t._v("Language")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/terms"}},[t._v("Terms")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/privacy"}},[t._v("Privacy")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/platform"}},[t._v("API")])]),t._v(" "),s("p",{staticClass:"mb-0 text-uppercase font-weight-bold text-muted small"},[s("a",{staticClass:"text-muted",attrs:{href:"http://pixelfed.org",rel:"noopener",title:"","data-toggle":"tooltip"}},[t._v("Powered by PixelFed")])])])])}],!1,null,"6ae167ef",null);e.default=n.exports},KqaD:function(t,e,s){Vue.component("notification-card",s("x6yo").default),Vue.component("photo-presenter",s("d+I4").default),Vue.component("video-presenter",s("2Jpm").default),Vue.component("photo-album-presenter",s("Mrqh").default),Vue.component("video-album-presenter",s("9wGH").default),Vue.component("mixed-album-presenter",s("exej").default),Vue.component("post-menu",s("yric").default),Vue.component("timeline",s("KhVi").default)},Mrqh:function(t,e,s){"use strict";s.r(e);var i={props:["status"],data:function(){return{cursor:0}}},a=(s("kAaE"),s("KHd+")),o=Object(a.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",[s("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","min-height":"330px",display:"flex","align-items":"center"},attrs:{id:t.status.id+"-carousel",controls:"",background:"#ffffff",interval:0},model:{value:t.cursor,callback:function(e){t.cursor=e},expression:"cursor"}},[t._l(t.status.media_attachments,function(e,i){return s("b-carousel-slide",{key:e.id},[s("div",{class:e.filter_class+" d-block mx-auto text-center",staticStyle:{"max-height":"600px"},attrs:{slot:"img"},on:{click:function(e){return t.$emit("lightbox",t.status.media_attachments[i])}},slot:"img"},[s("img",{staticClass:"img-fluid",staticStyle:{"max-height":"600px"},attrs:{src:e.url,alt:e.description,title:e.description,loading:"lazy"},on:{click:function(e){return t.$emit("lightbox",t.status.media_attachments[i])}}})])])}),t._v(" "),s("span",{staticClass:"badge badge-dark box-shadow",staticStyle:{position:"absolute",top:"10px",right:"10px"}},[t._v("\n\t\t\t\t"+t._s(t.cursor+1)+" / "+t._s(t.status.media_attachments.length)+"\n\t\t\t")])],2)],1)]):s("div",[s("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","min-height":"330px",display:"flex","align-items":"center"},attrs:{id:t.status.id+"-carousel",controls:"",background:"#ffffff",interval:0},model:{value:t.cursor,callback:function(e){t.cursor=e},expression:"cursor"}},[t._l(t.status.media_attachments,function(e,i){return s("b-carousel-slide",{key:e.id,attrs:{alt:e.description,title:e.description}},[s("div",{class:e.filter_class+" d-block mx-auto text-center",staticStyle:{"max-height":"600px"},attrs:{slot:"img"},on:{click:function(e){return t.$emit("lightbox",t.status.media_attachments[i])}},slot:"img"},[s("img",{staticClass:"img-fluid",staticStyle:{"max-height":"600px"},attrs:{src:e.url,loading:"lazy"}})])])}),t._v(" "),s("span",{staticClass:"badge badge-dark box-shadow",staticStyle:{position:"absolute",top:"10px",right:"10px"}},[t._v("\n\t\t\t"+t._s(t.cursor+1)+" / "+t._s(t.status.media_attachments.length)+"\n\t\t")])],2)],1)},[],!1,null,"8db4cfae",null);e.default=o.exports},U94k:function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.card-img-top[data-v-34cc44d8] {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n}\n",""])},"V/1n":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.card-img-top[data-v-8db4cfae] {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n}\n",""])},YqIb:function(t,e,s){var i=s("U94k");"string"==typeof i&&(i=[[t.i,i,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(i,a);i.locals&&(t.exports=i.locals)},"aET+":function(t,e,s){var i,a,o={},n=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=i.apply(this,arguments)),a}),r=function(t){var e={};return function(t,s){if("function"==typeof t)return t();if(void 0===e[t]){var i=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,s);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}}(),l=null,c=0,d=[],u=s("9tPo");function f(t,e){for(var s=0;s=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var i=function(){0;return s.nc}();i&&(t.attrs.nonce=i)}return g(e,t.attrs),p(t,e),e}function g(t,e){Object.keys(e).forEach(function(s){t.setAttribute(s,e[s])})}function _(t,e){var s,i,a,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var n=c++;s=l||(l=v(e)),i=x.bind(null,s,n,!1),a=x.bind(null,s,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(s=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),p(t,e),e}(e),i=function(t,e,s){var i=s.css,a=s.sourceMap,o=void 0===e.convertToAbsoluteUrls&&a;(e.convertToAbsoluteUrls||o)&&(i=u(i));a&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var n=new Blob([i],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(n),r&&URL.revokeObjectURL(r)}.bind(null,s,e),a=function(){h(s),s.href&&URL.revokeObjectURL(s.href)}):(s=v(e),i=function(t,e){var s=e.css,i=e.media;i&&t.setAttribute("media",i);if(t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}.bind(null,s),a=function(){h(s)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else a()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=n()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=m(t,e);return f(s,e),function(t){for(var i=[],a=0;a