import{a as st,b as he,e as E}from"./chunk-NIM73SMY.js";import"./chunk-NCFXZ2TF.js";import{a as Ae,b as mt,r as ct,s as G,t as pt,v as Re,w as ye,x as ve}from"./chunk-AM4363GG.js";import{a as dt}from"./chunk-FJNHGQO5.js";import"./chunk-NABIRIYG.js";import"./chunk-JIKLIHHQ.js";import"./chunk-K3S7L2EH.js";import"./chunk-QDP5T56D.js";import"./chunk-WSKCB3NE.js";import"./chunk-4EF7DIQA.js";import{A as oe}from"./chunk-5EJWFQRB.js";import"./chunk-DAES6XAH.js";import"./chunk-WPYN5NP7.js";import{b as L}from"./chunk-N2PVJHKU.js";import{c as W}from"./chunk-N6H5PN4U.js";import"./chunk-EGENQJKI.js";import"./chunk-DBI6SHHM.js";import{s as it}from"./chunk-SIHEBH6V.js";import{C as v,D as b,c as ge,g as w,h as U,n as et,o as Y,q as tt,r as B,u as j}from"./chunk-2UGJU7DR.js";import{a as lt}from"./chunk-IM5O2N5E.js";import{$b as ce,Ab as qe,Bb as M,C as We,Cb as O,D as ze,Da as Ve,De as R,Dg as Ce,E as Ze,Fc as ue,Ha as s,Hc as Ke,Hh as ne,Mb as Pe,Mc as Je,Na as Ee,Nb as Qe,Ob as Z,Pb as Q,Q as De,Qb as Fe,Ra as H,Sa as C,Tc as N,Vb as se,Wa as Ue,Wb as me,Xb as de,Xd as nt,Xh as _t,Ya as $,aa as g,ai as at,bc as _e,bi as Ne,eb as d,fh as Ie,ga as xe,ge as te,gh as rt,ha as T,i as Le,ia as D,jb as q,kb as Ye,la as ke,lb as Be,mb as je,nb as r,nc as He,ob as o,pb as c,sa as I,sc as pe,ta as h,tb as K,tc as x,tg as Me,ua as Xe,vb as ae,vg as fe,wb as le,xb as a,yb as J,ye as ot,zb as ee}from"./chunk-EWB56PWF.js";import{a as re,b as Te,e as we,i as u}from"./chunk-2T7OYDCL.js";var St=we((_o,yt)=>{yt.exports=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key-round-icon lucide-key-round">
  <path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" />
  <circle cx="16.5" cy="7.5" r=".5" fill="currentColor" />
</svg>
`;});var Tt=we((ao,vt)=>{vt.exports=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-briefcase-business-icon lucide-briefcase-business">
  <path d="M12 12h.01" />
  <path d="M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2" />
  <path d="M22 13a18.15 18.15 0 0 1-20 0" />
  <rect width="20" height="14" x="2" y="6" rx="2" />
</svg>
`;});var gt=(()=>{let i=class i extends he{};u(i,"\u0275fac",(()=>{let n;return function(e){return(n||(n=ke(i)))(e||i);};})()),u(i,"\u0275cmp",C({type:i,selectors:[["my-admin-config-wizard-stepper"]],features:[ce([{provide:he,useExisting:i}]),Ue],decls:2,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(t,e){t&1&&(r(0,"div"),c(1,"div",0),o()),t&2&&(s(),d("ngTemplateOutlet",e.selected?e.selected.content:null));},dependencies:[N,Je],encapsulation:2}));let _=i;return _;})();function Oe(){return"no_welcome_modal";}var Mt=(()=>{let i=class i{hide=I();};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-admin-config-wizard-documentation"]],outputs:{hide:"hide"},decls:55,vars:0,consts:()=>{let n;n="Congratulations";let t;t="Your platform has been configured!";let e;e=" It's time to add information about your platform! "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"Setting up a description"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+", specifying "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"who you are"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+", why "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"you created your platform"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+" and "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"how long"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+" you plan to "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"maintain it"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+" is very important for visitors to understand on what type of website they are. ",e=qe(e);let l;l="Gagnlegir tenglar";let p;p="Official PeerTube website:";let f;f="Blog post, get help or discover PeerTube";let A;A="Public PeerTube index:";let P;P="Put your platform on the official PeerTube public index";let k;k="Documentation";let X;X="Admin:";let V;V="Managing users, following other platforms, dealing with spammers, configure object storage or remote transcoding...";let S;S="Uppsetning \xE1 notandaa\xF0gangnum \xFE\xEDnum, s\xFDsl me\xF0 spilunarlista, uppg\xF6tvun utana\xF0komandi forrita...";let y;y="CLI:";let be;be="Sendu e\xF0a flyttu inn myndskei\xF0, sko\xF0a\xF0u atvikaskr\xE1r, hreinsa\xF0u til \xED gagnageymslum, endurstilltu lykilor\xF0 notenda...";let Ge;Ge="Loka";let $e;return $e="Fill platform information",[n,t,e,l,p,f,A,P,k,X,V,S,y,be,Ge,$e,[1,"root"],[1,"one-column"],[1,"mascot-container"],["src","/client/assets/images/mascot/happy.svg","alt","mascot",1,"mascot"],[1,"title"],[1,"sub-title"],[1,"mt-4"],[1,"text-content"],["href","https://joinpeertube.org","target","_blank",1,"link-primary","me-1"],["href","https://instances.joinpeertube.org/instances","target","_blank",1,"link-primary","me-1"],["href","https://docs.joinpeertube.org/admin/following-instances","target","_blank",1,"link-primary","me-1"],["href","https://docs.joinpeertube.org/use/setup-account","target","_blank",1,"link-primary","me-1"],["href","https://docs.joinpeertube.org/maintain/tools","target","_blank",1,"link-primary","me-1"],[1,"buttons"],["theme","secondary",3,"click"],["theme","primary","ptRouterLink","/admin/settings/config",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",16)(1,"div",17)(2,"div",18),c(3,"img",19),o(),r(4,"h4")(5,"div",20),a(6,0),o(),r(7,"div",21),a(8,1),o()()(),r(9,"div",22)(10,"span",23),ae(11,2),c(12,"strong")(13,"strong")(14,"strong")(15,"strong")(16,"strong"),le(),o()(),r(17,"div",22)(18,"h5"),a(19,3),o(),r(20,"ul",23)(21,"li")(22,"a",24),a(23,4),o(),r(24,"span"),a(25,5),o()(),r(26,"li")(27,"a",25),a(28,6),o(),r(29,"span"),a(30,7),o()()()(),r(31,"div",22)(32,"h5"),a(33,8),o(),r(34,"ul",23)(35,"li")(36,"a",26),a(37,9),o(),r(38,"span"),a(39,10),o()(),r(40,"li")(41,"a",27),Q(42,"User:"),o(),r(43,"span"),a(44,11),o()(),r(45,"li")(46,"a",28),a(47,12),o(),r(48,"span"),a(49,13),o()()()(),r(50,"div",29)(51,"my-button",30),M("click",function(){return e.hide.emit();}),a(52,14),o(),r(53,"my-button",31),M("click",function(){return e.hide.emit();}),a(54,15),o()()());},dependencies:[N,W],styles:[`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-EWBERGGL.css.map */`]}));let _=i;return _;})();var ft=_=>({"input-error":_});function Ft(_,i){if(_&1&&(r(0,"div",34),Q(1),o()),_&2){let m=O();s(),Fe(m.formErrors.platformName);}}function ht(_,i){if(_&1&&(r(0,"div",34),Q(1),o()),_&2){let m=O();s(),Fe(m.formErrors.shortDescription);}}function Rt(_,i){if(_&1){let m=K();r(0,"my-button",35),M("click",function(){T(m);let t=O();return D(t.back.emit());}),a(1,10),o();}}var Ct=(()=>{let i=class i{server=g(ne);formReactiveService=g(L);themeService=g(Ne);currentStep=h.required({transform:x});totalSteps=h.required({transform:x});showBack=h.required({transform:pe});back=I();next=I();hide=I();form;formErrors={};validationMessages={};ngOnInit(){this.buildForm();let n=ot(this.server.getHTMLConfig().instance.avatars,128);n&&fetch(n.fileUrl).then(t=>t.blob()).then(t=>this.form.patchValue({avatar:t})).catch(()=>{fe.error("Could not fetch instance avatar");});}buildForm(){let n={platformName:Ae,shortDescription:mt,avatar:null,primaryColor:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.getDefaultValues());this.form=t,this.formErrors=e,this.validationMessages=l;}getDefaultValues(){let n=this.server.getHTMLConfig(),t=n.theme.customization.primaryColor,e=t?this.themeService.formatColorForForm(t):this.themeService.formatColorForForm(this.themeService.getCSSConfigValue("primaryColor"));return{platformName:n.instance.name,shortDescription:n.instance.shortDescription,avatar:void 0,primaryColor:e};}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-admin-config-wizard-edit-info"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"],showBack:[1,"showBack"]},outputs:{back:"back",next:"next",hide:"hide"},decls:39,vars:13,consts:()=>{let n;n="STEP "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let t;t="General information";let e;e="You can edit this information later";let l;l="Platform name";let p;p="Stutt l\xFDsing";let f;f="Platform icon";let A;A="Used in various places such as on the website, mobile application and social media";let P;P="Primary color";let k;k="Next step";let X;X="Ignore for now";let V;return V="Back",[n,t,e,l,p,f,A,P,k,X,V,[1,"root"],[1,"two-columns"],["src","/client/assets/images/mascot/pointing.svg","alt","mascot",1,"mascot"],[1,"steps"],[1,"header-steps"],[1,"title"],[1,"text-content"],[3,"formGroup"],[1,"form-group"],["for","platformName"],["type","text","id","platformName","formControlName","platformName",1,"form-control",3,"ngClass"],["class","form-error","role","alert",4,"ngIf"],["for","shortDescription"],["id","shortDescription","formControlName","shortDescription",1,"form-control","small",3,"ngClass"],["for","avatarfile"],[1,"form-group-description"],["formControlName","avatar","inputName","avatar","displayDelete","true",1,"avatar-preview"],["for","primaryColor"],["inputId","primaryColor","formControlName","primaryColor",1,"d-block"],[1,"buttons"],["icon","arrow-left","theme","secondary"],["theme","primary",3,"click","disabled"],[1,"button-as-link",3,"click"],["role","alert",1,"form-error"],["icon","arrow-left","theme","secondary",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",11)(1,"div",12)(2,"div"),c(3,"img",13),o(),r(4,"div")(5,"div",14)(6,"div",15),a(7,0),o()(),r(8,"h4",16),a(9,1),o(),r(10,"div",17),a(11,2),o(),r(12,"form",18)(13,"div",19)(14,"label",20),a(15,3),o(),c(16,"input",21),$(17,Ft,2,1,"div",22),o(),r(18,"div",19)(19,"label",23),a(20,4),o(),c(21,"textarea",24),$(22,ht,2,1,"div",22),o(),r(23,"div",19)(24,"label",25),a(25,5),o(),r(26,"div",26),a(27,6),o(),c(28,"my-preview-upload",27),o(),r(29,"div",19)(30,"label",28),a(31,7),o(),c(32,"p-colorpicker",29),o(),r(33,"div",30),$(34,Rt,2,0,"my-button",31),r(35,"my-button",32),M("click",function(){return e.next.emit(e.form.value);}),a(36,8),o(),r(37,"button",33),M("click",function(){return e.hide.emit();}),a(38,9),o()()()()()()),t&2&&(s(7),J(e.currentStep())(e.totalSteps()),ee(7),s(5),d("formGroup",e.form),s(4),d("ngClass",_e(9,ft,e.formErrors.platformName)),s(),d("ngIf",e.formErrors.platformName),s(4),d("ngClass",_e(11,ft,e.formErrors.shortDescription)),s(),d("ngIf",e.formErrors.shortDescription),s(12),q(e.showBack()?34:-1),s(),d("disabled",!e.form.valid));},dependencies:[N,ue,Ke,v,Y,ge,w,U,b,B,j,G,ct,E,W,dt],styles:[`form[_ngcontent-%COMP%]{margin-top:calc(1.325rem + .9vw)}@media (min-width: 1200px){form[_ngcontent-%COMP%]{margin-top:2rem}}.mascot[_ngcontent-%COMP%]{margin-top:-90px;width:170px;height:190px}.avatar-preview[_ngcontent-%COMP%]{width:128px;height:128px}@media screen and (max-width: 800px){.mascot[_ngcontent-%COMP%]{display:none}.two-columns[_ngcontent-%COMP%]{justify-content:center}}textarea[_ngcontent-%COMP%]{min-height:150px}
/*# sourceMappingURL=admin-config-wizard-edit-info.component-AH26RUQ5.css.map */`,`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-EWBERGGL.css.map */`]}));let _=i;return _;})();var It=(()=>{let i=class i{formReactiveService=g(L);usageType=H.required();form;formErrors={};validationMessages={};registrationOptions=[{id:"open",label:"Open",description:"Anyone can register and use the platform"},{id:"approval",label:"Requires approval",description:"Anyone can register, but a moderator must approve their account before they can use the platform"},{id:"closed",label:"Closed",description:"Only an administrator can create users on the platform"}];importOptions=[{id:"enabled",label:"Virkt",description:"Your community can import videos from remote platforms (YouTube, Vimeo...) and automatically synchronize remote channels"},{id:"disabled",label:"\xD3virkt",description:"Your community cannot import or synchronize content from remote platforms"}];liveOptions=[{id:"enabled",label:"Yes",description:"Your community can live stream on the platform (this requires extra moderation work)"},{id:"disabled",label:"No",description:"Your community is not permitted to run live streams on the platform"}];globalSearchOptions=[{id:"enabled",label:"Virkja v\xED\xF0v\xE6ra leit",description:"Use https://sepiasearch.org as default search engine to search for content across all known PeerTube platforms"},{id:"disabled",label:"Disable global search",description:"Use your platform search engine which only displays local content"}];videoQuotaOptions=pt();ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(n=>{this.usageType().patch(n);});}buildForm(){let n={registration:null,remoteImport:null,videoQuota:null,live:null,globalSearch:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.usageType());this.form=t,this.formErrors=e,this.validationMessages=l;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-community-based-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:21,vars:6,consts:()=>{let n;n="Registration policy";let t;t="Video quota for new users";let e;e="Video import and synchronization";let l;l="My community can stream lives";let p;return p="Leita",[n,t,e,l,p,[3,"formGroup"],[1,"form-group"],["for",""],["inputId","registration","formControlName","registration",3,"items"],["inputId","videoQuota","formControlName","videoQuota",3,"items"],["for","remoteImport"],["inputId","remoteImport","formControlName","remoteImport",3,"items"],["inputId","live","formControlName","live",3,"items"],["inputId","globalSearch","formControlName","globalSearch",3,"items"]];},template:function(t,e){t&1&&(r(0,"form",5)(1,"div",6)(2,"label",7),a(3,0),o(),c(4,"my-select-options",8),o(),r(5,"div",6)(6,"label",7),a(7,1),o(),c(8,"my-select-options",9),o(),r(9,"div",6)(10,"label",10),a(11,2),o(),c(12,"my-select-options",11),o(),r(13,"div",6)(14,"label",7),a(15,3),o(),c(16,"my-select-options",12),o(),r(17,"div",6)(18,"label",7),a(19,4),o(),c(20,"my-select-options",13),o()()),t&2&&(d("formGroup",e.form),s(4),d("items",e.registrationOptions),s(4),d("items",e.videoQuotaOptions),s(4),d("items",e.importOptions),s(4),d("items",e.liveOptions),s(4),d("items",e.globalSearchOptions));},dependencies:[N,v,Y,w,U,b,B,j,G,E,oe],encapsulation:2}));let _=i;return _;})();var Nt=(()=>{let i=class i{formReactiveService=g(L);usageType=H.required();form;formErrors={};validationMessages={};p2pOptions=[{id:"enabled",label:"Virkt",description:"Enable P2P streaming by default for anonymous and new users"},{id:"disabled",label:"\xD3virkt",description:"Disable P2P streaming"}];transcriptionOptions=[{id:"enabled",label:"Virkt",description:"Enable automatic transcription of videos to automatically generate subtitles"},{id:"disabled",label:"\xD3virkt",description:"Disable automatic transcription of videos"}];keepOriginalVideoOptions=[{id:"enabled",label:"Yes",description:"Keep the original video file on the server"},{id:"disabled",label:"No",description:"Delete the original video file after processing"}];authenticationOptions=[{id:"local",label:"\xD3virkt",description:"Your platform will manage user registration and login internally"},{id:"ldap",label:"LDAP",description:"Use LDAP for user authentication"},{id:"oidc",label:"OIDC",description:"Use OpenID Connect for user authentication"},{id:"saml",label:"SAML",description:"Use SAML 2.0 for user authentication"}];ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(n=>{this.usageType().patch(n);});}buildForm(){let n={keepOriginalVideo:null,p2p:null,transcription:null,authType:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.usageType());this.form=t,this.formErrors=e,this.validationMessages=l;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-institutional-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:17,vars:5,consts:()=>{let n;n="Save a copy of the uploaded video";let t;t="P2P";let e;e="Video transcription";let l;return l="Remote authentication",[n,t,e,l,[3,"formGroup"],[1,"form-group"],["for","keepOriginalVideo"],["inputId","keepOriginalVideo","formControlName","keepOriginalVideo",3,"items"],["for","p2p"],["inputId","p2p","formControlName","p2p",3,"items"],["for","transcription"],["inputId","transcription","formControlName","transcription",3,"items"],["for","authType"],["inputId","authType","formControlName","authType",3,"items"]];},template:function(t,e){t&1&&(r(0,"form",4)(1,"div",5)(2,"label",6),a(3,0),o(),c(4,"my-select-options",7),o(),r(5,"div",5)(6,"label",8),a(7,1),o(),c(8,"my-select-options",9),o(),r(9,"div",5)(10,"label",10),a(11,2),o(),c(12,"my-select-options",11),o(),r(13,"div",5)(14,"label",12),a(15,3),o(),c(16,"my-select-options",13),o()()),t&2&&(d("formGroup",e.form),s(4),d("items",e.keepOriginalVideoOptions),s(4),d("items",e.p2pOptions),s(4),d("items",e.transcriptionOptions),s(4),d("items",e.authenticationOptions));},dependencies:[N,v,Y,w,U,b,B,j,G,E,oe],encapsulation:2}));let _=i;return _;})();var At=(()=>{let i=class i{formReactiveService=g(L);usageType=H.required();form;formErrors={};validationMessages={};importOptions=[{id:"enabled",label:"Virkt",description:"Users can import videos from remote platforms (YouTube, Vimeo...) and automatically synchronize remote channels"},{id:"disabled",label:"\xD3virkt",description:"Disable video import and channel synchronization"}];liveOptions=[{id:"enabled",label:"Yes"},{id:"disabled",label:"No"}];keepOriginalVideoOptions=[{id:"enabled",label:"Yes",description:"Keep the original video file on the server"},{id:"disabled",label:"No",description:"Delete the original video file after processing"}];ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(n=>{this.usageType().patch(n);});}buildForm(){let n={remoteImport:null,live:null,keepOriginalVideo:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.usageType());this.form=t,this.formErrors=e,this.validationMessages=l;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-private-instance-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:13,vars:4,consts:()=>{let n;n="Video import and synchronization";let t;t="Users can stream lives";let e;return e="Save a copy of the uploaded video",[n,t,e,[3,"formGroup"],[1,"form-group"],["for","remoteImport"],["inputId","remoteImport","formControlName","remoteImport",3,"items"],["for","live"],["inputId","live","formControlName","live",3,"items"],["for","keepOriginalVideo"],["inputId","keepOriginalVideo","formControlName","keepOriginalVideo",3,"items"]];},template:function(t,e){t&1&&(r(0,"form",3)(1,"div",4)(2,"label",5),a(3,0),o(),c(4,"my-select-options",6),o(),r(5,"div",4)(6,"label",7),a(7,1),o(),c(8,"my-select-options",8),o(),r(9,"div",4)(10,"label",9),a(11,2),o(),c(12,"my-select-options",10),o()()),t&2&&(d("formGroup",e.form),s(4),d("items",e.importOptions),s(4),d("items",e.liveOptions),s(4),d("items",e.keepOriginalVideoOptions));},dependencies:[N,v,Y,w,U,b,B,j,G,E,oe],encapsulation:2}));let _=i;return _;})();var ie=class _{registration;videoQuota;remoteImport;live;globalSearch;defaultPrivacy;defaultCommentPolicy;p2p;federation;keepOriginalVideo;allowReplaceFile;preferDisplayName;transcription;authType;unsafeExplanations=[];config={};plugins=[];constructor(i){for(let[m,n]of Object.entries(i))this[m]=n;}static initForCommunity(){let i=new _({registration:"approval",remoteImport:"disabled",live:"enabled",videoQuota:5368709120,globalSearch:"enabled",defaultPrivacy:te.PUBLIC,p2p:"enabled",federation:"enabled",keepOriginalVideo:"disabled",allowReplaceFile:"disabled",defaultCommentPolicy:void 0,authType:void 0,preferDisplayName:void 0,transcription:void 0});return i.compute(),i;}static initForPrivateInstance(){let i=new _({registration:"closed",remoteImport:"enabled",live:"enabled",videoQuota:-1,globalSearch:"disabled",defaultPrivacy:te.INTERNAL,p2p:"disabled",federation:"disabled",keepOriginalVideo:"enabled",allowReplaceFile:"enabled",preferDisplayName:"enabled",defaultCommentPolicy:void 0,authType:void 0,transcription:void 0});return i.compute(),i;}static initForInstitution(){let i=new _({registration:"closed",remoteImport:"enabled",live:"enabled",videoQuota:-1,globalSearch:"disabled",defaultPrivacy:te.PUBLIC,p2p:"disabled",keepOriginalVideo:"enabled",allowReplaceFile:"enabled",preferDisplayName:"enabled",authType:"local",transcription:"enabled",defaultCommentPolicy:nt.REQUIRES_APPROVAL,federation:void 0});return i.compute(),i;}compute(){this.unsafeExplanations=[],this.plugins=[],this.config={},this.computeRegistration(),this.computeDefaultVideoPrivacy(),this.computeVideoQuota(),this.computeKeepOriginalVideo(),this.computeReplaceVideoFile(),this.computeVideoImport(),this.computeStreamLives(),this.computeP2P(),this.computeGlobalSearch(),this.computeDefaultVideoCommentPolicy(),this.computeFederation(),this.computeMiniatureSettings(),this.computeTranscription(),this.computeAuth();}getUnsafeExplanations(){return[...this.unsafeExplanations];}getConfig(){return re({},this.config);}getPlugins(){return[...this.plugins];}patch(i){for(let[m,n]of Object.entries(i))this[m]=n;this.compute();}computeRegistration(){R(this.registration)&&(this.registration==="open"?(this.addExplanation("<strong>Allow</strong> any user <strong>to register</strong>"),this.addConfig({signup:{enabled:!0,requiresApproval:!1}})):this.registration==="approval"?(this.addExplanation("Allow users to <strong>apply for registration</strong> on your platform"),this.addConfig({signup:{enabled:!0,requiresApproval:!0}})):this.registration==="closed"&&(this.addExplanation("<strong>Disable</strong> user <strong>registration</strong>"),this.addConfig({signup:{enabled:!1}})),(this.registration==="approval"||this.registration==="open")&&(this.addExplanation("Require <strong>moderator approval</strong> for videos published by your community"),this.addConfig({autoBlacklist:{videos:{ofUsers:{enabled:!0}}}})));}computeVideoQuota(){R(this.videoQuota)&&(this.addConfig({user:{videoQuota:this.videoQuota}}),this.videoQuota===0?this.addExplanation("<strong>Prevent</strong> new users <strong>from uploading videos</strong> (can be changed by moderators)"):this.videoQuota===-1?this.addExplanation("<strong>Not limit the amount of videos</strong> new users can upload"):this.addExplanation("Set <strong>video quota to "+rt(this.videoQuota,0)+"</strong> for new users (can be changed by moderators)"));}computeVideoImport(){R(this.remoteImport)&&(this.addConfig({import:{videos:{http:{enabled:this.remoteImport==="enabled"}},videoChannelSynchronization:{enabled:this.remoteImport==="enabled"}}}),this.remoteImport==="enabled"?this.addExplanation("<strong>Allow</strong> your users <strong>to import and synchronize</strong> videos from remote platforms (YouTube, Vimeo...)"):this.addExplanation("<strong>Prevent</strong> your users <strong>from importing videos</strong> from remote platforms"));}computeStreamLives(){R(this.live)&&(this.addConfig({live:{enabled:this.live==="enabled"}}),this.live==="enabled"?(this.plugins.push("peertube-plugin-livechat"),this.addExplanation("<strong>Allow</strong> your users <strong>to stream lives</strong> and chat with their viewers using the <strong>Livechat</strong> plugin")):this.addExplanation("<strong>Prevent</strong> your users from running <strong>live streams</strong>"));}computeDefaultVideoPrivacy(){R(this.defaultPrivacy)&&(this.addConfig({defaults:{publish:{privacy:this.defaultPrivacy}}}),this.defaultPrivacy===te.INTERNAL?this.addExplanation("Set the <strong>default video privacy</strong> to <strong>Internal</strong>"):this.defaultPrivacy===te.PUBLIC&&this.addExplanation("Set the <strong>default video privacy</strong> to <strong>Public</strong>"));}computeDefaultVideoCommentPolicy(){R(this.defaultCommentPolicy)&&(this.addConfig({defaults:{publish:{commentsPolicy:this.defaultCommentPolicy}}}),this.addExplanation("<strong>Require approval</strong> by default of new video comment"));}computeP2P(){R(this.p2p)&&(this.addConfig({defaults:{p2p:{embed:{enabled:this.p2p==="enabled"},webapp:{enabled:this.p2p==="enabled"}}}}),this.p2p==="enabled"?this.addExplanation("<strong>Enable P2P streaming</strong> by default for anonymous and new users"):this.addExplanation("<strong>Disable P2P streaming</strong> by default for anonymous and new users"));}computeFederation(){R(this.federation)&&(this.addConfig({followers:{instance:{enabled:this.federation==="enabled"},channels:{enabled:this.federation==="enabled"}}}),this.federation==="enabled"?this.addExplanation("<strong>Allow</strong> external platforms/users to <strong>subscribe</strong> to your content"):this.addExplanation("<strong>Prevent</strong> external platforms/users to <strong>subscribe to your content</strong>"));}computeKeepOriginalVideo(){R(this.keepOriginalVideo)&&(this.addConfig({transcoding:{originalFile:{keep:this.keepOriginalVideo==="enabled"}}}),this.keepOriginalVideo==="enabled"&&this.addExplanation("<strong>Save a copy</strong> of the uploaded video file"));}computeReplaceVideoFile(){R(this.allowReplaceFile)&&(this.addConfig({videoFile:{update:{enabled:this.allowReplaceFile==="enabled"}}}),this.allowReplaceFile==="enabled"&&this.addExplanation("<strong>Allow</strong> your users <strong>to replace a video</strong> that has already been published"));}computeMiniatureSettings(){R(this.preferDisplayName)&&this.addConfig({client:{videos:{miniature:{preferAuthorDisplayName:this.preferDisplayName==="enabled"}}}});}computeGlobalSearch(){R(this.globalSearch)&&(this.addConfig({search:{searchIndex:{enabled:this.globalSearch==="enabled",isDefaultSearch:this.globalSearch==="enabled",url:"https://sepiasearch.org"}}}),this.globalSearch==="enabled"&&this.addExplanation("Set <a href=\"https://sepiasearch.org\" target=\"_blank\">SepiaSearch</a> as <strong>default search engine</strong>"));}computeTranscription(){R(this.transcription)&&(this.addConfig({videoTranscription:{enabled:this.transcription==="enabled"}}),this.transcription==="enabled"&&this.addExplanation("<strong>Enable automatic transcription</strong> of videos to create subtitles and improve accessibility"));}computeAuth(){if(!R(this.authType))return;let i=" The plugin <strong>must be configured</strong> after the pre-configuration wizard confirmation.";this.authType==="ldap"?(this.addExplanation("Install the <strong>LDAP</strong> authentication plugin."+i),this.plugins.push("peertube-plugin-auth-ldap")):this.authType==="saml"?(this.addExplanation("Install the <strong>SAML 2.0</strong> authentication plugin."+i),this.plugins.push("peertube-plugin-auth-saml2")):this.authType==="oidc"&&(this.addExplanation("Install the <strong>OpenID Connect</strong> authentication plugin."+i),this.plugins.push("peertube-plugin-auth-openid-connect"));}addConfig(i){return this.config=Ce(this.config,i);}addExplanation(i){this.unsafeExplanations.push(i);}};var Ot=(()=>{let i=class i{el=g(Xe);html=h.required();ngOnInit(){let n=this.el.nativeElement;n.innerHTML=this.html(),n.ariaHidden="true";}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-custom-icon"]],inputs:{html:[1,"html"]},decls:0,vars:0,template:function(t,e){},styles:[`[_nghost-%COMP%]{display:inline-block;height:24px;width:24px}[_nghost-%COMP%]     svg{vertical-align:bottom;width:inherit;height:inherit}[_nghost-%COMP%]     .feather-flag{margin-left:-1px}
/*# sourceMappingURL=common-icon.component-XANAO2SC.css.map */`],changeDetection:0}));let _=i;return _;})();var bt=_=>({"platform-type-selected":_});function Gt(_,i){if(_&1&&c(0,"my-community-based-config",35),_&2){let m=O();d("usageType",m.usageType[m.platformType]);}}function $t(_,i){if(_&1&&c(0,"my-institutional-config",35),_&2){let m=O();d("usageType",m.usageType[m.platformType]);}}function wt(_,i){if(_&1&&c(0,"my-private-instance-config",35),_&2){let m=O();d("usageType",m.usageType[m.platformType]);}}var Dt=(()=>{let i=class i{server=g(ne);formReactiveService=g(L);themeService=g(Ne);currentStep=h.required({transform:x});totalSteps=h.required({transform:x});back=I();next=I();hide=I();iconKey=St();iconInstitution=Tt();form;formErrors={};validationMessages={};platformType;usageType={community:ie.initForCommunity(),institution:ie.initForInstitution(),private:ie.initForPrivateInstance()};ngOnInit(){this.buildForm(),this.subscribeToColorChanges();}subscribeToColorChanges(){let n;this.form.get("primaryColor").valueChanges.pipe(Ze(250)).subscribe(t=>{n&&(cancelAnimationFrame(n),n=null),n=requestAnimationFrame(()=>{let e=this.server.getHTMLConfig();this.themeService.updateColorPalette(Te(re({},e.theme),{customization:Te(re({},e.theme.customization),{primaryColor:this.themeService.formatColorForForm(t)})}));});});}buildForm(){let n={platformName:Ae,primaryColor:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.getDefaultValues());this.form=t,this.formErrors=e,this.validationMessages=l;}getDefaultValues(){let n=this.server.getHTMLConfig(),t=n.theme.customization.primaryColor,e=t?this.themeService.formatColorForForm(t):this.themeService.formatColorForForm(this.themeService.getCSSConfigValue("primaryColor"));return{platformName:n.instance.name,primaryColor:e};}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-admin-config-wizard-form"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"]},outputs:{back:"back",next:"next",hide:"hide"},decls:58,vars:12,consts:()=>{let n;n="STEP "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let t;t="Usage type";let e;e="My platform is more like...";let l;l="Community-based";let p;p="Enable a community to publish content and interact together.";let f;f="Institutional";let A;A="To broadcast your videos. Recommended for public institutions, association and companies.";let P;P="Einka";let k;k="Only certain people can access content. Recommended for families and closed communities.";let X;X="Back";let V;V="Preview configuration";let S;return S="Ignore for now",[n,t,e,l,p,f,A,P,k,X,V,S,[1,"root"],[1,"two-columns","mb-4"],["src","/client/assets/images/mascot/default.svg","alt","mascot",1,"mascot"],[1,"steps"],[1,"header-steps"],[1,"title"],[1,"text-content"],[1,"label"],[1,"two-columns","width-50"],[1,"platform-types",3,"ngClass"],[1,"ul-unstyle"],[1,"platform-type"],["type","radio","name","platformType","id","platformTypeCommunity","value","community",3,"ngModelChange","ngModel"],["for","platformTypeCommunity"],["iconName","users"],[1,"type-label"],[1,"type-description"],["type","radio","name","platformType","id","platformTypeInstitution","value","institution",3,"ngModelChange","ngModel"],["for","platformTypeInstitution"],[3,"html"],["type","radio","name","platformType","id","platformTypePrivate","value","private",3,"ngModelChange","ngModel"],["for","platformTypePrivate"],[1,"platform-config"],[3,"usageType"],[1,"buttons"],["icon","arrow-left","theme","secondary",3,"click"],["theme","primary",3,"click","disabled"],[1,"button-as-link",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",12)(1,"div",13)(2,"div"),c(3,"img",14),o(),r(4,"div")(5,"div",15)(6,"div",16),a(7,0),o()(),r(8,"h4",17),a(9,1),o(),r(10,"div",18),Q(11,"You can also edit your platform configuration at a later time"),o()()(),r(12,"div",19),a(13,2),o(),r(14,"div",20)(15,"div",21)(16,"ul",22)(17,"li",23)(18,"input",24),de("ngModelChange",function(p){return me(e.platformType,p)||(e.platformType=p),p;}),o(),r(19,"label",25)(20,"div"),c(21,"my-global-icon",26),o(),r(22,"div")(23,"div",27),a(24,3),o(),r(25,"div",28),a(26,4),o()()()(),r(27,"li",23)(28,"input",29),de("ngModelChange",function(p){return me(e.platformType,p)||(e.platformType=p),p;}),o(),r(29,"label",30)(30,"div"),c(31,"my-custom-icon",31),o(),r(32,"div")(33,"div",27),a(34,5),o(),r(35,"div",28),a(36,6),o()()()(),r(37,"li",23)(38,"input",32),de("ngModelChange",function(p){return me(e.platformType,p)||(e.platformType=p),p;}),o(),r(39,"label",33)(40,"div"),c(41,"my-custom-icon",31),o(),r(42,"div")(43,"div",27),a(44,7),o(),r(45,"div",28),a(46,8),o()()()()()(),r(47,"div",34),$(48,Gt,1,1,"my-community-based-config",35)(49,$t,1,1,"my-institutional-config",35)(50,wt,1,1,"my-private-instance-config",35),o()(),r(51,"div",36)(52,"my-button",37),M("click",function(){return e.back.emit();}),a(53,9),o(),r(54,"my-button",38),M("click",function(){return e.next.emit(e.usageType[e.platformType]);}),a(55,10),o(),r(56,"button",39),M("click",function(){return e.hide.emit();}),a(57,11),o()()()),t&2&&(s(7),J(e.currentStep())(e.totalSteps()),ee(7),s(8),d("ngClass",_e(10,bt,e.platformType)),s(3),se("ngModel",e.platformType),s(10),se("ngModel",e.platformType),s(3),d("html",e.iconInstitution),s(7),se("ngModel",e.platformType),s(3),d("html",e.iconKey),s(7),q(e.platformType==="community"?48:e.platformType==="institution"?49:e.platformType==="private"?50:-1),s(6),d("disabled",!e.platformType));},dependencies:[N,ue,v,ge,tt,w,et,b,G,E,W,lt,It,At,Nt,Ot],styles:[`.mascot[_ngcontent-%COMP%]{margin-top:-90px;width:170px;height:190px}.two-columns.width-50[_ngcontent-%COMP%]{gap:0}.platform-types[_ngcontent-%COMP%]{display:flex}@media screen and (min-width: 800px){.platform-types[_ngcontent-%COMP%]{margin-inline-end:calc(1.325rem + .9vw)}.platform-types.platform-type-selected[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{border-inline-start:1px solid var(--bg-secondary-450)}.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-inline-start:calc(1.325rem + .9vw)}}@media screen and (min-width: 800px) and (min-width: 1200px){.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-inline-start:2rem}}@media screen and (min-width: 800px) and (min-width: 1200px){.platform-types[_ngcontent-%COMP%]{margin-inline-end:2rem}}@media screen and (max-width: 800px){.platform-types[_ngcontent-%COMP%]{margin-bottom:calc(1.325rem + .9vw)}.platform-types.platform-type-selected[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{border-block-start:1px solid var(--bg-secondary-450)}.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-top:calc(1.325rem + .9vw)}}@media screen and (max-width: 800px) and (min-width: 1200px){.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-top:2rem}}@media screen and (max-width: 800px) and (min-width: 1200px){.platform-types[_ngcontent-%COMP%]{margin-bottom:2rem}}.platform-types[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;padding:1rem 1.5rem;gap:1rem;color:var(--fg-300);border-radius:8px;border:1px solid var(--bg-secondary-450);margin:0}.platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%], .platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   my-custom-icon[_ngcontent-%COMP%]{color:var(--secondary-icon-color);display:inline-block;width:34px;height:34px;line-height:34px}.platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]:hover{background-color:var(--bg-secondary-300)}.platform-type[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]{display:none}.type-label[_ngcontent-%COMP%]{color:var(--fg-400);font-weight:700;font-size:1rem}.type-description[_ngcontent-%COMP%]{font-size:14px;font-weight:400}input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{border:2px solid var(--border-primary);margin:-1px;background-color:var(--bg)}input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%], input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   my-custom-icon[_ngcontent-%COMP%]{color:var(--border-primary)}@media screen and (max-width: 800px){.mascot[_ngcontent-%COMP%]{display:none}.two-columns[_ngcontent-%COMP%]{justify-content:center}.two-columns.width-50[_ngcontent-%COMP%]{flex-direction:column;align-items:center}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%!important}}
/*# sourceMappingURL=admin-config-wizard-form.component-UG3AUGFI.css.map */`,`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-EWBERGGL.css.map */`]}));let _=i;return _;})();function Lt(_,i){if(_&1&&c(0,"li",14),_&2){let m=i.$implicit;d("innerHTML",m,Ve);}}var Et=(()=>{let i=class i{adminConfig=g(Re);pluginAPI=g(ye);notifier=g(Ie);html=g(_t);server=g(ne);instanceLogo=g(ve);currentStep=h.required({transform:x});totalSteps=h.required({transform:x});usageType=h.required();instanceInfo=h.required();dryRun=h.required({transform:pe});back=I();next=I();hide=I();safeExplanations=[];plugins=[];config={};updating=!1;ngOnChanges(){this.usageType()&&(this.safeExplanations=this.usageType().getUnsafeExplanations().map(n=>this.html.toSimpleSafeHtml(n)),this.config=Ce({instance:{name:this.instanceInfo().platformName,shortDescription:this.instanceInfo().shortDescription},theme:{customization:{primaryColor:this.instanceInfo().primaryColor}}},this.usageType().getConfig()),this.plugins=this.usageType().getPlugins());}confirm(){if(this.dryRun())return this.next.emit();this.updating=!0,this.adminConfig.updateCustomConfig(this.config).pipe(()=>{let n=this.instanceInfo().avatar;return n?this.instanceLogo.updateAvatar(n):this.instanceLogo.deleteAvatar();}).pipe(De(()=>this.server.resetConfig()),De(()=>Le(this.plugins).pipe(ze(n=>this.pluginAPI.install(n)),We()))).subscribe({next:()=>{this.updating=!1,this.next.emit();},error:n=>{this.notifier.error(n.message),this.updating=!1;}});}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-admin-config-wizard-preview"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"],usageType:[1,"usageType"],instanceInfo:[1,"instanceInfo"],dryRun:[1,"dryRun"]},outputs:{back:"back",next:"next",hide:"hide"},features:[ce([Re,ye,ve]),xe],decls:25,vars:4,consts:()=>{let n;n="STEP "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let t;t="Configuration preview";let e;e="If you confirm, PeerTube will:";let l;l=" If you want finer settings control, your platform configuration can be easily changed after the pre-configuration wizard! ";let p;p="Back";let f;f="Confirm this configuration";let A;return A="Ignore for now",[n,t,e,l,p,f,A,[1,"root"],[1,"two-columns"],["src","/client/assets/images/mascot/default.svg","alt","mascot",1,"mascot"],[1,"steps"],[1,"header-steps"],[1,"title"],[1,"text-content","mt-3"],[3,"innerHTML"],[1,"buttons"],["icon","arrow-left","theme","secondary",3,"click"],["theme","primary",3,"click","disabled","loading"],[1,"button-as-link",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",7)(1,"div",8)(2,"div"),c(3,"img",9),o(),r(4,"div")(5,"div",10)(6,"div",11),a(7,0),o()(),r(8,"h4",12),a(9,1),o(),r(10,"div",13)(11,"p"),a(12,2),o(),r(13,"ul"),Be(14,Lt,1,1,"li",14,Ye),o(),r(16,"p"),a(17,3),o()()()(),r(18,"div",15)(19,"my-button",16),M("click",function(){return e.back.emit();}),a(20,4),o(),r(21,"my-button",17),M("click",function(){return e.confirm();}),a(22,5),o(),r(23,"button",18),M("click",function(){return e.hide.emit();}),a(24,6),o()()()),t&2&&(s(7),J(e.currentStep())(e.totalSteps()),ee(7),s(7),je(e.safeExplanations),s(7),d("disabled",e.updating)("loading",e.updating));},dependencies:[N,v,b,G,E,W],styles:[`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-EWBERGGL.css.map */`]}));let _=i;return _;})();var Pt=(()=>{let i=class i{userService=g(at);notifier=g(Ie);back=I();next=I();hide=I();doNotOpenAgain(){Me.setItem(Oe(),"true"),this.userService.updateMyProfile({noWelcomeModal:!0}).subscribe({next:()=>fe.info("We will not open the welcome modal again."),error:n=>this.notifier.error(n.message)});}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-admin-config-wizard-welcome"]],outputs:{back:"back",next:"next",hide:"hide"},decls:18,vars:0,consts:()=>{let n;n="Welcome to PeerTube";let t;t="dear administrator!";let e;e="Sepia, the cuttlefish, has a few questions to help you "+"\uFFFD#10\uFFFD"+"quickly pre-configure your platform"+"\uFFFD/#10\uFFFD"+".";let l;l="Let's go!";let p;p="\xC1minna mig s\xED\xF0ar";let f;return f="Do not display again",[n,t,e,l,p,f,[1,"root","one-column"],[1,"mascot-container"],["src","/client/assets/images/mascot/happy.svg","alt","mascot",1,"mascot"],[1,"title"],[1,"sub-title"],[1,"text-content","mt-3"],[1,"buttons"],["theme","primary",3,"click"],["theme","secondary",3,"click"],[1,"button-as-link",3,"click"]];},template:function(t,e){t&1&&(r(0,"div",6)(1,"div",7),c(2,"img",8),o(),r(3,"h4")(4,"div",9),a(5,0),o(),r(6,"div",10),a(7,1),o()(),r(8,"div",11),ae(9,2),c(10,"strong"),le(),o(),r(11,"div",12)(12,"my-button",13),M("click",function(){return e.next.emit();}),a(13,3),o(),r(14,"my-button",14),M("click",function(){return e.hide.emit();}),a(15,4),o(),r(16,"button",15),M("click",function(){return e.doNotOpenAgain(),e.hide.emit();}),a(17,5),o()()());},dependencies:[N,v,b,E,W],styles:[`.steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media (min-width: 1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw);gap:calc(1.275rem + .3vw)}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}@media (min-width: 1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}
/*# sourceMappingURL=admin-config-wizard-modal-common-EWBERGGL.css.map */`]}));let _=i;return _;})();var Wt=["modal"],zt=["stepper"];function Zt(_,i){if(_&1){let m=K();r(0,"cdk-step",3)(1,"my-admin-config-wizard-welcome",11),M("back",function(){T(m),O();let t=Z(2);return D(t.previous());})("next",function(){T(m),O();let t=Z(2);return D(t.next());})("hide",function(){T(m);let t=O().close;return D(t());}),o()();}}function xt(_,i){if(_&1){let m=K();r(0,"cdk-step",10)(1,"my-admin-config-wizard-documentation",12),M("hide",function(){T(m);let t=O().close;return D(t());}),o()();}}function kt(_,i){if(_&1){let m=K();r(0,"div",2)(1,"my-admin-config-wizard-stepper",null,1),$(3,Zt,2,0,"cdk-step",3),r(4,"cdk-step",4)(5,"my-admin-config-wizard-edit-info",5),M("back",function(){T(m);let t=Z(2);return D(t.previous());})("next",function(t){T(m);let e=Z(2),l=O();return l.instanceInfo=t,D(e.next());})("hide",function(){let t=T(m).close;return D(t());}),o()(),r(6,"cdk-step",6)(7,"my-admin-config-wizard-form",7),M("back",function(){T(m);let t=Z(2);return D(t.previous());})("next",function(t){T(m);let e=Z(2),l=O();return l.usageType=t,D(e.next());})("hide",function(){let t=T(m).close;return D(t());}),o()(),r(8,"cdk-step",8)(9,"my-admin-config-wizard-preview",9),M("back",function(){T(m);let t=Z(2);return D(t.previous());})("next",function(){let t=T(m).close,e=Z(2),l=O();return D(l.showWelcome?e.next():t());})("hide",function(){let t=T(m).close;return D(t());}),o()(),$(10,xt,2,0,"cdk-step",10),o()();}if(_&2){let m=O();s(3),q(m.showWelcome?3:-1),s(2),d("currentStep",m.currentStep())("showBack",m.showWelcome),s(2),d("currentStep",m.currentStep()),s(2),d("usageType",m.usageType)("instanceInfo",m.instanceInfo)("dryRun",m.dryRun)("currentStep",m.currentStep()),s(),q(m.showWelcome?10:-1);}}var gi=(()=>{let i=class i{modalService=g(it);modal=Ee("modal");stepper=Ee("stepper");created=I();usageType;instanceInfo;showWelcome;dryRun;ngOnInit(){this.created.emit();}shouldAutoOpen(n){return this.modalService.hasOpenModals()?!1:this.getFragment()==="#admin-welcome-wizard"||this.getFragment()==="#admin-welcome-wizard-test"?!0:!(n.noWelcomeModal===!0||Me.getItem(Oe())==="true");}show({showWelcome:n}){this.showWelcome=n,this.dryRun=this.getFragment()==="#admin-welcome-wizard-test",this.modalService.open(this.modal(),{centered:!0,backdrop:"static",keyboard:!1,size:"lg"});}currentStep(){if(!this.stepper())return 0;let n=this.stepper().selectedIndex;return this.showWelcome?n:n+1;}totalSteps(){if(!this.stepper())return 0;let n=this.stepper().steps.length;return this.showWelcome?n-1:n;}getFragment(){return window.location.hash;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",C({type:i,selectors:[["my-admin-config-wizard-modal"]],viewQuery:function(t,e){t&1&&(Pe(e.modal,Wt,5),Pe(e.stepper,zt,5)),t&2&&Qe(2);},outputs:{created:"created"},decls:2,vars:0,consts:()=>{let n;n="Welcome introduction";let t;t="Edit general information";let e;e="Usage type";let l;l="Configuration preview";let p;return p="Post configuration documentation",[["modal",""],["stepper",""],[1,"modal-body"],["label",n],["label",t],["totalSteps","3",3,"back","next","hide","currentStep","showBack"],["label",e],["totalSteps","3",3,"back","next","hide","currentStep"],["label",l],["totalSteps","3",3,"back","next","hide","usageType","instanceInfo","dryRun","currentStep"],["label",p],[3,"back","next","hide"],[3,"hide"]];},template:function(t,e){t&1&&$(0,kt,11,9,"ng-template",null,0,He);},dependencies:[N,E,st,gt,Pt,Ct,Dt,Et,Mt],styles:[`.modal-body[_ngcontent-%COMP%]{padding:2rem 3rem}
/*# sourceMappingURL=admin-config-wizard-modal.component-6HPIFVG3.css.map */`]}));let _=i;return _;})();export{gi as AdminConfigWizardModalComponent};/**i18n:85d030b7fdd36d163c6d41dcef9178681a6baa573eb199e8b12fe27dbb057a98*///# sourceMappingURL=chunk-OO4WE57Z.js.map