diff --git a/dist/fansubid/browser/939.3cdc42642e356829.js b/dist/fansubid/browser/939.3cdc42642e356829.js
deleted file mode 100644
index 678e9d132..000000000
--- a/dist/fansubid/browser/939.3cdc42642e356829.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[939],{9939:(W,S,l)=>{l.r(S),l.d(S,{CreateModule:()=>ci});var c=l(9808),T=l(8406),n=l(3075),Z=l(9345),A=l(1385),u=l(6271),b=l(4249),N=l(2777),y=l(5094),t=l(5e3),I=l(8696);let p=(()=>{class i{constructor(e){this.gs=e}canDeactivate(e,a,o){return!e.canDeactivate||e.canDeactivate()}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(I.U))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var k=l(210),_=l(7355),h=l(8613),v=l(5861),X=l(6805),lt=l(930);function D(i,r){const e="object"==typeof r;return new Promise((a,o)=>{const s=new lt.Hp({next:m=>{a(m),s.unsubscribe()},error:o,complete:()=>{e?a(r.defaultValue):o(new X.K)}});i.subscribe(s)})}var q=l(8372),J=l(9094),M=l(8505),R=l(3900),P=l(8746),w=l(5625),Q=l(3e3),O=l(8745),ct=l(519),ut=l(8439),mt=l(5679),tt=l(6781),dt=l(8987),V=l(7902),et=l(6925),G=l(4137),_t=l(6493),L=l(7845),Y=l(8616),f=l(7322),H=l(5245),K=l(7423),it=l(2368),at=l(7238),ot=l(4107),nt=l(508),j=l(7531),rt=l(1079),gt=l(5899),pt=l(4834),z=l(3626);function ft(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function ht(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function bt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",2),t._UZ(1,"img",45),t.TgZ(2,"mat-form-field",46)(3,"mat-label"),t._uU(4,"Gambar Untuk Embed SEO"),t.qZA(),t.TgZ(5,"ngx-mat-file-input",47,48),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(6);return t.oxw(2).uploadImage(o,s)}),t.qZA(),t.TgZ(7,"mat-icon",31),t._uU(8,"image"),t.qZA()(),t.TgZ(9,"mat-error",49)(10,"small"),t.YNc(11,ft,3,3,"div",20),t.YNc(12,ht,2,1,"div",20),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("src",e.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",e.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",e.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageErrorText)}}function vt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",24)(1,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).submitImage()}),t.TgZ(2,"mat-icon",27),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function xt(i,r){1&i&&(t.TgZ(0,"div",15)(1,"mat-slide-toggle",50)(2,"i"),t._uU(3,"Private"),t.qZA(),t._uU(4," Akses Hanya Dengan URL "),t.qZA()())}function Tt(i,r){1&i&&(t.TgZ(0,"div",15)(1,"mat-slide-toggle",51),t._uU(2," Permanent Storage "),t.qZA()())}function Ct(i,r){if(1&i&&(t.TgZ(0,"mat-option",52),t._uU(1),t.qZA()),2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.Oqu(e.name)}}function Zt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Jenis Tidak Boleh Kosong"),t.qZA())}function At(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function kt(i,r){1&i&&(t.TgZ(0,"mat-option",58),t._UZ(1,"mat-progress-bar",59),t.qZA())}function Ut(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(4).filterAnimeSelected(s)}),t._UZ(1,"img",62),t.TgZ(2,"span",44),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.lnq("",e.id," :: ",null==e.media_type?null:e.media_type.toUpperCase()," :: ",e.title,"")}}function It(i,r){if(1&i&&(t.ynx(0),t.YNc(1,Ut,4,5,"mat-option",60),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredAnime)}}function Et(i,r){if(1&i&&(t.TgZ(0,"small",63),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("anime_name").value)}}function St(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Tidak Boleh Kosong"),t.qZA())}function Nt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Hanya Boleh Angka"),t.qZA())}function yt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-form-field",53)(1,"mat-label"),t._uU(2,"Anime Terkait"),t.qZA(),t.TgZ(3,"input",54),t.NdJ("keyup",function(){return t.CHM(e),t.oxw(2).resetSelectedAnime()}),t.qZA(),t.TgZ(4,"mat-icon",31),t._uU(5,"short_text"),t.qZA(),t.TgZ(6,"mat-autocomplete",null,55),t.YNc(8,kt,2,0,"mat-option",56),t.YNc(9,It,2,1,"ng-container",20),t.qZA(),t.YNc(10,Et,2,1,"small",57),t.TgZ(11,"mat-error"),t.YNc(12,St,2,0,"div",20),t.YNc(13,Nt,2,0,"div",20),t.qZA()()}if(2&i){const e=t.MAs(7),a=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(5),t.Q6J("ngIf",a.isLoading),t.xp6(1),t.Q6J("ngIf",!a.isLoading),t.xp6(1),t.Q6J("ngIf",a.fg.get("anime_name").value),t.xp6(2),t.Q6J("ngIf",a.fg.get("anime_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("anime_id").hasError("pattern"))}}function qt(i,r){1&i&&(t.TgZ(0,"mat-option",58),t._UZ(1,"mat-progress-bar",59),t.qZA())}function Jt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(4).filterDoramaSelected(s)}),t._UZ(1,"img",62),t.TgZ(2,"span",44),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.mdl_id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.mdl_id," :: ",e.title,"")}}function wt(i,r){if(1&i&&(t.ynx(0),t.YNc(1,Jt,4,4,"mat-option",60),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredDorama)}}function Bt(i,r){if(1&i&&(t.TgZ(0,"small",63),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("dorama_name").value)}}function Ft(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Tidak Boleh Kosong"),t.qZA())}function Dt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Hanya Boleh Angka"),t.qZA())}function Mt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-form-field",53)(1,"mat-label"),t._uU(2,"Dorama Terkait"),t.qZA(),t.TgZ(3,"input",64),t.NdJ("keyup",function(){return t.CHM(e),t.oxw(2).resetSelectedDorama()}),t.qZA(),t.TgZ(4,"mat-icon",31),t._uU(5,"short_text"),t.qZA(),t.TgZ(6,"mat-autocomplete",null,65),t.YNc(8,qt,2,0,"mat-option",56),t.YNc(9,wt,2,1,"ng-container",20),t.qZA(),t.YNc(10,Bt,2,1,"small",57),t.TgZ(11,"mat-error"),t.YNc(12,Ft,2,0,"div",20),t.YNc(13,Dt,2,0,"div",20),t.qZA()()}if(2&i){const e=t.MAs(7),a=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(5),t.Q6J("ngIf",a.isLoading),t.xp6(1),t.Q6J("ngIf",!a.isLoading),t.xp6(1),t.Q6J("ngIf",a.fg.get("dorama_name").value),t.xp6(2),t.Q6J("ngIf",a.fg.get("dorama_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("dorama_id").hasError("pattern"))}}function Rt(i,r){1&i&&(t.TgZ(0,"mat-icon",31),t._uU(1,"short_text"),t.qZA())}function Qt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",72),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeFansub(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function Ot(i,r){1&i&&(t.TgZ(0,"mat-option",58),t._UZ(1,"mat-progress-bar",59),t.qZA())}function Lt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit,m=t.oxw(2).index;return t.oxw(2).filterFansubSelected(s,m)}),t._UZ(1,"img",73),t.TgZ(2,"span",44),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.slug," :: ",e.name,"")}}function Yt(i,r){if(1&i&&(t.ynx(0),t.YNc(1,Lt,4,4,"mat-option",60),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredFansub)}}function Ht(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Tidak Boleh Kosong"),t.qZA())}function Kt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Hanya Boleh Angka"),t.qZA())}function jt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div")(1,"div",66)(2,"mat-form-field",67)(3,"mat-label"),t._uU(4,"Fansub Terkait"),t.qZA(),t.TgZ(5,"input",68),t.NdJ("keyup",function(){const s=t.CHM(e).index;return t.oxw(2).resetSelectedFansub(s)}),t.qZA(),t.YNc(6,Rt,2,0,"mat-icon",69),t.YNc(7,Qt,3,0,"button",70),t.TgZ(8,"mat-autocomplete",null,71),t.YNc(10,Ot,2,0,"mat-option",56),t.YNc(11,Yt,2,1,"ng-container",20),t.qZA(),t.TgZ(12,"small",63),t._uU(13),t.qZA(),t.TgZ(14,"mat-error"),t.YNc(15,Ht,2,0,"div",20),t.YNc(16,Kt,2,0,"div",20),t.qZA()()()()}if(2&i){const e=r.$implicit,a=r.index,o=t.MAs(9),s=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",a),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",o),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").value||0===a),t.xp6(1),t.Q6J("ngIf",!e.get("fansub_id").value&&a>0),t.xp6(3),t.Q6J("ngIf",s.isLoading),t.xp6(1),t.Q6J("ngIf",!s.isLoading),t.xp6(2),t.Oqu(e.get("fansub_name").value),t.xp6(2),t.Q6J("ngIf",e.get("fansub_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").hasError("pattern"))}}function Pt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Tidak Boleh Kosong"),t.qZA())}function Vt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Gt(i,r){if(1&i&&t._UZ(0,"angular-editor",74),2&i){const e=t.oxw(2);t.Q6J("config",e.GS.angularEditorConfig)}}function zt(i,r){1&i&&t._UZ(0,"div")}function $t(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.attachmentLimitExceeded)," !")}}function Wt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.attachmentErrorText)}}function Xt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",37)(1,"div",25)(2,"div",82),t._uU(3),t.ALo(4,"bytes"),t._UZ(5,"br")(6,"mat-progress-bar",83),t.qZA()(),t.TgZ(7,"div",84)(8,"button",26),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(3).submitAttachment(s)}),t.TgZ(9,"mat-icon",27),t._uU(10,"attachment"),t.qZA(),t._uU(11," Unggah "),t.qZA()()()}if(2&i){const e=r.$implicit,a=t.oxw(3);t.xp6(3),t.lnq(" ",e.status," :: ",e.progress,"% @ ",t.lcZ(4,6,e.speed),"/s "),t.xp6(3),t.Q6J("mode","determinate")("value",e.progress),t.xp6(2),t.Q6J("disabled",a.submitted||"complete"===e.status||"uploading"===e.status)}}function te(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",10)(1,"div",75)(2,"small",76),t._uU(3," * "),t.TgZ(4,"i"),t._uU(5,"Resume-able Upload"),t.qZA(),t._uU(6," (Tidak wajib, jika sudah ada URL eksternal, misal alamat webmu gdrive mediafire mega dan lain sebagainya). Mohon ditunggu dan jangan di tinggal, berkas lampiran akan "),t.TgZ(7,"i"),t._uU(8,"expired"),t.qZA(),t._uU(9),t.TgZ(10,"i"),t._uU(11,"upload"),t.qZA(),t._uU(12,". "),t.qZA()(),t.TgZ(13,"mat-form-field",77)(14,"mat-label"),t._uU(15,"Upload Lampiran Berkas -- DDL"),t.qZA(),t.TgZ(16,"ngx-mat-file-input",78,79),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(17);return t.oxw(2).uploadAttachment(o,s)}),t.qZA(),t.TgZ(18,"mat-icon",31),t._uU(19,"attach_file"),t.qZA()(),t.TgZ(20,"mat-error",80)(21,"small"),t.YNc(22,$t,3,3,"div",20),t.YNc(23,Wt,2,1,"div",20),t.qZA()()(),t.YNc(24,Xt,12,8,"div",81),t.ALo(25,"async")}if(2&i){const e=t.oxw(2);t.xp6(9),t.hij(" apabila tidak disimpan dalam ",e.CONSTANTS.timeoutDeleteTempAttachmentTime/60/1e3," menit setelah berhasil "),t.xp6(4),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",null!==e.attachmentSelected)("accept",e.fileTypeAttachmentAllowed),t.xp6(6),t.Q6J("ngIf",e.attachmentLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.attachmentErrorText),t.xp6(1),t.Q6J("ngForOf",t.lcZ(25,7,e.uploads$))}}function ee(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",85),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).verify()}),t.TgZ(1,"mat-icon",27),t._uU(2,"enhanced_encryption"),t.qZA(),t._uU(3," Verifikasi Akun Untuk Upload DDL! "),t.qZA()}}function ie(i,r){1&i&&(t.TgZ(0,"div",75)(1,"small",76),t._uU(2,"* Gunakan tombol (X) untuk menghapus URL Eksternal jika ingin hanya menggunakan lampiran "),t.TgZ(3,"i"),t._uU(4,"upload"),t.qZA(),t._uU(5," DDL saja"),t.qZA()())}function ae(i,r){1&i&&(t.TgZ(0,"mat-icon",31),t._uU(1,"web"),t.qZA())}function oe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",72),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeDownloadLink(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function ne(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Web Tidak Boleh Kosong"),t.qZA())}function re(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function se(i,r){1&i&&(t.TgZ(0,"mat-icon",31),t._uU(1,"link"),t.qZA())}function le(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",72),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeDownloadLink(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function ce(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tautan Tidak Boleh Kosong"),t.qZA())}function ue(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tautan Link Tidak Valid"),t.qZA())}function me(i,r){if(1&i&&(t.ynx(0),t.TgZ(1,"div",86),t.YNc(2,ie,6,0,"div",87),t.TgZ(3,"mat-form-field",88)(4,"mat-label"),t._uU(5,"Nama Website"),t.qZA(),t._UZ(6,"input",89),t.YNc(7,ae,2,0,"mat-icon",69),t.YNc(8,oe,3,0,"button",70),t.TgZ(9,"mat-error"),t.YNc(10,ne,2,0,"div",20),t.YNc(11,re,2,0,"div",20),t.qZA()(),t.TgZ(12,"mat-form-field",90)(13,"mat-label"),t._uU(14,"Tautan Link"),t.qZA(),t._UZ(15,"input",91),t.YNc(16,se,2,0,"mat-icon",69),t.YNc(17,le,3,0,"button",70),t.TgZ(18,"mat-error"),t.YNc(19,ce,2,0,"div",20),t.YNc(20,ue,2,0,"div",20),t.qZA()()(),t.BQk()),2&i){const e=r.$implicit,a=r.index,o=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",a),t.xp6(1),t.Q6J("ngIf",(null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified)&&0===a),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngIf",e.get("name").value||0===a&&!(null!=o.AS.currentUserSubject&&null!=o.AS.currentUserSubject.value&&o.AS.currentUserSubject.value.verified)),t.xp6(1),t.Q6J("ngIf",!e.get("name").value&&(a>0||(null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified))),t.xp6(2),t.Q6J("ngIf",e.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngIf",e.get("url").value||0===a&&!(null!=o.AS.currentUserSubject&&null!=o.AS.currentUserSubject.value&&o.AS.currentUserSubject.value.verified)),t.xp6(1),t.Q6J("ngIf",!e.get("url").value&&(a>0||(null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified))),t.xp6(2),t.Q6J("ngIf",e.get("url").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("url").hasError("pattern"))}}function de(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"span",8),t.NdJ("click",function(){return t.CHM(e),t.oxw().toggleDetailMode()}),t._uU(5),t.qZA(),t.TgZ(6,"b",9),t._uU(7,"Tambah Berkas Baru"),t.qZA()()(),t.TgZ(8,"div",2)(9,"div",10)(10,"div",11)(11,"div",10),t.YNc(12,bt,13,6,"div",12),t.YNc(13,vt,5,1,"div",13),t.YNc(14,xt,5,0,"div",14),t.TgZ(15,"div",15)(16,"mat-slide-toggle",16),t._uU(17," R-18+ Konten Eksplisit "),t.qZA()(),t.YNc(18,Tt,3,0,"div",14),t.TgZ(19,"mat-form-field",17)(20,"mat-label"),t._uU(21,"Jenis Proyek"),t.qZA(),t.TgZ(22,"mat-select",18),t.YNc(23,Ct,2,2,"mat-option",19),t.qZA(),t.TgZ(24,"mat-error"),t.YNc(25,Zt,2,0,"div",20),t.YNc(26,At,2,0,"div",20),t.qZA()(),t.YNc(27,yt,14,7,"mat-form-field",21),t.YNc(28,Mt,14,7,"mat-form-field",21),t.TgZ(29,"div",15),t._UZ(30,"mat-divider"),t.qZA(),t.TgZ(31,"div",22),t.YNc(32,jt,17,10,"div",23),t.qZA(),t.TgZ(33,"div",24)(34,"div",10),t._UZ(35,"div",25),t.TgZ(36,"div",25)(37,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw().addFansub()}),t.TgZ(38,"mat-icon",27),t._uU(39,"add"),t.qZA(),t._uU(40," Tambah Fansub "),t.qZA()()()()()(),t.TgZ(41,"div",28)(42,"div",10)(43,"mat-form-field",29)(44,"mat-label"),t._uU(45,"Nama Berkas"),t.qZA(),t._UZ(46,"input",30),t.TgZ(47,"mat-icon",31),t._uU(48,"wysiwyg"),t.qZA(),t.TgZ(49,"mat-error"),t.YNc(50,Pt,2,0,"div",20),t.YNc(51,Vt,2,0,"div",20),t.qZA()(),t.YNc(52,Gt,1,1,"angular-editor",32),t.qZA(),t.TgZ(53,"div",10)(54,"div",15),t._UZ(55,"mat-divider"),t.qZA()(),t.YNc(56,zt,1,0,"div",33),t.YNc(57,te,26,9,"ng-template",null,34,t.W1O),t.YNc(59,ee,4,0,"ng-template",null,35,t.W1O),t.TgZ(61,"div",10)(62,"div",15),t._UZ(63,"mat-divider"),t.qZA()(),t.ynx(64,36),t.YNc(65,me,21,12,"ng-container",23),t.BQk(),t.TgZ(66,"div",37),t._UZ(67,"div",25)(68,"div",25)(69,"div",25),t.TgZ(70,"div",25)(71,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw().addDownloadLink()}),t.TgZ(72,"mat-icon",27),t._uU(73,"add"),t.qZA(),t._uU(74," Tambah URL Eksternal "),t.qZA()()()()(),t.TgZ(75,"div",10)(76,"div",38)(77,"div",39),t._UZ(78,"div",40),t.TgZ(79,"div",41)(80,"button",42),t.NdJ("click",function(){return t.CHM(e),t.oxw().exit()}),t.TgZ(81,"mat-icon",27),t._uU(82,"undo"),t.qZA(),t._uU(83," Batal "),t.qZA()(),t.TgZ(84,"div",41)(85,"button",43),t._uU(86," Simpan "),t.TgZ(87,"mat-icon",44),t._uU(88,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(58),a=t.MAs(60),o=t.oxw();t.Q6J("formGroup",o.fg),t.xp6(5),t.hij(" ",o.detailMode?"Sederhana":"Lengkap"," "),t.xp6(7),t.Q6J("ngIf",o.detailMode),t.xp6(1),t.Q6J("ngIf",o.image&&!o.fg.value.image&&o.detailMode),t.xp6(1),t.Q6J("ngIf",null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified),t.xp6(4),t.Q6J("ngIf",o.permanentStorage&&o.isAttachmentUploaded),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngForOf",o.projectList),t.xp6(2),t.Q6J("ngIf",o.fg.get("projectType_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("projectType_id").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.berkasType.toLowerCase().includes("anime")),t.xp6(1),t.Q6J("ngIf",o.berkasType.toLowerCase().includes("dorama")),t.xp6(4),t.Q6J("ngForOf",o.getFansubControl.controls),t.xp6(5),t.Q6J("disabled",o.submitted),t.xp6(6),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.detailMode),t.xp6(4),t.Q6J("ngIf",null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified)("ngIfThen",e)("ngIfElse",a),t.xp6(9),t.Q6J("ngForOf",o.getDownloadUrlControl.controls),t.xp6(6),t.Q6J("disabled",o.submitted),t.xp6(9),t.Q6J("disabled",o.submitted),t.xp6(5),t.Q6J("disabled",o.submitted||o.fg.invalid||"uploading"===(null==o.attachmentSelected?null:o.attachmentSelected.status))}}let _e=(()=>{class i{constructor(e,a,o,s,m,d,g,C,U,E,B,F,ui,mi,di){this.router=e,this.fb=a,this.bs=o,this.pi=s,this.anime=m,this.dorama=d,this.project=g,this.fansub=C,this.berkas=U,this.imgbb=E,this.toast=B,this.gs=F,this.as=ui,this.uploadService=mi,this.ds=di,this.detailMode=!1,this.submitted=!1,this.projectList=[],this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentSelected=null,this.attachmentErrorText=null,this.attachmentLimitExceeded=null,this.uploadToast=null,this.timerTimeout=null,this.gambar=null,this.ddl=null,this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasCreate=null,this.subsUpload=null,this.subsDialog=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get CONSTANTS(){return u.t}get AS(){return this.as}get GS(){return this.gs}get fileTypeAttachmentAllowed(){return u.t.fileTypeAttachmentAllowed.join(", ")}get permanentStorage(){var e,a;const o=null===(a=null===(e=this.AS.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.role;return o===b.yS.ADMIN||o===b.yS.MODERATOR}get isAttachmentUploaded(){return null!==this.fg.controls.attachment_id.value}ngOnInit(){this.pi.updatePageMetaData("Berkas - Buat Baru","Halaman Membuat Berkas Baru","Create Berkas"),this.gs.isBrowser&&(this.loadProjectList(),this.initForm(),this.uploads$=this.uploadService.connect(),this.subsUpload=this.uploadService.events.subscribe({next:e=>{this.gs.log("[UPLOAD_EVENTS]",e),("uploading"===e.status||"complete"===e.status)&&(this.attachmentSelected=e),"complete"===e.status?(this.gs.log("[UPLOAD_COMPLETED]",e.response),this.fg.controls.attachment_id.patchValue(e.response.result.id),this.uploadToast=this.toast.warning("Segera Kirim Data Berkas!","Lampiran Akan Dihapus ...",{closeButton:!1,timeOut:u.t.timeoutDeleteTempAttachmentTime,disableTimeOut:"extendedTimeOut",tapToDismiss:!1,progressAnimation:"decreasing"},!0),this.timerTimeout=setTimeout(()=>{this.gs.log("[UPLOAD_TIMEOUT]",u.t.timeoutDeleteTempAttachmentTime),this.failOrCancelUpload({info:"Expired, Silahkan Upload Ulang!"})},u.t.timeoutDeleteTempAttachmentTime)):"error"===e.status&&(this.gs.log("[UPLOAD_ERROR]",e.response,"error"),this.failOrCancelUpload(e.response))},error:e=>{this.gs.log("[UPLOAD_ERROR]",e,"error"),this.failOrCancelUpload(e)}}))}ngOnDestroy(){var e,a,o,s,m,d,g,C,U,E,B;this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.timerTimeout&&(clearTimeout(this.timerTimeout),this.timerTimeout=null),null===(e=this.subsProject)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe(),null===(o=this.subsAnimeDetail)||void 0===o||o.unsubscribe(),null===(s=this.subsDoramaDetail)||void 0===s||s.unsubscribe(),null===(m=this.subsProjectDetail)||void 0===m||m.unsubscribe();for(const F of this.subsFansubDetail)null==F||F.unsubscribe();null===(d=this.subsAnimeNew)||void 0===d||d.unsubscribe(),null===(g=this.subsDoramaNew)||void 0===g||g.unsubscribe(),null===(C=this.subsImgbb)||void 0===C||C.unsubscribe(),null===(U=this.subsBerkasCreate)||void 0===U||U.unsubscribe(),this.uploadService.disconnect(),null===(E=this.subsUpload)||void 0===E||E.unsubscribe(),null===(B=this.subsDialog)||void 0===B||B.unsubscribe()}canDeactivate(){var e=this;return(0,v.Z)(function*(){const a=yield e.ds.leavePageDialog();return yield D(a)})()}toggleDetailMode(){this.detailMode=!this.detailMode}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:e=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",e),this.projectList=e.results,this.bs.idle()},error:e=>{this.gs.log("[PROJECT_LOAD_ERROR]",e,"error"),this.bs.idle()}})}hasRequiredField(e,a){return e.get(a).hasValidator(n.kI.required)}initForm(){this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],projectType_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],anime_id:[null,n.kI.compose([])],anime_name:[null,n.kI.compose([])],dorama_id:[null,n.kI.compose([])],dorama_name:[null,n.kI.compose([])],fansub_list:this.fb.array([this.createFansub()]),image:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],attachment_id:[null,n.kI.compose([n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],download_url:this.fb.array([this.createDownloadLink()]),private:[!1,n.kI.compose([n.kI.required])],r18:[!1,n.kI.compose([n.kI.required])],permanent_storage:[!1,n.kI.compose([n.kI.required])]}),this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,q.b)(500),(0,J.x)(),(0,M.b)(()=>this.isLoading=!0),(0,R.w)(e=>this.anime.searchAnime(e).pipe((0,P.x)(()=>this.isLoading=!1))),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_SUCCESS]",e),this.filteredAnime=e.results},error:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_ERROR]",e,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,q.b)(500),(0,J.x)(),(0,M.b)(()=>this.isLoading=!0),(0,R.w)(e=>this.dorama.searchDorama(e).pipe((0,P.x)(()=>this.isLoading=!1))),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_SUCCESS]",e);for(const a of e.results)a.mdl_id=a.mdl_id.split("-")[1],a.image_url=a.thumb;this.filteredDorama=e.results},error:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_ERROR]",e,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,q.b)(500),(0,J.x)(),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_PROJECT_CHANGED]",e);const a=this.projectList.find(o=>o.id===e);this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),a.name.toLowerCase().includes("anime")?(this.berkasType=a.name,this.fg.controls.anime_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([n.kI.required])):a.name.toLowerCase().includes("dorama")?(this.berkasType=a.name,this.fg.controls.dorama_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([n.kI.required])):this.berkasType="",this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(){return this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],url:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexUrl)])]})}removeDownloadLink(e){this.getDownloadUrlControl.removeAt(e)}addDownloadLink(){this.getDownloadUrlControl.push(this.createDownloadLink())}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(){const e=this.fb.group({fansub_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^\d+$/)])],fansub_name:[null,n.kI.compose([n.kI.required])]});return this.subsFansubDetail.push(e.get("fansub_id").valueChanges.pipe((0,q.b)(500),(0,J.x)(),(0,M.b)(()=>this.isLoading=!0),(0,R.w)(a=>this.fansub.searchFansub(a).pipe((0,P.x)(()=>this.isLoading=!1))),(0,w.X)(-1)).subscribe({next:a=>{this.gs.log("[BERKAS_CREATE_SEARCH_FANSUB_RESULT]",a),this.filteredFansub=a.results}})),e}removeFansub(e){var a;this.getFansubControl.removeAt(e),null===(a=this.subsFansubDetail[e])||void 0===a||a.unsubscribe(),this.subsFansubDetail.splice(e,1)}addFansub(){this.getFansubControl.push(this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(e){this.getFansubControl.controls[e].get("fansub_name").patchValue(null)}filterAnimeSelected(e){var a;this.gs.log("[ANIME_FILTER_CLICK]",e),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:e.id,name:e.title,image_url:e.image_url,type:null===(a=e.media_type)||void 0===a?void 0:a.toUpperCase()}).subscribe({next:o=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",o),this.animeCheckOrAddResponse=o.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(o.result.id),this.fg.controls.anime_name.patchValue(o.result.name)},error:o=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",o,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(e){this.gs.log("[DORAMA_FILTER_CLICK]",e),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(e.mdl_id,10),slug:e.slug,name:e.title,image_url:e.image_url,type:e.type}).subscribe({next:a=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",a),this.doramaCheckOrAddResponse=a.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(a.result.id),this.fg.controls.dorama_name.patchValue(a.result.name)},error:a=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",a,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(e,a){this.gs.log("[FANSUB_FILTER_CLICK]",e),this.getFansubControl.controls[a].get("fansub_id").patchValue(e.id),this.getFansubControl.controls[a].get("fansub_name").patchValue(e.name)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=m=>{if(this.gs.log("[IMAGE_SELECTED]",m),o.size<=u.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=u.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){var e;if(this.bs.busy(),this.submitted=!0,this.fg.invalid||"uploading"===(null===(e=this.attachmentSelected)||void 0===e?void 0:e.status))return this.submitted=!1,void this.bs.idle();if(null===this.fg.value.attachment_id&&0===this.fg.value.download_url.lenth)return this.submitted=!1,this.uploadToast=this.toast.warning("Lampiran DDL / URL Eksternal!","Harap Mengisi Setidaknya Salah Satu ..."),void this.bs.idle();const a=[];for(const o of this.fg.value.fansub_list)a.push(o.fansub_id);this.subsBerkasCreate=this.berkas.createBerkas({image:this.fg.value.image,name:this.fg.value.name,description:this.fg.value.description,private:this.fg.value.private,r18:this.fg.value.r18,permanent_storage:this.fg.value.permanent_storage,projectType_id:this.fg.value.projectType_id,anime_id:this.fg.value.anime_id,dorama_id:this.fg.value.dorama_id,fansub_id:a,download_url:this.fg.value.download_url,attachment_id:this.fg.value.attachment_id}).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SUCCESS]",o),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/berkas")},error:o=>{this.gs.log("[BERKAS_CREATE_ERROR]",o,"error"),this.submitted=!1,this.bs.idle()}})}uploadAttachment(e,a){this.ddl=a;const o=e.target.files[0];this.attachmentLimitExceeded=null,this.attachmentErrorText=null,this.gs.log("[ATTACHMENT_SELECTED]",o),this.fg.controls.attachment_id.patchValue(null),this.uploadService.disconnect();try{o.size<=u.t.fileSizeAttachmentTotalLimit?this.uploadService.handleFiles(o):(this.attachmentLimitExceeded=u.t.fileSizeAttachmentTotalLimit,this.ddl.clear(e))}catch(s){this.ddl.clear(e)}}submitAttachment(e){const a=this.uploadService.state().find(o=>o.uploadId===e.uploadId);a&&(this.attachmentSelected=a,e.status="queue")}failOrCancelUpload(e=null){var a,o;this.attachmentSelected=null,this.attachmentErrorText=(null===(a=null==e?void 0:e.result)||void 0===a?void 0:a.message)||(null==e?void 0:e.info)||(null===(o=null==e?void 0:e.error)||void 0===o?void 0:o.message)||"Terjadi Kesalahan, Harap Reload Halaman!",this.uploadService.disconnect(),this.fg.controls.attachment_id.patchValue(null),this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.ddl.clear()}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}exit(){var e=this;return(0,v.Z)(function*(){e.subsDialog=(yield e.ds.leavePageDialog()).subscribe({next:a=>{e.gs.log("[INFO_DIALOG_CLOSED]",a),!0===a&&e.router.navigateByUrl("/berkas")}})})()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(T.F0),t.Y36(n.qu),t.Y36(Q.z),t.Y36(O.Z),t.Y36(ct.o),t.Y36(ut.X),t.Y36(mt.Y),t.Y36(tt.T),t.Y36(dt.A),t.Y36(V.X),t.Y36(et.k),t.Y36(I.U),t.Y36(G.e),t.Y36(_t.Lz),t.Y36(L.x))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-berkas-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-decoration-none","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["class","col-12",4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],[1,"col-12","p-3"],["formControlName","r18","matTooltip","Konten Eksplisit"],["appearance","outline",1,"px-3","pt-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama","required",""],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["appearance","outline","class","p-3 w-100",3,"color",4,"ngIf"],["formArrayName","fansub_list","matTooltip","Silahkan Buat Terlebih Dahulu Jika Tidak Ada"],[4,"ngFor","ngForOf"],[1,"col-12","mb-4"],[1,"col"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],[1,"me-1"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv","required",""],["matSuffix",""],["class","p-3 w-100","formControlName","description",3,"config",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["ddlVerified",""],["ddlNotVerified",""],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["type","button","mat-stroked-button","",1,"w-100",3,"disabled","click"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],[1,"ms-1"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],[1,"px-3","w-100"],["formControlName","private","matTooltip","Hanya Dapat Di Akses Melalui URL"],["formControlName","permanent_storage","matTooltip","Berkas terjamin tidak akan hilang / expired"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"height","40px","width","30px","object-fit","cover",3,"src"],[1,"text-warning"],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],[1,"row",3,"formGroupName"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub","required","",3,"matAutocomplete","keyup"],["matSuffix","",4,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click"],[1,"me-1",2,"height","40px","width","40px","object-fit","cover",3,"src"],["formControlName","description",1,"p-3","w-100",3,"config"],[1,"col-12","px-3"],[1,"text-success"],["appearance","outline",1,"px-3","pt-3","col",3,"color"],["uploadx","",1,"w-100",3,"disabled","accept","change"],["ddl",""],[1,"px-4","w-100"],["class","row mb-4",4,"ngFor","ngForOf"],[1,"px-3"],[3,"mode","value"],[1,"col-6","col-lg-4"],["type","button","mat-stroked-button","","color","accent",1,"w-100",3,"click"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["class","col-12 px-3",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Google Drive","required",""],["appearance","outline",1,"px-3","pt-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://webshit.saya.com/01/02/halaman-post-download.html","required",""]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,de,89,25,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[Y.t,c.O5,n._Y,n.JL,n.sg,f.KE,f.hX,A.Yh,H.Hw,f.R9,f.TO,K.lW,it.Rr,n.JJ,n.u,at.gM,ot.gD,n.Q7,c.sg,nt.ey,j.Nt,n.Fj,rt.ZL,rt.XC,gt.pW,pt.d,n.CE,n.x0,Z.s6],pipes:[z.$,c.Ov],styles:[""]}),i})();var $=l(6856),x=l(6688);function ge(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function pe(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function fe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",6)(1,"button",60),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitImage()}),t.TgZ(2,"mat-icon",57),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function he(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.coverLimitExceeded)," !")}}function be(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.coverErrorText)}}function ve(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",61)(1,"button",60),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitCover()}),t.TgZ(2,"mat-icon",57),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function xe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Tidak Boleh Kosong"),t.qZA())}function Te(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Ce(i,r){if(1&i&&(t.TgZ(0,"small",62)(1,"div"),t._uU(2),t.qZA()()),2&i){const e=t.oxw(3);t.xp6(2),t.Oqu(e.slugInfo)}}function Ze(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Tidak Boleh Kosong"),t.qZA())}function Ae(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Hanya Boleh Huruf Dan \u4e00"),t.qZA())}function ke(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Harus Diisi Secara Valid"),t.qZA())}function Ue(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Ie(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Mohon Pilih Salah Satu"),t.qZA())}function Ee(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Status Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Se(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",63),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(3).removeTag(s)}),t._uU(1),t.TgZ(2,"mat-icon",64),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Ne(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Website Tidak Boleh Kosong"),t.qZA())}function ye(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Website Link Tidak Valid"),t.qZA())}function qe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Facebook Link Tidak Valid"),t.qZA())}function Je(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function we(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Twitter Link Tidak Valid"),t.qZA())}function Be(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"RSS Link Tidak Valid"),t.qZA())}function Fe(i,r){if(1&i&&(t.TgZ(0,"div",13)(1,"mat-form-field",42)(2,"mat-label"),t._uU(3,"URI / URL RSS v2.0 Feed"),t.qZA(),t._UZ(4,"input",65),t.TgZ(5,"mat-icon",19),t._uU(6,"rss_feed"),t.qZA(),t.TgZ(7,"mat-error"),t.YNc(8,Be,2,0,"div",21),t.qZA()()()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",e.fg.get("rss_feed").hasError("pattern"))}}function De(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",8),t.NdJ("submit",function(){return t.CHM(e),t.oxw(2).onSubmit()}),t.TgZ(1,"div",9)(2,"div",10)(3,"h2",11)(4,"b",12),t._uU(5,"Tambah Data Fansub Baru"),t.qZA()()(),t.TgZ(6,"div",6)(7,"div",13)(8,"div",14)(9,"div",13)(10,"div",6),t._UZ(11,"img",15),t.TgZ(12,"mat-form-field",16)(13,"mat-label"),t._uU(14,"Foto"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",17,18),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(16);return t.oxw(2).uploadImage(o,s)}),t.qZA(),t.TgZ(17,"mat-icon",19),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",20)(20,"small"),t.YNc(21,ge,3,3,"div",21),t.YNc(22,pe,2,1,"div",21),t.qZA()()(),t.YNc(23,fe,5,1,"div",22),t.qZA()(),t.TgZ(24,"div",23)(25,"div",13)(26,"mat-form-field",24)(27,"mat-label"),t._uU(28,"Cover"),t.qZA(),t.TgZ(29,"ngx-mat-file-input",17,25),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(30);return t.oxw(2).uploadCover(o,s)}),t.qZA(),t.TgZ(31,"mat-icon",19),t._uU(32,"image"),t.qZA()(),t.TgZ(33,"mat-error",20)(34,"small"),t.YNc(35,he,3,3,"div",21),t.YNc(36,be,2,1,"div",21),t.qZA()(),t.YNc(37,ve,5,1,"div",26),t.TgZ(38,"mat-form-field",27)(39,"mat-label"),t._uU(40,"Nama Fansub"),t.qZA(),t._UZ(41,"input",28),t.TgZ(42,"mat-icon",19),t._uU(43,"wysiwyg"),t.qZA(),t.TgZ(44,"mat-error"),t.YNc(45,xe,2,0,"div",21),t.YNc(46,Te,2,0,"div",21),t.qZA()(),t.TgZ(47,"mat-form-field",29)(48,"mat-label"),t._uU(49,"Singkatan"),t.qZA(),t._UZ(50,"input",30),t.TgZ(51,"mat-icon",19),t._uU(52,"short_text"),t.qZA(),t.YNc(53,Ce,3,1,"small",31),t.TgZ(54,"mat-error"),t.YNc(55,Ze,2,0,"div",21),t.YNc(56,Ae,2,0,"div",21),t.qZA()(),t._UZ(57,"angular-editor",32),t.TgZ(58,"mat-form-field",33)(59,"mat-label"),t._uU(60,"Mulai Ada Sejak"),t.qZA(),t.TgZ(61,"input",34),t.NdJ("focus",function(){return t.CHM(e),t.MAs(65).open()}),t.ALo(62,"date"),t.qZA(),t._UZ(63,"mat-datepicker-toggle",35)(64,"mat-datepicker",36,37),t.TgZ(66,"mat-error"),t.YNc(67,ke,2,0,"div",21),t.YNc(68,Ue,2,0,"div",21),t.qZA()(),t.TgZ(69,"mat-form-field",33)(70,"mat-label"),t._uU(71,"Status"),t.qZA(),t.TgZ(72,"mat-select",38)(73,"mat-option",39),t._uU(74,"Tidak Aktif"),t.qZA(),t.TgZ(75,"mat-option",40),t._uU(76,"Aktif"),t.qZA()(),t.TgZ(77,"mat-hint",41),t._uU(78,"Status Kehidupan Fansub Saat Ini"),t.qZA(),t.TgZ(79,"mat-error"),t.YNc(80,Ie,2,0,"div",21),t.YNc(81,Ee,2,0,"div",21),t.qZA()()()()(),t.TgZ(82,"div",13)(83,"div",6)(84,"div",13)(85,"mat-form-field",42)(86,"mat-label"),t._uU(87,"Tags & Kategori"),t.qZA(),t.TgZ(88,"mat-chip-list",null,43),t.YNc(90,Se,4,2,"mat-chip",44),t.TgZ(91,"input",45),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw(2).addTag(o)}),t.qZA(),t.TgZ(92,"mat-icon",19),t._uU(93,"loyalty"),t.qZA()(),t.TgZ(94,"mat-hint",41),t._uU(95,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()()()()(),t.TgZ(96,"div",13)(97,"div",6)(98,"div",13)(99,"mat-form-field",46)(100,"mat-label"),t._uU(101,"Tautan Website"),t.qZA(),t._UZ(102,"input",47),t.TgZ(103,"mat-icon",19),t._uU(104,"web"),t.qZA(),t.TgZ(105,"mat-error"),t.YNc(106,Ne,2,0,"div",21),t.YNc(107,ye,2,0,"div",21),t.qZA()(),t.TgZ(108,"mat-form-field",46)(109,"mat-label"),t._uU(110,"Facebook Fanpage"),t.qZA(),t._UZ(111,"input",48),t.TgZ(112,"mat-icon",19),t._uU(113,"facebook"),t.qZA(),t.TgZ(114,"mat-error"),t.YNc(115,qe,2,0,"div",21),t.qZA()(),t.TgZ(116,"mat-form-field",46)(117,"mat-label"),t._uU(118,"Tautan Discord"),t.qZA(),t._UZ(119,"input",49),t.TgZ(120,"mat-icon",19),t._UZ(121,"img",50),t.qZA(),t.TgZ(122,"mat-error"),t.YNc(123,Je,2,0,"div",21),t.qZA()(),t.TgZ(124,"mat-form-field",46)(125,"mat-label"),t._uU(126,"Cuitan Twitter"),t.qZA(),t._UZ(127,"input",51),t.TgZ(128,"mat-icon",19),t._UZ(129,"img",50),t.qZA(),t.TgZ(130,"mat-error"),t.YNc(131,we,2,0,"div",21),t.qZA()()()()(),t.YNc(132,Fe,9,2,"div",52),t.TgZ(133,"div",13)(134,"div",6)(135,"div",53),t._UZ(136,"div",54),t.TgZ(137,"div",55)(138,"button",56),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).exit()}),t.TgZ(139,"mat-icon",57),t._uU(140,"undo"),t.qZA(),t._uU(141," Batal "),t.qZA()(),t.TgZ(142,"div",55)(143,"button",58),t._uU(144," Simpan "),t.TgZ(145,"mat-icon",59),t._uU(146,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(65),a=t.MAs(89),o=t.oxw(2);t.Q6J("formGroup",o.fg),t.xp6(11),t.Q6J("src",o.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",o.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",o.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",o.imageErrorText),t.xp6(1),t.Q6J("ngIf",o.image&&!o.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",o.fg.value.cover)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",o.coverLimitExceeded),t.xp6(1),t.Q6J("ngIf",o.coverErrorText),t.xp6(1),t.Q6J("ngIf",o.cover&&!o.fg.value.cover),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",o.slugInfo),t.xp6(2),t.Q6J("ngIf",o.fg.get("slug").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("slug").hasError("pattern")),t.xp6(1),t.Q6J("config",o.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.s9C("placeholder",t.xi3(62,50,o.currentDate,"d MMMM y")),t.Q6J("matDatepicker",e),t.xp6(2),t.Q6J("for",e),t.xp6(4),t.Q6J("ngIf",o.fg.get("born").hasError("required")||o.fg.get("born").hasError("matDatepickerParse")),t.xp6(1),t.Q6J("ngIf",o.fg.get("born").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(11),t.Q6J("ngIf",o.fg.get("active").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("active").hasError("pattern")),t.xp6(4),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",o.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",o.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(8),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("web").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("web").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("facebook").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/discord/",o.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",o.fg.get("discord").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/twitter/",o.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",o.fg.get("twitter").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.rssFeedAllowed),t.xp6(6),t.Q6J("disabled",o.submitted),t.xp6(5),t.Q6J("disabled",o.submitted||o.fg.invalid)}}function Me(i,r){if(1&i&&(t.TgZ(0,"div",1),t._UZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"app-notifications"),t.TgZ(5,"div",5)(6,"div",6),t.YNc(7,De,147,53,"form",7),t.qZA()()()),2&i){const e=t.oxw();t.xp6(1),t.Udp("background-image","url("+e.cover_url+")"),t.xp6(6),t.Q6J("ngIf",e.fg)}}let Re=(()=>{class i{constructor(e,a,o,s,m,d,g,C,U,E){this.fb=e,this.router=a,this.as=o,this.bs=s,this.pi=m,this.imgbb=d,this.fansub=g,this.toast=C,this.gs=U,this.ds=E,this.submitted=!1,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.image_url="/assets/img/form/no-image.png",this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.cover_url="/assets/img/form/no-image.png",this.urls=[],this.currentDate=new Date,this.gambar=null,this.gambar_=null,this.subsImgbb=null,this.subsFansub=null,this.subsCekFansubSlug=null,this.subsDialog=null,this.slugInfo="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}get rssFeedAllowed(){var e,a,o,s,m,d;return(null===(a=null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.role)===b.yS.ADMIN||(null===(s=null===(o=this.as.currentUserSubject)||void 0===o?void 0:o.value)||void 0===s?void 0:s.role)===b.yS.MODERATOR||(null===(d=null===(m=this.as.currentUserSubject)||void 0===m?void 0:m.value)||void 0===d?void 0:d.role)===b.yS.FANSUBBER}ngOnDestroy(){var e,a,o;null===(e=this.subsImgbb)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe(),null===(o=this.subsDialog)||void 0===o||o.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("Fansub - Buat Baru","Halaman Menambahkan Fansub Baru","Create Fansub"),this.gs.isBrowser&&this.initForm()}canDeactivate(){var e=this;return(0,v.Z)(function*(){const a=yield e.ds.leavePageDialog();return yield D(a)})()}initForm(){this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],born:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],active:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],slug:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^[0-9a-zA-Z-]*$/)])],tags:[[],n.kI.compose([])],image:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],cover:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],web:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],facebook:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],discord:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],twitter:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],rss_feed:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])]}),this.subsCekFansubSlug=this.fg.get("slug").valueChanges.pipe((0,q.b)(500),(0,J.x)(),(0,M.b)(()=>this.slugInfo="Mengecek ..."),(0,R.w)(e=>this.fansub.cekSlug({slug:e})),(0,w.X)(-1)).subscribe({next:e=>{this.gs.log("[FANSUB_CEK_SLUG_RESULT]",e),this.slugInfo=e.result.message}})}addTag(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.tags.push(o.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,m,d)=>d.findIndex(g=>g===s)===m))}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=m=>{if(this.gs.log("[IMAGE_SELECTED]",m),o.size<=u.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=u.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}uploadCover(e,a){this.gambar_=a,this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.fg.controls.cover.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=m=>{if(this.gs.log("[COVER_SELECTED]",m),o.size<=u.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.cover=o,this.cover_url=s.result.toString()},d.src=s.result.toString()}else this.cover=null,this.cover_url="/assets/img/form/image-error.png",this.coverLimitExceeded=u.t.fileSizeImageLimit,this.gambar_.clear(e)}}catch(s){this.cover=null,this.cover_url="/assets/img/form/no-image.png",this.gambar_.clear(e)}}submitCover(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.cover}).subscribe({next:e=>{this.gs.log("[COVER_SUCCESS]",e),this.fg.controls.cover.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[COVER_ERROR]",e,"error"),this.fg.controls.cover.patchValue(null),this.submitted=!1,this.coverErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){this.bs.busy();const e=[];if(this.fg.value.web&&e.push({name:"web",url:this.fg.value.web}),this.fg.value.facebook&&e.push({name:"facebook",url:this.fg.value.facebook}),this.fg.value.discord&&e.push({name:"discord",url:this.fg.value.discord}),this.fg.value.twitter&&e.push({name:"twitter",url:this.fg.value.twitter}),this.submitted=!0,this.fg.invalid||0===e.length)return 0===e.length&&this.toast.warning("Harap Isi Salah Satu URL","Form Tidak lengkap (Web/FB/DC)",null,!0),this.submitted=!1,void this.bs.idle();this.subsFansub=this.fansub.createFansub({image:this.fg.value.image,cover:this.fg.value.cover,name:this.fg.value.name,description:this.fg.value.description,born:this.fg.value.born.getTime(),active:this.fg.value.active,tags:this.fg.value.tags,slug:this.fg.value.slug,urls:e,rss_feed:this.fg.value.rss_feed}).subscribe({next:a=>{this.gs.log("[FANSUB_CREATE_SUCCESS]",a),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/fansub")},error:a=>{this.gs.log("[FANSUB_CREATE_ERROR]",a,"error"),this.submitted=!1,this.bs.idle()}})}exit(){var e=this;return(0,v.Z)(function*(){e.subsDialog=(yield e.ds.leavePageDialog()).subscribe({next:a=>{e.gs.log("[INFO_DIALOG_CLOSED]",a),!0===a&&e.router.navigateByUrl("/fansub")}})})()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(T.F0),t.Y36(G.e),t.Y36(Q.z),t.Y36(O.Z),t.Y36(V.X),t.Y36(tt.T),t.Y36(et.k),t.Y36(I.U),t.Y36(L.x))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-fansub-create"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],[2,"padding-top","160px"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["gambar_",""],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","name","placeholder","Fansub Jalanan","required",""],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","slug","placeholder","Jalsub","required",""],["class","text-info",4,"ngIf"],["formControlName","description","required","",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","col-12","col-md-6",3,"color"],["matInput","","formControlName","born","required","",3,"matDatepicker","placeholder","focus"],["matSuffix","",3,"for"],["disabled","false"],["kalender",""],["formControlName","active","placeholder","Aktif / Non-Aktif","required",""],["value","0"],["value","1"],["align","end"],["appearance","outline",1,"p-3","col-12",3,"color"],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["appearance","outline",1,"p-3","col-12","col-md-3",3,"color"],["matInput","","formControlName","web","placeholder","http://www.domain.id"],["matInput","","formControlName","facebook","placeholder","http://www.facebook.com"],["matInput","","formControlName","discord","placeholder","http://www.discord.gg"],["width","24px",2,"vertical-align","baseline",3,"src"],["matInput","","formControlName","twitter","placeholder","http://www.twitter.com"],["class","row",4,"ngIf"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["type","button","mat-stroked-button","",1,"w-100",3,"disabled","click"],[1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],[1,"ms-1"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],[1,"col-12","p-3"],[1,"text-info"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""],["matInput","","formControlName","rss_feed","placeholder","http://my-site.blogspot.com/feeds/posts/default?alt=rss"]],template:function(e,a){1&e&&t.YNc(0,Me,8,3,"div",0),2&e&&t.Q6J("ngIf",a.fg)},directives:[c.O5,Y.t,n._Y,n.JL,n.sg,f.KE,f.hX,A.Yh,H.Hw,f.R9,f.TO,K.lW,j.Nt,n.Fj,n.JJ,n.u,n.Q7,Z.s6,$.hl,$.nW,$.Mq,ot.gD,nt.ey,f.bx,x.qn,c.sg,x.HS,x.qH,x.oH],pipes:[z.$,c.uU],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),i})();var st=l(5934),Qe=l(7358);function Oe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",33),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeTo(s)}),t._uU(1),t.TgZ(2,"mat-icon",34),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Le(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Boleh Kosong"),t.qZA())}function Ye(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function He(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",33),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeCc(s)}),t._uU(1),t.TgZ(2,"mat-icon",34),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Ke(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function je(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",33),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeBcc(s)}),t._uU(1),t.TgZ(2,"mat-icon",34),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Pe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Ve(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",35)(1,"mat-slide-toggle",36),t.NdJ("change",function(o){return t.CHM(e),t.oxw(2).noReplyMode(o)}),t._uU(2),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.MGl("matTooltip","Kirim sebagai noreply@",e.ENV.domain,""),t.xp6(1),t.hij(" Kirim sebagai noreply@",e.ENV.domain," ")}}function Ge(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Tidak Boleh Kosong"),t.qZA())}function ze(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function $e(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Buat Email Baru & Kirim"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"mat-form-field",11)(11,"mat-label"),t._uU(12,"Penerima"),t.qZA(),t.TgZ(13,"mat-chip-list",null,12),t.YNc(15,Oe,4,2,"mat-chip",13),t.qZA(),t.TgZ(16,"input",14),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addTo(o)}),t.qZA(),t.TgZ(17,"mat-icon",15),t._uU(18,"short_text"),t.qZA(),t.TgZ(19,"mat-hint",16)(20,"mat-error"),t.YNc(21,Le,2,0,"div",17),t.YNc(22,Ye,2,0,"div",17),t.qZA()()(),t.TgZ(23,"mat-form-field",11)(24,"mat-label"),t._uU(25,"Carbon Copy"),t.qZA(),t.TgZ(26,"mat-chip-list",null,18),t.YNc(28,He,4,2,"mat-chip",13),t.qZA(),t.TgZ(29,"input",19),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addCc(o)}),t.qZA(),t.TgZ(30,"mat-icon",15),t._uU(31,"short_text"),t.qZA(),t.TgZ(32,"mat-hint",16)(33,"mat-error"),t.YNc(34,Ke,2,0,"div",17),t.qZA()()(),t.TgZ(35,"mat-form-field",11)(36,"mat-label"),t._uU(37,"Blind Carbon Copy"),t.qZA(),t.TgZ(38,"mat-chip-list",null,20),t.YNc(40,je,4,2,"mat-chip",13),t.qZA(),t.TgZ(41,"input",19),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addBcc(o)}),t.qZA(),t.TgZ(42,"mat-icon",15),t._uU(43,"short_text"),t.qZA(),t.TgZ(44,"mat-hint",16)(45,"mat-error"),t.YNc(46,Pe,2,0,"div",17),t.qZA()()(),t.YNc(47,Ve,3,2,"div",21),t.qZA()(),t.TgZ(48,"div",22)(49,"div",9)(50,"mat-form-field",23)(51,"mat-label"),t._uU(52,"Judul"),t.qZA(),t._UZ(53,"input",24),t.TgZ(54,"mat-icon",15),t._uU(55,"wysiwyg"),t.qZA(),t.TgZ(56,"mat-error"),t.YNc(57,Ge,2,0,"div",17),t.YNc(58,ze,2,0,"div",17),t.qZA()(),t._UZ(59,"angular-editor",25),t.qZA()()(),t.TgZ(60,"div",9)(61,"div",2)(62,"div",26),t._UZ(63,"div",27),t.TgZ(64,"div",28)(65,"button",29),t.NdJ("click",function(){return t.CHM(e),t.oxw().exit()}),t.TgZ(66,"mat-icon",30),t._uU(67,"undo"),t.qZA(),t._uU(68," Batal "),t.qZA()(),t.TgZ(69,"div",28)(70,"button",31),t._uU(71," Simpan "),t.TgZ(72,"mat-icon",32),t._uU(73,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(14),a=t.MAs(27),o=t.MAs(39),s=t.oxw();t.Q6J("formGroup",s.fg),t.xp6(10),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.to),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("to").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("to").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.cc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("cc").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.bcc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",o)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("bcc").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",s.canSendAsNoReply),t.xp6(3),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",s.fg.get("subject").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("subject").hasError("pattern")),t.xp6(1),t.Q6J("config",s.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",s.submitted),t.xp6(5),t.Q6J("disabled",s.submitted||s.fg.invalid)}}let We=(()=>{class i{constructor(e,a,o,s,m,d,g,C,U){this.activatedRoute=e,this.fb=a,this.router=o,this.bs=s,this.pi=m,this.gs=d,this.as=g,this.ms=C,this.ds=U,this.submitted=!1,this.subsMail=null,this.subsDialog=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return st.N}get GS(){return this.gs}get canSendAsNoReply(){var e,a;const o=null===(a=null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.role;return o===b.yS.ADMIN||o===b.yS.MODERATOR}ngOnInit(){this.pi.updatePageMetaData("Mailbox - Buat Baru","Halaman Membuat Surel Baru","Create Email"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){var e,a;null===(e=this.subsMail)||void 0===e||e.unsubscribe(),null===(a=this.subsDialog)||void 0===a||a.unsubscribe()}canDeactivate(){var e=this;return(0,v.Z)(function*(){const a=yield e.ds.leavePageDialog();return yield D(a)})()}initForm(){var e,a,o;const s=(null===(e=this.activatedRoute.snapshot.queryParamMap.get("to"))||void 0===e?void 0:e.split(",").map(g=>g.trim()))||[],m=(null===(a=this.activatedRoute.snapshot.queryParamMap.get("cc"))||void 0===a?void 0:a.split(",").map(g=>g.trim()))||[],d=(null===(o=this.activatedRoute.snapshot.queryParamMap.get("bcc"))||void 0===o?void 0:o.split(",").map(g=>g.trim()))||[];this.fg=this.fb.group({to:[s,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEmailMulti)])],cc:[m,n.kI.compose([n.kI.pattern(u.t.regexEmailMulti)])],bcc:[d,n.kI.compose([n.kI.pattern(u.t.regexEmailMulti)])],subject:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],message:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],no_reply:[!1,n.kI.compose([n.kI.required])]})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsMail=this.ms.sendMail(this.fg.value).subscribe({next:e=>{this.gs.log("[MAIL_SEND_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/mailbox")},error:e=>{this.gs.log("[MAIL_SEND_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTo(e){const a=e.chipInput.inputElement,o=e.value;(o||"").trim()&&this.fg.value.to.push(o.trim()),a&&(a.value=""),this.fg.controls.to.patchValue(this.fg.value.to.filter((s,m,d)=>d.findIndex(g=>g===s)===m))}removeTo(e){const a=this.fg.value.to.indexOf(e);a>=0&&this.fg.value.to.splice(a,1)}addCc(e){const a=e.chipInput.inputElement,o=e.value;(o||"").trim()&&this.fg.value.cc.push(o.trim()),a&&(a.value=""),this.fg.controls.cc.patchValue(this.fg.value.cc.filter((s,m,d)=>d.findIndex(g=>g===s)===m))}removeCc(e){const a=this.fg.value.cc.indexOf(e);a>=0&&this.fg.value.cc.splice(a,1)}addBcc(e){const a=e.chipInput.inputElement,o=e.value;(o||"").trim()&&this.fg.value.bcc.push(o.trim()),a&&(a.value=""),this.fg.controls.bcc.patchValue(this.fg.value.bcc.filter((s,m,d)=>d.findIndex(g=>g===s)===m))}removeBcc(e){const a=this.fg.value.bcc.indexOf(e);a>=0&&this.fg.value.bcc.splice(a,1)}noReplyMode(e){e.checked?(this.fg.controls.subject.patchValue(`${st.N.siteName} | Informasi`),this.fg.controls.subject.disable()):this.fg.controls.subject.enable()}exit(){var e=this;return(0,v.Z)(function*(){e.subsDialog=(yield e.ds.leavePageDialog()).subscribe({next:a=>{e.gs.log("[INFO_DIALOG_CLOSED]",a),!0===a&&e.router.navigateByUrl("/mailbox")}})})()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(T.gz),t.Y36(n.qu),t.Y36(T.F0),t.Y36(Q.z),t.Y36(O.Z),t.Y36(I.U),t.Y36(G.e),t.Y36(Qe.Y),t.Y36(L.x))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-mailbox-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["hintLabel","Gunakan , Jika Lebih Dari 1","appearance","outline",1,"p-3","col-12",3,"color"],["to",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","user@domain.tld","required","",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["matSuffix",""],["align","end"],[4,"ngIf"],["cc",""],["placeholder","user@domain.tld",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["bcc",""],["class","col-12 p-3",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","subject","placeholder","Judul Pesan Blablabla ...","required",""],["formControlName","message","required","",1,"p-3","w-100",3,"config"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["type","button","mat-stroked-button","",1,"w-100",3,"disabled","click"],[1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],[1,"ms-1"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""],[1,"col-12","p-3"],["formControlName","no_reply",3,"matTooltip","change"]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,$e,74,27,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[Y.t,c.O5,n._Y,n.JL,n.sg,f.KE,f.hX,x.qn,c.sg,x.HS,H.Hw,x.qH,x.oH,f.R9,f.bx,f.TO,it.Rr,n.JJ,n.u,at.gM,j.Nt,n.Fj,n.Q7,Z.s6,K.lW],styles:[""]}),i})();var Xe=l(9618);function ti(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function ei(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageErrorText)}}function ii(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",2)(1,"button",34),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).submitImage()}),t.TgZ(2,"mat-icon",31),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function ai(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Tidak Boleh Kosong"),t.qZA())}function oi(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ni(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",35),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeTag(s)}),t._uU(1),t.TgZ(2,"mat-icon",36),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function ri(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Tambah Data Berita & Informasi Baru"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),t._UZ(11,"img",11),t.TgZ(12,"mat-form-field",12)(13,"mat-label"),t._uU(14,"Gambar"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",13,14),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(16);return t.oxw().uploadImage(o,s)}),t.qZA(),t.TgZ(17,"mat-icon",15),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",16)(20,"small"),t.YNc(21,ti,3,3,"div",17),t.YNc(22,ei,2,1,"div",17),t.qZA()()(),t.YNc(23,ii,5,1,"div",18),t.qZA()(),t.TgZ(24,"div",19)(25,"div",9)(26,"mat-form-field",20)(27,"mat-label"),t._uU(28,"Judul"),t.qZA(),t._UZ(29,"input",21),t.TgZ(30,"mat-icon",15),t._uU(31,"wysiwyg"),t.qZA(),t.TgZ(32,"mat-error"),t.YNc(33,ai,2,0,"div",17),t.YNc(34,oi,2,0,"div",17),t.qZA()(),t.TgZ(35,"mat-form-field",20)(36,"mat-label"),t._uU(37,"Tags & Kategori"),t.qZA(),t.TgZ(38,"mat-chip-list",null,22),t.YNc(40,ni,4,2,"mat-chip",23),t.TgZ(41,"input",24),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addTag(o)}),t.qZA(),t.TgZ(42,"mat-icon",15),t._uU(43,"loyalty"),t.qZA()(),t.TgZ(44,"mat-hint",25),t._uU(45,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()(),t._UZ(46,"angular-editor",26),t.qZA()()(),t.TgZ(47,"div",9)(48,"div",2)(49,"div",27),t._UZ(50,"div",28),t.TgZ(51,"div",29)(52,"button",30),t.NdJ("click",function(){return t.CHM(e),t.oxw().exit()}),t.TgZ(53,"mat-icon",31),t._uU(54,"undo"),t.qZA(),t._uU(55," Batal "),t.qZA()(),t.TgZ(56,"div",29)(57,"button",32),t._uU(58," Simpan "),t.TgZ(59,"mat-icon",33),t._uU(60,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(39),a=t.oxw();t.Q6J("formGroup",a.fg),t.xp6(11),t.Q6J("src",a.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",a.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",a.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",a.imageErrorText),t.xp6(1),t.Q6J("ngIf",a.image&&!a.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",a.fg.get("title").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("title").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",a.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",a.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("config",a.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",a.submitted),t.xp6(5),t.Q6J("disabled",a.submitted||a.fg.invalid)}}const li=[{path:"",pathMatch:"full",redirectTo:"/home"},{path:"berkas",component:_e,canDeactivate:[p],data:{title:"Berkas - Buat Baru",description:"Halaman Unggah Berkas Baru",keywords:"Tambah Berkas Baru"}},{path:"fansub",component:Re,canActivate:[y.H],canDeactivate:[p],data:{title:"Fansub - Buat Baru",description:"Halaman Menambahkan Fansub Baru",keywords:"Create Fansub",[u.t.decoratorVerifiedOnly]:!0}},{path:"mailbox",component:We,canActivate:[y.H],canDeactivate:[p],data:{title:"Surel - Buat Baru",description:"Halaman Kirim Surel Baru",keywords:"Buat Surel Baru",[u.t.decoratorVerifiedOnly]:!0}},{path:"news",component:(()=>{class i{constructor(e,a,o,s,m,d,g,C){this.fb=e,this.router=a,this.bs=o,this.pi=s,this.imgbb=m,this.news=d,this.gs=g,this.ds=C,this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.gambar=null,this.subsNews=null,this.subsImgbb=null,this.subsDialog=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Informasi - Buat Baru","Halaman Menambahkan Berita Baru","Create News"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){var e,a,o;null===(e=this.subsImgbb)||void 0===e||e.unsubscribe(),null===(a=this.subsNews)||void 0===a||a.unsubscribe(),null===(o=this.subsDialog)||void 0===o||o.unsubscribe()}canDeactivate(){var e=this;return(0,v.Z)(function*(){const a=yield e.ds.leavePageDialog();return yield D(a)})()}initForm(){this.fg=this.fb.group({title:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],content:[null,n.kI.compose([n.kI.required,n.kI.pattern(u.t.regexEnglishKeyboardKeys)])],image:[null,n.kI.compose([n.kI.pattern(u.t.regexUrl)])],tags:[[],n.kI.compose([])]})}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=m=>{if(this.gs.log("[IMAGE_SELECTED]",m),o.size<=u.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=u.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsNews=this.news.createNews({image:this.fg.value.image,title:this.fg.value.title,content:this.fg.value.content,tags:this.fg.value.tags}).subscribe({next:e=>{this.gs.log("[NEWS_CREATE_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/news")},error:e=>{this.gs.log("[NEWS_CREATE_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTag(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.tags.push(o.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,m,d)=>d.findIndex(g=>g===s)===m))}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}exit(){var e=this;return(0,v.Z)(function*(){e.subsDialog=(yield e.ds.leavePageDialog()).subscribe({next:a=>{e.gs.log("[INFO_DIALOG_CLOSED]",a),!0===a&&e.router.navigateByUrl("/news")}})})()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(T.F0),t.Y36(Q.z),t.Y36(O.Z),t.Y36(V.X),t.Y36(Xe.Y),t.Y36(I.U),t.Y36(L.x))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-news-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","title","placeholder","Berita Terkini Blablabla ...","required",""],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["align","end"],["formControlName","content","required","",1,"p-3","w-100",3,"config"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["type","button","mat-stroked-button","",1,"w-100",3,"disabled","click"],[1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],[1,"ms-1"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ri,61,19,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[Y.t,c.O5,n._Y,n.JL,n.sg,f.KE,f.hX,A.Yh,H.Hw,f.R9,f.TO,K.lW,j.Nt,n.Fj,n.JJ,n.u,n.Q7,x.qn,c.sg,x.HS,x.qH,x.oH,f.bx,Z.s6],pipes:[z.$],styles:[""]}),i})(),canActivate:[y.H,N.t],canDeactivate:[p],data:{title:"Berita - Buat Baru",description:"Halaman Unggah Berita Baru",keywords:"Tambah Berita Baru",[u.t.decoratorVerifiedOnly]:!0,[u.t.decoratorRoles]:[b.yS.ADMIN,b.yS.MODERATOR]}}];let ci=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[c.ez,T.Bz.forChild(li),k.m,n.u5,n.UX,A.Ad,h.F,Z.UM,_.T]]}),i})()},8616:(W,S,l)=>{l.d(S,{t:()=>I});var c=l(5e3),T=l(8406),n=l(8696),Z=l(7140),A=l(9808),u=l(1861);function b(p,k){if(1&p&&c._UZ(0,"div",4),2&p){const _=c.oxw();c.Udp("background-size",_.GS.sizeContain?"contain":"cover")("background-image","url("+_.GS.bannerImg+")")("background-repeat",_.GS.bgRepeat?"repeat-x":"no-repeat")("height","/news"===_.ROUTER.url||_.ROUTER.url.includes("/news?")||"/berkas"===_.ROUTER.url||_.ROUTER.url.includes("/berkas?")||"/fansub"===_.ROUTER.url||_.ROUTER.url.includes("/fansub?")?"192px":"128px")("background-position-y","/berkas"===_.ROUTER.url||_.ROUTER.url.includes("/berkas?")?"22.5%":"")}}function N(p,k){if(1&p&&(c.TgZ(0,"strong",10),c._uU(1," -- "),c.TgZ(2,"i")(3,"a",11),c._uU(4),c.qZA()()()),2&p){const _=c.oxw().$implicit;c.xp6(3),c.MGl("routerLink","/user/",_.notifCreator,""),c.xp6(1),c.hij(" ",_.notifCreator," ")}}function y(p,k){if(1&p){const _=c.EpF();c.TgZ(0,"button",12),c.NdJ("click",function(){c.CHM(_);const v=c.oxw().$implicit;return c.oxw().removeNotif(v.notifData.id)}),c.qZA()}}function t(p,k){if(1&p&&(c.TgZ(0,"div",5)(1,"div")(2,"strong",6),c._uU(3),c.qZA(),c._UZ(4,"span",7),c.ALo(5,"safeInnerHtml"),c.YNc(6,N,5,2,"strong",8),c.YNc(7,y,1,0,"button",9),c.qZA()()),2&p){const _=k.$implicit;c.xp6(1),c.Gre("alert alert-",_.notifData.type," alert-dismissible fade show"),c.xp6(2),c.Oqu(_.notifData.title),c.xp6(1),c.Q6J("innerHTML",c.lcZ(5,7,_.notifData.content),c.oJD),c.xp6(2),c.Q6J("ngIf",_.notifCreator),c.xp6(1),c.Q6J("ngIf",_.notifData.dismissible)}}let I=(()=>{class p{constructor(_,h,v){this.router=_,this.gs=h,this.notif=v}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(_){this.notif.removeNotif(_)}}return p.\u0275fac=function(_){return new(_||p)(c.Y36(T.F0),c.Y36(n.U),c.Y36(Z.T))},p.\u0275cmp=c.Xpm({type:p,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(_,h){1&_&&(c.YNc(0,b,1,10,"div",0),c.TgZ(1,"div",1)(2,"div",2),c.YNc(3,t,8,9,"div",3),c.qZA()()),2&_&&(c.Q6J("ngIf",h.GS.bannerImg&&("/news"===h.ROUTER.url||h.ROUTER.url.includes("/news?")||"/berkas"===h.ROUTER.url||h.ROUTER.url.includes("/berkas?")||"/fansub"===h.ROUTER.url||h.ROUTER.url.includes("/fansub?")||"/anime"===h.ROUTER.url||h.ROUTER.url.includes("/anime?")||"/dorama"===h.ROUTER.url||h.ROUTER.url.includes("/dorama?"))),c.xp6(3),c.Q6J("ngForOf",h.NOTIF.notifications))},directives:[A.O5,A.sg,T.yS],pipes:[u.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%}"]}),p})()},8613:(W,S,l)=>{l.d(S,{F:()=>A});var c=l(9808),T=l(8406),n=l(7355),Z=l(5e3);let A=(()=>{class u{}return u.\u0275fac=function(N){return new(N||u)},u.\u0275mod=Z.oAB({type:u}),u.\u0275inj=Z.cJS({imports:[[c.ez,T.Bz,n.T]]}),u})()}}]);
\ No newline at end of file
diff --git a/dist/fansubid/browser/939.4588786b6c93c085.js b/dist/fansubid/browser/939.4588786b6c93c085.js
new file mode 100644
index 000000000..31367f819
--- /dev/null
+++ b/dist/fansubid/browser/939.4588786b6c93c085.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[939],{9939:($,N,l)=>{l.r(N),l.d(N,{CreateModule:()=>li});var c=l(9808),b=l(8406),n=l(3075),C=l(9345),Z=l(1385),m=l(6271),v=l(4249),q=l(2777),y=l(5094),t=l(5e3),E=l(8696);let p=(()=>{class i{constructor(e){this.gs=e}canDeactivate(e,a,o){return!e.canDeactivate||e.canDeactivate()}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(E.U))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var A=l(210),_=l(7355),h=l(8613),U=l(5861),W=l(6805),st=l(930);function M(i,r){const e="object"==typeof r;return new Promise((a,o)=>{const s=new st.Hp({next:u=>{a(u),s.unsubscribe()},error:o,complete:()=>{e?a(r.defaultValue):o(new W.K)}});i.subscribe(s)})}var J=l(8372),w=l(9094),R=l(8505),D=l(3900),j=l(8746),B=l(5625),Q=l(3e3),O=l(8745),lt=l(519),ct=l(8439),mt=l(5679),X=l(6781),ut=l(8987),P=l(7902),tt=l(6925),V=l(4137),dt=l(6493),L=l(7845),Y=l(8616),f=l(7322),H=l(5245),I=l(7423),et=l(2368),it=l(7238),at=l(4107),ot=l(508),K=l(7531),nt=l(1079),_t=l(5899),gt=l(4834),G=l(3626);function pt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function ft(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function ht(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",2),t._UZ(1,"img",45),t.TgZ(2,"mat-form-field",46)(3,"mat-label"),t._uU(4,"Gambar Untuk Embed SEO"),t.qZA(),t.TgZ(5,"ngx-mat-file-input",47,48),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(6);return t.oxw(2).uploadImage(o,s)}),t.qZA(),t.TgZ(7,"mat-icon",31),t._uU(8,"image"),t.qZA()(),t.TgZ(9,"mat-error",49)(10,"small"),t.YNc(11,pt,3,3,"div",20),t.YNc(12,ft,2,1,"div",20),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("src",e.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",e.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",e.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageErrorText)}}function bt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",24)(1,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).submitImage()}),t.TgZ(2,"mat-icon",27),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function vt(i,r){1&i&&(t.TgZ(0,"div",15)(1,"mat-slide-toggle",50)(2,"i"),t._uU(3,"Private"),t.qZA(),t._uU(4," Akses Hanya Dengan URL "),t.qZA()())}function xt(i,r){1&i&&(t.TgZ(0,"div",15)(1,"mat-slide-toggle",51),t._uU(2," Permanent Storage "),t.qZA()())}function Tt(i,r){if(1&i&&(t.TgZ(0,"mat-option",52),t._uU(1),t.qZA()),2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.Oqu(e.name)}}function Ct(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Jenis Tidak Boleh Kosong"),t.qZA())}function Zt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function At(i,r){1&i&&(t.TgZ(0,"mat-option",58),t._UZ(1,"mat-progress-bar",59),t.qZA())}function kt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(4).filterAnimeSelected(s)}),t._UZ(1,"img",62),t.TgZ(2,"span",44),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.lnq("",e.id," :: ",null==e.media_type?null:e.media_type.toUpperCase()," :: ",e.title,"")}}function Ut(i,r){if(1&i&&(t.ynx(0),t.YNc(1,kt,4,5,"mat-option",60),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredAnime)}}function It(i,r){if(1&i&&(t.TgZ(0,"small",63),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("anime_name").value)}}function Et(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Tidak Boleh Kosong"),t.qZA())}function St(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Hanya Boleh Angka"),t.qZA())}function Nt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-form-field",53)(1,"mat-label"),t._uU(2,"Anime Terkait"),t.qZA(),t.TgZ(3,"input",54),t.NdJ("keyup",function(){return t.CHM(e),t.oxw(2).resetSelectedAnime()}),t.qZA(),t.TgZ(4,"mat-icon",31),t._uU(5,"short_text"),t.qZA(),t.TgZ(6,"mat-autocomplete",null,55),t.YNc(8,At,2,0,"mat-option",56),t.YNc(9,Ut,2,1,"ng-container",20),t.qZA(),t.YNc(10,It,2,1,"small",57),t.TgZ(11,"mat-error"),t.YNc(12,Et,2,0,"div",20),t.YNc(13,St,2,0,"div",20),t.qZA()()}if(2&i){const e=t.MAs(7),a=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(5),t.Q6J("ngIf",a.isLoading),t.xp6(1),t.Q6J("ngIf",!a.isLoading),t.xp6(1),t.Q6J("ngIf",a.fg.get("anime_name").value),t.xp6(2),t.Q6J("ngIf",a.fg.get("anime_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("anime_id").hasError("pattern"))}}function qt(i,r){1&i&&(t.TgZ(0,"mat-option",58),t._UZ(1,"mat-progress-bar",59),t.qZA())}function yt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(4).filterDoramaSelected(s)}),t._UZ(1,"img",62),t.TgZ(2,"span",44),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.mdl_id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.mdl_id," :: ",e.title,"")}}function Jt(i,r){if(1&i&&(t.ynx(0),t.YNc(1,yt,4,4,"mat-option",60),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredDorama)}}function wt(i,r){if(1&i&&(t.TgZ(0,"small",63),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("dorama_name").value)}}function Bt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Tidak Boleh Kosong"),t.qZA())}function Ft(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Hanya Boleh Angka"),t.qZA())}function Mt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-form-field",53)(1,"mat-label"),t._uU(2,"Dorama Terkait"),t.qZA(),t.TgZ(3,"input",64),t.NdJ("keyup",function(){return t.CHM(e),t.oxw(2).resetSelectedDorama()}),t.qZA(),t.TgZ(4,"mat-icon",31),t._uU(5,"short_text"),t.qZA(),t.TgZ(6,"mat-autocomplete",null,65),t.YNc(8,qt,2,0,"mat-option",56),t.YNc(9,Jt,2,1,"ng-container",20),t.qZA(),t.YNc(10,wt,2,1,"small",57),t.TgZ(11,"mat-error"),t.YNc(12,Bt,2,0,"div",20),t.YNc(13,Ft,2,0,"div",20),t.qZA()()}if(2&i){const e=t.MAs(7),a=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(5),t.Q6J("ngIf",a.isLoading),t.xp6(1),t.Q6J("ngIf",!a.isLoading),t.xp6(1),t.Q6J("ngIf",a.fg.get("dorama_name").value),t.xp6(2),t.Q6J("ngIf",a.fg.get("dorama_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("dorama_id").hasError("pattern"))}}function Rt(i,r){1&i&&(t.TgZ(0,"mat-icon",31),t._uU(1,"short_text"),t.qZA())}function Dt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",72),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeFansub(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function Qt(i,r){1&i&&(t.TgZ(0,"mat-option",58),t._UZ(1,"mat-progress-bar",59),t.qZA())}function Ot(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit,u=t.oxw(2).index;return t.oxw(2).filterFansubSelected(s,u)}),t._UZ(1,"img",73),t.TgZ(2,"span",44),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.slug," :: ",e.name,"")}}function Lt(i,r){if(1&i&&(t.ynx(0),t.YNc(1,Ot,4,4,"mat-option",60),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredFansub)}}function Yt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Tidak Boleh Kosong"),t.qZA())}function Ht(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Hanya Boleh Angka"),t.qZA())}function Kt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div")(1,"div",66)(2,"mat-form-field",67)(3,"mat-label"),t._uU(4,"Fansub Terkait"),t.qZA(),t.TgZ(5,"input",68),t.NdJ("keyup",function(){const s=t.CHM(e).index;return t.oxw(2).resetSelectedFansub(s)}),t.qZA(),t.YNc(6,Rt,2,0,"mat-icon",69),t.YNc(7,Dt,3,0,"button",70),t.TgZ(8,"mat-autocomplete",null,71),t.YNc(10,Qt,2,0,"mat-option",56),t.YNc(11,Lt,2,1,"ng-container",20),t.qZA(),t.TgZ(12,"small",63),t._uU(13),t.qZA(),t.TgZ(14,"mat-error"),t.YNc(15,Yt,2,0,"div",20),t.YNc(16,Ht,2,0,"div",20),t.qZA()()()()}if(2&i){const e=r.$implicit,a=r.index,o=t.MAs(9),s=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",a),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",o),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").value||0===a),t.xp6(1),t.Q6J("ngIf",!e.get("fansub_id").value&&a>0),t.xp6(3),t.Q6J("ngIf",s.isLoading),t.xp6(1),t.Q6J("ngIf",!s.isLoading),t.xp6(2),t.Oqu(e.get("fansub_name").value),t.xp6(2),t.Q6J("ngIf",e.get("fansub_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").hasError("pattern"))}}function jt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Tidak Boleh Kosong"),t.qZA())}function Pt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Vt(i,r){if(1&i&&t._UZ(0,"angular-editor",74),2&i){const e=t.oxw(2);t.Q6J("config",e.GS.angularEditorConfig)}}function Gt(i,r){1&i&&t._UZ(0,"div")}function zt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.attachmentLimitExceeded)," !")}}function $t(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.attachmentErrorText)}}function Wt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",37)(1,"div",25)(2,"div",82),t._uU(3),t.ALo(4,"bytes"),t._UZ(5,"br")(6,"mat-progress-bar",83),t.qZA()(),t.TgZ(7,"div",84)(8,"button",26),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(3).submitAttachment(s)}),t.TgZ(9,"mat-icon",27),t._uU(10,"attachment"),t.qZA(),t._uU(11," Unggah "),t.qZA()()()}if(2&i){const e=r.$implicit,a=t.oxw(3);t.xp6(3),t.lnq(" ",e.status," :: ",e.progress,"% @ ",t.lcZ(4,6,e.speed),"/s "),t.xp6(3),t.Q6J("mode","determinate")("value",e.progress),t.xp6(2),t.Q6J("disabled",a.submitted||"complete"===e.status||"uploading"===e.status)}}function Xt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",10)(1,"div",75)(2,"small",76),t._uU(3," * "),t.TgZ(4,"i"),t._uU(5,"Resume-able Upload"),t.qZA(),t._uU(6," (Tidak wajib, jika sudah ada URL eksternal, misal alamat webmu gdrive mediafire mega dan lain sebagainya). Mohon ditunggu dan jangan di tinggal, berkas lampiran akan "),t.TgZ(7,"i"),t._uU(8,"expired"),t.qZA(),t._uU(9),t.TgZ(10,"i"),t._uU(11,"upload"),t.qZA(),t._uU(12,". "),t.qZA()(),t.TgZ(13,"mat-form-field",77)(14,"mat-label"),t._uU(15,"Upload Lampiran Berkas -- DDL"),t.qZA(),t.TgZ(16,"ngx-mat-file-input",78,79),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(17);return t.oxw(2).uploadAttachment(o,s)}),t.qZA(),t.TgZ(18,"mat-icon",31),t._uU(19,"attach_file"),t.qZA()(),t.TgZ(20,"mat-error",80)(21,"small"),t.YNc(22,zt,3,3,"div",20),t.YNc(23,$t,2,1,"div",20),t.qZA()()(),t.YNc(24,Wt,12,8,"div",81),t.ALo(25,"async")}if(2&i){const e=t.oxw(2);t.xp6(9),t.hij(" apabila tidak disimpan dalam ",e.CONSTANTS.timeoutDeleteTempAttachmentTime/60/1e3," menit setelah berhasil "),t.xp6(4),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",null!==e.attachmentSelected)("accept",e.fileTypeAttachmentAllowed),t.xp6(6),t.Q6J("ngIf",e.attachmentLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.attachmentErrorText),t.xp6(1),t.Q6J("ngForOf",t.lcZ(25,7,e.uploads$))}}function te(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",85),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).verify()}),t.TgZ(1,"mat-icon",27),t._uU(2,"enhanced_encryption"),t.qZA(),t._uU(3," Verifikasi Akun Untuk Upload DDL! "),t.qZA()}}function ee(i,r){1&i&&(t.TgZ(0,"div",75)(1,"small",76),t._uU(2,"* Gunakan tombol (X) untuk menghapus URL Eksternal jika ingin hanya menggunakan lampiran "),t.TgZ(3,"i"),t._uU(4,"upload"),t.qZA(),t._uU(5," DDL saja"),t.qZA()())}function ie(i,r){1&i&&(t.TgZ(0,"mat-icon",31),t._uU(1,"web"),t.qZA())}function ae(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",72),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeDownloadLink(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function oe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Web Tidak Boleh Kosong"),t.qZA())}function ne(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function re(i,r){1&i&&(t.TgZ(0,"mat-icon",31),t._uU(1,"link"),t.qZA())}function se(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",72),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeDownloadLink(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function le(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tautan Tidak Boleh Kosong"),t.qZA())}function ce(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tautan Link Tidak Valid"),t.qZA())}function me(i,r){if(1&i&&(t.ynx(0),t.TgZ(1,"div",86),t.YNc(2,ee,6,0,"div",87),t.TgZ(3,"mat-form-field",88)(4,"mat-label"),t._uU(5,"Nama Website"),t.qZA(),t._UZ(6,"input",89),t.YNc(7,ie,2,0,"mat-icon",69),t.YNc(8,ae,3,0,"button",70),t.TgZ(9,"mat-error"),t.YNc(10,oe,2,0,"div",20),t.YNc(11,ne,2,0,"div",20),t.qZA()(),t.TgZ(12,"mat-form-field",90)(13,"mat-label"),t._uU(14,"Tautan Link"),t.qZA(),t._UZ(15,"input",91),t.YNc(16,re,2,0,"mat-icon",69),t.YNc(17,se,3,0,"button",70),t.TgZ(18,"mat-error"),t.YNc(19,le,2,0,"div",20),t.YNc(20,ce,2,0,"div",20),t.qZA()()(),t.BQk()),2&i){const e=r.$implicit,a=r.index,o=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",a),t.xp6(1),t.Q6J("ngIf",(null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified)&&0===a),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngIf",e.get("name").value||0===a&&!(null!=o.AS.currentUserSubject&&null!=o.AS.currentUserSubject.value&&o.AS.currentUserSubject.value.verified)),t.xp6(1),t.Q6J("ngIf",!e.get("name").value&&(a>0||(null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified))),t.xp6(2),t.Q6J("ngIf",e.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngIf",e.get("url").value||0===a&&!(null!=o.AS.currentUserSubject&&null!=o.AS.currentUserSubject.value&&o.AS.currentUserSubject.value.verified)),t.xp6(1),t.Q6J("ngIf",!e.get("url").value&&(a>0||(null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified))),t.xp6(2),t.Q6J("ngIf",e.get("url").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("url").hasError("pattern"))}}function ue(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"span",8),t.NdJ("click",function(){return t.CHM(e),t.oxw().toggleDetailMode()}),t._uU(5),t.qZA(),t.TgZ(6,"b",9),t._uU(7,"Tambah Berkas Baru"),t.qZA()()(),t.TgZ(8,"div",2)(9,"div",10)(10,"div",11)(11,"div",10),t.YNc(12,ht,13,6,"div",12),t.YNc(13,bt,5,1,"div",13),t.YNc(14,vt,5,0,"div",14),t.TgZ(15,"div",15)(16,"mat-slide-toggle",16),t._uU(17," R-18+ Konten Eksplisit "),t.qZA()(),t.YNc(18,xt,3,0,"div",14),t.TgZ(19,"mat-form-field",17)(20,"mat-label"),t._uU(21,"Jenis Proyek"),t.qZA(),t.TgZ(22,"mat-select",18),t.YNc(23,Tt,2,2,"mat-option",19),t.qZA(),t.TgZ(24,"mat-error"),t.YNc(25,Ct,2,0,"div",20),t.YNc(26,Zt,2,0,"div",20),t.qZA()(),t.YNc(27,Nt,14,7,"mat-form-field",21),t.YNc(28,Mt,14,7,"mat-form-field",21),t.TgZ(29,"div",15),t._UZ(30,"mat-divider"),t.qZA(),t.TgZ(31,"div",22),t.YNc(32,Kt,17,10,"div",23),t.qZA(),t.TgZ(33,"div",24)(34,"div",10),t._UZ(35,"div",25),t.TgZ(36,"div",25)(37,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw().addFansub()}),t.TgZ(38,"mat-icon",27),t._uU(39,"add"),t.qZA(),t._uU(40," Tambah Fansub "),t.qZA()()()()()(),t.TgZ(41,"div",28)(42,"div",10)(43,"mat-form-field",29)(44,"mat-label"),t._uU(45,"Nama Berkas"),t.qZA(),t._UZ(46,"input",30),t.TgZ(47,"mat-icon",31),t._uU(48,"wysiwyg"),t.qZA(),t.TgZ(49,"mat-error"),t.YNc(50,jt,2,0,"div",20),t.YNc(51,Pt,2,0,"div",20),t.qZA()(),t.YNc(52,Vt,1,1,"angular-editor",32),t.qZA(),t.TgZ(53,"div",10)(54,"div",15),t._UZ(55,"mat-divider"),t.qZA()(),t.YNc(56,Gt,1,0,"div",33),t.YNc(57,Xt,26,9,"ng-template",null,34,t.W1O),t.YNc(59,te,4,0,"ng-template",null,35,t.W1O),t.TgZ(61,"div",10)(62,"div",15),t._UZ(63,"mat-divider"),t.qZA()(),t.ynx(64,36),t.YNc(65,me,21,12,"ng-container",23),t.BQk(),t.TgZ(66,"div",37),t._UZ(67,"div",25)(68,"div",25)(69,"div",25),t.TgZ(70,"div",25)(71,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw().addDownloadLink()}),t.TgZ(72,"mat-icon",27),t._uU(73,"add"),t.qZA(),t._uU(74," Tambah URL Eksternal "),t.qZA()()()()(),t.TgZ(75,"div",10)(76,"div",38)(77,"div",39),t._UZ(78,"div",40),t.TgZ(79,"div",41)(80,"a",42)(81,"mat-icon",27),t._uU(82,"undo"),t.qZA(),t._uU(83," Batal "),t.qZA()(),t.TgZ(84,"div",41)(85,"button",43),t._uU(86," Simpan "),t.TgZ(87,"mat-icon",44),t._uU(88,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(58),a=t.MAs(60),o=t.oxw();t.Q6J("formGroup",o.fg),t.xp6(5),t.hij(" ",o.detailMode?"Sederhana":"Lengkap"," "),t.xp6(7),t.Q6J("ngIf",o.detailMode),t.xp6(1),t.Q6J("ngIf",o.image&&!o.fg.value.image&&o.detailMode),t.xp6(1),t.Q6J("ngIf",null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified),t.xp6(4),t.Q6J("ngIf",o.permanentStorage&&o.isAttachmentUploaded),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngForOf",o.projectList),t.xp6(2),t.Q6J("ngIf",o.fg.get("projectType_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("projectType_id").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.berkasType.toLowerCase().includes("anime")),t.xp6(1),t.Q6J("ngIf",o.berkasType.toLowerCase().includes("dorama")),t.xp6(4),t.Q6J("ngForOf",o.getFansubControl.controls),t.xp6(5),t.Q6J("disabled",o.submitted),t.xp6(6),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.detailMode),t.xp6(4),t.Q6J("ngIf",null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified)("ngIfThen",e)("ngIfElse",a),t.xp6(9),t.Q6J("ngForOf",o.getDownloadUrlControl.controls),t.xp6(6),t.Q6J("disabled",o.submitted),t.xp6(9),t.Q6J("disabled",o.submitted),t.xp6(5),t.Q6J("disabled",o.submitted||o.fg.invalid||"uploading"===(null==o.attachmentSelected?null:o.attachmentSelected.status))}}let de=(()=>{class i{constructor(e,a,o,s,u,d,g,T,k,S,F,ci,mi,ui,di){this.router=e,this.fb=a,this.bs=o,this.pi=s,this.anime=u,this.dorama=d,this.project=g,this.fansub=T,this.berkas=k,this.imgbb=S,this.toast=F,this.gs=ci,this.as=mi,this.uploadService=ui,this.ds=di,this.detailMode=!1,this.submitted=!1,this.projectList=[],this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentSelected=null,this.attachmentErrorText=null,this.attachmentLimitExceeded=null,this.uploadToast=null,this.timerTimeout=null,this.gambar=null,this.ddl=null,this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasCreate=null,this.subsUpload=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get CONSTANTS(){return m.t}get AS(){return this.as}get GS(){return this.gs}get fileTypeAttachmentAllowed(){return m.t.fileTypeAttachmentAllowed.join(", ")}get permanentStorage(){var e,a;const o=null===(a=null===(e=this.AS.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.role;return o===v.yS.ADMIN||o===v.yS.MODERATOR}get isAttachmentUploaded(){return null!==this.fg.controls.attachment_id.value}ngOnInit(){this.pi.updatePageMetaData("Berkas - Buat Baru","Halaman Membuat Berkas Baru","Create Berkas"),this.gs.isBrowser&&(this.loadProjectList(),this.initForm(),this.uploads$=this.uploadService.connect(),this.subsUpload=this.uploadService.events.subscribe({next:e=>{this.gs.log("[UPLOAD_EVENTS]",e),("uploading"===e.status||"complete"===e.status)&&(this.attachmentSelected=e),"complete"===e.status?(this.gs.log("[UPLOAD_COMPLETED]",e.response),this.fg.controls.attachment_id.patchValue(e.response.result.id),this.uploadToast=this.toast.warning("Segera Kirim Data Berkas!","Lampiran Akan Dihapus ...",{closeButton:!1,timeOut:m.t.timeoutDeleteTempAttachmentTime,disableTimeOut:"extendedTimeOut",tapToDismiss:!1,progressAnimation:"decreasing"},!0),this.timerTimeout=setTimeout(()=>{this.gs.log("[UPLOAD_TIMEOUT]",m.t.timeoutDeleteTempAttachmentTime),this.failOrCancelUpload({info:"Expired, Silahkan Upload Ulang!"})},m.t.timeoutDeleteTempAttachmentTime)):"error"===e.status&&(this.gs.log("[UPLOAD_ERROR]",e.response,"error"),this.failOrCancelUpload(e.response))},error:e=>{this.gs.log("[UPLOAD_ERROR]",e,"error"),this.failOrCancelUpload(e)}}))}ngOnDestroy(){var e,a,o,s,u,d,g,T,k,S;this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.timerTimeout&&(clearTimeout(this.timerTimeout),this.timerTimeout=null),null===(e=this.subsProject)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe(),null===(o=this.subsAnimeDetail)||void 0===o||o.unsubscribe(),null===(s=this.subsDoramaDetail)||void 0===s||s.unsubscribe(),null===(u=this.subsProjectDetail)||void 0===u||u.unsubscribe();for(const F of this.subsFansubDetail)null==F||F.unsubscribe();null===(d=this.subsAnimeNew)||void 0===d||d.unsubscribe(),null===(g=this.subsDoramaNew)||void 0===g||g.unsubscribe(),null===(T=this.subsImgbb)||void 0===T||T.unsubscribe(),null===(k=this.subsBerkasCreate)||void 0===k||k.unsubscribe(),this.uploadService.disconnect(),null===(S=this.subsUpload)||void 0===S||S.unsubscribe()}canDeactivate(){var e=this;return(0,U.Z)(function*(){const a=yield e.ds.leavePageDialog();return yield M(a)})()}toggleDetailMode(){this.detailMode=!this.detailMode}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:e=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",e),this.projectList=e.results,this.bs.idle()},error:e=>{this.gs.log("[PROJECT_LOAD_ERROR]",e,"error"),this.bs.idle()}})}hasRequiredField(e,a){return e.get(a).hasValidator(n.kI.required)}initForm(){this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],projectType_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],anime_id:[null,n.kI.compose([])],anime_name:[null,n.kI.compose([])],dorama_id:[null,n.kI.compose([])],dorama_name:[null,n.kI.compose([])],fansub_list:this.fb.array([this.createFansub()]),image:[null,n.kI.compose([n.kI.pattern(m.t.regexUrl)])],attachment_id:[null,n.kI.compose([n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],download_url:this.fb.array([this.createDownloadLink()]),private:[!1,n.kI.compose([n.kI.required])],r18:[!1,n.kI.compose([n.kI.required])],permanent_storage:[!1,n.kI.compose([n.kI.required])]}),this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,J.b)(500),(0,w.x)(),(0,R.b)(()=>this.isLoading=!0),(0,D.w)(e=>this.anime.searchAnime(e).pipe((0,j.x)(()=>this.isLoading=!1))),(0,B.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_SUCCESS]",e),this.filteredAnime=e.results},error:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_ERROR]",e,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,J.b)(500),(0,w.x)(),(0,R.b)(()=>this.isLoading=!0),(0,D.w)(e=>this.dorama.searchDorama(e).pipe((0,j.x)(()=>this.isLoading=!1))),(0,B.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_SUCCESS]",e);for(const a of e.results)a.mdl_id=a.mdl_id.split("-")[1],a.image_url=a.thumb;this.filteredDorama=e.results},error:e=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_ERROR]",e,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,J.b)(500),(0,w.x)(),(0,B.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_CREATE_PROJECT_CHANGED]",e);const a=this.projectList.find(o=>o.id===e);this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),a.name.toLowerCase().includes("anime")?(this.berkasType=a.name,this.fg.controls.anime_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([n.kI.required])):a.name.toLowerCase().includes("dorama")?(this.berkasType=a.name,this.fg.controls.dorama_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([n.kI.required])):this.berkasType="",this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(){return this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],url:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexUrl)])]})}removeDownloadLink(e){this.getDownloadUrlControl.removeAt(e)}addDownloadLink(){this.getDownloadUrlControl.push(this.createDownloadLink())}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(){const e=this.fb.group({fansub_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^\d+$/)])],fansub_name:[null,n.kI.compose([n.kI.required])]});return this.subsFansubDetail.push(e.get("fansub_id").valueChanges.pipe((0,J.b)(500),(0,w.x)(),(0,R.b)(()=>this.isLoading=!0),(0,D.w)(a=>this.fansub.searchFansub(a).pipe((0,j.x)(()=>this.isLoading=!1))),(0,B.X)(-1)).subscribe({next:a=>{this.gs.log("[BERKAS_CREATE_SEARCH_FANSUB_RESULT]",a),this.filteredFansub=a.results}})),e}removeFansub(e){var a;this.getFansubControl.removeAt(e),null===(a=this.subsFansubDetail[e])||void 0===a||a.unsubscribe(),this.subsFansubDetail.splice(e,1)}addFansub(){this.getFansubControl.push(this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(e){this.getFansubControl.controls[e].get("fansub_name").patchValue(null)}filterAnimeSelected(e){var a;this.gs.log("[ANIME_FILTER_CLICK]",e),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:e.id,name:e.title,image_url:e.image_url,type:null===(a=e.media_type)||void 0===a?void 0:a.toUpperCase()}).subscribe({next:o=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",o),this.animeCheckOrAddResponse=o.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(o.result.id),this.fg.controls.anime_name.patchValue(o.result.name)},error:o=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",o,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(e){this.gs.log("[DORAMA_FILTER_CLICK]",e),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(e.mdl_id,10),slug:e.slug,name:e.title,image_url:e.image_url,type:e.type}).subscribe({next:a=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",a),this.doramaCheckOrAddResponse=a.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(a.result.id),this.fg.controls.dorama_name.patchValue(a.result.name)},error:a=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",a,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(e,a){this.gs.log("[FANSUB_FILTER_CLICK]",e),this.getFansubControl.controls[a].get("fansub_id").patchValue(e.id),this.getFansubControl.controls[a].get("fansub_name").patchValue(e.name)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),o.size<=m.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=m.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){var e;if(this.bs.busy(),this.submitted=!0,this.fg.invalid||"uploading"===(null===(e=this.attachmentSelected)||void 0===e?void 0:e.status))return this.submitted=!1,void this.bs.idle();if(null===this.fg.value.attachment_id&&0===this.fg.value.download_url.lenth)return this.submitted=!1,this.uploadToast=this.toast.warning("Lampiran DDL / URL Eksternal!","Harap Mengisi Setidaknya Salah Satu ..."),void this.bs.idle();const a=[];for(const o of this.fg.value.fansub_list)a.push(o.fansub_id);this.subsBerkasCreate=this.berkas.createBerkas({image:this.fg.value.image,name:this.fg.value.name,description:this.fg.value.description,private:this.fg.value.private,r18:this.fg.value.r18,permanent_storage:this.fg.value.permanent_storage,projectType_id:this.fg.value.projectType_id,anime_id:this.fg.value.anime_id,dorama_id:this.fg.value.dorama_id,fansub_id:a,download_url:this.fg.value.download_url,attachment_id:this.fg.value.attachment_id}).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SUCCESS]",o),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/berkas")},error:o=>{this.gs.log("[BERKAS_CREATE_ERROR]",o,"error"),this.submitted=!1,this.bs.idle()}})}uploadAttachment(e,a){this.ddl=a;const o=e.target.files[0];this.attachmentLimitExceeded=null,this.attachmentErrorText=null,this.gs.log("[ATTACHMENT_SELECTED]",o),this.fg.controls.attachment_id.patchValue(null),this.uploadService.disconnect();try{o.size<=m.t.fileSizeAttachmentTotalLimit?this.uploadService.handleFiles(o):(this.attachmentLimitExceeded=m.t.fileSizeAttachmentTotalLimit,this.ddl.clear(e))}catch(s){this.ddl.clear(e)}}submitAttachment(e){const a=this.uploadService.state().find(o=>o.uploadId===e.uploadId);a&&(this.attachmentSelected=a,e.status="queue")}failOrCancelUpload(e=null){var a,o;this.attachmentSelected=null,this.attachmentErrorText=(null===(a=null==e?void 0:e.result)||void 0===a?void 0:a.message)||(null==e?void 0:e.info)||(null===(o=null==e?void 0:e.error)||void 0===o?void 0:o.message)||"Terjadi Kesalahan, Harap Reload Halaman!",this.uploadService.disconnect(),this.fg.controls.attachment_id.patchValue(null),this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.ddl.clear()}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(b.F0),t.Y36(n.qu),t.Y36(Q.z),t.Y36(O.Z),t.Y36(lt.o),t.Y36(ct.X),t.Y36(mt.Y),t.Y36(X.T),t.Y36(ut.A),t.Y36(P.X),t.Y36(tt.k),t.Y36(E.U),t.Y36(V.e),t.Y36(dt.Lz),t.Y36(L.x))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-berkas-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-decoration-none","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["class","col-12",4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],[1,"col-12","p-3"],["formControlName","r18","matTooltip","Konten Eksplisit"],["appearance","outline",1,"px-3","pt-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama","required",""],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["appearance","outline","class","p-3 w-100",3,"color",4,"ngIf"],["formArrayName","fansub_list","matTooltip","Silahkan Buat Terlebih Dahulu Jika Tidak Ada"],[4,"ngFor","ngForOf"],[1,"col-12","mb-4"],[1,"col"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],[1,"me-1"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv","required",""],["matSuffix",""],["class","p-3 w-100","formControlName","description",3,"config",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["ddlVerified",""],["ddlNotVerified",""],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/berkas",1,"w-100",3,"disabled"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],[1,"ms-1"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],[1,"px-3","w-100"],["formControlName","private","matTooltip","Hanya Dapat Di Akses Melalui URL"],["formControlName","permanent_storage","matTooltip","Berkas terjamin tidak akan hilang / expired"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"height","40px","width","30px","object-fit","cover",3,"src"],[1,"text-warning"],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],[1,"row",3,"formGroupName"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub","required","",3,"matAutocomplete","keyup"],["matSuffix","",4,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"click"],[1,"me-1",2,"height","40px","width","40px","object-fit","cover",3,"src"],["formControlName","description",1,"p-3","w-100",3,"config"],[1,"col-12","px-3"],[1,"text-success"],["appearance","outline",1,"px-3","pt-3","col",3,"color"],["uploadx","",1,"w-100",3,"disabled","accept","change"],["ddl",""],[1,"px-4","w-100"],["class","row mb-4",4,"ngFor","ngForOf"],[1,"px-3"],[3,"mode","value"],[1,"col-6","col-lg-4"],["type","button","mat-stroked-button","","color","accent",1,"w-100",3,"click"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["class","col-12 px-3",4,"ngIf"],["appearance","outline",1,"px-3","pt-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Google Drive","required",""],["appearance","outline",1,"px-3","pt-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://webshit.saya.com/01/02/halaman-post-download.html","required",""]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ue,89,25,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[Y.t,c.O5,n._Y,n.JL,n.sg,f.KE,f.hX,Z.Yh,H.Hw,f.R9,f.TO,I.lW,et.Rr,n.JJ,n.u,it.gM,at.gD,n.Q7,c.sg,ot.ey,K.Nt,n.Fj,nt.ZL,nt.XC,_t.pW,gt.d,n.CE,n.x0,C.s6,I.zs,b.yS],pipes:[G.$,c.Ov],styles:[""]}),i})();var z=l(6856),x=l(6688);function _e(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function ge(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function pe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",6)(1,"button",60),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitImage()}),t.TgZ(2,"mat-icon",57),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function fe(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.coverLimitExceeded)," !")}}function he(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.coverErrorText)}}function be(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",61)(1,"button",60),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitCover()}),t.TgZ(2,"mat-icon",57),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function ve(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Tidak Boleh Kosong"),t.qZA())}function xe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Te(i,r){if(1&i&&(t.TgZ(0,"small",62)(1,"div"),t._uU(2),t.qZA()()),2&i){const e=t.oxw(3);t.xp6(2),t.Oqu(e.slugInfo)}}function Ce(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Tidak Boleh Kosong"),t.qZA())}function Ze(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Hanya Boleh Huruf Dan \u4e00"),t.qZA())}function Ae(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Harus Diisi Secara Valid"),t.qZA())}function ke(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Ue(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Mohon Pilih Salah Satu"),t.qZA())}function Ie(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Status Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Ee(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",63),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(3).removeTag(s)}),t._uU(1),t.TgZ(2,"mat-icon",64),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Se(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Website Tidak Boleh Kosong"),t.qZA())}function Ne(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Website Link Tidak Valid"),t.qZA())}function qe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Facebook Link Tidak Valid"),t.qZA())}function ye(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function Je(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Twitter Link Tidak Valid"),t.qZA())}function we(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"RSS Link Tidak Valid"),t.qZA())}function Be(i,r){if(1&i&&(t.TgZ(0,"div",13)(1,"mat-form-field",42)(2,"mat-label"),t._uU(3,"URI / URL RSS v2.0 Feed"),t.qZA(),t._UZ(4,"input",65),t.TgZ(5,"mat-icon",19),t._uU(6,"rss_feed"),t.qZA(),t.TgZ(7,"mat-error"),t.YNc(8,we,2,0,"div",21),t.qZA()()()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",e.fg.get("rss_feed").hasError("pattern"))}}function Fe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",8),t.NdJ("submit",function(){return t.CHM(e),t.oxw(2).onSubmit()}),t.TgZ(1,"div",9)(2,"div",10)(3,"h2",11)(4,"b",12),t._uU(5,"Tambah Data Fansub Baru"),t.qZA()()(),t.TgZ(6,"div",6)(7,"div",13)(8,"div",14)(9,"div",13)(10,"div",6),t._UZ(11,"img",15),t.TgZ(12,"mat-form-field",16)(13,"mat-label"),t._uU(14,"Foto"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",17,18),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(16);return t.oxw(2).uploadImage(o,s)}),t.qZA(),t.TgZ(17,"mat-icon",19),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",20)(20,"small"),t.YNc(21,_e,3,3,"div",21),t.YNc(22,ge,2,1,"div",21),t.qZA()()(),t.YNc(23,pe,5,1,"div",22),t.qZA()(),t.TgZ(24,"div",23)(25,"div",13)(26,"mat-form-field",24)(27,"mat-label"),t._uU(28,"Cover"),t.qZA(),t.TgZ(29,"ngx-mat-file-input",17,25),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(30);return t.oxw(2).uploadCover(o,s)}),t.qZA(),t.TgZ(31,"mat-icon",19),t._uU(32,"image"),t.qZA()(),t.TgZ(33,"mat-error",20)(34,"small"),t.YNc(35,fe,3,3,"div",21),t.YNc(36,he,2,1,"div",21),t.qZA()(),t.YNc(37,be,5,1,"div",26),t.TgZ(38,"mat-form-field",27)(39,"mat-label"),t._uU(40,"Nama Fansub"),t.qZA(),t._UZ(41,"input",28),t.TgZ(42,"mat-icon",19),t._uU(43,"wysiwyg"),t.qZA(),t.TgZ(44,"mat-error"),t.YNc(45,ve,2,0,"div",21),t.YNc(46,xe,2,0,"div",21),t.qZA()(),t.TgZ(47,"mat-form-field",29)(48,"mat-label"),t._uU(49,"Singkatan"),t.qZA(),t._UZ(50,"input",30),t.TgZ(51,"mat-icon",19),t._uU(52,"short_text"),t.qZA(),t.YNc(53,Te,3,1,"small",31),t.TgZ(54,"mat-error"),t.YNc(55,Ce,2,0,"div",21),t.YNc(56,Ze,2,0,"div",21),t.qZA()(),t._UZ(57,"angular-editor",32),t.TgZ(58,"mat-form-field",33)(59,"mat-label"),t._uU(60,"Mulai Ada Sejak"),t.qZA(),t.TgZ(61,"input",34),t.NdJ("focus",function(){return t.CHM(e),t.MAs(65).open()}),t.ALo(62,"date"),t.qZA(),t._UZ(63,"mat-datepicker-toggle",35)(64,"mat-datepicker",36,37),t.TgZ(66,"mat-error"),t.YNc(67,Ae,2,0,"div",21),t.YNc(68,ke,2,0,"div",21),t.qZA()(),t.TgZ(69,"mat-form-field",33)(70,"mat-label"),t._uU(71,"Status"),t.qZA(),t.TgZ(72,"mat-select",38)(73,"mat-option",39),t._uU(74,"Tidak Aktif"),t.qZA(),t.TgZ(75,"mat-option",40),t._uU(76,"Aktif"),t.qZA()(),t.TgZ(77,"mat-hint",41),t._uU(78,"Status Kehidupan Fansub Saat Ini"),t.qZA(),t.TgZ(79,"mat-error"),t.YNc(80,Ue,2,0,"div",21),t.YNc(81,Ie,2,0,"div",21),t.qZA()()()()(),t.TgZ(82,"div",13)(83,"div",6)(84,"div",13)(85,"mat-form-field",42)(86,"mat-label"),t._uU(87,"Tags & Kategori"),t.qZA(),t.TgZ(88,"mat-chip-list",null,43),t.YNc(90,Ee,4,2,"mat-chip",44),t.TgZ(91,"input",45),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw(2).addTag(o)}),t.qZA(),t.TgZ(92,"mat-icon",19),t._uU(93,"loyalty"),t.qZA()(),t.TgZ(94,"mat-hint",41),t._uU(95,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()()()()(),t.TgZ(96,"div",13)(97,"div",6)(98,"div",13)(99,"mat-form-field",46)(100,"mat-label"),t._uU(101,"Tautan Website"),t.qZA(),t._UZ(102,"input",47),t.TgZ(103,"mat-icon",19),t._uU(104,"web"),t.qZA(),t.TgZ(105,"mat-error"),t.YNc(106,Se,2,0,"div",21),t.YNc(107,Ne,2,0,"div",21),t.qZA()(),t.TgZ(108,"mat-form-field",46)(109,"mat-label"),t._uU(110,"Facebook Fanpage"),t.qZA(),t._UZ(111,"input",48),t.TgZ(112,"mat-icon",19),t._uU(113,"facebook"),t.qZA(),t.TgZ(114,"mat-error"),t.YNc(115,qe,2,0,"div",21),t.qZA()(),t.TgZ(116,"mat-form-field",46)(117,"mat-label"),t._uU(118,"Tautan Discord"),t.qZA(),t._UZ(119,"input",49),t.TgZ(120,"mat-icon",19),t._UZ(121,"img",50),t.qZA(),t.TgZ(122,"mat-error"),t.YNc(123,ye,2,0,"div",21),t.qZA()(),t.TgZ(124,"mat-form-field",46)(125,"mat-label"),t._uU(126,"Cuitan Twitter"),t.qZA(),t._UZ(127,"input",51),t.TgZ(128,"mat-icon",19),t._UZ(129,"img",50),t.qZA(),t.TgZ(130,"mat-error"),t.YNc(131,Je,2,0,"div",21),t.qZA()()()()(),t.YNc(132,Be,9,2,"div",52),t.TgZ(133,"div",13)(134,"div",6)(135,"div",53),t._UZ(136,"div",54),t.TgZ(137,"div",55)(138,"a",56)(139,"mat-icon",57),t._uU(140,"undo"),t.qZA(),t._uU(141," Batal "),t.qZA()(),t.TgZ(142,"div",55)(143,"button",58),t._uU(144," Simpan "),t.TgZ(145,"mat-icon",59),t._uU(146,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(65),a=t.MAs(89),o=t.oxw(2);t.Q6J("formGroup",o.fg),t.xp6(11),t.Q6J("src",o.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",o.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",o.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",o.imageErrorText),t.xp6(1),t.Q6J("ngIf",o.image&&!o.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",o.fg.value.cover)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",o.coverLimitExceeded),t.xp6(1),t.Q6J("ngIf",o.coverErrorText),t.xp6(1),t.Q6J("ngIf",o.cover&&!o.fg.value.cover),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",o.slugInfo),t.xp6(2),t.Q6J("ngIf",o.fg.get("slug").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("slug").hasError("pattern")),t.xp6(1),t.Q6J("config",o.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.s9C("placeholder",t.xi3(62,50,o.currentDate,"d MMMM y")),t.Q6J("matDatepicker",e),t.xp6(2),t.Q6J("for",e),t.xp6(4),t.Q6J("ngIf",o.fg.get("born").hasError("required")||o.fg.get("born").hasError("matDatepickerParse")),t.xp6(1),t.Q6J("ngIf",o.fg.get("born").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(11),t.Q6J("ngIf",o.fg.get("active").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("active").hasError("pattern")),t.xp6(4),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",o.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",o.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(8),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("web").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("web").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("facebook").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/discord/",o.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",o.fg.get("discord").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/twitter/",o.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",o.fg.get("twitter").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.rssFeedAllowed),t.xp6(6),t.Q6J("disabled",o.submitted),t.xp6(5),t.Q6J("disabled",o.submitted||o.fg.invalid)}}function Me(i,r){if(1&i&&(t.TgZ(0,"div",1),t._UZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"app-notifications"),t.TgZ(5,"div",5)(6,"div",6),t.YNc(7,Fe,147,53,"form",7),t.qZA()()()),2&i){const e=t.oxw();t.xp6(1),t.Udp("background-image","url("+e.cover_url+")"),t.xp6(6),t.Q6J("ngIf",e.fg)}}let Re=(()=>{class i{constructor(e,a,o,s,u,d,g,T,k,S){this.fb=e,this.router=a,this.as=o,this.bs=s,this.pi=u,this.imgbb=d,this.fansub=g,this.toast=T,this.gs=k,this.ds=S,this.submitted=!1,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.image_url="/assets/img/form/no-image.png",this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.cover_url="/assets/img/form/no-image.png",this.urls=[],this.currentDate=new Date,this.gambar=null,this.gambar_=null,this.subsImgbb=null,this.subsFansub=null,this.subsCekFansubSlug=null,this.slugInfo="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}get rssFeedAllowed(){var e,a,o,s,u,d;return(null===(a=null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.role)===v.yS.ADMIN||(null===(s=null===(o=this.as.currentUserSubject)||void 0===o?void 0:o.value)||void 0===s?void 0:s.role)===v.yS.MODERATOR||(null===(d=null===(u=this.as.currentUserSubject)||void 0===u?void 0:u.value)||void 0===d?void 0:d.role)===v.yS.FANSUBBER}ngOnDestroy(){var e,a;null===(e=this.subsImgbb)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("Fansub - Buat Baru","Halaman Menambahkan Fansub Baru","Create Fansub"),this.gs.isBrowser&&this.initForm()}canDeactivate(){var e=this;return(0,U.Z)(function*(){const a=yield e.ds.leavePageDialog();return yield M(a)})()}initForm(){this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],born:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],active:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],slug:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^[0-9a-zA-Z-]*$/)])],tags:[[],n.kI.compose([])],image:[null,n.kI.compose([n.kI.pattern(m.t.regexUrl)])],cover:[null,n.kI.compose([n.kI.pattern(m.t.regexUrl)])],web:[null,n.kI.compose([n.kI.pattern(m.t.regexUrl)])],facebook:[null,n.kI.compose([n.kI.pattern(m.t.regexUrl)])],discord:[null,n.kI.compose([n.kI.pattern(m.t.regexUrl)])],twitter:[null,n.kI.compose([n.kI.pattern(m.t.regexUrl)])],rss_feed:[null,n.kI.compose([n.kI.pattern(m.t.regexUrl)])]}),this.subsCekFansubSlug=this.fg.get("slug").valueChanges.pipe((0,J.b)(500),(0,w.x)(),(0,R.b)(()=>this.slugInfo="Mengecek ..."),(0,D.w)(e=>this.fansub.cekSlug({slug:e})),(0,B.X)(-1)).subscribe({next:e=>{this.gs.log("[FANSUB_CEK_SLUG_RESULT]",e),this.slugInfo=e.result.message}})}addTag(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.tags.push(o.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,u,d)=>d.findIndex(g=>g===s)===u))}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),o.size<=m.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=m.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}uploadCover(e,a){this.gambar_=a,this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.fg.controls.cover.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[COVER_SELECTED]",u),o.size<=m.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.cover=o,this.cover_url=s.result.toString()},d.src=s.result.toString()}else this.cover=null,this.cover_url="/assets/img/form/image-error.png",this.coverLimitExceeded=m.t.fileSizeImageLimit,this.gambar_.clear(e)}}catch(s){this.cover=null,this.cover_url="/assets/img/form/no-image.png",this.gambar_.clear(e)}}submitCover(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.cover}).subscribe({next:e=>{this.gs.log("[COVER_SUCCESS]",e),this.fg.controls.cover.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[COVER_ERROR]",e,"error"),this.fg.controls.cover.patchValue(null),this.submitted=!1,this.coverErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){this.bs.busy();const e=[];if(this.fg.value.web&&e.push({name:"web",url:this.fg.value.web}),this.fg.value.facebook&&e.push({name:"facebook",url:this.fg.value.facebook}),this.fg.value.discord&&e.push({name:"discord",url:this.fg.value.discord}),this.fg.value.twitter&&e.push({name:"twitter",url:this.fg.value.twitter}),this.submitted=!0,this.fg.invalid||0===e.length)return 0===e.length&&this.toast.warning("Harap Isi Salah Satu URL","Form Tidak lengkap (Web/FB/DC)",null,!0),this.submitted=!1,void this.bs.idle();this.subsFansub=this.fansub.createFansub({image:this.fg.value.image,cover:this.fg.value.cover,name:this.fg.value.name,description:this.fg.value.description,born:this.fg.value.born.getTime(),active:this.fg.value.active,tags:this.fg.value.tags,slug:this.fg.value.slug,urls:e,rss_feed:this.fg.value.rss_feed}).subscribe({next:a=>{this.gs.log("[FANSUB_CREATE_SUCCESS]",a),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/fansub")},error:a=>{this.gs.log("[FANSUB_CREATE_ERROR]",a,"error"),this.submitted=!1,this.bs.idle()}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(b.F0),t.Y36(V.e),t.Y36(Q.z),t.Y36(O.Z),t.Y36(P.X),t.Y36(X.T),t.Y36(tt.k),t.Y36(E.U),t.Y36(L.x))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-fansub-create"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],[2,"padding-top","160px"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["gambar_",""],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","name","placeholder","Fansub Jalanan","required",""],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","slug","placeholder","Jalsub","required",""],["class","text-info",4,"ngIf"],["formControlName","description","required","",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","col-12","col-md-6",3,"color"],["matInput","","formControlName","born","required","",3,"matDatepicker","placeholder","focus"],["matSuffix","",3,"for"],["disabled","false"],["kalender",""],["formControlName","active","placeholder","Aktif / Non-Aktif","required",""],["value","0"],["value","1"],["align","end"],["appearance","outline",1,"p-3","col-12",3,"color"],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["appearance","outline",1,"p-3","col-12","col-md-3",3,"color"],["matInput","","formControlName","web","placeholder","http://www.domain.id"],["matInput","","formControlName","facebook","placeholder","http://www.facebook.com"],["matInput","","formControlName","discord","placeholder","http://www.discord.gg"],["width","24px",2,"vertical-align","baseline",3,"src"],["matInput","","formControlName","twitter","placeholder","http://www.twitter.com"],["class","row",4,"ngIf"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/fansub",1,"w-100",3,"disabled"],[1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],[1,"ms-1"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],[1,"col-12","p-3"],[1,"text-info"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""],["matInput","","formControlName","rss_feed","placeholder","http://my-site.blogspot.com/feeds/posts/default?alt=rss"]],template:function(e,a){1&e&&t.YNc(0,Me,8,3,"div",0),2&e&&t.Q6J("ngIf",a.fg)},directives:[c.O5,Y.t,n._Y,n.JL,n.sg,f.KE,f.hX,Z.Yh,H.Hw,f.R9,f.TO,I.lW,K.Nt,n.Fj,n.JJ,n.u,n.Q7,C.s6,z.hl,z.nW,z.Mq,at.gD,ot.ey,f.bx,x.qn,c.sg,x.HS,x.qH,x.oH,I.zs,b.yS],pipes:[G.$,c.uU],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),i})();var rt=l(5934),De=l(7358);function Qe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",33),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeTo(s)}),t._uU(1),t.TgZ(2,"mat-icon",34),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Oe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Boleh Kosong"),t.qZA())}function Le(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Ye(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",33),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeCc(s)}),t._uU(1),t.TgZ(2,"mat-icon",34),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function He(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Ke(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",33),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeBcc(s)}),t._uU(1),t.TgZ(2,"mat-icon",34),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function je(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Pe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",35)(1,"mat-slide-toggle",36),t.NdJ("change",function(o){return t.CHM(e),t.oxw(2).noReplyMode(o)}),t._uU(2),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.MGl("matTooltip","Kirim sebagai noreply@",e.ENV.domain,""),t.xp6(1),t.hij(" Kirim sebagai noreply@",e.ENV.domain," ")}}function Ve(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Tidak Boleh Kosong"),t.qZA())}function Ge(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ze(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Buat Email Baru & Kirim"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"mat-form-field",11)(11,"mat-label"),t._uU(12,"Penerima"),t.qZA(),t.TgZ(13,"mat-chip-list",null,12),t.YNc(15,Qe,4,2,"mat-chip",13),t.qZA(),t.TgZ(16,"input",14),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addTo(o)}),t.qZA(),t.TgZ(17,"mat-icon",15),t._uU(18,"short_text"),t.qZA(),t.TgZ(19,"mat-hint",16)(20,"mat-error"),t.YNc(21,Oe,2,0,"div",17),t.YNc(22,Le,2,0,"div",17),t.qZA()()(),t.TgZ(23,"mat-form-field",11)(24,"mat-label"),t._uU(25,"Carbon Copy"),t.qZA(),t.TgZ(26,"mat-chip-list",null,18),t.YNc(28,Ye,4,2,"mat-chip",13),t.qZA(),t.TgZ(29,"input",19),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addCc(o)}),t.qZA(),t.TgZ(30,"mat-icon",15),t._uU(31,"short_text"),t.qZA(),t.TgZ(32,"mat-hint",16)(33,"mat-error"),t.YNc(34,He,2,0,"div",17),t.qZA()()(),t.TgZ(35,"mat-form-field",11)(36,"mat-label"),t._uU(37,"Blind Carbon Copy"),t.qZA(),t.TgZ(38,"mat-chip-list",null,20),t.YNc(40,Ke,4,2,"mat-chip",13),t.qZA(),t.TgZ(41,"input",19),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addBcc(o)}),t.qZA(),t.TgZ(42,"mat-icon",15),t._uU(43,"short_text"),t.qZA(),t.TgZ(44,"mat-hint",16)(45,"mat-error"),t.YNc(46,je,2,0,"div",17),t.qZA()()(),t.YNc(47,Pe,3,2,"div",21),t.qZA()(),t.TgZ(48,"div",22)(49,"div",9)(50,"mat-form-field",23)(51,"mat-label"),t._uU(52,"Judul"),t.qZA(),t._UZ(53,"input",24),t.TgZ(54,"mat-icon",15),t._uU(55,"wysiwyg"),t.qZA(),t.TgZ(56,"mat-error"),t.YNc(57,Ve,2,0,"div",17),t.YNc(58,Ge,2,0,"div",17),t.qZA()(),t._UZ(59,"angular-editor",25),t.qZA()()(),t.TgZ(60,"div",9)(61,"div",2)(62,"div",26),t._UZ(63,"div",27),t.TgZ(64,"div",28)(65,"a",29)(66,"mat-icon",30),t._uU(67,"undo"),t.qZA(),t._uU(68," Batal "),t.qZA()(),t.TgZ(69,"div",28)(70,"button",31),t._uU(71," Simpan "),t.TgZ(72,"mat-icon",32),t._uU(73,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(14),a=t.MAs(27),o=t.MAs(39),s=t.oxw();t.Q6J("formGroup",s.fg),t.xp6(10),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.to),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("to").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("to").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.cc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("cc").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.bcc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",o)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("bcc").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",s.canSendAsNoReply),t.xp6(3),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",s.fg.get("subject").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("subject").hasError("pattern")),t.xp6(1),t.Q6J("config",s.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",s.submitted),t.xp6(5),t.Q6J("disabled",s.submitted||s.fg.invalid)}}let $e=(()=>{class i{constructor(e,a,o,s,u,d,g,T,k){this.activatedRoute=e,this.fb=a,this.router=o,this.bs=s,this.pi=u,this.gs=d,this.as=g,this.ms=T,this.ds=k,this.submitted=!1,this.subsMail=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return rt.N}get GS(){return this.gs}get canSendAsNoReply(){var e,a;const o=null===(a=null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.role;return o===v.yS.ADMIN||o===v.yS.MODERATOR}ngOnInit(){this.pi.updatePageMetaData("Mailbox - Buat Baru","Halaman Membuat Surel Baru","Create Email"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){var e;null===(e=this.subsMail)||void 0===e||e.unsubscribe()}canDeactivate(){var e=this;return(0,U.Z)(function*(){const a=yield e.ds.leavePageDialog();return yield M(a)})()}initForm(){var e,a,o;const s=(null===(e=this.activatedRoute.snapshot.queryParamMap.get("to"))||void 0===e?void 0:e.split(",").map(g=>g.trim()))||[],u=(null===(a=this.activatedRoute.snapshot.queryParamMap.get("cc"))||void 0===a?void 0:a.split(",").map(g=>g.trim()))||[],d=(null===(o=this.activatedRoute.snapshot.queryParamMap.get("bcc"))||void 0===o?void 0:o.split(",").map(g=>g.trim()))||[];this.fg=this.fb.group({to:[s,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEmailMulti)])],cc:[u,n.kI.compose([n.kI.pattern(m.t.regexEmailMulti)])],bcc:[d,n.kI.compose([n.kI.pattern(m.t.regexEmailMulti)])],subject:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],message:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],no_reply:[!1,n.kI.compose([n.kI.required])]})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsMail=this.ms.sendMail(this.fg.value).subscribe({next:e=>{this.gs.log("[MAIL_SEND_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/mailbox")},error:e=>{this.gs.log("[MAIL_SEND_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTo(e){const a=e.chipInput.inputElement,o=e.value;(o||"").trim()&&this.fg.value.to.push(o.trim()),a&&(a.value=""),this.fg.controls.to.patchValue(this.fg.value.to.filter((s,u,d)=>d.findIndex(g=>g===s)===u))}removeTo(e){const a=this.fg.value.to.indexOf(e);a>=0&&this.fg.value.to.splice(a,1)}addCc(e){const a=e.chipInput.inputElement,o=e.value;(o||"").trim()&&this.fg.value.cc.push(o.trim()),a&&(a.value=""),this.fg.controls.cc.patchValue(this.fg.value.cc.filter((s,u,d)=>d.findIndex(g=>g===s)===u))}removeCc(e){const a=this.fg.value.cc.indexOf(e);a>=0&&this.fg.value.cc.splice(a,1)}addBcc(e){const a=e.chipInput.inputElement,o=e.value;(o||"").trim()&&this.fg.value.bcc.push(o.trim()),a&&(a.value=""),this.fg.controls.bcc.patchValue(this.fg.value.bcc.filter((s,u,d)=>d.findIndex(g=>g===s)===u))}removeBcc(e){const a=this.fg.value.bcc.indexOf(e);a>=0&&this.fg.value.bcc.splice(a,1)}noReplyMode(e){e.checked?(this.fg.controls.subject.patchValue(`${rt.N.siteName} | Informasi`),this.fg.controls.subject.disable()):this.fg.controls.subject.enable()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(b.gz),t.Y36(n.qu),t.Y36(b.F0),t.Y36(Q.z),t.Y36(O.Z),t.Y36(E.U),t.Y36(V.e),t.Y36(De.Y),t.Y36(L.x))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-mailbox-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["hintLabel","Gunakan , Jika Lebih Dari 1","appearance","outline",1,"p-3","col-12",3,"color"],["to",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","user@domain.tld","required","",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["matSuffix",""],["align","end"],[4,"ngIf"],["cc",""],["placeholder","user@domain.tld",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["bcc",""],["class","col-12 p-3",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","subject","placeholder","Judul Pesan Blablabla ...","required",""],["formControlName","message","required","",1,"p-3","w-100",3,"config"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/mailbox",1,"w-100",3,"disabled"],[1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],[1,"ms-1"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""],[1,"col-12","p-3"],["formControlName","no_reply",3,"matTooltip","change"]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ze,74,27,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[Y.t,c.O5,n._Y,n.JL,n.sg,f.KE,f.hX,x.qn,c.sg,x.HS,H.Hw,x.qH,x.oH,f.R9,f.bx,f.TO,et.Rr,n.JJ,n.u,it.gM,K.Nt,n.Fj,n.Q7,C.s6,I.zs,b.yS,I.lW],styles:[""]}),i})();var We=l(9618);function Xe(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function ti(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageErrorText)}}function ei(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",2)(1,"button",34),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).submitImage()}),t.TgZ(2,"mat-icon",31),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function ii(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Tidak Boleh Kosong"),t.qZA())}function ai(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function oi(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",35),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeTag(s)}),t._uU(1),t.TgZ(2,"mat-icon",36),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function ni(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Tambah Data Berita & Informasi Baru"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),t._UZ(11,"img",11),t.TgZ(12,"mat-form-field",12)(13,"mat-label"),t._uU(14,"Gambar"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",13,14),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(16);return t.oxw().uploadImage(o,s)}),t.qZA(),t.TgZ(17,"mat-icon",15),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",16)(20,"small"),t.YNc(21,Xe,3,3,"div",17),t.YNc(22,ti,2,1,"div",17),t.qZA()()(),t.YNc(23,ei,5,1,"div",18),t.qZA()(),t.TgZ(24,"div",19)(25,"div",9)(26,"mat-form-field",20)(27,"mat-label"),t._uU(28,"Judul"),t.qZA(),t._UZ(29,"input",21),t.TgZ(30,"mat-icon",15),t._uU(31,"wysiwyg"),t.qZA(),t.TgZ(32,"mat-error"),t.YNc(33,ii,2,0,"div",17),t.YNc(34,ai,2,0,"div",17),t.qZA()(),t.TgZ(35,"mat-form-field",20)(36,"mat-label"),t._uU(37,"Tags & Kategori"),t.qZA(),t.TgZ(38,"mat-chip-list",null,22),t.YNc(40,oi,4,2,"mat-chip",23),t.TgZ(41,"input",24),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addTag(o)}),t.qZA(),t.TgZ(42,"mat-icon",15),t._uU(43,"loyalty"),t.qZA()(),t.TgZ(44,"mat-hint",25),t._uU(45,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()(),t._UZ(46,"angular-editor",26),t.qZA()()(),t.TgZ(47,"div",9)(48,"div",2)(49,"div",27),t._UZ(50,"div",28),t.TgZ(51,"div",29)(52,"a",30)(53,"mat-icon",31),t._uU(54,"undo"),t.qZA(),t._uU(55," Batal "),t.qZA()(),t.TgZ(56,"div",29)(57,"button",32),t._uU(58," Simpan "),t.TgZ(59,"mat-icon",33),t._uU(60,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(39),a=t.oxw();t.Q6J("formGroup",a.fg),t.xp6(11),t.Q6J("src",a.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",a.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",a.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",a.imageErrorText),t.xp6(1),t.Q6J("ngIf",a.image&&!a.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",a.fg.get("title").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("title").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",a.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",a.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("config",a.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",a.submitted),t.xp6(5),t.Q6J("disabled",a.submitted||a.fg.invalid)}}const si=[{path:"",pathMatch:"full",redirectTo:"/home"},{path:"berkas",component:de,canDeactivate:[p],data:{title:"Berkas - Buat Baru",description:"Halaman Unggah Berkas Baru",keywords:"Tambah Berkas Baru"}},{path:"fansub",component:Re,canActivate:[y.H],canDeactivate:[p],data:{title:"Fansub - Buat Baru",description:"Halaman Menambahkan Fansub Baru",keywords:"Create Fansub",[m.t.decoratorVerifiedOnly]:!0}},{path:"mailbox",component:$e,canActivate:[y.H],canDeactivate:[p],data:{title:"Surel - Buat Baru",description:"Halaman Kirim Surel Baru",keywords:"Buat Surel Baru",[m.t.decoratorVerifiedOnly]:!0}},{path:"news",component:(()=>{class i{constructor(e,a,o,s,u,d,g,T){this.fb=e,this.router=a,this.bs=o,this.pi=s,this.imgbb=u,this.news=d,this.gs=g,this.ds=T,this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.gambar=null,this.subsNews=null,this.subsImgbb=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Informasi - Buat Baru","Halaman Menambahkan Berita Baru","Create News"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){var e,a;null===(e=this.subsImgbb)||void 0===e||e.unsubscribe(),null===(a=this.subsNews)||void 0===a||a.unsubscribe()}canDeactivate(){var e=this;return(0,U.Z)(function*(){const a=yield e.ds.leavePageDialog();return yield M(a)})()}initForm(){this.fg=this.fb.group({title:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],content:[null,n.kI.compose([n.kI.required,n.kI.pattern(m.t.regexEnglishKeyboardKeys)])],image:[null,n.kI.compose([n.kI.pattern(m.t.regexUrl)])],tags:[[],n.kI.compose([])]})}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),o.size<=m.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=m.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsNews=this.news.createNews({image:this.fg.value.image,title:this.fg.value.title,content:this.fg.value.content,tags:this.fg.value.tags}).subscribe({next:e=>{this.gs.log("[NEWS_CREATE_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/news")},error:e=>{this.gs.log("[NEWS_CREATE_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTag(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.tags.push(o.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,u,d)=>d.findIndex(g=>g===s)===u))}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(b.F0),t.Y36(Q.z),t.Y36(O.Z),t.Y36(P.X),t.Y36(We.Y),t.Y36(E.U),t.Y36(L.x))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-news-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","title","placeholder","Berita Terkini Blablabla ...","required",""],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["align","end"],["formControlName","content","required","",1,"p-3","w-100",3,"config"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","/news",1,"w-100",3,"disabled"],[1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],[1,"ms-1"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ni,61,19,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[Y.t,c.O5,n._Y,n.JL,n.sg,f.KE,f.hX,Z.Yh,H.Hw,f.R9,f.TO,I.lW,K.Nt,n.Fj,n.JJ,n.u,n.Q7,x.qn,c.sg,x.HS,x.qH,x.oH,f.bx,C.s6,I.zs,b.yS],pipes:[G.$],styles:[""]}),i})(),canActivate:[y.H,q.t],canDeactivate:[p],data:{title:"Berita - Buat Baru",description:"Halaman Unggah Berita Baru",keywords:"Tambah Berita Baru",[m.t.decoratorVerifiedOnly]:!0,[m.t.decoratorRoles]:[v.yS.ADMIN,v.yS.MODERATOR]}}];let li=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[c.ez,b.Bz.forChild(si),A.m,n.u5,n.UX,Z.Ad,h.F,C.UM,_.T]]}),i})()},8616:($,N,l)=>{l.d(N,{t:()=>E});var c=l(5e3),b=l(8406),n=l(8696),C=l(7140),Z=l(9808),m=l(1861);function v(p,A){if(1&p&&c._UZ(0,"div",4),2&p){const _=c.oxw();c.Udp("background-size",_.GS.sizeContain?"contain":"cover")("background-image","url("+_.GS.bannerImg+")")("background-repeat",_.GS.bgRepeat?"repeat-x":"no-repeat")("height","/news"===_.ROUTER.url||_.ROUTER.url.includes("/news?")||"/berkas"===_.ROUTER.url||_.ROUTER.url.includes("/berkas?")||"/fansub"===_.ROUTER.url||_.ROUTER.url.includes("/fansub?")?"192px":"128px")("background-position-y","/berkas"===_.ROUTER.url||_.ROUTER.url.includes("/berkas?")?"22.5%":"")}}function q(p,A){if(1&p&&(c.TgZ(0,"strong",10),c._uU(1," -- "),c.TgZ(2,"i")(3,"a",11),c._uU(4),c.qZA()()()),2&p){const _=c.oxw().$implicit;c.xp6(3),c.MGl("routerLink","/user/",_.notifCreator,""),c.xp6(1),c.hij(" ",_.notifCreator," ")}}function y(p,A){if(1&p){const _=c.EpF();c.TgZ(0,"button",12),c.NdJ("click",function(){c.CHM(_);const U=c.oxw().$implicit;return c.oxw().removeNotif(U.notifData.id)}),c.qZA()}}function t(p,A){if(1&p&&(c.TgZ(0,"div",5)(1,"div")(2,"strong",6),c._uU(3),c.qZA(),c._UZ(4,"span",7),c.ALo(5,"safeInnerHtml"),c.YNc(6,q,5,2,"strong",8),c.YNc(7,y,1,0,"button",9),c.qZA()()),2&p){const _=A.$implicit;c.xp6(1),c.Gre("alert alert-",_.notifData.type," alert-dismissible fade show"),c.xp6(2),c.Oqu(_.notifData.title),c.xp6(1),c.Q6J("innerHTML",c.lcZ(5,7,_.notifData.content),c.oJD),c.xp6(2),c.Q6J("ngIf",_.notifCreator),c.xp6(1),c.Q6J("ngIf",_.notifData.dismissible)}}let E=(()=>{class p{constructor(_,h,U){this.router=_,this.gs=h,this.notif=U}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(_){this.notif.removeNotif(_)}}return p.\u0275fac=function(_){return new(_||p)(c.Y36(b.F0),c.Y36(n.U),c.Y36(C.T))},p.\u0275cmp=c.Xpm({type:p,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(_,h){1&_&&(c.YNc(0,v,1,10,"div",0),c.TgZ(1,"div",1)(2,"div",2),c.YNc(3,t,8,9,"div",3),c.qZA()()),2&_&&(c.Q6J("ngIf",h.GS.bannerImg&&("/news"===h.ROUTER.url||h.ROUTER.url.includes("/news?")||"/berkas"===h.ROUTER.url||h.ROUTER.url.includes("/berkas?")||"/fansub"===h.ROUTER.url||h.ROUTER.url.includes("/fansub?")||"/anime"===h.ROUTER.url||h.ROUTER.url.includes("/anime?")||"/dorama"===h.ROUTER.url||h.ROUTER.url.includes("/dorama?"))),c.xp6(3),c.Q6J("ngForOf",h.NOTIF.notifications))},directives:[Z.O5,Z.sg,b.yS],pipes:[m.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%}"]}),p})()},8613:($,N,l)=>{l.d(N,{F:()=>Z});var c=l(9808),b=l(8406),n=l(7355),C=l(5e3);let Z=(()=>{class m{}return m.\u0275fac=function(q){return new(q||m)},m.\u0275mod=C.oAB({type:m}),m.\u0275inj=C.cJS({imports:[[c.ez,b.Bz,n.T]]}),m})()}}]);
\ No newline at end of file
diff --git a/dist/fansubid/browser/index.html b/dist/fansubid/browser/index.html
index 49f73a402..1497cf4ed 100644
--- a/dist/fansubid/browser/index.html
+++ b/dist/fansubid/browser/index.html
@@ -63,7 +63,7 @@
-
+