From 2e2a946c649b55b480d46fbd69da6820d548e24a Mon Sep 17 00:00:00 2001 From: Mostafa Ahangarha Date: Thu, 10 Jun 2021 13:29:26 +0430 Subject: [PATCH 01/12] improve persian translation --- resources/lang/fa/helpcenter.php | 4 +-- resources/lang/fa/navmenu.php | 12 ++++---- resources/lang/fa/notification.php | 6 ++-- resources/lang/fa/passwords.php | 8 ++--- resources/lang/fa/profile.php | 4 +-- resources/lang/fa/site.php | 4 +-- resources/lang/fa/timeline.php | 2 +- resources/lang/fa/validation.php | 48 +++++++++++++++--------------- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/resources/lang/fa/helpcenter.php b/resources/lang/fa/helpcenter.php index a5a9aebc0..e54d2bcf5 100644 --- a/resources/lang/fa/helpcenter.php +++ b/resources/lang/fa/helpcenter.php @@ -15,8 +15,8 @@ return [ 'timelines' => 'خط زمانی', 'embed' => 'توکار', - 'communityGuidelines' => 'دستورالعمل‌های انجمن', - 'whatIsTheFediverse' => 'نامتمرکز یعنی چی؟', + 'communityGuidelines' => 'دستورالعمل‌های اجتماع', + 'whatIsTheFediverse' => 'فدیورس چیست؟', 'controllingVisibility' => 'کنترل نمایش', 'blockingAccounts' => 'حساب‌های مسدودشده', 'safetyTips' => 'نکات امنیتی', diff --git a/resources/lang/fa/navmenu.php b/resources/lang/fa/navmenu.php index 1a59a3332..890d041f0 100644 --- a/resources/lang/fa/navmenu.php +++ b/resources/lang/fa/navmenu.php @@ -5,15 +5,15 @@ return [ 'home' => 'خانه', 'local' => 'محلی', 'network' => 'شبکه', - 'discover' => 'کشف‌کردن', + 'discover' => 'کشف ‌کردن', 'viewMyProfile' => 'مشاهده نمایه من', 'myProfile' => 'نمایه من', - 'myTimeline' => 'جدول زمانی من', - 'publicTimeline' => 'جدول زمانی عمومی', - 'remoteFollow' => 'از راه دور دنبال کنید', + 'myTimeline' => 'خط‌زمانی من', + 'publicTimeline' => 'خط‌زمانی عمومی', + 'remoteFollow' => 'پیگیری راه دور', 'settings' => 'تنظیمات', 'admin' => 'مدیر', 'logout' => 'خروج', - 'directMessages' => 'پیام خصوصی', - 'composePost' => 'نوشتن پست', + 'directMessages' => 'پیام مستقیم', + 'composePost' => 'ایجاد فرسته', ]; diff --git a/resources/lang/fa/notification.php b/resources/lang/fa/notification.php index f3289b686..6769d53a6 100644 --- a/resources/lang/fa/notification.php +++ b/resources/lang/fa/notification.php @@ -2,11 +2,11 @@ return [ - 'likedPhoto' => 'پست شما را پسندید.', + 'likedPhoto' => 'فرستهٔ شما را پسندید.', 'likedComment' => 'دیدگاه شما را پسندید.', 'startedFollowingYou' => 'شما را دنبال می‌کند.', - 'commented' => 'دیدگاهی روی پست شما نوشت.', + 'commented' => 'دیدگاهی روی فرستهٔ شما نوشت.', 'mentionedYou' => 'شما را صدا کرد.', - 'shared' => 'پستی منتشر کرد.', + 'shared' => 'فرسته‌ای منتشر کرد.', ]; diff --git a/resources/lang/fa/passwords.php b/resources/lang/fa/passwords.php index b65644c5c..f58c26627 100644 --- a/resources/lang/fa/passwords.php +++ b/resources/lang/fa/passwords.php @@ -13,10 +13,10 @@ return [ | */ - 'password' => 'رمز عبور شما باید حداقل شامل ۶ کاراکتر باشد و همچنین با تکرار آن مطابق باشد.', + 'password' => 'رمز عبور شما باید حداقل شامل ۶ حرف بوده و همچنین با تکرار آن مطابق باشد.', 'reset' => 'رمز عبور شما بازنشانی شد!', - 'sent' => 'اگر ایمیل شما در پایگاه‌داده ما موجود باشد، شما ایمیل شامل یک لینک بازنشانی رمز عبور در چند دقیقه آینده دریافت خواهید کرد. در صورتی که ایمیلی دریافت نکردید، لطفا صندوق هرزنامه خود را نیز بررسی کنید.', - 'token' => 'این لینک نامعتبر است.', - 'user' => 'اگر ایمیل شما در پایگاه‌داده ما موجود باشد، شما ایمیل شامل یک لینک بازنشانی رمز عبور در چند دقیقه آینده دریافت خواهید کرد. در صورتی که ایمیلی دریافت نکردید، لطفا صندوق هرزنامه خود را نیز بررسی کنید.', + 'sent' => 'اگر ایمیل‌تان در پایگاه‌داده ما موجود باشد، در چند دقیقه آینده ایمیلی حاوی یک پیوند بازنشانی رمز عبور دریافت خواهید کرد. در صورتی که ایمیلی دریافت نکردید، لطفا صندوق هرزنامه خود را نیز بررسی کنید.', + 'token' => 'این پیوند نامعتبر است.', + 'user' => 'اگر ایمیل‌تان در پایگاه‌داده ما موجود باشد، در چند دقیقه آینده ایمیلی حاوی یک پیوند بازنشانی رمز عبور دریافت خواهید کرد. در صورتی که ایمیلی دریافت نکردید، لطفا صندوق هرزنامه خود را نیز بررسی کنید.', ]; diff --git a/resources/lang/fa/profile.php b/resources/lang/fa/profile.php index 171b219b2..129702916 100644 --- a/resources/lang/fa/profile.php +++ b/resources/lang/fa/profile.php @@ -1,10 +1,10 @@ 'این کاربر هنوز پستی ارسال نکرده!', + 'emptyTimeline' => 'این کاربر هنوز چیزی منتشر نکرده است!', 'emptyFollowers' => 'این کاربر هنوز دنبال‌کننده‌ای ندارد!', 'emptyFollowing' => 'این کاربر هنوز کسی را دنبال نمی‌کند!', - 'emptySaved' => 'شما هنوز هیچ پستی ذخیره نکرده‌اید!', + 'emptySaved' => 'شما هنوز هیچ فرسته‌ای را ذخیره نکرده‌اید!', 'savedWarning' => 'فقط شما می‌توانید آنچه که ذخیره کرده‌اید را ببینید.', 'privateProfileWarning' => 'این حساب خصوصی است.', 'alreadyFollow' => 'الان :username را دنبال می‌کنید؟', diff --git a/resources/lang/fa/site.php b/resources/lang/fa/site.php index 9b5e54750..44cce7bc2 100644 --- a/resources/lang/fa/site.php +++ b/resources/lang/fa/site.php @@ -5,8 +5,8 @@ return [ 'about' => 'درباره', 'help' => 'راهنما', 'language' => 'زبان‌ها', - 'fediverse' => 'نامتمرکز', - 'opensource' => 'متن باز', + 'fediverse' => 'فدیورس', + 'opensource' => 'آزاد/متن‌باز', 'terms' => 'قوانین', 'privacy' => 'حریم خصوصی', 'l10nWip' => 'ما هنوز روی محلی‌سازی کار می‌کنیم.', diff --git a/resources/lang/fa/timeline.php b/resources/lang/fa/timeline.php index 86289e3b6..03ac29640 100644 --- a/resources/lang/fa/timeline.php +++ b/resources/lang/fa/timeline.php @@ -2,6 +2,6 @@ return [ - 'emptyPersonalTimeline' => 'جدول زمانی شما خالی است.', + 'emptyPersonalTimeline' => 'خط‌زمانی شما خالی است.', ]; diff --git a/resources/lang/fa/validation.php b/resources/lang/fa/validation.php index 3776a77a5..62768d4a0 100644 --- a/resources/lang/fa/validation.php +++ b/resources/lang/fa/validation.php @@ -14,7 +14,7 @@ return [ */ 'accepted' => ':attribute باید پذیرفته شده باشد.', - 'active_url' => 'آدرس :attribute معتبر نیست', + 'active_url' => 'نشانی :attribute معتبر نیست', 'after' => ':attribute باید تاریخی بعد از :date باشد.', 'after_or_equal' => ':attribute باید تاریخی بعد از :date، یا مطابق با آن باشد.', 'alpha' => ':attribute باید فقط حروف الفبا باشد.', @@ -26,8 +26,8 @@ return [ 'between' => [ 'numeric' => ':attribute باید بین :min و :max باشد.', 'file' => ':attribute باید بین :min و :max کیلوبایت باشد.', - 'string' => ':attribute باید بین :min و :max کاراکتر باشد.', - 'array' => ':attribute باید بین :min و :max آیتم باشد.', + 'string' => ':attribute باید بین :min و :max حرف باشد.', + 'array' => ':attribute باید بین :min و :max مورد باشد.', ], 'boolean' => 'فیلد :attribute فقط می‌تواند صحیح و یا غلط باشد', 'confirmed' => ':attribute با فیلد تکرار مطابقت ندارد.', @@ -38,39 +38,39 @@ return [ 'digits_between' => ':attribute باید بین :min و :max رقم باشد.', 'dimensions' => 'ابعاد تصویر :attribute قابل قبول نیست.', 'distinct' => 'فیلد :attribute تکراری است.', - 'email' => ':attribute باید یک ایمیل معتبر باشد', - 'exists' => ':attribute انتخاب شده، معتبر نیست.', - 'file' => ':attribute باید یک فایل باشد', + 'email' => ':attribute باید ایمیلی معتبر باشد', + 'exists' => ':attribute انتخاب شده معتبر نیست.', + 'file' => ':attribute باید یک پرونده باشد', 'filled' => 'فیلد :attribute الزامی است', 'image' => ':attribute باید تصویر باشد.', - 'in' => ':attribute انتخاب شده، معتبر نیست.', + 'in' => ':attribute انتخاب شده معتبر نیست.', 'in_array' => 'فیلد :attribute در :other وجود ندارد.', - 'integer' => ':attribute باید عدد صحیح باشد.', + 'integer' => ':attribute باید عددی صحیح باشد.', 'ip' => ':attribute باید IP معتبر باشد.', - 'ipv4' => ':attribute باید یک آدرس معتبر از نوع IPv4 باشد.', - 'ipv6' => ':attribute باید یک آدرس معتبر از نوع IPv6 باشد.', + 'ipv4' => ':attribute باید یک نشانی معتبر از نوع IPv4 باشد.', + 'ipv6' => ':attribute باید یک نشانی معتبر از نوع IPv6 باشد.', 'json' => 'فیلد :attribute باید یک رشته از نوع JSON باشد.', 'max' => [ 'numeric' => ':attribute نباید بزرگتر از :max باشد.', 'file' => ':attribute نباید بزرگتر از :max کیلوبایت باشد.', - 'string' => ':attribute نباید بیشتر از :max کاراکتر باشد.', - 'array' => ':attribute نباید بیشتر از :max آیتم باشد.', + 'string' => ':attribute نباید بیشتر از :max حرف باشد.', + 'array' => ':attribute نباید بیشتر از :max مورد باشد.', ], - 'mimes' => ':attribute باید یکی از فرمت های :values باشد.', - 'mimetypes' => ':attribute باید یکی از فرمت های :values باشد.', + 'mimes' => ':attribute باید یکی از قالب‌های :values باشد.', + 'mimetypes' => ':attribute باید یکی از قالب‌های :values باشد.', 'min' => [ 'numeric' => ':attribute نباید کوچکتر از :min باشد.', 'file' => ':attribute نباید کوچکتر از :min کیلوبایت باشد.', - 'string' => ':attribute نباید کمتر از :min کاراکتر باشد.', - 'array' => ':attribute نباید کمتر از :min آیتم باشد.', + 'string' => ':attribute نباید کمتر از :min حرف باشد.', + 'array' => ':attribute نباید کمتر از :min مورد باشد.', ], - 'not_in' => ':attribute انتخاب شده، معتبر نیست.', + 'not_in' => ':attribute انتخاب شده معتبر نیست.', 'not_regex' => ':attribute نامعتبر است.', 'numeric' => ':attribute باید عدد باشد.', 'present' => 'فیلد :attribute باید در پارامترهای ارسالی وجود داشته باشد.', - 'regex' => 'فرمت :attribute معتبر نیست', + 'regex' => 'قالب :attribute معتبر نیست', 'required' => 'فیلد :attribute الزامی است', - 'required_if' => 'هنگامی که :other برابر با :value است، فیلد :attribute الزامی است.', + 'required_if' => 'هنگامی که :other برابر با :value باشد، فیلد :attribute الزامی است.', 'required_unless' => 'فیلد :attribute ضروری است، مگر آنکه :other در :values موجود باشد.', 'required_with' => 'در صورت وجود فیلد :values، فیلد :attribute الزامی است.', 'required_with_all' => 'در صورت وجود فیلدهای :values، فیلد :attribute الزامی است.', @@ -80,14 +80,14 @@ return [ 'size' => [ 'numeric' => ':attribute باید برابر با :size باشد.', 'file' => ':attribute باید برابر با :size کیلوبایت باشد.', - 'string' => ':attribute باید برابر با :size کاراکتر باشد.', - 'array' => ':attribute باسد شامل :size آیتم باشد.', + 'string' => ':attribute باید برابر با :size حرف باشد.', + 'array' => ':attribute باید شامل :size مورد باشد.', ], 'string' => 'فیلد :attribute باید متن باشد.', 'timezone' => 'فیلد :attribute باید یک منطقه زمانی قابل قبول باشد.', 'unique' => ':attribute قبلا انتخاب شده است.', - 'uploaded' => 'آپلود فایل :attribute موفقیت آمیز نبود.', - 'url' => 'فرمت آدرس :attribute اشتباه است.', + 'uploaded' => 'بارگذاری پرونده :attribute موفقیت آمیز نبود.', + 'url' => 'قالب نشانی :attribute اشتباه است.', /* |-------------------------------------------------------------------------- @@ -131,7 +131,7 @@ return [ 'phone' => 'تلفن', 'mobile' => 'تلفن همراه', 'age' => 'سن', - 'sex' => 'جنسیت', + 'sex' => 'جنس', 'gender' => 'جنسیت', 'day' => 'روز', 'month' => 'ماه', From 4a30ff118d63a0c865537c9710f8433cff9f5a38 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 6 Jul 2021 21:21:16 -0600 Subject: [PATCH 02/12] Update api routes --- routes/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api.php b/routes/api.php index 97e913e09..9251f32e3 100644 --- a/routes/api.php +++ b/routes/api.php @@ -72,7 +72,7 @@ Route::group(['prefix' => 'api'], function() use($middleware) { Route::get('timelines/home', 'Api\ApiV1Controller@timelineHome')->middleware($middleware); - Route::get('timelines/public', 'Api\ApiV1Controller@timelinePublic'); + Route::get('timelines/public', 'Api\ApiV1Controller@timelinePublic')->middleware($middleware); Route::get('timelines/tag/{hashtag}', 'Api\ApiV1Controller@timelineHashtag'); }); Route::group(['prefix' => 'stories'], function () use($middleware) { From f2686cacd27066bdd5e0316bda649e3cd588ac0f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 6 Jul 2021 23:36:25 -0600 Subject: [PATCH 03/12] Update AdminMediaController, improve perf and use simple pagination --- app/Http/Controllers/Admin/AdminMediaController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Admin/AdminMediaController.php b/app/Http/Controllers/Admin/AdminMediaController.php index eb4bd93a8..da9c3b27e 100644 --- a/app/Http/Controllers/Admin/AdminMediaController.php +++ b/app/Http/Controllers/Admin/AdminMediaController.php @@ -27,6 +27,7 @@ trait AdminMediaController ], 'search' => 'nullable|string|min:1|max:20' ]); + if($request->filled('search')) { $profiles = Profile::where('username', 'like', '%'.$request->input('search').'%')->pluck('id')->toArray(); $media = Media::whereHas('status') @@ -42,7 +43,8 @@ trait AdminMediaController $media = MediaBlocklist::latest()->paginate(12); return view('admin.media.home', compact('media')); } - $media = Media::whereHas('status')->with('status')->orderby('id', 'desc')->paginate(12); + + $media = Media::whereNull('remote_url')->orderby('id', 'desc')->simplePaginate(12); return view('admin.media.home', compact('media')); } @@ -51,4 +53,4 @@ trait AdminMediaController $media = Media::findOrFail($id); return view('admin.media.show', compact('media')); } -} \ No newline at end of file +} From 2e5464376053c874a600fed9fd3a945d43828460 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 6 Jul 2021 23:36:56 -0600 Subject: [PATCH 04/12] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b72b817d..9ec1931a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ - Updated ApiV1Controller, use PublicTimelineService. ([f67c67bc](https://github.com/pixelfed/pixelfed/commit/f67c67bc)) - Updated ApiV1Controller, use ProfileService for verify_credentials. ([352aa573](https://github.com/pixelfed/pixelfed/commit/352aa573)) - Updated RemotePost.vue, fix content warning button. ([7647e724](https://github.com/pixelfed/pixelfed/commit/7647e724)) +- Updated AdminMediaController, improve perf and use simple pagination. ([f2686cac](https://github.com/pixelfed/pixelfed/commit/f2686cac)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0) From 42c6121ab9bd38f254664758972590a2e0d5ac42 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 6 Jul 2021 23:40:08 -0600 Subject: [PATCH 05/12] Update PostComponent, fix MomentUI like counter --- resources/assets/js/components/PostComponent.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index 1526f047d..6e7a657ed 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -323,7 +323,7 @@
@@ -898,6 +898,10 @@ export default { return; } + if(u.has('ui') && u.get('ui') == 'moment' && this.layout != 'moment') { + this.layout = 'moment'; + } + if(forceMetro == true || u.has('ui') && u.get('ui') == 'metro' && this.layout != 'metro') { this.layout = 'metro'; } From 2d6c335f1f92c1f6b976971dd72c2b6824e139ce Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 6 Jul 2021 23:40:35 -0600 Subject: [PATCH 06/12] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ec1931a8..7278cc02f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ - Updated ApiV1Controller, use ProfileService for verify_credentials. ([352aa573](https://github.com/pixelfed/pixelfed/commit/352aa573)) - Updated RemotePost.vue, fix content warning button. ([7647e724](https://github.com/pixelfed/pixelfed/commit/7647e724)) - Updated AdminMediaController, improve perf and use simple pagination. ([f2686cac](https://github.com/pixelfed/pixelfed/commit/f2686cac)) +- Updated PostComponent, fix MomentUI like counter. ([42c6121a](https://github.com/pixelfed/pixelfed/commit/42c6121a)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0) From 0e7b2617d47d006759324b2ea2fe4ad8881f687f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 6 Jul 2021 23:49:31 -0600 Subject: [PATCH 07/12] Update compiled assets --- public/js/status.js | 2 +- public/mix-manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/status.js b/public/js/status.js index a9754c59e..2f1cca126 100644 --- a/public/js/status.js +++ b/public/js/status.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{"0E+L":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.momentui .bg-dark[data-v-1f540478] {\n\tbackground: #000 !important;\n}\n.momentui .carousel.slide[data-v-1f540478],\n.momentui .carousel-item[data-v-1f540478] {\n\tbackground: #000 !important;\n}\n.reply-btn[disabled][data-v-1f540478] {\n\topacity: .3;\n\tcolor: #3897f0;\n}\n",""])},"2Jpm":function(t,e,i){"use strict";i.r(e);var s={props:["status"],methods:{playOrPause:function(t){var e=t.target;1==e.getAttribute("playing")?(e.removeAttribute("playing"),e.pause()):(e.setAttribute("playing",1),e.play())}}},n=i("KHd+"),a=Object(n.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return 1==t.status.sensitive?i("div",[i("details",{staticClass:"details-animated"},[i("summary",[i("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(" "),i("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),i("div",{staticClass:"embed-responsive embed-responsive-1by1"},[i("video",{staticClass:"video",attrs:{preload:"none",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id},on:{click:function(e){return t.playOrPause(e)}}},[i("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])])]):i("div",{staticClass:"embed-responsive embed-responsive-16by9"},[i("video",{staticClass:"video",attrs:{controls:"",preload:"metadata",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id}},[i("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])}),[],!1,null,null,null);e.default=a.exports},"4KG8":function(t,e,i){t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;i>>0,n=arguments[1],a=0;a container for the click");i.selectItemAtIndex(s.getAttribute("data-index"),e),i.hideMenu()}else i.current.element&&!i.current.externalTrigger&&(i.current.externalTrigger=!1,setTimeout((function(){return i.hideMenu()})))}},{key:"keyup",value:function(t,e){if(t.inputEvent&&(t.inputEvent=!1),t.updateSelection(this),27!==e.keyCode){if(!t.tribute.allowSpaces&&t.tribute.hasTrailingSpace)return t.tribute.hasTrailingSpace=!1,t.commandEvent=!0,void t.callbacks().space(e,this);if(!t.tribute.isActive)if(t.tribute.autocompleteMode)t.callbacks().triggerChar(e,this,"");else{var i=t.getKeyCode(t,this,e);if(isNaN(i)||!i)return;var s=t.tribute.triggers().find((function(t){return t.charCodeAt(0)===i}));void 0!==s&&t.callbacks().triggerChar(e,this,s)}t.tribute.current.mentionText.length=n.current.collection.menuShowMinLength&&n.inputEvent&&n.showMenuFor(i,!0)},enter:function(e,i){t.tribute.isActive&&t.tribute.current.filteredItems&&(e.preventDefault(),e.stopPropagation(),setTimeout((function(){t.tribute.selectItemAtIndex(t.tribute.menuSelected,e),t.tribute.hideMenu()}),0))},escape:function(e,i){t.tribute.isActive&&(e.preventDefault(),e.stopPropagation(),t.tribute.isActive=!1,t.tribute.hideMenu())},tab:function(e,i){t.callbacks().enter(e,i)},space:function(e,i){t.tribute.isActive&&(t.tribute.spaceSelectsMatch?t.callbacks().enter(e,i):t.tribute.allowSpaces||(e.stopPropagation(),setTimeout((function(){t.tribute.hideMenu(),t.tribute.isActive=!1}),0)))},up:function(e,i){if(t.tribute.isActive&&t.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();var s=t.tribute.current.filteredItems.length,n=t.tribute.menuSelected;s>n&&n>0?(t.tribute.menuSelected--,t.setActiveLi()):0===n&&(t.tribute.menuSelected=s-1,t.setActiveLi(),t.tribute.menu.scrollTop=t.tribute.menu.scrollHeight)}},down:function(e,i){if(t.tribute.isActive&&t.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();var s=t.tribute.current.filteredItems.length-1,n=t.tribute.menuSelected;s>n?(t.tribute.menuSelected++,t.setActiveLi()):s===n&&(t.tribute.menuSelected=0,t.setActiveLi(),t.tribute.menu.scrollTop=0)}},delete:function(e,i){t.tribute.isActive&&t.tribute.current.mentionText.length<1?t.tribute.hideMenu():t.tribute.isActive&&t.tribute.showMenuFor(i)}}}},{key:"setActiveLi",value:function(t){var e=this.tribute.menu.querySelectorAll("li"),i=e.length>>>0;t&&(this.tribute.menuSelected=parseInt(t));for(var s=0;so.bottom){var r=a.bottom-o.bottom;this.tribute.menu.scrollTop+=r}else if(a.tops.width&&(n.left||n.right),o=window.innerHeight>s.height&&(n.top||n.bottom);(a||o)&&(i.tribute.menu.style.cssText="display: none",i.positionMenuAtCaret(t))}),0)}else this.tribute.menu.style.cssText="display: none"}},{key:"selectElement",value:function(t,e,i){var s,n=t;if(e)for(var a=0;a=0&&(e=s.substring(0,n))}}else{var a=this.tribute.current.element;if(a){var o=a.selectionStart;a.value&&o>=0&&(e=a.value.substring(0,o))}}return e}},{key:"getLastWordInText",value:function(t){var e=(t=t.replace(/\u00A0/g," ")).split(/\s+/);return e[e.length-1].trim()}},{key:"getTriggerInfo",value:function(t,e,i,s,n){var a,o,r,l=this,c=this.tribute.current;if(this.isContentEditable(c.element)){var u=this.getContentEditableSelectedPath(c);u&&(a=u.selected,o=u.path,r=u.offset)}else a=this.tribute.current.element;var d=this.getTextPrecedingCurrentSelection(),p=this.getLastWordInText(d);if(n)return{mentionPosition:d.length-p.length,mentionText:p,mentionSelectedElement:a,mentionSelectedPath:o,mentionSelectedOffset:r};if(null!=d){var h,m=-1;if(this.tribute.collection.forEach((function(t){var e=t.trigger,s=t.requireLeadingSpace?l.lastIndexWithLeadingSpace(d,e):d.lastIndexOf(e);s>m&&(m=s,h=e,i=t.requireLeadingSpace)})),m>=0&&(0===m||!i||/[\xA0\s]/g.test(d.substring(m-1,m)))){var f=d.substring(m+h.length,d.length);h=d.substring(m,m+h.length);var v=f.substring(0,1),g=f.length>0&&(" "===v||" "===v);e&&(f=f.trim());var b=s?/[^\S ]/g:/[\xA0\s]/g;if(this.tribute.hasTrailingSpace=b.test(f),!g&&(t||!b.test(f)))return{mentionPosition:m,mentionText:f,mentionSelectedElement:a,mentionSelectedPath:o,mentionSelectedOffset:r,mentionTriggerChar:h}}}}},{key:"lastIndexWithLeadingSpace",value:function(t,e){for(var i=t.split("").reverse().join(""),s=-1,n=0,a=t.length;n=0;c--)if(e[c]!==i[n-c]){l=!1;break}if(l&&(o||r)){s=t.length-1-n;break}}return s}},{key:"isContentEditable",value:function(t){return"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName}},{key:"isMenuOffScreen",value:function(t,e){var i=window.innerWidth,s=window.innerHeight,n=document.documentElement,a=(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0),o=(window.pageYOffset||n.scrollTop)-(n.clientTop||0),r="number"==typeof t.top?t.top:o+s-t.bottom-e.height,l="number"==typeof t.right?t.right:t.left+e.width,c="number"==typeof t.bottom?t.bottom:t.top+e.height,u="number"==typeof t.left?t.left:a+i-t.right-e.width;return{top:rMath.ceil(a+i),bottom:c>Math.ceil(o+s),left:uparseInt(o.height)&&(a.overflowY="scroll")):a.overflow="hidden",n.textContent=t.value.substring(0,e),"INPUT"===t.nodeName&&(n.textContent=n.textContent.replace(/\s/g," "));var r=this.getDocument().createElement("span");r.textContent=t.value.substring(e)||".",n.appendChild(r);var l=t.getBoundingClientRect(),c=document.documentElement,u=(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0),d=(window.pageYOffset||c.scrollTop)-(c.clientTop||0),p=0,h=0;this.menuContainerIsBody&&(p=l.top,h=l.left);var m={top:p+d+r.offsetTop+parseInt(o.borderTopWidth)+parseInt(o.fontSize)-t.scrollTop,left:h+u+r.offsetLeft+parseInt(o.borderLeftWidth)},f=window.innerWidth,v=window.innerHeight,g=this.getMenuDimensions(),b=this.isMenuOffScreen(m,g);b.right&&(m.right=f-m.left,m.left="auto");var w=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(b.bottom){var _=w-(v-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);m.bottom=_+(v-l.top-r.offsetTop),m.top="auto"}return(b=this.isMenuOffScreen(m,g)).left&&(m.left=f>g.width?u+f-g.width:u,delete m.right),b.top&&(m.top=v>g.height?d+v-g.height:d,delete m.bottom),this.getDocument().body.removeChild(n),m}},{key:"getContentEditableCaretPosition",value:function(t){var e,i=this.getWindowSelection();(e=this.getDocument().createRange()).setStart(i.anchorNode,t),e.setEnd(i.anchorNode,t),e.collapse(!1);var s=e.getBoundingClientRect(),n=document.documentElement,a=(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0),o=(window.pageYOffset||n.scrollTop)-(n.clientTop||0),r={left:s.left+a,top:s.top+s.height+o},l=window.innerWidth,c=window.innerHeight,u=this.getMenuDimensions(),d=this.isMenuOffScreen(r,u);d.right&&(r.left="auto",r.right=l-s.left-a);var p=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(d.bottom){var h=p-(c-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);r.top="auto",r.bottom=h+(c-s.top)}return(d=this.isMenuOffScreen(r,u)).left&&(r.left=l>u.width?a+l-u.width:a,delete r.right),d.top&&(r.top=c>u.height?o+c-u.height:o,delete r.bottom),this.menuContainerIsBody||(r.left=r.left?r.left-this.tribute.menuContainer.offsetLeft:r.left,r.top=r.top?r.top-this.tribute.menuContainer.offsetTop:r.top),r}},{key:"scrollIntoView",value:function(t){var e,i=this.menu;if(void 0!==i){for(;void 0===e||0===e.height;)if(0===(e=i.getBoundingClientRect()).height&&(void 0===(i=i.childNodes[0])||!i.getBoundingClientRect))return;var s=e.top,n=s+e.height;if(s<0)window.scrollTo(0,window.pageYOffset+e.top-20);else if(n>window.innerHeight){var a=window.pageYOffset+e.top-20;a-window.pageYOffset>100&&(a=window.pageYOffset+100);var o=window.pageYOffset-(window.innerHeight-n);o>a&&(o=a),window.scrollTo(0,o)}}}},{key:"menuContainerIsBody",get:function(){return this.tribute.menuContainer===document.body||!this.tribute.menuContainer}}]),e}(),r=function(){function e(i){t(this,e),this.tribute=i,this.tribute.search=this}return i(e,[{key:"simpleFilter",value:function(t,e){var i=this;return e.filter((function(e){return i.test(t,e)}))}},{key:"test",value:function(t,e){return null!==this.match(t,e)}},{key:"match",value:function(t,e,i){i=i||{},e.length;var s=i.pre||"",n=i.post||"",a=i.caseSensitive&&e||e.toLowerCase();if(i.skip)return{rendered:e,score:0};t=i.caseSensitive&&t||t.toLowerCase();var o=this.traverse(a,t,0,0,[]);return o?{rendered:this.render(e,o.cache,s,n),score:o.score}:null}},{key:"traverse",value:function(t,e,i,s,n){if(e.length===s)return{score:this.calculateScore(n),cache:n.slice()};if(!(t.length===i||e.length-s>t.length-i)){for(var a,o,r=e[s],l=t.indexOf(r,i);l>-1;){if(n.push(l),o=this.traverse(t,e,l+1,s+1,n),n.pop(),!o)return a;(!a||a.score0&&(t[n-1]+1===s?i+=i+1:i=1),e+=i})),e}},{key:"render",value:function(t,e,i,s){var n=t.substring(0,e[0]);return e.forEach((function(a,o){n+=i+t[a]+s+t.substring(a+1,e[o+1]?e[o+1]:t.length)})),n}},{key:"filter",value:function(t,e,i){var s=this;return i=i||{},e.reduce((function(e,n,a,o){var r=n;i.extract&&((r=i.extract(n))||(r=""));var l=s.match(t,r,i);return null!=l&&(e[e.length]={string:l.rendered,score:l.score,index:a,original:n}),e}),[]).sort((function(t,e){return e.score-t.score||t.index-e.index}))}}]),e}();return function(){function e(i){var s,l=this,c=i.values,u=void 0===c?null:c,d=i.iframe,p=void 0===d?null:d,h=i.selectClass,m=void 0===h?"highlight":h,f=i.containerClass,v=void 0===f?"tribute-container":f,g=i.itemClass,b=void 0===g?"":g,w=i.trigger,_=void 0===w?"@":w,y=i.autocompleteMode,x=void 0!==y&&y,C=i.selectTemplate,k=void 0===C?null:C,S=i.menuItemTemplate,E=void 0===S?null:S,T=i.lookup,M=void 0===T?"key":T,P=i.fillAttr,A=void 0===P?"value":P,L=i.collection,I=void 0===L?null:L,R=i.menuContainer,U=void 0===R?null:R,$=i.noMatchTemplate,O=void 0===$?null:$,N=i.requireLeadingSpace,D=void 0===N||N,j=i.allowSpaces,H=void 0!==j&&j,z=i.replaceTextSuffix,B=void 0===z?null:z,W=i.positionMenu,F=void 0===W||W,q=i.spaceSelectsMatch,V=void 0!==q&&q,Y=i.searchOpts,K=void 0===Y?{}:Y,X=i.menuItemLimit,J=void 0===X?null:X,G=i.menuShowMinLength,Q=void 0===G?0:G;if(t(this,e),this.autocompleteMode=x,this.menuSelected=0,this.current={},this.inputEvent=!1,this.isActive=!1,this.menuContainer=U,this.allowSpaces=H,this.replaceTextSuffix=B,this.positionMenu=F,this.hasTrailingSpace=!1,this.spaceSelectsMatch=V,this.autocompleteMode&&(_="",H=!1),u)this.collection=[{trigger:_,iframe:p,selectClass:m,containerClass:v,itemClass:b,selectTemplate:(k||e.defaultSelectTemplate).bind(this),menuItemTemplate:(E||e.defaultMenuItemTemplate).bind(this),noMatchTemplate:(s=O,"string"==typeof s?""===s.trim()?null:s:"function"==typeof s?s.bind(l):O||function(){return"
  • No Match Found!
  • "}.bind(l)),lookup:M,fillAttr:A,values:u,requireLeadingSpace:D,searchOpts:K,menuItemLimit:J,menuShowMinLength:Q}];else{if(!I)throw new Error("[Tribute] No collection specified.");this.autocompleteMode&&console.warn("Tribute in autocomplete mode does not work for collections"),this.collection=I.map((function(t){return{trigger:t.trigger||_,iframe:t.iframe||p,selectClass:t.selectClass||m,containerClass:t.containerClass||v,itemClass:t.itemClass||b,selectTemplate:(t.selectTemplate||e.defaultSelectTemplate).bind(l),menuItemTemplate:(t.menuItemTemplate||e.defaultMenuItemTemplate).bind(l),noMatchTemplate:function(t){return"string"==typeof t?""===t.trim()?null:t:"function"==typeof t?t.bind(l):O||function(){return"
  • No Match Found!
  • "}.bind(l)}(O),lookup:t.lookup||M,fillAttr:t.fillAttr||A,values:t.values,requireLeadingSpace:t.requireLeadingSpace,searchOpts:t.searchOpts||K,menuItemLimit:t.menuItemLimit||J,menuShowMinLength:t.menuShowMinLength||Q}}))}new o(this),new n(this),new a(this),new r(this)}return i(e,[{key:"triggers",value:function(){return this.collection.map((function(t){return t.trigger}))}},{key:"attach",value:function(t){if(!t)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get()),t.constructor===NodeList||t.constructor===HTMLCollection||t.constructor===Array)for(var e=t.length,i=0;i",post:i.current.collection.searchOpts.post||"",skip:i.current.collection.searchOpts.skip,extract:function(t){if("string"==typeof i.current.collection.lookup)return t[i.current.collection.lookup];if("function"==typeof i.current.collection.lookup)return i.current.collection.lookup(t,i.current.mentionText);throw new Error("Invalid lookup attribute, lookup must be string or function.")}});i.current.collection.menuItemLimit&&(s=s.slice(0,i.current.collection.menuItemLimit)),i.current.filteredItems=s;var n=i.menu.querySelector("ul");if(i.range.positionMenuAtCaret(e),!s.length){var a=new CustomEvent("tribute-no-match",{detail:i.menu});return i.current.element.dispatchEvent(a),void("function"==typeof i.current.collection.noMatchTemplate&&!i.current.collection.noMatchTemplate()||!i.current.collection.noMatchTemplate?i.hideMenu():"function"==typeof i.current.collection.noMatchTemplate?n.innerHTML=i.current.collection.noMatchTemplate():n.innerHTML=i.current.collection.noMatchTemplate)}n.innerHTML="";var o=i.range.getDocument().createDocumentFragment();s.forEach((function(t,e){var s=i.range.getDocument().createElement("li");s.setAttribute("data-index",e),s.className=i.current.collection.itemClass,s.addEventListener("mousemove",(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var i=[],s=!0,n=!1,a=void 0;try{for(var o,r=t[Symbol.iterator]();!(s=(o=r.next()).done)&&(i.push(o.value),!e||i.length!==e);s=!0);}catch(t){n=!0,a=t}finally{try{s||null==r.return||r.return()}finally{if(n)throw a}}return i}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(i._findLiTarget(t.target),2),s=(e[0],e[1]);0!==t.movementY&&i.events.setActiveLi(s)})),i.menuSelected===e&&s.classList.add(i.current.collection.selectClass),s.innerHTML=i.current.collection.menuItemTemplate(t),o.appendChild(s)})),n.appendChild(o)}};"function"==typeof this.current.collection.values?this.current.collection.values(this.current.mentionText,s):s(this.current.collection.values)}}},{key:"_findLiTarget",value:function(t){if(!t)return[];var e=t.getAttribute("data-index");return e?[t,e]:this._findLiTarget(t.parentNode)}},{key:"showMenuForCollection",value:function(t,e){t!==document.activeElement&&this.placeCaretAtEnd(t),this.current.collection=this.collection[e||0],this.current.externalTrigger=!0,this.current.element=t,t.isContentEditable?this.insertTextAtCursor(this.current.collection.trigger):this.insertAtCaret(t,this.current.collection.trigger),this.showMenuFor(t)}},{key:"placeCaretAtEnd",value:function(t){if(t.focus(),void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var i=window.getSelection();i.removeAllRanges(),i.addRange(e)}else if(void 0!==document.body.createTextRange){var s=document.body.createTextRange();s.moveToElementText(t),s.collapse(!1),s.select()}}},{key:"insertTextAtCursor",value:function(t){var e,i;(i=(e=window.getSelection()).getRangeAt(0)).deleteContents();var s=document.createTextNode(t);i.insertNode(s),i.selectNodeContents(s),i.collapse(!1),e.removeAllRanges(),e.addRange(i)}},{key:"insertAtCaret",value:function(t,e){var i=t.scrollTop,s=t.selectionStart,n=t.value.substring(0,s),a=t.value.substring(t.selectionEnd,t.value.length);t.value=n+e+a,s+=e.length,t.selectionStart=s,t.selectionEnd=s,t.focus(),t.scrollTop=i}},{key:"hideMenu",value:function(){this.menu&&(this.menu.style.cssText="display: none;",this.isActive=!1,this.menuSelected=0,this.current={})}},{key:"selectItemAtIndex",value:function(t,e){if("number"==typeof(t=parseInt(t))&&!isNaN(t)){var i=this.current.filteredItems[t],s=this.current.collection.selectTemplate(i);null!==s&&this.replaceText(s,e,i)}}},{key:"replaceText",value:function(t,e,i){this.range.replaceTriggerText(t,!0,!0,e,i)}},{key:"_append",value:function(t,e,i){if("function"==typeof t.values)throw new Error("Unable to append to values, as it is a function.");t.values=i?e:t.values.concat(e)}},{key:"append",value:function(t,e,i){var s=parseInt(t);if("number"!=typeof s)throw new Error("please provide an index for the collection to update.");var n=this.collection[s];this._append(n,e,i)}},{key:"appendCurrent",value:function(t,e){if(!this.isActive)throw new Error("No active state. Please use append instead and pass an index.");this._append(this.current.collection,t,e)}},{key:"detach",value:function(t){if(!t)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get()),t.constructor===NodeList||t.constructor===HTMLCollection||t.constructor===Array)for(var e=t.length,i=0;i'+(this.current.collection.trigger+t.original[this.current.collection.fillAttr])+"":this.current.collection.trigger+t.original[this.current.collection.fillAttr]}},{key:"defaultMenuItemTemplate",value:function(t){return t.string}},{key:"inputTypes",value:function(){return["TEXTAREA","INPUT"]}}]),e}()}()},5:function(t,e,i){t.exports=i("CJs/")},"6ZA0":function(t,e,i){"use strict";i.r(e);var s=i("JMt0");function n(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i0?((s=e.likes).push.apply(s,n(a.data)),e.likesPage++,t.loaded()):t.complete()}))},infiniteSharesHandler:function(t){var e=this;axios.get("/api/v2/shares/profile/"+this.statusUsername+"/status/"+this.statusId,{params:{page:this.sharesPage}}).then((function(i){var s,a=i.data;a.data.length>0?((s=e.shares).push.apply(s,n(a.data)),e.sharesPage++,t.loaded()):t.complete()}))},likeStatus:function(t){var e=this;0!=$("body").hasClass("loggedIn")?(axios.post("/i/like",{item:this.status.id}).then((function(i){if(e.status.favourites_count=i.data.count,1==e.reactions.liked){e.reactions.liked=!1;var s=e.user.id;e.likes=e.likes.filter((function(t){return t.id!==s}))}else{e.reactions.liked=!0;var n=e.user;e.likes.unshift(n),setTimeout((function(){t.target.classList.add("animate__animated","animate__bounce")}),100)}})).catch((function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})),window.navigator.vibrate(200)):window.location.href="/login?next="+encodeURIComponent(window.location.pathname)},shareStatus:function(){var t=this;0!=$("body").hasClass("loggedIn")?axios.post("/i/share",{item:this.status.id}).then((function(e){if(t.status.reblogs_count=e.data.count,1==t.reactions.shared){t.reactions.shared=!1;var i=t.user.id;t.shares=t.shares.filter((function(t){return t.id!==i}))}else{t.reactions.shared=!0;var s=t.user;t.shares.push(s)}})).catch((function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})):window.location.href="/login?next="+encodeURIComponent(window.location.pathname)},bookmarkStatus:function(){var t=this;0!=$("body").hasClass("loggedIn")?axios.post("/i/bookmark",{item:this.status.id}).then((function(e){1==t.reactions.bookmarked?t.reactions.bookmarked=!1:t.reactions.bookmarked=!0})).catch((function(t){swal("Error","Something went wrong, please try again later.","error")})):window.location.href="/login?next="+encodeURIComponent(window.location.pathname)},blockProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:this.status.account.id}).then((function(e){t.$refs.ctxModal.hide(),t.relationship.blocking=!0,swal("Success","You have successfully blocked "+t.status.account.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))},unblockProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/unblock",{type:"user",item:this.status.account.id}).then((function(e){t.relationship.blocking=!1,t.$refs.ctxModal.hide(),swal("Success","You have successfully unblocked "+t.status.account.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))},deletePost:function(t){if(this.ownerOrAdmin()&&confirm("Are you sure you want to delete this post?")){if(0==$("body").hasClass("loggedIn"))return;axios.post("/i/delete",{type:"status",item:this.status.id}).then((function(t){swal("Success","You have successfully deleted this post","success"),setTimeout((function(){window.location.href="/"}),3e3)})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}},owner:function(){return this.user.id===this.status.account.id},admin:function(){return 1==this.user.is_admin},ownerOrAdmin:function(){return this.owner()||this.admin()},lightbox:function(t){this.lightboxMedia=t,this.$refs.lightboxModal.show()},postReply:function(){var t=this;if(this.replySending=!0,0==this.replyText.length||this.replyText.trim()=="@"+this.status.account.acct)return t.replyText=null,void $('textarea[name="comment"]').blur();var e={item:this.replyingToId,comment:this.replyText,sensitive:this.replySensitive};this.replyText="",axios.post("/i/comment",e).then((function(e){var i=e.data.entity;if(i.in_reply_to_id==t.status.id){"metro"==t.layout?t.results.push(i):t.results.unshift(i);var s=$(".status-comments")[0];s.scrollTop=2*s.clientHeight}else if(t.replyToIndex>=0){var n=t.results[t.replyToIndex];n.replies.push(i),n.reply_count=n.reply_count+1}t.$refs.replyModal.hide(),t.replySending=!1}))},deleteComment:function(t,e){var i=this;axios.post("/i/delete",{type:"comment",item:t}).then((function(t){i.results.splice(e,1)})).catch((function(t){swal("Something went wrong!","Please try again later","error")}))},deleteCommentReply:function(t,e,i){var s=this;axios.post("/i/delete",{type:"comment",item:t}).then((function(t){s.results[i].replies.splice(e,1),--s.results[i].reply_count})).catch((function(t){swal("Something went wrong!","Please try again later","error")}))},l:function(t){return t.length<10?t:t.substr(0,10)+"..."},replyFocus:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(0!=$("body").hasClass("loggedIn")){if(!this.status.comments_disabled){this.replyToIndex=e,this.replyingToId=t.id,this.replyingToUsername=t.account.username,this.reply_to_profile_id=t.account.id;var s=t.account.local?"@"+t.account.username+" ":"@"+t.account.acct+" ";1==i&&(this.replyText=s),this.$refs.replyModal.show()}}else this.redirect("/login?next="+encodeURIComponent(window.location.pathname))},fetchComments:function(){var t=this,e="/api/v2/comments/"+this.statusProfileId+"/status/"+this.statusId;axios.get(e).then((function(e){t.results="metro"==t.layout?_.reverse(e.data.data):e.data.data,t.pagination=e.data.meta.pagination,t.results.length>0&&$(".load-more-link").removeClass("d-none"),$(".postCommentsLoader").addClass("d-none"),$(".postCommentsContainer").removeClass("d-none"),setTimeout((function(){document.querySelectorAll(".status-comment .postCommentsContainer .comment-body a").forEach((function(t,e){t.href=App.util.format.rewriteLinks(t)}))}),500)})).catch((function(t){if(t.response)switch(t.response.status){case 401:$(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("Please login to view.");break;default:$(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("An error occurred, cannot fetch comments. Please try again later.")}else $(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("An error occurred, cannot fetch comments. Please try again later.")}))},loadMore:function(t){var e=this;if(t.preventDefault(),1!=this.pagination.total_pages&&this.pagination.current_page!=this.pagination.total_pages){$(".load-more-link").addClass("d-none"),$(".postCommentsLoader").removeClass("d-none");var i=this.pagination.links.next;axios.get(i).then((function(t){var i=t.data.data;$(".postCommentsLoader").addClass("d-none");for(var s=0;s0)return void(t.thread=!0);var e="/api/v2/comments/"+t.account.id+"/status/"+t.id;axios.get(e).then((function(e){t.replies=_.reverse(e.data.data),t.thread=!0}))}},redirect:function(t){window.location.href=t},showEmbedPostModal:function(){var t=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.status.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,t),this.$refs.ctxModal.hide(),this.$refs.embedModal.show()},ctxCopyEmbed:function(){navigator.clipboard.writeText(this.ctxEmbedPayload),this.$refs.embedModal.hide()},permalinkUrl:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.account;return 1==i.local||e?t.url:"/i/web/post/_/"+i.id+"/"+t.id},fetchProfilePosts:function(){if($("body").hasClass("loggedIn")||!this.loaded){var t=this,e="/api/pixelfed/v1/accounts/"+this.statusProfileId+"/statuses";axios.get(e,{params:{only_media:!0,min_id:1,limit:9}}).then((function(e){var i=e.data.filter((function(e){return e.media_attachments.length>0&&e.id!=t.statusId&&0==e.sensitive}));i.map((function(t){return t.id}));i.length>=3&&(t.showProfileMorePosts=!0),t.profileMorePosts=i.slice(0,6)}))}},previewUrl:function(t){return t.sensitive?"/storage/no-preview.png?v="+(new Date).getTime():t.media_attachments[0].preview_url},previewBackground:function(t){return"background-image: url("+this.previewUrl(t)+");"},getStatusUrl:function(t){return 1==t.local?t.url:"/i/web/post/_/"+t.account.id+"/"+t.id},showTaggedPeopleModal:function(){!$("body").hasClass("loggedIn")&&this.loaded||this.$refs.taggedModal.show()},untagMe:function(){var t=this;this.$refs.taggedModal.hide();var e=this.user.id;axios.post("/api/local/compose/tag/untagme",{status_id:this.statusId,profile_id:e}).then((function(i){t.status.taggedPeople=t.status.taggedPeople.filter((function(t){return t.id!=e})),swal("Untagged","You have been untagged from this post.","success")})).catch((function(t){swal("An Error Occurred","Please try again later.","error")}))},copyPostUrl:function(){navigator.clipboard.writeText(this.statusUrl)},moderatePost:function(t,e){var i=this.status,s=(i.account.username,""),n=this;switch(t){case"addcw":s="Are you sure you want to add a content warning to this post?",swal({title:"Confirm",text:s,icon:"warning",buttons:!0,dangerMode:!0}).then((function(e){e&&axios.post("/api/v2/moderator/action",{action:t,item_id:i.id,item_type:"status"}).then((function(t){swal("Success","Successfully added content warning","success"),i.sensitive=!0,n.ctxModMenuClose()})).catch((function(t){swal("Error","Something went wrong, please try again later.","error"),n.ctxModMenuClose()}))}));break;case"remcw":s="Are you sure you want to remove the content warning on this post?",swal({title:"Confirm",text:s,icon:"warning",buttons:!0,dangerMode:!0}).then((function(e){e&&axios.post("/api/v2/moderator/action",{action:t,item_id:i.id,item_type:"status"}).then((function(t){swal("Success","Successfully added content warning","success"),i.sensitive=!1,n.ctxModMenuClose()})).catch((function(t){swal("Error","Something went wrong, please try again later.","error"),n.ctxModMenuClose()}))}));break;case"unlist":s="Are you sure you want to unlist this post?",swal({title:"Confirm",text:s,icon:"warning",buttons:!0,dangerMode:!0}).then((function(e){e&&axios.post("/api/v2/moderator/action",{action:t,item_id:i.id,item_type:"status"}).then((function(t){swal("Success","Successfully unlisted post","success"),n.ctxModMenuClose()})).catch((function(t){n.ctxModMenuClose(),swal("Error","Something went wrong, please try again later.","error")}))}))}},ctxMenu:function(){this.$refs.ctxModal.show()},closeCtxMenu:function(t){this.$refs.ctxModal.hide()},ctxModMenu:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.show()},ctxModMenuClose:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.hide()},ctxMenuCopyLink:function(){var t=this.status;navigator.clipboard.writeText(t.url),this.closeCtxMenu()},ctxMenuFollow:function(){var t=this,e=this.status.account.id;axios.post("/i/follow",{item:e}).then((function(e){var i=t.status.account.acct;t.relationship.following=!0,t.$refs.ctxModal.hide(),setTimeout((function(){swal("Follow successful!","You are now following "+i,"success")}),500)}))},ctxMenuUnfollow:function(){var t=this,e=this.status.account.id;axios.post("/i/follow",{item:e}).then((function(e){var i=t.status.account.acct;t.relationship.following=!1,t.$refs.ctxModal.hide(),setTimeout((function(){swal("Unfollow successful!","You are no longer following "+i,"success")}),500)}))}}},l=(i("mu2y"),i("XECh"),i("KHd+")),c=Object(l.a)(r,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.loaded?t._e():i("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"80vh"}},[i("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})]),t._v(" "),t.loaded&&t.warning?i("div",{staticClass:"bg-white mt-n4 pt-3 border-bottom"},[i("div",{staticClass:"container"},[i("p",{staticClass:"text-center font-weight-bold"},[t._v("You are blocking this account")]),t._v(" "),i("p",{staticClass:"text-center font-weight-bold"},[i("a",{staticClass:"btn btn-primary font-weight-bold px-5",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.warning=!1,t.fetchData()}}},[t._v("View Status")])])])]):t._e(),t._v(" "),t.loaded&&0==t.warning?i("div",{staticClass:"postComponent"},["metro"==t.layout?i("div",{staticClass:"container px-0"},[i("div",{staticClass:"card card-md-rounded-0 status-container orientation-unknown shadow-none border"},[i("div",{staticClass:"row px-0 mx-0"},[i("div",{staticClass:"d-flex d-md-none align-items-center justify-content-between card-header bg-white w-100"},[i("div",{staticClass:"d-flex"},[i("div",{staticClass:"status-avatar mr-2",on:{click:function(e){return t.redirect(t.statusProfileUrl)}}},[i("img",{staticClass:"cursor-pointer",staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),i("div",{staticClass:"username"},[i("span",{staticClass:"username-link font-weight-bold text-dark cursor-pointer",on:{click:function(e){return t.redirect(t.statusProfileUrl)}}},[t._v(t._s(t.statusUsername))]),t._v(" "),t.status.account.is_admin?i("span",{staticClass:"fa-stack",staticStyle:{height:"1em","line-height":"1em","max-width":"19px"},attrs:{title:"Admin Account","data-toggle":"tooltip"}},[i("i",{staticClass:"fas fa-certificate text-danger fa-stack-1x"}),t._v(" "),i("i",{staticClass:"fas fa-crown text-white fa-sm fa-stack-1x",staticStyle:{"font-size":"7px"}})]):t._e(),t._v(" "),i("p",{staticClass:"mb-0",staticStyle:{"font-size":"10px"}},[t.loaded&&t.status.taggedPeople.length?i("span",{staticClass:"mb-0"},[i("span",{staticClass:"font-weight-light cursor-pointer",staticStyle:{color:"#718096"},attrs:{title:"Tagged People","data-toggle":"tooltip","data-placement":"bottom"},on:{click:function(e){return t.showTaggedPeopleModal()}}},[i("i",{staticClass:"fas fa-tag text-lighter"}),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.status.taggedPeople.length)+" Tagged People")])])]):t._e(),t._v(" "),t.loaded&&null!=t.status.place&&t.status.taggedPeople.length?i("span",{staticClass:"px-2 font-weight-bold text-lighter"},[t._v("•")]):t._e(),t._v(" "),t.loaded&&null!=t.status.place?i("span",{staticClass:"mb-0 cursor-pointer text-truncate",staticStyle:{color:"#718096"},on:{click:function(e){return t.redirect("/discover/places/"+t.status.place.id+"/"+t.status.place.slug)}}},[i("i",{staticClass:"fas fa-map-marked-alt text-lighter"}),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.status.place.name)+", "+t._s(t.status.place.country))])]):t._e()])])]),t._v(" "),0!=t.user?i("div",{staticClass:"float-right"},[i("div",{staticClass:"post-actions"},[i("div",[i("button",{staticClass:"btn btn-link text-dark no-caret",attrs:{title:"Post options"},on:{click:function(e){return t.ctxMenu()}}},[i("span",{staticClass:"fas fa-ellipsis-v text-muted"})])])])]):t._e()]),t._v(" "),i("div",{staticClass:"col-12 col-md-8 px-0 mx-0"},[i("div",{staticClass:"postPresenterContainer d-none d-flex justify-content-center align-items-center",staticStyle:{background:"#000"}},["text"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("div",{staticClass:"w-100 card-img-top border-bottom rounded-0",staticStyle:{"background-image":"url(/storage/textimg/bg_1.jpg)","background-size":"cover",width:"100%",height:"540px"}},[i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center"},[i("p",{staticClass:"text-center text-break h3 px-5 font-weight-bold",domProps:{innerHTML:t._s(t.status.content)}})])])]):"photo"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("photo-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"video"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("video-presenter",{attrs:{status:t.status}})],1):"photo:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("photo-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):"video:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("video-album-presenter",{attrs:{status:t.status}})],1):"photo:video:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("mixed-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):i("div",{staticClass:"w-100"},[i("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])])]),t._v(" "),i("div",{staticClass:"col-12 col-md-4 px-0 d-flex flex-column border-left border-md-left-0"},[i("div",{staticClass:"d-md-flex d-none align-items-center justify-content-between card-header py-3 bg-white"},[i("div",{staticClass:"d-flex align-items-center status-username text-truncate"},[i("div",{staticClass:"status-avatar mr-2",on:{click:function(e){return t.redirect(t.statusProfileUrl)}}},[i("img",{staticClass:"cursor-pointer",staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),i("div",{staticClass:"username"},[i("span",{staticClass:"username-link font-weight-bold text-dark cursor-pointer",on:{click:function(e){return t.redirect(t.statusProfileUrl)}}},[t._v(t._s(t.statusUsername))]),t._v(" "),t.status.account.is_admin?i("span",{staticClass:"fa-stack",staticStyle:{height:"1em","line-height":"1em","max-width":"19px"},attrs:{title:"Admin Account","data-toggle":"tooltip"}},[i("i",{staticClass:"fas fa-certificate text-danger fa-stack-1x"}),t._v(" "),i("i",{staticClass:"fas fa-crown text-white fa-sm fa-stack-1x",staticStyle:{"font-size":"7px"}})]):t._e(),t._v(" "),i("p",{staticClass:"mb-0",staticStyle:{"font-size":"10px"}},[t.loaded&&t.status.taggedPeople.length?i("span",{staticClass:"mb-0"},[i("span",{staticClass:"font-weight-light cursor-pointer",staticStyle:{color:"#718096"},attrs:{title:"Tagged People","data-toggle":"tooltip","data-placement":"bottom"},on:{click:function(e){return t.showTaggedPeopleModal()}}},[i("i",{staticClass:"fas fa-tag text-lighter"}),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.status.taggedPeople.length)+" Tagged People")])])]):t._e(),t._v(" "),t.loaded&&null!=t.status.place&&t.status.taggedPeople.length?i("span",{staticClass:"px-2 font-weight-bold text-lighter"},[t._v("•")]):t._e(),t._v(" "),t.loaded&&null!=t.status.place?i("span",{staticClass:"mb-0 cursor-pointer text-truncate",staticStyle:{color:"#718096"},on:{click:function(e){return t.redirect("/discover/places/"+t.status.place.id+"/"+t.status.place.slug)}}},[i("i",{staticClass:"fas fa-map-marked-alt text-lighter"}),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.status.place.name)+", "+t._s(t.status.place.country))])]):t._e()])])]),t._v(" "),i("div",{staticClass:"float-right"},[i("div",{staticClass:"post-actions"},[0!=t.user?i("div",[i("button",{staticClass:"btn btn-link text-dark no-caret",attrs:{title:"Post options"},on:{click:function(e){return t.ctxMenu()}}},[i("span",{staticClass:"fas fa-ellipsis-v text-muted"})])]):t._e()])])]),t._v(" "),i("div",{staticClass:"d-flex flex-md-column flex-column-reverse h-100",staticStyle:{"overflow-y":"auto"}},[i("div",{staticClass:"card-body status-comments pt-0"},["text"!=t.status.pf_type?i("div",{staticClass:"status-comment"},[t.status.content.length?i("div",{staticClass:"pt-3"},[t.status.sensitive?i("div",[i("span",{staticClass:"py-3"},[i("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:t.status.account.url,title:t.status.account.username}},[t._v(t._s(t.truncate(t.status.account.username,15)))]),t._v(" "),i("span",{staticClass:"text-break"},[i("span",{staticClass:"font-italic text-muted"},[t._v("This comment may contain sensitive material")]),t._v(" "),i("span",{staticClass:"text-primary cursor-pointer pl-1",on:{click:function(e){t.status.sensitive=!1}}},[t._v("Show")])])])]):i("div",[i("p",{class:[t.status.content.length>620?"mb-1 read-more":"mb-1"],staticStyle:{overflow:"hidden"}},[i("a",{staticClass:"font-weight-bold pr-1 text-dark text-decoration-none",attrs:{href:t.statusProfileUrl}},[t._v(t._s(t.statusUsername))]),t._v(" "),i("span",{staticClass:"comment-text",attrs:{id:t.status.id+"-status-readmore"},domProps:{innerHTML:t._s(t.status.content)}})])]),t._v(" "),i("hr")]):t._e(),t._v(" "),t.showComments?i("div",[t._m(0),t._v(" "),i("div",{staticClass:"postCommentsContainer d-none"},[i("p",{staticClass:"mb-1 text-center load-more-link d-none my-4"},[i("a",{staticClass:"text-dark",attrs:{href:"#",title:"Load more comments","data-toggle":"tooltip","data-placement":"bottom"},on:{click:t.loadMore}},[i("svg",{staticClass:"bi bi-plus-circle",staticStyle:{"font-size":"2em"},attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M8 3.5a.5.5 0 01.5.5v4a.5.5 0 01-.5.5H4a.5.5 0 010-1h3.5V4a.5.5 0 01.5-.5z","clip-rule":"evenodd"}}),t._v(" "),i("path",{attrs:{"fill-rule":"evenodd",d:"M7.5 8a.5.5 0 01.5-.5h4a.5.5 0 010 1H8.5V12a.5.5 0 01-1 0V8z","clip-rule":"evenodd"}}),t._v(" "),i("path",{attrs:{"fill-rule":"evenodd",d:"M8 15A7 7 0 108 1a7 7 0 000 14zm0 1A8 8 0 108 0a8 8 0 000 16z","clip-rule":"evenodd"}})])])]),t._v(" "),i("div",{staticClass:"comments mt-3"},t._l(t.results,(function(e,s){return i("div",{key:"tl"+e.id+"_"+s,staticClass:"pb-4 media"},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:e.account.avatar,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[1==e.sensitive?i("div",[i("span",{staticClass:"py-3"},[i("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.truncate(e.account.username,15)))]),t._v(" "),i("span",{staticClass:"text-break"},[i("span",{staticClass:"font-italic text-muted"},[t._v("This comment may contain sensitive material")]),t._v(" "),i("span",{staticClass:"text-primary cursor-pointer pl-1",on:{click:function(t){e.sensitive=!1}}},[t._v("Show")])])])]):i("div",[i("p",{staticClass:"d-flex justify-content-between align-items-top read-more",staticStyle:{"overflow-y":"hidden"}},[i("span",[i("a",{staticClass:"text-dark font-weight-bold mr-1 text-break",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.truncate(e.account.username,15)))]),t._v(" "),i("span",{staticClass:"text-break comment-body",staticStyle:{"word-break":"break-all"},domProps:{innerHTML:t._s(e.content)}})]),t._v(" "),i("span",{staticStyle:{"min-width":"38px"}},[i("span",{on:{click:function(i){return t.likeReply(e,i)}}},[i("i",{class:[e.favourited?"fas fa-heart fa-sm text-danger":"far fa-heart fa-sm text-lighter"]})]),t._v(" "),i("post-menu",{staticClass:"d-inline-block px-2",attrs:{status:e,profile:t.user,size:"sm",modal:"true"},on:{deletePost:function(i){return t.deleteComment(e.id,s)}}})],1)]),t._v(" "),i("p",{},[t._o(i("a",{staticClass:"text-muted mr-3 text-decoration-none small",staticStyle:{width:"20px"},attrs:{href:t.permalinkUrl(e)},domProps:{textContent:t._s(t.timeAgo(e.created_at))}}),0,"tl"+e.id+"_"+s),t._v(" "),e.favourites_count?i("span",{staticClass:"text-muted comment-reaction font-weight-bold mr-3"},[t._v(t._s(1==e.favourites_count?"1 like":e.favourites_count+" likes"))]):t._e(),t._v(" "),i("span",{staticClass:"text-muted comment-reaction font-weight-bold cursor-pointer",on:{click:function(i){return t.replyFocus(e,s,!0)}}},[t._v("Reply")])]),t._v(" "),e.reply_count>0?i("div",{staticClass:"cursor-pointer",on:{click:function(i){return t.toggleReplies(e)}}},[i("span",{staticClass:"show-reply-bar"}),t._v(" "),i("span",{staticClass:"comment-reaction font-weight-bold text-muted"},[t._v(t._s(e.thread?"Hide":"View")+" Replies ("+t._s(e.reply_count)+")")])]):t._e(),t._v(" "),1==e.thread?i("div",{staticClass:"comment-thread"},t._l(e.replies,(function(e,n){return i("div",{key:"cr"+e.id+"_"+s,staticClass:"pb-3 media"},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:e.account.avatar,width:"25px",height:"25px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"d-flex justify-content-between align-items-top read-more",staticStyle:{"overflow-y":"hidden"}},[i("span",[i("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(e.account.username))]),t._v(" "),i("span",{staticClass:"text-break comment-body",staticStyle:{"word-break":"break-all"},domProps:{innerHTML:t._s(e.content)}})]),t._v(" "),i("span",{staticClass:"pl-2",staticStyle:{"min-width":"38px"}},[i("span",{on:{click:function(i){return t.likeReply(e,i)}}},[i("i",{class:[e.favourited?"fas fa-heart fa-sm text-danger":"far fa-heart fa-sm text-lighter"]})]),t._v(" "),i("post-menu",{staticClass:"d-inline-block pl-2",attrs:{status:e,profile:t.user,size:"sm",modal:"true"},on:{deletePost:function(i){return t.deleteCommentReply(e.id,n,s)}}})],1)]),t._v(" "),i("p",{},[t._o(i("a",{staticClass:"text-muted mr-3 text-decoration-none small",staticStyle:{width:"20px"},attrs:{href:e.url},domProps:{textContent:t._s(t.timeAgo(e.created_at))}}),1,"cr"+e.id+"_"+s),t._v(" "),e.favourites_count?i("span",{staticClass:"text-muted comment-reaction font-weight-bold mr-3"},[t._v(t._s(1==e.favourites_count?"1 like":e.favourites_count+" likes"))]):t._e()])])])})),0):t._e()])])])})),0)])]):t._e()]):t._e()]),t._v(" "),t.reactionBarLoading?i("div",{staticClass:"card-body flex-grow-0 py-4 text-center"},[t._m(1)]):i("div",{staticClass:"card-body flex-grow-0 py-1"},[t.loaded&&t.user.hasOwnProperty("id")?i("div",{staticClass:"reactions my-2 pb-1 d-flex justify-content-between"},[i("h3",{class:[t.reactions.liked?"fas fa-heart text-danger mr-3 m-0 cursor-pointer":"far fa-heart pr-3 m-0 like-btn cursor-pointer"],attrs:{title:"Like"},on:{click:t.likeStatus}}),t._v(" "),t.status.comments_disabled?t._e():i("h3",{staticClass:"far fa-comment mr-3 m-0 cursor-pointer",attrs:{title:"Comment"},on:{click:function(e){return t.replyFocus(t.status)}}}),t._v(" "),i("h3",{staticClass:"fas fa-expand m-0 mr-3 cursor-pointer",on:{click:function(e){return t.redirect(t.status.media_attachments[0].url)}}}),t._v(" "),"public"==t.status.visibility?i("h3",{class:[t.reactions.bookmarked?"fas fa-bookmark text-warning m-0 mr-3 cursor-pointer":"far fa-bookmark m-0 mr-3 cursor-pointer"],attrs:{title:"Bookmark"},on:{click:t.bookmarkStatus}}):t._e(),t._v(" "),"public"==t.status.visibility?i("h3",{class:[t.reactions.shared?"fas fa-retweet m-0 text-primary cursor-pointer":"fas fa-retweet m-0 share-btn cursor-pointer"],attrs:{title:"Share"},on:{click:t.shareStatus}}):t._e()]):t._e(),t._v(" "),i("div",{staticClass:"reaction-counts mb-0"},[t.status.liked_by.username&&t.status.liked_by.username!==t.user.username?i("div",{staticClass:"likes mb-1"},[i("span",{staticClass:"like-count"},[t._v("Liked by\n\t\t\t\t\t\t\t"),i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:t.status.liked_by.url}},[t._v(t._s(t.status.liked_by.username))]),t._v(" "),1==t.status.liked_by.others?i("span",[t._v("\n\t\t\t\t\t\t\t\tand "),i("span",{staticClass:"font-weight-bold text-dark cursor-pointer",on:{click:t.likesModal}},[t.status.liked_by.total_count_pretty?i("span",[t._v(t._s(t.status.liked_by.total_count_pretty))]):t._e(),t._v(" others")])]):t._e()])]):t._e()]),t._v(" "),i("div",{staticClass:"timestamp d-flex align-items-bottom justify-content-between"},[i("a",{staticClass:"small text-muted",attrs:{href:t.statusUrl,title:t.status.created_at}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(t.timestampFormat())+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),i("span",{staticClass:"small text-muted text-capitalize cursor-pointer",on:{click:t.visibilityModal}},[t._v(t._s(t.status.visibility))])])])]),t._v(" "),t.showComments?i("div",{staticClass:"card-footer bg-white sticky-md-bottom p-0"},[0==t.user.length?i("div",{staticClass:"comment-form-guest p-3"},[i("a",{attrs:{href:"/login"}},[t._v("Login")]),t._v(" to like or comment.\n\t\t\t\t\t\t\t")]):i("form",{staticClass:"border-0 rounded-0 align-middle",attrs:{method:"post",action:"/i/comment","data-id":t.statusId,"data-truncate":"false"}},[i("textarea",{staticClass:"form-control border-0 rounded-0",staticStyle:{height:"56px","line-height":"18px","max-height":"80px",resize:"none","padding-right":"4.2rem"},attrs:{name:"comment",placeholder:"Add a comment…",autocomplete:"off",autocorrect:"off"},on:{click:function(e){return t.replyFocus(t.status)}}}),t._v(" "),i("input",{staticClass:"d-inline-block btn btn-link font-weight-bold reply-btn text-decoration-none",attrs:{type:"button",value:"Post",disabled:""}})])]):t._e()])])]),t._v(" "),t.showProfileMorePosts?i("div",{staticClass:"container"},[i("p",{staticClass:"text-lighter px-3 mt-5",staticStyle:{"font-weight":"600","font-size":"15px"}},[t._v("More posts from "),i("a",{staticClass:"text-dark",attrs:{href:"/"+t.statusUsername}},[t._v(t._s(this.statusUsername))])]),t._v(" "),i("div",{staticClass:"profile-timeline mt-md-4"},[i("div",{staticClass:"row"},t._l(t.profileMorePosts,(function(e,s){return i("div",{key:"tlob:"+s,staticClass:"col-4 p-1 p-md-3"},[t._o(i("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.getStatusUrl(e)}},[i("div",{class:[e.sensitive?"square":"square "+e.media_attachments[0].filter_class]},["photo:album"==e.pf_type?i("span",{staticClass:"float-right mr-3 post-icon"},[i("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?i("span",{staticClass:"float-right mr-3 post-icon"},[i("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?i("span",{staticClass:"float-right mr-3 post-icon"},[i("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),i("div",{staticClass:"square-content",style:t.previewBackground(e)}),t._v(" "),i("div",{staticClass:"info-overlay-text"},[i("h5",{staticClass:"text-white m-auto font-weight-bold"},[i("span",[i("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),i("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.favourites_count))])]),t._v(" "),i("span",[i("span",{staticClass:"fas fa-retweet fa-lg p-2 d-flex-inline"}),t._v(" "),i("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.reblogs_count))])])])])])]),2,"tlob:"+s)])})),0)])]):t._e()]):t._e(),t._v(" "),"moment"==t.layout?i("div",{staticClass:"momentui"},[i("div",{staticClass:"bg-dark mt-md-n4"},[i("div",{staticClass:"container",staticStyle:{"max-width":"700px"}},[i("div",{staticClass:"postPresenterContainer d-none d-flex justify-content-center align-items-center bg-dark"},["photo"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("photo-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"video"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("video-presenter",{attrs:{status:t.status}})],1):"photo:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("photo-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):"video:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("video-album-presenter",{attrs:{status:t.status}})],1):"photo:video:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("mixed-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):i("div",{staticClass:"w-100"},[i("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])])])]),t._v(" "),i("div",{staticClass:"bg-white"},[i("div",{staticClass:"container"},[i("div",{staticClass:"row pb-5"},[i("div",{staticClass:"col-12 col-md-8 py-4"},[i("div",{staticClass:"reactions d-flex align-items-center"},[i("div",{staticClass:"text-center mr-5"},[i("div",{class:[t.reactions.liked?"fas fa-heart text-danger m-0 cursor-pointer":"far fa-heart m-0 like-btn cursor-pointer"],staticStyle:{"font-size":"1.575rem"},attrs:{title:"Like"},on:{click:t.likeStatus}}),t._v(" "),i("div",{staticClass:"like-count font-weight-bold mt-2 rounded border",staticStyle:{cursor:"pointer"},on:{click:t.likesModal}},[t._v("\n\n\t\t\t\t\t\t\t\t\t\t"+t._s(t.ownerOrAdmin()?t.status.liked_by.total_count+1:0)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),i("div",{staticClass:"text-center"},["public"==t.status.visibility?i("div",{class:[t.reactions.shared?"h3 far fa-share-square m-0 text-primary cursor-pointer":"h3 far fa-share-square m-0 share-btn cursor-pointer"],attrs:{title:"Share"},on:{click:t.shareStatus}}):t._e(),t._v(" "),"public"==t.status.visibility?i("div",{staticClass:"share-count font-weight-bold mt-2 rounded border",staticStyle:{cursor:"pointer"},on:{click:t.sharesModal}},[t._v(t._s(t.status.reblogs_count||0))]):t._e()])]),t._v(" "),t.status.length&&t.status.content_text.includes("#")||t.status.content_text.includes("https://")||t.status.content_text.includes("@")||t.status.content_text.length>45?i("div",{staticClass:"media align-items-center mt-3"},[i("div",{staticClass:"media-body"},[i("p",{staticClass:"lead mr-2",domProps:{innerHTML:t._s(t.status.content)}}),t._v(" "),i("p",{staticClass:"lead mb-0"},[t._v("\n\t\t\t\t\t\t\t\t\t\tby "),i("a",{attrs:{href:t.statusProfileUrl}},[t._v(t._s(t.statusUsername))]),t._v(" "),t.relationship&&t.profile&&t.user&&!t.relationship.following&&t.profile.id!=t.user.id?i("span",[i("span",{staticClass:"px-1 text-lighter"},[t._v("•")]),t._v(" "),i("a",{staticClass:"font-weight-bold small",attrs:{href:"#"}},[t._v("Follow")])]):t._e()])]),t._v(" "),i("a",{attrs:{href:t.statusProfileUrl,title:t.statusUsername}},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:t.statusAvatar,alt:"avatar",width:"72px",height:"72px"}})])]):i("div",{staticClass:"media align-items-center mt-3"},[i("div",{staticClass:"media-body"},[i("h2",{staticClass:"font-weight-bold mr-2"},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text.length?t.status.content_text:"Untitled Post")+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),i("p",{staticClass:"lead mb-0"},[t._v("\n\t\t\t\t\t\t\t\t\t\tby "),i("a",{attrs:{href:t.statusProfileUrl}},[t._v(t._s(t.statusUsername))])])]),t._v(" "),i("a",{attrs:{href:t.statusProfileUrl,title:t.statusUsername}},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:t.statusAvatar,alt:"avatar",width:"72px",height:"72px"}})])]),t._v(" "),i("hr"),t._v(" "),i("div",[i("p",{staticClass:"lead"},[t.status.place?i("span",{staticClass:"text-truncate"},[i("i",{staticClass:"fas fa-map-marker-alt text-lighter mr-3"}),t._v(" "+t._s(t.status.place.name)+", "+t._s(t.status.place.country)+"\n\t\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),t._m(2)]),t._v(" "),t.status.tags?i("div",{staticClass:"pt-4"},[i("p",{staticClass:"lead"},t._l(t.status.tags,(function(e,s){return i("a",{staticClass:"btn btn-outline-dark mr-1 mb-1",attrs:{href:e.url+"?src=mp"}},[t._v(t._s(e.name))])})),0)]):t._e()])]),t._v(" "),i("div",{staticClass:"col-12 col-md-4 pt-4 pl-md-3"},[i("p",{staticClass:"lead font-weight-bold"},[t._v("Comments")]),t._v(" "),0!=t.user?i("div",{staticClass:"moment-comments"},[i("div",{staticClass:"form-group"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyText,expression:"replyText"}],staticClass:"form-control",attrs:{rows:"3",placeholder:"Add a comment ..."},domProps:{value:t.replyText},on:{input:function(e){e.target.composing||(t.replyText=e.target.value)}}}),t._v(" "),i("p",{staticClass:"d-flex justify-content-between align-items-center mt-3"},[i("span",{staticClass:"small text-lighter font-weight-bold"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(t.replyText.length)+"/"+t._s(t.config.uploader.max_caption_length)+"\n\t\t\t\t\t\t\t\t\t\t")]),t._v(" "),t.replyText.length>2?i("span",[i("div",{staticClass:"custom-control custom-switch"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.replySensitive,expression:"replySensitive"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"sensitiveReply"},domProps:{checked:Array.isArray(t.replySensitive)?t._i(t.replySensitive,null)>-1:t.replySensitive},on:{click:function(e){t.replySensitive},change:function(e){var i=t.replySensitive,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.replySensitive=i.concat([null])):a>-1&&(t.replySensitive=i.slice(0,a).concat(i.slice(a+1)))}else t.replySensitive=n}}}),t._v(" "),i("label",{staticClass:"custom-control-label small font-weight-bold text-muted",staticStyle:{"padding-top":"3px"},attrs:{for:"sensitiveReply"}},[t._v("Add Content Warning")])])]):t._e(),t._v(" "),t.replyText.length>2?i("button",{staticClass:"btn btn-sm font-weight-bold btn-outline-primary py-1",on:{click:t.postReply}},[t._v("Post")]):t._e()])])]):t._e(),t._v(" "),i("div",{staticClass:"comment mt-4",staticStyle:{"max-height":"500px","overflow-y":"auto"}},t._l(t.results,(function(e,s){return i("div",{key:"tl"+e.id+"_"+s,staticClass:"media mb-3 mt-2"},[i("a",{attrs:{href:e.account.url,title:e.account.username}},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:e.account.avatar,alt:"avatar",width:"32px",height:"32px"}})]),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"d-flex justify-content-between"},[i("span",[i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))])]),t._v(" "),i("span",{staticClass:"text-lighter"},[e.favourited?i("span",{staticClass:"cursor-pointer mr-2",on:{click:function(i){return t.likeReply(e)}}},[i("i",{staticClass:"fas fa-heart text-danger"})]):i("span",{staticClass:"cursor-pointer mr-2",on:{click:function(i){return t.likeReply(e)}}},[i("i",{staticClass:"far fa-heart"})]),t._v(" "),i("span",{},[i("post-menu",{staticClass:"d-inline-block px-2",attrs:{status:e,profile:t.user,size:"sm",modal:"true"},on:{deletePost:function(i){return t.deleteComment(e.id,s)}}})],1)])]),t._v(" "),1==e.sensitive?i("div",[i("span",{staticClass:"py-3"},[i("span",{staticClass:"text-break"},[i("span",{staticClass:"font-italic text-muted"},[t._v("This comment may contain sensitive material")]),t._v(" "),i("span",{staticClass:"badge badge-primary cursor-pointer ml-2 py-1",on:{click:function(t){e.sensitive=!1}}},[t._v("Show")])])])]):i("div",{staticClass:"read-more",staticStyle:{"overflow-y":"hidden"}},[i("p",{staticClass:"mb-0",domProps:{innerHTML:t._s(e.content)}},[t._v("loading ...")])]),t._v(" "),i("p",[i("span",{staticClass:"small"},[i("a",{staticClass:"text-lighter text-decoration-none",attrs:{href:e.url}},[t._v(t._s(t.timeAgo(e.created_at)))])])])])])})),0)])])])])]):t._e()]):t._e(),t._v(" "),i("b-modal",{ref:"likesModal",attrs:{id:"l-modal","hide-footer":"",centered:"",title:"Likes","body-class":"list-group-flush py-3 px-0"}},[i("div",{staticClass:"list-group"},[t._l(t.likes,(function(e,s){return i("div",{key:"modal_likes_"+s,staticClass:"list-group-item border-0 py-1"},[i("div",{staticClass:"media"},[i("a",{attrs:{href:e.url}},[i("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t")])]),t._v(" "),e.local?i("p",{staticClass:"text-muted mb-0 text-truncate",staticStyle:{"font-size":"14px"}},[t._v("\n\t\t\t\t\t\t\t"+t._s(e.display_name)+"\n\t\t\t\t\t\t")]):i("p",{staticClass:"text-muted mb-0 text-truncate mr-3",staticStyle:{"font-size":"14px"},attrs:{title:e.acct,"data-toggle":"dropdown","data-placement":"bottom"}},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.acct.split("@")[0]))]),i("span",{staticClass:"text-lighter"},[t._v("@"+t._s(e.acct.split("@")[1]))])])])])])})),t._v(" "),i("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteLikesHandler}},[i("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),i("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)]),t._v(" "),i("b-modal",{ref:"sharesModal",attrs:{id:"s-modal","hide-footer":"",centered:"",title:"Shares","body-class":"list-group-flush py-3 px-0"}},[i("div",{staticClass:"list-group"},[t._l(t.shares,(function(e,s){return i("div",{key:"modal_shares_"+s,staticClass:"list-group-item border-0 py-1"},[i("div",{staticClass:"media"},[i("a",{attrs:{href:e.url}},[i("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"d-inline-block"},[i("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),i("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.display_name)+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),i("p",{staticClass:"float-right"})])])])})),t._v(" "),i("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteSharesHandler}},[i("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),i("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)]),t._v(" "),i("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":!0,"hide-footer":!0,centered:"",size:"lg","body-class":"p-0"}},[t.lightboxMedia?i("div",[i("img",{class:t.lightboxMedia.filter_class+" img-fluid",staticStyle:{"min-height":"100%","min-width":"100%"},attrs:{src:t.lightboxMedia.url}})]):t._e()]),t._v(" "),i("b-modal",{ref:"embedModal",attrs:{id:"ctx-embed-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"md","body-class":"p-2 rounded"}},[i("div",[i("div",{staticClass:"form-group"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedPayload,expression:"ctxEmbedPayload"}],staticClass:"form-control disabled text-monospace",staticStyle:{"overflow-y":"hidden",border:"1px solid #efefef","font-size":"12px","line-height":"18px",margin:"0 0 7px",resize:"none"},attrs:{rows:"8",disabled:""},domProps:{value:t.ctxEmbedPayload},on:{input:function(e){e.target.composing||(t.ctxEmbedPayload=e.target.value)}}})]),t._v(" "),i("div",{staticClass:"form-group pl-2 d-flex justify-content-center"},[i("div",{staticClass:"form-check mr-3"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedShowCaption,expression:"ctxEmbedShowCaption"}],staticClass:"form-check-input",attrs:{type:"checkbox",disabled:1==t.ctxEmbedCompactMode},domProps:{checked:Array.isArray(t.ctxEmbedShowCaption)?t._i(t.ctxEmbedShowCaption,null)>-1:t.ctxEmbedShowCaption},on:{change:function(e){var i=t.ctxEmbedShowCaption,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.ctxEmbedShowCaption=i.concat([null])):a>-1&&(t.ctxEmbedShowCaption=i.slice(0,a).concat(i.slice(a+1)))}else t.ctxEmbedShowCaption=n}}}),t._v(" "),i("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\tShow Caption\n\t\t\t\t\t")])]),t._v(" "),i("div",{staticClass:"form-check mr-3"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedShowLikes,expression:"ctxEmbedShowLikes"}],staticClass:"form-check-input",attrs:{type:"checkbox",disabled:1==t.ctxEmbedCompactMode},domProps:{checked:Array.isArray(t.ctxEmbedShowLikes)?t._i(t.ctxEmbedShowLikes,null)>-1:t.ctxEmbedShowLikes},on:{change:function(e){var i=t.ctxEmbedShowLikes,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.ctxEmbedShowLikes=i.concat([null])):a>-1&&(t.ctxEmbedShowLikes=i.slice(0,a).concat(i.slice(a+1)))}else t.ctxEmbedShowLikes=n}}}),t._v(" "),i("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\tShow Likes\n\t\t\t\t\t")])]),t._v(" "),i("div",{staticClass:"form-check"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedCompactMode,expression:"ctxEmbedCompactMode"}],staticClass:"form-check-input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.ctxEmbedCompactMode)?t._i(t.ctxEmbedCompactMode,null)>-1:t.ctxEmbedCompactMode},on:{change:function(e){var i=t.ctxEmbedCompactMode,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.ctxEmbedCompactMode=i.concat([null])):a>-1&&(t.ctxEmbedCompactMode=i.slice(0,a).concat(i.slice(a+1)))}else t.ctxEmbedCompactMode=n}}}),t._v(" "),i("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\tCompact Mode\n\t\t\t\t\t")])])]),t._v(" "),i("hr"),t._v(" "),i("button",{class:t.copiedEmbed?"btn btn-primary btn-block btn-sm py-1 font-weight-bold disabed":"btn btn-primary btn-block btn-sm py-1 font-weight-bold",attrs:{disabled:t.copiedEmbed},on:{click:t.ctxCopyEmbed}},[t._v(t._s(t.copiedEmbed?"Embed Code Copied!":"Copy Embed Code"))]),t._v(" "),i("p",{staticClass:"mb-0 px-2 small text-muted"},[t._v("By using this embed, you agree to our "),i("a",{attrs:{href:"/site/terms"}},[t._v("Terms of Use")])])])]),t._v(" "),i("b-modal",{ref:"taggedModal",attrs:{id:"tagged-modal","hide-footer":"",centered:"",title:"Tagged People","body-class":"list-group-flush py-3 px-0"}},[i("div",{staticClass:"list-group"},t._l(t.status.taggedPeople,(function(e,s){return i("div",{key:"modal_taggedpeople_"+s,staticClass:"list-group-item border-0 py-1"},[i("div",{staticClass:"media"},[i("a",{attrs:{href:"/"+e.username}},[i("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"pt-1 d-flex justify-content-between",staticStyle:{"font-size":"14px"}},[i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:"/"+e.username}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t")]),t._v(" "),e.id==t.user.id?i("button",{staticClass:"btn btn-outline-primary btn-sm py-1 px-3",on:{click:function(e){return t.untagMe()}}},[t._v("Untag Me")]):t._e()])])])])})),0),t._v(" "),i("p",{staticClass:"mb-0 text-center small text-muted font-weight-bold"},[i("a",{attrs:{href:"/site/kb/tagging-people"}},[t._v("Learn more")]),t._v(" about Tagging People.")])]),t._v(" "),i("b-modal",{ref:"ctxModal",attrs:{id:"ctx-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[i("div",{staticClass:"list-group text-center"},[t.status&&1==t.status.local?i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.showEmbedPostModal()}}},[t._v("Embed")]):t._e(),t._v(" "),i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxMenuCopyLink()}}},[t._v("Copy Link")]),t._v(" "),t.status&&t.user.id==t.status.account.id?i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:t.toggleCommentVisibility}},[t._v(t._s(t.showComments?"Disable":"Enable")+" Comments")]):t._e(),t._v(" "),t.status&&t.user.id==t.status.account.id?i("a",{staticClass:"list-group-item rounded cursor-pointer text-dark text-decoration-none",attrs:{href:t.editUrl()}},[t._v("Edit")]):t._e(),t._v(" "),t.user&&1==t.user.is_admin?i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxModMenu()}}},[t._v("Moderation Tools")]):t._e(),t._v(" "),!t.status||t.user.id==t.status.account.id||t.relationship.blocking||t.user.is_admin?t._e():i("div",{staticClass:"list-group-item rounded cursor-pointer text-danger",on:{click:function(e){return t.blockProfile()}}},[t._v("Block")]),t._v(" "),t.status&&t.user.id!=t.status.account.id&&t.relationship.blocking&&!t.user.is_admin?i("div",{staticClass:"list-group-item rounded cursor-pointer text-danger",on:{click:function(e){return t.unblockProfile()}}},[t._v("Unblock")]):t._e(),t._v(" "),t.user&&t.user.id!=t.status.account.id&&!t.user.is_admin?i("a",{staticClass:"list-group-item rounded cursor-pointer text-danger text-decoration-none",attrs:{href:t.reportUrl()}},[t._v("Report")]):t._e(),t._v(" "),t.status&&(t.user.is_admin||t.user.id==t.status.account.id)?i("div",{staticClass:"list-group-item rounded cursor-pointer text-danger",on:{click:function(e){return t.deletePost(t.ctxMenuStatus)}}},[t._v("Delete")]):t._e(),t._v(" "),i("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.closeCtxMenu()}}},[t._v("Cancel")])])]),t._v(" "),i("b-modal",{ref:"ctxModModal",attrs:{id:"ctx-mod-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[i("div",{staticClass:"list-group text-center"},[i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:t.toggleCommentVisibility}},[t._v(t._s(t.showComments?"Disable":"Enable")+" Comments")]),t._v(" "),i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost("unlist")}}},[t._v("Unlist from Timelines")]),t._v(" "),t.status.sensitive?i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost("remcw")}}},[t._v("Remove Content Warning")]):i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost("addcw")}}},[t._v("Add Content Warning")]),t._v(" "),i("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxModMenuClose()}}},[t._v("Cancel")])])]),t._v(" "),i("b-modal",{ref:"replyModal",attrs:{id:"ctx-reply-modal","hide-footer":"",centered:"",rounded:"","title-html":t.replyingToUsername?"Reply to "+t.replyingToUsername+"":"","title-tag":"p","title-class":"font-weight-bold text-muted",size:"md","body-class":"p-2 rounded"}},[i("div",[i("vue-tribute",{attrs:{options:t.tributeSettings}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyText,expression:"replyText"}],staticClass:"form-control",staticStyle:{border:"none","font-size":"18px",resize:"none","white-space":"pre-wrap",outline:"none"},attrs:{rows:"4",placeholder:"Reply here ..."},domProps:{value:t.replyText},on:{input:function(e){e.target.composing||(t.replyText=e.target.value)}}})]),t._v(" "),i("div",{staticClass:"border-top border-bottom my-2"},[i("ul",{staticClass:"nav align-items-center emoji-reactions",staticStyle:{"overflow-x":"scroll","flex-wrap":"unset"}},t._l(t.emoji,(function(e){return i("li",{staticClass:"nav-item",on:{click:function(e){return t.emojiReaction(t.status)}}},[t._v(t._s(e))])})),0)]),t._v(" "),i("div",{staticClass:"d-flex justify-content-between align-items-center"},[i("div",[i("span",{staticClass:"pl-2 small text-muted font-weight-bold text-monospace"},[i("span",{class:[t.replyText.length>t.config.uploader.max_caption_length?"text-danger":"text-dark"]},[t._v(t._s(t.replyText.length>t.config.uploader.max_caption_length?t.config.uploader.max_caption_length-t.replyText.length:t.replyText.length))]),t._v("/"+t._s(t.config.uploader.max_caption_length)+"\n\t\t\t\t\t")])]),t._v(" "),i("div",{staticClass:"d-flex align-items-center"},[i("div",{staticClass:"custom-control custom-switch mr-3"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.replySensitive,expression:"replySensitive"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"replyModalCWSwitch"},domProps:{checked:Array.isArray(t.replySensitive)?t._i(t.replySensitive,null)>-1:t.replySensitive},on:{change:function(e){var i=t.replySensitive,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.replySensitive=i.concat([null])):a>-1&&(t.replySensitive=i.slice(0,a).concat(i.slice(a+1)))}else t.replySensitive=n}}}),t._v(" "),i("label",{class:[t.replySensitive?"custom-control-label font-weight-bold text-dark":"custom-control-label text-lighter"],attrs:{for:"replyModalCWSwitch"}},[t._v("Mark as NSFW")])]),t._v(" "),i("button",{staticClass:"btn btn-primary btn-sm py-2 px-4 lead text-uppercase font-weight-bold",attrs:{disabled:0==t.replyText.length},on:{click:function(e){return e.preventDefault(),t.postReply()}}},[t._v("\n\t\t\t\t\t"+t._s(1==t.replySending?"POSTING":"POST")+"\n\t\t\t\t")])])])],1)])],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"postCommentsLoader text-center py-2"},[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("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("span",{staticClass:"float-right"},[e("i",{staticClass:"far fa-clock text-lighter mr-3"}),this._v(" "+this._s(this.timeAgo(this.status.created_at))+" ago\n\t\t\t\t\t\t\t\t\t")])}],!1,null,"1f540478",null);e.default=c.exports},"8A40":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.status-comments[data-v-1f540478],\n.reactions[data-v-1f540478] {\n\tbackground: #fff;\n}\n.postPresenterContainer[data-v-1f540478] {\n\tbackground: #fff;\n}\n@media(min-width: 720px) {\n.postPresenterContainer[data-v-1f540478] {\n\t\tmin-height: 600px;\n}\n}\n[data-v-1f540478]::-webkit-scrollbar {\n\t\twidth: 0px;\n\t\tbackground: transparent;\n}\n.reply-btn[data-v-1f540478] {\n\tposition: absolute;\n\tbottom: 12px;\n\tright: 20px;\n\twidth: 60px;\n\ttext-align: center;\n\tborder-radius: 0 3px 3px 0;\n}\n.text-lighter[data-v-1f540478] {\n\tcolor:#B8C2CC !important;\n}\n.text-break[data-v-1f540478] {\n\toverflow-wrap: break-word;\n}\n.comments p[data-v-1f540478] {\n\tmargin-bottom: 0;\n}\n.comment-reaction[data-v-1f540478] {\n\tfont-size: 80%;\n}\n.show-reply-bar[data-v-1f540478] {\n\tdisplay: inline-block;\n\tborder-bottom: 1px solid #999;\n\theight: 0;\n\tmargin-right: 16px;\n\tvertical-align: middle;\n\twidth: 24px;\n}\n.comment-thread[data-v-1f540478] {\n\tmargin-top: 1rem;\n}\n.emoji-reactions .nav-item[data-v-1f540478] {\n\tfont-size: 1.2rem;\n\tpadding: 9px;\n\tcursor: pointer;\n}\n.emoji-reactions[data-v-1f540478]::-webkit-scrollbar {\n\twidth: 0px;\n\theight: 0px;\n\tbackground: transparent;\n}\n@media (min-width: 1200px) {\n.container[data-v-1f540478] {\n\t\tmax-width: 1100px;\n}\n}\n\n",""])},"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 i=e.protocol+"//"+e.host,s=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var n,a=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?t:(n=0===a.indexOf("//")?a:0===a.indexOf("/")?i+a:s+a.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")}))}},"9wGH":function(t,e,i){"use strict";i.r(e);var s={props:["status"]},n=i("KHd+"),a=Object(n.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return 1==t.status.sensitive?i("div",[i("details",{staticClass:"details-animated"},[i("summary",[i("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(" "),i("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),i("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 i("b-carousel-slide",{key:t.id+"-media"},[i("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:t.description,width:"100%",height:"100%",poster:t.preview_url},slot:"img"},[i("source",{attrs:{src:t.url,type:t.mime}})])])})),1)],1)]):i("div",[i("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 i("b-carousel-slide",{key:t.id+"-media"},[i("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:t.description,width:"100%",height:"100%",poster:t.preview_url},slot:"img"},[i("source",{attrs:{src:t.url,type:t.mime}})])])})),1)],1)}),[],!1,null,null,null);e.default=a.exports},"CJs/":function(t,e,i){Vue.component("photo-presenter",i("d+I4").default),Vue.component("video-presenter",i("2Jpm").default),Vue.component("photo-album-presenter",i("Mrqh").default),Vue.component("video-album-presenter",i("9wGH").default),Vue.component("mixed-album-presenter",i("exej").default),Vue.component("post-menu",i("yric").default),Vue.component("post-component",i("6ZA0").default)},CT9m:function(t,e,i){var s=i("0E+L");"string"==typeof s&&(s=[[t.i,s,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(s,n);s.locals&&(t.exports=s.locals)},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",s=t[3];if(!s)return i;if(e&&"function"==typeof btoa){var n=(o=s,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),a=s.sources.map((function(t){return"/*# sourceURL="+s.sourceRoot+t+" */"}));return[i].concat(a).concat([n]).join("\n")}var o;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var s={},n=0;n